@cluesmith/codev 2.0.0-rc.44 → 2.0.0-rc.46

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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var zf;function vv(){if(zf)return Gr;zf=1;var q=Symbol.for("react.transitional.element"),ae=Symbol.for("react.fragment");function ne(I,re,J){var W=null;if(J!==void 0&&(W=""+J),re.key!==void 0&&(W=""+re.key),"key"in re){J={};for(var a in re)a!=="key"&&(J[a]=re[a])}else J=re;return re=J.ref,{$$typeof:q,type:I,key:W,ref:re!==void 0?re:null,props:J}}return Gr.Fragment=ae,Gr.jsx=ne,Gr.jsxs=ne,Gr}var Nf;function gv(){return Nf||(Nf=1,xo.exports=vv()),xo.exports}var te=gv(),Lo={exports:{}},we={};/**
9
+ */var zf;function vv(){if(zf)return Gr;zf=1;var P=Symbol.for("react.transitional.element"),ae=Symbol.for("react.fragment");function ne(I,re,J){var W=null;if(J!==void 0&&(W=""+J),re.key!==void 0&&(W=""+re.key),"key"in re){J={};for(var a in re)a!=="key"&&(J[a]=re[a])}else J=re;return re=J.ref,{$$typeof:P,type:I,key:W,ref:re!==void 0?re:null,props:J}}return Gr.Fragment=ae,Gr.jsx=ne,Gr.jsxs=ne,Gr}var Nf;function gv(){return Nf||(Nf=1,xo.exports=vv()),xo.exports}var te=gv(),Lo={exports:{}},we={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Uf;function mv(){if(Uf)return we;Uf=1;var q=Symbol.for("react.transitional.element"),ae=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),W=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),o=Symbol.for("react.activity"),g=Symbol.iterator;function y(A){return A===null||typeof A!="object"?null:(A=g&&A[g]||A["@@iterator"],typeof A=="function"?A:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,r={};function h(A,O,$){this.props=A,this.context=O,this.refs=r,this.updater=$||b}h.prototype.isReactComponent={},h.prototype.setState=function(A,O){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,O,"setState")},h.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function l(){}l.prototype=h.prototype;function c(A,O,$){this.props=A,this.context=O,this.refs=r,this.updater=$||b}var m=c.prototype=new l;m.constructor=c,f(m,h.prototype),m.isPureReactComponent=!0;var w=Array.isArray;function S(){}var E={H:null,A:null,T:null,S:null},p=Object.prototype.hasOwnProperty;function C(A,O,$){var V=$.ref;return{$$typeof:q,type:A,key:O,ref:V!==void 0?V:null,props:$}}function L(A,O){return C(A.type,O,A.props)}function T(A){return typeof A=="object"&&A!==null&&A.$$typeof===q}function D(A){var O={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function($){return O[$]})}var M=/\/+/g;function N(A,O){return typeof A=="object"&&A!==null&&A.key!=null?D(""+A.key):O.toString(36)}function X(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(S,S):(A.status="pending",A.then(function(O){A.status==="pending"&&(A.status="fulfilled",A.value=O)},function(O){A.status==="pending"&&(A.status="rejected",A.reason=O)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function z(A,O,$,V,he){var ue=typeof A;(ue==="undefined"||ue==="boolean")&&(A=null);var j=!1;if(A===null)j=!0;else switch(ue){case"bigint":case"string":case"number":j=!0;break;case"object":switch(A.$$typeof){case q:case ae:j=!0;break;case v:return j=A._init,z(j(A._payload),O,$,V,he)}}if(j)return he=he(A),j=V===""?"."+N(A,0):V,w(he)?($="",j!=null&&($=j.replace(M,"$&/")+"/"),z(he,O,$,"",function(ee){return ee})):he!=null&&(T(he)&&(he=L(he,$+(he.key==null||A&&A.key===he.key?"":(""+he.key).replace(M,"$&/")+"/")+j)),O.push(he)),1;j=0;var k=V===""?".":V+":";if(w(A))for(var ie=0;ie<A.length;ie++)V=A[ie],ue=k+N(V,ie),j+=z(V,O,$,ue,he);else if(ie=y(A),typeof ie=="function")for(A=ie.call(A),ie=0;!(V=A.next()).done;)V=V.value,ue=k+N(V,ie++),j+=z(V,O,$,ue,he);else if(ue==="object"){if(typeof A.then=="function")return z(X(A),O,$,V,he);throw O=String(A),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return j}function U(A,O,$){if(A==null)return A;var V=[],he=0;return z(A,V,"","",function(ue){return O.call($,ue,he++)}),V}function P(A){if(A._status===-1){var O=A._result;O=O(),O.then(function($){(A._status===0||A._status===-1)&&(A._status=1,A._result=$)},function($){(A._status===0||A._status===-1)&&(A._status=2,A._result=$)}),A._status===-1&&(A._status=0,A._result=O)}if(A._status===1)return A._result.default;throw A._result}var R=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},H={map:U,forEach:function(A,O,$){U(A,function(){O.apply(this,arguments)},$)},count:function(A){var O=0;return U(A,function(){O++}),O},toArray:function(A){return U(A,function(O){return O})||[]},only:function(A){if(!T(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return we.Activity=o,we.Children=H,we.Component=h,we.Fragment=ne,we.Profiler=re,we.PureComponent=c,we.StrictMode=I,we.Suspense=d,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,we.__COMPILER_RUNTIME={__proto__:null,c:function(A){return E.H.useMemoCache(A)}},we.cache=function(A){return function(){return A.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(A,O,$){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var V=f({},A.props),he=A.key;if(O!=null)for(ue in O.key!==void 0&&(he=""+O.key),O)!p.call(O,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&O.ref===void 0||(V[ue]=O[ue]);var ue=arguments.length-2;if(ue===1)V.children=$;else if(1<ue){for(var j=Array(ue),k=0;k<ue;k++)j[k]=arguments[k+2];V.children=j}return C(A.type,he,V)},we.createContext=function(A){return A={$$typeof:W,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:J,_context:A},A},we.createElement=function(A,O,$){var V,he={},ue=null;if(O!=null)for(V in O.key!==void 0&&(ue=""+O.key),O)p.call(O,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(he[V]=O[V]);var j=arguments.length-2;if(j===1)he.children=$;else if(1<j){for(var k=Array(j),ie=0;ie<j;ie++)k[ie]=arguments[ie+2];he.children=k}if(A&&A.defaultProps)for(V in j=A.defaultProps,j)he[V]===void 0&&(he[V]=j[V]);return C(A,ue,he)},we.createRef=function(){return{current:null}},we.forwardRef=function(A){return{$$typeof:a,render:A}},we.isValidElement=T,we.lazy=function(A){return{$$typeof:v,_payload:{_status:-1,_result:A},_init:P}},we.memo=function(A,O){return{$$typeof:_,type:A,compare:O===void 0?null:O}},we.startTransition=function(A){var O=E.T,$={};E.T=$;try{var V=A(),he=E.S;he!==null&&he($,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(S,R)}catch(ue){R(ue)}finally{O!==null&&$.types!==null&&(O.types=$.types),E.T=O}},we.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},we.use=function(A){return E.H.use(A)},we.useActionState=function(A,O,$){return E.H.useActionState(A,O,$)},we.useCallback=function(A,O){return E.H.useCallback(A,O)},we.useContext=function(A){return E.H.useContext(A)},we.useDebugValue=function(){},we.useDeferredValue=function(A,O){return E.H.useDeferredValue(A,O)},we.useEffect=function(A,O){return E.H.useEffect(A,O)},we.useEffectEvent=function(A){return E.H.useEffectEvent(A)},we.useId=function(){return E.H.useId()},we.useImperativeHandle=function(A,O,$){return E.H.useImperativeHandle(A,O,$)},we.useInsertionEffect=function(A,O){return E.H.useInsertionEffect(A,O)},we.useLayoutEffect=function(A,O){return E.H.useLayoutEffect(A,O)},we.useMemo=function(A,O){return E.H.useMemo(A,O)},we.useOptimistic=function(A,O){return E.H.useOptimistic(A,O)},we.useReducer=function(A,O,$){return E.H.useReducer(A,O,$)},we.useRef=function(A){return E.H.useRef(A)},we.useState=function(A){return E.H.useState(A)},we.useSyncExternalStore=function(A,O,$){return E.H.useSyncExternalStore(A,O,$)},we.useTransition=function(){return E.H.useTransition()},we.version="19.2.4",we}var jf;function Uo(){return jf||(jf=1,Lo.exports=mv()),Lo.exports}var ze=Uo(),Ao={exports:{}},Wr={},Ro={exports:{}},Do={};/**
17
+ */var Uf;function mv(){if(Uf)return we;Uf=1;var P=Symbol.for("react.transitional.element"),ae=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),W=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),o=Symbol.for("react.activity"),g=Symbol.iterator;function y(A){return A===null||typeof A!="object"?null:(A=g&&A[g]||A["@@iterator"],typeof A=="function"?A:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,r={};function h(A,O,$){this.props=A,this.context=O,this.refs=r,this.updater=$||b}h.prototype.isReactComponent={},h.prototype.setState=function(A,O){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,O,"setState")},h.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function l(){}l.prototype=h.prototype;function c(A,O,$){this.props=A,this.context=O,this.refs=r,this.updater=$||b}var m=c.prototype=new l;m.constructor=c,f(m,h.prototype),m.isPureReactComponent=!0;var w=Array.isArray;function S(){}var E={H:null,A:null,T:null,S:null},p=Object.prototype.hasOwnProperty;function C(A,O,$){var V=$.ref;return{$$typeof:P,type:A,key:O,ref:V!==void 0?V:null,props:$}}function L(A,O){return C(A.type,O,A.props)}function T(A){return typeof A=="object"&&A!==null&&A.$$typeof===P}function D(A){var O={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function($){return O[$]})}var M=/\/+/g;function N(A,O){return typeof A=="object"&&A!==null&&A.key!=null?D(""+A.key):O.toString(36)}function X(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(S,S):(A.status="pending",A.then(function(O){A.status==="pending"&&(A.status="fulfilled",A.value=O)},function(O){A.status==="pending"&&(A.status="rejected",A.reason=O)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function z(A,O,$,V,he){var ue=typeof A;(ue==="undefined"||ue==="boolean")&&(A=null);var j=!1;if(A===null)j=!0;else switch(ue){case"bigint":case"string":case"number":j=!0;break;case"object":switch(A.$$typeof){case P:case ae:j=!0;break;case v:return j=A._init,z(j(A._payload),O,$,V,he)}}if(j)return he=he(A),j=V===""?"."+N(A,0):V,w(he)?($="",j!=null&&($=j.replace(M,"$&/")+"/"),z(he,O,$,"",function(ee){return ee})):he!=null&&(T(he)&&(he=L(he,$+(he.key==null||A&&A.key===he.key?"":(""+he.key).replace(M,"$&/")+"/")+j)),O.push(he)),1;j=0;var k=V===""?".":V+":";if(w(A))for(var ie=0;ie<A.length;ie++)V=A[ie],ue=k+N(V,ie),j+=z(V,O,$,ue,he);else if(ie=y(A),typeof ie=="function")for(A=ie.call(A),ie=0;!(V=A.next()).done;)V=V.value,ue=k+N(V,ie++),j+=z(V,O,$,ue,he);else if(ue==="object"){if(typeof A.then=="function")return z(X(A),O,$,V,he);throw O=String(A),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return j}function U(A,O,$){if(A==null)return A;var V=[],he=0;return z(A,V,"","",function(ue){return O.call($,ue,he++)}),V}function q(A){if(A._status===-1){var O=A._result;O=O(),O.then(function($){(A._status===0||A._status===-1)&&(A._status=1,A._result=$)},function($){(A._status===0||A._status===-1)&&(A._status=2,A._result=$)}),A._status===-1&&(A._status=0,A._result=O)}if(A._status===1)return A._result.default;throw A._result}var R=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},H={map:U,forEach:function(A,O,$){U(A,function(){O.apply(this,arguments)},$)},count:function(A){var O=0;return U(A,function(){O++}),O},toArray:function(A){return U(A,function(O){return O})||[]},only:function(A){if(!T(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return we.Activity=o,we.Children=H,we.Component=h,we.Fragment=ne,we.Profiler=re,we.PureComponent=c,we.StrictMode=I,we.Suspense=d,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,we.__COMPILER_RUNTIME={__proto__:null,c:function(A){return E.H.useMemoCache(A)}},we.cache=function(A){return function(){return A.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(A,O,$){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var V=f({},A.props),he=A.key;if(O!=null)for(ue in O.key!==void 0&&(he=""+O.key),O)!p.call(O,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&O.ref===void 0||(V[ue]=O[ue]);var ue=arguments.length-2;if(ue===1)V.children=$;else if(1<ue){for(var j=Array(ue),k=0;k<ue;k++)j[k]=arguments[k+2];V.children=j}return C(A.type,he,V)},we.createContext=function(A){return A={$$typeof:W,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:J,_context:A},A},we.createElement=function(A,O,$){var V,he={},ue=null;if(O!=null)for(V in O.key!==void 0&&(ue=""+O.key),O)p.call(O,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(he[V]=O[V]);var j=arguments.length-2;if(j===1)he.children=$;else if(1<j){for(var k=Array(j),ie=0;ie<j;ie++)k[ie]=arguments[ie+2];he.children=k}if(A&&A.defaultProps)for(V in j=A.defaultProps,j)he[V]===void 0&&(he[V]=j[V]);return C(A,ue,he)},we.createRef=function(){return{current:null}},we.forwardRef=function(A){return{$$typeof:a,render:A}},we.isValidElement=T,we.lazy=function(A){return{$$typeof:v,_payload:{_status:-1,_result:A},_init:q}},we.memo=function(A,O){return{$$typeof:_,type:A,compare:O===void 0?null:O}},we.startTransition=function(A){var O=E.T,$={};E.T=$;try{var V=A(),he=E.S;he!==null&&he($,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(S,R)}catch(ue){R(ue)}finally{O!==null&&$.types!==null&&(O.types=$.types),E.T=O}},we.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},we.use=function(A){return E.H.use(A)},we.useActionState=function(A,O,$){return E.H.useActionState(A,O,$)},we.useCallback=function(A,O){return E.H.useCallback(A,O)},we.useContext=function(A){return E.H.useContext(A)},we.useDebugValue=function(){},we.useDeferredValue=function(A,O){return E.H.useDeferredValue(A,O)},we.useEffect=function(A,O){return E.H.useEffect(A,O)},we.useEffectEvent=function(A){return E.H.useEffectEvent(A)},we.useId=function(){return E.H.useId()},we.useImperativeHandle=function(A,O,$){return E.H.useImperativeHandle(A,O,$)},we.useInsertionEffect=function(A,O){return E.H.useInsertionEffect(A,O)},we.useLayoutEffect=function(A,O){return E.H.useLayoutEffect(A,O)},we.useMemo=function(A,O){return E.H.useMemo(A,O)},we.useOptimistic=function(A,O){return E.H.useOptimistic(A,O)},we.useReducer=function(A,O,$){return E.H.useReducer(A,O,$)},we.useRef=function(A){return E.H.useRef(A)},we.useState=function(A){return E.H.useState(A)},we.useSyncExternalStore=function(A,O,$){return E.H.useSyncExternalStore(A,O,$)},we.useTransition=function(){return E.H.useTransition()},we.version="19.2.4",we}var jf;function Uo(){return jf||(jf=1,Lo.exports=mv()),Lo.exports}var He=Uo(),Ao={exports:{}},Wr={},Ro={exports:{}},Do={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var If;function pv(){return If||(If=1,(function(q){function ae(z,U){var P=z.length;z.push(U);e:for(;0<P;){var R=P-1>>>1,H=z[R];if(0<re(H,U))z[R]=U,z[P]=H,P=R;else break e}}function ne(z){return z.length===0?null:z[0]}function I(z){if(z.length===0)return null;var U=z[0],P=z.pop();if(P!==U){z[0]=P;e:for(var R=0,H=z.length,A=H>>>1;R<A;){var O=2*(R+1)-1,$=z[O],V=O+1,he=z[V];if(0>re($,P))V<H&&0>re(he,$)?(z[R]=he,z[V]=P,R=V):(z[R]=$,z[O]=P,R=O);else if(V<H&&0>re(he,P))z[R]=he,z[V]=P,R=V;else break e}}return U}function re(z,U){var P=z.sortIndex-U.sortIndex;return P!==0?P:z.id-U.id}if(q.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var J=performance;q.unstable_now=function(){return J.now()}}else{var W=Date,a=W.now();q.unstable_now=function(){return W.now()-a}}var d=[],_=[],v=1,o=null,g=3,y=!1,b=!1,f=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,l=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;function m(z){for(var U=ne(_);U!==null;){if(U.callback===null)I(_);else if(U.startTime<=z)I(_),U.sortIndex=U.expirationTime,ae(d,U);else break;U=ne(_)}}function w(z){if(f=!1,m(z),!b)if(ne(d)!==null)b=!0,S||(S=!0,D());else{var U=ne(_);U!==null&&X(w,U.startTime-z)}}var S=!1,E=-1,p=5,C=-1;function L(){return r?!0:!(q.unstable_now()-C<p)}function T(){if(r=!1,S){var z=q.unstable_now();C=z;var U=!0;try{e:{b=!1,f&&(f=!1,l(E),E=-1),y=!0;var P=g;try{t:{for(m(z),o=ne(d);o!==null&&!(o.expirationTime>z&&L());){var R=o.callback;if(typeof R=="function"){o.callback=null,g=o.priorityLevel;var H=R(o.expirationTime<=z);if(z=q.unstable_now(),typeof H=="function"){o.callback=H,m(z),U=!0;break t}o===ne(d)&&I(d),m(z)}else I(d);o=ne(d)}if(o!==null)U=!0;else{var A=ne(_);A!==null&&X(w,A.startTime-z),U=!1}}break e}finally{o=null,g=P,y=!1}U=void 0}}finally{U?D():S=!1}}}var D;if(typeof c=="function")D=function(){c(T)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,N=M.port2;M.port1.onmessage=T,D=function(){N.postMessage(null)}}else D=function(){h(T,0)};function X(z,U){E=h(function(){z(q.unstable_now())},U)}q.unstable_IdlePriority=5,q.unstable_ImmediatePriority=1,q.unstable_LowPriority=4,q.unstable_NormalPriority=3,q.unstable_Profiling=null,q.unstable_UserBlockingPriority=2,q.unstable_cancelCallback=function(z){z.callback=null},q.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):p=0<z?Math.floor(1e3/z):5},q.unstable_getCurrentPriorityLevel=function(){return g},q.unstable_next=function(z){switch(g){case 1:case 2:case 3:var U=3;break;default:U=g}var P=g;g=U;try{return z()}finally{g=P}},q.unstable_requestPaint=function(){r=!0},q.unstable_runWithPriority=function(z,U){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var P=g;g=z;try{return U()}finally{g=P}},q.unstable_scheduleCallback=function(z,U,P){var R=q.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?R+P:R):P=R,z){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=P+H,z={id:v++,callback:U,priorityLevel:z,startTime:P,expirationTime:H,sortIndex:-1},P>R?(z.sortIndex=P,ae(_,z),ne(d)===null&&z===ne(_)&&(f?(l(E),E=-1):f=!0,X(w,P-R))):(z.sortIndex=H,ae(d,z),b||y||(b=!0,S||(S=!0,D()))),z},q.unstable_shouldYield=L,q.unstable_wrapCallback=function(z){var U=g;return function(){var P=g;g=U;try{return z.apply(this,arguments)}finally{g=P}}}})(Do)),Do}var Ff;function Sv(){return Ff||(Ff=1,Ro.exports=pv()),Ro.exports}var Mo={exports:{}},St={};/**
25
+ */var If;function pv(){return If||(If=1,(function(P){function ae(z,U){var q=z.length;z.push(U);e:for(;0<q;){var R=q-1>>>1,H=z[R];if(0<re(H,U))z[R]=U,z[q]=H,q=R;else break e}}function ne(z){return z.length===0?null:z[0]}function I(z){if(z.length===0)return null;var U=z[0],q=z.pop();if(q!==U){z[0]=q;e:for(var R=0,H=z.length,A=H>>>1;R<A;){var O=2*(R+1)-1,$=z[O],V=O+1,he=z[V];if(0>re($,q))V<H&&0>re(he,$)?(z[R]=he,z[V]=q,R=V):(z[R]=$,z[O]=q,R=O);else if(V<H&&0>re(he,q))z[R]=he,z[V]=q,R=V;else break e}}return U}function re(z,U){var q=z.sortIndex-U.sortIndex;return q!==0?q:z.id-U.id}if(P.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var J=performance;P.unstable_now=function(){return J.now()}}else{var W=Date,a=W.now();P.unstable_now=function(){return W.now()-a}}var d=[],_=[],v=1,o=null,g=3,y=!1,b=!1,f=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,l=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;function m(z){for(var U=ne(_);U!==null;){if(U.callback===null)I(_);else if(U.startTime<=z)I(_),U.sortIndex=U.expirationTime,ae(d,U);else break;U=ne(_)}}function w(z){if(f=!1,m(z),!b)if(ne(d)!==null)b=!0,S||(S=!0,D());else{var U=ne(_);U!==null&&X(w,U.startTime-z)}}var S=!1,E=-1,p=5,C=-1;function L(){return r?!0:!(P.unstable_now()-C<p)}function T(){if(r=!1,S){var z=P.unstable_now();C=z;var U=!0;try{e:{b=!1,f&&(f=!1,l(E),E=-1),y=!0;var q=g;try{t:{for(m(z),o=ne(d);o!==null&&!(o.expirationTime>z&&L());){var R=o.callback;if(typeof R=="function"){o.callback=null,g=o.priorityLevel;var H=R(o.expirationTime<=z);if(z=P.unstable_now(),typeof H=="function"){o.callback=H,m(z),U=!0;break t}o===ne(d)&&I(d),m(z)}else I(d);o=ne(d)}if(o!==null)U=!0;else{var A=ne(_);A!==null&&X(w,A.startTime-z),U=!1}}break e}finally{o=null,g=q,y=!1}U=void 0}}finally{U?D():S=!1}}}var D;if(typeof c=="function")D=function(){c(T)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,N=M.port2;M.port1.onmessage=T,D=function(){N.postMessage(null)}}else D=function(){h(T,0)};function X(z,U){E=h(function(){z(P.unstable_now())},U)}P.unstable_IdlePriority=5,P.unstable_ImmediatePriority=1,P.unstable_LowPriority=4,P.unstable_NormalPriority=3,P.unstable_Profiling=null,P.unstable_UserBlockingPriority=2,P.unstable_cancelCallback=function(z){z.callback=null},P.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):p=0<z?Math.floor(1e3/z):5},P.unstable_getCurrentPriorityLevel=function(){return g},P.unstable_next=function(z){switch(g){case 1:case 2:case 3:var U=3;break;default:U=g}var q=g;g=U;try{return z()}finally{g=q}},P.unstable_requestPaint=function(){r=!0},P.unstable_runWithPriority=function(z,U){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var q=g;g=z;try{return U()}finally{g=q}},P.unstable_scheduleCallback=function(z,U,q){var R=P.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?R+q:R):q=R,z){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=q+H,z={id:v++,callback:U,priorityLevel:z,startTime:q,expirationTime:H,sortIndex:-1},q>R?(z.sortIndex=q,ae(_,z),ne(d)===null&&z===ne(_)&&(f?(l(E),E=-1):f=!0,X(w,q-R))):(z.sortIndex=H,ae(d,z),b||y||(b=!0,S||(S=!0,D()))),z},P.unstable_shouldYield=L,P.unstable_wrapCallback=function(z){var U=g;return function(){var q=g;g=U;try{return z.apply(this,arguments)}finally{g=q}}}})(Do)),Do}var Ff;function Sv(){return Ff||(Ff=1,Ro.exports=pv()),Ro.exports}var Mo={exports:{}},St={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Pf;function yv(){if(Pf)return St;Pf=1;var q=Uo();function ae(d){var _="https://react.dev/errors/"+d;if(1<arguments.length){_+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)_+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+d+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ne(){}var I={d:{f:ne,r:function(){throw Error(ae(522))},D:ne,C:ne,L:ne,m:ne,X:ne,S:ne,M:ne},p:0,findDOMNode:null},re=Symbol.for("react.portal");function J(d,_,v){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:o==null?null:""+o,children:d,containerInfo:_,implementation:v}}var W=q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(d,_){if(d==="font")return"";if(typeof _=="string")return _==="use-credentials"?_:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,St.createPortal=function(d,_){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)throw Error(ae(299));return J(d,_,null,v)},St.flushSync=function(d){var _=W.T,v=I.p;try{if(W.T=null,I.p=2,d)return d()}finally{W.T=_,I.p=v,I.d.f()}},St.preconnect=function(d,_){typeof d=="string"&&(_?(_=_.crossOrigin,_=typeof _=="string"?_==="use-credentials"?_:"":void 0):_=null,I.d.C(d,_))},St.prefetchDNS=function(d){typeof d=="string"&&I.d.D(d)},St.preinit=function(d,_){if(typeof d=="string"&&_&&typeof _.as=="string"){var v=_.as,o=a(v,_.crossOrigin),g=typeof _.integrity=="string"?_.integrity:void 0,y=typeof _.fetchPriority=="string"?_.fetchPriority:void 0;v==="style"?I.d.S(d,typeof _.precedence=="string"?_.precedence:void 0,{crossOrigin:o,integrity:g,fetchPriority:y}):v==="script"&&I.d.X(d,{crossOrigin:o,integrity:g,fetchPriority:y,nonce:typeof _.nonce=="string"?_.nonce:void 0})}},St.preinitModule=function(d,_){if(typeof d=="string")if(typeof _=="object"&&_!==null){if(_.as==null||_.as==="script"){var v=a(_.as,_.crossOrigin);I.d.M(d,{crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0})}}else _==null&&I.d.M(d)},St.preload=function(d,_){if(typeof d=="string"&&typeof _=="object"&&_!==null&&typeof _.as=="string"){var v=_.as,o=a(v,_.crossOrigin);I.d.L(d,v,{crossOrigin:o,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,type:typeof _.type=="string"?_.type:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0,referrerPolicy:typeof _.referrerPolicy=="string"?_.referrerPolicy:void 0,imageSrcSet:typeof _.imageSrcSet=="string"?_.imageSrcSet:void 0,imageSizes:typeof _.imageSizes=="string"?_.imageSizes:void 0,media:typeof _.media=="string"?_.media:void 0})}},St.preloadModule=function(d,_){if(typeof d=="string")if(_){var v=a(_.as,_.crossOrigin);I.d.m(d,{as:typeof _.as=="string"&&_.as!=="script"?_.as:void 0,crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0})}else I.d.m(d)},St.requestFormReset=function(d){I.d.r(d)},St.unstable_batchedUpdates=function(d,_){return d(_)},St.useFormState=function(d,_,v){return W.H.useFormState(d,_,v)},St.useFormStatus=function(){return W.H.useHostTransitionStatus()},St.version="19.2.4",St}var qf;function bv(){if(qf)return Mo.exports;qf=1;function q(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q)}catch(ae){console.error(ae)}}return q(),Mo.exports=yv(),Mo.exports}/**
33
+ */var Pf;function yv(){if(Pf)return St;Pf=1;var P=Uo();function ae(d){var _="https://react.dev/errors/"+d;if(1<arguments.length){_+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)_+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+d+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ne(){}var I={d:{f:ne,r:function(){throw Error(ae(522))},D:ne,C:ne,L:ne,m:ne,X:ne,S:ne,M:ne},p:0,findDOMNode:null},re=Symbol.for("react.portal");function J(d,_,v){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:o==null?null:""+o,children:d,containerInfo:_,implementation:v}}var W=P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(d,_){if(d==="font")return"";if(typeof _=="string")return _==="use-credentials"?_:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,St.createPortal=function(d,_){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)throw Error(ae(299));return J(d,_,null,v)},St.flushSync=function(d){var _=W.T,v=I.p;try{if(W.T=null,I.p=2,d)return d()}finally{W.T=_,I.p=v,I.d.f()}},St.preconnect=function(d,_){typeof d=="string"&&(_?(_=_.crossOrigin,_=typeof _=="string"?_==="use-credentials"?_:"":void 0):_=null,I.d.C(d,_))},St.prefetchDNS=function(d){typeof d=="string"&&I.d.D(d)},St.preinit=function(d,_){if(typeof d=="string"&&_&&typeof _.as=="string"){var v=_.as,o=a(v,_.crossOrigin),g=typeof _.integrity=="string"?_.integrity:void 0,y=typeof _.fetchPriority=="string"?_.fetchPriority:void 0;v==="style"?I.d.S(d,typeof _.precedence=="string"?_.precedence:void 0,{crossOrigin:o,integrity:g,fetchPriority:y}):v==="script"&&I.d.X(d,{crossOrigin:o,integrity:g,fetchPriority:y,nonce:typeof _.nonce=="string"?_.nonce:void 0})}},St.preinitModule=function(d,_){if(typeof d=="string")if(typeof _=="object"&&_!==null){if(_.as==null||_.as==="script"){var v=a(_.as,_.crossOrigin);I.d.M(d,{crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0})}}else _==null&&I.d.M(d)},St.preload=function(d,_){if(typeof d=="string"&&typeof _=="object"&&_!==null&&typeof _.as=="string"){var v=_.as,o=a(v,_.crossOrigin);I.d.L(d,v,{crossOrigin:o,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,type:typeof _.type=="string"?_.type:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0,referrerPolicy:typeof _.referrerPolicy=="string"?_.referrerPolicy:void 0,imageSrcSet:typeof _.imageSrcSet=="string"?_.imageSrcSet:void 0,imageSizes:typeof _.imageSizes=="string"?_.imageSizes:void 0,media:typeof _.media=="string"?_.media:void 0})}},St.preloadModule=function(d,_){if(typeof d=="string")if(_){var v=a(_.as,_.crossOrigin);I.d.m(d,{as:typeof _.as=="string"&&_.as!=="script"?_.as:void 0,crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0})}else I.d.m(d)},St.requestFormReset=function(d){I.d.r(d)},St.unstable_batchedUpdates=function(d,_){return d(_)},St.useFormState=function(d,_,v){return W.H.useFormState(d,_,v)},St.useFormStatus=function(){return W.H.useHostTransitionStatus()},St.version="19.2.4",St}var qf;function bv(){if(qf)return Mo.exports;qf=1;function P(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P)}catch(ae){console.error(ae)}}return P(),Mo.exports=yv(),Mo.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,23 +38,23 @@
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var Gf;function Cv(){if(Gf)return Wr;Gf=1;var q=Sv(),ae=Uo(),ne=bv();function I(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function re(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function J(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 W(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 a(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 d(e){if(J(e)!==e)throw Error(I(188))}function _(e){var t=e.alternate;if(!t){if(t=J(e),t===null)throw Error(I(188));return t!==e?null:e}for(var i=e,s=t;;){var n=i.return;if(n===null)break;var u=n.alternate;if(u===null){if(s=n.return,s!==null){i=s;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===i)return d(n),e;if(u===s)return d(n),t;u=u.sibling}throw Error(I(188))}if(i.return!==s.return)i=n,s=u;else{for(var x=!1,B=n.child;B;){if(B===i){x=!0,i=n,s=u;break}if(B===s){x=!0,s=n,i=u;break}B=B.sibling}if(!x){for(B=u.child;B;){if(B===i){x=!0,i=u,s=n;break}if(B===s){x=!0,s=u,i=n;break}B=B.sibling}if(!x)throw Error(I(189))}}if(i.alternate!==s)throw Error(I(190))}if(i.tag!==3)throw Error(I(188));return i.stateNode.current===i?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var o=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),T=Symbol.iterator;function D(e){return e===null||typeof e!="object"?null:(e=T&&e[T]||e["@@iterator"],typeof e=="function"?e:null)}var M=Symbol.for("react.client.reference");function N(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case f:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case w:return"Suspense";case S:return"SuspenseList";case C:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case c:return e.displayName||"Context";case l:return(e._context.displayName||"Context")+".Consumer";case m:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case E:return t=e.displayName||null,t!==null?t:N(e.type)||"Memo";case p:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var X=Array.isArray,z=ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=ne.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},R=[],H=-1;function A(e){return{current:e}}function O(e){0>H||(e.current=R[H],R[H]=null,H--)}function $(e,t){H++,R[H]=e.current,e.current=t}var V=A(null),he=A(null),ue=A(null),j=A(null);function k(e,t){switch($(ue,t),$(he,e),$(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?nf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=nf(t),e=af(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(V),$(V,e)}function ie(){O(V),O(he),O(ue)}function ee(e){e.memoizedState!==null&&$(j,e);var t=V.current,i=af(t,e.type);t!==i&&($(he,e),$(V,i))}function de(e){he.current===e&&(O(V),O(he)),j.current===e&&(O(j),Ir._currentValue=P)}var fe,Ce;function me(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Ce=-1<i.stack.indexOf(`
41
+ */var Gf;function Cv(){if(Gf)return Wr;Gf=1;var P=Sv(),ae=Uo(),ne=bv();function I(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function re(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function J(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 W(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 a(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 d(e){if(J(e)!==e)throw Error(I(188))}function _(e){var t=e.alternate;if(!t){if(t=J(e),t===null)throw Error(I(188));return t!==e?null:e}for(var i=e,s=t;;){var n=i.return;if(n===null)break;var u=n.alternate;if(u===null){if(s=n.return,s!==null){i=s;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===i)return d(n),e;if(u===s)return d(n),t;u=u.sibling}throw Error(I(188))}if(i.return!==s.return)i=n,s=u;else{for(var x=!1,B=n.child;B;){if(B===i){x=!0,i=n,s=u;break}if(B===s){x=!0,s=n,i=u;break}B=B.sibling}if(!x){for(B=u.child;B;){if(B===i){x=!0,i=u,s=n;break}if(B===s){x=!0,s=u,i=n;break}B=B.sibling}if(!x)throw Error(I(189))}}if(i.alternate!==s)throw Error(I(190))}if(i.tag!==3)throw Error(I(188));return i.stateNode.current===i?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var o=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),T=Symbol.iterator;function D(e){return e===null||typeof e!="object"?null:(e=T&&e[T]||e["@@iterator"],typeof e=="function"?e:null)}var M=Symbol.for("react.client.reference");function N(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case f:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case w:return"Suspense";case S:return"SuspenseList";case C:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case c:return e.displayName||"Context";case l:return(e._context.displayName||"Context")+".Consumer";case m:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case E:return t=e.displayName||null,t!==null?t:N(e.type)||"Memo";case p:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var X=Array.isArray,z=ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=ne.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},R=[],H=-1;function A(e){return{current:e}}function O(e){0>H||(e.current=R[H],R[H]=null,H--)}function $(e,t){H++,R[H]=e.current,e.current=t}var V=A(null),he=A(null),ue=A(null),j=A(null);function k(e,t){switch($(ue,t),$(he,e),$(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?nf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=nf(t),e=af(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(V),$(V,e)}function ie(){O(V),O(he),O(ue)}function ee(e){e.memoizedState!==null&&$(j,e);var t=V.current,i=af(t,e.type);t!==i&&($(he,e),$(V,i))}function de(e){he.current===e&&(O(V),O(he)),j.current===e&&(O(j),Ir._currentValue=q)}var fe,Ce;function me(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Ce=-1<i.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+fe+e+Ce}var He=!1;function Ke(e,t){if(!e||He)return"";He=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(se){var Z=se}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(se){Z=se}e.call(ce.prototype)}}else{try{throw Error()}catch(se){Z=se}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(se){if(se&&Z&&typeof se.stack=="string")return[se.stack,Z.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),x=u[0],B=u[1];if(x&&B){var F=x.split(`
43
+ `+fe+e+Ce}var ze=!1;function Ke(e,t){if(!e||ze)return"";ze=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(se){var Z=se}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(se){Z=se}e.call(ce.prototype)}}else{try{throw Error()}catch(se){Z=se}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(se){if(se&&Z&&typeof se.stack=="string")return[se.stack,Z.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),x=u[0],B=u[1];if(x&&B){var F=x.split(`
44
44
  `),Q=B.split(`
45
45
  `);for(n=s=0;s<F.length&&!F[s].includes("DetermineComponentFrameRoot");)s++;for(;n<Q.length&&!Q[n].includes("DetermineComponentFrameRoot");)n++;if(s===F.length||n===Q.length)for(s=F.length-1,n=Q.length-1;1<=s&&0<=n&&F[s]!==Q[n];)n--;for(;1<=s&&0<=n;s--,n--)if(F[s]!==Q[n]){if(s!==1||n!==1)do if(s--,n--,0>n||F[s]!==Q[n]){var le=`
46
- `+F[s].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=s&&0<=n);break}}}finally{He=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?me(i):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me("Lazy");case 13:return e.child!==t&&t!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return Ke(e.type,!1);case 11:return Ke(e.type.render,!1);case 1:return Ke(e.type,!0);case 31:return me("Activity");default:return""}}function Dt(e){try{var t="",i=null;do t+=Se(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
46
+ `+F[s].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=s&&0<=n);break}}}finally{ze=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?me(i):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me("Lazy");case 13:return e.child!==t&&t!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return Ke(e.type,!1);case 11:return Ke(e.type.render,!1);case 1:return Ke(e.type,!0);case 31:return me("Activity");default:return""}}function Dt(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 Jt=Object.prototype.hasOwnProperty,Te=q.unstable_scheduleCallback,Le=q.unstable_cancelCallback,Re=q.unstable_shouldYield,_e=q.unstable_requestPaint,be=q.unstable_now,Qe=q.unstable_getCurrentPriorityLevel,Pe=q.unstable_ImmediatePriority,Ut=q.unstable_UserBlockingPriority,ot=q.unstable_NormalPriority,bt=q.unstable_LowPriority,Je=q.unstable_IdlePriority,qe=q.log,Ae=q.unstable_setDisableYieldValue,Vt=null,ht=null;function Mt(e){if(typeof qe=="function"&&Ae(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Vt,e)}catch{}}var pt=Math.clz32?Math.clz32:ua,ds=Math.log,ha=Math.LN2;function ua(e){return e>>>=0,e===0?32:31-(ds(e)/ha|0)|0}var wi=256,Yi=262144,Vi=4194304;function ri(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Vr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var n=0,u=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var B=s&134217727;return B!==0?(s=B&~u,s!==0?n=ri(s):(x&=B,x!==0?n=ri(x):i||(i=B&~e,i!==0&&(n=ri(i))))):(B=s&~u,B!==0?n=ri(B):x!==0?n=ri(x):i||(i=s&~e,i!==0&&(n=ri(i)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,i=t&-t,u>=i||u===32&&(i&4194048)!==0)?t:n}function Js(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function id(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 jo(){var e=Vi;return Vi<<=1,(Vi&62914560)===0&&(Vi=4194304),e}function fa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function er(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sd(e,t,i,s,n,u){var x=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 B=e.entanglements,F=e.expirationTimes,Q=e.hiddenUpdates;for(i=x&~i;0<i;){var le=31-pt(i),ce=1<<le;B[le]=0,F[le]=-1;var Z=Q[le];if(Z!==null)for(Q[le]=null,le=0;le<Z.length;le++){var se=Z[le];se!==null&&(se.lane&=-536870913)}i&=~ce}s!==0&&Io(e,s,0),u!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=u&~(x&~t))}function Io(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-pt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Fo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-pt(i),n=1<<s;n&t|e[s]&t&&(e[s]|=t),i&=~n}}function Po(e,t){var i=t&-t;return i=(i&42)!==0?1:da(i),(i&(e.suspendedLanes|t))!==0?0:i}function da(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 _a(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qo(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Df(e.type))}function Go(e,t){var i=U.p;try{return U.p=e,t()}finally{U.p=i}}var Ei=Math.random().toString(36).slice(2),dt="__reactFiber$"+Ei,Ct="__reactProps$"+Ei,_s="__reactContainer$"+Ei,va="__reactEvents$"+Ei,rd="__reactListeners$"+Ei,nd="__reactHandles$"+Ei,Wo="__reactResources$"+Ei,tr="__reactMarker$"+Ei;function ga(e){delete e[dt],delete e[Ct],delete e[va],delete e[rd],delete e[nd]}function vs(e){var t=e[dt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[_s]||i[dt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=df(e);e!==null;){if(i=e[dt])return i;e=df(e)}return t}e=i,i=e.parentNode}return null}function gs(e){if(e=e[dt]||e[_s]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ir(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(I(33))}function ms(e){var t=e[Wo];return t||(t=e[Wo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[tr]=!0}var $o=new Set,Xo={};function Ki(e,t){ps(e,t),ps(e+"Capture",t)}function ps(e,t){for(Xo[e]=t,e=0;e<t.length;e++)$o.add(t[e])}var ad=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]*$"),Yo={},Vo={};function ld(e){return Jt.call(Vo,e)?!0:Jt.call(Yo,e)?!1:ad.test(e)?Vo[e]=!0:(Yo[e]=!0,!1)}function Kr(e,t,i){if(ld(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 ni(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ko(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function od(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 n=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(x){i=""+x,u.call(this,x)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ma(e){if(!e._valueTracker){var t=Ko(e)?"checked":"value";e._valueTracker=od(e,t,""+e[t])}}function Qo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Ko(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 cd=/[\n"\\]/g;function It(e){return e.replace(cd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pa(e,t,i,s,n,u,x,B){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Sa(e,x,jt(t)):i!=null?Sa(e,x,jt(i)):s!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.name=""+jt(B):e.removeAttribute("name")}function Zo(e,t,i,s,n,u,x,B){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||i!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){ma(e);return}i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,B||t===e.value||(e.value=t),e.defaultValue=t}s=s??n,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=B?e.checked:!!s,e.defaultChecked=!!s,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),ma(e)}function Sa(e,t,i){t==="number"&&Zr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ss(e,t,i,s){if(e=e.options,t){t={};for(var n=0;n<i.length;n++)t["$"+i[n]]=!0;for(i=0;i<e.length;i++)n=t.hasOwnProperty("$"+e[i].value),e[i].selected!==n&&(e[i].selected=n),n&&s&&(e[i].defaultSelected=!0)}else{for(i=""+jt(i),t=null,n=0;n<e.length;n++){if(e[n].value===i){e[n].selected=!0,s&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Jo(e,t,i){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+jt(i):""}function ec(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(I(92));if(X(s)){if(1<s.length)throw Error(I(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=jt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),ma(e)}function ys(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var hd=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 tc(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||hd.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ic(e,t,i){if(t!=null&&typeof t!="object")throw Error(I(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 n in t)s=t[n],t.hasOwnProperty(n)&&i[n]!==s&&tc(e,n,s)}else for(var u in t)t.hasOwnProperty(u)&&tc(e,u,t[u])}function ya(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 ud=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),fd=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Jr(e){return fd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ai(){}var ba=null;function Ca(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bs=null,Cs=null;function sc(e){var t=gs(e);if(t&&(e=t.stateNode)){var i=e[Ct]||null;e:switch(e=t.stateNode,t.type){case"input":if(pa(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="'+It(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var n=s[Ct]||null;if(!n)throw Error(I(90));pa(s,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Qo(s)}break e;case"textarea":Jo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ss(e,!!i.multiple,t,!1)}}}var wa=!1;function rc(e,t,i){if(wa)return e(t,i);wa=!0;try{var s=e(t);return s}finally{if(wa=!1,(bs!==null||Cs!==null)&&(Fn(),bs&&(t=bs,e=Cs,Cs=bs=null,sc(t),e)))for(t=0;t<e.length;t++)sc(e[t])}}function sr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Ct]||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(I(231,t,typeof i));return i}var li=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ea=!1;if(li)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){Ea=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{Ea=!1}var xi=null,xa=null,en=null;function nc(){if(en)return en;var e,t=xa,i=t.length,s,n="value"in xi?xi.value:xi.textContent,u=n.length;for(e=0;e<i&&t[e]===n[e];e++);var x=i-e;for(s=1;s<=x&&t[i-s]===n[u-s];s++);return en=n.slice(e,1<s?1-s:void 0)}function tn(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 sn(){return!0}function ac(){return!1}function wt(e){function t(i,s,n,u,x){this._reactName=i,this._targetInst=n,this.type=s,this.nativeEvent=u,this.target=x,this.currentTarget=null;for(var B in e)e.hasOwnProperty(B)&&(i=e[B],this[B]=i?i(u):u[B]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?sn:ac,this.isPropagationStopped=ac,this}return o(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=sn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=sn)},persist:function(){},isPersistent:sn}),t}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rn=wt(Qi),nr=o({},Qi,{view:0,detail:0}),dd=wt(nr),La,Aa,ar,nn=o({},nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Da,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!==ar&&(ar&&e.type==="mousemove"?(La=e.screenX-ar.screenX,Aa=e.screenY-ar.screenY):Aa=La=0,ar=e),La)},movementY:function(e){return"movementY"in e?e.movementY:Aa}}),lc=wt(nn),_d=o({},nn,{dataTransfer:0}),vd=wt(_d),gd=o({},nr,{relatedTarget:0}),Ra=wt(gd),md=o({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),pd=wt(md),Sd=o({},Qi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yd=wt(Sd),bd=o({},Qi,{data:0}),oc=wt(bd),Cd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wd={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"},Ed={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ed[e])?!!t[e]:!1}function Da(){return xd}var Ld=o({},nr,{key:function(e){if(e.key){var t=Cd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Da,charCode:function(e){return e.type==="keypress"?tn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ad=wt(Ld),Rd=o({},nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cc=wt(Rd),Dd=o({},nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Da}),Md=wt(Dd),Td=o({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bd=wt(Td),Od=o({},nn,{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}),kd=wt(Od),Hd=o({},Qi,{newState:0,oldState:0}),zd=wt(Hd),Nd=[9,13,27,32],Ma=li&&"CompositionEvent"in window,lr=null;li&&"documentMode"in document&&(lr=document.documentMode);var Ud=li&&"TextEvent"in window&&!lr,hc=li&&(!Ma||lr&&8<lr&&11>=lr),uc=" ",fc=!1;function dc(e,t){switch(e){case"keyup":return Nd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _c(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function jd(e,t){switch(e){case"compositionend":return _c(t);case"keypress":return t.which!==32?null:(fc=!0,uc);case"textInput":return e=t.data,e===uc&&fc?null:e;default:return null}}function Id(e,t){if(ws)return e==="compositionend"||!Ma&&dc(e,t)?(e=nc(),en=xa=xi=null,ws=!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 hc&&t.locale!=="ko"?null:t.data;default:return null}}var Fd={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 vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fd[e.type]:t==="textarea"}function gc(e,t,i,s){bs?Cs?Cs.push(s):Cs=[s]:bs=s,t=Yn(t,"onChange"),0<t.length&&(i=new rn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var or=null,cr=null;function Pd(e){Zu(e,0)}function an(e){var t=ir(e);if(Qo(t))return e}function mc(e,t){if(e==="change")return t}var pc=!1;if(li){var Ta;if(li){var Ba="oninput"in document;if(!Ba){var Sc=document.createElement("div");Sc.setAttribute("oninput","return;"),Ba=typeof Sc.oninput=="function"}Ta=Ba}else Ta=!1;pc=Ta&&(!document.documentMode||9<document.documentMode)}function yc(){or&&(or.detachEvent("onpropertychange",bc),cr=or=null)}function bc(e){if(e.propertyName==="value"&&an(cr)){var t=[];gc(t,cr,e,Ca(e)),rc(Pd,t)}}function qd(e,t,i){e==="focusin"?(yc(),or=t,cr=i,or.attachEvent("onpropertychange",bc)):e==="focusout"&&yc()}function Gd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return an(cr)}function Wd(e,t){if(e==="click")return an(t)}function $d(e,t){if(e==="input"||e==="change")return an(t)}function Xd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:Xd;function hr(e,t){if(Tt(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 n=i[s];if(!Jt.call(t,n)||!Tt(e[n],t[n]))return!1}return!0}function Cc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wc(e,t){var i=Cc(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=Cc(i)}}function Ec(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ec(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xc(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 Oa(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 Yd=li&&"documentMode"in document&&11>=document.documentMode,Es=null,ka=null,ur=null,Ha=!1;function Lc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ha||Es==null||Es!==Zr(s)||(s=Es,"selectionStart"in s&&Oa(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}),ur&&hr(ur,s)||(ur=s,s=Yn(ka,"onSelect"),0<s.length&&(t=new rn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function Zi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var xs={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},za={},Ac={};li&&(Ac=document.createElement("div").style,"AnimationEvent"in window||(delete xs.animationend.animation,delete xs.animationiteration.animation,delete xs.animationstart.animation),"TransitionEvent"in window||delete xs.transitionend.transition);function Ji(e){if(za[e])return za[e];if(!xs[e])return e;var t=xs[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ac)return za[e]=t[i];return e}var Rc=Ji("animationend"),Dc=Ji("animationiteration"),Mc=Ji("animationstart"),Vd=Ji("transitionrun"),Kd=Ji("transitionstart"),Qd=Ji("transitioncancel"),Tc=Ji("transitionend"),Bc=new Map,Na="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(" ");Na.push("scrollEnd");function Kt(e,t){Bc.set(e,t),Ki(t,[e])}var ln=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)},Ft=[],Ls=0,Ua=0;function on(){for(var e=Ls,t=Ua=Ls=0;t<e;){var i=Ft[t];Ft[t++]=null;var s=Ft[t];Ft[t++]=null;var n=Ft[t];Ft[t++]=null;var u=Ft[t];if(Ft[t++]=null,s!==null&&n!==null){var x=s.pending;x===null?n.next=n:(n.next=x.next,x.next=n),s.pending=n}u!==0&&Oc(i,n,u)}}function cn(e,t,i,s){Ft[Ls++]=e,Ft[Ls++]=t,Ft[Ls++]=i,Ft[Ls++]=s,Ua|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ja(e,t,i,s){return cn(e,t,i,s),hn(e)}function es(e,t){return cn(e,null,null,t),hn(e)}function Oc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var n=!1,u=e.return;u!==null;)u.childLanes|=i,s=u.alternate,s!==null&&(s.childLanes|=i),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(n=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,n&&t!==null&&(n=31-pt(i),e=u.hiddenUpdates,s=e[n],s===null?e[n]=[t]:s.push(t),t.lane=i|536870912),u):null}function hn(e){if(50<Or)throw Or=0,Yl=null,Error(I(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var As={};function Zd(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 Bt(e,t,i,s){return new Zd(e,t,i,s)}function Ia(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var i=e.alternate;return i===null?(i=Bt(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 kc(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,n,u){var x=0;if(s=e,typeof e=="function")Ia(e)&&(x=1);else if(typeof e=="string")x=sv(e,i,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case C:return e=Bt(31,i,t,n),e.elementType=C,e.lanes=u,e;case f:return ts(i.children,n,u,t);case r:x=8,n|=24;break;case h:return e=Bt(12,i,t,n|2),e.elementType=h,e.lanes=u,e;case w:return e=Bt(13,i,t,n),e.elementType=w,e.lanes=u,e;case S:return e=Bt(19,i,t,n),e.elementType=S,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c:x=10;break e;case l:x=9;break e;case m:x=11;break e;case E:x=14;break e;case p:x=16,s=null;break e}x=29,i=Error(I(130,e===null?"null":typeof e,"")),s=null}return t=Bt(x,i,t,n),t.elementType=e,t.type=s,t.lanes=u,t}function ts(e,t,i,s){return e=Bt(7,e,s,t),e.lanes=i,e}function Fa(e,t,i){return e=Bt(6,e,null,t),e.lanes=i,e}function Hc(e){var t=Bt(18,null,null,0);return t.stateNode=e,t}function Pa(e,t,i){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zc=new WeakMap;function Pt(e,t){if(typeof e=="object"&&e!==null){var i=zc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Dt(t)},zc.set(e,t),t)}return{value:e,source:t,stack:Dt(t)}}var Rs=[],Ds=0,fn=null,fr=0,qt=[],Gt=0,Li=null,ei=1,ti="";function ci(e,t){Rs[Ds++]=fr,Rs[Ds++]=fn,fn=e,fr=t}function Nc(e,t,i){qt[Gt++]=ei,qt[Gt++]=ti,qt[Gt++]=Li,Li=e;var s=ei;e=ti;var n=32-pt(s)-1;s&=~(1<<n),i+=1;var u=32-pt(t)+n;if(30<u){var x=n-n%5;u=(s&(1<<x)-1).toString(32),s>>=x,n-=x,ei=1<<32-pt(t)+n|i<<n|s,ti=u+e}else ei=1<<u|i<<n|s,ti=e}function qa(e){e.return!==null&&(ci(e,1),Nc(e,1,0))}function Ga(e){for(;e===fn;)fn=Rs[--Ds],Rs[Ds]=null,fr=Rs[--Ds],Rs[Ds]=null;for(;e===Li;)Li=qt[--Gt],qt[Gt]=null,ti=qt[--Gt],qt[Gt]=null,ei=qt[--Gt],qt[Gt]=null}function Uc(e,t){qt[Gt++]=ei,qt[Gt++]=ti,qt[Gt++]=Li,ei=t.id,ti=t.overflow,Li=e}var _t=null,Ye=null,ke=!1,Ai=null,Wt=!1,Wa=Error(I(519));function Ri(e){var t=Error(I(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dr(Pt(t,e)),Wa}function jc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[dt]=e,t[Ct]=s,i){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(i=0;i<Hr.length;i++)Me(Hr[i],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),Zo(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),ec(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||sf(t.textContent,i)?(s.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),s.onScroll!=null&&Me("scroll",t),s.onScrollEnd!=null&&Me("scrollend",t),s.onClick!=null&&(t.onclick=ai),t=!0):t=!1,t||Ri(e,!0)}function Ic(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:_t=_t.return}}function Ms(e){if(e!==_t)return!1;if(!ke)return Ic(e),ke=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||co(e.type,e.memoizedProps)),i=!i),i&&Ye&&Ri(e),Ic(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));Ye=ff(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));Ye=ff(e)}else t===27?(t=Ye,Pi(e.type)?(e=vo,vo=null,Ye=e):Ye=t):Ye=_t?Xt(e.stateNode.nextSibling):null;return!0}function is(){Ye=_t=null,ke=!1}function $a(){var e=Ai;return e!==null&&(At===null?At=e:At.push.apply(At,e),Ai=null),e}function dr(e){Ai===null?Ai=[e]:Ai.push(e)}var Xa=A(null),ss=null,hi=null;function Di(e,t,i){$(Xa,t._currentValue),t._currentValue=i}function ui(e){e._currentValue=Xa.current,O(Xa)}function Ya(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 Va(e,t,i,s){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var u=n.dependencies;if(u!==null){var x=n.child;u=u.firstContext;e:for(;u!==null;){var B=u;u=n;for(var F=0;F<t.length;F++)if(B.context===t[F]){u.lanes|=i,B=u.alternate,B!==null&&(B.lanes|=i),Ya(u.return,i,e),s||(x=null);break e}u=B.next}}else if(n.tag===18){if(x=n.return,x===null)throw Error(I(341));x.lanes|=i,u=x.alternate,u!==null&&(u.lanes|=i),Ya(x,i,e),x=null}else x=n.child;if(x!==null)x.return=n;else for(x=n;x!==null;){if(x===e){x=null;break}if(n=x.sibling,n!==null){n.return=x.return,x=n;break}x=x.return}n=x}}function Ts(e,t,i,s){e=null;for(var n=t,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var x=n.alternate;if(x===null)throw Error(I(387));if(x=x.memoizedProps,x!==null){var B=n.type;Tt(n.pendingProps.value,x.value)||(e!==null?e.push(B):e=[B])}}else if(n===j.current){if(x=n.alternate,x===null)throw Error(I(387));x.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Ir):e=[Ir])}n=n.return}e!==null&&Va(t,e,i,s),t.flags|=262144}function dn(e){for(e=e.firstContext;e!==null;){if(!Tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function rs(e){ss=e,hi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return Fc(ss,e)}function _n(e,t){return ss===null&&rs(e),Fc(e,t)}function Fc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},hi===null){if(e===null)throw Error(I(308));hi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else hi=hi.next=t;return i}var Jd=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()})}},e_=q.unstable_scheduleCallback,t_=q.unstable_NormalPriority,rt={$$typeof:c,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ka(){return{controller:new Jd,data:new Map,refCount:0}}function _r(e){e.refCount--,e.refCount===0&&e_(t_,function(){e.controller.abort()})}var vr=null,Qa=0,Bs=0,Os=null;function i_(e,t){if(vr===null){var i=vr=[];Qa=0,Bs=eo(),Os={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Qa++,t.then(Pc,Pc),t}function Pc(){if(--Qa===0&&vr!==null){Os!==null&&(Os.status="fulfilled");var e=vr;vr=null,Bs=0,Os=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function s_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(n){i.push(n)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var n=0;n<i.length;n++)(0,i[n])(t)},function(n){for(s.status="rejected",s.reason=n,n=0;n<i.length;n++)(0,i[n])(void 0)}),s}var qc=z.S;z.S=function(e,t){Lu=be(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&i_(e,t),qc!==null&&qc(e,t)};var ns=A(null);function Za(){var e=ns.current;return e!==null?e:Xe.pooledCache}function vn(e,t){t===null?$(ns,ns.current):$(ns,t.pool)}function Gc(){var e=Za();return e===null?null:{parent:rt._currentValue,pool:e}}var ks=Error(I(460)),Ja=Error(I(474)),gn=Error(I(542)),mn={then:function(){}};function Wc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $c(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ai,ai),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yc(e),e;default:if(typeof t.status=="string")t.then(ai,ai);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(I(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=s}},function(s){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yc(e),e}throw ls=t,ks}}function as(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ls=i,ks):i}}var ls=null;function Xc(){if(ls===null)throw Error(I(459));var e=ls;return ls=null,e}function Yc(e){if(e===ks||e===gn)throw Error(I(483))}var Hs=null,gr=0;function pn(e){var t=gr;return gr+=1,Hs===null&&(Hs=[]),$c(Hs,e,t)}function mr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Sn(e,t){throw t.$$typeof===g?Error(I(525)):(e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Vc(e){function t(Y,G){if(e){var K=Y.deletions;K===null?(Y.deletions=[G],Y.flags|=16):K.push(G)}}function i(Y,G){if(!e)return null;for(;G!==null;)t(Y,G),G=G.sibling;return null}function s(Y){for(var G=new Map;Y!==null;)Y.key!==null?G.set(Y.key,Y):G.set(Y.index,Y),Y=Y.sibling;return G}function n(Y,G){return Y=oi(Y,G),Y.index=0,Y.sibling=null,Y}function u(Y,G,K){return Y.index=K,e?(K=Y.alternate,K!==null?(K=K.index,K<G?(Y.flags|=67108866,G):K):(Y.flags|=67108866,G)):(Y.flags|=1048576,G)}function x(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function B(Y,G,K,oe){return G===null||G.tag!==6?(G=Fa(K,Y.mode,oe),G.return=Y,G):(G=n(G,K),G.return=Y,G)}function F(Y,G,K,oe){var pe=K.type;return pe===f?le(Y,G,K.props.children,oe,K.key):G!==null&&(G.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===p&&as(pe)===G.type)?(G=n(G,K.props),mr(G,K),G.return=Y,G):(G=un(K.type,K.key,K.props,null,Y.mode,oe),mr(G,K),G.return=Y,G)}function Q(Y,G,K,oe){return G===null||G.tag!==4||G.stateNode.containerInfo!==K.containerInfo||G.stateNode.implementation!==K.implementation?(G=Pa(K,Y.mode,oe),G.return=Y,G):(G=n(G,K.children||[]),G.return=Y,G)}function le(Y,G,K,oe,pe){return G===null||G.tag!==7?(G=ts(K,Y.mode,oe,pe),G.return=Y,G):(G=n(G,K),G.return=Y,G)}function ce(Y,G,K){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=Fa(""+G,Y.mode,K),G.return=Y,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case y:return K=un(G.type,G.key,G.props,null,Y.mode,K),mr(K,G),K.return=Y,K;case b:return G=Pa(G,Y.mode,K),G.return=Y,G;case p:return G=as(G),ce(Y,G,K)}if(X(G)||D(G))return G=ts(G,Y.mode,K,null),G.return=Y,G;if(typeof G.then=="function")return ce(Y,pn(G),K);if(G.$$typeof===c)return ce(Y,_n(Y,G),K);Sn(Y,G)}return null}function Z(Y,G,K,oe){var pe=G!==null?G.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return pe!==null?null:B(Y,G,""+K,oe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case y:return K.key===pe?F(Y,G,K,oe):null;case b:return K.key===pe?Q(Y,G,K,oe):null;case p:return K=as(K),Z(Y,G,K,oe)}if(X(K)||D(K))return pe!==null?null:le(Y,G,K,oe,null);if(typeof K.then=="function")return Z(Y,G,pn(K),oe);if(K.$$typeof===c)return Z(Y,G,_n(Y,K),oe);Sn(Y,K)}return null}function se(Y,G,K,oe,pe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Y=Y.get(K)||null,B(G,Y,""+oe,pe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case y:return Y=Y.get(oe.key===null?K:oe.key)||null,F(G,Y,oe,pe);case b:return Y=Y.get(oe.key===null?K:oe.key)||null,Q(G,Y,oe,pe);case p:return oe=as(oe),se(Y,G,K,oe,pe)}if(X(oe)||D(oe))return Y=Y.get(K)||null,le(G,Y,oe,pe,null);if(typeof oe.then=="function")return se(Y,G,K,pn(oe),pe);if(oe.$$typeof===c)return se(Y,G,K,_n(G,oe),pe);Sn(G,oe)}return null}function ve(Y,G,K,oe){for(var pe=null,Ne=null,ge=G,xe=G=0,Oe=null;ge!==null&&xe<K.length;xe++){ge.index>xe?(Oe=ge,ge=null):Oe=ge.sibling;var Ue=Z(Y,ge,K[xe],oe);if(Ue===null){ge===null&&(ge=Oe);break}e&&ge&&Ue.alternate===null&&t(Y,ge),G=u(Ue,G,xe),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue,ge=Oe}if(xe===K.length)return i(Y,ge),ke&&ci(Y,xe),pe;if(ge===null){for(;xe<K.length;xe++)ge=ce(Y,K[xe],oe),ge!==null&&(G=u(ge,G,xe),Ne===null?pe=ge:Ne.sibling=ge,Ne=ge);return ke&&ci(Y,xe),pe}for(ge=s(ge);xe<K.length;xe++)Oe=se(ge,Y,xe,K[xe],oe),Oe!==null&&(e&&Oe.alternate!==null&&ge.delete(Oe.key===null?xe:Oe.key),G=u(Oe,G,xe),Ne===null?pe=Oe:Ne.sibling=Oe,Ne=Oe);return e&&ge.forEach(function(Xi){return t(Y,Xi)}),ke&&ci(Y,xe),pe}function ye(Y,G,K,oe){if(K==null)throw Error(I(151));for(var pe=null,Ne=null,ge=G,xe=G=0,Oe=null,Ue=K.next();ge!==null&&!Ue.done;xe++,Ue=K.next()){ge.index>xe?(Oe=ge,ge=null):Oe=ge.sibling;var Xi=Z(Y,ge,Ue.value,oe);if(Xi===null){ge===null&&(ge=Oe);break}e&&ge&&Xi.alternate===null&&t(Y,ge),G=u(Xi,G,xe),Ne===null?pe=Xi:Ne.sibling=Xi,Ne=Xi,ge=Oe}if(Ue.done)return i(Y,ge),ke&&ci(Y,xe),pe;if(ge===null){for(;!Ue.done;xe++,Ue=K.next())Ue=ce(Y,Ue.value,oe),Ue!==null&&(G=u(Ue,G,xe),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue);return ke&&ci(Y,xe),pe}for(ge=s(ge);!Ue.done;xe++,Ue=K.next())Ue=se(ge,Y,xe,Ue.value,oe),Ue!==null&&(e&&Ue.alternate!==null&&ge.delete(Ue.key===null?xe:Ue.key),G=u(Ue,G,xe),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue);return e&&ge.forEach(function(_v){return t(Y,_v)}),ke&&ci(Y,xe),pe}function $e(Y,G,K,oe){if(typeof K=="object"&&K!==null&&K.type===f&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case y:e:{for(var pe=K.key;G!==null;){if(G.key===pe){if(pe=K.type,pe===f){if(G.tag===7){i(Y,G.sibling),oe=n(G,K.props.children),oe.return=Y,Y=oe;break e}}else if(G.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===p&&as(pe)===G.type){i(Y,G.sibling),oe=n(G,K.props),mr(oe,K),oe.return=Y,Y=oe;break e}i(Y,G);break}else t(Y,G);G=G.sibling}K.type===f?(oe=ts(K.props.children,Y.mode,oe,K.key),oe.return=Y,Y=oe):(oe=un(K.type,K.key,K.props,null,Y.mode,oe),mr(oe,K),oe.return=Y,Y=oe)}return x(Y);case b:e:{for(pe=K.key;G!==null;){if(G.key===pe)if(G.tag===4&&G.stateNode.containerInfo===K.containerInfo&&G.stateNode.implementation===K.implementation){i(Y,G.sibling),oe=n(G,K.children||[]),oe.return=Y,Y=oe;break e}else{i(Y,G);break}else t(Y,G);G=G.sibling}oe=Pa(K,Y.mode,oe),oe.return=Y,Y=oe}return x(Y);case p:return K=as(K),$e(Y,G,K,oe)}if(X(K))return ve(Y,G,K,oe);if(D(K)){if(pe=D(K),typeof pe!="function")throw Error(I(150));return K=pe.call(K),ye(Y,G,K,oe)}if(typeof K.then=="function")return $e(Y,G,pn(K),oe);if(K.$$typeof===c)return $e(Y,G,_n(Y,K),oe);Sn(Y,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,G!==null&&G.tag===6?(i(Y,G.sibling),oe=n(G,K),oe.return=Y,Y=oe):(i(Y,G),oe=Fa(K,Y.mode,oe),oe.return=Y,Y=oe),x(Y)):i(Y,G)}return function(Y,G,K,oe){try{gr=0;var pe=$e(Y,G,K,oe);return Hs=null,pe}catch(ge){if(ge===ks||ge===gn)throw ge;var Ne=Bt(29,ge,null,Y.mode);return Ne.lanes=oe,Ne.return=Y,Ne}finally{}}}var os=Vc(!0),Kc=Vc(!1),Mi=!1;function el(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tl(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 Ti(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Bi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(je&2)!==0){var n=s.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t,t=hn(e),Oc(e,null,i),t}return cn(e,s,t,i),hn(e)}function pr(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,Fo(e,i)}}function il(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var n=null,u=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};u===null?n=u=x:u=u.next=x,i=i.next}while(i!==null);u===null?n=u=t:u=u.next=t}else n=u=t;i={baseState:s.baseState,firstBaseUpdate:n,lastBaseUpdate:u,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 sl=!1;function Sr(){if(sl){var e=Os;if(e!==null)throw e}}function yr(e,t,i,s){sl=!1;var n=e.updateQueue;Mi=!1;var u=n.firstBaseUpdate,x=n.lastBaseUpdate,B=n.shared.pending;if(B!==null){n.shared.pending=null;var F=B,Q=F.next;F.next=null,x===null?u=Q:x.next=Q,x=F;var le=e.alternate;le!==null&&(le=le.updateQueue,B=le.lastBaseUpdate,B!==x&&(B===null?le.firstBaseUpdate=Q:B.next=Q,le.lastBaseUpdate=F))}if(u!==null){var ce=n.baseState;x=0,le=Q=F=null,B=u;do{var Z=B.lane&-536870913,se=Z!==B.lane;if(se?(Be&Z)===Z:(s&Z)===Z){Z!==0&&Z===Bs&&(sl=!0),le!==null&&(le=le.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var ve=e,ye=B;Z=t;var $e=i;switch(ye.tag){case 1:if(ve=ye.payload,typeof ve=="function"){ce=ve.call($e,ce,Z);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ye.payload,Z=typeof ve=="function"?ve.call($e,ce,Z):ve,Z==null)break e;ce=o({},ce,Z);break e;case 2:Mi=!0}}Z=B.callback,Z!==null&&(e.flags|=64,se&&(e.flags|=8192),se=n.callbacks,se===null?n.callbacks=[Z]:se.push(Z))}else se={lane:Z,tag:B.tag,payload:B.payload,callback:B.callback,next:null},le===null?(Q=le=se,F=ce):le=le.next=se,x|=Z;if(B=B.next,B===null){if(B=n.shared.pending,B===null)break;se=B,B=se.next,se.next=null,n.lastBaseUpdate=se,n.shared.pending=null}}while(!0);le===null&&(F=ce),n.baseState=F,n.firstBaseUpdate=Q,n.lastBaseUpdate=le,u===null&&(n.shared.lanes=0),Ni|=x,e.lanes=x,e.memoizedState=ce}}function Qc(e,t){if(typeof e!="function")throw Error(I(191,e));e.call(t)}function Zc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Qc(i[e],t)}var zs=A(null),yn=A(0);function Jc(e,t){e=yi,$(yn,e),$(zs,t),yi=e|t.baseLanes}function rl(){$(yn,yi),$(zs,zs.current)}function nl(){yi=yn.current,O(zs),O(yn)}var Ot=A(null),$t=null;function Oi(e){var t=e.alternate;$(it,it.current&1),$(Ot,e),$t===null&&(t===null||zs.current!==null||t.memoizedState!==null)&&($t=e)}function al(e){$(it,it.current),$(Ot,e),$t===null&&($t=e)}function eh(e){e.tag===22?($(it,it.current),$(Ot,e),$t===null&&($t=e)):ki()}function ki(){$(it,it.current),$(Ot,Ot.current)}function kt(e){O(Ot),$t===e&&($t=null),O(it)}var it=A(0);function bn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||fo(i)||_o(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 fi=0,Ee=null,Ge=null,nt=null,Cn=!1,Ns=!1,cs=!1,wn=0,br=0,Us=null,r_=0;function et(){throw Error(I(321))}function ll(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Tt(e[i],t[i]))return!1;return!0}function ol(e,t,i,s,n,u){return fi=u,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Nh:wl,cs=!1,u=i(s,n),cs=!1,Ns&&(u=ih(t,i,s,n)),th(e),u}function th(e){z.H=Er;var t=Ge!==null&&Ge.next!==null;if(fi=0,nt=Ge=Ee=null,Cn=!1,br=0,Us=null,t)throw Error(I(300));e===null||at||(e=e.dependencies,e!==null&&dn(e)&&(at=!0))}function ih(e,t,i,s){Ee=e;var n=0;do{if(Ns&&(Us=null),br=0,Ns=!1,25<=n)throw Error(I(301));if(n+=1,nt=Ge=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=Uh,u=t(i,s)}while(Ns);return u}function n_(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Cr(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(Ee.flags|=1024),t}function cl(){var e=wn!==0;return wn=0,e}function hl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function ul(e){if(Cn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cn=!1}fi=0,nt=Ge=Ee=null,Ns=!1,br=wn=0,Us=null}function yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Ee.memoizedState=nt=e:nt=nt.next=e,nt}function st(){if(Ge===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=nt===null?Ee.memoizedState:nt.next;if(t!==null)nt=t,Ge=e;else{if(e===null)throw Ee.alternate===null?Error(I(467)):Error(I(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},nt===null?Ee.memoizedState=nt=e:nt=nt.next=e}return nt}function En(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cr(e){var t=br;return br+=1,Us===null&&(Us=[]),e=$c(Us,e,t),t=Ee,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Nh:wl),e}function xn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Cr(e);if(e.$$typeof===c)return vt(e)}throw Error(I(438,String(e)))}function fl(e){var t=null,i=Ee.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ee.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=En(),Ee.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=L;return t.index++,i}function di(e,t){return typeof t=="function"?t(e):t}function Ln(e){var t=st();return dl(t,Ge,e)}function dl(e,t,i){var s=e.queue;if(s===null)throw Error(I(311));s.lastRenderedReducer=i;var n=e.baseQueue,u=s.pending;if(u!==null){if(n!==null){var x=n.next;n.next=u.next,u.next=x}t.baseQueue=n=u,s.pending=null}if(u=e.baseState,n===null)e.memoizedState=u;else{t=n.next;var B=x=null,F=null,Q=t,le=!1;do{var ce=Q.lane&-536870913;if(ce!==Q.lane?(Be&ce)===ce:(fi&ce)===ce){var Z=Q.revertLane;if(Z===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ce===Bs&&(le=!0);else if((fi&Z)===Z){Q=Q.next,Z===Bs&&(le=!0);continue}else ce={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},F===null?(B=F=ce,x=u):F=F.next=ce,Ee.lanes|=Z,Ni|=Z;ce=Q.action,cs&&i(u,ce),u=Q.hasEagerState?Q.eagerState:i(u,ce)}else Z={lane:ce,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},F===null?(B=F=Z,x=u):F=F.next=Z,Ee.lanes|=ce,Ni|=ce;Q=Q.next}while(Q!==null&&Q!==t);if(F===null?x=u:F.next=B,!Tt(u,e.memoizedState)&&(at=!0,le&&(i=Os,i!==null)))throw i;e.memoizedState=u,e.baseState=x,e.baseQueue=F,s.lastRenderedState=u}return n===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function _l(e){var t=st(),i=t.queue;if(i===null)throw Error(I(311));i.lastRenderedReducer=e;var s=i.dispatch,n=i.pending,u=t.memoizedState;if(n!==null){i.pending=null;var x=n=n.next;do u=e(u,x.action),x=x.next;while(x!==n);Tt(u,t.memoizedState)||(at=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),i.lastRenderedState=u}return[u,s]}function sh(e,t,i){var s=Ee,n=st(),u=ke;if(u){if(i===void 0)throw Error(I(407));i=i()}else i=t();var x=!Tt((Ge||n).memoizedState,i);if(x&&(n.memoizedState=i,at=!0),n=n.queue,ml(ah.bind(null,s,n,e),[e]),n.getSnapshot!==t||x||nt!==null&&nt.memoizedState.tag&1){if(s.flags|=2048,js(9,{destroy:void 0},nh.bind(null,s,n,i,t),null),Xe===null)throw Error(I(349));u||(fi&127)!==0||rh(s,t,i)}return i}function rh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ee.updateQueue,t===null?(t=En(),Ee.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function nh(e,t,i,s){t.value=i,t.getSnapshot=s,lh(t)&&oh(e)}function ah(e,t,i){return i(function(){lh(t)&&oh(e)})}function lh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Tt(e,i)}catch{return!0}}function oh(e){var t=es(e,2);t!==null&&Rt(t,e,2)}function vl(e){var t=yt();if(typeof e=="function"){var i=e;if(e=i(),cs){Mt(!0);try{i()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:e},t}function ch(e,t,i,s){return e.baseState=i,dl(e,Ge,typeof s=="function"?s:di)}function a_(e,t,i,s,n){if(Dn(e))throw Error(I(485));if(e=t.action,e!==null){var u={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){u.listeners.push(x)}};z.T!==null?i(!0):u.isTransition=!1,s(u),i=t.pending,i===null?(u.next=t.pending=u,hh(t,u)):(u.next=i.next,t.pending=i.next=u)}}function hh(e,t){var i=t.action,s=t.payload,n=e.state;if(t.isTransition){var u=z.T,x={};z.T=x;try{var B=i(n,s),F=z.S;F!==null&&F(x,B),uh(e,t,B)}catch(Q){gl(e,t,Q)}finally{u!==null&&x.types!==null&&(u.types=x.types),z.T=u}}else try{u=i(n,s),uh(e,t,u)}catch(Q){gl(e,t,Q)}}function uh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){fh(e,t,s)},function(s){return gl(e,t,s)}):fh(e,t,i)}function fh(e,t,i){t.status="fulfilled",t.value=i,dh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,hh(e,i)))}function gl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,dh(t),t=t.next;while(t!==s)}e.action=null}function dh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _h(e,t){return t}function vh(e,t){if(ke){var i=Xe.formState;if(i!==null){e:{var s=Ee;if(ke){if(Ye){t:{for(var n=Ye,u=Wt;n.nodeType!==8;){if(!u){n=null;break t}if(n=Xt(n.nextSibling),n===null){n=null;break t}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){Ye=Xt(n.nextSibling),s=n.data==="F!";break e}}Ri(s)}s=!1}s&&(t=i[0])}}return i=yt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_h,lastRenderedState:t},i.queue=s,i=kh.bind(null,Ee,s),s.dispatch=i,s=vl(!1),u=Cl.bind(null,Ee,!1,s.queue),s=yt(),n={state:t,dispatch:null,action:e,pending:null},s.queue=n,i=a_.bind(null,Ee,n,u,i),n.dispatch=i,s.memoizedState=e,[t,i,!1]}function gh(e){var t=st();return mh(t,Ge,e)}function mh(e,t,i){if(t=dl(e,t,_h)[0],e=Ln(di)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Cr(t)}catch(x){throw x===ks?gn:x}else s=t;t=st();var n=t.queue,u=n.dispatch;return i!==t.memoizedState&&(Ee.flags|=2048,js(9,{destroy:void 0},l_.bind(null,n,i),null)),[s,u,e]}function l_(e,t){e.action=t}function ph(e){var t=st(),i=Ge;if(i!==null)return mh(t,i,e);st(),t=t.memoizedState,i=st();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function js(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=En(),Ee.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Sh(){return st().memoizedState}function An(e,t,i,s){var n=yt();Ee.flags|=e,n.memoizedState=js(1|t,{destroy:void 0},i,s===void 0?null:s)}function Rn(e,t,i,s){var n=st();s=s===void 0?null:s;var u=n.memoizedState.inst;Ge!==null&&s!==null&&ll(s,Ge.memoizedState.deps)?n.memoizedState=js(t,u,i,s):(Ee.flags|=e,n.memoizedState=js(1|t,u,i,s))}function yh(e,t){An(8390656,8,e,t)}function ml(e,t){Rn(2048,8,e,t)}function o_(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=En(),Ee.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function bh(e){var t=st().memoizedState;return o_({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(I(440));return t.impl.apply(void 0,arguments)}}function Ch(e,t){return Rn(4,2,e,t)}function wh(e,t){return Rn(4,4,e,t)}function Eh(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 xh(e,t,i){i=i!=null?i.concat([e]):null,Rn(4,4,Eh.bind(null,t,e),i)}function pl(){}function Lh(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ll(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Ah(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ll(t,s[1]))return s[0];if(s=e(),cs){Mt(!0);try{e()}finally{Mt(!1)}}return i.memoizedState=[s,t],s}function Sl(e,t,i){return i===void 0||(fi&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Ru(),Ee.lanes|=e,Ni|=e,i)}function Rh(e,t,i,s){return Tt(i,t)?i:zs.current!==null?(e=Sl(e,i,s),Tt(e,t)||(at=!0),e):(fi&42)===0||(fi&1073741824)!==0&&(Be&261930)===0?(at=!0,e.memoizedState=i):(e=Ru(),Ee.lanes|=e,Ni|=e,t)}function Dh(e,t,i,s,n){var u=U.p;U.p=u!==0&&8>u?u:8;var x=z.T,B={};z.T=B,Cl(e,!1,t,i);try{var F=n(),Q=z.S;if(Q!==null&&Q(B,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var le=s_(F,s);wr(e,t,le,Nt(e))}else wr(e,t,s,Nt(e))}catch(ce){wr(e,t,{then:function(){},status:"rejected",reason:ce},Nt())}finally{U.p=u,x!==null&&B.types!==null&&(x.types=B.types),z.T=x}}function c_(){}function yl(e,t,i,s){if(e.tag!==5)throw Error(I(476));var n=Mh(e).queue;Dh(e,n,t,P,i===null?c_:function(){return Th(e),i(s)})}function Mh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:P},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Th(e){var t=Mh(e);t.next===null&&(t=e.alternate.memoizedState),wr(e,t.next.queue,{},Nt())}function bl(){return vt(Ir)}function Bh(){return st().memoizedState}function Oh(){return st().memoizedState}function h_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Nt();e=Ti(i);var s=Bi(t,e,i);s!==null&&(Rt(s,t,i),pr(s,t,i)),t={cache:Ka()},e.payload=t;return}t=t.return}}function u_(e,t,i){var s=Nt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Dn(e)?Hh(t,i):(i=ja(e,t,i,s),i!==null&&(Rt(i,e,s),zh(i,t,s)))}function kh(e,t,i){var s=Nt();wr(e,t,i,s)}function wr(e,t,i,s){var n={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Dn(e))Hh(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var x=t.lastRenderedState,B=u(x,i);if(n.hasEagerState=!0,n.eagerState=B,Tt(B,x))return cn(e,t,n,0),Xe===null&&on(),!1}catch{}finally{}if(i=ja(e,t,n,s),i!==null)return Rt(i,e,s),zh(i,t,s),!0}return!1}function Cl(e,t,i,s){if(s={lane:2,revertLane:eo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Dn(e)){if(t)throw Error(I(479))}else t=ja(e,i,s,2),t!==null&&Rt(t,e,2)}function Dn(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Hh(e,t){Ns=Cn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function zh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Fo(e,i)}}var Er={readContext:vt,use:xn,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Er.useEffectEvent=et;var Nh={readContext:vt,use:xn,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:yh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,An(4194308,4,Eh.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=yt();t=t===void 0?null:t;var s=e();if(cs){Mt(!0);try{e()}finally{Mt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=yt();if(i!==void 0){var n=i(t);if(cs){Mt(!0);try{i(t)}finally{Mt(!1)}}}else n=t;return s.memoizedState=s.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=u_.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:function(e){e=vl(e);var t=e.queue,i=kh.bind(null,Ee,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:pl,useDeferredValue:function(e,t){var i=yt();return Sl(i,e,t)},useTransition:function(){var e=vl(!1);return e=Dh.bind(null,Ee,e.queue,!0,!1),yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ee,n=yt();if(ke){if(i===void 0)throw Error(I(407));i=i()}else{if(i=t(),Xe===null)throw Error(I(349));(Be&127)!==0||rh(s,t,i)}n.memoizedState=i;var u={value:i,getSnapshot:t};return n.queue=u,yh(ah.bind(null,s,u,e),[e]),s.flags|=2048,js(9,{destroy:void 0},nh.bind(null,s,u,i,t),null),i},useId:function(){var e=yt(),t=Xe.identifierPrefix;if(ke){var i=ti,s=ei;i=(s&~(1<<32-pt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=wn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=r_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bl,useFormState:vh,useActionState:vh,useOptimistic:function(e){var t=yt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Cl.bind(null,Ee,!0,i),i.dispatch=t,[e,t]},useMemoCache:fl,useCacheRefresh:function(){return yt().memoizedState=h_.bind(null,Ee)},useEffectEvent:function(e){var t=yt(),i={impl:e};return t.memoizedState=i,function(){if((je&2)!==0)throw Error(I(440));return i.impl.apply(void 0,arguments)}}},wl={readContext:vt,use:xn,useCallback:Lh,useContext:vt,useEffect:ml,useImperativeHandle:xh,useInsertionEffect:Ch,useLayoutEffect:wh,useMemo:Ah,useReducer:Ln,useRef:Sh,useState:function(){return Ln(di)},useDebugValue:pl,useDeferredValue:function(e,t){var i=st();return Rh(i,Ge.memoizedState,e,t)},useTransition:function(){var e=Ln(di)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Cr(e),t]},useSyncExternalStore:sh,useId:Bh,useHostTransitionStatus:bl,useFormState:gh,useActionState:gh,useOptimistic:function(e,t){var i=st();return ch(i,Ge,e,t)},useMemoCache:fl,useCacheRefresh:Oh};wl.useEffectEvent=bh;var Uh={readContext:vt,use:xn,useCallback:Lh,useContext:vt,useEffect:ml,useImperativeHandle:xh,useInsertionEffect:Ch,useLayoutEffect:wh,useMemo:Ah,useReducer:_l,useRef:Sh,useState:function(){return _l(di)},useDebugValue:pl,useDeferredValue:function(e,t){var i=st();return Ge===null?Sl(i,e,t):Rh(i,Ge.memoizedState,e,t)},useTransition:function(){var e=_l(di)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Cr(e),t]},useSyncExternalStore:sh,useId:Bh,useHostTransitionStatus:bl,useFormState:ph,useActionState:ph,useOptimistic:function(e,t){var i=st();return Ge!==null?ch(i,Ge,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:fl,useCacheRefresh:Oh};Uh.useEffectEvent=bh;function El(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:o({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var xl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Nt(),n=Ti(s);n.payload=t,i!=null&&(n.callback=i),t=Bi(e,n,s),t!==null&&(Rt(t,e,s),pr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Nt(),n=Ti(s);n.tag=1,n.payload=t,i!=null&&(n.callback=i),t=Bi(e,n,s),t!==null&&(Rt(t,e,s),pr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Nt(),s=Ti(i);s.tag=2,t!=null&&(s.callback=t),t=Bi(e,s,i),t!==null&&(Rt(t,e,i),pr(t,e,i))}};function jh(e,t,i,s,n,u,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,x):t.prototype&&t.prototype.isPureReactComponent?!hr(i,s)||!hr(n,u):!0}function Ih(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&&xl.enqueueReplaceState(t,t.state,null)}function hs(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=o({},i));for(var n in e)i[n]===void 0&&(i[n]=e[n])}return i}function Fh(e){ln(e)}function Ph(e){console.error(e)}function qh(e){ln(e)}function Mn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Gh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Ll(e,t,i){return i=Ti(i),i.tag=3,i.payload={element:null},i.callback=function(){Mn(e,t)},i}function Wh(e){return e=Ti(e),e.tag=3,e}function $h(e,t,i,s){var n=i.type.getDerivedStateFromError;if(typeof n=="function"){var u=s.value;e.payload=function(){return n(u)},e.callback=function(){Gh(t,i,s)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Gh(t,i,s),typeof n!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var B=s.stack;this.componentDidCatch(s.value,{componentStack:B!==null?B:""})})}function f_(e,t,i,s,n){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Ts(t,i,n,!0),i=Ot.current,i!==null){switch(i.tag){case 31:case 13:return $t===null?Pn():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=n,s===mn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Ql(e,s,n)),!1;case 22:return i.flags|=65536,s===mn?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)),Ql(e,s,n)),!1}throw Error(I(435,i.tag))}return Ql(e,s,n),Pn(),!1}if(ke)return t=Ot.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,s!==Wa&&(e=Error(I(422),{cause:s}),dr(Pt(e,i)))):(s!==Wa&&(t=Error(I(423),{cause:s}),dr(Pt(t,i))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,s=Pt(s,i),n=Ll(e.stateNode,s,n),il(e,n),tt!==4&&(tt=2)),!1;var u=Error(I(520),{cause:s});if(u=Pt(u,i),Br===null?Br=[u]:Br.push(u),tt!==4&&(tt=2),t===null)return!0;s=Pt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=n&-n,i.lanes|=e,e=Ll(i.stateNode,s,e),il(i,e),!1;case 1:if(t=i.type,u=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ui===null||!Ui.has(u))))return i.flags|=65536,n&=-n,i.lanes|=n,n=Wh(n),$h(n,e,i,s),il(i,n),!1}i=i.return}while(i!==null);return!1}var Al=Error(I(461)),at=!1;function gt(e,t,i,s){t.child=e===null?Kc(t,null,i,s):os(t,e.child,i,s)}function Xh(e,t,i,s,n){i=i.render;var u=t.ref;if("ref"in s){var x={};for(var B in s)B!=="ref"&&(x[B]=s[B])}else x=s;return rs(t),s=ol(e,t,i,x,u,n),B=cl(),e!==null&&!at?(hl(e,t,n),_i(e,t,n)):(ke&&B&&qa(t),t.flags|=1,gt(e,t,s,n),t.child)}function Yh(e,t,i,s,n){if(e===null){var u=i.type;return typeof u=="function"&&!Ia(u)&&u.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=u,Vh(e,t,u,s,n)):(e=un(i.type,null,s,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Hl(e,n)){var x=u.memoizedProps;if(i=i.compare,i=i!==null?i:hr,i(x,s)&&e.ref===t.ref)return _i(e,t,n)}return t.flags|=1,e=oi(u,s),e.ref=t.ref,e.return=t,t.child=e}function Vh(e,t,i,s,n){if(e!==null){var u=e.memoizedProps;if(hr(u,s)&&e.ref===t.ref)if(at=!1,t.pendingProps=s=u,Hl(e,n))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,_i(e,t,n)}return Rl(e,t,i,s,n)}function Kh(e,t,i,s){var n=s.children,u=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(u=u!==null?u.baseLanes|i:i,e!==null){for(s=t.child=e.child,n=0;s!==null;)n=n|s.lanes|s.childLanes,s=s.sibling;s=n&~u}else s=0,t.child=null;return Qh(e,t,u,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vn(t,u!==null?u.cachePool:null),u!==null?Jc(t,u):rl(),eh(t);else return s=t.lanes=536870912,Qh(e,t,u!==null?u.baseLanes|i:i,i,s)}else u!==null?(vn(t,u.cachePool),Jc(t,u),ki(),t.memoizedState=null):(e!==null&&vn(t,null),rl(),ki());return gt(e,t,n,i),t.child}function xr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Qh(e,t,i,s,n){var u=Za();return u=u===null?null:{parent:rt._currentValue,pool:u},t.memoizedState={baseLanes:i,cachePool:u},e!==null&&vn(t,null),rl(),eh(t),e!==null&&Ts(e,t,s,!0),t.childLanes=n,null}function Tn(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 Zh(e,t,i){return os(t,e.child,null,i),e=Tn(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function d_(e,t,i){var s=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(s.mode==="hidden")return e=Tn(t,s),t.lanes=536870912,xr(null,e);if(al(t),(e=Ye)?(e=uf(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Hc(e),i.return=t,t.child=i,_t=t,Ye=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return Tn(t,s)}var u=e.memoizedState;if(u!==null){var x=u.dehydrated;if(al(t),n)if(t.flags&256)t.flags&=-257,t=Zh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(I(558));else if(at||Ts(e,t,i,!1),n=(i&e.childLanes)!==0,at||n){if(s=Xe,s!==null&&(x=Po(s,i),x!==0&&x!==u.retryLane))throw u.retryLane=x,es(e,x),Rt(s,e,x),Al;Pn(),t=Zh(e,t,i)}else e=u.treeContext,Ye=Xt(x.nextSibling),_t=t,ke=!0,Ai=null,Wt=!1,e!==null&&Uc(t,e),t=Tn(t,s),t.flags|=4096;return t}return e=oi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bn(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(I(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Rl(e,t,i,s,n){return rs(t),i=ol(e,t,i,s,void 0,n),s=cl(),e!==null&&!at?(hl(e,t,n),_i(e,t,n)):(ke&&s&&qa(t),t.flags|=1,gt(e,t,i,n),t.child)}function Jh(e,t,i,s,n,u){return rs(t),t.updateQueue=null,i=ih(t,s,i,n),th(e),s=cl(),e!==null&&!at?(hl(e,t,u),_i(e,t,u)):(ke&&s&&qa(t),t.flags|=1,gt(e,t,i,u),t.child)}function eu(e,t,i,s,n){if(rs(t),t.stateNode===null){var u=As,x=i.contextType;typeof x=="object"&&x!==null&&(u=vt(x)),u=new i(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=xl,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},el(t),x=i.contextType,u.context=typeof x=="object"&&x!==null?vt(x):As,u.state=t.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(El(t,i,x,s),u.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(x=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),x!==u.state&&xl.enqueueReplaceState(u,u.state,null),yr(t,s,u,n),Sr(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var B=t.memoizedProps,F=hs(i,B);u.props=F;var Q=u.context,le=i.contextType;x=As,typeof le=="object"&&le!==null&&(x=vt(le));var ce=i.getDerivedStateFromProps;le=typeof ce=="function"||typeof u.getSnapshotBeforeUpdate=="function",B=t.pendingProps!==B,le||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(B||Q!==x)&&Ih(t,u,s,x),Mi=!1;var Z=t.memoizedState;u.state=Z,yr(t,s,u,n),Sr(),Q=t.memoizedState,B||Z!==Q||Mi?(typeof ce=="function"&&(El(t,i,ce,s),Q=t.memoizedState),(F=Mi||jh(t,i,F,s,Z,Q,x))?(le||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=Q),u.props=s,u.state=Q,u.context=x,s=F):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,tl(e,t),x=t.memoizedProps,le=hs(i,x),u.props=le,ce=t.pendingProps,Z=u.context,Q=i.contextType,F=As,typeof Q=="object"&&Q!==null&&(F=vt(Q)),B=i.getDerivedStateFromProps,(Q=typeof B=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x!==ce||Z!==F)&&Ih(t,u,s,F),Mi=!1,Z=t.memoizedState,u.state=Z,yr(t,s,u,n),Sr();var se=t.memoizedState;x!==ce||Z!==se||Mi||e!==null&&e.dependencies!==null&&dn(e.dependencies)?(typeof B=="function"&&(El(t,i,B,s),se=t.memoizedState),(le=Mi||jh(t,i,le,s,Z,se,F)||e!==null&&e.dependencies!==null&&dn(e.dependencies))?(Q||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,se,F),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,se,F)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=se),u.props=s,u.state=se,u.context=F,s=le):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Bn(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=os(t,e.child,null,n),t.child=os(t,null,i,n)):gt(e,t,i,n),t.memoizedState=u.state,e=t.child):e=_i(e,t,n),e}function tu(e,t,i,s){return is(),t.flags|=256,gt(e,t,i,s),t.child}var Dl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ml(e){return{baseLanes:e,cachePool:Gc()}}function Tl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=zt),e}function iu(e,t,i){var s=t.pendingProps,n=!1,u=(t.flags&128)!==0,x;if((x=u)||(x=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),x&&(n=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(n?Oi(t):ki(),(e=Ye)?(e=uf(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Hc(e),i.return=t,t.child=i,_t=t,Ye=null)):e=null,e===null)throw Ri(t);return _o(e)?t.lanes=32:t.lanes=536870912,null}var B=s.children;return s=s.fallback,n?(ki(),n=t.mode,B=On({mode:"hidden",children:B},n),s=ts(s,n,i,null),B.return=t,s.return=t,B.sibling=s,t.child=B,s=t.child,s.memoizedState=Ml(i),s.childLanes=Tl(e,x,i),t.memoizedState=Dl,xr(null,s)):(Oi(t),Bl(t,B))}var F=e.memoizedState;if(F!==null&&(B=F.dehydrated,B!==null)){if(u)t.flags&256?(Oi(t),t.flags&=-257,t=Ol(e,t,i)):t.memoizedState!==null?(ki(),t.child=e.child,t.flags|=128,t=null):(ki(),B=s.fallback,n=t.mode,s=On({mode:"visible",children:s.children},n),B=ts(B,n,i,null),B.flags|=2,s.return=t,B.return=t,s.sibling=B,t.child=s,os(t,e.child,null,i),s=t.child,s.memoizedState=Ml(i),s.childLanes=Tl(e,x,i),t.memoizedState=Dl,t=xr(null,s));else if(Oi(t),_o(B)){if(x=B.nextSibling&&B.nextSibling.dataset,x)var Q=x.dgst;x=Q,s=Error(I(419)),s.stack="",s.digest=x,dr({value:s,source:null,stack:null}),t=Ol(e,t,i)}else if(at||Ts(e,t,i,!1),x=(i&e.childLanes)!==0,at||x){if(x=Xe,x!==null&&(s=Po(x,i),s!==0&&s!==F.retryLane))throw F.retryLane=s,es(e,s),Rt(x,e,s),Al;fo(B)||Pn(),t=Ol(e,t,i)}else fo(B)?(t.flags|=192,t.child=e.child,t=null):(e=F.treeContext,Ye=Xt(B.nextSibling),_t=t,ke=!0,Ai=null,Wt=!1,e!==null&&Uc(t,e),t=Bl(t,s.children),t.flags|=4096);return t}return n?(ki(),B=s.fallback,n=t.mode,F=e.child,Q=F.sibling,s=oi(F,{mode:"hidden",children:s.children}),s.subtreeFlags=F.subtreeFlags&65011712,Q!==null?B=oi(Q,B):(B=ts(B,n,i,null),B.flags|=2),B.return=t,s.return=t,s.sibling=B,t.child=s,xr(null,s),s=t.child,B=e.child.memoizedState,B===null?B=Ml(i):(n=B.cachePool,n!==null?(F=rt._currentValue,n=n.parent!==F?{parent:F,pool:F}:n):n=Gc(),B={baseLanes:B.baseLanes|i,cachePool:n}),s.memoizedState=B,s.childLanes=Tl(e,x,i),t.memoizedState=Dl,xr(e.child,s)):(Oi(t),i=e.child,e=i.sibling,i=oi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=i,t.memoizedState=null,i)}function Bl(e,t){return t=On({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function On(e,t){return e=Bt(22,e,null,t),e.lanes=0,e}function Ol(e,t,i){return os(t,e.child,null,i),e=Bl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function su(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ya(e.return,t,i)}function kl(e,t,i,s,n,u){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:n,treeForkCount:u}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=s,x.tail=i,x.tailMode=n,x.treeForkCount=u)}function ru(e,t,i){var s=t.pendingProps,n=s.revealOrder,u=s.tail;s=s.children;var x=it.current,B=(x&2)!==0;if(B?(x=x&1|2,t.flags|=128):x&=1,$(it,x),gt(e,t,s,i),s=ke?fr:0,!B&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&su(e,i,t);else if(e.tag===19)su(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(n){case"forwards":for(i=t.child,n=null;i!==null;)e=i.alternate,e!==null&&bn(e)===null&&(n=i),i=i.sibling;i=n,i===null?(n=t.child,t.child=null):(n=i.sibling,i.sibling=null),kl(t,!1,n,i,u,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&bn(e)===null){t.child=n;break}e=n.sibling,n.sibling=i,i=n,n=e}kl(t,!0,i,null,u,s);break;case"together":kl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function _i(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ni|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ts(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,i=oi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=oi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Hl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&dn(e)))}function __(e,t,i){switch(t.tag){case 3:k(t,t.stateNode.containerInfo),Di(t,rt,e.memoizedState.cache),is();break;case 27:case 5:ee(t);break;case 4:k(t,t.stateNode.containerInfo);break;case 10:Di(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,al(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Oi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?iu(e,t,i):(Oi(t),e=_i(e,t,i),e!==null?e.sibling:null);Oi(t);break;case 19:var n=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Ts(e,t,i,!1),s=(i&t.childLanes)!==0),n){if(s)return ru(e,t,i);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),$(it,it.current),s)break;return null;case 22:return t.lanes=0,Kh(e,t,i,t.pendingProps);case 24:Di(t,rt,e.memoizedState.cache)}return _i(e,t,i)}function nu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!Hl(e,i)&&(t.flags&128)===0)return at=!1,__(e,t,i);at=(e.flags&131072)!==0}else at=!1,ke&&(t.flags&1048576)!==0&&Nc(t,fr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=as(t.elementType),t.type=e,typeof e=="function")Ia(e)?(s=hs(e,s),t.tag=1,t=eu(null,t,e,s,i)):(t.tag=0,t=Rl(null,t,e,s,i));else{if(e!=null){var n=e.$$typeof;if(n===m){t.tag=11,t=Xh(null,t,e,s,i);break e}else if(n===E){t.tag=14,t=Yh(null,t,e,s,i);break e}}throw t=N(e)||e,Error(I(306,t,""))}}return t;case 0:return Rl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,n=hs(s,t.pendingProps),eu(e,t,s,n,i);case 3:e:{if(k(t,t.stateNode.containerInfo),e===null)throw Error(I(387));s=t.pendingProps;var u=t.memoizedState;n=u.element,tl(e,t),yr(t,s,null,i);var x=t.memoizedState;if(s=x.cache,Di(t,rt,s),s!==u.cache&&Va(t,[rt],i,!0),Sr(),s=x.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=tu(e,t,s,i);break e}else if(s!==n){n=Pt(Error(I(424)),t),dr(n),t=tu(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=Xt(e.firstChild),_t=t,ke=!0,Ai=null,Wt=!0,i=Kc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(is(),s===n){t=_i(e,t,i);break e}gt(e,t,s,i)}t=t.child}return t;case 26:return Bn(e,t),e===null?(i=mf(t.type,null,t.pendingProps,null))?t.memoizedState=i:ke||(i=t.type,e=t.pendingProps,s=Vn(ue.current).createElement(i),s[dt]=t,s[Ct]=e,mt(s,i,e),ut(s),t.stateNode=s):t.memoizedState=mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ee(t),e===null&&ke&&(s=t.stateNode=_f(t.type,t.pendingProps,ue.current),_t=t,Wt=!0,n=Ye,Pi(t.type)?(vo=n,Ye=Xt(s.firstChild)):Ye=n),gt(e,t,t.pendingProps.children,i),Bn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((n=s=Ye)&&(s=G_(s,t.type,t.pendingProps,Wt),s!==null?(t.stateNode=s,_t=t,Ye=Xt(s.firstChild),Wt=!1,n=!0):n=!1),n||Ri(t)),ee(t),n=t.type,u=t.pendingProps,x=e!==null?e.memoizedProps:null,s=u.children,co(n,u)?s=null:x!==null&&co(n,x)&&(t.flags|=32),t.memoizedState!==null&&(n=ol(e,t,n_,null,null,i),Ir._currentValue=n),Bn(e,t),gt(e,t,s,i),t.child;case 6:return e===null&&ke&&((e=i=Ye)&&(i=W_(i,t.pendingProps,Wt),i!==null?(t.stateNode=i,_t=t,Ye=null,e=!0):e=!1),e||Ri(t)),null;case 13:return iu(e,t,i);case 4:return k(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=os(t,null,s,i):gt(e,t,s,i),t.child;case 11:return Xh(e,t,t.type,t.pendingProps,i);case 7:return gt(e,t,t.pendingProps,i),t.child;case 8:return gt(e,t,t.pendingProps.children,i),t.child;case 12:return gt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Di(t,t.type,s.value),gt(e,t,s.children,i),t.child;case 9:return n=t.type._context,s=t.pendingProps.children,rs(t),n=vt(n),s=s(n),t.flags|=1,gt(e,t,s,i),t.child;case 14:return Yh(e,t,t.type,t.pendingProps,i);case 15:return Vh(e,t,t.type,t.pendingProps,i);case 19:return ru(e,t,i);case 31:return d_(e,t,i);case 22:return Kh(e,t,i,t.pendingProps);case 24:return rs(t),s=vt(rt),e===null?(n=Za(),n===null&&(n=Xe,u=Ka(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=i),n=u),t.memoizedState={parent:s,cache:n},el(t),Di(t,rt,n)):((e.lanes&i)!==0&&(tl(e,t),yr(t,null,null,i),Sr()),n=e.memoizedState,u=t.memoizedState,n.parent!==s?(n={parent:s,cache:s},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Di(t,rt,s)):(s=u.cache,Di(t,rt,s),s!==n.cache&&Va(t,[rt],i,!0))),gt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(I(156,t.tag))}function vi(e){e.flags|=4}function zl(e,t,i,s,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Bu())e.flags|=8192;else throw ls=mn,Ja}else e.flags&=-16777217}function au(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cf(t))if(Bu())e.flags|=8192;else throw ls=mn,Ja}function kn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jo():536870912,e.lanes|=t,qs|=t)}function Lr(e,t){if(!ke)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 Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags&65011712,s|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags,s|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function v_(e,t,i){var s=t.pendingProps;switch(Ga(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ui(rt),ie(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ms(t)?vi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$a())),Ve(t),null;case 26:var n=t.type,u=t.memoizedState;return e===null?(vi(t),u!==null?(Ve(t),au(t,u)):(Ve(t),zl(t,n,null,s,i))):u?u!==e.memoizedState?(vi(t),Ve(t),au(t,u)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&vi(t),Ve(t),zl(t,n,e,s,i)),null;case 27:if(de(t),i=ue.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(!s){if(t.stateNode===null)throw Error(I(166));return Ve(t),null}e=V.current,Ms(t)?jc(t):(e=_f(n,s,i),t.stateNode=e,vi(t))}return Ve(t),null;case 5:if(de(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(!s){if(t.stateNode===null)throw Error(I(166));return Ve(t),null}if(u=V.current,Ms(t))jc(t);else{var x=Vn(ue.current);switch(u){case 1:u=x.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:u=x.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":u=x.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":u=x.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":u=x.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?x.createElement("select",{is:s.is}):x.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?x.createElement(n,{is:s.is}):x.createElement(n)}}u[dt]=t,u[Ct]=s;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)u.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=u;e:switch(mt(u,n,s),n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&vi(t)}}return Ve(t),zl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(I(166));if(e=ue.current,Ms(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,n=_t,n!==null)switch(n.tag){case 27:case 5:s=n.memoizedProps}e[dt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||sf(e.nodeValue,i)),e||Ri(t,!0)}else e=Vn(e).createTextNode(s),e[dt]=t,t.stateNode=e}return Ve(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ms(t),i!==null){if(e===null){if(!s)throw Error(I(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(557));e[dt]=t}else is(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else i=$a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(I(558))}return Ve(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ms(t),s!==null&&s.dehydrated!==null){if(e===null){if(!n)throw Error(I(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(I(317));n[dt]=t}else is(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),n=!1}else n=$a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,n=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(n=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==n&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),kn(t,t.updateQueue),Ve(t),null);case 4:return ie(),e===null&&ro(t.stateNode.containerInfo),Ve(t),null;case 10:return ui(t.type),Ve(t),null;case 19:if(O(it),s=t.memoizedState,s===null)return Ve(t),null;if(n=(t.flags&128)!==0,u=s.rendering,u===null)if(n)Lr(s,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=bn(e),u!==null){for(t.flags|=128,Lr(s,!1),e=u.updateQueue,t.updateQueue=e,kn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)kc(i,e),i=i.sibling;return $(it,it.current&1|2),ke&&ci(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&be()>jn&&(t.flags|=128,n=!0,Lr(s,!1),t.lanes=4194304)}else{if(!n)if(e=bn(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,kn(t,e),Lr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!ke)return Ve(t),null}else 2*be()-s.renderingStartTime>jn&&i!==536870912&&(t.flags|=128,n=!0,Lr(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=be(),e.sibling=null,i=it.current,$(it,n?i&1|2:i&1),ke&&ci(t,s.treeForkCount),e):(Ve(t),null);case 22:case 23:return kt(t),nl(),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&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),i=t.updateQueue,i!==null&&kn(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&O(ns),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ui(rt),Ve(t),null;case 25:return null;case 30:return null}throw Error(I(156,t.tag))}function g_(e,t){switch(Ga(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ui(rt),ie(),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(kt(t),t.alternate===null)throw Error(I(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(it),null;case 4:return ie(),null;case 10:return ui(t.type),null;case 22:case 23:return kt(t),nl(),e!==null&&O(ns),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ui(rt),null;case 25:return null;default:return null}}function lu(e,t){switch(Ga(t),t.tag){case 3:ui(rt),ie();break;case 26:case 27:case 5:de(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:O(it);break;case 10:ui(t.type);break;case 22:case 23:kt(t),nl(),e!==null&&O(ns);break;case 24:ui(rt)}}function Ar(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var n=s.next;i=n;do{if((i.tag&e)===e){s=void 0;var u=i.create,x=i.inst;s=u(),x.destroy=s}i=i.next}while(i!==n)}}catch(B){Fe(t,t.return,B)}}function Hi(e,t,i){try{var s=t.updateQueue,n=s!==null?s.lastEffect:null;if(n!==null){var u=n.next;s=u;do{if((s.tag&e)===e){var x=s.inst,B=x.destroy;if(B!==void 0){x.destroy=void 0,n=t;var F=i,Q=B;try{Q()}catch(le){Fe(n,F,le)}}}s=s.next}while(s!==u)}}catch(le){Fe(t,t.return,le)}}function ou(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Zc(t,i)}catch(s){Fe(e,e.return,s)}}}function cu(e,t,i){i.props=hs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Fe(e,t,s)}}function Rr(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(n){Fe(e,t,n)}}function ii(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(n){Fe(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(n){Fe(e,t,n)}else i.current=null}function hu(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(n){Fe(e,e.return,n)}}function Nl(e,t,i){try{var s=e.stateNode;U_(s,e.type,i,t),s[Ct]=t}catch(n){Fe(e,e.return,n)}}function uu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pi(e.type)||e.tag===4}function Ul(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uu(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&&Pi(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 jl(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=ai));else if(s!==4&&(s===27&&Pi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(jl(e,t,i),e=e.sibling;e!==null;)jl(e,t,i),e=e.sibling}function Hn(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&&Pi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Hn(e,t,i),e=e.sibling;e!==null;)Hn(e,t,i),e=e.sibling}function fu(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);mt(t,s,i),t[dt]=e,t[Ct]=i}catch(u){Fe(e,e.return,u)}}var gi=!1,lt=!1,Il=!1,du=typeof WeakSet=="function"?WeakSet:Set,ft=null;function m_(e,t){if(e=e.containerInfo,lo=ia,e=xc(e),Oa(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 n=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{i.nodeType,u.nodeType}catch{i=null;break e}var x=0,B=-1,F=-1,Q=0,le=0,ce=e,Z=null;t:for(;;){for(var se;ce!==i||n!==0&&ce.nodeType!==3||(B=x+n),ce!==u||s!==0&&ce.nodeType!==3||(F=x+s),ce.nodeType===3&&(x+=ce.nodeValue.length),(se=ce.firstChild)!==null;)Z=ce,ce=se;for(;;){if(ce===e)break t;if(Z===i&&++Q===n&&(B=x),Z===u&&++le===s&&(F=x),(se=ce.nextSibling)!==null)break;ce=Z,Z=ce.parentNode}ce=se}i=B===-1||F===-1?null:{start:B,end:F}}else i=null}i=i||{start:0,end:0}}else i=null;for(oo={focusedElem:e,selectionRange:i},ia=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,u=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++)n=e[i],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,i=t,n=u.memoizedProps,u=u.memoizedState,s=i.stateNode;try{var ve=hs(i.type,n);e=s.getSnapshotBeforeUpdate(ve,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Fe(i,i.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)uo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uo(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(I(163))}if(e=t.sibling,e!==null){e.return=t.return,ft=e;break}ft=t.return}}function _u(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:pi(e,i),s&4&&Ar(5,i);break;case 1:if(pi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(x){Fe(i,i.return,x)}else{var n=hs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Fe(i,i.return,x)}}s&64&&ou(i),s&512&&Rr(i,i.return);break;case 3:if(pi(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{Zc(e,t)}catch(x){Fe(i,i.return,x)}}break;case 27:t===null&&s&4&&fu(i);case 26:case 5:pi(e,i),t===null&&s&4&&hu(i),s&512&&Rr(i,i.return);break;case 12:pi(e,i);break;case 31:pi(e,i),s&4&&mu(e,i);break;case 13:pi(e,i),s&4&&pu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=L_.bind(null,i),$_(e,i))));break;case 22:if(s=i.memoizedState!==null||gi,!s){t=t!==null&&t.memoizedState!==null||lt,n=gi;var u=lt;gi=s,(lt=t)&&!u?Si(e,i,(i.subtreeFlags&8772)!==0):pi(e,i),gi=n,lt=u}break;case 30:break;default:pi(e,i)}}function vu(e){var t=e.alternate;t!==null&&(e.alternate=null,vu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ga(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 Ze=null,Et=!1;function mi(e,t,i){for(i=i.child;i!==null;)gu(e,t,i),i=i.sibling}function gu(e,t,i){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Vt,i)}catch{}switch(i.tag){case 26:lt||ii(i,t),mi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:lt||ii(i,t);var s=Ze,n=Et;Pi(i.type)&&(Ze=i.stateNode,Et=!1),mi(e,t,i),Nr(i.stateNode),Ze=s,Et=n;break;case 5:lt||ii(i,t);case 6:if(s=Ze,n=Et,Ze=null,mi(e,t,i),Ze=s,Et=n,Ze!==null)if(Et)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(i.stateNode)}catch(u){Fe(i,t,u)}else try{Ze.removeChild(i.stateNode)}catch(u){Fe(i,t,u)}break;case 18:Ze!==null&&(Et?(e=Ze,cf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Qs(e)):cf(Ze,i.stateNode));break;case 4:s=Ze,n=Et,Ze=i.stateNode.containerInfo,Et=!0,mi(e,t,i),Ze=s,Et=n;break;case 0:case 11:case 14:case 15:Hi(2,i,t),lt||Hi(4,i,t),mi(e,t,i);break;case 1:lt||(ii(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&cu(i,t,s)),mi(e,t,i);break;case 21:mi(e,t,i);break;case 22:lt=(s=lt)||i.memoizedState!==null,mi(e,t,i),lt=s;break;default:mi(e,t,i)}}function mu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qs(e)}catch(i){Fe(t,t.return,i)}}}function pu(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){Fe(t,t.return,i)}}function p_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new du),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new du),t;default:throw Error(I(435,e.tag))}}function zn(e,t){var i=p_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var n=A_.bind(null,e,s);s.then(n,n)}})}function xt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var n=i[s],u=e,x=t,B=x;e:for(;B!==null;){switch(B.tag){case 27:if(Pi(B.type)){Ze=B.stateNode,Et=!1;break e}break;case 5:Ze=B.stateNode,Et=!1;break e;case 3:case 4:Ze=B.stateNode.containerInfo,Et=!0;break e}B=B.return}if(Ze===null)throw Error(I(160));gu(u,x,n),Ze=null,Et=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Su(t,e),t=t.sibling}var Qt=null;function Su(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(t,e),Lt(e),s&4&&(Hi(3,e,e.return),Ar(3,e),Hi(5,e,e.return));break;case 1:xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),s&64&&gi&&(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 n=Qt;if(xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),s&4){var u=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,n=n.ownerDocument||n;t:switch(s){case"title":u=n.getElementsByTagName("title")[0],(!u||u[tr]||u[dt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(s),n.head.insertBefore(u,n.querySelector("head > title"))),mt(u,s,i),u[dt]=e,ut(u),s=u;break e;case"link":var x=yf("link","href",n).get(s+(i.href||""));if(x){for(var B=0;B<x.length;B++)if(u=x[B],u.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&u.getAttribute("rel")===(i.rel==null?null:i.rel)&&u.getAttribute("title")===(i.title==null?null:i.title)&&u.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(B,1);break t}}u=n.createElement(s),mt(u,s,i),n.head.appendChild(u);break;case"meta":if(x=yf("meta","content",n).get(s+(i.content||""))){for(B=0;B<x.length;B++)if(u=x[B],u.getAttribute("content")===(i.content==null?null:""+i.content)&&u.getAttribute("name")===(i.name==null?null:i.name)&&u.getAttribute("property")===(i.property==null?null:i.property)&&u.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&u.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(B,1);break t}}u=n.createElement(s),mt(u,s,i),n.head.appendChild(u);break;default:throw Error(I(468,s))}u[dt]=e,ut(u),s=u}e.stateNode=s}else bf(n,e.type,e.stateNode);else e.stateNode=Sf(n,s,e.memoizedProps);else u!==s?(u===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):u.count--,s===null?bf(n,e.type,e.stateNode):Sf(n,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Nl(e,e.memoizedProps,i.memoizedProps)}break;case 27:xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),i!==null&&s&4&&Nl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),e.flags&32){n=e.stateNode;try{ys(n,"")}catch(ve){Fe(e,e.return,ve)}}s&4&&e.stateNode!=null&&(n=e.memoizedProps,Nl(e,n,i!==null?i.memoizedProps:n)),s&1024&&(Il=!0);break;case 6:if(xt(t,e),Lt(e),s&4){if(e.stateNode===null)throw Error(I(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){Fe(e,e.return,ve)}}break;case 3:if(Zn=null,n=Qt,Qt=Kn(t.containerInfo),xt(t,e),Qt=n,Lt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Qs(t.containerInfo)}catch(ve){Fe(e,e.return,ve)}Il&&(Il=!1,yu(e));break;case 4:s=Qt,Qt=Kn(e.stateNode.containerInfo),xt(t,e),Lt(e),Qt=s;break;case 12:xt(t,e),Lt(e);break;case 31:xt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 13:xt(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Un=be()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 22:n=e.memoizedState!==null;var F=i!==null&&i.memoizedState!==null,Q=gi,le=lt;if(gi=Q||n,lt=le||F,xt(t,e),lt=le,gi=Q,Lt(e),s&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(i===null||F||gi||lt||us(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){F=i=t;try{if(u=F.stateNode,n)x=u.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{B=F.stateNode;var ce=F.memoizedProps.style,Z=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;B.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(ve){Fe(F,F.return,ve)}}}else if(t.tag===6){if(i===null){F=t;try{F.stateNode.nodeValue=n?"":F.memoizedProps}catch(ve){Fe(F,F.return,ve)}}}else if(t.tag===18){if(i===null){F=t;try{var se=F.stateNode;n?hf(se,!0):hf(F.stateNode,!1)}catch(ve){Fe(F,F.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,zn(e,i))));break;case 19:xt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 30:break;case 21:break;default:xt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(uu(s)){i=s;break}s=s.return}if(i==null)throw Error(I(160));switch(i.tag){case 27:var n=i.stateNode,u=Ul(e);Hn(e,u,n);break;case 5:var x=i.stateNode;i.flags&32&&(ys(x,""),i.flags&=-33);var B=Ul(e);Hn(e,B,x);break;case 3:case 4:var F=i.stateNode.containerInfo,Q=Ul(e);jl(e,Q,F);break;default:throw Error(I(161))}}catch(le){Fe(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_u(e,t.alternate,t),t=t.sibling}function us(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hi(4,t,t.return),us(t);break;case 1:ii(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&cu(t,t.return,i),us(t);break;case 27:Nr(t.stateNode);case 26:case 5:ii(t,t.return),us(t);break;case 22:t.memoizedState===null&&us(t);break;case 30:us(t);break;default:us(t)}e=e.sibling}}function Si(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,n=e,u=t,x=u.flags;switch(u.tag){case 0:case 11:case 15:Si(n,u,i),Ar(4,u);break;case 1:if(Si(n,u,i),s=u,n=s.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(Q){Fe(s,s.return,Q)}if(s=u,n=s.updateQueue,n!==null){var B=s.stateNode;try{var F=n.shared.hiddenCallbacks;if(F!==null)for(n.shared.hiddenCallbacks=null,n=0;n<F.length;n++)Qc(F[n],B)}catch(Q){Fe(s,s.return,Q)}}i&&x&64&&ou(u),Rr(u,u.return);break;case 27:fu(u);case 26:case 5:Si(n,u,i),i&&s===null&&x&4&&hu(u),Rr(u,u.return);break;case 12:Si(n,u,i);break;case 31:Si(n,u,i),i&&x&4&&mu(n,u);break;case 13:Si(n,u,i),i&&x&4&&pu(n,u);break;case 22:u.memoizedState===null&&Si(n,u,i),Rr(u,u.return);break;case 30:break;default:Si(n,u,i)}t=t.sibling}}function Fl(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&&_r(i))}function Pl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e))}function Zt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bu(e,t,i,s),t=t.sibling}function bu(e,t,i,s){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Zt(e,t,i,s),n&2048&&Ar(9,t);break;case 1:Zt(e,t,i,s);break;case 3:Zt(e,t,i,s),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e)));break;case 12:if(n&2048){Zt(e,t,i,s),e=t.stateNode;try{var u=t.memoizedProps,x=u.id,B=u.onPostCommit;typeof B=="function"&&B(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(F){Fe(t,t.return,F)}}else Zt(e,t,i,s);break;case 31:Zt(e,t,i,s);break;case 13:Zt(e,t,i,s);break;case 23:break;case 22:u=t.stateNode,x=t.alternate,t.memoizedState!==null?u._visibility&2?Zt(e,t,i,s):Dr(e,t):u._visibility&2?Zt(e,t,i,s):(u._visibility|=2,Is(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Fl(x,t);break;case 24:Zt(e,t,i,s),n&2048&&Pl(t.alternate,t);break;default:Zt(e,t,i,s)}}function Is(e,t,i,s,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,x=t,B=i,F=s,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Is(u,x,B,F,n),Ar(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?Is(u,x,B,F,n):Dr(u,x):(le._visibility|=2,Is(u,x,B,F,n)),n&&Q&2048&&Fl(x.alternate,x);break;case 24:Is(u,x,B,F,n),n&&Q&2048&&Pl(x.alternate,x);break;default:Is(u,x,B,F,n)}t=t.sibling}}function Dr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,n=s.flags;switch(s.tag){case 22:Dr(i,s),n&2048&&Fl(s.alternate,s);break;case 24:Dr(i,s),n&2048&&Pl(s.alternate,s);break;default:Dr(i,s)}t=t.sibling}}var Mr=8192;function Fs(e,t,i){if(e.subtreeFlags&Mr)for(e=e.child;e!==null;)Cu(e,t,i),e=e.sibling}function Cu(e,t,i){switch(e.tag){case 26:Fs(e,t,i),e.flags&Mr&&e.memoizedState!==null&&rv(i,Qt,e.memoizedState,e.memoizedProps);break;case 5:Fs(e,t,i);break;case 3:case 4:var s=Qt;Qt=Kn(e.stateNode.containerInfo),Fs(e,t,i),Qt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Mr,Mr=16777216,Fs(e,t,i),Mr=s):Fs(e,t,i));break;default:Fs(e,t,i)}}function wu(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 Tr(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];ft=s,xu(s,e)}wu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Eu(e),e=e.sibling}function Eu(e){switch(e.tag){case 0:case 11:case 15:Tr(e),e.flags&2048&&Hi(9,e,e.return);break;case 3:Tr(e);break;case 12:Tr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nn(e)):Tr(e);break;default:Tr(e)}}function Nn(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];ft=s,xu(s,e)}wu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hi(8,t,t.return),Nn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Nn(t));break;default:Nn(t)}e=e.sibling}}function xu(e,t){for(;ft!==null;){var i=ft;switch(i.tag){case 0:case 11:case 15:Hi(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:_r(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ft=s;else e:for(i=e;ft!==null;){s=ft;var n=s.sibling,u=s.return;if(vu(s),s===i){ft=null;break e}if(n!==null){n.return=u,ft=n;break e}ft=u}}}var S_={getCacheForType:function(e){var t=vt(rt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return vt(rt).controller.signal}},y_=typeof WeakMap=="function"?WeakMap:Map,je=0,Xe=null,De=null,Be=0,Ie=0,Ht=null,zi=!1,Ps=!1,ql=!1,yi=0,tt=0,Ni=0,fs=0,Gl=0,zt=0,qs=0,Br=null,At=null,Wl=!1,Un=0,Lu=0,jn=1/0,In=null,Ui=null,ct=0,ji=null,Gs=null,bi=0,$l=0,Xl=null,Au=null,Or=0,Yl=null;function Nt(){return(je&2)!==0&&Be!==0?Be&-Be:z.T!==null?eo():qo()}function Ru(){if(zt===0)if((Be&536870912)===0||ke){var e=Yi;Yi<<=1,(Yi&3932160)===0&&(Yi=262144),zt=e}else zt=536870912;return e=Ot.current,e!==null&&(e.flags|=32),zt}function Rt(e,t,i){(e===Xe&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Ws(e,0),Ii(e,Be,zt,!1)),er(e,i),((je&2)===0||e!==Xe)&&(e===Xe&&((je&2)===0&&(fs|=i),tt===4&&Ii(e,Be,zt,!1)),si(e))}function Du(e,t,i){if((je&6)!==0)throw Error(I(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Js(e,t),n=s?w_(e,t):Kl(e,t,!0),u=s;do{if(n===0){Ps&&!s&&Ii(e,t,0,!1);break}else{if(i=e.current.alternate,u&&!b_(i)){n=Kl(e,t,!1),u=!1;continue}if(n===2){if(u=t,e.errorRecoveryDisabledLanes&u)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var B=e;n=Br;var F=B.current.memoizedState.isDehydrated;if(F&&(Ws(B,x).flags|=256),x=Kl(B,x,!1),x!==2){if(ql&&!F){B.errorRecoveryDisabledLanes|=u,fs|=u,n=4;break e}u=At,At=n,u!==null&&(At===null?At=u:At.push.apply(At,u))}n=x}if(u=!1,n!==2)continue}}if(n===1){Ws(e,0),Ii(e,t,0,!0);break}e:{switch(s=e,u=n,u){case 0:case 1:throw Error(I(345));case 4:if((t&4194048)!==t)break;case 6:Ii(s,t,zt,!zi);break e;case 2:At=null;break;case 3:case 5:break;default:throw Error(I(329))}if((t&62914560)===t&&(n=Un+300-be(),10<n)){if(Ii(s,t,zt,!zi),Vr(s,0,!0)!==0)break e;bi=t,s.timeoutHandle=lf(Mu.bind(null,s,i,At,In,Wl,t,zt,fs,qs,zi,u,"Throttled",-0,0),n);break e}Mu(s,i,At,In,Wl,t,zt,fs,qs,zi,u,null,-0,0)}}break}while(!0);si(e)}function Mu(e,t,i,s,n,u,x,B,F,Q,le,ce,Z,se){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ai},Cu(t,u,ce);var ve=(u&62914560)===u?Un-be():(u&4194048)===u?Lu-be():0;if(ve=nv(ce,ve),ve!==null){bi=u,e.cancelPendingCommit=ve(Uu.bind(null,e,t,u,i,s,n,x,B,F,le,ce,null,Z,se)),Ii(e,u,x,!Q);return}}Uu(e,t,u,i,s,n,x,B,F)}function b_(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 n=i[s],u=n.getSnapshot;n=n.value;try{if(!Tt(u(),n))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 Ii(e,t,i,s){t&=~Gl,t&=~fs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var n=t;0<n;){var u=31-pt(n),x=1<<u;s[u]=-1,n&=~x}i!==0&&Io(e,i,t)}function Fn(){return(je&6)===0?(kr(0),!1):!0}function Vl(){if(De!==null){if(Ie===0)var e=De.return;else e=De,hi=ss=null,ul(e),Hs=null,gr=0,e=De;for(;e!==null;)lu(e.alternate,e),e=e.return;De=null}}function Ws(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,F_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),bi=0,Vl(),Xe=e,De=i=oi(e.current,null),Be=t,Ie=0,Ht=null,zi=!1,Ps=Js(e,t),ql=!1,qs=zt=Gl=fs=Ni=tt=0,At=Br=null,Wl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var n=31-pt(s),u=1<<n;t|=e[n],s&=~u}return yi=t,on(),i}function Tu(e,t){Ee=null,z.H=Er,t===ks||t===gn?(t=Xc(),Ie=3):t===Ja?(t=Xc(),Ie=4):Ie=t===Al?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ht=t,De===null&&(tt=1,Mn(e,Pt(t,e.current)))}function Bu(){var e=Ot.current;return e===null?!0:(Be&4194048)===Be?$t===null:(Be&62914560)===Be||(Be&536870912)!==0?e===$t:!1}function Ou(){var e=z.H;return z.H=Er,e===null?Er:e}function ku(){var e=z.A;return z.A=S_,e}function Pn(){tt=4,zi||(Be&4194048)!==Be&&Ot.current!==null||(Ps=!0),(Ni&134217727)===0&&(fs&134217727)===0||Xe===null||Ii(Xe,Be,zt,!1)}function Kl(e,t,i){var s=je;je|=2;var n=Ou(),u=ku();(Xe!==e||Be!==t)&&(In=null,Ws(e,t)),t=!1;var x=tt;e:do try{if(Ie!==0&&De!==null){var B=De,F=Ht;switch(Ie){case 8:Vl(),x=6;break e;case 3:case 2:case 9:case 6:Ot.current===null&&(t=!0);var Q=Ie;if(Ie=0,Ht=null,$s(e,B,F,Q),i&&Ps){x=0;break e}break;default:Q=Ie,Ie=0,Ht=null,$s(e,B,F,Q)}}C_(),x=tt;break}catch(le){Tu(e,le)}while(!0);return t&&e.shellSuspendCounter++,hi=ss=null,je=s,z.H=n,z.A=u,De===null&&(Xe=null,Be=0,on()),x}function C_(){for(;De!==null;)Hu(De)}function w_(e,t){var i=je;je|=2;var s=Ou(),n=ku();Xe!==e||Be!==t?(In=null,jn=be()+500,Ws(e,t)):Ps=Js(e,t);e:do try{if(Ie!==0&&De!==null){t=De;var u=Ht;t:switch(Ie){case 1:Ie=0,Ht=null,$s(e,t,u,1);break;case 2:case 9:if(Wc(u)){Ie=0,Ht=null,zu(t);break}t=function(){Ie!==2&&Ie!==9||Xe!==e||(Ie=7),si(e)},u.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Wc(u)?(Ie=0,Ht=null,zu(t)):(Ie=0,Ht=null,$s(e,t,u,7));break;case 5:var x=null;switch(De.tag){case 26:x=De.memoizedState;case 5:case 27:var B=De;if(x?Cf(x):B.stateNode.complete){Ie=0,Ht=null;var F=B.sibling;if(F!==null)De=F;else{var Q=B.return;Q!==null?(De=Q,qn(Q)):De=null}break t}}Ie=0,Ht=null,$s(e,t,u,5);break;case 6:Ie=0,Ht=null,$s(e,t,u,6);break;case 8:Vl(),tt=6;break e;default:throw Error(I(462))}}E_();break}catch(le){Tu(e,le)}while(!0);return hi=ss=null,z.H=s,z.A=n,je=i,De!==null?0:(Xe=null,Be=0,on(),tt)}function E_(){for(;De!==null&&!Re();)Hu(De)}function Hu(e){var t=nu(e.alternate,e,yi);e.memoizedProps=e.pendingProps,t===null?qn(e):De=t}function zu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Jh(i,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=Jh(i,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:ul(t);default:lu(i,t),t=De=kc(t,yi),t=nu(i,t,yi)}e.memoizedProps=e.pendingProps,t===null?qn(e):De=t}function $s(e,t,i,s){hi=ss=null,ul(t),Hs=null,gr=0;var n=t.return;try{if(f_(e,n,t,i,Be)){tt=1,Mn(e,Pt(i,e.current)),De=null;return}}catch(u){if(n!==null)throw De=n,u;tt=1,Mn(e,Pt(i,e.current)),De=null;return}t.flags&32768?(ke||s===1?e=!0:Ps||(Be&536870912)!==0?e=!1:(zi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ot.current,s!==null&&s.tag===13&&(s.flags|=16384))),Nu(t,e)):qn(t)}function qn(e){var t=e;do{if((t.flags&32768)!==0){Nu(t,zi);return}e=t.return;var i=v_(t.alternate,t,yi);if(i!==null){De=i;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);tt===0&&(tt=5)}function Nu(e,t){do{var i=g_(e.alternate,e);if(i!==null){i.flags&=32767,De=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=i}while(e!==null);tt=6,De=null}function Uu(e,t,i,s,n,u,x,B,F){e.cancelPendingCommit=null;do Gn();while(ct!==0);if((je&6)!==0)throw Error(I(327));if(t!==null){if(t===e.current)throw Error(I(177));if(u=t.lanes|t.childLanes,u|=Ua,sd(e,i,u,x,B,F),e===Xe&&(De=Xe=null,Be=0),Gs=t,ji=e,bi=i,$l=u,Xl=n,Au=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,R_(ot,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null,n=U.p,U.p=2,x=je,je|=4;try{m_(e,t,i)}finally{je=x,U.p=n,z.T=s}}ct=1,ju(),Iu(),Fu()}}function ju(){if(ct===1){ct=0;var e=ji,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=z.T,z.T=null;var s=U.p;U.p=2;var n=je;je|=4;try{Su(t,e);var u=oo,x=xc(e.containerInfo),B=u.focusedElem,F=u.selectionRange;if(x!==B&&B&&B.ownerDocument&&Ec(B.ownerDocument.documentElement,B)){if(F!==null&&Oa(B)){var Q=F.start,le=F.end;if(le===void 0&&(le=Q),"selectionStart"in B)B.selectionStart=Q,B.selectionEnd=Math.min(le,B.value.length);else{var ce=B.ownerDocument||document,Z=ce&&ce.defaultView||window;if(Z.getSelection){var se=Z.getSelection(),ve=B.textContent.length,ye=Math.min(F.start,ve),$e=F.end===void 0?ye:Math.min(F.end,ve);!se.extend&&ye>$e&&(x=$e,$e=ye,ye=x);var Y=wc(B,ye),G=wc(B,$e);if(Y&&G&&(se.rangeCount!==1||se.anchorNode!==Y.node||se.anchorOffset!==Y.offset||se.focusNode!==G.node||se.focusOffset!==G.offset)){var K=ce.createRange();K.setStart(Y.node,Y.offset),se.removeAllRanges(),ye>$e?(se.addRange(K),se.extend(G.node,G.offset)):(K.setEnd(G.node,G.offset),se.addRange(K))}}}}for(ce=[],se=B;se=se.parentNode;)se.nodeType===1&&ce.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<ce.length;B++){var oe=ce[B];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ia=!!lo,oo=lo=null}finally{je=n,U.p=s,z.T=i}}e.current=t,ct=2}}function Iu(){if(ct===2){ct=0;var e=ji,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=z.T,z.T=null;var s=U.p;U.p=2;var n=je;je|=4;try{_u(e,t.alternate,t)}finally{je=n,U.p=s,z.T=i}}ct=3}}function Fu(){if(ct===4||ct===3){ct=0,_e();var e=ji,t=Gs,i=bi,s=Au;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,Gs=ji=null,Pu(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Ui=null),_a(i),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Vt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=z.T,n=U.p,U.p=2,z.T=null;try{for(var u=e.onRecoverableError,x=0;x<s.length;x++){var B=s[x];u(B.value,{componentStack:B.stack})}}finally{z.T=t,U.p=n}}(bi&3)!==0&&Gn(),si(e),n=e.pendingLanes,(i&261930)!==0&&(n&42)!==0?e===Yl?Or++:(Or=0,Yl=e):Or=0,kr(0)}}function Pu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_r(t)))}function Gn(){return ju(),Iu(),Fu(),qu()}function qu(){if(ct!==5)return!1;var e=ji,t=$l;$l=0;var i=_a(bi),s=z.T,n=U.p;try{U.p=32>i?32:i,z.T=null,i=Xl,Xl=null;var u=ji,x=bi;if(ct=0,Gs=ji=null,bi=0,(je&6)!==0)throw Error(I(331));var B=je;if(je|=4,Eu(u.current),bu(u,u.current,x,i),je=B,kr(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Vt,u)}catch{}return!0}finally{U.p=n,z.T=s,Pu(e,t)}}function Gu(e,t,i){t=Pt(i,t),t=Ll(e.stateNode,t,2),e=Bi(e,t,2),e!==null&&(er(e,2),si(e))}function Fe(e,t,i){if(e.tag===3)Gu(e,e,i);else for(;t!==null;){if(t.tag===3){Gu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ui===null||!Ui.has(s))){e=Pt(i,e),i=Wh(2),s=Bi(t,i,2),s!==null&&($h(i,s,t,e),er(s,2),si(s));break}}t=t.return}}function Ql(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new y_;var n=new Set;s.set(t,n)}else n=s.get(t),n===void 0&&(n=new Set,s.set(t,n));n.has(i)||(ql=!0,n.add(i),e=x_.bind(null,e,t,i),t.then(e,e))}function x_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Xe===e&&(Be&i)===i&&(tt===4||tt===3&&(Be&62914560)===Be&&300>be()-Un?(je&2)===0&&Ws(e,0):Gl|=i,qs===Be&&(qs=0)),si(e)}function Wu(e,t){t===0&&(t=jo()),e=es(e,t),e!==null&&(er(e,t),si(e))}function L_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Wu(e,i)}function A_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,n=e.memoizedState;n!==null&&(i=n.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(I(314))}s!==null&&s.delete(t),Wu(e,i)}function R_(e,t){return Te(e,t)}var Wn=null,Xs=null,Zl=!1,$n=!1,Jl=!1,Fi=0;function si(e){e!==Xs&&e.next===null&&(Xs===null?Wn=Xs=e:Xs=Xs.next=e),$n=!0,Zl||(Zl=!0,M_())}function kr(e,t){if(!Jl&&$n){Jl=!0;do for(var i=!1,s=Wn;s!==null;){if(e!==0){var n=s.pendingLanes;if(n===0)var u=0;else{var x=s.suspendedLanes,B=s.pingedLanes;u=(1<<31-pt(42|e)+1)-1,u&=n&~(x&~B),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(i=!0,Vu(s,u))}else u=Be,u=Vr(s,s===Xe?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||Js(s,u)||(i=!0,Vu(s,u));s=s.next}while(i);Jl=!1}}function D_(){$u()}function $u(){$n=Zl=!1;var e=0;Fi!==0&&I_()&&(e=Fi);for(var t=be(),i=null,s=Wn;s!==null;){var n=s.next,u=Xu(s,t);u===0?(s.next=null,i===null?Wn=n:i.next=n,n===null&&(Xs=i)):(i=s,(e!==0||(u&3)!==0)&&($n=!0)),s=n}ct!==0&&ct!==5||kr(e),Fi!==0&&(Fi=0)}function Xu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var x=31-pt(u),B=1<<x,F=n[x];F===-1?((B&i)===0||(B&s)!==0)&&(n[x]=id(B,t)):F<=t&&(e.expiredLanes|=B),u&=~B}if(t=Xe,i=Be,i=Vr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Le(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Js(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Le(s),_a(i)){case 2:case 8:i=Ut;break;case 32:i=ot;break;case 268435456:i=Je;break;default:i=ot}return s=Yu.bind(null,e),i=Te(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Le(s),e.callbackPriority=2,e.callbackNode=null,2}function Yu(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=Be;return s=Vr(e,e===Xe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Du(e,s,t),Xu(e,be()),e.callbackNode!=null&&e.callbackNode===i?Yu.bind(null,e):null)}function Vu(e,t){if(Gn())return null;Du(e,t,!0)}function M_(){P_(function(){(je&6)!==0?Te(Pe,D_):$u()})}function eo(){if(Fi===0){var e=Bs;e===0&&(e=wi,wi<<=1,(wi&261888)===0&&(wi=256)),Fi=e}return Fi}function Ku(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Jr(""+e)}function Qu(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,n){if(t==="submit"&&i&&i.stateNode===n){var u=Ku((n[Ct]||null).action),x=s.submitter;x&&(t=(t=x[Ct]||null)?Ku(t.formAction):x.getAttribute("formAction"),t!==null&&(u=t,x=null));var B=new rn("action","action",null,s,n);e.push({event:B,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Fi!==0){var F=x?Qu(n,x):new FormData(n);yl(i,{pending:!0,data:F,method:n.method,action:u},null,F)}}else typeof u=="function"&&(B.preventDefault(),F=x?Qu(n,x):new FormData(n),yl(i,{pending:!0,data:F,method:n.method,action:u},u,F))},currentTarget:n}]})}}for(var to=0;to<Na.length;to++){var io=Na[to],B_=io.toLowerCase(),O_=io[0].toUpperCase()+io.slice(1);Kt(B_,"on"+O_)}Kt(Rc,"onAnimationEnd"),Kt(Dc,"onAnimationIteration"),Kt(Mc,"onAnimationStart"),Kt("dblclick","onDoubleClick"),Kt("focusin","onFocus"),Kt("focusout","onBlur"),Kt(Vd,"onTransitionRun"),Kt(Kd,"onTransitionStart"),Kt(Qd,"onTransitionCancel"),Kt(Tc,"onTransitionEnd"),ps("onMouseEnter",["mouseout","mouseover"]),ps("onMouseLeave",["mouseout","mouseover"]),ps("onPointerEnter",["pointerout","pointerover"]),ps("onPointerLeave",["pointerout","pointerover"]),Ki("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ki("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ki("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ki("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hr="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(" "),k_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hr));function Zu(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],n=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var x=s.length-1;0<=x;x--){var B=s[x],F=B.instance,Q=B.currentTarget;if(B=B.listener,F!==u&&n.isPropagationStopped())break e;u=B,n.currentTarget=Q;try{u(n)}catch(le){ln(le)}n.currentTarget=null,u=F}else for(x=0;x<s.length;x++){if(B=s[x],F=B.instance,Q=B.currentTarget,B=B.listener,F!==u&&n.isPropagationStopped())break e;u=B,n.currentTarget=Q;try{u(n)}catch(le){ln(le)}n.currentTarget=null,u=F}}}}function Me(e,t){var i=t[va];i===void 0&&(i=t[va]=new Set);var s=e+"__bubble";i.has(s)||(Ju(t,e,2,!1),i.add(s))}function so(e,t,i){var s=0;t&&(s|=4),Ju(i,e,s,t)}var Xn="_reactListening"+Math.random().toString(36).slice(2);function ro(e){if(!e[Xn]){e[Xn]=!0,$o.forEach(function(i){i!=="selectionchange"&&(k_.has(i)||so(i,!1,e),so(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xn]||(t[Xn]=!0,so("selectionchange",!1,t))}}function Ju(e,t,i,s){switch(Df(t)){case 2:var n=ov;break;case 8:n=cv;break;default:n=yo}i=n.bind(null,t,i,e),n=void 0,!Ea||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),s?n!==void 0?e.addEventListener(t,i,{capture:!0,passive:n}):e.addEventListener(t,i,!0):n!==void 0?e.addEventListener(t,i,{passive:n}):e.addEventListener(t,i,!1)}function no(e,t,i,s,n){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var x=s.tag;if(x===3||x===4){var B=s.stateNode.containerInfo;if(B===n)break;if(x===4)for(x=s.return;x!==null;){var F=x.tag;if((F===3||F===4)&&x.stateNode.containerInfo===n)return;x=x.return}for(;B!==null;){if(x=vs(B),x===null)return;if(F=x.tag,F===5||F===6||F===26||F===27){s=u=x;continue e}B=B.parentNode}}s=s.return}rc(function(){var Q=u,le=Ca(i),ce=[];e:{var Z=Bc.get(e);if(Z!==void 0){var se=rn,ve=e;switch(e){case"keypress":if(tn(i)===0)break e;case"keydown":case"keyup":se=Ad;break;case"focusin":ve="focus",se=Ra;break;case"focusout":ve="blur",se=Ra;break;case"beforeblur":case"afterblur":se=Ra;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":se=lc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=vd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=Md;break;case Rc:case Dc:case Mc:se=pd;break;case Tc:se=Bd;break;case"scroll":case"scrollend":se=dd;break;case"wheel":se=kd;break;case"copy":case"cut":case"paste":se=yd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=cc;break;case"toggle":case"beforetoggle":se=zd}var ye=(t&4)!==0,$e=!ye&&(e==="scroll"||e==="scrollend"),Y=ye?Z!==null?Z+"Capture":null:Z;ye=[];for(var G=Q,K;G!==null;){var oe=G;if(K=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||K===null||Y===null||(oe=sr(G,Y),oe!=null&&ye.push(zr(G,oe,K))),$e)break;G=G.return}0<ye.length&&(Z=new se(Z,ve,null,i,le),ce.push({event:Z,listeners:ye}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",Z&&i!==ba&&(ve=i.relatedTarget||i.fromElement)&&(vs(ve)||ve[_s]))break e;if((se||Z)&&(Z=le.window===le?le:(Z=le.ownerDocument)?Z.defaultView||Z.parentWindow:window,se?(ve=i.relatedTarget||i.toElement,se=Q,ve=ve?vs(ve):null,ve!==null&&($e=J(ve),ye=ve.tag,ve!==$e||ye!==5&&ye!==27&&ye!==6)&&(ve=null)):(se=null,ve=Q),se!==ve)){if(ye=lc,oe="onMouseLeave",Y="onMouseEnter",G="mouse",(e==="pointerout"||e==="pointerover")&&(ye=cc,oe="onPointerLeave",Y="onPointerEnter",G="pointer"),$e=se==null?Z:ir(se),K=ve==null?Z:ir(ve),Z=new ye(oe,G+"leave",se,i,le),Z.target=$e,Z.relatedTarget=K,oe=null,vs(le)===Q&&(ye=new ye(Y,G+"enter",ve,i,le),ye.target=K,ye.relatedTarget=$e,oe=ye),$e=oe,se&&ve)t:{for(ye=H_,Y=se,G=ve,K=0,oe=Y;oe;oe=ye(oe))K++;oe=0;for(var pe=G;pe;pe=ye(pe))oe++;for(;0<K-oe;)Y=ye(Y),K--;for(;0<oe-K;)G=ye(G),oe--;for(;K--;){if(Y===G||G!==null&&Y===G.alternate){ye=Y;break t}Y=ye(Y),G=ye(G)}ye=null}else ye=null;se!==null&&ef(ce,Z,se,ye,!1),ve!==null&&$e!==null&&ef(ce,$e,ve,ye,!0)}}e:{if(Z=Q?ir(Q):window,se=Z.nodeName&&Z.nodeName.toLowerCase(),se==="select"||se==="input"&&Z.type==="file")var Ne=mc;else if(vc(Z))if(pc)Ne=$d;else{Ne=Gd;var ge=qd}else se=Z.nodeName,!se||se.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?Q&&ya(Q.elementType)&&(Ne=mc):Ne=Wd;if(Ne&&(Ne=Ne(e,Q))){gc(ce,Ne,i,le);break e}ge&&ge(e,Z,Q),e==="focusout"&&Q&&Z.type==="number"&&Q.memoizedProps.value!=null&&Sa(Z,"number",Z.value)}switch(ge=Q?ir(Q):window,e){case"focusin":(vc(ge)||ge.contentEditable==="true")&&(Es=ge,ka=Q,ur=null);break;case"focusout":ur=ka=Es=null;break;case"mousedown":Ha=!0;break;case"contextmenu":case"mouseup":case"dragend":Ha=!1,Lc(ce,i,le);break;case"selectionchange":if(Yd)break;case"keydown":case"keyup":Lc(ce,i,le)}var xe;if(Ma)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else ws?dc(e,i)&&(Oe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Oe="onCompositionStart");Oe&&(hc&&i.locale!=="ko"&&(ws||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&ws&&(xe=nc()):(xi=le,xa="value"in xi?xi.value:xi.textContent,ws=!0)),ge=Yn(Q,Oe),0<ge.length&&(Oe=new oc(Oe,e,null,i,le),ce.push({event:Oe,listeners:ge}),xe?Oe.data=xe:(xe=_c(i),xe!==null&&(Oe.data=xe)))),(xe=Ud?jd(e,i):Id(e,i))&&(Oe=Yn(Q,"onBeforeInput"),0<Oe.length&&(ge=new oc("onBeforeInput","beforeinput",null,i,le),ce.push({event:ge,listeners:Oe}),ge.data=xe)),T_(ce,e,Q,i,le)}Zu(ce,t)})}function zr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Yn(e,t){for(var i=t+"Capture",s=[];e!==null;){var n=e,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=sr(e,i),n!=null&&s.unshift(zr(e,n,u)),n=sr(e,t),n!=null&&s.push(zr(e,n,u))),e.tag===3)return s;e=e.return}return[]}function H_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ef(e,t,i,s,n){for(var u=t._reactName,x=[];i!==null&&i!==s;){var B=i,F=B.alternate,Q=B.stateNode;if(B=B.tag,F!==null&&F===s)break;B!==5&&B!==26&&B!==27||Q===null||(F=Q,n?(Q=sr(i,u),Q!=null&&x.unshift(zr(i,Q,F))):n||(Q=sr(i,u),Q!=null&&x.push(zr(i,Q,F)))),i=i.return}x.length!==0&&e.push({event:t,listeners:x})}var z_=/\r\n?/g,N_=/\u0000|\uFFFD/g;function tf(e){return(typeof e=="string"?e:""+e).replace(z_,`
49
- `).replace(N_,"")}function sf(e,t){return t=tf(t),tf(e)===t}function We(e,t,i,s,n,u){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ys(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ys(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":ic(e,s,u);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=Jr(""+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 u=="function"&&(i==="formAction"?(t!=="input"&&We(e,t,"name",n.name,n,null),We(e,t,"formEncType",n.formEncType,n,null),We(e,t,"formMethod",n.formMethod,n,null),We(e,t,"formTarget",n.formTarget,n,null)):(We(e,t,"encType",n.encType,n,null),We(e,t,"method",n.method,n,null),We(e,t,"target",n.target,n,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Jr(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ai);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(I(61));if(i=s.__html,i!=null){if(n.children!=null)throw Error(I(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=Jr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Me("beforetoggle",e),Me("toggle",e),Kr(e,"popover",s);break;case"xlinkActuate":ni(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ni(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ni(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ni(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ni(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ni(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ni(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ni(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ni(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Kr(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=ud.get(i)||i,Kr(e,i,s))}}function ao(e,t,i,s,n,u){switch(i){case"style":ic(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(I(61));if(i=s.__html,i!=null){if(n.children!=null)throw Error(I(60));e.innerHTML=i}}break;case"children":typeof s=="string"?ys(e,s):(typeof s=="number"||typeof s=="bigint")&&ys(e,""+s);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ai);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(n=i.endsWith("Capture"),t=i.slice(2,n?i.length-7:void 0),u=e[Ct]||null,u=u!=null?u[i]:null,typeof u=="function"&&e.removeEventListener(t,u,n),typeof s=="function")){typeof u!="function"&&u!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,n);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Kr(e,i,s)}}}function mt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var s=!1,n=!1,u;for(u in i)if(i.hasOwnProperty(u)){var x=i[u];if(x!=null)switch(u){case"src":s=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:We(e,t,u,x,i,null)}}n&&We(e,t,"srcSet",i.srcSet,i,null),s&&We(e,t,"src",i.src,i,null);return;case"input":Me("invalid",e);var B=u=x=n=null,F=null,Q=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":n=le;break;case"type":x=le;break;case"checked":F=le;break;case"defaultChecked":Q=le;break;case"value":u=le;break;case"defaultValue":B=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(I(137,t));break;default:We(e,t,s,le,i,null)}}Zo(e,u,B,F,Q,x,n,!1);return;case"select":Me("invalid",e),s=x=u=null;for(n in i)if(i.hasOwnProperty(n)&&(B=i[n],B!=null))switch(n){case"value":u=B;break;case"defaultValue":x=B;break;case"multiple":s=B;default:We(e,t,n,B,i,null)}t=u,i=x,e.multiple=!!s,t!=null?Ss(e,!!s,t,!1):i!=null&&Ss(e,!!s,i,!0);return;case"textarea":Me("invalid",e),u=n=s=null;for(x in i)if(i.hasOwnProperty(x)&&(B=i[x],B!=null))switch(x){case"value":s=B;break;case"defaultValue":n=B;break;case"children":u=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(I(91));break;default:We(e,t,x,B,i,null)}ec(e,s,n,u);return;case"option":for(F in i)if(i.hasOwnProperty(F)&&(s=i[F],s!=null))switch(F){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:We(e,t,F,s,i,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(s=0;s<Hr.length;s++)Me(Hr[s],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in i)if(i.hasOwnProperty(Q)&&(s=i[Q],s!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:We(e,t,Q,s,i,null)}return;default:if(ya(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&ao(e,t,le,s,i,void 0));return}}for(B in i)i.hasOwnProperty(B)&&(s=i[B],s!=null&&We(e,t,B,s,i,null))}function U_(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 n=null,u=null,x=null,B=null,F=null,Q=null,le=null;for(se in i){var ce=i[se];if(i.hasOwnProperty(se)&&ce!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":F=ce;default:s.hasOwnProperty(se)||We(e,t,se,null,s,ce)}}for(var Z in s){var se=s[Z];if(ce=i[Z],s.hasOwnProperty(Z)&&(se!=null||ce!=null))switch(Z){case"type":u=se;break;case"name":n=se;break;case"checked":Q=se;break;case"defaultChecked":le=se;break;case"value":x=se;break;case"defaultValue":B=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(I(137,t));break;default:se!==ce&&We(e,t,Z,se,s,ce)}}pa(e,x,B,F,Q,le,u,n);return;case"select":se=x=B=Z=null;for(u in i)if(F=i[u],i.hasOwnProperty(u)&&F!=null)switch(u){case"value":break;case"multiple":se=F;default:s.hasOwnProperty(u)||We(e,t,u,null,s,F)}for(n in s)if(u=s[n],F=i[n],s.hasOwnProperty(n)&&(u!=null||F!=null))switch(n){case"value":Z=u;break;case"defaultValue":B=u;break;case"multiple":x=u;default:u!==F&&We(e,t,n,u,s,F)}t=B,i=x,s=se,Z!=null?Ss(e,!!i,Z,!1):!!s!=!!i&&(t!=null?Ss(e,!!i,t,!0):Ss(e,!!i,i?[]:"",!1));return;case"textarea":se=Z=null;for(B in i)if(n=i[B],i.hasOwnProperty(B)&&n!=null&&!s.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:We(e,t,B,null,s,n)}for(x in s)if(n=s[x],u=i[x],s.hasOwnProperty(x)&&(n!=null||u!=null))switch(x){case"value":Z=n;break;case"defaultValue":se=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(I(91));break;default:n!==u&&We(e,t,x,n,s,u)}Jo(e,Z,se);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:We(e,t,ve,null,s,Z)}for(F in s)if(Z=s[F],se=i[F],s.hasOwnProperty(F)&&Z!==se&&(Z!=null||se!=null))switch(F){case"selected":e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:We(e,t,F,Z,s,se)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ye in i)Z=i[ye],i.hasOwnProperty(ye)&&Z!=null&&!s.hasOwnProperty(ye)&&We(e,t,ye,null,s,Z);for(Q in s)if(Z=s[Q],se=i[Q],s.hasOwnProperty(Q)&&Z!==se&&(Z!=null||se!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(I(137,t));break;default:We(e,t,Q,Z,s,se)}return;default:if(ya(t)){for(var $e in i)Z=i[$e],i.hasOwnProperty($e)&&Z!==void 0&&!s.hasOwnProperty($e)&&ao(e,t,$e,void 0,s,Z);for(le in s)Z=s[le],se=i[le],!s.hasOwnProperty(le)||Z===se||Z===void 0&&se===void 0||ao(e,t,le,Z,s,se);return}}for(var Y in i)Z=i[Y],i.hasOwnProperty(Y)&&Z!=null&&!s.hasOwnProperty(Y)&&We(e,t,Y,null,s,Z);for(ce in s)Z=s[ce],se=i[ce],!s.hasOwnProperty(ce)||Z===se||Z==null&&se==null||We(e,t,ce,Z,s,se)}function rf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function j_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var n=i[s],u=n.transferSize,x=n.initiatorType,B=n.duration;if(u&&B&&rf(x)){for(x=0,B=n.responseEnd,s+=1;s<i.length;s++){var F=i[s],Q=F.startTime;if(Q>B)break;var le=F.transferSize,ce=F.initiatorType;le&&rf(ce)&&(F=F.responseEnd,x+=le*(F<B?1:(B-Q)/(F-Q)))}if(--s,t+=8*(u+x)/(n.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 lo=null,oo=null;function Vn(e){return e.nodeType===9?e:e.ownerDocument}function nf(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 af(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 co(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 ho=null;function I_(){var e=window.event;return e&&e.type==="popstate"?e===ho?!1:(ho=e,!0):(ho=null,!1)}var lf=typeof setTimeout=="function"?setTimeout:void 0,F_=typeof clearTimeout=="function"?clearTimeout:void 0,of=typeof Promise=="function"?Promise:void 0,P_=typeof queueMicrotask=="function"?queueMicrotask:typeof of<"u"?function(e){return of.resolve(null).then(e).catch(q_)}:lf;function q_(e){setTimeout(function(){throw e})}function Pi(e){return e==="head"}function cf(e,t){var i=t,s=0;do{var n=i.nextSibling;if(e.removeChild(i),n&&n.nodeType===8)if(i=n.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(n),Qs(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Nr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Nr(i);for(var u=i.firstChild;u;){var x=u.nextSibling,B=u.nodeName;u[tr]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&u.rel.toLowerCase()==="stylesheet"||i.removeChild(u),u=x}}else i==="body"&&Nr(e.ownerDocument.body);i=n}while(i);Qs(t)}function hf(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 uo(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":uo(i),ga(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function G_(e,t,i,s){for(;e.nodeType===1;){var n=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[tr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Xt(e.nextSibling),e===null)break}return null}function W_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Xt(e.nextSibling),e===null))return null;return e}function uf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xt(e.nextSibling),e===null))return null;return e}function fo(e){return e.data==="$?"||e.data==="$~"}function _o(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $_(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 Xt(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 vo=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Xt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function df(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 _f(e,t,i){switch(t=Vn(i),e){case"html":if(e=t.documentElement,!e)throw Error(I(452));return e;case"head":if(e=t.head,!e)throw Error(I(453));return e;case"body":if(e=t.body,!e)throw Error(I(454));return e;default:throw Error(I(451))}}function Nr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ga(e)}var Yt=new Map,vf=new Set;function Kn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ci=U.d;U.d={f:X_,r:Y_,D:V_,C:K_,L:Q_,m:Z_,X:ev,S:J_,M:tv};function X_(){var e=Ci.f(),t=Fn();return e||t}function Y_(e){var t=gs(e);t!==null&&t.tag===5&&t.type==="form"?Th(t):Ci.r(e)}var Ys=typeof document>"u"?null:document;function gf(e,t,i){var s=Ys;if(s&&typeof t=="string"&&t){var n=It(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof i=="string"&&(n+='[crossorigin="'+i+'"]'),vf.has(n)||(vf.add(n),e={rel:e,crossOrigin:i,href:t},s.querySelector(n)===null&&(t=s.createElement("link"),mt(t,"link",e),ut(t),s.head.appendChild(t)))}}function V_(e){Ci.D(e),gf("dns-prefetch",e,null)}function K_(e,t){Ci.C(e,t),gf("preconnect",e,t)}function Q_(e,t,i){Ci.L(e,t,i);var s=Ys;if(s&&e&&t){var n='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&i&&i.imageSrcSet?(n+='[imagesrcset="'+It(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(n+='[imagesizes="'+It(i.imageSizes)+'"]')):n+='[href="'+It(e)+'"]';var u=n;switch(t){case"style":u=Vs(e);break;case"script":u=Ks(e)}Yt.has(u)||(e=o({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Yt.set(u,e),s.querySelector(n)!==null||t==="style"&&s.querySelector(Ur(u))||t==="script"&&s.querySelector(jr(u))||(t=s.createElement("link"),mt(t,"link",e),ut(t),s.head.appendChild(t)))}}function Z_(e,t){Ci.m(e,t);var i=Ys;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+It(s)+'"][href="'+It(e)+'"]',u=n;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ks(e)}if(!Yt.has(u)&&(e=o({rel:"modulepreload",href:e},t),Yt.set(u,e),i.querySelector(n)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(jr(u)))return}s=i.createElement("link"),mt(s,"link",e),ut(s),i.head.appendChild(s)}}}function J_(e,t,i){Ci.S(e,t,i);var s=Ys;if(s&&e){var n=ms(s).hoistableStyles,u=Vs(e);t=t||"default";var x=n.get(u);if(!x){var B={loading:0,preload:null};if(x=s.querySelector(Ur(u)))B.loading=5;else{e=o({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Yt.get(u))&&go(e,i);var F=x=s.createElement("link");ut(F),mt(F,"link",e),F._p=new Promise(function(Q,le){F.onload=Q,F.onerror=le}),F.addEventListener("load",function(){B.loading|=1}),F.addEventListener("error",function(){B.loading|=2}),B.loading|=4,Qn(x,t,s)}x={type:"stylesheet",instance:x,count:1,state:B},n.set(u,x)}}}function ev(e,t){Ci.X(e,t);var i=Ys;if(i&&e){var s=ms(i).hoistableScripts,n=Ks(e),u=s.get(n);u||(u=i.querySelector(jr(n)),u||(e=o({src:e,async:!0},t),(t=Yt.get(n))&&mo(e,t),u=i.createElement("script"),ut(u),mt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(n,u))}}function tv(e,t){Ci.M(e,t);var i=Ys;if(i&&e){var s=ms(i).hoistableScripts,n=Ks(e),u=s.get(n);u||(u=i.querySelector(jr(n)),u||(e=o({src:e,async:!0,type:"module"},t),(t=Yt.get(n))&&mo(e,t),u=i.createElement("script"),ut(u),mt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(n,u))}}function mf(e,t,i,s){var n=(n=ue.current)?Kn(n):null;if(!n)throw Error(I(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Vs(i.href),i=ms(n).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=Vs(i.href);var u=ms(n).hoistableStyles,x=u.get(e);if(x||(n=n.ownerDocument||n,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,x),(u=n.querySelector(Ur(e)))&&!u._p&&(x.instance=u,x.state.loading=5),Yt.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},Yt.set(e,i),u||iv(n,e,i,x.state))),t&&s===null)throw Error(I(528,""));return x}if(t&&s!==null)throw Error(I(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ks(i),i=ms(n).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(I(444,e))}}function Vs(e){return'href="'+It(e)+'"'}function Ur(e){return'link[rel="stylesheet"]['+e+"]"}function pf(e){return o({},e,{"data-precedence":e.precedence,precedence:null})}function iv(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}),mt(t,"link",i),ut(t),e.head.appendChild(t))}function Ks(e){return'[src="'+It(e)+'"]'}function jr(e){return"script[async]"+e}function Sf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+It(i.href)+'"]');if(s)return t.instance=s,ut(s),s;var n=o({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ut(s),mt(s,"style",n),Qn(s,i.precedence,e),t.instance=s;case"stylesheet":n=Vs(i.href);var u=e.querySelector(Ur(n));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;s=pf(i),(n=Yt.get(n))&&go(s,n),u=(e.ownerDocument||e).createElement("link"),ut(u);var x=u;return x._p=new Promise(function(B,F){x.onload=B,x.onerror=F}),mt(u,"link",s),t.state.loading|=4,Qn(u,i.precedence,e),t.instance=u;case"script":return u=Ks(i.src),(n=e.querySelector(jr(u)))?(t.instance=n,ut(n),n):(s=i,(n=Yt.get(u))&&(s=o({},i),mo(s,n)),e=e.ownerDocument||e,n=e.createElement("script"),ut(n),mt(n,"link",s),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(I(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]'),n=s.length?s[s.length-1]:null,u=n,x=0;x<s.length;x++){var B=s[x];if(B.dataset.precedence===t)u=B;else if(u!==n)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function mo(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 yf(e,t,i){if(Zn===null){var s=new Map,n=Zn=new Map;n.set(i,s)}else n=Zn,s=n.get(i),s||(s=new Map,n.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),n=0;n<i.length;n++){var u=i[n];if(!(u[tr]||u[dt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var x=u.getAttribute(t)||"";x=e+x;var B=s.get(x);B?B.push(u):s.set(x,[u])}}return s}function bf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function sv(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 Cf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function rv(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 n=Vs(s.href),u=t.querySelector(Ur(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jn.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=u,ut(u);return}u=t.ownerDocument||t,s=pf(s),(n=Yt.get(n))&&go(s,n),u=u.createElement("link"),ut(u);var x=u;x._p=new Promise(function(B,F){x.onload=B,x.onerror=F}),mt(u,"link",s),i.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Jn.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var po=0;function nv(e,t){return e.stylesheets&&e.count===0&&ta(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ta(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&po===0&&(po=62500*j_());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ta(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>po?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(n)}}:null}function Jn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ta(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ea=null;function ta(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ea=new Map,t.forEach(av,e),ea=null,Jn.call(e))}function av(e,t){if(!(t.state.loading&4)){var i=ea.get(e);if(i)var s=i.get(null);else{i=new Map,ea.set(e,i);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var x=n[u];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),s=x)}s&&i.set(null,s)}n=t.instance,x=n.getAttribute("data-precedence"),u=i.get(x)||s,u===s&&i.set(null,n),i.set(x,n),this.count++,s=Jn.bind(this),n.addEventListener("load",s),n.addEventListener("error",s),u?u.parentNode.insertBefore(n,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Ir={$$typeof:c,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function lv(e,t,i,s,n,u,x,B,F){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=fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.hiddenUpdates=fa(null),this.identifierPrefix=s,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function wf(e,t,i,s,n,u,x,B,F,Q,le,ce){return e=new lv(e,t,i,x,F,Q,le,ce,B),t=1,u===!0&&(t|=24),u=Bt(3,null,null,t),e.current=u,u.stateNode=e,t=Ka(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:i,cache:t},el(u),e}function Ef(e){return e?(e=As,e):As}function xf(e,t,i,s,n,u){n=Ef(n),s.context===null?s.context=n:s.pendingContext=n,s=Ti(t),s.payload={element:i},u=u===void 0?null:u,u!==null&&(s.callback=u),i=Bi(e,s,t),i!==null&&(Rt(i,e,t),pr(i,e,t))}function Lf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function So(e,t){Lf(e,t),(e=e.alternate)&&Lf(e,t)}function Af(e){if(e.tag===13||e.tag===31){var t=es(e,67108864);t!==null&&Rt(t,e,67108864),So(e,67108864)}}function Rf(e){if(e.tag===13||e.tag===31){var t=Nt();t=da(t);var i=es(e,t);i!==null&&Rt(i,e,t),So(e,t)}}var ia=!0;function ov(e,t,i,s){var n=z.T;z.T=null;var u=U.p;try{U.p=2,yo(e,t,i,s)}finally{U.p=u,z.T=n}}function cv(e,t,i,s){var n=z.T;z.T=null;var u=U.p;try{U.p=8,yo(e,t,i,s)}finally{U.p=u,z.T=n}}function yo(e,t,i,s){if(ia){var n=bo(s);if(n===null)no(e,t,s,sa,i),Mf(e,s);else if(uv(n,e,t,i,s))s.stopPropagation();else if(Mf(e,s),t&4&&-1<hv.indexOf(e)){for(;n!==null;){var u=gs(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var x=ri(u.pendingLanes);if(x!==0){var B=u;for(B.pendingLanes|=2,B.entangledLanes|=2;x;){var F=1<<31-pt(x);B.entanglements[1]|=F,x&=~F}si(u),(je&6)===0&&(jn=be()+500,kr(0))}}break;case 31:case 13:B=es(u,2),B!==null&&Rt(B,u,2),Fn(),So(u,2)}if(u=bo(s),u===null&&no(e,t,s,sa,i),u===n)break;n=u}n!==null&&s.stopPropagation()}else no(e,t,s,null,i)}}function bo(e){return e=Ca(e),Co(e)}var sa=null;function Co(e){if(sa=null,e=vs(e),e!==null){var t=J(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=W(t),e!==null)return e;e=null}else if(i===31){if(e=a(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 sa=e,null}function Df(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(Qe()){case Pe:return 2;case Ut:return 8;case ot:case bt:return 32;case Je:return 268435456;default:return 32}default:return 32}}var wo=!1,qi=null,Gi=null,Wi=null,Fr=new Map,Pr=new Map,$i=[],hv="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 Mf(e,t){switch(e){case"focusin":case"focusout":qi=null;break;case"dragenter":case"dragleave":Gi=null;break;case"mouseover":case"mouseout":Wi=null;break;case"pointerover":case"pointerout":Fr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pr.delete(t.pointerId)}}function qr(e,t,i,s,n,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:u,targetContainers:[n]},t!==null&&(t=gs(t),t!==null&&Af(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function uv(e,t,i,s,n){switch(t){case"focusin":return qi=qr(qi,e,t,i,s,n),!0;case"dragenter":return Gi=qr(Gi,e,t,i,s,n),!0;case"mouseover":return Wi=qr(Wi,e,t,i,s,n),!0;case"pointerover":var u=n.pointerId;return Fr.set(u,qr(Fr.get(u)||null,e,t,i,s,n)),!0;case"gotpointercapture":return u=n.pointerId,Pr.set(u,qr(Pr.get(u)||null,e,t,i,s,n)),!0}return!1}function Tf(e){var t=vs(e.target);if(t!==null){var i=J(t);if(i!==null){if(t=i.tag,t===13){if(t=W(i),t!==null){e.blockedOn=t,Go(e.priority,function(){Rf(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Go(e.priority,function(){Rf(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 ra(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=bo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ba=s,i.target.dispatchEvent(s),ba=null}else return t=gs(i),t!==null&&Af(t),e.blockedOn=i,!1;t.shift()}return!0}function Bf(e,t,i){ra(e)&&i.delete(t)}function fv(){wo=!1,qi!==null&&ra(qi)&&(qi=null),Gi!==null&&ra(Gi)&&(Gi=null),Wi!==null&&ra(Wi)&&(Wi=null),Fr.forEach(Bf),Pr.forEach(Bf)}function na(e,t){e.blockedOn===t&&(e.blockedOn=null,wo||(wo=!0,q.unstable_scheduleCallback(q.unstable_NormalPriority,fv)))}var aa=null;function Of(e){aa!==e&&(aa=e,q.unstable_scheduleCallback(q.unstable_NormalPriority,function(){aa===e&&(aa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],n=e[t+2];if(typeof s!="function"){if(Co(s||i)===null)continue;break}var u=gs(i);u!==null&&(e.splice(t,3),t-=3,yl(u,{pending:!0,data:n,method:i.method,action:s},s,n))}}))}function Qs(e){function t(F){return na(F,e)}qi!==null&&na(qi,e),Gi!==null&&na(Gi,e),Wi!==null&&na(Wi,e),Fr.forEach(t),Pr.forEach(t);for(var i=0;i<$i.length;i++){var s=$i[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<$i.length&&(i=$i[0],i.blockedOn===null);)Tf(i),i.blockedOn===null&&$i.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var n=i[s],u=i[s+1],x=n[Ct]||null;if(typeof u=="function")x||Of(i);else if(x){var B=null;if(u&&u.hasAttribute("formAction")){if(n=u,x=u[Ct]||null)B=x.formAction;else if(Co(n)!==null)continue}else B=x.action;typeof B=="function"?i[s+1]=B:(i.splice(s,3),s-=3),Of(i)}}}function kf(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(x){return n=x})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,n=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),n!==null&&(n(),n=null)}}}function Eo(e){this._internalRoot=e}la.prototype.render=Eo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));var i=t.current,s=Nt();xf(i,s,e,t,null,null)},la.prototype.unmount=Eo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xf(e.current,2,null,e,null,null),Fn(),t[_s]=null}};function la(e){this._internalRoot=e}la.prototype.unstable_scheduleHydration=function(e){if(e){var t=qo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<$i.length&&t!==0&&t<$i[i].priority;i++);$i.splice(i,0,e),i===0&&Tf(e)}};var Hf=ae.version;if(Hf!=="19.2.4")throw Error(I(527,Hf,"19.2.4"));U.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=_(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var dv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oa.isDisabled&&oa.supportsFiber)try{Vt=oa.inject(dv),ht=oa}catch{}}return Wr.createRoot=function(e,t){if(!re(e))throw Error(I(299));var i=!1,s="",n=Fh,u=Ph,x=qh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=wf(e,1,!1,null,null,i,s,null,n,u,x,kf),e[_s]=t.current,ro(e),new Eo(t)},Wr.hydrateRoot=function(e,t,i){if(!re(e))throw Error(I(299));var s=!1,n="",u=Fh,x=Ph,B=qh,F=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(n=i.identifierPrefix),i.onUncaughtError!==void 0&&(u=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(B=i.onRecoverableError),i.formState!==void 0&&(F=i.formState)),t=wf(e,1,!0,t,i??null,s,n,F,u,x,B,kf),t.context=Ef(null),i=t.current,s=Nt(),s=da(s),n=Ti(s),n.callback=null,Bi(i,n,s),i=s,t.current.lanes=i,er(t,i),si(t),e[_s]=t.current,ro(e),new la(t)},Wr.version="19.2.4",Wr}var Wf;function wv(){if(Wf)return Ao.exports;Wf=1;function q(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q)}catch(ae){console.error(ae)}}return q(),Ao.exports=Cv(),Ao.exports}var Ev=wv();const xv=768,Lv=1e3;function $r(){const ae=window.location.pathname.match(/^(\/project\/[^/]+\/)/);return ae?ae[1]:"/"}function Xr(q){const ae=$r(),ne=q.startsWith("/")?q.slice(1):q;return ae+ne}function Yr(){const q=localStorage.getItem("codev-web-key");return q?{Authorization:`Bearer ${q}`}:{}}async function Av(){const q=await fetch(Xr("api/state"),{headers:Yr()});if(!q.ok)throw new Error(`Failed to fetch state: ${q.status}`);return q.json()}async function Rv(){const q=await fetch(Xr("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...Yr()}});if(!q.ok)throw new Error(await q.text());return q.json()}async function Dv(q){const ae=await fetch(Xr("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...Yr()},body:JSON.stringify({path:q})});if(!ae.ok)throw new Error(await ae.text());return ae.json()}async function Mv(q){const ae=await fetch(Xr(`api/tabs/${q}`),{method:"DELETE",headers:Yr()});if(!ae.ok)throw new Error(await ae.text())}async function Tv(){const q=await fetch(Xr("api/files"),{headers:Yr()});if(!q.ok)throw new Error(`Failed to fetch files: ${q.status}`);return q.json()}function Bv(q){return q.terminalId?`${$r()}ws/terminal/${q.terminalId}`:null}function Ov(){const[q,ae]=ze.useState(null),[ne,I]=ze.useState(null),re=ze.useCallback(async()=>{try{const J=await Av();ae(J),I(null)}catch(J){I(J.message)}},[]);return ze.useEffect(()=>{re();const J=setInterval(re,Lv);return()=>clearInterval(J)},[re]),{state:q,error:ne,refresh:re}}function kv(q){const ae=[{id:"dashboard",type:"dashboard",label:"Dashboard",closable:!1}];q!=null&&q.architect&&ae.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:q.architect.terminalId});for(const ne of(q==null?void 0:q.builders)??[])ae.push({id:`builder-${ne.id}`,type:"builder",label:ne.name||`Builder ${ne.id}`,closable:!0,projectId:ne.id,terminalId:ne.terminalId});for(const ne of(q==null?void 0:q.utils)??[])!ne.terminalId&&(!ne.pid||ne.pid===0)||ae.push({id:`shell-${ne.id}`,type:"shell",label:ne.name||`Shell ${ne.id}`,closable:!0,utilId:ne.id,terminalId:ne.terminalId});for(const ne of(q==null?void 0:q.annotations)??[]){const I=ne.file.split("/").pop()??ne.file;ae.push({id:`file-${ne.id}`,type:"file",label:I,closable:!0,annotationId:ne.id,filePath:ne.file})}return ae}function Hv(q){const[ae,ne]=ze.useState("dashboard"),I=ze.useRef(null),re=ze.useRef(!1),J=kv(q);ze.useEffect(()=>{if(re.current||q===null)return;const _=new URLSearchParams(window.location.search).get("tab");if(_){const v=J.find(o=>o.id===_||o.type===_);if(v){ne(v.id),re.current=!0;const o=new URL(window.location.href);o.searchParams.delete("tab"),window.history.replaceState({},"",o.toString())}}else re.current=!0},[J,q]),ze.useEffect(()=>{const d=new Set(J.map(_=>_.id));if(I.current===null){q!==null&&(I.current=d);return}for(const _ of J)!I.current.has(_.id)&&_.type!=="architect"&&ne(_.id);I.current=d},[J.map(d=>d.id).join(","),q!==null]);const W=ze.useCallback(d=>{ne(d)},[]),a=J.find(d=>d.id===ae)??J[0];return{tabs:J,activeTab:a,activeTabId:ae,selectTab:W}}function zv(q){const[ae,ne]=ze.useState(()=>typeof window<"u"?window.matchMedia(q).matches:!1);return ze.useEffect(()=>{const I=window.matchMedia(q),re=J=>ne(J.matches);return I.addEventListener("change",re),ne(I.matches),()=>I.removeEventListener("change",re)},[q]),ae}function Nv({left:q,right:ae,defaultSplit:ne=50}){const[I,re]=ze.useState(ne),J=ze.useRef(null),W=ze.useRef(!1),a=ze.useCallback(d=>{d.preventDefault(),W.current=!0;const _=o=>{if(!W.current||!J.current)return;const g=J.current.getBoundingClientRect(),y=(o.clientX-g.left)/g.width*100;re(Math.max(20,Math.min(80,y)))},v=()=>{W.current=!1,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",v)},[]);return te.jsxs("div",{ref:J,className:"split-pane",children:[te.jsx("div",{className:"split-left",style:{width:`${I}%`},children:q}),te.jsx("div",{className:"split-handle",onMouseDown:a,role:"separator","aria-label":"Resize panels"}),te.jsx("div",{className:"split-right",style:{width:`${100-I}%`},children:ae})]})}function Qf({tabs:q,activeTabId:ae,onSelectTab:ne,onRefresh:I}){const re=async(J,W)=>{J.stopPropagation();try{await Mv(W.id),I()}catch(a){console.error("Failed to close tab:",a)}};return te.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:q.map(J=>te.jsxs("button",{role:"tab","aria-selected":J.id===ae,className:`tab ${J.id===ae?"tab-active":""}`,onClick:()=>ne(J.id),title:J.label,children:[te.jsx("span",{className:"tab-label",children:J.label}),J.closable&&te.jsx("span",{className:"tab-close",onClick:W=>re(W,J),role:"button","aria-label":`Close ${J.label}`,tabIndex:0,onKeyDown:W=>{(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),re(W,J))},children:"×"})]},J.id))})}var To={exports:{}},$f;function Uv(){return $f||($f=1,(function(q,ae){(function(ne,I){q.exports=I()})(globalThis,(()=>(()=>{var ne={4567:function(W,a,d){var _=this&&this.__decorate||function(l,c,m,w){var S,E=arguments.length,p=E<3?c:w===null?w=Object.getOwnPropertyDescriptor(c,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,m,w);else for(var C=l.length-1;C>=0;C--)(S=l[C])&&(p=(E<3?S(p):E>3?S(c,m,p):S(c,m))||p);return E>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(l,c){return function(m,w){c(m,w,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const o=d(9042),g=d(9924),y=d(844),b=d(4725),f=d(2585),r=d(3656);let h=a.AccessibilityManager=class extends y.Disposable{constructor(l,c,m,w){super(),this._terminal=l,this._coreBrowserService=m,this._renderService=w,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new g.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((S=>this._handleResize(S.rows)))),this.register(this._terminal.onRender((S=>this._refreshRows(S.start,S.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((S=>this._handleChar(S)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
48
+ `+s.stack}}var Jt=Object.prototype.hasOwnProperty,Te=P.unstable_scheduleCallback,Le=P.unstable_cancelCallback,Re=P.unstable_shouldYield,_e=P.unstable_requestPaint,be=P.unstable_now,Qe=P.unstable_getCurrentPriorityLevel,Pe=P.unstable_ImmediatePriority,Ut=P.unstable_UserBlockingPriority,ot=P.unstable_NormalPriority,bt=P.unstable_LowPriority,Je=P.unstable_IdlePriority,qe=P.log,Ae=P.unstable_setDisableYieldValue,Vt=null,ht=null;function Mt(e){if(typeof qe=="function"&&Ae(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Vt,e)}catch{}}var pt=Math.clz32?Math.clz32:ua,ds=Math.log,ha=Math.LN2;function ua(e){return e>>>=0,e===0?32:31-(ds(e)/ha|0)|0}var wi=256,Yi=262144,Vi=4194304;function ri(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Vr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var n=0,u=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var B=s&134217727;return B!==0?(s=B&~u,s!==0?n=ri(s):(x&=B,x!==0?n=ri(x):i||(i=B&~e,i!==0&&(n=ri(i))))):(B=s&~u,B!==0?n=ri(B):x!==0?n=ri(x):i||(i=s&~e,i!==0&&(n=ri(i)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,i=t&-t,u>=i||u===32&&(i&4194048)!==0)?t:n}function Js(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function id(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 jo(){var e=Vi;return Vi<<=1,(Vi&62914560)===0&&(Vi=4194304),e}function fa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function er(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sd(e,t,i,s,n,u){var x=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 B=e.entanglements,F=e.expirationTimes,Q=e.hiddenUpdates;for(i=x&~i;0<i;){var le=31-pt(i),ce=1<<le;B[le]=0,F[le]=-1;var Z=Q[le];if(Z!==null)for(Q[le]=null,le=0;le<Z.length;le++){var se=Z[le];se!==null&&(se.lane&=-536870913)}i&=~ce}s!==0&&Io(e,s,0),u!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=u&~(x&~t))}function Io(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-pt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Fo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-pt(i),n=1<<s;n&t|e[s]&t&&(e[s]|=t),i&=~n}}function Po(e,t){var i=t&-t;return i=(i&42)!==0?1:da(i),(i&(e.suspendedLanes|t))!==0?0:i}function da(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 _a(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qo(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Df(e.type))}function Go(e,t){var i=U.p;try{return U.p=e,t()}finally{U.p=i}}var Ei=Math.random().toString(36).slice(2),dt="__reactFiber$"+Ei,Ct="__reactProps$"+Ei,_s="__reactContainer$"+Ei,va="__reactEvents$"+Ei,rd="__reactListeners$"+Ei,nd="__reactHandles$"+Ei,Wo="__reactResources$"+Ei,tr="__reactMarker$"+Ei;function ga(e){delete e[dt],delete e[Ct],delete e[va],delete e[rd],delete e[nd]}function vs(e){var t=e[dt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[_s]||i[dt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=df(e);e!==null;){if(i=e[dt])return i;e=df(e)}return t}e=i,i=e.parentNode}return null}function gs(e){if(e=e[dt]||e[_s]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ir(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(I(33))}function ms(e){var t=e[Wo];return t||(t=e[Wo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[tr]=!0}var $o=new Set,Xo={};function Ki(e,t){ps(e,t),ps(e+"Capture",t)}function ps(e,t){for(Xo[e]=t,e=0;e<t.length;e++)$o.add(t[e])}var ad=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]*$"),Yo={},Vo={};function ld(e){return Jt.call(Vo,e)?!0:Jt.call(Yo,e)?!1:ad.test(e)?Vo[e]=!0:(Yo[e]=!0,!1)}function Kr(e,t,i){if(ld(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 ni(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ko(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function od(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 n=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(x){i=""+x,u.call(this,x)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ma(e){if(!e._valueTracker){var t=Ko(e)?"checked":"value";e._valueTracker=od(e,t,""+e[t])}}function Qo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Ko(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 cd=/[\n"\\]/g;function It(e){return e.replace(cd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pa(e,t,i,s,n,u,x,B){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Sa(e,x,jt(t)):i!=null?Sa(e,x,jt(i)):s!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.name=""+jt(B):e.removeAttribute("name")}function Zo(e,t,i,s,n,u,x,B){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||i!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){ma(e);return}i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,B||t===e.value||(e.value=t),e.defaultValue=t}s=s??n,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=B?e.checked:!!s,e.defaultChecked=!!s,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),ma(e)}function Sa(e,t,i){t==="number"&&Zr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ss(e,t,i,s){if(e=e.options,t){t={};for(var n=0;n<i.length;n++)t["$"+i[n]]=!0;for(i=0;i<e.length;i++)n=t.hasOwnProperty("$"+e[i].value),e[i].selected!==n&&(e[i].selected=n),n&&s&&(e[i].defaultSelected=!0)}else{for(i=""+jt(i),t=null,n=0;n<e.length;n++){if(e[n].value===i){e[n].selected=!0,s&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Jo(e,t,i){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+jt(i):""}function ec(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(I(92));if(X(s)){if(1<s.length)throw Error(I(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=jt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),ma(e)}function ys(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var hd=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 tc(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||hd.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ic(e,t,i){if(t!=null&&typeof t!="object")throw Error(I(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 n in t)s=t[n],t.hasOwnProperty(n)&&i[n]!==s&&tc(e,n,s)}else for(var u in t)t.hasOwnProperty(u)&&tc(e,u,t[u])}function ya(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 ud=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),fd=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Jr(e){return fd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ai(){}var ba=null;function Ca(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bs=null,Cs=null;function sc(e){var t=gs(e);if(t&&(e=t.stateNode)){var i=e[Ct]||null;e:switch(e=t.stateNode,t.type){case"input":if(pa(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="'+It(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var n=s[Ct]||null;if(!n)throw Error(I(90));pa(s,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Qo(s)}break e;case"textarea":Jo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ss(e,!!i.multiple,t,!1)}}}var wa=!1;function rc(e,t,i){if(wa)return e(t,i);wa=!0;try{var s=e(t);return s}finally{if(wa=!1,(bs!==null||Cs!==null)&&(Fn(),bs&&(t=bs,e=Cs,Cs=bs=null,sc(t),e)))for(t=0;t<e.length;t++)sc(e[t])}}function sr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Ct]||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(I(231,t,typeof i));return i}var li=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ea=!1;if(li)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){Ea=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{Ea=!1}var xi=null,xa=null,en=null;function nc(){if(en)return en;var e,t=xa,i=t.length,s,n="value"in xi?xi.value:xi.textContent,u=n.length;for(e=0;e<i&&t[e]===n[e];e++);var x=i-e;for(s=1;s<=x&&t[i-s]===n[u-s];s++);return en=n.slice(e,1<s?1-s:void 0)}function tn(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 sn(){return!0}function ac(){return!1}function wt(e){function t(i,s,n,u,x){this._reactName=i,this._targetInst=n,this.type=s,this.nativeEvent=u,this.target=x,this.currentTarget=null;for(var B in e)e.hasOwnProperty(B)&&(i=e[B],this[B]=i?i(u):u[B]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?sn:ac,this.isPropagationStopped=ac,this}return o(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=sn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=sn)},persist:function(){},isPersistent:sn}),t}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rn=wt(Qi),nr=o({},Qi,{view:0,detail:0}),dd=wt(nr),La,Aa,ar,nn=o({},nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Da,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!==ar&&(ar&&e.type==="mousemove"?(La=e.screenX-ar.screenX,Aa=e.screenY-ar.screenY):Aa=La=0,ar=e),La)},movementY:function(e){return"movementY"in e?e.movementY:Aa}}),lc=wt(nn),_d=o({},nn,{dataTransfer:0}),vd=wt(_d),gd=o({},nr,{relatedTarget:0}),Ra=wt(gd),md=o({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),pd=wt(md),Sd=o({},Qi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yd=wt(Sd),bd=o({},Qi,{data:0}),oc=wt(bd),Cd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wd={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"},Ed={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ed[e])?!!t[e]:!1}function Da(){return xd}var Ld=o({},nr,{key:function(e){if(e.key){var t=Cd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=tn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Da,charCode:function(e){return e.type==="keypress"?tn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?tn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ad=wt(Ld),Rd=o({},nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cc=wt(Rd),Dd=o({},nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Da}),Md=wt(Dd),Td=o({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bd=wt(Td),Od=o({},nn,{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}),kd=wt(Od),Hd=o({},Qi,{newState:0,oldState:0}),zd=wt(Hd),Nd=[9,13,27,32],Ma=li&&"CompositionEvent"in window,lr=null;li&&"documentMode"in document&&(lr=document.documentMode);var Ud=li&&"TextEvent"in window&&!lr,hc=li&&(!Ma||lr&&8<lr&&11>=lr),uc=" ",fc=!1;function dc(e,t){switch(e){case"keyup":return Nd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _c(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function jd(e,t){switch(e){case"compositionend":return _c(t);case"keypress":return t.which!==32?null:(fc=!0,uc);case"textInput":return e=t.data,e===uc&&fc?null:e;default:return null}}function Id(e,t){if(ws)return e==="compositionend"||!Ma&&dc(e,t)?(e=nc(),en=xa=xi=null,ws=!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 hc&&t.locale!=="ko"?null:t.data;default:return null}}var Fd={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 vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fd[e.type]:t==="textarea"}function gc(e,t,i,s){bs?Cs?Cs.push(s):Cs=[s]:bs=s,t=Yn(t,"onChange"),0<t.length&&(i=new rn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var or=null,cr=null;function Pd(e){Zu(e,0)}function an(e){var t=ir(e);if(Qo(t))return e}function mc(e,t){if(e==="change")return t}var pc=!1;if(li){var Ta;if(li){var Ba="oninput"in document;if(!Ba){var Sc=document.createElement("div");Sc.setAttribute("oninput","return;"),Ba=typeof Sc.oninput=="function"}Ta=Ba}else Ta=!1;pc=Ta&&(!document.documentMode||9<document.documentMode)}function yc(){or&&(or.detachEvent("onpropertychange",bc),cr=or=null)}function bc(e){if(e.propertyName==="value"&&an(cr)){var t=[];gc(t,cr,e,Ca(e)),rc(Pd,t)}}function qd(e,t,i){e==="focusin"?(yc(),or=t,cr=i,or.attachEvent("onpropertychange",bc)):e==="focusout"&&yc()}function Gd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return an(cr)}function Wd(e,t){if(e==="click")return an(t)}function $d(e,t){if(e==="input"||e==="change")return an(t)}function Xd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:Xd;function hr(e,t){if(Tt(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 n=i[s];if(!Jt.call(t,n)||!Tt(e[n],t[n]))return!1}return!0}function Cc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wc(e,t){var i=Cc(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=Cc(i)}}function Ec(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ec(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xc(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 Oa(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 Yd=li&&"documentMode"in document&&11>=document.documentMode,Es=null,ka=null,ur=null,Ha=!1;function Lc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ha||Es==null||Es!==Zr(s)||(s=Es,"selectionStart"in s&&Oa(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}),ur&&hr(ur,s)||(ur=s,s=Yn(ka,"onSelect"),0<s.length&&(t=new rn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function Zi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var xs={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},za={},Ac={};li&&(Ac=document.createElement("div").style,"AnimationEvent"in window||(delete xs.animationend.animation,delete xs.animationiteration.animation,delete xs.animationstart.animation),"TransitionEvent"in window||delete xs.transitionend.transition);function Ji(e){if(za[e])return za[e];if(!xs[e])return e;var t=xs[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ac)return za[e]=t[i];return e}var Rc=Ji("animationend"),Dc=Ji("animationiteration"),Mc=Ji("animationstart"),Vd=Ji("transitionrun"),Kd=Ji("transitionstart"),Qd=Ji("transitioncancel"),Tc=Ji("transitionend"),Bc=new Map,Na="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(" ");Na.push("scrollEnd");function Kt(e,t){Bc.set(e,t),Ki(t,[e])}var ln=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)},Ft=[],Ls=0,Ua=0;function on(){for(var e=Ls,t=Ua=Ls=0;t<e;){var i=Ft[t];Ft[t++]=null;var s=Ft[t];Ft[t++]=null;var n=Ft[t];Ft[t++]=null;var u=Ft[t];if(Ft[t++]=null,s!==null&&n!==null){var x=s.pending;x===null?n.next=n:(n.next=x.next,x.next=n),s.pending=n}u!==0&&Oc(i,n,u)}}function cn(e,t,i,s){Ft[Ls++]=e,Ft[Ls++]=t,Ft[Ls++]=i,Ft[Ls++]=s,Ua|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ja(e,t,i,s){return cn(e,t,i,s),hn(e)}function es(e,t){return cn(e,null,null,t),hn(e)}function Oc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var n=!1,u=e.return;u!==null;)u.childLanes|=i,s=u.alternate,s!==null&&(s.childLanes|=i),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(n=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,n&&t!==null&&(n=31-pt(i),e=u.hiddenUpdates,s=e[n],s===null?e[n]=[t]:s.push(t),t.lane=i|536870912),u):null}function hn(e){if(50<Or)throw Or=0,Yl=null,Error(I(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var As={};function Zd(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 Bt(e,t,i,s){return new Zd(e,t,i,s)}function Ia(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var i=e.alternate;return i===null?(i=Bt(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 kc(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,n,u){var x=0;if(s=e,typeof e=="function")Ia(e)&&(x=1);else if(typeof e=="string")x=sv(e,i,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case C:return e=Bt(31,i,t,n),e.elementType=C,e.lanes=u,e;case f:return ts(i.children,n,u,t);case r:x=8,n|=24;break;case h:return e=Bt(12,i,t,n|2),e.elementType=h,e.lanes=u,e;case w:return e=Bt(13,i,t,n),e.elementType=w,e.lanes=u,e;case S:return e=Bt(19,i,t,n),e.elementType=S,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c:x=10;break e;case l:x=9;break e;case m:x=11;break e;case E:x=14;break e;case p:x=16,s=null;break e}x=29,i=Error(I(130,e===null?"null":typeof e,"")),s=null}return t=Bt(x,i,t,n),t.elementType=e,t.type=s,t.lanes=u,t}function ts(e,t,i,s){return e=Bt(7,e,s,t),e.lanes=i,e}function Fa(e,t,i){return e=Bt(6,e,null,t),e.lanes=i,e}function Hc(e){var t=Bt(18,null,null,0);return t.stateNode=e,t}function Pa(e,t,i){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zc=new WeakMap;function Pt(e,t){if(typeof e=="object"&&e!==null){var i=zc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Dt(t)},zc.set(e,t),t)}return{value:e,source:t,stack:Dt(t)}}var Rs=[],Ds=0,fn=null,fr=0,qt=[],Gt=0,Li=null,ei=1,ti="";function ci(e,t){Rs[Ds++]=fr,Rs[Ds++]=fn,fn=e,fr=t}function Nc(e,t,i){qt[Gt++]=ei,qt[Gt++]=ti,qt[Gt++]=Li,Li=e;var s=ei;e=ti;var n=32-pt(s)-1;s&=~(1<<n),i+=1;var u=32-pt(t)+n;if(30<u){var x=n-n%5;u=(s&(1<<x)-1).toString(32),s>>=x,n-=x,ei=1<<32-pt(t)+n|i<<n|s,ti=u+e}else ei=1<<u|i<<n|s,ti=e}function qa(e){e.return!==null&&(ci(e,1),Nc(e,1,0))}function Ga(e){for(;e===fn;)fn=Rs[--Ds],Rs[Ds]=null,fr=Rs[--Ds],Rs[Ds]=null;for(;e===Li;)Li=qt[--Gt],qt[Gt]=null,ti=qt[--Gt],qt[Gt]=null,ei=qt[--Gt],qt[Gt]=null}function Uc(e,t){qt[Gt++]=ei,qt[Gt++]=ti,qt[Gt++]=Li,ei=t.id,ti=t.overflow,Li=e}var _t=null,Ye=null,ke=!1,Ai=null,Wt=!1,Wa=Error(I(519));function Ri(e){var t=Error(I(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dr(Pt(t,e)),Wa}function jc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[dt]=e,t[Ct]=s,i){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(i=0;i<Hr.length;i++)Me(Hr[i],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),Zo(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),ec(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||sf(t.textContent,i)?(s.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),s.onScroll!=null&&Me("scroll",t),s.onScrollEnd!=null&&Me("scrollend",t),s.onClick!=null&&(t.onclick=ai),t=!0):t=!1,t||Ri(e,!0)}function Ic(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:_t=_t.return}}function Ms(e){if(e!==_t)return!1;if(!ke)return Ic(e),ke=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||co(e.type,e.memoizedProps)),i=!i),i&&Ye&&Ri(e),Ic(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));Ye=ff(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));Ye=ff(e)}else t===27?(t=Ye,Pi(e.type)?(e=vo,vo=null,Ye=e):Ye=t):Ye=_t?Xt(e.stateNode.nextSibling):null;return!0}function is(){Ye=_t=null,ke=!1}function $a(){var e=Ai;return e!==null&&(At===null?At=e:At.push.apply(At,e),Ai=null),e}function dr(e){Ai===null?Ai=[e]:Ai.push(e)}var Xa=A(null),ss=null,hi=null;function Di(e,t,i){$(Xa,t._currentValue),t._currentValue=i}function ui(e){e._currentValue=Xa.current,O(Xa)}function Ya(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 Va(e,t,i,s){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var u=n.dependencies;if(u!==null){var x=n.child;u=u.firstContext;e:for(;u!==null;){var B=u;u=n;for(var F=0;F<t.length;F++)if(B.context===t[F]){u.lanes|=i,B=u.alternate,B!==null&&(B.lanes|=i),Ya(u.return,i,e),s||(x=null);break e}u=B.next}}else if(n.tag===18){if(x=n.return,x===null)throw Error(I(341));x.lanes|=i,u=x.alternate,u!==null&&(u.lanes|=i),Ya(x,i,e),x=null}else x=n.child;if(x!==null)x.return=n;else for(x=n;x!==null;){if(x===e){x=null;break}if(n=x.sibling,n!==null){n.return=x.return,x=n;break}x=x.return}n=x}}function Ts(e,t,i,s){e=null;for(var n=t,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var x=n.alternate;if(x===null)throw Error(I(387));if(x=x.memoizedProps,x!==null){var B=n.type;Tt(n.pendingProps.value,x.value)||(e!==null?e.push(B):e=[B])}}else if(n===j.current){if(x=n.alternate,x===null)throw Error(I(387));x.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Ir):e=[Ir])}n=n.return}e!==null&&Va(t,e,i,s),t.flags|=262144}function dn(e){for(e=e.firstContext;e!==null;){if(!Tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function rs(e){ss=e,hi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return Fc(ss,e)}function _n(e,t){return ss===null&&rs(e),Fc(e,t)}function Fc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},hi===null){if(e===null)throw Error(I(308));hi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else hi=hi.next=t;return i}var Jd=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()})}},e_=P.unstable_scheduleCallback,t_=P.unstable_NormalPriority,rt={$$typeof:c,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ka(){return{controller:new Jd,data:new Map,refCount:0}}function _r(e){e.refCount--,e.refCount===0&&e_(t_,function(){e.controller.abort()})}var vr=null,Qa=0,Bs=0,Os=null;function i_(e,t){if(vr===null){var i=vr=[];Qa=0,Bs=eo(),Os={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Qa++,t.then(Pc,Pc),t}function Pc(){if(--Qa===0&&vr!==null){Os!==null&&(Os.status="fulfilled");var e=vr;vr=null,Bs=0,Os=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function s_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(n){i.push(n)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var n=0;n<i.length;n++)(0,i[n])(t)},function(n){for(s.status="rejected",s.reason=n,n=0;n<i.length;n++)(0,i[n])(void 0)}),s}var qc=z.S;z.S=function(e,t){Lu=be(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&i_(e,t),qc!==null&&qc(e,t)};var ns=A(null);function Za(){var e=ns.current;return e!==null?e:Xe.pooledCache}function vn(e,t){t===null?$(ns,ns.current):$(ns,t.pool)}function Gc(){var e=Za();return e===null?null:{parent:rt._currentValue,pool:e}}var ks=Error(I(460)),Ja=Error(I(474)),gn=Error(I(542)),mn={then:function(){}};function Wc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $c(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ai,ai),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yc(e),e;default:if(typeof t.status=="string")t.then(ai,ai);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(I(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=s}},function(s){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yc(e),e}throw ls=t,ks}}function as(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ls=i,ks):i}}var ls=null;function Xc(){if(ls===null)throw Error(I(459));var e=ls;return ls=null,e}function Yc(e){if(e===ks||e===gn)throw Error(I(483))}var Hs=null,gr=0;function pn(e){var t=gr;return gr+=1,Hs===null&&(Hs=[]),$c(Hs,e,t)}function mr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Sn(e,t){throw t.$$typeof===g?Error(I(525)):(e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Vc(e){function t(Y,G){if(e){var K=Y.deletions;K===null?(Y.deletions=[G],Y.flags|=16):K.push(G)}}function i(Y,G){if(!e)return null;for(;G!==null;)t(Y,G),G=G.sibling;return null}function s(Y){for(var G=new Map;Y!==null;)Y.key!==null?G.set(Y.key,Y):G.set(Y.index,Y),Y=Y.sibling;return G}function n(Y,G){return Y=oi(Y,G),Y.index=0,Y.sibling=null,Y}function u(Y,G,K){return Y.index=K,e?(K=Y.alternate,K!==null?(K=K.index,K<G?(Y.flags|=67108866,G):K):(Y.flags|=67108866,G)):(Y.flags|=1048576,G)}function x(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function B(Y,G,K,oe){return G===null||G.tag!==6?(G=Fa(K,Y.mode,oe),G.return=Y,G):(G=n(G,K),G.return=Y,G)}function F(Y,G,K,oe){var pe=K.type;return pe===f?le(Y,G,K.props.children,oe,K.key):G!==null&&(G.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===p&&as(pe)===G.type)?(G=n(G,K.props),mr(G,K),G.return=Y,G):(G=un(K.type,K.key,K.props,null,Y.mode,oe),mr(G,K),G.return=Y,G)}function Q(Y,G,K,oe){return G===null||G.tag!==4||G.stateNode.containerInfo!==K.containerInfo||G.stateNode.implementation!==K.implementation?(G=Pa(K,Y.mode,oe),G.return=Y,G):(G=n(G,K.children||[]),G.return=Y,G)}function le(Y,G,K,oe,pe){return G===null||G.tag!==7?(G=ts(K,Y.mode,oe,pe),G.return=Y,G):(G=n(G,K),G.return=Y,G)}function ce(Y,G,K){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=Fa(""+G,Y.mode,K),G.return=Y,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case y:return K=un(G.type,G.key,G.props,null,Y.mode,K),mr(K,G),K.return=Y,K;case b:return G=Pa(G,Y.mode,K),G.return=Y,G;case p:return G=as(G),ce(Y,G,K)}if(X(G)||D(G))return G=ts(G,Y.mode,K,null),G.return=Y,G;if(typeof G.then=="function")return ce(Y,pn(G),K);if(G.$$typeof===c)return ce(Y,_n(Y,G),K);Sn(Y,G)}return null}function Z(Y,G,K,oe){var pe=G!==null?G.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return pe!==null?null:B(Y,G,""+K,oe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case y:return K.key===pe?F(Y,G,K,oe):null;case b:return K.key===pe?Q(Y,G,K,oe):null;case p:return K=as(K),Z(Y,G,K,oe)}if(X(K)||D(K))return pe!==null?null:le(Y,G,K,oe,null);if(typeof K.then=="function")return Z(Y,G,pn(K),oe);if(K.$$typeof===c)return Z(Y,G,_n(Y,K),oe);Sn(Y,K)}return null}function se(Y,G,K,oe,pe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Y=Y.get(K)||null,B(G,Y,""+oe,pe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case y:return Y=Y.get(oe.key===null?K:oe.key)||null,F(G,Y,oe,pe);case b:return Y=Y.get(oe.key===null?K:oe.key)||null,Q(G,Y,oe,pe);case p:return oe=as(oe),se(Y,G,K,oe,pe)}if(X(oe)||D(oe))return Y=Y.get(K)||null,le(G,Y,oe,pe,null);if(typeof oe.then=="function")return se(Y,G,K,pn(oe),pe);if(oe.$$typeof===c)return se(Y,G,K,_n(G,oe),pe);Sn(G,oe)}return null}function ve(Y,G,K,oe){for(var pe=null,Ne=null,ge=G,xe=G=0,Oe=null;ge!==null&&xe<K.length;xe++){ge.index>xe?(Oe=ge,ge=null):Oe=ge.sibling;var Ue=Z(Y,ge,K[xe],oe);if(Ue===null){ge===null&&(ge=Oe);break}e&&ge&&Ue.alternate===null&&t(Y,ge),G=u(Ue,G,xe),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue,ge=Oe}if(xe===K.length)return i(Y,ge),ke&&ci(Y,xe),pe;if(ge===null){for(;xe<K.length;xe++)ge=ce(Y,K[xe],oe),ge!==null&&(G=u(ge,G,xe),Ne===null?pe=ge:Ne.sibling=ge,Ne=ge);return ke&&ci(Y,xe),pe}for(ge=s(ge);xe<K.length;xe++)Oe=se(ge,Y,xe,K[xe],oe),Oe!==null&&(e&&Oe.alternate!==null&&ge.delete(Oe.key===null?xe:Oe.key),G=u(Oe,G,xe),Ne===null?pe=Oe:Ne.sibling=Oe,Ne=Oe);return e&&ge.forEach(function(Xi){return t(Y,Xi)}),ke&&ci(Y,xe),pe}function ye(Y,G,K,oe){if(K==null)throw Error(I(151));for(var pe=null,Ne=null,ge=G,xe=G=0,Oe=null,Ue=K.next();ge!==null&&!Ue.done;xe++,Ue=K.next()){ge.index>xe?(Oe=ge,ge=null):Oe=ge.sibling;var Xi=Z(Y,ge,Ue.value,oe);if(Xi===null){ge===null&&(ge=Oe);break}e&&ge&&Xi.alternate===null&&t(Y,ge),G=u(Xi,G,xe),Ne===null?pe=Xi:Ne.sibling=Xi,Ne=Xi,ge=Oe}if(Ue.done)return i(Y,ge),ke&&ci(Y,xe),pe;if(ge===null){for(;!Ue.done;xe++,Ue=K.next())Ue=ce(Y,Ue.value,oe),Ue!==null&&(G=u(Ue,G,xe),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue);return ke&&ci(Y,xe),pe}for(ge=s(ge);!Ue.done;xe++,Ue=K.next())Ue=se(ge,Y,xe,Ue.value,oe),Ue!==null&&(e&&Ue.alternate!==null&&ge.delete(Ue.key===null?xe:Ue.key),G=u(Ue,G,xe),Ne===null?pe=Ue:Ne.sibling=Ue,Ne=Ue);return e&&ge.forEach(function(_v){return t(Y,_v)}),ke&&ci(Y,xe),pe}function $e(Y,G,K,oe){if(typeof K=="object"&&K!==null&&K.type===f&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case y:e:{for(var pe=K.key;G!==null;){if(G.key===pe){if(pe=K.type,pe===f){if(G.tag===7){i(Y,G.sibling),oe=n(G,K.props.children),oe.return=Y,Y=oe;break e}}else if(G.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===p&&as(pe)===G.type){i(Y,G.sibling),oe=n(G,K.props),mr(oe,K),oe.return=Y,Y=oe;break e}i(Y,G);break}else t(Y,G);G=G.sibling}K.type===f?(oe=ts(K.props.children,Y.mode,oe,K.key),oe.return=Y,Y=oe):(oe=un(K.type,K.key,K.props,null,Y.mode,oe),mr(oe,K),oe.return=Y,Y=oe)}return x(Y);case b:e:{for(pe=K.key;G!==null;){if(G.key===pe)if(G.tag===4&&G.stateNode.containerInfo===K.containerInfo&&G.stateNode.implementation===K.implementation){i(Y,G.sibling),oe=n(G,K.children||[]),oe.return=Y,Y=oe;break e}else{i(Y,G);break}else t(Y,G);G=G.sibling}oe=Pa(K,Y.mode,oe),oe.return=Y,Y=oe}return x(Y);case p:return K=as(K),$e(Y,G,K,oe)}if(X(K))return ve(Y,G,K,oe);if(D(K)){if(pe=D(K),typeof pe!="function")throw Error(I(150));return K=pe.call(K),ye(Y,G,K,oe)}if(typeof K.then=="function")return $e(Y,G,pn(K),oe);if(K.$$typeof===c)return $e(Y,G,_n(Y,K),oe);Sn(Y,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,G!==null&&G.tag===6?(i(Y,G.sibling),oe=n(G,K),oe.return=Y,Y=oe):(i(Y,G),oe=Fa(K,Y.mode,oe),oe.return=Y,Y=oe),x(Y)):i(Y,G)}return function(Y,G,K,oe){try{gr=0;var pe=$e(Y,G,K,oe);return Hs=null,pe}catch(ge){if(ge===ks||ge===gn)throw ge;var Ne=Bt(29,ge,null,Y.mode);return Ne.lanes=oe,Ne.return=Y,Ne}finally{}}}var os=Vc(!0),Kc=Vc(!1),Mi=!1;function el(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tl(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 Ti(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Bi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(je&2)!==0){var n=s.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),s.pending=t,t=hn(e),Oc(e,null,i),t}return cn(e,s,t,i),hn(e)}function pr(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,Fo(e,i)}}function il(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var n=null,u=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};u===null?n=u=x:u=u.next=x,i=i.next}while(i!==null);u===null?n=u=t:u=u.next=t}else n=u=t;i={baseState:s.baseState,firstBaseUpdate:n,lastBaseUpdate:u,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 sl=!1;function Sr(){if(sl){var e=Os;if(e!==null)throw e}}function yr(e,t,i,s){sl=!1;var n=e.updateQueue;Mi=!1;var u=n.firstBaseUpdate,x=n.lastBaseUpdate,B=n.shared.pending;if(B!==null){n.shared.pending=null;var F=B,Q=F.next;F.next=null,x===null?u=Q:x.next=Q,x=F;var le=e.alternate;le!==null&&(le=le.updateQueue,B=le.lastBaseUpdate,B!==x&&(B===null?le.firstBaseUpdate=Q:B.next=Q,le.lastBaseUpdate=F))}if(u!==null){var ce=n.baseState;x=0,le=Q=F=null,B=u;do{var Z=B.lane&-536870913,se=Z!==B.lane;if(se?(Be&Z)===Z:(s&Z)===Z){Z!==0&&Z===Bs&&(sl=!0),le!==null&&(le=le.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var ve=e,ye=B;Z=t;var $e=i;switch(ye.tag){case 1:if(ve=ye.payload,typeof ve=="function"){ce=ve.call($e,ce,Z);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ye.payload,Z=typeof ve=="function"?ve.call($e,ce,Z):ve,Z==null)break e;ce=o({},ce,Z);break e;case 2:Mi=!0}}Z=B.callback,Z!==null&&(e.flags|=64,se&&(e.flags|=8192),se=n.callbacks,se===null?n.callbacks=[Z]:se.push(Z))}else se={lane:Z,tag:B.tag,payload:B.payload,callback:B.callback,next:null},le===null?(Q=le=se,F=ce):le=le.next=se,x|=Z;if(B=B.next,B===null){if(B=n.shared.pending,B===null)break;se=B,B=se.next,se.next=null,n.lastBaseUpdate=se,n.shared.pending=null}}while(!0);le===null&&(F=ce),n.baseState=F,n.firstBaseUpdate=Q,n.lastBaseUpdate=le,u===null&&(n.shared.lanes=0),Ni|=x,e.lanes=x,e.memoizedState=ce}}function Qc(e,t){if(typeof e!="function")throw Error(I(191,e));e.call(t)}function Zc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Qc(i[e],t)}var zs=A(null),yn=A(0);function Jc(e,t){e=yi,$(yn,e),$(zs,t),yi=e|t.baseLanes}function rl(){$(yn,yi),$(zs,zs.current)}function nl(){yi=yn.current,O(zs),O(yn)}var Ot=A(null),$t=null;function Oi(e){var t=e.alternate;$(it,it.current&1),$(Ot,e),$t===null&&(t===null||zs.current!==null||t.memoizedState!==null)&&($t=e)}function al(e){$(it,it.current),$(Ot,e),$t===null&&($t=e)}function eh(e){e.tag===22?($(it,it.current),$(Ot,e),$t===null&&($t=e)):ki()}function ki(){$(it,it.current),$(Ot,Ot.current)}function kt(e){O(Ot),$t===e&&($t=null),O(it)}var it=A(0);function bn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||fo(i)||_o(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 fi=0,Ee=null,Ge=null,nt=null,Cn=!1,Ns=!1,cs=!1,wn=0,br=0,Us=null,r_=0;function et(){throw Error(I(321))}function ll(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Tt(e[i],t[i]))return!1;return!0}function ol(e,t,i,s,n,u){return fi=u,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Nh:wl,cs=!1,u=i(s,n),cs=!1,Ns&&(u=ih(t,i,s,n)),th(e),u}function th(e){z.H=Er;var t=Ge!==null&&Ge.next!==null;if(fi=0,nt=Ge=Ee=null,Cn=!1,br=0,Us=null,t)throw Error(I(300));e===null||at||(e=e.dependencies,e!==null&&dn(e)&&(at=!0))}function ih(e,t,i,s){Ee=e;var n=0;do{if(Ns&&(Us=null),br=0,Ns=!1,25<=n)throw Error(I(301));if(n+=1,nt=Ge=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=Uh,u=t(i,s)}while(Ns);return u}function n_(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Cr(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(Ee.flags|=1024),t}function cl(){var e=wn!==0;return wn=0,e}function hl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function ul(e){if(Cn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cn=!1}fi=0,nt=Ge=Ee=null,Ns=!1,br=wn=0,Us=null}function yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Ee.memoizedState=nt=e:nt=nt.next=e,nt}function st(){if(Ge===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=nt===null?Ee.memoizedState:nt.next;if(t!==null)nt=t,Ge=e;else{if(e===null)throw Ee.alternate===null?Error(I(467)):Error(I(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},nt===null?Ee.memoizedState=nt=e:nt=nt.next=e}return nt}function En(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cr(e){var t=br;return br+=1,Us===null&&(Us=[]),e=$c(Us,e,t),t=Ee,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Nh:wl),e}function xn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Cr(e);if(e.$$typeof===c)return vt(e)}throw Error(I(438,String(e)))}function fl(e){var t=null,i=Ee.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ee.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=En(),Ee.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=L;return t.index++,i}function di(e,t){return typeof t=="function"?t(e):t}function Ln(e){var t=st();return dl(t,Ge,e)}function dl(e,t,i){var s=e.queue;if(s===null)throw Error(I(311));s.lastRenderedReducer=i;var n=e.baseQueue,u=s.pending;if(u!==null){if(n!==null){var x=n.next;n.next=u.next,u.next=x}t.baseQueue=n=u,s.pending=null}if(u=e.baseState,n===null)e.memoizedState=u;else{t=n.next;var B=x=null,F=null,Q=t,le=!1;do{var ce=Q.lane&-536870913;if(ce!==Q.lane?(Be&ce)===ce:(fi&ce)===ce){var Z=Q.revertLane;if(Z===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ce===Bs&&(le=!0);else if((fi&Z)===Z){Q=Q.next,Z===Bs&&(le=!0);continue}else ce={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},F===null?(B=F=ce,x=u):F=F.next=ce,Ee.lanes|=Z,Ni|=Z;ce=Q.action,cs&&i(u,ce),u=Q.hasEagerState?Q.eagerState:i(u,ce)}else Z={lane:ce,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},F===null?(B=F=Z,x=u):F=F.next=Z,Ee.lanes|=ce,Ni|=ce;Q=Q.next}while(Q!==null&&Q!==t);if(F===null?x=u:F.next=B,!Tt(u,e.memoizedState)&&(at=!0,le&&(i=Os,i!==null)))throw i;e.memoizedState=u,e.baseState=x,e.baseQueue=F,s.lastRenderedState=u}return n===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function _l(e){var t=st(),i=t.queue;if(i===null)throw Error(I(311));i.lastRenderedReducer=e;var s=i.dispatch,n=i.pending,u=t.memoizedState;if(n!==null){i.pending=null;var x=n=n.next;do u=e(u,x.action),x=x.next;while(x!==n);Tt(u,t.memoizedState)||(at=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),i.lastRenderedState=u}return[u,s]}function sh(e,t,i){var s=Ee,n=st(),u=ke;if(u){if(i===void 0)throw Error(I(407));i=i()}else i=t();var x=!Tt((Ge||n).memoizedState,i);if(x&&(n.memoizedState=i,at=!0),n=n.queue,ml(ah.bind(null,s,n,e),[e]),n.getSnapshot!==t||x||nt!==null&&nt.memoizedState.tag&1){if(s.flags|=2048,js(9,{destroy:void 0},nh.bind(null,s,n,i,t),null),Xe===null)throw Error(I(349));u||(fi&127)!==0||rh(s,t,i)}return i}function rh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ee.updateQueue,t===null?(t=En(),Ee.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function nh(e,t,i,s){t.value=i,t.getSnapshot=s,lh(t)&&oh(e)}function ah(e,t,i){return i(function(){lh(t)&&oh(e)})}function lh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Tt(e,i)}catch{return!0}}function oh(e){var t=es(e,2);t!==null&&Rt(t,e,2)}function vl(e){var t=yt();if(typeof e=="function"){var i=e;if(e=i(),cs){Mt(!0);try{i()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:e},t}function ch(e,t,i,s){return e.baseState=i,dl(e,Ge,typeof s=="function"?s:di)}function a_(e,t,i,s,n){if(Dn(e))throw Error(I(485));if(e=t.action,e!==null){var u={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){u.listeners.push(x)}};z.T!==null?i(!0):u.isTransition=!1,s(u),i=t.pending,i===null?(u.next=t.pending=u,hh(t,u)):(u.next=i.next,t.pending=i.next=u)}}function hh(e,t){var i=t.action,s=t.payload,n=e.state;if(t.isTransition){var u=z.T,x={};z.T=x;try{var B=i(n,s),F=z.S;F!==null&&F(x,B),uh(e,t,B)}catch(Q){gl(e,t,Q)}finally{u!==null&&x.types!==null&&(u.types=x.types),z.T=u}}else try{u=i(n,s),uh(e,t,u)}catch(Q){gl(e,t,Q)}}function uh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){fh(e,t,s)},function(s){return gl(e,t,s)}):fh(e,t,i)}function fh(e,t,i){t.status="fulfilled",t.value=i,dh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,hh(e,i)))}function gl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,dh(t),t=t.next;while(t!==s)}e.action=null}function dh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _h(e,t){return t}function vh(e,t){if(ke){var i=Xe.formState;if(i!==null){e:{var s=Ee;if(ke){if(Ye){t:{for(var n=Ye,u=Wt;n.nodeType!==8;){if(!u){n=null;break t}if(n=Xt(n.nextSibling),n===null){n=null;break t}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){Ye=Xt(n.nextSibling),s=n.data==="F!";break e}}Ri(s)}s=!1}s&&(t=i[0])}}return i=yt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_h,lastRenderedState:t},i.queue=s,i=kh.bind(null,Ee,s),s.dispatch=i,s=vl(!1),u=Cl.bind(null,Ee,!1,s.queue),s=yt(),n={state:t,dispatch:null,action:e,pending:null},s.queue=n,i=a_.bind(null,Ee,n,u,i),n.dispatch=i,s.memoizedState=e,[t,i,!1]}function gh(e){var t=st();return mh(t,Ge,e)}function mh(e,t,i){if(t=dl(e,t,_h)[0],e=Ln(di)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Cr(t)}catch(x){throw x===ks?gn:x}else s=t;t=st();var n=t.queue,u=n.dispatch;return i!==t.memoizedState&&(Ee.flags|=2048,js(9,{destroy:void 0},l_.bind(null,n,i),null)),[s,u,e]}function l_(e,t){e.action=t}function ph(e){var t=st(),i=Ge;if(i!==null)return mh(t,i,e);st(),t=t.memoizedState,i=st();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function js(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=En(),Ee.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Sh(){return st().memoizedState}function An(e,t,i,s){var n=yt();Ee.flags|=e,n.memoizedState=js(1|t,{destroy:void 0},i,s===void 0?null:s)}function Rn(e,t,i,s){var n=st();s=s===void 0?null:s;var u=n.memoizedState.inst;Ge!==null&&s!==null&&ll(s,Ge.memoizedState.deps)?n.memoizedState=js(t,u,i,s):(Ee.flags|=e,n.memoizedState=js(1|t,u,i,s))}function yh(e,t){An(8390656,8,e,t)}function ml(e,t){Rn(2048,8,e,t)}function o_(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=En(),Ee.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function bh(e){var t=st().memoizedState;return o_({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(I(440));return t.impl.apply(void 0,arguments)}}function Ch(e,t){return Rn(4,2,e,t)}function wh(e,t){return Rn(4,4,e,t)}function Eh(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 xh(e,t,i){i=i!=null?i.concat([e]):null,Rn(4,4,Eh.bind(null,t,e),i)}function pl(){}function Lh(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ll(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Ah(e,t){var i=st();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ll(t,s[1]))return s[0];if(s=e(),cs){Mt(!0);try{e()}finally{Mt(!1)}}return i.memoizedState=[s,t],s}function Sl(e,t,i){return i===void 0||(fi&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Ru(),Ee.lanes|=e,Ni|=e,i)}function Rh(e,t,i,s){return Tt(i,t)?i:zs.current!==null?(e=Sl(e,i,s),Tt(e,t)||(at=!0),e):(fi&42)===0||(fi&1073741824)!==0&&(Be&261930)===0?(at=!0,e.memoizedState=i):(e=Ru(),Ee.lanes|=e,Ni|=e,t)}function Dh(e,t,i,s,n){var u=U.p;U.p=u!==0&&8>u?u:8;var x=z.T,B={};z.T=B,Cl(e,!1,t,i);try{var F=n(),Q=z.S;if(Q!==null&&Q(B,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var le=s_(F,s);wr(e,t,le,Nt(e))}else wr(e,t,s,Nt(e))}catch(ce){wr(e,t,{then:function(){},status:"rejected",reason:ce},Nt())}finally{U.p=u,x!==null&&B.types!==null&&(x.types=B.types),z.T=x}}function c_(){}function yl(e,t,i,s){if(e.tag!==5)throw Error(I(476));var n=Mh(e).queue;Dh(e,n,t,q,i===null?c_:function(){return Th(e),i(s)})}function Mh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:q},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Th(e){var t=Mh(e);t.next===null&&(t=e.alternate.memoizedState),wr(e,t.next.queue,{},Nt())}function bl(){return vt(Ir)}function Bh(){return st().memoizedState}function Oh(){return st().memoizedState}function h_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Nt();e=Ti(i);var s=Bi(t,e,i);s!==null&&(Rt(s,t,i),pr(s,t,i)),t={cache:Ka()},e.payload=t;return}t=t.return}}function u_(e,t,i){var s=Nt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Dn(e)?Hh(t,i):(i=ja(e,t,i,s),i!==null&&(Rt(i,e,s),zh(i,t,s)))}function kh(e,t,i){var s=Nt();wr(e,t,i,s)}function wr(e,t,i,s){var n={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Dn(e))Hh(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var x=t.lastRenderedState,B=u(x,i);if(n.hasEagerState=!0,n.eagerState=B,Tt(B,x))return cn(e,t,n,0),Xe===null&&on(),!1}catch{}finally{}if(i=ja(e,t,n,s),i!==null)return Rt(i,e,s),zh(i,t,s),!0}return!1}function Cl(e,t,i,s){if(s={lane:2,revertLane:eo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Dn(e)){if(t)throw Error(I(479))}else t=ja(e,i,s,2),t!==null&&Rt(t,e,2)}function Dn(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Hh(e,t){Ns=Cn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function zh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Fo(e,i)}}var Er={readContext:vt,use:xn,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Er.useEffectEvent=et;var Nh={readContext:vt,use:xn,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:yh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,An(4194308,4,Eh.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=yt();t=t===void 0?null:t;var s=e();if(cs){Mt(!0);try{e()}finally{Mt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=yt();if(i!==void 0){var n=i(t);if(cs){Mt(!0);try{i(t)}finally{Mt(!1)}}}else n=t;return s.memoizedState=s.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=u_.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:function(e){e=vl(e);var t=e.queue,i=kh.bind(null,Ee,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:pl,useDeferredValue:function(e,t){var i=yt();return Sl(i,e,t)},useTransition:function(){var e=vl(!1);return e=Dh.bind(null,Ee,e.queue,!0,!1),yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ee,n=yt();if(ke){if(i===void 0)throw Error(I(407));i=i()}else{if(i=t(),Xe===null)throw Error(I(349));(Be&127)!==0||rh(s,t,i)}n.memoizedState=i;var u={value:i,getSnapshot:t};return n.queue=u,yh(ah.bind(null,s,u,e),[e]),s.flags|=2048,js(9,{destroy:void 0},nh.bind(null,s,u,i,t),null),i},useId:function(){var e=yt(),t=Xe.identifierPrefix;if(ke){var i=ti,s=ei;i=(s&~(1<<32-pt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=wn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=r_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bl,useFormState:vh,useActionState:vh,useOptimistic:function(e){var t=yt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Cl.bind(null,Ee,!0,i),i.dispatch=t,[e,t]},useMemoCache:fl,useCacheRefresh:function(){return yt().memoizedState=h_.bind(null,Ee)},useEffectEvent:function(e){var t=yt(),i={impl:e};return t.memoizedState=i,function(){if((je&2)!==0)throw Error(I(440));return i.impl.apply(void 0,arguments)}}},wl={readContext:vt,use:xn,useCallback:Lh,useContext:vt,useEffect:ml,useImperativeHandle:xh,useInsertionEffect:Ch,useLayoutEffect:wh,useMemo:Ah,useReducer:Ln,useRef:Sh,useState:function(){return Ln(di)},useDebugValue:pl,useDeferredValue:function(e,t){var i=st();return Rh(i,Ge.memoizedState,e,t)},useTransition:function(){var e=Ln(di)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Cr(e),t]},useSyncExternalStore:sh,useId:Bh,useHostTransitionStatus:bl,useFormState:gh,useActionState:gh,useOptimistic:function(e,t){var i=st();return ch(i,Ge,e,t)},useMemoCache:fl,useCacheRefresh:Oh};wl.useEffectEvent=bh;var Uh={readContext:vt,use:xn,useCallback:Lh,useContext:vt,useEffect:ml,useImperativeHandle:xh,useInsertionEffect:Ch,useLayoutEffect:wh,useMemo:Ah,useReducer:_l,useRef:Sh,useState:function(){return _l(di)},useDebugValue:pl,useDeferredValue:function(e,t){var i=st();return Ge===null?Sl(i,e,t):Rh(i,Ge.memoizedState,e,t)},useTransition:function(){var e=_l(di)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Cr(e),t]},useSyncExternalStore:sh,useId:Bh,useHostTransitionStatus:bl,useFormState:ph,useActionState:ph,useOptimistic:function(e,t){var i=st();return Ge!==null?ch(i,Ge,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:fl,useCacheRefresh:Oh};Uh.useEffectEvent=bh;function El(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:o({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var xl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Nt(),n=Ti(s);n.payload=t,i!=null&&(n.callback=i),t=Bi(e,n,s),t!==null&&(Rt(t,e,s),pr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Nt(),n=Ti(s);n.tag=1,n.payload=t,i!=null&&(n.callback=i),t=Bi(e,n,s),t!==null&&(Rt(t,e,s),pr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Nt(),s=Ti(i);s.tag=2,t!=null&&(s.callback=t),t=Bi(e,s,i),t!==null&&(Rt(t,e,i),pr(t,e,i))}};function jh(e,t,i,s,n,u,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,x):t.prototype&&t.prototype.isPureReactComponent?!hr(i,s)||!hr(n,u):!0}function Ih(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&&xl.enqueueReplaceState(t,t.state,null)}function hs(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=o({},i));for(var n in e)i[n]===void 0&&(i[n]=e[n])}return i}function Fh(e){ln(e)}function Ph(e){console.error(e)}function qh(e){ln(e)}function Mn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Gh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Ll(e,t,i){return i=Ti(i),i.tag=3,i.payload={element:null},i.callback=function(){Mn(e,t)},i}function Wh(e){return e=Ti(e),e.tag=3,e}function $h(e,t,i,s){var n=i.type.getDerivedStateFromError;if(typeof n=="function"){var u=s.value;e.payload=function(){return n(u)},e.callback=function(){Gh(t,i,s)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Gh(t,i,s),typeof n!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var B=s.stack;this.componentDidCatch(s.value,{componentStack:B!==null?B:""})})}function f_(e,t,i,s,n){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Ts(t,i,n,!0),i=Ot.current,i!==null){switch(i.tag){case 31:case 13:return $t===null?Pn():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=n,s===mn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Ql(e,s,n)),!1;case 22:return i.flags|=65536,s===mn?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)),Ql(e,s,n)),!1}throw Error(I(435,i.tag))}return Ql(e,s,n),Pn(),!1}if(ke)return t=Ot.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,s!==Wa&&(e=Error(I(422),{cause:s}),dr(Pt(e,i)))):(s!==Wa&&(t=Error(I(423),{cause:s}),dr(Pt(t,i))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,s=Pt(s,i),n=Ll(e.stateNode,s,n),il(e,n),tt!==4&&(tt=2)),!1;var u=Error(I(520),{cause:s});if(u=Pt(u,i),Br===null?Br=[u]:Br.push(u),tt!==4&&(tt=2),t===null)return!0;s=Pt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=n&-n,i.lanes|=e,e=Ll(i.stateNode,s,e),il(i,e),!1;case 1:if(t=i.type,u=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ui===null||!Ui.has(u))))return i.flags|=65536,n&=-n,i.lanes|=n,n=Wh(n),$h(n,e,i,s),il(i,n),!1}i=i.return}while(i!==null);return!1}var Al=Error(I(461)),at=!1;function gt(e,t,i,s){t.child=e===null?Kc(t,null,i,s):os(t,e.child,i,s)}function Xh(e,t,i,s,n){i=i.render;var u=t.ref;if("ref"in s){var x={};for(var B in s)B!=="ref"&&(x[B]=s[B])}else x=s;return rs(t),s=ol(e,t,i,x,u,n),B=cl(),e!==null&&!at?(hl(e,t,n),_i(e,t,n)):(ke&&B&&qa(t),t.flags|=1,gt(e,t,s,n),t.child)}function Yh(e,t,i,s,n){if(e===null){var u=i.type;return typeof u=="function"&&!Ia(u)&&u.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=u,Vh(e,t,u,s,n)):(e=un(i.type,null,s,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Hl(e,n)){var x=u.memoizedProps;if(i=i.compare,i=i!==null?i:hr,i(x,s)&&e.ref===t.ref)return _i(e,t,n)}return t.flags|=1,e=oi(u,s),e.ref=t.ref,e.return=t,t.child=e}function Vh(e,t,i,s,n){if(e!==null){var u=e.memoizedProps;if(hr(u,s)&&e.ref===t.ref)if(at=!1,t.pendingProps=s=u,Hl(e,n))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,_i(e,t,n)}return Rl(e,t,i,s,n)}function Kh(e,t,i,s){var n=s.children,u=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(u=u!==null?u.baseLanes|i:i,e!==null){for(s=t.child=e.child,n=0;s!==null;)n=n|s.lanes|s.childLanes,s=s.sibling;s=n&~u}else s=0,t.child=null;return Qh(e,t,u,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vn(t,u!==null?u.cachePool:null),u!==null?Jc(t,u):rl(),eh(t);else return s=t.lanes=536870912,Qh(e,t,u!==null?u.baseLanes|i:i,i,s)}else u!==null?(vn(t,u.cachePool),Jc(t,u),ki(),t.memoizedState=null):(e!==null&&vn(t,null),rl(),ki());return gt(e,t,n,i),t.child}function xr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Qh(e,t,i,s,n){var u=Za();return u=u===null?null:{parent:rt._currentValue,pool:u},t.memoizedState={baseLanes:i,cachePool:u},e!==null&&vn(t,null),rl(),eh(t),e!==null&&Ts(e,t,s,!0),t.childLanes=n,null}function Tn(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 Zh(e,t,i){return os(t,e.child,null,i),e=Tn(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function d_(e,t,i){var s=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(s.mode==="hidden")return e=Tn(t,s),t.lanes=536870912,xr(null,e);if(al(t),(e=Ye)?(e=uf(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Hc(e),i.return=t,t.child=i,_t=t,Ye=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return Tn(t,s)}var u=e.memoizedState;if(u!==null){var x=u.dehydrated;if(al(t),n)if(t.flags&256)t.flags&=-257,t=Zh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(I(558));else if(at||Ts(e,t,i,!1),n=(i&e.childLanes)!==0,at||n){if(s=Xe,s!==null&&(x=Po(s,i),x!==0&&x!==u.retryLane))throw u.retryLane=x,es(e,x),Rt(s,e,x),Al;Pn(),t=Zh(e,t,i)}else e=u.treeContext,Ye=Xt(x.nextSibling),_t=t,ke=!0,Ai=null,Wt=!1,e!==null&&Uc(t,e),t=Tn(t,s),t.flags|=4096;return t}return e=oi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bn(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(I(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Rl(e,t,i,s,n){return rs(t),i=ol(e,t,i,s,void 0,n),s=cl(),e!==null&&!at?(hl(e,t,n),_i(e,t,n)):(ke&&s&&qa(t),t.flags|=1,gt(e,t,i,n),t.child)}function Jh(e,t,i,s,n,u){return rs(t),t.updateQueue=null,i=ih(t,s,i,n),th(e),s=cl(),e!==null&&!at?(hl(e,t,u),_i(e,t,u)):(ke&&s&&qa(t),t.flags|=1,gt(e,t,i,u),t.child)}function eu(e,t,i,s,n){if(rs(t),t.stateNode===null){var u=As,x=i.contextType;typeof x=="object"&&x!==null&&(u=vt(x)),u=new i(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=xl,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},el(t),x=i.contextType,u.context=typeof x=="object"&&x!==null?vt(x):As,u.state=t.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(El(t,i,x,s),u.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(x=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),x!==u.state&&xl.enqueueReplaceState(u,u.state,null),yr(t,s,u,n),Sr(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var B=t.memoizedProps,F=hs(i,B);u.props=F;var Q=u.context,le=i.contextType;x=As,typeof le=="object"&&le!==null&&(x=vt(le));var ce=i.getDerivedStateFromProps;le=typeof ce=="function"||typeof u.getSnapshotBeforeUpdate=="function",B=t.pendingProps!==B,le||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(B||Q!==x)&&Ih(t,u,s,x),Mi=!1;var Z=t.memoizedState;u.state=Z,yr(t,s,u,n),Sr(),Q=t.memoizedState,B||Z!==Q||Mi?(typeof ce=="function"&&(El(t,i,ce,s),Q=t.memoizedState),(F=Mi||jh(t,i,F,s,Z,Q,x))?(le||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=Q),u.props=s,u.state=Q,u.context=x,s=F):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,tl(e,t),x=t.memoizedProps,le=hs(i,x),u.props=le,ce=t.pendingProps,Z=u.context,Q=i.contextType,F=As,typeof Q=="object"&&Q!==null&&(F=vt(Q)),B=i.getDerivedStateFromProps,(Q=typeof B=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x!==ce||Z!==F)&&Ih(t,u,s,F),Mi=!1,Z=t.memoizedState,u.state=Z,yr(t,s,u,n),Sr();var se=t.memoizedState;x!==ce||Z!==se||Mi||e!==null&&e.dependencies!==null&&dn(e.dependencies)?(typeof B=="function"&&(El(t,i,B,s),se=t.memoizedState),(le=Mi||jh(t,i,le,s,Z,se,F)||e!==null&&e.dependencies!==null&&dn(e.dependencies))?(Q||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,se,F),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,se,F)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=se),u.props=s,u.state=se,u.context=F,s=le):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Bn(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=os(t,e.child,null,n),t.child=os(t,null,i,n)):gt(e,t,i,n),t.memoizedState=u.state,e=t.child):e=_i(e,t,n),e}function tu(e,t,i,s){return is(),t.flags|=256,gt(e,t,i,s),t.child}var Dl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ml(e){return{baseLanes:e,cachePool:Gc()}}function Tl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=zt),e}function iu(e,t,i){var s=t.pendingProps,n=!1,u=(t.flags&128)!==0,x;if((x=u)||(x=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),x&&(n=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(n?Oi(t):ki(),(e=Ye)?(e=uf(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:ei,overflow:ti}:null,retryLane:536870912,hydrationErrors:null},i=Hc(e),i.return=t,t.child=i,_t=t,Ye=null)):e=null,e===null)throw Ri(t);return _o(e)?t.lanes=32:t.lanes=536870912,null}var B=s.children;return s=s.fallback,n?(ki(),n=t.mode,B=On({mode:"hidden",children:B},n),s=ts(s,n,i,null),B.return=t,s.return=t,B.sibling=s,t.child=B,s=t.child,s.memoizedState=Ml(i),s.childLanes=Tl(e,x,i),t.memoizedState=Dl,xr(null,s)):(Oi(t),Bl(t,B))}var F=e.memoizedState;if(F!==null&&(B=F.dehydrated,B!==null)){if(u)t.flags&256?(Oi(t),t.flags&=-257,t=Ol(e,t,i)):t.memoizedState!==null?(ki(),t.child=e.child,t.flags|=128,t=null):(ki(),B=s.fallback,n=t.mode,s=On({mode:"visible",children:s.children},n),B=ts(B,n,i,null),B.flags|=2,s.return=t,B.return=t,s.sibling=B,t.child=s,os(t,e.child,null,i),s=t.child,s.memoizedState=Ml(i),s.childLanes=Tl(e,x,i),t.memoizedState=Dl,t=xr(null,s));else if(Oi(t),_o(B)){if(x=B.nextSibling&&B.nextSibling.dataset,x)var Q=x.dgst;x=Q,s=Error(I(419)),s.stack="",s.digest=x,dr({value:s,source:null,stack:null}),t=Ol(e,t,i)}else if(at||Ts(e,t,i,!1),x=(i&e.childLanes)!==0,at||x){if(x=Xe,x!==null&&(s=Po(x,i),s!==0&&s!==F.retryLane))throw F.retryLane=s,es(e,s),Rt(x,e,s),Al;fo(B)||Pn(),t=Ol(e,t,i)}else fo(B)?(t.flags|=192,t.child=e.child,t=null):(e=F.treeContext,Ye=Xt(B.nextSibling),_t=t,ke=!0,Ai=null,Wt=!1,e!==null&&Uc(t,e),t=Bl(t,s.children),t.flags|=4096);return t}return n?(ki(),B=s.fallback,n=t.mode,F=e.child,Q=F.sibling,s=oi(F,{mode:"hidden",children:s.children}),s.subtreeFlags=F.subtreeFlags&65011712,Q!==null?B=oi(Q,B):(B=ts(B,n,i,null),B.flags|=2),B.return=t,s.return=t,s.sibling=B,t.child=s,xr(null,s),s=t.child,B=e.child.memoizedState,B===null?B=Ml(i):(n=B.cachePool,n!==null?(F=rt._currentValue,n=n.parent!==F?{parent:F,pool:F}:n):n=Gc(),B={baseLanes:B.baseLanes|i,cachePool:n}),s.memoizedState=B,s.childLanes=Tl(e,x,i),t.memoizedState=Dl,xr(e.child,s)):(Oi(t),i=e.child,e=i.sibling,i=oi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=i,t.memoizedState=null,i)}function Bl(e,t){return t=On({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function On(e,t){return e=Bt(22,e,null,t),e.lanes=0,e}function Ol(e,t,i){return os(t,e.child,null,i),e=Bl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function su(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ya(e.return,t,i)}function kl(e,t,i,s,n,u){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:n,treeForkCount:u}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=s,x.tail=i,x.tailMode=n,x.treeForkCount=u)}function ru(e,t,i){var s=t.pendingProps,n=s.revealOrder,u=s.tail;s=s.children;var x=it.current,B=(x&2)!==0;if(B?(x=x&1|2,t.flags|=128):x&=1,$(it,x),gt(e,t,s,i),s=ke?fr:0,!B&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&su(e,i,t);else if(e.tag===19)su(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(n){case"forwards":for(i=t.child,n=null;i!==null;)e=i.alternate,e!==null&&bn(e)===null&&(n=i),i=i.sibling;i=n,i===null?(n=t.child,t.child=null):(n=i.sibling,i.sibling=null),kl(t,!1,n,i,u,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&bn(e)===null){t.child=n;break}e=n.sibling,n.sibling=i,i=n,n=e}kl(t,!0,i,null,u,s);break;case"together":kl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function _i(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ni|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ts(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,i=oi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=oi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Hl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&dn(e)))}function __(e,t,i){switch(t.tag){case 3:k(t,t.stateNode.containerInfo),Di(t,rt,e.memoizedState.cache),is();break;case 27:case 5:ee(t);break;case 4:k(t,t.stateNode.containerInfo);break;case 10:Di(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,al(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Oi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?iu(e,t,i):(Oi(t),e=_i(e,t,i),e!==null?e.sibling:null);Oi(t);break;case 19:var n=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Ts(e,t,i,!1),s=(i&t.childLanes)!==0),n){if(s)return ru(e,t,i);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),$(it,it.current),s)break;return null;case 22:return t.lanes=0,Kh(e,t,i,t.pendingProps);case 24:Di(t,rt,e.memoizedState.cache)}return _i(e,t,i)}function nu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!Hl(e,i)&&(t.flags&128)===0)return at=!1,__(e,t,i);at=(e.flags&131072)!==0}else at=!1,ke&&(t.flags&1048576)!==0&&Nc(t,fr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=as(t.elementType),t.type=e,typeof e=="function")Ia(e)?(s=hs(e,s),t.tag=1,t=eu(null,t,e,s,i)):(t.tag=0,t=Rl(null,t,e,s,i));else{if(e!=null){var n=e.$$typeof;if(n===m){t.tag=11,t=Xh(null,t,e,s,i);break e}else if(n===E){t.tag=14,t=Yh(null,t,e,s,i);break e}}throw t=N(e)||e,Error(I(306,t,""))}}return t;case 0:return Rl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,n=hs(s,t.pendingProps),eu(e,t,s,n,i);case 3:e:{if(k(t,t.stateNode.containerInfo),e===null)throw Error(I(387));s=t.pendingProps;var u=t.memoizedState;n=u.element,tl(e,t),yr(t,s,null,i);var x=t.memoizedState;if(s=x.cache,Di(t,rt,s),s!==u.cache&&Va(t,[rt],i,!0),Sr(),s=x.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=tu(e,t,s,i);break e}else if(s!==n){n=Pt(Error(I(424)),t),dr(n),t=tu(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=Xt(e.firstChild),_t=t,ke=!0,Ai=null,Wt=!0,i=Kc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(is(),s===n){t=_i(e,t,i);break e}gt(e,t,s,i)}t=t.child}return t;case 26:return Bn(e,t),e===null?(i=mf(t.type,null,t.pendingProps,null))?t.memoizedState=i:ke||(i=t.type,e=t.pendingProps,s=Vn(ue.current).createElement(i),s[dt]=t,s[Ct]=e,mt(s,i,e),ut(s),t.stateNode=s):t.memoizedState=mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ee(t),e===null&&ke&&(s=t.stateNode=_f(t.type,t.pendingProps,ue.current),_t=t,Wt=!0,n=Ye,Pi(t.type)?(vo=n,Ye=Xt(s.firstChild)):Ye=n),gt(e,t,t.pendingProps.children,i),Bn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((n=s=Ye)&&(s=G_(s,t.type,t.pendingProps,Wt),s!==null?(t.stateNode=s,_t=t,Ye=Xt(s.firstChild),Wt=!1,n=!0):n=!1),n||Ri(t)),ee(t),n=t.type,u=t.pendingProps,x=e!==null?e.memoizedProps:null,s=u.children,co(n,u)?s=null:x!==null&&co(n,x)&&(t.flags|=32),t.memoizedState!==null&&(n=ol(e,t,n_,null,null,i),Ir._currentValue=n),Bn(e,t),gt(e,t,s,i),t.child;case 6:return e===null&&ke&&((e=i=Ye)&&(i=W_(i,t.pendingProps,Wt),i!==null?(t.stateNode=i,_t=t,Ye=null,e=!0):e=!1),e||Ri(t)),null;case 13:return iu(e,t,i);case 4:return k(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=os(t,null,s,i):gt(e,t,s,i),t.child;case 11:return Xh(e,t,t.type,t.pendingProps,i);case 7:return gt(e,t,t.pendingProps,i),t.child;case 8:return gt(e,t,t.pendingProps.children,i),t.child;case 12:return gt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Di(t,t.type,s.value),gt(e,t,s.children,i),t.child;case 9:return n=t.type._context,s=t.pendingProps.children,rs(t),n=vt(n),s=s(n),t.flags|=1,gt(e,t,s,i),t.child;case 14:return Yh(e,t,t.type,t.pendingProps,i);case 15:return Vh(e,t,t.type,t.pendingProps,i);case 19:return ru(e,t,i);case 31:return d_(e,t,i);case 22:return Kh(e,t,i,t.pendingProps);case 24:return rs(t),s=vt(rt),e===null?(n=Za(),n===null&&(n=Xe,u=Ka(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=i),n=u),t.memoizedState={parent:s,cache:n},el(t),Di(t,rt,n)):((e.lanes&i)!==0&&(tl(e,t),yr(t,null,null,i),Sr()),n=e.memoizedState,u=t.memoizedState,n.parent!==s?(n={parent:s,cache:s},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Di(t,rt,s)):(s=u.cache,Di(t,rt,s),s!==n.cache&&Va(t,[rt],i,!0))),gt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(I(156,t.tag))}function vi(e){e.flags|=4}function zl(e,t,i,s,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Bu())e.flags|=8192;else throw ls=mn,Ja}else e.flags&=-16777217}function au(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cf(t))if(Bu())e.flags|=8192;else throw ls=mn,Ja}function kn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jo():536870912,e.lanes|=t,qs|=t)}function Lr(e,t){if(!ke)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 Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags&65011712,s|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)i|=n.lanes|n.childLanes,s|=n.subtreeFlags,s|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function v_(e,t,i){var s=t.pendingProps;switch(Ga(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ve(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ui(rt),ie(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ms(t)?vi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$a())),Ve(t),null;case 26:var n=t.type,u=t.memoizedState;return e===null?(vi(t),u!==null?(Ve(t),au(t,u)):(Ve(t),zl(t,n,null,s,i))):u?u!==e.memoizedState?(vi(t),Ve(t),au(t,u)):(Ve(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&vi(t),Ve(t),zl(t,n,e,s,i)),null;case 27:if(de(t),i=ue.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(!s){if(t.stateNode===null)throw Error(I(166));return Ve(t),null}e=V.current,Ms(t)?jc(t):(e=_f(n,s,i),t.stateNode=e,vi(t))}return Ve(t),null;case 5:if(de(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(!s){if(t.stateNode===null)throw Error(I(166));return Ve(t),null}if(u=V.current,Ms(t))jc(t);else{var x=Vn(ue.current);switch(u){case 1:u=x.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:u=x.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":u=x.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":u=x.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":u=x.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?x.createElement("select",{is:s.is}):x.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?x.createElement(n,{is:s.is}):x.createElement(n)}}u[dt]=t,u[Ct]=s;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)u.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=u;e:switch(mt(u,n,s),n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&vi(t)}}return Ve(t),zl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&vi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(I(166));if(e=ue.current,Ms(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,n=_t,n!==null)switch(n.tag){case 27:case 5:s=n.memoizedProps}e[dt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||sf(e.nodeValue,i)),e||Ri(t,!0)}else e=Vn(e).createTextNode(s),e[dt]=t,t.stateNode=e}return Ve(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ms(t),i!==null){if(e===null){if(!s)throw Error(I(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(557));e[dt]=t}else is(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),e=!1}else i=$a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(I(558))}return Ve(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ms(t),s!==null&&s.dehydrated!==null){if(e===null){if(!n)throw Error(I(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(I(317));n[dt]=t}else is(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),n=!1}else n=$a(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,n=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(n=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==n&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),kn(t,t.updateQueue),Ve(t),null);case 4:return ie(),e===null&&ro(t.stateNode.containerInfo),Ve(t),null;case 10:return ui(t.type),Ve(t),null;case 19:if(O(it),s=t.memoizedState,s===null)return Ve(t),null;if(n=(t.flags&128)!==0,u=s.rendering,u===null)if(n)Lr(s,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=bn(e),u!==null){for(t.flags|=128,Lr(s,!1),e=u.updateQueue,t.updateQueue=e,kn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)kc(i,e),i=i.sibling;return $(it,it.current&1|2),ke&&ci(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&be()>jn&&(t.flags|=128,n=!0,Lr(s,!1),t.lanes=4194304)}else{if(!n)if(e=bn(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,kn(t,e),Lr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!ke)return Ve(t),null}else 2*be()-s.renderingStartTime>jn&&i!==536870912&&(t.flags|=128,n=!0,Lr(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=be(),e.sibling=null,i=it.current,$(it,n?i&1|2:i&1),ke&&ci(t,s.treeForkCount),e):(Ve(t),null);case 22:case 23:return kt(t),nl(),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&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),i=t.updateQueue,i!==null&&kn(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&O(ns),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ui(rt),Ve(t),null;case 25:return null;case 30:return null}throw Error(I(156,t.tag))}function g_(e,t){switch(Ga(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ui(rt),ie(),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(kt(t),t.alternate===null)throw Error(I(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(it),null;case 4:return ie(),null;case 10:return ui(t.type),null;case 22:case 23:return kt(t),nl(),e!==null&&O(ns),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ui(rt),null;case 25:return null;default:return null}}function lu(e,t){switch(Ga(t),t.tag){case 3:ui(rt),ie();break;case 26:case 27:case 5:de(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:O(it);break;case 10:ui(t.type);break;case 22:case 23:kt(t),nl(),e!==null&&O(ns);break;case 24:ui(rt)}}function Ar(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var n=s.next;i=n;do{if((i.tag&e)===e){s=void 0;var u=i.create,x=i.inst;s=u(),x.destroy=s}i=i.next}while(i!==n)}}catch(B){Fe(t,t.return,B)}}function Hi(e,t,i){try{var s=t.updateQueue,n=s!==null?s.lastEffect:null;if(n!==null){var u=n.next;s=u;do{if((s.tag&e)===e){var x=s.inst,B=x.destroy;if(B!==void 0){x.destroy=void 0,n=t;var F=i,Q=B;try{Q()}catch(le){Fe(n,F,le)}}}s=s.next}while(s!==u)}}catch(le){Fe(t,t.return,le)}}function ou(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Zc(t,i)}catch(s){Fe(e,e.return,s)}}}function cu(e,t,i){i.props=hs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Fe(e,t,s)}}function Rr(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(n){Fe(e,t,n)}}function ii(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(n){Fe(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(n){Fe(e,t,n)}else i.current=null}function hu(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(n){Fe(e,e.return,n)}}function Nl(e,t,i){try{var s=e.stateNode;U_(s,e.type,i,t),s[Ct]=t}catch(n){Fe(e,e.return,n)}}function uu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pi(e.type)||e.tag===4}function Ul(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uu(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&&Pi(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 jl(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=ai));else if(s!==4&&(s===27&&Pi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(jl(e,t,i),e=e.sibling;e!==null;)jl(e,t,i),e=e.sibling}function Hn(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&&Pi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Hn(e,t,i),e=e.sibling;e!==null;)Hn(e,t,i),e=e.sibling}function fu(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);mt(t,s,i),t[dt]=e,t[Ct]=i}catch(u){Fe(e,e.return,u)}}var gi=!1,lt=!1,Il=!1,du=typeof WeakSet=="function"?WeakSet:Set,ft=null;function m_(e,t){if(e=e.containerInfo,lo=ia,e=xc(e),Oa(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 n=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{i.nodeType,u.nodeType}catch{i=null;break e}var x=0,B=-1,F=-1,Q=0,le=0,ce=e,Z=null;t:for(;;){for(var se;ce!==i||n!==0&&ce.nodeType!==3||(B=x+n),ce!==u||s!==0&&ce.nodeType!==3||(F=x+s),ce.nodeType===3&&(x+=ce.nodeValue.length),(se=ce.firstChild)!==null;)Z=ce,ce=se;for(;;){if(ce===e)break t;if(Z===i&&++Q===n&&(B=x),Z===u&&++le===s&&(F=x),(se=ce.nextSibling)!==null)break;ce=Z,Z=ce.parentNode}ce=se}i=B===-1||F===-1?null:{start:B,end:F}}else i=null}i=i||{start:0,end:0}}else i=null;for(oo={focusedElem:e,selectionRange:i},ia=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,u=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++)n=e[i],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,i=t,n=u.memoizedProps,u=u.memoizedState,s=i.stateNode;try{var ve=hs(i.type,n);e=s.getSnapshotBeforeUpdate(ve,u),s.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Fe(i,i.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)uo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uo(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(I(163))}if(e=t.sibling,e!==null){e.return=t.return,ft=e;break}ft=t.return}}function _u(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:pi(e,i),s&4&&Ar(5,i);break;case 1:if(pi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(x){Fe(i,i.return,x)}else{var n=hs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Fe(i,i.return,x)}}s&64&&ou(i),s&512&&Rr(i,i.return);break;case 3:if(pi(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{Zc(e,t)}catch(x){Fe(i,i.return,x)}}break;case 27:t===null&&s&4&&fu(i);case 26:case 5:pi(e,i),t===null&&s&4&&hu(i),s&512&&Rr(i,i.return);break;case 12:pi(e,i);break;case 31:pi(e,i),s&4&&mu(e,i);break;case 13:pi(e,i),s&4&&pu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=L_.bind(null,i),$_(e,i))));break;case 22:if(s=i.memoizedState!==null||gi,!s){t=t!==null&&t.memoizedState!==null||lt,n=gi;var u=lt;gi=s,(lt=t)&&!u?Si(e,i,(i.subtreeFlags&8772)!==0):pi(e,i),gi=n,lt=u}break;case 30:break;default:pi(e,i)}}function vu(e){var t=e.alternate;t!==null&&(e.alternate=null,vu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ga(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 Ze=null,Et=!1;function mi(e,t,i){for(i=i.child;i!==null;)gu(e,t,i),i=i.sibling}function gu(e,t,i){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Vt,i)}catch{}switch(i.tag){case 26:lt||ii(i,t),mi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:lt||ii(i,t);var s=Ze,n=Et;Pi(i.type)&&(Ze=i.stateNode,Et=!1),mi(e,t,i),Nr(i.stateNode),Ze=s,Et=n;break;case 5:lt||ii(i,t);case 6:if(s=Ze,n=Et,Ze=null,mi(e,t,i),Ze=s,Et=n,Ze!==null)if(Et)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(i.stateNode)}catch(u){Fe(i,t,u)}else try{Ze.removeChild(i.stateNode)}catch(u){Fe(i,t,u)}break;case 18:Ze!==null&&(Et?(e=Ze,cf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Qs(e)):cf(Ze,i.stateNode));break;case 4:s=Ze,n=Et,Ze=i.stateNode.containerInfo,Et=!0,mi(e,t,i),Ze=s,Et=n;break;case 0:case 11:case 14:case 15:Hi(2,i,t),lt||Hi(4,i,t),mi(e,t,i);break;case 1:lt||(ii(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&cu(i,t,s)),mi(e,t,i);break;case 21:mi(e,t,i);break;case 22:lt=(s=lt)||i.memoizedState!==null,mi(e,t,i),lt=s;break;default:mi(e,t,i)}}function mu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qs(e)}catch(i){Fe(t,t.return,i)}}}function pu(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){Fe(t,t.return,i)}}function p_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new du),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new du),t;default:throw Error(I(435,e.tag))}}function zn(e,t){var i=p_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var n=A_.bind(null,e,s);s.then(n,n)}})}function xt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var n=i[s],u=e,x=t,B=x;e:for(;B!==null;){switch(B.tag){case 27:if(Pi(B.type)){Ze=B.stateNode,Et=!1;break e}break;case 5:Ze=B.stateNode,Et=!1;break e;case 3:case 4:Ze=B.stateNode.containerInfo,Et=!0;break e}B=B.return}if(Ze===null)throw Error(I(160));gu(u,x,n),Ze=null,Et=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Su(t,e),t=t.sibling}var Qt=null;function Su(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xt(t,e),Lt(e),s&4&&(Hi(3,e,e.return),Ar(3,e),Hi(5,e,e.return));break;case 1:xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),s&64&&gi&&(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 n=Qt;if(xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),s&4){var u=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,n=n.ownerDocument||n;t:switch(s){case"title":u=n.getElementsByTagName("title")[0],(!u||u[tr]||u[dt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(s),n.head.insertBefore(u,n.querySelector("head > title"))),mt(u,s,i),u[dt]=e,ut(u),s=u;break e;case"link":var x=yf("link","href",n).get(s+(i.href||""));if(x){for(var B=0;B<x.length;B++)if(u=x[B],u.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&u.getAttribute("rel")===(i.rel==null?null:i.rel)&&u.getAttribute("title")===(i.title==null?null:i.title)&&u.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(B,1);break t}}u=n.createElement(s),mt(u,s,i),n.head.appendChild(u);break;case"meta":if(x=yf("meta","content",n).get(s+(i.content||""))){for(B=0;B<x.length;B++)if(u=x[B],u.getAttribute("content")===(i.content==null?null:""+i.content)&&u.getAttribute("name")===(i.name==null?null:i.name)&&u.getAttribute("property")===(i.property==null?null:i.property)&&u.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&u.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(B,1);break t}}u=n.createElement(s),mt(u,s,i),n.head.appendChild(u);break;default:throw Error(I(468,s))}u[dt]=e,ut(u),s=u}e.stateNode=s}else bf(n,e.type,e.stateNode);else e.stateNode=Sf(n,s,e.memoizedProps);else u!==s?(u===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):u.count--,s===null?bf(n,e.type,e.stateNode):Sf(n,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Nl(e,e.memoizedProps,i.memoizedProps)}break;case 27:xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),i!==null&&s&4&&Nl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(xt(t,e),Lt(e),s&512&&(lt||i===null||ii(i,i.return)),e.flags&32){n=e.stateNode;try{ys(n,"")}catch(ve){Fe(e,e.return,ve)}}s&4&&e.stateNode!=null&&(n=e.memoizedProps,Nl(e,n,i!==null?i.memoizedProps:n)),s&1024&&(Il=!0);break;case 6:if(xt(t,e),Lt(e),s&4){if(e.stateNode===null)throw Error(I(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){Fe(e,e.return,ve)}}break;case 3:if(Zn=null,n=Qt,Qt=Kn(t.containerInfo),xt(t,e),Qt=n,Lt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Qs(t.containerInfo)}catch(ve){Fe(e,e.return,ve)}Il&&(Il=!1,yu(e));break;case 4:s=Qt,Qt=Kn(e.stateNode.containerInfo),xt(t,e),Lt(e),Qt=s;break;case 12:xt(t,e),Lt(e);break;case 31:xt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 13:xt(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Un=be()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 22:n=e.memoizedState!==null;var F=i!==null&&i.memoizedState!==null,Q=gi,le=lt;if(gi=Q||n,lt=le||F,xt(t,e),lt=le,gi=Q,Lt(e),s&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(i===null||F||gi||lt||us(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){F=i=t;try{if(u=F.stateNode,n)x=u.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{B=F.stateNode;var ce=F.memoizedProps.style,Z=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;B.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(ve){Fe(F,F.return,ve)}}}else if(t.tag===6){if(i===null){F=t;try{F.stateNode.nodeValue=n?"":F.memoizedProps}catch(ve){Fe(F,F.return,ve)}}}else if(t.tag===18){if(i===null){F=t;try{var se=F.stateNode;n?hf(se,!0):hf(F.stateNode,!1)}catch(ve){Fe(F,F.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,zn(e,i))));break;case 19:xt(t,e),Lt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 30:break;case 21:break;default:xt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(uu(s)){i=s;break}s=s.return}if(i==null)throw Error(I(160));switch(i.tag){case 27:var n=i.stateNode,u=Ul(e);Hn(e,u,n);break;case 5:var x=i.stateNode;i.flags&32&&(ys(x,""),i.flags&=-33);var B=Ul(e);Hn(e,B,x);break;case 3:case 4:var F=i.stateNode.containerInfo,Q=Ul(e);jl(e,Q,F);break;default:throw Error(I(161))}}catch(le){Fe(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_u(e,t.alternate,t),t=t.sibling}function us(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hi(4,t,t.return),us(t);break;case 1:ii(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&cu(t,t.return,i),us(t);break;case 27:Nr(t.stateNode);case 26:case 5:ii(t,t.return),us(t);break;case 22:t.memoizedState===null&&us(t);break;case 30:us(t);break;default:us(t)}e=e.sibling}}function Si(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,n=e,u=t,x=u.flags;switch(u.tag){case 0:case 11:case 15:Si(n,u,i),Ar(4,u);break;case 1:if(Si(n,u,i),s=u,n=s.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(Q){Fe(s,s.return,Q)}if(s=u,n=s.updateQueue,n!==null){var B=s.stateNode;try{var F=n.shared.hiddenCallbacks;if(F!==null)for(n.shared.hiddenCallbacks=null,n=0;n<F.length;n++)Qc(F[n],B)}catch(Q){Fe(s,s.return,Q)}}i&&x&64&&ou(u),Rr(u,u.return);break;case 27:fu(u);case 26:case 5:Si(n,u,i),i&&s===null&&x&4&&hu(u),Rr(u,u.return);break;case 12:Si(n,u,i);break;case 31:Si(n,u,i),i&&x&4&&mu(n,u);break;case 13:Si(n,u,i),i&&x&4&&pu(n,u);break;case 22:u.memoizedState===null&&Si(n,u,i),Rr(u,u.return);break;case 30:break;default:Si(n,u,i)}t=t.sibling}}function Fl(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&&_r(i))}function Pl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e))}function Zt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bu(e,t,i,s),t=t.sibling}function bu(e,t,i,s){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Zt(e,t,i,s),n&2048&&Ar(9,t);break;case 1:Zt(e,t,i,s);break;case 3:Zt(e,t,i,s),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_r(e)));break;case 12:if(n&2048){Zt(e,t,i,s),e=t.stateNode;try{var u=t.memoizedProps,x=u.id,B=u.onPostCommit;typeof B=="function"&&B(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(F){Fe(t,t.return,F)}}else Zt(e,t,i,s);break;case 31:Zt(e,t,i,s);break;case 13:Zt(e,t,i,s);break;case 23:break;case 22:u=t.stateNode,x=t.alternate,t.memoizedState!==null?u._visibility&2?Zt(e,t,i,s):Dr(e,t):u._visibility&2?Zt(e,t,i,s):(u._visibility|=2,Is(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Fl(x,t);break;case 24:Zt(e,t,i,s),n&2048&&Pl(t.alternate,t);break;default:Zt(e,t,i,s)}}function Is(e,t,i,s,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,x=t,B=i,F=s,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Is(u,x,B,F,n),Ar(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?Is(u,x,B,F,n):Dr(u,x):(le._visibility|=2,Is(u,x,B,F,n)),n&&Q&2048&&Fl(x.alternate,x);break;case 24:Is(u,x,B,F,n),n&&Q&2048&&Pl(x.alternate,x);break;default:Is(u,x,B,F,n)}t=t.sibling}}function Dr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,n=s.flags;switch(s.tag){case 22:Dr(i,s),n&2048&&Fl(s.alternate,s);break;case 24:Dr(i,s),n&2048&&Pl(s.alternate,s);break;default:Dr(i,s)}t=t.sibling}}var Mr=8192;function Fs(e,t,i){if(e.subtreeFlags&Mr)for(e=e.child;e!==null;)Cu(e,t,i),e=e.sibling}function Cu(e,t,i){switch(e.tag){case 26:Fs(e,t,i),e.flags&Mr&&e.memoizedState!==null&&rv(i,Qt,e.memoizedState,e.memoizedProps);break;case 5:Fs(e,t,i);break;case 3:case 4:var s=Qt;Qt=Kn(e.stateNode.containerInfo),Fs(e,t,i),Qt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Mr,Mr=16777216,Fs(e,t,i),Mr=s):Fs(e,t,i));break;default:Fs(e,t,i)}}function wu(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 Tr(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];ft=s,xu(s,e)}wu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Eu(e),e=e.sibling}function Eu(e){switch(e.tag){case 0:case 11:case 15:Tr(e),e.flags&2048&&Hi(9,e,e.return);break;case 3:Tr(e);break;case 12:Tr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nn(e)):Tr(e);break;default:Tr(e)}}function Nn(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];ft=s,xu(s,e)}wu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hi(8,t,t.return),Nn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Nn(t));break;default:Nn(t)}e=e.sibling}}function xu(e,t){for(;ft!==null;){var i=ft;switch(i.tag){case 0:case 11:case 15:Hi(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:_r(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ft=s;else e:for(i=e;ft!==null;){s=ft;var n=s.sibling,u=s.return;if(vu(s),s===i){ft=null;break e}if(n!==null){n.return=u,ft=n;break e}ft=u}}}var S_={getCacheForType:function(e){var t=vt(rt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return vt(rt).controller.signal}},y_=typeof WeakMap=="function"?WeakMap:Map,je=0,Xe=null,De=null,Be=0,Ie=0,Ht=null,zi=!1,Ps=!1,ql=!1,yi=0,tt=0,Ni=0,fs=0,Gl=0,zt=0,qs=0,Br=null,At=null,Wl=!1,Un=0,Lu=0,jn=1/0,In=null,Ui=null,ct=0,ji=null,Gs=null,bi=0,$l=0,Xl=null,Au=null,Or=0,Yl=null;function Nt(){return(je&2)!==0&&Be!==0?Be&-Be:z.T!==null?eo():qo()}function Ru(){if(zt===0)if((Be&536870912)===0||ke){var e=Yi;Yi<<=1,(Yi&3932160)===0&&(Yi=262144),zt=e}else zt=536870912;return e=Ot.current,e!==null&&(e.flags|=32),zt}function Rt(e,t,i){(e===Xe&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Ws(e,0),Ii(e,Be,zt,!1)),er(e,i),((je&2)===0||e!==Xe)&&(e===Xe&&((je&2)===0&&(fs|=i),tt===4&&Ii(e,Be,zt,!1)),si(e))}function Du(e,t,i){if((je&6)!==0)throw Error(I(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Js(e,t),n=s?w_(e,t):Kl(e,t,!0),u=s;do{if(n===0){Ps&&!s&&Ii(e,t,0,!1);break}else{if(i=e.current.alternate,u&&!b_(i)){n=Kl(e,t,!1),u=!1;continue}if(n===2){if(u=t,e.errorRecoveryDisabledLanes&u)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var B=e;n=Br;var F=B.current.memoizedState.isDehydrated;if(F&&(Ws(B,x).flags|=256),x=Kl(B,x,!1),x!==2){if(ql&&!F){B.errorRecoveryDisabledLanes|=u,fs|=u,n=4;break e}u=At,At=n,u!==null&&(At===null?At=u:At.push.apply(At,u))}n=x}if(u=!1,n!==2)continue}}if(n===1){Ws(e,0),Ii(e,t,0,!0);break}e:{switch(s=e,u=n,u){case 0:case 1:throw Error(I(345));case 4:if((t&4194048)!==t)break;case 6:Ii(s,t,zt,!zi);break e;case 2:At=null;break;case 3:case 5:break;default:throw Error(I(329))}if((t&62914560)===t&&(n=Un+300-be(),10<n)){if(Ii(s,t,zt,!zi),Vr(s,0,!0)!==0)break e;bi=t,s.timeoutHandle=lf(Mu.bind(null,s,i,At,In,Wl,t,zt,fs,qs,zi,u,"Throttled",-0,0),n);break e}Mu(s,i,At,In,Wl,t,zt,fs,qs,zi,u,null,-0,0)}}break}while(!0);si(e)}function Mu(e,t,i,s,n,u,x,B,F,Q,le,ce,Z,se){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ai},Cu(t,u,ce);var ve=(u&62914560)===u?Un-be():(u&4194048)===u?Lu-be():0;if(ve=nv(ce,ve),ve!==null){bi=u,e.cancelPendingCommit=ve(Uu.bind(null,e,t,u,i,s,n,x,B,F,le,ce,null,Z,se)),Ii(e,u,x,!Q);return}}Uu(e,t,u,i,s,n,x,B,F)}function b_(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 n=i[s],u=n.getSnapshot;n=n.value;try{if(!Tt(u(),n))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 Ii(e,t,i,s){t&=~Gl,t&=~fs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var n=t;0<n;){var u=31-pt(n),x=1<<u;s[u]=-1,n&=~x}i!==0&&Io(e,i,t)}function Fn(){return(je&6)===0?(kr(0),!1):!0}function Vl(){if(De!==null){if(Ie===0)var e=De.return;else e=De,hi=ss=null,ul(e),Hs=null,gr=0,e=De;for(;e!==null;)lu(e.alternate,e),e=e.return;De=null}}function Ws(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,F_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),bi=0,Vl(),Xe=e,De=i=oi(e.current,null),Be=t,Ie=0,Ht=null,zi=!1,Ps=Js(e,t),ql=!1,qs=zt=Gl=fs=Ni=tt=0,At=Br=null,Wl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var n=31-pt(s),u=1<<n;t|=e[n],s&=~u}return yi=t,on(),i}function Tu(e,t){Ee=null,z.H=Er,t===ks||t===gn?(t=Xc(),Ie=3):t===Ja?(t=Xc(),Ie=4):Ie=t===Al?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ht=t,De===null&&(tt=1,Mn(e,Pt(t,e.current)))}function Bu(){var e=Ot.current;return e===null?!0:(Be&4194048)===Be?$t===null:(Be&62914560)===Be||(Be&536870912)!==0?e===$t:!1}function Ou(){var e=z.H;return z.H=Er,e===null?Er:e}function ku(){var e=z.A;return z.A=S_,e}function Pn(){tt=4,zi||(Be&4194048)!==Be&&Ot.current!==null||(Ps=!0),(Ni&134217727)===0&&(fs&134217727)===0||Xe===null||Ii(Xe,Be,zt,!1)}function Kl(e,t,i){var s=je;je|=2;var n=Ou(),u=ku();(Xe!==e||Be!==t)&&(In=null,Ws(e,t)),t=!1;var x=tt;e:do try{if(Ie!==0&&De!==null){var B=De,F=Ht;switch(Ie){case 8:Vl(),x=6;break e;case 3:case 2:case 9:case 6:Ot.current===null&&(t=!0);var Q=Ie;if(Ie=0,Ht=null,$s(e,B,F,Q),i&&Ps){x=0;break e}break;default:Q=Ie,Ie=0,Ht=null,$s(e,B,F,Q)}}C_(),x=tt;break}catch(le){Tu(e,le)}while(!0);return t&&e.shellSuspendCounter++,hi=ss=null,je=s,z.H=n,z.A=u,De===null&&(Xe=null,Be=0,on()),x}function C_(){for(;De!==null;)Hu(De)}function w_(e,t){var i=je;je|=2;var s=Ou(),n=ku();Xe!==e||Be!==t?(In=null,jn=be()+500,Ws(e,t)):Ps=Js(e,t);e:do try{if(Ie!==0&&De!==null){t=De;var u=Ht;t:switch(Ie){case 1:Ie=0,Ht=null,$s(e,t,u,1);break;case 2:case 9:if(Wc(u)){Ie=0,Ht=null,zu(t);break}t=function(){Ie!==2&&Ie!==9||Xe!==e||(Ie=7),si(e)},u.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Wc(u)?(Ie=0,Ht=null,zu(t)):(Ie=0,Ht=null,$s(e,t,u,7));break;case 5:var x=null;switch(De.tag){case 26:x=De.memoizedState;case 5:case 27:var B=De;if(x?Cf(x):B.stateNode.complete){Ie=0,Ht=null;var F=B.sibling;if(F!==null)De=F;else{var Q=B.return;Q!==null?(De=Q,qn(Q)):De=null}break t}}Ie=0,Ht=null,$s(e,t,u,5);break;case 6:Ie=0,Ht=null,$s(e,t,u,6);break;case 8:Vl(),tt=6;break e;default:throw Error(I(462))}}E_();break}catch(le){Tu(e,le)}while(!0);return hi=ss=null,z.H=s,z.A=n,je=i,De!==null?0:(Xe=null,Be=0,on(),tt)}function E_(){for(;De!==null&&!Re();)Hu(De)}function Hu(e){var t=nu(e.alternate,e,yi);e.memoizedProps=e.pendingProps,t===null?qn(e):De=t}function zu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Jh(i,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=Jh(i,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:ul(t);default:lu(i,t),t=De=kc(t,yi),t=nu(i,t,yi)}e.memoizedProps=e.pendingProps,t===null?qn(e):De=t}function $s(e,t,i,s){hi=ss=null,ul(t),Hs=null,gr=0;var n=t.return;try{if(f_(e,n,t,i,Be)){tt=1,Mn(e,Pt(i,e.current)),De=null;return}}catch(u){if(n!==null)throw De=n,u;tt=1,Mn(e,Pt(i,e.current)),De=null;return}t.flags&32768?(ke||s===1?e=!0:Ps||(Be&536870912)!==0?e=!1:(zi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ot.current,s!==null&&s.tag===13&&(s.flags|=16384))),Nu(t,e)):qn(t)}function qn(e){var t=e;do{if((t.flags&32768)!==0){Nu(t,zi);return}e=t.return;var i=v_(t.alternate,t,yi);if(i!==null){De=i;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);tt===0&&(tt=5)}function Nu(e,t){do{var i=g_(e.alternate,e);if(i!==null){i.flags&=32767,De=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=i}while(e!==null);tt=6,De=null}function Uu(e,t,i,s,n,u,x,B,F){e.cancelPendingCommit=null;do Gn();while(ct!==0);if((je&6)!==0)throw Error(I(327));if(t!==null){if(t===e.current)throw Error(I(177));if(u=t.lanes|t.childLanes,u|=Ua,sd(e,i,u,x,B,F),e===Xe&&(De=Xe=null,Be=0),Gs=t,ji=e,bi=i,$l=u,Xl=n,Au=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,R_(ot,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null,n=U.p,U.p=2,x=je,je|=4;try{m_(e,t,i)}finally{je=x,U.p=n,z.T=s}}ct=1,ju(),Iu(),Fu()}}function ju(){if(ct===1){ct=0;var e=ji,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=z.T,z.T=null;var s=U.p;U.p=2;var n=je;je|=4;try{Su(t,e);var u=oo,x=xc(e.containerInfo),B=u.focusedElem,F=u.selectionRange;if(x!==B&&B&&B.ownerDocument&&Ec(B.ownerDocument.documentElement,B)){if(F!==null&&Oa(B)){var Q=F.start,le=F.end;if(le===void 0&&(le=Q),"selectionStart"in B)B.selectionStart=Q,B.selectionEnd=Math.min(le,B.value.length);else{var ce=B.ownerDocument||document,Z=ce&&ce.defaultView||window;if(Z.getSelection){var se=Z.getSelection(),ve=B.textContent.length,ye=Math.min(F.start,ve),$e=F.end===void 0?ye:Math.min(F.end,ve);!se.extend&&ye>$e&&(x=$e,$e=ye,ye=x);var Y=wc(B,ye),G=wc(B,$e);if(Y&&G&&(se.rangeCount!==1||se.anchorNode!==Y.node||se.anchorOffset!==Y.offset||se.focusNode!==G.node||se.focusOffset!==G.offset)){var K=ce.createRange();K.setStart(Y.node,Y.offset),se.removeAllRanges(),ye>$e?(se.addRange(K),se.extend(G.node,G.offset)):(K.setEnd(G.node,G.offset),se.addRange(K))}}}}for(ce=[],se=B;se=se.parentNode;)se.nodeType===1&&ce.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<ce.length;B++){var oe=ce[B];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ia=!!lo,oo=lo=null}finally{je=n,U.p=s,z.T=i}}e.current=t,ct=2}}function Iu(){if(ct===2){ct=0;var e=ji,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=z.T,z.T=null;var s=U.p;U.p=2;var n=je;je|=4;try{_u(e,t.alternate,t)}finally{je=n,U.p=s,z.T=i}}ct=3}}function Fu(){if(ct===4||ct===3){ct=0,_e();var e=ji,t=Gs,i=bi,s=Au;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,Gs=ji=null,Pu(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Ui=null),_a(i),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Vt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=z.T,n=U.p,U.p=2,z.T=null;try{for(var u=e.onRecoverableError,x=0;x<s.length;x++){var B=s[x];u(B.value,{componentStack:B.stack})}}finally{z.T=t,U.p=n}}(bi&3)!==0&&Gn(),si(e),n=e.pendingLanes,(i&261930)!==0&&(n&42)!==0?e===Yl?Or++:(Or=0,Yl=e):Or=0,kr(0)}}function Pu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_r(t)))}function Gn(){return ju(),Iu(),Fu(),qu()}function qu(){if(ct!==5)return!1;var e=ji,t=$l;$l=0;var i=_a(bi),s=z.T,n=U.p;try{U.p=32>i?32:i,z.T=null,i=Xl,Xl=null;var u=ji,x=bi;if(ct=0,Gs=ji=null,bi=0,(je&6)!==0)throw Error(I(331));var B=je;if(je|=4,Eu(u.current),bu(u,u.current,x,i),je=B,kr(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Vt,u)}catch{}return!0}finally{U.p=n,z.T=s,Pu(e,t)}}function Gu(e,t,i){t=Pt(i,t),t=Ll(e.stateNode,t,2),e=Bi(e,t,2),e!==null&&(er(e,2),si(e))}function Fe(e,t,i){if(e.tag===3)Gu(e,e,i);else for(;t!==null;){if(t.tag===3){Gu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ui===null||!Ui.has(s))){e=Pt(i,e),i=Wh(2),s=Bi(t,i,2),s!==null&&($h(i,s,t,e),er(s,2),si(s));break}}t=t.return}}function Ql(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new y_;var n=new Set;s.set(t,n)}else n=s.get(t),n===void 0&&(n=new Set,s.set(t,n));n.has(i)||(ql=!0,n.add(i),e=x_.bind(null,e,t,i),t.then(e,e))}function x_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Xe===e&&(Be&i)===i&&(tt===4||tt===3&&(Be&62914560)===Be&&300>be()-Un?(je&2)===0&&Ws(e,0):Gl|=i,qs===Be&&(qs=0)),si(e)}function Wu(e,t){t===0&&(t=jo()),e=es(e,t),e!==null&&(er(e,t),si(e))}function L_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Wu(e,i)}function A_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,n=e.memoizedState;n!==null&&(i=n.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(I(314))}s!==null&&s.delete(t),Wu(e,i)}function R_(e,t){return Te(e,t)}var Wn=null,Xs=null,Zl=!1,$n=!1,Jl=!1,Fi=0;function si(e){e!==Xs&&e.next===null&&(Xs===null?Wn=Xs=e:Xs=Xs.next=e),$n=!0,Zl||(Zl=!0,M_())}function kr(e,t){if(!Jl&&$n){Jl=!0;do for(var i=!1,s=Wn;s!==null;){if(e!==0){var n=s.pendingLanes;if(n===0)var u=0;else{var x=s.suspendedLanes,B=s.pingedLanes;u=(1<<31-pt(42|e)+1)-1,u&=n&~(x&~B),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(i=!0,Vu(s,u))}else u=Be,u=Vr(s,s===Xe?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||Js(s,u)||(i=!0,Vu(s,u));s=s.next}while(i);Jl=!1}}function D_(){$u()}function $u(){$n=Zl=!1;var e=0;Fi!==0&&I_()&&(e=Fi);for(var t=be(),i=null,s=Wn;s!==null;){var n=s.next,u=Xu(s,t);u===0?(s.next=null,i===null?Wn=n:i.next=n,n===null&&(Xs=i)):(i=s,(e!==0||(u&3)!==0)&&($n=!0)),s=n}ct!==0&&ct!==5||kr(e),Fi!==0&&(Fi=0)}function Xu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var x=31-pt(u),B=1<<x,F=n[x];F===-1?((B&i)===0||(B&s)!==0)&&(n[x]=id(B,t)):F<=t&&(e.expiredLanes|=B),u&=~B}if(t=Xe,i=Be,i=Vr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Le(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Js(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Le(s),_a(i)){case 2:case 8:i=Ut;break;case 32:i=ot;break;case 268435456:i=Je;break;default:i=ot}return s=Yu.bind(null,e),i=Te(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Le(s),e.callbackPriority=2,e.callbackNode=null,2}function Yu(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=Be;return s=Vr(e,e===Xe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Du(e,s,t),Xu(e,be()),e.callbackNode!=null&&e.callbackNode===i?Yu.bind(null,e):null)}function Vu(e,t){if(Gn())return null;Du(e,t,!0)}function M_(){P_(function(){(je&6)!==0?Te(Pe,D_):$u()})}function eo(){if(Fi===0){var e=Bs;e===0&&(e=wi,wi<<=1,(wi&261888)===0&&(wi=256)),Fi=e}return Fi}function Ku(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Jr(""+e)}function Qu(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,n){if(t==="submit"&&i&&i.stateNode===n){var u=Ku((n[Ct]||null).action),x=s.submitter;x&&(t=(t=x[Ct]||null)?Ku(t.formAction):x.getAttribute("formAction"),t!==null&&(u=t,x=null));var B=new rn("action","action",null,s,n);e.push({event:B,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Fi!==0){var F=x?Qu(n,x):new FormData(n);yl(i,{pending:!0,data:F,method:n.method,action:u},null,F)}}else typeof u=="function"&&(B.preventDefault(),F=x?Qu(n,x):new FormData(n),yl(i,{pending:!0,data:F,method:n.method,action:u},u,F))},currentTarget:n}]})}}for(var to=0;to<Na.length;to++){var io=Na[to],B_=io.toLowerCase(),O_=io[0].toUpperCase()+io.slice(1);Kt(B_,"on"+O_)}Kt(Rc,"onAnimationEnd"),Kt(Dc,"onAnimationIteration"),Kt(Mc,"onAnimationStart"),Kt("dblclick","onDoubleClick"),Kt("focusin","onFocus"),Kt("focusout","onBlur"),Kt(Vd,"onTransitionRun"),Kt(Kd,"onTransitionStart"),Kt(Qd,"onTransitionCancel"),Kt(Tc,"onTransitionEnd"),ps("onMouseEnter",["mouseout","mouseover"]),ps("onMouseLeave",["mouseout","mouseover"]),ps("onPointerEnter",["pointerout","pointerover"]),ps("onPointerLeave",["pointerout","pointerover"]),Ki("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ki("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ki("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ki("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ki("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hr="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(" "),k_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hr));function Zu(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],n=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var x=s.length-1;0<=x;x--){var B=s[x],F=B.instance,Q=B.currentTarget;if(B=B.listener,F!==u&&n.isPropagationStopped())break e;u=B,n.currentTarget=Q;try{u(n)}catch(le){ln(le)}n.currentTarget=null,u=F}else for(x=0;x<s.length;x++){if(B=s[x],F=B.instance,Q=B.currentTarget,B=B.listener,F!==u&&n.isPropagationStopped())break e;u=B,n.currentTarget=Q;try{u(n)}catch(le){ln(le)}n.currentTarget=null,u=F}}}}function Me(e,t){var i=t[va];i===void 0&&(i=t[va]=new Set);var s=e+"__bubble";i.has(s)||(Ju(t,e,2,!1),i.add(s))}function so(e,t,i){var s=0;t&&(s|=4),Ju(i,e,s,t)}var Xn="_reactListening"+Math.random().toString(36).slice(2);function ro(e){if(!e[Xn]){e[Xn]=!0,$o.forEach(function(i){i!=="selectionchange"&&(k_.has(i)||so(i,!1,e),so(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xn]||(t[Xn]=!0,so("selectionchange",!1,t))}}function Ju(e,t,i,s){switch(Df(t)){case 2:var n=ov;break;case 8:n=cv;break;default:n=yo}i=n.bind(null,t,i,e),n=void 0,!Ea||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),s?n!==void 0?e.addEventListener(t,i,{capture:!0,passive:n}):e.addEventListener(t,i,!0):n!==void 0?e.addEventListener(t,i,{passive:n}):e.addEventListener(t,i,!1)}function no(e,t,i,s,n){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var x=s.tag;if(x===3||x===4){var B=s.stateNode.containerInfo;if(B===n)break;if(x===4)for(x=s.return;x!==null;){var F=x.tag;if((F===3||F===4)&&x.stateNode.containerInfo===n)return;x=x.return}for(;B!==null;){if(x=vs(B),x===null)return;if(F=x.tag,F===5||F===6||F===26||F===27){s=u=x;continue e}B=B.parentNode}}s=s.return}rc(function(){var Q=u,le=Ca(i),ce=[];e:{var Z=Bc.get(e);if(Z!==void 0){var se=rn,ve=e;switch(e){case"keypress":if(tn(i)===0)break e;case"keydown":case"keyup":se=Ad;break;case"focusin":ve="focus",se=Ra;break;case"focusout":ve="blur",se=Ra;break;case"beforeblur":case"afterblur":se=Ra;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":se=lc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=vd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=Md;break;case Rc:case Dc:case Mc:se=pd;break;case Tc:se=Bd;break;case"scroll":case"scrollend":se=dd;break;case"wheel":se=kd;break;case"copy":case"cut":case"paste":se=yd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=cc;break;case"toggle":case"beforetoggle":se=zd}var ye=(t&4)!==0,$e=!ye&&(e==="scroll"||e==="scrollend"),Y=ye?Z!==null?Z+"Capture":null:Z;ye=[];for(var G=Q,K;G!==null;){var oe=G;if(K=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||K===null||Y===null||(oe=sr(G,Y),oe!=null&&ye.push(zr(G,oe,K))),$e)break;G=G.return}0<ye.length&&(Z=new se(Z,ve,null,i,le),ce.push({event:Z,listeners:ye}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",Z&&i!==ba&&(ve=i.relatedTarget||i.fromElement)&&(vs(ve)||ve[_s]))break e;if((se||Z)&&(Z=le.window===le?le:(Z=le.ownerDocument)?Z.defaultView||Z.parentWindow:window,se?(ve=i.relatedTarget||i.toElement,se=Q,ve=ve?vs(ve):null,ve!==null&&($e=J(ve),ye=ve.tag,ve!==$e||ye!==5&&ye!==27&&ye!==6)&&(ve=null)):(se=null,ve=Q),se!==ve)){if(ye=lc,oe="onMouseLeave",Y="onMouseEnter",G="mouse",(e==="pointerout"||e==="pointerover")&&(ye=cc,oe="onPointerLeave",Y="onPointerEnter",G="pointer"),$e=se==null?Z:ir(se),K=ve==null?Z:ir(ve),Z=new ye(oe,G+"leave",se,i,le),Z.target=$e,Z.relatedTarget=K,oe=null,vs(le)===Q&&(ye=new ye(Y,G+"enter",ve,i,le),ye.target=K,ye.relatedTarget=$e,oe=ye),$e=oe,se&&ve)t:{for(ye=H_,Y=se,G=ve,K=0,oe=Y;oe;oe=ye(oe))K++;oe=0;for(var pe=G;pe;pe=ye(pe))oe++;for(;0<K-oe;)Y=ye(Y),K--;for(;0<oe-K;)G=ye(G),oe--;for(;K--;){if(Y===G||G!==null&&Y===G.alternate){ye=Y;break t}Y=ye(Y),G=ye(G)}ye=null}else ye=null;se!==null&&ef(ce,Z,se,ye,!1),ve!==null&&$e!==null&&ef(ce,$e,ve,ye,!0)}}e:{if(Z=Q?ir(Q):window,se=Z.nodeName&&Z.nodeName.toLowerCase(),se==="select"||se==="input"&&Z.type==="file")var Ne=mc;else if(vc(Z))if(pc)Ne=$d;else{Ne=Gd;var ge=qd}else se=Z.nodeName,!se||se.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?Q&&ya(Q.elementType)&&(Ne=mc):Ne=Wd;if(Ne&&(Ne=Ne(e,Q))){gc(ce,Ne,i,le);break e}ge&&ge(e,Z,Q),e==="focusout"&&Q&&Z.type==="number"&&Q.memoizedProps.value!=null&&Sa(Z,"number",Z.value)}switch(ge=Q?ir(Q):window,e){case"focusin":(vc(ge)||ge.contentEditable==="true")&&(Es=ge,ka=Q,ur=null);break;case"focusout":ur=ka=Es=null;break;case"mousedown":Ha=!0;break;case"contextmenu":case"mouseup":case"dragend":Ha=!1,Lc(ce,i,le);break;case"selectionchange":if(Yd)break;case"keydown":case"keyup":Lc(ce,i,le)}var xe;if(Ma)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else ws?dc(e,i)&&(Oe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Oe="onCompositionStart");Oe&&(hc&&i.locale!=="ko"&&(ws||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&ws&&(xe=nc()):(xi=le,xa="value"in xi?xi.value:xi.textContent,ws=!0)),ge=Yn(Q,Oe),0<ge.length&&(Oe=new oc(Oe,e,null,i,le),ce.push({event:Oe,listeners:ge}),xe?Oe.data=xe:(xe=_c(i),xe!==null&&(Oe.data=xe)))),(xe=Ud?jd(e,i):Id(e,i))&&(Oe=Yn(Q,"onBeforeInput"),0<Oe.length&&(ge=new oc("onBeforeInput","beforeinput",null,i,le),ce.push({event:ge,listeners:Oe}),ge.data=xe)),T_(ce,e,Q,i,le)}Zu(ce,t)})}function zr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Yn(e,t){for(var i=t+"Capture",s=[];e!==null;){var n=e,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=sr(e,i),n!=null&&s.unshift(zr(e,n,u)),n=sr(e,t),n!=null&&s.push(zr(e,n,u))),e.tag===3)return s;e=e.return}return[]}function H_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ef(e,t,i,s,n){for(var u=t._reactName,x=[];i!==null&&i!==s;){var B=i,F=B.alternate,Q=B.stateNode;if(B=B.tag,F!==null&&F===s)break;B!==5&&B!==26&&B!==27||Q===null||(F=Q,n?(Q=sr(i,u),Q!=null&&x.unshift(zr(i,Q,F))):n||(Q=sr(i,u),Q!=null&&x.push(zr(i,Q,F)))),i=i.return}x.length!==0&&e.push({event:t,listeners:x})}var z_=/\r\n?/g,N_=/\u0000|\uFFFD/g;function tf(e){return(typeof e=="string"?e:""+e).replace(z_,`
49
+ `).replace(N_,"")}function sf(e,t){return t=tf(t),tf(e)===t}function We(e,t,i,s,n,u){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ys(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ys(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":ic(e,s,u);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=Jr(""+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 u=="function"&&(i==="formAction"?(t!=="input"&&We(e,t,"name",n.name,n,null),We(e,t,"formEncType",n.formEncType,n,null),We(e,t,"formMethod",n.formMethod,n,null),We(e,t,"formTarget",n.formTarget,n,null)):(We(e,t,"encType",n.encType,n,null),We(e,t,"method",n.method,n,null),We(e,t,"target",n.target,n,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Jr(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ai);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(I(61));if(i=s.__html,i!=null){if(n.children!=null)throw Error(I(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=Jr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Me("beforetoggle",e),Me("toggle",e),Kr(e,"popover",s);break;case"xlinkActuate":ni(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ni(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ni(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ni(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ni(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ni(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ni(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ni(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ni(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Kr(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=ud.get(i)||i,Kr(e,i,s))}}function ao(e,t,i,s,n,u){switch(i){case"style":ic(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(I(61));if(i=s.__html,i!=null){if(n.children!=null)throw Error(I(60));e.innerHTML=i}}break;case"children":typeof s=="string"?ys(e,s):(typeof s=="number"||typeof s=="bigint")&&ys(e,""+s);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ai);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(n=i.endsWith("Capture"),t=i.slice(2,n?i.length-7:void 0),u=e[Ct]||null,u=u!=null?u[i]:null,typeof u=="function"&&e.removeEventListener(t,u,n),typeof s=="function")){typeof u!="function"&&u!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,n);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Kr(e,i,s)}}}function mt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var s=!1,n=!1,u;for(u in i)if(i.hasOwnProperty(u)){var x=i[u];if(x!=null)switch(u){case"src":s=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:We(e,t,u,x,i,null)}}n&&We(e,t,"srcSet",i.srcSet,i,null),s&&We(e,t,"src",i.src,i,null);return;case"input":Me("invalid",e);var B=u=x=n=null,F=null,Q=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":n=le;break;case"type":x=le;break;case"checked":F=le;break;case"defaultChecked":Q=le;break;case"value":u=le;break;case"defaultValue":B=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(I(137,t));break;default:We(e,t,s,le,i,null)}}Zo(e,u,B,F,Q,x,n,!1);return;case"select":Me("invalid",e),s=x=u=null;for(n in i)if(i.hasOwnProperty(n)&&(B=i[n],B!=null))switch(n){case"value":u=B;break;case"defaultValue":x=B;break;case"multiple":s=B;default:We(e,t,n,B,i,null)}t=u,i=x,e.multiple=!!s,t!=null?Ss(e,!!s,t,!1):i!=null&&Ss(e,!!s,i,!0);return;case"textarea":Me("invalid",e),u=n=s=null;for(x in i)if(i.hasOwnProperty(x)&&(B=i[x],B!=null))switch(x){case"value":s=B;break;case"defaultValue":n=B;break;case"children":u=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(I(91));break;default:We(e,t,x,B,i,null)}ec(e,s,n,u);return;case"option":for(F in i)if(i.hasOwnProperty(F)&&(s=i[F],s!=null))switch(F){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:We(e,t,F,s,i,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(s=0;s<Hr.length;s++)Me(Hr[s],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in i)if(i.hasOwnProperty(Q)&&(s=i[Q],s!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:We(e,t,Q,s,i,null)}return;default:if(ya(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&ao(e,t,le,s,i,void 0));return}}for(B in i)i.hasOwnProperty(B)&&(s=i[B],s!=null&&We(e,t,B,s,i,null))}function U_(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 n=null,u=null,x=null,B=null,F=null,Q=null,le=null;for(se in i){var ce=i[se];if(i.hasOwnProperty(se)&&ce!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":F=ce;default:s.hasOwnProperty(se)||We(e,t,se,null,s,ce)}}for(var Z in s){var se=s[Z];if(ce=i[Z],s.hasOwnProperty(Z)&&(se!=null||ce!=null))switch(Z){case"type":u=se;break;case"name":n=se;break;case"checked":Q=se;break;case"defaultChecked":le=se;break;case"value":x=se;break;case"defaultValue":B=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(I(137,t));break;default:se!==ce&&We(e,t,Z,se,s,ce)}}pa(e,x,B,F,Q,le,u,n);return;case"select":se=x=B=Z=null;for(u in i)if(F=i[u],i.hasOwnProperty(u)&&F!=null)switch(u){case"value":break;case"multiple":se=F;default:s.hasOwnProperty(u)||We(e,t,u,null,s,F)}for(n in s)if(u=s[n],F=i[n],s.hasOwnProperty(n)&&(u!=null||F!=null))switch(n){case"value":Z=u;break;case"defaultValue":B=u;break;case"multiple":x=u;default:u!==F&&We(e,t,n,u,s,F)}t=B,i=x,s=se,Z!=null?Ss(e,!!i,Z,!1):!!s!=!!i&&(t!=null?Ss(e,!!i,t,!0):Ss(e,!!i,i?[]:"",!1));return;case"textarea":se=Z=null;for(B in i)if(n=i[B],i.hasOwnProperty(B)&&n!=null&&!s.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:We(e,t,B,null,s,n)}for(x in s)if(n=s[x],u=i[x],s.hasOwnProperty(x)&&(n!=null||u!=null))switch(x){case"value":Z=n;break;case"defaultValue":se=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(I(91));break;default:n!==u&&We(e,t,x,n,s,u)}Jo(e,Z,se);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:We(e,t,ve,null,s,Z)}for(F in s)if(Z=s[F],se=i[F],s.hasOwnProperty(F)&&Z!==se&&(Z!=null||se!=null))switch(F){case"selected":e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:We(e,t,F,Z,s,se)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ye in i)Z=i[ye],i.hasOwnProperty(ye)&&Z!=null&&!s.hasOwnProperty(ye)&&We(e,t,ye,null,s,Z);for(Q in s)if(Z=s[Q],se=i[Q],s.hasOwnProperty(Q)&&Z!==se&&(Z!=null||se!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(I(137,t));break;default:We(e,t,Q,Z,s,se)}return;default:if(ya(t)){for(var $e in i)Z=i[$e],i.hasOwnProperty($e)&&Z!==void 0&&!s.hasOwnProperty($e)&&ao(e,t,$e,void 0,s,Z);for(le in s)Z=s[le],se=i[le],!s.hasOwnProperty(le)||Z===se||Z===void 0&&se===void 0||ao(e,t,le,Z,s,se);return}}for(var Y in i)Z=i[Y],i.hasOwnProperty(Y)&&Z!=null&&!s.hasOwnProperty(Y)&&We(e,t,Y,null,s,Z);for(ce in s)Z=s[ce],se=i[ce],!s.hasOwnProperty(ce)||Z===se||Z==null&&se==null||We(e,t,ce,Z,s,se)}function rf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function j_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var n=i[s],u=n.transferSize,x=n.initiatorType,B=n.duration;if(u&&B&&rf(x)){for(x=0,B=n.responseEnd,s+=1;s<i.length;s++){var F=i[s],Q=F.startTime;if(Q>B)break;var le=F.transferSize,ce=F.initiatorType;le&&rf(ce)&&(F=F.responseEnd,x+=le*(F<B?1:(B-Q)/(F-Q)))}if(--s,t+=8*(u+x)/(n.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 lo=null,oo=null;function Vn(e){return e.nodeType===9?e:e.ownerDocument}function nf(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 af(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 co(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 ho=null;function I_(){var e=window.event;return e&&e.type==="popstate"?e===ho?!1:(ho=e,!0):(ho=null,!1)}var lf=typeof setTimeout=="function"?setTimeout:void 0,F_=typeof clearTimeout=="function"?clearTimeout:void 0,of=typeof Promise=="function"?Promise:void 0,P_=typeof queueMicrotask=="function"?queueMicrotask:typeof of<"u"?function(e){return of.resolve(null).then(e).catch(q_)}:lf;function q_(e){setTimeout(function(){throw e})}function Pi(e){return e==="head"}function cf(e,t){var i=t,s=0;do{var n=i.nextSibling;if(e.removeChild(i),n&&n.nodeType===8)if(i=n.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(n),Qs(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Nr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Nr(i);for(var u=i.firstChild;u;){var x=u.nextSibling,B=u.nodeName;u[tr]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&u.rel.toLowerCase()==="stylesheet"||i.removeChild(u),u=x}}else i==="body"&&Nr(e.ownerDocument.body);i=n}while(i);Qs(t)}function hf(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 uo(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":uo(i),ga(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function G_(e,t,i,s){for(;e.nodeType===1;){var n=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[tr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Xt(e.nextSibling),e===null)break}return null}function W_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Xt(e.nextSibling),e===null))return null;return e}function uf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xt(e.nextSibling),e===null))return null;return e}function fo(e){return e.data==="$?"||e.data==="$~"}function _o(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $_(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 Xt(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 vo=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Xt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function df(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 _f(e,t,i){switch(t=Vn(i),e){case"html":if(e=t.documentElement,!e)throw Error(I(452));return e;case"head":if(e=t.head,!e)throw Error(I(453));return e;case"body":if(e=t.body,!e)throw Error(I(454));return e;default:throw Error(I(451))}}function Nr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ga(e)}var Yt=new Map,vf=new Set;function Kn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ci=U.d;U.d={f:X_,r:Y_,D:V_,C:K_,L:Q_,m:Z_,X:ev,S:J_,M:tv};function X_(){var e=Ci.f(),t=Fn();return e||t}function Y_(e){var t=gs(e);t!==null&&t.tag===5&&t.type==="form"?Th(t):Ci.r(e)}var Ys=typeof document>"u"?null:document;function gf(e,t,i){var s=Ys;if(s&&typeof t=="string"&&t){var n=It(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof i=="string"&&(n+='[crossorigin="'+i+'"]'),vf.has(n)||(vf.add(n),e={rel:e,crossOrigin:i,href:t},s.querySelector(n)===null&&(t=s.createElement("link"),mt(t,"link",e),ut(t),s.head.appendChild(t)))}}function V_(e){Ci.D(e),gf("dns-prefetch",e,null)}function K_(e,t){Ci.C(e,t),gf("preconnect",e,t)}function Q_(e,t,i){Ci.L(e,t,i);var s=Ys;if(s&&e&&t){var n='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&i&&i.imageSrcSet?(n+='[imagesrcset="'+It(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(n+='[imagesizes="'+It(i.imageSizes)+'"]')):n+='[href="'+It(e)+'"]';var u=n;switch(t){case"style":u=Vs(e);break;case"script":u=Ks(e)}Yt.has(u)||(e=o({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Yt.set(u,e),s.querySelector(n)!==null||t==="style"&&s.querySelector(Ur(u))||t==="script"&&s.querySelector(jr(u))||(t=s.createElement("link"),mt(t,"link",e),ut(t),s.head.appendChild(t)))}}function Z_(e,t){Ci.m(e,t);var i=Ys;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+It(s)+'"][href="'+It(e)+'"]',u=n;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ks(e)}if(!Yt.has(u)&&(e=o({rel:"modulepreload",href:e},t),Yt.set(u,e),i.querySelector(n)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(jr(u)))return}s=i.createElement("link"),mt(s,"link",e),ut(s),i.head.appendChild(s)}}}function J_(e,t,i){Ci.S(e,t,i);var s=Ys;if(s&&e){var n=ms(s).hoistableStyles,u=Vs(e);t=t||"default";var x=n.get(u);if(!x){var B={loading:0,preload:null};if(x=s.querySelector(Ur(u)))B.loading=5;else{e=o({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Yt.get(u))&&go(e,i);var F=x=s.createElement("link");ut(F),mt(F,"link",e),F._p=new Promise(function(Q,le){F.onload=Q,F.onerror=le}),F.addEventListener("load",function(){B.loading|=1}),F.addEventListener("error",function(){B.loading|=2}),B.loading|=4,Qn(x,t,s)}x={type:"stylesheet",instance:x,count:1,state:B},n.set(u,x)}}}function ev(e,t){Ci.X(e,t);var i=Ys;if(i&&e){var s=ms(i).hoistableScripts,n=Ks(e),u=s.get(n);u||(u=i.querySelector(jr(n)),u||(e=o({src:e,async:!0},t),(t=Yt.get(n))&&mo(e,t),u=i.createElement("script"),ut(u),mt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(n,u))}}function tv(e,t){Ci.M(e,t);var i=Ys;if(i&&e){var s=ms(i).hoistableScripts,n=Ks(e),u=s.get(n);u||(u=i.querySelector(jr(n)),u||(e=o({src:e,async:!0,type:"module"},t),(t=Yt.get(n))&&mo(e,t),u=i.createElement("script"),ut(u),mt(u,"link",e),i.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(n,u))}}function mf(e,t,i,s){var n=(n=ue.current)?Kn(n):null;if(!n)throw Error(I(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Vs(i.href),i=ms(n).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=Vs(i.href);var u=ms(n).hoistableStyles,x=u.get(e);if(x||(n=n.ownerDocument||n,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,x),(u=n.querySelector(Ur(e)))&&!u._p&&(x.instance=u,x.state.loading=5),Yt.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},Yt.set(e,i),u||iv(n,e,i,x.state))),t&&s===null)throw Error(I(528,""));return x}if(t&&s!==null)throw Error(I(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ks(i),i=ms(n).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(I(444,e))}}function Vs(e){return'href="'+It(e)+'"'}function Ur(e){return'link[rel="stylesheet"]['+e+"]"}function pf(e){return o({},e,{"data-precedence":e.precedence,precedence:null})}function iv(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}),mt(t,"link",i),ut(t),e.head.appendChild(t))}function Ks(e){return'[src="'+It(e)+'"]'}function jr(e){return"script[async]"+e}function Sf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+It(i.href)+'"]');if(s)return t.instance=s,ut(s),s;var n=o({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ut(s),mt(s,"style",n),Qn(s,i.precedence,e),t.instance=s;case"stylesheet":n=Vs(i.href);var u=e.querySelector(Ur(n));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;s=pf(i),(n=Yt.get(n))&&go(s,n),u=(e.ownerDocument||e).createElement("link"),ut(u);var x=u;return x._p=new Promise(function(B,F){x.onload=B,x.onerror=F}),mt(u,"link",s),t.state.loading|=4,Qn(u,i.precedence,e),t.instance=u;case"script":return u=Ks(i.src),(n=e.querySelector(jr(u)))?(t.instance=n,ut(n),n):(s=i,(n=Yt.get(u))&&(s=o({},i),mo(s,n)),e=e.ownerDocument||e,n=e.createElement("script"),ut(n),mt(n,"link",s),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(I(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]'),n=s.length?s[s.length-1]:null,u=n,x=0;x<s.length;x++){var B=s[x];if(B.dataset.precedence===t)u=B;else if(u!==n)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function mo(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 yf(e,t,i){if(Zn===null){var s=new Map,n=Zn=new Map;n.set(i,s)}else n=Zn,s=n.get(i),s||(s=new Map,n.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),n=0;n<i.length;n++){var u=i[n];if(!(u[tr]||u[dt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var x=u.getAttribute(t)||"";x=e+x;var B=s.get(x);B?B.push(u):s.set(x,[u])}}return s}function bf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function sv(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 Cf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function rv(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 n=Vs(s.href),u=t.querySelector(Ur(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jn.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=u,ut(u);return}u=t.ownerDocument||t,s=pf(s),(n=Yt.get(n))&&go(s,n),u=u.createElement("link"),ut(u);var x=u;x._p=new Promise(function(B,F){x.onload=B,x.onerror=F}),mt(u,"link",s),i.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Jn.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var po=0;function nv(e,t){return e.stylesheets&&e.count===0&&ta(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ta(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&po===0&&(po=62500*j_());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ta(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>po?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(n)}}:null}function Jn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ta(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ea=null;function ta(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ea=new Map,t.forEach(av,e),ea=null,Jn.call(e))}function av(e,t){if(!(t.state.loading&4)){var i=ea.get(e);if(i)var s=i.get(null);else{i=new Map,ea.set(e,i);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var x=n[u];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),s=x)}s&&i.set(null,s)}n=t.instance,x=n.getAttribute("data-precedence"),u=i.get(x)||s,u===s&&i.set(null,n),i.set(x,n),this.count++,s=Jn.bind(this),n.addEventListener("load",s),n.addEventListener("error",s),u?u.parentNode.insertBefore(n,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Ir={$$typeof:c,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function lv(e,t,i,s,n,u,x,B,F){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=fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.hiddenUpdates=fa(null),this.identifierPrefix=s,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function wf(e,t,i,s,n,u,x,B,F,Q,le,ce){return e=new lv(e,t,i,x,F,Q,le,ce,B),t=1,u===!0&&(t|=24),u=Bt(3,null,null,t),e.current=u,u.stateNode=e,t=Ka(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:i,cache:t},el(u),e}function Ef(e){return e?(e=As,e):As}function xf(e,t,i,s,n,u){n=Ef(n),s.context===null?s.context=n:s.pendingContext=n,s=Ti(t),s.payload={element:i},u=u===void 0?null:u,u!==null&&(s.callback=u),i=Bi(e,s,t),i!==null&&(Rt(i,e,t),pr(i,e,t))}function Lf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function So(e,t){Lf(e,t),(e=e.alternate)&&Lf(e,t)}function Af(e){if(e.tag===13||e.tag===31){var t=es(e,67108864);t!==null&&Rt(t,e,67108864),So(e,67108864)}}function Rf(e){if(e.tag===13||e.tag===31){var t=Nt();t=da(t);var i=es(e,t);i!==null&&Rt(i,e,t),So(e,t)}}var ia=!0;function ov(e,t,i,s){var n=z.T;z.T=null;var u=U.p;try{U.p=2,yo(e,t,i,s)}finally{U.p=u,z.T=n}}function cv(e,t,i,s){var n=z.T;z.T=null;var u=U.p;try{U.p=8,yo(e,t,i,s)}finally{U.p=u,z.T=n}}function yo(e,t,i,s){if(ia){var n=bo(s);if(n===null)no(e,t,s,sa,i),Mf(e,s);else if(uv(n,e,t,i,s))s.stopPropagation();else if(Mf(e,s),t&4&&-1<hv.indexOf(e)){for(;n!==null;){var u=gs(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var x=ri(u.pendingLanes);if(x!==0){var B=u;for(B.pendingLanes|=2,B.entangledLanes|=2;x;){var F=1<<31-pt(x);B.entanglements[1]|=F,x&=~F}si(u),(je&6)===0&&(jn=be()+500,kr(0))}}break;case 31:case 13:B=es(u,2),B!==null&&Rt(B,u,2),Fn(),So(u,2)}if(u=bo(s),u===null&&no(e,t,s,sa,i),u===n)break;n=u}n!==null&&s.stopPropagation()}else no(e,t,s,null,i)}}function bo(e){return e=Ca(e),Co(e)}var sa=null;function Co(e){if(sa=null,e=vs(e),e!==null){var t=J(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=W(t),e!==null)return e;e=null}else if(i===31){if(e=a(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 sa=e,null}function Df(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(Qe()){case Pe:return 2;case Ut:return 8;case ot:case bt:return 32;case Je:return 268435456;default:return 32}default:return 32}}var wo=!1,qi=null,Gi=null,Wi=null,Fr=new Map,Pr=new Map,$i=[],hv="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 Mf(e,t){switch(e){case"focusin":case"focusout":qi=null;break;case"dragenter":case"dragleave":Gi=null;break;case"mouseover":case"mouseout":Wi=null;break;case"pointerover":case"pointerout":Fr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pr.delete(t.pointerId)}}function qr(e,t,i,s,n,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:u,targetContainers:[n]},t!==null&&(t=gs(t),t!==null&&Af(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function uv(e,t,i,s,n){switch(t){case"focusin":return qi=qr(qi,e,t,i,s,n),!0;case"dragenter":return Gi=qr(Gi,e,t,i,s,n),!0;case"mouseover":return Wi=qr(Wi,e,t,i,s,n),!0;case"pointerover":var u=n.pointerId;return Fr.set(u,qr(Fr.get(u)||null,e,t,i,s,n)),!0;case"gotpointercapture":return u=n.pointerId,Pr.set(u,qr(Pr.get(u)||null,e,t,i,s,n)),!0}return!1}function Tf(e){var t=vs(e.target);if(t!==null){var i=J(t);if(i!==null){if(t=i.tag,t===13){if(t=W(i),t!==null){e.blockedOn=t,Go(e.priority,function(){Rf(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Go(e.priority,function(){Rf(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 ra(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=bo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ba=s,i.target.dispatchEvent(s),ba=null}else return t=gs(i),t!==null&&Af(t),e.blockedOn=i,!1;t.shift()}return!0}function Bf(e,t,i){ra(e)&&i.delete(t)}function fv(){wo=!1,qi!==null&&ra(qi)&&(qi=null),Gi!==null&&ra(Gi)&&(Gi=null),Wi!==null&&ra(Wi)&&(Wi=null),Fr.forEach(Bf),Pr.forEach(Bf)}function na(e,t){e.blockedOn===t&&(e.blockedOn=null,wo||(wo=!0,P.unstable_scheduleCallback(P.unstable_NormalPriority,fv)))}var aa=null;function Of(e){aa!==e&&(aa=e,P.unstable_scheduleCallback(P.unstable_NormalPriority,function(){aa===e&&(aa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],n=e[t+2];if(typeof s!="function"){if(Co(s||i)===null)continue;break}var u=gs(i);u!==null&&(e.splice(t,3),t-=3,yl(u,{pending:!0,data:n,method:i.method,action:s},s,n))}}))}function Qs(e){function t(F){return na(F,e)}qi!==null&&na(qi,e),Gi!==null&&na(Gi,e),Wi!==null&&na(Wi,e),Fr.forEach(t),Pr.forEach(t);for(var i=0;i<$i.length;i++){var s=$i[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<$i.length&&(i=$i[0],i.blockedOn===null);)Tf(i),i.blockedOn===null&&$i.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var n=i[s],u=i[s+1],x=n[Ct]||null;if(typeof u=="function")x||Of(i);else if(x){var B=null;if(u&&u.hasAttribute("formAction")){if(n=u,x=u[Ct]||null)B=x.formAction;else if(Co(n)!==null)continue}else B=x.action;typeof B=="function"?i[s+1]=B:(i.splice(s,3),s-=3),Of(i)}}}function kf(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(x){return n=x})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,n=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),n!==null&&(n(),n=null)}}}function Eo(e){this._internalRoot=e}la.prototype.render=Eo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));var i=t.current,s=Nt();xf(i,s,e,t,null,null)},la.prototype.unmount=Eo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xf(e.current,2,null,e,null,null),Fn(),t[_s]=null}};function la(e){this._internalRoot=e}la.prototype.unstable_scheduleHydration=function(e){if(e){var t=qo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<$i.length&&t!==0&&t<$i[i].priority;i++);$i.splice(i,0,e),i===0&&Tf(e)}};var Hf=ae.version;if(Hf!=="19.2.4")throw Error(I(527,Hf,"19.2.4"));U.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=_(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var dv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oa.isDisabled&&oa.supportsFiber)try{Vt=oa.inject(dv),ht=oa}catch{}}return Wr.createRoot=function(e,t){if(!re(e))throw Error(I(299));var i=!1,s="",n=Fh,u=Ph,x=qh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=wf(e,1,!1,null,null,i,s,null,n,u,x,kf),e[_s]=t.current,ro(e),new Eo(t)},Wr.hydrateRoot=function(e,t,i){if(!re(e))throw Error(I(299));var s=!1,n="",u=Fh,x=Ph,B=qh,F=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(n=i.identifierPrefix),i.onUncaughtError!==void 0&&(u=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(B=i.onRecoverableError),i.formState!==void 0&&(F=i.formState)),t=wf(e,1,!0,t,i??null,s,n,F,u,x,B,kf),t.context=Ef(null),i=t.current,s=Nt(),s=da(s),n=Ti(s),n.callback=null,Bi(i,n,s),i=s,t.current.lanes=i,er(t,i),si(t),e[_s]=t.current,ro(e),new la(t)},Wr.version="19.2.4",Wr}var Wf;function wv(){if(Wf)return Ao.exports;Wf=1;function P(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P)}catch(ae){console.error(ae)}}return P(),Ao.exports=Cv(),Ao.exports}var Ev=wv();const xv=768,Lv=1e3;function $r(){const ae=window.location.pathname.match(/^(\/project\/[^/]+\/)/);return ae?ae[1]:"/"}function Xr(P){const ae=$r(),ne=P.startsWith("/")?P.slice(1):P;return ae+ne}function Yr(){const P=localStorage.getItem("codev-web-key");return P?{Authorization:`Bearer ${P}`}:{}}async function Av(){const P=await fetch(Xr("api/state"),{headers:Yr()});if(!P.ok)throw new Error(`Failed to fetch state: ${P.status}`);return P.json()}async function Rv(){const P=await fetch(Xr("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...Yr()}});if(!P.ok)throw new Error(await P.text());return P.json()}async function Dv(P){const ae=await fetch(Xr("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...Yr()},body:JSON.stringify({path:P})});if(!ae.ok)throw new Error(await ae.text());return ae.json()}async function Mv(P){const ae=await fetch(Xr(`api/tabs/${P}`),{method:"DELETE",headers:Yr()});if(!ae.ok)throw new Error(await ae.text())}async function Tv(){const P=await fetch(Xr("api/files"),{headers:Yr()});if(!P.ok)throw new Error(`Failed to fetch files: ${P.status}`);return P.json()}function Bv(P){return P.terminalId?`${$r()}ws/terminal/${P.terminalId}`:null}function Ov(){const[P,ae]=He.useState(null),[ne,I]=He.useState(null),re=He.useCallback(async()=>{try{const J=await Av();ae(J),I(null)}catch(J){I(J.message)}},[]);return He.useEffect(()=>{re();const J=setInterval(re,Lv);return()=>clearInterval(J)},[re]),{state:P,error:ne,refresh:re}}function kv(P){const ae=[{id:"dashboard",type:"dashboard",label:"Dashboard",closable:!1}];P!=null&&P.architect&&ae.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:P.architect.terminalId});for(const ne of(P==null?void 0:P.builders)??[])ae.push({id:`builder-${ne.id}`,type:"builder",label:ne.name||`Builder ${ne.id}`,closable:!0,projectId:ne.id,terminalId:ne.terminalId});for(const ne of(P==null?void 0:P.utils)??[])!ne.terminalId&&(!ne.pid||ne.pid===0)||ae.push({id:`shell-${ne.id}`,type:"shell",label:ne.name||`Shell ${ne.id}`,closable:!0,utilId:ne.id,terminalId:ne.terminalId});for(const ne of(P==null?void 0:P.annotations)??[]){const I=ne.file.split("/").pop()??ne.file;ae.push({id:`file-${ne.id}`,type:"file",label:I,closable:!0,annotationId:ne.id,filePath:ne.file})}return ae}function Hv(P){const[ae,ne]=He.useState("dashboard"),I=He.useRef(null),re=He.useRef(!1),J=kv(P);He.useEffect(()=>{if(re.current||P===null)return;const _=new URLSearchParams(window.location.search).get("tab");if(_){const v=J.find(o=>o.id===_||o.type===_);if(v){ne(v.id),re.current=!0;const o=new URL(window.location.href);o.searchParams.delete("tab"),window.history.replaceState({},"",o.toString())}}else re.current=!0},[J,P]),He.useEffect(()=>{const d=new Set(J.map(_=>_.id));if(I.current===null){P!==null&&(I.current=d);return}for(const _ of J)!I.current.has(_.id)&&_.type!=="architect"&&ne(_.id);I.current=d},[J.map(d=>d.id).join(","),P!==null]);const W=He.useCallback(d=>{ne(d)},[]),a=J.find(d=>d.id===ae)??J[0];return{tabs:J,activeTab:a,activeTabId:ae,selectTab:W}}function zv(P){const[ae,ne]=He.useState(()=>typeof window<"u"?window.matchMedia(P).matches:!1);return He.useEffect(()=>{const I=window.matchMedia(P),re=J=>ne(J.matches);return I.addEventListener("change",re),ne(I.matches),()=>I.removeEventListener("change",re)},[P]),ae}function Nv({left:P,right:ae,defaultSplit:ne=50}){const[I,re]=He.useState(ne),J=He.useRef(null),W=He.useRef(!1),a=He.useCallback(d=>{d.preventDefault(),W.current=!0;const _=o=>{if(!W.current||!J.current)return;const g=J.current.getBoundingClientRect(),y=(o.clientX-g.left)/g.width*100;re(Math.max(20,Math.min(80,y)))},v=()=>{W.current=!1,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",v)},[]);return te.jsxs("div",{ref:J,className:"split-pane",children:[te.jsx("div",{className:"split-left",style:{width:`${I}%`},children:P}),te.jsx("div",{className:"split-handle",onMouseDown:a,role:"separator","aria-label":"Resize panels"}),te.jsx("div",{className:"split-right",style:{width:`${100-I}%`},children:ae})]})}function Qf({tabs:P,activeTabId:ae,onSelectTab:ne,onRefresh:I}){const re=async(J,W)=>{J.stopPropagation();try{await Mv(W.id),I()}catch(a){console.error("Failed to close tab:",a)}};return te.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:P.map(J=>te.jsxs("button",{role:"tab","aria-selected":J.id===ae,className:`tab ${J.id===ae?"tab-active":""}`,onClick:()=>ne(J.id),title:J.label,children:[te.jsx("span",{className:"tab-label",children:J.label}),J.closable&&te.jsx("span",{className:"tab-close",onClick:W=>re(W,J),role:"button","aria-label":`Close ${J.label}`,tabIndex:0,onKeyDown:W=>{(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),re(W,J))},children:"×"})]},J.id))})}var To={exports:{}},$f;function Uv(){return $f||($f=1,(function(P,ae){(function(ne,I){P.exports=I()})(globalThis,(()=>(()=>{var ne={4567:function(W,a,d){var _=this&&this.__decorate||function(l,c,m,w){var S,E=arguments.length,p=E<3?c:w===null?w=Object.getOwnPropertyDescriptor(c,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,m,w);else for(var C=l.length-1;C>=0;C--)(S=l[C])&&(p=(E<3?S(p):E>3?S(c,m,p):S(c,m))||p);return E>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(l,c){return function(m,w){c(m,w,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const o=d(9042),g=d(9924),y=d(844),b=d(4725),f=d(2585),r=d(3656);let h=a.AccessibilityManager=class extends y.Disposable{constructor(l,c,m,w){super(),this._terminal=l,this._coreBrowserService=m,this._renderService=w,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new g.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((S=>this._handleResize(S.rows)))),this.register(this._terminal.onRender((S=>this._refreshRows(S.start,S.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((S=>this._handleChar(S)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
50
50
  `)))),this.register(this._terminal.onA11yTab((S=>this._handleTab(S)))),this.register(this._terminal.onKey((S=>this._handleKey(S.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,r.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(l){for(let c=0;c<l;c++)this._handleChar(" ")}_handleChar(l){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==l&&(this._charsToAnnounce+=l):this._charsToAnnounce+=l,l===`
51
51
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=o.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,c){this._liveRegionDebouncer.refresh(l,c,this._terminal.rows)}_renderRows(l,c){const m=this._terminal.buffer,w=m.lines.length.toString();for(let S=l;S<=c;S++){const E=m.lines.get(m.ydisp+S),p=[],C=(E==null?void 0:E.translateToString(!0,void 0,void 0,p))||"",L=(m.ydisp+S+1).toString(),T=this._rowElements[S];T&&(C.length===0?(T.innerText=" ",this._rowColumns.set(T,[0,1])):(T.textContent=C,this._rowColumns.set(T,p)),T.setAttribute("aria-posinset",L),T.setAttribute("aria-setsize",w))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,c){const m=l.target,w=this._rowElements[c===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(c===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==w)return;let S,E;if(c===0?(S=m,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(S=this._rowElements.shift(),E=m,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),c===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(c===0?-1:1),this._rowElements[c===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleSelectionChange(){var C;if(this._rowElements.length===0)return;const l=document.getSelection();if(!l)return;if(l.isCollapsed)return void(this._rowContainer.contains(l.anchorNode)&&this._terminal.clearSelection());if(!l.anchorNode||!l.focusNode)return void console.error("anchorNode and/or focusNode are null");let c={node:l.anchorNode,offset:l.anchorOffset},m={node:l.focusNode,offset:l.focusOffset};if((c.node.compareDocumentPosition(m.node)&Node.DOCUMENT_POSITION_PRECEDING||c.node===m.node&&c.offset>m.offset)&&([c,m]=[m,c]),c.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(c={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(c.node))return;const w=this._rowElements.slice(-1)[0];if(m.node.compareDocumentPosition(w)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(m={node:w,offset:((C=w.textContent)==null?void 0:C.length)??0}),!this._rowContainer.contains(m.node))return;const S=({node:L,offset:T})=>{const D=L instanceof Text?L.parentNode:L;let M=parseInt(D==null?void 0:D.getAttribute("aria-posinset"),10)-1;if(isNaN(M))return console.warn("row is invalid. Race condition?"),null;const N=this._rowColumns.get(D);if(!N)return console.warn("columns is null. Race condition?"),null;let X=T<N.length?N[T]:N.slice(-1)[0]+1;return X>=this._terminal.cols&&(++M,X=0),{row:M,column:X}},E=S(c),p=S(m);if(E&&p){if(E.row>p.row||E.row===p.row&&E.column>=p.column)throw new Error("invalid range");this._terminal.select(E.column,E.row,(p.row-E.row)*this._terminal.cols-E.column+p.column)}}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let c=this._rowContainer.children.length;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const l=this._coreBrowserService.mainDocument.createElement("div");return l.setAttribute("role","listitem"),l.tabIndex=-1,this._refreshRowDimensions(l),l}_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 l=0;l<this._terminal.rows;l++)this._refreshRowDimensions(this._rowElements[l])}}_refreshRowDimensions(l){l.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=h=_([v(1,f.IInstantiationService),v(2,b.ICoreBrowserService),v(3,b.IRenderService)],h)},3614:(W,a)=>{function d(g){return g.replace(/\r?\n/g,"\r")}function _(g,y){return y?"\x1B[200~"+g+"\x1B[201~":g}function v(g,y,b,f){g=_(g=d(g),b.decPrivateModes.bracketedPasteMode&&f.rawOptions.ignoreBracketedPasteMode!==!0),b.triggerDataEvent(g,!0),y.value=""}function o(g,y,b){const f=b.getBoundingClientRect(),r=g.clientX-f.left-10,h=g.clientY-f.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${r}px`,y.style.top=`${h}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=d,a.bracketTextForPaste=_,a.copyHandler=function(g,y){g.clipboardData&&g.clipboardData.setData("text/plain",y.selectionText),g.preventDefault()},a.handlePasteEvent=function(g,y,b,f){g.stopPropagation(),g.clipboardData&&v(g.clipboardData.getData("text/plain"),y,b,f)},a.paste=v,a.moveTextAreaUnderMouseCursor=o,a.rightClickHandler=function(g,y,b,f,r){o(g,y,b),r&&f.rightClickSelect(g),y.value=f.selectionText,y.select()}},7239:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const _=d(1505);a.ColorContrastCache=class{constructor(){this._color=new _.TwoKeyMap,this._css=new _.TwoKeyMap}setCss(v,o,g){this._css.set(v,o,g)}getCss(v,o){return this._css.get(v,o)}setColor(v,o,g){this._color.set(v,o,g)}getColor(v,o){return this._color.get(v,o)}clear(){this._color.clear(),this._css.clear()}}},3656:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,_,v,o){d.addEventListener(_,v,o);let g=!1;return{dispose:()=>{g||(g=!0,d.removeEventListener(_,v,o))}}}},3551:function(W,a,d){var _=this&&this.__decorate||function(h,l,c,m){var w,S=arguments.length,E=S<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(h,l,c,m);else for(var p=h.length-1;p>=0;p--)(w=h[p])&&(E=(S<3?w(E):S>3?w(l,c,E):w(l,c))||E);return S>3&&E&&Object.defineProperty(l,c,E),E},v=this&&this.__param||function(h,l){return function(c,m){l(c,m,h)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const o=d(3656),g=d(8460),y=d(844),b=d(2585),f=d(4725);let r=a.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(h,l,c,m,w){super(),this._element=h,this._mouseService=l,this._renderService=c,this._bufferService=m,this._linkProviderService=w,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var S;this._lastMouseEvent=void 0,(S=this._activeProviderReplies)==null||S.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,o.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const l=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!l)return;this._isMouseOut=!1;const c=h.composedPath();for(let m=0;m<c.length;m++){const w=c[m];if(w.classList.contains("xterm"))break;if(w.classList.contains("xterm-hover"))return}this._lastBufferCell&&l.x===this._lastBufferCell.x&&l.y===this._lastBufferCell.y||(this._handleHover(l),this._lastBufferCell=l)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,l){var m,w;this._activeProviderReplies&&l||((m=this._activeProviderReplies)==null||m.forEach((S=>{S==null||S.forEach((E=>{E.link.dispose&&E.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let c=!1;for(const[S,E]of this._linkProviderService.linkProviders.entries())l?(w=this._activeProviderReplies)!=null&&w.get(S)&&(c=this._checkLinkProviderResult(S,h,c)):E.provideLinks(h.y,(p=>{var L,T;if(this._isMouseOut)return;const C=p==null?void 0:p.map((D=>({link:D})));(L=this._activeProviderReplies)==null||L.set(S,C),c=this._checkLinkProviderResult(S,h,c),((T=this._activeProviderReplies)==null?void 0:T.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,l){const c=new Set;for(let m=0;m<l.size;m++){const w=l.get(m);if(w)for(let S=0;S<w.length;S++){const E=w[S],p=E.link.range.start.y<h?0:E.link.range.start.x,C=E.link.range.end.y>h?this._bufferService.cols:E.link.range.end.x;for(let L=p;L<=C;L++){if(c.has(L)){w.splice(S--,1);break}c.add(L)}}}}_checkLinkProviderResult(h,l,c){var S;if(!this._activeProviderReplies)return c;const m=this._activeProviderReplies.get(h);let w=!1;for(let E=0;E<h;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(w=!0);if(!w&&m){const E=m.find((p=>this._linkAtPosition(p.link,l)));E&&(c=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!c)for(let E=0;E<this._activeProviderReplies.size;E++){const p=(S=this._activeProviderReplies.get(E))==null?void 0:S.find((C=>this._linkAtPosition(C.link,l)));if(p){c=!0,this._handleNewLink(p);break}}return c}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const l=this._positionFromMouseEvent(h,this._element,this._mouseService);l&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,l)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,l){this._currentLink&&this._lastMouseEvent&&(!h||!l||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=l)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(h.link,l)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var c,m;return(m=(c=this._currentLink)==null?void 0:c.state)==null?void 0:m.decorations.pointerCursor},set:c=>{var m;(m=this._currentLink)!=null&&m.state&&this._currentLink.state.decorations.pointerCursor!==c&&(this._currentLink.state.decorations.pointerCursor=c,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",c))}},underline:{get:()=>{var c,m;return(m=(c=this._currentLink)==null?void 0:c.state)==null?void 0:m.decorations.underline},set:c=>{var m,w,S;(m=this._currentLink)!=null&&m.state&&((S=(w=this._currentLink)==null?void 0:w.state)==null?void 0:S.decorations.underline)!==c&&(this._currentLink.state.decorations.underline=c,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,c))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((c=>{if(!this._currentLink)return;const m=c.start===0?0:c.start+1+this._bufferService.buffer.ydisp,w=this._bufferService.buffer.ydisp+1+c.end;if(this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=w&&(this._clearCurrentLink(m,w),this._lastMouseEvent)){const S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._askForLink(S,!1)}}))))}_linkHover(h,l,c){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),l.hover&&l.hover(c,l.text)}_fireUnderlineEvent(h,l){const c=h.range,m=this._bufferService.buffer.ydisp,w=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-m-1,c.end.x,c.end.y-m-1,void 0);(l?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(w)}_linkLeave(h,l,c){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),l.leave&&l.leave(c,l.text)}_linkAtPosition(h,l){const c=h.range.start.y*this._bufferService.cols+h.range.start.x,m=h.range.end.y*this._bufferService.cols+h.range.end.x,w=l.y*this._bufferService.cols+l.x;return c<=w&&w<=m}_positionFromMouseEvent(h,l,c){const m=c.getCoords(h,l,this._bufferService.cols,this._bufferService.rows);if(m)return{x:m[0],y:m[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,l,c,m,w){return{x1:h,y1:l,x2:c,y2:m,cols:this._bufferService.cols,fg:w}}};a.Linkifier=r=_([v(1,f.IMouseService),v(2,f.IRenderService),v(3,b.IBufferService),v(4,f.ILinkProviderService)],r)},9042:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(W,a,d){var _=this&&this.__decorate||function(f,r,h,l){var c,m=arguments.length,w=m<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(f,r,h,l);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(w=(m<3?c(w):m>3?c(r,h,w):c(r,h))||w);return m>3&&w&&Object.defineProperty(r,h,w),w},v=this&&this.__param||function(f,r){return function(h,l){r(h,l,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const o=d(511),g=d(2585);let y=a.OscLinkProvider=class{constructor(f,r,h){this._bufferService=f,this._optionsService=r,this._oscLinkService=h}provideLinks(f,r){var C;const h=this._bufferService.buffer.lines.get(f-1);if(!h)return void r(void 0);const l=[],c=this._optionsService.rawOptions.linkHandler,m=new o.CellData,w=h.getTrimmedLength();let S=-1,E=-1,p=!1;for(let L=0;L<w;L++)if(E!==-1||h.hasContent(L)){if(h.loadCell(L,m),m.hasExtendedAttrs()&&m.extended.urlId){if(E===-1){E=L,S=m.extended.urlId;continue}p=m.extended.urlId!==S}else E!==-1&&(p=!0);if(p||E!==-1&&L===w-1){const T=(C=this._oscLinkService.getLinkData(S))==null?void 0:C.uri;if(T){const D={start:{x:E+1,y:f},end:{x:L+(p||L!==w-1?0:1),y:f}};let M=!1;if(!(c!=null&&c.allowNonHttpProtocols))try{const N=new URL(T);["http:","https:"].includes(N.protocol)||(M=!0)}catch{M=!0}M||l.push({text:T,range:D,activate:(N,X)=>c?c.activate(N,X,D):b(0,X),hover:(N,X)=>{var z;return(z=c==null?void 0:c.hover)==null?void 0:z.call(c,N,X,D)},leave:(N,X)=>{var z;return(z=c==null?void 0:c.leave)==null?void 0:z.call(c,N,X,D)}})}p=!1,m.hasExtendedAttrs()&&m.extended.urlId?(E=L,S=m.extended.urlId):(E=-1,S=-1)}}r(l)}};function b(f,r){if(confirm(`Do you want to navigate to ${r}?
52
52
 
53
- WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=y=_([v(0,g.IBufferService),v(1,g.IOptionsService),v(2,g.IOscLinkService)],y)},6193:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(d,_){this._renderCallback=d,this._coreBrowserService=_,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(d,_,v){this._rowCount=v,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},3236:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const _=d(3614),v=d(3656),o=d(3551),g=d(9042),y=d(3730),b=d(1680),f=d(3107),r=d(5744),h=d(2950),l=d(1296),c=d(428),m=d(4269),w=d(5114),S=d(8934),E=d(3230),p=d(9312),C=d(4725),L=d(6731),T=d(8055),D=d(8969),M=d(8460),N=d(844),X=d(6114),z=d(8437),U=d(2584),P=d(7399),R=d(5941),H=d(9074),A=d(2585),O=d(5435),$=d(4567),V=d(779);class he extends D.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(j={}){super(j),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new N.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(A.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(V.LinkProviderService),this._instantiationService.setService(C.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((k,ie)=>this.refresh(k,ie)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((k=>this._reportWindowsOptions(k)))),this.register(this._inputHandler.onColor((k=>this._handleColorEvent(k)))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((k=>this._afterResize(k.cols,k.rows)))),this.register((0,N.toDisposable)((()=>{var k,ie;this._customKeyEventHandler=void 0,(ie=(k=this.element)==null?void 0:k.parentNode)==null||ie.removeChild(this.element)})))}_handleColorEvent(j){if(this._themeService)for(const k of j){let ie,ee="";switch(k.index){case 256:ie="foreground",ee="10";break;case 257:ie="background",ee="11";break;case 258:ie="cursor",ee="12";break;default:ie="ansi",ee="4;"+k.index}switch(k.type){case 0:const de=T.color.toColorRGB(ie==="ansi"?this._themeService.colors.ansi[k.index]:this._themeService.colors[ie]);this.coreService.triggerDataEvent(`${U.C0.ESC}]${ee};${(0,R.toRgbString)(de)}${U.C1_ESCAPED.ST}`);break;case 1:if(ie==="ansi")this._themeService.modifyColors((fe=>fe.ansi[k.index]=T.channels.toColor(...k.color)));else{const fe=ie;this._themeService.modifyColors((Ce=>Ce[fe]=T.channels.toColor(...k.color)))}break;case 2:this._themeService.restoreColor(k.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(j){j?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance($.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(j){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(U.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var j;return(j=this.textarea)==null?void 0:j.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(U.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 j=this.buffer.ybase+this.buffer.y,k=this.buffer.lines.get(j);if(!k)return;const ie=Math.min(this.buffer.x,this.cols-1),ee=this._renderService.dimensions.css.cell.height,de=k.getWidth(ie),fe=this._renderService.dimensions.css.cell.width*de,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,me=ie*this._renderService.dimensions.css.cell.width;this.textarea.style.left=me+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ee+"px",this.textarea.style.lineHeight=ee+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(k=>{this.hasSelection()&&(0,_.copyHandler)(k,this._selectionService)})));const j=k=>(0,_.handlePasteEvent)(k,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",j)),this.register((0,v.addDisposableDomListener)(this.element,"paste",j)),X.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(k=>{k.button===2&&(0,_.rightClickHandler)(k,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(k=>{(0,_.rightClickHandler)(k,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(k=>{k.button===1&&(0,_.moveTextAreaUnderMouseCursor)(k,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(j=>this._keyUp(j)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(j=>this._keyDown(j)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(j=>this._keyPress(j)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(j=>this._compositionHelper.compositionupdate(j)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(j=>this._inputEvent(j)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(j){var ie;if(!j)throw new Error("Terminal requires a parent element.");if(j.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ie=this.element)==null?void 0:ie.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=j.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"),j.appendChild(this.element);const k=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),k.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,v.addDisposableDomListener)(this.screenElement,"mousemove",(ee=>this.updateCursorStyle(ee)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),k.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),X.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(w.CoreBrowserService,this.textarea,j.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(C.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(ee=>this._handleTextAreaFocus(ee)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(C.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(C.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(m.CharacterJoinerService),this._instantiationService.setService(C.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(C.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ee=>this._onRender.fire(ee)))),this.onResize((ee=>this._renderService.resize(ee.cols,ee.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(C.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(o.Linkifier,this.screenElement)),this.element.appendChild(k);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(b.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(p.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(C.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ee=>this._renderService.handleSelectionChanged(ee.start,ee.end,ee.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ee=>{this.textarea.value=ee,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ee=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(f.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(ee=>this._selectionService.handleMouseDown(ee)))),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($.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ee=>this._handleScreenReaderModeOptionChange(ee)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ee=>{!this._overviewRulerRenderer&&ee&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(l.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const j=this,k=this.element;function ie(fe){const Ce=j._mouseService.getMouseReportCoords(fe,j.screenElement);if(!Ce)return!1;let me,He;switch(fe.overrideType||fe.type){case"mousemove":He=32,fe.buttons===void 0?(me=3,fe.button!==void 0&&(me=fe.button<3?fe.button:3)):me=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":He=0,me=fe.button<3?fe.button:3;break;case"mousedown":He=1,me=fe.button<3?fe.button:3;break;case"wheel":if(j._customWheelEventHandler&&j._customWheelEventHandler(fe)===!1||j.viewport.getLinesScrolled(fe)===0)return!1;He=fe.deltaY<0?0:1,me=4;break;default:return!1}return!(He===void 0||me===void 0||me>4)&&j.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:me,action:He,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ee={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:fe=>(ie(fe),fe.buttons||(this._document.removeEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.removeEventListener("mousemove",ee.mousedrag)),this.cancel(fe)),wheel:fe=>(ie(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&ie(fe)},mousemove:fe=>{fe.buttons||ie(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?ee.mousemove||(k.addEventListener("mousemove",de.mousemove),ee.mousemove=de.mousemove):(k.removeEventListener("mousemove",ee.mousemove),ee.mousemove=null),16&fe?ee.wheel||(k.addEventListener("wheel",de.wheel,{passive:!1}),ee.wheel=de.wheel):(k.removeEventListener("wheel",ee.wheel),ee.wheel=null),2&fe?ee.mouseup||(ee.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",ee.mouseup),ee.mouseup=null),4&fe?ee.mousedrag||(ee.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",ee.mousedrag),ee.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(k,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return ie(fe),ee.mouseup&&this._document.addEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.addEventListener("mousemove",ee.mousedrag),this.cancel(fe)}))),this.register((0,v.addDisposableDomListener)(k,"wheel",(fe=>{if(!ee.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(fe);if(Ce===0)return;const me=U.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let He="";for(let Ke=0;Ke<Math.abs(Ce);Ke++)He+=me;return this.coreService.triggerDataEvent(He,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(k,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(k,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(j,k){var ie;(ie=this._renderService)==null||ie.refreshRows(j,k)}updateCursorStyle(j){var k;(k=this._selectionService)!=null&&k.shouldColumnSelect(j)?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(j,k,ie=0){var ee;ie===1?(super.scrollLines(j,k,ie),this.refresh(0,this.rows-1)):(ee=this.viewport)==null||ee.scrollLines(j)}paste(j){(0,_.paste)(j,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(j){this._customKeyEventHandler=j}attachCustomWheelEventHandler(j){this._customWheelEventHandler=j}registerLinkProvider(j){return this._linkProviderService.registerLinkProvider(j)}registerCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const k=this._characterJoinerService.register(j);return this.refresh(0,this.rows-1),k}deregisterCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(j)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(j){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+j)}registerDecoration(j){return this._decorationService.registerDecoration(j)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(j,k,ie){this._selectionService.setSelection(j,k,ie)}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 j;(j=this._selectionService)==null||j.clearSelection()}selectAll(){var j;(j=this._selectionService)==null||j.selectAll()}selectLines(j,k){var ie;(ie=this._selectionService)==null||ie.selectLines(j,k)}_keyDown(j){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;const k=this.browser.isMac&&this.options.macOptionIsMeta&&j.altKey;if(!k&&!this._compositionHelper.keydown(j))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;k||j.key!=="Dead"&&j.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ie=(0,P.evaluateKeyboardEvent)(j,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(j),ie.type===3||ie.type===2){const ee=this.rows-1;return this.scrollLines(ie.type===2?-ee:ee),this.cancel(j,!0)}return ie.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,j)||(ie.cancel&&this.cancel(j,!0),!ie.key||!!(j.key&&!j.ctrlKey&&!j.altKey&&!j.metaKey&&j.key.length===1&&j.key.charCodeAt(0)>=65&&j.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ie.key!==U.C0.ETX&&ie.key!==U.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ie.key,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(ie.key,!0),!this.optionsService.rawOptions.screenReaderMode||j.altKey||j.ctrlKey?this.cancel(j,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(j,k){const ie=j.isMac&&!this.options.macOptionIsMeta&&k.altKey&&!k.ctrlKey&&!k.metaKey||j.isWindows&&k.altKey&&k.ctrlKey&&!k.metaKey||j.isWindows&&k.getModifierState("AltGraph");return k.type==="keypress"?ie:ie&&(!k.keyCode||k.keyCode>47)}_keyUp(j){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1||((function(k){return k.keyCode===16||k.keyCode===17||k.keyCode===18})(j)||this.focus(),this.updateCursorStyle(j),this._keyPressHandled=!1)}_keyPress(j){let k;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;if(this.cancel(j),j.charCode)k=j.charCode;else if(j.which===null||j.which===void 0)k=j.keyCode;else{if(j.which===0||j.charCode===0)return!1;k=j.which}return!(!k||(j.altKey||j.ctrlKey||j.metaKey)&&!this._isThirdLevelShift(this.browser,j)||(k=String.fromCharCode(k),this._onKey.fire({key:k,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(k,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(j){if(j.data&&j.inputType==="insertText"&&(!j.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const k=j.data;return this.coreService.triggerDataEvent(k,!0),this.cancel(j),!0}return!1}resize(j,k){j!==this.cols||k!==this.rows?super.resize(j,k):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(j,k){var ie,ee;(ie=this._charSizeService)==null||ie.measure(),(ee=this.viewport)==null||ee.syncScrollArea(!0)}clear(){var j;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 k=1;k<this.rows;k++)this.buffer.lines.push(this.buffer.getBlankLine(z.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(j=this.viewport)==null||j.reset(),this.refresh(0,this.rows-1)}}reset(){var k,ie;this.options.rows=this.rows,this.options.cols=this.cols;const j=this._customKeyEventHandler;this._setup(),super.reset(),(k=this._selectionService)==null||k.reset(),this._decorationService.reset(),(ie=this.viewport)==null||ie.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1)}clearTextureAtlas(){var j;(j=this._renderService)==null||j.clearTextureAtlas()}_reportFocus(){var j;(j=this.element)!=null&&j.classList.contains("focus")?this.coreService.triggerDataEvent(U.C0.ESC+"[I"):this.coreService.triggerDataEvent(U.C0.ESC+"[O")}_reportWindowsOptions(j){if(this._renderService)switch(j){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const k=this._renderService.dimensions.css.canvas.width.toFixed(0),ie=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${U.C0.ESC}[4;${ie};${k}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ee=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${U.C0.ESC}[6;${de};${ee}t`)}}cancel(j,k){if(this.options.cancelEvents||k)return j.preventDefault(),j.stopPropagation(),!1}}a.Terminal=he},9924:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(d,_=1e3){this._renderCallback=d,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,_,v){this._rowCount=v,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;const o=Date.now();if(o-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=o,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=o-this._lastRefreshMs,y=this._debounceThresholdMS-g;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 d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_)}}},1680:function(W,a,d){var _=this&&this.__decorate||function(h,l,c,m){var w,S=arguments.length,E=S<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(h,l,c,m);else for(var p=h.length-1;p>=0;p--)(w=h[p])&&(E=(S<3?w(E):S>3?w(l,c,E):w(l,c))||E);return S>3&&E&&Object.defineProperty(l,c,E),E},v=this&&this.__param||function(h,l){return function(c,m){l(c,m,h)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const o=d(3656),g=d(4725),y=d(8460),b=d(844),f=d(2585);let r=a.Viewport=class extends b.Disposable{constructor(h,l,c,m,w,S,E,p){super(),this._viewportElement=h,this._scrollArea=l,this._bufferService=c,this._optionsService=m,this._charSizeService=w,this._renderService=S,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,o.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((C=>this._activeBuffer=C.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((C=>this._renderDimensions=C))),this._handleThemeChange(p.colors),this.register(p.onChangeColors((C=>this._handleThemeChange(C)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(h){if(h)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const l=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==l&&(this._lastRecordedBufferHeight=l,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const l=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(h,l){const c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(l<0&&this._viewportElement.scrollTop!==0||l>0&&c<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const l=this._getPixelsScrolled(h);return l!==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+l:this._smoothScrollState.target+=l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const l=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?l*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._currentRowHeight*this._bufferService.rows),l}getBufferElements(h,l){var p;let c,m="";const w=[],S=l??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let C=h;C<S;C++){const L=E.get(C);if(!L)continue;const T=(p=E.get(C+1))==null?void 0:p.isWrapped;if(m+=L.translateToString(!T),!T||C===E.length-1){const D=document.createElement("div");D.textContent=m,w.push(D),m.length>0&&(c=D),m=""}}return{bufferElements:w,cursorElement:c}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=this._currentRowHeight+0,this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(h,l){const c=this._optionsService.rawOptions.fastScrollModifier;return c==="alt"&&l.altKey||c==="ctrl"&&l.ctrlKey||c==="shift"&&l.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const l=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,l!==0&&(this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}};a.Viewport=r=_([v(2,f.IBufferService),v(3,f.IOptionsService),v(4,g.ICharSizeService),v(5,g.IRenderService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],r)},3107:function(W,a,d){var _=this&&this.__decorate||function(f,r,h,l){var c,m=arguments.length,w=m<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(f,r,h,l);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(w=(m<3?c(w):m>3?c(r,h,w):c(r,h))||w);return m>3&&w&&Object.defineProperty(r,h,w),w},v=this&&this.__param||function(f,r){return function(h,l){r(h,l,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const o=d(4725),g=d(844),y=d(2585);let b=a.BufferDecorationRenderer=class extends g.Disposable{constructor(f,r,h,l,c){super(),this._screenElement=f,this._bufferService=r,this._coreBrowserService=h,this._decorationService=l,this._renderService=c,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((m=>this._removeDecoration(m)))),this.register((0,g.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const f of this._decorationService.decorations)this._renderDecoration(f);this._dimensionsChanged=!1}_renderDecoration(f){this._refreshStyle(f),this._dimensionsChanged&&this._refreshXPosition(f)}_createElement(f){var l;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((l=f==null?void 0:f.options)==null?void 0:l.layer)==="top"),r.style.width=`${Math.round((f.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(f.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(f.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=f.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(f,r),r}_refreshStyle(f){const r=f.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)f.element&&(f.element.style.display="none",f.onRenderEmitter.fire(f.element));else{let h=this._decorationElements.get(f);h||(h=this._createElement(f),f.element=h,this._decorationElements.set(f,h),this._container.appendChild(h),f.onDispose((()=>{this._decorationElements.delete(f),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",f.onRenderEmitter.fire(h)}}_refreshXPosition(f,r=f.element){if(!r)return;const h=f.options.x??0;(f.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(f){var r;(r=this._decorationElements.get(f))==null||r.remove(),this._decorationElements.delete(f),f.dispose()}};a.BufferDecorationRenderer=b=_([v(1,y.IBufferService),v(2,o.ICoreBrowserService),v(3,y.IDecorationService),v(4,o.IRenderService)],b)},5871:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(d){if(d.options.overviewRulerOptions){for(const _ of this._zones)if(_.color===d.options.overviewRulerOptions.color&&_.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,d.marker.line))return;if(this._lineAdjacentToZone(_,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(_,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,_){return _>=d.startBufferLine&&_<=d.endBufferLine}_lineAdjacentToZone(d,_,v){return _>=d.startBufferLine-this._linePadding[v||"full"]&&_<=d.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(d,_){d.startBufferLine=Math.min(d.startBufferLine,_),d.endBufferLine=Math.max(d.endBufferLine,_)}}},5744:function(W,a,d){var _=this&&this.__decorate||function(c,m,w,S){var E,p=arguments.length,C=p<3?m:S===null?S=Object.getOwnPropertyDescriptor(m,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,m,w,S);else for(var L=c.length-1;L>=0;L--)(E=c[L])&&(C=(p<3?E(C):p>3?E(m,w,C):E(m,w))||C);return p>3&&C&&Object.defineProperty(m,w,C),C},v=this&&this.__param||function(c,m){return function(w,S){m(w,S,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const o=d(5871),g=d(4725),y=d(844),b=d(2585),f={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let l=a.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(c,m,w,S,E,p,C){var T;super(),this._viewportElement=c,this._screenElement=m,this._bufferService=w,this._decorationService=S,this._renderService=E,this._optionsService=p,this._coreBrowserService=C,this._colorZoneStore=new o.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(),(T=this._viewportElement.parentElement)==null||T.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var D;(D=this._canvas)==null||D.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const c=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=c,r.center=m,r.right=c,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){f.full=Math.round(2*this._coreBrowserService.dpr);const c=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(c,12),6)*this._coreBrowserService.dpr);f.left=m,f.center=m,f.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const c=this._colorZoneStore.zones;for(const m of c)m.position!=="full"&&this._renderColorZone(m);for(const m of c)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(h[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-f[c.position||"full"]/2),r[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+f[c.position||"full"]))}_queueRefresh(c,m){this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=l=_([v(2,b.IBufferService),v(3,b.IDecorationService),v(4,g.IRenderService),v(5,b.IOptionsService),v(6,g.ICoreBrowserService)],l)},2950:function(W,a,d){var _=this&&this.__decorate||function(f,r,h,l){var c,m=arguments.length,w=m<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(f,r,h,l);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(w=(m<3?c(w):m>3?c(r,h,w):c(r,h))||w);return m>3&&w&&Object.defineProperty(r,h,w),w},v=this&&this.__param||function(f,r){return function(h,l){r(h,l,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const o=d(4725),g=d(2585),y=d(2584);let b=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(f,r,h,l,c,m){this._textarea=f,this._compositionView=r,this._bufferService=h,this._optionsService=l,this._coreService=c,this._renderService=m,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(f){this._compositionView.textContent=f.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(f){if(this._isComposing||this._isSendingComposition){if(f.keyCode===229||f.keyCode===16||f.keyCode===17||f.keyCode===18)return!1;this._finalizeComposition(!1)}return f.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(f){if(this._compositionView.classList.remove("active"),this._isComposing=!1,f){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const f=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(f,"");this._dataAlreadySent=h,r.length>f.length?this._coreService.triggerDataEvent(h,!0):r.length<f.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):r.length===f.length&&r!==f&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(f){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,c=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=l+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const m=this._compositionView.getBoundingClientRect();this._textarea.style.left=c+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(m.width,1)+"px",this._textarea.style.height=Math.max(m.height,1)+"px",this._textarea.style.lineHeight=m.height+"px"}f||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=b=_([v(2,g.IBufferService),v(3,g.IOptionsService),v(4,g.ICoreService),v(5,o.IRenderService)],b)},9806:(W,a)=>{function d(_,v,o){const g=o.getBoundingClientRect(),y=_.getComputedStyle(o),b=parseInt(y.getPropertyValue("padding-left")),f=parseInt(y.getPropertyValue("padding-top"));return[v.clientX-g.left-b,v.clientY-g.top-f]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=d,a.getCoords=function(_,v,o,g,y,b,f,r,h){if(!b)return;const l=d(_,v,o);return l?(l[0]=Math.ceil((l[0]+(h?f/2:0))/f),l[1]=Math.ceil(l[1]/r),l[0]=Math.min(Math.max(l[0],1),g+(h?1:0)),l[1]=Math.min(Math.max(l[1],1),y),l):void 0}},9504:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const _=d(2584);function v(r,h,l,c){const m=r-o(r,l),w=h-o(h,l),S=Math.abs(m-w)-(function(E,p,C){let L=0;const T=E-o(E,C),D=p-o(p,C);for(let M=0;M<Math.abs(T-D);M++){const N=g(E,p)==="A"?-1:1,X=C.buffer.lines.get(T+N*M);X!=null&&X.isWrapped&&L++}return L})(r,h,l);return f(S,b(g(r,h),c))}function o(r,h){let l=0,c=h.buffer.lines.get(r),m=c==null?void 0:c.isWrapped;for(;m&&r>=0&&r<h.rows;)l++,c=h.buffer.lines.get(--r),m=c==null?void 0:c.isWrapped;return l}function g(r,h){return r>h?"A":"B"}function y(r,h,l,c,m,w){let S=r,E=h,p="";for(;S!==l||E!==c;)S+=m?1:-1,m&&S>w.cols-1?(p+=w.buffer.translateBufferLineToString(E,!1,r,S),S=0,r=0,E++):!m&&S<0&&(p+=w.buffer.translateBufferLineToString(E,!1,0,r+1),S=w.cols-1,r=S,E--);return p+w.buffer.translateBufferLineToString(E,!1,r,S)}function b(r,h){const l=h?"O":"[";return _.C0.ESC+l+r}function f(r,h){r=Math.floor(r);let l="";for(let c=0;c<r;c++)l+=h;return l}a.moveToCellSequence=function(r,h,l,c){const m=l.buffer.x,w=l.buffer.y;if(!l.buffer.hasScrollback)return(function(p,C,L,T,D,M){return v(C,T,D,M).length===0?"":f(y(p,C,p,C-o(C,D),!1,D).length,b("D",M))})(m,w,0,h,l,c)+v(w,h,l,c)+(function(p,C,L,T,D,M){let N;N=v(C,T,D,M).length>0?T-o(T,D):C;const X=T,z=(function(U,P,R,H,A,O){let $;return $=v(R,H,A,O).length>0?H-o(H,A):P,U<R&&$<=H||U>=R&&$<H?"C":"D"})(p,C,L,T,D,M);return f(y(p,N,L,X,z==="C",D).length,b(z,M))})(m,w,r,h,l,c);let S;if(w===h)return S=m>r?"D":"C",f(Math.abs(m-r),b(S,c));S=w>h?"D":"C";const E=Math.abs(w-h);return f((function(p,C){return C.cols-p})(w>h?r:m,l)+(E-1)*l.cols+1+((w>h?m:r)-1),b(S,c))}},1296:function(W,a,d){var _=this&&this.__decorate||function(M,N,X,z){var U,P=arguments.length,R=P<3?N:z===null?z=Object.getOwnPropertyDescriptor(N,X):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(M,N,X,z);else for(var H=M.length-1;H>=0;H--)(U=M[H])&&(R=(P<3?U(R):P>3?U(N,X,R):U(N,X))||R);return P>3&&R&&Object.defineProperty(N,X,R),R},v=this&&this.__param||function(M,N){return function(X,z){N(X,z,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const o=d(3787),g=d(2550),y=d(2223),b=d(6171),f=d(6052),r=d(4725),h=d(8055),l=d(8460),c=d(844),m=d(2585),w="xterm-dom-renderer-owner-",S="xterm-rows",E="xterm-fg-",p="xterm-bg-",C="xterm-focus",L="xterm-selection";let T=1,D=a.DomRenderer=class extends c.Disposable{constructor(M,N,X,z,U,P,R,H,A,O,$,V,he){super(),this._terminal=M,this._document=N,this._element=X,this._screenElement=z,this._viewportElement=U,this._helperContainer=P,this._linkifier2=R,this._charSizeService=A,this._optionsService=O,this._bufferService=$,this._coreBrowserService=V,this._themeService=he,this._terminalClass=T++,this._rowElements=[],this._selectionRenderModel=(0,f.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new l.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,b.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(o.DomRendererRowFactory,document),this._element.classList.add(w+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,c.toDisposable)((()=>{this._element.classList.remove(w+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const N=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=N,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let N=`${this._terminalSelector} .${S} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;N+=`${this._terminalSelector} .${S} .xterm-dim { color: ${h.color.multiplyOpacity(M.foreground,.5).css};}`,N+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const X=`blink_underline_${this._terminalClass}`,z=`blink_bar_${this._terminalClass}`,U=`blink_block_${this._terminalClass}`;N+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,N+=`@keyframes ${z} { 50% { box-shadow: none; }}`,N+=`@keyframes ${U} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,N+=`${this._terminalSelector} .${S}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${S}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${z} 1s step-end infinite;}${this._terminalSelector} .${S}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,N+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[P,R]of M.ansi.entries())N+=`${this._terminalSelector} .${E}${P} { color: ${R.css}; }${this._terminalSelector} .${E}${P}.xterm-dim { color: ${h.color.multiplyOpacity(R,.5).css}; }${this._terminalSelector} .${p}${P} { background-color: ${R.css}; }`;N+=`${this._terminalSelector} .${E}${y.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(M.background).css}; }${this._terminalSelector} .${E}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${p}${y.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=N}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,N){for(let X=this._rowElements.length;X<=N;X++){const z=this._document.createElement("div");this._rowContainer.appendChild(z),this._rowElements.push(z)}for(;this._rowElements.length>N;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,N){this._refreshRowElements(M,N),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(C),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(C),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(M,N,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,N,X),this.renderRows(0,this._bufferService.rows-1),!M||!N)return;this._selectionRenderModel.update(this._terminal,M,N,X);const z=this._selectionRenderModel.viewportStartRow,U=this._selectionRenderModel.viewportEndRow,P=this._selectionRenderModel.viewportCappedStartRow,R=this._selectionRenderModel.viewportCappedEndRow;if(P>=this._bufferService.rows||R<0)return;const H=this._document.createDocumentFragment();if(X){const A=M[0]>N[0];H.appendChild(this._createSelectionElement(P,A?N[0]:M[0],A?M[0]:N[0],R-P+1))}else{const A=z===P?M[0]:0,O=P===U?N[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(P,A,O));const $=R-P-1;if(H.appendChild(this._createSelectionElement(P+1,0,this._bufferService.cols,$)),P!==R){const V=U===R?N[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(R,0,V))}}this._selectionContainer.appendChild(H)}_createSelectionElement(M,N,X,z=1){const U=this._document.createElement("div"),P=N*this.dimensions.css.cell.width;let R=this.dimensions.css.cell.width*(X-N);return P+R>this.dimensions.css.canvas.width&&(R=this.dimensions.css.canvas.width-P),U.style.height=z*this.dimensions.css.cell.height+"px",U.style.top=M*this.dimensions.css.cell.height+"px",U.style.left=`${P}px`,U.style.width=`${R}px`,U}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const M of this._rowElements)M.replaceChildren()}renderRows(M,N){const X=this._bufferService.buffer,z=X.ybase+X.y,U=Math.min(X.x,this._bufferService.cols-1),P=this._optionsService.rawOptions.cursorBlink,R=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let A=M;A<=N;A++){const O=A+X.ydisp,$=this._rowElements[A],V=X.lines.get(O);if(!$||!V)break;$.replaceChildren(...this._rowFactory.createRow(V,O,O===z,R,H,U,P,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${w}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,N,X,z,U,P){X<0&&(M=0),z<0&&(N=0);const R=this._bufferService.rows-1;X=Math.max(Math.min(X,R),0),z=Math.max(Math.min(z,R),0),U=Math.min(U,this._bufferService.cols);const H=this._bufferService.buffer,A=H.ybase+H.y,O=Math.min(H.x,U-1),$=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=X;ue<=z;++ue){const j=ue+H.ydisp,k=this._rowElements[ue],ie=H.lines.get(j);if(!k||!ie)break;k.replaceChildren(...this._rowFactory.createRow(ie,j,j===A,V,he,O,$,this.dimensions.css.cell.width,this._widthCache,P?ue===X?M:0:-1,P?(ue===z?N:U)-1:-1))}}};a.DomRenderer=D=_([v(7,m.IInstantiationService),v(8,r.ICharSizeService),v(9,m.IOptionsService),v(10,m.IBufferService),v(11,r.ICoreBrowserService),v(12,r.IThemeService)],D)},3787:function(W,a,d){var _=this&&this.__decorate||function(S,E,p,C){var L,T=arguments.length,D=T<3?E:C===null?C=Object.getOwnPropertyDescriptor(E,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,E,p,C);else for(var M=S.length-1;M>=0;M--)(L=S[M])&&(D=(T<3?L(D):T>3?L(E,p,D):L(E,p))||D);return T>3&&D&&Object.defineProperty(E,p,D),D},v=this&&this.__param||function(S,E){return function(p,C){E(p,C,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const o=d(2223),g=d(643),y=d(511),b=d(2585),f=d(8055),r=d(4725),h=d(4269),l=d(6171),c=d(3734);let m=a.DomRendererRowFactory=class{constructor(S,E,p,C,L,T,D){this._document=S,this._characterJoinerService=E,this._optionsService=p,this._coreBrowserService=C,this._coreService=L,this._decorationService=T,this._themeService=D,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,E,p){this._selectionStart=S,this._selectionEnd=E,this._columnSelectMode=p}createRow(S,E,p,C,L,T,D,M,N,X,z){const U=[],P=this._characterJoinerService.getJoinedCharacters(E),R=this._themeService.colors;let H,A=S.getNoBgTrimmedLength();p&&A<T+1&&(A=T+1);let O=0,$="",V=0,he=0,ue=0,j=!1,k=0,ie=!1,ee=0;const de=[],fe=X!==-1&&z!==-1;for(let Ce=0;Ce<A;Ce++){S.loadCell(Ce,this._workCell);let me=this._workCell.getWidth();if(me===0)continue;let He=!1,Ke=Ce,Se=this._workCell;if(P.length>0&&Ce===P[0][0]){He=!0;const Ae=P.shift();Se=new h.JoinedCellData(this._workCell,S.translateToString(!0,Ae[0],Ae[1]),Ae[1]-Ae[0]),Ke=Ae[1]-1,me=Se.getWidth()}const Dt=this._isCellInSelection(Ce,E),Jt=p&&Ce===T,Te=fe&&Ce>=X&&Ce<=z;let Le=!1;this._decorationService.forEachDecorationAtCell(Ce,E,void 0,(Ae=>{Le=!0}));let Re=Se.getChars()||g.WHITESPACE_CELL_CHAR;if(Re===" "&&(Se.isUnderline()||Se.isOverline())&&(Re=" "),ee=me*M-N.get(Re,Se.isBold(),Se.isItalic()),H){if(O&&(Dt&&ie||!Dt&&!ie&&Se.bg===V)&&(Dt&&ie&&R.selectionForeground||Se.fg===he)&&Se.extended.ext===ue&&Te===j&&ee===k&&!Jt&&!He&&!Le){Se.isInvisible()?$+=g.WHITESPACE_CELL_CHAR:$+=Re,O++;continue}O&&(H.textContent=$),H=this._document.createElement("span"),O=0,$=""}else H=this._document.createElement("span");if(V=Se.bg,he=Se.fg,ue=Se.extended.ext,j=Te,k=ee,ie=Dt,He&&T>=Ce&&T<=Ke&&(T=Ce),!this._coreService.isCursorHidden&&Jt&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)D&&de.push("xterm-cursor-blink"),de.push(C==="bar"?"xterm-cursor-bar":C==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){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"),$=Se.isInvisible()?g.WHITESPACE_CELL_CHAR:Se.getChars()||g.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(de.push(`xterm-underline-${Se.extended.underlineStyle}`),$===" "&&($=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${c.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let Ae=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&Ae<8&&(Ae+=8),H.style.textDecorationColor=R.ansi[Ae].css}Se.isOverline()&&(de.push("xterm-overline"),$===" "&&($=" ")),Se.isStrikethrough()&&de.push("xterm-strikethrough"),Te&&(H.style.textDecoration="underline");let _e=Se.getFgColor(),be=Se.getFgColorMode(),Qe=Se.getBgColor(),Pe=Se.getBgColorMode();const Ut=!!Se.isInverse();if(Ut){const Ae=_e;_e=Qe,Qe=Ae;const Vt=be;be=Pe,Pe=Vt}let ot,bt,Je,qe=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,E,void 0,(Ae=>{Ae.options.layer!=="top"&&qe||(Ae.backgroundColorRGB&&(Pe=50331648,Qe=Ae.backgroundColorRGB.rgba>>8&16777215,ot=Ae.backgroundColorRGB),Ae.foregroundColorRGB&&(be=50331648,_e=Ae.foregroundColorRGB.rgba>>8&16777215,bt=Ae.foregroundColorRGB),qe=Ae.options.layer==="top")})),!qe&&Dt&&(ot=this._coreBrowserService.isFocused?R.selectionBackgroundOpaque:R.selectionInactiveBackgroundOpaque,Qe=ot.rgba>>8&16777215,Pe=50331648,qe=!0,R.selectionForeground&&(be=50331648,_e=R.selectionForeground.rgba>>8&16777215,bt=R.selectionForeground)),qe&&de.push("xterm-decoration-top"),Pe){case 16777216:case 33554432:Je=R.ansi[Qe],de.push(`xterm-bg-${Qe}`);break;case 50331648:Je=f.channels.toColor(Qe>>16,Qe>>8&255,255&Qe),this._addStyle(H,`background-color:#${w((Qe>>>0).toString(16),"0",6)}`);break;default:Ut?(Je=R.foreground,de.push(`xterm-bg-${o.INVERTED_DEFAULT_COLOR}`)):Je=R.background}switch(ot||Se.isDim()&&(ot=f.color.multiplyOpacity(Je,.5)),be){case 16777216:case 33554432:Se.isBold()&&_e<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(_e+=8),this._applyMinimumContrast(H,Je,R.ansi[_e],Se,ot,void 0)||de.push(`xterm-fg-${_e}`);break;case 50331648:const Ae=f.channels.toColor(_e>>16&255,_e>>8&255,255&_e);this._applyMinimumContrast(H,Je,Ae,Se,ot,bt)||this._addStyle(H,`color:#${w(_e.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,Je,R.foreground,Se,ot,bt)||Ut&&de.push(`xterm-fg-${o.INVERTED_DEFAULT_COLOR}`)}de.length&&(H.className=de.join(" "),de.length=0),Jt||He||Le?H.textContent=$:O++,ee!==this.defaultSpacing&&(H.style.letterSpacing=`${ee}px`),U.push(H),Ce=Ke}return H&&O&&(H.textContent=$),U}_applyMinimumContrast(S,E,p,C,L,T){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.treatGlyphAsBackgroundColor)(C.getCode()))return!1;const D=this._getContrastCache(C);let M;if(L||T||(M=D.getColor(E.rgba,p.rgba)),M===void 0){const N=this._optionsService.rawOptions.minimumContrastRatio/(C.isDim()?2:1);M=f.color.ensureContrastRatio(L||E,T||p,N),D.setColor((L||E).rgba,(T||p).rgba,M??null)}return!!M&&(this._addStyle(S,`color:${M.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,E){S.setAttribute("style",`${S.getAttribute("style")||""}${E};`)}_isCellInSelection(S,E){const p=this._selectionStart,C=this._selectionEnd;return!(!p||!C)&&(this._columnSelectMode?p[0]<=C[0]?S>=p[0]&&E>=p[1]&&S<C[0]&&E<=C[1]:S<p[0]&&E>=p[1]&&S>=C[0]&&E<=C[1]:E>p[1]&&E<C[1]||p[1]===C[1]&&E===p[1]&&S>=p[0]&&S<C[0]||p[1]<C[1]&&E===C[1]&&S<C[0]||p[1]<C[1]&&E===p[1]&&S>=p[0])}};function w(S,E,p){for(;S.length<p;)S=E+S;return S}a.DomRendererRowFactory=m=_([v(1,r.ICharacterJoinerService),v(2,b.IOptionsService),v(3,r.ICoreBrowserService),v(4,b.ICoreService),v(5,b.IDecorationService),v(6,r.IThemeService)],m)},2550:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(d,_){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const v=d.createElement("span");v.classList.add("xterm-char-measure-element");const o=d.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold";const g=d.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const y=d.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[v,o,g,y],this._container.appendChild(v),this._container.appendChild(o),this._container.appendChild(g),this._container.appendChild(y),_.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(d,_,v,o){d===this._font&&_===this._fontSize&&v===this._weight&&o===this._weightBold||(this._font=d,this._fontSize=_,this._weight=v,this._weightBold=o,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${o}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${o}`,this.clear())}get(d,_,v){let o=0;if(!_&&!v&&d.length===1&&(o=d.charCodeAt(0))<256){if(this._flat[o]!==-9999)return this._flat[o];const b=this._measure(d,0);return b>0&&(this._flat[o]=b),b}let g=d;_&&(g+="B"),v&&(g+="I");let y=this._holey.get(g);if(y===void 0){let b=0;_&&(b|=1),v&&(b|=2),y=this._measure(d,b),y>0&&this._holey.set(g,y)}return y}_measure(d,_){const v=this._measureElements[_];return v.textContent=d.repeat(32),v.offsetWidth/32}}},2223:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const _=d(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:(W,a)=>{function d(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},a.isEmoji=_,a.allowRescaling=function(v,o,g,y){return o===1&&g>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!_(v)&&!d(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},a.treatGlyphAsBackgroundColor=function(v){return d(v)||(function(o){return 9472<=o&&o<=9631})(v)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(v,o,g=0){return(v-(2*Math.round(o)-g))%(2*Math.round(o))}},6052:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,o,g,y=!1){if(this.selectionStart=o,this.selectionEnd=g,!o||!g||o[0]===g[0]&&o[1]===g[1])return void this.clear();const b=v.buffers.active.ydisp,f=o[1]-b,r=g[1]-b,h=Math.max(f,0),l=Math.min(r,v.rows-1);h>=v.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=f,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=o[0],this.endCol=g[0])}isCellSelected(v,o,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&g>=this.viewportCappedStartRow&&o<this.endCol&&g<=this.viewportCappedEndRow:o<this.startCol&&g>=this.viewportCappedStartRow&&o>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&o>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},456:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(d){this._bufferService=d,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 d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,_=this.selectionEnd;return!(!d||!_)&&(d[1]>_[1]||d[1]===_[1]&&d[0]>_[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(W,a,d){var _=this&&this.__decorate||function(l,c,m,w){var S,E=arguments.length,p=E<3?c:w===null?w=Object.getOwnPropertyDescriptor(c,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,m,w);else for(var C=l.length-1;C>=0;C--)(S=l[C])&&(p=(E<3?S(p):E>3?S(c,m,p):S(c,m))||p);return E>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(l,c){return function(m,w){c(m,w,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const o=d(2585),g=d(8460),y=d(844);let b=a.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,c,m){super(),this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(l,c,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};a.CharSizeService=b=_([v(2,o.IOptionsService)],b);class f extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(c,m){c!==void 0&&c>0&&m!==void 0&&m>0&&(this._result.width=c,this._result.height=m)}}class r extends f{constructor(c,m,w){super(),this._document=c,this._parentElement=m,this._optionsService=w,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class h extends f{constructor(c){super(),this._optionsService=c,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const m=this._ctx.measureText("W");if(!("width"in m&&"fontBoundingBoxAscent"in m&&"fontBoundingBoxDescent"in m))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const c=this._ctx.measureText("W");return this._validateAndSet(c.width,c.fontBoundingBoxAscent+c.fontBoundingBoxDescent),this._result}}},4269:function(W,a,d){var _=this&&this.__decorate||function(h,l,c,m){var w,S=arguments.length,E=S<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(h,l,c,m);else for(var p=h.length-1;p>=0;p--)(w=h[p])&&(E=(S<3?w(E):S>3?w(l,c,E):w(l,c))||E);return S>3&&E&&Object.defineProperty(l,c,E),E},v=this&&this.__param||function(h,l){return function(c,m){l(c,m,h)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const o=d(3734),g=d(643),y=d(511),b=d(2585);class f extends o.AttributeData{constructor(l,c,m){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=c,this._width=m}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=f;let r=a.CharacterJoinerService=class Zf{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(l){const c={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(c),c.id}deregister(l){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===l)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(l);if(!c||c.length===0)return[];const m=[],w=c.translateToString(!0);let S=0,E=0,p=0,C=c.getFg(0),L=c.getBg(0);for(let T=0;T<c.getTrimmedLength();T++)if(c.loadCell(T,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(T-S>1){const D=this._getJoinedRanges(w,p,E,c,S);for(let M=0;M<D.length;M++)m.push(D[M])}S=T,p=E,C=this._workCell.fg,L=this._workCell.bg}E+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const T=this._getJoinedRanges(w,p,E,c,S);for(let D=0;D<T.length;D++)m.push(T[D])}return m}_getJoinedRanges(l,c,m,w,S){const E=l.substring(c,m);let p=[];try{p=this._characterJoiners[0].handler(E)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(E);for(let T=0;T<L.length;T++)Zf._mergeRanges(p,L[T])}catch(L){console.error(L)}return this._stringRangesToCellRanges(p,w,S),p}_stringRangesToCellRanges(l,c,m){let w=0,S=!1,E=0,p=l[w];if(p){for(let C=m;C<this._bufferService.cols;C++){const L=c.getWidth(C),T=c.getString(C).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!S&&p[0]<=E&&(p[0]=C,S=!0),p[1]<=E){if(p[1]=C,p=l[++w],!p)break;p[0]<=E?(p[0]=C,S=!0):S=!1}E+=T}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(l,c){let m=!1;for(let w=0;w<l.length;w++){const S=l[w];if(m){if(c[1]<=S[0])return l[w-1][1]=c[1],l;if(c[1]<=S[1])return l[w-1][1]=Math.max(c[1],S[1]),l.splice(w,1),l;l.splice(w,1),w--}else{if(c[1]<=S[0])return l.splice(w,0,c),l;if(c[1]<=S[1])return S[0]=Math.min(c[0],S[0]),l;c[0]<S[1]&&(S[0]=Math.min(c[0],S[0]),m=!0)}}return m?l[l.length-1][1]=c[1]:l.push(c),l}};a.CharacterJoinerService=r=_([v(0,b.IBufferService)],r)},5114:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const _=d(844),v=d(8460),o=d(3656);class g extends _.Disposable{constructor(f,r,h){super(),this._textarea=f,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((l=>this._screenDprMonitor.setWindow(l)))),this.register((0,v.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(f){this._window!==f&&(this._window=f,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=g;class y extends _.Disposable{constructor(f){super(),this._parentWindow=f,this._windowResizeListener=this.register(new _.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,_.toDisposable)((()=>this.clearListener())))}setWindow(f){this._parentWindow=f,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,o.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var f;this._outerListener&&((f=this._resolutionMediaMatchList)==null||f.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:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const _=d(844);class v extends _.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,_.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const y=this.linkProviders.indexOf(g);y!==-1&&this.linkProviders.splice(y,1)}}}}a.LinkProviderService=v},8934:function(W,a,d){var _=this&&this.__decorate||function(b,f,r,h){var l,c=arguments.length,m=c<3?f:h===null?h=Object.getOwnPropertyDescriptor(f,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(b,f,r,h);else for(var w=b.length-1;w>=0;w--)(l=b[w])&&(m=(c<3?l(m):c>3?l(f,r,m):l(f,r))||m);return c>3&&m&&Object.defineProperty(f,r,m),m},v=this&&this.__param||function(b,f){return function(r,h){f(r,h,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const o=d(4725),g=d(9806);let y=a.MouseService=class{constructor(b,f){this._renderService=b,this._charSizeService=f}getCoords(b,f,r,h,l){return(0,g.getCoords)(window,b,f,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(b,f){const r=(0,g.getCoordsRelativeToElement)(window,b,f);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};a.MouseService=y=_([v(0,o.IRenderService),v(1,o.ICharSizeService)],y)},3230:function(W,a,d){var _=this&&this.__decorate||function(l,c,m,w){var S,E=arguments.length,p=E<3?c:w===null?w=Object.getOwnPropertyDescriptor(c,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,m,w);else for(var C=l.length-1;C>=0;C--)(S=l[C])&&(p=(E<3?S(p):E>3?S(c,m,p):S(c,m))||p);return E>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(l,c){return function(m,w){c(m,w,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const o=d(6193),g=d(4725),y=d(8460),b=d(844),f=d(7226),r=d(2585);let h=a.RenderService=class extends b.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(l,c,m,w,S,E,p,C){super(),this._rowCount=l,this._charSizeService=w,this._renderer=this.register(new b.MutableDisposable),this._pausedResizeTask=new f.DebouncedIdleTask,this._observerDisposable=this.register(new b.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 o.RenderDebouncer(((L,T)=>this._renderRows(L,T)),p),this.register(this._renderDebouncer),this.register(p.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(m.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(S.onDecorationRegistered((()=>this._fullRefresh()))),this.register(S.onDecorationRemoved((()=>this._fullRefresh()))),this.register(m.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(m.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register(C.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(p.window,c),this.register(p.onWindowChange((L=>this._registerIntersectionObserver(L,c))))}_registerIntersectionObserver(l,c){if("IntersectionObserver"in l){const m=new l.IntersectionObserver((w=>this._handleIntersectionChange(w[w.length-1])),{threshold:0});m.observe(c),this._observerDisposable.value=(0,b.toDisposable)((()=>m.disconnect()))}}_handleIntersectionChange(l){this._isPaused=l.isIntersecting===void 0?l.intersectionRatio===0:!l.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(l,c,m=!1){this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,c,this._rowCount))}_renderRows(l,c){this._renderer.value&&(l=Math.min(l,this._rowCount-1),c=Math.min(c,this._rowCount-1),this._renderer.value.renderRows(l,c),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:l,end:c}),this._onRender.fire({start:l,end:c}),this._isNextRenderRedrawOnly=!0)}resize(l,c){this._rowCount=c,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(l){this._renderer.value=l,this._renderer.value&&(this._renderer.value.onRequestRedraw((c=>this.refreshRows(c.start,c.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(l){return this._renderDebouncer.addRefreshCallback(l)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var l,c;this._renderer.value&&((c=(l=this._renderer.value).clearTextureAtlas)==null||c.call(l),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(l,c){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var m;return(m=this._renderer.value)==null?void 0:m.handleResize(l,c)})):this._renderer.value.handleResize(l,c),this._fullRefresh())}handleCharSizeChanged(){var l;(l=this._renderer.value)==null||l.handleCharSizeChanged()}handleBlur(){var l;(l=this._renderer.value)==null||l.handleBlur()}handleFocus(){var l;(l=this._renderer.value)==null||l.handleFocus()}handleSelectionChanged(l,c,m){var w;this._selectionState.start=l,this._selectionState.end=c,this._selectionState.columnSelectMode=m,(w=this._renderer.value)==null||w.handleSelectionChanged(l,c,m)}handleCursorMove(){var l;(l=this._renderer.value)==null||l.handleCursorMove()}clear(){var l;(l=this._renderer.value)==null||l.clear()}};a.RenderService=h=_([v(2,r.IOptionsService),v(3,g.ICharSizeService),v(4,r.IDecorationService),v(5,r.IBufferService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],h)},9312:function(W,a,d){var _=this&&this.__decorate||function(p,C,L,T){var D,M=arguments.length,N=M<3?C:T===null?T=Object.getOwnPropertyDescriptor(C,L):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(p,C,L,T);else for(var X=p.length-1;X>=0;X--)(D=p[X])&&(N=(M<3?D(N):M>3?D(C,L,N):D(C,L))||N);return M>3&&N&&Object.defineProperty(C,L,N),N},v=this&&this.__param||function(p,C){return function(L,T){C(L,T,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const o=d(9806),g=d(9504),y=d(456),b=d(4725),f=d(8460),r=d(844),h=d(6114),l=d(4841),c=d(511),m=d(2585),w=" ",S=new RegExp(w,"g");let E=a.SelectionService=class extends r.Disposable{constructor(p,C,L,T,D,M,N,X,z){super(),this._element=p,this._screenElement=C,this._linkifier=L,this._bufferService=T,this._coreService=D,this._mouseService=M,this._optionsService=N,this._renderService=X,this._coreBrowserService=z,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new c.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new f.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new f.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new f.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=U=>this._handleMouseMove(U),this._mouseUpListener=U=>this._handleMouseUp(U),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((U=>this._handleTrim(U))),this.register(this._bufferService.buffers.onBufferActivate((U=>this._handleBufferActivate(U)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const p=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;return!(!p||!C||p[0]===C[0]&&p[1]===C[1])}get selectionText(){const p=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;if(!p||!C)return"";const L=this._bufferService.buffer,T=[];if(this._activeSelectionMode===3){if(p[0]===C[0])return"";const D=p[0]<C[0]?p[0]:C[0],M=p[0]<C[0]?C[0]:p[0];for(let N=p[1];N<=C[1];N++){const X=L.translateBufferLineToString(N,!0,D,M);T.push(X)}}else{const D=p[1]===C[1]?C[0]:void 0;T.push(L.translateBufferLineToString(p[1],!0,p[0],D));for(let M=p[1]+1;M<=C[1]-1;M++){const N=L.lines.get(M),X=L.translateBufferLineToString(M,!0);N!=null&&N.isWrapped?T[T.length-1]+=X:T.push(X)}if(p[1]!==C[1]){const M=L.lines.get(C[1]),N=L.translateBufferLineToString(C[1],!0,0,C[0]);M&&M.isWrapped?T[T.length-1]+=N:T.push(N)}}return T.map((D=>D.replace(S," "))).join(h.isWindows?`\r
53
+ WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=y=_([v(0,g.IBufferService),v(1,g.IOptionsService),v(2,g.IOscLinkService)],y)},6193:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(d,_){this._renderCallback=d,this._coreBrowserService=_,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(d){return this._refreshCallbacks.push(d),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(d,_,v){this._rowCount=v,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const d of this._refreshCallbacks)d(0);this._refreshCallbacks=[]}}},3236:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const _=d(3614),v=d(3656),o=d(3551),g=d(9042),y=d(3730),b=d(1680),f=d(3107),r=d(5744),h=d(2950),l=d(1296),c=d(428),m=d(4269),w=d(5114),S=d(8934),E=d(3230),p=d(9312),C=d(4725),L=d(6731),T=d(8055),D=d(8969),M=d(8460),N=d(844),X=d(6114),z=d(8437),U=d(2584),q=d(7399),R=d(5941),H=d(9074),A=d(2585),O=d(5435),$=d(4567),V=d(779);class he extends D.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(j={}){super(j),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new N.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(A.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(V.LinkProviderService),this._instantiationService.setService(C.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((k,ie)=>this.refresh(k,ie)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((k=>this._reportWindowsOptions(k)))),this.register(this._inputHandler.onColor((k=>this._handleColorEvent(k)))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((k=>this._afterResize(k.cols,k.rows)))),this.register((0,N.toDisposable)((()=>{var k,ie;this._customKeyEventHandler=void 0,(ie=(k=this.element)==null?void 0:k.parentNode)==null||ie.removeChild(this.element)})))}_handleColorEvent(j){if(this._themeService)for(const k of j){let ie,ee="";switch(k.index){case 256:ie="foreground",ee="10";break;case 257:ie="background",ee="11";break;case 258:ie="cursor",ee="12";break;default:ie="ansi",ee="4;"+k.index}switch(k.type){case 0:const de=T.color.toColorRGB(ie==="ansi"?this._themeService.colors.ansi[k.index]:this._themeService.colors[ie]);this.coreService.triggerDataEvent(`${U.C0.ESC}]${ee};${(0,R.toRgbString)(de)}${U.C1_ESCAPED.ST}`);break;case 1:if(ie==="ansi")this._themeService.modifyColors((fe=>fe.ansi[k.index]=T.channels.toColor(...k.color)));else{const fe=ie;this._themeService.modifyColors((Ce=>Ce[fe]=T.channels.toColor(...k.color)))}break;case 2:this._themeService.restoreColor(k.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(j){j?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance($.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(j){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(U.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var j;return(j=this.textarea)==null?void 0:j.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(U.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 j=this.buffer.ybase+this.buffer.y,k=this.buffer.lines.get(j);if(!k)return;const ie=Math.min(this.buffer.x,this.cols-1),ee=this._renderService.dimensions.css.cell.height,de=k.getWidth(ie),fe=this._renderService.dimensions.css.cell.width*de,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,me=ie*this._renderService.dimensions.css.cell.width;this.textarea.style.left=me+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ee+"px",this.textarea.style.lineHeight=ee+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(k=>{this.hasSelection()&&(0,_.copyHandler)(k,this._selectionService)})));const j=k=>(0,_.handlePasteEvent)(k,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",j)),this.register((0,v.addDisposableDomListener)(this.element,"paste",j)),X.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(k=>{k.button===2&&(0,_.rightClickHandler)(k,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(k=>{(0,_.rightClickHandler)(k,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(k=>{k.button===1&&(0,_.moveTextAreaUnderMouseCursor)(k,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(j=>this._keyUp(j)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(j=>this._keyDown(j)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(j=>this._keyPress(j)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(j=>this._compositionHelper.compositionupdate(j)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(j=>this._inputEvent(j)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(j){var ie;if(!j)throw new Error("Terminal requires a parent element.");if(j.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ie=this.element)==null?void 0:ie.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=j.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"),j.appendChild(this.element);const k=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),k.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,v.addDisposableDomListener)(this.screenElement,"mousemove",(ee=>this.updateCursorStyle(ee)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),k.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),X.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(w.CoreBrowserService,this.textarea,j.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(C.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(ee=>this._handleTextAreaFocus(ee)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(C.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(C.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(m.CharacterJoinerService),this._instantiationService.setService(C.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(C.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ee=>this._onRender.fire(ee)))),this.onResize((ee=>this._renderService.resize(ee.cols,ee.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(C.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(o.Linkifier,this.screenElement)),this.element.appendChild(k);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(b.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(p.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(C.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ee=>this._renderService.handleSelectionChanged(ee.start,ee.end,ee.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ee=>{this.textarea.value=ee,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ee=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(f.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(ee=>this._selectionService.handleMouseDown(ee)))),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($.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ee=>this._handleScreenReaderModeOptionChange(ee)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ee=>{!this._overviewRulerRenderer&&ee&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(l.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const j=this,k=this.element;function ie(fe){const Ce=j._mouseService.getMouseReportCoords(fe,j.screenElement);if(!Ce)return!1;let me,ze;switch(fe.overrideType||fe.type){case"mousemove":ze=32,fe.buttons===void 0?(me=3,fe.button!==void 0&&(me=fe.button<3?fe.button:3)):me=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":ze=0,me=fe.button<3?fe.button:3;break;case"mousedown":ze=1,me=fe.button<3?fe.button:3;break;case"wheel":if(j._customWheelEventHandler&&j._customWheelEventHandler(fe)===!1||j.viewport.getLinesScrolled(fe)===0)return!1;ze=fe.deltaY<0?0:1,me=4;break;default:return!1}return!(ze===void 0||me===void 0||me>4)&&j.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:me,action:ze,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ee={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:fe=>(ie(fe),fe.buttons||(this._document.removeEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.removeEventListener("mousemove",ee.mousedrag)),this.cancel(fe)),wheel:fe=>(ie(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&ie(fe)},mousemove:fe=>{fe.buttons||ie(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?ee.mousemove||(k.addEventListener("mousemove",de.mousemove),ee.mousemove=de.mousemove):(k.removeEventListener("mousemove",ee.mousemove),ee.mousemove=null),16&fe?ee.wheel||(k.addEventListener("wheel",de.wheel,{passive:!1}),ee.wheel=de.wheel):(k.removeEventListener("wheel",ee.wheel),ee.wheel=null),2&fe?ee.mouseup||(ee.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",ee.mouseup),ee.mouseup=null),4&fe?ee.mousedrag||(ee.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",ee.mousedrag),ee.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(k,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return ie(fe),ee.mouseup&&this._document.addEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.addEventListener("mousemove",ee.mousedrag),this.cancel(fe)}))),this.register((0,v.addDisposableDomListener)(k,"wheel",(fe=>{if(!ee.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(fe);if(Ce===0)return;const me=U.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let ze="";for(let Ke=0;Ke<Math.abs(Ce);Ke++)ze+=me;return this.coreService.triggerDataEvent(ze,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(k,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(k,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(j,k){var ie;(ie=this._renderService)==null||ie.refreshRows(j,k)}updateCursorStyle(j){var k;(k=this._selectionService)!=null&&k.shouldColumnSelect(j)?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(j,k,ie=0){var ee;ie===1?(super.scrollLines(j,k,ie),this.refresh(0,this.rows-1)):(ee=this.viewport)==null||ee.scrollLines(j)}paste(j){(0,_.paste)(j,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(j){this._customKeyEventHandler=j}attachCustomWheelEventHandler(j){this._customWheelEventHandler=j}registerLinkProvider(j){return this._linkProviderService.registerLinkProvider(j)}registerCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const k=this._characterJoinerService.register(j);return this.refresh(0,this.rows-1),k}deregisterCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(j)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(j){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+j)}registerDecoration(j){return this._decorationService.registerDecoration(j)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(j,k,ie){this._selectionService.setSelection(j,k,ie)}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 j;(j=this._selectionService)==null||j.clearSelection()}selectAll(){var j;(j=this._selectionService)==null||j.selectAll()}selectLines(j,k){var ie;(ie=this._selectionService)==null||ie.selectLines(j,k)}_keyDown(j){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;const k=this.browser.isMac&&this.options.macOptionIsMeta&&j.altKey;if(!k&&!this._compositionHelper.keydown(j))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;k||j.key!=="Dead"&&j.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ie=(0,q.evaluateKeyboardEvent)(j,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(j),ie.type===3||ie.type===2){const ee=this.rows-1;return this.scrollLines(ie.type===2?-ee:ee),this.cancel(j,!0)}return ie.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,j)||(ie.cancel&&this.cancel(j,!0),!ie.key||!!(j.key&&!j.ctrlKey&&!j.altKey&&!j.metaKey&&j.key.length===1&&j.key.charCodeAt(0)>=65&&j.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ie.key!==U.C0.ETX&&ie.key!==U.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ie.key,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(ie.key,!0),!this.optionsService.rawOptions.screenReaderMode||j.altKey||j.ctrlKey?this.cancel(j,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(j,k){const ie=j.isMac&&!this.options.macOptionIsMeta&&k.altKey&&!k.ctrlKey&&!k.metaKey||j.isWindows&&k.altKey&&k.ctrlKey&&!k.metaKey||j.isWindows&&k.getModifierState("AltGraph");return k.type==="keypress"?ie:ie&&(!k.keyCode||k.keyCode>47)}_keyUp(j){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1||((function(k){return k.keyCode===16||k.keyCode===17||k.keyCode===18})(j)||this.focus(),this.updateCursorStyle(j),this._keyPressHandled=!1)}_keyPress(j){let k;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;if(this.cancel(j),j.charCode)k=j.charCode;else if(j.which===null||j.which===void 0)k=j.keyCode;else{if(j.which===0||j.charCode===0)return!1;k=j.which}return!(!k||(j.altKey||j.ctrlKey||j.metaKey)&&!this._isThirdLevelShift(this.browser,j)||(k=String.fromCharCode(k),this._onKey.fire({key:k,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(k,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(j){if(j.data&&j.inputType==="insertText"&&(!j.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const k=j.data;return this.coreService.triggerDataEvent(k,!0),this.cancel(j),!0}return!1}resize(j,k){j!==this.cols||k!==this.rows?super.resize(j,k):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(j,k){var ie,ee;(ie=this._charSizeService)==null||ie.measure(),(ee=this.viewport)==null||ee.syncScrollArea(!0)}clear(){var j;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 k=1;k<this.rows;k++)this.buffer.lines.push(this.buffer.getBlankLine(z.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(j=this.viewport)==null||j.reset(),this.refresh(0,this.rows-1)}}reset(){var k,ie;this.options.rows=this.rows,this.options.cols=this.cols;const j=this._customKeyEventHandler;this._setup(),super.reset(),(k=this._selectionService)==null||k.reset(),this._decorationService.reset(),(ie=this.viewport)==null||ie.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1)}clearTextureAtlas(){var j;(j=this._renderService)==null||j.clearTextureAtlas()}_reportFocus(){var j;(j=this.element)!=null&&j.classList.contains("focus")?this.coreService.triggerDataEvent(U.C0.ESC+"[I"):this.coreService.triggerDataEvent(U.C0.ESC+"[O")}_reportWindowsOptions(j){if(this._renderService)switch(j){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const k=this._renderService.dimensions.css.canvas.width.toFixed(0),ie=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${U.C0.ESC}[4;${ie};${k}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ee=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${U.C0.ESC}[6;${de};${ee}t`)}}cancel(j,k){if(this.options.cancelEvents||k)return j.preventDefault(),j.stopPropagation(),!1}}a.Terminal=he},9924:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(d,_=1e3){this._renderCallback=d,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(d,_,v){this._rowCount=v,d=d!==void 0?d:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;const o=Date.now();if(o-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=o,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=o-this._lastRefreshMs,y=this._debounceThresholdMS-g;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 d=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(d,_)}}},1680:function(W,a,d){var _=this&&this.__decorate||function(h,l,c,m){var w,S=arguments.length,E=S<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(h,l,c,m);else for(var p=h.length-1;p>=0;p--)(w=h[p])&&(E=(S<3?w(E):S>3?w(l,c,E):w(l,c))||E);return S>3&&E&&Object.defineProperty(l,c,E),E},v=this&&this.__param||function(h,l){return function(c,m){l(c,m,h)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const o=d(3656),g=d(4725),y=d(8460),b=d(844),f=d(2585);let r=a.Viewport=class extends b.Disposable{constructor(h,l,c,m,w,S,E,p){super(),this._viewportElement=h,this._scrollArea=l,this._bufferService=c,this._optionsService=m,this._charSizeService=w,this._renderService=S,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,o.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((C=>this._activeBuffer=C.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((C=>this._renderDimensions=C))),this._handleThemeChange(p.colors),this.register(p.onChangeColors((C=>this._handleThemeChange(C)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(h){if(h)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const l=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==l&&(this._lastRecordedBufferHeight=l,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const l=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(h,l){const c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(l<0&&this._viewportElement.scrollTop!==0||l>0&&c<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const l=this._getPixelsScrolled(h);return l!==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+l:this._smoothScrollState.target+=l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const l=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?l*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._currentRowHeight*this._bufferService.rows),l}getBufferElements(h,l){var p;let c,m="";const w=[],S=l??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let C=h;C<S;C++){const L=E.get(C);if(!L)continue;const T=(p=E.get(C+1))==null?void 0:p.isWrapped;if(m+=L.translateToString(!T),!T||C===E.length-1){const D=document.createElement("div");D.textContent=m,w.push(D),m.length>0&&(c=D),m=""}}return{bufferElements:w,cursorElement:c}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=this._currentRowHeight+0,this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(h,l){const c=this._optionsService.rawOptions.fastScrollModifier;return c==="alt"&&l.altKey||c==="ctrl"&&l.ctrlKey||c==="shift"&&l.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const l=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,l!==0&&(this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}};a.Viewport=r=_([v(2,f.IBufferService),v(3,f.IOptionsService),v(4,g.ICharSizeService),v(5,g.IRenderService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],r)},3107:function(W,a,d){var _=this&&this.__decorate||function(f,r,h,l){var c,m=arguments.length,w=m<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(f,r,h,l);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(w=(m<3?c(w):m>3?c(r,h,w):c(r,h))||w);return m>3&&w&&Object.defineProperty(r,h,w),w},v=this&&this.__param||function(f,r){return function(h,l){r(h,l,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const o=d(4725),g=d(844),y=d(2585);let b=a.BufferDecorationRenderer=class extends g.Disposable{constructor(f,r,h,l,c){super(),this._screenElement=f,this._bufferService=r,this._coreBrowserService=h,this._decorationService=l,this._renderService=c,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((m=>this._removeDecoration(m)))),this.register((0,g.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const f of this._decorationService.decorations)this._renderDecoration(f);this._dimensionsChanged=!1}_renderDecoration(f){this._refreshStyle(f),this._dimensionsChanged&&this._refreshXPosition(f)}_createElement(f){var l;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((l=f==null?void 0:f.options)==null?void 0:l.layer)==="top"),r.style.width=`${Math.round((f.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(f.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(f.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=f.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(f,r),r}_refreshStyle(f){const r=f.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)f.element&&(f.element.style.display="none",f.onRenderEmitter.fire(f.element));else{let h=this._decorationElements.get(f);h||(h=this._createElement(f),f.element=h,this._decorationElements.set(f,h),this._container.appendChild(h),f.onDispose((()=>{this._decorationElements.delete(f),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",f.onRenderEmitter.fire(h)}}_refreshXPosition(f,r=f.element){if(!r)return;const h=f.options.x??0;(f.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(f){var r;(r=this._decorationElements.get(f))==null||r.remove(),this._decorationElements.delete(f),f.dispose()}};a.BufferDecorationRenderer=b=_([v(1,y.IBufferService),v(2,o.ICoreBrowserService),v(3,y.IDecorationService),v(4,o.IRenderService)],b)},5871:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(d){if(d.options.overviewRulerOptions){for(const _ of this._zones)if(_.color===d.options.overviewRulerOptions.color&&_.position===d.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,d.marker.line))return;if(this._lineAdjacentToZone(_,d.marker.line,d.options.overviewRulerOptions.position))return void this._addLineToZone(_,d.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=d.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=d.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=d.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=d.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:d.options.overviewRulerOptions.color,position:d.options.overviewRulerOptions.position,startBufferLine:d.marker.line,endBufferLine:d.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(d){this._linePadding=d}_lineIntersectsZone(d,_){return _>=d.startBufferLine&&_<=d.endBufferLine}_lineAdjacentToZone(d,_,v){return _>=d.startBufferLine-this._linePadding[v||"full"]&&_<=d.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(d,_){d.startBufferLine=Math.min(d.startBufferLine,_),d.endBufferLine=Math.max(d.endBufferLine,_)}}},5744:function(W,a,d){var _=this&&this.__decorate||function(c,m,w,S){var E,p=arguments.length,C=p<3?m:S===null?S=Object.getOwnPropertyDescriptor(m,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,m,w,S);else for(var L=c.length-1;L>=0;L--)(E=c[L])&&(C=(p<3?E(C):p>3?E(m,w,C):E(m,w))||C);return p>3&&C&&Object.defineProperty(m,w,C),C},v=this&&this.__param||function(c,m){return function(w,S){m(w,S,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const o=d(5871),g=d(4725),y=d(844),b=d(2585),f={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let l=a.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(c,m,w,S,E,p,C){var T;super(),this._viewportElement=c,this._screenElement=m,this._bufferService=w,this._decorationService=S,this._renderService=E,this._optionsService=p,this._coreBrowserService=C,this._colorZoneStore=new o.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(),(T=this._viewportElement.parentElement)==null||T.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var D;(D=this._canvas)==null||D.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const c=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=c,r.center=m,r.right=c,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){f.full=Math.round(2*this._coreBrowserService.dpr);const c=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(c,12),6)*this._coreBrowserService.dpr);f.left=m,f.center=m,f.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const c=this._colorZoneStore.zones;for(const m of c)m.position!=="full"&&this._renderColorZone(m);for(const m of c)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(h[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-f[c.position||"full"]/2),r[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+f[c.position||"full"]))}_queueRefresh(c,m){this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=l=_([v(2,b.IBufferService),v(3,b.IDecorationService),v(4,g.IRenderService),v(5,b.IOptionsService),v(6,g.ICoreBrowserService)],l)},2950:function(W,a,d){var _=this&&this.__decorate||function(f,r,h,l){var c,m=arguments.length,w=m<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(f,r,h,l);else for(var S=f.length-1;S>=0;S--)(c=f[S])&&(w=(m<3?c(w):m>3?c(r,h,w):c(r,h))||w);return m>3&&w&&Object.defineProperty(r,h,w),w},v=this&&this.__param||function(f,r){return function(h,l){r(h,l,f)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const o=d(4725),g=d(2585),y=d(2584);let b=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(f,r,h,l,c,m){this._textarea=f,this._compositionView=r,this._bufferService=h,this._optionsService=l,this._coreService=c,this._renderService=m,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(f){this._compositionView.textContent=f.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(f){if(this._isComposing||this._isSendingComposition){if(f.keyCode===229||f.keyCode===16||f.keyCode===17||f.keyCode===18)return!1;this._finalizeComposition(!1)}return f.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(f){if(this._compositionView.classList.remove("active"),this._isComposing=!1,f){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const f=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(f,"");this._dataAlreadySent=h,r.length>f.length?this._coreService.triggerDataEvent(h,!0):r.length<f.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):r.length===f.length&&r!==f&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(f){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,c=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=l+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const m=this._compositionView.getBoundingClientRect();this._textarea.style.left=c+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(m.width,1)+"px",this._textarea.style.height=Math.max(m.height,1)+"px",this._textarea.style.lineHeight=m.height+"px"}f||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=b=_([v(2,g.IBufferService),v(3,g.IOptionsService),v(4,g.ICoreService),v(5,o.IRenderService)],b)},9806:(W,a)=>{function d(_,v,o){const g=o.getBoundingClientRect(),y=_.getComputedStyle(o),b=parseInt(y.getPropertyValue("padding-left")),f=parseInt(y.getPropertyValue("padding-top"));return[v.clientX-g.left-b,v.clientY-g.top-f]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=d,a.getCoords=function(_,v,o,g,y,b,f,r,h){if(!b)return;const l=d(_,v,o);return l?(l[0]=Math.ceil((l[0]+(h?f/2:0))/f),l[1]=Math.ceil(l[1]/r),l[0]=Math.min(Math.max(l[0],1),g+(h?1:0)),l[1]=Math.min(Math.max(l[1],1),y),l):void 0}},9504:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const _=d(2584);function v(r,h,l,c){const m=r-o(r,l),w=h-o(h,l),S=Math.abs(m-w)-(function(E,p,C){let L=0;const T=E-o(E,C),D=p-o(p,C);for(let M=0;M<Math.abs(T-D);M++){const N=g(E,p)==="A"?-1:1,X=C.buffer.lines.get(T+N*M);X!=null&&X.isWrapped&&L++}return L})(r,h,l);return f(S,b(g(r,h),c))}function o(r,h){let l=0,c=h.buffer.lines.get(r),m=c==null?void 0:c.isWrapped;for(;m&&r>=0&&r<h.rows;)l++,c=h.buffer.lines.get(--r),m=c==null?void 0:c.isWrapped;return l}function g(r,h){return r>h?"A":"B"}function y(r,h,l,c,m,w){let S=r,E=h,p="";for(;S!==l||E!==c;)S+=m?1:-1,m&&S>w.cols-1?(p+=w.buffer.translateBufferLineToString(E,!1,r,S),S=0,r=0,E++):!m&&S<0&&(p+=w.buffer.translateBufferLineToString(E,!1,0,r+1),S=w.cols-1,r=S,E--);return p+w.buffer.translateBufferLineToString(E,!1,r,S)}function b(r,h){const l=h?"O":"[";return _.C0.ESC+l+r}function f(r,h){r=Math.floor(r);let l="";for(let c=0;c<r;c++)l+=h;return l}a.moveToCellSequence=function(r,h,l,c){const m=l.buffer.x,w=l.buffer.y;if(!l.buffer.hasScrollback)return(function(p,C,L,T,D,M){return v(C,T,D,M).length===0?"":f(y(p,C,p,C-o(C,D),!1,D).length,b("D",M))})(m,w,0,h,l,c)+v(w,h,l,c)+(function(p,C,L,T,D,M){let N;N=v(C,T,D,M).length>0?T-o(T,D):C;const X=T,z=(function(U,q,R,H,A,O){let $;return $=v(R,H,A,O).length>0?H-o(H,A):q,U<R&&$<=H||U>=R&&$<H?"C":"D"})(p,C,L,T,D,M);return f(y(p,N,L,X,z==="C",D).length,b(z,M))})(m,w,r,h,l,c);let S;if(w===h)return S=m>r?"D":"C",f(Math.abs(m-r),b(S,c));S=w>h?"D":"C";const E=Math.abs(w-h);return f((function(p,C){return C.cols-p})(w>h?r:m,l)+(E-1)*l.cols+1+((w>h?m:r)-1),b(S,c))}},1296:function(W,a,d){var _=this&&this.__decorate||function(M,N,X,z){var U,q=arguments.length,R=q<3?N:z===null?z=Object.getOwnPropertyDescriptor(N,X):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(M,N,X,z);else for(var H=M.length-1;H>=0;H--)(U=M[H])&&(R=(q<3?U(R):q>3?U(N,X,R):U(N,X))||R);return q>3&&R&&Object.defineProperty(N,X,R),R},v=this&&this.__param||function(M,N){return function(X,z){N(X,z,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const o=d(3787),g=d(2550),y=d(2223),b=d(6171),f=d(6052),r=d(4725),h=d(8055),l=d(8460),c=d(844),m=d(2585),w="xterm-dom-renderer-owner-",S="xterm-rows",E="xterm-fg-",p="xterm-bg-",C="xterm-focus",L="xterm-selection";let T=1,D=a.DomRenderer=class extends c.Disposable{constructor(M,N,X,z,U,q,R,H,A,O,$,V,he){super(),this._terminal=M,this._document=N,this._element=X,this._screenElement=z,this._viewportElement=U,this._helperContainer=q,this._linkifier2=R,this._charSizeService=A,this._optionsService=O,this._bufferService=$,this._coreBrowserService=V,this._themeService=he,this._terminalClass=T++,this._rowElements=[],this._selectionRenderModel=(0,f.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new l.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,b.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(o.DomRendererRowFactory,document),this._element.classList.add(w+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,c.toDisposable)((()=>{this._element.classList.remove(w+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const N=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=N,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let N=`${this._terminalSelector} .${S} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;N+=`${this._terminalSelector} .${S} .xterm-dim { color: ${h.color.multiplyOpacity(M.foreground,.5).css};}`,N+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const X=`blink_underline_${this._terminalClass}`,z=`blink_bar_${this._terminalClass}`,U=`blink_block_${this._terminalClass}`;N+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,N+=`@keyframes ${z} { 50% { box-shadow: none; }}`,N+=`@keyframes ${U} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,N+=`${this._terminalSelector} .${S}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${S}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${z} 1s step-end infinite;}${this._terminalSelector} .${S}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,N+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[q,R]of M.ansi.entries())N+=`${this._terminalSelector} .${E}${q} { color: ${R.css}; }${this._terminalSelector} .${E}${q}.xterm-dim { color: ${h.color.multiplyOpacity(R,.5).css}; }${this._terminalSelector} .${p}${q} { background-color: ${R.css}; }`;N+=`${this._terminalSelector} .${E}${y.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(M.background).css}; }${this._terminalSelector} .${E}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${p}${y.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=N}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,N){for(let X=this._rowElements.length;X<=N;X++){const z=this._document.createElement("div");this._rowContainer.appendChild(z),this._rowElements.push(z)}for(;this._rowElements.length>N;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,N){this._refreshRowElements(M,N),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(C),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(C),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(M,N,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,N,X),this.renderRows(0,this._bufferService.rows-1),!M||!N)return;this._selectionRenderModel.update(this._terminal,M,N,X);const z=this._selectionRenderModel.viewportStartRow,U=this._selectionRenderModel.viewportEndRow,q=this._selectionRenderModel.viewportCappedStartRow,R=this._selectionRenderModel.viewportCappedEndRow;if(q>=this._bufferService.rows||R<0)return;const H=this._document.createDocumentFragment();if(X){const A=M[0]>N[0];H.appendChild(this._createSelectionElement(q,A?N[0]:M[0],A?M[0]:N[0],R-q+1))}else{const A=z===q?M[0]:0,O=q===U?N[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(q,A,O));const $=R-q-1;if(H.appendChild(this._createSelectionElement(q+1,0,this._bufferService.cols,$)),q!==R){const V=U===R?N[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(R,0,V))}}this._selectionContainer.appendChild(H)}_createSelectionElement(M,N,X,z=1){const U=this._document.createElement("div"),q=N*this.dimensions.css.cell.width;let R=this.dimensions.css.cell.width*(X-N);return q+R>this.dimensions.css.canvas.width&&(R=this.dimensions.css.canvas.width-q),U.style.height=z*this.dimensions.css.cell.height+"px",U.style.top=M*this.dimensions.css.cell.height+"px",U.style.left=`${q}px`,U.style.width=`${R}px`,U}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const M of this._rowElements)M.replaceChildren()}renderRows(M,N){const X=this._bufferService.buffer,z=X.ybase+X.y,U=Math.min(X.x,this._bufferService.cols-1),q=this._optionsService.rawOptions.cursorBlink,R=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let A=M;A<=N;A++){const O=A+X.ydisp,$=this._rowElements[A],V=X.lines.get(O);if(!$||!V)break;$.replaceChildren(...this._rowFactory.createRow(V,O,O===z,R,H,U,q,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${w}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,N,X,z,U,q){X<0&&(M=0),z<0&&(N=0);const R=this._bufferService.rows-1;X=Math.max(Math.min(X,R),0),z=Math.max(Math.min(z,R),0),U=Math.min(U,this._bufferService.cols);const H=this._bufferService.buffer,A=H.ybase+H.y,O=Math.min(H.x,U-1),$=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=X;ue<=z;++ue){const j=ue+H.ydisp,k=this._rowElements[ue],ie=H.lines.get(j);if(!k||!ie)break;k.replaceChildren(...this._rowFactory.createRow(ie,j,j===A,V,he,O,$,this.dimensions.css.cell.width,this._widthCache,q?ue===X?M:0:-1,q?(ue===z?N:U)-1:-1))}}};a.DomRenderer=D=_([v(7,m.IInstantiationService),v(8,r.ICharSizeService),v(9,m.IOptionsService),v(10,m.IBufferService),v(11,r.ICoreBrowserService),v(12,r.IThemeService)],D)},3787:function(W,a,d){var _=this&&this.__decorate||function(S,E,p,C){var L,T=arguments.length,D=T<3?E:C===null?C=Object.getOwnPropertyDescriptor(E,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,E,p,C);else for(var M=S.length-1;M>=0;M--)(L=S[M])&&(D=(T<3?L(D):T>3?L(E,p,D):L(E,p))||D);return T>3&&D&&Object.defineProperty(E,p,D),D},v=this&&this.__param||function(S,E){return function(p,C){E(p,C,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const o=d(2223),g=d(643),y=d(511),b=d(2585),f=d(8055),r=d(4725),h=d(4269),l=d(6171),c=d(3734);let m=a.DomRendererRowFactory=class{constructor(S,E,p,C,L,T,D){this._document=S,this._characterJoinerService=E,this._optionsService=p,this._coreBrowserService=C,this._coreService=L,this._decorationService=T,this._themeService=D,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,E,p){this._selectionStart=S,this._selectionEnd=E,this._columnSelectMode=p}createRow(S,E,p,C,L,T,D,M,N,X,z){const U=[],q=this._characterJoinerService.getJoinedCharacters(E),R=this._themeService.colors;let H,A=S.getNoBgTrimmedLength();p&&A<T+1&&(A=T+1);let O=0,$="",V=0,he=0,ue=0,j=!1,k=0,ie=!1,ee=0;const de=[],fe=X!==-1&&z!==-1;for(let Ce=0;Ce<A;Ce++){S.loadCell(Ce,this._workCell);let me=this._workCell.getWidth();if(me===0)continue;let ze=!1,Ke=Ce,Se=this._workCell;if(q.length>0&&Ce===q[0][0]){ze=!0;const Ae=q.shift();Se=new h.JoinedCellData(this._workCell,S.translateToString(!0,Ae[0],Ae[1]),Ae[1]-Ae[0]),Ke=Ae[1]-1,me=Se.getWidth()}const Dt=this._isCellInSelection(Ce,E),Jt=p&&Ce===T,Te=fe&&Ce>=X&&Ce<=z;let Le=!1;this._decorationService.forEachDecorationAtCell(Ce,E,void 0,(Ae=>{Le=!0}));let Re=Se.getChars()||g.WHITESPACE_CELL_CHAR;if(Re===" "&&(Se.isUnderline()||Se.isOverline())&&(Re=" "),ee=me*M-N.get(Re,Se.isBold(),Se.isItalic()),H){if(O&&(Dt&&ie||!Dt&&!ie&&Se.bg===V)&&(Dt&&ie&&R.selectionForeground||Se.fg===he)&&Se.extended.ext===ue&&Te===j&&ee===k&&!Jt&&!ze&&!Le){Se.isInvisible()?$+=g.WHITESPACE_CELL_CHAR:$+=Re,O++;continue}O&&(H.textContent=$),H=this._document.createElement("span"),O=0,$=""}else H=this._document.createElement("span");if(V=Se.bg,he=Se.fg,ue=Se.extended.ext,j=Te,k=ee,ie=Dt,ze&&T>=Ce&&T<=Ke&&(T=Ce),!this._coreService.isCursorHidden&&Jt&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)D&&de.push("xterm-cursor-blink"),de.push(C==="bar"?"xterm-cursor-bar":C==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){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"),$=Se.isInvisible()?g.WHITESPACE_CELL_CHAR:Se.getChars()||g.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(de.push(`xterm-underline-${Se.extended.underlineStyle}`),$===" "&&($=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${c.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let Ae=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&Ae<8&&(Ae+=8),H.style.textDecorationColor=R.ansi[Ae].css}Se.isOverline()&&(de.push("xterm-overline"),$===" "&&($=" ")),Se.isStrikethrough()&&de.push("xterm-strikethrough"),Te&&(H.style.textDecoration="underline");let _e=Se.getFgColor(),be=Se.getFgColorMode(),Qe=Se.getBgColor(),Pe=Se.getBgColorMode();const Ut=!!Se.isInverse();if(Ut){const Ae=_e;_e=Qe,Qe=Ae;const Vt=be;be=Pe,Pe=Vt}let ot,bt,Je,qe=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,E,void 0,(Ae=>{Ae.options.layer!=="top"&&qe||(Ae.backgroundColorRGB&&(Pe=50331648,Qe=Ae.backgroundColorRGB.rgba>>8&16777215,ot=Ae.backgroundColorRGB),Ae.foregroundColorRGB&&(be=50331648,_e=Ae.foregroundColorRGB.rgba>>8&16777215,bt=Ae.foregroundColorRGB),qe=Ae.options.layer==="top")})),!qe&&Dt&&(ot=this._coreBrowserService.isFocused?R.selectionBackgroundOpaque:R.selectionInactiveBackgroundOpaque,Qe=ot.rgba>>8&16777215,Pe=50331648,qe=!0,R.selectionForeground&&(be=50331648,_e=R.selectionForeground.rgba>>8&16777215,bt=R.selectionForeground)),qe&&de.push("xterm-decoration-top"),Pe){case 16777216:case 33554432:Je=R.ansi[Qe],de.push(`xterm-bg-${Qe}`);break;case 50331648:Je=f.channels.toColor(Qe>>16,Qe>>8&255,255&Qe),this._addStyle(H,`background-color:#${w((Qe>>>0).toString(16),"0",6)}`);break;default:Ut?(Je=R.foreground,de.push(`xterm-bg-${o.INVERTED_DEFAULT_COLOR}`)):Je=R.background}switch(ot||Se.isDim()&&(ot=f.color.multiplyOpacity(Je,.5)),be){case 16777216:case 33554432:Se.isBold()&&_e<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(_e+=8),this._applyMinimumContrast(H,Je,R.ansi[_e],Se,ot,void 0)||de.push(`xterm-fg-${_e}`);break;case 50331648:const Ae=f.channels.toColor(_e>>16&255,_e>>8&255,255&_e);this._applyMinimumContrast(H,Je,Ae,Se,ot,bt)||this._addStyle(H,`color:#${w(_e.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,Je,R.foreground,Se,ot,bt)||Ut&&de.push(`xterm-fg-${o.INVERTED_DEFAULT_COLOR}`)}de.length&&(H.className=de.join(" "),de.length=0),Jt||ze||Le?H.textContent=$:O++,ee!==this.defaultSpacing&&(H.style.letterSpacing=`${ee}px`),U.push(H),Ce=Ke}return H&&O&&(H.textContent=$),U}_applyMinimumContrast(S,E,p,C,L,T){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.treatGlyphAsBackgroundColor)(C.getCode()))return!1;const D=this._getContrastCache(C);let M;if(L||T||(M=D.getColor(E.rgba,p.rgba)),M===void 0){const N=this._optionsService.rawOptions.minimumContrastRatio/(C.isDim()?2:1);M=f.color.ensureContrastRatio(L||E,T||p,N),D.setColor((L||E).rgba,(T||p).rgba,M??null)}return!!M&&(this._addStyle(S,`color:${M.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,E){S.setAttribute("style",`${S.getAttribute("style")||""}${E};`)}_isCellInSelection(S,E){const p=this._selectionStart,C=this._selectionEnd;return!(!p||!C)&&(this._columnSelectMode?p[0]<=C[0]?S>=p[0]&&E>=p[1]&&S<C[0]&&E<=C[1]:S<p[0]&&E>=p[1]&&S>=C[0]&&E<=C[1]:E>p[1]&&E<C[1]||p[1]===C[1]&&E===p[1]&&S>=p[0]&&S<C[0]||p[1]<C[1]&&E===C[1]&&S<C[0]||p[1]<C[1]&&E===p[1]&&S>=p[0])}};function w(S,E,p){for(;S.length<p;)S=E+S;return S}a.DomRendererRowFactory=m=_([v(1,r.ICharacterJoinerService),v(2,b.IOptionsService),v(3,r.ICoreBrowserService),v(4,b.ICoreService),v(5,b.IDecorationService),v(6,r.IThemeService)],m)},2550:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(d,_){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=d.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const v=d.createElement("span");v.classList.add("xterm-char-measure-element");const o=d.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold";const g=d.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const y=d.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[v,o,g,y],this._container.appendChild(v),this._container.appendChild(o),this._container.appendChild(g),this._container.appendChild(y),_.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(d,_,v,o){d===this._font&&_===this._fontSize&&v===this._weight&&o===this._weightBold||(this._font=d,this._fontSize=_,this._weight=v,this._weightBold=o,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${o}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${o}`,this.clear())}get(d,_,v){let o=0;if(!_&&!v&&d.length===1&&(o=d.charCodeAt(0))<256){if(this._flat[o]!==-9999)return this._flat[o];const b=this._measure(d,0);return b>0&&(this._flat[o]=b),b}let g=d;_&&(g+="B"),v&&(g+="I");let y=this._holey.get(g);if(y===void 0){let b=0;_&&(b|=1),v&&(b|=2),y=this._measure(d,b),y>0&&this._holey.set(g,y)}return y}_measure(d,_){const v=this._measureElements[_];return v.textContent=d.repeat(32),v.offsetWidth/32}}},2223:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const _=d(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:(W,a)=>{function d(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},a.isEmoji=_,a.allowRescaling=function(v,o,g,y){return o===1&&g>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!_(v)&&!d(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},a.treatGlyphAsBackgroundColor=function(v){return d(v)||(function(o){return 9472<=o&&o<=9631})(v)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(v,o,g=0){return(v-(2*Math.round(o)-g))%(2*Math.round(o))}},6052:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,o,g,y=!1){if(this.selectionStart=o,this.selectionEnd=g,!o||!g||o[0]===g[0]&&o[1]===g[1])return void this.clear();const b=v.buffers.active.ydisp,f=o[1]-b,r=g[1]-b,h=Math.max(f,0),l=Math.min(r,v.rows-1);h>=v.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=f,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=o[0],this.endCol=g[0])}isCellSelected(v,o,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&g>=this.viewportCappedStartRow&&o<this.endCol&&g<=this.viewportCappedEndRow:o<this.startCol&&g>=this.viewportCappedStartRow&&o>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&o>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},456:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(d){this._bufferService=d,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 d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?d%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)-1]:[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[Math.max(d,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const d=this.selectionStart,_=this.selectionEnd;return!(!d||!_)&&(d[1]>_[1]||d[1]===_[1]&&d[0]>_[0])}handleTrim(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(W,a,d){var _=this&&this.__decorate||function(l,c,m,w){var S,E=arguments.length,p=E<3?c:w===null?w=Object.getOwnPropertyDescriptor(c,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,m,w);else for(var C=l.length-1;C>=0;C--)(S=l[C])&&(p=(E<3?S(p):E>3?S(c,m,p):S(c,m))||p);return E>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(l,c){return function(m,w){c(m,w,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const o=d(2585),g=d(8460),y=d(844);let b=a.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,c,m){super(),this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(l,c,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};a.CharSizeService=b=_([v(2,o.IOptionsService)],b);class f extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(c,m){c!==void 0&&c>0&&m!==void 0&&m>0&&(this._result.width=c,this._result.height=m)}}class r extends f{constructor(c,m,w){super(),this._document=c,this._parentElement=m,this._optionsService=w,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class h extends f{constructor(c){super(),this._optionsService=c,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const m=this._ctx.measureText("W");if(!("width"in m&&"fontBoundingBoxAscent"in m&&"fontBoundingBoxDescent"in m))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const c=this._ctx.measureText("W");return this._validateAndSet(c.width,c.fontBoundingBoxAscent+c.fontBoundingBoxDescent),this._result}}},4269:function(W,a,d){var _=this&&this.__decorate||function(h,l,c,m){var w,S=arguments.length,E=S<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(h,l,c,m);else for(var p=h.length-1;p>=0;p--)(w=h[p])&&(E=(S<3?w(E):S>3?w(l,c,E):w(l,c))||E);return S>3&&E&&Object.defineProperty(l,c,E),E},v=this&&this.__param||function(h,l){return function(c,m){l(c,m,h)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const o=d(3734),g=d(643),y=d(511),b=d(2585);class f extends o.AttributeData{constructor(l,c,m){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=c,this._width=m}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=f;let r=a.CharacterJoinerService=class Zf{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(l){const c={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(c),c.id}deregister(l){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===l)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(l);if(!c||c.length===0)return[];const m=[],w=c.translateToString(!0);let S=0,E=0,p=0,C=c.getFg(0),L=c.getBg(0);for(let T=0;T<c.getTrimmedLength();T++)if(c.loadCell(T,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(T-S>1){const D=this._getJoinedRanges(w,p,E,c,S);for(let M=0;M<D.length;M++)m.push(D[M])}S=T,p=E,C=this._workCell.fg,L=this._workCell.bg}E+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const T=this._getJoinedRanges(w,p,E,c,S);for(let D=0;D<T.length;D++)m.push(T[D])}return m}_getJoinedRanges(l,c,m,w,S){const E=l.substring(c,m);let p=[];try{p=this._characterJoiners[0].handler(E)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(E);for(let T=0;T<L.length;T++)Zf._mergeRanges(p,L[T])}catch(L){console.error(L)}return this._stringRangesToCellRanges(p,w,S),p}_stringRangesToCellRanges(l,c,m){let w=0,S=!1,E=0,p=l[w];if(p){for(let C=m;C<this._bufferService.cols;C++){const L=c.getWidth(C),T=c.getString(C).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!S&&p[0]<=E&&(p[0]=C,S=!0),p[1]<=E){if(p[1]=C,p=l[++w],!p)break;p[0]<=E?(p[0]=C,S=!0):S=!1}E+=T}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(l,c){let m=!1;for(let w=0;w<l.length;w++){const S=l[w];if(m){if(c[1]<=S[0])return l[w-1][1]=c[1],l;if(c[1]<=S[1])return l[w-1][1]=Math.max(c[1],S[1]),l.splice(w,1),l;l.splice(w,1),w--}else{if(c[1]<=S[0])return l.splice(w,0,c),l;if(c[1]<=S[1])return S[0]=Math.min(c[0],S[0]),l;c[0]<S[1]&&(S[0]=Math.min(c[0],S[0]),m=!0)}}return m?l[l.length-1][1]=c[1]:l.push(c),l}};a.CharacterJoinerService=r=_([v(0,b.IBufferService)],r)},5114:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const _=d(844),v=d(8460),o=d(3656);class g extends _.Disposable{constructor(f,r,h){super(),this._textarea=f,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((l=>this._screenDprMonitor.setWindow(l)))),this.register((0,v.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(f){this._window!==f&&(this._window=f,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=g;class y extends _.Disposable{constructor(f){super(),this._parentWindow=f,this._windowResizeListener=this.register(new _.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,_.toDisposable)((()=>this.clearListener())))}setWindow(f){this._parentWindow=f,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,o.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var f;this._outerListener&&((f=this._resolutionMediaMatchList)==null||f.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:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const _=d(844);class v extends _.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,_.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const y=this.linkProviders.indexOf(g);y!==-1&&this.linkProviders.splice(y,1)}}}}a.LinkProviderService=v},8934:function(W,a,d){var _=this&&this.__decorate||function(b,f,r,h){var l,c=arguments.length,m=c<3?f:h===null?h=Object.getOwnPropertyDescriptor(f,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(b,f,r,h);else for(var w=b.length-1;w>=0;w--)(l=b[w])&&(m=(c<3?l(m):c>3?l(f,r,m):l(f,r))||m);return c>3&&m&&Object.defineProperty(f,r,m),m},v=this&&this.__param||function(b,f){return function(r,h){f(r,h,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const o=d(4725),g=d(9806);let y=a.MouseService=class{constructor(b,f){this._renderService=b,this._charSizeService=f}getCoords(b,f,r,h,l){return(0,g.getCoords)(window,b,f,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(b,f){const r=(0,g.getCoordsRelativeToElement)(window,b,f);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};a.MouseService=y=_([v(0,o.IRenderService),v(1,o.ICharSizeService)],y)},3230:function(W,a,d){var _=this&&this.__decorate||function(l,c,m,w){var S,E=arguments.length,p=E<3?c:w===null?w=Object.getOwnPropertyDescriptor(c,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,m,w);else for(var C=l.length-1;C>=0;C--)(S=l[C])&&(p=(E<3?S(p):E>3?S(c,m,p):S(c,m))||p);return E>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(l,c){return function(m,w){c(m,w,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const o=d(6193),g=d(4725),y=d(8460),b=d(844),f=d(7226),r=d(2585);let h=a.RenderService=class extends b.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(l,c,m,w,S,E,p,C){super(),this._rowCount=l,this._charSizeService=w,this._renderer=this.register(new b.MutableDisposable),this._pausedResizeTask=new f.DebouncedIdleTask,this._observerDisposable=this.register(new b.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 o.RenderDebouncer(((L,T)=>this._renderRows(L,T)),p),this.register(this._renderDebouncer),this.register(p.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(m.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(S.onDecorationRegistered((()=>this._fullRefresh()))),this.register(S.onDecorationRemoved((()=>this._fullRefresh()))),this.register(m.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(m.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register(C.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(p.window,c),this.register(p.onWindowChange((L=>this._registerIntersectionObserver(L,c))))}_registerIntersectionObserver(l,c){if("IntersectionObserver"in l){const m=new l.IntersectionObserver((w=>this._handleIntersectionChange(w[w.length-1])),{threshold:0});m.observe(c),this._observerDisposable.value=(0,b.toDisposable)((()=>m.disconnect()))}}_handleIntersectionChange(l){this._isPaused=l.isIntersecting===void 0?l.intersectionRatio===0:!l.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(l,c,m=!1){this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,c,this._rowCount))}_renderRows(l,c){this._renderer.value&&(l=Math.min(l,this._rowCount-1),c=Math.min(c,this._rowCount-1),this._renderer.value.renderRows(l,c),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:l,end:c}),this._onRender.fire({start:l,end:c}),this._isNextRenderRedrawOnly=!0)}resize(l,c){this._rowCount=c,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(l){this._renderer.value=l,this._renderer.value&&(this._renderer.value.onRequestRedraw((c=>this.refreshRows(c.start,c.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(l){return this._renderDebouncer.addRefreshCallback(l)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var l,c;this._renderer.value&&((c=(l=this._renderer.value).clearTextureAtlas)==null||c.call(l),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(l,c){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var m;return(m=this._renderer.value)==null?void 0:m.handleResize(l,c)})):this._renderer.value.handleResize(l,c),this._fullRefresh())}handleCharSizeChanged(){var l;(l=this._renderer.value)==null||l.handleCharSizeChanged()}handleBlur(){var l;(l=this._renderer.value)==null||l.handleBlur()}handleFocus(){var l;(l=this._renderer.value)==null||l.handleFocus()}handleSelectionChanged(l,c,m){var w;this._selectionState.start=l,this._selectionState.end=c,this._selectionState.columnSelectMode=m,(w=this._renderer.value)==null||w.handleSelectionChanged(l,c,m)}handleCursorMove(){var l;(l=this._renderer.value)==null||l.handleCursorMove()}clear(){var l;(l=this._renderer.value)==null||l.clear()}};a.RenderService=h=_([v(2,r.IOptionsService),v(3,g.ICharSizeService),v(4,r.IDecorationService),v(5,r.IBufferService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],h)},9312:function(W,a,d){var _=this&&this.__decorate||function(p,C,L,T){var D,M=arguments.length,N=M<3?C:T===null?T=Object.getOwnPropertyDescriptor(C,L):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(p,C,L,T);else for(var X=p.length-1;X>=0;X--)(D=p[X])&&(N=(M<3?D(N):M>3?D(C,L,N):D(C,L))||N);return M>3&&N&&Object.defineProperty(C,L,N),N},v=this&&this.__param||function(p,C){return function(L,T){C(L,T,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const o=d(9806),g=d(9504),y=d(456),b=d(4725),f=d(8460),r=d(844),h=d(6114),l=d(4841),c=d(511),m=d(2585),w=" ",S=new RegExp(w,"g");let E=a.SelectionService=class extends r.Disposable{constructor(p,C,L,T,D,M,N,X,z){super(),this._element=p,this._screenElement=C,this._linkifier=L,this._bufferService=T,this._coreService=D,this._mouseService=M,this._optionsService=N,this._renderService=X,this._coreBrowserService=z,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new c.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new f.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new f.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new f.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=U=>this._handleMouseMove(U),this._mouseUpListener=U=>this._handleMouseUp(U),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((U=>this._handleTrim(U))),this.register(this._bufferService.buffers.onBufferActivate((U=>this._handleBufferActivate(U)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const p=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;return!(!p||!C||p[0]===C[0]&&p[1]===C[1])}get selectionText(){const p=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;if(!p||!C)return"";const L=this._bufferService.buffer,T=[];if(this._activeSelectionMode===3){if(p[0]===C[0])return"";const D=p[0]<C[0]?p[0]:C[0],M=p[0]<C[0]?C[0]:p[0];for(let N=p[1];N<=C[1];N++){const X=L.translateBufferLineToString(N,!0,D,M);T.push(X)}}else{const D=p[1]===C[1]?C[0]:void 0;T.push(L.translateBufferLineToString(p[1],!0,p[0],D));for(let M=p[1]+1;M<=C[1]-1;M++){const N=L.lines.get(M),X=L.translateBufferLineToString(M,!0);N!=null&&N.isWrapped?T[T.length-1]+=X:T.push(X)}if(p[1]!==C[1]){const M=L.lines.get(C[1]),N=L.translateBufferLineToString(C[1],!0,0,C[0]);M&&M.isWrapped?T[T.length-1]+=N:T.push(N)}}return T.map((D=>D.replace(S," "))).join(h.isWindows?`\r
54
54
  `:`
55
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(p){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&p&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(p){const C=this._getMouseBufferCoords(p),L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!!(L&&T&&C)&&this._areCoordsInSelection(C,L,T)}isCellInSelection(p,C){const L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!(!L||!T)&&this._areCoordsInSelection([p,C],L,T)}_areCoordsInSelection(p,C,L){return p[1]>C[1]&&p[1]<L[1]||C[1]===L[1]&&p[1]===C[1]&&p[0]>=C[0]&&p[0]<L[0]||C[1]<L[1]&&p[1]===L[1]&&p[0]<L[0]||C[1]<L[1]&&p[1]===C[1]&&p[0]>=C[0]}_selectWordAtCursor(p,C){var D,M;const L=(M=(D=this._linkifier.currentLink)==null?void 0:D.link)==null?void 0:M.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const T=this._getMouseBufferCoords(p);return!!T&&(this._selectWordAt(T,C),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(p,C){this._model.clearSelection(),p=Math.max(p,0),C=Math.min(C,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,p],this._model.selectionEnd=[this._bufferService.cols,C],this.refresh(),this._onSelectionChange.fire()}_handleTrim(p){this._model.handleTrim(p)&&this.refresh()}_getMouseBufferCoords(p){const C=this._mouseService.getCoords(p,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(C)return C[0]--,C[1]--,C[1]+=this._bufferService.buffer.ydisp,C}_getMouseEventScrollAmount(p){let C=(0,o.getCoordsRelativeToElement)(this._coreBrowserService.window,p,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return C>=0&&C<=L?0:(C>L&&(C-=L),C=Math.min(Math.max(C,-50),50),C/=50,C/Math.abs(C)+Math.round(14*C))}shouldForceSelection(p){return h.isMac?p.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:p.shiftKey}handleMouseDown(p){if(this._mouseDownTimeStamp=p.timeStamp,(p.button!==2||!this.hasSelection)&&p.button===0){if(!this._enabled){if(!this.shouldForceSelection(p))return;p.stopPropagation()}p.preventDefault(),this._dragScrollAmount=0,this._enabled&&p.shiftKey?this._handleIncrementalClick(p):p.detail===1?this._handleSingleClick(p):p.detail===2?this._handleDoubleClick(p):p.detail===3&&this._handleTripleClick(p),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(p){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(p))}_handleSingleClick(p){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(p)?3:0,this._model.selectionStart=this._getMouseBufferCoords(p),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const C=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);C&&C.length!==this._model.selectionStart[0]&&C.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(p){this._selectWordAtCursor(p,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(p){const C=this._getMouseBufferCoords(p);C&&(this._activeSelectionMode=2,this._selectLineAt(C[1]))}shouldColumnSelect(p){return p.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(p){if(p.stopImmediatePropagation(),!this._model.selectionStart)return;const C=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(p),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(p),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const T=L.lines.get(this._model.selectionEnd[1]);T&&T.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}C&&C[0]===this._model.selectionEnd[0]&&C[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const p=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(p.ydisp+this._bufferService.rows,p.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=p.ydisp),this.refresh()}}_handleMouseUp(p){const C=p.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&C<500&&p.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(p,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const T=(0,g.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(T,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const p=this._model.finalSelectionStart,C=this._model.finalSelectionEnd,L=!(!p||!C||p[0]===C[0]&&p[1]===C[1]);L?p&&C&&(this._oldSelectionStart&&this._oldSelectionEnd&&p[0]===this._oldSelectionStart[0]&&p[1]===this._oldSelectionStart[1]&&C[0]===this._oldSelectionEnd[0]&&C[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(p,C,L)):this._oldHasSelection&&this._fireOnSelectionChange(p,C,L)}_fireOnSelectionChange(p,C,L){this._oldSelectionStart=p,this._oldSelectionEnd=C,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(p){this.clearSelection(),this._trimListener.dispose(),this._trimListener=p.activeBuffer.lines.onTrim((C=>this._handleTrim(C)))}_convertViewportColToCharacterIndex(p,C){let L=C;for(let T=0;C>=T;T++){const D=p.loadCell(T,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:D>1&&C!==T&&(L+=D-1)}return L}setSelection(p,C,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[p,C],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(p){this._isClickInSelection(p)||(this._selectWordAtCursor(p,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(p,C,L=!0,T=!0){if(p[0]>=this._bufferService.cols)return;const D=this._bufferService.buffer,M=D.lines.get(p[1]);if(!M)return;const N=D.translateBufferLineToString(p[1],!1);let X=this._convertViewportColToCharacterIndex(M,p[0]),z=X;const U=p[0]-X;let P=0,R=0,H=0,A=0;if(N.charAt(X)===" "){for(;X>0&&N.charAt(X-1)===" ";)X--;for(;z<N.length&&N.charAt(z+1)===" ";)z++}else{let V=p[0],he=p[0];M.getWidth(V)===0&&(P++,V--),M.getWidth(he)===2&&(R++,he++);const ue=M.getString(he).length;for(ue>1&&(A+=ue-1,z+=ue-1);V>0&&X>0&&!this._isCharWordSeparator(M.loadCell(V-1,this._workCell));){M.loadCell(V-1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===0?(P++,V--):j>1&&(H+=j-1,X-=j-1),X--,V--}for(;he<M.length&&z+1<N.length&&!this._isCharWordSeparator(M.loadCell(he+1,this._workCell));){M.loadCell(he+1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===2?(R++,he++):j>1&&(A+=j-1,z+=j-1),z++,he++}}z++;let O=X+U-P+H,$=Math.min(this._bufferService.cols,z-X+P+R-H-A);if(C||N.slice(X,z).trim()!==""){if(L&&O===0&&M.getCodePoint(0)!==32){const V=D.lines.get(p[1]-1);if(V&&M.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,p[1]-1],!1,!0,!1);if(he){const ue=this._bufferService.cols-he.start;O-=ue,$+=ue}}}if(T&&O+$===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const V=D.lines.get(p[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const he=this._getWordAt([0,p[1]+1],!1,!1,!0);he&&($+=he.length)}}return{start:O,length:$}}}_selectWordAt(p,C){const L=this._getWordAt(p,C);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,p[1]--;this._model.selectionStart=[L.start,p[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(p){const C=this._getWordAt(p,!0);if(C){let L=p[1];for(;C.start<0;)C.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;C.start+C.length>this._bufferService.cols;)C.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?C.start:C.start+C.length,L]}}_isCharWordSeparator(p){return p.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(p.getChars())>=0}_selectLineAt(p){const C=this._bufferService.buffer.getWrappedRangeForLine(p),L={start:{x:0,y:C.first},end:{x:this._bufferService.cols-1,y:C.last}};this._model.selectionStart=[0,C.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,l.getRangeLength)(L,this._bufferService.cols)}};a.SelectionService=E=_([v(3,m.IBufferService),v(4,m.ICoreService),v(5,b.IMouseService),v(6,m.IOptionsService),v(7,b.IRenderService),v(8,b.ICoreBrowserService)],E)},4725:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const _=d(8343);a.ICharSizeService=(0,_.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),a.IMouseService=(0,_.createDecorator)("MouseService"),a.IRenderService=(0,_.createDecorator)("RenderService"),a.ISelectionService=(0,_.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,_.createDecorator)("ThemeService"),a.ILinkProviderService=(0,_.createDecorator)("LinkProviderService")},6731:function(W,a,d){var _=this&&this.__decorate||function(E,p,C,L){var T,D=arguments.length,M=D<3?p:L===null?L=Object.getOwnPropertyDescriptor(p,C):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(E,p,C,L);else for(var N=E.length-1;N>=0;N--)(T=E[N])&&(M=(D<3?T(M):D>3?T(p,C,M):T(p,C))||M);return D>3&&M&&Object.defineProperty(p,C,M),M},v=this&&this.__param||function(E,p){return function(C,L){p(C,L,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const o=d(7239),g=d(8055),y=d(8460),b=d(844),f=d(2585),r=g.css.toColor("#ffffff"),h=g.css.toColor("#000000"),l=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],p=[0,95,135,175,215,255];for(let C=0;C<216;C++){const L=p[C/36%6|0],T=p[C/6%6|0],D=p[C%6];E.push({css:g.channels.toCss(L,T,D),rgba:g.channels.toRgba(L,T,D)})}for(let C=0;C<24;C++){const L=8+10*C;E.push({css:g.channels.toCss(L,L,L),rgba:g.channels.toRgba(L,L,L)})}return E})());let w=a.ThemeService=class extends b.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new o.ColorContrastCache,this._halfContrastCache=new o.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:l,cursorAccent:c,selectionForeground:void 0,selectionBackgroundTransparent:m,selectionBackgroundOpaque:g.color.blend(h,m),selectionInactiveBackgroundTransparent:m,selectionInactiveBackgroundOpaque:g.color.blend(h,m),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(E={}){const p=this._colors;if(p.foreground=S(E.foreground,r),p.background=S(E.background,h),p.cursor=S(E.cursor,l),p.cursorAccent=S(E.cursorAccent,c),p.selectionBackgroundTransparent=S(E.selectionBackground,m),p.selectionBackgroundOpaque=g.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=S(E.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=g.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=E.selectionForeground?S(E.selectionForeground,g.NULL_COLOR):void 0,p.selectionForeground===g.NULL_COLOR&&(p.selectionForeground=void 0),g.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=g.color.opacity(p.selectionBackgroundTransparent,.3)),g.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=g.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=a.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=S(E.black,a.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=S(E.red,a.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=S(E.green,a.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=S(E.yellow,a.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=S(E.blue,a.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=S(E.magenta,a.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=S(E.cyan,a.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=S(E.white,a.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=S(E.brightBlack,a.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=S(E.brightRed,a.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=S(E.brightGreen,a.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=S(E.brightYellow,a.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=S(E.brightBlue,a.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=S(E.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=S(E.brightCyan,a.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=S(E.brightWhite,a.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const C=Math.min(p.ansi.length-16,E.extendedAnsi.length);for(let L=0;L<C;L++)p.ansi[L+16]=S(E.extendedAnsi[L],a.DEFAULT_ANSI_COLORS[L+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 p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}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 S(E,p){if(E!==void 0)try{return g.css.toColor(E)}catch{}return p}a.ThemeService=w=_([v(0,f.IOptionsService)],w)},6349:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const _=d(8460),v=d(844);class o extends v.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(y){if(this._maxLength===y)return;const b=new Array(y);for(let f=0;f<Math.min(y,this.length);f++)b[f]=this._array[this._getCyclicIndex(f)];this._array=b,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let b=this._length;b<y;b++)this._array[b]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,b){this._array[this._getCyclicIndex(y)]=b}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,b,...f){if(b){for(let r=y;r<this._length-b;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+b)];this._length-=b,this.onDeleteEmitter.fire({index:y,amount:b})}for(let r=this._length-1;r>=y;r--)this._array[this._getCyclicIndex(r+f.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<f.length;r++)this._array[this._getCyclicIndex(y+r)]=f[r];if(f.length&&this.onInsertEmitter.fire({index:y,amount:f.length}),this._length+f.length>this._maxLength){const r=this._length+f.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=f.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,b,f){if(!(b<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+f<0)throw new Error("Cannot shift elements in list beyond index 0");if(f>0){for(let h=b-1;h>=0;h--)this.set(y+h+f,this.get(y+h));const r=y+b+f-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<b;r++)this.set(y+r+f,this.get(y+r))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}a.CircularList=o},1439:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function d(_,v=5){if(typeof _!="object")return _;const o=Array.isArray(_)?[]:{};for(const g in _)o[g]=v<=1?_[g]:_[g]&&d(_[g],v-1);return o}},8055:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,_=0,v=0,o=0;var g,y,b,f,r;function h(c){const m=c.toString(16);return m.length<2?"0"+m:m}function l(c,m){return c<m?(m+.05)/(c+.05):(c+.05)/(m+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(m,w,S,E){return E!==void 0?`#${h(m)}${h(w)}${h(S)}${h(E)}`:`#${h(m)}${h(w)}${h(S)}`},c.toRgba=function(m,w,S,E=255){return(m<<24|w<<16|S<<8|E)>>>0},c.toColor=function(m,w,S,E){return{css:c.toCss(m,w,S,E),rgba:c.toRgba(m,w,S,E)}}})(g||(a.channels=g={})),(function(c){function m(w,S){return o=Math.round(255*S),[d,_,v]=r.toChannels(w.rgba),{css:g.toCss(d,_,v,o),rgba:g.toRgba(d,_,v,o)}}c.blend=function(w,S){if(o=(255&S.rgba)/255,o===1)return{css:S.css,rgba:S.rgba};const E=S.rgba>>24&255,p=S.rgba>>16&255,C=S.rgba>>8&255,L=w.rgba>>24&255,T=w.rgba>>16&255,D=w.rgba>>8&255;return d=L+Math.round((E-L)*o),_=T+Math.round((p-T)*o),v=D+Math.round((C-D)*o),{css:g.toCss(d,_,v),rgba:g.toRgba(d,_,v)}},c.isOpaque=function(w){return(255&w.rgba)==255},c.ensureContrastRatio=function(w,S,E){const p=r.ensureContrastRatio(w.rgba,S.rgba,E);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(w){const S=(255|w.rgba)>>>0;return[d,_,v]=r.toChannels(S),{css:g.toCss(d,_,v),rgba:S}},c.opacity=m,c.multiplyOpacity=function(w,S){return o=255&w.rgba,m(w,o*S/255)},c.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}})(y||(a.color=y={})),(function(c){let m,w;try{const S=document.createElement("canvas");S.width=1,S.height=1;const E=S.getContext("2d",{willReadFrequently:!0});E&&(m=E,m.globalCompositeOperation="copy",w=m.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),g.toColor(d,_,v);case 5:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),o=parseInt(S.slice(4,5).repeat(2),16),g.toColor(d,_,v,o);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const E=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return d=parseInt(E[1]),_=parseInt(E[2]),v=parseInt(E[3]),o=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),g.toColor(d,_,v,o);if(!m||!w)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=w,m.fillStyle=S,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[d,_,v,o]=m.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(d,_,v,o),css:S}}})(b||(a.css=b={})),(function(c){function m(w,S,E){const p=w/255,C=S/255,L=E/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(w){return m(w>>16&255,w>>8&255,255&w)},c.relativeLuminance2=m})(f||(a.rgb=f={})),(function(c){function m(S,E,p){const C=S>>24&255,L=S>>16&255,T=S>>8&255;let D=E>>24&255,M=E>>16&255,N=E>>8&255,X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));for(;X<p&&(D>0||M>0||N>0);)D-=Math.max(0,Math.ceil(.1*D)),M-=Math.max(0,Math.ceil(.1*M)),N-=Math.max(0,Math.ceil(.1*N)),X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));return(D<<24|M<<16|N<<8|255)>>>0}function w(S,E,p){const C=S>>24&255,L=S>>16&255,T=S>>8&255;let D=E>>24&255,M=E>>16&255,N=E>>8&255,X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));for(;X<p&&(D<255||M<255||N<255);)D=Math.min(255,D+Math.ceil(.1*(255-D))),M=Math.min(255,M+Math.ceil(.1*(255-M))),N=Math.min(255,N+Math.ceil(.1*(255-N))),X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));return(D<<24|M<<16|N<<8|255)>>>0}c.blend=function(S,E){if(o=(255&E)/255,o===1)return E;const p=E>>24&255,C=E>>16&255,L=E>>8&255,T=S>>24&255,D=S>>16&255,M=S>>8&255;return d=T+Math.round((p-T)*o),_=D+Math.round((C-D)*o),v=M+Math.round((L-M)*o),g.toRgba(d,_,v)},c.ensureContrastRatio=function(S,E,p){const C=f.relativeLuminance(S>>8),L=f.relativeLuminance(E>>8);if(l(C,L)<p){if(L<C){const M=m(S,E,p),N=l(C,f.relativeLuminance(M>>8));if(N<p){const X=w(S,E,p);return N>l(C,f.relativeLuminance(X>>8))?M:X}return M}const T=w(S,E,p),D=l(C,f.relativeLuminance(T>>8));if(D<p){const M=m(S,E,p);return D>l(C,f.relativeLuminance(M>>8))?T:M}return T}},c.reduceLuminance=m,c.increaseLuminance=w,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(a.rgba=r={})),a.toPaddedHex=h,a.contrastRatio=l},8969:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const _=d(844),v=d(2585),o=d(4348),g=d(7866),y=d(744),b=d(7302),f=d(6975),r=d(8460),h=d(1753),l=d(1480),c=d(7994),m=d(9282),w=d(5435),S=d(5981),E=d(2660);let p=!1;class C extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((T=>{var D;(D=this._onScrollApi)==null||D.fire(T.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(T){for(const D in T)this.optionsService.options[D]=T[D]}constructor(T){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new o.InstantiationService,this.optionsService=this.register(new b.OptionsService(T)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(f.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(l.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(c.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new w.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((D=>{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((D=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new S.WriteBuffer(((D,M)=>this._inputHandler.parse(D,M)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(T,D){this._writeBuffer.write(T,D)}writeSync(T,D){this._logService.logLevel<=v.LogLevelEnum.WARN&&!p&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p=!0),this._writeBuffer.writeSync(T,D)}input(T,D=!0){this.coreService.triggerDataEvent(T,D)}resize(T,D){isNaN(T)||isNaN(D)||(T=Math.max(T,y.MINIMUM_COLS),D=Math.max(D,y.MINIMUM_ROWS),this._bufferService.resize(T,D))}scroll(T,D=!1){this._bufferService.scroll(T,D)}scrollLines(T,D,M){this._bufferService.scrollLines(T,D,M)}scrollPages(T){this.scrollLines(T*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(T){const D=T-this._bufferService.buffer.ydisp;D!==0&&this.scrollLines(D)}registerEscHandler(T,D){return this._inputHandler.registerEscHandler(T,D)}registerDcsHandler(T,D){return this._inputHandler.registerDcsHandler(T,D)}registerCsiHandler(T,D){return this._inputHandler.registerCsiHandler(T,D)}registerOscHandler(T,D){return this._inputHandler.registerOscHandler(T,D)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let T=!1;const D=this.optionsService.rawOptions.windowsPty;D&&D.buildNumber!==void 0&&D.buildNumber!==void 0?T=D.backend==="conpty"&&D.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(T=!0),T?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const T=[];T.push(this.onLineFeed(m.updateWindowsModeWrappedState.bind(null,this._bufferService))),T.push(this.registerCsiHandler({final:"H"},(()=>((0,m.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const D of T)D.dispose()}))}}}a.CoreTerminal=C},8460:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const v=[];for(let o=0;o<this._listeners.length;o++)v.push(this._listeners[o]);for(let o=0;o<v.length;o++)v[o].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,_){return d((v=>_.fire(v)))},a.runAndSubscribe=function(d,_){return _(void 0),d((v=>_(v)))}},5435:function(W,a,d){var _=this&&this.__decorate||function(P,R,H,A){var O,$=arguments.length,V=$<3?R:A===null?A=Object.getOwnPropertyDescriptor(R,H):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(P,R,H,A);else for(var he=P.length-1;he>=0;he--)(O=P[he])&&(V=($<3?O(V):$>3?O(R,H,V):O(R,H))||V);return $>3&&V&&Object.defineProperty(R,H,V),V},v=this&&this.__param||function(P,R){return function(H,A){R(H,A,P)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const o=d(2584),g=d(7116),y=d(2015),b=d(844),f=d(482),r=d(8437),h=d(8460),l=d(643),c=d(511),m=d(3734),w=d(2585),S=d(1480),E=d(6242),p=d(6351),C=d(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},T=131072;function D(P,R){if(P>24)return R.setWinLines||!1;switch(P){case 1:return!!R.restoreWin;case 2:return!!R.minimizeWin;case 3:return!!R.setWinPosition;case 4:return!!R.setWinSizePixels;case 5:return!!R.raiseWin;case 6:return!!R.lowerWin;case 7:return!!R.refreshWin;case 8:return!!R.setWinSizeChars;case 9:return!!R.maximizeWin;case 10:return!!R.fullscreenWin;case 11:return!!R.getWinState;case 13:return!!R.getWinPosition;case 14:return!!R.getWinSizePixels;case 15:return!!R.getScreenSizePixels;case 16:return!!R.getCellSizePixels;case 18:return!!R.getWinSizeChars;case 19:return!!R.getScreenSizeChars;case 20:return!!R.getIconTitle;case 21:return!!R.getWinTitle;case 22:return!!R.pushTitle;case 23:return!!R.popTitle;case 24:return!!R.setWinLines}return!1}var M;(function(P){P[P.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",P[P.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(a.WindowsOptionsReportType=M={}));let N=0;class X extends b.Disposable{getAttrData(){return this._curAttrData}constructor(R,H,A,O,$,V,he,ue,j=new y.EscapeSequenceParser){super(),this._bufferService=R,this._charsetService=H,this._coreService=A,this._logService=O,this._optionsService=$,this._oscLinkService=V,this._coreMouseService=he,this._unicodeService=ue,this._parser=j,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new f.StringToUtf32,this._utf8Decoder=new f.Utf8ToUtf32,this._workCell=new c.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new z(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((k=>this._activeBuffer=k.activeBuffer))),this._parser.setCsiHandlerFallback(((k,ie)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(k),params:ie.toArray()})})),this._parser.setEscHandlerFallback((k=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(k)})})),this._parser.setExecuteHandlerFallback((k=>{this._logService.debug("Unknown EXECUTE code: ",{code:k})})),this._parser.setOscHandlerFallback(((k,ie,ee)=>{this._logService.debug("Unknown OSC code: ",{identifier:k,action:ie,data:ee})})),this._parser.setDcsHandlerFallback(((k,ie,ee)=>{ie==="HOOK"&&(ee=ee.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(k),action:ie,payload:ee})})),this._parser.setPrintHandler(((k,ie,ee)=>this.print(k,ie,ee))),this._parser.registerCsiHandler({final:"@"},(k=>this.insertChars(k))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(k=>this.scrollLeft(k))),this._parser.registerCsiHandler({final:"A"},(k=>this.cursorUp(k))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(k=>this.scrollRight(k))),this._parser.registerCsiHandler({final:"B"},(k=>this.cursorDown(k))),this._parser.registerCsiHandler({final:"C"},(k=>this.cursorForward(k))),this._parser.registerCsiHandler({final:"D"},(k=>this.cursorBackward(k))),this._parser.registerCsiHandler({final:"E"},(k=>this.cursorNextLine(k))),this._parser.registerCsiHandler({final:"F"},(k=>this.cursorPrecedingLine(k))),this._parser.registerCsiHandler({final:"G"},(k=>this.cursorCharAbsolute(k))),this._parser.registerCsiHandler({final:"H"},(k=>this.cursorPosition(k))),this._parser.registerCsiHandler({final:"I"},(k=>this.cursorForwardTab(k))),this._parser.registerCsiHandler({final:"J"},(k=>this.eraseInDisplay(k,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(k=>this.eraseInDisplay(k,!0))),this._parser.registerCsiHandler({final:"K"},(k=>this.eraseInLine(k,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(k=>this.eraseInLine(k,!0))),this._parser.registerCsiHandler({final:"L"},(k=>this.insertLines(k))),this._parser.registerCsiHandler({final:"M"},(k=>this.deleteLines(k))),this._parser.registerCsiHandler({final:"P"},(k=>this.deleteChars(k))),this._parser.registerCsiHandler({final:"S"},(k=>this.scrollUp(k))),this._parser.registerCsiHandler({final:"T"},(k=>this.scrollDown(k))),this._parser.registerCsiHandler({final:"X"},(k=>this.eraseChars(k))),this._parser.registerCsiHandler({final:"Z"},(k=>this.cursorBackwardTab(k))),this._parser.registerCsiHandler({final:"`"},(k=>this.charPosAbsolute(k))),this._parser.registerCsiHandler({final:"a"},(k=>this.hPositionRelative(k))),this._parser.registerCsiHandler({final:"b"},(k=>this.repeatPrecedingCharacter(k))),this._parser.registerCsiHandler({final:"c"},(k=>this.sendDeviceAttributesPrimary(k))),this._parser.registerCsiHandler({prefix:">",final:"c"},(k=>this.sendDeviceAttributesSecondary(k))),this._parser.registerCsiHandler({final:"d"},(k=>this.linePosAbsolute(k))),this._parser.registerCsiHandler({final:"e"},(k=>this.vPositionRelative(k))),this._parser.registerCsiHandler({final:"f"},(k=>this.hVPosition(k))),this._parser.registerCsiHandler({final:"g"},(k=>this.tabClear(k))),this._parser.registerCsiHandler({final:"h"},(k=>this.setMode(k))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(k=>this.setModePrivate(k))),this._parser.registerCsiHandler({final:"l"},(k=>this.resetMode(k))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(k=>this.resetModePrivate(k))),this._parser.registerCsiHandler({final:"m"},(k=>this.charAttributes(k))),this._parser.registerCsiHandler({final:"n"},(k=>this.deviceStatus(k))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(k=>this.deviceStatusPrivate(k))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(k=>this.softReset(k))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(k=>this.setCursorStyle(k))),this._parser.registerCsiHandler({final:"r"},(k=>this.setScrollRegion(k))),this._parser.registerCsiHandler({final:"s"},(k=>this.saveCursor(k))),this._parser.registerCsiHandler({final:"t"},(k=>this.windowOptions(k))),this._parser.registerCsiHandler({final:"u"},(k=>this.restoreCursor(k))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(k=>this.insertColumns(k))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(k=>this.deleteColumns(k))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(k=>this.selectProtected(k))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(k=>this.requestMode(k,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(k=>this.requestMode(k,!1))),this._parser.setExecuteHandler(o.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(o.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(o.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(o.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(o.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(o.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(o.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(o.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(o.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new E.OscHandler((k=>(this.setTitle(k),this.setIconName(k),!0)))),this._parser.registerOscHandler(1,new E.OscHandler((k=>this.setIconName(k)))),this._parser.registerOscHandler(2,new E.OscHandler((k=>this.setTitle(k)))),this._parser.registerOscHandler(4,new E.OscHandler((k=>this.setOrReportIndexedColor(k)))),this._parser.registerOscHandler(8,new E.OscHandler((k=>this.setHyperlink(k)))),this._parser.registerOscHandler(10,new E.OscHandler((k=>this.setOrReportFgColor(k)))),this._parser.registerOscHandler(11,new E.OscHandler((k=>this.setOrReportBgColor(k)))),this._parser.registerOscHandler(12,new E.OscHandler((k=>this.setOrReportCursorColor(k)))),this._parser.registerOscHandler(104,new E.OscHandler((k=>this.restoreIndexedColor(k)))),this._parser.registerOscHandler(110,new E.OscHandler((k=>this.restoreFgColor(k)))),this._parser.registerOscHandler(111,new E.OscHandler((k=>this.restoreBgColor(k)))),this._parser.registerOscHandler(112,new E.OscHandler((k=>this.restoreCursorColor(k)))),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 k in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:k},(()=>this.selectCharset("("+k))),this._parser.registerEscHandler({intermediates:")",final:k},(()=>this.selectCharset(")"+k))),this._parser.registerEscHandler({intermediates:"*",final:k},(()=>this.selectCharset("*"+k))),this._parser.registerEscHandler({intermediates:"+",final:k},(()=>this.selectCharset("+"+k))),this._parser.registerEscHandler({intermediates:"-",final:k},(()=>this.selectCharset("-"+k))),this._parser.registerEscHandler({intermediates:".",final:k},(()=>this.selectCharset("."+k))),this._parser.registerEscHandler({intermediates:"/",final:k},(()=>this.selectCharset("/"+k)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((k=>(this._logService.error("Parsing error: ",k),k))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((k,ie)=>this.requestStatusString(k,ie))))}_preserveStack(R,H,A,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=R,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=A,this._parseStack.position=O}_logSlowResolvingAsync(R){this._logService.logLevel<=w.LogLevelEnum.WARN&&Promise.race([R,new Promise(((H,A)=>setTimeout((()=>A("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(R,H){let A,O=this._activeBuffer.x,$=this._activeBuffer.y,V=0;const he=this._parseStack.paused;if(he){if(A=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(A),A;O=this._parseStack.cursorStartX,$=this._parseStack.cursorStartY,this._parseStack.paused=!1,R.length>T&&(V=this._parseStack.position+T)}if(this._logService.logLevel<=w.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof R=="string"?` "${R}"`:` "${Array.prototype.map.call(R,(k=>String.fromCharCode(k))).join("")}"`),typeof R=="string"?R.split("").map((k=>k.charCodeAt(0))):R),this._parseBuffer.length<R.length&&this._parseBuffer.length<T&&(this._parseBuffer=new Uint32Array(Math.min(R.length,T))),he||this._dirtyRowTracker.clearRange(),R.length>T)for(let k=V;k<R.length;k+=T){const ie=k+T<R.length?k+T:R.length,ee=typeof R=="string"?this._stringDecoder.decode(R.substring(k,ie),this._parseBuffer):this._utf8Decoder.decode(R.subarray(k,ie),this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,ee))return this._preserveStack(O,$,ee,k),this._logSlowResolvingAsync(A),A}else if(!he){const k=typeof R=="string"?this._stringDecoder.decode(R,this._parseBuffer):this._utf8Decoder.decode(R,this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,k))return this._preserveStack(O,$,k,0),this._logSlowResolvingAsync(A),A}this._activeBuffer.x===O&&this._activeBuffer.y===$||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),j=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);j<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(j,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(R,H,A){let O,$;const V=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,j=this._coreService.decPrivateModes.wraparound,k=this._coreService.modes.insertMode,ie=this._curAttrData;let ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&A-H>0&&ee.getWidth(this._activeBuffer.x-1)===2&&ee.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ie);let de=this._parser.precedingJoinState;for(let fe=H;fe<A;++fe){if(O=R[fe],O<127&&V){const Ke=V[String.fromCharCode(O)];Ke&&(O=Ke.charCodeAt(0))}const Ce=this._unicodeService.charProperties(O,de);$=S.UnicodeService.extractWidth(Ce);const me=S.UnicodeService.extractShouldJoin(Ce),He=me?S.UnicodeService.extractWidth(de):0;if(de=Ce,he&&this._onA11yChar.fire((0,f.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+$-He>ue){if(j){const Ke=ee;let Se=this._activeBuffer.x-He;for(this._activeBuffer.x=He,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),ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),He>0&&ee instanceof r.BufferLine&&ee.copyCellsFrom(Ke,Se,0,He,!1);Se<ue;)Ke.setCellFromCodepoint(Se++,0,1,ie)}else if(this._activeBuffer.x=ue-1,$===2)continue}if(me&&this._activeBuffer.x){const Ke=ee.getWidth(this._activeBuffer.x-1)?1:2;ee.addCodepointToCell(this._activeBuffer.x-Ke,O,$);for(let Se=$-He;--Se>=0;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,ie)}else if(k&&(ee.insertCells(this._activeBuffer.x,$-He,this._activeBuffer.getNullCell(ie)),ee.getWidth(ue-1)===2&&ee.setCellFromCodepoint(ue-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,ie)),ee.setCellFromCodepoint(this._activeBuffer.x++,O,$,ie),$>0)for(;--$;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,ie)}this._parser.precedingJoinState=de,this._activeBuffer.x<ue&&A-H>0&&ee.getWidth(this._activeBuffer.x)===0&&!ee.hasContent(this._activeBuffer.x)&&ee.setCellFromCodepoint(this._activeBuffer.x,0,1,ie),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(R,H){return R.final!=="t"||R.prefix||R.intermediates?this._parser.registerCsiHandler(R,H):this._parser.registerCsiHandler(R,(A=>!D(A.params[0],this._optionsService.rawOptions.windowOptions)||H(A)))}registerDcsHandler(R,H){return this._parser.registerDcsHandler(R,new p.DcsHandler(H))}registerEscHandler(R,H){return this._parser.registerEscHandler(R,H)}registerOscHandler(R,H){return this._parser.registerOscHandler(R,new E.OscHandler(H))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var R;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&R.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const R=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-R),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(R=this._bufferService.cols-1){this._activeBuffer.x=Math.min(R,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(R,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=R,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=R,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(R,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+R,this._activeBuffer.y+H)}cursorUp(R){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,R.params[0]||1)):this._moveCursor(0,-(R.params[0]||1)),!0}cursorDown(R){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,R.params[0]||1)):this._moveCursor(0,R.params[0]||1),!0}cursorForward(R){return this._moveCursor(R.params[0]||1,0),!0}cursorBackward(R){return this._moveCursor(-(R.params[0]||1),0),!0}cursorNextLine(R){return this.cursorDown(R),this._activeBuffer.x=0,!0}cursorPrecedingLine(R){return this.cursorUp(R),this._activeBuffer.x=0,!0}cursorCharAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(R){return this._setCursor(R.length>=2?(R.params[1]||1)-1:0,(R.params[0]||1)-1),!0}charPosAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(R){return this._moveCursor(R.params[0]||1,0),!0}linePosAbsolute(R){return this._setCursor(this._activeBuffer.x,(R.params[0]||1)-1),!0}vPositionRelative(R){return this._moveCursor(0,R.params[0]||1),!0}hVPosition(R){return this.cursorPosition(R),!0}tabClear(R){const H=R.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=R.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=R.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(R){const H=R.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(R,H,A,O=!1,$=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);V.replaceCells(H,A,this._activeBuffer.getNullCell(this._eraseAttrData()),$),O&&(V.isWrapped=!1)}_resetBufferLine(R,H=!1){const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);A&&(A.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+R),A.isWrapped=!1)}eraseInDisplay(R,H=!1){let A;switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);A<this._bufferService.rows;A++)this._resetBufferLine(A,H);this._dirtyRowTracker.markDirty(A);break;case 1:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(A+1).isWrapped=!1);A--;)this._resetBufferLine(A,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(A=this._bufferService.rows,this._dirtyRowTracker.markDirty(A-1);A--;)this._resetBufferLine(A,H);this._dirtyRowTracker.markDirty(0);break;case 3:const O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(R,H=!1){switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(R){this._restrictCursor();let H=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,$=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;H--;)this._activeBuffer.lines.splice($-1,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(R){this._restrictCursor();let H=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y;let O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;H--;)this._activeBuffer.lines.splice(A,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(R){let H=R.params[0]||1;for(;H--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(R){let H=R.params[0]||1;for(;H--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(R.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(R){const H=this._parser.precedingJoinState;if(!H)return!0;const A=R.params[0]||1,O=S.UnicodeService.extractWidth(H),$=this._activeBuffer.x-O,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString($),he=new Uint32Array(V.length*A);let ue=0;for(let k=0;k<V.length;){const ie=V.codePointAt(k)||0;he[ue++]=ie,k+=ie>65535?2:1}let j=ue;for(let k=1;k<A;++k)he.copyWithin(j,0,ue),j+=ue;return this.print(he,0,j),!0}sendDeviceAttributesPrimary(R){return R.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(R){return R.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(R.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c")),!0}_is(R){return(this._optionsService.rawOptions.termName+"").indexOf(R)===0}setMode(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),R.params[H]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(R,H){const A=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:$}=this._coreMouseService,V=this._coreService,{buffers:he,cols:ue}=this._bufferService,{active:j,alt:k}=he,ie=this._optionsService.rawOptions,ee=me=>me?1:2,de=R.params[0];return fe=de,Ce=H?de===2?4:de===4?ee(V.modes.insertMode):de===12?3:de===20?ee(ie.convertEol):0:de===1?ee(A.applicationCursorKeys):de===3?ie.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:de===6?ee(A.origin):de===7?ee(A.wraparound):de===8?3:de===9?ee(O==="X10"):de===12?ee(ie.cursorBlink):de===25?ee(!V.isCursorHidden):de===45?ee(A.reverseWraparound):de===66?ee(A.applicationKeypad):de===67?4:de===1e3?ee(O==="VT200"):de===1002?ee(O==="DRAG"):de===1003?ee(O==="ANY"):de===1004?ee(A.sendFocus):de===1005?4:de===1006?ee($==="SGR"):de===1015?4:de===1016?ee($==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?ee(j===k):de===2004?ee(A.bracketedPasteMode):0,V.triggerDataEvent(`${o.C0.ESC}[${H?"":"?"}${fe};${Ce}$y`),!0;var fe,Ce}_updateAttrColor(R,H,A,O,$){return H===2?(R|=50331648,R&=-16777216,R|=m.AttributeData.fromColorRGB([A,O,$])):H===5&&(R&=-50331904,R|=33554432|255&A),R}_extractColor(R,H,A){const O=[0,0,-1,0,0,0];let $=0,V=0;do{if(O[V+$]=R.params[H+V],R.hasSubParams(H+V)){const he=R.getSubParams(H+V);let ue=0;do O[1]===5&&($=1),O[V+ue+1+$]=he[ue];while(++ue<he.length&&ue+V+1+$<O.length);break}if(O[1]===5&&V+$>=2||O[1]===2&&V+$>=5)break;O[1]&&($=1)}while(++V+H<R.length&&V+$<O.length);for(let he=2;he<O.length;++he)O[he]===-1&&(O[he]=0);switch(O[0]){case 38:A.fg=this._updateAttrColor(A.fg,O[1],O[3],O[4],O[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,O[1],O[3],O[4],O[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,O[1],O[3],O[4],O[5])}return V}_processUnderline(R,H){H.extended=H.extended.clone(),(!~R||R>5)&&(R=1),H.extended.underlineStyle=R,H.fg|=268435456,R===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(R){R.fg=r.DEFAULT_ATTR_DATA.fg,R.bg=r.DEFAULT_ATTR_DATA.bg,R.extended=R.extended.clone(),R.extended.underlineStyle=0,R.extended.underlineColor&=-67108864,R.updateExtended()}charAttributes(R){if(R.length===1&&R.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=R.length;let A;const O=this._curAttrData;for(let $=0;$<H;$++)A=R.params[$],A>=30&&A<=37?(O.fg&=-50331904,O.fg|=16777216|A-30):A>=40&&A<=47?(O.bg&=-50331904,O.bg|=16777216|A-40):A>=90&&A<=97?(O.fg&=-50331904,O.fg|=16777224|A-90):A>=100&&A<=107?(O.bg&=-50331904,O.bg|=16777224|A-100):A===0?this._processSGR0(O):A===1?O.fg|=134217728:A===3?O.bg|=67108864:A===4?(O.fg|=268435456,this._processUnderline(R.hasSubParams($)?R.getSubParams($)[0]:1,O)):A===5?O.fg|=536870912:A===7?O.fg|=67108864:A===8?O.fg|=1073741824:A===9?O.fg|=2147483648:A===2?O.bg|=134217728:A===21?this._processUnderline(2,O):A===22?(O.fg&=-134217729,O.bg&=-134217729):A===23?O.bg&=-67108865:A===24?(O.fg&=-268435457,this._processUnderline(0,O)):A===25?O.fg&=-536870913:A===27?O.fg&=-67108865:A===28?O.fg&=-1073741825:A===29?O.fg&=2147483647:A===39?(O.fg&=-67108864,O.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):A===49?(O.bg&=-67108864,O.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):A===38||A===48||A===58?$+=this._extractColor(R,$,O):A===53?O.bg|=1073741824:A===55?O.bg&=-1073741825:A===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):A===100?(O.fg&=-67108864,O.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",A);return!0}deviceStatus(R){switch(R.params[0]){case 5:this._coreService.triggerDataEvent(`${o.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[${H};${A}R`)}return!0}deviceStatusPrivate(R){if(R.params[0]===6){const H=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[?${H};${A}R`)}return!0}softReset(R){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(R){const H=R.params[0]||1;switch(H){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const A=H%2==1;return this._optionsService.options.cursorBlink=A,!0}setScrollRegion(R){const H=R.params[0]||1;let A;return(R.length<2||(A=R.params[1])>this._bufferService.rows||A===0)&&(A=this._bufferService.rows),A>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=A-1,this._setCursor(0,0)),!0}windowOptions(R){if(!D(R.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=R.length>1?R.params[1]:0;switch(R.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${o.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(R){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(R){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(R){return this._windowTitle=R,this._onTitleChange.fire(R),!0}setIconName(R){return this._iconName=R,!0}setOrReportIndexedColor(R){const H=[],A=R.split(";");for(;A.length>1;){const O=A.shift(),$=A.shift();if(/^\d+$/.exec(O)){const V=parseInt(O);if(U(V))if($==="?")H.push({type:0,index:V});else{const he=(0,C.parseColor)($);he&&H.push({type:1,index:V,color:he})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(R){const H=R.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(R,H){this._getCurrentLinkId()&&this._finishHyperlink();const A=R.split(":");let O;const $=A.findIndex((V=>V.startsWith("id=")));return $!==-1&&(O=A[$].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(R,H){const A=R.split(";");for(let O=0;O<A.length&&!(H>=this._specialColors.length);++O,++H)if(A[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const $=(0,C.parseColor)(A[O]);$&&this._onColor.fire([{type:1,index:this._specialColors[H],color:$}])}return!0}setOrReportFgColor(R){return this._setOrReportSpecialColor(R,0)}setOrReportBgColor(R){return this._setOrReportSpecialColor(R,1)}setOrReportCursorColor(R){return this._setOrReportSpecialColor(R,2)}restoreIndexedColor(R){if(!R)return this._onColor.fire([{type:2}]),!0;const H=[],A=R.split(";");for(let O=0;O<A.length;++O)if(/^\d+$/.exec(A[O])){const $=parseInt(A[O]);U($)&&H.push({type:2,index:$})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(R){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(R){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(R){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),!0}selectCharset(R){return R.length!==2?(this.selectDefaultCharset(),!0):(R[0]==="/"||this._charsetService.setgCharset(L[R[0]],g.CHARSETS[R[1]]||g.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const R=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,R,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(R){return this._charsetService.setgLevel(R),!0}screenAlignmentPattern(){const R=new c.CellData;R.content=4194373,R.fg=this._curAttrData.fg,R.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const A=this._activeBuffer.ybase+this._activeBuffer.y+H,O=this._activeBuffer.lines.get(A);O&&(O.fill(R),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(R,H){const A=this._bufferService.buffer,O=this._optionsService.rawOptions;return($=>(this._coreService.triggerDataEvent(`${o.C0.ESC}${$}${o.C0.ESC}\\`),!0))(R==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:R==='"p'?'P1$r61;1"p':R==="r"?`P1$r${A.scrollTop+1};${A.scrollBottom+1}r`:R==="m"?"P1$r0m":R===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(R,H){this._dirtyRowTracker.markRangeDirty(R,H)}}a.InputHandler=X;let z=class{constructor(P){this._bufferService=P,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(P){P<this.start?this.start=P:P>this.end&&(this.end=P)}markRangeDirty(P,R){P>R&&(N=P,P=R,R=N),P<this.start&&(this.start=P),R>this.end&&(this.end=R)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function U(P){return 0<=P&&P<256}z=_([v(0,w.IBufferService)],z)},844:(W,a)=>{function d(_){for(const v of _)v.dispose();_.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},a.toDisposable=function(_){return{dispose:_}},a.disposeArray=d,a.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},1505:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(v,o,g){this._data[v]||(this._data[v]={}),this._data[v][o]=g}get(v,o){return this._data[v]?this._data[v][o]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(_,v,o,g,y){this._data.get(_,v)||this._data.set(_,v,new d),this._data.get(_,v).set(o,g,y)}get(_,v,o,g){var y;return(y=this._data.get(_,v))==null?void 0:y.get(o,g)}clear(){this._data.clear()}}},6114:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,_=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const v=d.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),a.isIpad=_==="iPad",a.isIphone=_==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),a.isLinux=_.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},6106:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let d=0;a.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(d=this._search(this._getKey(_)),this._array.splice(d,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const v=this._getKey(_);if(v===void 0||(d=this._search(v),d===-1)||this._getKey(this._array[d])!==v)return!1;do if(this._array[d]===_)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===v);return!1}*getKeyIterator(_){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===_)}forEachByKey(_,v){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do v(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===_)}values(){return[...this._array].values()}_search(_){let v=0,o=this._array.length-1;for(;o>=v;){let g=v+o>>1;const y=this._getKey(this._array[g]);if(y>_)o=g-1;else{if(!(y<_)){for(;g>0&&this._getKey(this._array[g-1])===_;)g--;return g}v=g+1}}return v}}},7226:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const _=d(6114);class v{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 b=0,f=0,r=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),f=Math.max(b,f),h=y.timeRemaining(),1.5*f>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class o extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const b=Date.now()+y;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}a.PriorityTaskQueue=o,a.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:o,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const _=d(643);a.updateWindowsModeWrappedState=function(v){const o=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),g=o==null?void 0:o.get(v.cols-1),y=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);y&&g&&(y.isWrapped=g[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&g[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new d;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}get underlineVariantOffset(){const o=(3758096384&this._ext)>>29;return o<0?4294967288^o:o}set underlineVariantOffset(o){this._ext&=536870911,this._ext|=o<<29&3758096384}constructor(o=0,g=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=g}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=_},9092:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const _=d(6349),v=d(7226),o=d(3734),g=d(8437),y=d(4634),b=d(511),f=d(643),r=d(4863),h=d(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(l,c,m){this._hasScrollback=l,this._optionsService=c,this._bufferService=m,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,f.WHITESPACE_CELL_CHAR,f.WHITESPACE_CELL_WIDTH,f.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(l){return l?(this._nullCell.fg=l.fg,this._nullCell.bg=l.bg,this._nullCell.extended=l.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new o.ExtendedAttrs),this._nullCell}getWhitespaceCell(l){return l?(this._whitespaceCell.fg=l.fg,this._whitespaceCell.bg=l.bg,this._whitespaceCell.extended=l.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new o.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,c){return new g.BufferLine(this._bufferService.cols,this.getNullCell(l),c)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const l=this.ybase+this.y-this.ydisp;return l>=0&&l<this._rows}_getCorrectBufferLength(l){if(!this._hasScrollback)return l;const c=l+this._optionsService.rawOptions.scrollback;return c>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:c}fillViewportRows(l){if(this.lines.length===0){l===void 0&&(l=g.DEFAULT_ATTR_DATA);let c=this._rows;for(;c--;)this.lines.push(this.getBlankLine(l))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(l,c){const m=this.getNullCell(g.DEFAULT_ATTR_DATA);let w=0;const S=this._getCorrectBufferLength(c);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<l)for(let p=0;p<this.lines.length;p++)w+=+this.lines.get(p).resize(l,m);let E=0;if(this._rows<c)for(let p=this._rows;p<c;p++)this.lines.length<c+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(l,m)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(l,m)));else for(let p=this._rows;p>c;p--)this.lines.length>c+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const p=this.lines.length-S;p>0&&(this.lines.trimStart(p),this.ybase=Math.max(this.ybase-p,0),this.ydisp=Math.max(this.ydisp-p,0),this.savedY=Math.max(this.savedY-p,0)),this.lines.maxLength=S}this.x=Math.min(this.x,l-1),this.y=Math.min(this.y,c-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,l-1),this.scrollTop=0}if(this.scrollBottom=c-1,this._isReflowEnabled&&(this._reflow(l,c),this._cols>l))for(let E=0;E<this.lines.length;E++)w+=+this.lines.get(E).resize(l,m);this._cols=l,this._rows=c,this._memoryCleanupQueue.clear(),w>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let l=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,l=!1);let c=0;for(;this._memoryCleanupPosition<this.lines.length;)if(c+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),c>100)return!0;return l}get _isReflowEnabled(){const l=this._optionsService.rawOptions.windowsPty;return l&&l.buildNumber?this._hasScrollback&&l.backend==="conpty"&&l.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(l,c){this._cols!==l&&(l>this._cols?this._reflowLarger(l,c):this._reflowSmaller(l,c))}_reflowLarger(l,c){const m=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(m.length>0){const w=(0,y.reflowLargerCreateNewLayout)(this.lines,m);(0,y.reflowLargerApplyNewLayout)(this.lines,w.layout),this._reflowLargerAdjustViewport(l,c,w.countRemoved)}}_reflowLargerAdjustViewport(l,c,m){const w=this.getNullCell(g.DEFAULT_ATTR_DATA);let S=m;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<c&&this.lines.push(new g.BufferLine(l,w))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-m,0)}_reflowSmaller(l,c){const m=this.getNullCell(g.DEFAULT_ATTR_DATA),w=[];let S=0;for(let E=this.lines.length-1;E>=0;E--){let p=this.lines.get(E);if(!p||!p.isWrapped&&p.getTrimmedLength()<=l)continue;const C=[p];for(;p.isWrapped&&E>0;)p=this.lines.get(--E),C.unshift(p);const L=this.ybase+this.y;if(L>=E&&L<E+C.length)continue;const T=C[C.length-1].getTrimmedLength(),D=(0,y.reflowSmallerGetNewLineLengths)(C,this._cols,l),M=D.length-C.length;let N;N=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const X=[];for(let A=0;A<M;A++){const O=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);X.push(O)}X.length>0&&(w.push({start:E+C.length+S,newLines:X}),S+=X.length),C.push(...X);let z=D.length-1,U=D[z];U===0&&(z--,U=D[z]);let P=C.length-M-1,R=T;for(;P>=0;){const A=Math.min(R,U);if(C[z]===void 0)break;if(C[z].copyCellsFrom(C[P],R-A,U-A,A,!0),U-=A,U===0&&(z--,U=D[z]),R-=A,R===0){P--;const O=Math.max(P,0);R=(0,y.getWrappedLineTrimmedLength)(C,O,this._cols)}}for(let A=0;A<C.length;A++)D[A]<l&&C[A].setCell(D[A],m);let H=M-N;for(;H-- >0;)this.ybase===0?this.y<c-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-c&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+c-1)}if(w.length>0){const E=[],p=[];for(let z=0;z<this.lines.length;z++)p.push(this.lines.get(z));const C=this.lines.length;let L=C-1,T=0,D=w[T];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let M=0;for(let z=Math.min(this.lines.maxLength-1,C+S-1);z>=0;z--)if(D&&D.start>L+M){for(let U=D.newLines.length-1;U>=0;U--)this.lines.set(z--,D.newLines[U]);z++,E.push({index:L+1,amount:D.newLines.length}),M+=D.newLines.length,D=w[++T]}else this.lines.set(z,p[L--]);let N=0;for(let z=E.length-1;z>=0;z--)E[z].index+=N,this.lines.onInsertEmitter.fire(E[z]),N+=E[z].amount;const X=Math.max(0,C+S-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(l,c,m=0,w){const S=this.lines.get(l);return S?S.translateToString(c,m,w):""}getWrappedRangeForLine(l){let c=l,m=l;for(;c>0&&this.lines.get(c).isWrapped;)c--;for(;m+1<this.lines.length&&this.lines.get(m+1).isWrapped;)m++;return{first:c,last:m}}setupTabStops(l){for(l!=null?this.tabs[l]||(l=this.prevStop(l)):(this.tabs={},l=0);l<this._cols;l+=this._optionsService.rawOptions.tabStopWidth)this.tabs[l]=!0}prevStop(l){for(l==null&&(l=this.x);!this.tabs[--l]&&l>0;);return l>=this._cols?this._cols-1:l<0?0:l}nextStop(l){for(l==null&&(l=this.x);!this.tabs[++l]&&l<this._cols;);return l>=this._cols?this._cols-1:l<0?0:l}clearMarkers(l){this._isClearing=!0;for(let c=0;c<this.markers.length;c++)this.markers[c].line===l&&(this.markers[c].dispose(),this.markers.splice(c--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].dispose(),this.markers.splice(l--,1);this._isClearing=!1}addMarker(l){const c=new r.Marker(l);return this.markers.push(c),c.register(this.lines.onTrim((m=>{c.line-=m,c.line<0&&c.dispose()}))),c.register(this.lines.onInsert((m=>{c.line>=m.index&&(c.line+=m.amount)}))),c.register(this.lines.onDelete((m=>{c.line>=m.index&&c.line<m.index+m.amount&&c.dispose(),c.line>m.index&&(c.line-=m.amount)}))),c.register(c.onDispose((()=>this._removeMarker(c)))),c}_removeMarker(l){this._isClearing||this.markers.splice(this.markers.indexOf(l),1)}}},8437:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const _=d(3734),v=d(511),o=d(643),g=d(482);a.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let y=0;class b{constructor(r,h,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const c=h||v.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]);for(let m=0;m<r;++m)this.setCell(m,c);this.length=r}get(r){const h=this._data[3*r+0],l=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:l?(0,g.stringFromCodePoint)(l):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):l]}set(r,h){this._data[3*r+1]=h[o.CHAR_DATA_ATTR_INDEX],h[o.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[o.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[o.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,g.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return y=3*r,h.content=this._data[y+0],h.fg=this._data[y+1],h.bg=this._data[y+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,l,c){268435456&c.bg&&(this._extendedAttrs[r]=c.extended),this._data[3*r+0]=h|l<<22,this._data[3*r+1]=c.fg,this._data[3*r+2]=c.bg}addCodepointToCell(r,h,l){let c=this._data[3*r+0];2097152&c?this._combined[r]+=(0,g.stringFromCodePoint)(h):2097151&c?(this._combined[r]=(0,g.stringFromCodePoint)(2097151&c)+(0,g.stringFromCodePoint)(h),c&=-2097152,c|=2097152):c=h|4194304,l&&(c&=-12582913,c|=l<<22),this._data[3*r+0]=c}insertCells(r,h,l){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length-r){const c=new v.CellData;for(let m=this.length-r-h-1;m>=0;--m)this.setCell(r+h+m,this.loadCell(r+m,c));for(let m=0;m<h;++m)this.setCell(r+m,l)}else for(let c=r;c<this.length;++c)this.setCell(c,l);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,l)}deleteCells(r,h,l){if(r%=this.length,h<this.length-r){const c=new v.CellData;for(let m=0;m<this.length-r-h;++m)this.setCell(r+m,this.loadCell(r+h+m,c));for(let m=this.length-h;m<this.length;++m)this.setCell(m,l)}else for(let c=r;c<this.length;++c)this.setCell(c,l);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,l)}replaceCells(r,h,l,c=!1){if(c)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,l);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,l),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,l);r<h&&r<this.length;)this.setCell(r++,l)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const l=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*l)this._data=new Uint32Array(this._data.buffer,0,l);else{const c=new Uint32Array(l);c.set(this._data),this._data=c}for(let c=this.length;c<r;++c)this.setCell(c,h)}else{this._data=this._data.subarray(0,l);const c=Object.keys(this._combined);for(let w=0;w<c.length;w++){const S=parseInt(c[w],10);S>=r&&delete this._combined[S]}const m=Object.keys(this._extendedAttrs);for(let w=0;w<m.length;w++){const S=parseInt(m[w],10);S>=r&&delete this._extendedAttrs[S]}}return this.length=r,4*l*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,r);else{this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new b(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,l,c,m){const w=r._data;if(m)for(let E=c-1;E>=0;E--){for(let p=0;p<3;p++)this._data[3*(l+E)+p]=w[3*(h+E)+p];268435456&w[3*(h+E)+2]&&(this._extendedAttrs[l+E]=r._extendedAttrs[h+E])}else for(let E=0;E<c;E++){for(let p=0;p<3;p++)this._data[3*(l+E)+p]=w[3*(h+E)+p];268435456&w[3*(h+E)+2]&&(this._extendedAttrs[l+E]=r._extendedAttrs[h+E])}const S=Object.keys(r._combined);for(let E=0;E<S.length;E++){const p=parseInt(S[E],10);p>=h&&(this._combined[p-h+l]=r._combined[p])}}translateToString(r,h,l,c){h=h??0,l=l??this.length,r&&(l=Math.min(l,this.getTrimmedLength())),c&&(c.length=0);let m="";for(;h<l;){const w=this._data[3*h+0],S=2097151&w,E=2097152&w?this._combined[h]:S?(0,g.stringFromCodePoint)(S):o.WHITESPACE_CELL_CHAR;if(m+=E,c)for(let p=0;p<E.length;++p)c.push(h);h+=w>>22||1}return c&&c.push(h),m}}a.BufferLine=b},4841:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(d,_){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return _*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(W,a)=>{function d(_,v,o){if(v===_.length-1)return _[v].getTrimmedLength();const g=!_[v].hasContent(o-1)&&_[v].getWidth(o-1)===1,y=_[v+1].getWidth(0)===2;return g&&y?o-1:o}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(_,v,o,g,y){const b=[];for(let f=0;f<_.length-1;f++){let r=f,h=_.get(++r);if(!h.isWrapped)continue;const l=[_.get(f)];for(;r<_.length&&h.isWrapped;)l.push(h),h=_.get(++r);if(g>=f&&g<r){f+=l.length-1;continue}let c=0,m=d(l,c,v),w=1,S=0;for(;w<l.length;){const p=d(l,w,v),C=p-S,L=o-m,T=Math.min(C,L);l[c].copyCellsFrom(l[w],S,m,T,!1),m+=T,m===o&&(c++,m=0),S+=T,S===p&&(w++,S=0),m===0&&c!==0&&l[c-1].getWidth(o-1)===2&&(l[c].copyCellsFrom(l[c-1],o-1,m++,1,!1),l[c-1].setCell(o-1,y))}l[c].replaceCells(m,o,y);let E=0;for(let p=l.length-1;p>0&&(p>c||l[p].getTrimmedLength()===0);p--)E++;E>0&&(b.push(f+l.length-E),b.push(E)),f+=l.length-1}return b},a.reflowLargerCreateNewLayout=function(_,v){const o=[];let g=0,y=v[g],b=0;for(let f=0;f<_.length;f++)if(y===f){const r=v[++g];_.onDeleteEmitter.fire({index:f-b,amount:r}),f+=r-1,b+=r,y=v[++g]}else o.push(f);return{layout:o,countRemoved:b}},a.reflowLargerApplyNewLayout=function(_,v){const o=[];for(let g=0;g<v.length;g++)o.push(_.get(v[g]));for(let g=0;g<o.length;g++)_.set(g,o[g]);_.length=v.length},a.reflowSmallerGetNewLineLengths=function(_,v,o){const g=[],y=_.map(((h,l)=>d(_,l,v))).reduce(((h,l)=>h+l));let b=0,f=0,r=0;for(;r<y;){if(y-r<o){g.push(y-r);break}b+=o;const h=d(_,f,v);b>h&&(b-=h,f++);const l=_[f].getWidth(b-1)===2;l&&b--;const c=l?o-1:o;g.push(c),r+=c}return g},a.getWrappedLineTrimmedLength=d},5295:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const _=d(8460),v=d(844),o=d(9092);class g extends v.Disposable{constructor(b,f){super(),this._optionsService=b,this._bufferService=f,this._onBufferActivate=this.register(new _.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new o.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new o.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(b){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(b),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(b,f){this._normal.resize(b,f),this._alt.resize(b,f),this.setupTabStops(b)}setupTabStops(b){this._normal.setupTabStops(b),this._alt.setupTabStops(b)}}a.BufferSet=g},511:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const _=d(482),v=d(643),o=d(3734);class g extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const f=new g;return f.setFromCharData(b),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(b[v.CHAR_DATA_CHAR_INDEX].length===2){const r=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=b[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=g},643:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const _=d(8460),v=d(844);class o{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=o._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}a.Marker=o,o._nextId=1},7116:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(W,a)=>{var d,_,v;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(o){o.NUL="\0",o.SOH="",o.STX="",o.ETX="",o.EOT="",o.ENQ="",o.ACK="",o.BEL="\x07",o.BS="\b",o.HT=" ",o.LF=`
55
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(p){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&p&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(p){const C=this._getMouseBufferCoords(p),L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!!(L&&T&&C)&&this._areCoordsInSelection(C,L,T)}isCellInSelection(p,C){const L=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!(!L||!T)&&this._areCoordsInSelection([p,C],L,T)}_areCoordsInSelection(p,C,L){return p[1]>C[1]&&p[1]<L[1]||C[1]===L[1]&&p[1]===C[1]&&p[0]>=C[0]&&p[0]<L[0]||C[1]<L[1]&&p[1]===L[1]&&p[0]<L[0]||C[1]<L[1]&&p[1]===C[1]&&p[0]>=C[0]}_selectWordAtCursor(p,C){var D,M;const L=(M=(D=this._linkifier.currentLink)==null?void 0:D.link)==null?void 0:M.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const T=this._getMouseBufferCoords(p);return!!T&&(this._selectWordAt(T,C),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(p,C){this._model.clearSelection(),p=Math.max(p,0),C=Math.min(C,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,p],this._model.selectionEnd=[this._bufferService.cols,C],this.refresh(),this._onSelectionChange.fire()}_handleTrim(p){this._model.handleTrim(p)&&this.refresh()}_getMouseBufferCoords(p){const C=this._mouseService.getCoords(p,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(C)return C[0]--,C[1]--,C[1]+=this._bufferService.buffer.ydisp,C}_getMouseEventScrollAmount(p){let C=(0,o.getCoordsRelativeToElement)(this._coreBrowserService.window,p,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return C>=0&&C<=L?0:(C>L&&(C-=L),C=Math.min(Math.max(C,-50),50),C/=50,C/Math.abs(C)+Math.round(14*C))}shouldForceSelection(p){return h.isMac?p.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:p.shiftKey}handleMouseDown(p){if(this._mouseDownTimeStamp=p.timeStamp,(p.button!==2||!this.hasSelection)&&p.button===0){if(!this._enabled){if(!this.shouldForceSelection(p))return;p.stopPropagation()}p.preventDefault(),this._dragScrollAmount=0,this._enabled&&p.shiftKey?this._handleIncrementalClick(p):p.detail===1?this._handleSingleClick(p):p.detail===2?this._handleDoubleClick(p):p.detail===3&&this._handleTripleClick(p),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(p){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(p))}_handleSingleClick(p){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(p)?3:0,this._model.selectionStart=this._getMouseBufferCoords(p),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const C=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);C&&C.length!==this._model.selectionStart[0]&&C.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(p){this._selectWordAtCursor(p,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(p){const C=this._getMouseBufferCoords(p);C&&(this._activeSelectionMode=2,this._selectLineAt(C[1]))}shouldColumnSelect(p){return p.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(p){if(p.stopImmediatePropagation(),!this._model.selectionStart)return;const C=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(p),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(p),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const T=L.lines.get(this._model.selectionEnd[1]);T&&T.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}C&&C[0]===this._model.selectionEnd[0]&&C[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const p=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(p.ydisp+this._bufferService.rows,p.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=p.ydisp),this.refresh()}}_handleMouseUp(p){const C=p.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&C<500&&p.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(p,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const T=(0,g.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(T,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const p=this._model.finalSelectionStart,C=this._model.finalSelectionEnd,L=!(!p||!C||p[0]===C[0]&&p[1]===C[1]);L?p&&C&&(this._oldSelectionStart&&this._oldSelectionEnd&&p[0]===this._oldSelectionStart[0]&&p[1]===this._oldSelectionStart[1]&&C[0]===this._oldSelectionEnd[0]&&C[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(p,C,L)):this._oldHasSelection&&this._fireOnSelectionChange(p,C,L)}_fireOnSelectionChange(p,C,L){this._oldSelectionStart=p,this._oldSelectionEnd=C,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(p){this.clearSelection(),this._trimListener.dispose(),this._trimListener=p.activeBuffer.lines.onTrim((C=>this._handleTrim(C)))}_convertViewportColToCharacterIndex(p,C){let L=C;for(let T=0;C>=T;T++){const D=p.loadCell(T,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:D>1&&C!==T&&(L+=D-1)}return L}setSelection(p,C,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[p,C],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(p){this._isClickInSelection(p)||(this._selectWordAtCursor(p,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(p,C,L=!0,T=!0){if(p[0]>=this._bufferService.cols)return;const D=this._bufferService.buffer,M=D.lines.get(p[1]);if(!M)return;const N=D.translateBufferLineToString(p[1],!1);let X=this._convertViewportColToCharacterIndex(M,p[0]),z=X;const U=p[0]-X;let q=0,R=0,H=0,A=0;if(N.charAt(X)===" "){for(;X>0&&N.charAt(X-1)===" ";)X--;for(;z<N.length&&N.charAt(z+1)===" ";)z++}else{let V=p[0],he=p[0];M.getWidth(V)===0&&(q++,V--),M.getWidth(he)===2&&(R++,he++);const ue=M.getString(he).length;for(ue>1&&(A+=ue-1,z+=ue-1);V>0&&X>0&&!this._isCharWordSeparator(M.loadCell(V-1,this._workCell));){M.loadCell(V-1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===0?(q++,V--):j>1&&(H+=j-1,X-=j-1),X--,V--}for(;he<M.length&&z+1<N.length&&!this._isCharWordSeparator(M.loadCell(he+1,this._workCell));){M.loadCell(he+1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===2?(R++,he++):j>1&&(A+=j-1,z+=j-1),z++,he++}}z++;let O=X+U-q+H,$=Math.min(this._bufferService.cols,z-X+q+R-H-A);if(C||N.slice(X,z).trim()!==""){if(L&&O===0&&M.getCodePoint(0)!==32){const V=D.lines.get(p[1]-1);if(V&&M.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,p[1]-1],!1,!0,!1);if(he){const ue=this._bufferService.cols-he.start;O-=ue,$+=ue}}}if(T&&O+$===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const V=D.lines.get(p[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const he=this._getWordAt([0,p[1]+1],!1,!1,!0);he&&($+=he.length)}}return{start:O,length:$}}}_selectWordAt(p,C){const L=this._getWordAt(p,C);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,p[1]--;this._model.selectionStart=[L.start,p[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(p){const C=this._getWordAt(p,!0);if(C){let L=p[1];for(;C.start<0;)C.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;C.start+C.length>this._bufferService.cols;)C.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?C.start:C.start+C.length,L]}}_isCharWordSeparator(p){return p.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(p.getChars())>=0}_selectLineAt(p){const C=this._bufferService.buffer.getWrappedRangeForLine(p),L={start:{x:0,y:C.first},end:{x:this._bufferService.cols-1,y:C.last}};this._model.selectionStart=[0,C.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,l.getRangeLength)(L,this._bufferService.cols)}};a.SelectionService=E=_([v(3,m.IBufferService),v(4,m.ICoreService),v(5,b.IMouseService),v(6,m.IOptionsService),v(7,b.IRenderService),v(8,b.ICoreBrowserService)],E)},4725:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const _=d(8343);a.ICharSizeService=(0,_.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),a.IMouseService=(0,_.createDecorator)("MouseService"),a.IRenderService=(0,_.createDecorator)("RenderService"),a.ISelectionService=(0,_.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,_.createDecorator)("ThemeService"),a.ILinkProviderService=(0,_.createDecorator)("LinkProviderService")},6731:function(W,a,d){var _=this&&this.__decorate||function(E,p,C,L){var T,D=arguments.length,M=D<3?p:L===null?L=Object.getOwnPropertyDescriptor(p,C):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(E,p,C,L);else for(var N=E.length-1;N>=0;N--)(T=E[N])&&(M=(D<3?T(M):D>3?T(p,C,M):T(p,C))||M);return D>3&&M&&Object.defineProperty(p,C,M),M},v=this&&this.__param||function(E,p){return function(C,L){p(C,L,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const o=d(7239),g=d(8055),y=d(8460),b=d(844),f=d(2585),r=g.css.toColor("#ffffff"),h=g.css.toColor("#000000"),l=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],p=[0,95,135,175,215,255];for(let C=0;C<216;C++){const L=p[C/36%6|0],T=p[C/6%6|0],D=p[C%6];E.push({css:g.channels.toCss(L,T,D),rgba:g.channels.toRgba(L,T,D)})}for(let C=0;C<24;C++){const L=8+10*C;E.push({css:g.channels.toCss(L,L,L),rgba:g.channels.toRgba(L,L,L)})}return E})());let w=a.ThemeService=class extends b.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new o.ColorContrastCache,this._halfContrastCache=new o.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:l,cursorAccent:c,selectionForeground:void 0,selectionBackgroundTransparent:m,selectionBackgroundOpaque:g.color.blend(h,m),selectionInactiveBackgroundTransparent:m,selectionInactiveBackgroundOpaque:g.color.blend(h,m),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(E={}){const p=this._colors;if(p.foreground=S(E.foreground,r),p.background=S(E.background,h),p.cursor=S(E.cursor,l),p.cursorAccent=S(E.cursorAccent,c),p.selectionBackgroundTransparent=S(E.selectionBackground,m),p.selectionBackgroundOpaque=g.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=S(E.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=g.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=E.selectionForeground?S(E.selectionForeground,g.NULL_COLOR):void 0,p.selectionForeground===g.NULL_COLOR&&(p.selectionForeground=void 0),g.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=g.color.opacity(p.selectionBackgroundTransparent,.3)),g.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=g.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=a.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=S(E.black,a.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=S(E.red,a.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=S(E.green,a.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=S(E.yellow,a.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=S(E.blue,a.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=S(E.magenta,a.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=S(E.cyan,a.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=S(E.white,a.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=S(E.brightBlack,a.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=S(E.brightRed,a.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=S(E.brightGreen,a.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=S(E.brightYellow,a.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=S(E.brightBlue,a.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=S(E.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=S(E.brightCyan,a.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=S(E.brightWhite,a.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const C=Math.min(p.ansi.length-16,E.extendedAnsi.length);for(let L=0;L<C;L++)p.ansi[L+16]=S(E.extendedAnsi[L],a.DEFAULT_ANSI_COLORS[L+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 p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}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 S(E,p){if(E!==void 0)try{return g.css.toColor(E)}catch{}return p}a.ThemeService=w=_([v(0,f.IOptionsService)],w)},6349:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const _=d(8460),v=d(844);class o extends v.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(y){if(this._maxLength===y)return;const b=new Array(y);for(let f=0;f<Math.min(y,this.length);f++)b[f]=this._array[this._getCyclicIndex(f)];this._array=b,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let b=this._length;b<y;b++)this._array[b]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,b){this._array[this._getCyclicIndex(y)]=b}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,b,...f){if(b){for(let r=y;r<this._length-b;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+b)];this._length-=b,this.onDeleteEmitter.fire({index:y,amount:b})}for(let r=this._length-1;r>=y;r--)this._array[this._getCyclicIndex(r+f.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<f.length;r++)this._array[this._getCyclicIndex(y+r)]=f[r];if(f.length&&this.onInsertEmitter.fire({index:y,amount:f.length}),this._length+f.length>this._maxLength){const r=this._length+f.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=f.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,b,f){if(!(b<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+f<0)throw new Error("Cannot shift elements in list beyond index 0");if(f>0){for(let h=b-1;h>=0;h--)this.set(y+h+f,this.get(y+h));const r=y+b+f-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<b;r++)this.set(y+r+f,this.get(y+r))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}a.CircularList=o},1439:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function d(_,v=5){if(typeof _!="object")return _;const o=Array.isArray(_)?[]:{};for(const g in _)o[g]=v<=1?_[g]:_[g]&&d(_[g],v-1);return o}},8055:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,_=0,v=0,o=0;var g,y,b,f,r;function h(c){const m=c.toString(16);return m.length<2?"0"+m:m}function l(c,m){return c<m?(m+.05)/(c+.05):(c+.05)/(m+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(m,w,S,E){return E!==void 0?`#${h(m)}${h(w)}${h(S)}${h(E)}`:`#${h(m)}${h(w)}${h(S)}`},c.toRgba=function(m,w,S,E=255){return(m<<24|w<<16|S<<8|E)>>>0},c.toColor=function(m,w,S,E){return{css:c.toCss(m,w,S,E),rgba:c.toRgba(m,w,S,E)}}})(g||(a.channels=g={})),(function(c){function m(w,S){return o=Math.round(255*S),[d,_,v]=r.toChannels(w.rgba),{css:g.toCss(d,_,v,o),rgba:g.toRgba(d,_,v,o)}}c.blend=function(w,S){if(o=(255&S.rgba)/255,o===1)return{css:S.css,rgba:S.rgba};const E=S.rgba>>24&255,p=S.rgba>>16&255,C=S.rgba>>8&255,L=w.rgba>>24&255,T=w.rgba>>16&255,D=w.rgba>>8&255;return d=L+Math.round((E-L)*o),_=T+Math.round((p-T)*o),v=D+Math.round((C-D)*o),{css:g.toCss(d,_,v),rgba:g.toRgba(d,_,v)}},c.isOpaque=function(w){return(255&w.rgba)==255},c.ensureContrastRatio=function(w,S,E){const p=r.ensureContrastRatio(w.rgba,S.rgba,E);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(w){const S=(255|w.rgba)>>>0;return[d,_,v]=r.toChannels(S),{css:g.toCss(d,_,v),rgba:S}},c.opacity=m,c.multiplyOpacity=function(w,S){return o=255&w.rgba,m(w,o*S/255)},c.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}})(y||(a.color=y={})),(function(c){let m,w;try{const S=document.createElement("canvas");S.width=1,S.height=1;const E=S.getContext("2d",{willReadFrequently:!0});E&&(m=E,m.globalCompositeOperation="copy",w=m.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),g.toColor(d,_,v);case 5:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),o=parseInt(S.slice(4,5).repeat(2),16),g.toColor(d,_,v,o);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const E=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return d=parseInt(E[1]),_=parseInt(E[2]),v=parseInt(E[3]),o=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),g.toColor(d,_,v,o);if(!m||!w)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=w,m.fillStyle=S,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[d,_,v,o]=m.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(d,_,v,o),css:S}}})(b||(a.css=b={})),(function(c){function m(w,S,E){const p=w/255,C=S/255,L=E/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(w){return m(w>>16&255,w>>8&255,255&w)},c.relativeLuminance2=m})(f||(a.rgb=f={})),(function(c){function m(S,E,p){const C=S>>24&255,L=S>>16&255,T=S>>8&255;let D=E>>24&255,M=E>>16&255,N=E>>8&255,X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));for(;X<p&&(D>0||M>0||N>0);)D-=Math.max(0,Math.ceil(.1*D)),M-=Math.max(0,Math.ceil(.1*M)),N-=Math.max(0,Math.ceil(.1*N)),X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));return(D<<24|M<<16|N<<8|255)>>>0}function w(S,E,p){const C=S>>24&255,L=S>>16&255,T=S>>8&255;let D=E>>24&255,M=E>>16&255,N=E>>8&255,X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));for(;X<p&&(D<255||M<255||N<255);)D=Math.min(255,D+Math.ceil(.1*(255-D))),M=Math.min(255,M+Math.ceil(.1*(255-M))),N=Math.min(255,N+Math.ceil(.1*(255-N))),X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));return(D<<24|M<<16|N<<8|255)>>>0}c.blend=function(S,E){if(o=(255&E)/255,o===1)return E;const p=E>>24&255,C=E>>16&255,L=E>>8&255,T=S>>24&255,D=S>>16&255,M=S>>8&255;return d=T+Math.round((p-T)*o),_=D+Math.round((C-D)*o),v=M+Math.round((L-M)*o),g.toRgba(d,_,v)},c.ensureContrastRatio=function(S,E,p){const C=f.relativeLuminance(S>>8),L=f.relativeLuminance(E>>8);if(l(C,L)<p){if(L<C){const M=m(S,E,p),N=l(C,f.relativeLuminance(M>>8));if(N<p){const X=w(S,E,p);return N>l(C,f.relativeLuminance(X>>8))?M:X}return M}const T=w(S,E,p),D=l(C,f.relativeLuminance(T>>8));if(D<p){const M=m(S,E,p);return D>l(C,f.relativeLuminance(M>>8))?T:M}return T}},c.reduceLuminance=m,c.increaseLuminance=w,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(a.rgba=r={})),a.toPaddedHex=h,a.contrastRatio=l},8969:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const _=d(844),v=d(2585),o=d(4348),g=d(7866),y=d(744),b=d(7302),f=d(6975),r=d(8460),h=d(1753),l=d(1480),c=d(7994),m=d(9282),w=d(5435),S=d(5981),E=d(2660);let p=!1;class C extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((T=>{var D;(D=this._onScrollApi)==null||D.fire(T.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(T){for(const D in T)this.optionsService.options[D]=T[D]}constructor(T){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new o.InstantiationService,this.optionsService=this.register(new b.OptionsService(T)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(f.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(l.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(c.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new w.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((D=>{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((D=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new S.WriteBuffer(((D,M)=>this._inputHandler.parse(D,M)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(T,D){this._writeBuffer.write(T,D)}writeSync(T,D){this._logService.logLevel<=v.LogLevelEnum.WARN&&!p&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p=!0),this._writeBuffer.writeSync(T,D)}input(T,D=!0){this.coreService.triggerDataEvent(T,D)}resize(T,D){isNaN(T)||isNaN(D)||(T=Math.max(T,y.MINIMUM_COLS),D=Math.max(D,y.MINIMUM_ROWS),this._bufferService.resize(T,D))}scroll(T,D=!1){this._bufferService.scroll(T,D)}scrollLines(T,D,M){this._bufferService.scrollLines(T,D,M)}scrollPages(T){this.scrollLines(T*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(T){const D=T-this._bufferService.buffer.ydisp;D!==0&&this.scrollLines(D)}registerEscHandler(T,D){return this._inputHandler.registerEscHandler(T,D)}registerDcsHandler(T,D){return this._inputHandler.registerDcsHandler(T,D)}registerCsiHandler(T,D){return this._inputHandler.registerCsiHandler(T,D)}registerOscHandler(T,D){return this._inputHandler.registerOscHandler(T,D)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let T=!1;const D=this.optionsService.rawOptions.windowsPty;D&&D.buildNumber!==void 0&&D.buildNumber!==void 0?T=D.backend==="conpty"&&D.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(T=!0),T?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const T=[];T.push(this.onLineFeed(m.updateWindowsModeWrappedState.bind(null,this._bufferService))),T.push(this.registerCsiHandler({final:"H"},(()=>((0,m.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const D of T)D.dispose()}))}}}a.CoreTerminal=C},8460:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const v=[];for(let o=0;o<this._listeners.length;o++)v.push(this._listeners[o]);for(let o=0;o<v.length;o++)v[o].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,_){return d((v=>_.fire(v)))},a.runAndSubscribe=function(d,_){return _(void 0),d((v=>_(v)))}},5435:function(W,a,d){var _=this&&this.__decorate||function(q,R,H,A){var O,$=arguments.length,V=$<3?R:A===null?A=Object.getOwnPropertyDescriptor(R,H):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(q,R,H,A);else for(var he=q.length-1;he>=0;he--)(O=q[he])&&(V=($<3?O(V):$>3?O(R,H,V):O(R,H))||V);return $>3&&V&&Object.defineProperty(R,H,V),V},v=this&&this.__param||function(q,R){return function(H,A){R(H,A,q)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const o=d(2584),g=d(7116),y=d(2015),b=d(844),f=d(482),r=d(8437),h=d(8460),l=d(643),c=d(511),m=d(3734),w=d(2585),S=d(1480),E=d(6242),p=d(6351),C=d(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},T=131072;function D(q,R){if(q>24)return R.setWinLines||!1;switch(q){case 1:return!!R.restoreWin;case 2:return!!R.minimizeWin;case 3:return!!R.setWinPosition;case 4:return!!R.setWinSizePixels;case 5:return!!R.raiseWin;case 6:return!!R.lowerWin;case 7:return!!R.refreshWin;case 8:return!!R.setWinSizeChars;case 9:return!!R.maximizeWin;case 10:return!!R.fullscreenWin;case 11:return!!R.getWinState;case 13:return!!R.getWinPosition;case 14:return!!R.getWinSizePixels;case 15:return!!R.getScreenSizePixels;case 16:return!!R.getCellSizePixels;case 18:return!!R.getWinSizeChars;case 19:return!!R.getScreenSizeChars;case 20:return!!R.getIconTitle;case 21:return!!R.getWinTitle;case 22:return!!R.pushTitle;case 23:return!!R.popTitle;case 24:return!!R.setWinLines}return!1}var M;(function(q){q[q.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",q[q.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(a.WindowsOptionsReportType=M={}));let N=0;class X extends b.Disposable{getAttrData(){return this._curAttrData}constructor(R,H,A,O,$,V,he,ue,j=new y.EscapeSequenceParser){super(),this._bufferService=R,this._charsetService=H,this._coreService=A,this._logService=O,this._optionsService=$,this._oscLinkService=V,this._coreMouseService=he,this._unicodeService=ue,this._parser=j,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new f.StringToUtf32,this._utf8Decoder=new f.Utf8ToUtf32,this._workCell=new c.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new z(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((k=>this._activeBuffer=k.activeBuffer))),this._parser.setCsiHandlerFallback(((k,ie)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(k),params:ie.toArray()})})),this._parser.setEscHandlerFallback((k=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(k)})})),this._parser.setExecuteHandlerFallback((k=>{this._logService.debug("Unknown EXECUTE code: ",{code:k})})),this._parser.setOscHandlerFallback(((k,ie,ee)=>{this._logService.debug("Unknown OSC code: ",{identifier:k,action:ie,data:ee})})),this._parser.setDcsHandlerFallback(((k,ie,ee)=>{ie==="HOOK"&&(ee=ee.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(k),action:ie,payload:ee})})),this._parser.setPrintHandler(((k,ie,ee)=>this.print(k,ie,ee))),this._parser.registerCsiHandler({final:"@"},(k=>this.insertChars(k))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(k=>this.scrollLeft(k))),this._parser.registerCsiHandler({final:"A"},(k=>this.cursorUp(k))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(k=>this.scrollRight(k))),this._parser.registerCsiHandler({final:"B"},(k=>this.cursorDown(k))),this._parser.registerCsiHandler({final:"C"},(k=>this.cursorForward(k))),this._parser.registerCsiHandler({final:"D"},(k=>this.cursorBackward(k))),this._parser.registerCsiHandler({final:"E"},(k=>this.cursorNextLine(k))),this._parser.registerCsiHandler({final:"F"},(k=>this.cursorPrecedingLine(k))),this._parser.registerCsiHandler({final:"G"},(k=>this.cursorCharAbsolute(k))),this._parser.registerCsiHandler({final:"H"},(k=>this.cursorPosition(k))),this._parser.registerCsiHandler({final:"I"},(k=>this.cursorForwardTab(k))),this._parser.registerCsiHandler({final:"J"},(k=>this.eraseInDisplay(k,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(k=>this.eraseInDisplay(k,!0))),this._parser.registerCsiHandler({final:"K"},(k=>this.eraseInLine(k,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(k=>this.eraseInLine(k,!0))),this._parser.registerCsiHandler({final:"L"},(k=>this.insertLines(k))),this._parser.registerCsiHandler({final:"M"},(k=>this.deleteLines(k))),this._parser.registerCsiHandler({final:"P"},(k=>this.deleteChars(k))),this._parser.registerCsiHandler({final:"S"},(k=>this.scrollUp(k))),this._parser.registerCsiHandler({final:"T"},(k=>this.scrollDown(k))),this._parser.registerCsiHandler({final:"X"},(k=>this.eraseChars(k))),this._parser.registerCsiHandler({final:"Z"},(k=>this.cursorBackwardTab(k))),this._parser.registerCsiHandler({final:"`"},(k=>this.charPosAbsolute(k))),this._parser.registerCsiHandler({final:"a"},(k=>this.hPositionRelative(k))),this._parser.registerCsiHandler({final:"b"},(k=>this.repeatPrecedingCharacter(k))),this._parser.registerCsiHandler({final:"c"},(k=>this.sendDeviceAttributesPrimary(k))),this._parser.registerCsiHandler({prefix:">",final:"c"},(k=>this.sendDeviceAttributesSecondary(k))),this._parser.registerCsiHandler({final:"d"},(k=>this.linePosAbsolute(k))),this._parser.registerCsiHandler({final:"e"},(k=>this.vPositionRelative(k))),this._parser.registerCsiHandler({final:"f"},(k=>this.hVPosition(k))),this._parser.registerCsiHandler({final:"g"},(k=>this.tabClear(k))),this._parser.registerCsiHandler({final:"h"},(k=>this.setMode(k))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(k=>this.setModePrivate(k))),this._parser.registerCsiHandler({final:"l"},(k=>this.resetMode(k))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(k=>this.resetModePrivate(k))),this._parser.registerCsiHandler({final:"m"},(k=>this.charAttributes(k))),this._parser.registerCsiHandler({final:"n"},(k=>this.deviceStatus(k))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(k=>this.deviceStatusPrivate(k))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(k=>this.softReset(k))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(k=>this.setCursorStyle(k))),this._parser.registerCsiHandler({final:"r"},(k=>this.setScrollRegion(k))),this._parser.registerCsiHandler({final:"s"},(k=>this.saveCursor(k))),this._parser.registerCsiHandler({final:"t"},(k=>this.windowOptions(k))),this._parser.registerCsiHandler({final:"u"},(k=>this.restoreCursor(k))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(k=>this.insertColumns(k))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(k=>this.deleteColumns(k))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(k=>this.selectProtected(k))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(k=>this.requestMode(k,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(k=>this.requestMode(k,!1))),this._parser.setExecuteHandler(o.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(o.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(o.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(o.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(o.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(o.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(o.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(o.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(o.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new E.OscHandler((k=>(this.setTitle(k),this.setIconName(k),!0)))),this._parser.registerOscHandler(1,new E.OscHandler((k=>this.setIconName(k)))),this._parser.registerOscHandler(2,new E.OscHandler((k=>this.setTitle(k)))),this._parser.registerOscHandler(4,new E.OscHandler((k=>this.setOrReportIndexedColor(k)))),this._parser.registerOscHandler(8,new E.OscHandler((k=>this.setHyperlink(k)))),this._parser.registerOscHandler(10,new E.OscHandler((k=>this.setOrReportFgColor(k)))),this._parser.registerOscHandler(11,new E.OscHandler((k=>this.setOrReportBgColor(k)))),this._parser.registerOscHandler(12,new E.OscHandler((k=>this.setOrReportCursorColor(k)))),this._parser.registerOscHandler(104,new E.OscHandler((k=>this.restoreIndexedColor(k)))),this._parser.registerOscHandler(110,new E.OscHandler((k=>this.restoreFgColor(k)))),this._parser.registerOscHandler(111,new E.OscHandler((k=>this.restoreBgColor(k)))),this._parser.registerOscHandler(112,new E.OscHandler((k=>this.restoreCursorColor(k)))),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 k in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:k},(()=>this.selectCharset("("+k))),this._parser.registerEscHandler({intermediates:")",final:k},(()=>this.selectCharset(")"+k))),this._parser.registerEscHandler({intermediates:"*",final:k},(()=>this.selectCharset("*"+k))),this._parser.registerEscHandler({intermediates:"+",final:k},(()=>this.selectCharset("+"+k))),this._parser.registerEscHandler({intermediates:"-",final:k},(()=>this.selectCharset("-"+k))),this._parser.registerEscHandler({intermediates:".",final:k},(()=>this.selectCharset("."+k))),this._parser.registerEscHandler({intermediates:"/",final:k},(()=>this.selectCharset("/"+k)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((k=>(this._logService.error("Parsing error: ",k),k))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((k,ie)=>this.requestStatusString(k,ie))))}_preserveStack(R,H,A,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=R,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=A,this._parseStack.position=O}_logSlowResolvingAsync(R){this._logService.logLevel<=w.LogLevelEnum.WARN&&Promise.race([R,new Promise(((H,A)=>setTimeout((()=>A("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(R,H){let A,O=this._activeBuffer.x,$=this._activeBuffer.y,V=0;const he=this._parseStack.paused;if(he){if(A=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(A),A;O=this._parseStack.cursorStartX,$=this._parseStack.cursorStartY,this._parseStack.paused=!1,R.length>T&&(V=this._parseStack.position+T)}if(this._logService.logLevel<=w.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof R=="string"?` "${R}"`:` "${Array.prototype.map.call(R,(k=>String.fromCharCode(k))).join("")}"`),typeof R=="string"?R.split("").map((k=>k.charCodeAt(0))):R),this._parseBuffer.length<R.length&&this._parseBuffer.length<T&&(this._parseBuffer=new Uint32Array(Math.min(R.length,T))),he||this._dirtyRowTracker.clearRange(),R.length>T)for(let k=V;k<R.length;k+=T){const ie=k+T<R.length?k+T:R.length,ee=typeof R=="string"?this._stringDecoder.decode(R.substring(k,ie),this._parseBuffer):this._utf8Decoder.decode(R.subarray(k,ie),this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,ee))return this._preserveStack(O,$,ee,k),this._logSlowResolvingAsync(A),A}else if(!he){const k=typeof R=="string"?this._stringDecoder.decode(R,this._parseBuffer):this._utf8Decoder.decode(R,this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,k))return this._preserveStack(O,$,k,0),this._logSlowResolvingAsync(A),A}this._activeBuffer.x===O&&this._activeBuffer.y===$||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),j=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);j<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(j,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(R,H,A){let O,$;const V=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,j=this._coreService.decPrivateModes.wraparound,k=this._coreService.modes.insertMode,ie=this._curAttrData;let ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&A-H>0&&ee.getWidth(this._activeBuffer.x-1)===2&&ee.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ie);let de=this._parser.precedingJoinState;for(let fe=H;fe<A;++fe){if(O=R[fe],O<127&&V){const Ke=V[String.fromCharCode(O)];Ke&&(O=Ke.charCodeAt(0))}const Ce=this._unicodeService.charProperties(O,de);$=S.UnicodeService.extractWidth(Ce);const me=S.UnicodeService.extractShouldJoin(Ce),ze=me?S.UnicodeService.extractWidth(de):0;if(de=Ce,he&&this._onA11yChar.fire((0,f.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+$-ze>ue){if(j){const Ke=ee;let Se=this._activeBuffer.x-ze;for(this._activeBuffer.x=ze,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ze>0&&ee instanceof r.BufferLine&&ee.copyCellsFrom(Ke,Se,0,ze,!1);Se<ue;)Ke.setCellFromCodepoint(Se++,0,1,ie)}else if(this._activeBuffer.x=ue-1,$===2)continue}if(me&&this._activeBuffer.x){const Ke=ee.getWidth(this._activeBuffer.x-1)?1:2;ee.addCodepointToCell(this._activeBuffer.x-Ke,O,$);for(let Se=$-ze;--Se>=0;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,ie)}else if(k&&(ee.insertCells(this._activeBuffer.x,$-ze,this._activeBuffer.getNullCell(ie)),ee.getWidth(ue-1)===2&&ee.setCellFromCodepoint(ue-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,ie)),ee.setCellFromCodepoint(this._activeBuffer.x++,O,$,ie),$>0)for(;--$;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,ie)}this._parser.precedingJoinState=de,this._activeBuffer.x<ue&&A-H>0&&ee.getWidth(this._activeBuffer.x)===0&&!ee.hasContent(this._activeBuffer.x)&&ee.setCellFromCodepoint(this._activeBuffer.x,0,1,ie),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(R,H){return R.final!=="t"||R.prefix||R.intermediates?this._parser.registerCsiHandler(R,H):this._parser.registerCsiHandler(R,(A=>!D(A.params[0],this._optionsService.rawOptions.windowOptions)||H(A)))}registerDcsHandler(R,H){return this._parser.registerDcsHandler(R,new p.DcsHandler(H))}registerEscHandler(R,H){return this._parser.registerEscHandler(R,H)}registerOscHandler(R,H){return this._parser.registerOscHandler(R,new E.OscHandler(H))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var R;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&R.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const R=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-R),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(R=this._bufferService.cols-1){this._activeBuffer.x=Math.min(R,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(R,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=R,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=R,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(R,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+R,this._activeBuffer.y+H)}cursorUp(R){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,R.params[0]||1)):this._moveCursor(0,-(R.params[0]||1)),!0}cursorDown(R){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,R.params[0]||1)):this._moveCursor(0,R.params[0]||1),!0}cursorForward(R){return this._moveCursor(R.params[0]||1,0),!0}cursorBackward(R){return this._moveCursor(-(R.params[0]||1),0),!0}cursorNextLine(R){return this.cursorDown(R),this._activeBuffer.x=0,!0}cursorPrecedingLine(R){return this.cursorUp(R),this._activeBuffer.x=0,!0}cursorCharAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(R){return this._setCursor(R.length>=2?(R.params[1]||1)-1:0,(R.params[0]||1)-1),!0}charPosAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(R){return this._moveCursor(R.params[0]||1,0),!0}linePosAbsolute(R){return this._setCursor(this._activeBuffer.x,(R.params[0]||1)-1),!0}vPositionRelative(R){return this._moveCursor(0,R.params[0]||1),!0}hVPosition(R){return this.cursorPosition(R),!0}tabClear(R){const H=R.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=R.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=R.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(R){const H=R.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(R,H,A,O=!1,$=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);V.replaceCells(H,A,this._activeBuffer.getNullCell(this._eraseAttrData()),$),O&&(V.isWrapped=!1)}_resetBufferLine(R,H=!1){const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);A&&(A.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+R),A.isWrapped=!1)}eraseInDisplay(R,H=!1){let A;switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);A<this._bufferService.rows;A++)this._resetBufferLine(A,H);this._dirtyRowTracker.markDirty(A);break;case 1:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(A+1).isWrapped=!1);A--;)this._resetBufferLine(A,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(A=this._bufferService.rows,this._dirtyRowTracker.markDirty(A-1);A--;)this._resetBufferLine(A,H);this._dirtyRowTracker.markDirty(0);break;case 3:const O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(R,H=!1){switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(R){this._restrictCursor();let H=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,$=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;H--;)this._activeBuffer.lines.splice($-1,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(R){this._restrictCursor();let H=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y;let O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;H--;)this._activeBuffer.lines.splice(A,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(R){let H=R.params[0]||1;for(;H--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(R){let H=R.params[0]||1;for(;H--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(R.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(R){const H=this._parser.precedingJoinState;if(!H)return!0;const A=R.params[0]||1,O=S.UnicodeService.extractWidth(H),$=this._activeBuffer.x-O,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString($),he=new Uint32Array(V.length*A);let ue=0;for(let k=0;k<V.length;){const ie=V.codePointAt(k)||0;he[ue++]=ie,k+=ie>65535?2:1}let j=ue;for(let k=1;k<A;++k)he.copyWithin(j,0,ue),j+=ue;return this.print(he,0,j),!0}sendDeviceAttributesPrimary(R){return R.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(R){return R.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(R.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c")),!0}_is(R){return(this._optionsService.rawOptions.termName+"").indexOf(R)===0}setMode(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),R.params[H]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(R,H){const A=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:$}=this._coreMouseService,V=this._coreService,{buffers:he,cols:ue}=this._bufferService,{active:j,alt:k}=he,ie=this._optionsService.rawOptions,ee=me=>me?1:2,de=R.params[0];return fe=de,Ce=H?de===2?4:de===4?ee(V.modes.insertMode):de===12?3:de===20?ee(ie.convertEol):0:de===1?ee(A.applicationCursorKeys):de===3?ie.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:de===6?ee(A.origin):de===7?ee(A.wraparound):de===8?3:de===9?ee(O==="X10"):de===12?ee(ie.cursorBlink):de===25?ee(!V.isCursorHidden):de===45?ee(A.reverseWraparound):de===66?ee(A.applicationKeypad):de===67?4:de===1e3?ee(O==="VT200"):de===1002?ee(O==="DRAG"):de===1003?ee(O==="ANY"):de===1004?ee(A.sendFocus):de===1005?4:de===1006?ee($==="SGR"):de===1015?4:de===1016?ee($==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?ee(j===k):de===2004?ee(A.bracketedPasteMode):0,V.triggerDataEvent(`${o.C0.ESC}[${H?"":"?"}${fe};${Ce}$y`),!0;var fe,Ce}_updateAttrColor(R,H,A,O,$){return H===2?(R|=50331648,R&=-16777216,R|=m.AttributeData.fromColorRGB([A,O,$])):H===5&&(R&=-50331904,R|=33554432|255&A),R}_extractColor(R,H,A){const O=[0,0,-1,0,0,0];let $=0,V=0;do{if(O[V+$]=R.params[H+V],R.hasSubParams(H+V)){const he=R.getSubParams(H+V);let ue=0;do O[1]===5&&($=1),O[V+ue+1+$]=he[ue];while(++ue<he.length&&ue+V+1+$<O.length);break}if(O[1]===5&&V+$>=2||O[1]===2&&V+$>=5)break;O[1]&&($=1)}while(++V+H<R.length&&V+$<O.length);for(let he=2;he<O.length;++he)O[he]===-1&&(O[he]=0);switch(O[0]){case 38:A.fg=this._updateAttrColor(A.fg,O[1],O[3],O[4],O[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,O[1],O[3],O[4],O[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,O[1],O[3],O[4],O[5])}return V}_processUnderline(R,H){H.extended=H.extended.clone(),(!~R||R>5)&&(R=1),H.extended.underlineStyle=R,H.fg|=268435456,R===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(R){R.fg=r.DEFAULT_ATTR_DATA.fg,R.bg=r.DEFAULT_ATTR_DATA.bg,R.extended=R.extended.clone(),R.extended.underlineStyle=0,R.extended.underlineColor&=-67108864,R.updateExtended()}charAttributes(R){if(R.length===1&&R.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=R.length;let A;const O=this._curAttrData;for(let $=0;$<H;$++)A=R.params[$],A>=30&&A<=37?(O.fg&=-50331904,O.fg|=16777216|A-30):A>=40&&A<=47?(O.bg&=-50331904,O.bg|=16777216|A-40):A>=90&&A<=97?(O.fg&=-50331904,O.fg|=16777224|A-90):A>=100&&A<=107?(O.bg&=-50331904,O.bg|=16777224|A-100):A===0?this._processSGR0(O):A===1?O.fg|=134217728:A===3?O.bg|=67108864:A===4?(O.fg|=268435456,this._processUnderline(R.hasSubParams($)?R.getSubParams($)[0]:1,O)):A===5?O.fg|=536870912:A===7?O.fg|=67108864:A===8?O.fg|=1073741824:A===9?O.fg|=2147483648:A===2?O.bg|=134217728:A===21?this._processUnderline(2,O):A===22?(O.fg&=-134217729,O.bg&=-134217729):A===23?O.bg&=-67108865:A===24?(O.fg&=-268435457,this._processUnderline(0,O)):A===25?O.fg&=-536870913:A===27?O.fg&=-67108865:A===28?O.fg&=-1073741825:A===29?O.fg&=2147483647:A===39?(O.fg&=-67108864,O.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):A===49?(O.bg&=-67108864,O.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):A===38||A===48||A===58?$+=this._extractColor(R,$,O):A===53?O.bg|=1073741824:A===55?O.bg&=-1073741825:A===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):A===100?(O.fg&=-67108864,O.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",A);return!0}deviceStatus(R){switch(R.params[0]){case 5:this._coreService.triggerDataEvent(`${o.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[${H};${A}R`)}return!0}deviceStatusPrivate(R){if(R.params[0]===6){const H=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[?${H};${A}R`)}return!0}softReset(R){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(R){const H=R.params[0]||1;switch(H){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const A=H%2==1;return this._optionsService.options.cursorBlink=A,!0}setScrollRegion(R){const H=R.params[0]||1;let A;return(R.length<2||(A=R.params[1])>this._bufferService.rows||A===0)&&(A=this._bufferService.rows),A>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=A-1,this._setCursor(0,0)),!0}windowOptions(R){if(!D(R.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=R.length>1?R.params[1]:0;switch(R.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${o.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(R){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(R){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(R){return this._windowTitle=R,this._onTitleChange.fire(R),!0}setIconName(R){return this._iconName=R,!0}setOrReportIndexedColor(R){const H=[],A=R.split(";");for(;A.length>1;){const O=A.shift(),$=A.shift();if(/^\d+$/.exec(O)){const V=parseInt(O);if(U(V))if($==="?")H.push({type:0,index:V});else{const he=(0,C.parseColor)($);he&&H.push({type:1,index:V,color:he})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(R){const H=R.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(R,H){this._getCurrentLinkId()&&this._finishHyperlink();const A=R.split(":");let O;const $=A.findIndex((V=>V.startsWith("id=")));return $!==-1&&(O=A[$].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(R,H){const A=R.split(";");for(let O=0;O<A.length&&!(H>=this._specialColors.length);++O,++H)if(A[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const $=(0,C.parseColor)(A[O]);$&&this._onColor.fire([{type:1,index:this._specialColors[H],color:$}])}return!0}setOrReportFgColor(R){return this._setOrReportSpecialColor(R,0)}setOrReportBgColor(R){return this._setOrReportSpecialColor(R,1)}setOrReportCursorColor(R){return this._setOrReportSpecialColor(R,2)}restoreIndexedColor(R){if(!R)return this._onColor.fire([{type:2}]),!0;const H=[],A=R.split(";");for(let O=0;O<A.length;++O)if(/^\d+$/.exec(A[O])){const $=parseInt(A[O]);U($)&&H.push({type:2,index:$})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(R){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(R){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(R){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),!0}selectCharset(R){return R.length!==2?(this.selectDefaultCharset(),!0):(R[0]==="/"||this._charsetService.setgCharset(L[R[0]],g.CHARSETS[R[1]]||g.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const R=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,R,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(R){return this._charsetService.setgLevel(R),!0}screenAlignmentPattern(){const R=new c.CellData;R.content=4194373,R.fg=this._curAttrData.fg,R.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const A=this._activeBuffer.ybase+this._activeBuffer.y+H,O=this._activeBuffer.lines.get(A);O&&(O.fill(R),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(R,H){const A=this._bufferService.buffer,O=this._optionsService.rawOptions;return($=>(this._coreService.triggerDataEvent(`${o.C0.ESC}${$}${o.C0.ESC}\\`),!0))(R==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:R==='"p'?'P1$r61;1"p':R==="r"?`P1$r${A.scrollTop+1};${A.scrollBottom+1}r`:R==="m"?"P1$r0m":R===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(R,H){this._dirtyRowTracker.markRangeDirty(R,H)}}a.InputHandler=X;let z=class{constructor(q){this._bufferService=q,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(q){q<this.start?this.start=q:q>this.end&&(this.end=q)}markRangeDirty(q,R){q>R&&(N=q,q=R,R=N),q<this.start&&(this.start=q),R>this.end&&(this.end=R)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function U(q){return 0<=q&&q<256}z=_([v(0,w.IBufferService)],z)},844:(W,a)=>{function d(_){for(const v of _)v.dispose();_.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},a.toDisposable=function(_){return{dispose:_}},a.disposeArray=d,a.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},1505:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(v,o,g){this._data[v]||(this._data[v]={}),this._data[v][o]=g}get(v,o){return this._data[v]?this._data[v][o]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(_,v,o,g,y){this._data.get(_,v)||this._data.set(_,v,new d),this._data.get(_,v).set(o,g,y)}get(_,v,o,g){var y;return(y=this._data.get(_,v))==null?void 0:y.get(o,g)}clear(){this._data.clear()}}},6114:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,_=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const v=d.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),a.isIpad=_==="iPad",a.isIphone=_==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),a.isLinux=_.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},6106:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let d=0;a.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(d=this._search(this._getKey(_)),this._array.splice(d,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const v=this._getKey(_);if(v===void 0||(d=this._search(v),d===-1)||this._getKey(this._array[d])!==v)return!1;do if(this._array[d]===_)return this._array.splice(d,1),!0;while(++d<this._array.length&&this._getKey(this._array[d])===v);return!1}*getKeyIterator(_){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do yield this._array[d];while(++d<this._array.length&&this._getKey(this._array[d])===_)}forEachByKey(_,v){if(this._array.length!==0&&(d=this._search(_),!(d<0||d>=this._array.length)&&this._getKey(this._array[d])===_))do v(this._array[d]);while(++d<this._array.length&&this._getKey(this._array[d])===_)}values(){return[...this._array].values()}_search(_){let v=0,o=this._array.length-1;for(;o>=v;){let g=v+o>>1;const y=this._getKey(this._array[g]);if(y>_)o=g-1;else{if(!(y<_)){for(;g>0&&this._getKey(this._array[g-1])===_;)g--;return g}v=g+1}}return v}}},7226:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const _=d(6114);class v{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 b=0,f=0,r=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),f=Math.max(b,f),h=y.timeRemaining(),1.5*f>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class o extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const b=Date.now()+y;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}a.PriorityTaskQueue=o,a.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:o,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const _=d(643);a.updateWindowsModeWrappedState=function(v){const o=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),g=o==null?void 0:o.get(v.cols-1),y=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);y&&g&&(y.isWrapped=g[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&g[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new d;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}get underlineVariantOffset(){const o=(3758096384&this._ext)>>29;return o<0?4294967288^o:o}set underlineVariantOffset(o){this._ext&=536870911,this._ext|=o<<29&3758096384}constructor(o=0,g=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=g}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=_},9092:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const _=d(6349),v=d(7226),o=d(3734),g=d(8437),y=d(4634),b=d(511),f=d(643),r=d(4863),h=d(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(l,c,m){this._hasScrollback=l,this._optionsService=c,this._bufferService=m,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=b.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]),this._whitespaceCell=b.CellData.fromCharData([0,f.WHITESPACE_CELL_CHAR,f.WHITESPACE_CELL_WIDTH,f.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(l){return l?(this._nullCell.fg=l.fg,this._nullCell.bg=l.bg,this._nullCell.extended=l.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new o.ExtendedAttrs),this._nullCell}getWhitespaceCell(l){return l?(this._whitespaceCell.fg=l.fg,this._whitespaceCell.bg=l.bg,this._whitespaceCell.extended=l.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new o.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,c){return new g.BufferLine(this._bufferService.cols,this.getNullCell(l),c)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const l=this.ybase+this.y-this.ydisp;return l>=0&&l<this._rows}_getCorrectBufferLength(l){if(!this._hasScrollback)return l;const c=l+this._optionsService.rawOptions.scrollback;return c>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:c}fillViewportRows(l){if(this.lines.length===0){l===void 0&&(l=g.DEFAULT_ATTR_DATA);let c=this._rows;for(;c--;)this.lines.push(this.getBlankLine(l))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(l,c){const m=this.getNullCell(g.DEFAULT_ATTR_DATA);let w=0;const S=this._getCorrectBufferLength(c);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<l)for(let p=0;p<this.lines.length;p++)w+=+this.lines.get(p).resize(l,m);let E=0;if(this._rows<c)for(let p=this._rows;p<c;p++)this.lines.length<c+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(l,m)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(l,m)));else for(let p=this._rows;p>c;p--)this.lines.length>c+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const p=this.lines.length-S;p>0&&(this.lines.trimStart(p),this.ybase=Math.max(this.ybase-p,0),this.ydisp=Math.max(this.ydisp-p,0),this.savedY=Math.max(this.savedY-p,0)),this.lines.maxLength=S}this.x=Math.min(this.x,l-1),this.y=Math.min(this.y,c-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,l-1),this.scrollTop=0}if(this.scrollBottom=c-1,this._isReflowEnabled&&(this._reflow(l,c),this._cols>l))for(let E=0;E<this.lines.length;E++)w+=+this.lines.get(E).resize(l,m);this._cols=l,this._rows=c,this._memoryCleanupQueue.clear(),w>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let l=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,l=!1);let c=0;for(;this._memoryCleanupPosition<this.lines.length;)if(c+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),c>100)return!0;return l}get _isReflowEnabled(){const l=this._optionsService.rawOptions.windowsPty;return l&&l.buildNumber?this._hasScrollback&&l.backend==="conpty"&&l.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(l,c){this._cols!==l&&(l>this._cols?this._reflowLarger(l,c):this._reflowSmaller(l,c))}_reflowLarger(l,c){const m=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(m.length>0){const w=(0,y.reflowLargerCreateNewLayout)(this.lines,m);(0,y.reflowLargerApplyNewLayout)(this.lines,w.layout),this._reflowLargerAdjustViewport(l,c,w.countRemoved)}}_reflowLargerAdjustViewport(l,c,m){const w=this.getNullCell(g.DEFAULT_ATTR_DATA);let S=m;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<c&&this.lines.push(new g.BufferLine(l,w))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-m,0)}_reflowSmaller(l,c){const m=this.getNullCell(g.DEFAULT_ATTR_DATA),w=[];let S=0;for(let E=this.lines.length-1;E>=0;E--){let p=this.lines.get(E);if(!p||!p.isWrapped&&p.getTrimmedLength()<=l)continue;const C=[p];for(;p.isWrapped&&E>0;)p=this.lines.get(--E),C.unshift(p);const L=this.ybase+this.y;if(L>=E&&L<E+C.length)continue;const T=C[C.length-1].getTrimmedLength(),D=(0,y.reflowSmallerGetNewLineLengths)(C,this._cols,l),M=D.length-C.length;let N;N=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const X=[];for(let A=0;A<M;A++){const O=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);X.push(O)}X.length>0&&(w.push({start:E+C.length+S,newLines:X}),S+=X.length),C.push(...X);let z=D.length-1,U=D[z];U===0&&(z--,U=D[z]);let q=C.length-M-1,R=T;for(;q>=0;){const A=Math.min(R,U);if(C[z]===void 0)break;if(C[z].copyCellsFrom(C[q],R-A,U-A,A,!0),U-=A,U===0&&(z--,U=D[z]),R-=A,R===0){q--;const O=Math.max(q,0);R=(0,y.getWrappedLineTrimmedLength)(C,O,this._cols)}}for(let A=0;A<C.length;A++)D[A]<l&&C[A].setCell(D[A],m);let H=M-N;for(;H-- >0;)this.ybase===0?this.y<c-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-c&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+c-1)}if(w.length>0){const E=[],p=[];for(let z=0;z<this.lines.length;z++)p.push(this.lines.get(z));const C=this.lines.length;let L=C-1,T=0,D=w[T];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let M=0;for(let z=Math.min(this.lines.maxLength-1,C+S-1);z>=0;z--)if(D&&D.start>L+M){for(let U=D.newLines.length-1;U>=0;U--)this.lines.set(z--,D.newLines[U]);z++,E.push({index:L+1,amount:D.newLines.length}),M+=D.newLines.length,D=w[++T]}else this.lines.set(z,p[L--]);let N=0;for(let z=E.length-1;z>=0;z--)E[z].index+=N,this.lines.onInsertEmitter.fire(E[z]),N+=E[z].amount;const X=Math.max(0,C+S-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(l,c,m=0,w){const S=this.lines.get(l);return S?S.translateToString(c,m,w):""}getWrappedRangeForLine(l){let c=l,m=l;for(;c>0&&this.lines.get(c).isWrapped;)c--;for(;m+1<this.lines.length&&this.lines.get(m+1).isWrapped;)m++;return{first:c,last:m}}setupTabStops(l){for(l!=null?this.tabs[l]||(l=this.prevStop(l)):(this.tabs={},l=0);l<this._cols;l+=this._optionsService.rawOptions.tabStopWidth)this.tabs[l]=!0}prevStop(l){for(l==null&&(l=this.x);!this.tabs[--l]&&l>0;);return l>=this._cols?this._cols-1:l<0?0:l}nextStop(l){for(l==null&&(l=this.x);!this.tabs[++l]&&l<this._cols;);return l>=this._cols?this._cols-1:l<0?0:l}clearMarkers(l){this._isClearing=!0;for(let c=0;c<this.markers.length;c++)this.markers[c].line===l&&(this.markers[c].dispose(),this.markers.splice(c--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].dispose(),this.markers.splice(l--,1);this._isClearing=!1}addMarker(l){const c=new r.Marker(l);return this.markers.push(c),c.register(this.lines.onTrim((m=>{c.line-=m,c.line<0&&c.dispose()}))),c.register(this.lines.onInsert((m=>{c.line>=m.index&&(c.line+=m.amount)}))),c.register(this.lines.onDelete((m=>{c.line>=m.index&&c.line<m.index+m.amount&&c.dispose(),c.line>m.index&&(c.line-=m.amount)}))),c.register(c.onDispose((()=>this._removeMarker(c)))),c}_removeMarker(l){this._isClearing||this.markers.splice(this.markers.indexOf(l),1)}}},8437:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const _=d(3734),v=d(511),o=d(643),g=d(482);a.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let y=0;class b{constructor(r,h,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const c=h||v.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]);for(let m=0;m<r;++m)this.setCell(m,c);this.length=r}get(r){const h=this._data[3*r+0],l=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:l?(0,g.stringFromCodePoint)(l):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):l]}set(r,h){this._data[3*r+1]=h[o.CHAR_DATA_ATTR_INDEX],h[o.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[o.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[o.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,g.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return y=3*r,h.content=this._data[y+0],h.fg=this._data[y+1],h.bg=this._data[y+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,l,c){268435456&c.bg&&(this._extendedAttrs[r]=c.extended),this._data[3*r+0]=h|l<<22,this._data[3*r+1]=c.fg,this._data[3*r+2]=c.bg}addCodepointToCell(r,h,l){let c=this._data[3*r+0];2097152&c?this._combined[r]+=(0,g.stringFromCodePoint)(h):2097151&c?(this._combined[r]=(0,g.stringFromCodePoint)(2097151&c)+(0,g.stringFromCodePoint)(h),c&=-2097152,c|=2097152):c=h|4194304,l&&(c&=-12582913,c|=l<<22),this._data[3*r+0]=c}insertCells(r,h,l){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length-r){const c=new v.CellData;for(let m=this.length-r-h-1;m>=0;--m)this.setCell(r+h+m,this.loadCell(r+m,c));for(let m=0;m<h;++m)this.setCell(r+m,l)}else for(let c=r;c<this.length;++c)this.setCell(c,l);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,l)}deleteCells(r,h,l){if(r%=this.length,h<this.length-r){const c=new v.CellData;for(let m=0;m<this.length-r-h;++m)this.setCell(r+m,this.loadCell(r+h+m,c));for(let m=this.length-h;m<this.length;++m)this.setCell(m,l)}else for(let c=r;c<this.length;++c)this.setCell(c,l);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,l)}replaceCells(r,h,l,c=!1){if(c)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,l);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,l),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,l);r<h&&r<this.length;)this.setCell(r++,l)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const l=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*l)this._data=new Uint32Array(this._data.buffer,0,l);else{const c=new Uint32Array(l);c.set(this._data),this._data=c}for(let c=this.length;c<r;++c)this.setCell(c,h)}else{this._data=this._data.subarray(0,l);const c=Object.keys(this._combined);for(let w=0;w<c.length;w++){const S=parseInt(c[w],10);S>=r&&delete this._combined[S]}const m=Object.keys(this._extendedAttrs);for(let w=0;w<m.length;w++){const S=parseInt(m[w],10);S>=r&&delete this._extendedAttrs[S]}}return this.length=r,4*l*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,r);else{this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new b(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,l,c,m){const w=r._data;if(m)for(let E=c-1;E>=0;E--){for(let p=0;p<3;p++)this._data[3*(l+E)+p]=w[3*(h+E)+p];268435456&w[3*(h+E)+2]&&(this._extendedAttrs[l+E]=r._extendedAttrs[h+E])}else for(let E=0;E<c;E++){for(let p=0;p<3;p++)this._data[3*(l+E)+p]=w[3*(h+E)+p];268435456&w[3*(h+E)+2]&&(this._extendedAttrs[l+E]=r._extendedAttrs[h+E])}const S=Object.keys(r._combined);for(let E=0;E<S.length;E++){const p=parseInt(S[E],10);p>=h&&(this._combined[p-h+l]=r._combined[p])}}translateToString(r,h,l,c){h=h??0,l=l??this.length,r&&(l=Math.min(l,this.getTrimmedLength())),c&&(c.length=0);let m="";for(;h<l;){const w=this._data[3*h+0],S=2097151&w,E=2097152&w?this._combined[h]:S?(0,g.stringFromCodePoint)(S):o.WHITESPACE_CELL_CHAR;if(m+=E,c)for(let p=0;p<E.length;++p)c.push(h);h+=w>>22||1}return c&&c.push(h),m}}a.BufferLine=b},4841:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(d,_){if(d.start.y>d.end.y)throw new Error(`Buffer range end (${d.end.x}, ${d.end.y}) cannot be before start (${d.start.x}, ${d.start.y})`);return _*(d.end.y-d.start.y)+(d.end.x-d.start.x+1)}},4634:(W,a)=>{function d(_,v,o){if(v===_.length-1)return _[v].getTrimmedLength();const g=!_[v].hasContent(o-1)&&_[v].getWidth(o-1)===1,y=_[v+1].getWidth(0)===2;return g&&y?o-1:o}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(_,v,o,g,y){const b=[];for(let f=0;f<_.length-1;f++){let r=f,h=_.get(++r);if(!h.isWrapped)continue;const l=[_.get(f)];for(;r<_.length&&h.isWrapped;)l.push(h),h=_.get(++r);if(g>=f&&g<r){f+=l.length-1;continue}let c=0,m=d(l,c,v),w=1,S=0;for(;w<l.length;){const p=d(l,w,v),C=p-S,L=o-m,T=Math.min(C,L);l[c].copyCellsFrom(l[w],S,m,T,!1),m+=T,m===o&&(c++,m=0),S+=T,S===p&&(w++,S=0),m===0&&c!==0&&l[c-1].getWidth(o-1)===2&&(l[c].copyCellsFrom(l[c-1],o-1,m++,1,!1),l[c-1].setCell(o-1,y))}l[c].replaceCells(m,o,y);let E=0;for(let p=l.length-1;p>0&&(p>c||l[p].getTrimmedLength()===0);p--)E++;E>0&&(b.push(f+l.length-E),b.push(E)),f+=l.length-1}return b},a.reflowLargerCreateNewLayout=function(_,v){const o=[];let g=0,y=v[g],b=0;for(let f=0;f<_.length;f++)if(y===f){const r=v[++g];_.onDeleteEmitter.fire({index:f-b,amount:r}),f+=r-1,b+=r,y=v[++g]}else o.push(f);return{layout:o,countRemoved:b}},a.reflowLargerApplyNewLayout=function(_,v){const o=[];for(let g=0;g<v.length;g++)o.push(_.get(v[g]));for(let g=0;g<o.length;g++)_.set(g,o[g]);_.length=v.length},a.reflowSmallerGetNewLineLengths=function(_,v,o){const g=[],y=_.map(((h,l)=>d(_,l,v))).reduce(((h,l)=>h+l));let b=0,f=0,r=0;for(;r<y;){if(y-r<o){g.push(y-r);break}b+=o;const h=d(_,f,v);b>h&&(b-=h,f++);const l=_[f].getWidth(b-1)===2;l&&b--;const c=l?o-1:o;g.push(c),r+=c}return g},a.getWrappedLineTrimmedLength=d},5295:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const _=d(8460),v=d(844),o=d(9092);class g extends v.Disposable{constructor(b,f){super(),this._optionsService=b,this._bufferService=f,this._onBufferActivate=this.register(new _.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new o.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new o.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(b){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(b),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(b,f){this._normal.resize(b,f),this._alt.resize(b,f),this.setupTabStops(b)}setupTabStops(b){this._normal.setupTabStops(b),this._alt.setupTabStops(b)}}a.BufferSet=g},511:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const _=d(482),v=d(643),o=d(3734);class g extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const f=new g;return f.setFromCharData(b),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(b[v.CHAR_DATA_CHAR_INDEX].length===2){const r=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=b[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=g},643:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const _=d(8460),v=d(844);class o{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=o._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}a.Marker=o,o._nextId=1},7116:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(W,a)=>{var d,_,v;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(o){o.NUL="\0",o.SOH="",o.STX="",o.ETX="",o.EOT="",o.ENQ="",o.ACK="",o.BEL="\x07",o.BS="\b",o.HT=" ",o.LF=`
56
56
  `,o.VT="\v",o.FF="\f",o.CR="\r",o.SO="",o.SI="",o.DLE="",o.DC1="",o.DC2="",o.DC3="",o.DC4="",o.NAK="",o.SYN="",o.ETB="",o.CAN="",o.EM="",o.SUB="",o.ESC="\x1B",o.FS="",o.GS="",o.RS="",o.US="",o.SP=" ",o.DEL=""})(d||(a.C0=d={})),(function(o){o.PAD="€",o.HOP="",o.BPH="‚",o.NBH="ƒ",o.IND="„",o.NEL="…",o.SSA="†",o.ESA="‡",o.HTS="ˆ",o.HTJ="‰",o.VTS="Š",o.PLD="‹",o.PLU="Œ",o.RI="",o.SS2="Ž",o.SS3="",o.DCS="",o.PU1="‘",o.PU2="’",o.STS="“",o.CCH="”",o.MW="•",o.SPA="–",o.EPA="—",o.SOS="˜",o.SGCI="™",o.SCI="š",o.CSI="›",o.ST="œ",o.OSC="",o.PM="ž",o.APC="Ÿ"})(_||(a.C1=_={})),(function(o){o.ST=`${d.ESC}\\`})(v||(a.C1_ESCAPED=v={}))},7399:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const _=d(2584),v={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(o,g,y,b){const f={type:0,cancel:!1,key:void 0},r=(o.shiftKey?1:0)|(o.altKey?2:0)|(o.ctrlKey?4:0)|(o.metaKey?8:0);switch(o.keyCode){case 0:o.key==="UIKeyInputUpArrow"?f.key=g?_.C0.ESC+"OA":_.C0.ESC+"[A":o.key==="UIKeyInputLeftArrow"?f.key=g?_.C0.ESC+"OD":_.C0.ESC+"[D":o.key==="UIKeyInputRightArrow"?f.key=g?_.C0.ESC+"OC":_.C0.ESC+"[C":o.key==="UIKeyInputDownArrow"&&(f.key=g?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:f.key=o.ctrlKey?"\b":_.C0.DEL,o.altKey&&(f.key=_.C0.ESC+f.key);break;case 9:if(o.shiftKey){f.key=_.C0.ESC+"[Z";break}f.key=_.C0.HT,f.cancel=!0;break;case 13:f.key=o.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,f.cancel=!0;break;case 27:f.key=_.C0.ESC,o.altKey&&(f.key=_.C0.ESC+_.C0.ESC),f.cancel=!0;break;case 37:if(o.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"D",f.key===_.C0.ESC+"[1;3D"&&(f.key=_.C0.ESC+(y?"b":"[1;5D"))):f.key=g?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(o.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"C",f.key===_.C0.ESC+"[1;3C"&&(f.key=_.C0.ESC+(y?"f":"[1;5C"))):f.key=g?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(o.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"A",y||f.key!==_.C0.ESC+"[1;3A"||(f.key=_.C0.ESC+"[1;5A")):f.key=g?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(o.metaKey)break;r?(f.key=_.C0.ESC+"[1;"+(r+1)+"B",y||f.key!==_.C0.ESC+"[1;3B"||(f.key=_.C0.ESC+"[1;5B")):f.key=g?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:o.shiftKey||o.ctrlKey||(f.key=_.C0.ESC+"[2~");break;case 46:f.key=r?_.C0.ESC+"[3;"+(r+1)+"~":_.C0.ESC+"[3~";break;case 36:f.key=r?_.C0.ESC+"[1;"+(r+1)+"H":g?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:f.key=r?_.C0.ESC+"[1;"+(r+1)+"F":g?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:o.shiftKey?f.type=2:o.ctrlKey?f.key=_.C0.ESC+"[5;"+(r+1)+"~":f.key=_.C0.ESC+"[5~";break;case 34:o.shiftKey?f.type=3:o.ctrlKey?f.key=_.C0.ESC+"[6;"+(r+1)+"~":f.key=_.C0.ESC+"[6~";break;case 112:f.key=r?_.C0.ESC+"[1;"+(r+1)+"P":_.C0.ESC+"OP";break;case 113:f.key=r?_.C0.ESC+"[1;"+(r+1)+"Q":_.C0.ESC+"OQ";break;case 114:f.key=r?_.C0.ESC+"[1;"+(r+1)+"R":_.C0.ESC+"OR";break;case 115:f.key=r?_.C0.ESC+"[1;"+(r+1)+"S":_.C0.ESC+"OS";break;case 116:f.key=r?_.C0.ESC+"[15;"+(r+1)+"~":_.C0.ESC+"[15~";break;case 117:f.key=r?_.C0.ESC+"[17;"+(r+1)+"~":_.C0.ESC+"[17~";break;case 118:f.key=r?_.C0.ESC+"[18;"+(r+1)+"~":_.C0.ESC+"[18~";break;case 119:f.key=r?_.C0.ESC+"[19;"+(r+1)+"~":_.C0.ESC+"[19~";break;case 120:f.key=r?_.C0.ESC+"[20;"+(r+1)+"~":_.C0.ESC+"[20~";break;case 121:f.key=r?_.C0.ESC+"[21;"+(r+1)+"~":_.C0.ESC+"[21~";break;case 122:f.key=r?_.C0.ESC+"[23;"+(r+1)+"~":_.C0.ESC+"[23~";break;case 123:f.key=r?_.C0.ESC+"[24;"+(r+1)+"~":_.C0.ESC+"[24~";break;default:if(!o.ctrlKey||o.shiftKey||o.altKey||o.metaKey)if(y&&!b||!o.altKey||o.metaKey)!y||o.altKey||o.ctrlKey||o.shiftKey||!o.metaKey?o.key&&!o.ctrlKey&&!o.altKey&&!o.metaKey&&o.keyCode>=48&&o.key.length===1?f.key=o.key:o.key&&o.ctrlKey&&(o.key==="_"&&(f.key=_.C0.US),o.key==="@"&&(f.key=_.C0.NUL)):o.keyCode===65&&(f.type=1);else{const h=v[o.keyCode],l=h==null?void 0:h[o.shiftKey?1:0];if(l)f.key=_.C0.ESC+l;else if(o.keyCode>=65&&o.keyCode<=90){const c=o.ctrlKey?o.keyCode-64:o.keyCode+32;let m=String.fromCharCode(c);o.shiftKey&&(m=m.toUpperCase()),f.key=_.C0.ESC+m}else if(o.keyCode===32)f.key=_.C0.ESC+(o.ctrlKey?_.C0.NUL:" ");else if(o.key==="Dead"&&o.code.startsWith("Key")){let c=o.code.slice(3,4);o.shiftKey||(c=c.toLowerCase()),f.key=_.C0.ESC+c,f.cancel=!0}}else o.keyCode>=65&&o.keyCode<=90?f.key=String.fromCharCode(o.keyCode-64):o.keyCode===32?f.key=_.C0.NUL:o.keyCode>=51&&o.keyCode<=55?f.key=String.fromCharCode(o.keyCode-51+27):o.keyCode===56?f.key=_.C0.DEL:o.keyCode===219?f.key=_.C0.ESC:o.keyCode===220?f.key=_.C0.FS:o.keyCode===221&&(f.key=_.C0.GS)}return f}},482:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,_=0,v=d.length){let o="";for(let g=_;g<v;++g){let y=d[g];y>65535?(y-=65536,o+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):o+=String.fromCharCode(y)}return o},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,_){const v=d.length;if(!v)return 0;let o=0,g=0;if(this._interim){const y=d.charCodeAt(g++);56320<=y&&y<=57343?_[o++]=1024*(this._interim-55296)+y-56320+65536:(_[o++]=this._interim,_[o++]=y),this._interim=0}for(let y=g;y<v;++y){const b=d.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,o;const f=d.charCodeAt(y);56320<=f&&f<=57343?_[o++]=1024*(b-55296)+f-56320+65536:(_[o++]=b,_[o++]=f)}else b!==65279&&(_[o++]=b)}return o}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,_){const v=d.length;if(!v)return 0;let o,g,y,b,f=0,r=0,h=0;if(this.interim[0]){let m=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let S,E=0;for(;(S=63&this.interim[++E])&&E<4;)w<<=6,w|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=p-E;for(;h<C;){if(h>=v)return 0;if(S=d[h++],(192&S)!=128){h--,m=!0;break}this.interim[E++]=S,w<<=6,w|=63&S}m||(p===2?w<128?h--:_[f++]=w:p===3?w<2048||w>=55296&&w<=57343||w===65279||(_[f++]=w):w<65536||w>1114111||(_[f++]=w)),this.interim.fill(0)}const l=v-4;let c=h;for(;c<v;){for(;!(!(c<l)||128&(o=d[c])||128&(g=d[c+1])||128&(y=d[c+2])||128&(b=d[c+3]));)_[f++]=o,_[f++]=g,_[f++]=y,_[f++]=b,c+=4;if(o=d[c++],o<128)_[f++]=o;else if((224&o)==192){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(r=(31&o)<<6|63&g,r<128){c--;continue}_[f++]=r}else if((240&o)==224){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,f;if(y=d[c++],(192&y)!=128){c--;continue}if(r=(15&o)<<12|(63&g)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;_[f++]=r}else if((248&o)==240){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,f;if(y=d[c++],(192&y)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,this.interim[2]=y,f;if(b=d[c++],(192&b)!=128){c--;continue}if(r=(7&o)<<18|(63&g)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;_[f++]=r}}return f}}},225:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const _=d(1480),v=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],o=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let g;a.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let y=0;y<v.length;++y)g.fill(0,v[y][0],v[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?g[y]:(function(b,f){let r,h=0,l=f.length-1;if(b<f[0][0]||b>f[l][1])return!1;for(;l>=h;)if(r=h+l>>1,b>f[r][1])h=r+1;else{if(!(b<f[r][0]))return!0;l=r-1}return!1})(y,o)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,b){let f=this.wcwidth(y),r=f===0&&b!==0;if(r){const h=_.UnicodeService.extractWidth(b);h===0?r=!1:h>f&&(f=h)}return _.UnicodeService.createPropertyValue(0,f,r)}}},5981:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const _=d(8460),v=d(844);class o extends v.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 _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,b){if(b!==void 0&&this._syncCalls>b)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 f;for(this._isSyncWriting=!0;f=this._writeBuffer.shift();){this._action(f);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,b){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(b),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(b)}_innerWrite(y=0,b=!0){const f=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,b);if(h){const c=m=>Date.now()-f>=12?setTimeout((()=>this._innerWrite(0,m))):this._innerWrite(f,m);return void h.catch((m=>(queueMicrotask((()=>{throw m})),Promise.resolve(!1)))).then(c)}const l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-f>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=o},5941:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const d=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,_=/^[\da-f]+$/;function v(o,g){const y=o.toString(16),b=y.length<2?"0"+y:y;switch(g){case 4:return y[0];case 8:return b;case 12:return(b+b).slice(0,3);default:return b+b}}a.parseColor=function(o){if(!o)return;let g=o.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const y=d.exec(g);if(y){const b=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/b*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/b*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/b*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),_.exec(g)&&[3,6,9,12].includes(g.length))){const y=g.length/3,b=[0,0,0];for(let f=0;f<3;++f){const r=parseInt(g.slice(y*f,y*f+y),16);b[f]=y===1?r<<4:y===2?r:y===3?r>>4:r>>8}return b}},a.toRgbString=function(o,g=16){const[y,b,f]=o;return`rgb:${v(y,g)}/${v(b,g)}/${v(f,g)}`}},5770:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const _=d(482),v=d(8742),o=d(5770),g=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(b,f){this._handlers[b]===void 0&&(this._handlers[b]=[]);const r=this._handlers[b];return r.push(f),{dispose:()=>{const h=r.indexOf(f);h!==-1&&r.splice(h,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}reset(){if(this._active.length)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(b,f){if(this.reset(),this._ident=b,this._active=this._handlers[b]||g,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(f);else this._handlerFb(this._ident,"HOOK",f)}put(b,f,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(b,f,r);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(b,f,r))}unhook(b,f=!0){if(this._active.length){let r=!1,h=this._active.length-1,l=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=f,l=this._stack.fallThrough,this._stack.paused=!1),!l&&r===!1){for(;h>=0&&(r=this._active[h].unhook(b),r!==!0);h--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,r;h--}for(;h>=0;h--)if(r=this._active[h].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",b);this._active=g,this._ident=0}};const y=new v.Params;y.addParam(0),a.DcsHandler=class{constructor(b){this._handler=b,this._data="",this._params=y,this._hitLimit=!1}hook(b){this._params=b.length>1||b.params[0]?b.clone():y,this._data="",this._hitLimit=!1}put(b,f,r){this._hitLimit||(this._data+=(0,_.utf32ToString)(b,f,r),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(b){let f=!1;if(this._hitLimit)f=!1;else if(b&&(f=this._handler(this._data,this._params),f instanceof Promise))return f.then((r=>(this._params=y,this._data="",this._hitLimit=!1,r)));return this._params=y,this._data="",this._hitLimit=!1,f}}},2015:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const _=d(844),v=d(8742),o=d(6242),g=d(6351);class y{constructor(h){this.table=new Uint8Array(h)}setDefault(h,l){this.table.fill(h<<4|l)}add(h,l,c,m){this.table[l<<8|h]=c<<4|m}addMany(h,l,c,m){for(let w=0;w<h.length;w++)this.table[l<<8|h[w]]=c<<4|m}}a.TransitionTable=y;const b=160;a.VT500_TRANSITION_TABLE=(function(){const r=new y(4095),h=Array.apply(null,Array(256)).map(((E,p)=>p)),l=(E,p)=>h.slice(E,p),c=l(32,127),m=l(0,24);m.push(25),m.push.apply(m,l(28,32));const w=l(0,14);let S;for(S in r.setDefault(1,0),r.addMany(c,0,2,0),w)r.addMany([24,26,153,154],S,3,0),r.addMany(l(128,144),S,3,0),r.addMany(l(144,152),S,3,0),r.add(156,S,0,0),r.add(27,S,11,1),r.add(157,S,4,8),r.addMany([152,158,159],S,0,7),r.add(155,S,11,3),r.add(144,S,11,9);return r.addMany(m,0,3,0),r.addMany(m,1,3,1),r.add(127,1,0,1),r.addMany(m,8,0,8),r.addMany(m,3,3,3),r.add(127,3,0,3),r.addMany(m,4,3,4),r.add(127,4,0,4),r.addMany(m,6,3,6),r.addMany(m,5,3,5),r.add(127,5,0,5),r.addMany(m,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(c,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(l(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(c,7,0,7),r.addMany(m,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(l(64,127),3,7,0),r.addMany(l(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(l(48,60),4,8,4),r.addMany(l(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(l(32,64),6,0,6),r.add(127,6,0,6),r.addMany(l(64,127),6,0,0),r.addMany(l(32,48),3,9,5),r.addMany(l(32,48),5,9,5),r.addMany(l(48,64),5,0,6),r.addMany(l(64,127),5,7,0),r.addMany(l(32,48),4,9,5),r.addMany(l(32,48),1,9,2),r.addMany(l(32,48),2,9,2),r.addMany(l(48,127),2,10,0),r.addMany(l(48,80),1,10,0),r.addMany(l(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(l(96,127),1,10,0),r.add(80,1,11,9),r.addMany(m,9,0,9),r.add(127,9,0,9),r.addMany(l(28,32),9,0,9),r.addMany(l(32,48),9,9,12),r.addMany(l(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(m,11,0,11),r.addMany(l(32,128),11,0,11),r.addMany(l(28,32),11,0,11),r.addMany(m,10,0,10),r.add(127,10,0,10),r.addMany(l(28,32),10,0,10),r.addMany(l(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(l(32,48),10,9,12),r.addMany(m,12,0,12),r.add(127,12,0,12),r.addMany(l(28,32),12,0,12),r.addMany(l(32,48),12,9,12),r.addMany(l(48,64),12,0,11),r.addMany(l(64,127),12,12,13),r.addMany(l(64,127),10,12,13),r.addMany(l(64,127),9,12,13),r.addMany(m,13,13,13),r.addMany(c,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(b,0,2,0),r.add(b,8,5,8),r.add(b,6,0,6),r.add(b,11,0,11),r.add(b,13,13,13),r})();class f extends _.Disposable{constructor(h=a.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(l,c,m)=>{},this._executeHandlerFb=l=>{},this._csiHandlerFb=(l,c)=>{},this._escHandlerFb=l=>{},this._errorHandlerFb=l=>l,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,_.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new o.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,l=[64,126]){let c=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(c=h.prefix.charCodeAt(0),c&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let w=0;w<h.intermediates.length;++w){const S=h.intermediates.charCodeAt(w);if(32>S||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=S}}if(h.final.length!==1)throw new Error("final must be a single byte");const m=h.final.charCodeAt(0);if(l[0]>m||m>l[1])throw new Error(`final must be in range ${l[0]} .. ${l[1]}`);return c<<=8,c|=m,c}identToString(h){const l=[];for(;h;)l.push(String.fromCharCode(255&h)),h>>=8;return l.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,l){const c=this._identifier(h,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);const m=this._escHandlers[c];return m.push(l),{dispose:()=>{const w=m.indexOf(l);w!==-1&&m.splice(w,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,l){this._executeHandlers[h.charCodeAt(0)]=l}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,l){const c=this._identifier(h);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);const m=this._csiHandlers[c];return m.push(l),{dispose:()=>{const w=m.indexOf(l);w!==-1&&m.splice(w,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,l){return this._dcsParser.registerHandler(this._identifier(h),l)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,l){return this._oscParser.registerHandler(h,l)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(h,l,c,m,w){this._parseStack.state=h,this._parseStack.handlers=l,this._parseStack.handlerPos=c,this._parseStack.transition=m,this._parseStack.chunkPos=w}parse(h,l,c){let m,w=0,S=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=this._parseStack.chunkPos+1;else{if(c===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const p=this._parseStack.handlers;let C=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(c===!1&&C>-1){for(;C>=0&&(m=p[C](this._params),m!==!0);C--)if(m instanceof Promise)return this._parseStack.handlerPos=C,m}this._parseStack.handlers=[];break;case 4:if(c===!1&&C>-1){for(;C>=0&&(m=p[C](),m!==!0);C--)if(m instanceof Promise)return this._parseStack.handlerPos=C,m}this._parseStack.handlers=[];break;case 6:if(w=h[this._parseStack.chunkPos],m=this._dcsParser.unhook(w!==24&&w!==26,c),m)return m;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(w=h[this._parseStack.chunkPos],m=this._oscParser.end(w!==24&&w!==26,c),m)return m;w===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 p=E;p<l;++p){switch(w=h[p],S=this._transitions.table[this.currentState<<8|(w<160?w:b)],S>>4){case 2:for(let M=p+1;;++M){if(M>=l||(w=h[M])<32||w>126&&w<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=l||(w=h[M])<32||w>126&&w<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=l||(w=h[M])<32||w>126&&w<b){this._printHandler(h,p,M),p=M-1;break}if(++M>=l||(w=h[M])<32||w>126&&w<b){this._printHandler(h,p,M),p=M-1;break}}break;case 3:this._executeHandlers[w]?this._executeHandlers[w]():this._executeHandlerFb(w),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:w,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const C=this._csiHandlers[this._collect<<8|w];let L=C?C.length-1:-1;for(;L>=0&&(m=C[L](this._params),m!==!0);L--)if(m instanceof Promise)return this._preserveStack(3,C,L,S,p),m;L<0&&this._csiHandlerFb(this._collect<<8|w,this._params),this.precedingJoinState=0;break;case 8:do switch(w){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(w-48)}while(++p<l&&(w=h[p])>47&&w<60);p--;break;case 9:this._collect<<=8,this._collect|=w;break;case 10:const T=this._escHandlers[this._collect<<8|w];let D=T?T.length-1:-1;for(;D>=0&&(m=T[D](),m!==!0);D--)if(m instanceof Promise)return this._preserveStack(4,T,D,S,p),m;D<0&&this._escHandlerFb(this._collect<<8|w),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|w,this._params);break;case 13:for(let M=p+1;;++M)if(M>=l||(w=h[M])===24||w===26||w===27||w>127&&w<b){this._dcsParser.put(h,p,M),p=M-1;break}break;case 14:if(m=this._dcsParser.unhook(w!==24&&w!==26),m)return this._preserveStack(6,[],0,S,p),m;w===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let M=p+1;;M++)if(M>=l||(w=h[M])<32||w>127&&w<b){this._oscParser.put(h,p,M),p=M-1;break}break;case 6:if(m=this._oscParser.end(w!==24&&w!==26),m)return this._preserveStack(5,[],0,S,p),m;w===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&S}}}a.EscapeSequenceParser=f},6242:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const _=d(5770),v=d(482),o=[];a.OscParser=class{constructor(){this._state=0,this._active=o,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,y){this._handlers[g]===void 0&&(this._handlers[g]=[]);const b=this._handlers[g];return b.push(y),{dispose:()=>{const f=b.indexOf(y);f!==-1&&b.splice(f,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=o}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=o,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||o,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,y,b){if(this._active.length)for(let f=this._active.length-1;f>=0;f--)this._active[f].put(g,y,b);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(g,y,b))}start(){this.reset(),this._state=1}put(g,y,b){if(this._state!==3){if(this._state===1)for(;y<b;){const f=g[y++];if(f===59){this._state=2,this._start();break}if(f<48||57<f)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+f-48}this._state===2&&b-y>0&&this._put(g,y,b)}}end(g,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let b=!1,f=this._active.length-1,r=!1;if(this._stack.paused&&(f=this._stack.loopPosition-1,b=y,r=this._stack.fallThrough,this._stack.paused=!1),!r&&b===!1){for(;f>=0&&(b=this._active[f].end(g),b!==!0);f--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!1,b;f--}for(;f>=0;f--)if(b=this._active[f].end(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!0,b}else this._handlerFb(this._id,"END",g);this._active=o,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,y,b){this._hitLimit||(this._data+=(0,v.utf32ToString)(g,y,b),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let y=!1;if(this._hitLimit)y=!1;else if(g&&(y=this._handler(this._data),y instanceof Promise))return y.then((b=>(this._data="",this._hitLimit=!1,b)));return this._data="",this._hitLimit=!1,y}}},8742:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const d=2147483647;class _{static fromArray(o){const g=new _;if(!o.length)return g;for(let y=Array.isArray(o[0])?1:0;y<o.length;++y){const b=o[y];if(Array.isArray(b))for(let f=0;f<b.length;++f)g.addSubParam(b[f]);else g.addParam(b)}return g}constructor(o=32,g=32){if(this.maxLength=o,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(o),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(o),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const o=new _(this.maxLength,this.maxSubParamsLength);return o.params.set(this.params),o.length=this.length,o._subParams.set(this._subParams),o._subParamsLength=this._subParamsLength,o._subParamsIdx.set(this._subParamsIdx),o._rejectDigits=this._rejectDigits,o._rejectSubDigits=this._rejectSubDigits,o._digitIsSub=this._digitIsSub,o}toArray(){const o=[];for(let g=0;g<this.length;++g){o.push(this.params[g]);const y=this._subParamsIdx[g]>>8,b=255&this._subParamsIdx[g];b-y>0&&o.push(Array.prototype.slice.call(this._subParams,y,b))}return o}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(o){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(o<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=o>d?d:o}}addSubParam(o){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(o<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=o>d?d:o,this._subParamsIdx[this.length-1]++}}hasSubParams(o){return(255&this._subParamsIdx[o])-(this._subParamsIdx[o]>>8)>0}getSubParams(o){const g=this._subParamsIdx[o]>>8,y=255&this._subParamsIdx[o];return y-g>0?this._subParams.subarray(g,y):null}getSubParamsAll(){const o={};for(let g=0;g<this.length;++g){const y=this._subParamsIdx[g]>>8,b=255&this._subParamsIdx[g];b-y>0&&(o[g]=this._subParams.slice(y,b))}return o}addDigit(o){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,b=y[g-1];y[g-1]=~b?Math.min(10*b+o,d):o}}a.Params=_},5741:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()}loadAddon(d,_){const v={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(v),_.dispose=()=>this._wrappedAddonDispose(v),_.activate(d)}_wrappedAddonDispose(d){if(d.isDisposed)return;let _=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===d){_=v;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(_,1)}}},8771:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const _=d(3785),v=d(511);a.BufferApiView=class{constructor(o,g){this._buffer=o,this.type=g}init(o){return this._buffer=o,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(o){const g=this._buffer.lines.get(o);if(g)return new _.BufferLineApiView(g)}getNullCell(){return new v.CellData}}},3785:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const _=d(511);a.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,o){if(!(v<0||v>=this._line.length))return o?(this._line.loadCell(v,o),o):this._line.loadCell(v,new _.CellData)}translateToString(v,o,g){return this._line.translateToString(v,o,g)}}},8285:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const _=d(8771),v=d(8460),o=d(844);class g extends o.Disposable{constructor(b){super(),this._core=b,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=g},7975:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(d){this._core=d}registerCsiHandler(d,_){return this._core.registerCsiHandler(d,(v=>_(v.toArray())))}addCsiHandler(d,_){return this.registerCsiHandler(d,_)}registerDcsHandler(d,_){return this._core.registerDcsHandler(d,((v,o)=>_(v,o.toArray())))}addDcsHandler(d,_){return this.registerDcsHandler(d,_)}registerEscHandler(d,_){return this._core.registerEscHandler(d,_)}addEscHandler(d,_){return this.registerEscHandler(d,_)}registerOscHandler(d,_){return this._core.registerOscHandler(d,_)}addOscHandler(d,_){return this.registerOscHandler(d,_)}}},7090:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(d){this._core=d}register(d){this._core.unicodeService.register(d)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(d){this._core.unicodeService.activeVersion=d}}},744:function(W,a,d){var _=this&&this.__decorate||function(r,h,l,c){var m,w=arguments.length,S=w<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,l,c);else for(var E=r.length-1;E>=0;E--)(m=r[E])&&(S=(w<3?m(S):w>3?m(h,l,S):m(h,l))||S);return w>3&&S&&Object.defineProperty(h,l,S),S},v=this&&this.__param||function(r,h){return function(l,c){h(l,c,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const o=d(8460),g=d(844),y=d(5295),b=d(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let f=a.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(r.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(r.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(r,this))}resize(r,h){this.cols=r,this.rows=h,this.buffers.resize(r,h),this._onResize.fire({cols:r,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(r,h=!1){const l=this.buffer;let c;c=this._cachedBlankLine,c&&c.length===this.cols&&c.getFg(0)===r.fg&&c.getBg(0)===r.bg||(c=l.getBlankLine(r,h),this._cachedBlankLine=c),c.isWrapped=h;const m=l.ybase+l.scrollTop,w=l.ybase+l.scrollBottom;if(l.scrollTop===0){const S=l.lines.isFull;w===l.lines.length-1?S?l.lines.recycle().copyFrom(c):l.lines.push(c.clone()):l.lines.splice(w+1,0,c.clone()),S?this.isUserScrolling&&(l.ydisp=Math.max(l.ydisp-1,0)):(l.ybase++,this.isUserScrolling||l.ydisp++)}else{const S=w-m+1;l.lines.shiftElements(m+1,S-1,-1),l.lines.set(w,c.clone())}this.isUserScrolling||(l.ydisp=l.ybase),this._onScroll.fire(l.ydisp)}scrollLines(r,h,l){const c=this.buffer;if(r<0){if(c.ydisp===0)return;this.isUserScrolling=!0}else r+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);const m=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+r,c.ybase),0),m!==c.ydisp&&(h||this._onScroll.fire(c.ydisp))}};a.BufferService=f=_([v(0,b.IOptionsService)],f)},7994:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(d){this.glevel=d,this.charset=this._charsets[d]}setgCharset(d,_){this._charsets[d]=_,this.glevel===d&&(this.charset=_)}}},1753:function(W,a,d){var _=this&&this.__decorate||function(c,m,w,S){var E,p=arguments.length,C=p<3?m:S===null?S=Object.getOwnPropertyDescriptor(m,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,m,w,S);else for(var L=c.length-1;L>=0;L--)(E=c[L])&&(C=(p<3?E(C):p>3?E(m,w,C):E(m,w))||C);return p>3&&C&&Object.defineProperty(m,w,C),C},v=this&&this.__param||function(c,m){return function(w,S){m(w,S,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const o=d(2585),g=d(8460),y=d(844),b={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:c=>c.button!==4&&c.action===1&&(c.ctrl=!1,c.alt=!1,c.shift=!1,!0)},VT200:{events:19,restrict:c=>c.action!==32},DRAG:{events:23,restrict:c=>c.action!==32||c.button!==3},ANY:{events:31,restrict:c=>!0}};function f(c,m){let w=(c.ctrl?16:0)|(c.shift?4:0)|(c.alt?8:0);return c.button===4?(w|=64,w|=c.action):(w|=3&c.button,4&c.button&&(w|=64),8&c.button&&(w|=128),c.action===32?w|=32:c.action!==0||m||(w|=3)),w}const r=String.fromCharCode,h={DEFAULT:c=>{const m=[f(c,!1)+32,c.col+32,c.row+32];return m[0]>255||m[1]>255||m[2]>255?"":`\x1B[M${r(m[0])}${r(m[1])}${r(m[2])}`},SGR:c=>{const m=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${f(c,!0)};${c.col};${c.row}${m}`},SGR_PIXELS:c=>{const m=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${f(c,!0)};${c.x};${c.y}${m}`}};let l=a.CoreMouseService=class extends y.Disposable{constructor(c,m){super(),this._bufferService=c,this._coreService=m,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const w of Object.keys(b))this.addProtocol(w,b[w]);for(const w of Object.keys(h))this.addEncoding(w,h[w]);this.reset()}addProtocol(c,m){this._protocols[c]=m}addEncoding(c,m){this._encodings[c]=m}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(c){if(!this._protocols[c])throw new Error(`unknown protocol "${c}"`);this._activeProtocol=c,this._onProtocolChange.fire(this._protocols[c].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(c){if(!this._encodings[c])throw new Error(`unknown encoding "${c}"`);this._activeEncoding=c}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(c){if(c.col<0||c.col>=this._bufferService.cols||c.row<0||c.row>=this._bufferService.rows||c.button===4&&c.action===32||c.button===3&&c.action!==32||c.button!==4&&(c.action===2||c.action===3)||(c.col++,c.row++,c.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,c,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(c))return!1;const m=this._encodings[this._activeEncoding](c);return m&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(m):this._coreService.triggerDataEvent(m,!0)),this._lastEvent=c,!0}explainEvents(c){return{down:!!(1&c),up:!!(2&c),drag:!!(4&c),move:!!(8&c),wheel:!!(16&c)}}_equalEvents(c,m,w){if(w){if(c.x!==m.x||c.y!==m.y)return!1}else if(c.col!==m.col||c.row!==m.row)return!1;return c.button===m.button&&c.action===m.action&&c.ctrl===m.ctrl&&c.alt===m.alt&&c.shift===m.shift}};a.CoreMouseService=l=_([v(0,o.IBufferService),v(1,o.ICoreService)],l)},6975:function(W,a,d){var _=this&&this.__decorate||function(l,c,m,w){var S,E=arguments.length,p=E<3?c:w===null?w=Object.getOwnPropertyDescriptor(c,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(l,c,m,w);else for(var C=l.length-1;C>=0;C--)(S=l[C])&&(p=(E<3?S(p):E>3?S(c,m,p):S(c,m))||p);return E>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(l,c){return function(m,w){c(m,w,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const o=d(1439),g=d(8460),y=d(844),b=d(2585),f=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=a.CoreService=class extends y.Disposable{constructor(l,c,m){super(),this._bufferService=l,this._logService=c,this._optionsService=m,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,o.clone)(f),this.decPrivateModes=(0,o.clone)(r)}reset(){this.modes=(0,o.clone)(f),this.decPrivateModes=(0,o.clone)(r)}triggerDataEvent(l,c=!1){if(this._optionsService.rawOptions.disableStdin)return;const m=this._bufferService.buffer;c&&this._optionsService.rawOptions.scrollOnUserInput&&m.ybase!==m.ydisp&&this._onRequestScrollToBottom.fire(),c&&this._onUserInput.fire(),this._logService.debug(`sending data "${l}"`,(()=>l.split("").map((w=>w.charCodeAt(0))))),this._onData.fire(l)}triggerBinaryEvent(l){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${l}"`,(()=>l.split("").map((c=>c.charCodeAt(0))))),this._onBinary.fire(l))}};a.CoreService=h=_([v(0,b.IBufferService),v(1,b.ILogService),v(2,b.IOptionsService)],h)},9074:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const _=d(8055),v=d(8460),o=d(844),g=d(6106);let y=0,b=0;class f extends o.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((l=>l==null?void 0:l.marker.line)),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,o.toDisposable)((()=>this.reset())))}registerDecoration(l){if(l.marker.isDisposed)return;const c=new r(l);if(c){const m=c.marker.onDispose((()=>c.dispose()));c.onDispose((()=>{c&&(this._decorations.delete(c)&&this._onDecorationRemoved.fire(c),m.dispose())})),this._decorations.insert(c),this._onDecorationRegistered.fire(c)}return c}reset(){for(const l of this._decorations.values())l.dispose();this._decorations.clear()}*getDecorationsAtCell(l,c,m){let w=0,S=0;for(const E of this._decorations.getKeyIterator(c))w=E.options.x??0,S=w+(E.options.width??1),l>=w&&l<S&&(!m||(E.options.layer??"bottom")===m)&&(yield E)}forEachDecorationAtCell(l,c,m,w){this._decorations.forEachByKey(c,(S=>{y=S.options.x??0,b=y+(S.options.width??1),l>=y&&l<b&&(!m||(S.options.layer??"bottom")===m)&&w(S)}))}}a.DecorationService=f;class r extends o.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=_.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=_.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(l){super(),this.options=l,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=l.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const _=d(2585),v=d(8343);class o{constructor(...y){this._entries=new Map;for(const[b,f]of y)this.set(b,f)}set(y,b){const f=this._entries.get(y);return this._entries.set(y,b),f}forEach(y){for(const[b,f]of this._entries.entries())y(b,f)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}a.ServiceCollection=o,a.InstantiationService=class{constructor(){this._services=new o,this._services.set(_.IInstantiationService,this)}setService(g,y){this._services.set(g,y)}getService(g){return this._services.get(g)}createInstance(g,...y){const b=(0,v.getServiceDependencies)(g).sort(((h,l)=>h.index-l.index)),f=[];for(const h of b){const l=this._services.get(h.id);if(!l)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${h.id}.`);f.push(l)}const r=b.length>0?b[0].index:y.length;if(y.length!==r)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${r+1} conflicts with ${y.length} static arguments`);return new g(...y,...f)}}},7866:function(W,a,d){var _=this&&this.__decorate||function(r,h,l,c){var m,w=arguments.length,S=w<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,l,c);else for(var E=r.length-1;E>=0;E--)(m=r[E])&&(S=(w<3?m(S):w>3?m(h,l,S):m(h,l))||S);return w>3&&S&&Object.defineProperty(h,l,S),S},v=this&&this.__param||function(r,h){return function(l,c){h(l,c,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const o=d(844),g=d(2585),y={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let b,f=a.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,l){this._evalLazyOptionalParams(l),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(r,...h){var l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var l;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var l;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,r,h)}};a.LogService=f=_([v(0,g.IOptionsService)],f),a.setTraceLogger=function(r){b=r},a.traceCall=function(r,h,l){if(typeof l.value!="function")throw new Error("not supported");const c=l.value;l.value=function(...m){if(b.logLevel!==g.LogLevelEnum.TRACE)return c.apply(this,m);b.trace(`GlyphRenderer#${c.name}(${m.map((S=>JSON.stringify(S))).join(", ")})`);const w=c.apply(this,m);return b.trace(`GlyphRenderer#${c.name} return`,w),w}}},7302:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const _=d(8460),v=d(844),o=d(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:o.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends v.Disposable{constructor(f){super(),this._onOptionChange=this.register(new _.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...a.DEFAULT_OPTIONS};for(const h in f)if(h in r)try{const l=f[h];r[h]=this._sanitizeAndValidateOption(h,l)}catch(l){console.error(l)}this.rawOptions=r,this.options={...r},this._setupOptions(),this.register((0,v.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(f,r){return this.onOptionChange((h=>{h===f&&r(this.rawOptions[f])}))}onMultipleOptionChange(f,r){return this.onOptionChange((h=>{f.indexOf(h)!==-1&&r()}))}_setupOptions(){const f=h=>{if(!(h in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},r=(h,l)=>{if(!(h in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);l=this._sanitizeAndValidateOption(h,l),this.rawOptions[h]!==l&&(this.rawOptions[h]=l,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const l={get:f.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,l)}}_sanitizeAndValidateOption(f,r){switch(f){case"cursorStyle":if(r||(r=a.DEFAULT_OPTIONS[f]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${f}`);break;case"wordSeparator":r||(r=a.DEFAULT_OPTIONS[f]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=g.includes(r)?r:a.DEFAULT_OPTIONS[f];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${f} cannot be less than 1, value: ${r}`);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(`${f} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${f} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${f} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}a.OptionsService=y},2660:function(W,a,d){var _=this&&this.__decorate||function(y,b,f,r){var h,l=arguments.length,c=l<3?b:r===null?r=Object.getOwnPropertyDescriptor(b,f):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(y,b,f,r);else for(var m=y.length-1;m>=0;m--)(h=y[m])&&(c=(l<3?h(c):l>3?h(b,f,c):h(b,f))||c);return l>3&&c&&Object.defineProperty(b,f,c),c},v=this&&this.__param||function(y,b){return function(f,r){b(f,r,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const o=d(2585);let g=a.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const b=this._bufferService.buffer;if(y.id===void 0){const m=b.addMarker(b.ybase+b.y),w={data:y,id:this._nextId++,lines:[m]};return m.onDispose((()=>this._removeMarkerFromLink(w,m))),this._dataByLinkId.set(w.id,w),w.id}const f=y,r=this._getEntryIdKey(f),h=this._entriesWithId.get(r);if(h)return this.addLineToLink(h.id,b.ybase+b.y),h.id;const l=b.addMarker(b.ybase+b.y),c={id:this._nextId++,key:this._getEntryIdKey(f),data:f,lines:[l]};return l.onDispose((()=>this._removeMarkerFromLink(c,l))),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.id}addLineToLink(y,b){const f=this._dataByLinkId.get(y);if(f&&f.lines.every((r=>r.line!==b))){const r=this._bufferService.buffer.addMarker(b);f.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(f,r)))}}getLinkData(y){var b;return(b=this._dataByLinkId.get(y))==null?void 0:b.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,b){const f=y.lines.indexOf(b);f!==-1&&(y.lines.splice(f,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};a.OscLinkService=g=_([v(0,o.IBufferService)],g)},8343:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="di$target",_="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(v){return v[_]||[]},a.createDecorator=function(v){if(a.serviceRegistry.has(v))return a.serviceRegistry.get(v);const o=function(g,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,r,h){r[d]===r?r[_].push({id:f,index:h}):(r[_]=[{id:f,index:h}],r[d]=r)})(o,g,b)};return o.toString=()=>v,a.serviceRegistry.set(v,o),o}},2585:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const _=d(8343);var v;a.IBufferService=(0,_.createDecorator)("BufferService"),a.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),a.ICoreService=(0,_.createDecorator)("CoreService"),a.ICharsetService=(0,_.createDecorator)("CharsetService"),a.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(o){o[o.TRACE=0]="TRACE",o[o.DEBUG=1]="DEBUG",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.OFF=5]="OFF"})(v||(a.LogLevelEnum=v={})),a.ILogService=(0,_.createDecorator)("LogService"),a.IOptionsService=(0,_.createDecorator)("OptionsService"),a.IOscLinkService=(0,_.createDecorator)("OscLinkService"),a.IUnicodeService=(0,_.createDecorator)("UnicodeService"),a.IDecorationService=(0,_.createDecorator)("DecorationService")},1480:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const _=d(8460),v=d(225);class o{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,b,f=!1){return(16777215&y)<<3|(3&b)<<1|(f?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter,this.onChange=this._onChange.event;const y=new v.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 b=0,f=0;const r=y.length;for(let h=0;h<r;++h){let l=y.charCodeAt(h);if(55296<=l&&l<=56319){if(++h>=r)return b+this.wcwidth(l);const w=y.charCodeAt(h);56320<=w&&w<=57343?l=1024*(l-55296)+w-56320+65536:b+=this.wcwidth(w)}const c=this.charProperties(l,f);let m=o.extractWidth(c);o.extractShouldJoin(c)&&(m-=o.extractWidth(f)),b+=m,f=c}return b}charProperties(y,b){return this._activeProvider.charProperties(y,b)}}a.UnicodeService=o}},I={};function re(W){var a=I[W];if(a!==void 0)return a.exports;var d=I[W]={exports:{}};return ne[W].call(d.exports,d,d.exports,re),d.exports}var J={};return(()=>{var W=J;Object.defineProperty(W,"__esModule",{value:!0}),W.Terminal=void 0;const a=re(9042),d=re(3236),_=re(844),v=re(5741),o=re(8285),g=re(7975),y=re(7090),b=["cols","rows"];class f extends _.Disposable{constructor(h){super(),this._core=this.register(new d.Terminal(h)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const l=m=>this._core.options[m],c=(m,w)=>{this._checkReadonlyOptions(m),this._core.options[m]=w};for(const m in this._core.options){const w={get:l.bind(this,m),set:c.bind(this,m)};Object.defineProperty(this._publicOptions,m,w)}}_checkReadonlyOptions(h){if(b.includes(h))throw new Error(`Option "${h}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new 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 o.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let l="none";switch(this._core.coreMouseService.activeProtocol){case"X10":l="x10";break;case"VT200":l="vt200";break;case"DRAG":l="drag";break;case"ANY":l="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:l,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const l in h)this._publicOptions[l]=h[l]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,l=!0){this._core.input(h,l)}resize(h,l){this._verifyIntegers(h,l),this._core.resize(h,l)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,l,c){this._verifyIntegers(h,l,c),this._core.select(h,l,c)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,l){this._verifyIntegers(h,l),this._core.selectLines(h,l)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,l){this._core.write(h,l)}writeln(h,l){this._core.write(h),this._core.write(`\r
57
- `,l)}paste(h){this._core.paste(h)}refresh(h,l){this._verifyIntegers(h,l),this._core.refresh(h,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return a}_verifyIntegers(...h){for(const l of h)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const l of h)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}W.Terminal=f})(),J})()))})(To)),To.exports}var jv=Uv(),Bo={exports:{}},Xf;function Iv(){return Xf||(Xf=1,(function(q,ae){(function(ne,I){q.exports=I()})(self,(()=>(()=>{var ne={};return(()=>{var I=ne;Object.defineProperty(I,"__esModule",{value:!0}),I.FitAddon=void 0,I.FitAddon=class{activate(re){this._terminal=re}dispose(){}fit(){const re=this.proposeDimensions();if(!re||!this._terminal||isNaN(re.cols)||isNaN(re.rows))return;const J=this._terminal._core;this._terminal.rows===re.rows&&this._terminal.cols===re.cols||(J._renderService.clear(),this._terminal.resize(re.cols,re.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const re=this._terminal._core,J=re._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;const W=this._terminal.options.scrollback===0?0:re.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(a.getPropertyValue("height")),_=Math.max(0,parseInt(a.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),o=d-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),g=_-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-W;return{cols:Math.max(2,Math.floor(g/J.css.cell.width)),rows:Math.max(1,Math.floor(o/J.css.cell.height))}}}})(),ne})()))})(Bo)),Bo.exports}var Fv=Iv(),Oo={exports:{}},Yf;function Pv(){return Yf||(Yf=1,(function(q,ae){(function(ne,I){q.exports=I()})(self,(()=>(()=>{var ne={965:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const _=d(374),v=d(509),o=d(855),g=d(859),y=d(381),b=11,f=b*Float32Array.BYTES_PER_ELEMENT;let r,h=0,l=0,c=0;class m extends g.Disposable{constructor(S,E,p,C){super(),this._terminal=S,this._gl=E,this._dimensions=p,this._optionsService=C,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const L=this._gl;v.TextureAtlas.maxAtlasPages===void 0&&(v.TextureAtlas.maxAtlasPages=Math.min(32,(0,_.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),v.TextureAtlas.maxTextureSize=(0,_.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,_.throwIfFalsy)((0,y.createProgram)(L,`#version 300 es
57
+ `,l)}paste(h){this._core.paste(h)}refresh(h,l){this._verifyIntegers(h,l),this._core.refresh(h,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return a}_verifyIntegers(...h){for(const l of h)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const l of h)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}W.Terminal=f})(),J})()))})(To)),To.exports}var jv=Uv(),Bo={exports:{}},Xf;function Iv(){return Xf||(Xf=1,(function(P,ae){(function(ne,I){P.exports=I()})(self,(()=>(()=>{var ne={};return(()=>{var I=ne;Object.defineProperty(I,"__esModule",{value:!0}),I.FitAddon=void 0,I.FitAddon=class{activate(re){this._terminal=re}dispose(){}fit(){const re=this.proposeDimensions();if(!re||!this._terminal||isNaN(re.cols)||isNaN(re.rows))return;const J=this._terminal._core;this._terminal.rows===re.rows&&this._terminal.cols===re.cols||(J._renderService.clear(),this._terminal.resize(re.cols,re.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const re=this._terminal._core,J=re._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;const W=this._terminal.options.scrollback===0?0:re.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(a.getPropertyValue("height")),_=Math.max(0,parseInt(a.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),o=d-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),g=_-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-W;return{cols:Math.max(2,Math.floor(g/J.css.cell.width)),rows:Math.max(1,Math.floor(o/J.css.cell.height))}}}})(),ne})()))})(Bo)),Bo.exports}var Fv=Iv(),Oo={exports:{}},Yf;function Pv(){return Yf||(Yf=1,(function(P,ae){(function(ne,I){P.exports=I()})(self,(()=>(()=>{var ne={965:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlyphRenderer=void 0;const _=d(374),v=d(509),o=d(855),g=d(859),y=d(381),b=11,f=b*Float32Array.BYTES_PER_ELEMENT;let r,h=0,l=0,c=0;class m extends g.Disposable{constructor(S,E,p,C){super(),this._terminal=S,this._gl=E,this._dimensions=p,this._optionsService=C,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const L=this._gl;v.TextureAtlas.maxAtlasPages===void 0&&(v.TextureAtlas.maxAtlasPages=Math.min(32,(0,_.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),v.TextureAtlas.maxTextureSize=(0,_.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,_.throwIfFalsy)((0,y.createProgram)(L,`#version 300 es
58
58
  layout (location = 0) in vec2 a_unitquad;
59
59
  layout (location = 1) in vec2 a_cellpos;
60
60
  layout (location = 2) in vec2 a_offset;
@@ -74,7 +74,7 @@ void main() {
74
74
  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
75
75
  v_texpage = int(a_texpage);
76
76
  v_texcoord = a_texcoord + a_unitquad * a_texsize;
77
- }`,(function(z){let U="";for(let P=1;P<z;P++)U+=` else if (v_texpage == ${P}) { outColor = texture(u_texture[${P}], v_texcoord); }`;return`#version 300 es
77
+ }`,(function(z){let U="";for(let q=1;q<z;q++)U+=` else if (v_texpage == ${q}) { outColor = texture(u_texture[${q}], v_texcoord); }`;return`#version 300 es
78
78
  precision lowp float;
79
79
 
80
80
  in vec2 v_texcoord;
@@ -111,10 +111,10 @@ out vec4 outColor;
111
111
 
112
112
  void main() {
113
113
  outColor = v_color;
114
- }`)),this.register((0,v.toDisposable)((()=>D.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(D.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=D.createVertexArray(),D.bindVertexArray(this._vertexArrayObject);const M=new Float32Array([0,0,1,0,0,1,1,1]),N=D.createBuffer();this.register((0,v.toDisposable)((()=>D.deleteBuffer(N)))),D.bindBuffer(D.ARRAY_BUFFER,N),D.bufferData(D.ARRAY_BUFFER,M,D.STATIC_DRAW),D.enableVertexAttribArray(3),D.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const X=new Uint8Array([0,1,2,3]),z=D.createBuffer();this.register((0,v.toDisposable)((()=>D.deleteBuffer(z)))),D.bindBuffer(D.ELEMENT_ARRAY_BUFFER,z),D.bufferData(D.ELEMENT_ARRAY_BUFFER,X,D.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(D.createBuffer()),this.register((0,v.toDisposable)((()=>D.deleteBuffer(this._attributesBuffer)))),D.bindBuffer(D.ARRAY_BUFFER,this._attributesBuffer),D.enableVertexAttribArray(0),D.vertexAttribPointer(0,2,D.FLOAT,!1,y,0),D.vertexAttribDivisor(0,1),D.enableVertexAttribArray(1),D.vertexAttribPointer(1,2,D.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),D.vertexAttribDivisor(1,1),D.enableVertexAttribArray(2),D.vertexAttribPointer(2,4,D.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),D.vertexAttribDivisor(2,1),this._updateCachedColors(T.colors),this.register(this._themeService.onChangeColors((U=>{this._updateCachedColors(U),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(p){const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),C.uniformMatrix4fv(this._projectionLocation,!1,g.PROJECTION_MATRIX),C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,p.attributes,C.DYNAMIC_DRAW),C.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,p.count)}handleResize(){this._updateViewportRectangle()}setDimensions(p){this._dimensions=p}_updateCachedColors(p){this._bgFloat=this._colorToFloat32Array(p.background),this._cursorFloat=this._colorToFloat32Array(p.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(p){const C=this._terminal,L=this._vertices;let T,D,M,N,X,z,U,P,R,H,A,O=1;for(T=0;T<C.rows;T++){for(M=-1,N=0,X=0,z=!1,D=0;D<C.cols;D++)U=(T*C.cols+D)*o.RENDER_MODEL_INDICIES_PER_CELL,P=p.cells[U+o.RENDER_MODEL_BG_OFFSET],R=p.cells[U+o.RENDER_MODEL_FG_OFFSET],H=!!(67108864&R),(P!==N||R!==X&&(z||H))&&((N!==0||z&&X!==0)&&(A=8*O++,this._updateRectangle(L,A,X,N,M,D,T)),M=D,N=P,X=R,z=H);(N!==0||z&&X!==0)&&(A=8*O++,this._updateRectangle(L,A,X,N,M,C.cols,T))}L.count=O}updateCursor(p){const C=this._verticesCursor,L=p.cursor;if(!L||L.style==="block")return void(C.count=0);let T,D=0;L.style!=="bar"&&L.style!=="outline"||(T=8*D++,this._addRectangleFloat(C.attributes,T,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(T=8*D++,this._addRectangleFloat(C.attributes,T,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(T=8*D++,this._addRectangleFloat(C.attributes,T,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),T=8*D++,this._addRectangleFloat(C.attributes,T,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),C.count=D}_updateRectangle(p,C,L,T,D,M,N){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:f=(16777215&L)<<8;break;default:f=this._themeService.colors.foreground.rgba}else switch(50331648&T){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&T].rgba;break;case 50331648:f=(16777215&T)<<8;break;default:f=this._themeService.colors.background.rgba}p.attributes.length<C+4&&(p.attributes=(0,g.expandFloat32Array)(p.attributes,this._terminal.rows*this._terminal.cols*8)),r=D*this._dimensions.device.cell.width,h=N*this._dimensions.device.cell.height,l=(f>>24&255)/255,c=(f>>16&255)/255,m=(f>>8&255)/255,w=1,this._addRectangle(p.attributes,C,r,h,(M-D)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,l,c,m,w)}_addRectangle(p,C,L,T,D,M,N,X,z,U){p[C]=L/this._dimensions.device.canvas.width,p[C+1]=T/this._dimensions.device.canvas.height,p[C+2]=D/this._dimensions.device.canvas.width,p[C+3]=M/this._dimensions.device.canvas.height,p[C+4]=N,p[C+5]=X,p[C+6]=z,p[C+7]=U}_addRectangleFloat(p,C,L,T,D,M,N){p[C]=L/this._dimensions.device.canvas.width,p[C+1]=T/this._dimensions.device.canvas.height,p[C+2]=D/this._dimensions.device.canvas.width,p[C+3]=M/this._dimensions.device.canvas.height,p[C+4]=N[0],p[C+5]=N[1],p[C+6]=N[2],p[C+7]=N[3]}_colorToFloat32Array(p){return new Float32Array([(p.rgba>>24&255)/255,(p.rgba>>16&255)/255,(p.rgba>>8&255)/255,(255&p.rgba)/255])}}a.RectangleRenderer=S},310:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const _=d(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,_.createSelectionRenderModel)()}resize(v,o){const g=v*o*a.RENDER_MODEL_INDICIES_PER_CELL;g!==this.cells.length&&(this.cells=new Uint32Array(g),this.lineLengths=new Uint32Array(o))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const _=d(820),v=d(274),o=d(627),g=d(457),y=d(56),b=d(374),f=d(345),r=d(859),h=d(147),l=d(782),c=d(855),m=d(965),w=d(742),S=d(310),E=d(733);class p extends r.Disposable{constructor(D,M,N,X,z,U,P,R,H){super(),this._terminal=D,this._characterJoinerService=M,this._charSizeService=N,this._coreBrowserService=X,this._coreService=z,this._decorationService=U,this._optionsService=P,this._themeService=R,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new S.RenderModel,this._workCell=new l.CellData,this._workCell2=new l.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new f.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new f.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new f.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new f.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new v.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new E.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,P,this._themeService)],this.dimensions=(0,b.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(P.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const A={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",A),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextlost",(O=>{console.log("webglcontextlost event received"),O.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(O)}),3e3)}))),this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextrestored",(O=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,o.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((O,$)=>this._setCanvasDevicePixelDimensions(O,$))),this.register(this._coreBrowserService.onWindowChange((O=>{this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,O,(($,V)=>this._setCanvasDevicePixelDimensions($,V)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var O;for(const $ of this._renderLayers)$.dispose();(O=this._canvas.parentElement)==null||O.removeChild(this._canvas),(0,o.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var D;return(D=this._charAtlas)==null?void 0:D.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(D,M){var N,X,z,U;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const P of this._renderLayers)P.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(N=this._rectangleRenderer.value)==null||N.setDimensions(this.dimensions),(X=this._rectangleRenderer.value)==null||X.handleResize(),(z=this._glyphRenderer.value)==null||z.setDimensions(this.dimensions),(U=this._glyphRenderer.value)==null||U.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var D;for(const M of this._renderLayers)M.handleBlur(this._terminal);(D=this._cursorBlinkStateManager.value)==null||D.pause(),this._requestRedrawViewport()}handleFocus(){var D;for(const M of this._renderLayers)M.handleFocus(this._terminal);(D=this._cursorBlinkStateManager.value)==null||D.resume(),this._requestRedrawViewport()}handleSelectionChanged(D,M,N){for(const X of this._renderLayers)X.handleSelectionChanged(this._terminal,D,M,N);this._model.selection.update(this._core,D,M,N),this._requestRedrawViewport()}handleCursorMove(){var D;for(const M of this._renderLayers)M.handleCursorMove(this._terminal);(D=this._cursorBlinkStateManager.value)==null||D.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new w.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new m.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var M;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const D=(0,o.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==D&&(this._onChangeTextureAtlas.fire(D.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,f.forwardEvent)(D.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,f.forwardEvent)(D.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=D,this._charAtlas.warmUp(),(M=this._glyphRenderer.value)==null||M.setAtlas(this._charAtlas)}_clearModel(D){var M;this._model.clear(),D&&((M=this._glyphRenderer.value)==null||M.clear())}clearTextureAtlas(){var D;(D=this._charAtlas)==null||D.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var D;this._clearModel(!0);for(const M of this._renderLayers)M.reset(this._terminal);(D=this._cursorBlinkStateManager.value)==null||D.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(D){return-1}deregisterCharacterJoiner(D){return!1}renderRows(D,M){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const N of this._renderLayers)N.handleGridChanged(this._terminal,D,M);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(D,M),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new g.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(D,M){const N=this._core;let X,z,U,P,R,H,A,O,$,V,he,ue,j,k,ie=this._workCell;D=L(D,N.rows-1,0),M=L(M,N.rows-1,0);const ee=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,de=ee-N.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,N.cols-1);let Ce=-1;const me=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let He=!1;for(z=D;z<=M;z++)for(U=z+N.buffer.ydisp,P=N.buffer.lines.get(U),this._model.lineLengths[z]=0,R=this._characterJoinerService.getJoinedCharacters(U),j=0;j<N.cols;j++)if(X=this._cellColorResolver.result.bg,P.loadCell(j,ie),j===0&&(X=this._cellColorResolver.result.bg),H=!1,A=j,R.length>0&&j===R[0][0]&&(H=!0,O=R.shift(),ie=new C(ie,P.translateToString(!0,O[0],O[1]),O[1]-O[0]),A=O[1]-1),$=ie.getChars(),V=ie.getCode(),ue=(z*N.cols+j)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(ie,j,U,this.dimensions.device.cell.width),me&&U===ee&&(j===fe&&(this._model.cursor={x:fe,y:de,width:ie.getWidth(),style:this._coreBrowserService.isFocused?N.options.cursorStyle||"block":N.options.cursorInactiveStyle,cursorWidth:N.options.cursorWidth,dpr:this._devicePixelRatio},Ce=fe+ie.getWidth()-1),j>=fe&&j<=Ce&&(this._coreBrowserService.isFocused&&(N.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&N.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),V!==c.NULL_CELL_CODE&&(this._model.lineLengths[z]=j+1),(this._model.cells[ue]!==V||this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(He=!0,$.length>1&&(V|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[ue]=V,this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,he=ie.getWidth(),this._glyphRenderer.value.updateCell(j,z,V,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,$,he,X),H))for(ie=this._workCell,j++;j<A;j++)k=(z*N.cols+j)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(j,z,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0,0),this._model.cells[k]=c.NULL_CELL_CODE,this._model.cells[k+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[k+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[k+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;He&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(D,M){this._canvas.width===D&&this._canvas.height===M||(this._canvas.width=D,this._canvas.height=M,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const D=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:D,end:D})}}a.WebglRenderer=p;class C extends h.AttributeData{constructor(D,M,N){super(),this.content=0,this.combinedData="",this.fg=D.fg,this.bg=D.bg,this.combinedData=M,this._width=N}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(D){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(T,D,M=0){return Math.max(Math.min(T,D),M)}a.JoinedCellData=C},381:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const _=d(374);function v(o,g,y){const b=(0,_.throwIfFalsy)(o.createShader(g));if(o.shaderSource(b,y),o.compileShader(b),o.getShaderParameter(b,o.COMPILE_STATUS))return b;console.error(o.getShaderInfoLog(b)),o.deleteShader(b)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(o,g,y){const b=(0,_.throwIfFalsy)(o.createProgram());if(o.attachShader(b,(0,_.throwIfFalsy)(v(o,o.VERTEX_SHADER,g))),o.attachShader(b,(0,_.throwIfFalsy)(v(o,o.FRAGMENT_SHADER,y))),o.linkProgram(b),o.getProgramParameter(b,o.LINK_STATUS))return b;console.error(o.getProgramInfoLog(b)),o.deleteProgram(b)},a.createShader=v,a.expandFloat32Array=function(o,g){const y=Math.min(2*o.length,g),b=new Float32Array(y);for(let f=0;f<o.length;f++)b[f]=o[f];return b},a.GLTexture=class{constructor(o){this.texture=o,this.version=-1}}},592:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const _=d(627),v=d(237),o=d(374),g=d(859);class y extends g.Disposable{constructor(f,r,h,l,c,m,w,S){super(),this._container=r,this._alpha=c,this._coreBrowserService=m,this._optionsService=w,this._themeService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=l.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((E=>{this._refreshCharAtlas(f,E),this.reset(f)}))),this.register((0,g.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,o.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(f){}handleFocus(f){}handleCursorMove(f){}handleGridChanged(f,r,h){}handleSelectionChanged(f,r,h,l=!1){}_setTransparency(f,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(f,this._themeService.colors),this.handleGridChanged(f,0,f.rows-1)}_refreshCharAtlas(f,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,_.acquireTextureAtlas)(f,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(f,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(f,this._themeService.colors)}_fillBottomLineAtCells(f,r,h=1){this._ctx.fillRect(f*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(f,r,h,l){this._alpha?this._ctx.clearRect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,l*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,l*this._deviceCellHeight))}_fillCharTrueColor(f,r,h,l){this._ctx.font=this._getFont(f,!1,!1),this._ctx.textBaseline=v.TEXT_BASELINE,this._clipCell(h,l,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,l*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(f,r,h){this._ctx.beginPath(),this._ctx.rect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(f,r,h){return`${h?"italic":""} ${r?f.options.fontWeightBold:f.options.fontWeight} ${f.options.fontSize*this._coreBrowserService.dpr}px ${f.options.fontFamily}`}}a.BaseRenderLayer=y},733:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const _=d(197),v=d(237),o=d(592);class g extends o.BaseRenderLayer{constructor(b,f,r,h,l,c,m){super(r,b,"link",f,!0,l,c,m),this.register(h.onShowLinkUnderline((w=>this._handleShowLinkUnderline(w)))),this.register(h.onHideLinkUnderline((w=>this._handleHideLinkUnderline(w))))}resize(b,f){super.resize(b,f),this._state=void 0}reset(b){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const b=this._state.y2-this._state.y1-1;b>0&&this._clearCells(0,this._state.y1+1,this._state.cols,b),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(b){if(b.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:b.fg!==void 0&&(0,_.is256Color)(b.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[b.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,b.y1===b.y2)this._fillBottomLineAtCells(b.x1,b.y1,b.x2-b.x1);else{this._fillBottomLineAtCells(b.x1,b.y1,b.cols-b.x1);for(let f=b.y1+1;f<b.y2;f++)this._fillBottomLineAtCells(0,f,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}a.LinkRenderLayer=g},820:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,_,v,o){d.addEventListener(_,v,o);let g=!1;return{dispose:()=>{g||(g=!0,d.removeEventListener(_,v,o))}}}},274:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const _=d(855),v=d(160),o=d(374);let g,y=0,b=0,f=!1,r=!1,h=!1,l=0;a.CellColorResolver=class{constructor(c,m,w,S,E,p){this._terminal=c,this._optionService=m,this._selectionRenderModel=w,this._decorationService=S,this._coreBrowserService=E,this._themeService=p,this.result={fg:0,bg:0,ext:0}}resolve(c,m,w,S){if(this.result.bg=c.bg,this.result.fg=c.fg,this.result.ext=268435456&c.bg?c.extended.ext:0,b=0,y=0,r=!1,f=!1,h=!1,g=this._themeService.colors,l=0,c.getCode()!==_.NULL_CELL_CODE&&c.extended.underlineStyle===4){const E=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));l=m*S%(2*Math.round(E))}if(this._decorationService.forEachDecorationAtCell(m,w,"bottom",(E=>{E.backgroundColorRGB&&(b=E.backgroundColorRGB.rgba>>8&16777215,r=!0),E.foregroundColorRGB&&(y=E.foregroundColorRGB.rgba>>8&16777215,f=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,m,w),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}b=v.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,g.selectionForeground&&(y=g.selectionForeground.rgba>>8&16777215,f=!0),(0,o.treatGlyphAsBackgroundColor)(c.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)y=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}y=v.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}f=!0}}this._decorationService.forEachDecorationAtCell(m,w,"top",(E=>{E.backgroundColorRGB&&(b=E.backgroundColorRGB.rgba>>8&16777215,r=!0),E.foregroundColorRGB&&(y=E.foregroundColorRGB.rgba>>8&16777215,f=!0)})),r&&(b=h?-16777216&c.bg&-134217729|b|50331648:-16777216&c.bg|b|50331648),f&&(y=-16777216&c.fg&-67108865|y|50331648),67108864&this.result.fg&&(r&&!f&&(y=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,f=!0),!r&&f&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),g=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=f?y:this.result.fg,this.result.ext&=536870911,this.result.ext|=l<<29&3758096384}}},627:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const _=d(509),v=d(197),o=[];a.acquireTextureAtlas=function(g,y,b,f,r,h,l,c){const m=(0,v.generateConfig)(f,r,h,l,y,b,c);for(let E=0;E<o.length;E++){const p=o[E],C=p.ownedBy.indexOf(g);if(C>=0){if((0,v.configEquals)(p.config,m))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),o.splice(E,1)):p.ownedBy.splice(C,1);break}}for(let E=0;E<o.length;E++){const p=o[E];if((0,v.configEquals)(p.config,m))return p.ownedBy.push(g),p.atlas}const w=g._core,S={atlas:new _.TextureAtlas(document,m,w.unicodeService),config:m,ownedBy:[g]};return o.push(S),S.atlas},a.removeTerminalFromCache=function(g){for(let y=0;y<o.length;y++){const b=o[y].ownedBy.indexOf(g);if(b!==-1){o[y].ownedBy.length===1?(o[y].atlas.dispose(),o.splice(y,1)):o[y].ownedBy.splice(b,1);break}}}},197:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const _=d(160);a.generateConfig=function(v,o,g,y,b,f,r){const h={foreground:f.foreground,background:f.background,cursor:_.NULL_COLOR,cursorAccent:_.NULL_COLOR,selectionForeground:_.NULL_COLOR,selectionBackgroundTransparent:_.NULL_COLOR,selectionBackgroundOpaque:_.NULL_COLOR,selectionInactiveBackgroundTransparent:_.NULL_COLOR,selectionInactiveBackgroundOpaque:_.NULL_COLOR,ansi:f.ansi.slice(),contrastCache:f.contrastCache,halfContrastCache:f.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:v,deviceCellHeight:o,deviceCharWidth:g,deviceCharHeight:y,fontFamily:b.fontFamily,fontSize:b.fontSize,fontWeight:b.fontWeight,fontWeightBold:b.fontWeightBold,allowTransparency:b.allowTransparency,drawBoldTextInBrightColors:b.drawBoldTextInBrightColors,minimumContrastRatio:b.minimumContrastRatio,colors:h}},a.configEquals=function(v,o){for(let g=0;g<v.colors.ansi.length;g++)if(v.colors.ansi[g].rgba!==o.colors.ansi[g].rgba)return!1;return v.devicePixelRatio===o.devicePixelRatio&&v.customGlyphs===o.customGlyphs&&v.lineHeight===o.lineHeight&&v.letterSpacing===o.letterSpacing&&v.fontFamily===o.fontFamily&&v.fontSize===o.fontSize&&v.fontWeight===o.fontWeight&&v.fontWeightBold===o.fontWeightBold&&v.allowTransparency===o.allowTransparency&&v.deviceCharWidth===o.deviceCharWidth&&v.deviceCharHeight===o.deviceCharHeight&&v.drawBoldTextInBrightColors===o.drawBoldTextInBrightColors&&v.minimumContrastRatio===o.minimumContrastRatio&&v.colors.foreground.rgba===o.colors.foreground.rgba&&v.colors.background.rgba===o.colors.background.rgba},a.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const _=d(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},457:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(d,_){this._renderCallback=d,this._coreBrowserService=_,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(d=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,_>0)return void this._restartInterval(_)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(_)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),d)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const _=d(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const v={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╒":{1:(f,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(f,r)=>`M${.5-f},1 L${.5-f},.5 L1,.5 M${.5+f},.5 L${.5+f},1`},"╔":{1:(f,r)=>`M1,${.5-r} L${.5-f},${.5-r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1`},"╕":{1:(f,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(f,r)=>`M${.5+f},1 L${.5+f},.5 L0,.5 M${.5-f},.5 L${.5-f},1`},"╗":{1:(f,r)=>`M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M0,${.5-r} L${.5+f},${.5-r} L${.5+f},1`},"╘":{1:(f,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(f,r)=>`M1,.5 L${.5-f},.5 L${.5-f},0 M${.5+f},.5 L${.5+f},0`},"╚":{1:(f,r)=>`M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0 M1,${.5+r} L${.5-f},${.5+r} L${.5-f},0`},"╛":{1:(f,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(f,r)=>`M0,.5 L${.5+f},.5 L${.5+f},0 M${.5-f},.5 L${.5-f},0`},"╝":{1:(f,r)=>`M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M0,${.5+r} L${.5+f},${.5+r} L${.5+f},0`},"╞":{1:(f,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1 M${.5+f},.5 L1,.5`},"╠":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╡":{1:(f,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(f,r)=>`M0,.5 L${.5-f},.5 M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╣":{1:(f,r)=>`M${.5+f},0 L${.5+f},1 M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0`},"╤":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},.5 L${.5-f},1 M${.5+f},.5 L${.5+f},1`},"╦":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1`},"╧":{1:(f,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},.5 L${.5-f},0 M${.5+f},.5 L${.5+f},0`},"╩":{1:(f,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╪":{1:(f,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╬":{1:(f,r)=>`M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1 M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(f,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(f,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(f,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(f,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(f,r,h,l,c,m,w,S){const E=a.blockElementDefinitions[r];if(E)return(function(T,D,M,N,X,z){for(let U=0;U<D.length;U++){const P=D[U],R=X/8,H=z/8;T.fillRect(M+P.x*R,N+P.y*H,P.w*R,P.h*H)}})(f,E,h,l,c,m),!0;const p=v[r];if(p)return(function(T,D,M,N,X,z){let U=o.get(D);U||(U=new Map,o.set(D,U));const P=T.fillStyle;if(typeof P!="string")throw new Error(`Unexpected fillStyle type "${P}"`);let R=U.get(P);if(!R){const H=D[0].length,A=D.length,O=T.canvas.ownerDocument.createElement("canvas");O.width=H,O.height=A;const $=(0,_.throwIfFalsy)(O.getContext("2d")),V=new ImageData(H,A);let he,ue,j,k;if(P.startsWith("#"))he=parseInt(P.slice(1,3),16),ue=parseInt(P.slice(3,5),16),j=parseInt(P.slice(5,7),16),k=P.length>7&&parseInt(P.slice(7,9),16)||1;else{if(!P.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${P}" when drawing pattern glyph`);[he,ue,j,k]=P.substring(5,P.length-1).split(",").map((ie=>parseFloat(ie)))}for(let ie=0;ie<A;ie++)for(let ee=0;ee<H;ee++)V.data[4*(ie*H+ee)]=he,V.data[4*(ie*H+ee)+1]=ue,V.data[4*(ie*H+ee)+2]=j,V.data[4*(ie*H+ee)+3]=D[ie][ee]*(255*k);$.putImageData(V,0,0),R=(0,_.throwIfFalsy)(T.createPattern(O,null)),U.set(P,R)}T.fillStyle=R,T.fillRect(M,N,X,z)})(f,p,h,l,c,m),!0;const C=a.boxDrawingDefinitions[r];if(C)return(function(T,D,M,N,X,z,U){T.strokeStyle=T.fillStyle;for(const[P,R]of Object.entries(D)){let H;T.beginPath(),T.lineWidth=U*Number.parseInt(P),H=typeof R=="function"?R(.15,.15/z*X):R;for(const A of H.split(" ")){const O=A[0],$=y[O];if(!$){console.error(`Could not find drawing instructions for "${O}"`);continue}const V=A.substring(1).split(",");V[0]&&V[1]&&$(T,b(V,X,z,M,N,!0,U))}T.stroke(),T.closePath()}})(f,C,h,l,c,m,S),!0;const L=a.powerlineDefinitions[r];return!!L&&((function(T,D,M,N,X,z,U,P){const R=new Path2D;R.rect(M,N,X,z),T.clip(R),T.beginPath();const H=U/12;T.lineWidth=P*H;for(const A of D.d.split(" ")){const O=A[0],$=y[O];if(!$){console.error(`Could not find drawing instructions for "${O}"`);continue}const V=A.substring(1).split(",");V[0]&&V[1]&&$(T,b(V,X,z,M,N,!1,P,(D.leftPadding??0)*(H/2),(D.rightPadding??0)*(H/2)))}D.type===1?(T.strokeStyle=T.fillStyle,T.stroke()):T.fill(),T.closePath()})(f,L,h,l,c,m,w,S),!0)};const o=new Map;function g(f,r,h=0){return Math.max(Math.min(f,r),h)}const y={C:(f,r)=>f.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(f,r)=>f.lineTo(r[0],r[1]),M:(f,r)=>f.moveTo(r[0],r[1])};function b(f,r,h,l,c,m,w,S=0,E=0){const p=f.map((C=>parseFloat(C)||parseInt(C)));if(p.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<p.length;C+=2)p[C]*=r-S*w-E*w,m&&p[C]!==0&&(p[C]=g(Math.round(p[C]+.5)-.5,r,0)),p[C]+=l+S*w;for(let C=1;C<p.length;C+=2)p[C]*=h,m&&p[C]!==0&&(p[C]=g(Math.round(p[C]+.5)-.5,h,0)),p[C]+=c;return p}},56:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const _=d(859);a.observeDevicePixelDimensions=function(v,o,g){let y=new o.ResizeObserver((b=>{const f=b.find((l=>l.target===v));if(!f)return;if(!("devicePixelContentBoxSize"in f))return y==null||y.disconnect(),void(y=void 0);const r=f.devicePixelContentBoxSize[0].inlineSize,h=f.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&g(r,h)}));try{y.observe(v,{box:["device-pixel-content-box"]})}catch{y.disconnect(),y=void 0}return(0,_.toDisposable)((()=>y==null?void 0:y.disconnect()))}},374:(W,a)=>{function d(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},a.isEmoji=_,a.allowRescaling=function(v,o,g,y){return o===1&&g>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!_(v)&&!d(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},a.treatGlyphAsBackgroundColor=function(v){return d(v)||(function(o){return 9472<=o&&o<=9631})(v)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(v,o,g=0){return(v-(2*Math.round(o)-g))%(2*Math.round(o))}},296:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,o,g,y=!1){if(this.selectionStart=o,this.selectionEnd=g,!o||!g||o[0]===g[0]&&o[1]===g[1])return void this.clear();const b=v.buffers.active.ydisp,f=o[1]-b,r=g[1]-b,h=Math.max(f,0),l=Math.min(r,v.rows-1);h>=v.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=f,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=o[0],this.endCol=g[0])}isCellSelected(v,o,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&g>=this.viewportCappedStartRow&&o<this.endCol&&g<=this.viewportCappedEndRow:o<this.startCol&&g>=this.viewportCappedStartRow&&o>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&o>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},509:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const _=d(237),v=d(860),o=d(374),g=d(160),y=d(345),b=d(485),f=d(385),r=d(147),h=d(855),l={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let c;class m{get pages(){return this._pages}constructor(C,L,T){this._document=C,this._config=L,this._unicodeService=T,this._didWarmUp=!1,this._cacheMap=new b.FourKeyMap,this._cacheMapCombined=new b.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new y.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new y.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=E(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,o.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new f.IdleTaskQueue;for(let L=33;L<126;L++)C.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const T=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,T)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const L=this._pages.filter((U=>2*U.canvas.width<=(m.maxTextureSize||4096))).sort(((U,P)=>P.canvas.width!==U.canvas.width?P.canvas.width-U.canvas.width:P.percentageUsed-U.percentageUsed));let T=-1,D=0;for(let U=0;U<L.length;U++)if(L[U].canvas.width!==D)T=U,D=L[U].canvas.width;else if(U-T==3)break;const M=L.slice(T,T+4),N=M.map((U=>U.glyphs[0].texturePage)).sort(((U,P)=>U>P?1:-1)),X=this.pages.length-M.length,z=this._mergePages(M,X);z.version++;for(let U=N.length-1;U>=0;U--)this._deletePage(N[U]);this.pages.push(z),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(z.canvas)}const C=new w(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,L){const T=2*C[0].canvas.width,D=new w(this._document,T,C);for(const[M,N]of C.entries()){const X=M*N.canvas.width%T,z=Math.floor(M/2)*N.canvas.height;D.ctx.drawImage(N.canvas,X,z);for(const P of N.glyphs)P.texturePage=L,P.sizeClipSpace.x=P.size.x/T,P.sizeClipSpace.y=P.size.y/T,P.texturePosition.x+=X,P.texturePosition.y+=z,P.texturePositionClipSpace.x=P.texturePosition.x/T,P.texturePositionClipSpace.y=P.texturePosition.y/T;this._onRemoveTextureAtlasCanvas.fire(N.canvas);const U=this._activePages.indexOf(N);U!==-1&&this._activePages.splice(U,1)}return D}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const T=this._pages[L];for(const D of T.glyphs)D.texturePage--;T.version++}}getRasterizedGlyphCombinedChar(C,L,T,D,M){return this._getFromCacheMap(this._cacheMapCombined,C,L,T,D,M)}getRasterizedGlyph(C,L,T,D,M){return this._getFromCacheMap(this._cacheMap,C,L,T,D,M)}_getFromCacheMap(C,L,T,D,M,N=!1){return c=C.get(L,T,D,M),c||(c=this._drawToCache(L,T,D,M,N),C.set(L,T,D,M,c)),c}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,L,T,D){if(this._config.allowTransparency)return g.NULL_COLOR;let M;switch(C){case 16777216:case 33554432:M=this._getColorFromAnsiIndex(L);break;case 50331648:const N=r.AttributeData.toColorRGB(L);M=g.channels.toColor(N[0],N[1],N[2]);break;default:M=T?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return M}_getForegroundColor(C,L,T,D,M,N,X,z,U,P){const R=this._getMinimumContrastColor(C,L,T,D,M,N,X,U,z,P);if(R)return R;let H;switch(M){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&U&&N<8&&(N+=8),H=this._getColorFromAnsiIndex(N);break;case 50331648:const A=r.AttributeData.toColorRGB(N);H=g.channels.toColor(A[0],A[1],A[2]);break;default:H=X?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=g.color.opaque(H)),z&&(H=g.color.multiplyOpacity(H,_.DIM_OPACITY)),H}_resolveBackgroundRgba(C,L,T){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return T?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,T,D){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&D&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return T?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,T,D,M,N,X,z,U,P){if(this._config.minimumContrastRatio===1||P)return;const R=this._getContrastCache(U),H=R.getColor(C,D);if(H!==void 0)return H||void 0;const A=this._resolveBackgroundRgba(L,T,X),O=this._resolveForegroundRgba(M,N,X,z),$=g.rgba.ensureContrastRatio(A,O,this._config.minimumContrastRatio/(U?2:1));if(!$)return void R.setColor(C,D,null);const V=g.channels.toColor($>>24&255,$>>16&255,$>>8&255);return R.setColor(C,D,V),V}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,T,D,M=!1){const N=typeof C=="number"?String.fromCharCode(C):C,X=Math.min(this._config.deviceCellWidth*Math.max(N.length,2)+4,this._textureSize);this._tmpCanvas.width<X&&(this._tmpCanvas.width=X);const z=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<z&&(this._tmpCanvas.height=z),this._tmpCtx.save(),this._workAttributeData.fg=T,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=D,this._workAttributeData.isInvisible())return l;const U=!!this._workAttributeData.isBold(),P=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),A=!!this._workAttributeData.isUnderline(),O=!!this._workAttributeData.isStrikethrough(),$=!!this._workAttributeData.isOverline();let V=this._workAttributeData.getFgColor(),he=this._workAttributeData.getFgColorMode(),ue=this._workAttributeData.getBgColor(),j=this._workAttributeData.getBgColorMode();if(P){const _e=V;V=ue,ue=_e;const be=he;he=j,j=be}const k=this._getBackgroundColor(j,ue,P,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=k.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ie=U?this._config.fontWeightBold:this._config.fontWeight,ee=H?"italic":"";this._tmpCtx.font=`${ee} ${ie} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=_.TEXT_BASELINE;const de=N.length===1&&(0,o.isPowerlineGlyph)(N.charCodeAt(0)),fe=N.length===1&&(0,o.isRestrictedPowerlineGlyph)(N.charCodeAt(0)),Ce=this._getForegroundColor(L,j,ue,T,he,V,P,R,U,(0,o.treatGlyphAsBackgroundColor)(N.charCodeAt(0)));this._tmpCtx.fillStyle=Ce.css;const me=fe?0:4;let He=!1;this._config.customGlyphs!==!1&&(He=(0,v.tryDrawCustomChar)(this._tmpCtx,N,me,me,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Ke,Se=!de;if(Ke=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),A){this._tmpCtx.save();const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),be=_e%2==1?.5:0;if(this._tmpCtx.lineWidth=_e,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Se=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Se=!1;let Je=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Je<8&&(Je+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Je).css}this._tmpCtx.beginPath();const Qe=me,Pe=Math.ceil(me+this._config.deviceCharHeight)-be-(M?2*_e:0),Ut=Pe+_e,ot=Pe+2*_e;let bt=this._workAttributeData.getUnderlineVariantOffset();for(let Je=0;Je<Ke;Je++){this._tmpCtx.save();const qe=Qe+Je*this._config.deviceCellWidth,Ae=Qe+(Je+1)*this._config.deviceCellWidth,Vt=qe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Ae,Pe),this._tmpCtx.moveTo(qe,ot),this._tmpCtx.lineTo(Ae,ot);break;case 3:const ht=_e<=1?ot:Math.ceil(me+this._config.deviceCharHeight-_e/2)-be,Mt=_e<=1?Pe:Math.ceil(me+this._config.deviceCharHeight+_e/2)-be,pt=new Path2D;pt.rect(qe,Pe,this._config.deviceCellWidth,ot-Pe),this._tmpCtx.clip(pt),this._tmpCtx.moveTo(qe-this._config.deviceCellWidth/2,Ut),this._tmpCtx.bezierCurveTo(qe-this._config.deviceCellWidth/2,Mt,qe,Mt,qe,Ut),this._tmpCtx.bezierCurveTo(qe,ht,Vt,ht,Vt,Ut),this._tmpCtx.bezierCurveTo(Vt,Mt,Ae,Mt,Ae,Ut),this._tmpCtx.bezierCurveTo(Ae,ht,Ae+this._config.deviceCellWidth/2,ht,Ae+this._config.deviceCellWidth/2,Ut);break;case 4:const ds=bt===0?0:bt>=_e?2*_e-bt:_e-bt;bt>=_e||ds===0?(this._tmpCtx.setLineDash([Math.round(_e),Math.round(_e)]),this._tmpCtx.moveTo(qe+ds,Pe),this._tmpCtx.lineTo(Ae,Pe)):(this._tmpCtx.setLineDash([Math.round(_e),Math.round(_e)]),this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(qe+ds,Pe),this._tmpCtx.moveTo(qe+ds+_e,Pe),this._tmpCtx.lineTo(Ae,Pe)),bt=(0,o.computeNextVariantOffset)(Ae-qe,_e,bt);break;case 5:const ha=.6,ua=.3,wi=Ae-qe,Yi=Math.floor(ha*wi),Vi=Math.floor(ua*wi),ri=wi-Yi-Vi;this._tmpCtx.setLineDash([Yi,Vi,ri]),this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Ae,Pe);break;default:this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Ae,Pe)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!He&&this._config.fontSize>=12&&!this._config.allowTransparency&&N!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Je=this._tmpCtx.measureText(N);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Je&&Je.actualBoundingBoxDescent>0){this._tmpCtx.save();const qe=new Path2D;qe.rect(Qe,Pe-Math.ceil(_e/2),this._config.deviceCellWidth*Ke,ot-Pe+Math.ceil(_e/2)),this._tmpCtx.clip(qe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=k.css,this._tmpCtx.strokeText(N,me,me+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if($){const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),be=_e%2==1?.5:0;this._tmpCtx.lineWidth=_e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(me,me+be),this._tmpCtx.lineTo(me+this._config.deviceCharWidth*Ke,me+be),this._tmpCtx.stroke()}if(He||this._tmpCtx.fillText(N,me,me+this._config.deviceCharHeight),N==="_"&&!this._config.allowTransparency){let _e=S(this._tmpCtx.getImageData(me,me,this._config.deviceCellWidth,this._config.deviceCellHeight),k,Ce,Se);if(_e)for(let be=1;be<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=k.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(N,me,me+this._config.deviceCharHeight-be),_e=S(this._tmpCtx.getImageData(me,me,this._config.deviceCellWidth,this._config.deviceCellHeight),k,Ce,Se),_e);be++);}if(O){const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),be=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=_e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(me,me+Math.floor(this._config.deviceCharHeight/2)-be),this._tmpCtx.lineTo(me+this._config.deviceCharWidth*Ke,me+Math.floor(this._config.deviceCharHeight/2)-be),this._tmpCtx.stroke()}this._tmpCtx.restore();const Dt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Jt;if(Jt=this._config.allowTransparency?(function(_e){for(let be=0;be<_e.data.length;be+=4)if(_e.data[be+3]>0)return!1;return!0})(Dt):S(Dt,k,Ce,Se),Jt)return l;const Te=this._findGlyphBoundingBox(Dt,this._workBoundingBox,X,fe,He,me);let Le,Re;for(;;){if(this._activePages.length===0){const _e=this._createNewPage();Le=_e,Re=_e.currentRow,Re.height=Te.size.y;break}Le=this._activePages[this._activePages.length-1],Re=Le.currentRow;for(const _e of this._activePages)Te.size.y<=_e.currentRow.height&&(Le=_e,Re=_e.currentRow);for(let _e=this._activePages.length-1;_e>=0;_e--)for(const be of this._activePages[_e].fixedRows)be.height<=Re.height&&Te.size.y<=be.height&&(Le=this._activePages[_e],Re=be);if(Re.y+Te.size.y>=Le.canvas.height||Re.height>Te.size.y+2){let _e=!1;if(Le.currentRow.y+Le.currentRow.height+Te.size.y>=Le.canvas.height){let be;for(const Qe of this._activePages)if(Qe.currentRow.y+Qe.currentRow.height+Te.size.y<Qe.canvas.height){be=Qe;break}if(be)Le=be;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&Re.y+Te.size.y<=Le.canvas.height&&Re.height>=Te.size.y&&Re.x+Te.size.x<=Le.canvas.width)_e=!0;else{const Qe=this._createNewPage();Le=Qe,Re=Qe.currentRow,Re.height=Te.size.y,_e=!0}}_e||(Le.currentRow.height>0&&Le.fixedRows.push(Le.currentRow),Re={x:0,y:Le.currentRow.y+Le.currentRow.height,height:Te.size.y},Le.fixedRows.push(Re),Le.currentRow={x:0,y:Re.y+Re.height,height:0})}if(Re.x+Te.size.x<=Le.canvas.width)break;Re===Le.currentRow?(Re.x=0,Re.y+=Re.height,Re.height=0):Le.fixedRows.splice(Le.fixedRows.indexOf(Re),1)}return Te.texturePage=this._pages.indexOf(Le),Te.texturePosition.x=Re.x,Te.texturePosition.y=Re.y,Te.texturePositionClipSpace.x=Re.x/Le.canvas.width,Te.texturePositionClipSpace.y=Re.y/Le.canvas.height,Te.sizeClipSpace.x/=Le.canvas.width,Te.sizeClipSpace.y/=Le.canvas.height,Re.height=Math.max(Re.height,Te.size.y),Re.x+=Te.size.x,Le.ctx.putImageData(Dt,Te.texturePosition.x-this._workBoundingBox.left,Te.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Te.size.x,Te.size.y),Le.addGlyph(Te),Le.version++,Te}_findGlyphBoundingBox(C,L,T,D,M,N){L.top=0;const X=D?this._config.deviceCellHeight:this._tmpCanvas.height,z=D?this._config.deviceCellWidth:T;let U=!1;for(let P=0;P<X;P++){for(let R=0;R<z;R++){const H=P*this._tmpCanvas.width*4+4*R+3;if(C.data[H]!==0){L.top=P,U=!0;break}}if(U)break}L.left=0,U=!1;for(let P=0;P<N+z;P++){for(let R=0;R<X;R++){const H=R*this._tmpCanvas.width*4+4*P+3;if(C.data[H]!==0){L.left=P,U=!0;break}}if(U)break}L.right=z,U=!1;for(let P=N+z-1;P>=N;P--){for(let R=0;R<X;R++){const H=R*this._tmpCanvas.width*4+4*P+3;if(C.data[H]!==0){L.right=P,U=!0;break}}if(U)break}L.bottom=X,U=!1;for(let P=X-1;P>=0;P--){for(let R=0;R<z;R++){const H=P*this._tmpCanvas.width*4+4*R+3;if(C.data[H]!==0){L.bottom=P,U=!0;break}}if(U)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+N+(D||M?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+N+(D||M?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=m;class w{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,L,T){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],T)for(const D of T)this._glyphs.push(...D.glyphs),this._usedPixels+=D._usedPixels;this.canvas=E(C,L,L),this.ctx=(0,o.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function S(p,C,L,T){const D=C.rgba>>>24,M=C.rgba>>>16&255,N=C.rgba>>>8&255,X=L.rgba>>>24,z=L.rgba>>>16&255,U=L.rgba>>>8&255,P=Math.floor((Math.abs(D-X)+Math.abs(M-z)+Math.abs(N-U))/12);let R=!0;for(let H=0;H<p.data.length;H+=4)p.data[H]===D&&p.data[H+1]===M&&p.data[H+2]===N||T&&Math.abs(p.data[H]-D)+Math.abs(p.data[H+1]-M)+Math.abs(p.data[H+2]-N)<P?p.data[H+3]=0:R=!1;return R}function E(p,C,L){const T=p.createElement("canvas");return T.width=C,T.height=L,T}},160:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,_=0,v=0,o=0;var g,y,b,f,r;function h(c){const m=c.toString(16);return m.length<2?"0"+m:m}function l(c,m){return c<m?(m+.05)/(c+.05):(c+.05)/(m+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(m,w,S,E){return E!==void 0?`#${h(m)}${h(w)}${h(S)}${h(E)}`:`#${h(m)}${h(w)}${h(S)}`},c.toRgba=function(m,w,S,E=255){return(m<<24|w<<16|S<<8|E)>>>0},c.toColor=function(m,w,S,E){return{css:c.toCss(m,w,S,E),rgba:c.toRgba(m,w,S,E)}}})(g||(a.channels=g={})),(function(c){function m(w,S){return o=Math.round(255*S),[d,_,v]=r.toChannels(w.rgba),{css:g.toCss(d,_,v,o),rgba:g.toRgba(d,_,v,o)}}c.blend=function(w,S){if(o=(255&S.rgba)/255,o===1)return{css:S.css,rgba:S.rgba};const E=S.rgba>>24&255,p=S.rgba>>16&255,C=S.rgba>>8&255,L=w.rgba>>24&255,T=w.rgba>>16&255,D=w.rgba>>8&255;return d=L+Math.round((E-L)*o),_=T+Math.round((p-T)*o),v=D+Math.round((C-D)*o),{css:g.toCss(d,_,v),rgba:g.toRgba(d,_,v)}},c.isOpaque=function(w){return(255&w.rgba)==255},c.ensureContrastRatio=function(w,S,E){const p=r.ensureContrastRatio(w.rgba,S.rgba,E);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(w){const S=(255|w.rgba)>>>0;return[d,_,v]=r.toChannels(S),{css:g.toCss(d,_,v),rgba:S}},c.opacity=m,c.multiplyOpacity=function(w,S){return o=255&w.rgba,m(w,o*S/255)},c.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}})(y||(a.color=y={})),(function(c){let m,w;try{const S=document.createElement("canvas");S.width=1,S.height=1;const E=S.getContext("2d",{willReadFrequently:!0});E&&(m=E,m.globalCompositeOperation="copy",w=m.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),g.toColor(d,_,v);case 5:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),o=parseInt(S.slice(4,5).repeat(2),16),g.toColor(d,_,v,o);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const E=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return d=parseInt(E[1]),_=parseInt(E[2]),v=parseInt(E[3]),o=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),g.toColor(d,_,v,o);if(!m||!w)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=w,m.fillStyle=S,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[d,_,v,o]=m.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(d,_,v,o),css:S}}})(b||(a.css=b={})),(function(c){function m(w,S,E){const p=w/255,C=S/255,L=E/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(w){return m(w>>16&255,w>>8&255,255&w)},c.relativeLuminance2=m})(f||(a.rgb=f={})),(function(c){function m(S,E,p){const C=S>>24&255,L=S>>16&255,T=S>>8&255;let D=E>>24&255,M=E>>16&255,N=E>>8&255,X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));for(;X<p&&(D>0||M>0||N>0);)D-=Math.max(0,Math.ceil(.1*D)),M-=Math.max(0,Math.ceil(.1*M)),N-=Math.max(0,Math.ceil(.1*N)),X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));return(D<<24|M<<16|N<<8|255)>>>0}function w(S,E,p){const C=S>>24&255,L=S>>16&255,T=S>>8&255;let D=E>>24&255,M=E>>16&255,N=E>>8&255,X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));for(;X<p&&(D<255||M<255||N<255);)D=Math.min(255,D+Math.ceil(.1*(255-D))),M=Math.min(255,M+Math.ceil(.1*(255-M))),N=Math.min(255,N+Math.ceil(.1*(255-N))),X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));return(D<<24|M<<16|N<<8|255)>>>0}c.blend=function(S,E){if(o=(255&E)/255,o===1)return E;const p=E>>24&255,C=E>>16&255,L=E>>8&255,T=S>>24&255,D=S>>16&255,M=S>>8&255;return d=T+Math.round((p-T)*o),_=D+Math.round((C-D)*o),v=M+Math.round((L-M)*o),g.toRgba(d,_,v)},c.ensureContrastRatio=function(S,E,p){const C=f.relativeLuminance(S>>8),L=f.relativeLuminance(E>>8);if(l(C,L)<p){if(L<C){const M=m(S,E,p),N=l(C,f.relativeLuminance(M>>8));if(N<p){const X=w(S,E,p);return N>l(C,f.relativeLuminance(X>>8))?M:X}return M}const T=w(S,E,p),D=l(C,f.relativeLuminance(T>>8));if(D<p){const M=m(S,E,p);return D>l(C,f.relativeLuminance(M>>8))?T:M}return T}},c.reduceLuminance=m,c.increaseLuminance=w,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(a.rgba=r={})),a.toPaddedHex=h,a.contrastRatio=l},345:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const v=[];for(let o=0;o<this._listeners.length;o++)v.push(this._listeners[o]);for(let o=0;o<v.length;o++)v[o].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,_){return d((v=>_.fire(v)))},a.runAndSubscribe=function(d,_){return _(void 0),d((v=>_(v)))}},859:(W,a)=>{function d(_){for(const v of _)v.dispose();_.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},a.toDisposable=function(_){return{dispose:_}},a.disposeArray=d,a.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},485:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(v,o,g){this._data[v]||(this._data[v]={}),this._data[v][o]=g}get(v,o){return this._data[v]?this._data[v][o]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(_,v,o,g,y){this._data.get(_,v)||this._data.set(_,v,new d),this._data.get(_,v).set(o,g,y)}get(_,v,o,g){var y;return(y=this._data.get(_,v))==null?void 0:y.get(o,g)}clear(){this._data.clear()}}},399:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,_=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const v=d.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),a.isIpad=_==="iPad",a.isIphone=_==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),a.isLinux=_.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},385:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const _=d(399);class v{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 b=0,f=0,r=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),f=Math.max(b,f),h=y.timeRemaining(),1.5*f>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class o extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const b=Date.now()+y;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}a.PriorityTaskQueue=o,a.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:o,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},147:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new d;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}get underlineVariantOffset(){const o=(3758096384&this._ext)>>29;return o<0?4294967288^o:o}set underlineVariantOffset(o){this._ext&=536870911,this._ext|=o<<29&3758096384}constructor(o=0,g=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=g}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=_},782:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const _=d(133),v=d(855),o=d(147);class g extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const f=new g;return f.setFromCharData(b),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(b[v.CHAR_DATA_CHAR_INDEX].length===2){const r=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=b[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=g},855:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,_=0,v=d.length){let o="";for(let g=_;g<v;++g){let y=d[g];y>65535?(y-=65536,o+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):o+=String.fromCharCode(y)}return o},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,_){const v=d.length;if(!v)return 0;let o=0,g=0;if(this._interim){const y=d.charCodeAt(g++);56320<=y&&y<=57343?_[o++]=1024*(this._interim-55296)+y-56320+65536:(_[o++]=this._interim,_[o++]=y),this._interim=0}for(let y=g;y<v;++y){const b=d.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,o;const f=d.charCodeAt(y);56320<=f&&f<=57343?_[o++]=1024*(b-55296)+f-56320+65536:(_[o++]=b,_[o++]=f)}else b!==65279&&(_[o++]=b)}return o}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,_){const v=d.length;if(!v)return 0;let o,g,y,b,f=0,r=0,h=0;if(this.interim[0]){let m=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let S,E=0;for(;(S=63&this.interim[++E])&&E<4;)w<<=6,w|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=p-E;for(;h<C;){if(h>=v)return 0;if(S=d[h++],(192&S)!=128){h--,m=!0;break}this.interim[E++]=S,w<<=6,w|=63&S}m||(p===2?w<128?h--:_[f++]=w:p===3?w<2048||w>=55296&&w<=57343||w===65279||(_[f++]=w):w<65536||w>1114111||(_[f++]=w)),this.interim.fill(0)}const l=v-4;let c=h;for(;c<v;){for(;!(!(c<l)||128&(o=d[c])||128&(g=d[c+1])||128&(y=d[c+2])||128&(b=d[c+3]));)_[f++]=o,_[f++]=g,_[f++]=y,_[f++]=b,c+=4;if(o=d[c++],o<128)_[f++]=o;else if((224&o)==192){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(r=(31&o)<<6|63&g,r<128){c--;continue}_[f++]=r}else if((240&o)==224){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,f;if(y=d[c++],(192&y)!=128){c--;continue}if(r=(15&o)<<12|(63&g)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;_[f++]=r}else if((248&o)==240){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,f;if(y=d[c++],(192&y)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,this.interim[2]=y,f;if(b=d[c++],(192&b)!=128){c--;continue}if(r=(7&o)<<18|(63&g)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;_[f++]=r}}return f}}},776:function(W,a,d){var _=this&&this.__decorate||function(r,h,l,c){var m,w=arguments.length,S=w<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,l,c);else for(var E=r.length-1;E>=0;E--)(m=r[E])&&(S=(w<3?m(S):w>3?m(h,l,S):m(h,l))||S);return w>3&&S&&Object.defineProperty(h,l,S),S},v=this&&this.__param||function(r,h){return function(l,c){h(l,c,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const o=d(859),g=d(97),y={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let b,f=a.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,l){this._evalLazyOptionalParams(l),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(r,...h){var l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var l;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var l;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,r,h)}};a.LogService=f=_([v(0,g.IOptionsService)],f),a.setTraceLogger=function(r){b=r},a.traceCall=function(r,h,l){if(typeof l.value!="function")throw new Error("not supported");const c=l.value;l.value=function(...m){if(b.logLevel!==g.LogLevelEnum.TRACE)return c.apply(this,m);b.trace(`GlyphRenderer#${c.name}(${m.map((S=>JSON.stringify(S))).join(", ")})`);const w=c.apply(this,m);return b.trace(`GlyphRenderer#${c.name} return`,w),w}}},726:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="di$target",_="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(v){return v[_]||[]},a.createDecorator=function(v){if(a.serviceRegistry.has(v))return a.serviceRegistry.get(v);const o=function(g,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,r,h){r[d]===r?r[_].push({id:f,index:h}):(r[_]=[{id:f,index:h}],r[d]=r)})(o,g,b)};return o.toString=()=>v,a.serviceRegistry.set(v,o),o}},97:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const _=d(726);var v;a.IBufferService=(0,_.createDecorator)("BufferService"),a.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),a.ICoreService=(0,_.createDecorator)("CoreService"),a.ICharsetService=(0,_.createDecorator)("CharsetService"),a.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(o){o[o.TRACE=0]="TRACE",o[o.DEBUG=1]="DEBUG",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.OFF=5]="OFF"})(v||(a.LogLevelEnum=v={})),a.ILogService=(0,_.createDecorator)("LogService"),a.IOptionsService=(0,_.createDecorator)("OptionsService"),a.IOscLinkService=(0,_.createDecorator)("OscLinkService"),a.IUnicodeService=(0,_.createDecorator)("UnicodeService"),a.IDecorationService=(0,_.createDecorator)("DecorationService")}},I={};function re(W){var a=I[W];if(a!==void 0)return a.exports;var d=I[W]={exports:{}};return ne[W].call(d.exports,d,d.exports,re),d.exports}var J={};return(()=>{var W=J;Object.defineProperty(W,"__esModule",{value:!0}),W.WebglAddon=void 0;const a=re(345),d=re(859),_=re(399),v=re(666),o=re(776);class g extends d.Disposable{constructor(b){if(_.isSafari&&(0,_.getSafariVersion)()<16){const f={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",f))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=b,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(b){const f=b._core;if(!b.element)return void this.register(f.onWillOpen((()=>this.activate(b))));this._terminal=b;const r=f.coreService,h=f.optionsService,l=f,c=l._renderService,m=l._characterJoinerService,w=l._charSizeService,S=l._coreBrowserService,E=l._decorationService,p=l._logService,C=l._themeService;(0,o.setTraceLogger)(p),this._renderer=this.register(new v.WebglRenderer(b,m,w,S,r,E,h,C,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),c.setRenderer(this._renderer),this.register((0,d.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(b.cols,b.rows)})))}get textureAtlas(){var b;return(b=this._renderer)==null?void 0:b.textureAtlas}clearTextureAtlas(){var b;(b=this._renderer)==null||b.clearTextureAtlas()}}W.WebglAddon=g})(),J})()))})(Oo)),Oo.exports}var qv=Pv();const Gv=0,Jf=1;function Wv({wsPath:q}){const ae=ze.useRef(null),ne=ze.useRef(null),I=ze.useRef(null),re=ze.useRef(null);return ze.useEffect(()=>{if(!ae.current)return;const J=new jv.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0});ne.current=J;const W=new Fv.FitAddon;re.current=W,J.loadAddon(W),J.open(ae.current);try{const h=new qv.WebglAddon;h.onContextLoss(()=>{h.dispose()}),J.loadAddon(h)}catch{}W.fit();const d=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${q}`,_=new WebSocket(d);_.binaryType="arraybuffer",I.current=_;let v="",o=!0,g=null;const y=h=>(h=h.replace(/\x1b\[[\?>][\d;]*c/g,""),h=h.replace(/\[[\?>][\d;]*c/g,""),h),b=()=>{if(o=!1,v){const h=y(v);h&&J.write(h),v=""}};_.onopen=()=>{Vf(_,"resize",{cols:J.cols,rows:J.rows})},_.onmessage=h=>{const l=new Uint8Array(h.data);if(l.length===0)return;const c=l[0],m=l.subarray(1);if(c===Jf){const w=new TextDecoder().decode(m);if(o)v+=w,g&&clearTimeout(g),g=setTimeout(b,300);else{const S=y(w);S&&J.write(S)}}},_.onclose=()=>{J.write(`\r
114
+ }`)),this.register((0,v.toDisposable)((()=>D.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(D.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=D.createVertexArray(),D.bindVertexArray(this._vertexArrayObject);const M=new Float32Array([0,0,1,0,0,1,1,1]),N=D.createBuffer();this.register((0,v.toDisposable)((()=>D.deleteBuffer(N)))),D.bindBuffer(D.ARRAY_BUFFER,N),D.bufferData(D.ARRAY_BUFFER,M,D.STATIC_DRAW),D.enableVertexAttribArray(3),D.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const X=new Uint8Array([0,1,2,3]),z=D.createBuffer();this.register((0,v.toDisposable)((()=>D.deleteBuffer(z)))),D.bindBuffer(D.ELEMENT_ARRAY_BUFFER,z),D.bufferData(D.ELEMENT_ARRAY_BUFFER,X,D.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(D.createBuffer()),this.register((0,v.toDisposable)((()=>D.deleteBuffer(this._attributesBuffer)))),D.bindBuffer(D.ARRAY_BUFFER,this._attributesBuffer),D.enableVertexAttribArray(0),D.vertexAttribPointer(0,2,D.FLOAT,!1,y,0),D.vertexAttribDivisor(0,1),D.enableVertexAttribArray(1),D.vertexAttribPointer(1,2,D.FLOAT,!1,y,2*Float32Array.BYTES_PER_ELEMENT),D.vertexAttribDivisor(1,1),D.enableVertexAttribArray(2),D.vertexAttribPointer(2,4,D.FLOAT,!1,y,4*Float32Array.BYTES_PER_ELEMENT),D.vertexAttribDivisor(2,1),this._updateCachedColors(T.colors),this.register(this._themeService.onChangeColors((U=>{this._updateCachedColors(U),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(p){const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),C.uniformMatrix4fv(this._projectionLocation,!1,g.PROJECTION_MATRIX),C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,p.attributes,C.DYNAMIC_DRAW),C.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,p.count)}handleResize(){this._updateViewportRectangle()}setDimensions(p){this._dimensions=p}_updateCachedColors(p){this._bgFloat=this._colorToFloat32Array(p.background),this._cursorFloat=this._colorToFloat32Array(p.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(p){const C=this._terminal,L=this._vertices;let T,D,M,N,X,z,U,q,R,H,A,O=1;for(T=0;T<C.rows;T++){for(M=-1,N=0,X=0,z=!1,D=0;D<C.cols;D++)U=(T*C.cols+D)*o.RENDER_MODEL_INDICIES_PER_CELL,q=p.cells[U+o.RENDER_MODEL_BG_OFFSET],R=p.cells[U+o.RENDER_MODEL_FG_OFFSET],H=!!(67108864&R),(q!==N||R!==X&&(z||H))&&((N!==0||z&&X!==0)&&(A=8*O++,this._updateRectangle(L,A,X,N,M,D,T)),M=D,N=q,X=R,z=H);(N!==0||z&&X!==0)&&(A=8*O++,this._updateRectangle(L,A,X,N,M,C.cols,T))}L.count=O}updateCursor(p){const C=this._verticesCursor,L=p.cursor;if(!L||L.style==="block")return void(C.count=0);let T,D=0;L.style!=="bar"&&L.style!=="outline"||(T=8*D++,this._addRectangleFloat(C.attributes,T,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(T=8*D++,this._addRectangleFloat(C.attributes,T,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(T=8*D++,this._addRectangleFloat(C.attributes,T,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),T=8*D++,this._addRectangleFloat(C.attributes,T,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),C.count=D}_updateRectangle(p,C,L,T,D,M,N){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:f=(16777215&L)<<8;break;default:f=this._themeService.colors.foreground.rgba}else switch(50331648&T){case 16777216:case 33554432:f=this._themeService.colors.ansi[255&T].rgba;break;case 50331648:f=(16777215&T)<<8;break;default:f=this._themeService.colors.background.rgba}p.attributes.length<C+4&&(p.attributes=(0,g.expandFloat32Array)(p.attributes,this._terminal.rows*this._terminal.cols*8)),r=D*this._dimensions.device.cell.width,h=N*this._dimensions.device.cell.height,l=(f>>24&255)/255,c=(f>>16&255)/255,m=(f>>8&255)/255,w=1,this._addRectangle(p.attributes,C,r,h,(M-D)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,l,c,m,w)}_addRectangle(p,C,L,T,D,M,N,X,z,U){p[C]=L/this._dimensions.device.canvas.width,p[C+1]=T/this._dimensions.device.canvas.height,p[C+2]=D/this._dimensions.device.canvas.width,p[C+3]=M/this._dimensions.device.canvas.height,p[C+4]=N,p[C+5]=X,p[C+6]=z,p[C+7]=U}_addRectangleFloat(p,C,L,T,D,M,N){p[C]=L/this._dimensions.device.canvas.width,p[C+1]=T/this._dimensions.device.canvas.height,p[C+2]=D/this._dimensions.device.canvas.width,p[C+3]=M/this._dimensions.device.canvas.height,p[C+4]=N[0],p[C+5]=N[1],p[C+6]=N[2],p[C+7]=N[3]}_colorToFloat32Array(p){return new Float32Array([(p.rgba>>24&255)/255,(p.rgba>>16&255)/255,(p.rgba>>8&255)/255,(255&p.rgba)/255])}}a.RectangleRenderer=S},310:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderModel=a.COMBINED_CHAR_BIT_MASK=a.RENDER_MODEL_EXT_OFFSET=a.RENDER_MODEL_FG_OFFSET=a.RENDER_MODEL_BG_OFFSET=a.RENDER_MODEL_INDICIES_PER_CELL=void 0;const _=d(296);a.RENDER_MODEL_INDICIES_PER_CELL=4,a.RENDER_MODEL_BG_OFFSET=1,a.RENDER_MODEL_FG_OFFSET=2,a.RENDER_MODEL_EXT_OFFSET=3,a.COMBINED_CHAR_BIT_MASK=2147483648,a.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,_.createSelectionRenderModel)()}resize(v,o){const g=v*o*a.RENDER_MODEL_INDICIES_PER_CELL;g!==this.cells.length&&(this.cells=new Uint32Array(g),this.lineLengths=new Uint32Array(o))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.JoinedCellData=a.WebglRenderer=void 0;const _=d(820),v=d(274),o=d(627),g=d(457),y=d(56),b=d(374),f=d(345),r=d(859),h=d(147),l=d(782),c=d(855),m=d(965),w=d(742),S=d(310),E=d(733);class p extends r.Disposable{constructor(D,M,N,X,z,U,q,R,H){super(),this._terminal=D,this._characterJoinerService=M,this._charSizeService=N,this._coreBrowserService=X,this._coreService=z,this._decorationService=U,this._optionsService=q,this._themeService=R,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new S.RenderModel,this._workCell=new l.CellData,this._workCell2=new l.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new f.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new f.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new f.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new f.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new v.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new E.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,q,this._themeService)],this.dimensions=(0,b.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(q.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const A={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",A),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextlost",(O=>{console.log("webglcontextlost event received"),O.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(O)}),3e3)}))),this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextrestored",(O=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,o.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((O,$)=>this._setCanvasDevicePixelDimensions(O,$))),this.register(this._coreBrowserService.onWindowChange((O=>{this._observerDisposable.value=(0,y.observeDevicePixelDimensions)(this._canvas,O,(($,V)=>this._setCanvasDevicePixelDimensions($,V)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var O;for(const $ of this._renderLayers)$.dispose();(O=this._canvas.parentElement)==null||O.removeChild(this._canvas),(0,o.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var D;return(D=this._charAtlas)==null?void 0:D.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(D,M){var N,X,z,U;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const q of this._renderLayers)q.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(N=this._rectangleRenderer.value)==null||N.setDimensions(this.dimensions),(X=this._rectangleRenderer.value)==null||X.handleResize(),(z=this._glyphRenderer.value)==null||z.setDimensions(this.dimensions),(U=this._glyphRenderer.value)==null||U.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var D;for(const M of this._renderLayers)M.handleBlur(this._terminal);(D=this._cursorBlinkStateManager.value)==null||D.pause(),this._requestRedrawViewport()}handleFocus(){var D;for(const M of this._renderLayers)M.handleFocus(this._terminal);(D=this._cursorBlinkStateManager.value)==null||D.resume(),this._requestRedrawViewport()}handleSelectionChanged(D,M,N){for(const X of this._renderLayers)X.handleSelectionChanged(this._terminal,D,M,N);this._model.selection.update(this._core,D,M,N),this._requestRedrawViewport()}handleCursorMove(){var D;for(const M of this._renderLayers)M.handleCursorMove(this._terminal);(D=this._cursorBlinkStateManager.value)==null||D.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new w.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new m.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var M;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const D=(0,o.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==D&&(this._onChangeTextureAtlas.fire(D.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,f.forwardEvent)(D.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,f.forwardEvent)(D.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=D,this._charAtlas.warmUp(),(M=this._glyphRenderer.value)==null||M.setAtlas(this._charAtlas)}_clearModel(D){var M;this._model.clear(),D&&((M=this._glyphRenderer.value)==null||M.clear())}clearTextureAtlas(){var D;(D=this._charAtlas)==null||D.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var D;this._clearModel(!0);for(const M of this._renderLayers)M.reset(this._terminal);(D=this._cursorBlinkStateManager.value)==null||D.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(D){return-1}deregisterCharacterJoiner(D){return!1}renderRows(D,M){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const N of this._renderLayers)N.handleGridChanged(this._terminal,D,M);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(D,M),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new g.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(D,M){const N=this._core;let X,z,U,q,R,H,A,O,$,V,he,ue,j,k,ie=this._workCell;D=L(D,N.rows-1,0),M=L(M,N.rows-1,0);const ee=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,de=ee-N.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,N.cols-1);let Ce=-1;const me=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let ze=!1;for(z=D;z<=M;z++)for(U=z+N.buffer.ydisp,q=N.buffer.lines.get(U),this._model.lineLengths[z]=0,R=this._characterJoinerService.getJoinedCharacters(U),j=0;j<N.cols;j++)if(X=this._cellColorResolver.result.bg,q.loadCell(j,ie),j===0&&(X=this._cellColorResolver.result.bg),H=!1,A=j,R.length>0&&j===R[0][0]&&(H=!0,O=R.shift(),ie=new C(ie,q.translateToString(!0,O[0],O[1]),O[1]-O[0]),A=O[1]-1),$=ie.getChars(),V=ie.getCode(),ue=(z*N.cols+j)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(ie,j,U,this.dimensions.device.cell.width),me&&U===ee&&(j===fe&&(this._model.cursor={x:fe,y:de,width:ie.getWidth(),style:this._coreBrowserService.isFocused?N.options.cursorStyle||"block":N.options.cursorInactiveStyle,cursorWidth:N.options.cursorWidth,dpr:this._devicePixelRatio},Ce=fe+ie.getWidth()-1),j>=fe&&j<=Ce&&(this._coreBrowserService.isFocused&&(N.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&N.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),V!==c.NULL_CELL_CODE&&(this._model.lineLengths[z]=j+1),(this._model.cells[ue]!==V||this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(ze=!0,$.length>1&&(V|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[ue]=V,this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,he=ie.getWidth(),this._glyphRenderer.value.updateCell(j,z,V,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,$,he,X),H))for(ie=this._workCell,j++;j<A;j++)k=(z*N.cols+j)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(j,z,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0,0),this._model.cells[k]=c.NULL_CELL_CODE,this._model.cells[k+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[k+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[k+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;ze&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(D,M){this._canvas.width===D&&this._canvas.height===M||(this._canvas.width=D,this._canvas.height=M,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const D=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:D,end:D})}}a.WebglRenderer=p;class C extends h.AttributeData{constructor(D,M,N){super(),this.content=0,this.combinedData="",this.fg=D.fg,this.bg=D.bg,this.combinedData=M,this._width=N}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(D){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(T,D,M=0){return Math.max(Math.min(T,D),M)}a.JoinedCellData=C},381:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GLTexture=a.expandFloat32Array=a.createShader=a.createProgram=a.PROJECTION_MATRIX=void 0;const _=d(374);function v(o,g,y){const b=(0,_.throwIfFalsy)(o.createShader(g));if(o.shaderSource(b,y),o.compileShader(b),o.getShaderParameter(b,o.COMPILE_STATUS))return b;console.error(o.getShaderInfoLog(b)),o.deleteShader(b)}a.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),a.createProgram=function(o,g,y){const b=(0,_.throwIfFalsy)(o.createProgram());if(o.attachShader(b,(0,_.throwIfFalsy)(v(o,o.VERTEX_SHADER,g))),o.attachShader(b,(0,_.throwIfFalsy)(v(o,o.FRAGMENT_SHADER,y))),o.linkProgram(b),o.getProgramParameter(b,o.LINK_STATUS))return b;console.error(o.getProgramInfoLog(b)),o.deleteProgram(b)},a.createShader=v,a.expandFloat32Array=function(o,g){const y=Math.min(2*o.length,g),b=new Float32Array(y);for(let f=0;f<o.length;f++)b[f]=o[f];return b},a.GLTexture=class{constructor(o){this.texture=o,this.version=-1}}},592:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;const _=d(627),v=d(237),o=d(374),g=d(859);class y extends g.Disposable{constructor(f,r,h,l,c,m,w,S){super(),this._container=r,this._alpha=c,this._coreBrowserService=m,this._optionsService=w,this._themeService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=l.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((E=>{this._refreshCharAtlas(f,E),this.reset(f)}))),this.register((0,g.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,o.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(f){}handleFocus(f){}handleCursorMove(f){}handleGridChanged(f,r,h){}handleSelectionChanged(f,r,h,l=!1){}_setTransparency(f,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(f,this._themeService.colors),this.handleGridChanged(f,0,f.rows-1)}_refreshCharAtlas(f,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,_.acquireTextureAtlas)(f,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(f,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(f,this._themeService.colors)}_fillBottomLineAtCells(f,r,h=1){this._ctx.fillRect(f*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(f,r,h,l){this._alpha?this._ctx.clearRect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,l*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,l*this._deviceCellHeight))}_fillCharTrueColor(f,r,h,l){this._ctx.font=this._getFont(f,!1,!1),this._ctx.textBaseline=v.TEXT_BASELINE,this._clipCell(h,l,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,l*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(f,r,h){this._ctx.beginPath(),this._ctx.rect(f*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(f,r,h){return`${h?"italic":""} ${r?f.options.fontWeightBold:f.options.fontWeight} ${f.options.fontSize*this._coreBrowserService.dpr}px ${f.options.fontFamily}`}}a.BaseRenderLayer=y},733:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;const _=d(197),v=d(237),o=d(592);class g extends o.BaseRenderLayer{constructor(b,f,r,h,l,c,m){super(r,b,"link",f,!0,l,c,m),this.register(h.onShowLinkUnderline((w=>this._handleShowLinkUnderline(w)))),this.register(h.onHideLinkUnderline((w=>this._handleHideLinkUnderline(w))))}resize(b,f){super.resize(b,f),this._state=void 0}reset(b){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const b=this._state.y2-this._state.y1-1;b>0&&this._clearCells(0,this._state.y1+1,this._state.cols,b),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(b){if(b.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:b.fg!==void 0&&(0,_.is256Color)(b.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[b.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,b.y1===b.y2)this._fillBottomLineAtCells(b.x1,b.y1,b.x2-b.x1);else{this._fillBottomLineAtCells(b.x1,b.y1,b.cols-b.x1);for(let f=b.y1+1;f<b.y2;f++)this._fillBottomLineAtCells(0,f,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b}_handleHideLinkUnderline(b){this._clearCurrentLink()}}a.LinkRenderLayer=g},820:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(d,_,v,o){d.addEventListener(_,v,o);let g=!1;return{dispose:()=>{g||(g=!0,d.removeEventListener(_,v,o))}}}},274:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellColorResolver=void 0;const _=d(855),v=d(160),o=d(374);let g,y=0,b=0,f=!1,r=!1,h=!1,l=0;a.CellColorResolver=class{constructor(c,m,w,S,E,p){this._terminal=c,this._optionService=m,this._selectionRenderModel=w,this._decorationService=S,this._coreBrowserService=E,this._themeService=p,this.result={fg:0,bg:0,ext:0}}resolve(c,m,w,S){if(this.result.bg=c.bg,this.result.fg=c.fg,this.result.ext=268435456&c.bg?c.extended.ext:0,b=0,y=0,r=!1,f=!1,h=!1,g=this._themeService.colors,l=0,c.getCode()!==_.NULL_CELL_CODE&&c.extended.underlineStyle===4){const E=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));l=m*S%(2*Math.round(E))}if(this._decorationService.forEachDecorationAtCell(m,w,"bottom",(E=>{E.backgroundColorRGB&&(b=E.backgroundColorRGB.rgba>>8&16777215,r=!0),E.foregroundColorRGB&&(y=E.foregroundColorRGB.rgba>>8&16777215,f=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,m,w),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}b=v.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else b=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,g.selectionForeground&&(y=g.selectionForeground.rgba>>8&16777215,f=!0),(0,o.treatGlyphAsBackgroundColor)(c.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)y=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}y=v.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}f=!0}}this._decorationService.forEachDecorationAtCell(m,w,"top",(E=>{E.backgroundColorRGB&&(b=E.backgroundColorRGB.rgba>>8&16777215,r=!0),E.foregroundColorRGB&&(y=E.foregroundColorRGB.rgba>>8&16777215,f=!0)})),r&&(b=h?-16777216&c.bg&-134217729|b|50331648:-16777216&c.bg|b|50331648),f&&(y=-16777216&c.fg&-67108865|y|50331648),67108864&this.result.fg&&(r&&!f&&(y=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,f=!0),!r&&f&&(b=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),g=void 0,this.result.bg=r?b:this.result.bg,this.result.fg=f?y:this.result.fg,this.result.ext&=536870911,this.result.ext|=l<<29&3758096384}}},627:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireTextureAtlas=void 0;const _=d(509),v=d(197),o=[];a.acquireTextureAtlas=function(g,y,b,f,r,h,l,c){const m=(0,v.generateConfig)(f,r,h,l,y,b,c);for(let E=0;E<o.length;E++){const p=o[E],C=p.ownedBy.indexOf(g);if(C>=0){if((0,v.configEquals)(p.config,m))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),o.splice(E,1)):p.ownedBy.splice(C,1);break}}for(let E=0;E<o.length;E++){const p=o[E];if((0,v.configEquals)(p.config,m))return p.ownedBy.push(g),p.atlas}const w=g._core,S={atlas:new _.TextureAtlas(document,m,w.unicodeService),config:m,ownedBy:[g]};return o.push(S),S.atlas},a.removeTerminalFromCache=function(g){for(let y=0;y<o.length;y++){const b=o[y].ownedBy.indexOf(g);if(b!==-1){o[y].ownedBy.length===1?(o[y].atlas.dispose(),o.splice(y,1)):o[y].ownedBy.splice(b,1);break}}}},197:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;const _=d(160);a.generateConfig=function(v,o,g,y,b,f,r){const h={foreground:f.foreground,background:f.background,cursor:_.NULL_COLOR,cursorAccent:_.NULL_COLOR,selectionForeground:_.NULL_COLOR,selectionBackgroundTransparent:_.NULL_COLOR,selectionBackgroundOpaque:_.NULL_COLOR,selectionInactiveBackgroundTransparent:_.NULL_COLOR,selectionInactiveBackgroundOpaque:_.NULL_COLOR,ansi:f.ansi.slice(),contrastCache:f.contrastCache,halfContrastCache:f.halfContrastCache};return{customGlyphs:b.customGlyphs,devicePixelRatio:r,letterSpacing:b.letterSpacing,lineHeight:b.lineHeight,deviceCellWidth:v,deviceCellHeight:o,deviceCharWidth:g,deviceCharHeight:y,fontFamily:b.fontFamily,fontSize:b.fontSize,fontWeight:b.fontWeight,fontWeightBold:b.fontWeightBold,allowTransparency:b.allowTransparency,drawBoldTextInBrightColors:b.drawBoldTextInBrightColors,minimumContrastRatio:b.minimumContrastRatio,colors:h}},a.configEquals=function(v,o){for(let g=0;g<v.colors.ansi.length;g++)if(v.colors.ansi[g].rgba!==o.colors.ansi[g].rgba)return!1;return v.devicePixelRatio===o.devicePixelRatio&&v.customGlyphs===o.customGlyphs&&v.lineHeight===o.lineHeight&&v.letterSpacing===o.letterSpacing&&v.fontFamily===o.fontFamily&&v.fontSize===o.fontSize&&v.fontWeight===o.fontWeight&&v.fontWeightBold===o.fontWeightBold&&v.allowTransparency===o.allowTransparency&&v.deviceCharWidth===o.deviceCharWidth&&v.deviceCharHeight===o.deviceCharHeight&&v.drawBoldTextInBrightColors===o.drawBoldTextInBrightColors&&v.minimumContrastRatio===o.minimumContrastRatio&&v.colors.foreground.rgba===o.colors.foreground.rgba&&v.colors.background.rgba===o.colors.background.rgba},a.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const _=d(399);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},457:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CursorBlinkStateManager=void 0,a.CursorBlinkStateManager=class{constructor(d,_){this._renderCallback=d,this._coreBrowserService=_,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(d=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,_>0)return void this._restartInterval(_)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(_)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),d)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.powerlineDefinitions=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;const _=d(374);a.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const v={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╒":{1:(f,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(f,r)=>`M${.5-f},1 L${.5-f},.5 L1,.5 M${.5+f},.5 L${.5+f},1`},"╔":{1:(f,r)=>`M1,${.5-r} L${.5-f},${.5-r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1`},"╕":{1:(f,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(f,r)=>`M${.5+f},1 L${.5+f},.5 L0,.5 M${.5-f},.5 L${.5-f},1`},"╗":{1:(f,r)=>`M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M0,${.5-r} L${.5+f},${.5-r} L${.5+f},1`},"╘":{1:(f,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(f,r)=>`M1,.5 L${.5-f},.5 L${.5-f},0 M${.5+f},.5 L${.5+f},0`},"╚":{1:(f,r)=>`M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0 M1,${.5+r} L${.5-f},${.5+r} L${.5-f},0`},"╛":{1:(f,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(f,r)=>`M0,.5 L${.5+f},.5 L${.5+f},0 M${.5-f},.5 L${.5-f},0`},"╝":{1:(f,r)=>`M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M0,${.5+r} L${.5+f},${.5+r} L${.5+f},0`},"╞":{1:(f,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1 M${.5+f},.5 L1,.5`},"╠":{1:(f,r)=>`M${.5-f},0 L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╡":{1:(f,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(f,r)=>`M0,.5 L${.5-f},.5 M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╣":{1:(f,r)=>`M${.5+f},0 L${.5+f},1 M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0`},"╤":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},.5 L${.5-f},1 M${.5+f},.5 L${.5+f},1`},"╦":{1:(f,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1`},"╧":{1:(f,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},.5 L${.5-f},0 M${.5+f},.5 L${.5+f},0`},"╩":{1:(f,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╪":{1:(f,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(f,r)=>`M0,.5 L1,.5 M${.5-f},0 L${.5-f},1 M${.5+f},0 L${.5+f},1`},"╬":{1:(f,r)=>`M0,${.5+r} L${.5-f},${.5+r} L${.5-f},1 M1,${.5+r} L${.5+f},${.5+r} L${.5+f},1 M0,${.5-r} L${.5-f},${.5-r} L${.5-f},0 M1,${.5-r} L${.5+f},${.5-r} L${.5+f},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(f,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(f,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(f,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(f,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,1,.5`}},a.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.powerlineDefinitions[""]=a.powerlineDefinitions[""],a.tryDrawCustomChar=function(f,r,h,l,c,m,w,S){const E=a.blockElementDefinitions[r];if(E)return(function(T,D,M,N,X,z){for(let U=0;U<D.length;U++){const q=D[U],R=X/8,H=z/8;T.fillRect(M+q.x*R,N+q.y*H,q.w*R,q.h*H)}})(f,E,h,l,c,m),!0;const p=v[r];if(p)return(function(T,D,M,N,X,z){let U=o.get(D);U||(U=new Map,o.set(D,U));const q=T.fillStyle;if(typeof q!="string")throw new Error(`Unexpected fillStyle type "${q}"`);let R=U.get(q);if(!R){const H=D[0].length,A=D.length,O=T.canvas.ownerDocument.createElement("canvas");O.width=H,O.height=A;const $=(0,_.throwIfFalsy)(O.getContext("2d")),V=new ImageData(H,A);let he,ue,j,k;if(q.startsWith("#"))he=parseInt(q.slice(1,3),16),ue=parseInt(q.slice(3,5),16),j=parseInt(q.slice(5,7),16),k=q.length>7&&parseInt(q.slice(7,9),16)||1;else{if(!q.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${q}" when drawing pattern glyph`);[he,ue,j,k]=q.substring(5,q.length-1).split(",").map((ie=>parseFloat(ie)))}for(let ie=0;ie<A;ie++)for(let ee=0;ee<H;ee++)V.data[4*(ie*H+ee)]=he,V.data[4*(ie*H+ee)+1]=ue,V.data[4*(ie*H+ee)+2]=j,V.data[4*(ie*H+ee)+3]=D[ie][ee]*(255*k);$.putImageData(V,0,0),R=(0,_.throwIfFalsy)(T.createPattern(O,null)),U.set(q,R)}T.fillStyle=R,T.fillRect(M,N,X,z)})(f,p,h,l,c,m),!0;const C=a.boxDrawingDefinitions[r];if(C)return(function(T,D,M,N,X,z,U){T.strokeStyle=T.fillStyle;for(const[q,R]of Object.entries(D)){let H;T.beginPath(),T.lineWidth=U*Number.parseInt(q),H=typeof R=="function"?R(.15,.15/z*X):R;for(const A of H.split(" ")){const O=A[0],$=y[O];if(!$){console.error(`Could not find drawing instructions for "${O}"`);continue}const V=A.substring(1).split(",");V[0]&&V[1]&&$(T,b(V,X,z,M,N,!0,U))}T.stroke(),T.closePath()}})(f,C,h,l,c,m,S),!0;const L=a.powerlineDefinitions[r];return!!L&&((function(T,D,M,N,X,z,U,q){const R=new Path2D;R.rect(M,N,X,z),T.clip(R),T.beginPath();const H=U/12;T.lineWidth=q*H;for(const A of D.d.split(" ")){const O=A[0],$=y[O];if(!$){console.error(`Could not find drawing instructions for "${O}"`);continue}const V=A.substring(1).split(",");V[0]&&V[1]&&$(T,b(V,X,z,M,N,!1,q,(D.leftPadding??0)*(H/2),(D.rightPadding??0)*(H/2)))}D.type===1?(T.strokeStyle=T.fillStyle,T.stroke()):T.fill(),T.closePath()})(f,L,h,l,c,m,w,S),!0)};const o=new Map;function g(f,r,h=0){return Math.max(Math.min(f,r),h)}const y={C:(f,r)=>f.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(f,r)=>f.lineTo(r[0],r[1]),M:(f,r)=>f.moveTo(r[0],r[1])};function b(f,r,h,l,c,m,w,S=0,E=0){const p=f.map((C=>parseFloat(C)||parseInt(C)));if(p.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<p.length;C+=2)p[C]*=r-S*w-E*w,m&&p[C]!==0&&(p[C]=g(Math.round(p[C]+.5)-.5,r,0)),p[C]+=l+S*w;for(let C=1;C<p.length;C+=2)p[C]*=h,m&&p[C]!==0&&(p[C]=g(Math.round(p[C]+.5)-.5,h,0)),p[C]+=c;return p}},56:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.observeDevicePixelDimensions=void 0;const _=d(859);a.observeDevicePixelDimensions=function(v,o,g){let y=new o.ResizeObserver((b=>{const f=b.find((l=>l.target===v));if(!f)return;if(!("devicePixelContentBoxSize"in f))return y==null||y.disconnect(),void(y=void 0);const r=f.devicePixelContentBoxSize[0].inlineSize,h=f.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&g(r,h)}));try{y.observe(v,{box:["device-pixel-content-box"]})}catch{y.disconnect(),y=void 0}return(0,_.toDisposable)((()=>y==null?void 0:y.disconnect()))}},374:(W,a)=>{function d(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},a.isPowerlineGlyph=d,a.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},a.isEmoji=_,a.allowRescaling=function(v,o,g,y){return o===1&&g>Math.ceil(1.5*y)&&v!==void 0&&v>255&&!_(v)&&!d(v)&&!(function(b){return 57344<=b&&b<=63743})(v)},a.treatGlyphAsBackgroundColor=function(v){return d(v)||(function(o){return 9472<=o&&o<=9631})(v)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(v,o,g=0){return(v-(2*Math.round(o)-g))%(2*Math.round(o))}},296:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class d{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(v,o,g,y=!1){if(this.selectionStart=o,this.selectionEnd=g,!o||!g||o[0]===g[0]&&o[1]===g[1])return void this.clear();const b=v.buffers.active.ydisp,f=o[1]-b,r=g[1]-b,h=Math.max(f,0),l=Math.min(r,v.rows-1);h>=v.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=f,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=o[0],this.endCol=g[0])}isCellSelected(v,o,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?o>=this.startCol&&g>=this.viewportCappedStartRow&&o<this.endCol&&g<=this.viewportCappedEndRow:o<this.startCol&&g>=this.viewportCappedStartRow&&o>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&o>=this.startCol&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&o<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&o>=this.startCol)}}a.createSelectionRenderModel=function(){return new d}},509:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TextureAtlas=void 0;const _=d(237),v=d(860),o=d(374),g=d(160),y=d(345),b=d(485),f=d(385),r=d(147),h=d(855),l={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let c;class m{get pages(){return this._pages}constructor(C,L,T){this._document=C,this._config=L,this._unicodeService=T,this._didWarmUp=!1,this._cacheMap=new b.FourKeyMap,this._cacheMapCombined=new b.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new y.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new y.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=E(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,o.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new f.IdleTaskQueue;for(let L=33;L<126;L++)C.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const T=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,T)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const L=this._pages.filter((U=>2*U.canvas.width<=(m.maxTextureSize||4096))).sort(((U,q)=>q.canvas.width!==U.canvas.width?q.canvas.width-U.canvas.width:q.percentageUsed-U.percentageUsed));let T=-1,D=0;for(let U=0;U<L.length;U++)if(L[U].canvas.width!==D)T=U,D=L[U].canvas.width;else if(U-T==3)break;const M=L.slice(T,T+4),N=M.map((U=>U.glyphs[0].texturePage)).sort(((U,q)=>U>q?1:-1)),X=this.pages.length-M.length,z=this._mergePages(M,X);z.version++;for(let U=N.length-1;U>=0;U--)this._deletePage(N[U]);this.pages.push(z),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(z.canvas)}const C=new w(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,L){const T=2*C[0].canvas.width,D=new w(this._document,T,C);for(const[M,N]of C.entries()){const X=M*N.canvas.width%T,z=Math.floor(M/2)*N.canvas.height;D.ctx.drawImage(N.canvas,X,z);for(const q of N.glyphs)q.texturePage=L,q.sizeClipSpace.x=q.size.x/T,q.sizeClipSpace.y=q.size.y/T,q.texturePosition.x+=X,q.texturePosition.y+=z,q.texturePositionClipSpace.x=q.texturePosition.x/T,q.texturePositionClipSpace.y=q.texturePosition.y/T;this._onRemoveTextureAtlasCanvas.fire(N.canvas);const U=this._activePages.indexOf(N);U!==-1&&this._activePages.splice(U,1)}return D}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const T=this._pages[L];for(const D of T.glyphs)D.texturePage--;T.version++}}getRasterizedGlyphCombinedChar(C,L,T,D,M){return this._getFromCacheMap(this._cacheMapCombined,C,L,T,D,M)}getRasterizedGlyph(C,L,T,D,M){return this._getFromCacheMap(this._cacheMap,C,L,T,D,M)}_getFromCacheMap(C,L,T,D,M,N=!1){return c=C.get(L,T,D,M),c||(c=this._drawToCache(L,T,D,M,N),C.set(L,T,D,M,c)),c}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,L,T,D){if(this._config.allowTransparency)return g.NULL_COLOR;let M;switch(C){case 16777216:case 33554432:M=this._getColorFromAnsiIndex(L);break;case 50331648:const N=r.AttributeData.toColorRGB(L);M=g.channels.toColor(N[0],N[1],N[2]);break;default:M=T?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return M}_getForegroundColor(C,L,T,D,M,N,X,z,U,q){const R=this._getMinimumContrastColor(C,L,T,D,M,N,X,U,z,q);if(R)return R;let H;switch(M){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&U&&N<8&&(N+=8),H=this._getColorFromAnsiIndex(N);break;case 50331648:const A=r.AttributeData.toColorRGB(N);H=g.channels.toColor(A[0],A[1],A[2]);break;default:H=X?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=g.color.opaque(H)),z&&(H=g.color.multiplyOpacity(H,_.DIM_OPACITY)),H}_resolveBackgroundRgba(C,L,T){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return T?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,T,D){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&D&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return T?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,T,D,M,N,X,z,U,q){if(this._config.minimumContrastRatio===1||q)return;const R=this._getContrastCache(U),H=R.getColor(C,D);if(H!==void 0)return H||void 0;const A=this._resolveBackgroundRgba(L,T,X),O=this._resolveForegroundRgba(M,N,X,z),$=g.rgba.ensureContrastRatio(A,O,this._config.minimumContrastRatio/(U?2:1));if(!$)return void R.setColor(C,D,null);const V=g.channels.toColor($>>24&255,$>>16&255,$>>8&255);return R.setColor(C,D,V),V}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,T,D,M=!1){const N=typeof C=="number"?String.fromCharCode(C):C,X=Math.min(this._config.deviceCellWidth*Math.max(N.length,2)+4,this._textureSize);this._tmpCanvas.width<X&&(this._tmpCanvas.width=X);const z=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<z&&(this._tmpCanvas.height=z),this._tmpCtx.save(),this._workAttributeData.fg=T,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=D,this._workAttributeData.isInvisible())return l;const U=!!this._workAttributeData.isBold(),q=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),A=!!this._workAttributeData.isUnderline(),O=!!this._workAttributeData.isStrikethrough(),$=!!this._workAttributeData.isOverline();let V=this._workAttributeData.getFgColor(),he=this._workAttributeData.getFgColorMode(),ue=this._workAttributeData.getBgColor(),j=this._workAttributeData.getBgColorMode();if(q){const _e=V;V=ue,ue=_e;const be=he;he=j,j=be}const k=this._getBackgroundColor(j,ue,q,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=k.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ie=U?this._config.fontWeightBold:this._config.fontWeight,ee=H?"italic":"";this._tmpCtx.font=`${ee} ${ie} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=_.TEXT_BASELINE;const de=N.length===1&&(0,o.isPowerlineGlyph)(N.charCodeAt(0)),fe=N.length===1&&(0,o.isRestrictedPowerlineGlyph)(N.charCodeAt(0)),Ce=this._getForegroundColor(L,j,ue,T,he,V,q,R,U,(0,o.treatGlyphAsBackgroundColor)(N.charCodeAt(0)));this._tmpCtx.fillStyle=Ce.css;const me=fe?0:4;let ze=!1;this._config.customGlyphs!==!1&&(ze=(0,v.tryDrawCustomChar)(this._tmpCtx,N,me,me,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Ke,Se=!de;if(Ke=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),A){this._tmpCtx.save();const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),be=_e%2==1?.5:0;if(this._tmpCtx.lineWidth=_e,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())Se=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{Se=!1;let Je=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Je<8&&(Je+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Je).css}this._tmpCtx.beginPath();const Qe=me,Pe=Math.ceil(me+this._config.deviceCharHeight)-be-(M?2*_e:0),Ut=Pe+_e,ot=Pe+2*_e;let bt=this._workAttributeData.getUnderlineVariantOffset();for(let Je=0;Je<Ke;Je++){this._tmpCtx.save();const qe=Qe+Je*this._config.deviceCellWidth,Ae=Qe+(Je+1)*this._config.deviceCellWidth,Vt=qe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Ae,Pe),this._tmpCtx.moveTo(qe,ot),this._tmpCtx.lineTo(Ae,ot);break;case 3:const ht=_e<=1?ot:Math.ceil(me+this._config.deviceCharHeight-_e/2)-be,Mt=_e<=1?Pe:Math.ceil(me+this._config.deviceCharHeight+_e/2)-be,pt=new Path2D;pt.rect(qe,Pe,this._config.deviceCellWidth,ot-Pe),this._tmpCtx.clip(pt),this._tmpCtx.moveTo(qe-this._config.deviceCellWidth/2,Ut),this._tmpCtx.bezierCurveTo(qe-this._config.deviceCellWidth/2,Mt,qe,Mt,qe,Ut),this._tmpCtx.bezierCurveTo(qe,ht,Vt,ht,Vt,Ut),this._tmpCtx.bezierCurveTo(Vt,Mt,Ae,Mt,Ae,Ut),this._tmpCtx.bezierCurveTo(Ae,ht,Ae+this._config.deviceCellWidth/2,ht,Ae+this._config.deviceCellWidth/2,Ut);break;case 4:const ds=bt===0?0:bt>=_e?2*_e-bt:_e-bt;bt>=_e||ds===0?(this._tmpCtx.setLineDash([Math.round(_e),Math.round(_e)]),this._tmpCtx.moveTo(qe+ds,Pe),this._tmpCtx.lineTo(Ae,Pe)):(this._tmpCtx.setLineDash([Math.round(_e),Math.round(_e)]),this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(qe+ds,Pe),this._tmpCtx.moveTo(qe+ds+_e,Pe),this._tmpCtx.lineTo(Ae,Pe)),bt=(0,o.computeNextVariantOffset)(Ae-qe,_e,bt);break;case 5:const ha=.6,ua=.3,wi=Ae-qe,Yi=Math.floor(ha*wi),Vi=Math.floor(ua*wi),ri=wi-Yi-Vi;this._tmpCtx.setLineDash([Yi,Vi,ri]),this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Ae,Pe);break;default:this._tmpCtx.moveTo(qe,Pe),this._tmpCtx.lineTo(Ae,Pe)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!ze&&this._config.fontSize>=12&&!this._config.allowTransparency&&N!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Je=this._tmpCtx.measureText(N);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Je&&Je.actualBoundingBoxDescent>0){this._tmpCtx.save();const qe=new Path2D;qe.rect(Qe,Pe-Math.ceil(_e/2),this._config.deviceCellWidth*Ke,ot-Pe+Math.ceil(_e/2)),this._tmpCtx.clip(qe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=k.css,this._tmpCtx.strokeText(N,me,me+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if($){const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),be=_e%2==1?.5:0;this._tmpCtx.lineWidth=_e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(me,me+be),this._tmpCtx.lineTo(me+this._config.deviceCharWidth*Ke,me+be),this._tmpCtx.stroke()}if(ze||this._tmpCtx.fillText(N,me,me+this._config.deviceCharHeight),N==="_"&&!this._config.allowTransparency){let _e=S(this._tmpCtx.getImageData(me,me,this._config.deviceCellWidth,this._config.deviceCellHeight),k,Ce,Se);if(_e)for(let be=1;be<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=k.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(N,me,me+this._config.deviceCharHeight-be),_e=S(this._tmpCtx.getImageData(me,me,this._config.deviceCellWidth,this._config.deviceCellHeight),k,Ce,Se),_e);be++);}if(O){const _e=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),be=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=_e,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(me,me+Math.floor(this._config.deviceCharHeight/2)-be),this._tmpCtx.lineTo(me+this._config.deviceCharWidth*Ke,me+Math.floor(this._config.deviceCharHeight/2)-be),this._tmpCtx.stroke()}this._tmpCtx.restore();const Dt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Jt;if(Jt=this._config.allowTransparency?(function(_e){for(let be=0;be<_e.data.length;be+=4)if(_e.data[be+3]>0)return!1;return!0})(Dt):S(Dt,k,Ce,Se),Jt)return l;const Te=this._findGlyphBoundingBox(Dt,this._workBoundingBox,X,fe,ze,me);let Le,Re;for(;;){if(this._activePages.length===0){const _e=this._createNewPage();Le=_e,Re=_e.currentRow,Re.height=Te.size.y;break}Le=this._activePages[this._activePages.length-1],Re=Le.currentRow;for(const _e of this._activePages)Te.size.y<=_e.currentRow.height&&(Le=_e,Re=_e.currentRow);for(let _e=this._activePages.length-1;_e>=0;_e--)for(const be of this._activePages[_e].fixedRows)be.height<=Re.height&&Te.size.y<=be.height&&(Le=this._activePages[_e],Re=be);if(Re.y+Te.size.y>=Le.canvas.height||Re.height>Te.size.y+2){let _e=!1;if(Le.currentRow.y+Le.currentRow.height+Te.size.y>=Le.canvas.height){let be;for(const Qe of this._activePages)if(Qe.currentRow.y+Qe.currentRow.height+Te.size.y<Qe.canvas.height){be=Qe;break}if(be)Le=be;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&Re.y+Te.size.y<=Le.canvas.height&&Re.height>=Te.size.y&&Re.x+Te.size.x<=Le.canvas.width)_e=!0;else{const Qe=this._createNewPage();Le=Qe,Re=Qe.currentRow,Re.height=Te.size.y,_e=!0}}_e||(Le.currentRow.height>0&&Le.fixedRows.push(Le.currentRow),Re={x:0,y:Le.currentRow.y+Le.currentRow.height,height:Te.size.y},Le.fixedRows.push(Re),Le.currentRow={x:0,y:Re.y+Re.height,height:0})}if(Re.x+Te.size.x<=Le.canvas.width)break;Re===Le.currentRow?(Re.x=0,Re.y+=Re.height,Re.height=0):Le.fixedRows.splice(Le.fixedRows.indexOf(Re),1)}return Te.texturePage=this._pages.indexOf(Le),Te.texturePosition.x=Re.x,Te.texturePosition.y=Re.y,Te.texturePositionClipSpace.x=Re.x/Le.canvas.width,Te.texturePositionClipSpace.y=Re.y/Le.canvas.height,Te.sizeClipSpace.x/=Le.canvas.width,Te.sizeClipSpace.y/=Le.canvas.height,Re.height=Math.max(Re.height,Te.size.y),Re.x+=Te.size.x,Le.ctx.putImageData(Dt,Te.texturePosition.x-this._workBoundingBox.left,Te.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Te.size.x,Te.size.y),Le.addGlyph(Te),Le.version++,Te}_findGlyphBoundingBox(C,L,T,D,M,N){L.top=0;const X=D?this._config.deviceCellHeight:this._tmpCanvas.height,z=D?this._config.deviceCellWidth:T;let U=!1;for(let q=0;q<X;q++){for(let R=0;R<z;R++){const H=q*this._tmpCanvas.width*4+4*R+3;if(C.data[H]!==0){L.top=q,U=!0;break}}if(U)break}L.left=0,U=!1;for(let q=0;q<N+z;q++){for(let R=0;R<X;R++){const H=R*this._tmpCanvas.width*4+4*q+3;if(C.data[H]!==0){L.left=q,U=!0;break}}if(U)break}L.right=z,U=!1;for(let q=N+z-1;q>=N;q--){for(let R=0;R<X;R++){const H=R*this._tmpCanvas.width*4+4*q+3;if(C.data[H]!==0){L.right=q,U=!0;break}}if(U)break}L.bottom=X,U=!1;for(let q=X-1;q>=0;q--){for(let R=0;R<z;R++){const H=q*this._tmpCanvas.width*4+4*R+3;if(C.data[H]!==0){L.bottom=q,U=!0;break}}if(U)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+N+(D||M?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+N+(D||M?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}a.TextureAtlas=m;class w{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,L,T){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],T)for(const D of T)this._glyphs.push(...D.glyphs),this._usedPixels+=D._usedPixels;this.canvas=E(C,L,L),this.ctx=(0,o.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function S(p,C,L,T){const D=C.rgba>>>24,M=C.rgba>>>16&255,N=C.rgba>>>8&255,X=L.rgba>>>24,z=L.rgba>>>16&255,U=L.rgba>>>8&255,q=Math.floor((Math.abs(D-X)+Math.abs(M-z)+Math.abs(N-U))/12);let R=!0;for(let H=0;H<p.data.length;H+=4)p.data[H]===D&&p.data[H+1]===M&&p.data[H+2]===N||T&&Math.abs(p.data[H]-D)+Math.abs(p.data[H+1]-M)+Math.abs(p.data[H+2]-N)<q?p.data[H+3]=0:R=!1;return R}function E(p,C,L){const T=p.createElement("canvas");return T.width=C,T.height=L,T}},160:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let d=0,_=0,v=0,o=0;var g,y,b,f,r;function h(c){const m=c.toString(16);return m.length<2?"0"+m:m}function l(c,m){return c<m?(m+.05)/(c+.05):(c+.05)/(m+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(m,w,S,E){return E!==void 0?`#${h(m)}${h(w)}${h(S)}${h(E)}`:`#${h(m)}${h(w)}${h(S)}`},c.toRgba=function(m,w,S,E=255){return(m<<24|w<<16|S<<8|E)>>>0},c.toColor=function(m,w,S,E){return{css:c.toCss(m,w,S,E),rgba:c.toRgba(m,w,S,E)}}})(g||(a.channels=g={})),(function(c){function m(w,S){return o=Math.round(255*S),[d,_,v]=r.toChannels(w.rgba),{css:g.toCss(d,_,v,o),rgba:g.toRgba(d,_,v,o)}}c.blend=function(w,S){if(o=(255&S.rgba)/255,o===1)return{css:S.css,rgba:S.rgba};const E=S.rgba>>24&255,p=S.rgba>>16&255,C=S.rgba>>8&255,L=w.rgba>>24&255,T=w.rgba>>16&255,D=w.rgba>>8&255;return d=L+Math.round((E-L)*o),_=T+Math.round((p-T)*o),v=D+Math.round((C-D)*o),{css:g.toCss(d,_,v),rgba:g.toRgba(d,_,v)}},c.isOpaque=function(w){return(255&w.rgba)==255},c.ensureContrastRatio=function(w,S,E){const p=r.ensureContrastRatio(w.rgba,S.rgba,E);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(w){const S=(255|w.rgba)>>>0;return[d,_,v]=r.toChannels(S),{css:g.toCss(d,_,v),rgba:S}},c.opacity=m,c.multiplyOpacity=function(w,S){return o=255&w.rgba,m(w,o*S/255)},c.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}})(y||(a.color=y={})),(function(c){let m,w;try{const S=document.createElement("canvas");S.width=1,S.height=1;const E=S.getContext("2d",{willReadFrequently:!0});E&&(m=E,m.globalCompositeOperation="copy",w=m.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),g.toColor(d,_,v);case 5:return d=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),o=parseInt(S.slice(4,5).repeat(2),16),g.toColor(d,_,v,o);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const E=S.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return d=parseInt(E[1]),_=parseInt(E[2]),v=parseInt(E[3]),o=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),g.toColor(d,_,v,o);if(!m||!w)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=w,m.fillStyle=S,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[d,_,v,o]=m.getImageData(0,0,1,1).data,o!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(d,_,v,o),css:S}}})(b||(a.css=b={})),(function(c){function m(w,S,E){const p=w/255,C=S/255,L=E/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(w){return m(w>>16&255,w>>8&255,255&w)},c.relativeLuminance2=m})(f||(a.rgb=f={})),(function(c){function m(S,E,p){const C=S>>24&255,L=S>>16&255,T=S>>8&255;let D=E>>24&255,M=E>>16&255,N=E>>8&255,X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));for(;X<p&&(D>0||M>0||N>0);)D-=Math.max(0,Math.ceil(.1*D)),M-=Math.max(0,Math.ceil(.1*M)),N-=Math.max(0,Math.ceil(.1*N)),X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));return(D<<24|M<<16|N<<8|255)>>>0}function w(S,E,p){const C=S>>24&255,L=S>>16&255,T=S>>8&255;let D=E>>24&255,M=E>>16&255,N=E>>8&255,X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));for(;X<p&&(D<255||M<255||N<255);)D=Math.min(255,D+Math.ceil(.1*(255-D))),M=Math.min(255,M+Math.ceil(.1*(255-M))),N=Math.min(255,N+Math.ceil(.1*(255-N))),X=l(f.relativeLuminance2(D,M,N),f.relativeLuminance2(C,L,T));return(D<<24|M<<16|N<<8|255)>>>0}c.blend=function(S,E){if(o=(255&E)/255,o===1)return E;const p=E>>24&255,C=E>>16&255,L=E>>8&255,T=S>>24&255,D=S>>16&255,M=S>>8&255;return d=T+Math.round((p-T)*o),_=D+Math.round((C-D)*o),v=M+Math.round((L-M)*o),g.toRgba(d,_,v)},c.ensureContrastRatio=function(S,E,p){const C=f.relativeLuminance(S>>8),L=f.relativeLuminance(E>>8);if(l(C,L)<p){if(L<C){const M=m(S,E,p),N=l(C,f.relativeLuminance(M>>8));if(N<p){const X=w(S,E,p);return N>l(C,f.relativeLuminance(X>>8))?M:X}return M}const T=w(S,E,p),D=l(C,f.relativeLuminance(T>>8));if(D<p){const M=m(S,E,p);return D>l(C,f.relativeLuminance(M>>8))?T:M}return T}},c.reduceLuminance=m,c.increaseLuminance=w,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(a.rgba=r={})),a.toPaddedHex=h,a.contrastRatio=l},345:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=d=>(this._listeners.push(d),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===d)return void this._listeners.splice(_,1)}}})),this._event}fire(d,_){const v=[];for(let o=0;o<this._listeners.length;o++)v.push(this._listeners[o]);for(let o=0;o<v.length;o++)v[o].call(void 0,d,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(d,_){return d((v=>_.fire(v)))},a.runAndSubscribe=function(d,_){return _(void 0),d((v=>_(v)))}},859:(W,a)=>{function d(_){for(const v of _)v.dispose();_.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},a.toDisposable=function(_){return{dispose:_}},a.disposeArray=d,a.getDisposeArrayDisposable=function(_){return{dispose:()=>d(_)}}},485:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class d{constructor(){this._data={}}set(v,o,g){this._data[v]||(this._data[v]={}),this._data[v][o]=g}get(v,o){return this._data[v]?this._data[v][o]:void 0}clear(){this._data={}}}a.TwoKeyMap=d,a.FourKeyMap=class{constructor(){this._data=new d}set(_,v,o,g,y){this._data.get(_,v)||this._data.set(_,v,new d),this._data.get(_,v).set(o,g,y)}get(_,v,o,g){var y;return(y=this._data.get(_,v))==null?void 0:y.get(o,g)}clear(){this._data.clear()}}},399:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const d=a.isNode?"node":navigator.userAgent,_=a.isNode?"node":navigator.platform;a.isFirefox=d.includes("Firefox"),a.isLegacyEdge=d.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(d),a.getSafariVersion=function(){if(!a.isSafari)return 0;const v=d.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),a.isIpad=_==="iPad",a.isIphone=_==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),a.isLinux=_.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(d)},385:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const _=d(399);class v{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 b=0,f=0,r=y.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(b=Date.now(),this._tasks[this._i]()||this._i++,b=Math.max(1,Date.now()-b),f=Math.max(b,f),h=y.timeRemaining(),1.5*f>h)return r-b<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-b))}ms`),void this._start();r=h}this.clear()}}class o extends v{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const b=Date.now()+y;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}a.PriorityTaskQueue=o,a.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:o,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},147:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class d{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(o){return[o>>>16&255,o>>>8&255,255&o]}static fromColorRGB(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]}clone(){const o=new d;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=d;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(o){this._ext=o}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(o){this._ext&=-469762049,this._ext|=o<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(o){this._ext&=-67108864,this._ext|=67108863&o}get urlId(){return this._urlId}set urlId(o){this._urlId=o}get underlineVariantOffset(){const o=(3758096384&this._ext)>>29;return o<0?4294967288^o:o}set underlineVariantOffset(o){this._ext&=536870911,this._ext|=o<<29&3758096384}constructor(o=0,g=0){this._ext=0,this._urlId=0,this._ext=o,this._urlId=g}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=_},782:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const _=d(133),v=d(855),o=d(147);class g extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(b){const f=new g;return f.setFromCharData(b),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(b){this.fg=b[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(b[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(b[v.CHAR_DATA_CHAR_INDEX].length===2){const r=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|b[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=b[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=b[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|b[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=g},855:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},133:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},a.utf32ToString=function(d,_=0,v=d.length){let o="";for(let g=_;g<v;++g){let y=d[g];y>65535?(y-=65536,o+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):o+=String.fromCharCode(y)}return o},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(d,_){const v=d.length;if(!v)return 0;let o=0,g=0;if(this._interim){const y=d.charCodeAt(g++);56320<=y&&y<=57343?_[o++]=1024*(this._interim-55296)+y-56320+65536:(_[o++]=this._interim,_[o++]=y),this._interim=0}for(let y=g;y<v;++y){const b=d.charCodeAt(y);if(55296<=b&&b<=56319){if(++y>=v)return this._interim=b,o;const f=d.charCodeAt(y);56320<=f&&f<=57343?_[o++]=1024*(b-55296)+f-56320+65536:(_[o++]=b,_[o++]=f)}else b!==65279&&(_[o++]=b)}return o}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(d,_){const v=d.length;if(!v)return 0;let o,g,y,b,f=0,r=0,h=0;if(this.interim[0]){let m=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let S,E=0;for(;(S=63&this.interim[++E])&&E<4;)w<<=6,w|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=p-E;for(;h<C;){if(h>=v)return 0;if(S=d[h++],(192&S)!=128){h--,m=!0;break}this.interim[E++]=S,w<<=6,w|=63&S}m||(p===2?w<128?h--:_[f++]=w:p===3?w<2048||w>=55296&&w<=57343||w===65279||(_[f++]=w):w<65536||w>1114111||(_[f++]=w)),this.interim.fill(0)}const l=v-4;let c=h;for(;c<v;){for(;!(!(c<l)||128&(o=d[c])||128&(g=d[c+1])||128&(y=d[c+2])||128&(b=d[c+3]));)_[f++]=o,_[f++]=g,_[f++]=y,_[f++]=b,c+=4;if(o=d[c++],o<128)_[f++]=o;else if((224&o)==192){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(r=(31&o)<<6|63&g,r<128){c--;continue}_[f++]=r}else if((240&o)==224){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,f;if(y=d[c++],(192&y)!=128){c--;continue}if(r=(15&o)<<12|(63&g)<<6|63&y,r<2048||r>=55296&&r<=57343||r===65279)continue;_[f++]=r}else if((248&o)==240){if(c>=v)return this.interim[0]=o,f;if(g=d[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,f;if(y=d[c++],(192&y)!=128){c--;continue}if(c>=v)return this.interim[0]=o,this.interim[1]=g,this.interim[2]=y,f;if(b=d[c++],(192&b)!=128){c--;continue}if(r=(7&o)<<18|(63&g)<<12|(63&y)<<6|63&b,r<65536||r>1114111)continue;_[f++]=r}}return f}}},776:function(W,a,d){var _=this&&this.__decorate||function(r,h,l,c){var m,w=arguments.length,S=w<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,l,c);else for(var E=r.length-1;E>=0;E--)(m=r[E])&&(S=(w<3?m(S):w>3?m(h,l,S):m(h,l))||S);return w>3&&S&&Object.defineProperty(h,l,S),S},v=this&&this.__param||function(r,h){return function(l,c){h(l,c,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const o=d(859),g=d(97),y={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let b,f=a.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),b=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,l){this._evalLazyOptionalParams(l),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(r,...h){var l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var l;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var l;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,r,h)}};a.LogService=f=_([v(0,g.IOptionsService)],f),a.setTraceLogger=function(r){b=r},a.traceCall=function(r,h,l){if(typeof l.value!="function")throw new Error("not supported");const c=l.value;l.value=function(...m){if(b.logLevel!==g.LogLevelEnum.TRACE)return c.apply(this,m);b.trace(`GlyphRenderer#${c.name}(${m.map((S=>JSON.stringify(S))).join(", ")})`);const w=c.apply(this,m);return b.trace(`GlyphRenderer#${c.name} return`,w),w}}},726:(W,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const d="di$target",_="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(v){return v[_]||[]},a.createDecorator=function(v){if(a.serviceRegistry.has(v))return a.serviceRegistry.get(v);const o=function(g,y,b){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,r,h){r[d]===r?r[_].push({id:f,index:h}):(r[_]=[{id:f,index:h}],r[d]=r)})(o,g,b)};return o.toString=()=>v,a.serviceRegistry.set(v,o),o}},97:(W,a,d)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const _=d(726);var v;a.IBufferService=(0,_.createDecorator)("BufferService"),a.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),a.ICoreService=(0,_.createDecorator)("CoreService"),a.ICharsetService=(0,_.createDecorator)("CharsetService"),a.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(o){o[o.TRACE=0]="TRACE",o[o.DEBUG=1]="DEBUG",o[o.INFO=2]="INFO",o[o.WARN=3]="WARN",o[o.ERROR=4]="ERROR",o[o.OFF=5]="OFF"})(v||(a.LogLevelEnum=v={})),a.ILogService=(0,_.createDecorator)("LogService"),a.IOptionsService=(0,_.createDecorator)("OptionsService"),a.IOscLinkService=(0,_.createDecorator)("OscLinkService"),a.IUnicodeService=(0,_.createDecorator)("UnicodeService"),a.IDecorationService=(0,_.createDecorator)("DecorationService")}},I={};function re(W){var a=I[W];if(a!==void 0)return a.exports;var d=I[W]={exports:{}};return ne[W].call(d.exports,d,d.exports,re),d.exports}var J={};return(()=>{var W=J;Object.defineProperty(W,"__esModule",{value:!0}),W.WebglAddon=void 0;const a=re(345),d=re(859),_=re(399),v=re(666),o=re(776);class g extends d.Disposable{constructor(b){if(_.isSafari&&(0,_.getSafariVersion)()<16){const f={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",f))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=b,this._onChangeTextureAtlas=this.register(new a.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new a.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new a.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new a.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(b){const f=b._core;if(!b.element)return void this.register(f.onWillOpen((()=>this.activate(b))));this._terminal=b;const r=f.coreService,h=f.optionsService,l=f,c=l._renderService,m=l._characterJoinerService,w=l._charSizeService,S=l._coreBrowserService,E=l._decorationService,p=l._logService,C=l._themeService;(0,o.setTraceLogger)(p),this._renderer=this.register(new v.WebglRenderer(b,m,w,S,r,E,h,C,this._preserveDrawingBuffer)),this.register((0,a.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,a.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,a.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,a.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),c.setRenderer(this._renderer),this.register((0,d.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(b.cols,b.rows)})))}get textureAtlas(){var b;return(b=this._renderer)==null?void 0:b.textureAtlas}clearTextureAtlas(){var b;(b=this._renderer)==null||b.clearTextureAtlas()}}W.WebglAddon=g})(),J})()))})(Oo)),Oo.exports}var qv=Pv();const Gv=0,Jf=1;function Wv({wsPath:P}){const ae=He.useRef(null),ne=He.useRef(null),I=He.useRef(null),re=He.useRef(null);return He.useEffect(()=>{if(!ae.current)return;const J=new jv.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0});ne.current=J;const W=new Fv.FitAddon;re.current=W,J.loadAddon(W),J.open(ae.current);try{const h=new qv.WebglAddon;h.onContextLoss(()=>{h.dispose()}),J.loadAddon(h)}catch{}W.fit();const d=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${P}`,_=new WebSocket(d);_.binaryType="arraybuffer",I.current=_;let v="",o=!0,g=null;const y=h=>(h=h.replace(/\x1b\[[\?>][\d;]*c/g,""),h=h.replace(/\[[\?>][\d;]*c/g,""),h),b=()=>{if(o=!1,v){const h=y(v);h&&J.write(h),v=""}};_.onopen=()=>{Vf(_,"resize",{cols:J.cols,rows:J.rows})},_.onmessage=h=>{const l=new Uint8Array(h.data);if(l.length===0)return;const c=l[0],m=l.subarray(1);if(c===Jf){const w=new TextDecoder().decode(m);if(o)v+=w,g&&clearTimeout(g),g=setTimeout(b,300);else{const S=y(w);S&&J.write(S)}}},_.onclose=()=>{J.write(`\r
115
115
  \x1B[90m[Terminal disconnected]\x1B[0m\r
116
116
  `)},_.onerror=()=>{J.write(`\r
117
117
  \x1B[31m[WebSocket error]\x1B[0m\r
118
- `)},J.onData(h=>{_.readyState===WebSocket.OPEN&&$v(_,h)}),J.onResize(({cols:h,rows:l})=>{_.readyState===WebSocket.OPEN&&Vf(_,"resize",{cols:h,rows:l})});const f=()=>W.fit(),r=new ResizeObserver(f);return r.observe(ae.current),()=>{g&&clearTimeout(g),r.disconnect(),_.close(),J.dispose(),ne.current=null,I.current=null,re.current=null}},[q]),te.jsx("div",{ref:ae,className:"terminal-container",style:{width:"100%",height:"100%",backgroundColor:"#1a1a1a"}})}function $v(q,ae){const ne=new TextEncoder().encode(ae),I=new Uint8Array(1+ne.length);I[0]=Jf,I.set(ne,1),q.send(I.buffer)}function Vf(q,ae,ne){const I=JSON.stringify({type:ae,payload:ne}),re=new TextEncoder().encode(I),J=new Uint8Array(1+re.length);J[0]=Gv,J.set(re,1),q.send(J.buffer)}function ed({entry:q,expanded:ae,onToggle:ne,onOpen:I,depth:re=0}){var a;const J=q.type==="directory",W=ae.has(q.path);return te.jsxs(te.Fragment,{children:[te.jsxs("div",{className:`file-node ${J?"directory":"file"}`,style:{paddingLeft:`${re*16+8}px`},onClick:()=>J?ne(q.path):I(q.path),role:"treeitem","aria-expanded":J?W:void 0,tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),J?ne(q.path):I(q.path))},children:[te.jsx("span",{className:"file-icon",children:J?W?"📂":"📁":"📄"}),te.jsx("span",{className:"file-name",children:q.name})]}),J&&W&&((a=q.children)==null?void 0:a.map(d=>te.jsx(ed,{entry:d,expanded:ae,onToggle:ne,onOpen:I,depth:re+1},d.path)))]})}function Xv({onRefresh:q}){const[ae,ne]=ze.useState([]),[I,re]=ze.useState(new Set),[J,W]=ze.useState(null),[a,d]=ze.useState(!1),_=ze.useCallback(async()=>{try{const g=await Tv();ne(g),W(null),d(!0)}catch(g){W(g.message)}},[]);ze.useEffect(()=>{a||_()},[a,_]);const v=g=>{re(y=>{const b=new Set(y);return b.has(g)?b.delete(g):b.add(g),b})},o=async g=>{try{await Dv(g),q()}catch(y){console.error("Failed to open file:",y)}};return J?te.jsxs("div",{className:"file-tree-error",children:["Error: ",J]}):a?te.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:ae.map(g=>te.jsx(ed,{entry:g,expanded:I,onToggle:v,onOpen:o},g.path))}):te.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function ko({title:q,className:ae,defaultOpen:ne=!0,actions:I,children:re}){const[J,W]=ze.useState(ne);return te.jsxs("div",{className:`dashboard-section${J?"":" collapsed"}${ae?" "+ae:""}`,children:[te.jsxs("div",{className:"dashboard-section-header",onClick:()=>W(!J),children:[te.jsxs("h3",{children:[te.jsx("span",{className:"collapse-icon",children:"▼"})," ",q]}),I&&te.jsx("div",{className:"header-actions",onClick:a=>a.stopPropagation(),children:I})]}),J&&te.jsx("div",{className:"dashboard-section-content",children:re})]})}function Yv(q){const ae={},ne=q.split(`
119
- `);for(const I of ne){const re=I.match(/^\s*-?\s*(\w+):\s*(.*)$/);if(!re)continue;const[,J,W]=re;let a=W.trim();if((a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1)),J==="files"){ae.files={};continue}if(J==="spec"||J==="plan"||J==="review"){ae.files||(ae.files={}),ae.files[J]=a==="null"?null:a;continue}if(J==="timestamps"){ae.timestamps={};continue}if(["conceived_at","specified_at","planned_at","implementing_at","implemented_at","committed_at","integrated_at"].includes(J)){ae.timestamps||(ae.timestamps={}),ae.timestamps[J]=a==="null"?null:a;continue}if(J==="dependencies"||J==="tags"||J==="ticks"){if(a.startsWith("[")&&a.endsWith("]")){const _=a.slice(1,-1).trim();ae[J]=_===""?[]:_.split(",").map(v=>v.trim().replace(/^["']|["']$/g,""))}else ae[J]=[];continue}a!=="null"&&(ae[J]=a)}return ae}const Vv=new Set(["conceived","specified","planned","implementing","implemented","committed","integrated","abandoned","on-hold"]);function Kv(q){return!(!q.id||q.id==="NNNN"||!/^\d{4}$/.test(q.id)||!q.status||!Vv.has(q.status)||!q.title||q.tags&&q.tags.includes("example"))}function Qv(q){const ae=[],ne=/```yaml\n([\s\S]*?)```/g;let I;for(;(I=ne.exec(q))!==null;){const J=I[1].split(/\n(?=\s*- id:)/);for(const W of J){if(!W.trim()||!W.includes("id:"))continue;const a=Yv(W);a&&Kv(a)&&ae.push(a)}}return ae}const zo=["conceived","specified","planned","implementing","implemented","committed","integrated"],Zv=["CONC'D","SPEC'D","PLANNED","IMPL'ING","IMPL'D","CMTD","INTGR'D"],Jv=new Set(["conceived","specified","planned","implementing","implemented","committed"]),td=new Set(["abandoned","on-hold"]);function No(q){var I;if(q.status!=="integrated")return!1;const ae=(I=q.timestamps)==null?void 0:I.integrated_at;if(!ae)return!1;const ne=new Date(ae);return isNaN(ne.getTime())?!1:(Date.now()-ne.getTime())/(1e3*60*60)<=72}function ca(q){const ae=zo.indexOf(q);return ae>=0?ae:-1}function Kf(q,ae){var ne,I,re;switch(ae){case"specified":return(ne=q.files)!=null&&ne.spec?{label:"Spec",link:q.files.spec}:{label:"",link:null};case"planned":return(I=q.files)!=null&&I.plan?{label:"Plan",link:q.files.plan}:{label:"",link:null};case"implemented":return(re=q.files)!=null&&re.review?{label:"Revw",link:q.files.review}:{label:"",link:null};case"committed":{if(q.notes){const J=q.notes.match(/PR\s*#?(\d+)/i);if(J)return{label:"PR",link:`https://github.com/cluesmith/codev/pull/${J[1]}`,external:!0}}return{label:"",link:null}}default:return{label:"",link:null}}}function eg({project:q,stage:ae}){const ne=ca(q.status),I=ca(ae);if(I<ne){const re=Kf(q,ae);return te.jsxs("td",{className:"project-stage",children:[te.jsx("span",{className:"checkmark",children:"✓"}),re.label&&re.link&&(re.external?te.jsxs(te.Fragment,{children:[" ",te.jsx("a",{href:re.link,target:"_blank",rel:"noreferrer",children:re.label})]}):te.jsxs(te.Fragment,{children:[" ",te.jsx("a",{href:"#",onClick:J=>{J.preventDefault(),Zs(re.link)},children:re.label})]}))]})}if(I===ne){if(ae==="integrated"&&No(q))return te.jsx("td",{className:"project-stage",children:te.jsx("span",{className:"celebration",children:"🎉"})});const re=Kf(q,ae);return te.jsxs("td",{className:"project-stage",children:[te.jsx("span",{className:"current-indicator"}),re.label&&re.link&&(re.external?te.jsxs(te.Fragment,{children:[" ",te.jsx("a",{href:re.link,target:"_blank",rel:"noreferrer",children:re.label})]}):te.jsxs(te.Fragment,{children:[" ",te.jsx("a",{href:"#",onClick:J=>{J.preventDefault(),Zs(re.link)},children:re.label})]}))]})}return te.jsx("td",{className:"project-stage"})}async function Zs(q){try{const ae=$r();await fetch(`${ae}api/tabs/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:q})})}catch{}}function tg({project:q}){const ae=td.has(q.status);return te.jsxs("tr",{className:`project-row status-${q.status}`,children:[te.jsxs("td",{className:"project-cell",children:[te.jsx("span",{className:"project-id",children:q.id}),te.jsxs("span",{className:"project-title",children:[q.title,ae&&te.jsxs("span",{className:"project-terminal-status",children:[" (",q.status,")"]})]})]}),ae?zo.map(ne=>te.jsx("td",{className:"project-stage"},ne)):zo.map(ne=>te.jsx(eg,{project:q,stage:ne},ne))]})}function Ho({projects:q}){return q.length===0?te.jsx("p",{style:{color:"var(--text-muted)",textAlign:"center",padding:20},children:"No projects"}):te.jsxs("table",{className:"project-table",children:[te.jsx("thead",{children:te.jsxs("tr",{children:[te.jsx("th",{style:{textAlign:"left"},children:"Project"}),Zv.map(ae=>te.jsx("th",{className:"stage-header",children:ae},ae))]})}),te.jsx("tbody",{children:q.map(ae=>te.jsx(tg,{project:ae},ae.id))})]})}function ig({projects:q}){const ae=q.filter(re=>Jv.has(re.status)||No(re));ae.sort((re,J)=>{const W=ca(re.status),a=ca(J.status);return a!==W?a-W:re.id.localeCompare(J.id)});const ne=q.filter(re=>re.status==="integrated"&&!No(re)),I=q.filter(re=>td.has(re.status));return te.jsxs(te.Fragment,{children:[(ae.length>0||ne.length===0)&&te.jsxs("details",{className:"project-section",open:!0,children:[te.jsxs("summary",{children:["Active ",te.jsxs("span",{className:"section-count",children:["(",ae.length,")"]})]}),te.jsx(Ho,{projects:ae})]}),ne.length>0&&te.jsxs("details",{className:"project-section",children:[te.jsxs("summary",{children:["Completed ",te.jsxs("span",{className:"section-count",children:["(",ne.length,")"]})]}),te.jsx(Ho,{projects:ne})]}),I.length>0&&te.jsxs("details",{className:"project-section",children:[te.jsxs("summary",{children:["Terminal ",te.jsxs("span",{className:"section-count",children:["(",I.length,")"]})]}),te.jsx(Ho,{projects:I})]})]})}function sg({state:q,onRefresh:ae,onSelectTab:ne}){const[I,re]=ze.useState([]),[J,W]=ze.useState(null);if(ze.useEffect(()=>{let o="";const g=()=>{const b=$r();fetch(`${b}file?path=codev/projectlist.md`).then(async f=>{if(!f.ok){if(f.status===404){re([]);return}throw new Error(`HTTP ${f.status}`)}const r=await f.text(),h=r.length+":"+r.slice(0,100);h!==o&&(o=h,re(Qv(r)),W(null))}).catch(f=>W(f.message))};g();const y=setInterval(g,5e3);return()=>clearInterval(y)},[]),!q)return te.jsx("div",{className:"dashboard-container",children:te.jsx("p",{style:{color:"var(--text-muted)",padding:16},children:"Loading..."})});const a=async()=>{try{await Rv(),ae()}catch(o){console.error("Failed to create shell:",o)}},d=q.builders??[],_=(q.utils??[]).filter(o=>o.terminalId||o.pid&&o.pid!==0),v=q.annotations??[];return te.jsxs("div",{className:"dashboard-container",children:[te.jsxs("div",{className:"projects-info",children:[te.jsx("h1",{style:{fontSize:20,marginBottom:12,color:"var(--text-primary)"},children:"Agent Farm Dashboard"}),te.jsxs("p",{children:["Coordinate AI builders working on your codebase. The left panel shows the Architect terminal – tell it what you want to build. ",te.jsx("strong",{children:"Tabs"})," shows open terminals (Architect, Builders, utility shells)."," ",te.jsx("strong",{children:"Files"})," lets you browse and open project files. ",te.jsx("strong",{children:"Projects"})," tracks work as it moves from conception to integration."]}),te.jsxs("p",{children:["Docs:"," ",te.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),Zs("codev/resources/cheatsheet.md")},children:"Cheatsheet"})," ·"," ",te.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),Zs("codev/resources/lifecycle.md")},children:"Lifecycle"})," ·"," ",te.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),Zs("codev/resources/commands/overview.md")},children:"CLI Reference"})," ·"," ",te.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),Zs("codev/protocols/spider/protocol.md")},children:"SPIDER Protocol"})," ·"," ",te.jsx("a",{href:"https://github.com/cluesmith/codev#readme",target:"_blank",rel:"noreferrer",children:"README"})," ·"," ",te.jsx("a",{href:"https://discord.gg/mJ92DhDa6n",target:"_blank",rel:"noreferrer",children:"Discord"})]})]}),te.jsxs("div",{className:"dashboard-header",children:[te.jsx(ko,{title:"Tabs",className:"section-tabs",actions:te.jsx("button",{onClick:a,children:"+ Shell"}),children:te.jsxs("div",{className:"dashboard-tabs-list",children:[q.architect&&te.jsxs("div",{className:"dashboard-tab-item",onClick:()=>ne==null?void 0:ne("architect"),children:[te.jsx("span",{className:"tab-icon",children:"🏗️"}),te.jsx("span",{className:"tab-name",children:"Architect"})]}),d.map(o=>te.jsxs("div",{className:"dashboard-tab-item",onClick:()=>ne==null?void 0:ne(`builder-${o.id}`),children:[te.jsx("span",{className:"tab-icon",children:"🔨"}),te.jsx("span",{className:"tab-name",children:o.name}),te.jsx("span",{className:`status-dot status-${o.status}`})]},o.id)),_.map(o=>te.jsxs("div",{className:"dashboard-tab-item",onClick:()=>ne==null?void 0:ne(`shell-${o.id}`),children:[te.jsx("span",{className:"tab-icon",children:"💻"}),te.jsx("span",{className:"tab-name",children:o.name})]},o.id)),v.map(o=>te.jsxs("div",{className:"dashboard-tab-item",onClick:()=>ne==null?void 0:ne(`file-${o.id}`),children:[te.jsx("span",{className:"tab-icon",children:"📄"}),te.jsx("span",{className:"tab-name",children:o.file.split("/").pop()})]},o.id)),!q.architect&&d.length===0&&_.length===0&&v.length===0&&te.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic",fontSize:12,padding:"4px 8px"},children:"No tabs open"})]})}),te.jsx(ko,{title:"Files",className:"section-files",children:te.jsx(Xv,{onRefresh:ae})})]}),te.jsx(ko,{title:"Projects",className:"section-projects",children:J?te.jsxs("div",{className:"projects-error",children:[te.jsx("span",{children:J}),te.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]}):I.length===0?te.jsx("div",{className:"projects-welcome",children:te.jsx("p",{children:"No projects yet. Ask the Architect to create your first project."})}):te.jsx(ig,{projects:I})})]})}function rg({tabs:q,activeTabId:ae,onSelectTab:ne,onRefresh:I,children:re}){return te.jsxs("div",{className:"mobile-layout",children:[te.jsx(Qf,{tabs:q,activeTabId:ae,onSelectTab:ne,onRefresh:I}),te.jsx("div",{className:"mobile-content",children:re})]})}function ng(){var b,f,r,h;const{state:q,refresh:ae}=Ov(),{tabs:ne,activeTab:I,activeTabId:re,selectTab:J}=Hv(q),W=zv(`(max-width: ${xv}px)`),[a,d]=ze.useState(!1);ze.useEffect(()=>{const l=new URLSearchParams(window.location.search);d(l.get("fullscreen")==="1")},[]);const _=l=>{const c=Bv(l);return c?te.jsx(Wv,{wsPath:c}):te.jsx("div",{className:"no-terminal",children:"No terminal session"})},v=l=>{if(!l.annotationId||!q)return te.jsx("div",{className:"no-terminal",children:"No file viewer"});const c=q.annotations.find(w=>w.id===l.annotationId);if(!c)return te.jsx("div",{className:"no-terminal",children:"Annotation not found"});const m=`${$r()}annotation/${c.id}/`;return te.jsx("iframe",{src:m,className:"terminal-iframe",style:{width:"100%",height:"100%",border:"none",backgroundColor:"#1a1a1a"},title:`File: ${c.file}`,allow:"clipboard-read; clipboard-write"})},o=()=>{if(!I)return null;switch(I.type){case"dashboard":return te.jsx(sg,{state:q,onRefresh:ae,onSelectTab:J});case"architect":case"builder":case"shell":return _(I);case"file":return v(I);default:return te.jsx("div",{children:"Unknown tab type"})}};if(a&&I&&(I.type==="architect"||I.type==="builder"||I.type==="shell"))return te.jsx("div",{className:"fullscreen-terminal",children:_(I)});if(W)return te.jsx(rg,{tabs:ne,activeTabId:re,onSelectTab:J,onRefresh:ae,children:o()});const g=ne.find(l=>l.type==="architect"),y=g?_(g):te.jsx("div",{className:"no-architect",children:"No architect terminal"});return te.jsxs("div",{className:"app",children:[te.jsxs("header",{className:"app-header",children:[te.jsx("h1",{className:"app-title",children:"Agent Farm"}),te.jsx("div",{className:"header-meta",children:te.jsxs("span",{className:"builder-count",children:[((b=q==null?void 0:q.builders)==null?void 0:b.length)??0," builder(s)"]})})]}),te.jsx("div",{className:"app-body",children:te.jsx(Nv,{left:y,right:te.jsxs("div",{className:"right-panel",children:[te.jsx(Qf,{tabs:ne.filter(l=>l.type!=="architect"),activeTabId:re,onSelectTab:J,onRefresh:ae}),te.jsx("div",{className:"tab-content",role:"tabpanel",children:o()})]})})}),te.jsxs("footer",{className:"status-bar",children:[te.jsxs("span",{children:[((f=q==null?void 0:q.builders)==null?void 0:f.length)??0," builders"]}),te.jsxs("span",{children:[((r=q==null?void 0:q.utils)==null?void 0:r.length)??0," shells"]}),te.jsxs("span",{children:[((h=q==null?void 0:q.annotations)==null?void 0:h.length)??0," files"]})]})]})}Ev.createRoot(document.getElementById("root")).render(te.jsx(ze.StrictMode,{children:te.jsx(ng,{})}));
120
- //# sourceMappingURL=index-CBmNW791.js.map
118
+ `)},J.onData(h=>{_.readyState===WebSocket.OPEN&&$v(_,h)}),J.onResize(({cols:h,rows:l})=>{_.readyState===WebSocket.OPEN&&Vf(_,"resize",{cols:h,rows:l})});const f=()=>W.fit(),r=new ResizeObserver(f);return r.observe(ae.current),()=>{g&&clearTimeout(g),r.disconnect(),_.close(),J.dispose(),ne.current=null,I.current=null,re.current=null}},[P]),te.jsx("div",{ref:ae,className:"terminal-container",style:{width:"100%",height:"100%",backgroundColor:"#1a1a1a"}})}function $v(P,ae){const ne=new TextEncoder().encode(ae),I=new Uint8Array(1+ne.length);I[0]=Jf,I.set(ne,1),P.send(I.buffer)}function Vf(P,ae,ne){const I=JSON.stringify({type:ae,payload:ne}),re=new TextEncoder().encode(I),J=new Uint8Array(1+re.length);J[0]=Gv,J.set(re,1),P.send(J.buffer)}function ed({entry:P,expanded:ae,onToggle:ne,onOpen:I,depth:re=0}){var a;const J=P.type==="directory",W=ae.has(P.path);return te.jsxs(te.Fragment,{children:[te.jsxs("div",{className:`file-node ${J?"directory":"file"}`,style:{paddingLeft:`${re*16+8}px`},onClick:()=>J?ne(P.path):I(P.path),role:"treeitem","aria-expanded":J?W:void 0,tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),J?ne(P.path):I(P.path))},children:[te.jsx("span",{className:"file-icon",children:J?W?"📂":"📁":"📄"}),te.jsx("span",{className:"file-name",children:P.name})]}),J&&W&&((a=P.children)==null?void 0:a.map(d=>te.jsx(ed,{entry:d,expanded:ae,onToggle:ne,onOpen:I,depth:re+1},d.path)))]})}function Xv({onRefresh:P}){const[ae,ne]=He.useState([]),[I,re]=He.useState(new Set),[J,W]=He.useState(null),[a,d]=He.useState(!1),_=He.useCallback(async()=>{try{const g=await Tv();ne(g),W(null),d(!0)}catch(g){W(g.message)}},[]);He.useEffect(()=>{a||_()},[a,_]);const v=g=>{re(y=>{const b=new Set(y);return b.has(g)?b.delete(g):b.add(g),b})},o=async g=>{try{await Dv(g),P()}catch(y){console.error("Failed to open file:",y)}};return J?te.jsxs("div",{className:"file-tree-error",children:["Error: ",J]}):a?te.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:ae.map(g=>te.jsx(ed,{entry:g,expanded:I,onToggle:v,onOpen:o},g.path))}):te.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function ko({title:P,className:ae,defaultOpen:ne=!0,actions:I,children:re}){const[J,W]=He.useState(ne);return te.jsxs("div",{className:`dashboard-section${J?"":" collapsed"}${ae?" "+ae:""}`,children:[te.jsxs("div",{className:"dashboard-section-header",onClick:()=>W(!J),children:[te.jsxs("h3",{children:[te.jsx("span",{className:"collapse-icon",children:"▼"})," ",P]}),I&&te.jsx("div",{className:"header-actions",onClick:a=>a.stopPropagation(),children:I})]}),J&&te.jsx("div",{className:"dashboard-section-content",children:re})]})}function Yv(P){const ae={},ne=P.split(`
119
+ `);for(const I of ne){const re=I.match(/^\s*-?\s*(\w+):\s*(.*)$/);if(!re)continue;const[,J,W]=re;let a=W.trim();if((a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1)),J==="files"){ae.files={};continue}if(J==="spec"||J==="plan"||J==="review"){ae.files||(ae.files={}),ae.files[J]=a==="null"?null:a;continue}if(J==="timestamps"){ae.timestamps={};continue}if(["conceived_at","specified_at","planned_at","implementing_at","implemented_at","committed_at","integrated_at"].includes(J)){ae.timestamps||(ae.timestamps={}),ae.timestamps[J]=a==="null"?null:a;continue}if(J==="dependencies"||J==="tags"||J==="ticks"){if(a.startsWith("[")&&a.endsWith("]")){const _=a.slice(1,-1).trim();ae[J]=_===""?[]:_.split(",").map(v=>v.trim().replace(/^["']|["']$/g,""))}else ae[J]=[];continue}a!=="null"&&(ae[J]=a)}return ae}const Vv=new Set(["conceived","specified","planned","implementing","implemented","committed","integrated","abandoned","on-hold"]);function Kv(P){return!(!P.id||P.id==="NNNN"||!/^\d{4}$/.test(P.id)||!P.status||!Vv.has(P.status)||!P.title||P.tags&&P.tags.includes("example"))}function Qv(P){const ae=[],ne=/```yaml\n([\s\S]*?)```/g;let I;for(;(I=ne.exec(P))!==null;){const J=I[1].split(/\n(?=\s*- id:)/);for(const W of J){if(!W.trim()||!W.includes("id:"))continue;const a=Yv(W);a&&Kv(a)&&ae.push(a)}}return ae}const zo=["conceived","specified","planned","implementing","implemented","committed","integrated"],Zv=["CONC'D","SPEC'D","PLANNED","IMPL'ING","IMPL'D","CMTD","INTGR'D"],Jv=new Set(["conceived","specified","planned","implementing","implemented","committed"]),td=new Set(["abandoned","on-hold"]);function No(P){var I;if(P.status!=="integrated")return!1;const ae=(I=P.timestamps)==null?void 0:I.integrated_at;if(!ae)return!1;const ne=new Date(ae);return isNaN(ne.getTime())?!1:(Date.now()-ne.getTime())/(1e3*60*60)<=72}function ca(P){const ae=zo.indexOf(P);return ae>=0?ae:-1}function Kf(P,ae){var ne,I,re;switch(ae){case"specified":return(ne=P.files)!=null&&ne.spec?{label:"Spec",link:P.files.spec}:{label:"",link:null};case"planned":return(I=P.files)!=null&&I.plan?{label:"Plan",link:P.files.plan}:{label:"",link:null};case"implemented":return(re=P.files)!=null&&re.review?{label:"Revw",link:P.files.review}:{label:"",link:null};case"committed":{if(P.notes){const J=P.notes.match(/PR\s*#?(\d+)/i);if(J)return{label:"PR",link:`https://github.com/cluesmith/codev/pull/${J[1]}`,external:!0}}return{label:"",link:null}}default:return{label:"",link:null}}}function eg({project:P,stage:ae}){const ne=ca(P.status),I=ca(ae);if(I<ne){const re=Kf(P,ae);return te.jsxs("td",{className:"project-stage",children:[te.jsx("span",{className:"checkmark",children:"✓"}),re.label&&re.link&&(re.external?te.jsxs(te.Fragment,{children:[" ",te.jsx("a",{href:re.link,target:"_blank",rel:"noreferrer",children:re.label})]}):te.jsxs(te.Fragment,{children:[" ",te.jsx("a",{href:"#",onClick:J=>{J.preventDefault(),Zs(re.link)},children:re.label})]}))]})}if(I===ne){if(ae==="integrated"&&No(P))return te.jsx("td",{className:"project-stage",children:te.jsx("span",{className:"celebration",children:"🎉"})});const re=Kf(P,ae);return te.jsxs("td",{className:"project-stage",children:[te.jsx("span",{className:"current-indicator"}),re.label&&re.link&&(re.external?te.jsxs(te.Fragment,{children:[" ",te.jsx("a",{href:re.link,target:"_blank",rel:"noreferrer",children:re.label})]}):te.jsxs(te.Fragment,{children:[" ",te.jsx("a",{href:"#",onClick:J=>{J.preventDefault(),Zs(re.link)},children:re.label})]}))]})}return te.jsx("td",{className:"project-stage"})}async function Zs(P){try{const ae=$r();await fetch(`${ae}api/tabs/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:P})})}catch{}}function tg({project:P}){const ae=td.has(P.status);return te.jsxs("tr",{className:`project-row status-${P.status}`,children:[te.jsxs("td",{className:"project-cell",children:[te.jsx("span",{className:"project-id",children:P.id}),te.jsxs("span",{className:"project-title",children:[P.title,ae&&te.jsxs("span",{className:"project-terminal-status",children:[" (",P.status,")"]})]})]}),ae?zo.map(ne=>te.jsx("td",{className:"project-stage"},ne)):zo.map(ne=>te.jsx(eg,{project:P,stage:ne},ne))]})}function Ho({projects:P}){return P.length===0?te.jsx("p",{style:{color:"var(--text-muted)",textAlign:"center",padding:20},children:"No projects"}):te.jsxs("table",{className:"project-table",children:[te.jsx("thead",{children:te.jsxs("tr",{children:[te.jsx("th",{style:{textAlign:"left"},children:"Project"}),Zv.map(ae=>te.jsx("th",{className:"stage-header",children:ae},ae))]})}),te.jsx("tbody",{children:P.map(ae=>te.jsx(tg,{project:ae},ae.id))})]})}function ig({projects:P}){const ae=P.filter(re=>Jv.has(re.status)||No(re));ae.sort((re,J)=>{const W=ca(re.status),a=ca(J.status);return a!==W?a-W:re.id.localeCompare(J.id)});const ne=P.filter(re=>re.status==="integrated"&&!No(re)),I=P.filter(re=>td.has(re.status));return te.jsxs(te.Fragment,{children:[(ae.length>0||ne.length===0)&&te.jsxs("details",{className:"project-section",open:!0,children:[te.jsxs("summary",{children:["Active ",te.jsxs("span",{className:"section-count",children:["(",ae.length,")"]})]}),te.jsx(Ho,{projects:ae})]}),ne.length>0&&te.jsxs("details",{className:"project-section",children:[te.jsxs("summary",{children:["Completed ",te.jsxs("span",{className:"section-count",children:["(",ne.length,")"]})]}),te.jsx(Ho,{projects:ne})]}),I.length>0&&te.jsxs("details",{className:"project-section",children:[te.jsxs("summary",{children:["Terminal ",te.jsxs("span",{className:"section-count",children:["(",I.length,")"]})]}),te.jsx(Ho,{projects:I})]})]})}function sg({state:P,onRefresh:ae,onSelectTab:ne}){const[I,re]=He.useState([]),[J,W]=He.useState(null);if(He.useEffect(()=>{let o="";const g=()=>{const b=$r();fetch(`${b}file?path=codev/projectlist.md`).then(async f=>{if(!f.ok){if(f.status===404){re([]);return}throw new Error(`HTTP ${f.status}`)}const r=await f.text(),h=r.length+":"+r.slice(0,100);h!==o&&(o=h,re(Qv(r)),W(null))}).catch(f=>W(f.message))};g();const y=setInterval(g,5e3);return()=>clearInterval(y)},[]),!P)return te.jsx("div",{className:"dashboard-container",children:te.jsx("p",{style:{color:"var(--text-muted)",padding:16},children:"Loading..."})});const a=async()=>{try{await Rv(),ae()}catch(o){console.error("Failed to create shell:",o)}},d=P.builders??[],_=(P.utils??[]).filter(o=>o.terminalId||o.pid&&o.pid!==0),v=P.annotations??[];return te.jsxs("div",{className:"dashboard-container",children:[te.jsxs("div",{className:"projects-info",children:[te.jsx("h1",{style:{fontSize:20,marginBottom:12,color:"var(--text-primary)"},children:"Agent Farm Dashboard"}),te.jsxs("p",{children:["Coordinate AI builders working on your codebase. The left panel shows the Architect terminal – tell it what you want to build. ",te.jsx("strong",{children:"Tabs"})," shows open terminals (Architect, Builders, utility shells)."," ",te.jsx("strong",{children:"Files"})," lets you browse and open project files. ",te.jsx("strong",{children:"Projects"})," tracks work as it moves from conception to integration."]}),te.jsxs("p",{children:["Docs:"," ",te.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),Zs("codev/resources/cheatsheet.md")},children:"Cheatsheet"})," ·"," ",te.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),Zs("codev/resources/lifecycle.md")},children:"Lifecycle"})," ·"," ",te.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),Zs("codev/resources/commands/overview.md")},children:"CLI Reference"})," ·"," ",te.jsx("a",{href:"#",onClick:o=>{o.preventDefault(),Zs("codev/protocols/spider/protocol.md")},children:"SPIDER Protocol"})," ·"," ",te.jsx("a",{href:"https://github.com/cluesmith/codev#readme",target:"_blank",rel:"noreferrer",children:"README"})," ·"," ",te.jsx("a",{href:"https://discord.gg/mJ92DhDa6n",target:"_blank",rel:"noreferrer",children:"Discord"})]})]}),te.jsxs("div",{className:"dashboard-header",children:[te.jsx(ko,{title:"Tabs",className:"section-tabs",actions:te.jsx("button",{onClick:a,children:"+ Shell"}),children:te.jsxs("div",{className:"dashboard-tabs-list",children:[P.architect&&te.jsxs("div",{className:"dashboard-tab-item",onClick:()=>ne==null?void 0:ne("architect"),children:[te.jsx("span",{className:"tab-icon",children:"🏗️"}),te.jsx("span",{className:"tab-name",children:"Architect"})]}),d.map(o=>te.jsxs("div",{className:"dashboard-tab-item",onClick:()=>ne==null?void 0:ne(`builder-${o.id}`),children:[te.jsx("span",{className:"tab-icon",children:"🔨"}),te.jsx("span",{className:"tab-name",children:o.name}),te.jsx("span",{className:`status-dot status-${o.status}`})]},o.id)),_.map(o=>te.jsxs("div",{className:"dashboard-tab-item",onClick:()=>ne==null?void 0:ne(`shell-${o.id}`),children:[te.jsx("span",{className:"tab-icon",children:"💻"}),te.jsx("span",{className:"tab-name",children:o.name})]},o.id)),v.map(o=>te.jsxs("div",{className:"dashboard-tab-item",onClick:()=>ne==null?void 0:ne(`file-${o.id}`),children:[te.jsx("span",{className:"tab-icon",children:"📄"}),te.jsx("span",{className:"tab-name",children:o.file.split("/").pop()})]},o.id)),!P.architect&&d.length===0&&_.length===0&&v.length===0&&te.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic",fontSize:12,padding:"4px 8px"},children:"No tabs open"})]})}),te.jsx(ko,{title:"Files",className:"section-files",children:te.jsx(Xv,{onRefresh:ae})})]}),te.jsx(ko,{title:"Projects",className:"section-projects",children:J?te.jsxs("div",{className:"projects-error",children:[te.jsx("span",{children:J}),te.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]}):I.length===0?te.jsx("div",{className:"projects-welcome",children:te.jsx("p",{children:"No projects yet. Ask the Architect to create your first project."})}):te.jsx(ig,{projects:I})})]})}function rg({tabs:P,activeTabId:ae,onSelectTab:ne,onRefresh:I,children:re}){return te.jsxs("div",{className:"mobile-layout",children:[te.jsx(Qf,{tabs:P,activeTabId:ae,onSelectTab:ne,onRefresh:I}),te.jsx("div",{className:"mobile-content",children:re})]})}function ng(){var b,f,r,h;const{state:P,refresh:ae}=Ov(),{tabs:ne,activeTab:I,activeTabId:re,selectTab:J}=Hv(P),W=zv(`(max-width: ${xv}px)`);He.useEffect(()=>{P!=null&&P.projectName?document.title=`${P.projectName} Agent Farm`:document.title="Agent Farm"},[P==null?void 0:P.projectName]);const[a,d]=He.useState(!1);He.useEffect(()=>{const l=new URLSearchParams(window.location.search);d(l.get("fullscreen")==="1")},[]);const _=l=>{const c=Bv(l);return c?te.jsx(Wv,{wsPath:c}):te.jsx("div",{className:"no-terminal",children:"No terminal session"})},v=l=>{if(!l.annotationId||!P)return te.jsx("div",{className:"no-terminal",children:"No file viewer"});const c=P.annotations.find(w=>w.id===l.annotationId);if(!c)return te.jsx("div",{className:"no-terminal",children:"Annotation not found"});const m=`${$r()}annotation/${c.id}/`;return te.jsx("iframe",{src:m,className:"terminal-iframe",style:{width:"100%",height:"100%",border:"none",backgroundColor:"#1a1a1a"},title:`File: ${c.file}`,allow:"clipboard-read; clipboard-write"})},o=()=>{if(!I)return null;switch(I.type){case"dashboard":return te.jsx(sg,{state:P,onRefresh:ae,onSelectTab:J});case"architect":case"builder":case"shell":return _(I);case"file":return v(I);default:return te.jsx("div",{children:"Unknown tab type"})}};if(a&&I&&(I.type==="architect"||I.type==="builder"||I.type==="shell"))return te.jsx("div",{className:"fullscreen-terminal",children:_(I)});if(W)return te.jsx(rg,{tabs:ne,activeTabId:re,onSelectTab:J,onRefresh:ae,children:o()});const g=ne.find(l=>l.type==="architect"),y=g?_(g):te.jsx("div",{className:"no-architect",children:"No architect terminal"});return te.jsxs("div",{className:"app",children:[te.jsxs("header",{className:"app-header",children:[te.jsx("h1",{className:"app-title",children:"Agent Farm"}),te.jsx("div",{className:"header-meta",children:te.jsxs("span",{className:"builder-count",children:[((b=P==null?void 0:P.builders)==null?void 0:b.length)??0," builder(s)"]})})]}),te.jsx("div",{className:"app-body",children:te.jsx(Nv,{left:y,right:te.jsxs("div",{className:"right-panel",children:[te.jsx(Qf,{tabs:ne.filter(l=>l.type!=="architect"),activeTabId:re,onSelectTab:J,onRefresh:ae}),te.jsx("div",{className:"tab-content",role:"tabpanel",children:o()})]})})}),te.jsxs("footer",{className:"status-bar",children:[te.jsxs("span",{children:[((f=P==null?void 0:P.builders)==null?void 0:f.length)??0," builders"]}),te.jsxs("span",{children:[((r=P==null?void 0:P.utils)==null?void 0:r.length)??0," shells"]}),te.jsxs("span",{children:[((h=P==null?void 0:P.annotations)==null?void 0:h.length)??0," files"]})]})]})}Ev.createRoot(document.getElementById("root")).render(te.jsx(He.StrictMode,{children:te.jsx(ng,{})}));
120
+ //# sourceMappingURL=index-VvUWRPNP.js.map