vibe-coding-master 0.0.7 → 0.0.8

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
- var fv=Object.defineProperty;var dv=(k,Y,ee)=>Y in k?fv(k,Y,{enumerable:!0,configurable:!0,writable:!0,value:ee}):k[Y]=ee;var Mf=(k,Y,ee)=>dv(k,typeof Y!="symbol"?Y+"":Y,ee);(function(){const Y=document.createElement("link").relList;if(Y&&Y.supports&&Y.supports("modulepreload"))return;for(const ae of document.querySelectorAll('link[rel="modulepreload"]'))z(ae);new MutationObserver(ae=>{for(const ce of ae)if(ce.type==="childList")for(const K of ce.addedNodes)K.tagName==="LINK"&&K.rel==="modulepreload"&&z(K)}).observe(document,{childList:!0,subtree:!0});function ee(ae){const ce={};return ae.integrity&&(ce.integrity=ae.integrity),ae.referrerPolicy&&(ce.referrerPolicy=ae.referrerPolicy),ae.crossOrigin==="use-credentials"?ce.credentials="include":ae.crossOrigin==="anonymous"?ce.credentials="omit":ce.credentials="same-origin",ce}function z(ae){if(ae.ep)return;ae.ep=!0;const ce=ee(ae);fetch(ae.href,ce)}})();var Co={exports:{}},Pr={};/**
1
+ var fv=Object.defineProperty;var dv=(B,Y,ee)=>Y in B?fv(B,Y,{enumerable:!0,configurable:!0,writable:!0,value:ee}):B[Y]=ee;var Mf=(B,Y,ee)=>dv(B,typeof Y!="symbol"?Y+"":Y,ee);(function(){const Y=document.createElement("link").relList;if(Y&&Y.supports&&Y.supports("modulepreload"))return;for(const ae of document.querySelectorAll('link[rel="modulepreload"]'))H(ae);new MutationObserver(ae=>{for(const ce of ae)if(ce.type==="childList")for(const K of ce.addedNodes)K.tagName==="LINK"&&K.rel==="modulepreload"&&H(K)}).observe(document,{childList:!0,subtree:!0});function ee(ae){const ce={};return ae.integrity&&(ce.integrity=ae.integrity),ae.referrerPolicy&&(ce.referrerPolicy=ae.referrerPolicy),ae.crossOrigin==="use-credentials"?ce.credentials="include":ae.crossOrigin==="anonymous"?ce.credentials="omit":ce.credentials="same-origin",ce}function H(ae){if(ae.ep)return;ae.ep=!0;const ce=ee(ae);fetch(ae.href,ce)}})();var Co={exports:{}},Pr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var fv=Object.defineProperty;var dv=(k,Y,ee)=>Y in k?fv(k,Y,{enumerable:!0,confi
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 Lf;function _v(){if(Lf)return Pr;Lf=1;var k=Symbol.for("react.transitional.element"),Y=Symbol.for("react.fragment");function ee(z,ae,ce){var K=null;if(ce!==void 0&&(K=""+ce),ae.key!==void 0&&(K=""+ae.key),"key"in ae){ce={};for(var u in ae)u!=="key"&&(ce[u]=ae[u])}else ce=ae;return ae=ce.ref,{$$typeof:k,type:z,key:K,ref:ae!==void 0?ae:null,props:ce}}return Pr.Fragment=Y,Pr.jsx=ee,Pr.jsxs=ee,Pr}var Of;function vv(){return Of||(Of=1,Co.exports=_v()),Co.exports}var L=vv(),Eo={exports:{}},ye={};/**
9
+ */var Lf;function _v(){if(Lf)return Pr;Lf=1;var B=Symbol.for("react.transitional.element"),Y=Symbol.for("react.fragment");function ee(H,ae,ce){var K=null;if(ce!==void 0&&(K=""+ce),ae.key!==void 0&&(K=""+ae.key),"key"in ae){ce={};for(var u in ae)u!=="key"&&(ce[u]=ae[u])}else ce=ae;return ae=ce.ref,{$$typeof:B,type:H,key:K,ref:ae!==void 0?ae:null,props:ce}}return Pr.Fragment=Y,Pr.jsx=ee,Pr.jsxs=ee,Pr}var Of;function vv(){return Of||(Of=1,Co.exports=_v()),Co.exports}var L=vv(),Eo={exports:{}},ye={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var fv=Object.defineProperty;var dv=(k,Y,ee)=>Y in k?fv(k,Y,{enumerable:!0,confi
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 Bf;function gv(){if(Bf)return ye;Bf=1;var k=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),K=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;function b(x){return x===null||typeof x!="object"?null:(x=p&&x[p]||x["@@iterator"],typeof x=="function"?x:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,l={};function c(x,M,V){this.props=x,this.context=M,this.refs=l,this.updater=V||w}c.prototype.isReactComponent={},c.prototype.setState=function(x,M){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,M,"setState")},c.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function a(){}a.prototype=c.prototype;function o(x,M,V){this.props=x,this.context=M,this.refs=l,this.updater=V||w}var _=o.prototype=new a;_.constructor=o,g(_,c.prototype),_.isPureReactComponent=!0;var E=Array.isArray;function y(){}var C={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function D(x,M,V){var G=V.ref;return{$$typeof:k,type:x,key:M,ref:G!==void 0?G:null,props:V}}function O(x,M){return D(x.type,M,x.props)}function N(x){return typeof x=="object"&&x!==null&&x.$$typeof===k}function I(x){var M={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(V){return M[V]})}var H=/\/+/g;function J(x,M){return typeof x=="object"&&x!==null&&x.key!=null?I(""+x.key):M.toString(36)}function re(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(y,y):(x.status="pending",x.then(function(M){x.status==="pending"&&(x.status="fulfilled",x.value=M)},function(M){x.status==="pending"&&(x.status="rejected",x.reason=M)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function U(x,M,V,G,Q){var he=typeof x;(he==="undefined"||he==="boolean")&&(x=null);var q=!1;if(x===null)q=!0;else switch(he){case"bigint":case"string":case"number":q=!0;break;case"object":switch(x.$$typeof){case k:case Y:q=!0;break;case m:return q=x._init,U(q(x._payload),M,V,G,Q)}}if(q)return Q=Q(x),q=G===""?"."+J(x,0):G,E(Q)?(V="",q!=null&&(V=q.replace(H,"$&/")+"/"),U(Q,M,V,"",function(ie){return ie})):Q!=null&&(N(Q)&&(Q=O(Q,V+(Q.key==null||x&&x.key===Q.key?"":(""+Q.key).replace(H,"$&/")+"/")+q)),M.push(Q)),1;q=0;var R=G===""?".":G+":";if(E(x))for(var le=0;le<x.length;le++)G=x[le],he=R+J(G,le),q+=U(G,M,V,he,Q);else if(le=b(x),typeof le=="function")for(x=le.call(x),le=0;!(G=x.next()).done;)G=G.value,he=R+J(G,le++),q+=U(G,M,V,he,Q);else if(he==="object"){if(typeof x.then=="function")return U(re(x),M,V,G,Q);throw M=String(x),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return q}function $(x,M,V){if(x==null)return x;var G=[],Q=0;return U(x,G,"","",function(he){return M.call(V,he,Q++)}),G}function se(x){if(x._status===-1){var M=x._result;M=M(),M.then(function(V){(x._status===0||x._status===-1)&&(x._status=1,x._result=V)},function(V){(x._status===0||x._status===-1)&&(x._status=2,x._result=V)}),x._status===-1&&(x._status=0,x._result=M)}if(x._status===1)return x._result.default;throw x._result}var A=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},B={map:$,forEach:function(x,M,V){$(x,function(){M.apply(this,arguments)},V)},count:function(x){var M=0;return $(x,function(){M++}),M},toArray:function(x){return $(x,function(M){return M})||[]},only:function(x){if(!N(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return ye.Activity=h,ye.Children=B,ye.Component=c,ye.Fragment=ee,ye.Profiler=ae,ye.PureComponent=o,ye.StrictMode=z,ye.Suspense=f,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,ye.__COMPILER_RUNTIME={__proto__:null,c:function(x){return C.H.useMemoCache(x)}},ye.cache=function(x){return function(){return x.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(x,M,V){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var G=g({},x.props),Q=x.key;if(M!=null)for(he in M.key!==void 0&&(Q=""+M.key),M)!v.call(M,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&M.ref===void 0||(G[he]=M[he]);var he=arguments.length-2;if(he===1)G.children=V;else if(1<he){for(var q=Array(he),R=0;R<he;R++)q[R]=arguments[R+2];G.children=q}return D(x.type,Q,G)},ye.createContext=function(x){return x={$$typeof:K,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:ce,_context:x},x},ye.createElement=function(x,M,V){var G,Q={},he=null;if(M!=null)for(G in M.key!==void 0&&(he=""+M.key),M)v.call(M,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(Q[G]=M[G]);var q=arguments.length-2;if(q===1)Q.children=V;else if(1<q){for(var R=Array(q),le=0;le<q;le++)R[le]=arguments[le+2];Q.children=R}if(x&&x.defaultProps)for(G in q=x.defaultProps,q)Q[G]===void 0&&(Q[G]=q[G]);return D(x,he,Q)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(x){return{$$typeof:u,render:x}},ye.isValidElement=N,ye.lazy=function(x){return{$$typeof:m,_payload:{_status:-1,_result:x},_init:se}},ye.memo=function(x,M){return{$$typeof:d,type:x,compare:M===void 0?null:M}},ye.startTransition=function(x){var M=C.T,V={};C.T=V;try{var G=x(),Q=C.S;Q!==null&&Q(V,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(y,A)}catch(he){A(he)}finally{M!==null&&V.types!==null&&(M.types=V.types),C.T=M}},ye.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},ye.use=function(x){return C.H.use(x)},ye.useActionState=function(x,M,V){return C.H.useActionState(x,M,V)},ye.useCallback=function(x,M){return C.H.useCallback(x,M)},ye.useContext=function(x){return C.H.useContext(x)},ye.useDebugValue=function(){},ye.useDeferredValue=function(x,M){return C.H.useDeferredValue(x,M)},ye.useEffect=function(x,M){return C.H.useEffect(x,M)},ye.useEffectEvent=function(x){return C.H.useEffectEvent(x)},ye.useId=function(){return C.H.useId()},ye.useImperativeHandle=function(x,M,V){return C.H.useImperativeHandle(x,M,V)},ye.useInsertionEffect=function(x,M){return C.H.useInsertionEffect(x,M)},ye.useLayoutEffect=function(x,M){return C.H.useLayoutEffect(x,M)},ye.useMemo=function(x,M){return C.H.useMemo(x,M)},ye.useOptimistic=function(x,M){return C.H.useOptimistic(x,M)},ye.useReducer=function(x,M,V){return C.H.useReducer(x,M,V)},ye.useRef=function(x){return C.H.useRef(x)},ye.useState=function(x){return C.H.useState(x)},ye.useSyncExternalStore=function(x,M,V){return C.H.useSyncExternalStore(x,M,V)},ye.useTransition=function(){return C.H.useTransition()},ye.version="19.2.6",ye}var kf;function Lo(){return kf||(kf=1,Eo.exports=gv()),Eo.exports}var _e=Lo(),wo={exports:{}},Yr={},xo={exports:{}},Ao={};/**
17
+ */var Bf;function gv(){if(Bf)return ye;Bf=1;var B=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),K=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;function y(x){return x===null||typeof x!="object"?null:(x=p&&x[p]||x["@@iterator"],typeof x=="function"?x:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,l={};function c(x,M,V){this.props=x,this.context=M,this.refs=l,this.updater=V||w}c.prototype.isReactComponent={},c.prototype.setState=function(x,M){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,M,"setState")},c.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function a(){}a.prototype=c.prototype;function o(x,M,V){this.props=x,this.context=M,this.refs=l,this.updater=V||w}var _=o.prototype=new a;_.constructor=o,g(_,c.prototype),_.isPureReactComponent=!0;var C=Array.isArray;function b(){}var E={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function A(x,M,V){var G=V.ref;return{$$typeof:B,type:x,key:M,ref:G!==void 0?G:null,props:V}}function O(x,M){return A(x.type,M,x.props)}function j(x){return typeof x=="object"&&x!==null&&x.$$typeof===B}function I(x){var M={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(V){return M[V]})}var z=/\/+/g;function Z(x,M){return typeof x=="object"&&x!==null&&x.key!=null?I(""+x.key):M.toString(36)}function re(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(b,b):(x.status="pending",x.then(function(M){x.status==="pending"&&(x.status="fulfilled",x.value=M)},function(M){x.status==="pending"&&(x.status="rejected",x.reason=M)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function q(x,M,V,G,Q){var he=typeof x;(he==="undefined"||he==="boolean")&&(x=null);var U=!1;if(x===null)U=!0;else switch(he){case"bigint":case"string":case"number":U=!0;break;case"object":switch(x.$$typeof){case B:case Y:U=!0;break;case m:return U=x._init,q(U(x._payload),M,V,G,Q)}}if(U)return Q=Q(x),U=G===""?"."+Z(x,0):G,C(Q)?(V="",U!=null&&(V=U.replace(z,"$&/")+"/"),q(Q,M,V,"",function(ie){return ie})):Q!=null&&(j(Q)&&(Q=O(Q,V+(Q.key==null||x&&x.key===Q.key?"":(""+Q.key).replace(z,"$&/")+"/")+U)),M.push(Q)),1;U=0;var R=G===""?".":G+":";if(C(x))for(var le=0;le<x.length;le++)G=x[le],he=R+Z(G,le),U+=q(G,M,V,he,Q);else if(le=y(x),typeof le=="function")for(x=le.call(x),le=0;!(G=x.next()).done;)G=G.value,he=R+Z(G,le++),U+=q(G,M,V,he,Q);else if(he==="object"){if(typeof x.then=="function")return q(re(x),M,V,G,Q);throw M=String(x),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return U}function J(x,M,V){if(x==null)return x;var G=[],Q=0;return q(x,G,"","",function(he){return M.call(V,he,Q++)}),G}function se(x){if(x._status===-1){var M=x._result;M=M(),M.then(function(V){(x._status===0||x._status===-1)&&(x._status=1,x._result=V)},function(V){(x._status===0||x._status===-1)&&(x._status=2,x._result=V)}),x._status===-1&&(x._status=0,x._result=M)}if(x._status===1)return x._result.default;throw x._result}var D=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},k={map:J,forEach:function(x,M,V){J(x,function(){M.apply(this,arguments)},V)},count:function(x){var M=0;return J(x,function(){M++}),M},toArray:function(x){return J(x,function(M){return M})||[]},only:function(x){if(!j(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return ye.Activity=h,ye.Children=k,ye.Component=c,ye.Fragment=ee,ye.Profiler=ae,ye.PureComponent=o,ye.StrictMode=H,ye.Suspense=f,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,ye.__COMPILER_RUNTIME={__proto__:null,c:function(x){return E.H.useMemoCache(x)}},ye.cache=function(x){return function(){return x.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(x,M,V){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var G=g({},x.props),Q=x.key;if(M!=null)for(he in M.key!==void 0&&(Q=""+M.key),M)!v.call(M,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&M.ref===void 0||(G[he]=M[he]);var he=arguments.length-2;if(he===1)G.children=V;else if(1<he){for(var U=Array(he),R=0;R<he;R++)U[R]=arguments[R+2];G.children=U}return A(x.type,Q,G)},ye.createContext=function(x){return x={$$typeof:K,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:ce,_context:x},x},ye.createElement=function(x,M,V){var G,Q={},he=null;if(M!=null)for(G in M.key!==void 0&&(he=""+M.key),M)v.call(M,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(Q[G]=M[G]);var U=arguments.length-2;if(U===1)Q.children=V;else if(1<U){for(var R=Array(U),le=0;le<U;le++)R[le]=arguments[le+2];Q.children=R}if(x&&x.defaultProps)for(G in U=x.defaultProps,U)Q[G]===void 0&&(Q[G]=U[G]);return A(x,he,Q)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(x){return{$$typeof:u,render:x}},ye.isValidElement=j,ye.lazy=function(x){return{$$typeof:m,_payload:{_status:-1,_result:x},_init:se}},ye.memo=function(x,M){return{$$typeof:d,type:x,compare:M===void 0?null:M}},ye.startTransition=function(x){var M=E.T,V={};E.T=V;try{var G=x(),Q=E.S;Q!==null&&Q(V,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(b,D)}catch(he){D(he)}finally{M!==null&&V.types!==null&&(M.types=V.types),E.T=M}},ye.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},ye.use=function(x){return E.H.use(x)},ye.useActionState=function(x,M,V){return E.H.useActionState(x,M,V)},ye.useCallback=function(x,M){return E.H.useCallback(x,M)},ye.useContext=function(x){return E.H.useContext(x)},ye.useDebugValue=function(){},ye.useDeferredValue=function(x,M){return E.H.useDeferredValue(x,M)},ye.useEffect=function(x,M){return E.H.useEffect(x,M)},ye.useEffectEvent=function(x){return E.H.useEffectEvent(x)},ye.useId=function(){return E.H.useId()},ye.useImperativeHandle=function(x,M,V){return E.H.useImperativeHandle(x,M,V)},ye.useInsertionEffect=function(x,M){return E.H.useInsertionEffect(x,M)},ye.useLayoutEffect=function(x,M){return E.H.useLayoutEffect(x,M)},ye.useMemo=function(x,M){return E.H.useMemo(x,M)},ye.useOptimistic=function(x,M){return E.H.useOptimistic(x,M)},ye.useReducer=function(x,M,V){return E.H.useReducer(x,M,V)},ye.useRef=function(x){return E.H.useRef(x)},ye.useState=function(x){return E.H.useState(x)},ye.useSyncExternalStore=function(x,M,V){return E.H.useSyncExternalStore(x,M,V)},ye.useTransition=function(){return E.H.useTransition()},ye.version="19.2.6",ye}var kf;function Lo(){return kf||(kf=1,Eo.exports=gv()),Eo.exports}var _e=Lo(),wo={exports:{}},Yr={},xo={exports:{}},Ao={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var fv=Object.defineProperty;var dv=(k,Y,ee)=>Y in k?fv(k,Y,{enumerable:!0,confi
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var Hf;function pv(){return Hf||(Hf=1,(function(k){function Y(U,$){var se=U.length;U.push($);e:for(;0<se;){var A=se-1>>>1,B=U[A];if(0<ae(B,$))U[A]=$,U[se]=B,se=A;else break e}}function ee(U){return U.length===0?null:U[0]}function z(U){if(U.length===0)return null;var $=U[0],se=U.pop();if(se!==$){U[0]=se;e:for(var A=0,B=U.length,x=B>>>1;A<x;){var M=2*(A+1)-1,V=U[M],G=M+1,Q=U[G];if(0>ae(V,se))G<B&&0>ae(Q,V)?(U[A]=Q,U[G]=se,A=G):(U[A]=V,U[M]=se,A=M);else if(G<B&&0>ae(Q,se))U[A]=Q,U[G]=se,A=G;else break e}}return $}function ae(U,$){var se=U.sortIndex-$.sortIndex;return se!==0?se:U.id-$.id}if(k.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ce=performance;k.unstable_now=function(){return ce.now()}}else{var K=Date,u=K.now();k.unstable_now=function(){return K.now()-u}}var f=[],d=[],m=1,h=null,p=3,b=!1,w=!1,g=!1,l=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,o=typeof setImmediate<"u"?setImmediate:null;function _(U){for(var $=ee(d);$!==null;){if($.callback===null)z(d);else if($.startTime<=U)z(d),$.sortIndex=$.expirationTime,Y(f,$);else break;$=ee(d)}}function E(U){if(g=!1,_(U),!w)if(ee(f)!==null)w=!0,y||(y=!0,I());else{var $=ee(d);$!==null&&re(E,$.startTime-U)}}var y=!1,C=-1,v=5,D=-1;function O(){return l?!0:!(k.unstable_now()-D<v)}function N(){if(l=!1,y){var U=k.unstable_now();D=U;var $=!0;try{e:{w=!1,g&&(g=!1,a(C),C=-1),b=!0;var se=p;try{t:{for(_(U),h=ee(f);h!==null&&!(h.expirationTime>U&&O());){var A=h.callback;if(typeof A=="function"){h.callback=null,p=h.priorityLevel;var B=A(h.expirationTime<=U);if(U=k.unstable_now(),typeof B=="function"){h.callback=B,_(U),$=!0;break t}h===ee(f)&&z(f),_(U)}else z(f);h=ee(f)}if(h!==null)$=!0;else{var x=ee(d);x!==null&&re(E,x.startTime-U),$=!1}}break e}finally{h=null,p=se,b=!1}$=void 0}}finally{$?I():y=!1}}}var I;if(typeof o=="function")I=function(){o(N)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,J=H.port2;H.port1.onmessage=N,I=function(){J.postMessage(null)}}else I=function(){c(N,0)};function re(U,$){C=c(function(){U(k.unstable_now())},$)}k.unstable_IdlePriority=5,k.unstable_ImmediatePriority=1,k.unstable_LowPriority=4,k.unstable_NormalPriority=3,k.unstable_Profiling=null,k.unstable_UserBlockingPriority=2,k.unstable_cancelCallback=function(U){U.callback=null},k.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<U?Math.floor(1e3/U):5},k.unstable_getCurrentPriorityLevel=function(){return p},k.unstable_next=function(U){switch(p){case 1:case 2:case 3:var $=3;break;default:$=p}var se=p;p=$;try{return U()}finally{p=se}},k.unstable_requestPaint=function(){l=!0},k.unstable_runWithPriority=function(U,$){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var se=p;p=U;try{return $()}finally{p=se}},k.unstable_scheduleCallback=function(U,$,se){var A=k.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?A+se:A):se=A,U){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=se+B,U={id:m++,callback:$,priorityLevel:U,startTime:se,expirationTime:B,sortIndex:-1},se>A?(U.sortIndex=se,Y(d,U),ee(f)===null&&U===ee(d)&&(g?(a(C),C=-1):g=!0,re(E,se-A))):(U.sortIndex=B,Y(f,U),w||b||(w=!0,y||(y=!0,I()))),U},k.unstable_shouldYield=O,k.unstable_wrapCallback=function(U){var $=p;return function(){var se=p;p=$;try{return U.apply(this,arguments)}finally{p=se}}}})(Ao)),Ao}var zf;function mv(){return zf||(zf=1,xo.exports=pv()),xo.exports}var Do={exports:{}},ut={};/**
25
+ */var Hf;function pv(){return Hf||(Hf=1,(function(B){function Y(q,J){var se=q.length;q.push(J);e:for(;0<se;){var D=se-1>>>1,k=q[D];if(0<ae(k,J))q[D]=J,q[se]=k,se=D;else break e}}function ee(q){return q.length===0?null:q[0]}function H(q){if(q.length===0)return null;var J=q[0],se=q.pop();if(se!==J){q[0]=se;e:for(var D=0,k=q.length,x=k>>>1;D<x;){var M=2*(D+1)-1,V=q[M],G=M+1,Q=q[G];if(0>ae(V,se))G<k&&0>ae(Q,V)?(q[D]=Q,q[G]=se,D=G):(q[D]=V,q[M]=se,D=M);else if(G<k&&0>ae(Q,se))q[D]=Q,q[G]=se,D=G;else break e}}return J}function ae(q,J){var se=q.sortIndex-J.sortIndex;return se!==0?se:q.id-J.id}if(B.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ce=performance;B.unstable_now=function(){return ce.now()}}else{var K=Date,u=K.now();B.unstable_now=function(){return K.now()-u}}var f=[],d=[],m=1,h=null,p=3,y=!1,w=!1,g=!1,l=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,o=typeof setImmediate<"u"?setImmediate:null;function _(q){for(var J=ee(d);J!==null;){if(J.callback===null)H(d);else if(J.startTime<=q)H(d),J.sortIndex=J.expirationTime,Y(f,J);else break;J=ee(d)}}function C(q){if(g=!1,_(q),!w)if(ee(f)!==null)w=!0,b||(b=!0,I());else{var J=ee(d);J!==null&&re(C,J.startTime-q)}}var b=!1,E=-1,v=5,A=-1;function O(){return l?!0:!(B.unstable_now()-A<v)}function j(){if(l=!1,b){var q=B.unstable_now();A=q;var J=!0;try{e:{w=!1,g&&(g=!1,a(E),E=-1),y=!0;var se=p;try{t:{for(_(q),h=ee(f);h!==null&&!(h.expirationTime>q&&O());){var D=h.callback;if(typeof D=="function"){h.callback=null,p=h.priorityLevel;var k=D(h.expirationTime<=q);if(q=B.unstable_now(),typeof k=="function"){h.callback=k,_(q),J=!0;break t}h===ee(f)&&H(f),_(q)}else H(f);h=ee(f)}if(h!==null)J=!0;else{var x=ee(d);x!==null&&re(C,x.startTime-q),J=!1}}break e}finally{h=null,p=se,y=!1}J=void 0}}finally{J?I():b=!1}}}var I;if(typeof o=="function")I=function(){o(j)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,Z=z.port2;z.port1.onmessage=j,I=function(){Z.postMessage(null)}}else I=function(){c(j,0)};function re(q,J){E=c(function(){q(B.unstable_now())},J)}B.unstable_IdlePriority=5,B.unstable_ImmediatePriority=1,B.unstable_LowPriority=4,B.unstable_NormalPriority=3,B.unstable_Profiling=null,B.unstable_UserBlockingPriority=2,B.unstable_cancelCallback=function(q){q.callback=null},B.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<q?Math.floor(1e3/q):5},B.unstable_getCurrentPriorityLevel=function(){return p},B.unstable_next=function(q){switch(p){case 1:case 2:case 3:var J=3;break;default:J=p}var se=p;p=J;try{return q()}finally{p=se}},B.unstable_requestPaint=function(){l=!0},B.unstable_runWithPriority=function(q,J){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var se=p;p=q;try{return J()}finally{p=se}},B.unstable_scheduleCallback=function(q,J,se){var D=B.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?D+se:D):se=D,q){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=se+k,q={id:m++,callback:J,priorityLevel:q,startTime:se,expirationTime:k,sortIndex:-1},se>D?(q.sortIndex=se,Y(d,q),ee(f)===null&&q===ee(d)&&(g?(a(E),E=-1):g=!0,re(C,se-D))):(q.sortIndex=k,Y(f,q),w||y||(w=!0,b||(b=!0,I()))),q},B.unstable_shouldYield=O,B.unstable_wrapCallback=function(q){var J=p;return function(){var se=p;p=J;try{return q.apply(this,arguments)}finally{p=se}}}})(Ao)),Ao}var zf;function mv(){return zf||(zf=1,xo.exports=pv()),xo.exports}var Do={exports:{}},ut={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var fv=Object.defineProperty;var dv=(k,Y,ee)=>Y in k?fv(k,Y,{enumerable:!0,confi
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 jf;function Sv(){if(jf)return ut;jf=1;var k=Lo();function Y(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ee(){}var z={d:{f:ee,r:function(){throw Error(Y(522))},D:ee,C:ee,L:ee,m:ee,X:ee,S:ee,M:ee},p:0,findDOMNode:null},ae=Symbol.for("react.portal");function ce(f,d,m){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ae,key:h==null?null:""+h,children:f,containerInfo:d,implementation:m}}var K=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,ut.createPortal=function(f,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(Y(299));return ce(f,d,null,m)},ut.flushSync=function(f){var d=K.T,m=z.p;try{if(K.T=null,z.p=2,f)return f()}finally{K.T=d,z.p=m,z.d.f()}},ut.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,z.d.C(f,d))},ut.prefetchDNS=function(f){typeof f=="string"&&z.d.D(f)},ut.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,h=u(m,d.crossOrigin),p=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?z.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:b}):m==="script"&&z.d.X(f,{crossOrigin:h,integrity:p,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ut.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=u(d.as,d.crossOrigin);z.d.M(f,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&z.d.M(f)},ut.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,h=u(m,d.crossOrigin);z.d.L(f,m,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ut.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=u(d.as,d.crossOrigin);z.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else z.d.m(f)},ut.requestFormReset=function(f){z.d.r(f)},ut.unstable_batchedUpdates=function(f,d){return f(d)},ut.useFormState=function(f,d,m){return K.H.useFormState(f,d,m)},ut.useFormStatus=function(){return K.H.useHostTransitionStatus()},ut.version="19.2.6",ut}var Nf;function yv(){if(Nf)return Do.exports;Nf=1;function k(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(k)}catch(Y){console.error(Y)}}return k(),Do.exports=Sv(),Do.exports}/**
33
+ */var jf;function Sv(){if(jf)return ut;jf=1;var B=Lo();function Y(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ee(){}var H={d:{f:ee,r:function(){throw Error(Y(522))},D:ee,C:ee,L:ee,m:ee,X:ee,S:ee,M:ee},p:0,findDOMNode:null},ae=Symbol.for("react.portal");function ce(f,d,m){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ae,key:h==null?null:""+h,children:f,containerInfo:d,implementation:m}}var K=B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,ut.createPortal=function(f,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(Y(299));return ce(f,d,null,m)},ut.flushSync=function(f){var d=K.T,m=H.p;try{if(K.T=null,H.p=2,f)return f()}finally{K.T=d,H.p=m,H.d.f()}},ut.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,H.d.C(f,d))},ut.prefetchDNS=function(f){typeof f=="string"&&H.d.D(f)},ut.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var m=d.as,h=u(m,d.crossOrigin),p=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?H.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:y}):m==="script"&&H.d.X(f,{crossOrigin:h,integrity:p,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ut.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=u(d.as,d.crossOrigin);H.d.M(f,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&H.d.M(f)},ut.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,h=u(m,d.crossOrigin);H.d.L(f,m,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ut.preloadModule=function(f,d){if(typeof f=="string")if(d){var m=u(d.as,d.crossOrigin);H.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else H.d.m(f)},ut.requestFormReset=function(f){H.d.r(f)},ut.unstable_batchedUpdates=function(f,d){return f(d)},ut.useFormState=function(f,d,m){return K.H.useFormState(f,d,m)},ut.useFormStatus=function(){return K.H.useHostTransitionStatus()},ut.version="19.2.6",ut}var Nf;function yv(){if(Nf)return Do.exports;Nf=1;function B(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(B)}catch(Y){console.error(Y)}}return B(),Do.exports=Sv(),Do.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,21 +38,21 @@ var fv=Object.defineProperty;var dv=(k,Y,ee)=>Y in k?fv(k,Y,{enumerable:!0,confi
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var Uf;function bv(){if(Uf)return Yr;Uf=1;var k=mv(),Y=Lo(),ee=yv();function z(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ae(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ce(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function K(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(ce(e)!==e)throw Error(z(188))}function d(e){var t=e.alternate;if(!t){if(t=ce(e),t===null)throw Error(z(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var n=r.alternate;if(n===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===n.child){for(n=r.child;n;){if(n===i)return f(r),e;if(n===s)return f(r),t;n=n.sibling}throw Error(z(188))}if(i.return!==s.return)i=r,s=n;else{for(var S=!1,T=r.child;T;){if(T===i){S=!0,i=r,s=n;break}if(T===s){S=!0,s=r,i=n;break}T=T.sibling}if(!S){for(T=n.child;T;){if(T===i){S=!0,i=n,s=r;break}if(T===s){S=!0,s=n,i=r;break}T=T.sibling}if(!S)throw Error(z(189))}}if(i.alternate!==s)throw Error(z(190))}if(i.tag!==3)throw Error(z(188));return i.stateNode.current===i?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=N&&e[N]||e["@@iterator"],typeof e=="function"?e:null)}var H=Symbol.for("react.client.reference");function J(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===H?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case c:return"Profiler";case l:return"StrictMode";case E:return"Suspense";case y:return"SuspenseList";case D:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case o:return e.displayName||"Context";case a:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case C:return t=e.displayName||null,t!==null?t:J(e.type)||"Memo";case v:t=e._payload,e=e._init;try{return J(e(t))}catch{}}return null}var re=Array.isArray,U=Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=ee.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},A=[],B=-1;function x(e){return{current:e}}function M(e){0>B||(e.current=A[B],A[B]=null,B--)}function V(e,t){B++,A[B]=e.current,e.current=t}var G=x(null),Q=x(null),he=x(null),q=x(null);function R(e,t){switch(V(he,t),V(Q,e),V(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$h(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$h(t),e=Jh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(G),V(G,e)}function le(){M(G),M(Q),M(he)}function ie(e){e.memoizedState!==null&&V(q,e);var t=G.current,i=Jh(t,e.type);t!==i&&(V(Q,e),V(G,i))}function de(e){Q.current===e&&(M(G),M(Q)),q.current===e&&(M(q),Nr._currentValue=se)}var fe,Ee;function Be(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Ee=-1<i.stack.indexOf(`
41
+ */var Uf;function bv(){if(Uf)return Yr;Uf=1;var B=mv(),Y=Lo(),ee=yv();function H(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ae(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ce(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function K(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(ce(e)!==e)throw Error(H(188))}function d(e){var t=e.alternate;if(!t){if(t=ce(e),t===null)throw Error(H(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var n=r.alternate;if(n===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===n.child){for(n=r.child;n;){if(n===i)return f(r),e;if(n===s)return f(r),t;n=n.sibling}throw Error(H(188))}if(i.return!==s.return)i=r,s=n;else{for(var S=!1,T=r.child;T;){if(T===i){S=!0,i=r,s=n;break}if(T===s){S=!0,s=r,i=n;break}T=T.sibling}if(!S){for(T=n.child;T;){if(T===i){S=!0,i=n,s=r;break}if(T===s){S=!0,s=n,i=r;break}T=T.sibling}if(!S)throw Error(H(189))}}if(i.alternate!==s)throw Error(H(190))}if(i.tag!==3)throw Error(H(188));return i.stateNode.current===i?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=j&&e[j]||e["@@iterator"],typeof e=="function"?e:null)}var z=Symbol.for("react.client.reference");function Z(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case c:return"Profiler";case l:return"StrictMode";case C:return"Suspense";case b:return"SuspenseList";case A:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case o:return e.displayName||"Context";case a:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case E:return t=e.displayName||null,t!==null?t:Z(e.type)||"Memo";case v:t=e._payload,e=e._init;try{return Z(e(t))}catch{}}return null}var re=Array.isArray,q=Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=ee.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},D=[],k=-1;function x(e){return{current:e}}function M(e){0>k||(e.current=D[k],D[k]=null,k--)}function V(e,t){k++,D[k]=e.current,e.current=t}var G=x(null),Q=x(null),he=x(null),U=x(null);function R(e,t){switch(V(he,t),V(Q,e),V(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$h(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$h(t),e=Jh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(G),V(G,e)}function le(){M(G),M(Q),M(he)}function ie(e){e.memoizedState!==null&&V(U,e);var t=G.current,i=Jh(t,e.type);t!==i&&(V(Q,e),V(G,i))}function de(e){Q.current===e&&(M(G),M(Q)),U.current===e&&(M(U),Nr._currentValue=se)}var fe,Ee;function Be(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Ee=-1<i.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+fe+e+Ee}var Ie=!1;function it(e,t){if(!e||Ie)return"";Ie=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(te){var Z=te}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(te){Z=te}e.call(ue.prototype)}}else{try{throw Error()}catch(te){Z=te}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(te){if(te&&Z&&typeof te.stack=="string")return[te.stack,Z.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=s.DetermineComponentFrameRoot(),S=n[0],T=n[1];if(S&&T){var j=S.split(`
43
+ `+fe+e+Ee}var Ie=!1;function it(e,t){if(!e||Ie)return"";Ie=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(te){var $=te}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(te){$=te}e.call(ue.prototype)}}else{try{throw Error()}catch(te){$=te}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(te){if(te&&$&&typeof te.stack=="string")return[te.stack,$.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=s.DetermineComponentFrameRoot(),S=n[0],T=n[1];if(S&&T){var N=S.split(`
44
44
  `),W=T.split(`
45
- `);for(r=s=0;s<j.length&&!j[s].includes("DetermineComponentFrameRoot");)s++;for(;r<W.length&&!W[r].includes("DetermineComponentFrameRoot");)r++;if(s===j.length||r===W.length)for(s=j.length-1,r=W.length-1;1<=s&&0<=r&&j[s]!==W[r];)r--;for(;1<=s&&0<=r;s--,r--)if(j[s]!==W[r]){if(s!==1||r!==1)do if(s--,r--,0>r||j[s]!==W[r]){var ne=`
46
- `+j[s].replace(" at new "," at ");return e.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",e.displayName)),ne}while(1<=s&&0<=r);break}}}finally{Ie=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Be(i):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return Be(e.type);case 16:return Be("Lazy");case 13:return e.child!==t&&t!==null?Be("Suspense Fallback"):Be("Suspense");case 19:return Be("SuspenseList");case 0:case 15:return it(e.type,!1);case 11:return it(e.type.render,!1);case 1:return it(e.type,!0);case 31:return Be("Activity");default:return""}}function di(e){try{var t="",i=null;do t+=Se(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
45
+ `);for(r=s=0;s<N.length&&!N[s].includes("DetermineComponentFrameRoot");)s++;for(;r<W.length&&!W[r].includes("DetermineComponentFrameRoot");)r++;if(s===N.length||r===W.length)for(s=N.length-1,r=W.length-1;1<=s&&0<=r&&N[s]!==W[r];)r--;for(;1<=s&&0<=r;s--,r--)if(N[s]!==W[r]){if(s!==1||r!==1)do if(s--,r--,0>r||N[s]!==W[r]){var ne=`
46
+ `+N[s].replace(" at new "," at ");return e.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",e.displayName)),ne}while(1<=s&&0<=r);break}}}finally{Ie=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Be(i):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return Be(e.type);case 16:return Be("Lazy");case 13:return e.child!==t&&t!==null?Be("Suspense Fallback"):Be("Suspense");case 19:return Be("SuspenseList");case 0:case 15:return it(e.type,!1);case 11:return it(e.type.render,!1);case 1:return it(e.type,!0);case 31:return Be("Activity");default:return""}}function di(e){try{var t="",i=null;do t+=Se(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
47
47
  Error generating stack: `+s.message+`
48
- `+s.stack}}var qi=Object.prototype.hasOwnProperty,Ii=k.unstable_scheduleCallback,Pi=k.unstable_cancelCallback,us=k.unstable_shouldYield,ft=k.unstable_requestPaint,et=k.unstable_now,Mt=k.unstable_getCurrentPriorityLevel,_i=k.unstable_ImmediatePriority,hs=k.unstable_UserBlockingPriority,yt=k.unstable_NormalPriority,fs=k.unstable_LowPriority,It=k.unstable_IdlePriority,Yi=k.log,Pe=k.unstable_setDisableYieldValue,Gi=null,bt=null;function vi(e){if(typeof Yi=="function"&&Pe(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Gi,e)}catch{}}var Ct=Math.clz32?Math.clz32:$f,Qf=Math.log,Zf=Math.LN2;function $f(e){return e>>>=0,e===0?32:31-(Qf(e)/Zf|0)|0}var Kr=256,Xr=262144,Vr=4194304;function Ki(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var T=s&134217727;return T!==0?(s=T&~n,s!==0?r=Ki(s):(S&=T,S!==0?r=Ki(S):i||(i=T&~e,i!==0&&(r=Ki(i))))):(T=s&~n,T!==0?r=Ki(T):S!==0?r=Ki(S):i||(i=s&~e,i!==0&&(r=Ki(i)))),r===0?0:t!==0&&t!==r&&(t&n)===0&&(n=r&-r,i=t&-t,n>=i||n===32&&(i&4194048)!==0)?t:r}function Zs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Jf(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bo(){var e=Vr;return Vr<<=1,(Vr&62914560)===0&&(Vr=4194304),e}function ca(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function $s(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ed(e,t,i,s,r,n){var S=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var T=e.entanglements,j=e.expirationTimes,W=e.hiddenUpdates;for(i=S&~i;0<i;){var ne=31-Ct(i),ue=1<<ne;T[ne]=0,j[ne]=-1;var Z=W[ne];if(Z!==null)for(W[ne]=null,ne=0;ne<Z.length;ne++){var te=Z[ne];te!==null&&(te.lane&=-536870913)}i&=~ue}s!==0&&ko(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(S&~t))}function ko(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Ct(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Ho(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Ct(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function zo(e,t){var i=t&-t;return i=(i&42)!==0?1:ua(i),(i&(e.suspendedLanes|t))!==0?0:i}function ua(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ha(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jo(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Ef(e.type))}function No(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var gi=Math.random().toString(36).slice(2),nt="__reactFiber$"+gi,dt="__reactProps$"+gi,ds="__reactContainer$"+gi,fa="__reactEvents$"+gi,td="__reactListeners$"+gi,id="__reactHandles$"+gi,Uo="__reactResources$"+gi,Js="__reactMarker$"+gi;function da(e){delete e[nt],delete e[dt],delete e[fa],delete e[td],delete e[id]}function _s(e){var t=e[nt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ds]||i[nt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=lf(e);e!==null;){if(i=e[nt])return i;e=lf(e)}return t}e=i,i=e.parentNode}return null}function vs(e){if(e=e[nt]||e[ds]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function er(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(z(33))}function gs(e){var t=e[Uo];return t||(t=e[Uo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[Js]=!0}var qo=new Set,Io={};function Xi(e,t){ps(e,t),ps(e+"Capture",t)}function ps(e,t){for(Io[e]=t,e=0;e<t.length;e++)qo.add(t[e])}var sd=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Po={},Yo={};function rd(e){return qi.call(Yo,e)?!0:qi.call(Po,e)?!1:sd.test(e)?Yo[e]=!0:(Po[e]=!0,!1)}function Wr(e,t,i){if(rd(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Qr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Wt(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Go(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nd(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(S){i=""+S,n.call(this,S)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _a(e){if(!e._valueTracker){var t=Go(e)?"checked":"value";e._valueTracker=nd(e,t,""+e[t])}}function Ko(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Go(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Zr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ad=/[\n"\\]/g;function Ot(e){return e.replace(ad,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function va(e,t,i,s,r,n,S,T){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),t!=null?S==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Lt(t)):e.value!==""+Lt(t)&&(e.value=""+Lt(t)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),t!=null?ga(e,S,Lt(t)):i!=null?ga(e,S,Lt(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Lt(T):e.removeAttribute("name")}function Xo(e,t,i,s,r,n,S,T){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(e.type=n),t!=null||i!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){_a(e);return}i=i!=null?""+Lt(i):"",t=t!=null?""+Lt(t):i,T||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=T?e.checked:!!s,e.defaultChecked=!!s,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),_a(e)}function ga(e,t,i){t==="number"&&Zr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ms(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Lt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Vo(e,t,i){if(t!=null&&(t=""+Lt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Lt(i):""}function Fo(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(z(92));if(re(s)){if(1<s.length)throw Error(z(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Lt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),_a(e)}function Ss(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var ld=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Wo(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||ld.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Qo(e,t,i){if(t!=null&&typeof t!="object")throw Error(z(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&Wo(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&Wo(e,n,t[n])}function pa(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var od=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cd=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $r(e){return cd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var ma=null;function Sa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ys=null,bs=null;function Zo(e){var t=vs(e);if(t&&(e=t.stateNode)){var i=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(va(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ot(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[dt]||null;if(!r)throw Error(z(90));va(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Ko(s)}break e;case"textarea":Vo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ms(e,!!i.multiple,t,!1)}}}var ya=!1;function $o(e,t,i){if(ya)return e(t,i);ya=!0;try{var s=e(t);return s}finally{if(ya=!1,(ys!==null||bs!==null)&&(qn(),ys&&(t=ys,e=bs,bs=ys=null,Zo(t),e)))for(t=0;t<e.length;t++)Zo(e[t])}}function tr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[dt]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(z(231,t,typeof i));return i}var Zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ba=!1;if(Zt)try{var ir={};Object.defineProperty(ir,"passive",{get:function(){ba=!0}}),window.addEventListener("test",ir,ir),window.removeEventListener("test",ir,ir)}catch{ba=!1}var pi=null,Ca=null,Jr=null;function Jo(){if(Jr)return Jr;var e,t=Ca,i=t.length,s,r="value"in pi?pi.value:pi.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var S=i-e;for(s=1;s<=S&&t[i-s]===r[n-s];s++);return Jr=r.slice(e,1<s?1-s:void 0)}function en(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 tn(){return!0}function ec(){return!1}function _t(e){function t(i,s,r,n,S){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=S,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(i=e[T],this[T]=i?i(n):n[T]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?tn:ec,this.isPropagationStopped=ec,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=tn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=tn)},persist:function(){},isPersistent:tn}),t}var Vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sn=_t(Vi),sr=h({},Vi,{view:0,detail:0}),ud=_t(sr),Ea,wa,rr,rn=h({},sr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Aa,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!==rr&&(rr&&e.type==="mousemove"?(Ea=e.screenX-rr.screenX,wa=e.screenY-rr.screenY):wa=Ea=0,rr=e),Ea)},movementY:function(e){return"movementY"in e?e.movementY:wa}}),tc=_t(rn),hd=h({},rn,{dataTransfer:0}),fd=_t(hd),dd=h({},sr,{relatedTarget:0}),xa=_t(dd),_d=h({},Vi,{animationName:0,elapsedTime:0,pseudoElement:0}),vd=_t(_d),gd=h({},Vi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pd=_t(gd),md=h({},Vi,{data:0}),ic=_t(md),Sd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yd={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"},bd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bd[e])?!!t[e]:!1}function Aa(){return Cd}var Ed=h({},sr,{key:function(e){if(e.key){var t=Sd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=en(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Aa,charCode:function(e){return e.type==="keypress"?en(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?en(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wd=_t(Ed),xd=h({},rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sc=_t(xd),Ad=h({},sr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Aa}),Dd=_t(Ad),Td=h({},Vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rd=_t(Td),Md=h({},rn,{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}),Ld=_t(Md),Od=h({},Vi,{newState:0,oldState:0}),Bd=_t(Od),kd=[9,13,27,32],Da=Zt&&"CompositionEvent"in window,nr=null;Zt&&"documentMode"in document&&(nr=document.documentMode);var Hd=Zt&&"TextEvent"in window&&!nr,rc=Zt&&(!Da||nr&&8<nr&&11>=nr),nc=" ",ac=!1;function lc(e,t){switch(e){case"keyup":return kd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function zd(e,t){switch(e){case"compositionend":return oc(t);case"keypress":return t.which!==32?null:(ac=!0,nc);case"textInput":return e=t.data,e===nc&&ac?null:e;default:return null}}function jd(e,t){if(Cs)return e==="compositionend"||!Da&&lc(e,t)?(e=Jo(),Jr=Ca=pi=null,Cs=!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 rc&&t.locale!=="ko"?null:t.data;default:return null}}var Nd={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 cc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Nd[e.type]:t==="textarea"}function uc(e,t,i,s){ys?bs?bs.push(s):bs=[s]:ys=s,t=Vn(t,"onChange"),0<t.length&&(i=new sn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var ar=null,lr=null;function Ud(e){Xh(e,0)}function nn(e){var t=er(e);if(Ko(t))return e}function hc(e,t){if(e==="change")return t}var fc=!1;if(Zt){var Ta;if(Zt){var Ra="oninput"in document;if(!Ra){var dc=document.createElement("div");dc.setAttribute("oninput","return;"),Ra=typeof dc.oninput=="function"}Ta=Ra}else Ta=!1;fc=Ta&&(!document.documentMode||9<document.documentMode)}function _c(){ar&&(ar.detachEvent("onpropertychange",vc),lr=ar=null)}function vc(e){if(e.propertyName==="value"&&nn(lr)){var t=[];uc(t,lr,e,Sa(e)),$o(Ud,t)}}function qd(e,t,i){e==="focusin"?(_c(),ar=t,lr=i,ar.attachEvent("onpropertychange",vc)):e==="focusout"&&_c()}function Id(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nn(lr)}function Pd(e,t){if(e==="click")return nn(t)}function Yd(e,t){if(e==="input"||e==="change")return nn(t)}function Gd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:Gd;function or(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!qi.call(t,r)||!Et(e[r],t[r]))return!1}return!0}function gc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pc(e,t){var i=gc(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=gc(i)}}function mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zr(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Zr(e.document)}return t}function Ma(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Kd=Zt&&"documentMode"in document&&11>=document.documentMode,Es=null,La=null,cr=null,Oa=!1;function yc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Oa||Es==null||Es!==Zr(s)||(s=Es,"selectionStart"in s&&Ma(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),cr&&or(cr,s)||(cr=s,s=Vn(La,"onSelect"),0<s.length&&(t=new sn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function Fi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ws={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},Ba={},bc={};Zt&&(bc=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function Wi(e){if(Ba[e])return Ba[e];if(!ws[e])return e;var t=ws[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in bc)return Ba[e]=t[i];return e}var Cc=Wi("animationend"),Ec=Wi("animationiteration"),wc=Wi("animationstart"),Xd=Wi("transitionrun"),Vd=Wi("transitionstart"),Fd=Wi("transitioncancel"),xc=Wi("transitionend"),Ac=new Map,ka="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ka.push("scrollEnd");function Pt(e,t){Ac.set(e,t),Xi(t,[e])}var an=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bt=[],xs=0,Ha=0;function ln(){for(var e=xs,t=Ha=xs=0;t<e;){var i=Bt[t];Bt[t++]=null;var s=Bt[t];Bt[t++]=null;var r=Bt[t];Bt[t++]=null;var n=Bt[t];if(Bt[t++]=null,s!==null&&r!==null){var S=s.pending;S===null?r.next=r:(r.next=S.next,S.next=r),s.pending=r}n!==0&&Dc(i,r,n)}}function on(e,t,i,s){Bt[xs++]=e,Bt[xs++]=t,Bt[xs++]=i,Bt[xs++]=s,Ha|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function za(e,t,i,s){return on(e,t,i,s),cn(e)}function Qi(e,t){return on(e,null,null,t),cn(e)}function Dc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,n=e.return;n!==null;)n.childLanes|=i,s=n.alternate,s!==null&&(s.childLanes|=i),n.tag===22&&(e=n.stateNode,e===null||e._visibility&1||(r=!0)),e=n,n=n.return;return e.tag===3?(n=e.stateNode,r&&t!==null&&(r=31-Ct(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function cn(e){if(50<Lr)throw Lr=0,Kl=null,Error(z(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var As={};function Wd(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wt(e,t,i,s){return new Wd(e,t,i,s)}function ja(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $t(e,t){var i=e.alternate;return i===null?(i=wt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Tc(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function un(e,t,i,s,r,n){var S=0;if(s=e,typeof e=="function")ja(e)&&(S=1);else if(typeof e=="string")S=ev(e,i,G.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case D:return e=wt(31,i,t,r),e.elementType=D,e.lanes=n,e;case g:return Zi(i.children,r,n,t);case l:S=8,r|=24;break;case c:return e=wt(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case E:return e=wt(13,i,t,r),e.elementType=E,e.lanes=n,e;case y:return e=wt(19,i,t,r),e.elementType=y,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o:S=10;break e;case a:S=9;break e;case _:S=11;break e;case C:S=14;break e;case v:S=16,s=null;break e}S=29,i=Error(z(130,e===null?"null":typeof e,"")),s=null}return t=wt(S,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function Zi(e,t,i,s){return e=wt(7,e,s,t),e.lanes=i,e}function Na(e,t,i){return e=wt(6,e,null,t),e.lanes=i,e}function Rc(e){var t=wt(18,null,null,0);return t.stateNode=e,t}function Ua(e,t,i){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Mc=new WeakMap;function kt(e,t){if(typeof e=="object"&&e!==null){var i=Mc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:di(t)},Mc.set(e,t),t)}return{value:e,source:t,stack:di(t)}}var Ds=[],Ts=0,hn=null,ur=0,Ht=[],zt=0,mi=null,Kt=1,Xt="";function Jt(e,t){Ds[Ts++]=ur,Ds[Ts++]=hn,hn=e,ur=t}function Lc(e,t,i){Ht[zt++]=Kt,Ht[zt++]=Xt,Ht[zt++]=mi,mi=e;var s=Kt;e=Xt;var r=32-Ct(s)-1;s&=~(1<<r),i+=1;var n=32-Ct(t)+r;if(30<n){var S=r-r%5;n=(s&(1<<S)-1).toString(32),s>>=S,r-=S,Kt=1<<32-Ct(t)+r|i<<r|s,Xt=n+e}else Kt=1<<n|i<<r|s,Xt=e}function qa(e){e.return!==null&&(Jt(e,1),Lc(e,1,0))}function Ia(e){for(;e===hn;)hn=Ds[--Ts],Ds[Ts]=null,ur=Ds[--Ts],Ds[Ts]=null;for(;e===mi;)mi=Ht[--zt],Ht[zt]=null,Xt=Ht[--zt],Ht[zt]=null,Kt=Ht[--zt],Ht[zt]=null}function Oc(e,t){Ht[zt++]=Kt,Ht[zt++]=Xt,Ht[zt++]=mi,Kt=t.id,Xt=t.overflow,mi=e}var at=null,Ye=null,Te=!1,Si=null,jt=!1,Pa=Error(z(519));function yi(e){var t=Error(z(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hr(kt(t,e)),Pa}function Bc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[nt]=e,t[dt]=s,i){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(i=0;i<Br.length;i++)xe(Br[i],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Xo(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Fo(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||Qh(t.textContent,i)?(s.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),s.onScroll!=null&&xe("scroll",t),s.onScrollEnd!=null&&xe("scrollend",t),s.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||yi(e,!0)}function kc(e){for(at=e.return;at;)switch(at.tag){case 5:case 31:case 13:jt=!1;return;case 27:case 3:jt=!0;return;default:at=at.return}}function Rs(e){if(e!==at)return!1;if(!Te)return kc(e),Te=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ao(e.type,e.memoizedProps)),i=!i),i&&Ye&&yi(e),kc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));Ye=af(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));Ye=af(e)}else t===27?(t=Ye,ki(e.type)?(e=ho,ho=null,Ye=e):Ye=t):Ye=at?Ut(e.stateNode.nextSibling):null;return!0}function $i(){Ye=at=null,Te=!1}function Ya(){var e=Si;return e!==null&&(mt===null?mt=e:mt.push.apply(mt,e),Si=null),e}function hr(e){Si===null?Si=[e]:Si.push(e)}var Ga=x(null),Ji=null,ei=null;function bi(e,t,i){V(Ga,t._currentValue),t._currentValue=i}function ti(e){e._currentValue=Ga.current,M(Ga)}function Ka(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Xa(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var S=r.child;n=n.firstContext;e:for(;n!==null;){var T=n;n=r;for(var j=0;j<t.length;j++)if(T.context===t[j]){n.lanes|=i,T=n.alternate,T!==null&&(T.lanes|=i),Ka(n.return,i,e),s||(S=null);break e}n=T.next}}else if(r.tag===18){if(S=r.return,S===null)throw Error(z(341));S.lanes|=i,n=S.alternate,n!==null&&(n.lanes|=i),Ka(S,i,e),S=null}else S=r.child;if(S!==null)S.return=r;else for(S=r;S!==null;){if(S===e){S=null;break}if(r=S.sibling,r!==null){r.return=S.return,S=r;break}S=S.return}r=S}}function Ms(e,t,i,s){e=null;for(var r=t,n=!1;r!==null;){if(!n){if((r.flags&524288)!==0)n=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var S=r.alternate;if(S===null)throw Error(z(387));if(S=S.memoizedProps,S!==null){var T=r.type;Et(r.pendingProps.value,S.value)||(e!==null?e.push(T):e=[T])}}else if(r===q.current){if(S=r.alternate,S===null)throw Error(z(387));S.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Nr):e=[Nr])}r=r.return}e!==null&&Xa(t,e,i,s),t.flags|=262144}function fn(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function es(e){Ji=e,ei=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return Hc(Ji,e)}function dn(e,t){return Ji===null&&es(e),Hc(e,t)}function Hc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ei===null){if(e===null)throw Error(z(308));ei=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ei=ei.next=t;return i}var Qd=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Zd=k.unstable_scheduleCallback,$d=k.unstable_NormalPriority,Qe={$$typeof:o,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Va(){return{controller:new Qd,data:new Map,refCount:0}}function fr(e){e.refCount--,e.refCount===0&&Zd($d,function(){e.controller.abort()})}var dr=null,Fa=0,Ls=0,Os=null;function Jd(e,t){if(dr===null){var i=dr=[];Fa=0,Ls=Zl(),Os={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Fa++,t.then(zc,zc),t}function zc(){if(--Fa===0&&dr!==null){Os!==null&&(Os.status="fulfilled");var e=dr;dr=null,Ls=0,Os=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function e_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var jc=U.S;U.S=function(e,t){yh=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Jd(e,t),jc!==null&&jc(e,t)};var ts=x(null);function Wa(){var e=ts.current;return e!==null?e:qe.pooledCache}function _n(e,t){t===null?V(ts,ts.current):V(ts,t.pool)}function Nc(){var e=Wa();return e===null?null:{parent:Qe._currentValue,pool:e}}var Bs=Error(z(460)),Qa=Error(z(474)),vn=Error(z(542)),gn={then:function(){}};function Uc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Qt,Qt),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pc(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(z(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pc(e),e}throw ss=t,Bs}}function is(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ss=i,Bs):i}}var ss=null;function Ic(){if(ss===null)throw Error(z(459));var e=ss;return ss=null,e}function Pc(e){if(e===Bs||e===vn)throw Error(z(483))}var ks=null,_r=0;function pn(e){var t=_r;return _r+=1,ks===null&&(ks=[]),qc(ks,e,t)}function vr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function mn(e,t){throw t.$$typeof===p?Error(z(525)):(e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Yc(e){function t(X,P){if(e){var F=X.deletions;F===null?(X.deletions=[P],X.flags|=16):F.push(P)}}function i(X,P){if(!e)return null;for(;P!==null;)t(X,P),P=P.sibling;return null}function s(X){for(var P=new Map;X!==null;)X.key!==null?P.set(X.key,X):P.set(X.index,X),X=X.sibling;return P}function r(X,P){return X=$t(X,P),X.index=0,X.sibling=null,X}function n(X,P,F){return X.index=F,e?(F=X.alternate,F!==null?(F=F.index,F<P?(X.flags|=67108866,P):F):(X.flags|=67108866,P)):(X.flags|=1048576,P)}function S(X){return e&&X.alternate===null&&(X.flags|=67108866),X}function T(X,P,F,oe){return P===null||P.tag!==6?(P=Na(F,X.mode,oe),P.return=X,P):(P=r(P,F),P.return=X,P)}function j(X,P,F,oe){var pe=F.type;return pe===g?ne(X,P,F.props.children,oe,F.key):P!==null&&(P.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===v&&is(pe)===P.type)?(P=r(P,F.props),vr(P,F),P.return=X,P):(P=un(F.type,F.key,F.props,null,X.mode,oe),vr(P,F),P.return=X,P)}function W(X,P,F,oe){return P===null||P.tag!==4||P.stateNode.containerInfo!==F.containerInfo||P.stateNode.implementation!==F.implementation?(P=Ua(F,X.mode,oe),P.return=X,P):(P=r(P,F.children||[]),P.return=X,P)}function ne(X,P,F,oe,pe){return P===null||P.tag!==7?(P=Zi(F,X.mode,oe,pe),P.return=X,P):(P=r(P,F),P.return=X,P)}function ue(X,P,F){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Na(""+P,X.mode,F),P.return=X,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case b:return F=un(P.type,P.key,P.props,null,X.mode,F),vr(F,P),F.return=X,F;case w:return P=Ua(P,X.mode,F),P.return=X,P;case v:return P=is(P),ue(X,P,F)}if(re(P)||I(P))return P=Zi(P,X.mode,F,null),P.return=X,P;if(typeof P.then=="function")return ue(X,pn(P),F);if(P.$$typeof===o)return ue(X,dn(X,P),F);mn(X,P)}return null}function Z(X,P,F,oe){var pe=P!==null?P.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return pe!==null?null:T(X,P,""+F,oe);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case b:return F.key===pe?j(X,P,F,oe):null;case w:return F.key===pe?W(X,P,F,oe):null;case v:return F=is(F),Z(X,P,F,oe)}if(re(F)||I(F))return pe!==null?null:ne(X,P,F,oe,null);if(typeof F.then=="function")return Z(X,P,pn(F),oe);if(F.$$typeof===o)return Z(X,P,dn(X,F),oe);mn(X,F)}return null}function te(X,P,F,oe,pe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return X=X.get(F)||null,T(P,X,""+oe,pe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return X=X.get(oe.key===null?F:oe.key)||null,j(P,X,oe,pe);case w:return X=X.get(oe.key===null?F:oe.key)||null,W(P,X,oe,pe);case v:return oe=is(oe),te(X,P,F,oe,pe)}if(re(oe)||I(oe))return X=X.get(F)||null,ne(P,X,oe,pe,null);if(typeof oe.then=="function")return te(X,P,F,pn(oe),pe);if(oe.$$typeof===o)return te(X,P,F,dn(P,oe),pe);mn(P,oe)}return null}function ve(X,P,F,oe){for(var pe=null,Re=null,ge=P,Ce=P=0,De=null;ge!==null&&Ce<F.length;Ce++){ge.index>Ce?(De=ge,ge=null):De=ge.sibling;var Me=Z(X,ge,F[Ce],oe);if(Me===null){ge===null&&(ge=De);break}e&&ge&&Me.alternate===null&&t(X,ge),P=n(Me,P,Ce),Re===null?pe=Me:Re.sibling=Me,Re=Me,ge=De}if(Ce===F.length)return i(X,ge),Te&&Jt(X,Ce),pe;if(ge===null){for(;Ce<F.length;Ce++)ge=ue(X,F[Ce],oe),ge!==null&&(P=n(ge,P,Ce),Re===null?pe=ge:Re.sibling=ge,Re=ge);return Te&&Jt(X,Ce),pe}for(ge=s(ge);Ce<F.length;Ce++)De=te(ge,X,Ce,F[Ce],oe),De!==null&&(e&&De.alternate!==null&&ge.delete(De.key===null?Ce:De.key),P=n(De,P,Ce),Re===null?pe=De:Re.sibling=De,Re=De);return e&&ge.forEach(function(Ui){return t(X,Ui)}),Te&&Jt(X,Ce),pe}function me(X,P,F,oe){if(F==null)throw Error(z(151));for(var pe=null,Re=null,ge=P,Ce=P=0,De=null,Me=F.next();ge!==null&&!Me.done;Ce++,Me=F.next()){ge.index>Ce?(De=ge,ge=null):De=ge.sibling;var Ui=Z(X,ge,Me.value,oe);if(Ui===null){ge===null&&(ge=De);break}e&&ge&&Ui.alternate===null&&t(X,ge),P=n(Ui,P,Ce),Re===null?pe=Ui:Re.sibling=Ui,Re=Ui,ge=De}if(Me.done)return i(X,ge),Te&&Jt(X,Ce),pe;if(ge===null){for(;!Me.done;Ce++,Me=F.next())Me=ue(X,Me.value,oe),Me!==null&&(P=n(Me,P,Ce),Re===null?pe=Me:Re.sibling=Me,Re=Me);return Te&&Jt(X,Ce),pe}for(ge=s(ge);!Me.done;Ce++,Me=F.next())Me=te(ge,X,Ce,Me.value,oe),Me!==null&&(e&&Me.alternate!==null&&ge.delete(Me.key===null?Ce:Me.key),P=n(Me,P,Ce),Re===null?pe=Me:Re.sibling=Me,Re=Me);return e&&ge.forEach(function(hv){return t(X,hv)}),Te&&Jt(X,Ce),pe}function Ne(X,P,F,oe){if(typeof F=="object"&&F!==null&&F.type===g&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case b:e:{for(var pe=F.key;P!==null;){if(P.key===pe){if(pe=F.type,pe===g){if(P.tag===7){i(X,P.sibling),oe=r(P,F.props.children),oe.return=X,X=oe;break e}}else if(P.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===v&&is(pe)===P.type){i(X,P.sibling),oe=r(P,F.props),vr(oe,F),oe.return=X,X=oe;break e}i(X,P);break}else t(X,P);P=P.sibling}F.type===g?(oe=Zi(F.props.children,X.mode,oe,F.key),oe.return=X,X=oe):(oe=un(F.type,F.key,F.props,null,X.mode,oe),vr(oe,F),oe.return=X,X=oe)}return S(X);case w:e:{for(pe=F.key;P!==null;){if(P.key===pe)if(P.tag===4&&P.stateNode.containerInfo===F.containerInfo&&P.stateNode.implementation===F.implementation){i(X,P.sibling),oe=r(P,F.children||[]),oe.return=X,X=oe;break e}else{i(X,P);break}else t(X,P);P=P.sibling}oe=Ua(F,X.mode,oe),oe.return=X,X=oe}return S(X);case v:return F=is(F),Ne(X,P,F,oe)}if(re(F))return ve(X,P,F,oe);if(I(F)){if(pe=I(F),typeof pe!="function")throw Error(z(150));return F=pe.call(F),me(X,P,F,oe)}if(typeof F.then=="function")return Ne(X,P,pn(F),oe);if(F.$$typeof===o)return Ne(X,P,dn(X,F),oe);mn(X,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,P!==null&&P.tag===6?(i(X,P.sibling),oe=r(P,F),oe.return=X,X=oe):(i(X,P),oe=Na(F,X.mode,oe),oe.return=X,X=oe),S(X)):i(X,P)}return function(X,P,F,oe){try{_r=0;var pe=Ne(X,P,F,oe);return ks=null,pe}catch(ge){if(ge===Bs||ge===vn)throw ge;var Re=wt(29,ge,null,X.mode);return Re.lanes=oe,Re.return=X,Re}finally{}}}var rs=Yc(!0),Gc=Yc(!1),Ci=!1;function Za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $a(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Oe&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=cn(e),Dc(e,null,i),t}return on(e,s,t,i),cn(e)}function gr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Ho(e,i)}}function Ja(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,n=null;if(i=i.firstBaseUpdate,i!==null){do{var S={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=S:n=n.next=S,i=i.next}while(i!==null);n===null?r=n=t:n=n.next=t}else r=n=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:n,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var el=!1;function pr(){if(el){var e=Os;if(e!==null)throw e}}function mr(e,t,i,s){el=!1;var r=e.updateQueue;Ci=!1;var n=r.firstBaseUpdate,S=r.lastBaseUpdate,T=r.shared.pending;if(T!==null){r.shared.pending=null;var j=T,W=j.next;j.next=null,S===null?n=W:S.next=W,S=j;var ne=e.alternate;ne!==null&&(ne=ne.updateQueue,T=ne.lastBaseUpdate,T!==S&&(T===null?ne.firstBaseUpdate=W:T.next=W,ne.lastBaseUpdate=j))}if(n!==null){var ue=r.baseState;S=0,ne=W=j=null,T=n;do{var Z=T.lane&-536870913,te=Z!==T.lane;if(te?(Ae&Z)===Z:(s&Z)===Z){Z!==0&&Z===Ls&&(el=!0),ne!==null&&(ne=ne.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ve=e,me=T;Z=t;var Ne=i;switch(me.tag){case 1:if(ve=me.payload,typeof ve=="function"){ue=ve.call(Ne,ue,Z);break e}ue=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=me.payload,Z=typeof ve=="function"?ve.call(Ne,ue,Z):ve,Z==null)break e;ue=h({},ue,Z);break e;case 2:Ci=!0}}Z=T.callback,Z!==null&&(e.flags|=64,te&&(e.flags|=8192),te=r.callbacks,te===null?r.callbacks=[Z]:te.push(Z))}else te={lane:Z,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ne===null?(W=ne=te,j=ue):ne=ne.next=te,S|=Z;if(T=T.next,T===null){if(T=r.shared.pending,T===null)break;te=T,T=te.next,te.next=null,r.lastBaseUpdate=te,r.shared.pending=null}}while(!0);ne===null&&(j=ue),r.baseState=j,r.firstBaseUpdate=W,r.lastBaseUpdate=ne,n===null&&(r.shared.lanes=0),Ri|=S,e.lanes=S,e.memoizedState=ue}}function Kc(e,t){if(typeof e!="function")throw Error(z(191,e));e.call(t)}function Xc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Kc(i[e],t)}var Hs=x(null),Sn=x(0);function Vc(e,t){e=ui,V(Sn,e),V(Hs,t),ui=e|t.baseLanes}function tl(){V(Sn,ui),V(Hs,Hs.current)}function il(){ui=Sn.current,M(Hs),M(Sn)}var xt=x(null),Nt=null;function xi(e){var t=e.alternate;V(Fe,Fe.current&1),V(xt,e),Nt===null&&(t===null||Hs.current!==null||t.memoizedState!==null)&&(Nt=e)}function sl(e){V(Fe,Fe.current),V(xt,e),Nt===null&&(Nt=e)}function Fc(e){e.tag===22?(V(Fe,Fe.current),V(xt,e),Nt===null&&(Nt=e)):Ai()}function Ai(){V(Fe,Fe.current),V(xt,xt.current)}function At(e){M(xt),Nt===e&&(Nt=null),M(Fe)}var Fe=x(0);function yn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||co(i)||uo(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ii=0,be=null,ze=null,Ze=null,bn=!1,zs=!1,ns=!1,Cn=0,Sr=0,js=null,t_=0;function Xe(){throw Error(z(321))}function rl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Et(e[i],t[i]))return!1;return!0}function nl(e,t,i,s,r,n){return ii=n,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Lu:yl,ns=!1,n=i(s,r),ns=!1,zs&&(n=Qc(t,i,s,r)),Wc(e),n}function Wc(e){U.H=Cr;var t=ze!==null&&ze.next!==null;if(ii=0,Ze=ze=be=null,bn=!1,Sr=0,js=null,t)throw Error(z(300));e===null||$e||(e=e.dependencies,e!==null&&fn(e)&&($e=!0))}function Qc(e,t,i,s){be=e;var r=0;do{if(zs&&(js=null),Sr=0,zs=!1,25<=r)throw Error(z(301));if(r+=1,Ze=ze=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}U.H=Ou,n=t(i,s)}while(zs);return n}function i_(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?yr(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(be.flags|=1024),t}function al(){var e=Cn!==0;return Cn=0,e}function ll(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function ol(e){if(bn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bn=!1}ii=0,Ze=ze=be=null,zs=!1,Sr=Cn=0,js=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?be.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function We(){if(ze===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ze===null?be.memoizedState:Ze.next;if(t!==null)Ze=t,ze=e;else{if(e===null)throw be.alternate===null?Error(z(467)):Error(z(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ze===null?be.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function En(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yr(e){var t=Sr;return Sr+=1,js===null&&(js=[]),e=qc(js,e,t),t=be,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Lu:yl),e}function wn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yr(e);if(e.$$typeof===o)return lt(e)}throw Error(z(438,String(e)))}function cl(e){var t=null,i=be.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=be.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=En(),be.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=O;return t.index++,i}function si(e,t){return typeof t=="function"?t(e):t}function xn(e){var t=We();return ul(t,ze,e)}function ul(e,t,i){var s=e.queue;if(s===null)throw Error(z(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var S=r.next;r.next=n.next,n.next=S}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var T=S=null,j=null,W=t,ne=!1;do{var ue=W.lane&-536870913;if(ue!==W.lane?(Ae&ue)===ue:(ii&ue)===ue){var Z=W.revertLane;if(Z===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),ue===Ls&&(ne=!0);else if((ii&Z)===Z){W=W.next,Z===Ls&&(ne=!0);continue}else ue={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},j===null?(T=j=ue,S=n):j=j.next=ue,be.lanes|=Z,Ri|=Z;ue=W.action,ns&&i(n,ue),n=W.hasEagerState?W.eagerState:i(n,ue)}else Z={lane:ue,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},j===null?(T=j=Z,S=n):j=j.next=Z,be.lanes|=ue,Ri|=ue;W=W.next}while(W!==null&&W!==t);if(j===null?S=n:j.next=T,!Et(n,e.memoizedState)&&($e=!0,ne&&(i=Os,i!==null)))throw i;e.memoizedState=n,e.baseState=S,e.baseQueue=j,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function hl(e){var t=We(),i=t.queue;if(i===null)throw Error(z(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var S=r=r.next;do n=e(n,S.action),S=S.next;while(S!==r);Et(n,t.memoizedState)||($e=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function Zc(e,t,i){var s=be,r=We(),n=Te;if(n){if(i===void 0)throw Error(z(407));i=i()}else i=t();var S=!Et((ze||r).memoizedState,i);if(S&&(r.memoizedState=i,$e=!0),r=r.queue,_l(eu.bind(null,s,r,e),[e]),r.getSnapshot!==t||S||Ze!==null&&Ze.memoizedState.tag&1){if(s.flags|=2048,Ns(9,{destroy:void 0},Jc.bind(null,s,r,i,t),null),qe===null)throw Error(z(349));n||(ii&127)!==0||$c(s,t,i)}return i}function $c(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=be.updateQueue,t===null?(t=En(),be.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Jc(e,t,i,s){t.value=i,t.getSnapshot=s,tu(t)&&iu(e)}function eu(e,t,i){return i(function(){tu(t)&&iu(e)})}function tu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Et(e,i)}catch{return!0}}function iu(e){var t=Qi(e,2);t!==null&&St(t,e,2)}function fl(e){var t=ht();if(typeof e=="function"){var i=e;if(e=i(),ns){vi(!0);try{i()}finally{vi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:e},t}function su(e,t,i,s){return e.baseState=i,ul(e,ze,typeof s=="function"?s:si)}function s_(e,t,i,s,r){if(Tn(e))throw Error(z(485));if(e=t.action,e!==null){var n={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){n.listeners.push(S)}};U.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,ru(t,n)):(n.next=i.next,t.pending=i.next=n)}}function ru(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=U.T,S={};U.T=S;try{var T=i(r,s),j=U.S;j!==null&&j(S,T),nu(e,t,T)}catch(W){dl(e,t,W)}finally{n!==null&&S.types!==null&&(n.types=S.types),U.T=n}}else try{n=i(r,s),nu(e,t,n)}catch(W){dl(e,t,W)}}function nu(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){au(e,t,s)},function(s){return dl(e,t,s)}):au(e,t,i)}function au(e,t,i){t.status="fulfilled",t.value=i,lu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,ru(e,i)))}function dl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,lu(t),t=t.next;while(t!==s)}e.action=null}function lu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ou(e,t){return t}function cu(e,t){if(Te){var i=qe.formState;if(i!==null){e:{var s=be;if(Te){if(Ye){t:{for(var r=Ye,n=jt;r.nodeType!==8;){if(!n){r=null;break t}if(r=Ut(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){Ye=Ut(r.nextSibling),s=r.data==="F!";break e}}yi(s)}s=!1}s&&(t=i[0])}}return i=ht(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ou,lastRenderedState:t},i.queue=s,i=Tu.bind(null,be,s),s.dispatch=i,s=fl(!1),n=Sl.bind(null,be,!1,s.queue),s=ht(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=s_.bind(null,be,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function uu(e){var t=We();return hu(t,ze,e)}function hu(e,t,i){if(t=ul(e,t,ou)[0],e=xn(si)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=yr(t)}catch(S){throw S===Bs?vn:S}else s=t;t=We();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(be.flags|=2048,Ns(9,{destroy:void 0},r_.bind(null,r,i),null)),[s,n,e]}function r_(e,t){e.action=t}function fu(e){var t=We(),i=ze;if(i!==null)return hu(t,i,e);We(),t=t.memoizedState,i=We();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ns(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=be.updateQueue,t===null&&(t=En(),be.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function du(){return We().memoizedState}function An(e,t,i,s){var r=ht();be.flags|=e,r.memoizedState=Ns(1|t,{destroy:void 0},i,s===void 0?null:s)}function Dn(e,t,i,s){var r=We();s=s===void 0?null:s;var n=r.memoizedState.inst;ze!==null&&s!==null&&rl(s,ze.memoizedState.deps)?r.memoizedState=Ns(t,n,i,s):(be.flags|=e,r.memoizedState=Ns(1|t,n,i,s))}function _u(e,t){An(8390656,8,e,t)}function _l(e,t){Dn(2048,8,e,t)}function n_(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=En(),be.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function vu(e){var t=We().memoizedState;return n_({ref:t,nextImpl:e}),function(){if((Oe&2)!==0)throw Error(z(440));return t.impl.apply(void 0,arguments)}}function gu(e,t){return Dn(4,2,e,t)}function pu(e,t){return Dn(4,4,e,t)}function mu(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Su(e,t,i){i=i!=null?i.concat([e]):null,Dn(4,4,mu.bind(null,t,e),i)}function vl(){}function yu(e,t){var i=We();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&rl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function bu(e,t){var i=We();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&rl(t,s[1]))return s[0];if(s=e(),ns){vi(!0);try{e()}finally{vi(!1)}}return i.memoizedState=[s,t],s}function gl(e,t,i){return i===void 0||(ii&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Ch(),be.lanes|=e,Ri|=e,i)}function Cu(e,t,i,s){return Et(i,t)?i:Hs.current!==null?(e=gl(e,i,s),Et(e,t)||($e=!0),e):(ii&42)===0||(ii&1073741824)!==0&&(Ae&261930)===0?($e=!0,e.memoizedState=i):(e=Ch(),be.lanes|=e,Ri|=e,t)}function Eu(e,t,i,s,r){var n=$.p;$.p=n!==0&&8>n?n:8;var S=U.T,T={};U.T=T,Sl(e,!1,t,i);try{var j=r(),W=U.S;if(W!==null&&W(T,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var ne=e_(j,s);br(e,t,ne,Rt(e))}else br(e,t,s,Rt(e))}catch(ue){br(e,t,{then:function(){},status:"rejected",reason:ue},Rt())}finally{$.p=n,S!==null&&T.types!==null&&(S.types=T.types),U.T=S}}function a_(){}function pl(e,t,i,s){if(e.tag!==5)throw Error(z(476));var r=wu(e).queue;Eu(e,r,t,se,i===null?a_:function(){return xu(e),i(s)})}function wu(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:se},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xu(e){var t=wu(e);t.next===null&&(t=e.alternate.memoizedState),br(e,t.next.queue,{},Rt())}function ml(){return lt(Nr)}function Au(){return We().memoizedState}function Du(){return We().memoizedState}function l_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Rt();e=Ei(i);var s=wi(t,e,i);s!==null&&(St(s,t,i),gr(s,t,i)),t={cache:Va()},e.payload=t;return}t=t.return}}function o_(e,t,i){var s=Rt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tn(e)?Ru(t,i):(i=za(e,t,i,s),i!==null&&(St(i,e,s),Mu(i,t,s)))}function Tu(e,t,i){var s=Rt();br(e,t,i,s)}function br(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tn(e))Ru(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var S=t.lastRenderedState,T=n(S,i);if(r.hasEagerState=!0,r.eagerState=T,Et(T,S))return on(e,t,r,0),qe===null&&ln(),!1}catch{}finally{}if(i=za(e,t,r,s),i!==null)return St(i,e,s),Mu(i,t,s),!0}return!1}function Sl(e,t,i,s){if(s={lane:2,revertLane:Zl(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Tn(e)){if(t)throw Error(z(479))}else t=za(e,i,s,2),t!==null&&St(t,e,2)}function Tn(e){var t=e.alternate;return e===be||t!==null&&t===be}function Ru(e,t){zs=bn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Mu(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Ho(e,i)}}var Cr={readContext:lt,use:wn,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};Cr.useEffectEvent=Xe;var Lu={readContext:lt,use:wn,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:_u,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,An(4194308,4,mu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return An(4194308,4,e,t)},useInsertionEffect:function(e,t){An(4,2,e,t)},useMemo:function(e,t){var i=ht();t=t===void 0?null:t;var s=e();if(ns){vi(!0);try{e()}finally{vi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=ht();if(i!==void 0){var r=i(t);if(ns){vi(!0);try{i(t)}finally{vi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=o_.bind(null,be,e),[s.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=fl(e);var t=e.queue,i=Tu.bind(null,be,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:vl,useDeferredValue:function(e,t){var i=ht();return gl(i,e,t)},useTransition:function(){var e=fl(!1);return e=Eu.bind(null,be,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=be,r=ht();if(Te){if(i===void 0)throw Error(z(407));i=i()}else{if(i=t(),qe===null)throw Error(z(349));(Ae&127)!==0||$c(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,_u(eu.bind(null,s,n,e),[e]),s.flags|=2048,Ns(9,{destroy:void 0},Jc.bind(null,s,n,i,t),null),i},useId:function(){var e=ht(),t=qe.identifierPrefix;if(Te){var i=Xt,s=Kt;i=(s&~(1<<32-Ct(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Cn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=t_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ml,useFormState:cu,useActionState:cu,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Sl.bind(null,be,!0,i),i.dispatch=t,[e,t]},useMemoCache:cl,useCacheRefresh:function(){return ht().memoizedState=l_.bind(null,be)},useEffectEvent:function(e){var t=ht(),i={impl:e};return t.memoizedState=i,function(){if((Oe&2)!==0)throw Error(z(440));return i.impl.apply(void 0,arguments)}}},yl={readContext:lt,use:wn,useCallback:yu,useContext:lt,useEffect:_l,useImperativeHandle:Su,useInsertionEffect:gu,useLayoutEffect:pu,useMemo:bu,useReducer:xn,useRef:du,useState:function(){return xn(si)},useDebugValue:vl,useDeferredValue:function(e,t){var i=We();return Cu(i,ze.memoizedState,e,t)},useTransition:function(){var e=xn(si)[0],t=We().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:Zc,useId:Au,useHostTransitionStatus:ml,useFormState:uu,useActionState:uu,useOptimistic:function(e,t){var i=We();return su(i,ze,e,t)},useMemoCache:cl,useCacheRefresh:Du};yl.useEffectEvent=vu;var Ou={readContext:lt,use:wn,useCallback:yu,useContext:lt,useEffect:_l,useImperativeHandle:Su,useInsertionEffect:gu,useLayoutEffect:pu,useMemo:bu,useReducer:hl,useRef:du,useState:function(){return hl(si)},useDebugValue:vl,useDeferredValue:function(e,t){var i=We();return ze===null?gl(i,e,t):Cu(i,ze.memoizedState,e,t)},useTransition:function(){var e=hl(si)[0],t=We().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:Zc,useId:Au,useHostTransitionStatus:ml,useFormState:fu,useActionState:fu,useOptimistic:function(e,t){var i=We();return ze!==null?su(i,ze,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:cl,useCacheRefresh:Du};Ou.useEffectEvent=vu;function bl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:h({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Cl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Rt(),r=Ei(s);r.payload=t,i!=null&&(r.callback=i),t=wi(e,r,s),t!==null&&(St(t,e,s),gr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Rt(),r=Ei(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=wi(e,r,s),t!==null&&(St(t,e,s),gr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Rt(),s=Ei(i);s.tag=2,t!=null&&(s.callback=t),t=wi(e,s,i),t!==null&&(St(t,e,i),gr(t,e,i))}};function Bu(e,t,i,s,r,n,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,S):t.prototype&&t.prototype.isPureReactComponent?!or(i,s)||!or(r,n):!0}function ku(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&Cl.enqueueReplaceState(t,t.state,null)}function as(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=h({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Hu(e){an(e)}function zu(e){console.error(e)}function ju(e){an(e)}function Rn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Nu(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function El(e,t,i){return i=Ei(i),i.tag=3,i.payload={element:null},i.callback=function(){Rn(e,t)},i}function Uu(e){return e=Ei(e),e.tag=3,e}function qu(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var n=s.value;e.payload=function(){return r(n)},e.callback=function(){Nu(t,i,s)}}var S=i.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){Nu(t,i,s),typeof r!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})})}function c_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Ms(t,i,r,!0),i=xt.current,i!==null){switch(i.tag){case 31:case 13:return Nt===null?In():i.alternate===null&&Ve===0&&(Ve=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===gn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Fl(e,s,r)),!1;case 22:return i.flags|=65536,s===gn?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Fl(e,s,r)),!1}throw Error(z(435,i.tag))}return Fl(e,s,r),In(),!1}if(Te)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Pa&&(e=Error(z(422),{cause:s}),hr(kt(e,i)))):(s!==Pa&&(t=Error(z(423),{cause:s}),hr(kt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=kt(s,i),r=El(e.stateNode,s,r),Ja(e,r),Ve!==4&&(Ve=2)),!1;var n=Error(z(520),{cause:s});if(n=kt(n,i),Mr===null?Mr=[n]:Mr.push(n),Ve!==4&&(Ve=2),t===null)return!0;s=kt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=El(i.stateNode,s,e),Ja(i,e),!1;case 1:if(t=i.type,n=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(Mi===null||!Mi.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Uu(r),qu(r,e,i,s),Ja(i,r),!1}i=i.return}while(i!==null);return!1}var wl=Error(z(461)),$e=!1;function ot(e,t,i,s){t.child=e===null?Gc(t,null,i,s):rs(t,e.child,i,s)}function Iu(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var S={};for(var T in s)T!=="ref"&&(S[T]=s[T])}else S=s;return es(t),s=nl(e,t,i,S,n,r),T=al(),e!==null&&!$e?(ll(e,t,r),ri(e,t,r)):(Te&&T&&qa(t),t.flags|=1,ot(e,t,s,r),t.child)}function Pu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!ja(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Yu(e,t,n,s,r)):(e=un(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Ol(e,r)){var S=n.memoizedProps;if(i=i.compare,i=i!==null?i:or,i(S,s)&&e.ref===t.ref)return ri(e,t,r)}return t.flags|=1,e=$t(n,s),e.ref=t.ref,e.return=t,t.child=e}function Yu(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(or(n,s)&&e.ref===t.ref)if($e=!1,t.pendingProps=s=n,Ol(e,r))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,ri(e,t,r)}return xl(e,t,i,s,r)}function Gu(e,t,i,s){var r=s.children,n=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(n=n!==null?n.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~n}else s=0,t.child=null;return Ku(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_n(t,n!==null?n.cachePool:null),n!==null?Vc(t,n):tl(),Fc(t);else return s=t.lanes=536870912,Ku(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(_n(t,n.cachePool),Vc(t,n),Ai(),t.memoizedState=null):(e!==null&&_n(t,null),tl(),Ai());return ot(e,t,r,i),t.child}function Er(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ku(e,t,i,s,r){var n=Wa();return n=n===null?null:{parent:Qe._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&_n(t,null),tl(),Fc(t),e!==null&&Ms(e,t,s,!0),t.childLanes=r,null}function Mn(e,t){return t=On({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Xu(e,t,i){return rs(t,e.child,null,i),e=Mn(t,t.pendingProps),e.flags|=2,At(t),t.memoizedState=null,e}function u_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=Mn(t,s),t.lanes=536870912,Er(null,e);if(sl(t),(e=Ye)?(e=nf(e,jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi!==null?{id:Kt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},i=Rc(e),i.return=t,t.child=i,at=t,Ye=null)):e=null,e===null)throw yi(t);return t.lanes=536870912,null}return Mn(t,s)}var n=e.memoizedState;if(n!==null){var S=n.dehydrated;if(sl(t),r)if(t.flags&256)t.flags&=-257,t=Xu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(z(558));else if($e||Ms(e,t,i,!1),r=(i&e.childLanes)!==0,$e||r){if(s=qe,s!==null&&(S=zo(s,i),S!==0&&S!==n.retryLane))throw n.retryLane=S,Qi(e,S),St(s,e,S),wl;In(),t=Xu(e,t,i)}else e=n.treeContext,Ye=Ut(S.nextSibling),at=t,Te=!0,Si=null,jt=!1,e!==null&&Oc(t,e),t=Mn(t,s),t.flags|=4096;return t}return e=$t(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ln(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(z(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function xl(e,t,i,s,r){return es(t),i=nl(e,t,i,s,void 0,r),s=al(),e!==null&&!$e?(ll(e,t,r),ri(e,t,r)):(Te&&s&&qa(t),t.flags|=1,ot(e,t,i,r),t.child)}function Vu(e,t,i,s,r,n){return es(t),t.updateQueue=null,i=Qc(t,s,i,r),Wc(e),s=al(),e!==null&&!$e?(ll(e,t,n),ri(e,t,n)):(Te&&s&&qa(t),t.flags|=1,ot(e,t,i,n),t.child)}function Fu(e,t,i,s,r){if(es(t),t.stateNode===null){var n=As,S=i.contextType;typeof S=="object"&&S!==null&&(n=lt(S)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Cl,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},Za(t),S=i.contextType,n.context=typeof S=="object"&&S!==null?lt(S):As,n.state=t.memoizedState,S=i.getDerivedStateFromProps,typeof S=="function"&&(bl(t,i,S,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(S=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),S!==n.state&&Cl.enqueueReplaceState(n,n.state,null),mr(t,s,n,r),pr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var T=t.memoizedProps,j=as(i,T);n.props=j;var W=n.context,ne=i.contextType;S=As,typeof ne=="object"&&ne!==null&&(S=lt(ne));var ue=i.getDerivedStateFromProps;ne=typeof ue=="function"||typeof n.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,ne||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(T||W!==S)&&ku(t,n,s,S),Ci=!1;var Z=t.memoizedState;n.state=Z,mr(t,s,n,r),pr(),W=t.memoizedState,T||Z!==W||Ci?(typeof ue=="function"&&(bl(t,i,ue,s),W=t.memoizedState),(j=Ci||Bu(t,i,j,s,Z,W,S))?(ne||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(t.flags|=4194308)):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=W),n.props=s,n.state=W,n.context=S,s=j):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,$a(e,t),S=t.memoizedProps,ne=as(i,S),n.props=ne,ue=t.pendingProps,Z=n.context,W=i.contextType,j=As,typeof W=="object"&&W!==null&&(j=lt(W)),T=i.getDerivedStateFromProps,(W=typeof T=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(S!==ue||Z!==j)&&ku(t,n,s,j),Ci=!1,Z=t.memoizedState,n.state=Z,mr(t,s,n,r),pr();var te=t.memoizedState;S!==ue||Z!==te||Ci||e!==null&&e.dependencies!==null&&fn(e.dependencies)?(typeof T=="function"&&(bl(t,i,T,s),te=t.memoizedState),(ne=Ci||Bu(t,i,ne,s,Z,te,j)||e!==null&&e.dependencies!==null&&fn(e.dependencies))?(W||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,te,j),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,te,j)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||S===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=te),n.props=s,n.state=te,n.context=j,s=ne):(typeof n.componentDidUpdate!="function"||S===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,Ln(e,t),s=(t.flags&128)!==0,n||s?(n=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:n.render(),t.flags|=1,e!==null&&s?(t.child=rs(t,e.child,null,r),t.child=rs(t,null,i,r)):ot(e,t,i,r),t.memoizedState=n.state,e=t.child):e=ri(e,t,r),e}function Wu(e,t,i,s){return $i(),t.flags|=256,ot(e,t,i,s),t.child}var Al={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dl(e){return{baseLanes:e,cachePool:Nc()}}function Tl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Tt),e}function Qu(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,S;if((S=n)||(S=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),S&&(r=!0,t.flags&=-129),S=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?xi(t):Ai(),(e=Ye)?(e=nf(e,jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi!==null?{id:Kt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},i=Rc(e),i.return=t,t.child=i,at=t,Ye=null)):e=null,e===null)throw yi(t);return uo(e)?t.lanes=32:t.lanes=536870912,null}var T=s.children;return s=s.fallback,r?(Ai(),r=t.mode,T=On({mode:"hidden",children:T},r),s=Zi(s,r,i,null),T.return=t,s.return=t,T.sibling=s,t.child=T,s=t.child,s.memoizedState=Dl(i),s.childLanes=Tl(e,S,i),t.memoizedState=Al,Er(null,s)):(xi(t),Rl(t,T))}var j=e.memoizedState;if(j!==null&&(T=j.dehydrated,T!==null)){if(n)t.flags&256?(xi(t),t.flags&=-257,t=Ml(e,t,i)):t.memoizedState!==null?(Ai(),t.child=e.child,t.flags|=128,t=null):(Ai(),T=s.fallback,r=t.mode,s=On({mode:"visible",children:s.children},r),T=Zi(T,r,i,null),T.flags|=2,s.return=t,T.return=t,s.sibling=T,t.child=s,rs(t,e.child,null,i),s=t.child,s.memoizedState=Dl(i),s.childLanes=Tl(e,S,i),t.memoizedState=Al,t=Er(null,s));else if(xi(t),uo(T)){if(S=T.nextSibling&&T.nextSibling.dataset,S)var W=S.dgst;S=W,s=Error(z(419)),s.stack="",s.digest=S,hr({value:s,source:null,stack:null}),t=Ml(e,t,i)}else if($e||Ms(e,t,i,!1),S=(i&e.childLanes)!==0,$e||S){if(S=qe,S!==null&&(s=zo(S,i),s!==0&&s!==j.retryLane))throw j.retryLane=s,Qi(e,s),St(S,e,s),wl;co(T)||In(),t=Ml(e,t,i)}else co(T)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Ye=Ut(T.nextSibling),at=t,Te=!0,Si=null,jt=!1,e!==null&&Oc(t,e),t=Rl(t,s.children),t.flags|=4096);return t}return r?(Ai(),T=s.fallback,r=t.mode,j=e.child,W=j.sibling,s=$t(j,{mode:"hidden",children:s.children}),s.subtreeFlags=j.subtreeFlags&65011712,W!==null?T=$t(W,T):(T=Zi(T,r,i,null),T.flags|=2),T.return=t,s.return=t,s.sibling=T,t.child=s,Er(null,s),s=t.child,T=e.child.memoizedState,T===null?T=Dl(i):(r=T.cachePool,r!==null?(j=Qe._currentValue,r=r.parent!==j?{parent:j,pool:j}:r):r=Nc(),T={baseLanes:T.baseLanes|i,cachePool:r}),s.memoizedState=T,s.childLanes=Tl(e,S,i),t.memoizedState=Al,Er(e.child,s)):(xi(t),i=e.child,e=i.sibling,i=$t(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(S=t.deletions,S===null?(t.deletions=[e],t.flags|=16):S.push(e)),t.child=i,t.memoizedState=null,i)}function Rl(e,t){return t=On({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function On(e,t){return e=wt(22,e,null,t),e.lanes=0,e}function Ml(e,t,i){return rs(t,e.child,null,i),e=Rl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ka(e.return,t,i)}function Ll(e,t,i,s,r,n){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(S.isBackwards=t,S.rendering=null,S.renderingStartTime=0,S.last=s,S.tail=i,S.tailMode=r,S.treeForkCount=n)}function $u(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var S=Fe.current,T=(S&2)!==0;if(T?(S=S&1|2,t.flags|=128):S&=1,V(Fe,S),ot(e,t,s,i),s=Te?ur:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zu(e,i,t);else if(e.tag===19)Zu(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&yn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Ll(t,!1,r,i,n,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&yn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Ll(t,!0,i,null,n,s);break;case"together":Ll(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function ri(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ri|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ms(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){for(e=t.child,i=$t(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=$t(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ol(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fn(e)))}function h_(e,t,i){switch(t.tag){case 3:R(t,t.stateNode.containerInfo),bi(t,Qe,e.memoizedState.cache),$i();break;case 27:case 5:ie(t);break;case 4:R(t,t.stateNode.containerInfo);break;case 10:bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,sl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(xi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Qu(e,t,i):(xi(t),e=ri(e,t,i),e!==null?e.sibling:null);xi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Ms(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return $u(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),V(Fe,Fe.current),s)break;return null;case 22:return t.lanes=0,Gu(e,t,i,t.pendingProps);case 24:bi(t,Qe,e.memoizedState.cache)}return ri(e,t,i)}function Ju(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!Ol(e,i)&&(t.flags&128)===0)return $e=!1,h_(e,t,i);$e=(e.flags&131072)!==0}else $e=!1,Te&&(t.flags&1048576)!==0&&Lc(t,ur,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=is(t.elementType),t.type=e,typeof e=="function")ja(e)?(s=as(e,s),t.tag=1,t=Fu(null,t,e,s,i)):(t.tag=0,t=xl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Iu(null,t,e,s,i);break e}else if(r===C){t.tag=14,t=Pu(null,t,e,s,i);break e}}throw t=J(e)||e,Error(z(306,t,""))}}return t;case 0:return xl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=as(s,t.pendingProps),Fu(e,t,s,r,i);case 3:e:{if(R(t,t.stateNode.containerInfo),e===null)throw Error(z(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,$a(e,t),mr(t,s,null,i);var S=t.memoizedState;if(s=S.cache,bi(t,Qe,s),s!==n.cache&&Xa(t,[Qe],i,!0),pr(),s=S.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:S.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=Wu(e,t,s,i);break e}else if(s!==r){r=kt(Error(z(424)),t),hr(r),t=Wu(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ye=Ut(e.firstChild),at=t,Te=!0,Si=null,jt=!0,i=Gc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if($i(),s===r){t=ri(e,t,i);break e}ot(e,t,s,i)}t=t.child}return t;case 26:return Ln(e,t),e===null?(i=hf(t.type,null,t.pendingProps,null))?t.memoizedState=i:Te||(i=t.type,e=t.pendingProps,s=Fn(he.current).createElement(i),s[nt]=t,s[dt]=e,ct(s,i,e),st(s),t.stateNode=s):t.memoizedState=hf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Te&&(s=t.stateNode=of(t.type,t.pendingProps,he.current),at=t,jt=!0,r=Ye,ki(t.type)?(ho=r,Ye=Ut(s.firstChild)):Ye=r),ot(e,t,t.pendingProps.children,i),Ln(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=s=Ye)&&(s=I_(s,t.type,t.pendingProps,jt),s!==null?(t.stateNode=s,at=t,Ye=Ut(s.firstChild),jt=!1,r=!0):r=!1),r||yi(t)),ie(t),r=t.type,n=t.pendingProps,S=e!==null?e.memoizedProps:null,s=n.children,ao(r,n)?s=null:S!==null&&ao(r,S)&&(t.flags|=32),t.memoizedState!==null&&(r=nl(e,t,i_,null,null,i),Nr._currentValue=r),Ln(e,t),ot(e,t,s,i),t.child;case 6:return e===null&&Te&&((e=i=Ye)&&(i=P_(i,t.pendingProps,jt),i!==null?(t.stateNode=i,at=t,Ye=null,e=!0):e=!1),e||yi(t)),null;case 13:return Qu(e,t,i);case 4:return R(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=rs(t,null,s,i):ot(e,t,s,i),t.child;case 11:return Iu(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,bi(t,t.type,s.value),ot(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,es(t),r=lt(r),s=s(r),t.flags|=1,ot(e,t,s,i),t.child;case 14:return Pu(e,t,t.type,t.pendingProps,i);case 15:return Yu(e,t,t.type,t.pendingProps,i);case 19:return $u(e,t,i);case 31:return u_(e,t,i);case 22:return Gu(e,t,i,t.pendingProps);case 24:return es(t),s=lt(Qe),e===null?(r=Wa(),r===null&&(r=qe,n=Va(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},Za(t),bi(t,Qe,r)):((e.lanes&i)!==0&&($a(e,t),mr(t,null,null,i),pr()),r=e.memoizedState,n=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),bi(t,Qe,s)):(s=n.cache,bi(t,Qe,s),s!==r.cache&&Xa(t,[Qe],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(z(156,t.tag))}function ni(e){e.flags|=4}function Bl(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Ah())e.flags|=8192;else throw ss=gn,Qa}else e.flags&=-16777217}function eh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!gf(t))if(Ah())e.flags|=8192;else throw ss=gn,Qa}function Bn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bo():536870912,e.lanes|=t,Ps|=t)}function wr(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function f_(e,t,i){var s=t.pendingProps;switch(Ia(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return Ge(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ti(Qe),le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Rs(t)?ni(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ya())),Ge(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(ni(t),n!==null?(Ge(t),eh(t,n)):(Ge(t),Bl(t,r,null,s,i))):n?n!==e.memoizedState?(ni(t),Ge(t),eh(t,n)):(Ge(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ni(t),Ge(t),Bl(t,r,e,s,i)),null;case 27:if(de(t),i=he.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(!s){if(t.stateNode===null)throw Error(z(166));return Ge(t),null}e=G.current,Rs(t)?Bc(t):(e=of(r,s,i),t.stateNode=e,ni(t))}return Ge(t),null;case 5:if(de(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(!s){if(t.stateNode===null)throw Error(z(166));return Ge(t),null}if(n=G.current,Rs(t))Bc(t);else{var S=Fn(he.current);switch(n){case 1:n=S.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=S.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=S.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?S.createElement("select",{is:s.is}):S.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?S.createElement(r,{is:s.is}):S.createElement(r)}}n[nt]=t,n[dt]=s;e:for(S=t.child;S!==null;){if(S.tag===5||S.tag===6)n.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===t)break e;for(;S.sibling===null;){if(S.return===null||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}t.stateNode=n;e:switch(ct(n,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&ni(t)}}return Ge(t),Bl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(z(166));if(e=he.current,Rs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=at,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[nt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Qh(e.nodeValue,i)),e||yi(t,!0)}else e=Fn(e).createTextNode(s),e[nt]=t,t.stateNode=e}return Ge(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Rs(t),i!==null){if(e===null){if(!s)throw Error(z(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(557));e[nt]=t}else $i(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),e=!1}else i=Ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(At(t),t):(At(t),null);if((t.flags&128)!==0)throw Error(z(558))}return Ge(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Rs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(z(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(z(317));r[nt]=t}else $i(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),r=!1}else r=Ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(At(t),t):(At(t),null)}return At(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Bn(t,t.updateQueue),Ge(t),null);case 4:return le(),e===null&&to(t.stateNode.containerInfo),Ge(t),null;case 10:return ti(t.type),Ge(t),null;case 19:if(M(Fe),s=t.memoizedState,s===null)return Ge(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)wr(s,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=yn(e),n!==null){for(t.flags|=128,wr(s,!1),e=n.updateQueue,t.updateQueue=e,Bn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Tc(i,e),i=i.sibling;return V(Fe,Fe.current&1|2),Te&&Jt(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&et()>Nn&&(t.flags|=128,r=!0,wr(s,!1),t.lanes=4194304)}else{if(!r)if(e=yn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Bn(t,e),wr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Te)return Ge(t),null}else 2*et()-s.renderingStartTime>Nn&&i!==536870912&&(t.flags|=128,r=!0,wr(s,!1),t.lanes=4194304);s.isBackwards?(n.sibling=t.child,t.child=n):(e=s.last,e!==null?e.sibling=n:t.child=n,s.last=n)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=et(),e.sibling=null,i=Fe.current,V(Fe,r?i&1|2:i&1),Te&&Jt(t,s.treeForkCount),e):(Ge(t),null);case 22:case 23:return At(t),il(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),i=t.updateQueue,i!==null&&Bn(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&M(ts),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ti(Qe),Ge(t),null;case 25:return null;case 30:return null}throw Error(z(156,t.tag))}function d_(e,t){switch(Ia(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ti(Qe),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(At(t),t.alternate===null)throw Error(z(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(At(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(Fe),null;case 4:return le(),null;case 10:return ti(t.type),null;case 22:case 23:return At(t),il(),e!==null&&M(ts),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ti(Qe),null;case 25:return null;default:return null}}function th(e,t){switch(Ia(t),t.tag){case 3:ti(Qe),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&At(t);break;case 13:At(t);break;case 19:M(Fe);break;case 10:ti(t.type);break;case 22:case 23:At(t),il(),e!==null&&M(ts);break;case 24:ti(Qe)}}function xr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var n=i.create,S=i.inst;s=n(),S.destroy=s}i=i.next}while(i!==r)}}catch(T){He(t,t.return,T)}}function Di(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var n=r.next;s=n;do{if((s.tag&e)===e){var S=s.inst,T=S.destroy;if(T!==void 0){S.destroy=void 0,r=t;var j=i,W=T;try{W()}catch(ne){He(r,j,ne)}}}s=s.next}while(s!==n)}}catch(ne){He(t,t.return,ne)}}function ih(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Xc(t,i)}catch(s){He(e,e.return,s)}}}function sh(e,t,i){i.props=as(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){He(e,t,s)}}function Ar(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){He(e,t,r)}}function Vt(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){He(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){He(e,t,r)}else i.current=null}function rh(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){He(e,e.return,r)}}function kl(e,t,i){try{var s=e.stateNode;H_(s,e.type,i,t),s[dt]=t}catch(r){He(e,e.return,r)}}function nh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ki(e.type)||e.tag===4}function Hl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ki(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zl(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Qt));else if(s!==4&&(s===27&&ki(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(zl(e,t,i),e=e.sibling;e!==null;)zl(e,t,i),e=e.sibling}function kn(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&ki(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(kn(e,t,i),e=e.sibling;e!==null;)kn(e,t,i),e=e.sibling}function ah(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ct(t,s,i),t[nt]=e,t[dt]=i}catch(n){He(e,e.return,n)}}var ai=!1,Je=!1,jl=!1,lh=typeof WeakSet=="function"?WeakSet:Set,rt=null;function __(e,t){if(e=e.containerInfo,ro=ta,e=Sc(e),Ma(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,n=s.focusNode;s=s.focusOffset;try{i.nodeType,n.nodeType}catch{i=null;break e}var S=0,T=-1,j=-1,W=0,ne=0,ue=e,Z=null;t:for(;;){for(var te;ue!==i||r!==0&&ue.nodeType!==3||(T=S+r),ue!==n||s!==0&&ue.nodeType!==3||(j=S+s),ue.nodeType===3&&(S+=ue.nodeValue.length),(te=ue.firstChild)!==null;)Z=ue,ue=te;for(;;){if(ue===e)break t;if(Z===i&&++W===r&&(T=S),Z===n&&++ne===s&&(j=S),(te=ue.nextSibling)!==null)break;ue=Z,Z=ue.parentNode}ue=te}i=T===-1||j===-1?null:{start:T,end:j}}else i=null}i=i||{start:0,end:0}}else i=null;for(no={focusedElem:e,selectionRange:i},ta=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){switch(t=rt,n=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&n!==null){e=void 0,i=t,r=n.memoizedProps,n=n.memoizedState,s=i.stateNode;try{var ve=as(i.type,r);e=s.getSnapshotBeforeUpdate(ve,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(me){He(i,i.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)oo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":oo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(z(163))}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}}function oh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:oi(e,i),s&4&&xr(5,i);break;case 1:if(oi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(S){He(i,i.return,S)}else{var r=as(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(S){He(i,i.return,S)}}s&64&&ih(i),s&512&&Ar(i,i.return);break;case 3:if(oi(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Xc(e,t)}catch(S){He(i,i.return,S)}}break;case 27:t===null&&s&4&&ah(i);case 26:case 5:oi(e,i),t===null&&s&4&&rh(i),s&512&&Ar(i,i.return);break;case 12:oi(e,i);break;case 31:oi(e,i),s&4&&hh(e,i);break;case 13:oi(e,i),s&4&&fh(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=E_.bind(null,i),Y_(e,i))));break;case 22:if(s=i.memoizedState!==null||ai,!s){t=t!==null&&t.memoizedState!==null||Je,r=ai;var n=Je;ai=s,(Je=t)&&!n?ci(e,i,(i.subtreeFlags&8772)!==0):oi(e,i),ai=r,Je=n}break;case 30:break;default:oi(e,i)}}function ch(e){var t=e.alternate;t!==null&&(e.alternate=null,ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&da(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,vt=!1;function li(e,t,i){for(i=i.child;i!==null;)uh(e,t,i),i=i.sibling}function uh(e,t,i){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Gi,i)}catch{}switch(i.tag){case 26:Je||Vt(i,t),li(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Je||Vt(i,t);var s=Ke,r=vt;ki(i.type)&&(Ke=i.stateNode,vt=!1),li(e,t,i),Hr(i.stateNode),Ke=s,vt=r;break;case 5:Je||Vt(i,t);case 6:if(s=Ke,r=vt,Ke=null,li(e,t,i),Ke=s,vt=r,Ke!==null)if(vt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(i.stateNode)}catch(n){He(i,t,n)}else try{Ke.removeChild(i.stateNode)}catch(n){He(i,t,n)}break;case 18:Ke!==null&&(vt?(e=Ke,sf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Qs(e)):sf(Ke,i.stateNode));break;case 4:s=Ke,r=vt,Ke=i.stateNode.containerInfo,vt=!0,li(e,t,i),Ke=s,vt=r;break;case 0:case 11:case 14:case 15:Di(2,i,t),Je||Di(4,i,t),li(e,t,i);break;case 1:Je||(Vt(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&sh(i,t,s)),li(e,t,i);break;case 21:li(e,t,i);break;case 22:Je=(s=Je)||i.memoizedState!==null,li(e,t,i),Je=s;break;default:li(e,t,i)}}function hh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qs(e)}catch(i){He(t,t.return,i)}}}function fh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qs(e)}catch(i){He(t,t.return,i)}}function v_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new lh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new lh),t;default:throw Error(z(435,e.tag))}}function Hn(e,t){var i=v_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=w_.bind(null,e,s);s.then(r,r)}})}function gt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,S=t,T=S;e:for(;T!==null;){switch(T.tag){case 27:if(ki(T.type)){Ke=T.stateNode,vt=!1;break e}break;case 5:Ke=T.stateNode,vt=!1;break e;case 3:case 4:Ke=T.stateNode.containerInfo,vt=!0;break e}T=T.return}if(Ke===null)throw Error(z(160));uh(n,S,r),Ke=null,vt=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dh(t,e),t=t.sibling}var Yt=null;function dh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gt(t,e),pt(e),s&4&&(Di(3,e,e.return),xr(3,e),Di(5,e,e.return));break;case 1:gt(t,e),pt(e),s&512&&(Je||i===null||Vt(i,i.return)),s&64&&ai&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=Yt;if(gt(t,e),pt(e),s&512&&(Je||i===null||Vt(i,i.return)),s&4){var n=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":n=r.getElementsByTagName("title")[0],(!n||n[Js]||n[nt]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),ct(n,s,i),n[nt]=e,st(n),s=n;break e;case"link":var S=_f("link","href",r).get(s+(i.href||""));if(S){for(var T=0;T<S.length;T++)if(n=S[T],n.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&n.getAttribute("rel")===(i.rel==null?null:i.rel)&&n.getAttribute("title")===(i.title==null?null:i.title)&&n.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){S.splice(T,1);break t}}n=r.createElement(s),ct(n,s,i),r.head.appendChild(n);break;case"meta":if(S=_f("meta","content",r).get(s+(i.content||""))){for(T=0;T<S.length;T++)if(n=S[T],n.getAttribute("content")===(i.content==null?null:""+i.content)&&n.getAttribute("name")===(i.name==null?null:i.name)&&n.getAttribute("property")===(i.property==null?null:i.property)&&n.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&n.getAttribute("charset")===(i.charSet==null?null:i.charSet)){S.splice(T,1);break t}}n=r.createElement(s),ct(n,s,i),r.head.appendChild(n);break;default:throw Error(z(468,s))}n[nt]=e,st(n),s=n}e.stateNode=s}else vf(r,e.type,e.stateNode);else e.stateNode=df(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?vf(r,e.type,e.stateNode):df(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&kl(e,e.memoizedProps,i.memoizedProps)}break;case 27:gt(t,e),pt(e),s&512&&(Je||i===null||Vt(i,i.return)),i!==null&&s&4&&kl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(gt(t,e),pt(e),s&512&&(Je||i===null||Vt(i,i.return)),e.flags&32){r=e.stateNode;try{Ss(r,"")}catch(ve){He(e,e.return,ve)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,kl(e,r,i!==null?i.memoizedProps:r)),s&1024&&(jl=!0);break;case 6:if(gt(t,e),pt(e),s&4){if(e.stateNode===null)throw Error(z(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){He(e,e.return,ve)}}break;case 3:if(Zn=null,r=Yt,Yt=Wn(t.containerInfo),gt(t,e),Yt=r,pt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Qs(t.containerInfo)}catch(ve){He(e,e.return,ve)}jl&&(jl=!1,_h(e));break;case 4:s=Yt,Yt=Wn(e.stateNode.containerInfo),gt(t,e),pt(e),Yt=s;break;case 12:gt(t,e),pt(e);break;case 31:gt(t,e),pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 13:gt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(jn=et()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 22:r=e.memoizedState!==null;var j=i!==null&&i.memoizedState!==null,W=ai,ne=Je;if(ai=W||r,Je=ne||j,gt(t,e),Je=ne,ai=W,pt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||j||ai||Je||ls(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){j=i=t;try{if(n=j.stateNode,r)S=n.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{T=j.stateNode;var ue=j.memoizedProps.style,Z=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;T.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(ve){He(j,j.return,ve)}}}else if(t.tag===6){if(i===null){j=t;try{j.stateNode.nodeValue=r?"":j.memoizedProps}catch(ve){He(j,j.return,ve)}}}else if(t.tag===18){if(i===null){j=t;try{var te=j.stateNode;r?rf(te,!0):rf(j.stateNode,!1)}catch(ve){He(j,j.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Hn(e,i))));break;case 19:gt(t,e),pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 30:break;case 21:break;default:gt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(nh(s)){i=s;break}s=s.return}if(i==null)throw Error(z(160));switch(i.tag){case 27:var r=i.stateNode,n=Hl(e);kn(e,n,r);break;case 5:var S=i.stateNode;i.flags&32&&(Ss(S,""),i.flags&=-33);var T=Hl(e);kn(e,T,S);break;case 3:case 4:var j=i.stateNode.containerInfo,W=Hl(e);zl(e,W,j);break;default:throw Error(z(161))}}catch(ne){He(e,e.return,ne)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _h(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_h(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function oi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)oh(e,t.alternate,t),t=t.sibling}function ls(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Di(4,t,t.return),ls(t);break;case 1:Vt(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&sh(t,t.return,i),ls(t);break;case 27:Hr(t.stateNode);case 26:case 5:Vt(t,t.return),ls(t);break;case 22:t.memoizedState===null&&ls(t);break;case 30:ls(t);break;default:ls(t)}e=e.sibling}}function ci(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,S=n.flags;switch(n.tag){case 0:case 11:case 15:ci(r,n,i),xr(4,n);break;case 1:if(ci(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(W){He(s,s.return,W)}if(s=n,r=s.updateQueue,r!==null){var T=s.stateNode;try{var j=r.shared.hiddenCallbacks;if(j!==null)for(r.shared.hiddenCallbacks=null,r=0;r<j.length;r++)Kc(j[r],T)}catch(W){He(s,s.return,W)}}i&&S&64&&ih(n),Ar(n,n.return);break;case 27:ah(n);case 26:case 5:ci(r,n,i),i&&s===null&&S&4&&rh(n),Ar(n,n.return);break;case 12:ci(r,n,i);break;case 31:ci(r,n,i),i&&S&4&&hh(r,n);break;case 13:ci(r,n,i),i&&S&4&&fh(r,n);break;case 22:n.memoizedState===null&&ci(r,n,i),Ar(n,n.return);break;case 30:break;default:ci(r,n,i)}t=t.sibling}}function Nl(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&fr(i))}function Ul(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fr(e))}function Gt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vh(e,t,i,s),t=t.sibling}function vh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Gt(e,t,i,s),r&2048&&xr(9,t);break;case 1:Gt(e,t,i,s);break;case 3:Gt(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fr(e)));break;case 12:if(r&2048){Gt(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,S=n.id,T=n.onPostCommit;typeof T=="function"&&T(S,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){He(t,t.return,j)}}else Gt(e,t,i,s);break;case 31:Gt(e,t,i,s);break;case 13:Gt(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,S=t.alternate,t.memoizedState!==null?n._visibility&2?Gt(e,t,i,s):Dr(e,t):n._visibility&2?Gt(e,t,i,s):(n._visibility|=2,Us(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Nl(S,t);break;case 24:Gt(e,t,i,s),r&2048&&Ul(t.alternate,t);break;default:Gt(e,t,i,s)}}function Us(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,S=t,T=i,j=s,W=S.flags;switch(S.tag){case 0:case 11:case 15:Us(n,S,T,j,r),xr(8,S);break;case 23:break;case 22:var ne=S.stateNode;S.memoizedState!==null?ne._visibility&2?Us(n,S,T,j,r):Dr(n,S):(ne._visibility|=2,Us(n,S,T,j,r)),r&&W&2048&&Nl(S.alternate,S);break;case 24:Us(n,S,T,j,r),r&&W&2048&&Ul(S.alternate,S);break;default:Us(n,S,T,j,r)}t=t.sibling}}function Dr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:Dr(i,s),r&2048&&Nl(s.alternate,s);break;case 24:Dr(i,s),r&2048&&Ul(s.alternate,s);break;default:Dr(i,s)}t=t.sibling}}var Tr=8192;function qs(e,t,i){if(e.subtreeFlags&Tr)for(e=e.child;e!==null;)gh(e,t,i),e=e.sibling}function gh(e,t,i){switch(e.tag){case 26:qs(e,t,i),e.flags&Tr&&e.memoizedState!==null&&tv(i,Yt,e.memoizedState,e.memoizedProps);break;case 5:qs(e,t,i);break;case 3:case 4:var s=Yt;Yt=Wn(e.stateNode.containerInfo),qs(e,t,i),Yt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Tr,Tr=16777216,qs(e,t,i),Tr=s):qs(e,t,i));break;default:qs(e,t,i)}}function ph(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];rt=s,Sh(s,e)}ph(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)mh(e),e=e.sibling}function mh(e){switch(e.tag){case 0:case 11:case 15:Rr(e),e.flags&2048&&Di(9,e,e.return);break;case 3:Rr(e);break;case 12:Rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zn(e)):Rr(e);break;default:Rr(e)}}function zn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];rt=s,Sh(s,e)}ph(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Di(8,t,t.return),zn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,zn(t));break;default:zn(t)}e=e.sibling}}function Sh(e,t){for(;rt!==null;){var i=rt;switch(i.tag){case 0:case 11:case 15:Di(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:fr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,rt=s;else e:for(i=e;rt!==null;){s=rt;var r=s.sibling,n=s.return;if(ch(s),s===i){rt=null;break e}if(r!==null){r.return=n,rt=r;break e}rt=n}}}var g_={getCacheForType:function(e){var t=lt(Qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return lt(Qe).controller.signal}},p_=typeof WeakMap=="function"?WeakMap:Map,Oe=0,qe=null,we=null,Ae=0,ke=0,Dt=null,Ti=!1,Is=!1,ql=!1,ui=0,Ve=0,Ri=0,os=0,Il=0,Tt=0,Ps=0,Mr=null,mt=null,Pl=!1,jn=0,yh=0,Nn=1/0,Un=null,Mi=null,tt=0,Li=null,Ys=null,hi=0,Yl=0,Gl=null,bh=null,Lr=0,Kl=null;function Rt(){return(Oe&2)!==0&&Ae!==0?Ae&-Ae:U.T!==null?Zl():jo()}function Ch(){if(Tt===0)if((Ae&536870912)===0||Te){var e=Xr;Xr<<=1,(Xr&3932160)===0&&(Xr=262144),Tt=e}else Tt=536870912;return e=xt.current,e!==null&&(e.flags|=32),Tt}function St(e,t,i){(e===qe&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(Gs(e,0),Oi(e,Ae,Tt,!1)),$s(e,i),((Oe&2)===0||e!==qe)&&(e===qe&&((Oe&2)===0&&(os|=i),Ve===4&&Oi(e,Ae,Tt,!1)),Ft(e))}function Eh(e,t,i){if((Oe&6)!==0)throw Error(z(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Zs(e,t),r=s?y_(e,t):Vl(e,t,!0),n=s;do{if(r===0){Is&&!s&&Oi(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!m_(i)){r=Vl(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){t=S;e:{var T=e;r=Mr;var j=T.current.memoizedState.isDehydrated;if(j&&(Gs(T,S).flags|=256),S=Vl(T,S,!1),S!==2){if(ql&&!j){T.errorRecoveryDisabledLanes|=n,os|=n,r=4;break e}n=mt,mt=r,n!==null&&(mt===null?mt=n:mt.push.apply(mt,n))}r=S}if(n=!1,r!==2)continue}}if(r===1){Gs(e,0),Oi(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(z(345));case 4:if((t&4194048)!==t)break;case 6:Oi(s,t,Tt,!Ti);break e;case 2:mt=null;break;case 3:case 5:break;default:throw Error(z(329))}if((t&62914560)===t&&(r=jn+300-et(),10<r)){if(Oi(s,t,Tt,!Ti),Fr(s,0,!0)!==0)break e;hi=t,s.timeoutHandle=ef(wh.bind(null,s,i,mt,Un,Pl,t,Tt,os,Ps,Ti,n,"Throttled",-0,0),r);break e}wh(s,i,mt,Un,Pl,t,Tt,os,Ps,Ti,n,null,-0,0)}}break}while(!0);Ft(e)}function wh(e,t,i,s,r,n,S,T,j,W,ne,ue,Z,te){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},gh(t,n,ue);var ve=(n&62914560)===n?jn-et():(n&4194048)===n?yh-et():0;if(ve=iv(ue,ve),ve!==null){hi=n,e.cancelPendingCommit=ve(Oh.bind(null,e,t,n,i,s,r,S,T,j,ne,ue,null,Z,te)),Oi(e,n,S,!W);return}}Oh(e,t,n,i,s,r,S,T,j)}function m_(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],n=r.getSnapshot;r=r.value;try{if(!Et(n(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Oi(e,t,i,s){t&=~Il,t&=~os,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-Ct(r),S=1<<n;s[n]=-1,r&=~S}i!==0&&ko(e,i,t)}function qn(){return(Oe&6)===0?(Or(0),!1):!0}function Xl(){if(we!==null){if(ke===0)var e=we.return;else e=we,ei=Ji=null,ol(e),ks=null,_r=0,e=we;for(;e!==null;)th(e.alternate,e),e=e.return;we=null}}function Gs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,N_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),hi=0,Xl(),qe=e,we=i=$t(e.current,null),Ae=t,ke=0,Dt=null,Ti=!1,Is=Zs(e,t),ql=!1,Ps=Tt=Il=os=Ri=Ve=0,mt=Mr=null,Pl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Ct(s),n=1<<r;t|=e[r],s&=~n}return ui=t,ln(),i}function xh(e,t){be=null,U.H=Cr,t===Bs||t===vn?(t=Ic(),ke=3):t===Qa?(t=Ic(),ke=4):ke=t===wl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Dt=t,we===null&&(Ve=1,Rn(e,kt(t,e.current)))}function Ah(){var e=xt.current;return e===null?!0:(Ae&4194048)===Ae?Nt===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===Nt:!1}function Dh(){var e=U.H;return U.H=Cr,e===null?Cr:e}function Th(){var e=U.A;return U.A=g_,e}function In(){Ve=4,Ti||(Ae&4194048)!==Ae&&xt.current!==null||(Is=!0),(Ri&134217727)===0&&(os&134217727)===0||qe===null||Oi(qe,Ae,Tt,!1)}function Vl(e,t,i){var s=Oe;Oe|=2;var r=Dh(),n=Th();(qe!==e||Ae!==t)&&(Un=null,Gs(e,t)),t=!1;var S=Ve;e:do try{if(ke!==0&&we!==null){var T=we,j=Dt;switch(ke){case 8:Xl(),S=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var W=ke;if(ke=0,Dt=null,Ks(e,T,j,W),i&&Is){S=0;break e}break;default:W=ke,ke=0,Dt=null,Ks(e,T,j,W)}}S_(),S=Ve;break}catch(ne){xh(e,ne)}while(!0);return t&&e.shellSuspendCounter++,ei=Ji=null,Oe=s,U.H=r,U.A=n,we===null&&(qe=null,Ae=0,ln()),S}function S_(){for(;we!==null;)Rh(we)}function y_(e,t){var i=Oe;Oe|=2;var s=Dh(),r=Th();qe!==e||Ae!==t?(Un=null,Nn=et()+500,Gs(e,t)):Is=Zs(e,t);e:do try{if(ke!==0&&we!==null){t=we;var n=Dt;t:switch(ke){case 1:ke=0,Dt=null,Ks(e,t,n,1);break;case 2:case 9:if(Uc(n)){ke=0,Dt=null,Mh(t);break}t=function(){ke!==2&&ke!==9||qe!==e||(ke=7),Ft(e)},n.then(t,t);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:Uc(n)?(ke=0,Dt=null,Mh(t)):(ke=0,Dt=null,Ks(e,t,n,7));break;case 5:var S=null;switch(we.tag){case 26:S=we.memoizedState;case 5:case 27:var T=we;if(S?gf(S):T.stateNode.complete){ke=0,Dt=null;var j=T.sibling;if(j!==null)we=j;else{var W=T.return;W!==null?(we=W,Pn(W)):we=null}break t}}ke=0,Dt=null,Ks(e,t,n,5);break;case 6:ke=0,Dt=null,Ks(e,t,n,6);break;case 8:Xl(),Ve=6;break e;default:throw Error(z(462))}}b_();break}catch(ne){xh(e,ne)}while(!0);return ei=Ji=null,U.H=s,U.A=r,Oe=i,we!==null?0:(qe=null,Ae=0,ln(),Ve)}function b_(){for(;we!==null&&!us();)Rh(we)}function Rh(e){var t=Ju(e.alternate,e,ui);e.memoizedProps=e.pendingProps,t===null?Pn(e):we=t}function Mh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Vu(i,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=Vu(i,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:ol(t);default:th(i,t),t=we=Tc(t,ui),t=Ju(i,t,ui)}e.memoizedProps=e.pendingProps,t===null?Pn(e):we=t}function Ks(e,t,i,s){ei=Ji=null,ol(t),ks=null,_r=0;var r=t.return;try{if(c_(e,r,t,i,Ae)){Ve=1,Rn(e,kt(i,e.current)),we=null;return}}catch(n){if(r!==null)throw we=r,n;Ve=1,Rn(e,kt(i,e.current)),we=null;return}t.flags&32768?(Te||s===1?e=!0:Is||(Ae&536870912)!==0?e=!1:(Ti=e=!0,(s===2||s===9||s===3||s===6)&&(s=xt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Lh(t,e)):Pn(t)}function Pn(e){var t=e;do{if((t.flags&32768)!==0){Lh(t,Ti);return}e=t.return;var i=f_(t.alternate,t,ui);if(i!==null){we=i;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);Ve===0&&(Ve=5)}function Lh(e,t){do{var i=d_(e.alternate,e);if(i!==null){i.flags&=32767,we=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=i}while(e!==null);Ve=6,we=null}function Oh(e,t,i,s,r,n,S,T,j){e.cancelPendingCommit=null;do Yn();while(tt!==0);if((Oe&6)!==0)throw Error(z(327));if(t!==null){if(t===e.current)throw Error(z(177));if(n=t.lanes|t.childLanes,n|=Ha,ed(e,i,n,S,T,j),e===qe&&(we=qe=null,Ae=0),Ys=t,Li=e,hi=i,Yl=n,Gl=r,bh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,x_(yt,function(){return jh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,r=$.p,$.p=2,S=Oe,Oe|=4;try{__(e,t,i)}finally{Oe=S,$.p=r,U.T=s}}tt=1,Bh(),kh(),Hh()}}function Bh(){if(tt===1){tt=0;var e=Li,t=Ys,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var s=$.p;$.p=2;var r=Oe;Oe|=4;try{dh(t,e);var n=no,S=Sc(e.containerInfo),T=n.focusedElem,j=n.selectionRange;if(S!==T&&T&&T.ownerDocument&&mc(T.ownerDocument.documentElement,T)){if(j!==null&&Ma(T)){var W=j.start,ne=j.end;if(ne===void 0&&(ne=W),"selectionStart"in T)T.selectionStart=W,T.selectionEnd=Math.min(ne,T.value.length);else{var ue=T.ownerDocument||document,Z=ue&&ue.defaultView||window;if(Z.getSelection){var te=Z.getSelection(),ve=T.textContent.length,me=Math.min(j.start,ve),Ne=j.end===void 0?me:Math.min(j.end,ve);!te.extend&&me>Ne&&(S=Ne,Ne=me,me=S);var X=pc(T,me),P=pc(T,Ne);if(X&&P&&(te.rangeCount!==1||te.anchorNode!==X.node||te.anchorOffset!==X.offset||te.focusNode!==P.node||te.focusOffset!==P.offset)){var F=ue.createRange();F.setStart(X.node,X.offset),te.removeAllRanges(),me>Ne?(te.addRange(F),te.extend(P.node,P.offset)):(F.setEnd(P.node,P.offset),te.addRange(F))}}}}for(ue=[],te=T;te=te.parentNode;)te.nodeType===1&&ue.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<ue.length;T++){var oe=ue[T];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ta=!!ro,no=ro=null}finally{Oe=r,$.p=s,U.T=i}}e.current=t,tt=2}}function kh(){if(tt===2){tt=0;var e=Li,t=Ys,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var s=$.p;$.p=2;var r=Oe;Oe|=4;try{oh(e,t.alternate,t)}finally{Oe=r,$.p=s,U.T=i}}tt=3}}function Hh(){if(tt===4||tt===3){tt=0,ft();var e=Li,t=Ys,i=hi,s=bh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?tt=5:(tt=0,Ys=Li=null,zh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Mi=null),ha(i),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Gi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=U.T,r=$.p,$.p=2,U.T=null;try{for(var n=e.onRecoverableError,S=0;S<s.length;S++){var T=s[S];n(T.value,{componentStack:T.stack})}}finally{U.T=t,$.p=r}}(hi&3)!==0&&Yn(),Ft(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Kl?Lr++:(Lr=0,Kl=e):Lr=0,Or(0)}}function zh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fr(t)))}function Yn(){return Bh(),kh(),Hh(),jh()}function jh(){if(tt!==5)return!1;var e=Li,t=Yl;Yl=0;var i=ha(hi),s=U.T,r=$.p;try{$.p=32>i?32:i,U.T=null,i=Gl,Gl=null;var n=Li,S=hi;if(tt=0,Ys=Li=null,hi=0,(Oe&6)!==0)throw Error(z(331));var T=Oe;if(Oe|=4,mh(n.current),vh(n,n.current,S,i),Oe=T,Or(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Gi,n)}catch{}return!0}finally{$.p=r,U.T=s,zh(e,t)}}function Nh(e,t,i){t=kt(i,t),t=El(e.stateNode,t,2),e=wi(e,t,2),e!==null&&($s(e,2),Ft(e))}function He(e,t,i){if(e.tag===3)Nh(e,e,i);else for(;t!==null;){if(t.tag===3){Nh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Mi===null||!Mi.has(s))){e=kt(i,e),i=Uu(2),s=wi(t,i,2),s!==null&&(qu(i,s,t,e),$s(s,2),Ft(s));break}}t=t.return}}function Fl(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new p_;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(ql=!0,r.add(i),e=C_.bind(null,e,t,i),t.then(e,e))}function C_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,qe===e&&(Ae&i)===i&&(Ve===4||Ve===3&&(Ae&62914560)===Ae&&300>et()-jn?(Oe&2)===0&&Gs(e,0):Il|=i,Ps===Ae&&(Ps=0)),Ft(e)}function Uh(e,t){t===0&&(t=Bo()),e=Qi(e,t),e!==null&&($s(e,t),Ft(e))}function E_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Uh(e,i)}function w_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(z(314))}s!==null&&s.delete(t),Uh(e,i)}function x_(e,t){return Ii(e,t)}var Gn=null,Xs=null,Wl=!1,Kn=!1,Ql=!1,Bi=0;function Ft(e){e!==Xs&&e.next===null&&(Xs===null?Gn=Xs=e:Xs=Xs.next=e),Kn=!0,Wl||(Wl=!0,D_())}function Or(e,t){if(!Ql&&Kn){Ql=!0;do for(var i=!1,s=Gn;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var S=s.suspendedLanes,T=s.pingedLanes;n=(1<<31-Ct(42|e)+1)-1,n&=r&~(S&~T),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Yh(s,n))}else n=Ae,n=Fr(s,s===qe?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||Zs(s,n)||(i=!0,Yh(s,n));s=s.next}while(i);Ql=!1}}function A_(){qh()}function qh(){Kn=Wl=!1;var e=0;Bi!==0&&j_()&&(e=Bi);for(var t=et(),i=null,s=Gn;s!==null;){var r=s.next,n=Ih(s,t);n===0?(s.next=null,i===null?Gn=r:i.next=r,r===null&&(Xs=i)):(i=s,(e!==0||(n&3)!==0)&&(Kn=!0)),s=r}tt!==0&&tt!==5||Or(e),Bi!==0&&(Bi=0)}function Ih(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var S=31-Ct(n),T=1<<S,j=r[S];j===-1?((T&i)===0||(T&s)!==0)&&(r[S]=Jf(T,t)):j<=t&&(e.expiredLanes|=T),n&=~T}if(t=qe,i=Ae,i=Fr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Pi(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Zs(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Pi(s),ha(i)){case 2:case 8:i=hs;break;case 32:i=yt;break;case 268435456:i=It;break;default:i=yt}return s=Ph.bind(null,e),i=Ii(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Pi(s),e.callbackPriority=2,e.callbackNode=null,2}function Ph(e,t){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Yn()&&e.callbackNode!==i)return null;var s=Ae;return s=Fr(e,e===qe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Eh(e,s,t),Ih(e,et()),e.callbackNode!=null&&e.callbackNode===i?Ph.bind(null,e):null)}function Yh(e,t){if(Yn())return null;Eh(e,t,!0)}function D_(){U_(function(){(Oe&6)!==0?Ii(_i,A_):qh()})}function Zl(){if(Bi===0){var e=Ls;e===0&&(e=Kr,Kr<<=1,(Kr&261888)===0&&(Kr=256)),Bi=e}return Bi}function Gh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$r(""+e)}function Kh(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function T_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Gh((r[dt]||null).action),S=s.submitter;S&&(t=(t=S[dt]||null)?Gh(t.formAction):S.getAttribute("formAction"),t!==null&&(n=t,S=null));var T=new sn("action","action",null,s,r);e.push({event:T,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Bi!==0){var j=S?Kh(r,S):new FormData(r);pl(i,{pending:!0,data:j,method:r.method,action:n},null,j)}}else typeof n=="function"&&(T.preventDefault(),j=S?Kh(r,S):new FormData(r),pl(i,{pending:!0,data:j,method:r.method,action:n},n,j))},currentTarget:r}]})}}for(var $l=0;$l<ka.length;$l++){var Jl=ka[$l],R_=Jl.toLowerCase(),M_=Jl[0].toUpperCase()+Jl.slice(1);Pt(R_,"on"+M_)}Pt(Cc,"onAnimationEnd"),Pt(Ec,"onAnimationIteration"),Pt(wc,"onAnimationStart"),Pt("dblclick","onDoubleClick"),Pt("focusin","onFocus"),Pt("focusout","onBlur"),Pt(Xd,"onTransitionRun"),Pt(Vd,"onTransitionStart"),Pt(Fd,"onTransitionCancel"),Pt(xc,"onTransitionEnd"),ps("onMouseEnter",["mouseout","mouseover"]),ps("onMouseLeave",["mouseout","mouseover"]),ps("onPointerEnter",["pointerout","pointerover"]),ps("onPointerLeave",["pointerout","pointerover"]),Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Br="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(" "),L_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Br));function Xh(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var n=void 0;if(t)for(var S=s.length-1;0<=S;S--){var T=s[S],j=T.instance,W=T.currentTarget;if(T=T.listener,j!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=W;try{n(r)}catch(ne){an(ne)}r.currentTarget=null,n=j}else for(S=0;S<s.length;S++){if(T=s[S],j=T.instance,W=T.currentTarget,T=T.listener,j!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=W;try{n(r)}catch(ne){an(ne)}r.currentTarget=null,n=j}}}}function xe(e,t){var i=t[fa];i===void 0&&(i=t[fa]=new Set);var s=e+"__bubble";i.has(s)||(Vh(t,e,2,!1),i.add(s))}function eo(e,t,i){var s=0;t&&(s|=4),Vh(i,e,s,t)}var Xn="_reactListening"+Math.random().toString(36).slice(2);function to(e){if(!e[Xn]){e[Xn]=!0,qo.forEach(function(i){i!=="selectionchange"&&(L_.has(i)||eo(i,!1,e),eo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xn]||(t[Xn]=!0,eo("selectionchange",!1,t))}}function Vh(e,t,i,s){switch(Ef(t)){case 2:var r=nv;break;case 8:r=av;break;default:r=po}i=r.bind(null,t,i,e),r=void 0,!ba||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function io(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var S=s.tag;if(S===3||S===4){var T=s.stateNode.containerInfo;if(T===r)break;if(S===4)for(S=s.return;S!==null;){var j=S.tag;if((j===3||j===4)&&S.stateNode.containerInfo===r)return;S=S.return}for(;T!==null;){if(S=_s(T),S===null)return;if(j=S.tag,j===5||j===6||j===26||j===27){s=n=S;continue e}T=T.parentNode}}s=s.return}$o(function(){var W=n,ne=Sa(i),ue=[];e:{var Z=Ac.get(e);if(Z!==void 0){var te=sn,ve=e;switch(e){case"keypress":if(en(i)===0)break e;case"keydown":case"keyup":te=wd;break;case"focusin":ve="focus",te=xa;break;case"focusout":ve="blur",te=xa;break;case"beforeblur":case"afterblur":te=xa;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=tc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=fd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=Dd;break;case Cc:case Ec:case wc:te=vd;break;case xc:te=Rd;break;case"scroll":case"scrollend":te=ud;break;case"wheel":te=Ld;break;case"copy":case"cut":case"paste":te=pd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=sc;break;case"toggle":case"beforetoggle":te=Bd}var me=(t&4)!==0,Ne=!me&&(e==="scroll"||e==="scrollend"),X=me?Z!==null?Z+"Capture":null:Z;me=[];for(var P=W,F;P!==null;){var oe=P;if(F=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||F===null||X===null||(oe=tr(P,X),oe!=null&&me.push(kr(P,oe,F))),Ne)break;P=P.return}0<me.length&&(Z=new te(Z,ve,null,i,ne),ue.push({event:Z,listeners:me}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",Z&&i!==ma&&(ve=i.relatedTarget||i.fromElement)&&(_s(ve)||ve[ds]))break e;if((te||Z)&&(Z=ne.window===ne?ne:(Z=ne.ownerDocument)?Z.defaultView||Z.parentWindow:window,te?(ve=i.relatedTarget||i.toElement,te=W,ve=ve?_s(ve):null,ve!==null&&(Ne=ce(ve),me=ve.tag,ve!==Ne||me!==5&&me!==27&&me!==6)&&(ve=null)):(te=null,ve=W),te!==ve)){if(me=tc,oe="onMouseLeave",X="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(me=sc,oe="onPointerLeave",X="onPointerEnter",P="pointer"),Ne=te==null?Z:er(te),F=ve==null?Z:er(ve),Z=new me(oe,P+"leave",te,i,ne),Z.target=Ne,Z.relatedTarget=F,oe=null,_s(ne)===W&&(me=new me(X,P+"enter",ve,i,ne),me.target=F,me.relatedTarget=Ne,oe=me),Ne=oe,te&&ve)t:{for(me=O_,X=te,P=ve,F=0,oe=X;oe;oe=me(oe))F++;oe=0;for(var pe=P;pe;pe=me(pe))oe++;for(;0<F-oe;)X=me(X),F--;for(;0<oe-F;)P=me(P),oe--;for(;F--;){if(X===P||P!==null&&X===P.alternate){me=X;break t}X=me(X),P=me(P)}me=null}else me=null;te!==null&&Fh(ue,Z,te,me,!1),ve!==null&&Ne!==null&&Fh(ue,Ne,ve,me,!0)}}e:{if(Z=W?er(W):window,te=Z.nodeName&&Z.nodeName.toLowerCase(),te==="select"||te==="input"&&Z.type==="file")var Re=hc;else if(cc(Z))if(fc)Re=Yd;else{Re=Id;var ge=qd}else te=Z.nodeName,!te||te.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?W&&pa(W.elementType)&&(Re=hc):Re=Pd;if(Re&&(Re=Re(e,W))){uc(ue,Re,i,ne);break e}ge&&ge(e,Z,W),e==="focusout"&&W&&Z.type==="number"&&W.memoizedProps.value!=null&&ga(Z,"number",Z.value)}switch(ge=W?er(W):window,e){case"focusin":(cc(ge)||ge.contentEditable==="true")&&(Es=ge,La=W,cr=null);break;case"focusout":cr=La=Es=null;break;case"mousedown":Oa=!0;break;case"contextmenu":case"mouseup":case"dragend":Oa=!1,yc(ue,i,ne);break;case"selectionchange":if(Kd)break;case"keydown":case"keyup":yc(ue,i,ne)}var Ce;if(Da)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Cs?lc(e,i)&&(De="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(De="onCompositionStart");De&&(rc&&i.locale!=="ko"&&(Cs||De!=="onCompositionStart"?De==="onCompositionEnd"&&Cs&&(Ce=Jo()):(pi=ne,Ca="value"in pi?pi.value:pi.textContent,Cs=!0)),ge=Vn(W,De),0<ge.length&&(De=new ic(De,e,null,i,ne),ue.push({event:De,listeners:ge}),Ce?De.data=Ce:(Ce=oc(i),Ce!==null&&(De.data=Ce)))),(Ce=Hd?zd(e,i):jd(e,i))&&(De=Vn(W,"onBeforeInput"),0<De.length&&(ge=new ic("onBeforeInput","beforeinput",null,i,ne),ue.push({event:ge,listeners:De}),ge.data=Ce)),T_(ue,e,W,i,ne)}Xh(ue,t)})}function kr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Vn(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,n=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||n===null||(r=tr(e,i),r!=null&&s.unshift(kr(e,r,n)),r=tr(e,t),r!=null&&s.push(kr(e,r,n))),e.tag===3)return s;e=e.return}return[]}function O_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fh(e,t,i,s,r){for(var n=t._reactName,S=[];i!==null&&i!==s;){var T=i,j=T.alternate,W=T.stateNode;if(T=T.tag,j!==null&&j===s)break;T!==5&&T!==26&&T!==27||W===null||(j=W,r?(W=tr(i,n),W!=null&&S.unshift(kr(i,W,j))):r||(W=tr(i,n),W!=null&&S.push(kr(i,W,j)))),i=i.return}S.length!==0&&e.push({event:t,listeners:S})}var B_=/\r\n?/g,k_=/\u0000|\uFFFD/g;function Wh(e){return(typeof e=="string"?e:""+e).replace(B_,`
49
- `).replace(k_,"")}function Qh(e,t){return t=Wh(t),Wh(e)===t}function je(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Ss(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Ss(e,""+s);break;case"className":Qr(e,"class",s);break;case"tabIndex":Qr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Qr(e,i,s);break;case"style":Qo(e,s,n);break;case"data":if(t!=="object"){Qr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=$r(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof n=="function"&&(i==="formAction"?(t!=="input"&&je(e,t,"name",r.name,r,null),je(e,t,"formEncType",r.formEncType,r,null),je(e,t,"formMethod",r.formMethod,r,null),je(e,t,"formTarget",r.formTarget,r,null)):(je(e,t,"encType",r.encType,r,null),je(e,t,"method",r.method,r,null),je(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=$r(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Qt);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(z(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(z(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=$r(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Wr(e,"popover",s);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Wr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=od.get(i)||i,Wr(e,i,s))}}function so(e,t,i,s,r,n){switch(i){case"style":Qo(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(z(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(z(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Ss(e,s):(typeof s=="number"||typeof s=="bigint")&&Ss(e,""+s);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Io.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),n=e[dt]||null,n=n!=null?n[i]:null,typeof n=="function"&&e.removeEventListener(t,n,r),typeof s=="function")){typeof n!="function"&&n!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Wr(e,i,s)}}}function ct(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var S=i[n];if(S!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(z(137,t));default:je(e,t,n,S,i,null)}}r&&je(e,t,"srcSet",i.srcSet,i,null),s&&je(e,t,"src",i.src,i,null);return;case"input":xe("invalid",e);var T=n=S=r=null,j=null,W=null;for(s in i)if(i.hasOwnProperty(s)){var ne=i[s];if(ne!=null)switch(s){case"name":r=ne;break;case"type":S=ne;break;case"checked":j=ne;break;case"defaultChecked":W=ne;break;case"value":n=ne;break;case"defaultValue":T=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(z(137,t));break;default:je(e,t,s,ne,i,null)}}Xo(e,n,T,j,W,S,r,!1);return;case"select":xe("invalid",e),s=S=n=null;for(r in i)if(i.hasOwnProperty(r)&&(T=i[r],T!=null))switch(r){case"value":n=T;break;case"defaultValue":S=T;break;case"multiple":s=T;default:je(e,t,r,T,i,null)}t=n,i=S,e.multiple=!!s,t!=null?ms(e,!!s,t,!1):i!=null&&ms(e,!!s,i,!0);return;case"textarea":xe("invalid",e),n=r=s=null;for(S in i)if(i.hasOwnProperty(S)&&(T=i[S],T!=null))switch(S){case"value":s=T;break;case"defaultValue":r=T;break;case"children":n=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(z(91));break;default:je(e,t,S,T,i,null)}Fo(e,s,r,n);return;case"option":for(j in i)if(i.hasOwnProperty(j)&&(s=i[j],s!=null))switch(j){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:je(e,t,j,s,i,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(s=0;s<Br.length;s++)xe(Br[s],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in i)if(i.hasOwnProperty(W)&&(s=i[W],s!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(z(137,t));default:je(e,t,W,s,i,null)}return;default:if(pa(t)){for(ne in i)i.hasOwnProperty(ne)&&(s=i[ne],s!==void 0&&so(e,t,ne,s,i,void 0));return}}for(T in i)i.hasOwnProperty(T)&&(s=i[T],s!=null&&je(e,t,T,s,i,null))}function H_(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,n=null,S=null,T=null,j=null,W=null,ne=null;for(te in i){var ue=i[te];if(i.hasOwnProperty(te)&&ue!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":j=ue;default:s.hasOwnProperty(te)||je(e,t,te,null,s,ue)}}for(var Z in s){var te=s[Z];if(ue=i[Z],s.hasOwnProperty(Z)&&(te!=null||ue!=null))switch(Z){case"type":n=te;break;case"name":r=te;break;case"checked":W=te;break;case"defaultChecked":ne=te;break;case"value":S=te;break;case"defaultValue":T=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(z(137,t));break;default:te!==ue&&je(e,t,Z,te,s,ue)}}va(e,S,T,j,W,ne,n,r);return;case"select":te=S=T=Z=null;for(n in i)if(j=i[n],i.hasOwnProperty(n)&&j!=null)switch(n){case"value":break;case"multiple":te=j;default:s.hasOwnProperty(n)||je(e,t,n,null,s,j)}for(r in s)if(n=s[r],j=i[r],s.hasOwnProperty(r)&&(n!=null||j!=null))switch(r){case"value":Z=n;break;case"defaultValue":T=n;break;case"multiple":S=n;default:n!==j&&je(e,t,r,n,s,j)}t=T,i=S,s=te,Z!=null?ms(e,!!i,Z,!1):!!s!=!!i&&(t!=null?ms(e,!!i,t,!0):ms(e,!!i,i?[]:"",!1));return;case"textarea":te=Z=null;for(T in i)if(r=i[T],i.hasOwnProperty(T)&&r!=null&&!s.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:je(e,t,T,null,s,r)}for(S in s)if(r=s[S],n=i[S],s.hasOwnProperty(S)&&(r!=null||n!=null))switch(S){case"value":Z=r;break;case"defaultValue":te=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(z(91));break;default:r!==n&&je(e,t,S,r,s,n)}Vo(e,Z,te);return;case"option":for(var ve in i)if(Z=i[ve],i.hasOwnProperty(ve)&&Z!=null&&!s.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:je(e,t,ve,null,s,Z)}for(j in s)if(Z=s[j],te=i[j],s.hasOwnProperty(j)&&Z!==te&&(Z!=null||te!=null))switch(j){case"selected":e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:je(e,t,j,Z,s,te)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in i)Z=i[me],i.hasOwnProperty(me)&&Z!=null&&!s.hasOwnProperty(me)&&je(e,t,me,null,s,Z);for(W in s)if(Z=s[W],te=i[W],s.hasOwnProperty(W)&&Z!==te&&(Z!=null||te!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(z(137,t));break;default:je(e,t,W,Z,s,te)}return;default:if(pa(t)){for(var Ne in i)Z=i[Ne],i.hasOwnProperty(Ne)&&Z!==void 0&&!s.hasOwnProperty(Ne)&&so(e,t,Ne,void 0,s,Z);for(ne in s)Z=s[ne],te=i[ne],!s.hasOwnProperty(ne)||Z===te||Z===void 0&&te===void 0||so(e,t,ne,Z,s,te);return}}for(var X in i)Z=i[X],i.hasOwnProperty(X)&&Z!=null&&!s.hasOwnProperty(X)&&je(e,t,X,null,s,Z);for(ue in s)Z=s[ue],te=i[ue],!s.hasOwnProperty(ue)||Z===te||Z==null&&te==null||je(e,t,ue,Z,s,te)}function Zh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function z_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],n=r.transferSize,S=r.initiatorType,T=r.duration;if(n&&T&&Zh(S)){for(S=0,T=r.responseEnd,s+=1;s<i.length;s++){var j=i[s],W=j.startTime;if(W>T)break;var ne=j.transferSize,ue=j.initiatorType;ne&&Zh(ue)&&(j=j.responseEnd,S+=ne*(j<T?1:(T-W)/(j-W)))}if(--s,t+=8*(n+S)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ro=null,no=null;function Fn(e){return e.nodeType===9?e:e.ownerDocument}function $h(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ao(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var lo=null;function j_(){var e=window.event;return e&&e.type==="popstate"?e===lo?!1:(lo=e,!0):(lo=null,!1)}var ef=typeof setTimeout=="function"?setTimeout:void 0,N_=typeof clearTimeout=="function"?clearTimeout:void 0,tf=typeof Promise=="function"?Promise:void 0,U_=typeof queueMicrotask=="function"?queueMicrotask:typeof tf<"u"?function(e){return tf.resolve(null).then(e).catch(q_)}:ef;function q_(e){setTimeout(function(){throw e})}function ki(e){return e==="head"}function sf(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Qs(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Hr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Hr(i);for(var n=i.firstChild;n;){var S=n.nextSibling,T=n.nodeName;n[Js]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=S}}else i==="body"&&Hr(e.ownerDocument.body);i=r}while(i);Qs(t)}function rf(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function oo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":oo(i),da(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function I_(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Js])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(n=e.getAttribute("rel"),n==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(n!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(n=e.getAttribute("src"),(n!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&n&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var n=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===n)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function P_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ut(e.nextSibling),e===null))return null;return e}function nf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function co(e){return e.data==="$?"||e.data==="$~"}function uo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Y_(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ut(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ho=null;function af(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ut(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function lf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function of(e,t,i){switch(t=Fn(i),e){case"html":if(e=t.documentElement,!e)throw Error(z(452));return e;case"head":if(e=t.head,!e)throw Error(z(453));return e;case"body":if(e=t.body,!e)throw Error(z(454));return e;default:throw Error(z(451))}}function Hr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);da(e)}var qt=new Map,cf=new Set;function Wn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fi=$.d;$.d={f:G_,r:K_,D:X_,C:V_,L:F_,m:W_,X:Z_,S:Q_,M:$_};function G_(){var e=fi.f(),t=qn();return e||t}function K_(e){var t=vs(e);t!==null&&t.tag===5&&t.type==="form"?xu(t):fi.r(e)}var Vs=typeof document>"u"?null:document;function uf(e,t,i){var s=Vs;if(s&&typeof t=="string"&&t){var r=Ot(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),cf.has(r)||(cf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),ct(t,"link",e),st(t),s.head.appendChild(t)))}}function X_(e){fi.D(e),uf("dns-prefetch",e,null)}function V_(e,t){fi.C(e,t),uf("preconnect",e,t)}function F_(e,t,i){fi.L(e,t,i);var s=Vs;if(s&&e&&t){var r='link[rel="preload"][as="'+Ot(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ot(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ot(i.imageSizes)+'"]')):r+='[href="'+Ot(e)+'"]';var n=r;switch(t){case"style":n=Fs(e);break;case"script":n=Ws(e)}qt.has(n)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),qt.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(zr(n))||t==="script"&&s.querySelector(jr(n))||(t=s.createElement("link"),ct(t,"link",e),st(t),s.head.appendChild(t)))}}function W_(e,t){fi.m(e,t);var i=Vs;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ot(s)+'"][href="'+Ot(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Ws(e)}if(!qt.has(n)&&(e=h({rel:"modulepreload",href:e},t),qt.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(jr(n)))return}s=i.createElement("link"),ct(s,"link",e),st(s),i.head.appendChild(s)}}}function Q_(e,t,i){fi.S(e,t,i);var s=Vs;if(s&&e){var r=gs(s).hoistableStyles,n=Fs(e);t=t||"default";var S=r.get(n);if(!S){var T={loading:0,preload:null};if(S=s.querySelector(zr(n)))T.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=qt.get(n))&&fo(e,i);var j=S=s.createElement("link");st(j),ct(j,"link",e),j._p=new Promise(function(W,ne){j.onload=W,j.onerror=ne}),j.addEventListener("load",function(){T.loading|=1}),j.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Qn(S,t,s)}S={type:"stylesheet",instance:S,count:1,state:T},r.set(n,S)}}}function Z_(e,t){fi.X(e,t);var i=Vs;if(i&&e){var s=gs(i).hoistableScripts,r=Ws(e),n=s.get(r);n||(n=i.querySelector(jr(r)),n||(e=h({src:e,async:!0},t),(t=qt.get(r))&&_o(e,t),n=i.createElement("script"),st(n),ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function $_(e,t){fi.M(e,t);var i=Vs;if(i&&e){var s=gs(i).hoistableScripts,r=Ws(e),n=s.get(r);n||(n=i.querySelector(jr(r)),n||(e=h({src:e,async:!0,type:"module"},t),(t=qt.get(r))&&_o(e,t),n=i.createElement("script"),st(n),ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function hf(e,t,i,s){var r=(r=he.current)?Wn(r):null;if(!r)throw Error(z(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Fs(i.href),i=gs(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Fs(i.href);var n=gs(r).hoistableStyles,S=n.get(e);if(S||(r=r.ownerDocument||r,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,S),(n=r.querySelector(zr(e)))&&!n._p&&(S.instance=n,S.state.loading=5),qt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},qt.set(e,i),n||J_(r,e,i,S.state))),t&&s===null)throw Error(z(528,""));return S}if(t&&s!==null)throw Error(z(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ws(i),i=gs(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(z(444,e))}}function Fs(e){return'href="'+Ot(e)+'"'}function zr(e){return'link[rel="stylesheet"]['+e+"]"}function ff(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function J_(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ct(t,"link",i),st(t),e.head.appendChild(t))}function Ws(e){return'[src="'+Ot(e)+'"]'}function jr(e){return"script[async]"+e}function df(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ot(i.href)+'"]');if(s)return t.instance=s,st(s),s;var r=h({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),ct(s,"style",r),Qn(s,i.precedence,e),t.instance=s;case"stylesheet":r=Fs(i.href);var n=e.querySelector(zr(r));if(n)return t.state.loading|=4,t.instance=n,st(n),n;s=ff(i),(r=qt.get(r))&&fo(s,r),n=(e.ownerDocument||e).createElement("link"),st(n);var S=n;return S._p=new Promise(function(T,j){S.onload=T,S.onerror=j}),ct(n,"link",s),t.state.loading|=4,Qn(n,i.precedence,e),t.instance=n;case"script":return n=Ws(i.src),(r=e.querySelector(jr(n)))?(t.instance=r,st(r),r):(s=i,(r=qt.get(n))&&(s=h({},i),_o(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),st(r),ct(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(z(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Qn(s,i.precedence,e));return t.instance}function Qn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,n=r,S=0;S<s.length;S++){var T=s[S];if(T.dataset.precedence===t)n=T;else if(n!==r)break}n?n.parentNode.insertBefore(e,n.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function fo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function _o(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zn=null;function _f(e,t,i){if(Zn===null){var s=new Map,r=Zn=new Map;r.set(i,s)}else r=Zn,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var n=i[r];if(!(n[Js]||n[nt]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var S=n.getAttribute(t)||"";S=e+S;var T=s.get(S);T?T.push(n):s.set(S,[n])}}return s}function vf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function ev(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function gf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tv(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=Fs(s.href),n=t.querySelector(zr(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=$n.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,st(n);return}n=t.ownerDocument||t,s=ff(s),(r=qt.get(r))&&fo(s,r),n=n.createElement("link"),st(n);var S=n;S._p=new Promise(function(T,j){S.onload=T,S.onerror=j}),ct(n,"link",s),i.instance=n}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=$n.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var vo=0;function iv(e,t){return e.stylesheets&&e.count===0&&ea(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ea(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&vo===0&&(vo=62500*z_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ea(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>vo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function $n(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ea(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Jn=null;function ea(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Jn=new Map,t.forEach(sv,e),Jn=null,$n.call(e))}function sv(e,t){if(!(t.state.loading&4)){var i=Jn.get(e);if(i)var s=i.get(null);else{i=new Map,Jn.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var S=r[n];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(i.set(S.dataset.precedence,S),s=S)}s&&i.set(null,s)}r=t.instance,S=r.getAttribute("data-precedence"),n=i.get(S)||s,n===s&&i.set(null,r),i.set(S,r),this.count++,s=$n.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),n?n.parentNode.insertBefore(r,n.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Nr={$$typeof:o,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function rv(e,t,i,s,r,n,S,T,j){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ca(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.hiddenUpdates=ca(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function pf(e,t,i,s,r,n,S,T,j,W,ne,ue){return e=new rv(e,t,i,S,j,W,ne,ue,T),t=1,n===!0&&(t|=24),n=wt(3,null,null,t),e.current=n,n.stateNode=e,t=Va(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},Za(n),e}function mf(e){return e?(e=As,e):As}function Sf(e,t,i,s,r,n){r=mf(r),s.context===null?s.context=r:s.pendingContext=r,s=Ei(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=wi(e,s,t),i!==null&&(St(i,e,t),gr(i,e,t))}function yf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function go(e,t){yf(e,t),(e=e.alternate)&&yf(e,t)}function bf(e){if(e.tag===13||e.tag===31){var t=Qi(e,67108864);t!==null&&St(t,e,67108864),go(e,67108864)}}function Cf(e){if(e.tag===13||e.tag===31){var t=Rt();t=ua(t);var i=Qi(e,t);i!==null&&St(i,e,t),go(e,t)}}var ta=!0;function nv(e,t,i,s){var r=U.T;U.T=null;var n=$.p;try{$.p=2,po(e,t,i,s)}finally{$.p=n,U.T=r}}function av(e,t,i,s){var r=U.T;U.T=null;var n=$.p;try{$.p=8,po(e,t,i,s)}finally{$.p=n,U.T=r}}function po(e,t,i,s){if(ta){var r=mo(s);if(r===null)io(e,t,s,ia,i),wf(e,s);else if(ov(r,e,t,i,s))s.stopPropagation();else if(wf(e,s),t&4&&-1<lv.indexOf(e)){for(;r!==null;){var n=vs(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var S=Ki(n.pendingLanes);if(S!==0){var T=n;for(T.pendingLanes|=2,T.entangledLanes|=2;S;){var j=1<<31-Ct(S);T.entanglements[1]|=j,S&=~j}Ft(n),(Oe&6)===0&&(Nn=et()+500,Or(0))}}break;case 31:case 13:T=Qi(n,2),T!==null&&St(T,n,2),qn(),go(n,2)}if(n=mo(s),n===null&&io(e,t,s,ia,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else io(e,t,s,null,i)}}function mo(e){return e=Sa(e),So(e)}var ia=null;function So(e){if(ia=null,e=_s(e),e!==null){var t=ce(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=K(t),e!==null)return e;e=null}else if(i===31){if(e=u(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ia=e,null}function Ef(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Mt()){case _i:return 2;case hs:return 8;case yt:case fs:return 32;case It:return 268435456;default:return 32}default:return 32}}var yo=!1,Hi=null,zi=null,ji=null,Ur=new Map,qr=new Map,Ni=[],lv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function wf(e,t){switch(e){case"focusin":case"focusout":Hi=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":Ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qr.delete(t.pointerId)}}function Ir(e,t,i,s,r,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:n,targetContainers:[r]},t!==null&&(t=vs(t),t!==null&&bf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function ov(e,t,i,s,r){switch(t){case"focusin":return Hi=Ir(Hi,e,t,i,s,r),!0;case"dragenter":return zi=Ir(zi,e,t,i,s,r),!0;case"mouseover":return ji=Ir(ji,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return Ur.set(n,Ir(Ur.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,qr.set(n,Ir(qr.get(n)||null,e,t,i,s,r)),!0}return!1}function xf(e){var t=_s(e.target);if(t!==null){var i=ce(t);if(i!==null){if(t=i.tag,t===13){if(t=K(i),t!==null){e.blockedOn=t,No(e.priority,function(){Cf(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,No(e.priority,function(){Cf(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=mo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ma=s,i.target.dispatchEvent(s),ma=null}else return t=vs(i),t!==null&&bf(t),e.blockedOn=i,!1;t.shift()}return!0}function Af(e,t,i){sa(e)&&i.delete(t)}function cv(){yo=!1,Hi!==null&&sa(Hi)&&(Hi=null),zi!==null&&sa(zi)&&(zi=null),ji!==null&&sa(ji)&&(ji=null),Ur.forEach(Af),qr.forEach(Af)}function ra(e,t){e.blockedOn===t&&(e.blockedOn=null,yo||(yo=!0,k.unstable_scheduleCallback(k.unstable_NormalPriority,cv)))}var na=null;function Df(e){na!==e&&(na=e,k.unstable_scheduleCallback(k.unstable_NormalPriority,function(){na===e&&(na=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(So(s||i)===null)continue;break}var n=vs(i);n!==null&&(e.splice(t,3),t-=3,pl(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Qs(e){function t(j){return ra(j,e)}Hi!==null&&ra(Hi,e),zi!==null&&ra(zi,e),ji!==null&&ra(ji,e),Ur.forEach(t),qr.forEach(t);for(var i=0;i<Ni.length;i++){var s=Ni[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Ni.length&&(i=Ni[0],i.blockedOn===null);)xf(i),i.blockedOn===null&&Ni.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],n=i[s+1],S=r[dt]||null;if(typeof n=="function")S||Df(i);else if(S){var T=null;if(n&&n.hasAttribute("formAction")){if(r=n,S=n[dt]||null)T=S.formAction;else if(So(r)!==null)continue}else T=S.action;typeof T=="function"?i[s+1]=T:(i.splice(s,3),s-=3),Df(i)}}}function Tf(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(S){return r=S})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function bo(e){this._internalRoot=e}aa.prototype.render=bo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));var i=t.current,s=Rt();Sf(i,s,e,t,null,null)},aa.prototype.unmount=bo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sf(e.current,2,null,e,null,null),qn(),t[ds]=null}};function aa(e){this._internalRoot=e}aa.prototype.unstable_scheduleHydration=function(e){if(e){var t=jo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ni.length&&t!==0&&t<Ni[i].priority;i++);Ni.splice(i,0,e),i===0&&xf(e)}};var Rf=Y.version;if(Rf!=="19.2.6")throw Error(z(527,Rf,"19.2.6"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(z(188)):(e=Object.keys(e).join(","),Error(z(268,e)));return e=d(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var uv={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var la=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!la.isDisabled&&la.supportsFiber)try{Gi=la.inject(uv),bt=la}catch{}}return Yr.createRoot=function(e,t){if(!ae(e))throw Error(z(299));var i=!1,s="",r=Hu,n=zu,S=ju;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(S=t.onRecoverableError)),t=pf(e,1,!1,null,null,i,s,null,r,n,S,Tf),e[ds]=t.current,to(e),new bo(t)},Yr.hydrateRoot=function(e,t,i){if(!ae(e))throw Error(z(299));var s=!1,r="",n=Hu,S=zu,T=ju,j=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError),i.formState!==void 0&&(j=i.formState)),t=pf(e,1,!0,t,i??null,s,r,j,n,S,T,Tf),t.context=mf(null),i=t.current,s=Rt(),s=ua(s),r=Ei(s),r.callback=null,wi(i,r,s),i=s,t.current.lanes=i,$s(t,i),Ft(t),e[ds]=t.current,to(e),new aa(t)},Yr.version="19.2.6",Yr}var qf;function Cv(){if(qf)return wo.exports;qf=1;function k(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(k)}catch(Y){console.error(Y)}}return k(),wo.exports=bv(),wo.exports}var Ev=Cv();function wv({sidebar:k,children:Y}){const[ee,z]=_e.useState(!1);return L.jsxs("div",{className:ee?"app-shell is-sidebar-collapsed":"app-shell",children:[L.jsxs("aside",{className:"app-sidebar",children:[L.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":ee?"Expand sidebar":"Collapse sidebar",title:ee?"Expand sidebar":"Collapse sidebar",onClick:()=>z(ae=>!ae)}),L.jsx("div",{className:"sidebar-content",children:k})]}),L.jsx("main",{className:"app-main",children:Y})]})}function xv(k,Y){return k.find(ee=>ee.taskSlug===Y)??k[0]??null}const Le={getCurrentProject(){return Ue("/api/projects/current")},getRecentRepositoryPaths(){return Ue("/api/projects/recent")},connectProject(k){return Ue("/api/projects/connect",{method:"POST",body:JSON.stringify(k)})},listTasks(){return Ue("/api/tasks")},createTask(k){return Ue("/api/tasks",{method:"POST",body:JSON.stringify(k)})},getHarnessStatus(){return Ue("/api/projects/harness")},applyHarness(){return Ue("/api/projects/harness/apply",{method:"POST"})},getTaskStatus(k){return Ue(`/api/tasks/${encodeURIComponent(k)}/status`)},listSessions(k){return Ue(`/api/tasks/${encodeURIComponent(k)}/sessions`)},startRoleSession(k,Y,ee={}){return Ue(`/api/tasks/${encodeURIComponent(k)}/sessions/${Y}/start`,{method:"POST",body:JSON.stringify(ee)})},stopRoleSession(k,Y){return Ue(`/api/tasks/${encodeURIComponent(k)}/sessions/${Y}/stop`,{method:"POST"})},restartRoleSession(k,Y,ee={}){return Ue(`/api/tasks/${encodeURIComponent(k)}/sessions/${Y}/restart`,{method:"POST",body:JSON.stringify(ee)})},resumeRoleSession(k,Y,ee={}){return Ue(`/api/tasks/${encodeURIComponent(k)}/sessions/${Y}/resume`,{method:"POST",body:JSON.stringify(ee)})},dispatchRoleCommand(k,Y){return Ue(`/api/tasks/${encodeURIComponent(k)}/sessions/${Y}/dispatch`,{method:"POST"})},listMessages(k){return Ue(`/api/tasks/${encodeURIComponent(k)}/messages`)},sendRoleMessage(k,Y){return Ue(`/api/tasks/${encodeURIComponent(k)}/messages`,{method:"POST",body:JSON.stringify(Y)})},stageMessage(k,Y){return Ue(`/api/tasks/${encodeURIComponent(k)}/messages/${Y}/stage`,{method:"POST"})},rejectMessage(k,Y){return Ue(`/api/tasks/${encodeURIComponent(k)}/messages/${Y}/reject`,{method:"POST"})},getOrchestrationState(k){return Ue(`/api/tasks/${encodeURIComponent(k)}/orchestration`)},updateOrchestrationState(k,Y){return Ue(`/api/tasks/${encodeURIComponent(k)}/orchestration`,{method:"PUT",body:JSON.stringify(Y)})},getTranslationSettings(){return Ue("/api/translation/settings")},updateTranslationSettings(k){return Ue("/api/translation/settings",{method:"PUT",body:JSON.stringify(k)})},getTranslationPrompts(){return Ue("/api/translation/prompts")},testTranslationProvider(){return Ue("/api/translation/test",{method:"POST"})},translateUserInput(k,Y,ee){return Ue(`/api/tasks/${encodeURIComponent(k)}/sessions/${Y}/translation/input`,{method:"POST",body:JSON.stringify(ee)})},sendTranslatedInput(k,Y,ee){return Ue(`/api/tasks/${encodeURIComponent(k)}/sessions/${Y}/translation/send`,{method:"POST",body:JSON.stringify(ee)})},clearTranslationSession(k){return Ue(`/api/translation/sessions/${encodeURIComponent(k)}/clear`,{method:"POST"})},retryTranslation(k,Y){return Ue(`/api/translation/sessions/${encodeURIComponent(k)}/retry/${encodeURIComponent(Y)}`,{method:"POST"})}};async function Ue(k,Y={}){var ae,ce;const ee=new Headers(Y.headers);Y.body!==void 0&&Y.body!==null&&!ee.has("content-type")&&ee.set("content-type","application/json");const z=await fetch(k,{...Y,headers:ee});if(!z.ok){const K=await z.json().catch(()=>null),u=(ae=K==null?void 0:K.error)!=null&&ae.hint?`${K.error.message} ${K.error.hint}`:((ce=K==null?void 0:K.error)==null?void 0:ce.message)??`Request failed: ${z.status}`;throw new Error(u)}return z.json()}function Av({events:k,maxEvents:Y=8,showHeader:ee=!0}){const z=Y===null?k:k.slice(-Y);return L.jsxs("section",{className:"event-log",children:[ee?L.jsx("h2",{children:"Events"}):null,k.length===0?L.jsx("p",{className:"muted",children:"No terminal events yet."}):L.jsx("ol",{children:z.map((ae,ce)=>L.jsx("li",{children:ae},`${ae}-${ce}`))})]})}function Gr({status:k}){return L.jsx("span",{className:`status-badge status-${k}`,children:k.replaceAll("_"," ")})}function Dv({status:k,applyResult:Y,busy:ee=!1,onRefresh:z,onApply:ae}){return k?L.jsxs("section",{className:"harness-panel",children:[L.jsxs("div",{className:"harness-panel-header",children:[L.jsx("p",{className:"muted",children:k.needsApply?`${k.plannedChanges.length} planned changes`:"up to date"}),L.jsxs("div",{className:"harness-actions",children:[L.jsx("button",{type:"button",disabled:ee,onClick:()=>void z(),children:"Refresh"}),L.jsx("button",{type:"button",disabled:ee||!k.needsApply,onClick:()=>void ae(),children:"Install / Update"})]})]}),L.jsx("ol",{className:"harness-file-list",children:k.files.map(ce=>L.jsxs("li",{children:[L.jsx("span",{children:ce.path}),L.jsx(Gr,{status:ce.action})]},ce.path))}),k.plannedChanges.length>0?L.jsxs("div",{className:"harness-changes",children:[L.jsx("h3",{children:"Planned Changes"}),L.jsx("ul",{children:k.plannedChanges.map(ce=>L.jsxs("li",{children:[L.jsx("strong",{children:ce.action})," ",ce.path]},`${ce.path}:${ce.action}`))})]}):null,Y?L.jsxs("div",{className:"harness-result",children:[L.jsx("p",{children:Y.message}),Y.changedFiles.length>0?L.jsx("ul",{children:Y.changedFiles.map(ce=>L.jsxs("li",{children:[L.jsx("strong",{children:ce.action})," ",ce.path]},`${ce.path}:${ce.action}`))}):null]}):null,k.warnings.length>0?L.jsx("ul",{className:"warnings",children:k.warnings.map(ce=>L.jsx("li",{children:ce},ce))}):null]}):null}function Oo(k){return{pending:k.filter(Y=>Y.status==="pending_approval").length,queued:k.filter(Y=>Y.status==="queued").length,delivered:k.filter(Y=>Y.status==="delivered"||Y.status==="staged").length}}function Tv({messages:k,orchestration:Y,busy:ee,maxMessages:z=6,showControls:ae=!0,showHeader:ce=!0,onModeChange:K,onPausedChange:u,onStage:f,onReject:d,onOpenRole:m}){const h=Oo(k),p=(Y==null?void 0:Y.mode)??"manual",b=z===null?k:k.slice(-z);return L.jsxs("section",{className:"message-panel",children:[ce?L.jsxs("div",{className:"message-panel-header",children:[L.jsxs("div",{children:[L.jsx("h2",{children:"Messages"}),L.jsxs("p",{className:"muted",children:[h.pending," pending / ",h.queued," queued / ",h.delivered," delivered"]})]}),ae&&K&&u?L.jsxs("div",{className:"message-controls",children:[L.jsxs("label",{className:"message-mode-toggle",children:[L.jsx("input",{type:"checkbox",checked:p==="auto",disabled:ee,onChange:w=>K(w.target.checked?"auto":"manual")}),L.jsx("span",{children:"Auto orchestration"})]}),L.jsx("button",{type:"button",disabled:ee||p!=="auto",onClick:()=>u(!(Y!=null&&Y.paused)),children:Y!=null&&Y.paused?"Resume":"Pause"})]}):null]}):null,k.length===0?L.jsx("p",{className:"muted",children:"No role messages yet."}):L.jsx("ol",{className:"message-list",children:b.map(w=>{const g=w.status==="pending_approval"||w.status==="queued",l=w.status==="pending_approval"||w.status==="queued";return L.jsxs("li",{className:`message-item message-${w.status}`,children:[L.jsxs("div",{className:"message-item-main",children:[L.jsxs("div",{className:"message-meta",children:[L.jsxs("strong",{children:[w.fromRole," ","->"," ",w.toRole]}),L.jsx("span",{children:w.type}),L.jsx(Gr,{status:w.status})]}),L.jsx("p",{children:w.body}),w.bodyPath?L.jsx("span",{className:"message-path",children:w.bodyPath}):null]}),L.jsxs("div",{className:"message-actions",children:[L.jsx("button",{type:"button",onClick:()=>m(w.toRole),children:"Open Role"}),L.jsx("button",{type:"button",disabled:ee||!g,onClick:()=>f(w),children:"Stage"}),L.jsx("button",{type:"button",disabled:ee||!l,onClick:()=>d(w),children:"Reject"})]})]},w.id)})})]})}function Rv({defaultPath:k="",recentPaths:Y=[],busy:ee=!1,onConnect:z}){const[ae,ce]=_e.useState(k);_e.useEffect(()=>{k&&ce(k)},[k]);async function K(u){u.preventDefault(),await z(ae)}return L.jsx("form",{className:"repo-connect",onSubmit:K,children:L.jsxs("div",{className:Y.length>0?"inline-form has-recent-paths":"inline-form",children:[L.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:ae,onChange:u=>ce(u.target.value),placeholder:"/path/to/repo"}),Y.length>0?L.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:u=>{u.target.value&&ce(u.target.value)},children:[L.jsx("option",{value:"",children:"Recent"}),Y.map(u=>L.jsx("option",{value:u,children:u},u))]}):null,L.jsx("button",{type:"submit",disabled:ee||!ae.trim(),children:"Connect"})]})})}function Mv({tasks:k,activeTaskSlug:Y,onSelect:ee}){return L.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:k.map(z=>L.jsxs("button",{className:z.taskSlug===Y?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>ee(z.taskSlug),children:[L.jsx("span",{children:z.title||z.taskSlug}),L.jsx(Gr,{status:z.status==="created"?"unknown":"running"})]},z.taskSlug))})}function Lv({workflow:k}){return k?L.jsxs("section",{className:"workflow-panel",children:[L.jsx("div",{className:"workflow-summary",children:L.jsx("p",{children:k.nextAction})}),L.jsx("ol",{className:"workflow-steps",children:k.steps.map(Y=>L.jsxs("li",{className:Y.id===k.currentStepId?"is-current":void 0,children:[L.jsx("span",{children:Y.label}),L.jsx(Gr,{status:Y.status})]},Y.id))})]}):null}function Ov({project:k,recentRepositoryPaths:Y,tasks:ee,activeTaskSlug:z,workflow:ae,messages:ce,orchestration:K,events:u,harnessStatus:f,harnessApplyResult:d,busy:m,onConnect:h,onRefreshHarness:p,onApplyHarness:b,onCreateTask:w,onSelectTask:g,onOrchestrationModeChange:l,onStageMessage:c,onRejectMessage:a,onOpenMessageRole:o}){const[_,E]=_e.useState(""),[y,C]=_e.useState(!1),[v,D]=_e.useState(!1),O=Oo(ce),N=(K==null?void 0:K.mode)??"manual";async function I(H){H.preventDefault(),await w({taskSlug:_}),E("")}return L.jsxs("div",{className:"project-dashboard",children:[L.jsx("header",{className:"brand-header",children:L.jsx("strong",{children:"VibeCodingMaster"})}),L.jsx(cs,{title:"Repository Path",defaultOpen:!z,children:L.jsx(Rv,{defaultPath:(k==null?void 0:k.repoRoot)??"",recentPaths:Y,busy:m,onConnect:h})}),k?L.jsx(cs,{title:"Repository",children:L.jsxs("div",{className:"project-summary",children:[L.jsxs("dl",{children:[L.jsxs("div",{children:[L.jsx("dt",{children:"Path"}),L.jsx("dd",{children:k.repoRoot})]}),L.jsxs("div",{children:[L.jsx("dt",{children:"Branch"}),L.jsx("dd",{children:k.branch})]}),L.jsxs("div",{children:[L.jsx("dt",{children:"Working tree"}),L.jsx("dd",{children:k.isDirty?"uncommitted changes":"clean"})]})]}),k.warnings.length>0?L.jsx("ul",{className:"warnings",children:k.warnings.map(H=>L.jsx("li",{children:H},H))}):null]})}):null,z?L.jsx(cs,{title:"Workflow",children:ae?L.jsx(Lv,{workflow:ae}):L.jsx("p",{className:"muted",children:"Loading workflow..."})}):null,z?L.jsx(cs,{title:"Settings",children:L.jsxs("div",{className:"sidebar-settings",children:[L.jsxs("button",{type:"button",onClick:()=>C(!0),children:[L.jsx("span",{children:"Messages"}),L.jsxs("span",{className:"muted",children:[O.pending," pending / ",O.queued," queued"]})]}),L.jsxs("button",{type:"button",onClick:()=>D(!0),children:[L.jsx("span",{children:"Events"}),L.jsxs("span",{className:"muted",children:[u.length," total"]})]}),L.jsxs("button",{"aria-pressed":N==="auto",className:N==="auto"?"settings-toggle is-active":"settings-toggle",disabled:m,type:"button",onClick:()=>l(N==="auto"?"manual":"auto"),children:[L.jsx("span",{children:"Auto orchestration"}),L.jsx("span",{children:N==="auto"?"on":"off"})]})]})}):null,k?L.jsx(cs,{title:"VCM Harness",children:L.jsx(Dv,{status:f,applyResult:d,busy:m,onRefresh:p,onApply:b})}):null,k?L.jsx(cs,{title:"New Task",children:L.jsx("div",{className:"task-create",children:L.jsxs("form",{onSubmit:I,children:[L.jsx("input",{value:_,onChange:H=>E(H.target.value),placeholder:"task name"}),L.jsx("button",{type:"submit",disabled:m||!_.trim(),children:"Create"})]})})}):null,ee.length>0?L.jsx(cs,{title:"Tasks",children:L.jsx(Mv,{tasks:ee,activeTaskSlug:z,onSelect:g})}):null,y?L.jsx(kv,{busy:m,messages:ce,orchestration:K,onClose:()=>C(!1),onOpenRole:o,onReject:a,onStage:c}):null,v?L.jsx(Bv,{events:u,onClose:()=>D(!1)}):null]})}function Bv({events:k,onClose:Y}){return L.jsx("div",{className:"modal-backdrop",children:L.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("h2",{children:"Events"}),L.jsxs("p",{className:"muted",children:[k.length," total"]})]}),L.jsx("button",{type:"button",onClick:Y,children:"Close"})]}),L.jsx(Av,{events:k,maxEvents:null,showHeader:!1})]})})}function kv({busy:k,messages:Y,orchestration:ee,onClose:z,onOpenRole:ae,onReject:ce,onStage:K}){const u=Oo(Y);return L.jsx("div",{className:"modal-backdrop",children:L.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("h2",{children:"Messages"}),L.jsxs("p",{className:"muted",children:[u.pending," pending / ",u.queued," queued / ",u.delivered," delivered",ee?` · ${ee.mode}${ee.paused?" paused":""}`:""]})]}),L.jsx("button",{type:"button",onClick:z,children:"Close"})]}),L.jsx(Tv,{busy:k,maxMessages:null,messages:Y,orchestration:ee,showControls:!1,showHeader:!1,onOpenRole:ae,onReject:ce,onStage:K})]})})}function cs({children:k,defaultOpen:Y=!1,title:ee}){const[z,ae]=_e.useState(Y);return _e.useEffect(()=>{ae(Y)},[Y]),L.jsxs("section",{className:"sidebar-section",children:[L.jsxs("button",{"aria-expanded":z,className:"sidebar-section-toggle",type:"button",onClick:()=>ae(ce=>!ce),children:[L.jsx("span",{children:ee}),L.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),z?L.jsx("div",{className:"sidebar-section-content",children:k}):null]})}const oa=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}];oa.map(k=>k.name);oa.filter(k=>k.dispatchable).map(k=>k.name);function Xf(k,Y){return k.find(ee=>ee.role===Y)}function Hv({activeRole:k,sessions:Y,onSelect:ee}){return L.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:oa.map(z=>{const ae=Xf(Y,z.name);return L.jsxs("button",{className:z.name===k?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":z.name===k,onClick:()=>ee(z.name),children:[L.jsx("span",{children:z.label}),L.jsx(Gr,{status:(ae==null?void 0:ae.status)??"not_started"})]},z.name)})})}var To={exports:{}},If;function zv(){return If||(If=1,(function(k,Y){(function(ee,z){k.exports=z()})(self,(()=>(()=>{var ee={};return(()=>{var z=ee;Object.defineProperty(z,"__esModule",{value:!0}),z.FitAddon=void 0,z.FitAddon=class{activate(ae){this._terminal=ae}dispose(){}fit(){const ae=this.proposeDimensions();if(!ae||!this._terminal||isNaN(ae.cols)||isNaN(ae.rows))return;const ce=this._terminal._core;this._terminal.rows===ae.rows&&this._terminal.cols===ae.cols||(ce._renderService.clear(),this._terminal.resize(ae.cols,ae.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ae=this._terminal._core,ce=ae._renderService.dimensions;if(ce.css.cell.width===0||ce.css.cell.height===0)return;const K=this._terminal.options.scrollback===0?0:ae.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),f=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),h=f-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),p=d-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-K;return{cols:Math.max(2,Math.floor(p/ce.css.cell.width)),rows:Math.max(1,Math.floor(h/ce.css.cell.height))}}}})(),ee})()))})(To)),To.exports}var jv=zv(),Ro={exports:{}},Pf;function Nv(){return Pf||(Pf=1,(function(k,Y){(function(ee,z){k.exports=z()})(self,(()=>(()=>{var ee={6:(K,u)=>{function f(m){try{const h=new URL(m),p=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return m.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(u,"__esModule",{value:!0}),u.LinkComputer=u.WebLinkProvider=void 0,u.WebLinkProvider=class{constructor(m,h,p,b={}){this._terminal=m,this._regex=h,this._handler=p,this._options=b}provideLinks(m,h){const p=d.computeLink(m,this._regex,this._terminal,this._handler);h(this._addCallbacks(p))}_addCallbacks(m){return m.map((h=>(h.leave=this._options.leave,h.hover=(p,b)=>{if(this._options.hover){const{range:w}=h;this._options.hover(p,b,w)}},h)))}};class d{static computeLink(h,p,b,w){const g=new RegExp(p.source,(p.flags||"")+"g"),[l,c]=d._getWindowedLineStrings(h-1,b),a=l.join("");let o;const _=[];for(;o=g.exec(a);){const E=o[0];if(!f(E))continue;const[y,C]=d._mapStrIdx(b,c,0,o.index),[v,D]=d._mapStrIdx(b,y,C,E.length);if(y===-1||C===-1||v===-1||D===-1)continue;const O={start:{x:C+1,y:y+1},end:{x:D,y:v+1}};_.push({range:O,text:E,activate:w})}return _}static _getWindowedLineStrings(h,p){let b,w=h,g=h,l=0,c="";const a=[];if(b=p.buffer.active.getLine(h)){const o=b.translateToString(!0);if(b.isWrapped&&o[0]!==" "){for(l=0;(b=p.buffer.active.getLine(--w))&&l<2048&&(c=b.translateToString(!0),l+=c.length,a.push(c),b.isWrapped&&c.indexOf(" ")===-1););a.reverse()}for(a.push(o),l=0;(b=p.buffer.active.getLine(++g))&&b.isWrapped&&l<2048&&(c=b.translateToString(!0),l+=c.length,a.push(c),c.indexOf(" ")===-1););}return[a,w]}static _mapStrIdx(h,p,b,w){const g=h.buffer.active,l=g.getNullCell();let c=b;for(;w;){const a=g.getLine(p);if(!a)return[-1,-1];for(let o=c;o<a.length;++o){a.getCell(o,l);const _=l.getChars();if(l.getWidth()&&(w-=_.length||1,o===a.length-1&&_==="")){const E=g.getLine(p+1);E&&E.isWrapped&&(E.getCell(0,l),l.getWidth()===2&&(w+=1))}if(w<0)return[p,o]}p++,c=0}return[p,c]}}u.LinkComputer=d}},z={};function ae(K){var u=z[K];if(u!==void 0)return u.exports;var f=z[K]={exports:{}};return ee[K](f,f.exports,ae),f.exports}var ce={};return(()=>{var K=ce;Object.defineProperty(K,"__esModule",{value:!0}),K.WebLinksAddon=void 0;const u=ae(6),f=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(m,h){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}K.WebLinksAddon=class{constructor(m=d,h={}){this._handler=m,this._options=h}activate(m){this._terminal=m;const h=this._options,p=h.urlRegex||f;this._linkProvider=this._terminal.registerLinkProvider(new u.WebLinkProvider(this._terminal,p,this._handler,h))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),ce})()))})(Ro)),Ro.exports}var Uv=Nv(),Mo={exports:{}},Yf;function qv(){return Yf||(Yf=1,(function(k,Y){(function(ee,z){k.exports=z()})(globalThis,(()=>(()=>{var ee={4567:function(K,u,f){var d=this&&this.__decorate||function(a,o,_,E){var y,C=arguments.length,v=C<3?o:E===null?E=Object.getOwnPropertyDescriptor(o,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,E);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(v=(C<3?y(v):C>3?y(o,_,v):y(o,_))||v);return C>3&&v&&Object.defineProperty(o,_,v),v},m=this&&this.__param||function(a,o){return function(_,E){o(_,E,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=f(9042),p=f(9924),b=f(844),w=f(4725),g=f(2585),l=f(3656);let c=u.AccessibilityManager=class extends b.Disposable{constructor(a,o,_,E){super(),this._terminal=a,this._coreBrowserService=_,this._renderService=E,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let y=0;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);if(this._topBoundaryFocusListener=y=>this._handleBoundaryFocus(y,0),this._bottomBoundaryFocusListener=y=>this._handleBoundaryFocus(y,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new 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((y=>this._handleResize(y.rows)))),this.register(this._terminal.onRender((y=>this._refreshRows(y.start,y.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((y=>this._handleChar(y)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
50
- `)))),this.register(this._terminal.onA11yTab((y=>this._handleTab(y)))),this.register(this._terminal.onKey((y=>this._handleKey(y.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,l.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,b.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(a){for(let o=0;o<a;o++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
51
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(a){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(a)||this._charsToConsume.push(a)}_refreshRows(a,o){this._liveRegionDebouncer.refresh(a,o,this._terminal.rows)}_renderRows(a,o){const _=this._terminal.buffer,E=_.lines.length.toString();for(let y=a;y<=o;y++){const C=_.lines.get(_.ydisp+y),v=[],D=(C==null?void 0:C.translateToString(!0,void 0,void 0,v))||"",O=(_.ydisp+y+1).toString(),N=this._rowElements[y];N&&(D.length===0?(N.innerText=" ",this._rowColumns.set(N,[0,1])):(N.textContent=D,this._rowColumns.set(N,v)),N.setAttribute("aria-posinset",O),N.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(a,o){const _=a.target,E=this._rowElements[o===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||a.relatedTarget!==E)return;let y,C;if(o===0?(y=_,C=this._rowElements.pop(),this._rowContainer.removeChild(C)):(y=this._rowElements.shift(),C=_,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),C.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const v=this._createAccessibilityTreeNode();this._rowElements.unshift(v),this._rowContainer.insertAdjacentElement("afterbegin",v)}else{const v=this._createAccessibilityTreeNode();this._rowElements.push(v),this._rowContainer.appendChild(v)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(o===0?-1:1),this._rowElements[o===0?1:this._rowElements.length-2].focus(),a.preventDefault(),a.stopImmediatePropagation()}_handleSelectionChange(){var D;if(this._rowElements.length===0)return;const a=document.getSelection();if(!a)return;if(a.isCollapsed)return void(this._rowContainer.contains(a.anchorNode)&&this._terminal.clearSelection());if(!a.anchorNode||!a.focusNode)return void console.error("anchorNode and/or focusNode are null");let o={node:a.anchorNode,offset:a.anchorOffset},_={node:a.focusNode,offset:a.focusOffset};if((o.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||o.node===_.node&&o.offset>_.offset)&&([o,_]=[_,o]),o.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(o={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(o.node))return;const E=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:E,offset:((D=E.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(_.node))return;const y=({node:O,offset:N})=>{const I=O instanceof Text?O.parentNode:O;let H=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(H))return console.warn("row is invalid. Race condition?"),null;const J=this._rowColumns.get(I);if(!J)return console.warn("columns is null. Race condition?"),null;let re=N<J.length?J[N]:J.slice(-1)[0]+1;return re>=this._terminal.cols&&(++H,re=0),{row:H,column:re}},C=y(o),v=y(_);if(C&&v){if(C.row>v.row||C.row===v.row&&C.column>=v.column)throw new Error("invalid range");this._terminal.select(C.column,C.row,(v.row-C.row)*this._terminal.cols-C.column+v.column)}}_handleResize(a){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let o=this._rowContainer.children.length;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);for(;this._rowElements.length>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const a=this._coreBrowserService.mainDocument.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}};u.AccessibilityManager=c=d([m(1,g.IInstantiationService),m(2,w.ICoreBrowserService),m(3,w.IRenderService)],c)},3614:(K,u)=>{function f(p){return p.replace(/\r?\n/g,"\r")}function d(p,b){return b?"\x1B[200~"+p+"\x1B[201~":p}function m(p,b,w,g){p=d(p=f(p),w.decPrivateModes.bracketedPasteMode&&g.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(p,!0),b.value=""}function h(p,b,w){const g=w.getBoundingClientRect(),l=p.clientX-g.left-10,c=p.clientY-g.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${l}px`,b.style.top=`${c}px`,b.style.zIndex="1000",b.focus()}Object.defineProperty(u,"__esModule",{value:!0}),u.rightClickHandler=u.moveTextAreaUnderMouseCursor=u.paste=u.handlePasteEvent=u.copyHandler=u.bracketTextForPaste=u.prepareTextForTerminal=void 0,u.prepareTextForTerminal=f,u.bracketTextForPaste=d,u.copyHandler=function(p,b){p.clipboardData&&p.clipboardData.setData("text/plain",b.selectionText),p.preventDefault()},u.handlePasteEvent=function(p,b,w,g){p.stopPropagation(),p.clipboardData&&m(p.clipboardData.getData("text/plain"),b,w,g)},u.paste=m,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(p,b,w,g,l){h(p,b,w),l&&g.rightClickSelect(p),b.value=g.selectionText,b.select()}},7239:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const d=f(1505);u.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(m,h,p){this._css.set(m,h,p)}getCss(m,h){return this._css.get(m,h)}setColor(m,h,p){this._color.set(m,h,p)}getColor(m,h){return this._color.get(m,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(f,d,m,h){f.addEventListener(d,m,h);let p=!1;return{dispose:()=>{p||(p=!0,f.removeEventListener(d,m,h))}}}},3551:function(K,u,f){var d=this&&this.__decorate||function(c,a,o,_){var E,y=arguments.length,C=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(E=c[v])&&(C=(y<3?E(C):y>3?E(a,o,C):E(a,o))||C);return y>3&&C&&Object.defineProperty(a,o,C),C},m=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier=void 0;const h=f(3656),p=f(8460),b=f(844),w=f(2585),g=f(4725);let l=u.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(c,a,o,_,E){super(),this._element=c,this._mouseService=a,this._renderService=o,this._bufferService=_,this._linkProviderService=E,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,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.toDisposable)((()=>{var y;this._lastMouseEvent=void 0,(y=this._activeProviderReplies)==null||y.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!a)return;this._isMouseOut=!1;const o=c.composedPath();for(let _=0;_<o.length;_++){const E=o[_];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._handleHover(a),this._lastBufferCell=a)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,a){var _,E;this._activeProviderReplies&&a||((_=this._activeProviderReplies)==null||_.forEach((y=>{y==null||y.forEach((C=>{C.link.dispose&&C.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let o=!1;for(const[y,C]of this._linkProviderService.linkProviders.entries())a?(E=this._activeProviderReplies)!=null&&E.get(y)&&(o=this._checkLinkProviderResult(y,c,o)):C.provideLinks(c.y,(v=>{var O,N;if(this._isMouseOut)return;const D=v==null?void 0:v.map((I=>({link:I})));(O=this._activeProviderReplies)==null||O.set(y,D),o=this._checkLinkProviderResult(y,c,o),((N=this._activeProviderReplies)==null?void 0:N.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,a){const o=new Set;for(let _=0;_<a.size;_++){const E=a.get(_);if(E)for(let y=0;y<E.length;y++){const C=E[y],v=C.link.range.start.y<c?0:C.link.range.start.x,D=C.link.range.end.y>c?this._bufferService.cols:C.link.range.end.x;for(let O=v;O<=D;O++){if(o.has(O)){E.splice(y--,1);break}o.add(O)}}}}_checkLinkProviderResult(c,a,o){var y;if(!this._activeProviderReplies)return o;const _=this._activeProviderReplies.get(c);let E=!1;for(let C=0;C<c;C++)this._activeProviderReplies.has(C)&&!this._activeProviderReplies.get(C)||(E=!0);if(!E&&_){const C=_.find((v=>this._linkAtPosition(v.link,a)));C&&(o=!0,this._handleNewLink(C))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!o)for(let C=0;C<this._activeProviderReplies.size;C++){const v=(y=this._activeProviderReplies.get(C))==null?void 0:y.find((D=>this._linkAtPosition(D.link,a)));if(v){o=!0,this._handleNewLink(v);break}}return o}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);a&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,a){this._currentLink&&this._lastMouseEvent&&(!c||!a||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,b.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(c.link,a)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>{var o,_;return(_=(o=this._currentLink)==null?void 0:o.state)==null?void 0:_.decorations.pointerCursor},set:o=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==o&&(this._currentLink.state.decorations.pointerCursor=o,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",o))}},underline:{get:()=>{var o,_;return(_=(o=this._currentLink)==null?void 0:o.state)==null?void 0:_.decorations.underline},set:o=>{var _,E,y;(_=this._currentLink)!=null&&_.state&&((y=(E=this._currentLink)==null?void 0:E.state)==null?void 0:y.decorations.underline)!==o&&(this._currentLink.state.decorations.underline=o,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,o))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((o=>{if(!this._currentLink)return;const _=o.start===0?0:o.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+o.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(_,E),this._lastMouseEvent)){const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._askForLink(y,!1)}}))))}_linkHover(c,a,o){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(o,a.text)}_fireUnderlineEvent(c,a){const o=c.range,_=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(o.start.x-1,o.start.y-_-1,o.end.x,o.end.y-_-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(c,a,o){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(o,a.text)}_linkAtPosition(c,a){const o=c.range.start.y*this._bufferService.cols+c.range.start.x,_=c.range.end.y*this._bufferService.cols+c.range.end.x,E=a.y*this._bufferService.cols+a.x;return o<=E&&E<=_}_positionFromMouseEvent(c,a,o){const _=o.getCoords(c,a,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,a,o,_,E){return{x1:c,y1:a,x2:o,y2:_,cols:this._bufferService.cols,fg:E}}};u.Linkifier=l=d([m(1,g.IMouseService),m(2,g.IRenderService),m(3,w.IBufferService),m(4,g.ILinkProviderService)],l)},9042:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.tooMuchOutput=u.promptLabel=void 0,u.promptLabel="Terminal input",u.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(K,u,f){var d=this&&this.__decorate||function(g,l,c,a){var o,_=arguments.length,E=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,l,c,a);else for(var y=g.length-1;y>=0;y--)(o=g[y])&&(E=(_<3?o(E):_>3?o(l,c,E):o(l,c))||E);return _>3&&E&&Object.defineProperty(l,c,E),E},m=this&&this.__param||function(g,l){return function(c,a){l(c,a,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=f(511),p=f(2585);let b=u.OscLinkProvider=class{constructor(g,l,c){this._bufferService=g,this._optionsService=l,this._oscLinkService=c}provideLinks(g,l){var D;const c=this._bufferService.buffer.lines.get(g-1);if(!c)return void l(void 0);const a=[],o=this._optionsService.rawOptions.linkHandler,_=new h.CellData,E=c.getTrimmedLength();let y=-1,C=-1,v=!1;for(let O=0;O<E;O++)if(C!==-1||c.hasContent(O)){if(c.loadCell(O,_),_.hasExtendedAttrs()&&_.extended.urlId){if(C===-1){C=O,y=_.extended.urlId;continue}v=_.extended.urlId!==y}else C!==-1&&(v=!0);if(v||C!==-1&&O===E-1){const N=(D=this._oscLinkService.getLinkData(y))==null?void 0:D.uri;if(N){const I={start:{x:C+1,y:g},end:{x:O+(v||O!==E-1?0:1),y:g}};let H=!1;if(!(o!=null&&o.allowNonHttpProtocols))try{const J=new URL(N);["http:","https:"].includes(J.protocol)||(H=!0)}catch{H=!0}H||a.push({text:N,range:I,activate:(J,re)=>o?o.activate(J,re,I):w(0,re),hover:(J,re)=>{var U;return(U=o==null?void 0:o.hover)==null?void 0:U.call(o,J,re,I)},leave:(J,re)=>{var U;return(U=o==null?void 0:o.leave)==null?void 0:U.call(o,J,re,I)}})}v=!1,_.hasExtendedAttrs()&&_.extended.urlId?(C=O,y=_.extended.urlId):(C=-1,y=-1)}}l(a)}};function w(g,l){if(confirm(`Do you want to navigate to ${l}?
48
+ `+s.stack}}var qi=Object.prototype.hasOwnProperty,Ii=B.unstable_scheduleCallback,Pi=B.unstable_cancelCallback,us=B.unstable_shouldYield,ft=B.unstable_requestPaint,et=B.unstable_now,Mt=B.unstable_getCurrentPriorityLevel,_i=B.unstable_ImmediatePriority,hs=B.unstable_UserBlockingPriority,yt=B.unstable_NormalPriority,fs=B.unstable_LowPriority,It=B.unstable_IdlePriority,Yi=B.log,Pe=B.unstable_setDisableYieldValue,Gi=null,bt=null;function vi(e){if(typeof Yi=="function"&&Pe(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Gi,e)}catch{}}var Ct=Math.clz32?Math.clz32:$f,Qf=Math.log,Zf=Math.LN2;function $f(e){return e>>>=0,e===0?32:31-(Qf(e)/Zf|0)|0}var Kr=256,Xr=262144,Vr=4194304;function Ki(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var T=s&134217727;return T!==0?(s=T&~n,s!==0?r=Ki(s):(S&=T,S!==0?r=Ki(S):i||(i=T&~e,i!==0&&(r=Ki(i))))):(T=s&~n,T!==0?r=Ki(T):S!==0?r=Ki(S):i||(i=s&~e,i!==0&&(r=Ki(i)))),r===0?0:t!==0&&t!==r&&(t&n)===0&&(n=r&-r,i=t&-t,n>=i||n===32&&(i&4194048)!==0)?t:r}function Zs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Jf(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bo(){var e=Vr;return Vr<<=1,(Vr&62914560)===0&&(Vr=4194304),e}function ca(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function $s(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ed(e,t,i,s,r,n){var S=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var T=e.entanglements,N=e.expirationTimes,W=e.hiddenUpdates;for(i=S&~i;0<i;){var ne=31-Ct(i),ue=1<<ne;T[ne]=0,N[ne]=-1;var $=W[ne];if($!==null)for(W[ne]=null,ne=0;ne<$.length;ne++){var te=$[ne];te!==null&&(te.lane&=-536870913)}i&=~ue}s!==0&&ko(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(S&~t))}function ko(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Ct(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Ho(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Ct(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function zo(e,t){var i=t&-t;return i=(i&42)!==0?1:ua(i),(i&(e.suspendedLanes|t))!==0?0:i}function ua(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ha(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jo(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Ef(e.type))}function No(e,t){var i=J.p;try{return J.p=e,t()}finally{J.p=i}}var gi=Math.random().toString(36).slice(2),nt="__reactFiber$"+gi,dt="__reactProps$"+gi,ds="__reactContainer$"+gi,fa="__reactEvents$"+gi,td="__reactListeners$"+gi,id="__reactHandles$"+gi,Uo="__reactResources$"+gi,Js="__reactMarker$"+gi;function da(e){delete e[nt],delete e[dt],delete e[fa],delete e[td],delete e[id]}function _s(e){var t=e[nt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ds]||i[nt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=lf(e);e!==null;){if(i=e[nt])return i;e=lf(e)}return t}e=i,i=e.parentNode}return null}function vs(e){if(e=e[nt]||e[ds]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function er(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(H(33))}function gs(e){var t=e[Uo];return t||(t=e[Uo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[Js]=!0}var qo=new Set,Io={};function Xi(e,t){ps(e,t),ps(e+"Capture",t)}function ps(e,t){for(Io[e]=t,e=0;e<t.length;e++)qo.add(t[e])}var sd=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Po={},Yo={};function rd(e){return qi.call(Yo,e)?!0:qi.call(Po,e)?!1:sd.test(e)?Yo[e]=!0:(Po[e]=!0,!1)}function Wr(e,t,i){if(rd(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Qr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Wt(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Lt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Go(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nd(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(S){i=""+S,n.call(this,S)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _a(e){if(!e._valueTracker){var t=Go(e)?"checked":"value";e._valueTracker=nd(e,t,""+e[t])}}function Ko(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Go(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Zr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ad=/[\n"\\]/g;function Ot(e){return e.replace(ad,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function va(e,t,i,s,r,n,S,T){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),t!=null?S==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Lt(t)):e.value!==""+Lt(t)&&(e.value=""+Lt(t)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),t!=null?ga(e,S,Lt(t)):i!=null?ga(e,S,Lt(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Lt(T):e.removeAttribute("name")}function Xo(e,t,i,s,r,n,S,T){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(e.type=n),t!=null||i!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){_a(e);return}i=i!=null?""+Lt(i):"",t=t!=null?""+Lt(t):i,T||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=T?e.checked:!!s,e.defaultChecked=!!s,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),_a(e)}function ga(e,t,i){t==="number"&&Zr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ms(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Lt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Vo(e,t,i){if(t!=null&&(t=""+Lt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Lt(i):""}function Fo(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(H(92));if(re(s)){if(1<s.length)throw Error(H(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Lt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),_a(e)}function Ss(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var ld=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Wo(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||ld.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Qo(e,t,i){if(t!=null&&typeof t!="object")throw Error(H(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&Wo(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&Wo(e,n,t[n])}function pa(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var od=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cd=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $r(e){return cd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var ma=null;function Sa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ys=null,bs=null;function Zo(e){var t=vs(e);if(t&&(e=t.stateNode)){var i=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(va(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ot(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[dt]||null;if(!r)throw Error(H(90));va(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Ko(s)}break e;case"textarea":Vo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ms(e,!!i.multiple,t,!1)}}}var ya=!1;function $o(e,t,i){if(ya)return e(t,i);ya=!0;try{var s=e(t);return s}finally{if(ya=!1,(ys!==null||bs!==null)&&(qn(),ys&&(t=ys,e=bs,bs=ys=null,Zo(t),e)))for(t=0;t<e.length;t++)Zo(e[t])}}function tr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[dt]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(H(231,t,typeof i));return i}var Zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ba=!1;if(Zt)try{var ir={};Object.defineProperty(ir,"passive",{get:function(){ba=!0}}),window.addEventListener("test",ir,ir),window.removeEventListener("test",ir,ir)}catch{ba=!1}var pi=null,Ca=null,Jr=null;function Jo(){if(Jr)return Jr;var e,t=Ca,i=t.length,s,r="value"in pi?pi.value:pi.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var S=i-e;for(s=1;s<=S&&t[i-s]===r[n-s];s++);return Jr=r.slice(e,1<s?1-s:void 0)}function en(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 tn(){return!0}function ec(){return!1}function _t(e){function t(i,s,r,n,S){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=S,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(i=e[T],this[T]=i?i(n):n[T]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?tn:ec,this.isPropagationStopped=ec,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=tn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=tn)},persist:function(){},isPersistent:tn}),t}var Vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sn=_t(Vi),sr=h({},Vi,{view:0,detail:0}),ud=_t(sr),Ea,wa,rr,rn=h({},sr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Aa,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!==rr&&(rr&&e.type==="mousemove"?(Ea=e.screenX-rr.screenX,wa=e.screenY-rr.screenY):wa=Ea=0,rr=e),Ea)},movementY:function(e){return"movementY"in e?e.movementY:wa}}),tc=_t(rn),hd=h({},rn,{dataTransfer:0}),fd=_t(hd),dd=h({},sr,{relatedTarget:0}),xa=_t(dd),_d=h({},Vi,{animationName:0,elapsedTime:0,pseudoElement:0}),vd=_t(_d),gd=h({},Vi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pd=_t(gd),md=h({},Vi,{data:0}),ic=_t(md),Sd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yd={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"},bd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bd[e])?!!t[e]:!1}function Aa(){return Cd}var Ed=h({},sr,{key:function(e){if(e.key){var t=Sd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=en(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Aa,charCode:function(e){return e.type==="keypress"?en(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?en(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wd=_t(Ed),xd=h({},rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sc=_t(xd),Ad=h({},sr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Aa}),Dd=_t(Ad),Td=h({},Vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rd=_t(Td),Md=h({},rn,{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}),Ld=_t(Md),Od=h({},Vi,{newState:0,oldState:0}),Bd=_t(Od),kd=[9,13,27,32],Da=Zt&&"CompositionEvent"in window,nr=null;Zt&&"documentMode"in document&&(nr=document.documentMode);var Hd=Zt&&"TextEvent"in window&&!nr,rc=Zt&&(!Da||nr&&8<nr&&11>=nr),nc=" ",ac=!1;function lc(e,t){switch(e){case"keyup":return kd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function zd(e,t){switch(e){case"compositionend":return oc(t);case"keypress":return t.which!==32?null:(ac=!0,nc);case"textInput":return e=t.data,e===nc&&ac?null:e;default:return null}}function jd(e,t){if(Cs)return e==="compositionend"||!Da&&lc(e,t)?(e=Jo(),Jr=Ca=pi=null,Cs=!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 rc&&t.locale!=="ko"?null:t.data;default:return null}}var Nd={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 cc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Nd[e.type]:t==="textarea"}function uc(e,t,i,s){ys?bs?bs.push(s):bs=[s]:ys=s,t=Vn(t,"onChange"),0<t.length&&(i=new sn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var ar=null,lr=null;function Ud(e){Xh(e,0)}function nn(e){var t=er(e);if(Ko(t))return e}function hc(e,t){if(e==="change")return t}var fc=!1;if(Zt){var Ta;if(Zt){var Ra="oninput"in document;if(!Ra){var dc=document.createElement("div");dc.setAttribute("oninput","return;"),Ra=typeof dc.oninput=="function"}Ta=Ra}else Ta=!1;fc=Ta&&(!document.documentMode||9<document.documentMode)}function _c(){ar&&(ar.detachEvent("onpropertychange",vc),lr=ar=null)}function vc(e){if(e.propertyName==="value"&&nn(lr)){var t=[];uc(t,lr,e,Sa(e)),$o(Ud,t)}}function qd(e,t,i){e==="focusin"?(_c(),ar=t,lr=i,ar.attachEvent("onpropertychange",vc)):e==="focusout"&&_c()}function Id(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nn(lr)}function Pd(e,t){if(e==="click")return nn(t)}function Yd(e,t){if(e==="input"||e==="change")return nn(t)}function Gd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:Gd;function or(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!qi.call(t,r)||!Et(e[r],t[r]))return!1}return!0}function gc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pc(e,t){var i=gc(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=gc(i)}}function mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zr(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Zr(e.document)}return t}function Ma(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Kd=Zt&&"documentMode"in document&&11>=document.documentMode,Es=null,La=null,cr=null,Oa=!1;function yc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Oa||Es==null||Es!==Zr(s)||(s=Es,"selectionStart"in s&&Ma(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),cr&&or(cr,s)||(cr=s,s=Vn(La,"onSelect"),0<s.length&&(t=new sn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function Fi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ws={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},Ba={},bc={};Zt&&(bc=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function Wi(e){if(Ba[e])return Ba[e];if(!ws[e])return e;var t=ws[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in bc)return Ba[e]=t[i];return e}var Cc=Wi("animationend"),Ec=Wi("animationiteration"),wc=Wi("animationstart"),Xd=Wi("transitionrun"),Vd=Wi("transitionstart"),Fd=Wi("transitioncancel"),xc=Wi("transitionend"),Ac=new Map,ka="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ka.push("scrollEnd");function Pt(e,t){Ac.set(e,t),Xi(t,[e])}var an=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bt=[],xs=0,Ha=0;function ln(){for(var e=xs,t=Ha=xs=0;t<e;){var i=Bt[t];Bt[t++]=null;var s=Bt[t];Bt[t++]=null;var r=Bt[t];Bt[t++]=null;var n=Bt[t];if(Bt[t++]=null,s!==null&&r!==null){var S=s.pending;S===null?r.next=r:(r.next=S.next,S.next=r),s.pending=r}n!==0&&Dc(i,r,n)}}function on(e,t,i,s){Bt[xs++]=e,Bt[xs++]=t,Bt[xs++]=i,Bt[xs++]=s,Ha|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function za(e,t,i,s){return on(e,t,i,s),cn(e)}function Qi(e,t){return on(e,null,null,t),cn(e)}function Dc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,n=e.return;n!==null;)n.childLanes|=i,s=n.alternate,s!==null&&(s.childLanes|=i),n.tag===22&&(e=n.stateNode,e===null||e._visibility&1||(r=!0)),e=n,n=n.return;return e.tag===3?(n=e.stateNode,r&&t!==null&&(r=31-Ct(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function cn(e){if(50<Lr)throw Lr=0,Kl=null,Error(H(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var As={};function Wd(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wt(e,t,i,s){return new Wd(e,t,i,s)}function ja(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $t(e,t){var i=e.alternate;return i===null?(i=wt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Tc(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function un(e,t,i,s,r,n){var S=0;if(s=e,typeof e=="function")ja(e)&&(S=1);else if(typeof e=="string")S=ev(e,i,G.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case A:return e=wt(31,i,t,r),e.elementType=A,e.lanes=n,e;case g:return Zi(i.children,r,n,t);case l:S=8,r|=24;break;case c:return e=wt(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case C:return e=wt(13,i,t,r),e.elementType=C,e.lanes=n,e;case b:return e=wt(19,i,t,r),e.elementType=b,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o:S=10;break e;case a:S=9;break e;case _:S=11;break e;case E:S=14;break e;case v:S=16,s=null;break e}S=29,i=Error(H(130,e===null?"null":typeof e,"")),s=null}return t=wt(S,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function Zi(e,t,i,s){return e=wt(7,e,s,t),e.lanes=i,e}function Na(e,t,i){return e=wt(6,e,null,t),e.lanes=i,e}function Rc(e){var t=wt(18,null,null,0);return t.stateNode=e,t}function Ua(e,t,i){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Mc=new WeakMap;function kt(e,t){if(typeof e=="object"&&e!==null){var i=Mc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:di(t)},Mc.set(e,t),t)}return{value:e,source:t,stack:di(t)}}var Ds=[],Ts=0,hn=null,ur=0,Ht=[],zt=0,mi=null,Kt=1,Xt="";function Jt(e,t){Ds[Ts++]=ur,Ds[Ts++]=hn,hn=e,ur=t}function Lc(e,t,i){Ht[zt++]=Kt,Ht[zt++]=Xt,Ht[zt++]=mi,mi=e;var s=Kt;e=Xt;var r=32-Ct(s)-1;s&=~(1<<r),i+=1;var n=32-Ct(t)+r;if(30<n){var S=r-r%5;n=(s&(1<<S)-1).toString(32),s>>=S,r-=S,Kt=1<<32-Ct(t)+r|i<<r|s,Xt=n+e}else Kt=1<<n|i<<r|s,Xt=e}function qa(e){e.return!==null&&(Jt(e,1),Lc(e,1,0))}function Ia(e){for(;e===hn;)hn=Ds[--Ts],Ds[Ts]=null,ur=Ds[--Ts],Ds[Ts]=null;for(;e===mi;)mi=Ht[--zt],Ht[zt]=null,Xt=Ht[--zt],Ht[zt]=null,Kt=Ht[--zt],Ht[zt]=null}function Oc(e,t){Ht[zt++]=Kt,Ht[zt++]=Xt,Ht[zt++]=mi,Kt=t.id,Xt=t.overflow,mi=e}var at=null,Ye=null,Te=!1,Si=null,jt=!1,Pa=Error(H(519));function yi(e){var t=Error(H(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hr(kt(t,e)),Pa}function Bc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[nt]=e,t[dt]=s,i){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(i=0;i<Br.length;i++)xe(Br[i],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Xo(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Fo(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||Qh(t.textContent,i)?(s.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),s.onScroll!=null&&xe("scroll",t),s.onScrollEnd!=null&&xe("scrollend",t),s.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||yi(e,!0)}function kc(e){for(at=e.return;at;)switch(at.tag){case 5:case 31:case 13:jt=!1;return;case 27:case 3:jt=!0;return;default:at=at.return}}function Rs(e){if(e!==at)return!1;if(!Te)return kc(e),Te=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ao(e.type,e.memoizedProps)),i=!i),i&&Ye&&yi(e),kc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));Ye=af(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));Ye=af(e)}else t===27?(t=Ye,ki(e.type)?(e=ho,ho=null,Ye=e):Ye=t):Ye=at?Ut(e.stateNode.nextSibling):null;return!0}function $i(){Ye=at=null,Te=!1}function Ya(){var e=Si;return e!==null&&(mt===null?mt=e:mt.push.apply(mt,e),Si=null),e}function hr(e){Si===null?Si=[e]:Si.push(e)}var Ga=x(null),Ji=null,ei=null;function bi(e,t,i){V(Ga,t._currentValue),t._currentValue=i}function ti(e){e._currentValue=Ga.current,M(Ga)}function Ka(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Xa(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var S=r.child;n=n.firstContext;e:for(;n!==null;){var T=n;n=r;for(var N=0;N<t.length;N++)if(T.context===t[N]){n.lanes|=i,T=n.alternate,T!==null&&(T.lanes|=i),Ka(n.return,i,e),s||(S=null);break e}n=T.next}}else if(r.tag===18){if(S=r.return,S===null)throw Error(H(341));S.lanes|=i,n=S.alternate,n!==null&&(n.lanes|=i),Ka(S,i,e),S=null}else S=r.child;if(S!==null)S.return=r;else for(S=r;S!==null;){if(S===e){S=null;break}if(r=S.sibling,r!==null){r.return=S.return,S=r;break}S=S.return}r=S}}function Ms(e,t,i,s){e=null;for(var r=t,n=!1;r!==null;){if(!n){if((r.flags&524288)!==0)n=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var S=r.alternate;if(S===null)throw Error(H(387));if(S=S.memoizedProps,S!==null){var T=r.type;Et(r.pendingProps.value,S.value)||(e!==null?e.push(T):e=[T])}}else if(r===U.current){if(S=r.alternate,S===null)throw Error(H(387));S.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Nr):e=[Nr])}r=r.return}e!==null&&Xa(t,e,i,s),t.flags|=262144}function fn(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function es(e){Ji=e,ei=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function lt(e){return Hc(Ji,e)}function dn(e,t){return Ji===null&&es(e),Hc(e,t)}function Hc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ei===null){if(e===null)throw Error(H(308));ei=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ei=ei.next=t;return i}var Qd=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Zd=B.unstable_scheduleCallback,$d=B.unstable_NormalPriority,Qe={$$typeof:o,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Va(){return{controller:new Qd,data:new Map,refCount:0}}function fr(e){e.refCount--,e.refCount===0&&Zd($d,function(){e.controller.abort()})}var dr=null,Fa=0,Ls=0,Os=null;function Jd(e,t){if(dr===null){var i=dr=[];Fa=0,Ls=Zl(),Os={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Fa++,t.then(zc,zc),t}function zc(){if(--Fa===0&&dr!==null){Os!==null&&(Os.status="fulfilled");var e=dr;dr=null,Ls=0,Os=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function e_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var jc=q.S;q.S=function(e,t){yh=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Jd(e,t),jc!==null&&jc(e,t)};var ts=x(null);function Wa(){var e=ts.current;return e!==null?e:qe.pooledCache}function _n(e,t){t===null?V(ts,ts.current):V(ts,t.pool)}function Nc(){var e=Wa();return e===null?null:{parent:Qe._currentValue,pool:e}}var Bs=Error(H(460)),Qa=Error(H(474)),vn=Error(H(542)),gn={then:function(){}};function Uc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Qt,Qt),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pc(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(H(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pc(e),e}throw ss=t,Bs}}function is(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ss=i,Bs):i}}var ss=null;function Ic(){if(ss===null)throw Error(H(459));var e=ss;return ss=null,e}function Pc(e){if(e===Bs||e===vn)throw Error(H(483))}var ks=null,_r=0;function pn(e){var t=_r;return _r+=1,ks===null&&(ks=[]),qc(ks,e,t)}function vr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function mn(e,t){throw t.$$typeof===p?Error(H(525)):(e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Yc(e){function t(X,P){if(e){var F=X.deletions;F===null?(X.deletions=[P],X.flags|=16):F.push(P)}}function i(X,P){if(!e)return null;for(;P!==null;)t(X,P),P=P.sibling;return null}function s(X){for(var P=new Map;X!==null;)X.key!==null?P.set(X.key,X):P.set(X.index,X),X=X.sibling;return P}function r(X,P){return X=$t(X,P),X.index=0,X.sibling=null,X}function n(X,P,F){return X.index=F,e?(F=X.alternate,F!==null?(F=F.index,F<P?(X.flags|=67108866,P):F):(X.flags|=67108866,P)):(X.flags|=1048576,P)}function S(X){return e&&X.alternate===null&&(X.flags|=67108866),X}function T(X,P,F,oe){return P===null||P.tag!==6?(P=Na(F,X.mode,oe),P.return=X,P):(P=r(P,F),P.return=X,P)}function N(X,P,F,oe){var pe=F.type;return pe===g?ne(X,P,F.props.children,oe,F.key):P!==null&&(P.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===v&&is(pe)===P.type)?(P=r(P,F.props),vr(P,F),P.return=X,P):(P=un(F.type,F.key,F.props,null,X.mode,oe),vr(P,F),P.return=X,P)}function W(X,P,F,oe){return P===null||P.tag!==4||P.stateNode.containerInfo!==F.containerInfo||P.stateNode.implementation!==F.implementation?(P=Ua(F,X.mode,oe),P.return=X,P):(P=r(P,F.children||[]),P.return=X,P)}function ne(X,P,F,oe,pe){return P===null||P.tag!==7?(P=Zi(F,X.mode,oe,pe),P.return=X,P):(P=r(P,F),P.return=X,P)}function ue(X,P,F){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Na(""+P,X.mode,F),P.return=X,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case y:return F=un(P.type,P.key,P.props,null,X.mode,F),vr(F,P),F.return=X,F;case w:return P=Ua(P,X.mode,F),P.return=X,P;case v:return P=is(P),ue(X,P,F)}if(re(P)||I(P))return P=Zi(P,X.mode,F,null),P.return=X,P;if(typeof P.then=="function")return ue(X,pn(P),F);if(P.$$typeof===o)return ue(X,dn(X,P),F);mn(X,P)}return null}function $(X,P,F,oe){var pe=P!==null?P.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return pe!==null?null:T(X,P,""+F,oe);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case y:return F.key===pe?N(X,P,F,oe):null;case w:return F.key===pe?W(X,P,F,oe):null;case v:return F=is(F),$(X,P,F,oe)}if(re(F)||I(F))return pe!==null?null:ne(X,P,F,oe,null);if(typeof F.then=="function")return $(X,P,pn(F),oe);if(F.$$typeof===o)return $(X,P,dn(X,F),oe);mn(X,F)}return null}function te(X,P,F,oe,pe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return X=X.get(F)||null,T(P,X,""+oe,pe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case y:return X=X.get(oe.key===null?F:oe.key)||null,N(P,X,oe,pe);case w:return X=X.get(oe.key===null?F:oe.key)||null,W(P,X,oe,pe);case v:return oe=is(oe),te(X,P,F,oe,pe)}if(re(oe)||I(oe))return X=X.get(F)||null,ne(P,X,oe,pe,null);if(typeof oe.then=="function")return te(X,P,F,pn(oe),pe);if(oe.$$typeof===o)return te(X,P,F,dn(P,oe),pe);mn(P,oe)}return null}function ve(X,P,F,oe){for(var pe=null,Me=null,ge=P,Ce=P=0,De=null;ge!==null&&Ce<F.length;Ce++){ge.index>Ce?(De=ge,ge=null):De=ge.sibling;var Le=$(X,ge,F[Ce],oe);if(Le===null){ge===null&&(ge=De);break}e&&ge&&Le.alternate===null&&t(X,ge),P=n(Le,P,Ce),Me===null?pe=Le:Me.sibling=Le,Me=Le,ge=De}if(Ce===F.length)return i(X,ge),Te&&Jt(X,Ce),pe;if(ge===null){for(;Ce<F.length;Ce++)ge=ue(X,F[Ce],oe),ge!==null&&(P=n(ge,P,Ce),Me===null?pe=ge:Me.sibling=ge,Me=ge);return Te&&Jt(X,Ce),pe}for(ge=s(ge);Ce<F.length;Ce++)De=te(ge,X,Ce,F[Ce],oe),De!==null&&(e&&De.alternate!==null&&ge.delete(De.key===null?Ce:De.key),P=n(De,P,Ce),Me===null?pe=De:Me.sibling=De,Me=De);return e&&ge.forEach(function(Ui){return t(X,Ui)}),Te&&Jt(X,Ce),pe}function me(X,P,F,oe){if(F==null)throw Error(H(151));for(var pe=null,Me=null,ge=P,Ce=P=0,De=null,Le=F.next();ge!==null&&!Le.done;Ce++,Le=F.next()){ge.index>Ce?(De=ge,ge=null):De=ge.sibling;var Ui=$(X,ge,Le.value,oe);if(Ui===null){ge===null&&(ge=De);break}e&&ge&&Ui.alternate===null&&t(X,ge),P=n(Ui,P,Ce),Me===null?pe=Ui:Me.sibling=Ui,Me=Ui,ge=De}if(Le.done)return i(X,ge),Te&&Jt(X,Ce),pe;if(ge===null){for(;!Le.done;Ce++,Le=F.next())Le=ue(X,Le.value,oe),Le!==null&&(P=n(Le,P,Ce),Me===null?pe=Le:Me.sibling=Le,Me=Le);return Te&&Jt(X,Ce),pe}for(ge=s(ge);!Le.done;Ce++,Le=F.next())Le=te(ge,X,Ce,Le.value,oe),Le!==null&&(e&&Le.alternate!==null&&ge.delete(Le.key===null?Ce:Le.key),P=n(Le,P,Ce),Me===null?pe=Le:Me.sibling=Le,Me=Le);return e&&ge.forEach(function(hv){return t(X,hv)}),Te&&Jt(X,Ce),pe}function Ue(X,P,F,oe){if(typeof F=="object"&&F!==null&&F.type===g&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case y:e:{for(var pe=F.key;P!==null;){if(P.key===pe){if(pe=F.type,pe===g){if(P.tag===7){i(X,P.sibling),oe=r(P,F.props.children),oe.return=X,X=oe;break e}}else if(P.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===v&&is(pe)===P.type){i(X,P.sibling),oe=r(P,F.props),vr(oe,F),oe.return=X,X=oe;break e}i(X,P);break}else t(X,P);P=P.sibling}F.type===g?(oe=Zi(F.props.children,X.mode,oe,F.key),oe.return=X,X=oe):(oe=un(F.type,F.key,F.props,null,X.mode,oe),vr(oe,F),oe.return=X,X=oe)}return S(X);case w:e:{for(pe=F.key;P!==null;){if(P.key===pe)if(P.tag===4&&P.stateNode.containerInfo===F.containerInfo&&P.stateNode.implementation===F.implementation){i(X,P.sibling),oe=r(P,F.children||[]),oe.return=X,X=oe;break e}else{i(X,P);break}else t(X,P);P=P.sibling}oe=Ua(F,X.mode,oe),oe.return=X,X=oe}return S(X);case v:return F=is(F),Ue(X,P,F,oe)}if(re(F))return ve(X,P,F,oe);if(I(F)){if(pe=I(F),typeof pe!="function")throw Error(H(150));return F=pe.call(F),me(X,P,F,oe)}if(typeof F.then=="function")return Ue(X,P,pn(F),oe);if(F.$$typeof===o)return Ue(X,P,dn(X,F),oe);mn(X,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,P!==null&&P.tag===6?(i(X,P.sibling),oe=r(P,F),oe.return=X,X=oe):(i(X,P),oe=Na(F,X.mode,oe),oe.return=X,X=oe),S(X)):i(X,P)}return function(X,P,F,oe){try{_r=0;var pe=Ue(X,P,F,oe);return ks=null,pe}catch(ge){if(ge===Bs||ge===vn)throw ge;var Me=wt(29,ge,null,X.mode);return Me.lanes=oe,Me.return=X,Me}finally{}}}var rs=Yc(!0),Gc=Yc(!1),Ci=!1;function Za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $a(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Oe&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=cn(e),Dc(e,null,i),t}return on(e,s,t,i),cn(e)}function gr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Ho(e,i)}}function Ja(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,n=null;if(i=i.firstBaseUpdate,i!==null){do{var S={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=S:n=n.next=S,i=i.next}while(i!==null);n===null?r=n=t:n=n.next=t}else r=n=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:n,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var el=!1;function pr(){if(el){var e=Os;if(e!==null)throw e}}function mr(e,t,i,s){el=!1;var r=e.updateQueue;Ci=!1;var n=r.firstBaseUpdate,S=r.lastBaseUpdate,T=r.shared.pending;if(T!==null){r.shared.pending=null;var N=T,W=N.next;N.next=null,S===null?n=W:S.next=W,S=N;var ne=e.alternate;ne!==null&&(ne=ne.updateQueue,T=ne.lastBaseUpdate,T!==S&&(T===null?ne.firstBaseUpdate=W:T.next=W,ne.lastBaseUpdate=N))}if(n!==null){var ue=r.baseState;S=0,ne=W=N=null,T=n;do{var $=T.lane&-536870913,te=$!==T.lane;if(te?(Ae&$)===$:(s&$)===$){$!==0&&$===Ls&&(el=!0),ne!==null&&(ne=ne.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ve=e,me=T;$=t;var Ue=i;switch(me.tag){case 1:if(ve=me.payload,typeof ve=="function"){ue=ve.call(Ue,ue,$);break e}ue=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=me.payload,$=typeof ve=="function"?ve.call(Ue,ue,$):ve,$==null)break e;ue=h({},ue,$);break e;case 2:Ci=!0}}$=T.callback,$!==null&&(e.flags|=64,te&&(e.flags|=8192),te=r.callbacks,te===null?r.callbacks=[$]:te.push($))}else te={lane:$,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ne===null?(W=ne=te,N=ue):ne=ne.next=te,S|=$;if(T=T.next,T===null){if(T=r.shared.pending,T===null)break;te=T,T=te.next,te.next=null,r.lastBaseUpdate=te,r.shared.pending=null}}while(!0);ne===null&&(N=ue),r.baseState=N,r.firstBaseUpdate=W,r.lastBaseUpdate=ne,n===null&&(r.shared.lanes=0),Ri|=S,e.lanes=S,e.memoizedState=ue}}function Kc(e,t){if(typeof e!="function")throw Error(H(191,e));e.call(t)}function Xc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Kc(i[e],t)}var Hs=x(null),Sn=x(0);function Vc(e,t){e=ui,V(Sn,e),V(Hs,t),ui=e|t.baseLanes}function tl(){V(Sn,ui),V(Hs,Hs.current)}function il(){ui=Sn.current,M(Hs),M(Sn)}var xt=x(null),Nt=null;function xi(e){var t=e.alternate;V(Fe,Fe.current&1),V(xt,e),Nt===null&&(t===null||Hs.current!==null||t.memoizedState!==null)&&(Nt=e)}function sl(e){V(Fe,Fe.current),V(xt,e),Nt===null&&(Nt=e)}function Fc(e){e.tag===22?(V(Fe,Fe.current),V(xt,e),Nt===null&&(Nt=e)):Ai()}function Ai(){V(Fe,Fe.current),V(xt,xt.current)}function At(e){M(xt),Nt===e&&(Nt=null),M(Fe)}var Fe=x(0);function yn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||co(i)||uo(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ii=0,be=null,je=null,Ze=null,bn=!1,zs=!1,ns=!1,Cn=0,Sr=0,js=null,t_=0;function Xe(){throw Error(H(321))}function rl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Et(e[i],t[i]))return!1;return!0}function nl(e,t,i,s,r,n){return ii=n,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Lu:yl,ns=!1,n=i(s,r),ns=!1,zs&&(n=Qc(t,i,s,r)),Wc(e),n}function Wc(e){q.H=Cr;var t=je!==null&&je.next!==null;if(ii=0,Ze=je=be=null,bn=!1,Sr=0,js=null,t)throw Error(H(300));e===null||$e||(e=e.dependencies,e!==null&&fn(e)&&($e=!0))}function Qc(e,t,i,s){be=e;var r=0;do{if(zs&&(js=null),Sr=0,zs=!1,25<=r)throw Error(H(301));if(r+=1,Ze=je=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}q.H=Ou,n=t(i,s)}while(zs);return n}function i_(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?yr(t):t,e=e.useState()[0],(je!==null?je.memoizedState:null)!==e&&(be.flags|=1024),t}function al(){var e=Cn!==0;return Cn=0,e}function ll(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function ol(e){if(bn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bn=!1}ii=0,Ze=je=be=null,zs=!1,Sr=Cn=0,js=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?be.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function We(){if(je===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=Ze===null?be.memoizedState:Ze.next;if(t!==null)Ze=t,je=e;else{if(e===null)throw be.alternate===null?Error(H(467)):Error(H(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Ze===null?be.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function En(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yr(e){var t=Sr;return Sr+=1,js===null&&(js=[]),e=qc(js,e,t),t=be,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Lu:yl),e}function wn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yr(e);if(e.$$typeof===o)return lt(e)}throw Error(H(438,String(e)))}function cl(e){var t=null,i=be.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=be.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=En(),be.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=O;return t.index++,i}function si(e,t){return typeof t=="function"?t(e):t}function xn(e){var t=We();return ul(t,je,e)}function ul(e,t,i){var s=e.queue;if(s===null)throw Error(H(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var S=r.next;r.next=n.next,n.next=S}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var T=S=null,N=null,W=t,ne=!1;do{var ue=W.lane&-536870913;if(ue!==W.lane?(Ae&ue)===ue:(ii&ue)===ue){var $=W.revertLane;if($===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),ue===Ls&&(ne=!0);else if((ii&$)===$){W=W.next,$===Ls&&(ne=!0);continue}else ue={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},N===null?(T=N=ue,S=n):N=N.next=ue,be.lanes|=$,Ri|=$;ue=W.action,ns&&i(n,ue),n=W.hasEagerState?W.eagerState:i(n,ue)}else $={lane:ue,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},N===null?(T=N=$,S=n):N=N.next=$,be.lanes|=ue,Ri|=ue;W=W.next}while(W!==null&&W!==t);if(N===null?S=n:N.next=T,!Et(n,e.memoizedState)&&($e=!0,ne&&(i=Os,i!==null)))throw i;e.memoizedState=n,e.baseState=S,e.baseQueue=N,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function hl(e){var t=We(),i=t.queue;if(i===null)throw Error(H(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var S=r=r.next;do n=e(n,S.action),S=S.next;while(S!==r);Et(n,t.memoizedState)||($e=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function Zc(e,t,i){var s=be,r=We(),n=Te;if(n){if(i===void 0)throw Error(H(407));i=i()}else i=t();var S=!Et((je||r).memoizedState,i);if(S&&(r.memoizedState=i,$e=!0),r=r.queue,_l(eu.bind(null,s,r,e),[e]),r.getSnapshot!==t||S||Ze!==null&&Ze.memoizedState.tag&1){if(s.flags|=2048,Ns(9,{destroy:void 0},Jc.bind(null,s,r,i,t),null),qe===null)throw Error(H(349));n||(ii&127)!==0||$c(s,t,i)}return i}function $c(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=be.updateQueue,t===null?(t=En(),be.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Jc(e,t,i,s){t.value=i,t.getSnapshot=s,tu(t)&&iu(e)}function eu(e,t,i){return i(function(){tu(t)&&iu(e)})}function tu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Et(e,i)}catch{return!0}}function iu(e){var t=Qi(e,2);t!==null&&St(t,e,2)}function fl(e){var t=ht();if(typeof e=="function"){var i=e;if(e=i(),ns){vi(!0);try{i()}finally{vi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:e},t}function su(e,t,i,s){return e.baseState=i,ul(e,je,typeof s=="function"?s:si)}function s_(e,t,i,s,r){if(Tn(e))throw Error(H(485));if(e=t.action,e!==null){var n={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){n.listeners.push(S)}};q.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,ru(t,n)):(n.next=i.next,t.pending=i.next=n)}}function ru(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=q.T,S={};q.T=S;try{var T=i(r,s),N=q.S;N!==null&&N(S,T),nu(e,t,T)}catch(W){dl(e,t,W)}finally{n!==null&&S.types!==null&&(n.types=S.types),q.T=n}}else try{n=i(r,s),nu(e,t,n)}catch(W){dl(e,t,W)}}function nu(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){au(e,t,s)},function(s){return dl(e,t,s)}):au(e,t,i)}function au(e,t,i){t.status="fulfilled",t.value=i,lu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,ru(e,i)))}function dl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,lu(t),t=t.next;while(t!==s)}e.action=null}function lu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ou(e,t){return t}function cu(e,t){if(Te){var i=qe.formState;if(i!==null){e:{var s=be;if(Te){if(Ye){t:{for(var r=Ye,n=jt;r.nodeType!==8;){if(!n){r=null;break t}if(r=Ut(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){Ye=Ut(r.nextSibling),s=r.data==="F!";break e}}yi(s)}s=!1}s&&(t=i[0])}}return i=ht(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ou,lastRenderedState:t},i.queue=s,i=Tu.bind(null,be,s),s.dispatch=i,s=fl(!1),n=Sl.bind(null,be,!1,s.queue),s=ht(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=s_.bind(null,be,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function uu(e){var t=We();return hu(t,je,e)}function hu(e,t,i){if(t=ul(e,t,ou)[0],e=xn(si)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=yr(t)}catch(S){throw S===Bs?vn:S}else s=t;t=We();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(be.flags|=2048,Ns(9,{destroy:void 0},r_.bind(null,r,i),null)),[s,n,e]}function r_(e,t){e.action=t}function fu(e){var t=We(),i=je;if(i!==null)return hu(t,i,e);We(),t=t.memoizedState,i=We();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ns(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=be.updateQueue,t===null&&(t=En(),be.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function du(){return We().memoizedState}function An(e,t,i,s){var r=ht();be.flags|=e,r.memoizedState=Ns(1|t,{destroy:void 0},i,s===void 0?null:s)}function Dn(e,t,i,s){var r=We();s=s===void 0?null:s;var n=r.memoizedState.inst;je!==null&&s!==null&&rl(s,je.memoizedState.deps)?r.memoizedState=Ns(t,n,i,s):(be.flags|=e,r.memoizedState=Ns(1|t,n,i,s))}function _u(e,t){An(8390656,8,e,t)}function _l(e,t){Dn(2048,8,e,t)}function n_(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=En(),be.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function vu(e){var t=We().memoizedState;return n_({ref:t,nextImpl:e}),function(){if((Oe&2)!==0)throw Error(H(440));return t.impl.apply(void 0,arguments)}}function gu(e,t){return Dn(4,2,e,t)}function pu(e,t){return Dn(4,4,e,t)}function mu(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Su(e,t,i){i=i!=null?i.concat([e]):null,Dn(4,4,mu.bind(null,t,e),i)}function vl(){}function yu(e,t){var i=We();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&rl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function bu(e,t){var i=We();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&rl(t,s[1]))return s[0];if(s=e(),ns){vi(!0);try{e()}finally{vi(!1)}}return i.memoizedState=[s,t],s}function gl(e,t,i){return i===void 0||(ii&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Ch(),be.lanes|=e,Ri|=e,i)}function Cu(e,t,i,s){return Et(i,t)?i:Hs.current!==null?(e=gl(e,i,s),Et(e,t)||($e=!0),e):(ii&42)===0||(ii&1073741824)!==0&&(Ae&261930)===0?($e=!0,e.memoizedState=i):(e=Ch(),be.lanes|=e,Ri|=e,t)}function Eu(e,t,i,s,r){var n=J.p;J.p=n!==0&&8>n?n:8;var S=q.T,T={};q.T=T,Sl(e,!1,t,i);try{var N=r(),W=q.S;if(W!==null&&W(T,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var ne=e_(N,s);br(e,t,ne,Rt(e))}else br(e,t,s,Rt(e))}catch(ue){br(e,t,{then:function(){},status:"rejected",reason:ue},Rt())}finally{J.p=n,S!==null&&T.types!==null&&(S.types=T.types),q.T=S}}function a_(){}function pl(e,t,i,s){if(e.tag!==5)throw Error(H(476));var r=wu(e).queue;Eu(e,r,t,se,i===null?a_:function(){return xu(e),i(s)})}function wu(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:se},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xu(e){var t=wu(e);t.next===null&&(t=e.alternate.memoizedState),br(e,t.next.queue,{},Rt())}function ml(){return lt(Nr)}function Au(){return We().memoizedState}function Du(){return We().memoizedState}function l_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Rt();e=Ei(i);var s=wi(t,e,i);s!==null&&(St(s,t,i),gr(s,t,i)),t={cache:Va()},e.payload=t;return}t=t.return}}function o_(e,t,i){var s=Rt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tn(e)?Ru(t,i):(i=za(e,t,i,s),i!==null&&(St(i,e,s),Mu(i,t,s)))}function Tu(e,t,i){var s=Rt();br(e,t,i,s)}function br(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tn(e))Ru(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var S=t.lastRenderedState,T=n(S,i);if(r.hasEagerState=!0,r.eagerState=T,Et(T,S))return on(e,t,r,0),qe===null&&ln(),!1}catch{}finally{}if(i=za(e,t,r,s),i!==null)return St(i,e,s),Mu(i,t,s),!0}return!1}function Sl(e,t,i,s){if(s={lane:2,revertLane:Zl(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Tn(e)){if(t)throw Error(H(479))}else t=za(e,i,s,2),t!==null&&St(t,e,2)}function Tn(e){var t=e.alternate;return e===be||t!==null&&t===be}function Ru(e,t){zs=bn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Mu(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Ho(e,i)}}var Cr={readContext:lt,use:wn,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};Cr.useEffectEvent=Xe;var Lu={readContext:lt,use:wn,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:_u,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,An(4194308,4,mu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return An(4194308,4,e,t)},useInsertionEffect:function(e,t){An(4,2,e,t)},useMemo:function(e,t){var i=ht();t=t===void 0?null:t;var s=e();if(ns){vi(!0);try{e()}finally{vi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=ht();if(i!==void 0){var r=i(t);if(ns){vi(!0);try{i(t)}finally{vi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=o_.bind(null,be,e),[s.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=fl(e);var t=e.queue,i=Tu.bind(null,be,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:vl,useDeferredValue:function(e,t){var i=ht();return gl(i,e,t)},useTransition:function(){var e=fl(!1);return e=Eu.bind(null,be,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=be,r=ht();if(Te){if(i===void 0)throw Error(H(407));i=i()}else{if(i=t(),qe===null)throw Error(H(349));(Ae&127)!==0||$c(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,_u(eu.bind(null,s,n,e),[e]),s.flags|=2048,Ns(9,{destroy:void 0},Jc.bind(null,s,n,i,t),null),i},useId:function(){var e=ht(),t=qe.identifierPrefix;if(Te){var i=Xt,s=Kt;i=(s&~(1<<32-Ct(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Cn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=t_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ml,useFormState:cu,useActionState:cu,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Sl.bind(null,be,!0,i),i.dispatch=t,[e,t]},useMemoCache:cl,useCacheRefresh:function(){return ht().memoizedState=l_.bind(null,be)},useEffectEvent:function(e){var t=ht(),i={impl:e};return t.memoizedState=i,function(){if((Oe&2)!==0)throw Error(H(440));return i.impl.apply(void 0,arguments)}}},yl={readContext:lt,use:wn,useCallback:yu,useContext:lt,useEffect:_l,useImperativeHandle:Su,useInsertionEffect:gu,useLayoutEffect:pu,useMemo:bu,useReducer:xn,useRef:du,useState:function(){return xn(si)},useDebugValue:vl,useDeferredValue:function(e,t){var i=We();return Cu(i,je.memoizedState,e,t)},useTransition:function(){var e=xn(si)[0],t=We().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:Zc,useId:Au,useHostTransitionStatus:ml,useFormState:uu,useActionState:uu,useOptimistic:function(e,t){var i=We();return su(i,je,e,t)},useMemoCache:cl,useCacheRefresh:Du};yl.useEffectEvent=vu;var Ou={readContext:lt,use:wn,useCallback:yu,useContext:lt,useEffect:_l,useImperativeHandle:Su,useInsertionEffect:gu,useLayoutEffect:pu,useMemo:bu,useReducer:hl,useRef:du,useState:function(){return hl(si)},useDebugValue:vl,useDeferredValue:function(e,t){var i=We();return je===null?gl(i,e,t):Cu(i,je.memoizedState,e,t)},useTransition:function(){var e=hl(si)[0],t=We().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:Zc,useId:Au,useHostTransitionStatus:ml,useFormState:fu,useActionState:fu,useOptimistic:function(e,t){var i=We();return je!==null?su(i,je,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:cl,useCacheRefresh:Du};Ou.useEffectEvent=vu;function bl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:h({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Cl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Rt(),r=Ei(s);r.payload=t,i!=null&&(r.callback=i),t=wi(e,r,s),t!==null&&(St(t,e,s),gr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Rt(),r=Ei(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=wi(e,r,s),t!==null&&(St(t,e,s),gr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Rt(),s=Ei(i);s.tag=2,t!=null&&(s.callback=t),t=wi(e,s,i),t!==null&&(St(t,e,i),gr(t,e,i))}};function Bu(e,t,i,s,r,n,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,S):t.prototype&&t.prototype.isPureReactComponent?!or(i,s)||!or(r,n):!0}function ku(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&Cl.enqueueReplaceState(t,t.state,null)}function as(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=h({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Hu(e){an(e)}function zu(e){console.error(e)}function ju(e){an(e)}function Rn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Nu(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function El(e,t,i){return i=Ei(i),i.tag=3,i.payload={element:null},i.callback=function(){Rn(e,t)},i}function Uu(e){return e=Ei(e),e.tag=3,e}function qu(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var n=s.value;e.payload=function(){return r(n)},e.callback=function(){Nu(t,i,s)}}var S=i.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){Nu(t,i,s),typeof r!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})})}function c_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Ms(t,i,r,!0),i=xt.current,i!==null){switch(i.tag){case 31:case 13:return Nt===null?In():i.alternate===null&&Ve===0&&(Ve=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===gn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Fl(e,s,r)),!1;case 22:return i.flags|=65536,s===gn?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Fl(e,s,r)),!1}throw Error(H(435,i.tag))}return Fl(e,s,r),In(),!1}if(Te)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Pa&&(e=Error(H(422),{cause:s}),hr(kt(e,i)))):(s!==Pa&&(t=Error(H(423),{cause:s}),hr(kt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=kt(s,i),r=El(e.stateNode,s,r),Ja(e,r),Ve!==4&&(Ve=2)),!1;var n=Error(H(520),{cause:s});if(n=kt(n,i),Mr===null?Mr=[n]:Mr.push(n),Ve!==4&&(Ve=2),t===null)return!0;s=kt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=El(i.stateNode,s,e),Ja(i,e),!1;case 1:if(t=i.type,n=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(Mi===null||!Mi.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Uu(r),qu(r,e,i,s),Ja(i,r),!1}i=i.return}while(i!==null);return!1}var wl=Error(H(461)),$e=!1;function ot(e,t,i,s){t.child=e===null?Gc(t,null,i,s):rs(t,e.child,i,s)}function Iu(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var S={};for(var T in s)T!=="ref"&&(S[T]=s[T])}else S=s;return es(t),s=nl(e,t,i,S,n,r),T=al(),e!==null&&!$e?(ll(e,t,r),ri(e,t,r)):(Te&&T&&qa(t),t.flags|=1,ot(e,t,s,r),t.child)}function Pu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!ja(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Yu(e,t,n,s,r)):(e=un(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Ol(e,r)){var S=n.memoizedProps;if(i=i.compare,i=i!==null?i:or,i(S,s)&&e.ref===t.ref)return ri(e,t,r)}return t.flags|=1,e=$t(n,s),e.ref=t.ref,e.return=t,t.child=e}function Yu(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(or(n,s)&&e.ref===t.ref)if($e=!1,t.pendingProps=s=n,Ol(e,r))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,ri(e,t,r)}return xl(e,t,i,s,r)}function Gu(e,t,i,s){var r=s.children,n=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(n=n!==null?n.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~n}else s=0,t.child=null;return Ku(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_n(t,n!==null?n.cachePool:null),n!==null?Vc(t,n):tl(),Fc(t);else return s=t.lanes=536870912,Ku(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(_n(t,n.cachePool),Vc(t,n),Ai(),t.memoizedState=null):(e!==null&&_n(t,null),tl(),Ai());return ot(e,t,r,i),t.child}function Er(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ku(e,t,i,s,r){var n=Wa();return n=n===null?null:{parent:Qe._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&_n(t,null),tl(),Fc(t),e!==null&&Ms(e,t,s,!0),t.childLanes=r,null}function Mn(e,t){return t=On({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Xu(e,t,i){return rs(t,e.child,null,i),e=Mn(t,t.pendingProps),e.flags|=2,At(t),t.memoizedState=null,e}function u_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=Mn(t,s),t.lanes=536870912,Er(null,e);if(sl(t),(e=Ye)?(e=nf(e,jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi!==null?{id:Kt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},i=Rc(e),i.return=t,t.child=i,at=t,Ye=null)):e=null,e===null)throw yi(t);return t.lanes=536870912,null}return Mn(t,s)}var n=e.memoizedState;if(n!==null){var S=n.dehydrated;if(sl(t),r)if(t.flags&256)t.flags&=-257,t=Xu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(H(558));else if($e||Ms(e,t,i,!1),r=(i&e.childLanes)!==0,$e||r){if(s=qe,s!==null&&(S=zo(s,i),S!==0&&S!==n.retryLane))throw n.retryLane=S,Qi(e,S),St(s,e,S),wl;In(),t=Xu(e,t,i)}else e=n.treeContext,Ye=Ut(S.nextSibling),at=t,Te=!0,Si=null,jt=!1,e!==null&&Oc(t,e),t=Mn(t,s),t.flags|=4096;return t}return e=$t(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ln(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(H(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function xl(e,t,i,s,r){return es(t),i=nl(e,t,i,s,void 0,r),s=al(),e!==null&&!$e?(ll(e,t,r),ri(e,t,r)):(Te&&s&&qa(t),t.flags|=1,ot(e,t,i,r),t.child)}function Vu(e,t,i,s,r,n){return es(t),t.updateQueue=null,i=Qc(t,s,i,r),Wc(e),s=al(),e!==null&&!$e?(ll(e,t,n),ri(e,t,n)):(Te&&s&&qa(t),t.flags|=1,ot(e,t,i,n),t.child)}function Fu(e,t,i,s,r){if(es(t),t.stateNode===null){var n=As,S=i.contextType;typeof S=="object"&&S!==null&&(n=lt(S)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Cl,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},Za(t),S=i.contextType,n.context=typeof S=="object"&&S!==null?lt(S):As,n.state=t.memoizedState,S=i.getDerivedStateFromProps,typeof S=="function"&&(bl(t,i,S,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(S=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),S!==n.state&&Cl.enqueueReplaceState(n,n.state,null),mr(t,s,n,r),pr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var T=t.memoizedProps,N=as(i,T);n.props=N;var W=n.context,ne=i.contextType;S=As,typeof ne=="object"&&ne!==null&&(S=lt(ne));var ue=i.getDerivedStateFromProps;ne=typeof ue=="function"||typeof n.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,ne||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(T||W!==S)&&ku(t,n,s,S),Ci=!1;var $=t.memoizedState;n.state=$,mr(t,s,n,r),pr(),W=t.memoizedState,T||$!==W||Ci?(typeof ue=="function"&&(bl(t,i,ue,s),W=t.memoizedState),(N=Ci||Bu(t,i,N,s,$,W,S))?(ne||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(t.flags|=4194308)):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=W),n.props=s,n.state=W,n.context=S,s=N):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,$a(e,t),S=t.memoizedProps,ne=as(i,S),n.props=ne,ue=t.pendingProps,$=n.context,W=i.contextType,N=As,typeof W=="object"&&W!==null&&(N=lt(W)),T=i.getDerivedStateFromProps,(W=typeof T=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(S!==ue||$!==N)&&ku(t,n,s,N),Ci=!1,$=t.memoizedState,n.state=$,mr(t,s,n,r),pr();var te=t.memoizedState;S!==ue||$!==te||Ci||e!==null&&e.dependencies!==null&&fn(e.dependencies)?(typeof T=="function"&&(bl(t,i,T,s),te=t.memoizedState),(ne=Ci||Bu(t,i,ne,s,$,te,N)||e!==null&&e.dependencies!==null&&fn(e.dependencies))?(W||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,te,N),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,te,N)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||S===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=te),n.props=s,n.state=te,n.context=N,s=ne):(typeof n.componentDidUpdate!="function"||S===e.memoizedProps&&$===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&$===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,Ln(e,t),s=(t.flags&128)!==0,n||s?(n=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:n.render(),t.flags|=1,e!==null&&s?(t.child=rs(t,e.child,null,r),t.child=rs(t,null,i,r)):ot(e,t,i,r),t.memoizedState=n.state,e=t.child):e=ri(e,t,r),e}function Wu(e,t,i,s){return $i(),t.flags|=256,ot(e,t,i,s),t.child}var Al={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dl(e){return{baseLanes:e,cachePool:Nc()}}function Tl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Tt),e}function Qu(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,S;if((S=n)||(S=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),S&&(r=!0,t.flags&=-129),S=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?xi(t):Ai(),(e=Ye)?(e=nf(e,jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi!==null?{id:Kt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},i=Rc(e),i.return=t,t.child=i,at=t,Ye=null)):e=null,e===null)throw yi(t);return uo(e)?t.lanes=32:t.lanes=536870912,null}var T=s.children;return s=s.fallback,r?(Ai(),r=t.mode,T=On({mode:"hidden",children:T},r),s=Zi(s,r,i,null),T.return=t,s.return=t,T.sibling=s,t.child=T,s=t.child,s.memoizedState=Dl(i),s.childLanes=Tl(e,S,i),t.memoizedState=Al,Er(null,s)):(xi(t),Rl(t,T))}var N=e.memoizedState;if(N!==null&&(T=N.dehydrated,T!==null)){if(n)t.flags&256?(xi(t),t.flags&=-257,t=Ml(e,t,i)):t.memoizedState!==null?(Ai(),t.child=e.child,t.flags|=128,t=null):(Ai(),T=s.fallback,r=t.mode,s=On({mode:"visible",children:s.children},r),T=Zi(T,r,i,null),T.flags|=2,s.return=t,T.return=t,s.sibling=T,t.child=s,rs(t,e.child,null,i),s=t.child,s.memoizedState=Dl(i),s.childLanes=Tl(e,S,i),t.memoizedState=Al,t=Er(null,s));else if(xi(t),uo(T)){if(S=T.nextSibling&&T.nextSibling.dataset,S)var W=S.dgst;S=W,s=Error(H(419)),s.stack="",s.digest=S,hr({value:s,source:null,stack:null}),t=Ml(e,t,i)}else if($e||Ms(e,t,i,!1),S=(i&e.childLanes)!==0,$e||S){if(S=qe,S!==null&&(s=zo(S,i),s!==0&&s!==N.retryLane))throw N.retryLane=s,Qi(e,s),St(S,e,s),wl;co(T)||In(),t=Ml(e,t,i)}else co(T)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Ye=Ut(T.nextSibling),at=t,Te=!0,Si=null,jt=!1,e!==null&&Oc(t,e),t=Rl(t,s.children),t.flags|=4096);return t}return r?(Ai(),T=s.fallback,r=t.mode,N=e.child,W=N.sibling,s=$t(N,{mode:"hidden",children:s.children}),s.subtreeFlags=N.subtreeFlags&65011712,W!==null?T=$t(W,T):(T=Zi(T,r,i,null),T.flags|=2),T.return=t,s.return=t,s.sibling=T,t.child=s,Er(null,s),s=t.child,T=e.child.memoizedState,T===null?T=Dl(i):(r=T.cachePool,r!==null?(N=Qe._currentValue,r=r.parent!==N?{parent:N,pool:N}:r):r=Nc(),T={baseLanes:T.baseLanes|i,cachePool:r}),s.memoizedState=T,s.childLanes=Tl(e,S,i),t.memoizedState=Al,Er(e.child,s)):(xi(t),i=e.child,e=i.sibling,i=$t(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(S=t.deletions,S===null?(t.deletions=[e],t.flags|=16):S.push(e)),t.child=i,t.memoizedState=null,i)}function Rl(e,t){return t=On({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function On(e,t){return e=wt(22,e,null,t),e.lanes=0,e}function Ml(e,t,i){return rs(t,e.child,null,i),e=Rl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Zu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ka(e.return,t,i)}function Ll(e,t,i,s,r,n){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(S.isBackwards=t,S.rendering=null,S.renderingStartTime=0,S.last=s,S.tail=i,S.tailMode=r,S.treeForkCount=n)}function $u(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var S=Fe.current,T=(S&2)!==0;if(T?(S=S&1|2,t.flags|=128):S&=1,V(Fe,S),ot(e,t,s,i),s=Te?ur:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zu(e,i,t);else if(e.tag===19)Zu(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&yn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Ll(t,!1,r,i,n,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&yn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Ll(t,!0,i,null,n,s);break;case"together":Ll(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function ri(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ri|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ms(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,i=$t(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=$t(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ol(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&fn(e)))}function h_(e,t,i){switch(t.tag){case 3:R(t,t.stateNode.containerInfo),bi(t,Qe,e.memoizedState.cache),$i();break;case 27:case 5:ie(t);break;case 4:R(t,t.stateNode.containerInfo);break;case 10:bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,sl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(xi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Qu(e,t,i):(xi(t),e=ri(e,t,i),e!==null?e.sibling:null);xi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Ms(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return $u(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),V(Fe,Fe.current),s)break;return null;case 22:return t.lanes=0,Gu(e,t,i,t.pendingProps);case 24:bi(t,Qe,e.memoizedState.cache)}return ri(e,t,i)}function Ju(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!Ol(e,i)&&(t.flags&128)===0)return $e=!1,h_(e,t,i);$e=(e.flags&131072)!==0}else $e=!1,Te&&(t.flags&1048576)!==0&&Lc(t,ur,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=is(t.elementType),t.type=e,typeof e=="function")ja(e)?(s=as(e,s),t.tag=1,t=Fu(null,t,e,s,i)):(t.tag=0,t=xl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Iu(null,t,e,s,i);break e}else if(r===E){t.tag=14,t=Pu(null,t,e,s,i);break e}}throw t=Z(e)||e,Error(H(306,t,""))}}return t;case 0:return xl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=as(s,t.pendingProps),Fu(e,t,s,r,i);case 3:e:{if(R(t,t.stateNode.containerInfo),e===null)throw Error(H(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,$a(e,t),mr(t,s,null,i);var S=t.memoizedState;if(s=S.cache,bi(t,Qe,s),s!==n.cache&&Xa(t,[Qe],i,!0),pr(),s=S.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:S.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=Wu(e,t,s,i);break e}else if(s!==r){r=kt(Error(H(424)),t),hr(r),t=Wu(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ye=Ut(e.firstChild),at=t,Te=!0,Si=null,jt=!0,i=Gc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if($i(),s===r){t=ri(e,t,i);break e}ot(e,t,s,i)}t=t.child}return t;case 26:return Ln(e,t),e===null?(i=hf(t.type,null,t.pendingProps,null))?t.memoizedState=i:Te||(i=t.type,e=t.pendingProps,s=Fn(he.current).createElement(i),s[nt]=t,s[dt]=e,ct(s,i,e),st(s),t.stateNode=s):t.memoizedState=hf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Te&&(s=t.stateNode=of(t.type,t.pendingProps,he.current),at=t,jt=!0,r=Ye,ki(t.type)?(ho=r,Ye=Ut(s.firstChild)):Ye=r),ot(e,t,t.pendingProps.children,i),Ln(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=s=Ye)&&(s=I_(s,t.type,t.pendingProps,jt),s!==null?(t.stateNode=s,at=t,Ye=Ut(s.firstChild),jt=!1,r=!0):r=!1),r||yi(t)),ie(t),r=t.type,n=t.pendingProps,S=e!==null?e.memoizedProps:null,s=n.children,ao(r,n)?s=null:S!==null&&ao(r,S)&&(t.flags|=32),t.memoizedState!==null&&(r=nl(e,t,i_,null,null,i),Nr._currentValue=r),Ln(e,t),ot(e,t,s,i),t.child;case 6:return e===null&&Te&&((e=i=Ye)&&(i=P_(i,t.pendingProps,jt),i!==null?(t.stateNode=i,at=t,Ye=null,e=!0):e=!1),e||yi(t)),null;case 13:return Qu(e,t,i);case 4:return R(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=rs(t,null,s,i):ot(e,t,s,i),t.child;case 11:return Iu(e,t,t.type,t.pendingProps,i);case 7:return ot(e,t,t.pendingProps,i),t.child;case 8:return ot(e,t,t.pendingProps.children,i),t.child;case 12:return ot(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,bi(t,t.type,s.value),ot(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,es(t),r=lt(r),s=s(r),t.flags|=1,ot(e,t,s,i),t.child;case 14:return Pu(e,t,t.type,t.pendingProps,i);case 15:return Yu(e,t,t.type,t.pendingProps,i);case 19:return $u(e,t,i);case 31:return u_(e,t,i);case 22:return Gu(e,t,i,t.pendingProps);case 24:return es(t),s=lt(Qe),e===null?(r=Wa(),r===null&&(r=qe,n=Va(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},Za(t),bi(t,Qe,r)):((e.lanes&i)!==0&&($a(e,t),mr(t,null,null,i),pr()),r=e.memoizedState,n=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),bi(t,Qe,s)):(s=n.cache,bi(t,Qe,s),s!==r.cache&&Xa(t,[Qe],i,!0))),ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(H(156,t.tag))}function ni(e){e.flags|=4}function Bl(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Ah())e.flags|=8192;else throw ss=gn,Qa}else e.flags&=-16777217}function eh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!gf(t))if(Ah())e.flags|=8192;else throw ss=gn,Qa}function Bn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bo():536870912,e.lanes|=t,Ps|=t)}function wr(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function f_(e,t,i){var s=t.pendingProps;switch(Ia(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return Ge(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ti(Qe),le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Rs(t)?ni(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ya())),Ge(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(ni(t),n!==null?(Ge(t),eh(t,n)):(Ge(t),Bl(t,r,null,s,i))):n?n!==e.memoizedState?(ni(t),Ge(t),eh(t,n)):(Ge(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ni(t),Ge(t),Bl(t,r,e,s,i)),null;case 27:if(de(t),i=he.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(!s){if(t.stateNode===null)throw Error(H(166));return Ge(t),null}e=G.current,Rs(t)?Bc(t):(e=of(r,s,i),t.stateNode=e,ni(t))}return Ge(t),null;case 5:if(de(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(!s){if(t.stateNode===null)throw Error(H(166));return Ge(t),null}if(n=G.current,Rs(t))Bc(t);else{var S=Fn(he.current);switch(n){case 1:n=S.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=S.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=S.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?S.createElement("select",{is:s.is}):S.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?S.createElement(r,{is:s.is}):S.createElement(r)}}n[nt]=t,n[dt]=s;e:for(S=t.child;S!==null;){if(S.tag===5||S.tag===6)n.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===t)break e;for(;S.sibling===null;){if(S.return===null||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}t.stateNode=n;e:switch(ct(n,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&ni(t)}}return Ge(t),Bl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ni(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(H(166));if(e=he.current,Rs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=at,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[nt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Qh(e.nodeValue,i)),e||yi(t,!0)}else e=Fn(e).createTextNode(s),e[nt]=t,t.stateNode=e}return Ge(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Rs(t),i!==null){if(e===null){if(!s)throw Error(H(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(557));e[nt]=t}else $i(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),e=!1}else i=Ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(At(t),t):(At(t),null);if((t.flags&128)!==0)throw Error(H(558))}return Ge(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Rs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(H(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(H(317));r[nt]=t}else $i(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),r=!1}else r=Ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(At(t),t):(At(t),null)}return At(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Bn(t,t.updateQueue),Ge(t),null);case 4:return le(),e===null&&to(t.stateNode.containerInfo),Ge(t),null;case 10:return ti(t.type),Ge(t),null;case 19:if(M(Fe),s=t.memoizedState,s===null)return Ge(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)wr(s,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=yn(e),n!==null){for(t.flags|=128,wr(s,!1),e=n.updateQueue,t.updateQueue=e,Bn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Tc(i,e),i=i.sibling;return V(Fe,Fe.current&1|2),Te&&Jt(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&et()>Nn&&(t.flags|=128,r=!0,wr(s,!1),t.lanes=4194304)}else{if(!r)if(e=yn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Bn(t,e),wr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Te)return Ge(t),null}else 2*et()-s.renderingStartTime>Nn&&i!==536870912&&(t.flags|=128,r=!0,wr(s,!1),t.lanes=4194304);s.isBackwards?(n.sibling=t.child,t.child=n):(e=s.last,e!==null?e.sibling=n:t.child=n,s.last=n)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=et(),e.sibling=null,i=Fe.current,V(Fe,r?i&1|2:i&1),Te&&Jt(t,s.treeForkCount),e):(Ge(t),null);case 22:case 23:return At(t),il(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),i=t.updateQueue,i!==null&&Bn(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&M(ts),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ti(Qe),Ge(t),null;case 25:return null;case 30:return null}throw Error(H(156,t.tag))}function d_(e,t){switch(Ia(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ti(Qe),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(At(t),t.alternate===null)throw Error(H(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(At(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(Fe),null;case 4:return le(),null;case 10:return ti(t.type),null;case 22:case 23:return At(t),il(),e!==null&&M(ts),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ti(Qe),null;case 25:return null;default:return null}}function th(e,t){switch(Ia(t),t.tag){case 3:ti(Qe),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&At(t);break;case 13:At(t);break;case 19:M(Fe);break;case 10:ti(t.type);break;case 22:case 23:At(t),il(),e!==null&&M(ts);break;case 24:ti(Qe)}}function xr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var n=i.create,S=i.inst;s=n(),S.destroy=s}i=i.next}while(i!==r)}}catch(T){He(t,t.return,T)}}function Di(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var n=r.next;s=n;do{if((s.tag&e)===e){var S=s.inst,T=S.destroy;if(T!==void 0){S.destroy=void 0,r=t;var N=i,W=T;try{W()}catch(ne){He(r,N,ne)}}}s=s.next}while(s!==n)}}catch(ne){He(t,t.return,ne)}}function ih(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Xc(t,i)}catch(s){He(e,e.return,s)}}}function sh(e,t,i){i.props=as(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){He(e,t,s)}}function Ar(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){He(e,t,r)}}function Vt(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){He(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){He(e,t,r)}else i.current=null}function rh(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){He(e,e.return,r)}}function kl(e,t,i){try{var s=e.stateNode;H_(s,e.type,i,t),s[dt]=t}catch(r){He(e,e.return,r)}}function nh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ki(e.type)||e.tag===4}function Hl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ki(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zl(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Qt));else if(s!==4&&(s===27&&ki(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(zl(e,t,i),e=e.sibling;e!==null;)zl(e,t,i),e=e.sibling}function kn(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&ki(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(kn(e,t,i),e=e.sibling;e!==null;)kn(e,t,i),e=e.sibling}function ah(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ct(t,s,i),t[nt]=e,t[dt]=i}catch(n){He(e,e.return,n)}}var ai=!1,Je=!1,jl=!1,lh=typeof WeakSet=="function"?WeakSet:Set,rt=null;function __(e,t){if(e=e.containerInfo,ro=ta,e=Sc(e),Ma(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,n=s.focusNode;s=s.focusOffset;try{i.nodeType,n.nodeType}catch{i=null;break e}var S=0,T=-1,N=-1,W=0,ne=0,ue=e,$=null;t:for(;;){for(var te;ue!==i||r!==0&&ue.nodeType!==3||(T=S+r),ue!==n||s!==0&&ue.nodeType!==3||(N=S+s),ue.nodeType===3&&(S+=ue.nodeValue.length),(te=ue.firstChild)!==null;)$=ue,ue=te;for(;;){if(ue===e)break t;if($===i&&++W===r&&(T=S),$===n&&++ne===s&&(N=S),(te=ue.nextSibling)!==null)break;ue=$,$=ue.parentNode}ue=te}i=T===-1||N===-1?null:{start:T,end:N}}else i=null}i=i||{start:0,end:0}}else i=null;for(no={focusedElem:e,selectionRange:i},ta=!1,rt=t;rt!==null;)if(t=rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rt=e;else for(;rt!==null;){switch(t=rt,n=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&n!==null){e=void 0,i=t,r=n.memoizedProps,n=n.memoizedState,s=i.stateNode;try{var ve=as(i.type,r);e=s.getSnapshotBeforeUpdate(ve,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(me){He(i,i.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)oo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":oo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(H(163))}if(e=t.sibling,e!==null){e.return=t.return,rt=e;break}rt=t.return}}function oh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:oi(e,i),s&4&&xr(5,i);break;case 1:if(oi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(S){He(i,i.return,S)}else{var r=as(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(S){He(i,i.return,S)}}s&64&&ih(i),s&512&&Ar(i,i.return);break;case 3:if(oi(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Xc(e,t)}catch(S){He(i,i.return,S)}}break;case 27:t===null&&s&4&&ah(i);case 26:case 5:oi(e,i),t===null&&s&4&&rh(i),s&512&&Ar(i,i.return);break;case 12:oi(e,i);break;case 31:oi(e,i),s&4&&hh(e,i);break;case 13:oi(e,i),s&4&&fh(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=E_.bind(null,i),Y_(e,i))));break;case 22:if(s=i.memoizedState!==null||ai,!s){t=t!==null&&t.memoizedState!==null||Je,r=ai;var n=Je;ai=s,(Je=t)&&!n?ci(e,i,(i.subtreeFlags&8772)!==0):oi(e,i),ai=r,Je=n}break;case 30:break;default:oi(e,i)}}function ch(e){var t=e.alternate;t!==null&&(e.alternate=null,ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&da(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,vt=!1;function li(e,t,i){for(i=i.child;i!==null;)uh(e,t,i),i=i.sibling}function uh(e,t,i){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Gi,i)}catch{}switch(i.tag){case 26:Je||Vt(i,t),li(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Je||Vt(i,t);var s=Ke,r=vt;ki(i.type)&&(Ke=i.stateNode,vt=!1),li(e,t,i),Hr(i.stateNode),Ke=s,vt=r;break;case 5:Je||Vt(i,t);case 6:if(s=Ke,r=vt,Ke=null,li(e,t,i),Ke=s,vt=r,Ke!==null)if(vt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(i.stateNode)}catch(n){He(i,t,n)}else try{Ke.removeChild(i.stateNode)}catch(n){He(i,t,n)}break;case 18:Ke!==null&&(vt?(e=Ke,sf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Qs(e)):sf(Ke,i.stateNode));break;case 4:s=Ke,r=vt,Ke=i.stateNode.containerInfo,vt=!0,li(e,t,i),Ke=s,vt=r;break;case 0:case 11:case 14:case 15:Di(2,i,t),Je||Di(4,i,t),li(e,t,i);break;case 1:Je||(Vt(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&sh(i,t,s)),li(e,t,i);break;case 21:li(e,t,i);break;case 22:Je=(s=Je)||i.memoizedState!==null,li(e,t,i),Je=s;break;default:li(e,t,i)}}function hh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qs(e)}catch(i){He(t,t.return,i)}}}function fh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qs(e)}catch(i){He(t,t.return,i)}}function v_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new lh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new lh),t;default:throw Error(H(435,e.tag))}}function Hn(e,t){var i=v_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=w_.bind(null,e,s);s.then(r,r)}})}function gt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,S=t,T=S;e:for(;T!==null;){switch(T.tag){case 27:if(ki(T.type)){Ke=T.stateNode,vt=!1;break e}break;case 5:Ke=T.stateNode,vt=!1;break e;case 3:case 4:Ke=T.stateNode.containerInfo,vt=!0;break e}T=T.return}if(Ke===null)throw Error(H(160));uh(n,S,r),Ke=null,vt=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dh(t,e),t=t.sibling}var Yt=null;function dh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gt(t,e),pt(e),s&4&&(Di(3,e,e.return),xr(3,e),Di(5,e,e.return));break;case 1:gt(t,e),pt(e),s&512&&(Je||i===null||Vt(i,i.return)),s&64&&ai&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=Yt;if(gt(t,e),pt(e),s&512&&(Je||i===null||Vt(i,i.return)),s&4){var n=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":n=r.getElementsByTagName("title")[0],(!n||n[Js]||n[nt]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),ct(n,s,i),n[nt]=e,st(n),s=n;break e;case"link":var S=_f("link","href",r).get(s+(i.href||""));if(S){for(var T=0;T<S.length;T++)if(n=S[T],n.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&n.getAttribute("rel")===(i.rel==null?null:i.rel)&&n.getAttribute("title")===(i.title==null?null:i.title)&&n.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){S.splice(T,1);break t}}n=r.createElement(s),ct(n,s,i),r.head.appendChild(n);break;case"meta":if(S=_f("meta","content",r).get(s+(i.content||""))){for(T=0;T<S.length;T++)if(n=S[T],n.getAttribute("content")===(i.content==null?null:""+i.content)&&n.getAttribute("name")===(i.name==null?null:i.name)&&n.getAttribute("property")===(i.property==null?null:i.property)&&n.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&n.getAttribute("charset")===(i.charSet==null?null:i.charSet)){S.splice(T,1);break t}}n=r.createElement(s),ct(n,s,i),r.head.appendChild(n);break;default:throw Error(H(468,s))}n[nt]=e,st(n),s=n}e.stateNode=s}else vf(r,e.type,e.stateNode);else e.stateNode=df(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?vf(r,e.type,e.stateNode):df(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&kl(e,e.memoizedProps,i.memoizedProps)}break;case 27:gt(t,e),pt(e),s&512&&(Je||i===null||Vt(i,i.return)),i!==null&&s&4&&kl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(gt(t,e),pt(e),s&512&&(Je||i===null||Vt(i,i.return)),e.flags&32){r=e.stateNode;try{Ss(r,"")}catch(ve){He(e,e.return,ve)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,kl(e,r,i!==null?i.memoizedProps:r)),s&1024&&(jl=!0);break;case 6:if(gt(t,e),pt(e),s&4){if(e.stateNode===null)throw Error(H(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){He(e,e.return,ve)}}break;case 3:if(Zn=null,r=Yt,Yt=Wn(t.containerInfo),gt(t,e),Yt=r,pt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Qs(t.containerInfo)}catch(ve){He(e,e.return,ve)}jl&&(jl=!1,_h(e));break;case 4:s=Yt,Yt=Wn(e.stateNode.containerInfo),gt(t,e),pt(e),Yt=s;break;case 12:gt(t,e),pt(e);break;case 31:gt(t,e),pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 13:gt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(jn=et()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 22:r=e.memoizedState!==null;var N=i!==null&&i.memoizedState!==null,W=ai,ne=Je;if(ai=W||r,Je=ne||N,gt(t,e),Je=ne,ai=W,pt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||N||ai||Je||ls(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){N=i=t;try{if(n=N.stateNode,r)S=n.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{T=N.stateNode;var ue=N.memoizedProps.style,$=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;T.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(ve){He(N,N.return,ve)}}}else if(t.tag===6){if(i===null){N=t;try{N.stateNode.nodeValue=r?"":N.memoizedProps}catch(ve){He(N,N.return,ve)}}}else if(t.tag===18){if(i===null){N=t;try{var te=N.stateNode;r?rf(te,!0):rf(N.stateNode,!1)}catch(ve){He(N,N.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Hn(e,i))));break;case 19:gt(t,e),pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Hn(e,s)));break;case 30:break;case 21:break;default:gt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(nh(s)){i=s;break}s=s.return}if(i==null)throw Error(H(160));switch(i.tag){case 27:var r=i.stateNode,n=Hl(e);kn(e,n,r);break;case 5:var S=i.stateNode;i.flags&32&&(Ss(S,""),i.flags&=-33);var T=Hl(e);kn(e,T,S);break;case 3:case 4:var N=i.stateNode.containerInfo,W=Hl(e);zl(e,W,N);break;default:throw Error(H(161))}}catch(ne){He(e,e.return,ne)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _h(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_h(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function oi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)oh(e,t.alternate,t),t=t.sibling}function ls(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Di(4,t,t.return),ls(t);break;case 1:Vt(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&sh(t,t.return,i),ls(t);break;case 27:Hr(t.stateNode);case 26:case 5:Vt(t,t.return),ls(t);break;case 22:t.memoizedState===null&&ls(t);break;case 30:ls(t);break;default:ls(t)}e=e.sibling}}function ci(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,S=n.flags;switch(n.tag){case 0:case 11:case 15:ci(r,n,i),xr(4,n);break;case 1:if(ci(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(W){He(s,s.return,W)}if(s=n,r=s.updateQueue,r!==null){var T=s.stateNode;try{var N=r.shared.hiddenCallbacks;if(N!==null)for(r.shared.hiddenCallbacks=null,r=0;r<N.length;r++)Kc(N[r],T)}catch(W){He(s,s.return,W)}}i&&S&64&&ih(n),Ar(n,n.return);break;case 27:ah(n);case 26:case 5:ci(r,n,i),i&&s===null&&S&4&&rh(n),Ar(n,n.return);break;case 12:ci(r,n,i);break;case 31:ci(r,n,i),i&&S&4&&hh(r,n);break;case 13:ci(r,n,i),i&&S&4&&fh(r,n);break;case 22:n.memoizedState===null&&ci(r,n,i),Ar(n,n.return);break;case 30:break;default:ci(r,n,i)}t=t.sibling}}function Nl(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&fr(i))}function Ul(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fr(e))}function Gt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)vh(e,t,i,s),t=t.sibling}function vh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Gt(e,t,i,s),r&2048&&xr(9,t);break;case 1:Gt(e,t,i,s);break;case 3:Gt(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fr(e)));break;case 12:if(r&2048){Gt(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,S=n.id,T=n.onPostCommit;typeof T=="function"&&T(S,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){He(t,t.return,N)}}else Gt(e,t,i,s);break;case 31:Gt(e,t,i,s);break;case 13:Gt(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,S=t.alternate,t.memoizedState!==null?n._visibility&2?Gt(e,t,i,s):Dr(e,t):n._visibility&2?Gt(e,t,i,s):(n._visibility|=2,Us(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Nl(S,t);break;case 24:Gt(e,t,i,s),r&2048&&Ul(t.alternate,t);break;default:Gt(e,t,i,s)}}function Us(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,S=t,T=i,N=s,W=S.flags;switch(S.tag){case 0:case 11:case 15:Us(n,S,T,N,r),xr(8,S);break;case 23:break;case 22:var ne=S.stateNode;S.memoizedState!==null?ne._visibility&2?Us(n,S,T,N,r):Dr(n,S):(ne._visibility|=2,Us(n,S,T,N,r)),r&&W&2048&&Nl(S.alternate,S);break;case 24:Us(n,S,T,N,r),r&&W&2048&&Ul(S.alternate,S);break;default:Us(n,S,T,N,r)}t=t.sibling}}function Dr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:Dr(i,s),r&2048&&Nl(s.alternate,s);break;case 24:Dr(i,s),r&2048&&Ul(s.alternate,s);break;default:Dr(i,s)}t=t.sibling}}var Tr=8192;function qs(e,t,i){if(e.subtreeFlags&Tr)for(e=e.child;e!==null;)gh(e,t,i),e=e.sibling}function gh(e,t,i){switch(e.tag){case 26:qs(e,t,i),e.flags&Tr&&e.memoizedState!==null&&tv(i,Yt,e.memoizedState,e.memoizedProps);break;case 5:qs(e,t,i);break;case 3:case 4:var s=Yt;Yt=Wn(e.stateNode.containerInfo),qs(e,t,i),Yt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Tr,Tr=16777216,qs(e,t,i),Tr=s):qs(e,t,i));break;default:qs(e,t,i)}}function ph(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Rr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];rt=s,Sh(s,e)}ph(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)mh(e),e=e.sibling}function mh(e){switch(e.tag){case 0:case 11:case 15:Rr(e),e.flags&2048&&Di(9,e,e.return);break;case 3:Rr(e);break;case 12:Rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zn(e)):Rr(e);break;default:Rr(e)}}function zn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];rt=s,Sh(s,e)}ph(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Di(8,t,t.return),zn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,zn(t));break;default:zn(t)}e=e.sibling}}function Sh(e,t){for(;rt!==null;){var i=rt;switch(i.tag){case 0:case 11:case 15:Di(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:fr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,rt=s;else e:for(i=e;rt!==null;){s=rt;var r=s.sibling,n=s.return;if(ch(s),s===i){rt=null;break e}if(r!==null){r.return=n,rt=r;break e}rt=n}}}var g_={getCacheForType:function(e){var t=lt(Qe),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return lt(Qe).controller.signal}},p_=typeof WeakMap=="function"?WeakMap:Map,Oe=0,qe=null,we=null,Ae=0,ke=0,Dt=null,Ti=!1,Is=!1,ql=!1,ui=0,Ve=0,Ri=0,os=0,Il=0,Tt=0,Ps=0,Mr=null,mt=null,Pl=!1,jn=0,yh=0,Nn=1/0,Un=null,Mi=null,tt=0,Li=null,Ys=null,hi=0,Yl=0,Gl=null,bh=null,Lr=0,Kl=null;function Rt(){return(Oe&2)!==0&&Ae!==0?Ae&-Ae:q.T!==null?Zl():jo()}function Ch(){if(Tt===0)if((Ae&536870912)===0||Te){var e=Xr;Xr<<=1,(Xr&3932160)===0&&(Xr=262144),Tt=e}else Tt=536870912;return e=xt.current,e!==null&&(e.flags|=32),Tt}function St(e,t,i){(e===qe&&(ke===2||ke===9)||e.cancelPendingCommit!==null)&&(Gs(e,0),Oi(e,Ae,Tt,!1)),$s(e,i),((Oe&2)===0||e!==qe)&&(e===qe&&((Oe&2)===0&&(os|=i),Ve===4&&Oi(e,Ae,Tt,!1)),Ft(e))}function Eh(e,t,i){if((Oe&6)!==0)throw Error(H(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Zs(e,t),r=s?y_(e,t):Vl(e,t,!0),n=s;do{if(r===0){Is&&!s&&Oi(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!m_(i)){r=Vl(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){t=S;e:{var T=e;r=Mr;var N=T.current.memoizedState.isDehydrated;if(N&&(Gs(T,S).flags|=256),S=Vl(T,S,!1),S!==2){if(ql&&!N){T.errorRecoveryDisabledLanes|=n,os|=n,r=4;break e}n=mt,mt=r,n!==null&&(mt===null?mt=n:mt.push.apply(mt,n))}r=S}if(n=!1,r!==2)continue}}if(r===1){Gs(e,0),Oi(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(H(345));case 4:if((t&4194048)!==t)break;case 6:Oi(s,t,Tt,!Ti);break e;case 2:mt=null;break;case 3:case 5:break;default:throw Error(H(329))}if((t&62914560)===t&&(r=jn+300-et(),10<r)){if(Oi(s,t,Tt,!Ti),Fr(s,0,!0)!==0)break e;hi=t,s.timeoutHandle=ef(wh.bind(null,s,i,mt,Un,Pl,t,Tt,os,Ps,Ti,n,"Throttled",-0,0),r);break e}wh(s,i,mt,Un,Pl,t,Tt,os,Ps,Ti,n,null,-0,0)}}break}while(!0);Ft(e)}function wh(e,t,i,s,r,n,S,T,N,W,ne,ue,$,te){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},gh(t,n,ue);var ve=(n&62914560)===n?jn-et():(n&4194048)===n?yh-et():0;if(ve=iv(ue,ve),ve!==null){hi=n,e.cancelPendingCommit=ve(Oh.bind(null,e,t,n,i,s,r,S,T,N,ne,ue,null,$,te)),Oi(e,n,S,!W);return}}Oh(e,t,n,i,s,r,S,T,N)}function m_(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],n=r.getSnapshot;r=r.value;try{if(!Et(n(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Oi(e,t,i,s){t&=~Il,t&=~os,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-Ct(r),S=1<<n;s[n]=-1,r&=~S}i!==0&&ko(e,i,t)}function qn(){return(Oe&6)===0?(Or(0),!1):!0}function Xl(){if(we!==null){if(ke===0)var e=we.return;else e=we,ei=Ji=null,ol(e),ks=null,_r=0,e=we;for(;e!==null;)th(e.alternate,e),e=e.return;we=null}}function Gs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,N_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),hi=0,Xl(),qe=e,we=i=$t(e.current,null),Ae=t,ke=0,Dt=null,Ti=!1,Is=Zs(e,t),ql=!1,Ps=Tt=Il=os=Ri=Ve=0,mt=Mr=null,Pl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Ct(s),n=1<<r;t|=e[r],s&=~n}return ui=t,ln(),i}function xh(e,t){be=null,q.H=Cr,t===Bs||t===vn?(t=Ic(),ke=3):t===Qa?(t=Ic(),ke=4):ke=t===wl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Dt=t,we===null&&(Ve=1,Rn(e,kt(t,e.current)))}function Ah(){var e=xt.current;return e===null?!0:(Ae&4194048)===Ae?Nt===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===Nt:!1}function Dh(){var e=q.H;return q.H=Cr,e===null?Cr:e}function Th(){var e=q.A;return q.A=g_,e}function In(){Ve=4,Ti||(Ae&4194048)!==Ae&&xt.current!==null||(Is=!0),(Ri&134217727)===0&&(os&134217727)===0||qe===null||Oi(qe,Ae,Tt,!1)}function Vl(e,t,i){var s=Oe;Oe|=2;var r=Dh(),n=Th();(qe!==e||Ae!==t)&&(Un=null,Gs(e,t)),t=!1;var S=Ve;e:do try{if(ke!==0&&we!==null){var T=we,N=Dt;switch(ke){case 8:Xl(),S=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var W=ke;if(ke=0,Dt=null,Ks(e,T,N,W),i&&Is){S=0;break e}break;default:W=ke,ke=0,Dt=null,Ks(e,T,N,W)}}S_(),S=Ve;break}catch(ne){xh(e,ne)}while(!0);return t&&e.shellSuspendCounter++,ei=Ji=null,Oe=s,q.H=r,q.A=n,we===null&&(qe=null,Ae=0,ln()),S}function S_(){for(;we!==null;)Rh(we)}function y_(e,t){var i=Oe;Oe|=2;var s=Dh(),r=Th();qe!==e||Ae!==t?(Un=null,Nn=et()+500,Gs(e,t)):Is=Zs(e,t);e:do try{if(ke!==0&&we!==null){t=we;var n=Dt;t:switch(ke){case 1:ke=0,Dt=null,Ks(e,t,n,1);break;case 2:case 9:if(Uc(n)){ke=0,Dt=null,Mh(t);break}t=function(){ke!==2&&ke!==9||qe!==e||(ke=7),Ft(e)},n.then(t,t);break e;case 3:ke=7;break e;case 4:ke=5;break e;case 7:Uc(n)?(ke=0,Dt=null,Mh(t)):(ke=0,Dt=null,Ks(e,t,n,7));break;case 5:var S=null;switch(we.tag){case 26:S=we.memoizedState;case 5:case 27:var T=we;if(S?gf(S):T.stateNode.complete){ke=0,Dt=null;var N=T.sibling;if(N!==null)we=N;else{var W=T.return;W!==null?(we=W,Pn(W)):we=null}break t}}ke=0,Dt=null,Ks(e,t,n,5);break;case 6:ke=0,Dt=null,Ks(e,t,n,6);break;case 8:Xl(),Ve=6;break e;default:throw Error(H(462))}}b_();break}catch(ne){xh(e,ne)}while(!0);return ei=Ji=null,q.H=s,q.A=r,Oe=i,we!==null?0:(qe=null,Ae=0,ln(),Ve)}function b_(){for(;we!==null&&!us();)Rh(we)}function Rh(e){var t=Ju(e.alternate,e,ui);e.memoizedProps=e.pendingProps,t===null?Pn(e):we=t}function Mh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Vu(i,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=Vu(i,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:ol(t);default:th(i,t),t=we=Tc(t,ui),t=Ju(i,t,ui)}e.memoizedProps=e.pendingProps,t===null?Pn(e):we=t}function Ks(e,t,i,s){ei=Ji=null,ol(t),ks=null,_r=0;var r=t.return;try{if(c_(e,r,t,i,Ae)){Ve=1,Rn(e,kt(i,e.current)),we=null;return}}catch(n){if(r!==null)throw we=r,n;Ve=1,Rn(e,kt(i,e.current)),we=null;return}t.flags&32768?(Te||s===1?e=!0:Is||(Ae&536870912)!==0?e=!1:(Ti=e=!0,(s===2||s===9||s===3||s===6)&&(s=xt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Lh(t,e)):Pn(t)}function Pn(e){var t=e;do{if((t.flags&32768)!==0){Lh(t,Ti);return}e=t.return;var i=f_(t.alternate,t,ui);if(i!==null){we=i;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);Ve===0&&(Ve=5)}function Lh(e,t){do{var i=d_(e.alternate,e);if(i!==null){i.flags&=32767,we=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=i}while(e!==null);Ve=6,we=null}function Oh(e,t,i,s,r,n,S,T,N){e.cancelPendingCommit=null;do Yn();while(tt!==0);if((Oe&6)!==0)throw Error(H(327));if(t!==null){if(t===e.current)throw Error(H(177));if(n=t.lanes|t.childLanes,n|=Ha,ed(e,i,n,S,T,N),e===qe&&(we=qe=null,Ae=0),Ys=t,Li=e,hi=i,Yl=n,Gl=r,bh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,x_(yt,function(){return jh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,r=J.p,J.p=2,S=Oe,Oe|=4;try{__(e,t,i)}finally{Oe=S,J.p=r,q.T=s}}tt=1,Bh(),kh(),Hh()}}function Bh(){if(tt===1){tt=0;var e=Li,t=Ys,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=q.T,q.T=null;var s=J.p;J.p=2;var r=Oe;Oe|=4;try{dh(t,e);var n=no,S=Sc(e.containerInfo),T=n.focusedElem,N=n.selectionRange;if(S!==T&&T&&T.ownerDocument&&mc(T.ownerDocument.documentElement,T)){if(N!==null&&Ma(T)){var W=N.start,ne=N.end;if(ne===void 0&&(ne=W),"selectionStart"in T)T.selectionStart=W,T.selectionEnd=Math.min(ne,T.value.length);else{var ue=T.ownerDocument||document,$=ue&&ue.defaultView||window;if($.getSelection){var te=$.getSelection(),ve=T.textContent.length,me=Math.min(N.start,ve),Ue=N.end===void 0?me:Math.min(N.end,ve);!te.extend&&me>Ue&&(S=Ue,Ue=me,me=S);var X=pc(T,me),P=pc(T,Ue);if(X&&P&&(te.rangeCount!==1||te.anchorNode!==X.node||te.anchorOffset!==X.offset||te.focusNode!==P.node||te.focusOffset!==P.offset)){var F=ue.createRange();F.setStart(X.node,X.offset),te.removeAllRanges(),me>Ue?(te.addRange(F),te.extend(P.node,P.offset)):(F.setEnd(P.node,P.offset),te.addRange(F))}}}}for(ue=[],te=T;te=te.parentNode;)te.nodeType===1&&ue.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<ue.length;T++){var oe=ue[T];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ta=!!ro,no=ro=null}finally{Oe=r,J.p=s,q.T=i}}e.current=t,tt=2}}function kh(){if(tt===2){tt=0;var e=Li,t=Ys,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=q.T,q.T=null;var s=J.p;J.p=2;var r=Oe;Oe|=4;try{oh(e,t.alternate,t)}finally{Oe=r,J.p=s,q.T=i}}tt=3}}function Hh(){if(tt===4||tt===3){tt=0,ft();var e=Li,t=Ys,i=hi,s=bh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?tt=5:(tt=0,Ys=Li=null,zh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Mi=null),ha(i),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Gi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=q.T,r=J.p,J.p=2,q.T=null;try{for(var n=e.onRecoverableError,S=0;S<s.length;S++){var T=s[S];n(T.value,{componentStack:T.stack})}}finally{q.T=t,J.p=r}}(hi&3)!==0&&Yn(),Ft(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Kl?Lr++:(Lr=0,Kl=e):Lr=0,Or(0)}}function zh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fr(t)))}function Yn(){return Bh(),kh(),Hh(),jh()}function jh(){if(tt!==5)return!1;var e=Li,t=Yl;Yl=0;var i=ha(hi),s=q.T,r=J.p;try{J.p=32>i?32:i,q.T=null,i=Gl,Gl=null;var n=Li,S=hi;if(tt=0,Ys=Li=null,hi=0,(Oe&6)!==0)throw Error(H(331));var T=Oe;if(Oe|=4,mh(n.current),vh(n,n.current,S,i),Oe=T,Or(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Gi,n)}catch{}return!0}finally{J.p=r,q.T=s,zh(e,t)}}function Nh(e,t,i){t=kt(i,t),t=El(e.stateNode,t,2),e=wi(e,t,2),e!==null&&($s(e,2),Ft(e))}function He(e,t,i){if(e.tag===3)Nh(e,e,i);else for(;t!==null;){if(t.tag===3){Nh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Mi===null||!Mi.has(s))){e=kt(i,e),i=Uu(2),s=wi(t,i,2),s!==null&&(qu(i,s,t,e),$s(s,2),Ft(s));break}}t=t.return}}function Fl(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new p_;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(ql=!0,r.add(i),e=C_.bind(null,e,t,i),t.then(e,e))}function C_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,qe===e&&(Ae&i)===i&&(Ve===4||Ve===3&&(Ae&62914560)===Ae&&300>et()-jn?(Oe&2)===0&&Gs(e,0):Il|=i,Ps===Ae&&(Ps=0)),Ft(e)}function Uh(e,t){t===0&&(t=Bo()),e=Qi(e,t),e!==null&&($s(e,t),Ft(e))}function E_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Uh(e,i)}function w_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(H(314))}s!==null&&s.delete(t),Uh(e,i)}function x_(e,t){return Ii(e,t)}var Gn=null,Xs=null,Wl=!1,Kn=!1,Ql=!1,Bi=0;function Ft(e){e!==Xs&&e.next===null&&(Xs===null?Gn=Xs=e:Xs=Xs.next=e),Kn=!0,Wl||(Wl=!0,D_())}function Or(e,t){if(!Ql&&Kn){Ql=!0;do for(var i=!1,s=Gn;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var S=s.suspendedLanes,T=s.pingedLanes;n=(1<<31-Ct(42|e)+1)-1,n&=r&~(S&~T),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Yh(s,n))}else n=Ae,n=Fr(s,s===qe?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||Zs(s,n)||(i=!0,Yh(s,n));s=s.next}while(i);Ql=!1}}function A_(){qh()}function qh(){Kn=Wl=!1;var e=0;Bi!==0&&j_()&&(e=Bi);for(var t=et(),i=null,s=Gn;s!==null;){var r=s.next,n=Ih(s,t);n===0?(s.next=null,i===null?Gn=r:i.next=r,r===null&&(Xs=i)):(i=s,(e!==0||(n&3)!==0)&&(Kn=!0)),s=r}tt!==0&&tt!==5||Or(e),Bi!==0&&(Bi=0)}function Ih(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var S=31-Ct(n),T=1<<S,N=r[S];N===-1?((T&i)===0||(T&s)!==0)&&(r[S]=Jf(T,t)):N<=t&&(e.expiredLanes|=T),n&=~T}if(t=qe,i=Ae,i=Fr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(ke===2||ke===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Pi(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Zs(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Pi(s),ha(i)){case 2:case 8:i=hs;break;case 32:i=yt;break;case 268435456:i=It;break;default:i=yt}return s=Ph.bind(null,e),i=Ii(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Pi(s),e.callbackPriority=2,e.callbackNode=null,2}function Ph(e,t){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Yn()&&e.callbackNode!==i)return null;var s=Ae;return s=Fr(e,e===qe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Eh(e,s,t),Ih(e,et()),e.callbackNode!=null&&e.callbackNode===i?Ph.bind(null,e):null)}function Yh(e,t){if(Yn())return null;Eh(e,t,!0)}function D_(){U_(function(){(Oe&6)!==0?Ii(_i,A_):qh()})}function Zl(){if(Bi===0){var e=Ls;e===0&&(e=Kr,Kr<<=1,(Kr&261888)===0&&(Kr=256)),Bi=e}return Bi}function Gh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$r(""+e)}function Kh(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function T_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Gh((r[dt]||null).action),S=s.submitter;S&&(t=(t=S[dt]||null)?Gh(t.formAction):S.getAttribute("formAction"),t!==null&&(n=t,S=null));var T=new sn("action","action",null,s,r);e.push({event:T,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Bi!==0){var N=S?Kh(r,S):new FormData(r);pl(i,{pending:!0,data:N,method:r.method,action:n},null,N)}}else typeof n=="function"&&(T.preventDefault(),N=S?Kh(r,S):new FormData(r),pl(i,{pending:!0,data:N,method:r.method,action:n},n,N))},currentTarget:r}]})}}for(var $l=0;$l<ka.length;$l++){var Jl=ka[$l],R_=Jl.toLowerCase(),M_=Jl[0].toUpperCase()+Jl.slice(1);Pt(R_,"on"+M_)}Pt(Cc,"onAnimationEnd"),Pt(Ec,"onAnimationIteration"),Pt(wc,"onAnimationStart"),Pt("dblclick","onDoubleClick"),Pt("focusin","onFocus"),Pt("focusout","onBlur"),Pt(Xd,"onTransitionRun"),Pt(Vd,"onTransitionStart"),Pt(Fd,"onTransitionCancel"),Pt(xc,"onTransitionEnd"),ps("onMouseEnter",["mouseout","mouseover"]),ps("onMouseLeave",["mouseout","mouseover"]),ps("onPointerEnter",["pointerout","pointerover"]),ps("onPointerLeave",["pointerout","pointerover"]),Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Br="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(" "),L_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Br));function Xh(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var n=void 0;if(t)for(var S=s.length-1;0<=S;S--){var T=s[S],N=T.instance,W=T.currentTarget;if(T=T.listener,N!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=W;try{n(r)}catch(ne){an(ne)}r.currentTarget=null,n=N}else for(S=0;S<s.length;S++){if(T=s[S],N=T.instance,W=T.currentTarget,T=T.listener,N!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=W;try{n(r)}catch(ne){an(ne)}r.currentTarget=null,n=N}}}}function xe(e,t){var i=t[fa];i===void 0&&(i=t[fa]=new Set);var s=e+"__bubble";i.has(s)||(Vh(t,e,2,!1),i.add(s))}function eo(e,t,i){var s=0;t&&(s|=4),Vh(i,e,s,t)}var Xn="_reactListening"+Math.random().toString(36).slice(2);function to(e){if(!e[Xn]){e[Xn]=!0,qo.forEach(function(i){i!=="selectionchange"&&(L_.has(i)||eo(i,!1,e),eo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xn]||(t[Xn]=!0,eo("selectionchange",!1,t))}}function Vh(e,t,i,s){switch(Ef(t)){case 2:var r=nv;break;case 8:r=av;break;default:r=po}i=r.bind(null,t,i,e),r=void 0,!ba||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function io(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var S=s.tag;if(S===3||S===4){var T=s.stateNode.containerInfo;if(T===r)break;if(S===4)for(S=s.return;S!==null;){var N=S.tag;if((N===3||N===4)&&S.stateNode.containerInfo===r)return;S=S.return}for(;T!==null;){if(S=_s(T),S===null)return;if(N=S.tag,N===5||N===6||N===26||N===27){s=n=S;continue e}T=T.parentNode}}s=s.return}$o(function(){var W=n,ne=Sa(i),ue=[];e:{var $=Ac.get(e);if($!==void 0){var te=sn,ve=e;switch(e){case"keypress":if(en(i)===0)break e;case"keydown":case"keyup":te=wd;break;case"focusin":ve="focus",te=xa;break;case"focusout":ve="blur",te=xa;break;case"beforeblur":case"afterblur":te=xa;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=tc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=fd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=Dd;break;case Cc:case Ec:case wc:te=vd;break;case xc:te=Rd;break;case"scroll":case"scrollend":te=ud;break;case"wheel":te=Ld;break;case"copy":case"cut":case"paste":te=pd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=sc;break;case"toggle":case"beforetoggle":te=Bd}var me=(t&4)!==0,Ue=!me&&(e==="scroll"||e==="scrollend"),X=me?$!==null?$+"Capture":null:$;me=[];for(var P=W,F;P!==null;){var oe=P;if(F=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||F===null||X===null||(oe=tr(P,X),oe!=null&&me.push(kr(P,oe,F))),Ue)break;P=P.return}0<me.length&&($=new te($,ve,null,i,ne),ue.push({event:$,listeners:me}))}}if((t&7)===0){e:{if($=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",$&&i!==ma&&(ve=i.relatedTarget||i.fromElement)&&(_s(ve)||ve[ds]))break e;if((te||$)&&($=ne.window===ne?ne:($=ne.ownerDocument)?$.defaultView||$.parentWindow:window,te?(ve=i.relatedTarget||i.toElement,te=W,ve=ve?_s(ve):null,ve!==null&&(Ue=ce(ve),me=ve.tag,ve!==Ue||me!==5&&me!==27&&me!==6)&&(ve=null)):(te=null,ve=W),te!==ve)){if(me=tc,oe="onMouseLeave",X="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(me=sc,oe="onPointerLeave",X="onPointerEnter",P="pointer"),Ue=te==null?$:er(te),F=ve==null?$:er(ve),$=new me(oe,P+"leave",te,i,ne),$.target=Ue,$.relatedTarget=F,oe=null,_s(ne)===W&&(me=new me(X,P+"enter",ve,i,ne),me.target=F,me.relatedTarget=Ue,oe=me),Ue=oe,te&&ve)t:{for(me=O_,X=te,P=ve,F=0,oe=X;oe;oe=me(oe))F++;oe=0;for(var pe=P;pe;pe=me(pe))oe++;for(;0<F-oe;)X=me(X),F--;for(;0<oe-F;)P=me(P),oe--;for(;F--;){if(X===P||P!==null&&X===P.alternate){me=X;break t}X=me(X),P=me(P)}me=null}else me=null;te!==null&&Fh(ue,$,te,me,!1),ve!==null&&Ue!==null&&Fh(ue,Ue,ve,me,!0)}}e:{if($=W?er(W):window,te=$.nodeName&&$.nodeName.toLowerCase(),te==="select"||te==="input"&&$.type==="file")var Me=hc;else if(cc($))if(fc)Me=Yd;else{Me=Id;var ge=qd}else te=$.nodeName,!te||te.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?W&&pa(W.elementType)&&(Me=hc):Me=Pd;if(Me&&(Me=Me(e,W))){uc(ue,Me,i,ne);break e}ge&&ge(e,$,W),e==="focusout"&&W&&$.type==="number"&&W.memoizedProps.value!=null&&ga($,"number",$.value)}switch(ge=W?er(W):window,e){case"focusin":(cc(ge)||ge.contentEditable==="true")&&(Es=ge,La=W,cr=null);break;case"focusout":cr=La=Es=null;break;case"mousedown":Oa=!0;break;case"contextmenu":case"mouseup":case"dragend":Oa=!1,yc(ue,i,ne);break;case"selectionchange":if(Kd)break;case"keydown":case"keyup":yc(ue,i,ne)}var Ce;if(Da)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Cs?lc(e,i)&&(De="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(De="onCompositionStart");De&&(rc&&i.locale!=="ko"&&(Cs||De!=="onCompositionStart"?De==="onCompositionEnd"&&Cs&&(Ce=Jo()):(pi=ne,Ca="value"in pi?pi.value:pi.textContent,Cs=!0)),ge=Vn(W,De),0<ge.length&&(De=new ic(De,e,null,i,ne),ue.push({event:De,listeners:ge}),Ce?De.data=Ce:(Ce=oc(i),Ce!==null&&(De.data=Ce)))),(Ce=Hd?zd(e,i):jd(e,i))&&(De=Vn(W,"onBeforeInput"),0<De.length&&(ge=new ic("onBeforeInput","beforeinput",null,i,ne),ue.push({event:ge,listeners:De}),ge.data=Ce)),T_(ue,e,W,i,ne)}Xh(ue,t)})}function kr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Vn(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,n=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||n===null||(r=tr(e,i),r!=null&&s.unshift(kr(e,r,n)),r=tr(e,t),r!=null&&s.push(kr(e,r,n))),e.tag===3)return s;e=e.return}return[]}function O_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fh(e,t,i,s,r){for(var n=t._reactName,S=[];i!==null&&i!==s;){var T=i,N=T.alternate,W=T.stateNode;if(T=T.tag,N!==null&&N===s)break;T!==5&&T!==26&&T!==27||W===null||(N=W,r?(W=tr(i,n),W!=null&&S.unshift(kr(i,W,N))):r||(W=tr(i,n),W!=null&&S.push(kr(i,W,N)))),i=i.return}S.length!==0&&e.push({event:t,listeners:S})}var B_=/\r\n?/g,k_=/\u0000|\uFFFD/g;function Wh(e){return(typeof e=="string"?e:""+e).replace(B_,`
49
+ `).replace(k_,"")}function Qh(e,t){return t=Wh(t),Wh(e)===t}function Ne(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Ss(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Ss(e,""+s);break;case"className":Qr(e,"class",s);break;case"tabIndex":Qr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Qr(e,i,s);break;case"style":Qo(e,s,n);break;case"data":if(t!=="object"){Qr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=$r(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof n=="function"&&(i==="formAction"?(t!=="input"&&Ne(e,t,"name",r.name,r,null),Ne(e,t,"formEncType",r.formEncType,r,null),Ne(e,t,"formMethod",r.formMethod,r,null),Ne(e,t,"formTarget",r.formTarget,r,null)):(Ne(e,t,"encType",r.encType,r,null),Ne(e,t,"method",r.method,r,null),Ne(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=$r(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Qt);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(H(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(H(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=$r(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Wr(e,"popover",s);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Wr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=od.get(i)||i,Wr(e,i,s))}}function so(e,t,i,s,r,n){switch(i){case"style":Qo(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(H(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(H(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Ss(e,s):(typeof s=="number"||typeof s=="bigint")&&Ss(e,""+s);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Io.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),n=e[dt]||null,n=n!=null?n[i]:null,typeof n=="function"&&e.removeEventListener(t,n,r),typeof s=="function")){typeof n!="function"&&n!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Wr(e,i,s)}}}function ct(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var S=i[n];if(S!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(H(137,t));default:Ne(e,t,n,S,i,null)}}r&&Ne(e,t,"srcSet",i.srcSet,i,null),s&&Ne(e,t,"src",i.src,i,null);return;case"input":xe("invalid",e);var T=n=S=r=null,N=null,W=null;for(s in i)if(i.hasOwnProperty(s)){var ne=i[s];if(ne!=null)switch(s){case"name":r=ne;break;case"type":S=ne;break;case"checked":N=ne;break;case"defaultChecked":W=ne;break;case"value":n=ne;break;case"defaultValue":T=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(H(137,t));break;default:Ne(e,t,s,ne,i,null)}}Xo(e,n,T,N,W,S,r,!1);return;case"select":xe("invalid",e),s=S=n=null;for(r in i)if(i.hasOwnProperty(r)&&(T=i[r],T!=null))switch(r){case"value":n=T;break;case"defaultValue":S=T;break;case"multiple":s=T;default:Ne(e,t,r,T,i,null)}t=n,i=S,e.multiple=!!s,t!=null?ms(e,!!s,t,!1):i!=null&&ms(e,!!s,i,!0);return;case"textarea":xe("invalid",e),n=r=s=null;for(S in i)if(i.hasOwnProperty(S)&&(T=i[S],T!=null))switch(S){case"value":s=T;break;case"defaultValue":r=T;break;case"children":n=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(H(91));break;default:Ne(e,t,S,T,i,null)}Fo(e,s,r,n);return;case"option":for(N in i)if(i.hasOwnProperty(N)&&(s=i[N],s!=null))switch(N){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ne(e,t,N,s,i,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(s=0;s<Br.length;s++)xe(Br[s],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in i)if(i.hasOwnProperty(W)&&(s=i[W],s!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(H(137,t));default:Ne(e,t,W,s,i,null)}return;default:if(pa(t)){for(ne in i)i.hasOwnProperty(ne)&&(s=i[ne],s!==void 0&&so(e,t,ne,s,i,void 0));return}}for(T in i)i.hasOwnProperty(T)&&(s=i[T],s!=null&&Ne(e,t,T,s,i,null))}function H_(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,n=null,S=null,T=null,N=null,W=null,ne=null;for(te in i){var ue=i[te];if(i.hasOwnProperty(te)&&ue!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":N=ue;default:s.hasOwnProperty(te)||Ne(e,t,te,null,s,ue)}}for(var $ in s){var te=s[$];if(ue=i[$],s.hasOwnProperty($)&&(te!=null||ue!=null))switch($){case"type":n=te;break;case"name":r=te;break;case"checked":W=te;break;case"defaultChecked":ne=te;break;case"value":S=te;break;case"defaultValue":T=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(H(137,t));break;default:te!==ue&&Ne(e,t,$,te,s,ue)}}va(e,S,T,N,W,ne,n,r);return;case"select":te=S=T=$=null;for(n in i)if(N=i[n],i.hasOwnProperty(n)&&N!=null)switch(n){case"value":break;case"multiple":te=N;default:s.hasOwnProperty(n)||Ne(e,t,n,null,s,N)}for(r in s)if(n=s[r],N=i[r],s.hasOwnProperty(r)&&(n!=null||N!=null))switch(r){case"value":$=n;break;case"defaultValue":T=n;break;case"multiple":S=n;default:n!==N&&Ne(e,t,r,n,s,N)}t=T,i=S,s=te,$!=null?ms(e,!!i,$,!1):!!s!=!!i&&(t!=null?ms(e,!!i,t,!0):ms(e,!!i,i?[]:"",!1));return;case"textarea":te=$=null;for(T in i)if(r=i[T],i.hasOwnProperty(T)&&r!=null&&!s.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Ne(e,t,T,null,s,r)}for(S in s)if(r=s[S],n=i[S],s.hasOwnProperty(S)&&(r!=null||n!=null))switch(S){case"value":$=r;break;case"defaultValue":te=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(H(91));break;default:r!==n&&Ne(e,t,S,r,s,n)}Vo(e,$,te);return;case"option":for(var ve in i)if($=i[ve],i.hasOwnProperty(ve)&&$!=null&&!s.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:Ne(e,t,ve,null,s,$)}for(N in s)if($=s[N],te=i[N],s.hasOwnProperty(N)&&$!==te&&($!=null||te!=null))switch(N){case"selected":e.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:Ne(e,t,N,$,s,te)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in i)$=i[me],i.hasOwnProperty(me)&&$!=null&&!s.hasOwnProperty(me)&&Ne(e,t,me,null,s,$);for(W in s)if($=s[W],te=i[W],s.hasOwnProperty(W)&&$!==te&&($!=null||te!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(H(137,t));break;default:Ne(e,t,W,$,s,te)}return;default:if(pa(t)){for(var Ue in i)$=i[Ue],i.hasOwnProperty(Ue)&&$!==void 0&&!s.hasOwnProperty(Ue)&&so(e,t,Ue,void 0,s,$);for(ne in s)$=s[ne],te=i[ne],!s.hasOwnProperty(ne)||$===te||$===void 0&&te===void 0||so(e,t,ne,$,s,te);return}}for(var X in i)$=i[X],i.hasOwnProperty(X)&&$!=null&&!s.hasOwnProperty(X)&&Ne(e,t,X,null,s,$);for(ue in s)$=s[ue],te=i[ue],!s.hasOwnProperty(ue)||$===te||$==null&&te==null||Ne(e,t,ue,$,s,te)}function Zh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function z_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],n=r.transferSize,S=r.initiatorType,T=r.duration;if(n&&T&&Zh(S)){for(S=0,T=r.responseEnd,s+=1;s<i.length;s++){var N=i[s],W=N.startTime;if(W>T)break;var ne=N.transferSize,ue=N.initiatorType;ne&&Zh(ue)&&(N=N.responseEnd,S+=ne*(N<T?1:(T-W)/(N-W)))}if(--s,t+=8*(n+S)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ro=null,no=null;function Fn(e){return e.nodeType===9?e:e.ownerDocument}function $h(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ao(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var lo=null;function j_(){var e=window.event;return e&&e.type==="popstate"?e===lo?!1:(lo=e,!0):(lo=null,!1)}var ef=typeof setTimeout=="function"?setTimeout:void 0,N_=typeof clearTimeout=="function"?clearTimeout:void 0,tf=typeof Promise=="function"?Promise:void 0,U_=typeof queueMicrotask=="function"?queueMicrotask:typeof tf<"u"?function(e){return tf.resolve(null).then(e).catch(q_)}:ef;function q_(e){setTimeout(function(){throw e})}function ki(e){return e==="head"}function sf(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Qs(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Hr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Hr(i);for(var n=i.firstChild;n;){var S=n.nextSibling,T=n.nodeName;n[Js]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=S}}else i==="body"&&Hr(e.ownerDocument.body);i=r}while(i);Qs(t)}function rf(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function oo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":oo(i),da(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function I_(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Js])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(n=e.getAttribute("rel"),n==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(n!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(n=e.getAttribute("src"),(n!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&n&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var n=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===n)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function P_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ut(e.nextSibling),e===null))return null;return e}function nf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function co(e){return e.data==="$?"||e.data==="$~"}function uo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Y_(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ut(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ho=null;function af(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Ut(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function lf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function of(e,t,i){switch(t=Fn(i),e){case"html":if(e=t.documentElement,!e)throw Error(H(452));return e;case"head":if(e=t.head,!e)throw Error(H(453));return e;case"body":if(e=t.body,!e)throw Error(H(454));return e;default:throw Error(H(451))}}function Hr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);da(e)}var qt=new Map,cf=new Set;function Wn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fi=J.d;J.d={f:G_,r:K_,D:X_,C:V_,L:F_,m:W_,X:Z_,S:Q_,M:$_};function G_(){var e=fi.f(),t=qn();return e||t}function K_(e){var t=vs(e);t!==null&&t.tag===5&&t.type==="form"?xu(t):fi.r(e)}var Vs=typeof document>"u"?null:document;function uf(e,t,i){var s=Vs;if(s&&typeof t=="string"&&t){var r=Ot(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),cf.has(r)||(cf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),ct(t,"link",e),st(t),s.head.appendChild(t)))}}function X_(e){fi.D(e),uf("dns-prefetch",e,null)}function V_(e,t){fi.C(e,t),uf("preconnect",e,t)}function F_(e,t,i){fi.L(e,t,i);var s=Vs;if(s&&e&&t){var r='link[rel="preload"][as="'+Ot(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ot(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ot(i.imageSizes)+'"]')):r+='[href="'+Ot(e)+'"]';var n=r;switch(t){case"style":n=Fs(e);break;case"script":n=Ws(e)}qt.has(n)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),qt.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(zr(n))||t==="script"&&s.querySelector(jr(n))||(t=s.createElement("link"),ct(t,"link",e),st(t),s.head.appendChild(t)))}}function W_(e,t){fi.m(e,t);var i=Vs;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ot(s)+'"][href="'+Ot(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Ws(e)}if(!qt.has(n)&&(e=h({rel:"modulepreload",href:e},t),qt.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(jr(n)))return}s=i.createElement("link"),ct(s,"link",e),st(s),i.head.appendChild(s)}}}function Q_(e,t,i){fi.S(e,t,i);var s=Vs;if(s&&e){var r=gs(s).hoistableStyles,n=Fs(e);t=t||"default";var S=r.get(n);if(!S){var T={loading:0,preload:null};if(S=s.querySelector(zr(n)))T.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=qt.get(n))&&fo(e,i);var N=S=s.createElement("link");st(N),ct(N,"link",e),N._p=new Promise(function(W,ne){N.onload=W,N.onerror=ne}),N.addEventListener("load",function(){T.loading|=1}),N.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Qn(S,t,s)}S={type:"stylesheet",instance:S,count:1,state:T},r.set(n,S)}}}function Z_(e,t){fi.X(e,t);var i=Vs;if(i&&e){var s=gs(i).hoistableScripts,r=Ws(e),n=s.get(r);n||(n=i.querySelector(jr(r)),n||(e=h({src:e,async:!0},t),(t=qt.get(r))&&_o(e,t),n=i.createElement("script"),st(n),ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function $_(e,t){fi.M(e,t);var i=Vs;if(i&&e){var s=gs(i).hoistableScripts,r=Ws(e),n=s.get(r);n||(n=i.querySelector(jr(r)),n||(e=h({src:e,async:!0,type:"module"},t),(t=qt.get(r))&&_o(e,t),n=i.createElement("script"),st(n),ct(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function hf(e,t,i,s){var r=(r=he.current)?Wn(r):null;if(!r)throw Error(H(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Fs(i.href),i=gs(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Fs(i.href);var n=gs(r).hoistableStyles,S=n.get(e);if(S||(r=r.ownerDocument||r,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,S),(n=r.querySelector(zr(e)))&&!n._p&&(S.instance=n,S.state.loading=5),qt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},qt.set(e,i),n||J_(r,e,i,S.state))),t&&s===null)throw Error(H(528,""));return S}if(t&&s!==null)throw Error(H(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ws(i),i=gs(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(H(444,e))}}function Fs(e){return'href="'+Ot(e)+'"'}function zr(e){return'link[rel="stylesheet"]['+e+"]"}function ff(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function J_(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ct(t,"link",i),st(t),e.head.appendChild(t))}function Ws(e){return'[src="'+Ot(e)+'"]'}function jr(e){return"script[async]"+e}function df(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ot(i.href)+'"]');if(s)return t.instance=s,st(s),s;var r=h({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),ct(s,"style",r),Qn(s,i.precedence,e),t.instance=s;case"stylesheet":r=Fs(i.href);var n=e.querySelector(zr(r));if(n)return t.state.loading|=4,t.instance=n,st(n),n;s=ff(i),(r=qt.get(r))&&fo(s,r),n=(e.ownerDocument||e).createElement("link"),st(n);var S=n;return S._p=new Promise(function(T,N){S.onload=T,S.onerror=N}),ct(n,"link",s),t.state.loading|=4,Qn(n,i.precedence,e),t.instance=n;case"script":return n=Ws(i.src),(r=e.querySelector(jr(n)))?(t.instance=r,st(r),r):(s=i,(r=qt.get(n))&&(s=h({},i),_o(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),st(r),ct(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(H(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Qn(s,i.precedence,e));return t.instance}function Qn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,n=r,S=0;S<s.length;S++){var T=s[S];if(T.dataset.precedence===t)n=T;else if(n!==r)break}n?n.parentNode.insertBefore(e,n.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function fo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function _o(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zn=null;function _f(e,t,i){if(Zn===null){var s=new Map,r=Zn=new Map;r.set(i,s)}else r=Zn,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var n=i[r];if(!(n[Js]||n[nt]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var S=n.getAttribute(t)||"";S=e+S;var T=s.get(S);T?T.push(n):s.set(S,[n])}}return s}function vf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function ev(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function gf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tv(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=Fs(s.href),n=t.querySelector(zr(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=$n.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,st(n);return}n=t.ownerDocument||t,s=ff(s),(r=qt.get(r))&&fo(s,r),n=n.createElement("link"),st(n);var S=n;S._p=new Promise(function(T,N){S.onload=T,S.onerror=N}),ct(n,"link",s),i.instance=n}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=$n.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var vo=0;function iv(e,t){return e.stylesheets&&e.count===0&&ea(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ea(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&vo===0&&(vo=62500*z_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ea(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>vo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function $n(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ea(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Jn=null;function ea(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Jn=new Map,t.forEach(sv,e),Jn=null,$n.call(e))}function sv(e,t){if(!(t.state.loading&4)){var i=Jn.get(e);if(i)var s=i.get(null);else{i=new Map,Jn.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var S=r[n];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(i.set(S.dataset.precedence,S),s=S)}s&&i.set(null,s)}r=t.instance,S=r.getAttribute("data-precedence"),n=i.get(S)||s,n===s&&i.set(null,r),i.set(S,r),this.count++,s=$n.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),n?n.parentNode.insertBefore(r,n.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Nr={$$typeof:o,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function rv(e,t,i,s,r,n,S,T,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ca(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.hiddenUpdates=ca(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function pf(e,t,i,s,r,n,S,T,N,W,ne,ue){return e=new rv(e,t,i,S,N,W,ne,ue,T),t=1,n===!0&&(t|=24),n=wt(3,null,null,t),e.current=n,n.stateNode=e,t=Va(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},Za(n),e}function mf(e){return e?(e=As,e):As}function Sf(e,t,i,s,r,n){r=mf(r),s.context===null?s.context=r:s.pendingContext=r,s=Ei(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=wi(e,s,t),i!==null&&(St(i,e,t),gr(i,e,t))}function yf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function go(e,t){yf(e,t),(e=e.alternate)&&yf(e,t)}function bf(e){if(e.tag===13||e.tag===31){var t=Qi(e,67108864);t!==null&&St(t,e,67108864),go(e,67108864)}}function Cf(e){if(e.tag===13||e.tag===31){var t=Rt();t=ua(t);var i=Qi(e,t);i!==null&&St(i,e,t),go(e,t)}}var ta=!0;function nv(e,t,i,s){var r=q.T;q.T=null;var n=J.p;try{J.p=2,po(e,t,i,s)}finally{J.p=n,q.T=r}}function av(e,t,i,s){var r=q.T;q.T=null;var n=J.p;try{J.p=8,po(e,t,i,s)}finally{J.p=n,q.T=r}}function po(e,t,i,s){if(ta){var r=mo(s);if(r===null)io(e,t,s,ia,i),wf(e,s);else if(ov(r,e,t,i,s))s.stopPropagation();else if(wf(e,s),t&4&&-1<lv.indexOf(e)){for(;r!==null;){var n=vs(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var S=Ki(n.pendingLanes);if(S!==0){var T=n;for(T.pendingLanes|=2,T.entangledLanes|=2;S;){var N=1<<31-Ct(S);T.entanglements[1]|=N,S&=~N}Ft(n),(Oe&6)===0&&(Nn=et()+500,Or(0))}}break;case 31:case 13:T=Qi(n,2),T!==null&&St(T,n,2),qn(),go(n,2)}if(n=mo(s),n===null&&io(e,t,s,ia,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else io(e,t,s,null,i)}}function mo(e){return e=Sa(e),So(e)}var ia=null;function So(e){if(ia=null,e=_s(e),e!==null){var t=ce(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=K(t),e!==null)return e;e=null}else if(i===31){if(e=u(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ia=e,null}function Ef(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Mt()){case _i:return 2;case hs:return 8;case yt:case fs:return 32;case It:return 268435456;default:return 32}default:return 32}}var yo=!1,Hi=null,zi=null,ji=null,Ur=new Map,qr=new Map,Ni=[],lv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function wf(e,t){switch(e){case"focusin":case"focusout":Hi=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":Ur.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qr.delete(t.pointerId)}}function Ir(e,t,i,s,r,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:n,targetContainers:[r]},t!==null&&(t=vs(t),t!==null&&bf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function ov(e,t,i,s,r){switch(t){case"focusin":return Hi=Ir(Hi,e,t,i,s,r),!0;case"dragenter":return zi=Ir(zi,e,t,i,s,r),!0;case"mouseover":return ji=Ir(ji,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return Ur.set(n,Ir(Ur.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,qr.set(n,Ir(qr.get(n)||null,e,t,i,s,r)),!0}return!1}function xf(e){var t=_s(e.target);if(t!==null){var i=ce(t);if(i!==null){if(t=i.tag,t===13){if(t=K(i),t!==null){e.blockedOn=t,No(e.priority,function(){Cf(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,No(e.priority,function(){Cf(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=mo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ma=s,i.target.dispatchEvent(s),ma=null}else return t=vs(i),t!==null&&bf(t),e.blockedOn=i,!1;t.shift()}return!0}function Af(e,t,i){sa(e)&&i.delete(t)}function cv(){yo=!1,Hi!==null&&sa(Hi)&&(Hi=null),zi!==null&&sa(zi)&&(zi=null),ji!==null&&sa(ji)&&(ji=null),Ur.forEach(Af),qr.forEach(Af)}function ra(e,t){e.blockedOn===t&&(e.blockedOn=null,yo||(yo=!0,B.unstable_scheduleCallback(B.unstable_NormalPriority,cv)))}var na=null;function Df(e){na!==e&&(na=e,B.unstable_scheduleCallback(B.unstable_NormalPriority,function(){na===e&&(na=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(So(s||i)===null)continue;break}var n=vs(i);n!==null&&(e.splice(t,3),t-=3,pl(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Qs(e){function t(N){return ra(N,e)}Hi!==null&&ra(Hi,e),zi!==null&&ra(zi,e),ji!==null&&ra(ji,e),Ur.forEach(t),qr.forEach(t);for(var i=0;i<Ni.length;i++){var s=Ni[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Ni.length&&(i=Ni[0],i.blockedOn===null);)xf(i),i.blockedOn===null&&Ni.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],n=i[s+1],S=r[dt]||null;if(typeof n=="function")S||Df(i);else if(S){var T=null;if(n&&n.hasAttribute("formAction")){if(r=n,S=n[dt]||null)T=S.formAction;else if(So(r)!==null)continue}else T=S.action;typeof T=="function"?i[s+1]=T:(i.splice(s,3),s-=3),Df(i)}}}function Tf(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(S){return r=S})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function bo(e){this._internalRoot=e}aa.prototype.render=bo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));var i=t.current,s=Rt();Sf(i,s,e,t,null,null)},aa.prototype.unmount=bo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sf(e.current,2,null,e,null,null),qn(),t[ds]=null}};function aa(e){this._internalRoot=e}aa.prototype.unstable_scheduleHydration=function(e){if(e){var t=jo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ni.length&&t!==0&&t<Ni[i].priority;i++);Ni.splice(i,0,e),i===0&&xf(e)}};var Rf=Y.version;if(Rf!=="19.2.6")throw Error(H(527,Rf,"19.2.6"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=d(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var uv={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var la=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!la.isDisabled&&la.supportsFiber)try{Gi=la.inject(uv),bt=la}catch{}}return Yr.createRoot=function(e,t){if(!ae(e))throw Error(H(299));var i=!1,s="",r=Hu,n=zu,S=ju;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(S=t.onRecoverableError)),t=pf(e,1,!1,null,null,i,s,null,r,n,S,Tf),e[ds]=t.current,to(e),new bo(t)},Yr.hydrateRoot=function(e,t,i){if(!ae(e))throw Error(H(299));var s=!1,r="",n=Hu,S=zu,T=ju,N=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError),i.formState!==void 0&&(N=i.formState)),t=pf(e,1,!0,t,i??null,s,r,N,n,S,T,Tf),t.context=mf(null),i=t.current,s=Rt(),s=ua(s),r=Ei(s),r.callback=null,wi(i,r,s),i=s,t.current.lanes=i,$s(t,i),Ft(t),e[ds]=t.current,to(e),new aa(t)},Yr.version="19.2.6",Yr}var qf;function Cv(){if(qf)return wo.exports;qf=1;function B(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(B)}catch(Y){console.error(Y)}}return B(),wo.exports=bv(),wo.exports}var Ev=Cv();function wv({sidebar:B,children:Y}){const[ee,H]=_e.useState(!1);return L.jsxs("div",{className:ee?"app-shell is-sidebar-collapsed":"app-shell",children:[L.jsxs("aside",{className:"app-sidebar",children:[L.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":ee?"Expand sidebar":"Collapse sidebar",title:ee?"Expand sidebar":"Collapse sidebar",onClick:()=>H(ae=>!ae)}),L.jsx("div",{className:"sidebar-content",children:B})]}),L.jsx("main",{className:"app-main",children:Y})]})}function xv(B,Y){return B.find(ee=>ee.taskSlug===Y)??B[0]??null}const Re={getCurrentProject(){return ze("/api/projects/current")},getRecentRepositoryPaths(){return ze("/api/projects/recent")},connectProject(B){return ze("/api/projects/connect",{method:"POST",body:JSON.stringify(B)})},listTasks(){return ze("/api/tasks")},createTask(B){return ze("/api/tasks",{method:"POST",body:JSON.stringify(B)})},cleanupTask(B,Y={}){return ze(`/api/tasks/${encodeURIComponent(B)}/cleanup`,{method:"POST",body:JSON.stringify(Y)})},getHarnessStatus(){return ze("/api/projects/harness")},applyHarness(){return ze("/api/projects/harness/apply",{method:"POST"})},getTaskStatus(B){return ze(`/api/tasks/${encodeURIComponent(B)}/status`)},listSessions(B){return ze(`/api/tasks/${encodeURIComponent(B)}/sessions`)},startRoleSession(B,Y,ee={}){return ze(`/api/tasks/${encodeURIComponent(B)}/sessions/${Y}/start`,{method:"POST",body:JSON.stringify(ee)})},stopRoleSession(B,Y){return ze(`/api/tasks/${encodeURIComponent(B)}/sessions/${Y}/stop`,{method:"POST"})},restartRoleSession(B,Y,ee={}){return ze(`/api/tasks/${encodeURIComponent(B)}/sessions/${Y}/restart`,{method:"POST",body:JSON.stringify(ee)})},resumeRoleSession(B,Y,ee={}){return ze(`/api/tasks/${encodeURIComponent(B)}/sessions/${Y}/resume`,{method:"POST",body:JSON.stringify(ee)})},dispatchRoleCommand(B,Y){return ze(`/api/tasks/${encodeURIComponent(B)}/sessions/${Y}/dispatch`,{method:"POST"})},listMessages(B){return ze(`/api/tasks/${encodeURIComponent(B)}/messages`)},sendRoleMessage(B,Y){return ze(`/api/tasks/${encodeURIComponent(B)}/messages`,{method:"POST",body:JSON.stringify(Y)})},stageMessage(B,Y){return ze(`/api/tasks/${encodeURIComponent(B)}/messages/${Y}/stage`,{method:"POST"})},rejectMessage(B,Y){return ze(`/api/tasks/${encodeURIComponent(B)}/messages/${Y}/reject`,{method:"POST"})},getOrchestrationState(B){return ze(`/api/tasks/${encodeURIComponent(B)}/orchestration`)},updateOrchestrationState(B,Y){return ze(`/api/tasks/${encodeURIComponent(B)}/orchestration`,{method:"PUT",body:JSON.stringify(Y)})},getTranslationSettings(){return ze("/api/translation/settings")},updateTranslationSettings(B){return ze("/api/translation/settings",{method:"PUT",body:JSON.stringify(B)})},getTranslationPrompts(){return ze("/api/translation/prompts")},testTranslationProvider(){return ze("/api/translation/test",{method:"POST"})},translateUserInput(B,Y,ee){return ze(`/api/tasks/${encodeURIComponent(B)}/sessions/${Y}/translation/input`,{method:"POST",body:JSON.stringify(ee)})},sendTranslatedInput(B,Y,ee){return ze(`/api/tasks/${encodeURIComponent(B)}/sessions/${Y}/translation/send`,{method:"POST",body:JSON.stringify(ee)})},clearTranslationSession(B){return ze(`/api/translation/sessions/${encodeURIComponent(B)}/clear`,{method:"POST"})},retryTranslation(B,Y){return ze(`/api/translation/sessions/${encodeURIComponent(B)}/retry/${encodeURIComponent(Y)}`,{method:"POST"})}};async function ze(B,Y={}){var ae,ce;const ee=new Headers(Y.headers);Y.body!==void 0&&Y.body!==null&&!ee.has("content-type")&&ee.set("content-type","application/json");const H=await fetch(B,{...Y,headers:ee});if(!H.ok){const K=await H.json().catch(()=>null),u=(ae=K==null?void 0:K.error)!=null&&ae.hint?`${K.error.message} ${K.error.hint}`:((ce=K==null?void 0:K.error)==null?void 0:ce.message)??`Request failed: ${H.status}`;throw new Error(u)}return H.json()}function Av({events:B,maxEvents:Y=8,showHeader:ee=!0}){const H=Y===null?B:B.slice(-Y);return L.jsxs("section",{className:"event-log",children:[ee?L.jsx("h2",{children:"Events"}):null,B.length===0?L.jsx("p",{className:"muted",children:"No terminal events yet."}):L.jsx("ol",{children:H.map((ae,ce)=>L.jsx("li",{children:ae},`${ae}-${ce}`))})]})}function Gr({status:B}){return L.jsx("span",{className:`status-badge status-${B}`,children:B.replaceAll("_"," ")})}function Dv({status:B,applyResult:Y,busy:ee=!1,onRefresh:H,onApply:ae}){return B?L.jsxs("section",{className:"harness-panel",children:[L.jsxs("div",{className:"harness-panel-header",children:[L.jsx("p",{className:"muted",children:B.needsApply?`${B.plannedChanges.length} planned changes`:"up to date"}),L.jsxs("div",{className:"harness-actions",children:[L.jsx("button",{type:"button",disabled:ee,onClick:()=>void H(),children:"Refresh"}),L.jsx("button",{type:"button",disabled:ee||!B.needsApply,onClick:()=>void ae(),children:"Install / Update"})]})]}),L.jsx("ol",{className:"harness-file-list",children:B.files.map(ce=>L.jsxs("li",{children:[L.jsx("span",{children:ce.path}),L.jsx(Gr,{status:ce.action})]},ce.path))}),B.plannedChanges.length>0?L.jsxs("div",{className:"harness-changes",children:[L.jsx("h3",{children:"Planned Changes"}),L.jsx("ul",{children:B.plannedChanges.map(ce=>L.jsxs("li",{children:[L.jsx("strong",{children:ce.action})," ",ce.path]},`${ce.path}:${ce.action}`))})]}):null,Y?L.jsxs("div",{className:"harness-result",children:[L.jsx("p",{children:Y.message}),Y.changedFiles.length>0?L.jsx("ul",{children:Y.changedFiles.map(ce=>L.jsxs("li",{children:[L.jsx("strong",{children:ce.action})," ",ce.path]},`${ce.path}:${ce.action}`))}):null]}):null,B.warnings.length>0?L.jsx("ul",{className:"warnings",children:B.warnings.map(ce=>L.jsx("li",{children:ce},ce))}):null]}):null}function Oo(B){return{pending:B.filter(Y=>Y.status==="pending_approval").length,queued:B.filter(Y=>Y.status==="queued").length,delivered:B.filter(Y=>Y.status==="delivered"||Y.status==="staged").length}}function Tv({messages:B,orchestration:Y,busy:ee,maxMessages:H=6,showControls:ae=!0,showHeader:ce=!0,onModeChange:K,onPausedChange:u,onStage:f,onReject:d,onOpenRole:m}){const h=Oo(B),p=(Y==null?void 0:Y.mode)??"manual",y=H===null?B:B.slice(-H);return L.jsxs("section",{className:"message-panel",children:[ce?L.jsxs("div",{className:"message-panel-header",children:[L.jsxs("div",{children:[L.jsx("h2",{children:"Messages"}),L.jsxs("p",{className:"muted",children:[h.pending," pending / ",h.queued," queued / ",h.delivered," delivered"]})]}),ae&&K&&u?L.jsxs("div",{className:"message-controls",children:[L.jsxs("label",{className:"message-mode-toggle",children:[L.jsx("input",{type:"checkbox",checked:p==="auto",disabled:ee,onChange:w=>K(w.target.checked?"auto":"manual")}),L.jsx("span",{children:"Auto orchestration"})]}),L.jsx("button",{type:"button",disabled:ee||p!=="auto",onClick:()=>u(!(Y!=null&&Y.paused)),children:Y!=null&&Y.paused?"Resume":"Pause"})]}):null]}):null,B.length===0?L.jsx("p",{className:"muted",children:"No role messages yet."}):L.jsx("ol",{className:"message-list",children:y.map(w=>{const g=w.status==="pending_approval"||w.status==="queued",l=w.status==="pending_approval"||w.status==="queued";return L.jsxs("li",{className:`message-item message-${w.status}`,children:[L.jsxs("div",{className:"message-item-main",children:[L.jsxs("div",{className:"message-meta",children:[L.jsxs("strong",{children:[w.fromRole," ","->"," ",w.toRole]}),L.jsx("span",{children:w.type}),L.jsx(Gr,{status:w.status})]}),L.jsx("p",{children:w.body}),w.bodyPath?L.jsx("span",{className:"message-path",children:w.bodyPath}):null]}),L.jsxs("div",{className:"message-actions",children:[L.jsx("button",{type:"button",onClick:()=>m(w.toRole),children:"Open Role"}),L.jsx("button",{type:"button",disabled:ee||!g,onClick:()=>f(w),children:"Stage"}),L.jsx("button",{type:"button",disabled:ee||!l,onClick:()=>d(w),children:"Reject"})]})]},w.id)})})]})}function Rv({defaultPath:B="",recentPaths:Y=[],busy:ee=!1,onConnect:H}){const[ae,ce]=_e.useState(B);_e.useEffect(()=>{B&&ce(B)},[B]);async function K(u){u.preventDefault(),await H(ae)}return L.jsx("form",{className:"repo-connect",onSubmit:K,children:L.jsxs("div",{className:Y.length>0?"inline-form has-recent-paths":"inline-form",children:[L.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:ae,onChange:u=>ce(u.target.value),placeholder:"/path/to/repo"}),Y.length>0?L.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:u=>{u.target.value&&ce(u.target.value)},children:[L.jsx("option",{value:"",children:"Recent"}),Y.map(u=>L.jsx("option",{value:u,children:u},u))]}):null,L.jsx("button",{type:"submit",disabled:ee||!ae.trim(),children:"Connect"})]})})}function Mv({tasks:B,activeTaskSlug:Y,onSelect:ee}){return L.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:B.map(H=>L.jsxs("button",{className:H.taskSlug===Y?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>ee(H.taskSlug),children:[L.jsx("span",{children:H.title||H.taskSlug}),L.jsx(Gr,{status:H.status==="created"?"unknown":"running"})]},H.taskSlug))})}function Lv({workflow:B}){return B?L.jsxs("section",{className:"workflow-panel",children:[L.jsx("div",{className:"workflow-summary",children:L.jsx("p",{children:B.nextAction})}),L.jsx("ol",{className:"workflow-steps",children:B.steps.map(Y=>L.jsxs("li",{className:Y.id===B.currentStepId?"is-current":void 0,children:[L.jsx("span",{children:Y.label}),L.jsx(Gr,{status:Y.status})]},Y.id))})]}):null}function Ov({project:B,recentRepositoryPaths:Y,tasks:ee,activeTaskSlug:H,workflow:ae,messages:ce,orchestration:K,events:u,harnessStatus:f,harnessApplyResult:d,busy:m,onConnect:h,onRefreshHarness:p,onApplyHarness:y,onCreateTask:w,onSelectTask:g,onOrchestrationModeChange:l,onStageMessage:c,onRejectMessage:a,onOpenMessageRole:o}){const[_,C]=_e.useState(""),[b,E]=_e.useState(!1),[v,A]=_e.useState(!1),O=Oo(ce),j=(K==null?void 0:K.mode)??"manual",I=_.trim();async function z(Z){Z.preventDefault(),await w({taskSlug:I}),C("")}return L.jsxs("div",{className:"project-dashboard",children:[L.jsx("header",{className:"brand-header",children:L.jsx("strong",{children:"VibeCodingMaster"})}),L.jsx(cs,{title:"Repository Path",defaultOpen:!H,children:L.jsx(Rv,{defaultPath:(B==null?void 0:B.repoRoot)??"",recentPaths:Y,busy:m,onConnect:h})}),B?L.jsx(cs,{title:"Repository",children:L.jsxs("div",{className:"project-summary",children:[L.jsxs("dl",{children:[L.jsxs("div",{children:[L.jsx("dt",{children:"Path"}),L.jsx("dd",{children:B.repoRoot})]}),L.jsxs("div",{children:[L.jsx("dt",{children:"Branch"}),L.jsx("dd",{children:B.branch})]}),L.jsxs("div",{children:[L.jsx("dt",{children:"Working tree"}),L.jsx("dd",{children:B.isDirty?"uncommitted changes":"clean"})]})]}),B.warnings.length>0?L.jsx("ul",{className:"warnings",children:B.warnings.map(Z=>L.jsx("li",{children:Z},Z))}):null]})}):null,H?L.jsx(cs,{title:"Workflow",children:ae?L.jsx(Lv,{workflow:ae}):L.jsx("p",{className:"muted",children:"Loading workflow..."})}):null,H?L.jsx(cs,{title:"Settings",children:L.jsxs("div",{className:"sidebar-settings",children:[L.jsxs("button",{type:"button",onClick:()=>E(!0),children:[L.jsx("span",{children:"Messages"}),L.jsxs("span",{className:"muted",children:[O.pending," pending / ",O.queued," queued"]})]}),L.jsxs("button",{type:"button",onClick:()=>A(!0),children:[L.jsx("span",{children:"Events"}),L.jsxs("span",{className:"muted",children:[u.length," total"]})]}),L.jsxs("button",{"aria-pressed":j==="auto",className:j==="auto"?"settings-toggle is-active":"settings-toggle",disabled:m,type:"button",onClick:()=>l(j==="auto"?"manual":"auto"),children:[L.jsx("span",{children:"Auto orchestration"}),L.jsx("span",{children:j==="auto"?"on":"off"})]})]})}):null,B?L.jsx(cs,{title:"VCM Harness",children:L.jsx(Dv,{status:f,applyResult:d,busy:m,onRefresh:p,onApply:y})}):null,B?L.jsx(cs,{title:"New Task",children:L.jsx("div",{className:"task-create",children:L.jsxs("form",{onSubmit:z,children:[L.jsx("input",{value:_,onChange:Z=>C(Z.target.value),placeholder:"task name"}),L.jsxs("div",{className:"task-create-preview",children:[L.jsx("span",{children:"✓ Create worktree and branch"}),L.jsxs("small",{children:["branch: ",I?`feature/${I}`:"feature/<task>"]}),L.jsxs("small",{children:["worktree: ",I?`.ai/vcm/worktrees/${I}`:".ai/vcm/worktrees/<task>"]})]}),L.jsx("button",{type:"submit",disabled:m||!I,children:"Create"})]})})}):null,ee.length>0?L.jsx(cs,{title:"Tasks",children:L.jsx(Mv,{tasks:ee,activeTaskSlug:H,onSelect:g})}):null,b?L.jsx(kv,{busy:m,messages:ce,orchestration:K,onClose:()=>E(!1),onOpenRole:o,onReject:a,onStage:c}):null,v?L.jsx(Bv,{events:u,onClose:()=>A(!1)}):null]})}function Bv({events:B,onClose:Y}){return L.jsx("div",{className:"modal-backdrop",children:L.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("h2",{children:"Events"}),L.jsxs("p",{className:"muted",children:[B.length," total"]})]}),L.jsx("button",{type:"button",onClick:Y,children:"Close"})]}),L.jsx(Av,{events:B,maxEvents:null,showHeader:!1})]})})}function kv({busy:B,messages:Y,orchestration:ee,onClose:H,onOpenRole:ae,onReject:ce,onStage:K}){const u=Oo(Y);return L.jsx("div",{className:"modal-backdrop",children:L.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("h2",{children:"Messages"}),L.jsxs("p",{className:"muted",children:[u.pending," pending / ",u.queued," queued / ",u.delivered," delivered",ee?` · ${ee.mode}${ee.paused?" paused":""}`:""]})]}),L.jsx("button",{type:"button",onClick:H,children:"Close"})]}),L.jsx(Tv,{busy:B,maxMessages:null,messages:Y,orchestration:ee,showControls:!1,showHeader:!1,onOpenRole:ae,onReject:ce,onStage:K})]})})}function cs({children:B,defaultOpen:Y=!1,title:ee}){const[H,ae]=_e.useState(Y);return _e.useEffect(()=>{ae(Y)},[Y]),L.jsxs("section",{className:"sidebar-section",children:[L.jsxs("button",{"aria-expanded":H,className:"sidebar-section-toggle",type:"button",onClick:()=>ae(ce=>!ce),children:[L.jsx("span",{children:ee}),L.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),H?L.jsx("div",{className:"sidebar-section-content",children:B}):null]})}const oa=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}];oa.map(B=>B.name);oa.filter(B=>B.dispatchable).map(B=>B.name);function Xf(B,Y){return B.find(ee=>ee.role===Y)}function Hv({activeRole:B,sessions:Y,onSelect:ee}){return L.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:oa.map(H=>{const ae=Xf(Y,H.name);return L.jsxs("button",{className:H.name===B?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":H.name===B,onClick:()=>ee(H.name),children:[L.jsx("span",{children:H.label}),L.jsx(Gr,{status:(ae==null?void 0:ae.status)??"not_started"})]},H.name)})})}var To={exports:{}},If;function zv(){return If||(If=1,(function(B,Y){(function(ee,H){B.exports=H()})(self,(()=>(()=>{var ee={};return(()=>{var H=ee;Object.defineProperty(H,"__esModule",{value:!0}),H.FitAddon=void 0,H.FitAddon=class{activate(ae){this._terminal=ae}dispose(){}fit(){const ae=this.proposeDimensions();if(!ae||!this._terminal||isNaN(ae.cols)||isNaN(ae.rows))return;const ce=this._terminal._core;this._terminal.rows===ae.rows&&this._terminal.cols===ae.cols||(ce._renderService.clear(),this._terminal.resize(ae.cols,ae.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ae=this._terminal._core,ce=ae._renderService.dimensions;if(ce.css.cell.width===0||ce.css.cell.height===0)return;const K=this._terminal.options.scrollback===0?0:ae.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),f=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),h=f-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),p=d-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-K;return{cols:Math.max(2,Math.floor(p/ce.css.cell.width)),rows:Math.max(1,Math.floor(h/ce.css.cell.height))}}}})(),ee})()))})(To)),To.exports}var jv=zv(),Ro={exports:{}},Pf;function Nv(){return Pf||(Pf=1,(function(B,Y){(function(ee,H){B.exports=H()})(self,(()=>(()=>{var ee={6:(K,u)=>{function f(m){try{const h=new URL(m),p=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return m.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(u,"__esModule",{value:!0}),u.LinkComputer=u.WebLinkProvider=void 0,u.WebLinkProvider=class{constructor(m,h,p,y={}){this._terminal=m,this._regex=h,this._handler=p,this._options=y}provideLinks(m,h){const p=d.computeLink(m,this._regex,this._terminal,this._handler);h(this._addCallbacks(p))}_addCallbacks(m){return m.map((h=>(h.leave=this._options.leave,h.hover=(p,y)=>{if(this._options.hover){const{range:w}=h;this._options.hover(p,y,w)}},h)))}};class d{static computeLink(h,p,y,w){const g=new RegExp(p.source,(p.flags||"")+"g"),[l,c]=d._getWindowedLineStrings(h-1,y),a=l.join("");let o;const _=[];for(;o=g.exec(a);){const C=o[0];if(!f(C))continue;const[b,E]=d._mapStrIdx(y,c,0,o.index),[v,A]=d._mapStrIdx(y,b,E,C.length);if(b===-1||E===-1||v===-1||A===-1)continue;const O={start:{x:E+1,y:b+1},end:{x:A,y:v+1}};_.push({range:O,text:C,activate:w})}return _}static _getWindowedLineStrings(h,p){let y,w=h,g=h,l=0,c="";const a=[];if(y=p.buffer.active.getLine(h)){const o=y.translateToString(!0);if(y.isWrapped&&o[0]!==" "){for(l=0;(y=p.buffer.active.getLine(--w))&&l<2048&&(c=y.translateToString(!0),l+=c.length,a.push(c),y.isWrapped&&c.indexOf(" ")===-1););a.reverse()}for(a.push(o),l=0;(y=p.buffer.active.getLine(++g))&&y.isWrapped&&l<2048&&(c=y.translateToString(!0),l+=c.length,a.push(c),c.indexOf(" ")===-1););}return[a,w]}static _mapStrIdx(h,p,y,w){const g=h.buffer.active,l=g.getNullCell();let c=y;for(;w;){const a=g.getLine(p);if(!a)return[-1,-1];for(let o=c;o<a.length;++o){a.getCell(o,l);const _=l.getChars();if(l.getWidth()&&(w-=_.length||1,o===a.length-1&&_==="")){const C=g.getLine(p+1);C&&C.isWrapped&&(C.getCell(0,l),l.getWidth()===2&&(w+=1))}if(w<0)return[p,o]}p++,c=0}return[p,c]}}u.LinkComputer=d}},H={};function ae(K){var u=H[K];if(u!==void 0)return u.exports;var f=H[K]={exports:{}};return ee[K](f,f.exports,ae),f.exports}var ce={};return(()=>{var K=ce;Object.defineProperty(K,"__esModule",{value:!0}),K.WebLinksAddon=void 0;const u=ae(6),f=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(m,h){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}K.WebLinksAddon=class{constructor(m=d,h={}){this._handler=m,this._options=h}activate(m){this._terminal=m;const h=this._options,p=h.urlRegex||f;this._linkProvider=this._terminal.registerLinkProvider(new u.WebLinkProvider(this._terminal,p,this._handler,h))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),ce})()))})(Ro)),Ro.exports}var Uv=Nv(),Mo={exports:{}},Yf;function qv(){return Yf||(Yf=1,(function(B,Y){(function(ee,H){B.exports=H()})(globalThis,(()=>(()=>{var ee={4567:function(K,u,f){var d=this&&this.__decorate||function(a,o,_,C){var b,E=arguments.length,v=E<3?o:C===null?C=Object.getOwnPropertyDescriptor(o,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,C);else for(var A=a.length-1;A>=0;A--)(b=a[A])&&(v=(E<3?b(v):E>3?b(o,_,v):b(o,_))||v);return E>3&&v&&Object.defineProperty(o,_,v),v},m=this&&this.__param||function(a,o){return function(_,C){o(_,C,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=f(9042),p=f(9924),y=f(844),w=f(4725),g=f(2585),l=f(3656);let c=u.AccessibilityManager=class extends y.Disposable{constructor(a,o,_,C){super(),this._terminal=a,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 b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,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((b=>this._handleResize(b.rows)))),this.register(this._terminal.onRender((b=>this._refreshRows(b.start,b.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((b=>this._handleChar(b)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
50
+ `)))),this.register(this._terminal.onA11yTab((b=>this._handleTab(b)))),this.register(this._terminal.onKey((b=>this._handleKey(b.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,l.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(a){for(let o=0;o<a;o++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
51
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(a){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(a)||this._charsToConsume.push(a)}_refreshRows(a,o){this._liveRegionDebouncer.refresh(a,o,this._terminal.rows)}_renderRows(a,o){const _=this._terminal.buffer,C=_.lines.length.toString();for(let b=a;b<=o;b++){const E=_.lines.get(_.ydisp+b),v=[],A=(E==null?void 0:E.translateToString(!0,void 0,void 0,v))||"",O=(_.ydisp+b+1).toString(),j=this._rowElements[b];j&&(A.length===0?(j.innerText=" ",this._rowColumns.set(j,[0,1])):(j.textContent=A,this._rowColumns.set(j,v)),j.setAttribute("aria-posinset",O),j.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(a,o){const _=a.target,C=this._rowElements[o===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||a.relatedTarget!==C)return;let b,E;if(o===0?(b=_,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(b=this._rowElements.shift(),E=_,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const v=this._createAccessibilityTreeNode();this._rowElements.unshift(v),this._rowContainer.insertAdjacentElement("afterbegin",v)}else{const v=this._createAccessibilityTreeNode();this._rowElements.push(v),this._rowContainer.appendChild(v)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(o===0?-1:1),this._rowElements[o===0?1:this._rowElements.length-2].focus(),a.preventDefault(),a.stopImmediatePropagation()}_handleSelectionChange(){var A;if(this._rowElements.length===0)return;const a=document.getSelection();if(!a)return;if(a.isCollapsed)return void(this._rowContainer.contains(a.anchorNode)&&this._terminal.clearSelection());if(!a.anchorNode||!a.focusNode)return void console.error("anchorNode and/or focusNode are null");let o={node:a.anchorNode,offset:a.anchorOffset},_={node:a.focusNode,offset:a.focusOffset};if((o.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||o.node===_.node&&o.offset>_.offset)&&([o,_]=[_,o]),o.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(o={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(o.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:((A=C.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(_.node))return;const b=({node:O,offset:j})=>{const I=O instanceof Text?O.parentNode:O;let z=parseInt(I==null?void 0:I.getAttribute("aria-posinset"),10)-1;if(isNaN(z))return console.warn("row is invalid. Race condition?"),null;const Z=this._rowColumns.get(I);if(!Z)return console.warn("columns is null. Race condition?"),null;let re=j<Z.length?Z[j]:Z.slice(-1)[0]+1;return re>=this._terminal.cols&&(++z,re=0),{row:z,column:re}},E=b(o),v=b(_);if(E&&v){if(E.row>v.row||E.row===v.row&&E.column>=v.column)throw new Error("invalid range");this._terminal.select(E.column,E.row,(v.row-E.row)*this._terminal.cols-E.column+v.column)}}_handleResize(a){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let o=this._rowContainer.children.length;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);for(;this._rowElements.length>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const a=this._coreBrowserService.mainDocument.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}};u.AccessibilityManager=c=d([m(1,g.IInstantiationService),m(2,w.ICoreBrowserService),m(3,w.IRenderService)],c)},3614:(K,u)=>{function f(p){return p.replace(/\r?\n/g,"\r")}function d(p,y){return y?"\x1B[200~"+p+"\x1B[201~":p}function m(p,y,w,g){p=d(p=f(p),w.decPrivateModes.bracketedPasteMode&&g.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(p,!0),y.value=""}function h(p,y,w){const g=w.getBoundingClientRect(),l=p.clientX-g.left-10,c=p.clientY-g.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${l}px`,y.style.top=`${c}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(u,"__esModule",{value:!0}),u.rightClickHandler=u.moveTextAreaUnderMouseCursor=u.paste=u.handlePasteEvent=u.copyHandler=u.bracketTextForPaste=u.prepareTextForTerminal=void 0,u.prepareTextForTerminal=f,u.bracketTextForPaste=d,u.copyHandler=function(p,y){p.clipboardData&&p.clipboardData.setData("text/plain",y.selectionText),p.preventDefault()},u.handlePasteEvent=function(p,y,w,g){p.stopPropagation(),p.clipboardData&&m(p.clipboardData.getData("text/plain"),y,w,g)},u.paste=m,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(p,y,w,g,l){h(p,y,w),l&&g.rightClickSelect(p),y.value=g.selectionText,y.select()}},7239:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const d=f(1505);u.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(m,h,p){this._css.set(m,h,p)}getCss(m,h){return this._css.get(m,h)}setColor(m,h,p){this._color.set(m,h,p)}getColor(m,h){return this._color.get(m,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(f,d,m,h){f.addEventListener(d,m,h);let p=!1;return{dispose:()=>{p||(p=!0,f.removeEventListener(d,m,h))}}}},3551:function(K,u,f){var d=this&&this.__decorate||function(c,a,o,_){var C,b=arguments.length,E=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(b<3?C(E):b>3?C(a,o,E):C(a,o))||E);return b>3&&E&&Object.defineProperty(a,o,E),E},m=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier=void 0;const h=f(3656),p=f(8460),y=f(844),w=f(2585),g=f(4725);let l=u.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(c,a,o,_,C){super(),this._element=c,this._mouseService=a,this._renderService=o,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,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var b;this._lastMouseEvent=void 0,(b=this._activeProviderReplies)==null||b.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!a)return;this._isMouseOut=!1;const o=c.composedPath();for(let _=0;_<o.length;_++){const C=o[_];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._handleHover(a),this._lastBufferCell=a)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,a){var _,C;this._activeProviderReplies&&a||((_=this._activeProviderReplies)==null||_.forEach((b=>{b==null||b.forEach((E=>{E.link.dispose&&E.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let o=!1;for(const[b,E]of this._linkProviderService.linkProviders.entries())a?(C=this._activeProviderReplies)!=null&&C.get(b)&&(o=this._checkLinkProviderResult(b,c,o)):E.provideLinks(c.y,(v=>{var O,j;if(this._isMouseOut)return;const A=v==null?void 0:v.map((I=>({link:I})));(O=this._activeProviderReplies)==null||O.set(b,A),o=this._checkLinkProviderResult(b,c,o),((j=this._activeProviderReplies)==null?void 0:j.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,a){const o=new Set;for(let _=0;_<a.size;_++){const C=a.get(_);if(C)for(let b=0;b<C.length;b++){const E=C[b],v=E.link.range.start.y<c?0:E.link.range.start.x,A=E.link.range.end.y>c?this._bufferService.cols:E.link.range.end.x;for(let O=v;O<=A;O++){if(o.has(O)){C.splice(b--,1);break}o.add(O)}}}}_checkLinkProviderResult(c,a,o){var b;if(!this._activeProviderReplies)return o;const _=this._activeProviderReplies.get(c);let C=!1;for(let E=0;E<c;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(C=!0);if(!C&&_){const E=_.find((v=>this._linkAtPosition(v.link,a)));E&&(o=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!o)for(let E=0;E<this._activeProviderReplies.size;E++){const v=(b=this._activeProviderReplies.get(E))==null?void 0:b.find((A=>this._linkAtPosition(A.link,a)));if(v){o=!0,this._handleNewLink(v);break}}return o}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);a&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,a){this._currentLink&&this._lastMouseEvent&&(!c||!a||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(c.link,a)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>{var o,_;return(_=(o=this._currentLink)==null?void 0:o.state)==null?void 0:_.decorations.pointerCursor},set:o=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==o&&(this._currentLink.state.decorations.pointerCursor=o,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",o))}},underline:{get:()=>{var o,_;return(_=(o=this._currentLink)==null?void 0:o.state)==null?void 0:_.decorations.underline},set:o=>{var _,C,b;(_=this._currentLink)!=null&&_.state&&((b=(C=this._currentLink)==null?void 0:C.state)==null?void 0:b.decorations.underline)!==o&&(this._currentLink.state.decorations.underline=o,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,o))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((o=>{if(!this._currentLink)return;const _=o.start===0?0:o.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+o.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(_,C),this._lastMouseEvent)){const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._askForLink(b,!1)}}))))}_linkHover(c,a,o){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(o,a.text)}_fireUnderlineEvent(c,a){const o=c.range,_=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(o.start.x-1,o.start.y-_-1,o.end.x,o.end.y-_-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(c,a,o){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(o,a.text)}_linkAtPosition(c,a){const o=c.range.start.y*this._bufferService.cols+c.range.start.x,_=c.range.end.y*this._bufferService.cols+c.range.end.x,C=a.y*this._bufferService.cols+a.x;return o<=C&&C<=_}_positionFromMouseEvent(c,a,o){const _=o.getCoords(c,a,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,a,o,_,C){return{x1:c,y1:a,x2:o,y2:_,cols:this._bufferService.cols,fg:C}}};u.Linkifier=l=d([m(1,g.IMouseService),m(2,g.IRenderService),m(3,w.IBufferService),m(4,g.ILinkProviderService)],l)},9042:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.tooMuchOutput=u.promptLabel=void 0,u.promptLabel="Terminal input",u.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(K,u,f){var d=this&&this.__decorate||function(g,l,c,a){var o,_=arguments.length,C=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,l,c,a);else for(var b=g.length-1;b>=0;b--)(o=g[b])&&(C=(_<3?o(C):_>3?o(l,c,C):o(l,c))||C);return _>3&&C&&Object.defineProperty(l,c,C),C},m=this&&this.__param||function(g,l){return function(c,a){l(c,a,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=f(511),p=f(2585);let y=u.OscLinkProvider=class{constructor(g,l,c){this._bufferService=g,this._optionsService=l,this._oscLinkService=c}provideLinks(g,l){var A;const c=this._bufferService.buffer.lines.get(g-1);if(!c)return void l(void 0);const a=[],o=this._optionsService.rawOptions.linkHandler,_=new h.CellData,C=c.getTrimmedLength();let b=-1,E=-1,v=!1;for(let O=0;O<C;O++)if(E!==-1||c.hasContent(O)){if(c.loadCell(O,_),_.hasExtendedAttrs()&&_.extended.urlId){if(E===-1){E=O,b=_.extended.urlId;continue}v=_.extended.urlId!==b}else E!==-1&&(v=!0);if(v||E!==-1&&O===C-1){const j=(A=this._oscLinkService.getLinkData(b))==null?void 0:A.uri;if(j){const I={start:{x:E+1,y:g},end:{x:O+(v||O!==C-1?0:1),y:g}};let z=!1;if(!(o!=null&&o.allowNonHttpProtocols))try{const Z=new URL(j);["http:","https:"].includes(Z.protocol)||(z=!0)}catch{z=!0}z||a.push({text:j,range:I,activate:(Z,re)=>o?o.activate(Z,re,I):w(0,re),hover:(Z,re)=>{var q;return(q=o==null?void 0:o.hover)==null?void 0:q.call(o,Z,re,I)},leave:(Z,re)=>{var q;return(q=o==null?void 0:o.leave)==null?void 0:q.call(o,Z,re,I)}})}v=!1,_.hasExtendedAttrs()&&_.extended.urlId?(E=O,b=_.extended.urlId):(E=-1,b=-1)}}l(a)}};function w(g,l){if(confirm(`Do you want to navigate to ${l}?
52
52
 
53
- WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=b=d([m(0,p.IBufferService),m(1,p.IOptionsService),m(2,p.IOscLinkService)],b)},6193:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(f,d){this._renderCallback=f,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(f){return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(f,d,m){this._rowCount=m,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const f of this._refreshCallbacks)f(0);this._refreshCallbacks=[]}}},3236:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=f(3614),m=f(3656),h=f(3551),p=f(9042),b=f(3730),w=f(1680),g=f(3107),l=f(5744),c=f(2950),a=f(1296),o=f(428),_=f(4269),E=f(5114),y=f(8934),C=f(3230),v=f(9312),D=f(4725),O=f(6731),N=f(8055),I=f(8969),H=f(8460),J=f(844),re=f(6114),U=f(8437),$=f(2584),se=f(7399),A=f(5941),B=f(9074),x=f(2585),M=f(5435),V=f(4567),G=f(779);class Q extends I.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(q={}){super(q),this.browser=re,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new J.MutableDisposable),this._onCursorMove=this.register(new H.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new H.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new H.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new H.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new H.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new H.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new H.EventEmitter),this._onBlur=this.register(new H.EventEmitter),this._onA11yCharEmitter=this.register(new H.EventEmitter),this._onA11yTabEmitter=this.register(new H.EventEmitter),this._onWillOpen=this.register(new H.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(x.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(G.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(b.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((R,le)=>this.refresh(R,le)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((R=>this._reportWindowsOptions(R)))),this.register(this._inputHandler.onColor((R=>this._handleColorEvent(R)))),this.register((0,H.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,H.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((R=>this._afterResize(R.cols,R.rows)))),this.register((0,J.toDisposable)((()=>{var R,le;this._customKeyEventHandler=void 0,(le=(R=this.element)==null?void 0:R.parentNode)==null||le.removeChild(this.element)})))}_handleColorEvent(q){if(this._themeService)for(const R of q){let le,ie="";switch(R.index){case 256:le="foreground",ie="10";break;case 257:le="background",ie="11";break;case 258:le="cursor",ie="12";break;default:le="ansi",ie="4;"+R.index}switch(R.type){case 0:const de=N.color.toColorRGB(le==="ansi"?this._themeService.colors.ansi[R.index]:this._themeService.colors[le]);this.coreService.triggerDataEvent(`${$.C0.ESC}]${ie};${(0,A.toRgbString)(de)}${$.C1_ESCAPED.ST}`);break;case 1:if(le==="ansi")this._themeService.modifyColors((fe=>fe.ansi[R.index]=N.channels.toColor(...R.color)));else{const fe=le;this._themeService.modifyColors((Ee=>Ee[fe]=N.channels.toColor(...R.color)))}break;case 2:this._themeService.restoreColor(R.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(q){q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var q;return(q=this.textarea)==null?void 0:q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.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 q=this.buffer.ybase+this.buffer.y,R=this.buffer.lines.get(q);if(!R)return;const le=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,de=R.getWidth(le),fe=this._renderService.dimensions.css.cell.width*de,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,Be=le*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Be+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",(R=>{this.hasSelection()&&(0,d.copyHandler)(R,this._selectionService)})));const q=R=>(0,d.handlePasteEvent)(R,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",q)),this.register((0,m.addDisposableDomListener)(this.element,"paste",q)),re.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(R=>{R.button===2&&(0,d.rightClickHandler)(R,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",(R=>{(0,d.rightClickHandler)(R,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),re.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",(R=>{R.button===1&&(0,d.moveTextAreaUnderMouseCursor)(R,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(q=>this._keyUp(q)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(q=>this._keyDown(q)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(q=>this._keyPress(q)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(q=>this._compositionHelper.compositionupdate(q)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(q=>this._inputEvent(q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(q){var le;if(!q)throw new Error("Terminal requires a parent element.");if(q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((le=this.element)==null?void 0:le.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=q.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"),q.appendChild(this.element);const R=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),R.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",(ie=>this.updateCursorStyle(ie)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),R.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),re.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(E.CoreBrowserService,this.textarea,q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",(ie=>this._handleTextAreaFocus(ie)))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(o.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(C.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ie=>this._onRender.fire(ie)))),this.onResize((ie=>this._renderService.resize(ie.cols,ie.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(y.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(R);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((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(v.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ie=>this._renderService.handleSelectionChanged(ie.start,ie.end,ie.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ie=>{this.textarea.value=ie,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ie=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(g.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(ie=>this._selectionService.handleMouseDown(ie)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ie=>this._handleScreenReaderModeOptionChange(ie)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ie=>{!this._overviewRulerRenderer&&ie&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(a.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const q=this,R=this.element;function le(fe){const Ee=q._mouseService.getMouseReportCoords(fe,q.screenElement);if(!Ee)return!1;let Be,Ie;switch(fe.overrideType||fe.type){case"mousemove":Ie=32,fe.buttons===void 0?(Be=3,fe.button!==void 0&&(Be=fe.button<3?fe.button:3)):Be=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Ie=0,Be=fe.button<3?fe.button:3;break;case"mousedown":Ie=1,Be=fe.button<3?fe.button:3;break;case"wheel":if(q._customWheelEventHandler&&q._customWheelEventHandler(fe)===!1||q.viewport.getLinesScrolled(fe)===0)return!1;Ie=fe.deltaY<0?0:1,Be=4;break;default:return!1}return!(Ie===void 0||Be===void 0||Be>4)&&q.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:Be,action:Ie,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:fe=>(le(fe),fe.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(fe)),wheel:fe=>(le(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&le(fe)},mousemove:fe=>{fe.buttons||le(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&fe?ie.mousemove||(R.addEventListener("mousemove",de.mousemove),ie.mousemove=de.mousemove):(R.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&fe?ie.wheel||(R.addEventListener("wheel",de.wheel,{passive:!1}),ie.wheel=de.wheel):(R.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&fe?ie.mouseup||(ie.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&fe?ie.mousedrag||(ie.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(R,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return le(fe),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(fe)}))),this.register((0,m.addDisposableDomListener)(R,"wheel",(fe=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(fe);if(Ee===0)return;const Be=$.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Ie="";for(let it=0;it<Math.abs(Ee);it++)Ie+=Be;return this.coreService.triggerDataEvent(Ie,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)(R,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,m.addDisposableDomListener)(R,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(q,R){var le;(le=this._renderService)==null||le.refreshRows(q,R)}updateCursorStyle(q){var R;(R=this._selectionService)!=null&&R.shouldColumnSelect(q)?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(q,R,le=0){var ie;le===1?(super.scrollLines(q,R,le),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(q)}paste(q){(0,d.paste)(q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(q){this._customKeyEventHandler=q}attachCustomWheelEventHandler(q){this._customWheelEventHandler=q}registerLinkProvider(q){return this._linkProviderService.registerLinkProvider(q)}registerCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const R=this._characterJoinerService.register(q);return this.refresh(0,this.rows-1),R}deregisterCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+q)}registerDecoration(q){return this._decorationService.registerDecoration(q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(q,R,le){this._selectionService.setSelection(q,R,le)}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 q;(q=this._selectionService)==null||q.clearSelection()}selectAll(){var q;(q=this._selectionService)==null||q.selectAll()}selectLines(q,R){var le;(le=this._selectionService)==null||le.selectLines(q,R)}_keyDown(q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;const R=this.browser.isMac&&this.options.macOptionIsMeta&&q.altKey;if(!R&&!this._compositionHelper.keydown(q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;R||q.key!=="Dead"&&q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const le=(0,se.evaluateKeyboardEvent)(q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(q),le.type===3||le.type===2){const ie=this.rows-1;return this.scrollLines(le.type===2?-ie:ie),this.cancel(q,!0)}return le.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,q)||(le.cancel&&this.cancel(q,!0),!le.key||!!(q.key&&!q.ctrlKey&&!q.altKey&&!q.metaKey&&q.key.length===1&&q.key.charCodeAt(0)>=65&&q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(le.key!==$.C0.ETX&&le.key!==$.C0.CR||(this.textarea.value=""),this._onKey.fire({key:le.key,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(le.key,!0),!this.optionsService.rawOptions.screenReaderMode||q.altKey||q.ctrlKey?this.cancel(q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(q,R){const le=q.isMac&&!this.options.macOptionIsMeta&&R.altKey&&!R.ctrlKey&&!R.metaKey||q.isWindows&&R.altKey&&R.ctrlKey&&!R.metaKey||q.isWindows&&R.getModifierState("AltGraph");return R.type==="keypress"?le:le&&(!R.keyCode||R.keyCode>47)}_keyUp(q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1||((function(R){return R.keyCode===16||R.keyCode===17||R.keyCode===18})(q)||this.focus(),this.updateCursorStyle(q),this._keyPressHandled=!1)}_keyPress(q){let R;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;if(this.cancel(q),q.charCode)R=q.charCode;else if(q.which===null||q.which===void 0)R=q.keyCode;else{if(q.which===0||q.charCode===0)return!1;R=q.which}return!(!R||(q.altKey||q.ctrlKey||q.metaKey)&&!this._isThirdLevelShift(this.browser,q)||(R=String.fromCharCode(R),this._onKey.fire({key:R,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(R,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(q){if(q.data&&q.inputType==="insertText"&&(!q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const R=q.data;return this.coreService.triggerDataEvent(R,!0),this.cancel(q),!0}return!1}resize(q,R){q!==this.cols||R!==this.rows?super.resize(q,R):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(q,R){var le,ie;(le=this._charSizeService)==null||le.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var q;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 R=1;R<this.rows;R++)this.buffer.lines.push(this.buffer.getBlankLine(U.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(q=this.viewport)==null||q.reset(),this.refresh(0,this.rows-1)}}reset(){var R,le;this.options.rows=this.rows,this.options.cols=this.cols;const q=this._customKeyEventHandler;this._setup(),super.reset(),(R=this._selectionService)==null||R.reset(),this._decorationService.reset(),(le=this.viewport)==null||le.reset(),this._customKeyEventHandler=q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var q;(q=this._renderService)==null||q.clearTextureAtlas()}_reportFocus(){var q;(q=this.element)!=null&&q.classList.contains("focus")?this.coreService.triggerDataEvent($.C0.ESC+"[I"):this.coreService.triggerDataEvent($.C0.ESC+"[O")}_reportWindowsOptions(q){if(this._renderService)switch(q){case M.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const R=this._renderService.dimensions.css.canvas.width.toFixed(0),le=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[4;${le};${R}t`);break;case M.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[6;${de};${ie}t`)}}cancel(q,R){if(this.options.cancelEvents||R)return q.preventDefault(),q.stopPropagation(),!1}}u.Terminal=Q},9924:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(f,d=1e3){this._renderCallback=f,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(f,d,m){this._rowCount=m,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=h-this._lastRefreshMs,b=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d)}}},1680:function(K,u,f){var d=this&&this.__decorate||function(c,a,o,_){var E,y=arguments.length,C=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(E=c[v])&&(C=(y<3?E(C):y>3?E(a,o,C):E(a,o))||C);return y>3&&C&&Object.defineProperty(a,o,C),C},m=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=f(3656),p=f(4725),b=f(8460),w=f(844),g=f(2585);let l=u.Viewport=class extends w.Disposable{constructor(c,a,o,_,E,y,C,v){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=o,this._optionsService=_,this._charSizeService=E,this._renderService=y,this._coreBrowserService=C,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(v.colors),this.register(v.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(c){if(c)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:a,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(c,a){const o=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&o<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const a=this._getPixelsScrolled(c);return a!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+a:this._smoothScrollState.target+=a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(c,a){var v;let o,_="";const E=[],y=a??this._bufferService.buffer.lines.length,C=this._bufferService.buffer.lines;for(let D=c;D<y;D++){const O=C.get(D);if(!O)continue;const N=(v=C.get(D+1))==null?void 0:v.isWrapped;if(_+=O.translateToString(!N),!N||D===C.length-1){const I=document.createElement("div");I.textContent=_,E.push(I),_.length>0&&(o=I),_=""}}return{bufferElements:E,cursorElement:o}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(c,a){const o=this._optionsService.rawOptions.fastScrollModifier;return o==="alt"&&a.altKey||o==="ctrl"&&a.ctrlKey||o==="shift"&&a.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const a=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}};u.Viewport=l=d([m(2,g.IBufferService),m(3,g.IOptionsService),m(4,p.ICharSizeService),m(5,p.IRenderService),m(6,p.ICoreBrowserService),m(7,p.IThemeService)],l)},3107:function(K,u,f){var d=this&&this.__decorate||function(g,l,c,a){var o,_=arguments.length,E=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,l,c,a);else for(var y=g.length-1;y>=0;y--)(o=g[y])&&(E=(_<3?o(E):_>3?o(l,c,E):o(l,c))||E);return _>3&&E&&Object.defineProperty(l,c,E),E},m=this&&this.__param||function(g,l){return function(c,a){l(c,a,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=f(4725),p=f(844),b=f(2585);let w=u.BufferDecorationRenderer=class extends p.Disposable{constructor(g,l,c,a,o){super(),this._screenElement=g,this._bufferService=l,this._coreBrowserService=c,this._decorationService=a,this._renderService=o,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 g of this._decorationService.decorations)this._renderDecoration(g);this._dimensionsChanged=!1}_renderDecoration(g){this._refreshStyle(g),this._dimensionsChanged&&this._refreshXPosition(g)}_createElement(g){var a;const l=this._coreBrowserService.mainDocument.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((a=g==null?void 0:g.options)==null?void 0:a.layer)==="top"),l.style.width=`${Math.round((g.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(g.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(g.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",l.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const c=g.options.x??0;return c&&c>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(g,l),l}_refreshStyle(g){const l=g.marker.line-this._bufferService.buffers.active.ydisp;if(l<0||l>=this._bufferService.rows)g.element&&(g.element.style.display="none",g.onRenderEmitter.fire(g.element));else{let c=this._decorationElements.get(g);c||(c=this._createElement(g),g.element=c,this._decorationElements.set(g,c),this._container.appendChild(c),g.onDispose((()=>{this._decorationElements.delete(g),c.remove()}))),c.style.top=l*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",g.onRenderEmitter.fire(c)}}_refreshXPosition(g,l=g.element){if(!l)return;const c=g.options.x??0;(g.options.anchor||"left")==="right"?l.style.right=c?c*this._renderService.dimensions.css.cell.width+"px":"":l.style.left=c?c*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(g){var l;(l=this._decorationElements.get(g))==null||l.remove(),this._decorationElements.delete(g),g.dispose()}};u.BufferDecorationRenderer=w=d([m(1,b.IBufferService),m(2,h.ICoreBrowserService),m(3,b.IDecorationService),m(4,h.IRenderService)],w)},5871:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorZoneStore=void 0,u.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(f){if(f.options.overviewRulerOptions){for(const d of this._zones)if(d.color===f.options.overviewRulerOptions.color&&d.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,f.marker.line))return;if(this._lineAdjacentToZone(d,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(d,f.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=f.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=f.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=f.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=f.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:f.options.overviewRulerOptions.color,position:f.options.overviewRulerOptions.position,startBufferLine:f.marker.line,endBufferLine:f.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(f){this._linePadding=f}_lineIntersectsZone(f,d){return d>=f.startBufferLine&&d<=f.endBufferLine}_lineAdjacentToZone(f,d,m){return d>=f.startBufferLine-this._linePadding[m||"full"]&&d<=f.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)}}},5744:function(K,u,f){var d=this&&this.__decorate||function(o,_,E,y){var C,v=arguments.length,D=v<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,E):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(o,_,E,y);else for(var O=o.length-1;O>=0;O--)(C=o[O])&&(D=(v<3?C(D):v>3?C(_,E,D):C(_,E))||D);return v>3&&D&&Object.defineProperty(_,E,D),D},m=this&&this.__param||function(o,_){return function(E,y){_(E,y,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=f(5871),p=f(4725),b=f(844),w=f(2585),g={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let a=u.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(o,_,E,y,C,v,D){var N;super(),this._viewportElement=o,this._screenElement=_,this._bufferService=E,this._decorationService=y,this._renderService=C,this._optionsService=v,this._coreBrowserService=D,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(N=this._viewportElement.parentElement)==null||N.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,b.toDisposable)((()=>{var I;(I=this._canvas)==null||I.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 o=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);l.full=this._canvas.width,l.left=o,l.center=_,l.right=o,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=l.left,c.right=l.left+l.center}_refreshDrawHeightConstants(){g.full=Math.round(2*this._coreBrowserService.dpr);const o=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(o,12),6)*this._coreBrowserService.dpr);g.left=_,g.center=_,g.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.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 o=this._colorZoneStore.zones;for(const _ of o)_.position!=="full"&&this._renderColorZone(_);for(const _ of o)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(o){this._ctx.fillStyle=o.color,this._ctx.fillRect(c[o.position||"full"],Math.round((this._canvas.height-1)*(o.startBufferLine/this._bufferService.buffers.active.lines.length)-g[o.position||"full"]/2),l[o.position||"full"],Math.round((this._canvas.height-1)*((o.endBufferLine-o.startBufferLine)/this._bufferService.buffers.active.lines.length)+g[o.position||"full"]))}_queueRefresh(o,_){this._shouldUpdateDimensions=o||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=a=d([m(2,w.IBufferService),m(3,w.IDecorationService),m(4,p.IRenderService),m(5,w.IOptionsService),m(6,p.ICoreBrowserService)],a)},2950:function(K,u,f){var d=this&&this.__decorate||function(g,l,c,a){var o,_=arguments.length,E=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,l,c,a);else for(var y=g.length-1;y>=0;y--)(o=g[y])&&(E=(_<3?o(E):_>3?o(l,c,E):o(l,c))||E);return _>3&&E&&Object.defineProperty(l,c,E),E},m=this&&this.__param||function(g,l){return function(c,a){l(c,a,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=f(4725),p=f(2585),b=f(2584);let w=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(g,l,c,a,o,_){this._textarea=g,this._compositionView=l,this._bufferService=c,this._optionsService=a,this._coreService=o,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(g){this._compositionView.textContent=g.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(g){if(this._isComposing||this._isSendingComposition){if(g.keyCode===229||g.keyCode===16||g.keyCode===17||g.keyCode===18)return!1;this._finalizeComposition(!1)}return g.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(g){if(this._compositionView.classList.remove("active"),this._isComposing=!1,g){const l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,l.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(l.start,l.end):this._textarea.value.substring(l.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const l=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(l,!0)}}_handleAnyTextareaChanges(){const g=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const l=this._textarea.value,c=l.replace(g,"");this._dataAlreadySent=c,l.length>g.length?this._coreService.triggerDataEvent(c,!0):l.length<g.length?this._coreService.triggerDataEvent(`${b.C0.DEL}`,!0):l.length===g.length&&l!==g&&this._coreService.triggerDataEvent(l,!0)}}),0)}updateCompositionElements(g){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=a+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=a+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}g||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=w=d([m(2,p.IBufferService),m(3,p.IOptionsService),m(4,p.ICoreService),m(5,h.IRenderService)],w)},9806:(K,u)=>{function f(d,m,h){const p=h.getBoundingClientRect(),b=d.getComputedStyle(h),w=parseInt(b.getPropertyValue("padding-left")),g=parseInt(b.getPropertyValue("padding-top"));return[m.clientX-p.left-w,m.clientY-p.top-g]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=f,u.getCoords=function(d,m,h,p,b,w,g,l,c){if(!w)return;const a=f(d,m,h);return a?(a[0]=Math.ceil((a[0]+(c?g/2:0))/g),a[1]=Math.ceil(a[1]/l),a[0]=Math.min(Math.max(a[0],1),p+(c?1:0)),a[1]=Math.min(Math.max(a[1],1),b),a):void 0}},9504:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=f(2584);function m(l,c,a,o){const _=l-h(l,a),E=c-h(c,a),y=Math.abs(_-E)-(function(C,v,D){let O=0;const N=C-h(C,D),I=v-h(v,D);for(let H=0;H<Math.abs(N-I);H++){const J=p(C,v)==="A"?-1:1,re=D.buffer.lines.get(N+J*H);re!=null&&re.isWrapped&&O++}return O})(l,c,a);return g(y,w(p(l,c),o))}function h(l,c){let a=0,o=c.buffer.lines.get(l),_=o==null?void 0:o.isWrapped;for(;_&&l>=0&&l<c.rows;)a++,o=c.buffer.lines.get(--l),_=o==null?void 0:o.isWrapped;return a}function p(l,c){return l>c?"A":"B"}function b(l,c,a,o,_,E){let y=l,C=c,v="";for(;y!==a||C!==o;)y+=_?1:-1,_&&y>E.cols-1?(v+=E.buffer.translateBufferLineToString(C,!1,l,y),y=0,l=0,C++):!_&&y<0&&(v+=E.buffer.translateBufferLineToString(C,!1,0,l+1),y=E.cols-1,l=y,C--);return v+E.buffer.translateBufferLineToString(C,!1,l,y)}function w(l,c){const a=c?"O":"[";return d.C0.ESC+a+l}function g(l,c){l=Math.floor(l);let a="";for(let o=0;o<l;o++)a+=c;return a}u.moveToCellSequence=function(l,c,a,o){const _=a.buffer.x,E=a.buffer.y;if(!a.buffer.hasScrollback)return(function(v,D,O,N,I,H){return m(D,N,I,H).length===0?"":g(b(v,D,v,D-h(D,I),!1,I).length,w("D",H))})(_,E,0,c,a,o)+m(E,c,a,o)+(function(v,D,O,N,I,H){let J;J=m(D,N,I,H).length>0?N-h(N,I):D;const re=N,U=(function($,se,A,B,x,M){let V;return V=m(A,B,x,M).length>0?B-h(B,x):se,$<A&&V<=B||$>=A&&V<B?"C":"D"})(v,D,O,N,I,H);return g(b(v,J,O,re,U==="C",I).length,w(U,H))})(_,E,l,c,a,o);let y;if(E===c)return y=_>l?"D":"C",g(Math.abs(_-l),w(y,o));y=E>c?"D":"C";const C=Math.abs(E-c);return g((function(v,D){return D.cols-v})(E>c?l:_,a)+(C-1)*a.cols+1+((E>c?_:l)-1),w(y,o))}},1296:function(K,u,f){var d=this&&this.__decorate||function(H,J,re,U){var $,se=arguments.length,A=se<3?J:U===null?U=Object.getOwnPropertyDescriptor(J,re):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(H,J,re,U);else for(var B=H.length-1;B>=0;B--)($=H[B])&&(A=(se<3?$(A):se>3?$(J,re,A):$(J,re))||A);return se>3&&A&&Object.defineProperty(J,re,A),A},m=this&&this.__param||function(H,J){return function(re,U){J(re,U,H)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=f(3787),p=f(2550),b=f(2223),w=f(6171),g=f(6052),l=f(4725),c=f(8055),a=f(8460),o=f(844),_=f(2585),E="xterm-dom-renderer-owner-",y="xterm-rows",C="xterm-fg-",v="xterm-bg-",D="xterm-focus",O="xterm-selection";let N=1,I=u.DomRenderer=class extends o.Disposable{constructor(H,J,re,U,$,se,A,B,x,M,V,G,Q){super(),this._terminal=H,this._document=J,this._element=re,this._screenElement=U,this._viewportElement=$,this._helperContainer=se,this._linkifier2=A,this._charSizeService=x,this._optionsService=M,this._bufferService=V,this._coreBrowserService=G,this._themeService=Q,this._terminalClass=N++,this._rowElements=[],this._selectionRenderModel=(0,g.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new a.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(y),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),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((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,o.toDisposable)((()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new 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 H=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*H,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*H),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/H),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/H),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const re of this._rowElements)re.style.width=`${this.dimensions.css.canvas.width}px`,re.style.height=`${this.dimensions.css.cell.height}px`,re.style.lineHeight=`${this.dimensions.css.cell.height}px`,re.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const J=`${this._terminalSelector} .${y} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=J,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(H){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let J=`${this._terminalSelector} .${y} { color: ${H.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;J+=`${this._terminalSelector} .${y} .xterm-dim { color: ${c.color.multiplyOpacity(H.foreground,.5).css};}`,J+=`${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 re=`blink_underline_${this._terminalClass}`,U=`blink_bar_${this._terminalClass}`,$=`blink_block_${this._terminalClass}`;J+=`@keyframes ${re} { 50% { border-bottom-style: hidden; }}`,J+=`@keyframes ${U} { 50% { box-shadow: none; }}`,J+=`@keyframes ${$} { 0% { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css}; } 50% { background-color: inherit; color: ${H.cursor.css}; }}`,J+=`${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${re} 1s step-end infinite;}${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css};}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${H.cursor.css} !important; color: ${H.cursorAccent.css} !important;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${H.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${H.cursor.css} inset;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${H.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,J+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${H.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${H.selectionInactiveBackgroundOpaque.css};}`;for(const[se,A]of H.ansi.entries())J+=`${this._terminalSelector} .${C}${se} { color: ${A.css}; }${this._terminalSelector} .${C}${se}.xterm-dim { color: ${c.color.multiplyOpacity(A,.5).css}; }${this._terminalSelector} .${v}${se} { background-color: ${A.css}; }`;J+=`${this._terminalSelector} .${C}${b.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(H.background).css}; }${this._terminalSelector} .${C}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(H.background),.5).css}; }${this._terminalSelector} .${v}${b.INVERTED_DEFAULT_COLOR} { background-color: ${H.foreground.css}; }`,this._themeStyleElement.textContent=J}_setDefaultSpacing(){const H=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${H}px`,this._rowFactory.defaultSpacing=H}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(H,J){for(let re=this._rowElements.length;re<=J;re++){const U=this._document.createElement("div");this._rowContainer.appendChild(U),this._rowElements.push(U)}for(;this._rowElements.length>J;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(H,J){this._refreshRowElements(H,J),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(H,J,re){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(H,J,re),this.renderRows(0,this._bufferService.rows-1),!H||!J)return;this._selectionRenderModel.update(this._terminal,H,J,re);const U=this._selectionRenderModel.viewportStartRow,$=this._selectionRenderModel.viewportEndRow,se=this._selectionRenderModel.viewportCappedStartRow,A=this._selectionRenderModel.viewportCappedEndRow;if(se>=this._bufferService.rows||A<0)return;const B=this._document.createDocumentFragment();if(re){const x=H[0]>J[0];B.appendChild(this._createSelectionElement(se,x?J[0]:H[0],x?H[0]:J[0],A-se+1))}else{const x=U===se?H[0]:0,M=se===$?J[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(se,x,M));const V=A-se-1;if(B.appendChild(this._createSelectionElement(se+1,0,this._bufferService.cols,V)),se!==A){const G=$===A?J[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(A,0,G))}}this._selectionContainer.appendChild(B)}_createSelectionElement(H,J,re,U=1){const $=this._document.createElement("div"),se=J*this.dimensions.css.cell.width;let A=this.dimensions.css.cell.width*(re-J);return se+A>this.dimensions.css.canvas.width&&(A=this.dimensions.css.canvas.width-se),$.style.height=U*this.dimensions.css.cell.height+"px",$.style.top=H*this.dimensions.css.cell.height+"px",$.style.left=`${se}px`,$.style.width=`${A}px`,$}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const H of this._rowElements)H.replaceChildren()}renderRows(H,J){const re=this._bufferService.buffer,U=re.ybase+re.y,$=Math.min(re.x,this._bufferService.cols-1),se=this._optionsService.rawOptions.cursorBlink,A=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let x=H;x<=J;x++){const M=x+re.ydisp,V=this._rowElements[x],G=re.lines.get(M);if(!V||!G)break;V.replaceChildren(...this._rowFactory.createRow(G,M,M===U,A,B,$,se,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!0)}_handleLinkLeave(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!1)}_setCellUnderline(H,J,re,U,$,se){re<0&&(H=0),U<0&&(J=0);const A=this._bufferService.rows-1;re=Math.max(Math.min(re,A),0),U=Math.max(Math.min(U,A),0),$=Math.min($,this._bufferService.cols);const B=this._bufferService.buffer,x=B.ybase+B.y,M=Math.min(B.x,$-1),V=this._optionsService.rawOptions.cursorBlink,G=this._optionsService.rawOptions.cursorStyle,Q=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=re;he<=U;++he){const q=he+B.ydisp,R=this._rowElements[he],le=B.lines.get(q);if(!R||!le)break;R.replaceChildren(...this._rowFactory.createRow(le,q,q===x,G,Q,M,V,this.dimensions.css.cell.width,this._widthCache,se?he===re?H:0:-1,se?(he===U?J:$)-1:-1))}}};u.DomRenderer=I=d([m(7,_.IInstantiationService),m(8,l.ICharSizeService),m(9,_.IOptionsService),m(10,_.IBufferService),m(11,l.ICoreBrowserService),m(12,l.IThemeService)],I)},3787:function(K,u,f){var d=this&&this.__decorate||function(y,C,v,D){var O,N=arguments.length,I=N<3?C:D===null?D=Object.getOwnPropertyDescriptor(C,v):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(y,C,v,D);else for(var H=y.length-1;H>=0;H--)(O=y[H])&&(I=(N<3?O(I):N>3?O(C,v,I):O(C,v))||I);return N>3&&I&&Object.defineProperty(C,v,I),I},m=this&&this.__param||function(y,C){return function(v,D){C(v,D,y)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=f(2223),p=f(643),b=f(511),w=f(2585),g=f(8055),l=f(4725),c=f(4269),a=f(6171),o=f(3734);let _=u.DomRendererRowFactory=class{constructor(y,C,v,D,O,N,I){this._document=y,this._characterJoinerService=C,this._optionsService=v,this._coreBrowserService=D,this._coreService=O,this._decorationService=N,this._themeService=I,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(y,C,v){this._selectionStart=y,this._selectionEnd=C,this._columnSelectMode=v}createRow(y,C,v,D,O,N,I,H,J,re,U){const $=[],se=this._characterJoinerService.getJoinedCharacters(C),A=this._themeService.colors;let B,x=y.getNoBgTrimmedLength();v&&x<N+1&&(x=N+1);let M=0,V="",G=0,Q=0,he=0,q=!1,R=0,le=!1,ie=0;const de=[],fe=re!==-1&&U!==-1;for(let Ee=0;Ee<x;Ee++){y.loadCell(Ee,this._workCell);let Be=this._workCell.getWidth();if(Be===0)continue;let Ie=!1,it=Ee,Se=this._workCell;if(se.length>0&&Ee===se[0][0]){Ie=!0;const Pe=se.shift();Se=new c.JoinedCellData(this._workCell,y.translateToString(!0,Pe[0],Pe[1]),Pe[1]-Pe[0]),it=Pe[1]-1,Be=Se.getWidth()}const di=this._isCellInSelection(Ee,C),qi=v&&Ee===N,Ii=fe&&Ee>=re&&Ee<=U;let Pi=!1;this._decorationService.forEachDecorationAtCell(Ee,C,void 0,(Pe=>{Pi=!0}));let us=Se.getChars()||p.WHITESPACE_CELL_CHAR;if(us===" "&&(Se.isUnderline()||Se.isOverline())&&(us=" "),ie=Be*H-J.get(us,Se.isBold(),Se.isItalic()),B){if(M&&(di&&le||!di&&!le&&Se.bg===G)&&(di&&le&&A.selectionForeground||Se.fg===Q)&&Se.extended.ext===he&&Ii===q&&ie===R&&!qi&&!Ie&&!Pi){Se.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=us,M++;continue}M&&(B.textContent=V),B=this._document.createElement("span"),M=0,V=""}else B=this._document.createElement("span");if(G=Se.bg,Q=Se.fg,he=Se.extended.ext,q=Ii,R=ie,le=di,Ie&&N>=Ee&&N<=it&&(N=Ee),!this._coreService.isCursorHidden&&qi&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&de.push("xterm-cursor-blink"),de.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":de.push("xterm-cursor-outline");break;case"block":de.push("xterm-cursor-block");break;case"bar":de.push("xterm-cursor-bar");break;case"underline":de.push("xterm-cursor-underline")}}if(Se.isBold()&&de.push("xterm-bold"),Se.isItalic()&&de.push("xterm-italic"),Se.isDim()&&de.push("xterm-dim"),V=Se.isInvisible()?p.WHITESPACE_CELL_CHAR:Se.getChars()||p.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(de.push(`xterm-underline-${Se.extended.underlineStyle}`),V===" "&&(V=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let Pe=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&Pe<8&&(Pe+=8),B.style.textDecorationColor=A.ansi[Pe].css}Se.isOverline()&&(de.push("xterm-overline"),V===" "&&(V=" ")),Se.isStrikethrough()&&de.push("xterm-strikethrough"),Ii&&(B.style.textDecoration="underline");let ft=Se.getFgColor(),et=Se.getFgColorMode(),Mt=Se.getBgColor(),_i=Se.getBgColorMode();const hs=!!Se.isInverse();if(hs){const Pe=ft;ft=Mt,Mt=Pe;const Gi=et;et=_i,_i=Gi}let yt,fs,It,Yi=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,C,void 0,(Pe=>{Pe.options.layer!=="top"&&Yi||(Pe.backgroundColorRGB&&(_i=50331648,Mt=Pe.backgroundColorRGB.rgba>>8&16777215,yt=Pe.backgroundColorRGB),Pe.foregroundColorRGB&&(et=50331648,ft=Pe.foregroundColorRGB.rgba>>8&16777215,fs=Pe.foregroundColorRGB),Yi=Pe.options.layer==="top")})),!Yi&&di&&(yt=this._coreBrowserService.isFocused?A.selectionBackgroundOpaque:A.selectionInactiveBackgroundOpaque,Mt=yt.rgba>>8&16777215,_i=50331648,Yi=!0,A.selectionForeground&&(et=50331648,ft=A.selectionForeground.rgba>>8&16777215,fs=A.selectionForeground)),Yi&&de.push("xterm-decoration-top"),_i){case 16777216:case 33554432:It=A.ansi[Mt],de.push(`xterm-bg-${Mt}`);break;case 50331648:It=g.channels.toColor(Mt>>16,Mt>>8&255,255&Mt),this._addStyle(B,`background-color:#${E((Mt>>>0).toString(16),"0",6)}`);break;default:hs?(It=A.foreground,de.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):It=A.background}switch(yt||Se.isDim()&&(yt=g.color.multiplyOpacity(It,.5)),et){case 16777216:case 33554432:Se.isBold()&&ft<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ft+=8),this._applyMinimumContrast(B,It,A.ansi[ft],Se,yt,void 0)||de.push(`xterm-fg-${ft}`);break;case 50331648:const Pe=g.channels.toColor(ft>>16&255,ft>>8&255,255&ft);this._applyMinimumContrast(B,It,Pe,Se,yt,fs)||this._addStyle(B,`color:#${E(ft.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,It,A.foreground,Se,yt,fs)||hs&&de.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}de.length&&(B.className=de.join(" "),de.length=0),qi||Ie||Pi?B.textContent=V:M++,ie!==this.defaultSpacing&&(B.style.letterSpacing=`${ie}px`),$.push(B),Ee=it}return B&&M&&(B.textContent=V),$}_applyMinimumContrast(y,C,v,D,O,N){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const I=this._getContrastCache(D);let H;if(O||N||(H=I.getColor(C.rgba,v.rgba)),H===void 0){const J=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);H=g.color.ensureContrastRatio(O||C,N||v,J),I.setColor((O||C).rgba,(N||v).rgba,H??null)}return!!H&&(this._addStyle(y,`color:${H.css}`),!0)}_getContrastCache(y){return y.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(y,C){y.setAttribute("style",`${y.getAttribute("style")||""}${C};`)}_isCellInSelection(y,C){const v=this._selectionStart,D=this._selectionEnd;return!(!v||!D)&&(this._columnSelectMode?v[0]<=D[0]?y>=v[0]&&C>=v[1]&&y<D[0]&&C<=D[1]:y<v[0]&&C>=v[1]&&y>=D[0]&&C<=D[1]:C>v[1]&&C<D[1]||v[1]===D[1]&&C===v[1]&&y>=v[0]&&y<D[0]||v[1]<D[1]&&C===D[1]&&y<D[0]||v[1]<D[1]&&C===v[1]&&y>=v[0])}};function E(y,C,v){for(;y.length<v;)y=C+y;return y}u.DomRendererRowFactory=_=d([m(1,l.ICharacterJoinerService),m(2,w.IOptionsService),m(3,l.ICoreBrowserService),m(4,w.ICoreService),m(5,w.IDecorationService),m(6,l.IThemeService)],_)},2550:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(f,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=f.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const m=f.createElement("span");m.classList.add("xterm-char-measure-element");const h=f.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const p=f.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const b=f.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[m,h,p,b],this._container.appendChild(m),this._container.appendChild(h),this._container.appendChild(p),this._container.appendChild(b),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(f,d,m,h){f===this._font&&d===this._fontSize&&m===this._weight&&h===this._weightBold||(this._font=f,this._fontSize=d,this._weight=m,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(f,d,m){let h=0;if(!d&&!m&&f.length===1&&(h=f.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const w=this._measure(f,0);return w>0&&(this._flat[h]=w),w}let p=f;d&&(p+="B"),m&&(p+="I");let b=this._holey.get(p);if(b===void 0){let w=0;d&&(w|=1),m&&(w|=2),b=this._measure(f,w),b>0&&this._holey.set(p,b)}return b}_measure(f,d){const m=this._measureElements[d];return m.textContent=f.repeat(32),m.offsetWidth/32}}},2223:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const d=f(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(K,u)=>{function f(m){return 57508<=m&&m<=57558}function d(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(u,"__esModule",{value:!0}),u.computeNextVariantOffset=u.createRenderDimensions=u.treatGlyphAsBackgroundColor=u.allowRescaling=u.isEmoji=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},u.isPowerlineGlyph=f,u.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},u.isEmoji=d,u.allowRescaling=function(m,h,p,b){return h===1&&p>Math.ceil(1.5*b)&&m!==void 0&&m>255&&!d(m)&&!f(m)&&!(function(w){return 57344<=w&&w<=63743})(m)},u.treatGlyphAsBackgroundColor=function(m){return f(m)||(function(h){return 9472<=h&&h<=9631})(m)},u.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},u.computeNextVariantOffset=function(m,h,p=0){return(m-(2*Math.round(h)-p))%(2*Math.round(h))}},6052:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createSelectionRenderModel=void 0;class f{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,h,p,b=!1){if(this.selectionStart=h,this.selectionEnd=p,!h||!p||h[0]===p[0]&&h[1]===p[1])return void this.clear();const w=m.buffers.active.ydisp,g=h[1]-w,l=p[1]-w,c=Math.max(g,0),a=Math.min(l,m.rows-1);c>=m.rows||a<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=g,this.viewportEndRow=l,this.viewportCappedStartRow=c,this.viewportCappedEndRow=a,this.startCol=h[0],this.endCol=p[0])}isCellSelected(m,h,p){return!!this.hasSelection&&(p-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&p>=this.viewportCappedStartRow&&h<this.endCol&&p<=this.viewportCappedEndRow:h<this.startCol&&p>=this.viewportCappedStartRow&&h>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&h>=this.startCol)}}u.createSelectionRenderModel=function(){return new f}},456:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(f){this._bufferService=f,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?f%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)-1]:[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[f,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[Math.max(f,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const f=this.selectionStart,d=this.selectionEnd;return!(!f||!d)&&(f[1]>d[1]||f[1]===d[1]&&f[0]>d[0])}handleTrim(f){return this.selectionStart&&(this.selectionStart[1]-=f),this.selectionEnd&&(this.selectionEnd[1]-=f),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(K,u,f){var d=this&&this.__decorate||function(a,o,_,E){var y,C=arguments.length,v=C<3?o:E===null?E=Object.getOwnPropertyDescriptor(o,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,E);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(v=(C<3?y(v):C>3?y(o,_,v):y(o,_))||v);return C>3&&v&&Object.defineProperty(o,_,v),v},m=this&&this.__param||function(a,o){return function(_,E){o(_,E,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=f(2585),p=f(8460),b=f(844);let w=u.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(a,o,_){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 c(this._optionsService))}catch{this._measureStrategy=this.register(new l(a,o,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};u.CharSizeService=w=d([m(2,h.IOptionsService)],w);class g extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(o,_){o!==void 0&&o>0&&_!==void 0&&_>0&&(this._result.width=o,this._result.height=_)}}class l extends g{constructor(o,_,E){super(),this._document=o,this._parentElement=_,this._optionsService=E,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class c extends g{constructor(o){super(),this._optionsService=o,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 o=this._ctx.measureText("W");return this._validateAndSet(o.width,o.fontBoundingBoxAscent+o.fontBoundingBoxDescent),this._result}}},4269:function(K,u,f){var d=this&&this.__decorate||function(c,a,o,_){var E,y=arguments.length,C=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(E=c[v])&&(C=(y<3?E(C):y>3?E(a,o,C):E(a,o))||C);return y>3&&C&&Object.defineProperty(a,o,C),C},m=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=f(3734),p=f(643),b=f(511),w=f(2585);class g extends h.AttributeData{constructor(a,o,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=o,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=g;let l=u.CharacterJoinerService=class Vf{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(a){const o={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(o),o.id}deregister(a){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===a)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(a);if(!o||o.length===0)return[];const _=[],E=o.translateToString(!0);let y=0,C=0,v=0,D=o.getFg(0),O=o.getBg(0);for(let N=0;N<o.getTrimmedLength();N++)if(o.loadCell(N,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==O){if(N-y>1){const I=this._getJoinedRanges(E,v,C,o,y);for(let H=0;H<I.length;H++)_.push(I[H])}y=N,v=C,D=this._workCell.fg,O=this._workCell.bg}C+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-y>1){const N=this._getJoinedRanges(E,v,C,o,y);for(let I=0;I<N.length;I++)_.push(N[I])}return _}_getJoinedRanges(a,o,_,E,y){const C=a.substring(o,_);let v=[];try{v=this._characterJoiners[0].handler(C)}catch(D){console.error(D)}for(let D=1;D<this._characterJoiners.length;D++)try{const O=this._characterJoiners[D].handler(C);for(let N=0;N<O.length;N++)Vf._mergeRanges(v,O[N])}catch(O){console.error(O)}return this._stringRangesToCellRanges(v,E,y),v}_stringRangesToCellRanges(a,o,_){let E=0,y=!1,C=0,v=a[E];if(v){for(let D=_;D<this._bufferService.cols;D++){const O=o.getWidth(D),N=o.getString(D).length||p.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!y&&v[0]<=C&&(v[0]=D,y=!0),v[1]<=C){if(v[1]=D,v=a[++E],!v)break;v[0]<=C?(v[0]=D,y=!0):y=!1}C+=N}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(a,o){let _=!1;for(let E=0;E<a.length;E++){const y=a[E];if(_){if(o[1]<=y[0])return a[E-1][1]=o[1],a;if(o[1]<=y[1])return a[E-1][1]=Math.max(o[1],y[1]),a.splice(E,1),a;a.splice(E,1),E--}else{if(o[1]<=y[0])return a.splice(E,0,o),a;if(o[1]<=y[1])return y[0]=Math.min(o[0],y[0]),a;o[0]<y[1]&&(y[0]=Math.min(o[0],y[0]),_=!0)}}return _?a[a.length-1][1]=o[1]:a.push(o),a}};u.CharacterJoinerService=l=d([m(0,w.IBufferService)],l)},5114:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0;const d=f(844),m=f(8460),h=f(3656);class p extends d.Disposable{constructor(g,l,c){super(),this._textarea=g,this._window=l,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new b(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((a=>this._screenDprMonitor.setWindow(a)))),this.register((0,m.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(g){this._window!==g&&(this._window=g,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}u.CoreBrowserService=p;class b extends d.Disposable{constructor(g){super(),this._parentWindow=g,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(g){this._parentWindow=g,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)==null||g.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:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.LinkProviderService=void 0;const d=f(844);class m extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const b=this.linkProviders.indexOf(p);b!==-1&&this.linkProviders.splice(b,1)}}}}u.LinkProviderService=m},8934:function(K,u,f){var d=this&&this.__decorate||function(w,g,l,c){var a,o=arguments.length,_=o<3?g:c===null?c=Object.getOwnPropertyDescriptor(g,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(w,g,l,c);else for(var E=w.length-1;E>=0;E--)(a=w[E])&&(_=(o<3?a(_):o>3?a(g,l,_):a(g,l))||_);return o>3&&_&&Object.defineProperty(g,l,_),_},m=this&&this.__param||function(w,g){return function(l,c){g(l,c,w)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=f(4725),p=f(9806);let b=u.MouseService=class{constructor(w,g){this._renderService=w,this._charSizeService=g}getCoords(w,g,l,c,a){return(0,p.getCoords)(window,w,g,l,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(w,g){const l=(0,p.getCoordsRelativeToElement)(window,w,g);if(this._charSizeService.hasValidSize)return l[0]=Math.min(Math.max(l[0],0),this._renderService.dimensions.css.canvas.width-1),l[1]=Math.min(Math.max(l[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(l[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(l[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(l[0]),y:Math.floor(l[1])}}};u.MouseService=b=d([m(0,h.IRenderService),m(1,h.ICharSizeService)],b)},3230:function(K,u,f){var d=this&&this.__decorate||function(a,o,_,E){var y,C=arguments.length,v=C<3?o:E===null?E=Object.getOwnPropertyDescriptor(o,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,E);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(v=(C<3?y(v):C>3?y(o,_,v):y(o,_))||v);return C>3&&v&&Object.defineProperty(o,_,v),v},m=this&&this.__param||function(a,o){return function(_,E){o(_,E,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=f(6193),p=f(4725),b=f(8460),w=f(844),g=f(7226),l=f(2585);let c=u.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(a,o,_,E,y,C,v,D){super(),this._rowCount=a,this._charSizeService=E,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new g.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 b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((O,N)=>this._renderRows(O,N)),v),this.register(this._renderDebouncer),this.register(v.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(C.onResize((()=>this._fullRefresh()))),this.register(C.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(y.onDecorationRegistered((()=>this._fullRefresh()))),this.register(y.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(C.cols,C.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(C.buffer.y,C.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(v.window,o),this.register(v.onWindowChange((O=>this._registerIntersectionObserver(O,o))))}_registerIntersectionObserver(a,o){if("IntersectionObserver"in a){const _=new a.IntersectionObserver((E=>this._handleIntersectionChange(E[E.length-1])),{threshold:0});_.observe(o),this._observerDisposable.value=(0,w.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(a){this._isPaused=a.isIntersecting===void 0?a.intersectionRatio===0:!a.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(a,o,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(a,o,this._rowCount))}_renderRows(a,o){this._renderer.value&&(a=Math.min(a,this._rowCount-1),o=Math.min(o,this._rowCount-1),this._renderer.value.renderRows(a,o),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:a,end:o}),this._onRender.fire({start:a,end:o}),this._isNextRenderRedrawOnly=!0)}resize(a,o){this._rowCount=o,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(a){this._renderer.value=a,this._renderer.value&&(this._renderer.value.onRequestRedraw((o=>this.refreshRows(o.start,o.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(a){return this._renderDebouncer.addRefreshCallback(a)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var a,o;this._renderer.value&&((o=(a=this._renderer.value).clearTextureAtlas)==null||o.call(a),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(a,o){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(a,o)})):this._renderer.value.handleResize(a,o),this._fullRefresh())}handleCharSizeChanged(){var a;(a=this._renderer.value)==null||a.handleCharSizeChanged()}handleBlur(){var a;(a=this._renderer.value)==null||a.handleBlur()}handleFocus(){var a;(a=this._renderer.value)==null||a.handleFocus()}handleSelectionChanged(a,o,_){var E;this._selectionState.start=a,this._selectionState.end=o,this._selectionState.columnSelectMode=_,(E=this._renderer.value)==null||E.handleSelectionChanged(a,o,_)}handleCursorMove(){var a;(a=this._renderer.value)==null||a.handleCursorMove()}clear(){var a;(a=this._renderer.value)==null||a.clear()}};u.RenderService=c=d([m(2,l.IOptionsService),m(3,p.ICharSizeService),m(4,l.IDecorationService),m(5,l.IBufferService),m(6,p.ICoreBrowserService),m(7,p.IThemeService)],c)},9312:function(K,u,f){var d=this&&this.__decorate||function(v,D,O,N){var I,H=arguments.length,J=H<3?D:N===null?N=Object.getOwnPropertyDescriptor(D,O):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")J=Reflect.decorate(v,D,O,N);else for(var re=v.length-1;re>=0;re--)(I=v[re])&&(J=(H<3?I(J):H>3?I(D,O,J):I(D,O))||J);return H>3&&J&&Object.defineProperty(D,O,J),J},m=this&&this.__param||function(v,D){return function(O,N){D(O,N,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=f(9806),p=f(9504),b=f(456),w=f(4725),g=f(8460),l=f(844),c=f(6114),a=f(4841),o=f(511),_=f(2585),E=" ",y=new RegExp(E,"g");let C=u.SelectionService=class extends l.Disposable{constructor(v,D,O,N,I,H,J,re,U){super(),this._element=v,this._screenElement=D,this._linkifier=O,this._bufferService=N,this._coreService=I,this._mouseService=H,this._optionsService=J,this._renderService=re,this._coreBrowserService=U,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new o.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new g.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new g.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=$=>this._handleMouseMove($),this._mouseUpListener=$=>this._handleMouseUp($),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim(($=>this._handleTrim($))),this.register(this._bufferService.buffers.onBufferActivate(($=>this._handleBufferActivate($)))),this.enable(),this._model=new b.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const v=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!v||!D||v[0]===D[0]&&v[1]===D[1])}get selectionText(){const v=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!v||!D)return"";const O=this._bufferService.buffer,N=[];if(this._activeSelectionMode===3){if(v[0]===D[0])return"";const I=v[0]<D[0]?v[0]:D[0],H=v[0]<D[0]?D[0]:v[0];for(let J=v[1];J<=D[1];J++){const re=O.translateBufferLineToString(J,!0,I,H);N.push(re)}}else{const I=v[1]===D[1]?D[0]:void 0;N.push(O.translateBufferLineToString(v[1],!0,v[0],I));for(let H=v[1]+1;H<=D[1]-1;H++){const J=O.lines.get(H),re=O.translateBufferLineToString(H,!0);J!=null&&J.isWrapped?N[N.length-1]+=re:N.push(re)}if(v[1]!==D[1]){const H=O.lines.get(D[1]),J=O.translateBufferLineToString(D[1],!0,0,D[0]);H&&H.isWrapped?N[N.length-1]+=J:N.push(J)}}return N.map((I=>I.replace(y," "))).join(c.isWindows?`\r
53
+ WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=y=d([m(0,p.IBufferService),m(1,p.IOptionsService),m(2,p.IOscLinkService)],y)},6193:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(f,d){this._renderCallback=f,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(f){return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(f,d,m){this._rowCount=m,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const f of this._refreshCallbacks)f(0);this._refreshCallbacks=[]}}},3236:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=f(3614),m=f(3656),h=f(3551),p=f(9042),y=f(3730),w=f(1680),g=f(3107),l=f(5744),c=f(2950),a=f(1296),o=f(428),_=f(4269),C=f(5114),b=f(8934),E=f(3230),v=f(9312),A=f(4725),O=f(6731),j=f(8055),I=f(8969),z=f(8460),Z=f(844),re=f(6114),q=f(8437),J=f(2584),se=f(7399),D=f(5941),k=f(9074),x=f(2585),M=f(5435),V=f(4567),G=f(779);class Q extends I.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(U={}){super(U),this.browser=re,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Z.MutableDisposable),this._onCursorMove=this.register(new z.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new z.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new z.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new z.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new z.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new z.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new z.EventEmitter),this._onBlur=this.register(new z.EventEmitter),this._onA11yCharEmitter=this.register(new z.EventEmitter),this._onA11yTabEmitter=this.register(new z.EventEmitter),this._onWillOpen=this.register(new z.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(k.DecorationService),this._instantiationService.setService(x.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(G.LinkProviderService),this._instantiationService.setService(A.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((R,le)=>this.refresh(R,le)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((R=>this._reportWindowsOptions(R)))),this.register(this._inputHandler.onColor((R=>this._handleColorEvent(R)))),this.register((0,z.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,z.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,z.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,z.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((R=>this._afterResize(R.cols,R.rows)))),this.register((0,Z.toDisposable)((()=>{var R,le;this._customKeyEventHandler=void 0,(le=(R=this.element)==null?void 0:R.parentNode)==null||le.removeChild(this.element)})))}_handleColorEvent(U){if(this._themeService)for(const R of U){let le,ie="";switch(R.index){case 256:le="foreground",ie="10";break;case 257:le="background",ie="11";break;case 258:le="cursor",ie="12";break;default:le="ansi",ie="4;"+R.index}switch(R.type){case 0:const de=j.color.toColorRGB(le==="ansi"?this._themeService.colors.ansi[R.index]:this._themeService.colors[le]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${ie};${(0,D.toRgbString)(de)}${J.C1_ESCAPED.ST}`);break;case 1:if(le==="ansi")this._themeService.modifyColors((fe=>fe.ansi[R.index]=j.channels.toColor(...R.color)));else{const fe=le;this._themeService.modifyColors((Ee=>Ee[fe]=j.channels.toColor(...R.color)))}break;case 2:this._themeService.restoreColor(R.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(U){U?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(U){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var U;return(U=this.textarea)==null?void 0:U.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const U=this.buffer.ybase+this.buffer.y,R=this.buffer.lines.get(U);if(!R)return;const le=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,de=R.getWidth(le),fe=this._renderService.dimensions.css.cell.width*de,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,Be=le*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Be+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",(R=>{this.hasSelection()&&(0,d.copyHandler)(R,this._selectionService)})));const U=R=>(0,d.handlePasteEvent)(R,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",U)),this.register((0,m.addDisposableDomListener)(this.element,"paste",U)),re.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(R=>{R.button===2&&(0,d.rightClickHandler)(R,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",(R=>{(0,d.rightClickHandler)(R,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),re.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",(R=>{R.button===1&&(0,d.moveTextAreaUnderMouseCursor)(R,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(U=>this._keyUp(U)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(U=>this._keyDown(U)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(U=>this._keyPress(U)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(U=>this._compositionHelper.compositionupdate(U)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(U=>this._inputEvent(U)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(U){var le;if(!U)throw new Error("Terminal requires a parent element.");if(U.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((le=this.element)==null?void 0:le.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=U.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"),U.appendChild(this.element);const R=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),R.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",(ie=>this.updateCursorStyle(ie)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),R.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),re.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,U.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(A.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",(ie=>this._handleTextAreaFocus(ie)))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(o.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(A.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(A.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(A.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(A.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ie=>this._onRender.fire(ie)))),this.onResize((ie=>this._renderService.resize(ie.cols,ie.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(b.MouseService),this._instantiationService.setService(A.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(R);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((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(v.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(A.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ie=>this._renderService.handleSelectionChanged(ie.start,ie.end,ie.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ie=>{this.textarea.value=ie,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ie=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(g.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(ie=>this._selectionService.handleMouseDown(ie)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ie=>this._handleScreenReaderModeOptionChange(ie)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ie=>{!this._overviewRulerRenderer&&ie&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(a.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const U=this,R=this.element;function le(fe){const Ee=U._mouseService.getMouseReportCoords(fe,U.screenElement);if(!Ee)return!1;let Be,Ie;switch(fe.overrideType||fe.type){case"mousemove":Ie=32,fe.buttons===void 0?(Be=3,fe.button!==void 0&&(Be=fe.button<3?fe.button:3)):Be=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Ie=0,Be=fe.button<3?fe.button:3;break;case"mousedown":Ie=1,Be=fe.button<3?fe.button:3;break;case"wheel":if(U._customWheelEventHandler&&U._customWheelEventHandler(fe)===!1||U.viewport.getLinesScrolled(fe)===0)return!1;Ie=fe.deltaY<0?0:1,Be=4;break;default:return!1}return!(Ie===void 0||Be===void 0||Be>4)&&U.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:Be,action:Ie,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:fe=>(le(fe),fe.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(fe)),wheel:fe=>(le(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&le(fe)},mousemove:fe=>{fe.buttons||le(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&fe?ie.mousemove||(R.addEventListener("mousemove",de.mousemove),ie.mousemove=de.mousemove):(R.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&fe?ie.wheel||(R.addEventListener("wheel",de.wheel,{passive:!1}),ie.wheel=de.wheel):(R.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&fe?ie.mouseup||(ie.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&fe?ie.mousedrag||(ie.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(R,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return le(fe),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(fe)}))),this.register((0,m.addDisposableDomListener)(R,"wheel",(fe=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(fe);if(Ee===0)return;const Be=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Ie="";for(let it=0;it<Math.abs(Ee);it++)Ie+=Be;return this.coreService.triggerDataEvent(Ie,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)(R,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,m.addDisposableDomListener)(R,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(U,R){var le;(le=this._renderService)==null||le.refreshRows(U,R)}updateCursorStyle(U){var R;(R=this._selectionService)!=null&&R.shouldColumnSelect(U)?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(U,R,le=0){var ie;le===1?(super.scrollLines(U,R,le),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(U)}paste(U){(0,d.paste)(U,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(U){this._customKeyEventHandler=U}attachCustomWheelEventHandler(U){this._customWheelEventHandler=U}registerLinkProvider(U){return this._linkProviderService.registerLinkProvider(U)}registerCharacterJoiner(U){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const R=this._characterJoinerService.register(U);return this.refresh(0,this.rows-1),R}deregisterCharacterJoiner(U){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(U)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(U){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+U)}registerDecoration(U){return this._decorationService.registerDecoration(U)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(U,R,le){this._selectionService.setSelection(U,R,le)}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 U;(U=this._selectionService)==null||U.clearSelection()}selectAll(){var U;(U=this._selectionService)==null||U.selectAll()}selectLines(U,R){var le;(le=this._selectionService)==null||le.selectLines(U,R)}_keyDown(U){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1)return!1;const R=this.browser.isMac&&this.options.macOptionIsMeta&&U.altKey;if(!R&&!this._compositionHelper.keydown(U))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;R||U.key!=="Dead"&&U.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const le=(0,se.evaluateKeyboardEvent)(U,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(U),le.type===3||le.type===2){const ie=this.rows-1;return this.scrollLines(le.type===2?-ie:ie),this.cancel(U,!0)}return le.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,U)||(le.cancel&&this.cancel(U,!0),!le.key||!!(U.key&&!U.ctrlKey&&!U.altKey&&!U.metaKey&&U.key.length===1&&U.key.charCodeAt(0)>=65&&U.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(le.key!==J.C0.ETX&&le.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:le.key,domEvent:U}),this._showCursor(),this.coreService.triggerDataEvent(le.key,!0),!this.optionsService.rawOptions.screenReaderMode||U.altKey||U.ctrlKey?this.cancel(U,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(U,R){const le=U.isMac&&!this.options.macOptionIsMeta&&R.altKey&&!R.ctrlKey&&!R.metaKey||U.isWindows&&R.altKey&&R.ctrlKey&&!R.metaKey||U.isWindows&&R.getModifierState("AltGraph");return R.type==="keypress"?le:le&&(!R.keyCode||R.keyCode>47)}_keyUp(U){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1||((function(R){return R.keyCode===16||R.keyCode===17||R.keyCode===18})(U)||this.focus(),this.updateCursorStyle(U),this._keyPressHandled=!1)}_keyPress(U){let R;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(U)===!1)return!1;if(this.cancel(U),U.charCode)R=U.charCode;else if(U.which===null||U.which===void 0)R=U.keyCode;else{if(U.which===0||U.charCode===0)return!1;R=U.which}return!(!R||(U.altKey||U.ctrlKey||U.metaKey)&&!this._isThirdLevelShift(this.browser,U)||(R=String.fromCharCode(R),this._onKey.fire({key:R,domEvent:U}),this._showCursor(),this.coreService.triggerDataEvent(R,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(U){if(U.data&&U.inputType==="insertText"&&(!U.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const R=U.data;return this.coreService.triggerDataEvent(R,!0),this.cancel(U),!0}return!1}resize(U,R){U!==this.cols||R!==this.rows?super.resize(U,R):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(U,R){var le,ie;(le=this._charSizeService)==null||le.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var U;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 R=1;R<this.rows;R++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(U=this.viewport)==null||U.reset(),this.refresh(0,this.rows-1)}}reset(){var R,le;this.options.rows=this.rows,this.options.cols=this.cols;const U=this._customKeyEventHandler;this._setup(),super.reset(),(R=this._selectionService)==null||R.reset(),this._decorationService.reset(),(le=this.viewport)==null||le.reset(),this._customKeyEventHandler=U,this.refresh(0,this.rows-1)}clearTextureAtlas(){var U;(U=this._renderService)==null||U.clearTextureAtlas()}_reportFocus(){var U;(U=this.element)!=null&&U.classList.contains("focus")?this.coreService.triggerDataEvent(J.C0.ESC+"[I"):this.coreService.triggerDataEvent(J.C0.ESC+"[O")}_reportWindowsOptions(U){if(this._renderService)switch(U){case M.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const R=this._renderService.dimensions.css.canvas.width.toFixed(0),le=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[4;${le};${R}t`);break;case M.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[6;${de};${ie}t`)}}cancel(U,R){if(this.options.cancelEvents||R)return U.preventDefault(),U.stopPropagation(),!1}}u.Terminal=Q},9924:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(f,d=1e3){this._renderCallback=f,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(f,d,m){this._rowCount=m,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=h-this._lastRefreshMs,y=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d)}}},1680:function(K,u,f){var d=this&&this.__decorate||function(c,a,o,_){var C,b=arguments.length,E=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(b<3?C(E):b>3?C(a,o,E):C(a,o))||E);return b>3&&E&&Object.defineProperty(a,o,E),E},m=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=f(3656),p=f(4725),y=f(8460),w=f(844),g=f(2585);let l=u.Viewport=class extends w.Disposable{constructor(c,a,o,_,C,b,E,v){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=o,this._optionsService=_,this._charSizeService=C,this._renderService=b,this._coreBrowserService=E,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 y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((A=>this._activeBuffer=A.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((A=>this._renderDimensions=A))),this._handleThemeChange(v.colors),this.register(v.onChangeColors((A=>this._handleThemeChange(A)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(c){if(c)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:a,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(c,a){const o=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&o<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const a=this._getPixelsScrolled(c);return a!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+a:this._smoothScrollState.target+=a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(c,a){var v;let o,_="";const C=[],b=a??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let A=c;A<b;A++){const O=E.get(A);if(!O)continue;const j=(v=E.get(A+1))==null?void 0:v.isWrapped;if(_+=O.translateToString(!j),!j||A===E.length-1){const I=document.createElement("div");I.textContent=_,C.push(I),_.length>0&&(o=I),_=""}}return{bufferElements:C,cursorElement:o}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(c,a){const o=this._optionsService.rawOptions.fastScrollModifier;return o==="alt"&&a.altKey||o==="ctrl"&&a.ctrlKey||o==="shift"&&a.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const a=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}};u.Viewport=l=d([m(2,g.IBufferService),m(3,g.IOptionsService),m(4,p.ICharSizeService),m(5,p.IRenderService),m(6,p.ICoreBrowserService),m(7,p.IThemeService)],l)},3107:function(K,u,f){var d=this&&this.__decorate||function(g,l,c,a){var o,_=arguments.length,C=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,l,c,a);else for(var b=g.length-1;b>=0;b--)(o=g[b])&&(C=(_<3?o(C):_>3?o(l,c,C):o(l,c))||C);return _>3&&C&&Object.defineProperty(l,c,C),C},m=this&&this.__param||function(g,l){return function(c,a){l(c,a,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=f(4725),p=f(844),y=f(2585);let w=u.BufferDecorationRenderer=class extends p.Disposable{constructor(g,l,c,a,o){super(),this._screenElement=g,this._bufferService=l,this._coreBrowserService=c,this._decorationService=a,this._renderService=o,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 g of this._decorationService.decorations)this._renderDecoration(g);this._dimensionsChanged=!1}_renderDecoration(g){this._refreshStyle(g),this._dimensionsChanged&&this._refreshXPosition(g)}_createElement(g){var a;const l=this._coreBrowserService.mainDocument.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((a=g==null?void 0:g.options)==null?void 0:a.layer)==="top"),l.style.width=`${Math.round((g.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(g.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(g.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",l.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const c=g.options.x??0;return c&&c>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(g,l),l}_refreshStyle(g){const l=g.marker.line-this._bufferService.buffers.active.ydisp;if(l<0||l>=this._bufferService.rows)g.element&&(g.element.style.display="none",g.onRenderEmitter.fire(g.element));else{let c=this._decorationElements.get(g);c||(c=this._createElement(g),g.element=c,this._decorationElements.set(g,c),this._container.appendChild(c),g.onDispose((()=>{this._decorationElements.delete(g),c.remove()}))),c.style.top=l*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",g.onRenderEmitter.fire(c)}}_refreshXPosition(g,l=g.element){if(!l)return;const c=g.options.x??0;(g.options.anchor||"left")==="right"?l.style.right=c?c*this._renderService.dimensions.css.cell.width+"px":"":l.style.left=c?c*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(g){var l;(l=this._decorationElements.get(g))==null||l.remove(),this._decorationElements.delete(g),g.dispose()}};u.BufferDecorationRenderer=w=d([m(1,y.IBufferService),m(2,h.ICoreBrowserService),m(3,y.IDecorationService),m(4,h.IRenderService)],w)},5871:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorZoneStore=void 0,u.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(f){if(f.options.overviewRulerOptions){for(const d of this._zones)if(d.color===f.options.overviewRulerOptions.color&&d.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,f.marker.line))return;if(this._lineAdjacentToZone(d,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(d,f.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=f.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=f.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=f.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=f.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:f.options.overviewRulerOptions.color,position:f.options.overviewRulerOptions.position,startBufferLine:f.marker.line,endBufferLine:f.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(f){this._linePadding=f}_lineIntersectsZone(f,d){return d>=f.startBufferLine&&d<=f.endBufferLine}_lineAdjacentToZone(f,d,m){return d>=f.startBufferLine-this._linePadding[m||"full"]&&d<=f.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)}}},5744:function(K,u,f){var d=this&&this.__decorate||function(o,_,C,b){var E,v=arguments.length,A=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,C):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(o,_,C,b);else for(var O=o.length-1;O>=0;O--)(E=o[O])&&(A=(v<3?E(A):v>3?E(_,C,A):E(_,C))||A);return v>3&&A&&Object.defineProperty(_,C,A),A},m=this&&this.__param||function(o,_){return function(C,b){_(C,b,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=f(5871),p=f(4725),y=f(844),w=f(2585),g={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let a=u.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(o,_,C,b,E,v,A){var j;super(),this._viewportElement=o,this._screenElement=_,this._bufferService=C,this._decorationService=b,this._renderService=E,this._optionsService=v,this._coreBrowserService=A,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(j=this._viewportElement.parentElement)==null||j.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var I;(I=this._canvas)==null||I.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 o=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);l.full=this._canvas.width,l.left=o,l.center=_,l.right=o,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=l.left,c.right=l.left+l.center}_refreshDrawHeightConstants(){g.full=Math.round(2*this._coreBrowserService.dpr);const o=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(o,12),6)*this._coreBrowserService.dpr);g.left=_,g.center=_,g.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.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 o=this._colorZoneStore.zones;for(const _ of o)_.position!=="full"&&this._renderColorZone(_);for(const _ of o)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(o){this._ctx.fillStyle=o.color,this._ctx.fillRect(c[o.position||"full"],Math.round((this._canvas.height-1)*(o.startBufferLine/this._bufferService.buffers.active.lines.length)-g[o.position||"full"]/2),l[o.position||"full"],Math.round((this._canvas.height-1)*((o.endBufferLine-o.startBufferLine)/this._bufferService.buffers.active.lines.length)+g[o.position||"full"]))}_queueRefresh(o,_){this._shouldUpdateDimensions=o||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=a=d([m(2,w.IBufferService),m(3,w.IDecorationService),m(4,p.IRenderService),m(5,w.IOptionsService),m(6,p.ICoreBrowserService)],a)},2950:function(K,u,f){var d=this&&this.__decorate||function(g,l,c,a){var o,_=arguments.length,C=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,l,c,a);else for(var b=g.length-1;b>=0;b--)(o=g[b])&&(C=(_<3?o(C):_>3?o(l,c,C):o(l,c))||C);return _>3&&C&&Object.defineProperty(l,c,C),C},m=this&&this.__param||function(g,l){return function(c,a){l(c,a,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=f(4725),p=f(2585),y=f(2584);let w=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(g,l,c,a,o,_){this._textarea=g,this._compositionView=l,this._bufferService=c,this._optionsService=a,this._coreService=o,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(g){this._compositionView.textContent=g.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(g){if(this._isComposing||this._isSendingComposition){if(g.keyCode===229||g.keyCode===16||g.keyCode===17||g.keyCode===18)return!1;this._finalizeComposition(!1)}return g.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(g){if(this._compositionView.classList.remove("active"),this._isComposing=!1,g){const l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,l.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(l.start,l.end):this._textarea.value.substring(l.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const l=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(l,!0)}}_handleAnyTextareaChanges(){const g=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const l=this._textarea.value,c=l.replace(g,"");this._dataAlreadySent=c,l.length>g.length?this._coreService.triggerDataEvent(c,!0):l.length<g.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):l.length===g.length&&l!==g&&this._coreService.triggerDataEvent(l,!0)}}),0)}updateCompositionElements(g){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=a+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=a+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}g||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=w=d([m(2,p.IBufferService),m(3,p.IOptionsService),m(4,p.ICoreService),m(5,h.IRenderService)],w)},9806:(K,u)=>{function f(d,m,h){const p=h.getBoundingClientRect(),y=d.getComputedStyle(h),w=parseInt(y.getPropertyValue("padding-left")),g=parseInt(y.getPropertyValue("padding-top"));return[m.clientX-p.left-w,m.clientY-p.top-g]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=f,u.getCoords=function(d,m,h,p,y,w,g,l,c){if(!w)return;const a=f(d,m,h);return a?(a[0]=Math.ceil((a[0]+(c?g/2:0))/g),a[1]=Math.ceil(a[1]/l),a[0]=Math.min(Math.max(a[0],1),p+(c?1:0)),a[1]=Math.min(Math.max(a[1],1),y),a):void 0}},9504:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=f(2584);function m(l,c,a,o){const _=l-h(l,a),C=c-h(c,a),b=Math.abs(_-C)-(function(E,v,A){let O=0;const j=E-h(E,A),I=v-h(v,A);for(let z=0;z<Math.abs(j-I);z++){const Z=p(E,v)==="A"?-1:1,re=A.buffer.lines.get(j+Z*z);re!=null&&re.isWrapped&&O++}return O})(l,c,a);return g(b,w(p(l,c),o))}function h(l,c){let a=0,o=c.buffer.lines.get(l),_=o==null?void 0:o.isWrapped;for(;_&&l>=0&&l<c.rows;)a++,o=c.buffer.lines.get(--l),_=o==null?void 0:o.isWrapped;return a}function p(l,c){return l>c?"A":"B"}function y(l,c,a,o,_,C){let b=l,E=c,v="";for(;b!==a||E!==o;)b+=_?1:-1,_&&b>C.cols-1?(v+=C.buffer.translateBufferLineToString(E,!1,l,b),b=0,l=0,E++):!_&&b<0&&(v+=C.buffer.translateBufferLineToString(E,!1,0,l+1),b=C.cols-1,l=b,E--);return v+C.buffer.translateBufferLineToString(E,!1,l,b)}function w(l,c){const a=c?"O":"[";return d.C0.ESC+a+l}function g(l,c){l=Math.floor(l);let a="";for(let o=0;o<l;o++)a+=c;return a}u.moveToCellSequence=function(l,c,a,o){const _=a.buffer.x,C=a.buffer.y;if(!a.buffer.hasScrollback)return(function(v,A,O,j,I,z){return m(A,j,I,z).length===0?"":g(y(v,A,v,A-h(A,I),!1,I).length,w("D",z))})(_,C,0,c,a,o)+m(C,c,a,o)+(function(v,A,O,j,I,z){let Z;Z=m(A,j,I,z).length>0?j-h(j,I):A;const re=j,q=(function(J,se,D,k,x,M){let V;return V=m(D,k,x,M).length>0?k-h(k,x):se,J<D&&V<=k||J>=D&&V<k?"C":"D"})(v,A,O,j,I,z);return g(y(v,Z,O,re,q==="C",I).length,w(q,z))})(_,C,l,c,a,o);let b;if(C===c)return b=_>l?"D":"C",g(Math.abs(_-l),w(b,o));b=C>c?"D":"C";const E=Math.abs(C-c);return g((function(v,A){return A.cols-v})(C>c?l:_,a)+(E-1)*a.cols+1+((C>c?_:l)-1),w(b,o))}},1296:function(K,u,f){var d=this&&this.__decorate||function(z,Z,re,q){var J,se=arguments.length,D=se<3?Z:q===null?q=Object.getOwnPropertyDescriptor(Z,re):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(z,Z,re,q);else for(var k=z.length-1;k>=0;k--)(J=z[k])&&(D=(se<3?J(D):se>3?J(Z,re,D):J(Z,re))||D);return se>3&&D&&Object.defineProperty(Z,re,D),D},m=this&&this.__param||function(z,Z){return function(re,q){Z(re,q,z)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=f(3787),p=f(2550),y=f(2223),w=f(6171),g=f(6052),l=f(4725),c=f(8055),a=f(8460),o=f(844),_=f(2585),C="xterm-dom-renderer-owner-",b="xterm-rows",E="xterm-fg-",v="xterm-bg-",A="xterm-focus",O="xterm-selection";let j=1,I=u.DomRenderer=class extends o.Disposable{constructor(z,Z,re,q,J,se,D,k,x,M,V,G,Q){super(),this._terminal=z,this._document=Z,this._element=re,this._screenElement=q,this._viewportElement=J,this._helperContainer=se,this._linkifier2=D,this._charSizeService=x,this._optionsService=M,this._bufferService=V,this._coreBrowserService=G,this._themeService=Q,this._terminalClass=j++,this._rowElements=[],this._selectionRenderModel=(0,g.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new a.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(b),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(O),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((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=k.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,o.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 z=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*z,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*z),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/z),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/z),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 re of this._rowElements)re.style.width=`${this.dimensions.css.canvas.width}px`,re.style.height=`${this.dimensions.css.cell.height}px`,re.style.lineHeight=`${this.dimensions.css.cell.height}px`,re.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Z=`${this._terminalSelector} .${b} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Z,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(z){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Z=`${this._terminalSelector} .${b} { color: ${z.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Z+=`${this._terminalSelector} .${b} .xterm-dim { color: ${c.color.multiplyOpacity(z.foreground,.5).css};}`,Z+=`${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 re=`blink_underline_${this._terminalClass}`,q=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;Z+=`@keyframes ${re} { 50% { border-bottom-style: hidden; }}`,Z+=`@keyframes ${q} { 50% { box-shadow: none; }}`,Z+=`@keyframes ${J} { 0% { background-color: ${z.cursor.css}; color: ${z.cursorAccent.css}; } 50% { background-color: inherit; color: ${z.cursor.css}; }}`,Z+=`${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${re} 1s step-end infinite;}${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${b}.${A} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block { background-color: ${z.cursor.css}; color: ${z.cursorAccent.css};}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${z.cursor.css} !important; color: ${z.cursorAccent.css} !important;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${z.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${z.cursor.css} inset;}${this._terminalSelector} .${b} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${z.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Z+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${z.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${z.selectionInactiveBackgroundOpaque.css};}`;for(const[se,D]of z.ansi.entries())Z+=`${this._terminalSelector} .${E}${se} { color: ${D.css}; }${this._terminalSelector} .${E}${se}.xterm-dim { color: ${c.color.multiplyOpacity(D,.5).css}; }${this._terminalSelector} .${v}${se} { background-color: ${D.css}; }`;Z+=`${this._terminalSelector} .${E}${y.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(z.background).css}; }${this._terminalSelector} .${E}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(z.background),.5).css}; }${this._terminalSelector} .${v}${y.INVERTED_DEFAULT_COLOR} { background-color: ${z.foreground.css}; }`,this._themeStyleElement.textContent=Z}_setDefaultSpacing(){const z=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${z}px`,this._rowFactory.defaultSpacing=z}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(z,Z){for(let re=this._rowElements.length;re<=Z;re++){const q=this._document.createElement("div");this._rowContainer.appendChild(q),this._rowElements.push(q)}for(;this._rowElements.length>Z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(z,Z){this._refreshRowElements(z,Z),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(A),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(A),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(z,Z,re){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(z,Z,re),this.renderRows(0,this._bufferService.rows-1),!z||!Z)return;this._selectionRenderModel.update(this._terminal,z,Z,re);const q=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,se=this._selectionRenderModel.viewportCappedStartRow,D=this._selectionRenderModel.viewportCappedEndRow;if(se>=this._bufferService.rows||D<0)return;const k=this._document.createDocumentFragment();if(re){const x=z[0]>Z[0];k.appendChild(this._createSelectionElement(se,x?Z[0]:z[0],x?z[0]:Z[0],D-se+1))}else{const x=q===se?z[0]:0,M=se===J?Z[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(se,x,M));const V=D-se-1;if(k.appendChild(this._createSelectionElement(se+1,0,this._bufferService.cols,V)),se!==D){const G=J===D?Z[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(D,0,G))}}this._selectionContainer.appendChild(k)}_createSelectionElement(z,Z,re,q=1){const J=this._document.createElement("div"),se=Z*this.dimensions.css.cell.width;let D=this.dimensions.css.cell.width*(re-Z);return se+D>this.dimensions.css.canvas.width&&(D=this.dimensions.css.canvas.width-se),J.style.height=q*this.dimensions.css.cell.height+"px",J.style.top=z*this.dimensions.css.cell.height+"px",J.style.left=`${se}px`,J.style.width=`${D}px`,J}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const z of this._rowElements)z.replaceChildren()}renderRows(z,Z){const re=this._bufferService.buffer,q=re.ybase+re.y,J=Math.min(re.x,this._bufferService.cols-1),se=this._optionsService.rawOptions.cursorBlink,D=this._optionsService.rawOptions.cursorStyle,k=this._optionsService.rawOptions.cursorInactiveStyle;for(let x=z;x<=Z;x++){const M=x+re.ydisp,V=this._rowElements[x],G=re.lines.get(M);if(!V||!G)break;V.replaceChildren(...this._rowFactory.createRow(G,M,M===q,D,k,J,se,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(z){this._setCellUnderline(z.x1,z.x2,z.y1,z.y2,z.cols,!0)}_handleLinkLeave(z){this._setCellUnderline(z.x1,z.x2,z.y1,z.y2,z.cols,!1)}_setCellUnderline(z,Z,re,q,J,se){re<0&&(z=0),q<0&&(Z=0);const D=this._bufferService.rows-1;re=Math.max(Math.min(re,D),0),q=Math.max(Math.min(q,D),0),J=Math.min(J,this._bufferService.cols);const k=this._bufferService.buffer,x=k.ybase+k.y,M=Math.min(k.x,J-1),V=this._optionsService.rawOptions.cursorBlink,G=this._optionsService.rawOptions.cursorStyle,Q=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=re;he<=q;++he){const U=he+k.ydisp,R=this._rowElements[he],le=k.lines.get(U);if(!R||!le)break;R.replaceChildren(...this._rowFactory.createRow(le,U,U===x,G,Q,M,V,this.dimensions.css.cell.width,this._widthCache,se?he===re?z:0:-1,se?(he===q?Z:J)-1:-1))}}};u.DomRenderer=I=d([m(7,_.IInstantiationService),m(8,l.ICharSizeService),m(9,_.IOptionsService),m(10,_.IBufferService),m(11,l.ICoreBrowserService),m(12,l.IThemeService)],I)},3787:function(K,u,f){var d=this&&this.__decorate||function(b,E,v,A){var O,j=arguments.length,I=j<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,v):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(b,E,v,A);else for(var z=b.length-1;z>=0;z--)(O=b[z])&&(I=(j<3?O(I):j>3?O(E,v,I):O(E,v))||I);return j>3&&I&&Object.defineProperty(E,v,I),I},m=this&&this.__param||function(b,E){return function(v,A){E(v,A,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=f(2223),p=f(643),y=f(511),w=f(2585),g=f(8055),l=f(4725),c=f(4269),a=f(6171),o=f(3734);let _=u.DomRendererRowFactory=class{constructor(b,E,v,A,O,j,I){this._document=b,this._characterJoinerService=E,this._optionsService=v,this._coreBrowserService=A,this._coreService=O,this._decorationService=j,this._themeService=I,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,E,v){this._selectionStart=b,this._selectionEnd=E,this._columnSelectMode=v}createRow(b,E,v,A,O,j,I,z,Z,re,q){const J=[],se=this._characterJoinerService.getJoinedCharacters(E),D=this._themeService.colors;let k,x=b.getNoBgTrimmedLength();v&&x<j+1&&(x=j+1);let M=0,V="",G=0,Q=0,he=0,U=!1,R=0,le=!1,ie=0;const de=[],fe=re!==-1&&q!==-1;for(let Ee=0;Ee<x;Ee++){b.loadCell(Ee,this._workCell);let Be=this._workCell.getWidth();if(Be===0)continue;let Ie=!1,it=Ee,Se=this._workCell;if(se.length>0&&Ee===se[0][0]){Ie=!0;const Pe=se.shift();Se=new c.JoinedCellData(this._workCell,b.translateToString(!0,Pe[0],Pe[1]),Pe[1]-Pe[0]),it=Pe[1]-1,Be=Se.getWidth()}const di=this._isCellInSelection(Ee,E),qi=v&&Ee===j,Ii=fe&&Ee>=re&&Ee<=q;let Pi=!1;this._decorationService.forEachDecorationAtCell(Ee,E,void 0,(Pe=>{Pi=!0}));let us=Se.getChars()||p.WHITESPACE_CELL_CHAR;if(us===" "&&(Se.isUnderline()||Se.isOverline())&&(us=" "),ie=Be*z-Z.get(us,Se.isBold(),Se.isItalic()),k){if(M&&(di&&le||!di&&!le&&Se.bg===G)&&(di&&le&&D.selectionForeground||Se.fg===Q)&&Se.extended.ext===he&&Ii===U&&ie===R&&!qi&&!Ie&&!Pi){Se.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=us,M++;continue}M&&(k.textContent=V),k=this._document.createElement("span"),M=0,V=""}else k=this._document.createElement("span");if(G=Se.bg,Q=Se.fg,he=Se.extended.ext,U=Ii,R=ie,le=di,Ie&&j>=Ee&&j<=it&&(j=Ee),!this._coreService.isCursorHidden&&qi&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)I&&de.push("xterm-cursor-blink"),de.push(A==="bar"?"xterm-cursor-bar":A==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":de.push("xterm-cursor-outline");break;case"block":de.push("xterm-cursor-block");break;case"bar":de.push("xterm-cursor-bar");break;case"underline":de.push("xterm-cursor-underline")}}if(Se.isBold()&&de.push("xterm-bold"),Se.isItalic()&&de.push("xterm-italic"),Se.isDim()&&de.push("xterm-dim"),V=Se.isInvisible()?p.WHITESPACE_CELL_CHAR:Se.getChars()||p.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(de.push(`xterm-underline-${Se.extended.underlineStyle}`),V===" "&&(V=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())k.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let Pe=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&Pe<8&&(Pe+=8),k.style.textDecorationColor=D.ansi[Pe].css}Se.isOverline()&&(de.push("xterm-overline"),V===" "&&(V=" ")),Se.isStrikethrough()&&de.push("xterm-strikethrough"),Ii&&(k.style.textDecoration="underline");let ft=Se.getFgColor(),et=Se.getFgColorMode(),Mt=Se.getBgColor(),_i=Se.getBgColorMode();const hs=!!Se.isInverse();if(hs){const Pe=ft;ft=Mt,Mt=Pe;const Gi=et;et=_i,_i=Gi}let yt,fs,It,Yi=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,E,void 0,(Pe=>{Pe.options.layer!=="top"&&Yi||(Pe.backgroundColorRGB&&(_i=50331648,Mt=Pe.backgroundColorRGB.rgba>>8&16777215,yt=Pe.backgroundColorRGB),Pe.foregroundColorRGB&&(et=50331648,ft=Pe.foregroundColorRGB.rgba>>8&16777215,fs=Pe.foregroundColorRGB),Yi=Pe.options.layer==="top")})),!Yi&&di&&(yt=this._coreBrowserService.isFocused?D.selectionBackgroundOpaque:D.selectionInactiveBackgroundOpaque,Mt=yt.rgba>>8&16777215,_i=50331648,Yi=!0,D.selectionForeground&&(et=50331648,ft=D.selectionForeground.rgba>>8&16777215,fs=D.selectionForeground)),Yi&&de.push("xterm-decoration-top"),_i){case 16777216:case 33554432:It=D.ansi[Mt],de.push(`xterm-bg-${Mt}`);break;case 50331648:It=g.channels.toColor(Mt>>16,Mt>>8&255,255&Mt),this._addStyle(k,`background-color:#${C((Mt>>>0).toString(16),"0",6)}`);break;default:hs?(It=D.foreground,de.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):It=D.background}switch(yt||Se.isDim()&&(yt=g.color.multiplyOpacity(It,.5)),et){case 16777216:case 33554432:Se.isBold()&&ft<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ft+=8),this._applyMinimumContrast(k,It,D.ansi[ft],Se,yt,void 0)||de.push(`xterm-fg-${ft}`);break;case 50331648:const Pe=g.channels.toColor(ft>>16&255,ft>>8&255,255&ft);this._applyMinimumContrast(k,It,Pe,Se,yt,fs)||this._addStyle(k,`color:#${C(ft.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(k,It,D.foreground,Se,yt,fs)||hs&&de.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}de.length&&(k.className=de.join(" "),de.length=0),qi||Ie||Pi?k.textContent=V:M++,ie!==this.defaultSpacing&&(k.style.letterSpacing=`${ie}px`),J.push(k),Ee=it}return k&&M&&(k.textContent=V),J}_applyMinimumContrast(b,E,v,A,O,j){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.treatGlyphAsBackgroundColor)(A.getCode()))return!1;const I=this._getContrastCache(A);let z;if(O||j||(z=I.getColor(E.rgba,v.rgba)),z===void 0){const Z=this._optionsService.rawOptions.minimumContrastRatio/(A.isDim()?2:1);z=g.color.ensureContrastRatio(O||E,j||v,Z),I.setColor((O||E).rgba,(j||v).rgba,z??null)}return!!z&&(this._addStyle(b,`color:${z.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,E){b.setAttribute("style",`${b.getAttribute("style")||""}${E};`)}_isCellInSelection(b,E){const v=this._selectionStart,A=this._selectionEnd;return!(!v||!A)&&(this._columnSelectMode?v[0]<=A[0]?b>=v[0]&&E>=v[1]&&b<A[0]&&E<=A[1]:b<v[0]&&E>=v[1]&&b>=A[0]&&E<=A[1]:E>v[1]&&E<A[1]||v[1]===A[1]&&E===v[1]&&b>=v[0]&&b<A[0]||v[1]<A[1]&&E===A[1]&&b<A[0]||v[1]<A[1]&&E===v[1]&&b>=v[0])}};function C(b,E,v){for(;b.length<v;)b=E+b;return b}u.DomRendererRowFactory=_=d([m(1,l.ICharacterJoinerService),m(2,w.IOptionsService),m(3,l.ICoreBrowserService),m(4,w.ICoreService),m(5,w.IDecorationService),m(6,l.IThemeService)],_)},2550:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(f,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=f.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const m=f.createElement("span");m.classList.add("xterm-char-measure-element");const h=f.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const p=f.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const y=f.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[m,h,p,y],this._container.appendChild(m),this._container.appendChild(h),this._container.appendChild(p),this._container.appendChild(y),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(f,d,m,h){f===this._font&&d===this._fontSize&&m===this._weight&&h===this._weightBold||(this._font=f,this._fontSize=d,this._weight=m,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(f,d,m){let h=0;if(!d&&!m&&f.length===1&&(h=f.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const w=this._measure(f,0);return w>0&&(this._flat[h]=w),w}let p=f;d&&(p+="B"),m&&(p+="I");let y=this._holey.get(p);if(y===void 0){let w=0;d&&(w|=1),m&&(w|=2),y=this._measure(f,w),y>0&&this._holey.set(p,y)}return y}_measure(f,d){const m=this._measureElements[d];return m.textContent=f.repeat(32),m.offsetWidth/32}}},2223:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const d=f(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(K,u)=>{function f(m){return 57508<=m&&m<=57558}function d(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(u,"__esModule",{value:!0}),u.computeNextVariantOffset=u.createRenderDimensions=u.treatGlyphAsBackgroundColor=u.allowRescaling=u.isEmoji=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},u.isPowerlineGlyph=f,u.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},u.isEmoji=d,u.allowRescaling=function(m,h,p,y){return h===1&&p>Math.ceil(1.5*y)&&m!==void 0&&m>255&&!d(m)&&!f(m)&&!(function(w){return 57344<=w&&w<=63743})(m)},u.treatGlyphAsBackgroundColor=function(m){return f(m)||(function(h){return 9472<=h&&h<=9631})(m)},u.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},u.computeNextVariantOffset=function(m,h,p=0){return(m-(2*Math.round(h)-p))%(2*Math.round(h))}},6052:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createSelectionRenderModel=void 0;class f{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,h,p,y=!1){if(this.selectionStart=h,this.selectionEnd=p,!h||!p||h[0]===p[0]&&h[1]===p[1])return void this.clear();const w=m.buffers.active.ydisp,g=h[1]-w,l=p[1]-w,c=Math.max(g,0),a=Math.min(l,m.rows-1);c>=m.rows||a<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=g,this.viewportEndRow=l,this.viewportCappedStartRow=c,this.viewportCappedEndRow=a,this.startCol=h[0],this.endCol=p[0])}isCellSelected(m,h,p){return!!this.hasSelection&&(p-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&p>=this.viewportCappedStartRow&&h<this.endCol&&p<=this.viewportCappedEndRow:h<this.startCol&&p>=this.viewportCappedStartRow&&h>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&h>=this.startCol)}}u.createSelectionRenderModel=function(){return new f}},456:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(f){this._bufferService=f,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?f%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)-1]:[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[f,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[Math.max(f,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const f=this.selectionStart,d=this.selectionEnd;return!(!f||!d)&&(f[1]>d[1]||f[1]===d[1]&&f[0]>d[0])}handleTrim(f){return this.selectionStart&&(this.selectionStart[1]-=f),this.selectionEnd&&(this.selectionEnd[1]-=f),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(K,u,f){var d=this&&this.__decorate||function(a,o,_,C){var b,E=arguments.length,v=E<3?o:C===null?C=Object.getOwnPropertyDescriptor(o,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,C);else for(var A=a.length-1;A>=0;A--)(b=a[A])&&(v=(E<3?b(v):E>3?b(o,_,v):b(o,_))||v);return E>3&&v&&Object.defineProperty(o,_,v),v},m=this&&this.__param||function(a,o){return function(_,C){o(_,C,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=f(2585),p=f(8460),y=f(844);let w=u.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(a,o,_){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 c(this._optionsService))}catch{this._measureStrategy=this.register(new l(a,o,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};u.CharSizeService=w=d([m(2,h.IOptionsService)],w);class g extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(o,_){o!==void 0&&o>0&&_!==void 0&&_>0&&(this._result.width=o,this._result.height=_)}}class l extends g{constructor(o,_,C){super(),this._document=o,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 c extends g{constructor(o){super(),this._optionsService=o,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 o=this._ctx.measureText("W");return this._validateAndSet(o.width,o.fontBoundingBoxAscent+o.fontBoundingBoxDescent),this._result}}},4269:function(K,u,f){var d=this&&this.__decorate||function(c,a,o,_){var C,b=arguments.length,E=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,o):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,o,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(b<3?C(E):b>3?C(a,o,E):C(a,o))||E);return b>3&&E&&Object.defineProperty(a,o,E),E},m=this&&this.__param||function(c,a){return function(o,_){a(o,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=f(3734),p=f(643),y=f(511),w=f(2585);class g extends h.AttributeData{constructor(a,o,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=o,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=g;let l=u.CharacterJoinerService=class Vf{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(a){const o={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(o),o.id}deregister(a){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===a)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(a);if(!o||o.length===0)return[];const _=[],C=o.translateToString(!0);let b=0,E=0,v=0,A=o.getFg(0),O=o.getBg(0);for(let j=0;j<o.getTrimmedLength();j++)if(o.loadCell(j,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==A||this._workCell.bg!==O){if(j-b>1){const I=this._getJoinedRanges(C,v,E,o,b);for(let z=0;z<I.length;z++)_.push(I[z])}b=j,v=E,A=this._workCell.fg,O=this._workCell.bg}E+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const j=this._getJoinedRanges(C,v,E,o,b);for(let I=0;I<j.length;I++)_.push(j[I])}return _}_getJoinedRanges(a,o,_,C,b){const E=a.substring(o,_);let v=[];try{v=this._characterJoiners[0].handler(E)}catch(A){console.error(A)}for(let A=1;A<this._characterJoiners.length;A++)try{const O=this._characterJoiners[A].handler(E);for(let j=0;j<O.length;j++)Vf._mergeRanges(v,O[j])}catch(O){console.error(O)}return this._stringRangesToCellRanges(v,C,b),v}_stringRangesToCellRanges(a,o,_){let C=0,b=!1,E=0,v=a[C];if(v){for(let A=_;A<this._bufferService.cols;A++){const O=o.getWidth(A),j=o.getString(A).length||p.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!b&&v[0]<=E&&(v[0]=A,b=!0),v[1]<=E){if(v[1]=A,v=a[++C],!v)break;v[0]<=E?(v[0]=A,b=!0):b=!1}E+=j}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(a,o){let _=!1;for(let C=0;C<a.length;C++){const b=a[C];if(_){if(o[1]<=b[0])return a[C-1][1]=o[1],a;if(o[1]<=b[1])return a[C-1][1]=Math.max(o[1],b[1]),a.splice(C,1),a;a.splice(C,1),C--}else{if(o[1]<=b[0])return a.splice(C,0,o),a;if(o[1]<=b[1])return b[0]=Math.min(o[0],b[0]),a;o[0]<b[1]&&(b[0]=Math.min(o[0],b[0]),_=!0)}}return _?a[a.length-1][1]=o[1]:a.push(o),a}};u.CharacterJoinerService=l=d([m(0,w.IBufferService)],l)},5114:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0;const d=f(844),m=f(8460),h=f(3656);class p extends d.Disposable{constructor(g,l,c){super(),this._textarea=g,this._window=l,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((a=>this._screenDprMonitor.setWindow(a)))),this.register((0,m.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(g){this._window!==g&&(this._window=g,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}u.CoreBrowserService=p;class y extends d.Disposable{constructor(g){super(),this._parentWindow=g,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(g){this._parentWindow=g,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)==null||g.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:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.LinkProviderService=void 0;const d=f(844);class m extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const y=this.linkProviders.indexOf(p);y!==-1&&this.linkProviders.splice(y,1)}}}}u.LinkProviderService=m},8934:function(K,u,f){var d=this&&this.__decorate||function(w,g,l,c){var a,o=arguments.length,_=o<3?g:c===null?c=Object.getOwnPropertyDescriptor(g,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(w,g,l,c);else for(var C=w.length-1;C>=0;C--)(a=w[C])&&(_=(o<3?a(_):o>3?a(g,l,_):a(g,l))||_);return o>3&&_&&Object.defineProperty(g,l,_),_},m=this&&this.__param||function(w,g){return function(l,c){g(l,c,w)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=f(4725),p=f(9806);let y=u.MouseService=class{constructor(w,g){this._renderService=w,this._charSizeService=g}getCoords(w,g,l,c,a){return(0,p.getCoords)(window,w,g,l,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(w,g){const l=(0,p.getCoordsRelativeToElement)(window,w,g);if(this._charSizeService.hasValidSize)return l[0]=Math.min(Math.max(l[0],0),this._renderService.dimensions.css.canvas.width-1),l[1]=Math.min(Math.max(l[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(l[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(l[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(l[0]),y:Math.floor(l[1])}}};u.MouseService=y=d([m(0,h.IRenderService),m(1,h.ICharSizeService)],y)},3230:function(K,u,f){var d=this&&this.__decorate||function(a,o,_,C){var b,E=arguments.length,v=E<3?o:C===null?C=Object.getOwnPropertyDescriptor(o,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,C);else for(var A=a.length-1;A>=0;A--)(b=a[A])&&(v=(E<3?b(v):E>3?b(o,_,v):b(o,_))||v);return E>3&&v&&Object.defineProperty(o,_,v),v},m=this&&this.__param||function(a,o){return function(_,C){o(_,C,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=f(6193),p=f(4725),y=f(8460),w=f(844),g=f(7226),l=f(2585);let c=u.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(a,o,_,C,b,E,v,A){super(),this._rowCount=a,this._charSizeService=C,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new g.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 y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((O,j)=>this._renderRows(O,j)),v),this.register(this._renderDebouncer),this.register(v.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(b.onDecorationRegistered((()=>this._fullRefresh()))),this.register(b.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register(A.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(v.window,o),this.register(v.onWindowChange((O=>this._registerIntersectionObserver(O,o))))}_registerIntersectionObserver(a,o){if("IntersectionObserver"in a){const _=new a.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});_.observe(o),this._observerDisposable.value=(0,w.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(a){this._isPaused=a.isIntersecting===void 0?a.intersectionRatio===0:!a.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(a,o,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(a,o,this._rowCount))}_renderRows(a,o){this._renderer.value&&(a=Math.min(a,this._rowCount-1),o=Math.min(o,this._rowCount-1),this._renderer.value.renderRows(a,o),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:a,end:o}),this._onRender.fire({start:a,end:o}),this._isNextRenderRedrawOnly=!0)}resize(a,o){this._rowCount=o,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(a){this._renderer.value=a,this._renderer.value&&(this._renderer.value.onRequestRedraw((o=>this.refreshRows(o.start,o.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(a){return this._renderDebouncer.addRefreshCallback(a)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var a,o;this._renderer.value&&((o=(a=this._renderer.value).clearTextureAtlas)==null||o.call(a),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(a,o){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(a,o)})):this._renderer.value.handleResize(a,o),this._fullRefresh())}handleCharSizeChanged(){var a;(a=this._renderer.value)==null||a.handleCharSizeChanged()}handleBlur(){var a;(a=this._renderer.value)==null||a.handleBlur()}handleFocus(){var a;(a=this._renderer.value)==null||a.handleFocus()}handleSelectionChanged(a,o,_){var C;this._selectionState.start=a,this._selectionState.end=o,this._selectionState.columnSelectMode=_,(C=this._renderer.value)==null||C.handleSelectionChanged(a,o,_)}handleCursorMove(){var a;(a=this._renderer.value)==null||a.handleCursorMove()}clear(){var a;(a=this._renderer.value)==null||a.clear()}};u.RenderService=c=d([m(2,l.IOptionsService),m(3,p.ICharSizeService),m(4,l.IDecorationService),m(5,l.IBufferService),m(6,p.ICoreBrowserService),m(7,p.IThemeService)],c)},9312:function(K,u,f){var d=this&&this.__decorate||function(v,A,O,j){var I,z=arguments.length,Z=z<3?A:j===null?j=Object.getOwnPropertyDescriptor(A,O):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(v,A,O,j);else for(var re=v.length-1;re>=0;re--)(I=v[re])&&(Z=(z<3?I(Z):z>3?I(A,O,Z):I(A,O))||Z);return z>3&&Z&&Object.defineProperty(A,O,Z),Z},m=this&&this.__param||function(v,A){return function(O,j){A(O,j,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=f(9806),p=f(9504),y=f(456),w=f(4725),g=f(8460),l=f(844),c=f(6114),a=f(4841),o=f(511),_=f(2585),C=" ",b=new RegExp(C,"g");let E=u.SelectionService=class extends l.Disposable{constructor(v,A,O,j,I,z,Z,re,q){super(),this._element=v,this._screenElement=A,this._linkifier=O,this._bufferService=j,this._coreService=I,this._mouseService=z,this._optionsService=Z,this._renderService=re,this._coreBrowserService=q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new o.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new g.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new g.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const v=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!v||!A||v[0]===A[0]&&v[1]===A[1])}get selectionText(){const v=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!v||!A)return"";const O=this._bufferService.buffer,j=[];if(this._activeSelectionMode===3){if(v[0]===A[0])return"";const I=v[0]<A[0]?v[0]:A[0],z=v[0]<A[0]?A[0]:v[0];for(let Z=v[1];Z<=A[1];Z++){const re=O.translateBufferLineToString(Z,!0,I,z);j.push(re)}}else{const I=v[1]===A[1]?A[0]:void 0;j.push(O.translateBufferLineToString(v[1],!0,v[0],I));for(let z=v[1]+1;z<=A[1]-1;z++){const Z=O.lines.get(z),re=O.translateBufferLineToString(z,!0);Z!=null&&Z.isWrapped?j[j.length-1]+=re:j.push(re)}if(v[1]!==A[1]){const z=O.lines.get(A[1]),Z=O.translateBufferLineToString(A[1],!0,0,A[0]);z&&z.isWrapped?j[j.length-1]+=Z:j.push(Z)}}return j.map((I=>I.replace(b," "))).join(c.isWindows?`\r
54
54
  `:`
55
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(v){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&v&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(v){const D=this._getMouseBufferCoords(v),O=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!!(O&&N&&D)&&this._areCoordsInSelection(D,O,N)}isCellInSelection(v,D){const O=this._model.finalSelectionStart,N=this._model.finalSelectionEnd;return!(!O||!N)&&this._areCoordsInSelection([v,D],O,N)}_areCoordsInSelection(v,D,O){return v[1]>D[1]&&v[1]<O[1]||D[1]===O[1]&&v[1]===D[1]&&v[0]>=D[0]&&v[0]<O[0]||D[1]<O[1]&&v[1]===O[1]&&v[0]<O[0]||D[1]<O[1]&&v[1]===D[1]&&v[0]>=D[0]}_selectWordAtCursor(v,D){var I,H;const O=(H=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:H.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const N=this._getMouseBufferCoords(v);return!!N&&(this._selectWordAt(N,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(v,D){this._model.clearSelection(),v=Math.max(v,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(v){this._model.handleTrim(v)&&this.refresh()}_getMouseBufferCoords(v){const D=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(v){let D=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,v,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=O?0:(D>O&&(D-=O),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(v){return c.isMac?v.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:v.shiftKey}handleMouseDown(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._handleIncrementalClick(v):v.detail===1?this._handleSingleClick(v):v.detail===2?this._handleDoubleClick(v):v.detail===3&&this._handleTripleClick(v),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))}_handleSingleClick(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(v){this._selectWordAtCursor(v,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(v){const D=this._getMouseBufferCoords(v);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(v){return v.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(v){if(v.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){const N=O.lines.get(this._model.selectionEnd[1]);N&&N.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}D&&D[0]===this._model.selectionEnd[0]&&D[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}}_handleMouseUp(v){const D=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&v.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const N=(0,p.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(N,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,O=!(!v||!D||v[0]===D[0]&&v[1]===D[1]);O?v&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&v[0]===this._oldSelectionStart[0]&&v[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(v,D,O)):this._oldHasSelection&&this._fireOnSelectionChange(v,D,O)}_fireOnSelectionChange(v,D,O){this._oldSelectionStart=v,this._oldSelectionEnd=D,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(v,D){let O=D;for(let N=0;D>=N;N++){const I=v.loadCell(N,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:I>1&&D!==N&&(O+=I-1)}return O}setSelection(v,D,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,D],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,D,O=!0,N=!0){if(v[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,H=I.lines.get(v[1]);if(!H)return;const J=I.translateBufferLineToString(v[1],!1);let re=this._convertViewportColToCharacterIndex(H,v[0]),U=re;const $=v[0]-re;let se=0,A=0,B=0,x=0;if(J.charAt(re)===" "){for(;re>0&&J.charAt(re-1)===" ";)re--;for(;U<J.length&&J.charAt(U+1)===" ";)U++}else{let G=v[0],Q=v[0];H.getWidth(G)===0&&(se++,G--),H.getWidth(Q)===2&&(A++,Q++);const he=H.getString(Q).length;for(he>1&&(x+=he-1,U+=he-1);G>0&&re>0&&!this._isCharWordSeparator(H.loadCell(G-1,this._workCell));){H.loadCell(G-1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===0?(se++,G--):q>1&&(B+=q-1,re-=q-1),re--,G--}for(;Q<H.length&&U+1<J.length&&!this._isCharWordSeparator(H.loadCell(Q+1,this._workCell));){H.loadCell(Q+1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===2?(A++,Q++):q>1&&(x+=q-1,U+=q-1),U++,Q++}}U++;let M=re+$-se+B,V=Math.min(this._bufferService.cols,U-re+se+A-B-x);if(D||J.slice(re,U).trim()!==""){if(O&&M===0&&H.getCodePoint(0)!==32){const G=I.lines.get(v[1]-1);if(G&&H.isWrapped&&G.getCodePoint(this._bufferService.cols-1)!==32){const Q=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(Q){const he=this._bufferService.cols-Q.start;M-=he,V+=he}}}if(N&&M+V===this._bufferService.cols&&H.getCodePoint(this._bufferService.cols-1)!==32){const G=I.lines.get(v[1]+1);if(G!=null&&G.isWrapped&&G.getCodePoint(0)!==32){const Q=this._getWordAt([0,v[1]+1],!1,!1,!0);Q&&(V+=Q.length)}}return{start:M,length:V}}}_selectWordAt(v,D){const O=this._getWordAt(v,D);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[O.start,v[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(v){const D=this._getWordAt(v,!0);if(D){let O=v[1];for(;D.start<0;)D.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,O]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const D=this._bufferService.buffer.getWrappedRangeForLine(v),O={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(O,this._bufferService.cols)}};u.SelectionService=C=d([m(3,_.IBufferService),m(4,_.ICoreService),m(5,w.IMouseService),m(6,_.IOptionsService),m(7,w.IRenderService),m(8,w.ICoreBrowserService)],C)},4725:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ILinkProviderService=u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const d=f(8343);u.ICharSizeService=(0,d.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),u.IMouseService=(0,d.createDecorator)("MouseService"),u.IRenderService=(0,d.createDecorator)("RenderService"),u.ISelectionService=(0,d.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,d.createDecorator)("ThemeService"),u.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(K,u,f){var d=this&&this.__decorate||function(C,v,D,O){var N,I=arguments.length,H=I<3?v:O===null?O=Object.getOwnPropertyDescriptor(v,D):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(C,v,D,O);else for(var J=C.length-1;J>=0;J--)(N=C[J])&&(H=(I<3?N(H):I>3?N(v,D,H):N(v,D))||H);return I>3&&H&&Object.defineProperty(v,D,H),H},m=this&&this.__param||function(C,v){return function(D,O){v(D,O,C)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=f(7239),p=f(8055),b=f(8460),w=f(844),g=f(2585),l=p.css.toColor("#ffffff"),c=p.css.toColor("#000000"),a=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const C=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],v=[0,95,135,175,215,255];for(let D=0;D<216;D++){const O=v[D/36%6|0],N=v[D/6%6|0],I=v[D%6];C.push({css:p.channels.toCss(O,N,I),rgba:p.channels.toRgba(O,N,I)})}for(let D=0;D<24;D++){const O=8+10*D;C.push({css:p.channels.toCss(O,O,O),rgba:p.channels.toRgba(O,O,O)})}return C})());let E=u.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(C){super(),this._optionsService=C,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:c,cursor:a,cursorAccent:o,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(c,_),ansi:u.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(C={}){const v=this._colors;if(v.foreground=y(C.foreground,l),v.background=y(C.background,c),v.cursor=y(C.cursor,a),v.cursorAccent=y(C.cursorAccent,o),v.selectionBackgroundTransparent=y(C.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=y(C.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=C.selectionForeground?y(C.selectionForeground,p.NULL_COLOR):void 0,v.selectionForeground===p.NULL_COLOR&&(v.selectionForeground=void 0),p.color.isOpaque(v.selectionBackgroundTransparent)&&(v.selectionBackgroundTransparent=p.color.opacity(v.selectionBackgroundTransparent,.3)),p.color.isOpaque(v.selectionInactiveBackgroundTransparent)&&(v.selectionInactiveBackgroundTransparent=p.color.opacity(v.selectionInactiveBackgroundTransparent,.3)),v.ansi=u.DEFAULT_ANSI_COLORS.slice(),v.ansi[0]=y(C.black,u.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=y(C.red,u.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=y(C.green,u.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=y(C.yellow,u.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=y(C.blue,u.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=y(C.magenta,u.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=y(C.cyan,u.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=y(C.white,u.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=y(C.brightBlack,u.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=y(C.brightRed,u.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=y(C.brightGreen,u.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=y(C.brightYellow,u.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=y(C.brightBlue,u.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=y(C.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=y(C.brightCyan,u.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=y(C.brightWhite,u.DEFAULT_ANSI_COLORS[15]),C.extendedAnsi){const D=Math.min(v.ansi.length-16,C.extendedAnsi.length);for(let O=0;O<D;O++)v.ansi[O+16]=y(C.extendedAnsi[O],u.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(C){this._restoreColor(C),this._onChangeColors.fire(this.colors)}_restoreColor(C){if(C!==void 0)switch(C){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[C]=this._restoreColors.ansi[C]}else for(let v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}modifyColors(C){C(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function y(C,v){if(C!==void 0)try{return p.css.toColor(C)}catch{}return v}u.ThemeService=E=d([m(0,g.IOptionsService)],E)},6349:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=f(8460),m=f(844);class h extends m.Disposable{constructor(b){super(),this._maxLength=b,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(b){if(this._maxLength===b)return;const w=new Array(b);for(let g=0;g<Math.min(b,this.length);g++)w[g]=this._array[this._getCyclicIndex(g)];this._array=w,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let w=this._length;w<b;w++)this._array[w]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,w){this._array[this._getCyclicIndex(b)]=w}push(b){this._array[this._getCyclicIndex(this._length)]=b,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(b,w,...g){if(w){for(let l=b;l<this._length-w;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+w)];this._length-=w,this.onDeleteEmitter.fire({index:b,amount:w})}for(let l=this._length-1;l>=b;l--)this._array[this._getCyclicIndex(l+g.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<g.length;l++)this._array[this._getCyclicIndex(b+l)]=g[l];if(g.length&&this.onInsertEmitter.fire({index:b,amount:g.length}),this._length+g.length>this._maxLength){const l=this._length+g.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=g.length}trimStart(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,w,g){if(!(w<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(let c=w-1;c>=0;c--)this.set(b+c+g,this.get(b+c));const l=b+w+g-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<w;l++)this.set(b+l+g,this.get(b+l))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}u.CircularList=h},1439:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function f(d,m=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const p in d)h[p]=m<=1?d[p]:d[p]&&f(d[p],m-1);return h}},8055:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.contrastRatio=u.toPaddedHex=u.rgba=u.rgb=u.css=u.color=u.channels=u.NULL_COLOR=void 0;let f=0,d=0,m=0,h=0;var p,b,w,g,l;function c(o){const _=o.toString(16);return _.length<2?"0"+_:_}function a(o,_){return o<_?(_+.05)/(o+.05):(o+.05)/(_+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(o){o.toCss=function(_,E,y,C){return C!==void 0?`#${c(_)}${c(E)}${c(y)}${c(C)}`:`#${c(_)}${c(E)}${c(y)}`},o.toRgba=function(_,E,y,C=255){return(_<<24|E<<16|y<<8|C)>>>0},o.toColor=function(_,E,y,C){return{css:o.toCss(_,E,y,C),rgba:o.toRgba(_,E,y,C)}}})(p||(u.channels=p={})),(function(o){function _(E,y){return h=Math.round(255*y),[f,d,m]=l.toChannels(E.rgba),{css:p.toCss(f,d,m,h),rgba:p.toRgba(f,d,m,h)}}o.blend=function(E,y){if(h=(255&y.rgba)/255,h===1)return{css:y.css,rgba:y.rgba};const C=y.rgba>>24&255,v=y.rgba>>16&255,D=y.rgba>>8&255,O=E.rgba>>24&255,N=E.rgba>>16&255,I=E.rgba>>8&255;return f=O+Math.round((C-O)*h),d=N+Math.round((v-N)*h),m=I+Math.round((D-I)*h),{css:p.toCss(f,d,m),rgba:p.toRgba(f,d,m)}},o.isOpaque=function(E){return(255&E.rgba)==255},o.ensureContrastRatio=function(E,y,C){const v=l.ensureContrastRatio(E.rgba,y.rgba,C);if(v)return p.toColor(v>>24&255,v>>16&255,v>>8&255)},o.opaque=function(E){const y=(255|E.rgba)>>>0;return[f,d,m]=l.toChannels(y),{css:p.toCss(f,d,m),rgba:y}},o.opacity=_,o.multiplyOpacity=function(E,y){return h=255&E.rgba,_(E,h*y/255)},o.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}})(b||(u.color=b={})),(function(o){let _,E;try{const y=document.createElement("canvas");y.width=1,y.height=1;const C=y.getContext("2d",{willReadFrequently:!0});C&&(_=C,_.globalCompositeOperation="copy",E=_.createLinearGradient(0,0,1,1))}catch{}o.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return f=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),m=parseInt(y.slice(3,4).repeat(2),16),p.toColor(f,d,m);case 5:return f=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),m=parseInt(y.slice(3,4).repeat(2),16),h=parseInt(y.slice(4,5).repeat(2),16),p.toColor(f,d,m,h);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const C=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(C)return f=parseInt(C[1]),d=parseInt(C[2]),m=parseInt(C[3]),h=Math.round(255*(C[5]===void 0?1:parseFloat(C[5]))),p.toColor(f,d,m,h);if(!_||!E)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=E,_.fillStyle=y,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[f,d,m,h]=_.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(f,d,m,h),css:y}}})(w||(u.css=w={})),(function(o){function _(E,y,C){const v=E/255,D=y/255,O=C/255;return .2126*(v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}o.relativeLuminance=function(E){return _(E>>16&255,E>>8&255,255&E)},o.relativeLuminance2=_})(g||(u.rgb=g={})),(function(o){function _(y,C,v){const D=y>>24&255,O=y>>16&255,N=y>>8&255;let I=C>>24&255,H=C>>16&255,J=C>>8&255,re=a(g.relativeLuminance2(I,H,J),g.relativeLuminance2(D,O,N));for(;re<v&&(I>0||H>0||J>0);)I-=Math.max(0,Math.ceil(.1*I)),H-=Math.max(0,Math.ceil(.1*H)),J-=Math.max(0,Math.ceil(.1*J)),re=a(g.relativeLuminance2(I,H,J),g.relativeLuminance2(D,O,N));return(I<<24|H<<16|J<<8|255)>>>0}function E(y,C,v){const D=y>>24&255,O=y>>16&255,N=y>>8&255;let I=C>>24&255,H=C>>16&255,J=C>>8&255,re=a(g.relativeLuminance2(I,H,J),g.relativeLuminance2(D,O,N));for(;re<v&&(I<255||H<255||J<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),H=Math.min(255,H+Math.ceil(.1*(255-H))),J=Math.min(255,J+Math.ceil(.1*(255-J))),re=a(g.relativeLuminance2(I,H,J),g.relativeLuminance2(D,O,N));return(I<<24|H<<16|J<<8|255)>>>0}o.blend=function(y,C){if(h=(255&C)/255,h===1)return C;const v=C>>24&255,D=C>>16&255,O=C>>8&255,N=y>>24&255,I=y>>16&255,H=y>>8&255;return f=N+Math.round((v-N)*h),d=I+Math.round((D-I)*h),m=H+Math.round((O-H)*h),p.toRgba(f,d,m)},o.ensureContrastRatio=function(y,C,v){const D=g.relativeLuminance(y>>8),O=g.relativeLuminance(C>>8);if(a(D,O)<v){if(O<D){const H=_(y,C,v),J=a(D,g.relativeLuminance(H>>8));if(J<v){const re=E(y,C,v);return J>a(D,g.relativeLuminance(re>>8))?H:re}return H}const N=E(y,C,v),I=a(D,g.relativeLuminance(N>>8));if(I<v){const H=_(y,C,v);return I>a(D,g.relativeLuminance(H>>8))?N:H}return N}},o.reduceLuminance=_,o.increaseLuminance=E,o.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}})(l||(u.rgba=l={})),u.toPaddedHex=c,u.contrastRatio=a},8969:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=f(844),m=f(2585),h=f(4348),p=f(7866),b=f(744),w=f(7302),g=f(6975),l=f(8460),c=f(1753),a=f(1480),o=f(7994),_=f(9282),E=f(5435),y=f(5981),C=f(2660);let v=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event((N=>{var I;(I=this._onScrollApi)==null||I.fire(N.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(N){for(const I in N)this.optionsService.options[I]=N[I]}constructor(N){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new w.OptionsService(N)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(g.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(o.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(C.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{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((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new y.WriteBuffer(((I,H)=>this._inputHandler.parse(I,H)))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(N,I){this._writeBuffer.write(N,I)}writeSync(N,I){this._logService.logLevel<=m.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(N,I)}input(N,I=!0){this.coreService.triggerDataEvent(N,I)}resize(N,I){isNaN(N)||isNaN(I)||(N=Math.max(N,b.MINIMUM_COLS),I=Math.max(I,b.MINIMUM_ROWS),this._bufferService.resize(N,I))}scroll(N,I=!1){this._bufferService.scroll(N,I)}scrollLines(N,I,H){this._bufferService.scrollLines(N,I,H)}scrollPages(N){this.scrollLines(N*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(N){const I=N-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(N,I){return this._inputHandler.registerEscHandler(N,I)}registerDcsHandler(N,I){return this._inputHandler.registerDcsHandler(N,I)}registerCsiHandler(N,I){return this._inputHandler.registerCsiHandler(N,I)}registerOscHandler(N,I){return this._inputHandler.registerOscHandler(N,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let N=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?N=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(N=!0),N?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const N=[];N.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),N.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const I of N)I.dispose()}))}}}u.CoreTerminal=D},8460:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.runAndSubscribe=u.forwardEvent=u.EventEmitter=void 0,u.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=f=>(this._listeners.push(f),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===f)return void this._listeners.splice(d,1)}}})),this._event}fire(f,d){const m=[];for(let h=0;h<this._listeners.length;h++)m.push(this._listeners[h]);for(let h=0;h<m.length;h++)m[h].call(void 0,f,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(f,d){return f((m=>d.fire(m)))},u.runAndSubscribe=function(f,d){return d(void 0),f((m=>d(m)))}},5435:function(K,u,f){var d=this&&this.__decorate||function(se,A,B,x){var M,V=arguments.length,G=V<3?A:x===null?x=Object.getOwnPropertyDescriptor(A,B):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(se,A,B,x);else for(var Q=se.length-1;Q>=0;Q--)(M=se[Q])&&(G=(V<3?M(G):V>3?M(A,B,G):M(A,B))||G);return V>3&&G&&Object.defineProperty(A,B,G),G},m=this&&this.__param||function(se,A){return function(B,x){A(B,x,se)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=f(2584),p=f(7116),b=f(2015),w=f(844),g=f(482),l=f(8437),c=f(8460),a=f(643),o=f(511),_=f(3734),E=f(2585),y=f(1480),C=f(6242),v=f(6351),D=f(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},N=131072;function I(se,A){if(se>24)return A.setWinLines||!1;switch(se){case 1:return!!A.restoreWin;case 2:return!!A.minimizeWin;case 3:return!!A.setWinPosition;case 4:return!!A.setWinSizePixels;case 5:return!!A.raiseWin;case 6:return!!A.lowerWin;case 7:return!!A.refreshWin;case 8:return!!A.setWinSizeChars;case 9:return!!A.maximizeWin;case 10:return!!A.fullscreenWin;case 11:return!!A.getWinState;case 13:return!!A.getWinPosition;case 14:return!!A.getWinSizePixels;case 15:return!!A.getScreenSizePixels;case 16:return!!A.getCellSizePixels;case 18:return!!A.getWinSizeChars;case 19:return!!A.getScreenSizeChars;case 20:return!!A.getIconTitle;case 21:return!!A.getWinTitle;case 22:return!!A.pushTitle;case 23:return!!A.popTitle;case 24:return!!A.setWinLines}return!1}var H;(function(se){se[se.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",se[se.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(H||(u.WindowsOptionsReportType=H={}));let J=0;class re extends w.Disposable{getAttrData(){return this._curAttrData}constructor(A,B,x,M,V,G,Q,he,q=new b.EscapeSequenceParser){super(),this._bufferService=A,this._charsetService=B,this._coreService=x,this._logService=M,this._optionsService=V,this._oscLinkService=G,this._coreMouseService=Q,this._unicodeService=he,this._parser=q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new g.StringToUtf32,this._utf8Decoder=new g.Utf8ToUtf32,this._workCell=new o.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new U(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._parser.setCsiHandlerFallback(((R,le)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(R),params:le.toArray()})})),this._parser.setEscHandlerFallback((R=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(R)})})),this._parser.setExecuteHandlerFallback((R=>{this._logService.debug("Unknown EXECUTE code: ",{code:R})})),this._parser.setOscHandlerFallback(((R,le,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:R,action:le,data:ie})})),this._parser.setDcsHandlerFallback(((R,le,ie)=>{le==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(R),action:le,payload:ie})})),this._parser.setPrintHandler(((R,le,ie)=>this.print(R,le,ie))),this._parser.registerCsiHandler({final:"@"},(R=>this.insertChars(R))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(R=>this.scrollLeft(R))),this._parser.registerCsiHandler({final:"A"},(R=>this.cursorUp(R))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(R=>this.scrollRight(R))),this._parser.registerCsiHandler({final:"B"},(R=>this.cursorDown(R))),this._parser.registerCsiHandler({final:"C"},(R=>this.cursorForward(R))),this._parser.registerCsiHandler({final:"D"},(R=>this.cursorBackward(R))),this._parser.registerCsiHandler({final:"E"},(R=>this.cursorNextLine(R))),this._parser.registerCsiHandler({final:"F"},(R=>this.cursorPrecedingLine(R))),this._parser.registerCsiHandler({final:"G"},(R=>this.cursorCharAbsolute(R))),this._parser.registerCsiHandler({final:"H"},(R=>this.cursorPosition(R))),this._parser.registerCsiHandler({final:"I"},(R=>this.cursorForwardTab(R))),this._parser.registerCsiHandler({final:"J"},(R=>this.eraseInDisplay(R,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(R=>this.eraseInDisplay(R,!0))),this._parser.registerCsiHandler({final:"K"},(R=>this.eraseInLine(R,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(R=>this.eraseInLine(R,!0))),this._parser.registerCsiHandler({final:"L"},(R=>this.insertLines(R))),this._parser.registerCsiHandler({final:"M"},(R=>this.deleteLines(R))),this._parser.registerCsiHandler({final:"P"},(R=>this.deleteChars(R))),this._parser.registerCsiHandler({final:"S"},(R=>this.scrollUp(R))),this._parser.registerCsiHandler({final:"T"},(R=>this.scrollDown(R))),this._parser.registerCsiHandler({final:"X"},(R=>this.eraseChars(R))),this._parser.registerCsiHandler({final:"Z"},(R=>this.cursorBackwardTab(R))),this._parser.registerCsiHandler({final:"`"},(R=>this.charPosAbsolute(R))),this._parser.registerCsiHandler({final:"a"},(R=>this.hPositionRelative(R))),this._parser.registerCsiHandler({final:"b"},(R=>this.repeatPrecedingCharacter(R))),this._parser.registerCsiHandler({final:"c"},(R=>this.sendDeviceAttributesPrimary(R))),this._parser.registerCsiHandler({prefix:">",final:"c"},(R=>this.sendDeviceAttributesSecondary(R))),this._parser.registerCsiHandler({final:"d"},(R=>this.linePosAbsolute(R))),this._parser.registerCsiHandler({final:"e"},(R=>this.vPositionRelative(R))),this._parser.registerCsiHandler({final:"f"},(R=>this.hVPosition(R))),this._parser.registerCsiHandler({final:"g"},(R=>this.tabClear(R))),this._parser.registerCsiHandler({final:"h"},(R=>this.setMode(R))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(R=>this.setModePrivate(R))),this._parser.registerCsiHandler({final:"l"},(R=>this.resetMode(R))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(R=>this.resetModePrivate(R))),this._parser.registerCsiHandler({final:"m"},(R=>this.charAttributes(R))),this._parser.registerCsiHandler({final:"n"},(R=>this.deviceStatus(R))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(R=>this.deviceStatusPrivate(R))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(R=>this.softReset(R))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(R=>this.setCursorStyle(R))),this._parser.registerCsiHandler({final:"r"},(R=>this.setScrollRegion(R))),this._parser.registerCsiHandler({final:"s"},(R=>this.saveCursor(R))),this._parser.registerCsiHandler({final:"t"},(R=>this.windowOptions(R))),this._parser.registerCsiHandler({final:"u"},(R=>this.restoreCursor(R))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(R=>this.insertColumns(R))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(R=>this.deleteColumns(R))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(R=>this.selectProtected(R))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(R=>this.requestMode(R,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(R=>this.requestMode(R,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new C.OscHandler((R=>(this.setTitle(R),this.setIconName(R),!0)))),this._parser.registerOscHandler(1,new C.OscHandler((R=>this.setIconName(R)))),this._parser.registerOscHandler(2,new C.OscHandler((R=>this.setTitle(R)))),this._parser.registerOscHandler(4,new C.OscHandler((R=>this.setOrReportIndexedColor(R)))),this._parser.registerOscHandler(8,new C.OscHandler((R=>this.setHyperlink(R)))),this._parser.registerOscHandler(10,new C.OscHandler((R=>this.setOrReportFgColor(R)))),this._parser.registerOscHandler(11,new C.OscHandler((R=>this.setOrReportBgColor(R)))),this._parser.registerOscHandler(12,new C.OscHandler((R=>this.setOrReportCursorColor(R)))),this._parser.registerOscHandler(104,new C.OscHandler((R=>this.restoreIndexedColor(R)))),this._parser.registerOscHandler(110,new C.OscHandler((R=>this.restoreFgColor(R)))),this._parser.registerOscHandler(111,new C.OscHandler((R=>this.restoreBgColor(R)))),this._parser.registerOscHandler(112,new C.OscHandler((R=>this.restoreCursorColor(R)))),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 R in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:R},(()=>this.selectCharset("("+R))),this._parser.registerEscHandler({intermediates:")",final:R},(()=>this.selectCharset(")"+R))),this._parser.registerEscHandler({intermediates:"*",final:R},(()=>this.selectCharset("*"+R))),this._parser.registerEscHandler({intermediates:"+",final:R},(()=>this.selectCharset("+"+R))),this._parser.registerEscHandler({intermediates:"-",final:R},(()=>this.selectCharset("-"+R))),this._parser.registerEscHandler({intermediates:".",final:R},(()=>this.selectCharset("."+R))),this._parser.registerEscHandler({intermediates:"/",final:R},(()=>this.selectCharset("/"+R)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((R=>(this._logService.error("Parsing error: ",R),R))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new v.DcsHandler(((R,le)=>this.requestStatusString(R,le))))}_preserveStack(A,B,x,M){this._parseStack.paused=!0,this._parseStack.cursorStartX=A,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=x,this._parseStack.position=M}_logSlowResolvingAsync(A){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([A,new Promise(((B,x)=>setTimeout((()=>x("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(A,B){let x,M=this._activeBuffer.x,V=this._activeBuffer.y,G=0;const Q=this._parseStack.paused;if(Q){if(x=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(x),x;M=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,A.length>N&&(G=this._parseStack.position+N)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof A=="string"?` "${A}"`:` "${Array.prototype.map.call(A,(R=>String.fromCharCode(R))).join("")}"`),typeof A=="string"?A.split("").map((R=>R.charCodeAt(0))):A),this._parseBuffer.length<A.length&&this._parseBuffer.length<N&&(this._parseBuffer=new Uint32Array(Math.min(A.length,N))),Q||this._dirtyRowTracker.clearRange(),A.length>N)for(let R=G;R<A.length;R+=N){const le=R+N<A.length?R+N:A.length,ie=typeof A=="string"?this._stringDecoder.decode(A.substring(R,le),this._parseBuffer):this._utf8Decoder.decode(A.subarray(R,le),this._parseBuffer);if(x=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(M,V,ie,R),this._logSlowResolvingAsync(x),x}else if(!Q){const R=typeof A=="string"?this._stringDecoder.decode(A,this._parseBuffer):this._utf8Decoder.decode(A,this._parseBuffer);if(x=this._parser.parse(this._parseBuffer,R))return this._preserveStack(M,V,R,0),this._logSlowResolvingAsync(x),x}this._activeBuffer.x===M&&this._activeBuffer.y===V||this._onCursorMove.fire();const he=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(q,this._bufferService.rows-1),Math.min(he,this._bufferService.rows-1))}print(A,B,x){let M,V;const G=this._charsetService.charset,Q=this._optionsService.rawOptions.screenReaderMode,he=this._bufferService.cols,q=this._coreService.decPrivateModes.wraparound,R=this._coreService.modes.insertMode,le=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&x-B>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,le);let de=this._parser.precedingJoinState;for(let fe=B;fe<x;++fe){if(M=A[fe],M<127&&G){const it=G[String.fromCharCode(M)];it&&(M=it.charCodeAt(0))}const Ee=this._unicodeService.charProperties(M,de);V=y.UnicodeService.extractWidth(Ee);const Be=y.UnicodeService.extractShouldJoin(Ee),Ie=Be?y.UnicodeService.extractWidth(de):0;if(de=Ee,Q&&this._onA11yChar.fire((0,g.stringFromCodePoint)(M)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-Ie>he){if(q){const it=ie;let Se=this._activeBuffer.x-Ie;for(this._activeBuffer.x=Ie,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),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ie>0&&ie instanceof l.BufferLine&&ie.copyCellsFrom(it,Se,0,Ie,!1);Se<he;)it.setCellFromCodepoint(Se++,0,1,le)}else if(this._activeBuffer.x=he-1,V===2)continue}if(Be&&this._activeBuffer.x){const it=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-it,M,V);for(let Se=V-Ie;--Se>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}else if(R&&(ie.insertCells(this._activeBuffer.x,V-Ie,this._activeBuffer.getNullCell(le)),ie.getWidth(he-1)===2&&ie.setCellFromCodepoint(he-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,le)),ie.setCellFromCodepoint(this._activeBuffer.x++,M,V,le),V>0)for(;--V;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}this._parser.precedingJoinState=de,this._activeBuffer.x<he&&x-B>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,le),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(A,B){return A.final!=="t"||A.prefix||A.intermediates?this._parser.registerCsiHandler(A,B):this._parser.registerCsiHandler(A,(x=>!I(x.params[0],this._optionsService.rawOptions.windowOptions)||B(x)))}registerDcsHandler(A,B){return this._parser.registerDcsHandler(A,new v.DcsHandler(B))}registerEscHandler(A,B){return this._parser.registerEscHandler(A,B)}registerOscHandler(A,B){return this._parser.registerOscHandler(A,new C.OscHandler(B))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var A;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&A.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const A=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-A),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(A=this._bufferService.cols-1){this._activeBuffer.x=Math.min(A,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(A,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=A,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=A,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(A,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+A,this._activeBuffer.y+B)}cursorUp(A){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,A.params[0]||1)):this._moveCursor(0,-(A.params[0]||1)),!0}cursorDown(A){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,A.params[0]||1)):this._moveCursor(0,A.params[0]||1),!0}cursorForward(A){return this._moveCursor(A.params[0]||1,0),!0}cursorBackward(A){return this._moveCursor(-(A.params[0]||1),0),!0}cursorNextLine(A){return this.cursorDown(A),this._activeBuffer.x=0,!0}cursorPrecedingLine(A){return this.cursorUp(A),this._activeBuffer.x=0,!0}cursorCharAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(A){return this._setCursor(A.length>=2?(A.params[1]||1)-1:0,(A.params[0]||1)-1),!0}charPosAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(A){return this._moveCursor(A.params[0]||1,0),!0}linePosAbsolute(A){return this._setCursor(this._activeBuffer.x,(A.params[0]||1)-1),!0}vPositionRelative(A){return this._moveCursor(0,A.params[0]||1),!0}hVPosition(A){return this.cursorPosition(A),!0}tabClear(A){const B=A.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=A.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=A.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(A){const B=A.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(A,B,x,M=!1,V=!1){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);G.replaceCells(B,x,this._activeBuffer.getNullCell(this._eraseAttrData()),V),M&&(G.isWrapped=!1)}_resetBufferLine(A,B=!1){const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);x&&(x.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+A),x.isWrapped=!1)}eraseInDisplay(A,B=!1){let x;switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:for(x=this._activeBuffer.y,this._dirtyRowTracker.markDirty(x),this._eraseInBufferLine(x++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);x<this._bufferService.rows;x++)this._resetBufferLine(x,B);this._dirtyRowTracker.markDirty(x);break;case 1:for(x=this._activeBuffer.y,this._dirtyRowTracker.markDirty(x),this._eraseInBufferLine(x,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(x+1).isWrapped=!1);x--;)this._resetBufferLine(x,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(x=this._bufferService.rows,this._dirtyRowTracker.markDirty(x-1);x--;)this._resetBufferLine(x,B);this._dirtyRowTracker.markDirty(0);break;case 3:const M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0}eraseInLine(A,B=!1){switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(A){this._restrictCursor();let B=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=this._activeBuffer.ybase+this._activeBuffer.y,M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-M+1;for(;B--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(x,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(A){this._restrictCursor();let B=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=this._activeBuffer.ybase+this._activeBuffer.y;let M;for(M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,M=this._bufferService.rows-1+this._activeBuffer.ybase-M;B--;)this._activeBuffer.lines.splice(x,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(A){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(A){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(A){let B=A.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(A){let B=A.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(l.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=A.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);M.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=A.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);M.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=A.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);M.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=A.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);M.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(A){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(A.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(A){const B=this._parser.precedingJoinState;if(!B)return!0;const x=A.params[0]||1,M=y.UnicodeService.extractWidth(B),V=this._activeBuffer.x-M,G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),Q=new Uint32Array(G.length*x);let he=0;for(let R=0;R<G.length;){const le=G.codePointAt(R)||0;Q[he++]=le,R+=le>65535?2:1}let q=he;for(let R=1;R<x;++R)Q.copyWithin(q,0,he),q+=he;return this.print(Q,0,q),!0}sendDeviceAttributesPrimary(A){return A.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(A){return A.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(A.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(A){return(this._optionsService.rawOptions.termName+"").indexOf(A)===0}setMode(A){for(let B=0;B<A.length;B++)switch(A.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(A){for(let B=0;B<A.length;B++)switch(A.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(A){for(let B=0;B<A.length;B++)switch(A.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(A){for(let B=0;B<A.length;B++)switch(A.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),A.params[B]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(A,B){const x=this._coreService.decPrivateModes,{activeProtocol:M,activeEncoding:V}=this._coreMouseService,G=this._coreService,{buffers:Q,cols:he}=this._bufferService,{active:q,alt:R}=Q,le=this._optionsService.rawOptions,ie=Be=>Be?1:2,de=A.params[0];return fe=de,Ee=B?de===2?4:de===4?ie(G.modes.insertMode):de===12?3:de===20?ie(le.convertEol):0:de===1?ie(x.applicationCursorKeys):de===3?le.windowOptions.setWinLines?he===80?2:he===132?1:0:0:de===6?ie(x.origin):de===7?ie(x.wraparound):de===8?3:de===9?ie(M==="X10"):de===12?ie(le.cursorBlink):de===25?ie(!G.isCursorHidden):de===45?ie(x.reverseWraparound):de===66?ie(x.applicationKeypad):de===67?4:de===1e3?ie(M==="VT200"):de===1002?ie(M==="DRAG"):de===1003?ie(M==="ANY"):de===1004?ie(x.sendFocus):de===1005?4:de===1006?ie(V==="SGR"):de===1015?4:de===1016?ie(V==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?ie(q===R):de===2004?ie(x.bracketedPasteMode):0,G.triggerDataEvent(`${h.C0.ESC}[${B?"":"?"}${fe};${Ee}$y`),!0;var fe,Ee}_updateAttrColor(A,B,x,M,V){return B===2?(A|=50331648,A&=-16777216,A|=_.AttributeData.fromColorRGB([x,M,V])):B===5&&(A&=-50331904,A|=33554432|255&x),A}_extractColor(A,B,x){const M=[0,0,-1,0,0,0];let V=0,G=0;do{if(M[G+V]=A.params[B+G],A.hasSubParams(B+G)){const Q=A.getSubParams(B+G);let he=0;do M[1]===5&&(V=1),M[G+he+1+V]=Q[he];while(++he<Q.length&&he+G+1+V<M.length);break}if(M[1]===5&&G+V>=2||M[1]===2&&G+V>=5)break;M[1]&&(V=1)}while(++G+B<A.length&&G+V<M.length);for(let Q=2;Q<M.length;++Q)M[Q]===-1&&(M[Q]=0);switch(M[0]){case 38:x.fg=this._updateAttrColor(x.fg,M[1],M[3],M[4],M[5]);break;case 48:x.bg=this._updateAttrColor(x.bg,M[1],M[3],M[4],M[5]);break;case 58:x.extended=x.extended.clone(),x.extended.underlineColor=this._updateAttrColor(x.extended.underlineColor,M[1],M[3],M[4],M[5])}return G}_processUnderline(A,B){B.extended=B.extended.clone(),(!~A||A>5)&&(A=1),B.extended.underlineStyle=A,B.fg|=268435456,A===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(A){A.fg=l.DEFAULT_ATTR_DATA.fg,A.bg=l.DEFAULT_ATTR_DATA.bg,A.extended=A.extended.clone(),A.extended.underlineStyle=0,A.extended.underlineColor&=-67108864,A.updateExtended()}charAttributes(A){if(A.length===1&&A.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=A.length;let x;const M=this._curAttrData;for(let V=0;V<B;V++)x=A.params[V],x>=30&&x<=37?(M.fg&=-50331904,M.fg|=16777216|x-30):x>=40&&x<=47?(M.bg&=-50331904,M.bg|=16777216|x-40):x>=90&&x<=97?(M.fg&=-50331904,M.fg|=16777224|x-90):x>=100&&x<=107?(M.bg&=-50331904,M.bg|=16777224|x-100):x===0?this._processSGR0(M):x===1?M.fg|=134217728:x===3?M.bg|=67108864:x===4?(M.fg|=268435456,this._processUnderline(A.hasSubParams(V)?A.getSubParams(V)[0]:1,M)):x===5?M.fg|=536870912:x===7?M.fg|=67108864:x===8?M.fg|=1073741824:x===9?M.fg|=2147483648:x===2?M.bg|=134217728:x===21?this._processUnderline(2,M):x===22?(M.fg&=-134217729,M.bg&=-134217729):x===23?M.bg&=-67108865:x===24?(M.fg&=-268435457,this._processUnderline(0,M)):x===25?M.fg&=-536870913:x===27?M.fg&=-67108865:x===28?M.fg&=-1073741825:x===29?M.fg&=2147483647:x===39?(M.fg&=-67108864,M.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):x===49?(M.bg&=-67108864,M.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):x===38||x===48||x===58?V+=this._extractColor(A,V,M):x===53?M.bg|=1073741824:x===55?M.bg&=-1073741825:x===59?(M.extended=M.extended.clone(),M.extended.underlineColor=-1,M.updateExtended()):x===100?(M.fg&=-67108864,M.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,M.bg&=-67108864,M.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",x);return!0}deviceStatus(A){switch(A.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,x=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${B};${x}R`)}return!0}deviceStatusPrivate(A){if(A.params[0]===6){const B=this._activeBuffer.y+1,x=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${B};${x}R`)}return!0}softReset(A){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(A){const B=A.params[0]||1;switch(B){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const x=B%2==1;return this._optionsService.options.cursorBlink=x,!0}setScrollRegion(A){const B=A.params[0]||1;let x;return(A.length<2||(x=A.params[1])>this._bufferService.rows||x===0)&&(x=this._bufferService.rows),x>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=x-1,this._setCursor(0,0)),!0}windowOptions(A){if(!I(A.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=A.length>1?A.params[1]:0;switch(A.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(H.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(H.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(A){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(A){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(A){return this._windowTitle=A,this._onTitleChange.fire(A),!0}setIconName(A){return this._iconName=A,!0}setOrReportIndexedColor(A){const B=[],x=A.split(";");for(;x.length>1;){const M=x.shift(),V=x.shift();if(/^\d+$/.exec(M)){const G=parseInt(M);if($(G))if(V==="?")B.push({type:0,index:G});else{const Q=(0,D.parseColor)(V);Q&&B.push({type:1,index:G,color:Q})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(A){const B=A.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(A,B){this._getCurrentLinkId()&&this._finishHyperlink();const x=A.split(":");let M;const V=x.findIndex((G=>G.startsWith("id=")));return V!==-1&&(M=x[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:M,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(A,B){const x=A.split(";");for(let M=0;M<x.length&&!(B>=this._specialColors.length);++M,++B)if(x[M]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const V=(0,D.parseColor)(x[M]);V&&this._onColor.fire([{type:1,index:this._specialColors[B],color:V}])}return!0}setOrReportFgColor(A){return this._setOrReportSpecialColor(A,0)}setOrReportBgColor(A){return this._setOrReportSpecialColor(A,1)}setOrReportCursorColor(A){return this._setOrReportSpecialColor(A,2)}restoreIndexedColor(A){if(!A)return this._onColor.fire([{type:2}]),!0;const B=[],x=A.split(";");for(let M=0;M<x.length;++M)if(/^\d+$/.exec(x[M])){const V=parseInt(x[M]);$(V)&&B.push({type:2,index:V})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(A){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(A){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(A){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(A){return A.length!==2?(this.selectDefaultCharset(),!0):(A[0]==="/"||this._charsetService.setgCharset(O[A[0]],p.CHARSETS[A[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const A=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,A,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(A){return this._charsetService.setgLevel(A),!0}screenAlignmentPattern(){const A=new o.CellData;A.content=4194373,A.fg=this._curAttrData.fg,A.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const x=this._activeBuffer.ybase+this._activeBuffer.y+B,M=this._activeBuffer.lines.get(x);M&&(M.fill(A),M.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(A,B){const x=this._bufferService.buffer,M=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${V}${h.C0.ESC}\\`),!0))(A==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:A==='"p'?'P1$r61;1"p':A==="r"?`P1$r${x.scrollTop+1};${x.scrollBottom+1}r`:A==="m"?"P1$r0m":A===" q"?`P1$r${{block:2,underline:4,bar:6}[M.cursorStyle]-(M.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(A,B){this._dirtyRowTracker.markRangeDirty(A,B)}}u.InputHandler=re;let U=class{constructor(se){this._bufferService=se,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(se){se<this.start?this.start=se:se>this.end&&(this.end=se)}markRangeDirty(se,A){se>A&&(J=se,se=A,A=J),se<this.start&&(this.start=se),A>this.end&&(this.end=A)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function $(se){return 0<=se&&se<256}U=d([m(0,E.IBufferService)],U)},844:(K,u)=>{function f(d){for(const m of d)m.dispose();d.length=0}Object.defineProperty(u,"__esModule",{value:!0}),u.getDisposeArrayDisposable=u.disposeArray=u.toDisposable=u.MutableDisposable=u.Disposable=void 0,u.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const m=this._disposables.indexOf(d);m!==-1&&this._disposables.splice(m,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var m;this._isDisposed||d===this._value||((m=this._value)==null||m.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=f,u.getDisposeArrayDisposable=function(d){return{dispose:()=>f(d)}}},1505:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(m,h,p){this._data[m]||(this._data[m]={}),this._data[m][h]=p}get(m,h){return this._data[m]?this._data[m][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=f,u.FourKeyMap=class{constructor(){this._data=new f}set(d,m,h,p,b){this._data.get(d,m)||this._data.set(d,m,new f),this._data.get(d,m).set(h,p,b)}get(d,m,h,p){var b;return(b=this._data.get(d,m))==null?void 0:b.get(h,p)}clear(){this._data.clear()}}},6114:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isChromeOS=u.isLinux=u.isWindows=u.isIphone=u.isIpad=u.isMac=u.getSafariVersion=u.isSafari=u.isLegacyEdge=u.isFirefox=u.isNode=void 0,u.isNode=typeof process<"u"&&"title"in process;const f=u.isNode?"node":navigator.userAgent,d=u.isNode?"node":navigator.platform;u.isFirefox=f.includes("Firefox"),u.isLegacyEdge=f.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(f),u.getSafariVersion=function(){if(!u.isSafari)return 0;const m=f.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),u.isIpad=d==="iPad",u.isIphone=d==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),u.isLinux=d.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(f)},6106:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let f=0;u.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(f=this._search(this._getKey(d)),this._array.splice(f,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const m=this._getKey(d);if(m===void 0||(f=this._search(m),f===-1)||this._getKey(this._array[f])!==m)return!1;do if(this._array[f]===d)return this._array.splice(f,1),!0;while(++f<this._array.length&&this._getKey(this._array[f])===m);return!1}*getKeyIterator(d){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do yield this._array[f];while(++f<this._array.length&&this._getKey(this._array[f])===d)}forEachByKey(d,m){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do m(this._array[f]);while(++f<this._array.length&&this._getKey(this._array[f])===d)}values(){return[...this._array].values()}_search(d){let m=0,h=this._array.length-1;for(;h>=m;){let p=m+h>>1;const b=this._getKey(this._array[p]);if(b>d)h=p-1;else{if(!(b<d)){for(;p>0&&this._getKey(this._array[p-1])===d;)p--;return p}m=p+1}}return m}}},7226:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=f(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let w=0,g=0,l=b.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),g=Math.max(w,g),c=b.timeRemaining(),1.5*g>c)return l-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-w))}ms`),void this._start();l=c}this.clear()}}class h extends m{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const w=Date.now()+b;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=f(643);u.updateWindowsModeWrappedState=function(m){const h=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),p=h==null?void 0:h.get(m.cols-1),b=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);b&&p&&(b.isWrapped=p[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&p[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class f{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new f;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}u.AttributeData=f;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,p=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=f(6349),m=f(7226),h=f(3734),p=f(8437),b=f(4634),w=f(511),g=f(643),l=f(4863),c=f(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(a,o,_){this._hasScrollback=a,this._optionsService=o,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=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(a){return a?(this._nullCell.fg=a.fg,this._nullCell.bg=a.bg,this._nullCell.extended=a.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(a){return a?(this._whitespaceCell.fg=a.fg,this._whitespaceCell.bg=a.bg,this._whitespaceCell.extended=a.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,o){return new p.BufferLine(this._bufferService.cols,this.getNullCell(a),o)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;const o=a+this._optionsService.rawOptions.scrollback;return o>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:o}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=p.DEFAULT_ATTR_DATA);let o=this._rows;for(;o--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,o){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=0;const y=this._getCorrectBufferLength(o);if(y>this.lines.maxLength&&(this.lines.maxLength=y),this.lines.length>0){if(this._cols<a)for(let v=0;v<this.lines.length;v++)E+=+this.lines.get(v).resize(a,_);let C=0;if(this._rows<o)for(let v=this._rows;v<o;v++)this.lines.length<o+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(a,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+C+1?(this.ybase--,C++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(a,_)));else for(let v=this._rows;v>o;v--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(y<this.lines.maxLength){const v=this.lines.length-y;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=y}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,o-1),C&&(this.y+=C),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(a,o),this._cols>a))for(let C=0;C<this.lines.length;C++)E+=+this.lines.get(C).resize(a,_);this._cols=a,this._rows=o,this._memoryCleanupQueue.clear(),E>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let o=0;for(;this._memoryCleanupPosition<this.lines.length;)if(o+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),o>100)return!0;return a}get _isReflowEnabled(){const a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&a.backend==="conpty"&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,o){this._cols!==a&&(a>this._cols?this._reflowLarger(a,o):this._reflowSmaller(a,o))}_reflowLarger(a,o){const _=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const E=(0,b.reflowLargerCreateNewLayout)(this.lines,_);(0,b.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(a,o,E.countRemoved)}}_reflowLargerAdjustViewport(a,o,_){const E=this.getNullCell(p.DEFAULT_ATTR_DATA);let y=_;for(;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new p.BufferLine(a,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,o){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),E=[];let y=0;for(let C=this.lines.length-1;C>=0;C--){let v=this.lines.get(C);if(!v||!v.isWrapped&&v.getTrimmedLength()<=a)continue;const D=[v];for(;v.isWrapped&&C>0;)v=this.lines.get(--C),D.unshift(v);const O=this.ybase+this.y;if(O>=C&&O<C+D.length)continue;const N=D[D.length-1].getTrimmedLength(),I=(0,b.reflowSmallerGetNewLineLengths)(D,this._cols,a),H=I.length-D.length;let J;J=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+H):Math.max(0,this.lines.length-this.lines.maxLength+H);const re=[];for(let x=0;x<H;x++){const M=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);re.push(M)}re.length>0&&(E.push({start:C+D.length+y,newLines:re}),y+=re.length),D.push(...re);let U=I.length-1,$=I[U];$===0&&(U--,$=I[U]);let se=D.length-H-1,A=N;for(;se>=0;){const x=Math.min(A,$);if(D[U]===void 0)break;if(D[U].copyCellsFrom(D[se],A-x,$-x,x,!0),$-=x,$===0&&(U--,$=I[U]),A-=x,A===0){se--;const M=Math.max(se,0);A=(0,b.getWrappedLineTrimmedLength)(D,M,this._cols)}}for(let x=0;x<D.length;x++)I[x]<a&&D[x].setCell(I[x],_);let B=H-J;for(;B-- >0;)this.ybase===0?this.y<o-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+y)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+H,this.ybase+o-1)}if(E.length>0){const C=[],v=[];for(let U=0;U<this.lines.length;U++)v.push(this.lines.get(U));const D=this.lines.length;let O=D-1,N=0,I=E[N];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);let H=0;for(let U=Math.min(this.lines.maxLength-1,D+y-1);U>=0;U--)if(I&&I.start>O+H){for(let $=I.newLines.length-1;$>=0;$--)this.lines.set(U--,I.newLines[$]);U++,C.push({index:O+1,amount:I.newLines.length}),H+=I.newLines.length,I=E[++N]}else this.lines.set(U,v[O--]);let J=0;for(let U=C.length-1;U>=0;U--)C[U].index+=J,this.lines.onInsertEmitter.fire(C[U]),J+=C[U].amount;const re=Math.max(0,D+y-this.lines.maxLength);re>0&&this.lines.onTrimEmitter.fire(re)}}translateBufferLineToString(a,o,_=0,E){const y=this.lines.get(a);return y?y.translateToString(o,_,E):""}getWrappedRangeForLine(a){let o=a,_=a;for(;o>0&&this.lines.get(o).isWrapped;)o--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:o,last:_}}setupTabStops(a){for(a!=null?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(a==null&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(a==null&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].line===a&&(this.markers[o].dispose(),this.markers.splice(o--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose(),this.markers.splice(a--,1);this._isClearing=!1}addMarker(a){const o=new l.Marker(a);return this.markers.push(o),o.register(this.lines.onTrim((_=>{o.line-=_,o.line<0&&o.dispose()}))),o.register(this.lines.onInsert((_=>{o.line>=_.index&&(o.line+=_.amount)}))),o.register(this.lines.onDelete((_=>{o.line>=_.index&&o.line<_.index+_.amount&&o.dispose(),o.line>_.index&&(o.line-=_.amount)}))),o.register(o.onDispose((()=>this._removeMarker(o)))),o}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=f(3734),m=f(511),h=f(643),p=f(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let b=0;class w{constructor(l,c,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const o=c||m.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<l;++_)this.setCell(_,o);this.length=l}get(l){const c=this._data[3*l+0],a=2097151&c;return[this._data[3*l+1],2097152&c?this._combined[l]:a?(0,p.stringFromCodePoint)(a):"",c>>22,2097152&c?this._combined[l].charCodeAt(this._combined[l].length-1):a]}set(l,c){this._data[3*l+1]=c[h.CHAR_DATA_ATTR_INDEX],c[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=c[1],this._data[3*l+0]=2097152|l|c[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(l){return this._data[3*l+0]>>22}hasWidth(l){return 12582912&this._data[3*l+0]}getFg(l){return this._data[3*l+1]}getBg(l){return this._data[3*l+2]}hasContent(l){return 4194303&this._data[3*l+0]}getCodePoint(l){const c=this._data[3*l+0];return 2097152&c?this._combined[l].charCodeAt(this._combined[l].length-1):2097151&c}isCombined(l){return 2097152&this._data[3*l+0]}getString(l){const c=this._data[3*l+0];return 2097152&c?this._combined[l]:2097151&c?(0,p.stringFromCodePoint)(2097151&c):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,c){return b=3*l,c.content=this._data[b+0],c.fg=this._data[b+1],c.bg=this._data[b+2],2097152&c.content&&(c.combinedData=this._combined[l]),268435456&c.bg&&(c.extended=this._extendedAttrs[l]),c}setCell(l,c){2097152&c.content&&(this._combined[l]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[l]=c.extended),this._data[3*l+0]=c.content,this._data[3*l+1]=c.fg,this._data[3*l+2]=c.bg}setCellFromCodepoint(l,c,a,o){268435456&o.bg&&(this._extendedAttrs[l]=o.extended),this._data[3*l+0]=c|a<<22,this._data[3*l+1]=o.fg,this._data[3*l+2]=o.bg}addCodepointToCell(l,c,a){let o=this._data[3*l+0];2097152&o?this._combined[l]+=(0,p.stringFromCodePoint)(c):2097151&o?(this._combined[l]=(0,p.stringFromCodePoint)(2097151&o)+(0,p.stringFromCodePoint)(c),o&=-2097152,o|=2097152):o=c|4194304,a&&(o&=-12582913,o|=a<<22),this._data[3*l+0]=o}insertCells(l,c,a){if((l%=this.length)&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,a),c<this.length-l){const o=new m.CellData;for(let _=this.length-l-c-1;_>=0;--_)this.setCell(l+c+_,this.loadCell(l+_,o));for(let _=0;_<c;++_)this.setCell(l+_,a)}else for(let o=l;o<this.length;++o)this.setCell(o,a);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,a)}deleteCells(l,c,a){if(l%=this.length,c<this.length-l){const o=new m.CellData;for(let _=0;_<this.length-l-c;++_)this.setCell(l+_,this.loadCell(l+c+_,o));for(let _=this.length-c;_<this.length;++_)this.setCell(_,a)}else for(let o=l;o<this.length;++o)this.setCell(o,a);l&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,a),this.getWidth(l)!==0||this.hasContent(l)||this.setCellFromCodepoint(l,0,1,a)}replaceCells(l,c,a,o=!1){if(o)for(l&&this.getWidth(l-1)===2&&!this.isProtected(l-1)&&this.setCellFromCodepoint(l-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,a);l<c&&l<this.length;)this.isProtected(l)||this.setCell(l,a),l++;else for(l&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,a);l<c&&l<this.length;)this.setCell(l++,a)}resize(l,c){if(l===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*l;if(l>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const o=new Uint32Array(a);o.set(this._data),this._data=o}for(let o=this.length;o<l;++o)this.setCell(o,c)}else{this._data=this._data.subarray(0,a);const o=Object.keys(this._combined);for(let E=0;E<o.length;E++){const y=parseInt(o[E],10);y>=l&&delete this._combined[y]}const _=Object.keys(this._extendedAttrs);for(let E=0;E<_.length;E++){const y=parseInt(_[E],10);y>=l&&delete this._extendedAttrs[y]}}return this.length=l,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const l=new Uint32Array(this._data.length);return l.set(this._data),this._data=l,1}return 0}fill(l,c=!1){if(c)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,l);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,l)}}copyFrom(l){this.length!==l.length?this._data=new Uint32Array(l._data):this._data.set(l._data),this.length=l.length,this._combined={};for(const c in l._combined)this._combined[c]=l._combined[c];this._extendedAttrs={};for(const c in l._extendedAttrs)this._extendedAttrs[c]=l._extendedAttrs[c];this.isWrapped=l.isWrapped}clone(){const l=new w(0);l._data=new Uint32Array(this._data),l.length=this.length;for(const c in this._combined)l._combined[c]=this._combined[c];for(const c in this._extendedAttrs)l._extendedAttrs[c]=this._extendedAttrs[c];return l.isWrapped=this.isWrapped,l}getTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0])return l+(this._data[3*l+0]>>22);return 0}getNoBgTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0]||50331648&this._data[3*l+2])return l+(this._data[3*l+0]>>22);return 0}copyCellsFrom(l,c,a,o,_){const E=l._data;if(_)for(let C=o-1;C>=0;C--){for(let v=0;v<3;v++)this._data[3*(a+C)+v]=E[3*(c+C)+v];268435456&E[3*(c+C)+2]&&(this._extendedAttrs[a+C]=l._extendedAttrs[c+C])}else for(let C=0;C<o;C++){for(let v=0;v<3;v++)this._data[3*(a+C)+v]=E[3*(c+C)+v];268435456&E[3*(c+C)+2]&&(this._extendedAttrs[a+C]=l._extendedAttrs[c+C])}const y=Object.keys(l._combined);for(let C=0;C<y.length;C++){const v=parseInt(y[C],10);v>=c&&(this._combined[v-c+a]=l._combined[v])}}translateToString(l,c,a,o){c=c??0,a=a??this.length,l&&(a=Math.min(a,this.getTrimmedLength())),o&&(o.length=0);let _="";for(;c<a;){const E=this._data[3*c+0],y=2097151&E,C=2097152&E?this._combined[c]:y?(0,p.stringFromCodePoint)(y):h.WHITESPACE_CELL_CHAR;if(_+=C,o)for(let v=0;v<C.length;++v)o.push(c);c+=E>>22||1}return o&&o.push(c),_}}u.BufferLine=w},4841:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(f,d){if(f.start.y>f.end.y)throw new Error(`Buffer range end (${f.end.x}, ${f.end.y}) cannot be before start (${f.start.x}, ${f.start.y})`);return d*(f.end.y-f.start.y)+(f.end.x-f.start.x+1)}},4634:(K,u)=>{function f(d,m,h){if(m===d.length-1)return d[m].getTrimmedLength();const p=!d[m].hasContent(h-1)&&d[m].getWidth(h-1)===1,b=d[m+1].getWidth(0)===2;return p&&b?h-1:h}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(d,m,h,p,b){const w=[];for(let g=0;g<d.length-1;g++){let l=g,c=d.get(++l);if(!c.isWrapped)continue;const a=[d.get(g)];for(;l<d.length&&c.isWrapped;)a.push(c),c=d.get(++l);if(p>=g&&p<l){g+=a.length-1;continue}let o=0,_=f(a,o,m),E=1,y=0;for(;E<a.length;){const v=f(a,E,m),D=v-y,O=h-_,N=Math.min(D,O);a[o].copyCellsFrom(a[E],y,_,N,!1),_+=N,_===h&&(o++,_=0),y+=N,y===v&&(E++,y=0),_===0&&o!==0&&a[o-1].getWidth(h-1)===2&&(a[o].copyCellsFrom(a[o-1],h-1,_++,1,!1),a[o-1].setCell(h-1,b))}a[o].replaceCells(_,h,b);let C=0;for(let v=a.length-1;v>0&&(v>o||a[v].getTrimmedLength()===0);v--)C++;C>0&&(w.push(g+a.length-C),w.push(C)),g+=a.length-1}return w},u.reflowLargerCreateNewLayout=function(d,m){const h=[];let p=0,b=m[p],w=0;for(let g=0;g<d.length;g++)if(b===g){const l=m[++p];d.onDeleteEmitter.fire({index:g-w,amount:l}),g+=l-1,w+=l,b=m[++p]}else h.push(g);return{layout:h,countRemoved:w}},u.reflowLargerApplyNewLayout=function(d,m){const h=[];for(let p=0;p<m.length;p++)h.push(d.get(m[p]));for(let p=0;p<h.length;p++)d.set(p,h[p]);d.length=m.length},u.reflowSmallerGetNewLineLengths=function(d,m,h){const p=[],b=d.map(((c,a)=>f(d,a,m))).reduce(((c,a)=>c+a));let w=0,g=0,l=0;for(;l<b;){if(b-l<h){p.push(b-l);break}w+=h;const c=f(d,g,m);w>c&&(w-=c,g++);const a=d[g].getWidth(w-1)===2;a&&w--;const o=a?h-1:h;p.push(o),l+=o}return p},u.getWrappedLineTrimmedLength=f},5295:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=f(8460),m=f(844),h=f(9092);class p extends m.Disposable{constructor(w,g){super(),this._optionsService=w,this._bufferService=g,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(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,g){this._normal.resize(w,g),this._alt.resize(w,g),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}u.BufferSet=p},511:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=f(482),m=f(643),h=f(3734);class p extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const g=new p;return g.setFromCharData(w),g}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let g=!1;if(w[m.CHAR_DATA_CHAR_INDEX].length>2)g=!0;else if(w[m.CHAR_DATA_CHAR_INDEX].length===2){const l=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const c=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(l-55296)+c-56320+65536|w[m.CHAR_DATA_WIDTH_INDEX]<<22:g=!0}else g=!0}else this.content=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[m.CHAR_DATA_WIDTH_INDEX]<<22;g&&(this.combinedData=w[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=p},643:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WHITESPACE_CELL_CODE=u.WHITESPACE_CELL_WIDTH=u.WHITESPACE_CELL_CHAR=u.NULL_CELL_CODE=u.NULL_CELL_WIDTH=u.NULL_CELL_CHAR=u.CHAR_DATA_CODE_INDEX=u.CHAR_DATA_WIDTH_INDEX=u.CHAR_DATA_CHAR_INDEX=u.CHAR_DATA_ATTR_INDEX=u.DEFAULT_EXT=u.DEFAULT_ATTR=u.DEFAULT_COLOR=void 0,u.DEFAULT_COLOR=0,u.DEFAULT_ATTR=256|u.DEFAULT_COLOR<<9,u.DEFAULT_EXT=0,u.CHAR_DATA_ATTR_INDEX=0,u.CHAR_DATA_CHAR_INDEX=1,u.CHAR_DATA_WIDTH_INDEX=2,u.CHAR_DATA_CODE_INDEX=3,u.NULL_CELL_CHAR="",u.NULL_CELL_WIDTH=1,u.NULL_CELL_CODE=0,u.WHITESPACE_CELL_CHAR=" ",u.WHITESPACE_CELL_WIDTH=1,u.WHITESPACE_CELL_CODE=32},4863:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=f(8460),m=f(844);class h{get id(){return this._id}constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(b){return this._disposables.push(b),b}}u.Marker=h,h._nextId=1},7116:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_CHARSET=u.CHARSETS=void 0,u.CHARSETS={},u.DEFAULT_CHARSET=u.CHARSETS.B,u.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},u.CHARSETS.A={"#":"£"},u.CHARSETS.B=void 0,u.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},u.CHARSETS.C=u.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},u.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},u.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},u.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},u.CHARSETS.E=u.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},u.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},u.CHARSETS.H=u.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(K,u)=>{var f,d,m;Object.defineProperty(u,"__esModule",{value:!0}),u.C1_ESCAPED=u.C1=u.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
56
- `,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(f||(u.C0=f={})),(function(h){h.PAD="€",h.HOP="",h.BPH="‚",h.NBH="ƒ",h.IND="„",h.NEL="…",h.SSA="†",h.ESA="‡",h.HTS="ˆ",h.HTJ="‰",h.VTS="Š",h.PLD="‹",h.PLU="Œ",h.RI="",h.SS2="Ž",h.SS3="",h.DCS="",h.PU1="‘",h.PU2="’",h.STS="“",h.CCH="”",h.MW="•",h.SPA="–",h.EPA="—",h.SOS="˜",h.SGCI="™",h.SCI="š",h.CSI="›",h.ST="œ",h.OSC="",h.PM="ž",h.APC="Ÿ"})(d||(u.C1=d={})),(function(h){h.ST=`${f.ESC}\\`})(m||(u.C1_ESCAPED=m={}))},7399:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=f(2584),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};u.evaluateKeyboardEvent=function(h,p,b,w){const g={type:0,cancel:!1,key:void 0},l=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?g.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?g.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?g.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(g.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:g.key=h.ctrlKey?"\b":d.C0.DEL,h.altKey&&(g.key=d.C0.ESC+g.key);break;case 9:if(h.shiftKey){g.key=d.C0.ESC+"[Z";break}g.key=d.C0.HT,g.cancel=!0;break;case 13:g.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,g.cancel=!0;break;case 27:g.key=d.C0.ESC,h.altKey&&(g.key=d.C0.ESC+d.C0.ESC),g.cancel=!0;break;case 37:if(h.metaKey)break;l?(g.key=d.C0.ESC+"[1;"+(l+1)+"D",g.key===d.C0.ESC+"[1;3D"&&(g.key=d.C0.ESC+(b?"b":"[1;5D"))):g.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;l?(g.key=d.C0.ESC+"[1;"+(l+1)+"C",g.key===d.C0.ESC+"[1;3C"&&(g.key=d.C0.ESC+(b?"f":"[1;5C"))):g.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;l?(g.key=d.C0.ESC+"[1;"+(l+1)+"A",b||g.key!==d.C0.ESC+"[1;3A"||(g.key=d.C0.ESC+"[1;5A")):g.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;l?(g.key=d.C0.ESC+"[1;"+(l+1)+"B",b||g.key!==d.C0.ESC+"[1;3B"||(g.key=d.C0.ESC+"[1;5B")):g.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(g.key=d.C0.ESC+"[2~");break;case 46:g.key=l?d.C0.ESC+"[3;"+(l+1)+"~":d.C0.ESC+"[3~";break;case 36:g.key=l?d.C0.ESC+"[1;"+(l+1)+"H":p?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:g.key=l?d.C0.ESC+"[1;"+(l+1)+"F":p?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?g.type=2:h.ctrlKey?g.key=d.C0.ESC+"[5;"+(l+1)+"~":g.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?g.type=3:h.ctrlKey?g.key=d.C0.ESC+"[6;"+(l+1)+"~":g.key=d.C0.ESC+"[6~";break;case 112:g.key=l?d.C0.ESC+"[1;"+(l+1)+"P":d.C0.ESC+"OP";break;case 113:g.key=l?d.C0.ESC+"[1;"+(l+1)+"Q":d.C0.ESC+"OQ";break;case 114:g.key=l?d.C0.ESC+"[1;"+(l+1)+"R":d.C0.ESC+"OR";break;case 115:g.key=l?d.C0.ESC+"[1;"+(l+1)+"S":d.C0.ESC+"OS";break;case 116:g.key=l?d.C0.ESC+"[15;"+(l+1)+"~":d.C0.ESC+"[15~";break;case 117:g.key=l?d.C0.ESC+"[17;"+(l+1)+"~":d.C0.ESC+"[17~";break;case 118:g.key=l?d.C0.ESC+"[18;"+(l+1)+"~":d.C0.ESC+"[18~";break;case 119:g.key=l?d.C0.ESC+"[19;"+(l+1)+"~":d.C0.ESC+"[19~";break;case 120:g.key=l?d.C0.ESC+"[20;"+(l+1)+"~":d.C0.ESC+"[20~";break;case 121:g.key=l?d.C0.ESC+"[21;"+(l+1)+"~":d.C0.ESC+"[21~";break;case 122:g.key=l?d.C0.ESC+"[23;"+(l+1)+"~":d.C0.ESC+"[23~";break;case 123:g.key=l?d.C0.ESC+"[24;"+(l+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(b&&!w||!h.altKey||h.metaKey)!b||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?g.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(g.key=d.C0.US),h.key==="@"&&(g.key=d.C0.NUL)):h.keyCode===65&&(g.type=1);else{const c=m[h.keyCode],a=c==null?void 0:c[h.shiftKey?1:0];if(a)g.key=d.C0.ESC+a;else if(h.keyCode>=65&&h.keyCode<=90){const o=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(o);h.shiftKey&&(_=_.toUpperCase()),g.key=d.C0.ESC+_}else if(h.keyCode===32)g.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let o=h.code.slice(3,4);h.shiftKey||(o=o.toLowerCase()),g.key=d.C0.ESC+o,g.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?g.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?g.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?g.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?g.key=d.C0.DEL:h.keyCode===219?g.key=d.C0.ESC:h.keyCode===220?g.key=d.C0.FS:h.keyCode===221&&(g.key=d.C0.GS)}return g}},482:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},u.utf32ToString=function(f,d=0,m=f.length){let h="";for(let p=d;p<m;++p){let b=f[p];b>65535?(b-=65536,h+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):h+=String.fromCharCode(b)}return h},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(f,d){const m=f.length;if(!m)return 0;let h=0,p=0;if(this._interim){const b=f.charCodeAt(p++);56320<=b&&b<=57343?d[h++]=1024*(this._interim-55296)+b-56320+65536:(d[h++]=this._interim,d[h++]=b),this._interim=0}for(let b=p;b<m;++b){const w=f.charCodeAt(b);if(55296<=w&&w<=56319){if(++b>=m)return this._interim=w,h;const g=f.charCodeAt(b);56320<=g&&g<=57343?d[h++]=1024*(w-55296)+g-56320+65536:(d[h++]=w,d[h++]=g)}else w!==65279&&(d[h++]=w)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,d){const m=f.length;if(!m)return 0;let h,p,b,w,g=0,l=0,c=0;if(this.interim[0]){let _=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let y,C=0;for(;(y=63&this.interim[++C])&&C<4;)E<<=6,E|=y;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=v-C;for(;c<D;){if(c>=m)return 0;if(y=f[c++],(192&y)!=128){c--,_=!0;break}this.interim[C++]=y,E<<=6,E|=63&y}_||(v===2?E<128?c--:d[g++]=E:v===3?E<2048||E>=55296&&E<=57343||E===65279||(d[g++]=E):E<65536||E>1114111||(d[g++]=E)),this.interim.fill(0)}const a=m-4;let o=c;for(;o<m;){for(;!(!(o<a)||128&(h=f[o])||128&(p=f[o+1])||128&(b=f[o+2])||128&(w=f[o+3]));)d[g++]=h,d[g++]=p,d[g++]=b,d[g++]=w,o+=4;if(h=f[o++],h<128)d[g++]=h;else if((224&h)==192){if(o>=m)return this.interim[0]=h,g;if(p=f[o++],(192&p)!=128){o--;continue}if(l=(31&h)<<6|63&p,l<128){o--;continue}d[g++]=l}else if((240&h)==224){if(o>=m)return this.interim[0]=h,g;if(p=f[o++],(192&p)!=128){o--;continue}if(o>=m)return this.interim[0]=h,this.interim[1]=p,g;if(b=f[o++],(192&b)!=128){o--;continue}if(l=(15&h)<<12|(63&p)<<6|63&b,l<2048||l>=55296&&l<=57343||l===65279)continue;d[g++]=l}else if((248&h)==240){if(o>=m)return this.interim[0]=h,g;if(p=f[o++],(192&p)!=128){o--;continue}if(o>=m)return this.interim[0]=h,this.interim[1]=p,g;if(b=f[o++],(192&b)!=128){o--;continue}if(o>=m)return this.interim[0]=h,this.interim[1]=p,this.interim[2]=b,g;if(w=f[o++],(192&w)!=128){o--;continue}if(l=(7&h)<<18|(63&p)<<12|(63&b)<<6|63&w,l<65536||l>1114111)continue;d[g++]=l}}return g}}},225:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const d=f(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;u.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 b=0;b<m.length;++b)p.fill(0,m[b][0],m[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?p[b]:(function(w,g){let l,c=0,a=g.length-1;if(w<g[0][0]||w>g[a][1])return!1;for(;a>=c;)if(l=c+a>>1,w>g[l][1])c=l+1;else{if(!(w<g[l][0]))return!0;a=l-1}return!1})(b,h)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,w){let g=this.wcwidth(b),l=g===0&&w!==0;if(l){const c=d.UnicodeService.extractWidth(w);c===0?l=!1:c>g&&(g=c)}return d.UnicodeService.createPropertyValue(0,g,l)}}},5981:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=f(8460),m=f(844);class h extends m.Disposable{constructor(b){super(),this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(b,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(b,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+=b.length,this._writeBuffer.push(b),this._callbacks.push(w),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(w)}_innerWrite(b=0,w=!0){const g=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],c=this._action(l,w);if(c){const o=_=>Date.now()-g>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(g,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(o)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=l.length,Date.now()-g>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}u.WriteBuffer=h},5941:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const f=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function m(h,p){const b=h.toString(16),w=b.length<2?"0"+b:b;switch(p){case 4:return b[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}u.parseColor=function(h){if(!h)return;let p=h.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const b=f.exec(p);if(b){const w=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/w*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/w*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/w*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),d.exec(p)&&[3,6,9,12].includes(p.length))){const b=p.length/3,w=[0,0,0];for(let g=0;g<3;++g){const l=parseInt(p.slice(b*g,b*g+b),16);w[g]=b===1?l<<4:b===2?l:b===3?l>>4:l>>8}return w}},u.toRgbString=function(h,p=16){const[b,w,g]=h;return`rgb:${m(b,p)}/${m(w,p)}/${m(g,p)}`}},5770:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=f(482),m=f(8742),h=f(5770),p=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(w,g){this._handlers[w]===void 0&&(this._handlers[w]=[]);const l=this._handlers[w];return l.push(g),{dispose:()=>{const c=l.indexOf(g);c!==-1&&l.splice(c,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,g){if(this.reset(),this._ident=w,this._active=this._handlers[w]||p,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(g);else this._handlerFb(this._ident,"HOOK",g)}put(w,g,l){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(w,g,l);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(w,g,l))}unhook(w,g=!0){if(this._active.length){let l=!1,c=this._active.length-1,a=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,l=g,a=this._stack.fallThrough,this._stack.paused=!1),!a&&l===!1){for(;c>=0&&(l=this._active[c].unhook(w),l!==!0);c--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,l;c--}for(;c>=0;c--)if(l=this._active[c].unhook(!1),l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,l}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const b=new m.Params;b.addParam(0),u.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=b,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():b,this._data="",this._hitLimit=!1}put(w,g,l){this._hitLimit||(this._data+=(0,d.utf32ToString)(w,g,l),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let g=!1;if(this._hitLimit)g=!1;else if(w&&(g=this._handler(this._data,this._params),g instanceof Promise))return g.then((l=>(this._params=b,this._data="",this._hitLimit=!1,l)));return this._params=b,this._data="",this._hitLimit=!1,g}}},2015:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=f(844),m=f(8742),h=f(6242),p=f(6351);class b{constructor(c){this.table=new Uint8Array(c)}setDefault(c,a){this.table.fill(c<<4|a)}add(c,a,o,_){this.table[a<<8|c]=o<<4|_}addMany(c,a,o,_){for(let E=0;E<c.length;E++)this.table[a<<8|c[E]]=o<<4|_}}u.TransitionTable=b;const w=160;u.VT500_TRANSITION_TABLE=(function(){const l=new b(4095),c=Array.apply(null,Array(256)).map(((C,v)=>v)),a=(C,v)=>c.slice(C,v),o=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const E=a(0,14);let y;for(y in l.setDefault(1,0),l.addMany(o,0,2,0),E)l.addMany([24,26,153,154],y,3,0),l.addMany(a(128,144),y,3,0),l.addMany(a(144,152),y,3,0),l.add(156,y,0,0),l.add(27,y,11,1),l.add(157,y,4,8),l.addMany([152,158,159],y,0,7),l.add(155,y,11,3),l.add(144,y,11,9);return l.addMany(_,0,3,0),l.addMany(_,1,3,1),l.add(127,1,0,1),l.addMany(_,8,0,8),l.addMany(_,3,3,3),l.add(127,3,0,3),l.addMany(_,4,3,4),l.add(127,4,0,4),l.addMany(_,6,3,6),l.addMany(_,5,3,5),l.add(127,5,0,5),l.addMany(_,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(o,8,5,8),l.add(127,8,5,8),l.addMany([156,27,24,26,7],8,6,0),l.addMany(a(28,32),8,0,8),l.addMany([88,94,95],1,0,7),l.addMany(o,7,0,7),l.addMany(_,7,0,7),l.add(156,7,0,0),l.add(127,7,0,7),l.add(91,1,11,3),l.addMany(a(64,127),3,7,0),l.addMany(a(48,60),3,8,4),l.addMany([60,61,62,63],3,9,4),l.addMany(a(48,60),4,8,4),l.addMany(a(64,127),4,7,0),l.addMany([60,61,62,63],4,0,6),l.addMany(a(32,64),6,0,6),l.add(127,6,0,6),l.addMany(a(64,127),6,0,0),l.addMany(a(32,48),3,9,5),l.addMany(a(32,48),5,9,5),l.addMany(a(48,64),5,0,6),l.addMany(a(64,127),5,7,0),l.addMany(a(32,48),4,9,5),l.addMany(a(32,48),1,9,2),l.addMany(a(32,48),2,9,2),l.addMany(a(48,127),2,10,0),l.addMany(a(48,80),1,10,0),l.addMany(a(81,88),1,10,0),l.addMany([89,90,92],1,10,0),l.addMany(a(96,127),1,10,0),l.add(80,1,11,9),l.addMany(_,9,0,9),l.add(127,9,0,9),l.addMany(a(28,32),9,0,9),l.addMany(a(32,48),9,9,12),l.addMany(a(48,60),9,8,10),l.addMany([60,61,62,63],9,9,10),l.addMany(_,11,0,11),l.addMany(a(32,128),11,0,11),l.addMany(a(28,32),11,0,11),l.addMany(_,10,0,10),l.add(127,10,0,10),l.addMany(a(28,32),10,0,10),l.addMany(a(48,60),10,8,10),l.addMany([60,61,62,63],10,0,11),l.addMany(a(32,48),10,9,12),l.addMany(_,12,0,12),l.add(127,12,0,12),l.addMany(a(28,32),12,0,12),l.addMany(a(32,48),12,9,12),l.addMany(a(48,64),12,0,11),l.addMany(a(64,127),12,12,13),l.addMany(a(64,127),10,12,13),l.addMany(a(64,127),9,12,13),l.addMany(_,13,13,13),l.addMany(o,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(w,0,2,0),l.add(w,8,5,8),l.add(w,6,0,6),l.add(w,11,0,11),l.add(w,13,13,13),l})();class g extends d.Disposable{constructor(c=u.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(a,o,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,o)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,a=[64,126]){let o=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(o=c.prefix.charCodeAt(0),o&&60>o||o>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;E<c.intermediates.length;++E){const y=c.intermediates.charCodeAt(E);if(32>y||y>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");o<<=8,o|=y}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(a[0]>_||_>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return o<<=8,o|=_,o}identToString(c){const a=[];for(;c;)a.push(String.fromCharCode(255&c)),c>>=8;return a.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,a){const o=this._identifier(c,[48,126]);this._escHandlers[o]===void 0&&(this._escHandlers[o]=[]);const _=this._escHandlers[o];return _.push(a),{dispose:()=>{const E=_.indexOf(a);E!==-1&&_.splice(E,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,a){this._executeHandlers[c.charCodeAt(0)]=a}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,a){const o=this._identifier(c);this._csiHandlers[o]===void 0&&(this._csiHandlers[o]=[]);const _=this._csiHandlers[o];return _.push(a),{dispose:()=>{const E=_.indexOf(a);E!==-1&&_.splice(E,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,a){return this._dcsParser.registerHandler(this._identifier(c),a)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,a){return this._oscParser.registerHandler(c,a)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(c,a,o,_,E){this._parseStack.state=c,this._parseStack.handlers=a,this._parseStack.handlerPos=o,this._parseStack.transition=_,this._parseStack.chunkPos=E}parse(c,a,o){let _,E=0,y=0,C=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,C=this._parseStack.chunkPos+1;else{if(o===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const v=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(o===!1&&D>-1){for(;D>=0&&(_=v[D](this._params),_!==!0);D--)if(_ instanceof Promise)return this._parseStack.handlerPos=D,_}this._parseStack.handlers=[];break;case 4:if(o===!1&&D>-1){for(;D>=0&&(_=v[D](),_!==!0);D--)if(_ instanceof Promise)return this._parseStack.handlerPos=D,_}this._parseStack.handlers=[];break;case 6:if(E=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(E!==24&&E!==26,o),_)return _;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=c[this._parseStack.chunkPos],_=this._oscParser.end(E!==24&&E!==26,o),_)return _;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,C=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let v=C;v<a;++v){switch(E=c[v],y=this._transitions.table[this.currentState<<8|(E<160?E:w)],y>>4){case 2:for(let H=v+1;;++H){if(H>=a||(E=c[H])<32||E>126&&E<w){this._printHandler(c,v,H),v=H-1;break}if(++H>=a||(E=c[H])<32||E>126&&E<w){this._printHandler(c,v,H),v=H-1;break}if(++H>=a||(E=c[H])<32||E>126&&E<w){this._printHandler(c,v,H),v=H-1;break}if(++H>=a||(E=c[H])<32||E>126&&E<w){this._printHandler(c,v,H),v=H-1;break}}break;case 3:this._executeHandlers[E]?this._executeHandlers[E]():this._executeHandlerFb(E),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const D=this._csiHandlers[this._collect<<8|E];let O=D?D.length-1:-1;for(;O>=0&&(_=D[O](this._params),_!==!0);O--)if(_ instanceof Promise)return this._preserveStack(3,D,O,y,v),_;O<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++v<a&&(E=c[v])>47&&E<60);v--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const N=this._escHandlers[this._collect<<8|E];let I=N?N.length-1:-1;for(;I>=0&&(_=N[I](),_!==!0);I--)if(_ instanceof Promise)return this._preserveStack(4,N,I,y,v),_;I<0&&this._escHandlerFb(this._collect<<8|E),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|E,this._params);break;case 13:for(let H=v+1;;++H)if(H>=a||(E=c[H])===24||E===26||E===27||E>127&&E<w){this._dcsParser.put(c,v,H),v=H-1;break}break;case 14:if(_=this._dcsParser.unhook(E!==24&&E!==26),_)return this._preserveStack(6,[],0,y,v),_;E===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let H=v+1;;H++)if(H>=a||(E=c[H])<32||E>127&&E<w){this._oscParser.put(c,v,H),v=H-1;break}break;case 6:if(_=this._oscParser.end(E!==24&&E!==26),_)return this._preserveStack(5,[],0,y,v),_;E===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&y}}}u.EscapeSequenceParser=g},6242:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=f(5770),m=f(482),h=[];u.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,b){this._handlers[p]===void 0&&(this._handlers[p]=[]);const w=this._handlers[p];return w.push(b),{dispose:()=>{const g=w.indexOf(b);g!==-1&&w.splice(g,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,b,w){if(this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].put(p,b,w);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(p,b,w))}start(){this.reset(),this._state=1}put(p,b,w){if(this._state!==3){if(this._state===1)for(;b<w;){const g=p[b++];if(g===59){this._state=2,this._start();break}if(g<48||57<g)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+g-48}this._state===2&&w-b>0&&this._put(p,b,w)}}end(p,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,g=this._active.length-1,l=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,w=b,l=this._stack.fallThrough,this._stack.paused=!1),!l&&w===!1){for(;g>=0&&(w=this._active[g].end(p),w!==!0);g--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,w;g--}for(;g>=0;g--)if(w=this._active[g].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",p);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,b,w){this._hitLimit||(this._data+=(0,m.utf32ToString)(p,b,w),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let b=!1;if(this._hitLimit)b=!1;else if(p&&(b=this._handler(this._data),b instanceof Promise))return b.then((w=>(this._data="",this._hitLimit=!1,w)));return this._data="",this._hitLimit=!1,b}}},8742:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const f=2147483647;class d{static fromArray(h){const p=new d;if(!h.length)return p;for(let b=Array.isArray(h[0])?1:0;b<h.length;++b){const w=h[b];if(Array.isArray(w))for(let g=0;g<w.length;++g)p.addSubParam(w[g]);else p.addParam(w)}return p}constructor(h=32,p=32){if(this.maxLength=h,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let p=0;p<this.length;++p){h.push(this.params[p]);const b=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-b>0&&h.push(Array.prototype.slice.call(this._subParams,b,w))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>f?f:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>f?f:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const p=this._subParamsIdx[h]>>8,b=255&this._subParamsIdx[h];return b-p>0?this._subParams.subarray(p,b):null}getSubParamsAll(){const h={};for(let p=0;p<this.length;++p){const b=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-b>0&&(h[p]=this._subParams.slice(b,w))}return h}addDigit(h){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,w=b[p-1];b[p-1]=~w?Math.min(10*w+h,f):h}}u.Params=d},5741:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let f=this._addons.length-1;f>=0;f--)this._addons[f].instance.dispose()}loadAddon(f,d){const m={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(m),d.dispose=()=>this._wrappedAddonDispose(m),d.activate(f)}_wrappedAddonDispose(f){if(f.isDisposed)return;let d=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===f){d=m;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");f.isDisposed=!0,f.dispose.apply(f.instance),this._addons.splice(d,1)}}},8771:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=f(3785),m=f(511);u.BufferApiView=class{constructor(h,p){this._buffer=h,this.type=p}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const p=this._buffer.lines.get(h);if(p)return new d.BufferLineApiView(p)}getNullCell(){return new m.CellData}}},3785:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=f(511);u.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,h){if(!(m<0||m>=this._line.length))return h?(this._line.loadCell(m,h),h):this._line.loadCell(m,new d.CellData)}translateToString(m,h,p){return this._line.translateToString(m,h,p)}}},8285:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=f(8771),m=f(8460),h=f(844);class p extends h.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}u.BufferNamespaceApi=p},7975:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(f){this._core=f}registerCsiHandler(f,d){return this._core.registerCsiHandler(f,(m=>d(m.toArray())))}addCsiHandler(f,d){return this.registerCsiHandler(f,d)}registerDcsHandler(f,d){return this._core.registerDcsHandler(f,((m,h)=>d(m,h.toArray())))}addDcsHandler(f,d){return this.registerDcsHandler(f,d)}registerEscHandler(f,d){return this._core.registerEscHandler(f,d)}addEscHandler(f,d){return this.registerEscHandler(f,d)}registerOscHandler(f,d){return this._core.registerOscHandler(f,d)}addOscHandler(f,d){return this.registerOscHandler(f,d)}}},7090:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(f){this._core=f}register(f){this._core.unicodeService.register(f)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(f){this._core.unicodeService.activeVersion=f}}},744:function(K,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,E=arguments.length,y=E<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(l,c,a,o);else for(var C=l.length-1;C>=0;C--)(_=l[C])&&(y=(E<3?_(y):E>3?_(c,a,y):_(c,a))||y);return E>3&&y&&Object.defineProperty(c,a,y),y},m=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=f(8460),p=f(844),b=f(5295),w=f(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let g=u.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(l){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(l.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new b.BufferSet(l,this))}resize(l,c){this.cols=l,this.rows=c,this.buffers.resize(l,c),this._onResize.fire({cols:l,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(l,c=!1){const a=this.buffer;let o;o=this._cachedBlankLine,o&&o.length===this.cols&&o.getFg(0)===l.fg&&o.getBg(0)===l.bg||(o=a.getBlankLine(l,c),this._cachedBlankLine=o),o.isWrapped=c;const _=a.ybase+a.scrollTop,E=a.ybase+a.scrollBottom;if(a.scrollTop===0){const y=a.lines.isFull;E===a.lines.length-1?y?a.lines.recycle().copyFrom(o):a.lines.push(o.clone()):a.lines.splice(E+1,0,o.clone()),y?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const y=E-_+1;a.lines.shiftElements(_+1,y-1,-1),a.lines.set(E,o.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(l,c,a){const o=this.buffer;if(l<0){if(o.ydisp===0)return;this.isUserScrolling=!0}else l+o.ydisp>=o.ybase&&(this.isUserScrolling=!1);const _=o.ydisp;o.ydisp=Math.max(Math.min(o.ydisp+l,o.ybase),0),_!==o.ydisp&&(c||this._onScroll.fire(o.ydisp))}};u.BufferService=g=d([m(0,w.IOptionsService)],g)},7994:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CharsetService=void 0,u.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(f){this.glevel=f,this.charset=this._charsets[f]}setgCharset(f,d){this._charsets[f]=d,this.glevel===f&&(this.charset=d)}}},1753:function(K,u,f){var d=this&&this.__decorate||function(o,_,E,y){var C,v=arguments.length,D=v<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,E):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(o,_,E,y);else for(var O=o.length-1;O>=0;O--)(C=o[O])&&(D=(v<3?C(D):v>3?C(_,E,D):C(_,E))||D);return v>3&&D&&Object.defineProperty(_,E,D),D},m=this&&this.__param||function(o,_){return function(E,y){_(E,y,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=f(2585),p=f(8460),b=f(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:o=>o.button!==4&&o.action===1&&(o.ctrl=!1,o.alt=!1,o.shift=!1,!0)},VT200:{events:19,restrict:o=>o.action!==32},DRAG:{events:23,restrict:o=>o.action!==32||o.button!==3},ANY:{events:31,restrict:o=>!0}};function g(o,_){let E=(o.ctrl?16:0)|(o.shift?4:0)|(o.alt?8:0);return o.button===4?(E|=64,E|=o.action):(E|=3&o.button,4&o.button&&(E|=64),8&o.button&&(E|=128),o.action===32?E|=32:o.action!==0||_||(E|=3)),E}const l=String.fromCharCode,c={DEFAULT:o=>{const _=[g(o,!1)+32,o.col+32,o.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${l(_[0])}${l(_[1])}${l(_[2])}`},SGR:o=>{const _=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${g(o,!0)};${o.col};${o.row}${_}`},SGR_PIXELS:o=>{const _=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${g(o,!0)};${o.x};${o.y}${_}`}};let a=u.CoreMouseService=class extends b.Disposable{constructor(o,_){super(),this._bufferService=o,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 E of Object.keys(w))this.addProtocol(E,w[E]);for(const E of Object.keys(c))this.addEncoding(E,c[E]);this.reset()}addProtocol(o,_){this._protocols[o]=_}addEncoding(o,_){this._encodings[o]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(o){if(!this._protocols[o])throw new Error(`unknown protocol "${o}"`);this._activeProtocol=o,this._onProtocolChange.fire(this._protocols[o].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(o){if(!this._encodings[o])throw new Error(`unknown encoding "${o}"`);this._activeEncoding=o}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(o){if(o.col<0||o.col>=this._bufferService.cols||o.row<0||o.row>=this._bufferService.rows||o.button===4&&o.action===32||o.button===3&&o.action!==32||o.button!==4&&(o.action===2||o.action===3)||(o.col++,o.row++,o.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,o,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(o))return!1;const _=this._encodings[this._activeEncoding](o);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=o,!0}explainEvents(o){return{down:!!(1&o),up:!!(2&o),drag:!!(4&o),move:!!(8&o),wheel:!!(16&o)}}_equalEvents(o,_,E){if(E){if(o.x!==_.x||o.y!==_.y)return!1}else if(o.col!==_.col||o.row!==_.row)return!1;return o.button===_.button&&o.action===_.action&&o.ctrl===_.ctrl&&o.alt===_.alt&&o.shift===_.shift}};u.CoreMouseService=a=d([m(0,h.IBufferService),m(1,h.ICoreService)],a)},6975:function(K,u,f){var d=this&&this.__decorate||function(a,o,_,E){var y,C=arguments.length,v=C<3?o:E===null?E=Object.getOwnPropertyDescriptor(o,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,E);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(v=(C<3?y(v):C>3?y(o,_,v):y(o,_))||v);return C>3&&v&&Object.defineProperty(o,_,v),v},m=this&&this.__param||function(a,o){return function(_,E){o(_,E,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=f(1439),p=f(8460),b=f(844),w=f(2585),g=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends b.Disposable{constructor(a,o,_){super(),this._bufferService=a,this._logService=o,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(g),this.decPrivateModes=(0,h.clone)(l)}reset(){this.modes=(0,h.clone)(g),this.decPrivateModes=(0,h.clone)(l)}triggerDataEvent(a,o=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;o&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),o&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((E=>E.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((o=>o.charCodeAt(0))))),this._onBinary.fire(a))}};u.CoreService=c=d([m(0,w.IBufferService),m(1,w.ILogService),m(2,w.IOptionsService)],c)},9074:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=f(8055),m=f(8460),h=f(844),p=f(6106);let b=0,w=0;class g extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((a=>a==null?void 0:a.marker.line)),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const o=new l(a);if(o){const _=o.marker.onDispose((()=>o.dispose()));o.onDispose((()=>{o&&(this._decorations.delete(o)&&this._onDecorationRemoved.fire(o),_.dispose())})),this._decorations.insert(o),this._onDecorationRegistered.fire(o)}return o}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,o,_){let E=0,y=0;for(const C of this._decorations.getKeyIterator(o))E=C.options.x??0,y=E+(C.options.width??1),a>=E&&a<y&&(!_||(C.options.layer??"bottom")===_)&&(yield C)}forEachDecorationAtCell(a,o,_,E){this._decorations.forEachByKey(o,(y=>{b=y.options.x??0,w=b+(y.options.width??1),a>=b&&a<w&&(!_||(y.options.layer??"bottom")===_)&&E(y)}))}}u.DecorationService=g;class l extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(a){super(),this.options=a,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=f(2585),m=f(8343);class h{constructor(...b){this._entries=new Map;for(const[w,g]of b)this.set(w,g)}set(b,w){const g=this._entries.get(b);return this._entries.set(b,w),g}forEach(b){for(const[w,g]of this._entries.entries())b(w,g)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}u.ServiceCollection=h,u.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(p,b){this._services.set(p,b)}getService(p){return this._services.get(p)}createInstance(p,...b){const w=(0,m.getServiceDependencies)(p).sort(((c,a)=>c.index-a.index)),g=[];for(const c of w){const a=this._services.get(c.id);if(!a)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${c.id}.`);g.push(a)}const l=w.length>0?w[0].index:b.length;if(b.length!==l)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${l+1} conflicts with ${b.length} static arguments`);return new p(...b,...g)}}},7866:function(K,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,E=arguments.length,y=E<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(l,c,a,o);else for(var C=l.length-1;C>=0;C--)(_=l[C])&&(y=(E<3?_(y):E>3?_(c,a,y):_(c,a))||y);return E>3&&y&&Object.defineProperty(c,a,y),y},m=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=f(844),p=f(2585),b={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,g=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),w=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let c=0;c<l.length;c++)typeof l[c]=="function"&&(l[c]=l[c]())}_log(l,c,a){this._evalLazyOptionalParams(a),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...a)}trace(l,...c){var a;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.trace.bind(this._optionsService.options.logger))??console.log,l,c)}debug(l,...c){var a;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.debug.bind(this._optionsService.options.logger))??console.log,l,c)}info(l,...c){var a;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.info.bind(this._optionsService.options.logger))??console.info,l,c)}warn(l,...c){var a;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.warn.bind(this._optionsService.options.logger))??console.warn,l,c)}error(l,...c){var a;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.error.bind(this._optionsService.options.logger))??console.error,l,c)}};u.LogService=g=d([m(0,p.IOptionsService)],g),u.setTraceLogger=function(l){w=l},u.traceCall=function(l,c,a){if(typeof a.value!="function")throw new Error("not supported");const o=a.value;a.value=function(..._){if(w.logLevel!==p.LogLevelEnum.TRACE)return o.apply(this,_);w.trace(`GlyphRenderer#${o.name}(${_.map((y=>JSON.stringify(y))).join(", ")})`);const E=o.apply(this,_);return w.trace(`GlyphRenderer#${o.name} return`,E),E}}},7302:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=f(8460),m=f(844),h=f(6114);u.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class b extends m.Disposable{constructor(g){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l={...u.DEFAULT_OPTIONS};for(const c in g)if(c in l)try{const a=g[c];l[c]=this._sanitizeAndValidateOption(c,a)}catch(a){console.error(a)}this.rawOptions=l,this.options={...l},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(g,l){return this.onOptionChange((c=>{c===g&&l(this.rawOptions[g])}))}onMultipleOptionChange(g,l){return this.onOptionChange((c=>{g.indexOf(c)!==-1&&l()}))}_setupOptions(){const g=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},l=(c,a)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);a=this._sanitizeAndValidateOption(c,a),this.rawOptions[c]!==a&&(this.rawOptions[c]=a,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const a={get:g.bind(this,c),set:l.bind(this,c)};Object.defineProperty(this.options,c,a)}}_sanitizeAndValidateOption(g,l){switch(g){case"cursorStyle":if(l||(l=u.DEFAULT_OPTIONS[g]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(l))throw new Error(`"${l}" is not a valid value for ${g}`);break;case"wordSeparator":l||(l=u.DEFAULT_OPTIONS[g]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=p.includes(l)?l:u.DEFAULT_OPTIONS[g];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${g} cannot be less than 1, value: ${l}`);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(`${g} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${g} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${g} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}u.OptionsService=b},2660:function(K,u,f){var d=this&&this.__decorate||function(b,w,g,l){var c,a=arguments.length,o=a<3?w:l===null?l=Object.getOwnPropertyDescriptor(w,g):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(b,w,g,l);else for(var _=b.length-1;_>=0;_--)(c=b[_])&&(o=(a<3?c(o):a>3?c(w,g,o):c(w,g))||o);return a>3&&o&&Object.defineProperty(w,g,o),o},m=this&&this.__param||function(b,w){return function(g,l){w(g,l,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=f(2585);let p=u.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const w=this._bufferService.buffer;if(b.id===void 0){const _=w.addMarker(w.ybase+w.y),E={data:b,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(E,_))),this._dataByLinkId.set(E.id,E),E.id}const g=b,l=this._getEntryIdKey(g),c=this._entriesWithId.get(l);if(c)return this.addLineToLink(c.id,w.ybase+w.y),c.id;const a=w.addMarker(w.ybase+w.y),o={id:this._nextId++,key:this._getEntryIdKey(g),data:g,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(o,a))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(b,w){const g=this._dataByLinkId.get(b);if(g&&g.lines.every((l=>l.line!==w))){const l=this._bufferService.buffer.addMarker(w);g.lines.push(l),l.onDispose((()=>this._removeMarkerFromLink(g,l)))}}getLinkData(b){var w;return(w=this._dataByLinkId.get(b))==null?void 0:w.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,w){const g=b.lines.indexOf(w);g!==-1&&(b.lines.splice(g,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};u.OscLinkService=p=d([m(0,h.IBufferService)],p)},8343:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const f="di$target",d="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(m){return m[d]||[]},u.createDecorator=function(m){if(u.serviceRegistry.has(m))return u.serviceRegistry.get(m);const h=function(p,b,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,l,c){l[f]===l?l[d].push({id:g,index:c}):(l[d]=[{id:g,index:c}],l[f]=l)})(h,p,w)};return h.toString=()=>m,u.serviceRegistry.set(m,h),h}},2585:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IDecorationService=u.IUnicodeService=u.IOscLinkService=u.IOptionsService=u.ILogService=u.LogLevelEnum=u.IInstantiationService=u.ICharsetService=u.ICoreService=u.ICoreMouseService=u.IBufferService=void 0;const d=f(8343);var m;u.IBufferService=(0,d.createDecorator)("BufferService"),u.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),u.ICoreService=(0,d.createDecorator)("CoreService"),u.ICharsetService=(0,d.createDecorator)("CharsetService"),u.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(m||(u.LogLevelEnum=m={})),u.ILogService=(0,d.createDecorator)("LogService"),u.IOptionsService=(0,d.createDecorator)("OptionsService"),u.IOscLinkService=(0,d.createDecorator)("OscLinkService"),u.IUnicodeService=(0,d.createDecorator)("UnicodeService"),u.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=f(8460),m=f(225);class h{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,w,g=!1){return(16777215&b)<<3|(3&w)<<1|(g?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const b=new m.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let w=0,g=0;const l=b.length;for(let c=0;c<l;++c){let a=b.charCodeAt(c);if(55296<=a&&a<=56319){if(++c>=l)return w+this.wcwidth(a);const E=b.charCodeAt(c);56320<=E&&E<=57343?a=1024*(a-55296)+E-56320+65536:w+=this.wcwidth(E)}const o=this.charProperties(a,g);let _=h.extractWidth(o);h.extractShouldJoin(o)&&(_-=h.extractWidth(g)),w+=_,g=o}return w}charProperties(b,w){return this._activeProvider.charProperties(b,w)}}u.UnicodeService=h}},z={};function ae(K){var u=z[K];if(u!==void 0)return u.exports;var f=z[K]={exports:{}};return ee[K].call(f.exports,f,f.exports,ae),f.exports}var ce={};return(()=>{var K=ce;Object.defineProperty(K,"__esModule",{value:!0}),K.Terminal=void 0;const u=ae(9042),f=ae(3236),d=ae(844),m=ae(5741),h=ae(8285),p=ae(7975),b=ae(7090),w=["cols","rows"];class g extends d.Disposable{constructor(c){super(),this._core=this.register(new f.Terminal(c)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const a=_=>this._core.options[_],o=(_,E)=>{this._checkReadonlyOptions(_),this._core.options[_]=E};for(const _ in this._core.options){const E={get:a.bind(this,_),set:o.bind(this,_)};Object.defineProperty(this._publicOptions,_,E)}}_checkReadonlyOptions(c){if(w.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new b.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let a="none";switch(this._core.coreMouseService.activeProtocol){case"X10":a="x10";break;case"VT200":a="vt200";break;case"DRAG":a="drag";break;case"ANY":a="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const a in c)this._publicOptions[a]=c[a]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,a=!0){this._core.input(c,a)}resize(c,a){this._verifyIntegers(c,a),this._core.resize(c,a)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,a,o){this._verifyIntegers(c,a,o),this._core.select(c,a,o)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,a){this._verifyIntegers(c,a),this._core.selectLines(c,a)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,a){this._core.write(c,a)}writeln(c,a){this._core.write(c),this._core.write(`\r
57
- `,a)}paste(c){this._core.paste(c)}refresh(c,a){this._verifyIntegers(c,a),this._core.refresh(c,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const a of c)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const a of c)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}K.Terminal=g})(),ce})()))})(Mo)),Mo.exports}var Iv=qv();class Pv{constructor(Y,ee){Mf(this,"socket");const z=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${z}//${window.location.host}/ws/terminal/${encodeURIComponent(Y)}`),this.socket.addEventListener("message",ae=>{var K,u;const ce=JSON.parse(ae.data);ce.type==="output"?ee.onOutput(ce.data):ce.type==="error"?(K=ee.onError)==null||K.call(ee,ce.message):(u=ee.onStatus)==null||u.call(ee,ce)}),this.socket.addEventListener("error",()=>{var ae;(ae=ee.onError)==null||ae.call(ee,"Terminal connection failed.")})}sendInput(Y){this.send({type:"input",data:Y})}resize(Y,ee){this.send({type:"resize",cols:Y,rows:ee})}close(){this.socket.close()}send(Y){const ee=JSON.stringify(Y);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(ee);return}this.socket.addEventListener("open",()=>this.socket.send(ee),{once:!0})}}function Yv({sessionId:k,active:Y=!0,onEvent:ee}){const z=_e.useRef(null),ae=_e.useRef(null),ce=_e.useRef(null),K=_e.useRef(ee);return _e.useEffect(()=>{K.current=ee},[ee]),_e.useEffect(()=>{if(!z.current)return;const u=new Iv.Terminal({cursorBlink:!0,convertEol:!0,drawBoldTextInBrightColors:!0,fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:13,fontWeight:"400",fontWeightBold:"700",lineHeight:1.35,macOptionIsMeta:!0,scrollback:1e4,theme:Gv}),f=new jv.FitAddon;u.loadAddon(f),u.loadAddon(new Uv.WebLinksAddon),u.open(z.current),ce.current=u,ae.current=f,f.fit(),u.focus();const d=new Pv(k,{onOutput(p){u.write(p)},onStatus(p){var b;(b=K.current)==null||b.call(K,p.type)},onError(p){var b;u.writeln(`\r
58
- [VCM] ${p}`),(b=K.current)==null||b.call(K,p)}}),m=u.onData(p=>{d.sendInput(p)}),h=new ResizeObserver(()=>{f.fit(),d.resize(u.cols,u.rows)});return h.observe(z.current),d.resize(u.cols,u.rows),()=>{h.disconnect(),m.dispose(),d.close(),u.dispose(),ce.current=null,ae.current=null}},[k]),_e.useEffect(()=>{if(!Y)return;const u=window.requestAnimationFrame(()=>{const f=ce.current,d=ae.current;!f||!d||(d.fit(),f.focus())});return()=>window.cancelAnimationFrame(u)},[Y]),L.jsx("div",{className:"terminal-frame",ref:z,onMouseDown:()=>{var u;return(u=ce.current)==null?void 0:u.focus()}})}const Gv={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"};function Kv({role:k,session:Y,permissionMode:ee,busy:z=!1,onPermissionModeChange:ae,onStart:ce,onResume:K,onStop:u,onRestart:f}){const d=(Y==null?void 0:Y.status)==="running",m=!!(Y!=null&&Y.claudeSessionId&&!d),h=!d&&!(Y!=null&&Y.claudeSessionId),p=!!(Y&&Y.permissionMode!==ee);return L.jsxs("div",{className:"session-controls",children:[L.jsxs("label",{className:"permission-mode-field",children:[L.jsxs("span",{children:["Permission",L.jsx("small",{children:Y?`current: ${Xv(Y.permissionMode)}${p?" / next launch":""}`:"applies on start"})]}),L.jsxs("select",{value:ee,onChange:b=>ae(b.target.value),children:[L.jsx("option",{value:"default",children:"默认"}),L.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"}),L.jsx("option",{value:"dangerously-skip-permissions",children:"--dangerously-skip-permissions"})]})]}),L.jsxs("div",{className:"session-toolbar",children:[L.jsx("button",{type:"button",disabled:z||!h,onClick:ce,children:"Start"}),L.jsx("button",{type:"button",disabled:z||!m,onClick:K,children:"Resume"}),L.jsx("button",{type:"button",disabled:z||!Y,onClick:f,children:"Restart"}),L.jsx("button",{type:"button",disabled:z||!Y,onClick:u,children:"Stop"})]})]})}function Xv(k){return k==="dangerously-skip-permissions"?"--dangerously-skip-permissions":k}const Vv=["zh-to-en","zh-to-en-with-context","en-to-zh"];function Fv({settings:k,busy:Y=!1,promptPreviews:ee,testResult:z,onSave:ae,onTest:ce,onClose:K}){var g;const[u,f]=_e.useState(k),[d,m]=_e.useState(k.apiKey??""),[h,p]=_e.useState("zh-to-en");_e.useEffect(()=>{f(k),m(k.apiKey??"")},[k]);const b=ee.find(l=>l.key===h),w=((g=u.prompts)==null?void 0:g[h])??"";return L.jsx("div",{className:"modal-backdrop",children:L.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("h2",{children:"Translation Settings"}),L.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),L.jsx("button",{type:"button",onClick:K,children:"Close"})]}),L.jsxs("div",{className:"translation-settings-grid",children:[L.jsxs("label",{children:[L.jsx("span",{children:"Enable translation"}),L.jsx("input",{checked:u.enabled,type:"checkbox",onChange:l=>f({...u,enabled:l.target.checked})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Base URL"}),L.jsx("input",{value:u.baseUrl,onChange:l=>f({...u,baseUrl:l.target.value}),placeholder:"https://api.openai.com/v1"})]}),L.jsxs("label",{children:[L.jsx("span",{children:"API key"}),L.jsx("input",{value:d,onChange:l=>m(l.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Model"}),L.jsx("input",{value:u.model,onChange:l=>f({...u,model:l.target.value})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Target language"}),L.jsx("input",{value:u.targetLanguage,onChange:l=>f({...u,targetLanguage:l.target.value})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Input mode"}),L.jsxs("select",{value:u.inputMode,onChange:l=>f({...u,inputMode:l.target.value}),children:[L.jsx("option",{value:"review-before-send",children:"Review before send"}),L.jsx("option",{value:"auto-send",children:"Auto-send"})]})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Use context"}),L.jsx("input",{checked:u.contextEnabled,type:"checkbox",onChange:l=>f({...u,contextEnabled:l.target.checked})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Translate output"}),L.jsx("input",{checked:u.translateOutput,type:"checkbox",onChange:l=>f({...u,translateOutput:l.target.checked})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Translate user input"}),L.jsx("input",{checked:u.translateUserInput,type:"checkbox",onChange:l=>f({...u,translateUserInput:l.target.checked})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Timeout ms"}),L.jsx("input",{min:3e3,type:"number",value:u.requestTimeoutMs,onChange:l=>f({...u,requestTimeoutMs:Number(l.target.value)})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Temperature"}),L.jsx("input",{min:0,max:1,step:.1,type:"number",value:u.temperature,onChange:l=>f({...u,temperature:Number(l.target.value)})})]})]}),L.jsxs("section",{className:"translation-prompt-settings",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("h3",{children:"Translation Prompts"}),L.jsx("p",{children:"cc-pm style prompt slots: zh-to-en, zh-to-en-with-context, en-to-zh."})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Prompt slot"}),L.jsx("select",{value:h,onChange:l=>p(l.target.value),children:Vv.map(l=>{const c=ee.find(a=>a.key===l);return L.jsx("option",{value:l,children:(c==null?void 0:c.label)??l},l)})})]})]}),L.jsxs("div",{className:"translation-prompt-editor-grid",children:[L.jsxs("label",{children:[L.jsx("span",{children:"User prompt (empty = use default)"}),L.jsx("textarea",{value:w,onChange:l=>f({...u,prompts:Gf(u.prompts,h,l.target.value)}),placeholder:"Leave blank to use the default prompt."})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Default prompt (read-only)"}),L.jsx("textarea",{readOnly:!0,value:(b==null?void 0:b.defaultPrompt)??""})]})]}),L.jsx("button",{type:"button",disabled:Y||!w,onClick:()=>f({...u,prompts:Gf(u.prompts,h,"")}),children:"Reset selected prompt"})]}),z?L.jsx("div",{className:z.ok?"translation-test-result is-ok":"translation-test-result is-error",children:z.ok?`Connection ok: ${z.model} in ${z.elapsedMs}ms`:z.error}):null,L.jsxs("footer",{children:[L.jsx("button",{type:"button",disabled:Y,onClick:ce,children:"Test Connection"}),L.jsx("button",{type:"button",disabled:Y,onClick:()=>void ae(u,d.trim()),children:"Save"})]})]})})}function Gf(k,Y,ee){const z={...k??{}};return ee.trim()?z[Y]=ee:delete z[Y],Object.keys(z).length>0?z:void 0}function Wv({taskSlug:k,role:Y,sessionId:ee}){const[z,ae]=_e.useState(null),[ce,K]=_e.useState([]),[u,f]=_e.useState(""),[d,m]=_e.useState(!1),[h,p]=_e.useState(!1),[b,w]=_e.useState(!1),[g,l]=_e.useState("ready"),[c,a]=_e.useState(Date.now()),[o,_]=_e.useState(!1),[E,y]=_e.useState(""),[C,v]=_e.useState(!1),[D,O]=_e.useState([]),[N,I]=_e.useState(),[H,J]=_e.useState(0),re=_e.useRef(null);_e.useEffect(()=>{Promise.all([Le.getTranslationSettings(),Le.getTranslationPrompts()]).then(([Q,he])=>{ae(Q),O(he),Q.enabled||v(!0)}).catch(Q=>y(Q.message))},[]),_e.useEffect(()=>{K([]),y(""),l("ready");let Q=!0;const he=window.location.protocol==="https:"?"wss:":"ws:",q=new WebSocket(`${he}//${window.location.host}/ws/translation/${encodeURIComponent(ee)}`),R=le=>{if(!Q)return;const ie=JSON.parse(le.data);ie.type==="translation-entry"?K(de=>Kf(de,ie.entry)):ie.type==="translation-status"?l(ie.status):ie.type==="translation-error"&&y(ie.message)};return q.addEventListener("message",R),()=>{Q=!1,q.removeEventListener("message",R),q.close()}},[ee,H]),_e.useEffect(()=>{var Q;(Q=re.current)==null||Q.scrollIntoView({block:"nearest"})},[ce.length]);const U=Zv(ce);_e.useEffect(()=>{if(!U)return;a(Date.now());const Q=window.setInterval(()=>a(Date.now()),250);return()=>window.clearInterval(Q)},[U]);async function $(Q=!1){if(z){_(!0),y(""),m(!1);try{const he=await Le.translateUserInput(k,Y,{text:u,mode:Q?"auto-send":z.inputMode,useContext:z.contextEnabled,send:Q});w(he.contextUsed),he.sent?(f(""),m(!1)):(f(he.englishPreview),m(!0))}catch(he){y(he instanceof Error?he.message:"Translation failed.")}finally{_(!1)}}}async function se(){if(u.trim()){_(!0),y("");try{await Le.sendTranslatedInput(k,Y,{englishText:u}),f(""),m(!1),w(!1)}catch(Q){y(Q instanceof Error?Q.message:"Failed to send English input.")}finally{_(!1)}}}function A(Q){Q.key!=="Enter"||Q.shiftKey||Q.nativeEvent.isComposing||(Q.preventDefault(),!o&&u.trim()&&(d?se():$(h)))}async function B(Q,he){_(!0),y("");try{const q=await Le.updateTranslationSettings({...Q,...he!==void 0?{apiKey:he}:{}}),R=await Le.getTranslationPrompts();ae(q),O(R),v(!1),J(le=>le+1)}catch(q){y(q instanceof Error?q.message:"Failed to save translation settings.")}finally{_(!1)}}async function x(){_(!0),y("");try{I(await Le.testTranslationProvider())}catch(Q){y(Q instanceof Error?Q.message:"Provider test failed.")}finally{_(!1)}}async function M(){K([]),await Le.clearTranslationSession(ee).catch(Q=>y(Q.message))}async function V(Q){_(!0);try{const he=await Le.retryTranslation(ee,Q.id);K(q=>Kf(q,he))}catch(he){y(he instanceof Error?he.message:"Retry failed.")}finally{_(!1)}}if(!z)return L.jsx("aside",{className:"translation-panel",children:L.jsx("p",{className:"muted",children:"Loading translation settings..."})});const G=$v(ce,g,c);return L.jsxs("aside",{className:"translation-panel",children:[L.jsxs("header",{className:"translation-panel-header",children:[L.jsxs("div",{className:"translation-panel-titlebar",children:[L.jsx("h2",{children:"Translation"}),L.jsxs("div",{className:"translation-panel-actions",children:[L.jsx("button",{"aria-pressed":h,className:`auto-send-toggle${h?" is-active":""}`,type:"button",onClick:()=>p(Q=>!Q),children:h?"✅ Auto-send":"× Auto-send"}),L.jsx("button",{type:"button",onClick:()=>v(!0),children:"Settings"}),L.jsx("button",{type:"button",onClick:()=>void M(),children:"Clear"})]})]}),L.jsx("div",{children:L.jsxs("p",{children:[z.model," · ",G,b?" · context used":""]})})]}),E?L.jsx("div",{className:"error-banner",children:E}):null,L.jsxs("div",{className:"translation-entry-list",children:[ce.length===0?L.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,ce.map(Q=>L.jsx(Qv,{entry:Q,onRetry:Q.status==="failed"?()=>void V(Q):void 0},Q.id)),L.jsx("div",{ref:re})]}),L.jsx("div",{className:"translation-composer",children:L.jsxs("div",{className:"translation-composer-row",children:[L.jsx("textarea",{value:u,onChange:Q=>{f(Q.target.value),Q.target.value.trim()||m(!1)},onKeyDown:A,placeholder:"输入中文,先翻译成英文工程指令..."}),L.jsx("div",{className:"translation-composer-actions",children:L.jsx("button",{type:"button",disabled:o||!d||!u.trim(),onClick:()=>void se(),children:"Send English"})})]})}),C?L.jsx(Fv,{settings:z,busy:o,promptPreviews:D,testResult:N,onSave:B,onTest:x,onClose:()=>v(!1)}):null]})}function Qv({entry:k,onRetry:Y}){const ee=eg(k);return L.jsxs("article",{className:`translation-entry is-${k.sourceKind}`,children:[k.warning?L.jsx("p",{className:"translation-warning",children:k.warning}):null,k.error?L.jsx("p",{className:"translation-warning",children:k.error}):null,L.jsx("pre",{children:ee}),Y?L.jsx("button",{type:"button",onClick:Y,children:"Retry"}):null]})}function Zv(k){const Y=k.find(Ff);return(Y==null?void 0:Y.translationStartedAt)??(Y==null?void 0:Y.createdAt)}function $v(k,Y,ee){const z=k.find(Ff);if(z)return`translating ${tg(Math.max(0,ee-Jv(z)))}`;const ae=k.at(-1);return(ae==null?void 0:ae.status)==="failed"||Y==="failed"?"error":Y}function Ff(k){return k.status==="queued"||k.status==="translating"}function Jv(k){const Y=Date.parse(k.translationStartedAt??k.createdAt);return Number.isFinite(Y)?Y:Date.now()}function eg(k){return k.status==="queued"||k.status==="translating"?k.sourceText:k.status==="translated"?k.translatedText:k.translatedText||k.sourceText}function Kf(k,Y){return k.findIndex(z=>z.id===Y.id)===-1?[...k,Y]:k.map(z=>z.id===Y.id?Y:z)}function tg(k){if(k<1e3)return`${Math.max(.1,k/1e3).toFixed(1)}s`;const Y=k/1e3;if(Y<60)return`${Y.toFixed(1)}s`;const ee=Math.floor(Y/60),z=Math.floor(Y%60).toString().padStart(2,"0");return`${ee}:${z}`}function ig({role:k,session:Y,permissionMode:ee,active:z=!0,busy:ae,onPermissionModeChange:ce,onStart:K,onResume:u,onStop:f,onRestart:d,onTerminalEvent:m}){const[h,p]=_e.useState(!1);return L.jsxs("section",{className:"session-console",children:[L.jsxs("div",{className:"session-console-top",children:[L.jsx(Kv,{role:k,session:Y,permissionMode:ee,busy:ae,onPermissionModeChange:ce,onStart:K,onResume:u,onStop:f,onRestart:d}),L.jsx("button",{"aria-pressed":h,className:`translation-toggle${h?" is-active":""}`,type:"button",onClick:()=>p(b=>!b),children:h?"✅ Translate":"× Translate"})]}),(Y==null?void 0:Y.status)==="running"?L.jsx(sg,{active:z,onTerminalEvent:m,role:k,session:Y,taskSlug:Y.taskSlug,translationEnabled:h}):L.jsxs("div",{className:"terminal-empty",children:[L.jsx("strong",{children:k}),L.jsx("span",{children:Y!=null&&Y.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]})}function sg({active:k,onTerminalEvent:Y,role:ee,session:z,taskSlug:ae,translationEnabled:ce}){return L.jsxs("div",{className:ce?"session-console-body has-translation":"session-console-body",children:[L.jsx("div",{className:"terminal-pane",children:L.jsx(Yv,{sessionId:z.id,active:k,onEvent:Y},z.id)}),ce?L.jsx("div",{className:"translation-pane",children:L.jsx(Wv,{taskSlug:ae,role:ee,sessionId:z.id},z.id)}):null]})}function rg({task:k,activeRole:Y,onTaskChanged:ee,onActiveRoleChange:z,onWorkflowChanged:ae,onMessagesChanged:ce,onOrchestrationChanged:K,onEventsChanged:u}){const[f,d]=_e.useState(null),[m,h]=_e.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[p,b]=_e.useState(!1),[w,g]=_e.useState(""),[l,c]=_e.useState([]),a=_e.useCallback(async()=>{const[y,C,v]=await Promise.all([Le.getTaskStatus(k.taskSlug),Le.listMessages(k.taskSlug),Le.getOrchestrationState(k.taskSlug)]);d(y),ae==null||ae(y.workflow),ce==null||ce(C),K==null||K(v)},[ce,K,ae,k.taskSlug]);_e.useEffect(()=>{a().catch(y=>g(y.message))},[a]),_e.useEffect(()=>{c([]),u==null||u([])},[u,k.taskSlug]),_e.useEffect(()=>{h(y=>{let C=!1;const v={...y};for(const D of(f==null?void 0:f.sessions)??[])v[D.role]!==D.permissionMode&&(v[D.role]=D.permissionMode,C=!0);return C?v:y})},[f==null?void 0:f.sessions]),_e.useEffect(()=>{const y=window.setInterval(()=>{Promise.all([Le.getTaskStatus(k.taskSlug),Le.listMessages(k.taskSlug),Le.getOrchestrationState(k.taskSlug)]).then(([C,v,D])=>{d(C),ae==null||ae(C.workflow),ce==null||ce(v),K==null||K(D)}).catch(C=>g(C.message))},3e3);return()=>window.clearInterval(y)},[ce,K,ae,k.taskSlug]);async function o(y){b(!0),g("");try{await y(),await a(),await ee()}catch(C){g(C instanceof Error?C.message:"Action failed.")}finally{b(!1)}}function _(y){c(C=>{const v=[...C,`${new Date().toLocaleTimeString()} ${y}`];return u==null||u(v),v})}function E(y,C){h(v=>({...v,[y]:C}))}return L.jsxs("div",{className:"task-workspace",children:[L.jsxs("header",{className:"workspace-header",children:[L.jsxs("div",{className:"workspace-title-line",children:[L.jsx("span",{className:"eyebrow",children:"Task Workspace"}),L.jsx("h1",{children:k.title||k.taskSlug}),L.jsx("span",{className:"workspace-branch",children:k.branch})]}),L.jsx(Hv,{activeRole:Y,sessions:(f==null?void 0:f.sessions)??[],onSelect:z}),L.jsx("button",{type:"button",onClick:()=>void a(),children:"Refresh"})]}),w?L.jsx("div",{className:"error-banner",children:w}):null,L.jsx("div",{className:"workspace-grid",children:L.jsx("div",{className:"workspace-main",children:L.jsx("div",{className:"role-console-stack",children:oa.map(y=>{const C=y.name,v=C===Y,D=Xf((f==null?void 0:f.sessions)??[],C);return L.jsx("div",{className:v?"role-console-panel is-active":"role-console-panel","aria-hidden":!v,children:L.jsx(ig,{role:C,session:D,permissionMode:m[C],active:v,busy:p,onPermissionModeChange:O=>E(C,O),onStart:()=>void o(async()=>{await Le.startRoleSession(k.taskSlug,C,{cols:100,rows:28,permissionMode:m[C]}),_(`started ${C} with ${m[C]}`)}),onResume:()=>void o(async()=>{await Le.resumeRoleSession(k.taskSlug,C,{cols:100,rows:28,permissionMode:m[C]}),_(`resumed ${C} with ${m[C]}`)}),onStop:()=>void o(async()=>{await Le.stopRoleSession(k.taskSlug,C),_(`stopped ${C}`)}),onRestart:()=>void o(async()=>{await Le.restartRoleSession(k.taskSlug,C,{cols:100,rows:28,permissionMode:m[C]}),_(`restarted ${C} with ${m[C]}`)}),onTerminalEvent:O=>_(`${y.label}: ${O}`)})},C)})})})})]})}function ng(){const[k,Y]=_e.useState(null),[ee,z]=_e.useState([]),[ae,ce]=_e.useState(null),[K,u]=_e.useState(null),[f,d]=_e.useState([]),[m,h]=_e.useState(null),[p,b]=_e.useState(null),[w,g]=_e.useState(null),[l,c]=_e.useState(null),[a,o]=_e.useState(null),[_,E]=_e.useState("project-manager"),[y,C]=_e.useState(!1),[v,D]=_e.useState(""),O=_e.useMemo(()=>xv(f,m),[f,m]),N=_e.useCallback(G=>{O!=null&&O.taskSlug&&b({taskSlug:O.taskSlug,workflow:G})},[O==null?void 0:O.taskSlug]),I=_e.useCallback(G=>{O!=null&&O.taskSlug&&g({taskSlug:O.taskSlug,messages:G})},[O==null?void 0:O.taskSlug]),H=_e.useCallback(G=>{O!=null&&O.taskSlug&&c({taskSlug:O.taskSlug,orchestration:G})},[O==null?void 0:O.taskSlug]),J=_e.useCallback(G=>{O!=null&&O.taskSlug&&o({taskSlug:O.taskSlug,events:G})},[O==null?void 0:O.taskSlug]);async function re(){const G=await Le.listTasks();d(G),h(Q=>{var he;return Q??((he=G[0])==null?void 0:he.taskSlug)??null})}async function U(){const G=await Le.getHarnessStatus();return ce(G),G}async function $(){const G=await Le.getRecentRepositoryPaths();return z(G),G}async function se(G){const[Q,he]=await Promise.all([Le.listMessages(G),Le.getOrchestrationState(G)]);g({taskSlug:G,messages:Q}),c({taskSlug:G,orchestration:he})}_e.useEffect(()=>{Promise.all([Le.getCurrentProject(),Le.getRecentRepositoryPaths()]).then(async([G,Q])=>{Y(G),z(Q),G&&await Promise.all([re(),U()])}).catch(G=>D(G.message))},[]);async function A(G){C(!0),D("");try{await G()}catch(Q){D(Q instanceof Error?Q.message:"Action failed.")}finally{C(!1)}}const B=p&&p.taskSlug===(O==null?void 0:O.taskSlug)?p.workflow:null,x=w&&w.taskSlug===(O==null?void 0:O.taskSlug)?w.messages:[],M=l&&l.taskSlug===(O==null?void 0:O.taskSlug)?l.orchestration:null,V=a&&a.taskSlug===(O==null?void 0:O.taskSlug)?a.events:[];return L.jsxs(wv,{sidebar:L.jsx(Ov,{project:k,recentRepositoryPaths:ee,tasks:f,activeTaskSlug:(O==null?void 0:O.taskSlug)??null,workflow:B,messages:x,orchestration:M,events:V,harnessStatus:ae,harnessApplyResult:K,busy:y,onConnect:G=>A(async()=>{const Q=await Le.connectProject({repoPath:G});Y(Q),u(null),await Promise.all([re(),U(),$()])}),onRefreshHarness:()=>A(async()=>{u(null),await U()}),onApplyHarness:()=>A(async()=>{const G=await Le.applyHarness();u(G),await U()}),onCreateTask:G=>A(async()=>{const Q=await Le.createTask(G);await re(),h(Q.taskSlug)}),onSelectTask:h,onOrchestrationModeChange:G=>{O&&A(async()=>{const Q=await Le.updateOrchestrationState(O.taskSlug,{mode:G});c({taskSlug:O.taskSlug,orchestration:Q})})},onStageMessage:G=>{A(async()=>{const Q=await Le.stageMessage(G.taskSlug,G.id);E(Q.toRole),await se(G.taskSlug)})},onRejectMessage:G=>{A(async()=>{await Le.rejectMessage(G.taskSlug,G.id),await se(G.taskSlug)})},onOpenMessageRole:E}),children:[v?L.jsx("div",{className:"error-banner",children:v}):null,k&&O?L.jsx(rg,{task:O,activeRole:_,onTaskChanged:re,onActiveRoleChange:E,onWorkflowChanged:N,onMessagesChanged:I,onOrchestrationChanged:H,onEventsChanged:J}):L.jsxs("section",{className:"empty-workspace",children:[L.jsx("h1",{children:k?"Create a task to open the workspace":"Connect a repository to begin"}),L.jsx("p",{children:k?"Tasks create local role commands, logs, and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, logs, and handoff artifacts."})]})]})}const Wf=document.getElementById("root");if(!Wf)throw new Error("Missing #root element.");Ev.createRoot(Wf).render(L.jsx(_e.StrictMode,{children:L.jsx(ng,{})}));
55
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(v){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&v&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(v){const A=this._getMouseBufferCoords(v),O=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!!(O&&j&&A)&&this._areCoordsInSelection(A,O,j)}isCellInSelection(v,A){const O=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!O||!j)&&this._areCoordsInSelection([v,A],O,j)}_areCoordsInSelection(v,A,O){return v[1]>A[1]&&v[1]<O[1]||A[1]===O[1]&&v[1]===A[1]&&v[0]>=A[0]&&v[0]<O[0]||A[1]<O[1]&&v[1]===O[1]&&v[0]<O[0]||A[1]<O[1]&&v[1]===A[1]&&v[0]>=A[0]}_selectWordAtCursor(v,A){var I,z;const O=(z=(I=this._linkifier.currentLink)==null?void 0:I.link)==null?void 0:z.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const j=this._getMouseBufferCoords(v);return!!j&&(this._selectWordAt(j,A),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(v,A){this._model.clearSelection(),v=Math.max(v,0),A=Math.min(A,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,A],this.refresh(),this._onSelectionChange.fire()}_handleTrim(v){this._model.handleTrim(v)&&this.refresh()}_getMouseBufferCoords(v){const A=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(A)return A[0]--,A[1]--,A[1]+=this._bufferService.buffer.ydisp,A}_getMouseEventScrollAmount(v){let A=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,v,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return A>=0&&A<=O?0:(A>O&&(A-=O),A=Math.min(Math.max(A,-50),50),A/=50,A/Math.abs(A)+Math.round(14*A))}shouldForceSelection(v){return c.isMac?v.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:v.shiftKey}handleMouseDown(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._handleIncrementalClick(v):v.detail===1?this._handleSingleClick(v):v.detail===2?this._handleDoubleClick(v):v.detail===3&&this._handleTripleClick(v),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))}_handleSingleClick(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const A=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);A&&A.length!==this._model.selectionStart[0]&&A.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(v){this._selectWordAtCursor(v,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(v){const A=this._getMouseBufferCoords(v);A&&(this._activeSelectionMode=2,this._selectLineAt(A[1]))}shouldColumnSelect(v){return v.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(v){if(v.stopImmediatePropagation(),!this._model.selectionStart)return;const A=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){const j=O.lines.get(this._model.selectionEnd[1]);j&&j.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}A&&A[0]===this._model.selectionEnd[0]&&A[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}}_handleMouseUp(v){const A=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&A<500&&v.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const j=(0,p.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(j,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,A=this._model.finalSelectionEnd,O=!(!v||!A||v[0]===A[0]&&v[1]===A[1]);O?v&&A&&(this._oldSelectionStart&&this._oldSelectionEnd&&v[0]===this._oldSelectionStart[0]&&v[1]===this._oldSelectionStart[1]&&A[0]===this._oldSelectionEnd[0]&&A[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(v,A,O)):this._oldHasSelection&&this._fireOnSelectionChange(v,A,O)}_fireOnSelectionChange(v,A,O){this._oldSelectionStart=v,this._oldSelectionEnd=A,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim((A=>this._handleTrim(A)))}_convertViewportColToCharacterIndex(v,A){let O=A;for(let j=0;A>=j;j++){const I=v.loadCell(j,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:I>1&&A!==j&&(O+=I-1)}return O}setSelection(v,A,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,A],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,A,O=!0,j=!0){if(v[0]>=this._bufferService.cols)return;const I=this._bufferService.buffer,z=I.lines.get(v[1]);if(!z)return;const Z=I.translateBufferLineToString(v[1],!1);let re=this._convertViewportColToCharacterIndex(z,v[0]),q=re;const J=v[0]-re;let se=0,D=0,k=0,x=0;if(Z.charAt(re)===" "){for(;re>0&&Z.charAt(re-1)===" ";)re--;for(;q<Z.length&&Z.charAt(q+1)===" ";)q++}else{let G=v[0],Q=v[0];z.getWidth(G)===0&&(se++,G--),z.getWidth(Q)===2&&(D++,Q++);const he=z.getString(Q).length;for(he>1&&(x+=he-1,q+=he-1);G>0&&re>0&&!this._isCharWordSeparator(z.loadCell(G-1,this._workCell));){z.loadCell(G-1,this._workCell);const U=this._workCell.getChars().length;this._workCell.getWidth()===0?(se++,G--):U>1&&(k+=U-1,re-=U-1),re--,G--}for(;Q<z.length&&q+1<Z.length&&!this._isCharWordSeparator(z.loadCell(Q+1,this._workCell));){z.loadCell(Q+1,this._workCell);const U=this._workCell.getChars().length;this._workCell.getWidth()===2?(D++,Q++):U>1&&(x+=U-1,q+=U-1),q++,Q++}}q++;let M=re+J-se+k,V=Math.min(this._bufferService.cols,q-re+se+D-k-x);if(A||Z.slice(re,q).trim()!==""){if(O&&M===0&&z.getCodePoint(0)!==32){const G=I.lines.get(v[1]-1);if(G&&z.isWrapped&&G.getCodePoint(this._bufferService.cols-1)!==32){const Q=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(Q){const he=this._bufferService.cols-Q.start;M-=he,V+=he}}}if(j&&M+V===this._bufferService.cols&&z.getCodePoint(this._bufferService.cols-1)!==32){const G=I.lines.get(v[1]+1);if(G!=null&&G.isWrapped&&G.getCodePoint(0)!==32){const Q=this._getWordAt([0,v[1]+1],!1,!1,!0);Q&&(V+=Q.length)}}return{start:M,length:V}}}_selectWordAt(v,A){const O=this._getWordAt(v,A);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[O.start,v[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(v){const A=this._getWordAt(v,!0);if(A){let O=v[1];for(;A.start<0;)A.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;A.start+A.length>this._bufferService.cols;)A.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?A.start:A.start+A.length,O]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const A=this._bufferService.buffer.getWrappedRangeForLine(v),O={start:{x:0,y:A.first},end:{x:this._bufferService.cols-1,y:A.last}};this._model.selectionStart=[0,A.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(O,this._bufferService.cols)}};u.SelectionService=E=d([m(3,_.IBufferService),m(4,_.ICoreService),m(5,w.IMouseService),m(6,_.IOptionsService),m(7,w.IRenderService),m(8,w.ICoreBrowserService)],E)},4725:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ILinkProviderService=u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const d=f(8343);u.ICharSizeService=(0,d.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),u.IMouseService=(0,d.createDecorator)("MouseService"),u.IRenderService=(0,d.createDecorator)("RenderService"),u.ISelectionService=(0,d.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,d.createDecorator)("ThemeService"),u.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(K,u,f){var d=this&&this.__decorate||function(E,v,A,O){var j,I=arguments.length,z=I<3?v:O===null?O=Object.getOwnPropertyDescriptor(v,A):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(E,v,A,O);else for(var Z=E.length-1;Z>=0;Z--)(j=E[Z])&&(z=(I<3?j(z):I>3?j(v,A,z):j(v,A))||z);return I>3&&z&&Object.defineProperty(v,A,z),z},m=this&&this.__param||function(E,v){return function(A,O){v(A,O,E)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=f(7239),p=f(8055),y=f(8460),w=f(844),g=f(2585),l=p.css.toColor("#ffffff"),c=p.css.toColor("#000000"),a=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],v=[0,95,135,175,215,255];for(let A=0;A<216;A++){const O=v[A/36%6|0],j=v[A/6%6|0],I=v[A%6];E.push({css:p.channels.toCss(O,j,I),rgba:p.channels.toRgba(O,j,I)})}for(let A=0;A<24;A++){const O=8+10*A;E.push({css:p.channels.toCss(O,O,O),rgba:p.channels.toRgba(O,O,O)})}return E})());let C=u.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:c,cursor:a,cursorAccent:o,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(c,_),ansi:u.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(E={}){const v=this._colors;if(v.foreground=b(E.foreground,l),v.background=b(E.background,c),v.cursor=b(E.cursor,a),v.cursorAccent=b(E.cursorAccent,o),v.selectionBackgroundTransparent=b(E.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=b(E.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=E.selectionForeground?b(E.selectionForeground,p.NULL_COLOR):void 0,v.selectionForeground===p.NULL_COLOR&&(v.selectionForeground=void 0),p.color.isOpaque(v.selectionBackgroundTransparent)&&(v.selectionBackgroundTransparent=p.color.opacity(v.selectionBackgroundTransparent,.3)),p.color.isOpaque(v.selectionInactiveBackgroundTransparent)&&(v.selectionInactiveBackgroundTransparent=p.color.opacity(v.selectionInactiveBackgroundTransparent,.3)),v.ansi=u.DEFAULT_ANSI_COLORS.slice(),v.ansi[0]=b(E.black,u.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=b(E.red,u.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=b(E.green,u.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=b(E.yellow,u.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=b(E.blue,u.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=b(E.magenta,u.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=b(E.cyan,u.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=b(E.white,u.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=b(E.brightBlack,u.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=b(E.brightRed,u.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=b(E.brightGreen,u.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=b(E.brightYellow,u.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=b(E.brightBlue,u.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=b(E.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=b(E.brightCyan,u.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=b(E.brightWhite,u.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const A=Math.min(v.ansi.length-16,E.extendedAnsi.length);for(let O=0;O<A;O++)v.ansi[O+16]=b(E.extendedAnsi[O],u.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(E){this._restoreColor(E),this._onChangeColors.fire(this.colors)}_restoreColor(E){if(E!==void 0)switch(E){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[E]=this._restoreColors.ansi[E]}else for(let v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}modifyColors(E){E(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function b(E,v){if(E!==void 0)try{return p.css.toColor(E)}catch{}return v}u.ThemeService=C=d([m(0,g.IOptionsService)],C)},6349:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=f(8460),m=f(844);class h extends m.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(y){if(this._maxLength===y)return;const w=new Array(y);for(let g=0;g<Math.min(y,this.length);g++)w[g]=this._array[this._getCyclicIndex(g)];this._array=w,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let w=this._length;w<y;w++)this._array[w]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,w){this._array[this._getCyclicIndex(y)]=w}push(y){this._array[this._getCyclicIndex(this._length)]=y,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(y,w,...g){if(w){for(let l=y;l<this._length-w;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+w)];this._length-=w,this.onDeleteEmitter.fire({index:y,amount:w})}for(let l=this._length-1;l>=y;l--)this._array[this._getCyclicIndex(l+g.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<g.length;l++)this._array[this._getCyclicIndex(y+l)]=g[l];if(g.length&&this.onInsertEmitter.fire({index:y,amount:g.length}),this._length+g.length>this._maxLength){const l=this._length+g.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=g.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,w,g){if(!(w<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(let c=w-1;c>=0;c--)this.set(y+c+g,this.get(y+c));const l=y+w+g-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<w;l++)this.set(y+l+g,this.get(y+l))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}u.CircularList=h},1439:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function f(d,m=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const p in d)h[p]=m<=1?d[p]:d[p]&&f(d[p],m-1);return h}},8055:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.contrastRatio=u.toPaddedHex=u.rgba=u.rgb=u.css=u.color=u.channels=u.NULL_COLOR=void 0;let f=0,d=0,m=0,h=0;var p,y,w,g,l;function c(o){const _=o.toString(16);return _.length<2?"0"+_:_}function a(o,_){return o<_?(_+.05)/(o+.05):(o+.05)/(_+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(o){o.toCss=function(_,C,b,E){return E!==void 0?`#${c(_)}${c(C)}${c(b)}${c(E)}`:`#${c(_)}${c(C)}${c(b)}`},o.toRgba=function(_,C,b,E=255){return(_<<24|C<<16|b<<8|E)>>>0},o.toColor=function(_,C,b,E){return{css:o.toCss(_,C,b,E),rgba:o.toRgba(_,C,b,E)}}})(p||(u.channels=p={})),(function(o){function _(C,b){return h=Math.round(255*b),[f,d,m]=l.toChannels(C.rgba),{css:p.toCss(f,d,m,h),rgba:p.toRgba(f,d,m,h)}}o.blend=function(C,b){if(h=(255&b.rgba)/255,h===1)return{css:b.css,rgba:b.rgba};const E=b.rgba>>24&255,v=b.rgba>>16&255,A=b.rgba>>8&255,O=C.rgba>>24&255,j=C.rgba>>16&255,I=C.rgba>>8&255;return f=O+Math.round((E-O)*h),d=j+Math.round((v-j)*h),m=I+Math.round((A-I)*h),{css:p.toCss(f,d,m),rgba:p.toRgba(f,d,m)}},o.isOpaque=function(C){return(255&C.rgba)==255},o.ensureContrastRatio=function(C,b,E){const v=l.ensureContrastRatio(C.rgba,b.rgba,E);if(v)return p.toColor(v>>24&255,v>>16&255,v>>8&255)},o.opaque=function(C){const b=(255|C.rgba)>>>0;return[f,d,m]=l.toChannels(b),{css:p.toCss(f,d,m),rgba:b}},o.opacity=_,o.multiplyOpacity=function(C,b){return h=255&C.rgba,_(C,h*b/255)},o.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(y||(u.color=y={})),(function(o){let _,C;try{const b=document.createElement("canvas");b.width=1,b.height=1;const E=b.getContext("2d",{willReadFrequently:!0});E&&(_=E,_.globalCompositeOperation="copy",C=_.createLinearGradient(0,0,1,1))}catch{}o.toColor=function(b){if(b.match(/#[\da-f]{3,8}/i))switch(b.length){case 4:return f=parseInt(b.slice(1,2).repeat(2),16),d=parseInt(b.slice(2,3).repeat(2),16),m=parseInt(b.slice(3,4).repeat(2),16),p.toColor(f,d,m);case 5:return f=parseInt(b.slice(1,2).repeat(2),16),d=parseInt(b.slice(2,3).repeat(2),16),m=parseInt(b.slice(3,4).repeat(2),16),h=parseInt(b.slice(4,5).repeat(2),16),p.toColor(f,d,m,h);case 7:return{css:b,rgba:(parseInt(b.slice(1),16)<<8|255)>>>0};case 9:return{css:b,rgba:parseInt(b.slice(1),16)>>>0}}const E=b.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return f=parseInt(E[1]),d=parseInt(E[2]),m=parseInt(E[3]),h=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),p.toColor(f,d,m,h);if(!_||!C)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=C,_.fillStyle=b,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[f,d,m,h]=_.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(f,d,m,h),css:b}}})(w||(u.css=w={})),(function(o){function _(C,b,E){const v=C/255,A=b/255,O=E/255;return .2126*(v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4))+.7152*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}o.relativeLuminance=function(C){return _(C>>16&255,C>>8&255,255&C)},o.relativeLuminance2=_})(g||(u.rgb=g={})),(function(o){function _(b,E,v){const A=b>>24&255,O=b>>16&255,j=b>>8&255;let I=E>>24&255,z=E>>16&255,Z=E>>8&255,re=a(g.relativeLuminance2(I,z,Z),g.relativeLuminance2(A,O,j));for(;re<v&&(I>0||z>0||Z>0);)I-=Math.max(0,Math.ceil(.1*I)),z-=Math.max(0,Math.ceil(.1*z)),Z-=Math.max(0,Math.ceil(.1*Z)),re=a(g.relativeLuminance2(I,z,Z),g.relativeLuminance2(A,O,j));return(I<<24|z<<16|Z<<8|255)>>>0}function C(b,E,v){const A=b>>24&255,O=b>>16&255,j=b>>8&255;let I=E>>24&255,z=E>>16&255,Z=E>>8&255,re=a(g.relativeLuminance2(I,z,Z),g.relativeLuminance2(A,O,j));for(;re<v&&(I<255||z<255||Z<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),z=Math.min(255,z+Math.ceil(.1*(255-z))),Z=Math.min(255,Z+Math.ceil(.1*(255-Z))),re=a(g.relativeLuminance2(I,z,Z),g.relativeLuminance2(A,O,j));return(I<<24|z<<16|Z<<8|255)>>>0}o.blend=function(b,E){if(h=(255&E)/255,h===1)return E;const v=E>>24&255,A=E>>16&255,O=E>>8&255,j=b>>24&255,I=b>>16&255,z=b>>8&255;return f=j+Math.round((v-j)*h),d=I+Math.round((A-I)*h),m=z+Math.round((O-z)*h),p.toRgba(f,d,m)},o.ensureContrastRatio=function(b,E,v){const A=g.relativeLuminance(b>>8),O=g.relativeLuminance(E>>8);if(a(A,O)<v){if(O<A){const z=_(b,E,v),Z=a(A,g.relativeLuminance(z>>8));if(Z<v){const re=C(b,E,v);return Z>a(A,g.relativeLuminance(re>>8))?z:re}return z}const j=C(b,E,v),I=a(A,g.relativeLuminance(j>>8));if(I<v){const z=_(b,E,v);return I>a(A,g.relativeLuminance(z>>8))?j:z}return j}},o.reduceLuminance=_,o.increaseLuminance=C,o.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]}})(l||(u.rgba=l={})),u.toPaddedHex=c,u.contrastRatio=a},8969:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=f(844),m=f(2585),h=f(4348),p=f(7866),y=f(744),w=f(7302),g=f(6975),l=f(8460),c=f(1753),a=f(1480),o=f(7994),_=f(9282),C=f(5435),b=f(5981),E=f(2660);let v=!1;class A extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event((j=>{var I;(I=this._onScrollApi)==null||I.fire(j.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(j){for(const I in j)this.optionsService.options[I]=j[I]}constructor(j){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new w.OptionsService(j)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(g.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(o.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((I=>{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((I=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new b.WriteBuffer(((I,z)=>this._inputHandler.parse(I,z)))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(j,I){this._writeBuffer.write(j,I)}writeSync(j,I){this._logService.logLevel<=m.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(j,I)}input(j,I=!0){this.coreService.triggerDataEvent(j,I)}resize(j,I){isNaN(j)||isNaN(I)||(j=Math.max(j,y.MINIMUM_COLS),I=Math.max(I,y.MINIMUM_ROWS),this._bufferService.resize(j,I))}scroll(j,I=!1){this._bufferService.scroll(j,I)}scrollLines(j,I,z){this._bufferService.scrollLines(j,I,z)}scrollPages(j){this.scrollLines(j*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(j){const I=j-this._bufferService.buffer.ydisp;I!==0&&this.scrollLines(I)}registerEscHandler(j,I){return this._inputHandler.registerEscHandler(j,I)}registerDcsHandler(j,I){return this._inputHandler.registerDcsHandler(j,I)}registerCsiHandler(j,I){return this._inputHandler.registerCsiHandler(j,I)}registerOscHandler(j,I){return this._inputHandler.registerOscHandler(j,I)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let j=!1;const I=this.optionsService.rawOptions.windowsPty;I&&I.buildNumber!==void 0&&I.buildNumber!==void 0?j=I.backend==="conpty"&&I.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(j=!0),j?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const j=[];j.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),j.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const I of j)I.dispose()}))}}}u.CoreTerminal=A},8460:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.runAndSubscribe=u.forwardEvent=u.EventEmitter=void 0,u.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=f=>(this._listeners.push(f),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===f)return void this._listeners.splice(d,1)}}})),this._event}fire(f,d){const m=[];for(let h=0;h<this._listeners.length;h++)m.push(this._listeners[h]);for(let h=0;h<m.length;h++)m[h].call(void 0,f,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(f,d){return f((m=>d.fire(m)))},u.runAndSubscribe=function(f,d){return d(void 0),f((m=>d(m)))}},5435:function(K,u,f){var d=this&&this.__decorate||function(se,D,k,x){var M,V=arguments.length,G=V<3?D:x===null?x=Object.getOwnPropertyDescriptor(D,k):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(se,D,k,x);else for(var Q=se.length-1;Q>=0;Q--)(M=se[Q])&&(G=(V<3?M(G):V>3?M(D,k,G):M(D,k))||G);return V>3&&G&&Object.defineProperty(D,k,G),G},m=this&&this.__param||function(se,D){return function(k,x){D(k,x,se)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=f(2584),p=f(7116),y=f(2015),w=f(844),g=f(482),l=f(8437),c=f(8460),a=f(643),o=f(511),_=f(3734),C=f(2585),b=f(1480),E=f(6242),v=f(6351),A=f(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},j=131072;function I(se,D){if(se>24)return D.setWinLines||!1;switch(se){case 1:return!!D.restoreWin;case 2:return!!D.minimizeWin;case 3:return!!D.setWinPosition;case 4:return!!D.setWinSizePixels;case 5:return!!D.raiseWin;case 6:return!!D.lowerWin;case 7:return!!D.refreshWin;case 8:return!!D.setWinSizeChars;case 9:return!!D.maximizeWin;case 10:return!!D.fullscreenWin;case 11:return!!D.getWinState;case 13:return!!D.getWinPosition;case 14:return!!D.getWinSizePixels;case 15:return!!D.getScreenSizePixels;case 16:return!!D.getCellSizePixels;case 18:return!!D.getWinSizeChars;case 19:return!!D.getScreenSizeChars;case 20:return!!D.getIconTitle;case 21:return!!D.getWinTitle;case 22:return!!D.pushTitle;case 23:return!!D.popTitle;case 24:return!!D.setWinLines}return!1}var z;(function(se){se[se.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",se[se.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(z||(u.WindowsOptionsReportType=z={}));let Z=0;class re extends w.Disposable{getAttrData(){return this._curAttrData}constructor(D,k,x,M,V,G,Q,he,U=new y.EscapeSequenceParser){super(),this._bufferService=D,this._charsetService=k,this._coreService=x,this._logService=M,this._optionsService=V,this._oscLinkService=G,this._coreMouseService=Q,this._unicodeService=he,this._parser=U,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new g.StringToUtf32,this._utf8Decoder=new g.Utf8ToUtf32,this._workCell=new o.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._parser.setCsiHandlerFallback(((R,le)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(R),params:le.toArray()})})),this._parser.setEscHandlerFallback((R=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(R)})})),this._parser.setExecuteHandlerFallback((R=>{this._logService.debug("Unknown EXECUTE code: ",{code:R})})),this._parser.setOscHandlerFallback(((R,le,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:R,action:le,data:ie})})),this._parser.setDcsHandlerFallback(((R,le,ie)=>{le==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(R),action:le,payload:ie})})),this._parser.setPrintHandler(((R,le,ie)=>this.print(R,le,ie))),this._parser.registerCsiHandler({final:"@"},(R=>this.insertChars(R))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(R=>this.scrollLeft(R))),this._parser.registerCsiHandler({final:"A"},(R=>this.cursorUp(R))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(R=>this.scrollRight(R))),this._parser.registerCsiHandler({final:"B"},(R=>this.cursorDown(R))),this._parser.registerCsiHandler({final:"C"},(R=>this.cursorForward(R))),this._parser.registerCsiHandler({final:"D"},(R=>this.cursorBackward(R))),this._parser.registerCsiHandler({final:"E"},(R=>this.cursorNextLine(R))),this._parser.registerCsiHandler({final:"F"},(R=>this.cursorPrecedingLine(R))),this._parser.registerCsiHandler({final:"G"},(R=>this.cursorCharAbsolute(R))),this._parser.registerCsiHandler({final:"H"},(R=>this.cursorPosition(R))),this._parser.registerCsiHandler({final:"I"},(R=>this.cursorForwardTab(R))),this._parser.registerCsiHandler({final:"J"},(R=>this.eraseInDisplay(R,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(R=>this.eraseInDisplay(R,!0))),this._parser.registerCsiHandler({final:"K"},(R=>this.eraseInLine(R,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(R=>this.eraseInLine(R,!0))),this._parser.registerCsiHandler({final:"L"},(R=>this.insertLines(R))),this._parser.registerCsiHandler({final:"M"},(R=>this.deleteLines(R))),this._parser.registerCsiHandler({final:"P"},(R=>this.deleteChars(R))),this._parser.registerCsiHandler({final:"S"},(R=>this.scrollUp(R))),this._parser.registerCsiHandler({final:"T"},(R=>this.scrollDown(R))),this._parser.registerCsiHandler({final:"X"},(R=>this.eraseChars(R))),this._parser.registerCsiHandler({final:"Z"},(R=>this.cursorBackwardTab(R))),this._parser.registerCsiHandler({final:"`"},(R=>this.charPosAbsolute(R))),this._parser.registerCsiHandler({final:"a"},(R=>this.hPositionRelative(R))),this._parser.registerCsiHandler({final:"b"},(R=>this.repeatPrecedingCharacter(R))),this._parser.registerCsiHandler({final:"c"},(R=>this.sendDeviceAttributesPrimary(R))),this._parser.registerCsiHandler({prefix:">",final:"c"},(R=>this.sendDeviceAttributesSecondary(R))),this._parser.registerCsiHandler({final:"d"},(R=>this.linePosAbsolute(R))),this._parser.registerCsiHandler({final:"e"},(R=>this.vPositionRelative(R))),this._parser.registerCsiHandler({final:"f"},(R=>this.hVPosition(R))),this._parser.registerCsiHandler({final:"g"},(R=>this.tabClear(R))),this._parser.registerCsiHandler({final:"h"},(R=>this.setMode(R))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(R=>this.setModePrivate(R))),this._parser.registerCsiHandler({final:"l"},(R=>this.resetMode(R))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(R=>this.resetModePrivate(R))),this._parser.registerCsiHandler({final:"m"},(R=>this.charAttributes(R))),this._parser.registerCsiHandler({final:"n"},(R=>this.deviceStatus(R))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(R=>this.deviceStatusPrivate(R))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(R=>this.softReset(R))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(R=>this.setCursorStyle(R))),this._parser.registerCsiHandler({final:"r"},(R=>this.setScrollRegion(R))),this._parser.registerCsiHandler({final:"s"},(R=>this.saveCursor(R))),this._parser.registerCsiHandler({final:"t"},(R=>this.windowOptions(R))),this._parser.registerCsiHandler({final:"u"},(R=>this.restoreCursor(R))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(R=>this.insertColumns(R))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(R=>this.deleteColumns(R))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(R=>this.selectProtected(R))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(R=>this.requestMode(R,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(R=>this.requestMode(R,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new E.OscHandler((R=>(this.setTitle(R),this.setIconName(R),!0)))),this._parser.registerOscHandler(1,new E.OscHandler((R=>this.setIconName(R)))),this._parser.registerOscHandler(2,new E.OscHandler((R=>this.setTitle(R)))),this._parser.registerOscHandler(4,new E.OscHandler((R=>this.setOrReportIndexedColor(R)))),this._parser.registerOscHandler(8,new E.OscHandler((R=>this.setHyperlink(R)))),this._parser.registerOscHandler(10,new E.OscHandler((R=>this.setOrReportFgColor(R)))),this._parser.registerOscHandler(11,new E.OscHandler((R=>this.setOrReportBgColor(R)))),this._parser.registerOscHandler(12,new E.OscHandler((R=>this.setOrReportCursorColor(R)))),this._parser.registerOscHandler(104,new E.OscHandler((R=>this.restoreIndexedColor(R)))),this._parser.registerOscHandler(110,new E.OscHandler((R=>this.restoreFgColor(R)))),this._parser.registerOscHandler(111,new E.OscHandler((R=>this.restoreBgColor(R)))),this._parser.registerOscHandler(112,new E.OscHandler((R=>this.restoreCursorColor(R)))),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 R in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:R},(()=>this.selectCharset("("+R))),this._parser.registerEscHandler({intermediates:")",final:R},(()=>this.selectCharset(")"+R))),this._parser.registerEscHandler({intermediates:"*",final:R},(()=>this.selectCharset("*"+R))),this._parser.registerEscHandler({intermediates:"+",final:R},(()=>this.selectCharset("+"+R))),this._parser.registerEscHandler({intermediates:"-",final:R},(()=>this.selectCharset("-"+R))),this._parser.registerEscHandler({intermediates:".",final:R},(()=>this.selectCharset("."+R))),this._parser.registerEscHandler({intermediates:"/",final:R},(()=>this.selectCharset("/"+R)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((R=>(this._logService.error("Parsing error: ",R),R))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new v.DcsHandler(((R,le)=>this.requestStatusString(R,le))))}_preserveStack(D,k,x,M){this._parseStack.paused=!0,this._parseStack.cursorStartX=D,this._parseStack.cursorStartY=k,this._parseStack.decodedLength=x,this._parseStack.position=M}_logSlowResolvingAsync(D){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([D,new Promise(((k,x)=>setTimeout((()=>x("#SLOW_TIMEOUT")),5e3)))]).catch((k=>{if(k!=="#SLOW_TIMEOUT")throw k;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(D,k){let x,M=this._activeBuffer.x,V=this._activeBuffer.y,G=0;const Q=this._parseStack.paused;if(Q){if(x=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,k))return this._logSlowResolvingAsync(x),x;M=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,D.length>j&&(G=this._parseStack.position+j)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof D=="string"?` "${D}"`:` "${Array.prototype.map.call(D,(R=>String.fromCharCode(R))).join("")}"`),typeof D=="string"?D.split("").map((R=>R.charCodeAt(0))):D),this._parseBuffer.length<D.length&&this._parseBuffer.length<j&&(this._parseBuffer=new Uint32Array(Math.min(D.length,j))),Q||this._dirtyRowTracker.clearRange(),D.length>j)for(let R=G;R<D.length;R+=j){const le=R+j<D.length?R+j:D.length,ie=typeof D=="string"?this._stringDecoder.decode(D.substring(R,le),this._parseBuffer):this._utf8Decoder.decode(D.subarray(R,le),this._parseBuffer);if(x=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(M,V,ie,R),this._logSlowResolvingAsync(x),x}else if(!Q){const R=typeof D=="string"?this._stringDecoder.decode(D,this._parseBuffer):this._utf8Decoder.decode(D,this._parseBuffer);if(x=this._parser.parse(this._parseBuffer,R))return this._preserveStack(M,V,R,0),this._logSlowResolvingAsync(x),x}this._activeBuffer.x===M&&this._activeBuffer.y===V||this._onCursorMove.fire();const he=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),U=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);U<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(U,this._bufferService.rows-1),Math.min(he,this._bufferService.rows-1))}print(D,k,x){let M,V;const G=this._charsetService.charset,Q=this._optionsService.rawOptions.screenReaderMode,he=this._bufferService.cols,U=this._coreService.decPrivateModes.wraparound,R=this._coreService.modes.insertMode,le=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&x-k>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,le);let de=this._parser.precedingJoinState;for(let fe=k;fe<x;++fe){if(M=D[fe],M<127&&G){const it=G[String.fromCharCode(M)];it&&(M=it.charCodeAt(0))}const Ee=this._unicodeService.charProperties(M,de);V=b.UnicodeService.extractWidth(Ee);const Be=b.UnicodeService.extractShouldJoin(Ee),Ie=Be?b.UnicodeService.extractWidth(de):0;if(de=Ee,Q&&this._onA11yChar.fire((0,g.stringFromCodePoint)(M)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-Ie>he){if(U){const it=ie;let Se=this._activeBuffer.x-Ie;for(this._activeBuffer.x=Ie,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),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ie>0&&ie instanceof l.BufferLine&&ie.copyCellsFrom(it,Se,0,Ie,!1);Se<he;)it.setCellFromCodepoint(Se++,0,1,le)}else if(this._activeBuffer.x=he-1,V===2)continue}if(Be&&this._activeBuffer.x){const it=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-it,M,V);for(let Se=V-Ie;--Se>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}else if(R&&(ie.insertCells(this._activeBuffer.x,V-Ie,this._activeBuffer.getNullCell(le)),ie.getWidth(he-1)===2&&ie.setCellFromCodepoint(he-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,le)),ie.setCellFromCodepoint(this._activeBuffer.x++,M,V,le),V>0)for(;--V;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,le)}this._parser.precedingJoinState=de,this._activeBuffer.x<he&&x-k>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,le),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(D,k){return D.final!=="t"||D.prefix||D.intermediates?this._parser.registerCsiHandler(D,k):this._parser.registerCsiHandler(D,(x=>!I(x.params[0],this._optionsService.rawOptions.windowOptions)||k(x)))}registerDcsHandler(D,k){return this._parser.registerDcsHandler(D,new v.DcsHandler(k))}registerEscHandler(D,k){return this._parser.registerEscHandler(D,k)}registerOscHandler(D,k){return this._parser.registerOscHandler(D,new E.OscHandler(k))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var D;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&&((D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&D.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);k.hasWidth(this._activeBuffer.x)&&!k.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const D=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-D),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(D=this._bufferService.cols-1){this._activeBuffer.x=Math.min(D,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(D,k){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=D,this._activeBuffer.y=this._activeBuffer.scrollTop+k):(this._activeBuffer.x=D,this._activeBuffer.y=k),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(D,k){this._restrictCursor(),this._setCursor(this._activeBuffer.x+D,this._activeBuffer.y+k)}cursorUp(D){const k=this._activeBuffer.y-this._activeBuffer.scrollTop;return k>=0?this._moveCursor(0,-Math.min(k,D.params[0]||1)):this._moveCursor(0,-(D.params[0]||1)),!0}cursorDown(D){const k=this._activeBuffer.scrollBottom-this._activeBuffer.y;return k>=0?this._moveCursor(0,Math.min(k,D.params[0]||1)):this._moveCursor(0,D.params[0]||1),!0}cursorForward(D){return this._moveCursor(D.params[0]||1,0),!0}cursorBackward(D){return this._moveCursor(-(D.params[0]||1),0),!0}cursorNextLine(D){return this.cursorDown(D),this._activeBuffer.x=0,!0}cursorPrecedingLine(D){return this.cursorUp(D),this._activeBuffer.x=0,!0}cursorCharAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(D){return this._setCursor(D.length>=2?(D.params[1]||1)-1:0,(D.params[0]||1)-1),!0}charPosAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(D){return this._moveCursor(D.params[0]||1,0),!0}linePosAbsolute(D){return this._setCursor(this._activeBuffer.x,(D.params[0]||1)-1),!0}vPositionRelative(D){return this._moveCursor(0,D.params[0]||1),!0}hVPosition(D){return this.cursorPosition(D),!0}tabClear(D){const k=D.params[0];return k===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:k===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let k=D.params[0]||1;for(;k--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let k=D.params[0]||1;for(;k--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(D){const k=D.params[0];return k===1&&(this._curAttrData.bg|=536870912),k!==2&&k!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(D,k,x,M=!1,V=!1){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);G.replaceCells(k,x,this._activeBuffer.getNullCell(this._eraseAttrData()),V),M&&(G.isWrapped=!1)}_resetBufferLine(D,k=!1){const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);x&&(x.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),k),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+D),x.isWrapped=!1)}eraseInDisplay(D,k=!1){let x;switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:for(x=this._activeBuffer.y,this._dirtyRowTracker.markDirty(x),this._eraseInBufferLine(x++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,k);x<this._bufferService.rows;x++)this._resetBufferLine(x,k);this._dirtyRowTracker.markDirty(x);break;case 1:for(x=this._activeBuffer.y,this._dirtyRowTracker.markDirty(x),this._eraseInBufferLine(x,0,this._activeBuffer.x+1,!0,k),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(x+1).isWrapped=!1);x--;)this._resetBufferLine(x,k);this._dirtyRowTracker.markDirty(0);break;case 2:for(x=this._bufferService.rows,this._dirtyRowTracker.markDirty(x-1);x--;)this._resetBufferLine(x,k);this._dirtyRowTracker.markDirty(0);break;case 3:const M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0}eraseInLine(D,k=!1){switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,k);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,k);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,k)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(D){this._restrictCursor();let k=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=this._activeBuffer.ybase+this._activeBuffer.y,M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-M+1;for(;k--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(x,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(D){this._restrictCursor();let k=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=this._activeBuffer.ybase+this._activeBuffer.y;let M;for(M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,M=this._bufferService.rows-1+this._activeBuffer.ybase-M;k--;)this._activeBuffer.lines.splice(x,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(D){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.insertCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(D){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.deleteCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(D){let k=D.params[0]||1;for(;k--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(D){let k=D.params[0]||1;for(;k--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(l.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=D.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);M.deleteCells(0,k,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=D.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);M.insertCells(0,k,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=D.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);M.insertCells(this._activeBuffer.x,k,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=D.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);M.deleteCells(this._activeBuffer.x,k,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(D){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(D.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(D){const k=this._parser.precedingJoinState;if(!k)return!0;const x=D.params[0]||1,M=b.UnicodeService.extractWidth(k),V=this._activeBuffer.x-M,G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),Q=new Uint32Array(G.length*x);let he=0;for(let R=0;R<G.length;){const le=G.codePointAt(R)||0;Q[he++]=le,R+=le>65535?2:1}let U=he;for(let R=1;R<x;++R)Q.copyWithin(U,0,he),U+=he;return this.print(Q,0,U),!0}sendDeviceAttributesPrimary(D){return D.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(D){return D.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(D.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(D){return(this._optionsService.rawOptions.termName+"").indexOf(D)===0}setMode(D){for(let k=0;k<D.length;k++)switch(D.params[k]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(D){for(let k=0;k<D.length;k++)switch(D.params[k]){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(D){for(let k=0;k<D.length;k++)switch(D.params[k]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(D){for(let k=0;k<D.length;k++)switch(D.params[k]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),D.params[k]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(D,k){const x=this._coreService.decPrivateModes,{activeProtocol:M,activeEncoding:V}=this._coreMouseService,G=this._coreService,{buffers:Q,cols:he}=this._bufferService,{active:U,alt:R}=Q,le=this._optionsService.rawOptions,ie=Be=>Be?1:2,de=D.params[0];return fe=de,Ee=k?de===2?4:de===4?ie(G.modes.insertMode):de===12?3:de===20?ie(le.convertEol):0:de===1?ie(x.applicationCursorKeys):de===3?le.windowOptions.setWinLines?he===80?2:he===132?1:0:0:de===6?ie(x.origin):de===7?ie(x.wraparound):de===8?3:de===9?ie(M==="X10"):de===12?ie(le.cursorBlink):de===25?ie(!G.isCursorHidden):de===45?ie(x.reverseWraparound):de===66?ie(x.applicationKeypad):de===67?4:de===1e3?ie(M==="VT200"):de===1002?ie(M==="DRAG"):de===1003?ie(M==="ANY"):de===1004?ie(x.sendFocus):de===1005?4:de===1006?ie(V==="SGR"):de===1015?4:de===1016?ie(V==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?ie(U===R):de===2004?ie(x.bracketedPasteMode):0,G.triggerDataEvent(`${h.C0.ESC}[${k?"":"?"}${fe};${Ee}$y`),!0;var fe,Ee}_updateAttrColor(D,k,x,M,V){return k===2?(D|=50331648,D&=-16777216,D|=_.AttributeData.fromColorRGB([x,M,V])):k===5&&(D&=-50331904,D|=33554432|255&x),D}_extractColor(D,k,x){const M=[0,0,-1,0,0,0];let V=0,G=0;do{if(M[G+V]=D.params[k+G],D.hasSubParams(k+G)){const Q=D.getSubParams(k+G);let he=0;do M[1]===5&&(V=1),M[G+he+1+V]=Q[he];while(++he<Q.length&&he+G+1+V<M.length);break}if(M[1]===5&&G+V>=2||M[1]===2&&G+V>=5)break;M[1]&&(V=1)}while(++G+k<D.length&&G+V<M.length);for(let Q=2;Q<M.length;++Q)M[Q]===-1&&(M[Q]=0);switch(M[0]){case 38:x.fg=this._updateAttrColor(x.fg,M[1],M[3],M[4],M[5]);break;case 48:x.bg=this._updateAttrColor(x.bg,M[1],M[3],M[4],M[5]);break;case 58:x.extended=x.extended.clone(),x.extended.underlineColor=this._updateAttrColor(x.extended.underlineColor,M[1],M[3],M[4],M[5])}return G}_processUnderline(D,k){k.extended=k.extended.clone(),(!~D||D>5)&&(D=1),k.extended.underlineStyle=D,k.fg|=268435456,D===0&&(k.fg&=-268435457),k.updateExtended()}_processSGR0(D){D.fg=l.DEFAULT_ATTR_DATA.fg,D.bg=l.DEFAULT_ATTR_DATA.bg,D.extended=D.extended.clone(),D.extended.underlineStyle=0,D.extended.underlineColor&=-67108864,D.updateExtended()}charAttributes(D){if(D.length===1&&D.params[0]===0)return this._processSGR0(this._curAttrData),!0;const k=D.length;let x;const M=this._curAttrData;for(let V=0;V<k;V++)x=D.params[V],x>=30&&x<=37?(M.fg&=-50331904,M.fg|=16777216|x-30):x>=40&&x<=47?(M.bg&=-50331904,M.bg|=16777216|x-40):x>=90&&x<=97?(M.fg&=-50331904,M.fg|=16777224|x-90):x>=100&&x<=107?(M.bg&=-50331904,M.bg|=16777224|x-100):x===0?this._processSGR0(M):x===1?M.fg|=134217728:x===3?M.bg|=67108864:x===4?(M.fg|=268435456,this._processUnderline(D.hasSubParams(V)?D.getSubParams(V)[0]:1,M)):x===5?M.fg|=536870912:x===7?M.fg|=67108864:x===8?M.fg|=1073741824:x===9?M.fg|=2147483648:x===2?M.bg|=134217728:x===21?this._processUnderline(2,M):x===22?(M.fg&=-134217729,M.bg&=-134217729):x===23?M.bg&=-67108865:x===24?(M.fg&=-268435457,this._processUnderline(0,M)):x===25?M.fg&=-536870913:x===27?M.fg&=-67108865:x===28?M.fg&=-1073741825:x===29?M.fg&=2147483647:x===39?(M.fg&=-67108864,M.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):x===49?(M.bg&=-67108864,M.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):x===38||x===48||x===58?V+=this._extractColor(D,V,M):x===53?M.bg|=1073741824:x===55?M.bg&=-1073741825:x===59?(M.extended=M.extended.clone(),M.extended.underlineColor=-1,M.updateExtended()):x===100?(M.fg&=-67108864,M.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,M.bg&=-67108864,M.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",x);return!0}deviceStatus(D){switch(D.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const k=this._activeBuffer.y+1,x=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${k};${x}R`)}return!0}deviceStatusPrivate(D){if(D.params[0]===6){const k=this._activeBuffer.y+1,x=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${k};${x}R`)}return!0}softReset(D){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(D){const k=D.params[0]||1;switch(k){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const x=k%2==1;return this._optionsService.options.cursorBlink=x,!0}setScrollRegion(D){const k=D.params[0]||1;let x;return(D.length<2||(x=D.params[1])>this._bufferService.rows||x===0)&&(x=this._bufferService.rows),x>k&&(this._activeBuffer.scrollTop=k-1,this._activeBuffer.scrollBottom=x-1,this._setCursor(0,0)),!0}windowOptions(D){if(!I(D.params[0],this._optionsService.rawOptions.windowOptions))return!0;const k=D.length>1?D.params[1]:0;switch(D.params[0]){case 14:k!==2&&this._onRequestWindowsOptionsReport.fire(z.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(z.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:k!==0&&k!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),k!==0&&k!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:k!==0&&k!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),k!==0&&k!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(D){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(D){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(D){return this._windowTitle=D,this._onTitleChange.fire(D),!0}setIconName(D){return this._iconName=D,!0}setOrReportIndexedColor(D){const k=[],x=D.split(";");for(;x.length>1;){const M=x.shift(),V=x.shift();if(/^\d+$/.exec(M)){const G=parseInt(M);if(J(G))if(V==="?")k.push({type:0,index:G});else{const Q=(0,A.parseColor)(V);Q&&k.push({type:1,index:G,color:Q})}}}return k.length&&this._onColor.fire(k),!0}setHyperlink(D){const k=D.split(";");return!(k.length<2)&&(k[1]?this._createHyperlink(k[0],k[1]):!k[0]&&this._finishHyperlink())}_createHyperlink(D,k){this._getCurrentLinkId()&&this._finishHyperlink();const x=D.split(":");let M;const V=x.findIndex((G=>G.startsWith("id=")));return V!==-1&&(M=x[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:M,uri:k}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(D,k){const x=D.split(";");for(let M=0;M<x.length&&!(k>=this._specialColors.length);++M,++k)if(x[M]==="?")this._onColor.fire([{type:0,index:this._specialColors[k]}]);else{const V=(0,A.parseColor)(x[M]);V&&this._onColor.fire([{type:1,index:this._specialColors[k],color:V}])}return!0}setOrReportFgColor(D){return this._setOrReportSpecialColor(D,0)}setOrReportBgColor(D){return this._setOrReportSpecialColor(D,1)}setOrReportCursorColor(D){return this._setOrReportSpecialColor(D,2)}restoreIndexedColor(D){if(!D)return this._onColor.fire([{type:2}]),!0;const k=[],x=D.split(";");for(let M=0;M<x.length;++M)if(/^\d+$/.exec(x[M])){const V=parseInt(x[M]);J(V)&&k.push({type:2,index:V})}return k.length&&this._onColor.fire(k),!0}restoreFgColor(D){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(D){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(D){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(D){return D.length!==2?(this.selectDefaultCharset(),!0):(D[0]==="/"||this._charsetService.setgCharset(O[D[0]],p.CHARSETS[D[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 D=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,D,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(D){return this._charsetService.setgLevel(D),!0}screenAlignmentPattern(){const D=new o.CellData;D.content=4194373,D.fg=this._curAttrData.fg,D.bg=this._curAttrData.bg,this._setCursor(0,0);for(let k=0;k<this._bufferService.rows;++k){const x=this._activeBuffer.ybase+this._activeBuffer.y+k,M=this._activeBuffer.lines.get(x);M&&(M.fill(D),M.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(D,k){const x=this._bufferService.buffer,M=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${V}${h.C0.ESC}\\`),!0))(D==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:D==='"p'?'P1$r61;1"p':D==="r"?`P1$r${x.scrollTop+1};${x.scrollBottom+1}r`:D==="m"?"P1$r0m":D===" q"?`P1$r${{block:2,underline:4,bar:6}[M.cursorStyle]-(M.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(D,k){this._dirtyRowTracker.markRangeDirty(D,k)}}u.InputHandler=re;let q=class{constructor(se){this._bufferService=se,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(se){se<this.start?this.start=se:se>this.end&&(this.end=se)}markRangeDirty(se,D){se>D&&(Z=se,se=D,D=Z),se<this.start&&(this.start=se),D>this.end&&(this.end=D)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(se){return 0<=se&&se<256}q=d([m(0,C.IBufferService)],q)},844:(K,u)=>{function f(d){for(const m of d)m.dispose();d.length=0}Object.defineProperty(u,"__esModule",{value:!0}),u.getDisposeArrayDisposable=u.disposeArray=u.toDisposable=u.MutableDisposable=u.Disposable=void 0,u.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const m=this._disposables.indexOf(d);m!==-1&&this._disposables.splice(m,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var m;this._isDisposed||d===this._value||((m=this._value)==null||m.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=f,u.getDisposeArrayDisposable=function(d){return{dispose:()=>f(d)}}},1505:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(m,h,p){this._data[m]||(this._data[m]={}),this._data[m][h]=p}get(m,h){return this._data[m]?this._data[m][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=f,u.FourKeyMap=class{constructor(){this._data=new f}set(d,m,h,p,y){this._data.get(d,m)||this._data.set(d,m,new f),this._data.get(d,m).set(h,p,y)}get(d,m,h,p){var y;return(y=this._data.get(d,m))==null?void 0:y.get(h,p)}clear(){this._data.clear()}}},6114:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isChromeOS=u.isLinux=u.isWindows=u.isIphone=u.isIpad=u.isMac=u.getSafariVersion=u.isSafari=u.isLegacyEdge=u.isFirefox=u.isNode=void 0,u.isNode=typeof process<"u"&&"title"in process;const f=u.isNode?"node":navigator.userAgent,d=u.isNode?"node":navigator.platform;u.isFirefox=f.includes("Firefox"),u.isLegacyEdge=f.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(f),u.getSafariVersion=function(){if(!u.isSafari)return 0;const m=f.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),u.isIpad=d==="iPad",u.isIphone=d==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),u.isLinux=d.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(f)},6106:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let f=0;u.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(f=this._search(this._getKey(d)),this._array.splice(f,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const m=this._getKey(d);if(m===void 0||(f=this._search(m),f===-1)||this._getKey(this._array[f])!==m)return!1;do if(this._array[f]===d)return this._array.splice(f,1),!0;while(++f<this._array.length&&this._getKey(this._array[f])===m);return!1}*getKeyIterator(d){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do yield this._array[f];while(++f<this._array.length&&this._getKey(this._array[f])===d)}forEachByKey(d,m){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do m(this._array[f]);while(++f<this._array.length&&this._getKey(this._array[f])===d)}values(){return[...this._array].values()}_search(d){let m=0,h=this._array.length-1;for(;h>=m;){let p=m+h>>1;const y=this._getKey(this._array[p]);if(y>d)h=p-1;else{if(!(y<d)){for(;p>0&&this._getKey(this._array[p-1])===d;)p--;return p}m=p+1}}return m}}},7226:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=f(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),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(y){this._idleCallback=void 0;let w=0,g=0,l=y.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),g=Math.max(w,g),c=y.timeRemaining(),1.5*g>c)return l-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-w))}ms`),void this._start();l=c}this.clear()}}class h extends m{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const w=Date.now()+y;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=f(643);u.updateWindowsModeWrappedState=function(m){const h=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),p=h==null?void 0:h.get(m.cols-1),y=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);y&&p&&(y.isWrapped=p[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&p[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class f{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new f;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}u.AttributeData=f;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,p=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=f(6349),m=f(7226),h=f(3734),p=f(8437),y=f(4634),w=f(511),g=f(643),l=f(4863),c=f(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(a,o,_){this._hasScrollback=a,this._optionsService=o,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=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(a){return a?(this._nullCell.fg=a.fg,this._nullCell.bg=a.bg,this._nullCell.extended=a.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(a){return a?(this._whitespaceCell.fg=a.fg,this._whitespaceCell.bg=a.bg,this._whitespaceCell.extended=a.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,o){return new p.BufferLine(this._bufferService.cols,this.getNullCell(a),o)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;const o=a+this._optionsService.rawOptions.scrollback;return o>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:o}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=p.DEFAULT_ATTR_DATA);let o=this._rows;for(;o--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,o){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let C=0;const b=this._getCorrectBufferLength(o);if(b>this.lines.maxLength&&(this.lines.maxLength=b),this.lines.length>0){if(this._cols<a)for(let v=0;v<this.lines.length;v++)C+=+this.lines.get(v).resize(a,_);let E=0;if(this._rows<o)for(let v=this._rows;v<o;v++)this.lines.length<o+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(a,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(a,_)));else for(let v=this._rows;v>o;v--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(b<this.lines.maxLength){const v=this.lines.length-b;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=b}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,o-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(a,o),this._cols>a))for(let E=0;E<this.lines.length;E++)C+=+this.lines.get(E).resize(a,_);this._cols=a,this._rows=o,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let o=0;for(;this._memoryCleanupPosition<this.lines.length;)if(o+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),o>100)return!0;return a}get _isReflowEnabled(){const a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&a.backend==="conpty"&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,o){this._cols!==a&&(a>this._cols?this._reflowLarger(a,o):this._reflowSmaller(a,o))}_reflowLarger(a,o){const _=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const C=(0,y.reflowLargerCreateNewLayout)(this.lines,_);(0,y.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(a,o,C.countRemoved)}}_reflowLargerAdjustViewport(a,o,_){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let b=_;for(;b-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new p.BufferLine(a,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,o){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),C=[];let b=0;for(let E=this.lines.length-1;E>=0;E--){let v=this.lines.get(E);if(!v||!v.isWrapped&&v.getTrimmedLength()<=a)continue;const A=[v];for(;v.isWrapped&&E>0;)v=this.lines.get(--E),A.unshift(v);const O=this.ybase+this.y;if(O>=E&&O<E+A.length)continue;const j=A[A.length-1].getTrimmedLength(),I=(0,y.reflowSmallerGetNewLineLengths)(A,this._cols,a),z=I.length-A.length;let Z;Z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+z):Math.max(0,this.lines.length-this.lines.maxLength+z);const re=[];for(let x=0;x<z;x++){const M=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);re.push(M)}re.length>0&&(C.push({start:E+A.length+b,newLines:re}),b+=re.length),A.push(...re);let q=I.length-1,J=I[q];J===0&&(q--,J=I[q]);let se=A.length-z-1,D=j;for(;se>=0;){const x=Math.min(D,J);if(A[q]===void 0)break;if(A[q].copyCellsFrom(A[se],D-x,J-x,x,!0),J-=x,J===0&&(q--,J=I[q]),D-=x,D===0){se--;const M=Math.max(se,0);D=(0,y.getWrappedLineTrimmedLength)(A,M,this._cols)}}for(let x=0;x<A.length;x++)I[x]<a&&A[x].setCell(I[x],_);let k=z-Z;for(;k-- >0;)this.ybase===0?this.y<o-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+b)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+z,this.ybase+o-1)}if(C.length>0){const E=[],v=[];for(let q=0;q<this.lines.length;q++)v.push(this.lines.get(q));const A=this.lines.length;let O=A-1,j=0,I=C[j];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let z=0;for(let q=Math.min(this.lines.maxLength-1,A+b-1);q>=0;q--)if(I&&I.start>O+z){for(let J=I.newLines.length-1;J>=0;J--)this.lines.set(q--,I.newLines[J]);q++,E.push({index:O+1,amount:I.newLines.length}),z+=I.newLines.length,I=C[++j]}else this.lines.set(q,v[O--]);let Z=0;for(let q=E.length-1;q>=0;q--)E[q].index+=Z,this.lines.onInsertEmitter.fire(E[q]),Z+=E[q].amount;const re=Math.max(0,A+b-this.lines.maxLength);re>0&&this.lines.onTrimEmitter.fire(re)}}translateBufferLineToString(a,o,_=0,C){const b=this.lines.get(a);return b?b.translateToString(o,_,C):""}getWrappedRangeForLine(a){let o=a,_=a;for(;o>0&&this.lines.get(o).isWrapped;)o--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:o,last:_}}setupTabStops(a){for(a!=null?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(a==null&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(a==null&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].line===a&&(this.markers[o].dispose(),this.markers.splice(o--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose(),this.markers.splice(a--,1);this._isClearing=!1}addMarker(a){const o=new l.Marker(a);return this.markers.push(o),o.register(this.lines.onTrim((_=>{o.line-=_,o.line<0&&o.dispose()}))),o.register(this.lines.onInsert((_=>{o.line>=_.index&&(o.line+=_.amount)}))),o.register(this.lines.onDelete((_=>{o.line>=_.index&&o.line<_.index+_.amount&&o.dispose(),o.line>_.index&&(o.line-=_.amount)}))),o.register(o.onDispose((()=>this._removeMarker(o)))),o}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=f(3734),m=f(511),h=f(643),p=f(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let y=0;class w{constructor(l,c,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const o=c||m.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<l;++_)this.setCell(_,o);this.length=l}get(l){const c=this._data[3*l+0],a=2097151&c;return[this._data[3*l+1],2097152&c?this._combined[l]:a?(0,p.stringFromCodePoint)(a):"",c>>22,2097152&c?this._combined[l].charCodeAt(this._combined[l].length-1):a]}set(l,c){this._data[3*l+1]=c[h.CHAR_DATA_ATTR_INDEX],c[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=c[1],this._data[3*l+0]=2097152|l|c[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(l){return this._data[3*l+0]>>22}hasWidth(l){return 12582912&this._data[3*l+0]}getFg(l){return this._data[3*l+1]}getBg(l){return this._data[3*l+2]}hasContent(l){return 4194303&this._data[3*l+0]}getCodePoint(l){const c=this._data[3*l+0];return 2097152&c?this._combined[l].charCodeAt(this._combined[l].length-1):2097151&c}isCombined(l){return 2097152&this._data[3*l+0]}getString(l){const c=this._data[3*l+0];return 2097152&c?this._combined[l]:2097151&c?(0,p.stringFromCodePoint)(2097151&c):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,c){return y=3*l,c.content=this._data[y+0],c.fg=this._data[y+1],c.bg=this._data[y+2],2097152&c.content&&(c.combinedData=this._combined[l]),268435456&c.bg&&(c.extended=this._extendedAttrs[l]),c}setCell(l,c){2097152&c.content&&(this._combined[l]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[l]=c.extended),this._data[3*l+0]=c.content,this._data[3*l+1]=c.fg,this._data[3*l+2]=c.bg}setCellFromCodepoint(l,c,a,o){268435456&o.bg&&(this._extendedAttrs[l]=o.extended),this._data[3*l+0]=c|a<<22,this._data[3*l+1]=o.fg,this._data[3*l+2]=o.bg}addCodepointToCell(l,c,a){let o=this._data[3*l+0];2097152&o?this._combined[l]+=(0,p.stringFromCodePoint)(c):2097151&o?(this._combined[l]=(0,p.stringFromCodePoint)(2097151&o)+(0,p.stringFromCodePoint)(c),o&=-2097152,o|=2097152):o=c|4194304,a&&(o&=-12582913,o|=a<<22),this._data[3*l+0]=o}insertCells(l,c,a){if((l%=this.length)&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,a),c<this.length-l){const o=new m.CellData;for(let _=this.length-l-c-1;_>=0;--_)this.setCell(l+c+_,this.loadCell(l+_,o));for(let _=0;_<c;++_)this.setCell(l+_,a)}else for(let o=l;o<this.length;++o)this.setCell(o,a);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,a)}deleteCells(l,c,a){if(l%=this.length,c<this.length-l){const o=new m.CellData;for(let _=0;_<this.length-l-c;++_)this.setCell(l+_,this.loadCell(l+c+_,o));for(let _=this.length-c;_<this.length;++_)this.setCell(_,a)}else for(let o=l;o<this.length;++o)this.setCell(o,a);l&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,a),this.getWidth(l)!==0||this.hasContent(l)||this.setCellFromCodepoint(l,0,1,a)}replaceCells(l,c,a,o=!1){if(o)for(l&&this.getWidth(l-1)===2&&!this.isProtected(l-1)&&this.setCellFromCodepoint(l-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,a);l<c&&l<this.length;)this.isProtected(l)||this.setCell(l,a),l++;else for(l&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,a);l<c&&l<this.length;)this.setCell(l++,a)}resize(l,c){if(l===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*l;if(l>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const o=new Uint32Array(a);o.set(this._data),this._data=o}for(let o=this.length;o<l;++o)this.setCell(o,c)}else{this._data=this._data.subarray(0,a);const o=Object.keys(this._combined);for(let C=0;C<o.length;C++){const b=parseInt(o[C],10);b>=l&&delete this._combined[b]}const _=Object.keys(this._extendedAttrs);for(let C=0;C<_.length;C++){const b=parseInt(_[C],10);b>=l&&delete this._extendedAttrs[b]}}return this.length=l,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const l=new Uint32Array(this._data.length);return l.set(this._data),this._data=l,1}return 0}fill(l,c=!1){if(c)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,l);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,l)}}copyFrom(l){this.length!==l.length?this._data=new Uint32Array(l._data):this._data.set(l._data),this.length=l.length,this._combined={};for(const c in l._combined)this._combined[c]=l._combined[c];this._extendedAttrs={};for(const c in l._extendedAttrs)this._extendedAttrs[c]=l._extendedAttrs[c];this.isWrapped=l.isWrapped}clone(){const l=new w(0);l._data=new Uint32Array(this._data),l.length=this.length;for(const c in this._combined)l._combined[c]=this._combined[c];for(const c in this._extendedAttrs)l._extendedAttrs[c]=this._extendedAttrs[c];return l.isWrapped=this.isWrapped,l}getTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0])return l+(this._data[3*l+0]>>22);return 0}getNoBgTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0]||50331648&this._data[3*l+2])return l+(this._data[3*l+0]>>22);return 0}copyCellsFrom(l,c,a,o,_){const C=l._data;if(_)for(let E=o-1;E>=0;E--){for(let v=0;v<3;v++)this._data[3*(a+E)+v]=C[3*(c+E)+v];268435456&C[3*(c+E)+2]&&(this._extendedAttrs[a+E]=l._extendedAttrs[c+E])}else for(let E=0;E<o;E++){for(let v=0;v<3;v++)this._data[3*(a+E)+v]=C[3*(c+E)+v];268435456&C[3*(c+E)+2]&&(this._extendedAttrs[a+E]=l._extendedAttrs[c+E])}const b=Object.keys(l._combined);for(let E=0;E<b.length;E++){const v=parseInt(b[E],10);v>=c&&(this._combined[v-c+a]=l._combined[v])}}translateToString(l,c,a,o){c=c??0,a=a??this.length,l&&(a=Math.min(a,this.getTrimmedLength())),o&&(o.length=0);let _="";for(;c<a;){const C=this._data[3*c+0],b=2097151&C,E=2097152&C?this._combined[c]:b?(0,p.stringFromCodePoint)(b):h.WHITESPACE_CELL_CHAR;if(_+=E,o)for(let v=0;v<E.length;++v)o.push(c);c+=C>>22||1}return o&&o.push(c),_}}u.BufferLine=w},4841:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(f,d){if(f.start.y>f.end.y)throw new Error(`Buffer range end (${f.end.x}, ${f.end.y}) cannot be before start (${f.start.x}, ${f.start.y})`);return d*(f.end.y-f.start.y)+(f.end.x-f.start.x+1)}},4634:(K,u)=>{function f(d,m,h){if(m===d.length-1)return d[m].getTrimmedLength();const p=!d[m].hasContent(h-1)&&d[m].getWidth(h-1)===1,y=d[m+1].getWidth(0)===2;return p&&y?h-1:h}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(d,m,h,p,y){const w=[];for(let g=0;g<d.length-1;g++){let l=g,c=d.get(++l);if(!c.isWrapped)continue;const a=[d.get(g)];for(;l<d.length&&c.isWrapped;)a.push(c),c=d.get(++l);if(p>=g&&p<l){g+=a.length-1;continue}let o=0,_=f(a,o,m),C=1,b=0;for(;C<a.length;){const v=f(a,C,m),A=v-b,O=h-_,j=Math.min(A,O);a[o].copyCellsFrom(a[C],b,_,j,!1),_+=j,_===h&&(o++,_=0),b+=j,b===v&&(C++,b=0),_===0&&o!==0&&a[o-1].getWidth(h-1)===2&&(a[o].copyCellsFrom(a[o-1],h-1,_++,1,!1),a[o-1].setCell(h-1,y))}a[o].replaceCells(_,h,y);let E=0;for(let v=a.length-1;v>0&&(v>o||a[v].getTrimmedLength()===0);v--)E++;E>0&&(w.push(g+a.length-E),w.push(E)),g+=a.length-1}return w},u.reflowLargerCreateNewLayout=function(d,m){const h=[];let p=0,y=m[p],w=0;for(let g=0;g<d.length;g++)if(y===g){const l=m[++p];d.onDeleteEmitter.fire({index:g-w,amount:l}),g+=l-1,w+=l,y=m[++p]}else h.push(g);return{layout:h,countRemoved:w}},u.reflowLargerApplyNewLayout=function(d,m){const h=[];for(let p=0;p<m.length;p++)h.push(d.get(m[p]));for(let p=0;p<h.length;p++)d.set(p,h[p]);d.length=m.length},u.reflowSmallerGetNewLineLengths=function(d,m,h){const p=[],y=d.map(((c,a)=>f(d,a,m))).reduce(((c,a)=>c+a));let w=0,g=0,l=0;for(;l<y;){if(y-l<h){p.push(y-l);break}w+=h;const c=f(d,g,m);w>c&&(w-=c,g++);const a=d[g].getWidth(w-1)===2;a&&w--;const o=a?h-1:h;p.push(o),l+=o}return p},u.getWrappedLineTrimmedLength=f},5295:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=f(8460),m=f(844),h=f(9092);class p extends m.Disposable{constructor(w,g){super(),this._optionsService=w,this._bufferService=g,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(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,g){this._normal.resize(w,g),this._alt.resize(w,g),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}u.BufferSet=p},511:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=f(482),m=f(643),h=f(3734);class p extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const g=new p;return g.setFromCharData(w),g}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let g=!1;if(w[m.CHAR_DATA_CHAR_INDEX].length>2)g=!0;else if(w[m.CHAR_DATA_CHAR_INDEX].length===2){const l=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const c=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(l-55296)+c-56320+65536|w[m.CHAR_DATA_WIDTH_INDEX]<<22:g=!0}else g=!0}else this.content=w[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[m.CHAR_DATA_WIDTH_INDEX]<<22;g&&(this.combinedData=w[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=p},643:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WHITESPACE_CELL_CODE=u.WHITESPACE_CELL_WIDTH=u.WHITESPACE_CELL_CHAR=u.NULL_CELL_CODE=u.NULL_CELL_WIDTH=u.NULL_CELL_CHAR=u.CHAR_DATA_CODE_INDEX=u.CHAR_DATA_WIDTH_INDEX=u.CHAR_DATA_CHAR_INDEX=u.CHAR_DATA_ATTR_INDEX=u.DEFAULT_EXT=u.DEFAULT_ATTR=u.DEFAULT_COLOR=void 0,u.DEFAULT_COLOR=0,u.DEFAULT_ATTR=256|u.DEFAULT_COLOR<<9,u.DEFAULT_EXT=0,u.CHAR_DATA_ATTR_INDEX=0,u.CHAR_DATA_CHAR_INDEX=1,u.CHAR_DATA_WIDTH_INDEX=2,u.CHAR_DATA_CODE_INDEX=3,u.NULL_CELL_CHAR="",u.NULL_CELL_WIDTH=1,u.NULL_CELL_CODE=0,u.WHITESPACE_CELL_CHAR=" ",u.WHITESPACE_CELL_WIDTH=1,u.WHITESPACE_CELL_CODE=32},4863:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=f(8460),m=f(844);class h{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}u.Marker=h,h._nextId=1},7116:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_CHARSET=u.CHARSETS=void 0,u.CHARSETS={},u.DEFAULT_CHARSET=u.CHARSETS.B,u.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},u.CHARSETS.A={"#":"£"},u.CHARSETS.B=void 0,u.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},u.CHARSETS.C=u.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},u.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},u.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},u.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},u.CHARSETS.E=u.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},u.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},u.CHARSETS.H=u.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(K,u)=>{var f,d,m;Object.defineProperty(u,"__esModule",{value:!0}),u.C1_ESCAPED=u.C1=u.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
56
+ `,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(f||(u.C0=f={})),(function(h){h.PAD="€",h.HOP="",h.BPH="‚",h.NBH="ƒ",h.IND="„",h.NEL="…",h.SSA="†",h.ESA="‡",h.HTS="ˆ",h.HTJ="‰",h.VTS="Š",h.PLD="‹",h.PLU="Œ",h.RI="",h.SS2="Ž",h.SS3="",h.DCS="",h.PU1="‘",h.PU2="’",h.STS="“",h.CCH="”",h.MW="•",h.SPA="–",h.EPA="—",h.SOS="˜",h.SGCI="™",h.SCI="š",h.CSI="›",h.ST="œ",h.OSC="",h.PM="ž",h.APC="Ÿ"})(d||(u.C1=d={})),(function(h){h.ST=`${f.ESC}\\`})(m||(u.C1_ESCAPED=m={}))},7399:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=f(2584),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};u.evaluateKeyboardEvent=function(h,p,y,w){const g={type:0,cancel:!1,key:void 0},l=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?g.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?g.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?g.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(g.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:g.key=h.ctrlKey?"\b":d.C0.DEL,h.altKey&&(g.key=d.C0.ESC+g.key);break;case 9:if(h.shiftKey){g.key=d.C0.ESC+"[Z";break}g.key=d.C0.HT,g.cancel=!0;break;case 13:g.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,g.cancel=!0;break;case 27:g.key=d.C0.ESC,h.altKey&&(g.key=d.C0.ESC+d.C0.ESC),g.cancel=!0;break;case 37:if(h.metaKey)break;l?(g.key=d.C0.ESC+"[1;"+(l+1)+"D",g.key===d.C0.ESC+"[1;3D"&&(g.key=d.C0.ESC+(y?"b":"[1;5D"))):g.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;l?(g.key=d.C0.ESC+"[1;"+(l+1)+"C",g.key===d.C0.ESC+"[1;3C"&&(g.key=d.C0.ESC+(y?"f":"[1;5C"))):g.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;l?(g.key=d.C0.ESC+"[1;"+(l+1)+"A",y||g.key!==d.C0.ESC+"[1;3A"||(g.key=d.C0.ESC+"[1;5A")):g.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;l?(g.key=d.C0.ESC+"[1;"+(l+1)+"B",y||g.key!==d.C0.ESC+"[1;3B"||(g.key=d.C0.ESC+"[1;5B")):g.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(g.key=d.C0.ESC+"[2~");break;case 46:g.key=l?d.C0.ESC+"[3;"+(l+1)+"~":d.C0.ESC+"[3~";break;case 36:g.key=l?d.C0.ESC+"[1;"+(l+1)+"H":p?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:g.key=l?d.C0.ESC+"[1;"+(l+1)+"F":p?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?g.type=2:h.ctrlKey?g.key=d.C0.ESC+"[5;"+(l+1)+"~":g.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?g.type=3:h.ctrlKey?g.key=d.C0.ESC+"[6;"+(l+1)+"~":g.key=d.C0.ESC+"[6~";break;case 112:g.key=l?d.C0.ESC+"[1;"+(l+1)+"P":d.C0.ESC+"OP";break;case 113:g.key=l?d.C0.ESC+"[1;"+(l+1)+"Q":d.C0.ESC+"OQ";break;case 114:g.key=l?d.C0.ESC+"[1;"+(l+1)+"R":d.C0.ESC+"OR";break;case 115:g.key=l?d.C0.ESC+"[1;"+(l+1)+"S":d.C0.ESC+"OS";break;case 116:g.key=l?d.C0.ESC+"[15;"+(l+1)+"~":d.C0.ESC+"[15~";break;case 117:g.key=l?d.C0.ESC+"[17;"+(l+1)+"~":d.C0.ESC+"[17~";break;case 118:g.key=l?d.C0.ESC+"[18;"+(l+1)+"~":d.C0.ESC+"[18~";break;case 119:g.key=l?d.C0.ESC+"[19;"+(l+1)+"~":d.C0.ESC+"[19~";break;case 120:g.key=l?d.C0.ESC+"[20;"+(l+1)+"~":d.C0.ESC+"[20~";break;case 121:g.key=l?d.C0.ESC+"[21;"+(l+1)+"~":d.C0.ESC+"[21~";break;case 122:g.key=l?d.C0.ESC+"[23;"+(l+1)+"~":d.C0.ESC+"[23~";break;case 123:g.key=l?d.C0.ESC+"[24;"+(l+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(y&&!w||!h.altKey||h.metaKey)!y||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?g.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(g.key=d.C0.US),h.key==="@"&&(g.key=d.C0.NUL)):h.keyCode===65&&(g.type=1);else{const c=m[h.keyCode],a=c==null?void 0:c[h.shiftKey?1:0];if(a)g.key=d.C0.ESC+a;else if(h.keyCode>=65&&h.keyCode<=90){const o=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(o);h.shiftKey&&(_=_.toUpperCase()),g.key=d.C0.ESC+_}else if(h.keyCode===32)g.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let o=h.code.slice(3,4);h.shiftKey||(o=o.toLowerCase()),g.key=d.C0.ESC+o,g.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?g.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?g.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?g.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?g.key=d.C0.DEL:h.keyCode===219?g.key=d.C0.ESC:h.keyCode===220?g.key=d.C0.FS:h.keyCode===221&&(g.key=d.C0.GS)}return g}},482:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},u.utf32ToString=function(f,d=0,m=f.length){let h="";for(let p=d;p<m;++p){let y=f[p];y>65535?(y-=65536,h+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):h+=String.fromCharCode(y)}return h},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(f,d){const m=f.length;if(!m)return 0;let h=0,p=0;if(this._interim){const y=f.charCodeAt(p++);56320<=y&&y<=57343?d[h++]=1024*(this._interim-55296)+y-56320+65536:(d[h++]=this._interim,d[h++]=y),this._interim=0}for(let y=p;y<m;++y){const w=f.charCodeAt(y);if(55296<=w&&w<=56319){if(++y>=m)return this._interim=w,h;const g=f.charCodeAt(y);56320<=g&&g<=57343?d[h++]=1024*(w-55296)+g-56320+65536:(d[h++]=w,d[h++]=g)}else w!==65279&&(d[h++]=w)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,d){const m=f.length;if(!m)return 0;let h,p,y,w,g=0,l=0,c=0;if(this.interim[0]){let _=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let b,E=0;for(;(b=63&this.interim[++E])&&E<4;)C<<=6,C|=b;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,A=v-E;for(;c<A;){if(c>=m)return 0;if(b=f[c++],(192&b)!=128){c--,_=!0;break}this.interim[E++]=b,C<<=6,C|=63&b}_||(v===2?C<128?c--:d[g++]=C:v===3?C<2048||C>=55296&&C<=57343||C===65279||(d[g++]=C):C<65536||C>1114111||(d[g++]=C)),this.interim.fill(0)}const a=m-4;let o=c;for(;o<m;){for(;!(!(o<a)||128&(h=f[o])||128&(p=f[o+1])||128&(y=f[o+2])||128&(w=f[o+3]));)d[g++]=h,d[g++]=p,d[g++]=y,d[g++]=w,o+=4;if(h=f[o++],h<128)d[g++]=h;else if((224&h)==192){if(o>=m)return this.interim[0]=h,g;if(p=f[o++],(192&p)!=128){o--;continue}if(l=(31&h)<<6|63&p,l<128){o--;continue}d[g++]=l}else if((240&h)==224){if(o>=m)return this.interim[0]=h,g;if(p=f[o++],(192&p)!=128){o--;continue}if(o>=m)return this.interim[0]=h,this.interim[1]=p,g;if(y=f[o++],(192&y)!=128){o--;continue}if(l=(15&h)<<12|(63&p)<<6|63&y,l<2048||l>=55296&&l<=57343||l===65279)continue;d[g++]=l}else if((248&h)==240){if(o>=m)return this.interim[0]=h,g;if(p=f[o++],(192&p)!=128){o--;continue}if(o>=m)return this.interim[0]=h,this.interim[1]=p,g;if(y=f[o++],(192&y)!=128){o--;continue}if(o>=m)return this.interim[0]=h,this.interim[1]=p,this.interim[2]=y,g;if(w=f[o++],(192&w)!=128){o--;continue}if(l=(7&h)<<18|(63&p)<<12|(63&y)<<6|63&w,l<65536||l>1114111)continue;d[g++]=l}}return g}}},225:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const d=f(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;u.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 y=0;y<m.length;++y)p.fill(0,m[y][0],m[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?p[y]:(function(w,g){let l,c=0,a=g.length-1;if(w<g[0][0]||w>g[a][1])return!1;for(;a>=c;)if(l=c+a>>1,w>g[l][1])c=l+1;else{if(!(w<g[l][0]))return!0;a=l-1}return!1})(y,h)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,w){let g=this.wcwidth(y),l=g===0&&w!==0;if(l){const c=d.UnicodeService.extractWidth(w);c===0?l=!1:c>g&&(g=c)}return d.UnicodeService.createPropertyValue(0,g,l)}}},5981:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=f(8460),m=f(844);class h extends m.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,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+=y.length,this._writeBuffer.push(y),this._callbacks.push(w),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(w)}_innerWrite(y=0,w=!0){const g=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],c=this._action(l,w);if(c){const o=_=>Date.now()-g>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(g,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(o)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=l.length,Date.now()-g>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}u.WriteBuffer=h},5941:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const f=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function m(h,p){const y=h.toString(16),w=y.length<2?"0"+y:y;switch(p){case 4:return y[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}u.parseColor=function(h){if(!h)return;let p=h.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const y=f.exec(p);if(y){const w=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/w*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/w*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/w*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),d.exec(p)&&[3,6,9,12].includes(p.length))){const y=p.length/3,w=[0,0,0];for(let g=0;g<3;++g){const l=parseInt(p.slice(y*g,y*g+y),16);w[g]=y===1?l<<4:y===2?l:y===3?l>>4:l>>8}return w}},u.toRgbString=function(h,p=16){const[y,w,g]=h;return`rgb:${m(y,p)}/${m(w,p)}/${m(g,p)}`}},5770:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=f(482),m=f(8742),h=f(5770),p=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(w,g){this._handlers[w]===void 0&&(this._handlers[w]=[]);const l=this._handlers[w];return l.push(g),{dispose:()=>{const c=l.indexOf(g);c!==-1&&l.splice(c,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,g){if(this.reset(),this._ident=w,this._active=this._handlers[w]||p,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(g);else this._handlerFb(this._ident,"HOOK",g)}put(w,g,l){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(w,g,l);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(w,g,l))}unhook(w,g=!0){if(this._active.length){let l=!1,c=this._active.length-1,a=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,l=g,a=this._stack.fallThrough,this._stack.paused=!1),!a&&l===!1){for(;c>=0&&(l=this._active[c].unhook(w),l!==!0);c--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,l;c--}for(;c>=0;c--)if(l=this._active[c].unhook(!1),l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,l}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const y=new m.Params;y.addParam(0),u.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=y,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():y,this._data="",this._hitLimit=!1}put(w,g,l){this._hitLimit||(this._data+=(0,d.utf32ToString)(w,g,l),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let g=!1;if(this._hitLimit)g=!1;else if(w&&(g=this._handler(this._data,this._params),g instanceof Promise))return g.then((l=>(this._params=y,this._data="",this._hitLimit=!1,l)));return this._params=y,this._data="",this._hitLimit=!1,g}}},2015:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=f(844),m=f(8742),h=f(6242),p=f(6351);class y{constructor(c){this.table=new Uint8Array(c)}setDefault(c,a){this.table.fill(c<<4|a)}add(c,a,o,_){this.table[a<<8|c]=o<<4|_}addMany(c,a,o,_){for(let C=0;C<c.length;C++)this.table[a<<8|c[C]]=o<<4|_}}u.TransitionTable=y;const w=160;u.VT500_TRANSITION_TABLE=(function(){const l=new y(4095),c=Array.apply(null,Array(256)).map(((E,v)=>v)),a=(E,v)=>c.slice(E,v),o=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const C=a(0,14);let b;for(b in l.setDefault(1,0),l.addMany(o,0,2,0),C)l.addMany([24,26,153,154],b,3,0),l.addMany(a(128,144),b,3,0),l.addMany(a(144,152),b,3,0),l.add(156,b,0,0),l.add(27,b,11,1),l.add(157,b,4,8),l.addMany([152,158,159],b,0,7),l.add(155,b,11,3),l.add(144,b,11,9);return l.addMany(_,0,3,0),l.addMany(_,1,3,1),l.add(127,1,0,1),l.addMany(_,8,0,8),l.addMany(_,3,3,3),l.add(127,3,0,3),l.addMany(_,4,3,4),l.add(127,4,0,4),l.addMany(_,6,3,6),l.addMany(_,5,3,5),l.add(127,5,0,5),l.addMany(_,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(o,8,5,8),l.add(127,8,5,8),l.addMany([156,27,24,26,7],8,6,0),l.addMany(a(28,32),8,0,8),l.addMany([88,94,95],1,0,7),l.addMany(o,7,0,7),l.addMany(_,7,0,7),l.add(156,7,0,0),l.add(127,7,0,7),l.add(91,1,11,3),l.addMany(a(64,127),3,7,0),l.addMany(a(48,60),3,8,4),l.addMany([60,61,62,63],3,9,4),l.addMany(a(48,60),4,8,4),l.addMany(a(64,127),4,7,0),l.addMany([60,61,62,63],4,0,6),l.addMany(a(32,64),6,0,6),l.add(127,6,0,6),l.addMany(a(64,127),6,0,0),l.addMany(a(32,48),3,9,5),l.addMany(a(32,48),5,9,5),l.addMany(a(48,64),5,0,6),l.addMany(a(64,127),5,7,0),l.addMany(a(32,48),4,9,5),l.addMany(a(32,48),1,9,2),l.addMany(a(32,48),2,9,2),l.addMany(a(48,127),2,10,0),l.addMany(a(48,80),1,10,0),l.addMany(a(81,88),1,10,0),l.addMany([89,90,92],1,10,0),l.addMany(a(96,127),1,10,0),l.add(80,1,11,9),l.addMany(_,9,0,9),l.add(127,9,0,9),l.addMany(a(28,32),9,0,9),l.addMany(a(32,48),9,9,12),l.addMany(a(48,60),9,8,10),l.addMany([60,61,62,63],9,9,10),l.addMany(_,11,0,11),l.addMany(a(32,128),11,0,11),l.addMany(a(28,32),11,0,11),l.addMany(_,10,0,10),l.add(127,10,0,10),l.addMany(a(28,32),10,0,10),l.addMany(a(48,60),10,8,10),l.addMany([60,61,62,63],10,0,11),l.addMany(a(32,48),10,9,12),l.addMany(_,12,0,12),l.add(127,12,0,12),l.addMany(a(28,32),12,0,12),l.addMany(a(32,48),12,9,12),l.addMany(a(48,64),12,0,11),l.addMany(a(64,127),12,12,13),l.addMany(a(64,127),10,12,13),l.addMany(a(64,127),9,12,13),l.addMany(_,13,13,13),l.addMany(o,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(w,0,2,0),l.add(w,8,5,8),l.add(w,6,0,6),l.add(w,11,0,11),l.add(w,13,13,13),l})();class g extends d.Disposable{constructor(c=u.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(a,o,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,o)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,a=[64,126]){let o=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(o=c.prefix.charCodeAt(0),o&&60>o||o>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<c.intermediates.length;++C){const b=c.intermediates.charCodeAt(C);if(32>b||b>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");o<<=8,o|=b}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(a[0]>_||_>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return o<<=8,o|=_,o}identToString(c){const a=[];for(;c;)a.push(String.fromCharCode(255&c)),c>>=8;return a.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,a){const o=this._identifier(c,[48,126]);this._escHandlers[o]===void 0&&(this._escHandlers[o]=[]);const _=this._escHandlers[o];return _.push(a),{dispose:()=>{const C=_.indexOf(a);C!==-1&&_.splice(C,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,a){this._executeHandlers[c.charCodeAt(0)]=a}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,a){const o=this._identifier(c);this._csiHandlers[o]===void 0&&(this._csiHandlers[o]=[]);const _=this._csiHandlers[o];return _.push(a),{dispose:()=>{const C=_.indexOf(a);C!==-1&&_.splice(C,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,a){return this._dcsParser.registerHandler(this._identifier(c),a)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,a){return this._oscParser.registerHandler(c,a)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(c,a,o,_,C){this._parseStack.state=c,this._parseStack.handlers=a,this._parseStack.handlerPos=o,this._parseStack.transition=_,this._parseStack.chunkPos=C}parse(c,a,o){let _,C=0,b=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=this._parseStack.chunkPos+1;else{if(o===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const v=this._parseStack.handlers;let A=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(o===!1&&A>-1){for(;A>=0&&(_=v[A](this._params),_!==!0);A--)if(_ instanceof Promise)return this._parseStack.handlerPos=A,_}this._parseStack.handlers=[];break;case 4:if(o===!1&&A>-1){for(;A>=0&&(_=v[A](),_!==!0);A--)if(_ instanceof Promise)return this._parseStack.handlerPos=A,_}this._parseStack.handlers=[];break;case 6:if(C=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(C!==24&&C!==26,o),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=c[this._parseStack.chunkPos],_=this._oscParser.end(C!==24&&C!==26,o),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,E=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let v=E;v<a;++v){switch(C=c[v],b=this._transitions.table[this.currentState<<8|(C<160?C:w)],b>>4){case 2:for(let z=v+1;;++z){if(z>=a||(C=c[z])<32||C>126&&C<w){this._printHandler(c,v,z),v=z-1;break}if(++z>=a||(C=c[z])<32||C>126&&C<w){this._printHandler(c,v,z),v=z-1;break}if(++z>=a||(C=c[z])<32||C>126&&C<w){this._printHandler(c,v,z),v=z-1;break}if(++z>=a||(C=c[z])<32||C>126&&C<w){this._printHandler(c,v,z),v=z-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:v,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const A=this._csiHandlers[this._collect<<8|C];let O=A?A.length-1:-1;for(;O>=0&&(_=A[O](this._params),_!==!0);O--)if(_ instanceof Promise)return this._preserveStack(3,A,O,b,v),_;O<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(++v<a&&(C=c[v])>47&&C<60);v--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const j=this._escHandlers[this._collect<<8|C];let I=j?j.length-1:-1;for(;I>=0&&(_=j[I](),_!==!0);I--)if(_ instanceof Promise)return this._preserveStack(4,j,I,b,v),_;I<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 z=v+1;;++z)if(z>=a||(C=c[z])===24||C===26||C===27||C>127&&C<w){this._dcsParser.put(c,v,z),v=z-1;break}break;case 14:if(_=this._dcsParser.unhook(C!==24&&C!==26),_)return this._preserveStack(6,[],0,b,v),_;C===27&&(b|=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 z=v+1;;z++)if(z>=a||(C=c[z])<32||C>127&&C<w){this._oscParser.put(c,v,z),v=z-1;break}break;case 6:if(_=this._oscParser.end(C!==24&&C!==26),_)return this._preserveStack(5,[],0,b,v),_;C===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&b}}}u.EscapeSequenceParser=g},6242:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=f(5770),m=f(482),h=[];u.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,y){this._handlers[p]===void 0&&(this._handlers[p]=[]);const w=this._handlers[p];return w.push(y),{dispose:()=>{const g=w.indexOf(y);g!==-1&&w.splice(g,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,y,w){if(this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].put(p,y,w);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(p,y,w))}start(){this.reset(),this._state=1}put(p,y,w){if(this._state!==3){if(this._state===1)for(;y<w;){const g=p[y++];if(g===59){this._state=2,this._start();break}if(g<48||57<g)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+g-48}this._state===2&&w-y>0&&this._put(p,y,w)}}end(p,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,g=this._active.length-1,l=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,w=y,l=this._stack.fallThrough,this._stack.paused=!1),!l&&w===!1){for(;g>=0&&(w=this._active[g].end(p),w!==!0);g--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,w;g--}for(;g>=0;g--)if(w=this._active[g].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",p);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,y,w){this._hitLimit||(this._data+=(0,m.utf32ToString)(p,y,w),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let y=!1;if(this._hitLimit)y=!1;else if(p&&(y=this._handler(this._data),y instanceof Promise))return y.then((w=>(this._data="",this._hitLimit=!1,w)));return this._data="",this._hitLimit=!1,y}}},8742:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const f=2147483647;class d{static fromArray(h){const p=new d;if(!h.length)return p;for(let y=Array.isArray(h[0])?1:0;y<h.length;++y){const w=h[y];if(Array.isArray(w))for(let g=0;g<w.length;++g)p.addSubParam(w[g]);else p.addParam(w)}return p}constructor(h=32,p=32){if(this.maxLength=h,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let p=0;p<this.length;++p){h.push(this.params[p]);const y=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-y>0&&h.push(Array.prototype.slice.call(this._subParams,y,w))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>f?f:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>f?f:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const p=this._subParamsIdx[h]>>8,y=255&this._subParamsIdx[h];return y-p>0?this._subParams.subarray(p,y):null}getSubParamsAll(){const h={};for(let p=0;p<this.length;++p){const y=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-y>0&&(h[p]=this._subParams.slice(y,w))}return h}addDigit(h){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,w=y[p-1];y[p-1]=~w?Math.min(10*w+h,f):h}}u.Params=d},5741:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let f=this._addons.length-1;f>=0;f--)this._addons[f].instance.dispose()}loadAddon(f,d){const m={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(m),d.dispose=()=>this._wrappedAddonDispose(m),d.activate(f)}_wrappedAddonDispose(f){if(f.isDisposed)return;let d=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===f){d=m;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");f.isDisposed=!0,f.dispose.apply(f.instance),this._addons.splice(d,1)}}},8771:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=f(3785),m=f(511);u.BufferApiView=class{constructor(h,p){this._buffer=h,this.type=p}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const p=this._buffer.lines.get(h);if(p)return new d.BufferLineApiView(p)}getNullCell(){return new m.CellData}}},3785:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=f(511);u.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,h){if(!(m<0||m>=this._line.length))return h?(this._line.loadCell(m,h),h):this._line.loadCell(m,new d.CellData)}translateToString(m,h,p){return this._line.translateToString(m,h,p)}}},8285:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=f(8771),m=f(8460),h=f(844);class p extends h.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}u.BufferNamespaceApi=p},7975:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(f){this._core=f}registerCsiHandler(f,d){return this._core.registerCsiHandler(f,(m=>d(m.toArray())))}addCsiHandler(f,d){return this.registerCsiHandler(f,d)}registerDcsHandler(f,d){return this._core.registerDcsHandler(f,((m,h)=>d(m,h.toArray())))}addDcsHandler(f,d){return this.registerDcsHandler(f,d)}registerEscHandler(f,d){return this._core.registerEscHandler(f,d)}addEscHandler(f,d){return this.registerEscHandler(f,d)}registerOscHandler(f,d){return this._core.registerOscHandler(f,d)}addOscHandler(f,d){return this.registerOscHandler(f,d)}}},7090:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(f){this._core=f}register(f){this._core.unicodeService.register(f)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(f){this._core.unicodeService.activeVersion=f}}},744:function(K,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,C=arguments.length,b=C<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var E=l.length-1;E>=0;E--)(_=l[E])&&(b=(C<3?_(b):C>3?_(c,a,b):_(c,a))||b);return C>3&&b&&Object.defineProperty(c,a,b),b},m=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=f(8460),p=f(844),y=f(5295),w=f(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let g=u.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(l){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(l.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(l,this))}resize(l,c){this.cols=l,this.rows=c,this.buffers.resize(l,c),this._onResize.fire({cols:l,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(l,c=!1){const a=this.buffer;let o;o=this._cachedBlankLine,o&&o.length===this.cols&&o.getFg(0)===l.fg&&o.getBg(0)===l.bg||(o=a.getBlankLine(l,c),this._cachedBlankLine=o),o.isWrapped=c;const _=a.ybase+a.scrollTop,C=a.ybase+a.scrollBottom;if(a.scrollTop===0){const b=a.lines.isFull;C===a.lines.length-1?b?a.lines.recycle().copyFrom(o):a.lines.push(o.clone()):a.lines.splice(C+1,0,o.clone()),b?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const b=C-_+1;a.lines.shiftElements(_+1,b-1,-1),a.lines.set(C,o.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(l,c,a){const o=this.buffer;if(l<0){if(o.ydisp===0)return;this.isUserScrolling=!0}else l+o.ydisp>=o.ybase&&(this.isUserScrolling=!1);const _=o.ydisp;o.ydisp=Math.max(Math.min(o.ydisp+l,o.ybase),0),_!==o.ydisp&&(c||this._onScroll.fire(o.ydisp))}};u.BufferService=g=d([m(0,w.IOptionsService)],g)},7994:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CharsetService=void 0,u.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(f){this.glevel=f,this.charset=this._charsets[f]}setgCharset(f,d){this._charsets[f]=d,this.glevel===f&&(this.charset=d)}}},1753:function(K,u,f){var d=this&&this.__decorate||function(o,_,C,b){var E,v=arguments.length,A=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,C):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(o,_,C,b);else for(var O=o.length-1;O>=0;O--)(E=o[O])&&(A=(v<3?E(A):v>3?E(_,C,A):E(_,C))||A);return v>3&&A&&Object.defineProperty(_,C,A),A},m=this&&this.__param||function(o,_){return function(C,b){_(C,b,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=f(2585),p=f(8460),y=f(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:o=>o.button!==4&&o.action===1&&(o.ctrl=!1,o.alt=!1,o.shift=!1,!0)},VT200:{events:19,restrict:o=>o.action!==32},DRAG:{events:23,restrict:o=>o.action!==32||o.button!==3},ANY:{events:31,restrict:o=>!0}};function g(o,_){let C=(o.ctrl?16:0)|(o.shift?4:0)|(o.alt?8:0);return o.button===4?(C|=64,C|=o.action):(C|=3&o.button,4&o.button&&(C|=64),8&o.button&&(C|=128),o.action===32?C|=32:o.action!==0||_||(C|=3)),C}const l=String.fromCharCode,c={DEFAULT:o=>{const _=[g(o,!1)+32,o.col+32,o.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${l(_[0])}${l(_[1])}${l(_[2])}`},SGR:o=>{const _=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${g(o,!0)};${o.col};${o.row}${_}`},SGR_PIXELS:o=>{const _=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${g(o,!0)};${o.x};${o.y}${_}`}};let a=u.CoreMouseService=class extends y.Disposable{constructor(o,_){super(),this._bufferService=o,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(c))this.addEncoding(C,c[C]);this.reset()}addProtocol(o,_){this._protocols[o]=_}addEncoding(o,_){this._encodings[o]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(o){if(!this._protocols[o])throw new Error(`unknown protocol "${o}"`);this._activeProtocol=o,this._onProtocolChange.fire(this._protocols[o].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(o){if(!this._encodings[o])throw new Error(`unknown encoding "${o}"`);this._activeEncoding=o}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(o){if(o.col<0||o.col>=this._bufferService.cols||o.row<0||o.row>=this._bufferService.rows||o.button===4&&o.action===32||o.button===3&&o.action!==32||o.button!==4&&(o.action===2||o.action===3)||(o.col++,o.row++,o.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,o,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(o))return!1;const _=this._encodings[this._activeEncoding](o);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=o,!0}explainEvents(o){return{down:!!(1&o),up:!!(2&o),drag:!!(4&o),move:!!(8&o),wheel:!!(16&o)}}_equalEvents(o,_,C){if(C){if(o.x!==_.x||o.y!==_.y)return!1}else if(o.col!==_.col||o.row!==_.row)return!1;return o.button===_.button&&o.action===_.action&&o.ctrl===_.ctrl&&o.alt===_.alt&&o.shift===_.shift}};u.CoreMouseService=a=d([m(0,h.IBufferService),m(1,h.ICoreService)],a)},6975:function(K,u,f){var d=this&&this.__decorate||function(a,o,_,C){var b,E=arguments.length,v=E<3?o:C===null?C=Object.getOwnPropertyDescriptor(o,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,o,_,C);else for(var A=a.length-1;A>=0;A--)(b=a[A])&&(v=(E<3?b(v):E>3?b(o,_,v):b(o,_))||v);return E>3&&v&&Object.defineProperty(o,_,v),v},m=this&&this.__param||function(a,o){return function(_,C){o(_,C,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=f(1439),p=f(8460),y=f(844),w=f(2585),g=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends y.Disposable{constructor(a,o,_){super(),this._bufferService=a,this._logService=o,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(g),this.decPrivateModes=(0,h.clone)(l)}reset(){this.modes=(0,h.clone)(g),this.decPrivateModes=(0,h.clone)(l)}triggerDataEvent(a,o=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;o&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),o&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((o=>o.charCodeAt(0))))),this._onBinary.fire(a))}};u.CoreService=c=d([m(0,w.IBufferService),m(1,w.ILogService),m(2,w.IOptionsService)],c)},9074:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=f(8055),m=f(8460),h=f(844),p=f(6106);let y=0,w=0;class g extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((a=>a==null?void 0:a.marker.line)),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const o=new l(a);if(o){const _=o.marker.onDispose((()=>o.dispose()));o.onDispose((()=>{o&&(this._decorations.delete(o)&&this._onDecorationRemoved.fire(o),_.dispose())})),this._decorations.insert(o),this._onDecorationRegistered.fire(o)}return o}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,o,_){let C=0,b=0;for(const E of this._decorations.getKeyIterator(o))C=E.options.x??0,b=C+(E.options.width??1),a>=C&&a<b&&(!_||(E.options.layer??"bottom")===_)&&(yield E)}forEachDecorationAtCell(a,o,_,C){this._decorations.forEachByKey(o,(b=>{y=b.options.x??0,w=y+(b.options.width??1),a>=y&&a<w&&(!_||(b.options.layer??"bottom")===_)&&C(b)}))}}u.DecorationService=g;class l extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(a){super(),this.options=a,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=f(2585),m=f(8343);class h{constructor(...y){this._entries=new Map;for(const[w,g]of y)this.set(w,g)}set(y,w){const g=this._entries.get(y);return this._entries.set(y,w),g}forEach(y){for(const[w,g]of this._entries.entries())y(w,g)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}u.ServiceCollection=h,u.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(p,y){this._services.set(p,y)}getService(p){return this._services.get(p)}createInstance(p,...y){const w=(0,m.getServiceDependencies)(p).sort(((c,a)=>c.index-a.index)),g=[];for(const c of w){const a=this._services.get(c.id);if(!a)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${c.id}.`);g.push(a)}const l=w.length>0?w[0].index:y.length;if(y.length!==l)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${l+1} conflicts with ${y.length} static arguments`);return new p(...y,...g)}}},7866:function(K,u,f){var d=this&&this.__decorate||function(l,c,a,o){var _,C=arguments.length,b=C<3?c:o===null?o=Object.getOwnPropertyDescriptor(c,a):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,c,a,o);else for(var E=l.length-1;E>=0;E--)(_=l[E])&&(b=(C<3?_(b):C>3?_(c,a,b):_(c,a))||b);return C>3&&b&&Object.defineProperty(c,a,b),b},m=this&&this.__param||function(l,c){return function(a,o){c(a,o,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=f(844),p=f(2585),y={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,g=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),w=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let c=0;c<l.length;c++)typeof l[c]=="function"&&(l[c]=l[c]())}_log(l,c,a){this._evalLazyOptionalParams(a),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...a)}trace(l,...c){var a;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.trace.bind(this._optionsService.options.logger))??console.log,l,c)}debug(l,...c){var a;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.debug.bind(this._optionsService.options.logger))??console.log,l,c)}info(l,...c){var a;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.info.bind(this._optionsService.options.logger))??console.info,l,c)}warn(l,...c){var a;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.warn.bind(this._optionsService.options.logger))??console.warn,l,c)}error(l,...c){var a;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((a=this._optionsService.options.logger)==null?void 0:a.error.bind(this._optionsService.options.logger))??console.error,l,c)}};u.LogService=g=d([m(0,p.IOptionsService)],g),u.setTraceLogger=function(l){w=l},u.traceCall=function(l,c,a){if(typeof a.value!="function")throw new Error("not supported");const o=a.value;a.value=function(..._){if(w.logLevel!==p.LogLevelEnum.TRACE)return o.apply(this,_);w.trace(`GlyphRenderer#${o.name}(${_.map((b=>JSON.stringify(b))).join(", ")})`);const C=o.apply(this,_);return w.trace(`GlyphRenderer#${o.name} return`,C),C}}},7302:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=f(8460),m=f(844),h=f(6114);u.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends m.Disposable{constructor(g){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l={...u.DEFAULT_OPTIONS};for(const c in g)if(c in l)try{const a=g[c];l[c]=this._sanitizeAndValidateOption(c,a)}catch(a){console.error(a)}this.rawOptions=l,this.options={...l},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(g,l){return this.onOptionChange((c=>{c===g&&l(this.rawOptions[g])}))}onMultipleOptionChange(g,l){return this.onOptionChange((c=>{g.indexOf(c)!==-1&&l()}))}_setupOptions(){const g=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},l=(c,a)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);a=this._sanitizeAndValidateOption(c,a),this.rawOptions[c]!==a&&(this.rawOptions[c]=a,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const a={get:g.bind(this,c),set:l.bind(this,c)};Object.defineProperty(this.options,c,a)}}_sanitizeAndValidateOption(g,l){switch(g){case"cursorStyle":if(l||(l=u.DEFAULT_OPTIONS[g]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(l))throw new Error(`"${l}" is not a valid value for ${g}`);break;case"wordSeparator":l||(l=u.DEFAULT_OPTIONS[g]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=p.includes(l)?l:u.DEFAULT_OPTIONS[g];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${g} cannot be less than 1, value: ${l}`);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(`${g} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${g} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${g} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}u.OptionsService=y},2660:function(K,u,f){var d=this&&this.__decorate||function(y,w,g,l){var c,a=arguments.length,o=a<3?w:l===null?l=Object.getOwnPropertyDescriptor(w,g):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(y,w,g,l);else for(var _=y.length-1;_>=0;_--)(c=y[_])&&(o=(a<3?c(o):a>3?c(w,g,o):c(w,g))||o);return a>3&&o&&Object.defineProperty(w,g,o),o},m=this&&this.__param||function(y,w){return function(g,l){w(g,l,y)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=f(2585);let p=u.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const w=this._bufferService.buffer;if(y.id===void 0){const _=w.addMarker(w.ybase+w.y),C={data:y,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(C,_))),this._dataByLinkId.set(C.id,C),C.id}const g=y,l=this._getEntryIdKey(g),c=this._entriesWithId.get(l);if(c)return this.addLineToLink(c.id,w.ybase+w.y),c.id;const a=w.addMarker(w.ybase+w.y),o={id:this._nextId++,key:this._getEntryIdKey(g),data:g,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(o,a))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(y,w){const g=this._dataByLinkId.get(y);if(g&&g.lines.every((l=>l.line!==w))){const l=this._bufferService.buffer.addMarker(w);g.lines.push(l),l.onDispose((()=>this._removeMarkerFromLink(g,l)))}}getLinkData(y){var w;return(w=this._dataByLinkId.get(y))==null?void 0:w.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,w){const g=y.lines.indexOf(w);g!==-1&&(y.lines.splice(g,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};u.OscLinkService=p=d([m(0,h.IBufferService)],p)},8343:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const f="di$target",d="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(m){return m[d]||[]},u.createDecorator=function(m){if(u.serviceRegistry.has(m))return u.serviceRegistry.get(m);const h=function(p,y,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,l,c){l[f]===l?l[d].push({id:g,index:c}):(l[d]=[{id:g,index:c}],l[f]=l)})(h,p,w)};return h.toString=()=>m,u.serviceRegistry.set(m,h),h}},2585:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IDecorationService=u.IUnicodeService=u.IOscLinkService=u.IOptionsService=u.ILogService=u.LogLevelEnum=u.IInstantiationService=u.ICharsetService=u.ICoreService=u.ICoreMouseService=u.IBufferService=void 0;const d=f(8343);var m;u.IBufferService=(0,d.createDecorator)("BufferService"),u.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),u.ICoreService=(0,d.createDecorator)("CoreService"),u.ICharsetService=(0,d.createDecorator)("CharsetService"),u.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(m||(u.LogLevelEnum=m={})),u.ILogService=(0,d.createDecorator)("LogService"),u.IOptionsService=(0,d.createDecorator)("OptionsService"),u.IOscLinkService=(0,d.createDecorator)("OscLinkService"),u.IUnicodeService=(0,d.createDecorator)("UnicodeService"),u.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=f(8460),m=f(225);class h{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,w,g=!1){return(16777215&y)<<3|(3&w)<<1|(g?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new m.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let w=0,g=0;const l=y.length;for(let c=0;c<l;++c){let a=y.charCodeAt(c);if(55296<=a&&a<=56319){if(++c>=l)return w+this.wcwidth(a);const C=y.charCodeAt(c);56320<=C&&C<=57343?a=1024*(a-55296)+C-56320+65536:w+=this.wcwidth(C)}const o=this.charProperties(a,g);let _=h.extractWidth(o);h.extractShouldJoin(o)&&(_-=h.extractWidth(g)),w+=_,g=o}return w}charProperties(y,w){return this._activeProvider.charProperties(y,w)}}u.UnicodeService=h}},H={};function ae(K){var u=H[K];if(u!==void 0)return u.exports;var f=H[K]={exports:{}};return ee[K].call(f.exports,f,f.exports,ae),f.exports}var ce={};return(()=>{var K=ce;Object.defineProperty(K,"__esModule",{value:!0}),K.Terminal=void 0;const u=ae(9042),f=ae(3236),d=ae(844),m=ae(5741),h=ae(8285),p=ae(7975),y=ae(7090),w=["cols","rows"];class g extends d.Disposable{constructor(c){super(),this._core=this.register(new f.Terminal(c)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const a=_=>this._core.options[_],o=(_,C)=>{this._checkReadonlyOptions(_),this._core.options[_]=C};for(const _ in this._core.options){const C={get:a.bind(this,_),set:o.bind(this,_)};Object.defineProperty(this._publicOptions,_,C)}}_checkReadonlyOptions(c){if(w.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let a="none";switch(this._core.coreMouseService.activeProtocol){case"X10":a="x10";break;case"VT200":a="vt200";break;case"DRAG":a="drag";break;case"ANY":a="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const a in c)this._publicOptions[a]=c[a]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,a=!0){this._core.input(c,a)}resize(c,a){this._verifyIntegers(c,a),this._core.resize(c,a)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,a,o){this._verifyIntegers(c,a,o),this._core.select(c,a,o)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,a){this._verifyIntegers(c,a),this._core.selectLines(c,a)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,a){this._core.write(c,a)}writeln(c,a){this._core.write(c),this._core.write(`\r
57
+ `,a)}paste(c){this._core.paste(c)}refresh(c,a){this._verifyIntegers(c,a),this._core.refresh(c,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const a of c)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const a of c)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}K.Terminal=g})(),ce})()))})(Mo)),Mo.exports}var Iv=qv();class Pv{constructor(Y,ee){Mf(this,"socket");const H=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${H}//${window.location.host}/ws/terminal/${encodeURIComponent(Y)}`),this.socket.addEventListener("message",ae=>{var K,u;const ce=JSON.parse(ae.data);ce.type==="output"?ee.onOutput(ce.data):ce.type==="error"?(K=ee.onError)==null||K.call(ee,ce.message):(u=ee.onStatus)==null||u.call(ee,ce)}),this.socket.addEventListener("error",()=>{var ae;(ae=ee.onError)==null||ae.call(ee,"Terminal connection failed.")})}sendInput(Y){this.send({type:"input",data:Y})}resize(Y,ee){this.send({type:"resize",cols:Y,rows:ee})}close(){this.socket.close()}send(Y){const ee=JSON.stringify(Y);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(ee);return}this.socket.addEventListener("open",()=>this.socket.send(ee),{once:!0})}}function Yv({sessionId:B,active:Y=!0,onEvent:ee}){const H=_e.useRef(null),ae=_e.useRef(null),ce=_e.useRef(null),K=_e.useRef(ee);return _e.useEffect(()=>{K.current=ee},[ee]),_e.useEffect(()=>{if(!H.current)return;const u=new Iv.Terminal({cursorBlink:!0,convertEol:!0,drawBoldTextInBrightColors:!0,fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:13,fontWeight:"400",fontWeightBold:"700",lineHeight:1.35,macOptionIsMeta:!0,scrollback:1e4,theme:Gv}),f=new jv.FitAddon;u.loadAddon(f),u.loadAddon(new Uv.WebLinksAddon),u.open(H.current),ce.current=u,ae.current=f,f.fit(),u.focus();const d=new Pv(B,{onOutput(p){u.write(p)},onStatus(p){var y;(y=K.current)==null||y.call(K,p.type)},onError(p){var y;u.writeln(`\r
58
+ [VCM] ${p}`),(y=K.current)==null||y.call(K,p)}}),m=u.onData(p=>{d.sendInput(p)}),h=new ResizeObserver(()=>{f.fit(),d.resize(u.cols,u.rows)});return h.observe(H.current),d.resize(u.cols,u.rows),()=>{h.disconnect(),m.dispose(),d.close(),u.dispose(),ce.current=null,ae.current=null}},[B]),_e.useEffect(()=>{if(!Y)return;const u=window.requestAnimationFrame(()=>{const f=ce.current,d=ae.current;!f||!d||(d.fit(),f.focus())});return()=>window.cancelAnimationFrame(u)},[Y]),L.jsx("div",{className:"terminal-frame",ref:H,onMouseDown:()=>{var u;return(u=ce.current)==null?void 0:u.focus()}})}const Gv={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"};function Kv({role:B,session:Y,permissionMode:ee,busy:H=!1,onPermissionModeChange:ae,onStart:ce,onResume:K,onStop:u,onRestart:f}){const d=(Y==null?void 0:Y.status)==="running",m=!!(Y!=null&&Y.claudeSessionId&&!d),h=!d&&!(Y!=null&&Y.claudeSessionId),p=!!(Y&&Y.permissionMode!==ee);return L.jsxs("div",{className:"session-controls",children:[L.jsxs("label",{className:"permission-mode-field",children:[L.jsxs("span",{children:["Permission",L.jsx("small",{children:Y?`current: ${Xv(Y.permissionMode)}${p?" / next launch":""}`:"applies on start"})]}),L.jsxs("select",{value:ee,onChange:y=>ae(y.target.value),children:[L.jsx("option",{value:"default",children:"默认"}),L.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"}),L.jsx("option",{value:"dangerously-skip-permissions",children:"--dangerously-skip-permissions"})]})]}),L.jsxs("div",{className:"session-toolbar",children:[L.jsx("button",{type:"button",disabled:H||!h,onClick:ce,children:"Start"}),L.jsx("button",{type:"button",disabled:H||!m,onClick:K,children:"Resume"}),L.jsx("button",{type:"button",disabled:H||!Y,onClick:f,children:"Restart"}),L.jsx("button",{type:"button",disabled:H||!Y,onClick:u,children:"Stop"})]})]})}function Xv(B){return B==="dangerously-skip-permissions"?"--dangerously-skip-permissions":B}const Vv=["zh-to-en","zh-to-en-with-context","en-to-zh"];function Fv({settings:B,busy:Y=!1,promptPreviews:ee,testResult:H,onSave:ae,onTest:ce,onClose:K}){var g;const[u,f]=_e.useState(B),[d,m]=_e.useState(B.apiKey??""),[h,p]=_e.useState("zh-to-en");_e.useEffect(()=>{f(B),m(B.apiKey??"")},[B]);const y=ee.find(l=>l.key===h),w=((g=u.prompts)==null?void 0:g[h])??"";return L.jsx("div",{className:"modal-backdrop",children:L.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("h2",{children:"Translation Settings"}),L.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),L.jsx("button",{type:"button",onClick:K,children:"Close"})]}),L.jsxs("div",{className:"translation-settings-grid",children:[L.jsxs("label",{children:[L.jsx("span",{children:"Enable translation"}),L.jsx("input",{checked:u.enabled,type:"checkbox",onChange:l=>f({...u,enabled:l.target.checked})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Base URL"}),L.jsx("input",{value:u.baseUrl,onChange:l=>f({...u,baseUrl:l.target.value}),placeholder:"https://api.openai.com/v1"})]}),L.jsxs("label",{children:[L.jsx("span",{children:"API key"}),L.jsx("input",{value:d,onChange:l=>m(l.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Model"}),L.jsx("input",{value:u.model,onChange:l=>f({...u,model:l.target.value})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Target language"}),L.jsx("input",{value:u.targetLanguage,onChange:l=>f({...u,targetLanguage:l.target.value})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Input mode"}),L.jsxs("select",{value:u.inputMode,onChange:l=>f({...u,inputMode:l.target.value}),children:[L.jsx("option",{value:"review-before-send",children:"Review before send"}),L.jsx("option",{value:"auto-send",children:"Auto-send"})]})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Use context"}),L.jsx("input",{checked:u.contextEnabled,type:"checkbox",onChange:l=>f({...u,contextEnabled:l.target.checked})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Translate output"}),L.jsx("input",{checked:u.translateOutput,type:"checkbox",onChange:l=>f({...u,translateOutput:l.target.checked})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Translate user input"}),L.jsx("input",{checked:u.translateUserInput,type:"checkbox",onChange:l=>f({...u,translateUserInput:l.target.checked})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Timeout ms"}),L.jsx("input",{min:3e3,type:"number",value:u.requestTimeoutMs,onChange:l=>f({...u,requestTimeoutMs:Number(l.target.value)})})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Temperature"}),L.jsx("input",{min:0,max:1,step:.1,type:"number",value:u.temperature,onChange:l=>f({...u,temperature:Number(l.target.value)})})]})]}),L.jsxs("section",{className:"translation-prompt-settings",children:[L.jsxs("header",{children:[L.jsxs("div",{children:[L.jsx("h3",{children:"Translation Prompts"}),L.jsx("p",{children:"cc-pm style prompt slots: zh-to-en, zh-to-en-with-context, en-to-zh."})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Prompt slot"}),L.jsx("select",{value:h,onChange:l=>p(l.target.value),children:Vv.map(l=>{const c=ee.find(a=>a.key===l);return L.jsx("option",{value:l,children:(c==null?void 0:c.label)??l},l)})})]})]}),L.jsxs("div",{className:"translation-prompt-editor-grid",children:[L.jsxs("label",{children:[L.jsx("span",{children:"User prompt (empty = use default)"}),L.jsx("textarea",{value:w,onChange:l=>f({...u,prompts:Gf(u.prompts,h,l.target.value)}),placeholder:"Leave blank to use the default prompt."})]}),L.jsxs("label",{children:[L.jsx("span",{children:"Default prompt (read-only)"}),L.jsx("textarea",{readOnly:!0,value:(y==null?void 0:y.defaultPrompt)??""})]})]}),L.jsx("button",{type:"button",disabled:Y||!w,onClick:()=>f({...u,prompts:Gf(u.prompts,h,"")}),children:"Reset selected prompt"})]}),H?L.jsx("div",{className:H.ok?"translation-test-result is-ok":"translation-test-result is-error",children:H.ok?`Connection ok: ${H.model} in ${H.elapsedMs}ms`:H.error}):null,L.jsxs("footer",{children:[L.jsx("button",{type:"button",disabled:Y,onClick:ce,children:"Test Connection"}),L.jsx("button",{type:"button",disabled:Y,onClick:()=>void ae(u,d.trim()),children:"Save"})]})]})})}function Gf(B,Y,ee){const H={...B??{}};return ee.trim()?H[Y]=ee:delete H[Y],Object.keys(H).length>0?H:void 0}function Wv({taskSlug:B,role:Y,sessionId:ee}){const[H,ae]=_e.useState(null),[ce,K]=_e.useState([]),[u,f]=_e.useState(""),[d,m]=_e.useState(!1),[h,p]=_e.useState(!1),[y,w]=_e.useState(!1),[g,l]=_e.useState("ready"),[c,a]=_e.useState(Date.now()),[o,_]=_e.useState(!1),[C,b]=_e.useState(""),[E,v]=_e.useState(!1),[A,O]=_e.useState([]),[j,I]=_e.useState(),[z,Z]=_e.useState(0),re=_e.useRef(null);_e.useEffect(()=>{Promise.all([Re.getTranslationSettings(),Re.getTranslationPrompts()]).then(([Q,he])=>{ae(Q),O(he),Q.enabled||v(!0)}).catch(Q=>b(Q.message))},[]),_e.useEffect(()=>{K([]),b(""),l("ready");let Q=!0;const he=window.location.protocol==="https:"?"wss:":"ws:",U=new WebSocket(`${he}//${window.location.host}/ws/translation/${encodeURIComponent(ee)}`),R=le=>{if(!Q)return;const ie=JSON.parse(le.data);ie.type==="translation-entry"?K(de=>Kf(de,ie.entry)):ie.type==="translation-status"?l(ie.status):ie.type==="translation-error"&&b(ie.message)};return U.addEventListener("message",R),()=>{Q=!1,U.removeEventListener("message",R),U.close()}},[ee,z]),_e.useEffect(()=>{var Q;(Q=re.current)==null||Q.scrollIntoView({block:"nearest"})},[ce.length]);const q=Zv(ce);_e.useEffect(()=>{if(!q)return;a(Date.now());const Q=window.setInterval(()=>a(Date.now()),250);return()=>window.clearInterval(Q)},[q]);async function J(Q=!1){if(H){_(!0),b(""),m(!1);try{const he=await Re.translateUserInput(B,Y,{text:u,mode:Q?"auto-send":H.inputMode,useContext:H.contextEnabled,send:Q});w(he.contextUsed),he.sent?(f(""),m(!1)):(f(he.englishPreview),m(!0))}catch(he){b(he instanceof Error?he.message:"Translation failed.")}finally{_(!1)}}}async function se(){if(u.trim()){_(!0),b("");try{await Re.sendTranslatedInput(B,Y,{englishText:u}),f(""),m(!1),w(!1)}catch(Q){b(Q instanceof Error?Q.message:"Failed to send English input.")}finally{_(!1)}}}function D(Q){Q.key!=="Enter"||Q.shiftKey||Q.nativeEvent.isComposing||(Q.preventDefault(),!o&&u.trim()&&(d?se():J(h)))}async function k(Q,he){_(!0),b("");try{const U=await Re.updateTranslationSettings({...Q,...he!==void 0?{apiKey:he}:{}}),R=await Re.getTranslationPrompts();ae(U),O(R),v(!1),Z(le=>le+1)}catch(U){b(U instanceof Error?U.message:"Failed to save translation settings.")}finally{_(!1)}}async function x(){_(!0),b("");try{I(await Re.testTranslationProvider())}catch(Q){b(Q instanceof Error?Q.message:"Provider test failed.")}finally{_(!1)}}async function M(){K([]),await Re.clearTranslationSession(ee).catch(Q=>b(Q.message))}async function V(Q){_(!0);try{const he=await Re.retryTranslation(ee,Q.id);K(U=>Kf(U,he))}catch(he){b(he instanceof Error?he.message:"Retry failed.")}finally{_(!1)}}if(!H)return L.jsx("aside",{className:"translation-panel",children:L.jsx("p",{className:"muted",children:"Loading translation settings..."})});const G=$v(ce,g,c);return L.jsxs("aside",{className:"translation-panel",children:[L.jsxs("header",{className:"translation-panel-header",children:[L.jsxs("div",{className:"translation-panel-titlebar",children:[L.jsx("h2",{children:"Translation"}),L.jsxs("div",{className:"translation-panel-actions",children:[L.jsx("button",{"aria-pressed":h,className:`auto-send-toggle${h?" is-active":""}`,type:"button",onClick:()=>p(Q=>!Q),children:h?"✅ Auto-send":"× Auto-send"}),L.jsx("button",{type:"button",onClick:()=>v(!0),children:"Settings"}),L.jsx("button",{type:"button",onClick:()=>void M(),children:"Clear"})]})]}),L.jsx("div",{children:L.jsxs("p",{children:[H.model," · ",G,y?" · context used":""]})})]}),C?L.jsx("div",{className:"error-banner",children:C}):null,L.jsxs("div",{className:"translation-entry-list",children:[ce.length===0?L.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,ce.map(Q=>L.jsx(Qv,{entry:Q,onRetry:Q.status==="failed"?()=>void V(Q):void 0},Q.id)),L.jsx("div",{ref:re})]}),L.jsx("div",{className:"translation-composer",children:L.jsxs("div",{className:"translation-composer-row",children:[L.jsx("textarea",{value:u,onChange:Q=>{f(Q.target.value),Q.target.value.trim()||m(!1)},onKeyDown:D,placeholder:"输入中文,先翻译成英文工程指令..."}),L.jsx("div",{className:"translation-composer-actions",children:L.jsx("button",{type:"button",disabled:o||!d||!u.trim(),onClick:()=>void se(),children:"Send English"})})]})}),E?L.jsx(Fv,{settings:H,busy:o,promptPreviews:A,testResult:j,onSave:k,onTest:x,onClose:()=>v(!1)}):null]})}function Qv({entry:B,onRetry:Y}){const ee=eg(B);return L.jsxs("article",{className:`translation-entry is-${B.sourceKind}`,children:[B.warning?L.jsx("p",{className:"translation-warning",children:B.warning}):null,B.error?L.jsx("p",{className:"translation-warning",children:B.error}):null,L.jsx("pre",{children:ee}),Y?L.jsx("button",{type:"button",onClick:Y,children:"Retry"}):null]})}function Zv(B){const Y=B.find(Ff);return(Y==null?void 0:Y.translationStartedAt)??(Y==null?void 0:Y.createdAt)}function $v(B,Y,ee){const H=B.find(Ff);if(H)return`translating ${tg(Math.max(0,ee-Jv(H)))}`;const ae=B.at(-1);return(ae==null?void 0:ae.status)==="failed"||Y==="failed"?"error":Y}function Ff(B){return B.status==="queued"||B.status==="translating"}function Jv(B){const Y=Date.parse(B.translationStartedAt??B.createdAt);return Number.isFinite(Y)?Y:Date.now()}function eg(B){return B.status==="queued"||B.status==="translating"?B.sourceText:B.status==="translated"?B.translatedText:B.translatedText||B.sourceText}function Kf(B,Y){return B.findIndex(H=>H.id===Y.id)===-1?[...B,Y]:B.map(H=>H.id===Y.id?Y:H)}function tg(B){if(B<1e3)return`${Math.max(.1,B/1e3).toFixed(1)}s`;const Y=B/1e3;if(Y<60)return`${Y.toFixed(1)}s`;const ee=Math.floor(Y/60),H=Math.floor(Y%60).toString().padStart(2,"0");return`${ee}:${H}`}function ig({role:B,session:Y,permissionMode:ee,active:H=!0,busy:ae,onPermissionModeChange:ce,onStart:K,onResume:u,onStop:f,onRestart:d,onTerminalEvent:m}){const[h,p]=_e.useState(!1);return L.jsxs("section",{className:"session-console",children:[L.jsxs("div",{className:"session-console-top",children:[L.jsx(Kv,{role:B,session:Y,permissionMode:ee,busy:ae,onPermissionModeChange:ce,onStart:K,onResume:u,onStop:f,onRestart:d}),L.jsx("button",{"aria-pressed":h,className:`translation-toggle${h?" is-active":""}`,type:"button",onClick:()=>p(y=>!y),children:h?"✅ Translate":"× Translate"})]}),(Y==null?void 0:Y.status)==="running"?L.jsx(sg,{active:H,onTerminalEvent:m,role:B,session:Y,taskSlug:Y.taskSlug,translationEnabled:h}):L.jsxs("div",{className:"terminal-empty",children:[L.jsx("strong",{children:B}),L.jsx("span",{children:Y!=null&&Y.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]})}function sg({active:B,onTerminalEvent:Y,role:ee,session:H,taskSlug:ae,translationEnabled:ce}){return L.jsxs("div",{className:ce?"session-console-body has-translation":"session-console-body",children:[L.jsx("div",{className:"terminal-pane",children:L.jsx(Yv,{sessionId:H.id,active:B,onEvent:Y},H.id)}),ce?L.jsx("div",{className:"translation-pane",children:L.jsx(Wv,{taskSlug:ae,role:ee,sessionId:H.id},H.id)}):null]})}function rg({task:B,activeRole:Y,onTaskChanged:ee,onActiveRoleChange:H,onWorkflowChanged:ae,onMessagesChanged:ce,onOrchestrationChanged:K,onEventsChanged:u}){const[f,d]=_e.useState(null),[m,h]=_e.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[p,y]=_e.useState(!1),[w,g]=_e.useState(""),[l,c]=_e.useState([]),a=_e.useCallback(async()=>{const[E,v,A]=await Promise.all([Re.getTaskStatus(B.taskSlug),Re.listMessages(B.taskSlug),Re.getOrchestrationState(B.taskSlug)]);d(E),ae==null||ae(E.workflow),ce==null||ce(v),K==null||K(A)},[ce,K,ae,B.taskSlug]);_e.useEffect(()=>{a().catch(E=>g(E.message))},[a]),_e.useEffect(()=>{c([]),u==null||u([])},[u,B.taskSlug]),_e.useEffect(()=>{h(E=>{let v=!1;const A={...E};for(const O of(f==null?void 0:f.sessions)??[])A[O.role]!==O.permissionMode&&(A[O.role]=O.permissionMode,v=!0);return v?A:E})},[f==null?void 0:f.sessions]),_e.useEffect(()=>{const E=window.setInterval(()=>{Promise.all([Re.getTaskStatus(B.taskSlug),Re.listMessages(B.taskSlug),Re.getOrchestrationState(B.taskSlug)]).then(([v,A,O])=>{d(v),ae==null||ae(v.workflow),ce==null||ce(A),K==null||K(O)}).catch(v=>g(v.message))},3e3);return()=>window.clearInterval(E)},[ce,K,ae,B.taskSlug]);async function o(E){y(!0),g("");try{await E(),await a(),await ee()}catch(v){g(v instanceof Error?v.message:"Action failed.")}finally{y(!1)}}async function _(){if(window.confirm(`Clean up task "${B.taskSlug}"? This removes the task worktree and VCM task metadata. Cleanup will stop if the task worktree has uncommitted changes.`)){y(!0),g("");try{await Re.cleanupTask(B.taskSlug),C(`cleaned up ${B.taskSlug}`),await ee()}catch(v){g(v instanceof Error?v.message:"Cleanup failed.")}finally{y(!1)}}}function C(E){c(v=>{const A=[...v,`${new Date().toLocaleTimeString()} ${E}`];return u==null||u(A),A})}function b(E,v){h(A=>({...A,[E]:v}))}return L.jsxs("div",{className:"task-workspace",children:[L.jsxs("header",{className:"workspace-header",children:[L.jsxs("div",{className:"workspace-title-line",children:[L.jsx("span",{className:"eyebrow",children:"Task Workspace"}),L.jsx("h1",{children:B.title||B.taskSlug}),L.jsx("span",{className:"workspace-branch",children:B.branch}),B.worktreePath?L.jsx("span",{className:"workspace-worktree",children:B.worktreePath}):null]}),L.jsx(Hv,{activeRole:Y,sessions:(f==null?void 0:f.sessions)??[],onSelect:H}),L.jsx("button",{type:"button",onClick:()=>void a(),children:"Refresh"}),L.jsx("button",{type:"button",disabled:p,onClick:()=>void _(),children:"Cleanup"})]}),w?L.jsx("div",{className:"error-banner",children:w}):null,L.jsx("div",{className:"workspace-grid",children:L.jsx("div",{className:"workspace-main",children:L.jsx("div",{className:"role-console-stack",children:oa.map(E=>{const v=E.name,A=v===Y,O=Xf((f==null?void 0:f.sessions)??[],v);return L.jsx("div",{className:A?"role-console-panel is-active":"role-console-panel","aria-hidden":!A,children:L.jsx(ig,{role:v,session:O,permissionMode:m[v],active:A,busy:p,onPermissionModeChange:j=>b(v,j),onStart:()=>void o(async()=>{await Re.startRoleSession(B.taskSlug,v,{cols:100,rows:28,permissionMode:m[v]}),C(`started ${v} with ${m[v]}`)}),onResume:()=>void o(async()=>{await Re.resumeRoleSession(B.taskSlug,v,{cols:100,rows:28,permissionMode:m[v]}),C(`resumed ${v} with ${m[v]}`)}),onStop:()=>void o(async()=>{await Re.stopRoleSession(B.taskSlug,v),C(`stopped ${v}`)}),onRestart:()=>void o(async()=>{await Re.restartRoleSession(B.taskSlug,v,{cols:100,rows:28,permissionMode:m[v]}),C(`restarted ${v} with ${m[v]}`)}),onTerminalEvent:j=>C(`${E.label}: ${j}`)})},v)})})})})]})}function ng(){const[B,Y]=_e.useState(null),[ee,H]=_e.useState([]),[ae,ce]=_e.useState(null),[K,u]=_e.useState(null),[f,d]=_e.useState([]),[m,h]=_e.useState(null),[p,y]=_e.useState(null),[w,g]=_e.useState(null),[l,c]=_e.useState(null),[a,o]=_e.useState(null),[_,C]=_e.useState("project-manager"),[b,E]=_e.useState(!1),[v,A]=_e.useState(""),O=_e.useMemo(()=>xv(f,m),[f,m]),j=_e.useCallback(G=>{O!=null&&O.taskSlug&&y({taskSlug:O.taskSlug,workflow:G})},[O==null?void 0:O.taskSlug]),I=_e.useCallback(G=>{O!=null&&O.taskSlug&&g({taskSlug:O.taskSlug,messages:G})},[O==null?void 0:O.taskSlug]),z=_e.useCallback(G=>{O!=null&&O.taskSlug&&c({taskSlug:O.taskSlug,orchestration:G})},[O==null?void 0:O.taskSlug]),Z=_e.useCallback(G=>{O!=null&&O.taskSlug&&o({taskSlug:O.taskSlug,events:G})},[O==null?void 0:O.taskSlug]);async function re(){const G=await Re.listTasks();return d(G),h(Q=>{var he;return Q&&G.some(U=>U.taskSlug===Q)?Q:((he=G[0])==null?void 0:he.taskSlug)??null}),G}async function q(){const G=await Re.getHarnessStatus();return ce(G),G}async function J(){const G=await Re.getRecentRepositoryPaths();return H(G),G}async function se(G){const[Q,he]=await Promise.all([Re.listMessages(G),Re.getOrchestrationState(G)]);g({taskSlug:G,messages:Q}),c({taskSlug:G,orchestration:he})}_e.useEffect(()=>{Promise.all([Re.getCurrentProject(),Re.getRecentRepositoryPaths()]).then(async([G,Q])=>{Y(G),H(Q),G&&await Promise.all([re(),q()])}).catch(G=>A(G.message))},[]);async function D(G){E(!0),A("");try{await G()}catch(Q){A(Q instanceof Error?Q.message:"Action failed.")}finally{E(!1)}}const k=p&&p.taskSlug===(O==null?void 0:O.taskSlug)?p.workflow:null,x=w&&w.taskSlug===(O==null?void 0:O.taskSlug)?w.messages:[],M=l&&l.taskSlug===(O==null?void 0:O.taskSlug)?l.orchestration:null,V=a&&a.taskSlug===(O==null?void 0:O.taskSlug)?a.events:[];return L.jsxs(wv,{sidebar:L.jsx(Ov,{project:B,recentRepositoryPaths:ee,tasks:f,activeTaskSlug:(O==null?void 0:O.taskSlug)??null,workflow:k,messages:x,orchestration:M,events:V,harnessStatus:ae,harnessApplyResult:K,busy:b,onConnect:G=>D(async()=>{const Q=await Re.connectProject({repoPath:G});Y(Q),u(null),await Promise.all([re(),q(),J()])}),onRefreshHarness:()=>D(async()=>{u(null),await q()}),onApplyHarness:()=>D(async()=>{const G=await Re.applyHarness();u(G),await q()}),onCreateTask:G=>D(async()=>{const Q=await Re.createTask(G);await re(),h(Q.taskSlug)}),onSelectTask:h,onOrchestrationModeChange:G=>{O&&D(async()=>{const Q=await Re.updateOrchestrationState(O.taskSlug,{mode:G});c({taskSlug:O.taskSlug,orchestration:Q})})},onStageMessage:G=>{D(async()=>{const Q=await Re.stageMessage(G.taskSlug,G.id);C(Q.toRole),await se(G.taskSlug)})},onRejectMessage:G=>{D(async()=>{await Re.rejectMessage(G.taskSlug,G.id),await se(G.taskSlug)})},onOpenMessageRole:C}),children:[v?L.jsx("div",{className:"error-banner",children:v}):null,B&&O?L.jsx(rg,{task:O,activeRole:_,onTaskChanged:async()=>{await re()},onActiveRoleChange:C,onWorkflowChanged:j,onMessagesChanged:I,onOrchestrationChanged:z,onEventsChanged:Z}):L.jsxs("section",{className:"empty-workspace",children:[L.jsx("h1",{children:B?"Create a task to open the workspace":"Connect a repository to begin"}),L.jsx("p",{children:B?"Tasks create local role commands, logs, and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, logs, and handoff artifacts."})]})]})}const Wf=document.getElementById("root");if(!Wf)throw new Error("Missing #root element.");Ev.createRoot(Wf).render(L.jsx(_e.StrictMode,{children:L.jsx(ng,{})}));