@chfischerx/puttry 0.1.2 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,195 +0,0 @@
1
- (function(){const N=document.createElement("link").relList;if(N&&N.supports&&N.supports("modulepreload"))return;for(const G of document.querySelectorAll('link[rel="modulepreload"]'))L(G);new MutationObserver(G=>{for(const K of G)if(K.type==="childList")for(const H of K.addedNodes)H.tagName==="LINK"&&H.rel==="modulepreload"&&L(H)}).observe(document,{childList:!0,subtree:!0});function z(G){const K={};return G.integrity&&(K.integrity=G.integrity),G.referrerPolicy&&(K.referrerPolicy=G.referrerPolicy),G.crossOrigin==="use-credentials"?K.credentials="include":G.crossOrigin==="anonymous"?K.credentials="omit":K.credentials="same-origin",K}function L(G){if(G.ep)return;G.ep=!0;const K=z(G);fetch(G.href,K)}})();var rc={exports:{}},fn={};var pd;function qm(){if(pd)return fn;pd=1;var S=Symbol.for("react.transitional.element"),N=Symbol.for("react.fragment");function z(L,G,K){var H=null;if(K!==void 0&&(H=""+K),G.key!==void 0&&(H=""+G.key),"key"in G){K={};for(var u in G)u!=="key"&&(K[u]=G[u])}else K=G;return G=K.ref,{$$typeof:S,type:L,key:H,ref:G!==void 0?G:null,props:K}}return fn.Fragment=N,fn.jsx=z,fn.jsxs=z,fn}var bd;function Im(){return bd||(bd=1,rc.exports=qm()),rc.exports}var O=Im(),nc={exports:{}},Ee={};var Sd;function Pm(){if(Sd)return Ee;Sd=1;var S=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),H=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),g=Symbol.iterator;function C(x){return x===null||typeof x!="object"?null:(x=g&&x[g]||x["@@iterator"],typeof x=="function"?x:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,n={};function c(x,q,Z){this.props=x,this.context=q,this.refs=n,this.updater=Z||A}c.prototype.isReactComponent={},c.prototype.setState=function(x,q){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,q,"setState")},c.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function o(){}o.prototype=c.prototype;function l(x,q,Z){this.props=x,this.context=q,this.refs=n,this.updater=Z||A}var v=l.prototype=new o;v.constructor=l,y(v,c.prototype),v.isPureReactComponent=!0;var m=Array.isArray;function w(){}var D={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function E(x,q,Z){var re=Z.ref;return{$$typeof:S,type:x,key:q,ref:re!==void 0?re:null,props:Z}}function U(x,q){return E(x.type,q,x.props)}function F(x){return typeof x=="object"&&x!==null&&x.$$typeof===S}function j(x){var q={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(Z){return q[Z]})}var P=/\/+/g;function ee(x,q){return typeof x=="object"&&x!==null&&x.key!=null?j(""+x.key):q.toString(36)}function se(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(w,w):(x.status="pending",x.then(function(q){x.status==="pending"&&(x.status="fulfilled",x.value=q)},function(q){x.status==="pending"&&(x.status="rejected",x.reason=q)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function I(x,q,Z,re,le){var de=typeof x;(de==="undefined"||de==="boolean")&&(x=null);var k=!1;if(x===null)k=!0;else switch(de){case"bigint":case"string":case"number":k=!0;break;case"object":switch(x.$$typeof){case S:case N:k=!0;break;case b:return k=x._init,I(k(x._payload),q,Z,re,le)}}if(k)return le=le(x),k=re===""?"."+ee(x,0):re,m(le)?(Z="",k!=null&&(Z=k.replace(P,"$&/")+"/"),I(le,q,Z,"",function(oe){return oe})):le!=null&&(F(le)&&(le=U(le,Z+(le.key==null||x&&x.key===le.key?"":(""+le.key).replace(P,"$&/")+"/")+k)),q.push(le)),1;k=0;var Q=re===""?".":re+":";if(m(x))for(var te=0;te<x.length;te++)re=x[te],de=Q+ee(re,te),k+=I(re,q,Z,de,le);else if(te=C(x),typeof te=="function")for(x=te.call(x),te=0;!(re=x.next()).done;)re=re.value,de=Q+ee(re,te++),k+=I(re,q,Z,de,le);else if(de==="object"){if(typeof x.then=="function")return I(se(x),q,Z,re,le);throw q=String(x),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return k}function X(x,q,Z){if(x==null)return x;var re=[],le=0;return I(x,re,"","",function(de){return q.call(Z,de,le++)}),re}function T(x){if(x._status===-1){var q=x._result;q=q(),q.then(function(Z){(x._status===0||x._status===-1)&&(x._status=1,x._result=Z)},function(Z){(x._status===0||x._status===-1)&&(x._status=2,x._result=Z)}),x._status===-1&&(x._status=0,x._result=q)}if(x._status===1)return x._result.default;throw x._result}var B=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},R={map:X,forEach:function(x,q,Z){X(x,function(){q.apply(this,arguments)},Z)},count:function(x){var q=0;return X(x,function(){q++}),q},toArray:function(x){return X(x,function(q){return q})||[]},only:function(x){if(!F(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Ee.Activity=f,Ee.Children=R,Ee.Component=c,Ee.Fragment=z,Ee.Profiler=G,Ee.PureComponent=l,Ee.StrictMode=L,Ee.Suspense=h,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(x){return D.H.useMemoCache(x)}},Ee.cache=function(x){return function(){return x.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(x,q,Z){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var re=y({},x.props),le=x.key;if(q!=null)for(de in q.key!==void 0&&(le=""+q.key),q)!_.call(q,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&q.ref===void 0||(re[de]=q[de]);var de=arguments.length-2;if(de===1)re.children=Z;else if(1<de){for(var k=Array(de),Q=0;Q<de;Q++)k[Q]=arguments[Q+2];re.children=k}return E(x.type,le,re)},Ee.createContext=function(x){return x={$$typeof:H,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:K,_context:x},x},Ee.createElement=function(x,q,Z){var re,le={},de=null;if(q!=null)for(re in q.key!==void 0&&(de=""+q.key),q)_.call(q,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(le[re]=q[re]);var k=arguments.length-2;if(k===1)le.children=Z;else if(1<k){for(var Q=Array(k),te=0;te<k;te++)Q[te]=arguments[te+2];le.children=Q}if(x&&x.defaultProps)for(re in k=x.defaultProps,k)le[re]===void 0&&(le[re]=k[re]);return E(x,de,le)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(x){return{$$typeof:u,render:x}},Ee.isValidElement=F,Ee.lazy=function(x){return{$$typeof:b,_payload:{_status:-1,_result:x},_init:T}},Ee.memo=function(x,q){return{$$typeof:d,type:x,compare:q===void 0?null:q}},Ee.startTransition=function(x){var q=D.T,Z={};D.T=Z;try{var re=x(),le=D.S;le!==null&&le(Z,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(w,B)}catch(de){B(de)}finally{q!==null&&Z.types!==null&&(q.types=Z.types),D.T=q}},Ee.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Ee.use=function(x){return D.H.use(x)},Ee.useActionState=function(x,q,Z){return D.H.useActionState(x,q,Z)},Ee.useCallback=function(x,q){return D.H.useCallback(x,q)},Ee.useContext=function(x){return D.H.useContext(x)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(x,q){return D.H.useDeferredValue(x,q)},Ee.useEffect=function(x,q){return D.H.useEffect(x,q)},Ee.useEffectEvent=function(x){return D.H.useEffectEvent(x)},Ee.useId=function(){return D.H.useId()},Ee.useImperativeHandle=function(x,q,Z){return D.H.useImperativeHandle(x,q,Z)},Ee.useInsertionEffect=function(x,q){return D.H.useInsertionEffect(x,q)},Ee.useLayoutEffect=function(x,q){return D.H.useLayoutEffect(x,q)},Ee.useMemo=function(x,q){return D.H.useMemo(x,q)},Ee.useOptimistic=function(x,q){return D.H.useOptimistic(x,q)},Ee.useReducer=function(x,q,Z){return D.H.useReducer(x,q,Z)},Ee.useRef=function(x){return D.H.useRef(x)},Ee.useState=function(x){return D.H.useState(x)},Ee.useSyncExternalStore=function(x,q,Z){return D.H.useSyncExternalStore(x,q,Z)},Ee.useTransition=function(){return D.H.useTransition()},Ee.version="19.2.4",Ee}var yd;function pc(){return yd||(yd=1,nc.exports=Pm()),nc.exports}var ae=pc(),ac={exports:{}},dn={},lc={exports:{}},oc={};var Cd;function Gm(){return Cd||(Cd=1,(function(S){function N(I,X){var T=I.length;I.push(X);e:for(;0<T;){var B=T-1>>>1,R=I[B];if(0<G(R,X))I[B]=X,I[T]=R,T=B;else break e}}function z(I){return I.length===0?null:I[0]}function L(I){if(I.length===0)return null;var X=I[0],T=I.pop();if(T!==X){I[0]=T;e:for(var B=0,R=I.length,x=R>>>1;B<x;){var q=2*(B+1)-1,Z=I[q],re=q+1,le=I[re];if(0>G(Z,T))re<R&&0>G(le,Z)?(I[B]=le,I[re]=T,B=re):(I[B]=Z,I[q]=T,B=q);else if(re<R&&0>G(le,T))I[B]=le,I[re]=T,B=re;else break e}}return X}function G(I,X){var T=I.sortIndex-X.sortIndex;return T!==0?T:I.id-X.id}if(S.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var K=performance;S.unstable_now=function(){return K.now()}}else{var H=Date,u=H.now();S.unstable_now=function(){return H.now()-u}}var h=[],d=[],b=1,f=null,g=3,C=!1,A=!1,y=!1,n=!1,c=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function v(I){for(var X=z(d);X!==null;){if(X.callback===null)L(d);else if(X.startTime<=I)L(d),X.sortIndex=X.expirationTime,N(h,X);else break;X=z(d)}}function m(I){if(y=!1,v(I),!A)if(z(h)!==null)A=!0,w||(w=!0,j());else{var X=z(d);X!==null&&se(m,X.startTime-I)}}var w=!1,D=-1,_=5,E=-1;function U(){return n?!0:!(S.unstable_now()-E<_)}function F(){if(n=!1,w){var I=S.unstable_now();E=I;var X=!0;try{e:{A=!1,y&&(y=!1,o(D),D=-1),C=!0;var T=g;try{t:{for(v(I),f=z(h);f!==null&&!(f.expirationTime>I&&U());){var B=f.callback;if(typeof B=="function"){f.callback=null,g=f.priorityLevel;var R=B(f.expirationTime<=I);if(I=S.unstable_now(),typeof R=="function"){f.callback=R,v(I),X=!0;break t}f===z(h)&&L(h),v(I)}else L(h);f=z(h)}if(f!==null)X=!0;else{var x=z(d);x!==null&&se(m,x.startTime-I),X=!1}}break e}finally{f=null,g=T,C=!1}X=void 0}}finally{X?j():w=!1}}}var j;if(typeof l=="function")j=function(){l(F)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,ee=P.port2;P.port1.onmessage=F,j=function(){ee.postMessage(null)}}else j=function(){c(F,0)};function se(I,X){D=c(function(){I(S.unstable_now())},X)}S.unstable_IdlePriority=5,S.unstable_ImmediatePriority=1,S.unstable_LowPriority=4,S.unstable_NormalPriority=3,S.unstable_Profiling=null,S.unstable_UserBlockingPriority=2,S.unstable_cancelCallback=function(I){I.callback=null},S.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<I?Math.floor(1e3/I):5},S.unstable_getCurrentPriorityLevel=function(){return g},S.unstable_next=function(I){switch(g){case 1:case 2:case 3:var X=3;break;default:X=g}var T=g;g=X;try{return I()}finally{g=T}},S.unstable_requestPaint=function(){n=!0},S.unstable_runWithPriority=function(I,X){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var T=g;g=I;try{return X()}finally{g=T}},S.unstable_scheduleCallback=function(I,X,T){var B=S.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?B+T:B):T=B,I){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=T+R,I={id:b++,callback:X,priorityLevel:I,startTime:T,expirationTime:R,sortIndex:-1},T>B?(I.sortIndex=T,N(d,I),z(h)===null&&I===z(d)&&(y?(o(D),D=-1):y=!0,se(m,T-B))):(I.sortIndex=R,N(h,I),A||C||(A=!0,w||(w=!0,j()))),I},S.unstable_shouldYield=U,S.unstable_wrapCallback=function(I){var X=g;return function(){var T=g;g=X;try{return I.apply(this,arguments)}finally{g=T}}}})(oc)),oc}var xd;function Fm(){return xd||(xd=1,lc.exports=Gm()),lc.exports}var cc={exports:{}},xt={};var wd;function Ym(){if(wd)return xt;wd=1;var S=pc();function N(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)d+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function z(){}var L={d:{f:z,r:function(){throw Error(N(522))},D:z,C:z,L:z,m:z,X:z,S:z,M:z},p:0,findDOMNode:null},G=Symbol.for("react.portal");function K(h,d,b){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:G,key:f==null?null:""+f,children:h,containerInfo:d,implementation:b}}var H=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,xt.createPortal=function(h,d){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(N(299));return K(h,d,null,b)},xt.flushSync=function(h){var d=H.T,b=L.p;try{if(H.T=null,L.p=2,h)return h()}finally{H.T=d,L.p=b,L.d.f()}},xt.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,L.d.C(h,d))},xt.prefetchDNS=function(h){typeof h=="string"&&L.d.D(h)},xt.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var b=d.as,f=u(b,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,C=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;b==="style"?L.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:f,integrity:g,fetchPriority:C}):b==="script"&&L.d.X(h,{crossOrigin:f,integrity:g,fetchPriority:C,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},xt.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var b=u(d.as,d.crossOrigin);L.d.M(h,{crossOrigin:b,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&L.d.M(h)},xt.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var b=d.as,f=u(b,d.crossOrigin);L.d.L(h,b,{crossOrigin:f,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},xt.preloadModule=function(h,d){if(typeof h=="string")if(d){var b=u(d.as,d.crossOrigin);L.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:b,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else L.d.m(h)},xt.requestFormReset=function(h){L.d.r(h)},xt.unstable_batchedUpdates=function(h,d){return h(d)},xt.useFormState=function(h,d,b){return H.H.useFormState(h,d,b)},xt.useFormStatus=function(){return H.H.useHostTransitionStatus()},xt.version="19.2.4",xt}var Ed;function Vm(){if(Ed)return cc.exports;Ed=1;function S(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(S)}catch(N){console.error(N)}}return S(),cc.exports=Ym(),cc.exports}var Ad;function Km(){if(Ad)return dn;Ad=1;var S=Fm(),N=pc(),z=Vm();function L(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 G(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function K(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 H(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(K(e)!==e)throw Error(L(188))}function d(e){var t=e.alternate;if(!t){if(t=K(e),t===null)throw Error(L(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var a=r.alternate;if(a===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===i)return h(r),e;if(a===s)return h(r),t;a=a.sibling}throw Error(L(188))}if(i.return!==s.return)i=r,s=a;else{for(var p=!1,M=r.child;M;){if(M===i){p=!0,i=r,s=a;break}if(M===s){p=!0,s=r,i=a;break}M=M.sibling}if(!p){for(M=a.child;M;){if(M===i){p=!0,i=a,s=r;break}if(M===s){p=!0,s=a,i=r;break}M=M.sibling}if(!p)throw Error(L(189))}}if(i.alternate!==s)throw Error(L(190))}if(i.tag!==3)throw Error(L(188));return i.stateNode.current===i?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,g=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function j(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var P=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===P?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case y:return"Fragment";case c:return"Profiler";case n:return"StrictMode";case m:return"Suspense";case w:return"SuspenseList";case E:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case l:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case v:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case _:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var se=Array.isArray,I=N.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=z.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T={pending:!1,data:null,method:null,action:null},B=[],R=-1;function x(e){return{current:e}}function q(e){0>R||(e.current=B[R],B[R]=null,R--)}function Z(e,t){R++,B[R]=e.current,e.current=t}var re=x(null),le=x(null),de=x(null),k=x(null);function Q(e,t){switch(Z(de,t),Z(le,e),Z(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?If(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=If(t),e=Pf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(re),Z(re,e)}function te(){q(re),q(le),q(de)}function oe(e){e.memoizedState!==null&&Z(k,e);var t=re.current,i=Pf(t,e.type);t!==i&&(Z(le,e),Z(re,i))}function ye(e){le.current===e&&(q(re),q(le)),k.current===e&&(q(k),on._currentValue=T)}var ve,ke;function je(e){if(ve===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||"",ke=-1<i.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+ve+e+ke}var it=!1;function Gt(e,t){if(!e||it)return"";it=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ne){var ie=ne}Reflect.construct(e,[],he)}else{try{he.call()}catch(ne){ie=ne}e.call(he.prototype)}}else{try{throw Error()}catch(ne){ie=ne}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ne){if(ne&&ie&&typeof ne.stack=="string")return[ne.stack,ie.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=s.DetermineComponentFrameRoot(),p=a[0],M=a[1];if(p&&M){var Y=p.split(`
4
- `),$=M.split(`
5
- `);for(r=s=0;s<Y.length&&!Y[s].includes("DetermineComponentFrameRoot");)s++;for(;r<$.length&&!$[r].includes("DetermineComponentFrameRoot");)r++;if(s===Y.length||r===$.length)for(s=Y.length-1,r=$.length-1;1<=s&&0<=r&&Y[s]!==$[r];)r--;for(;1<=s&&0<=r;s--,r--)if(Y[s]!==$[r]){if(s!==1||r!==1)do if(s--,r--,0>r||Y[s]!==$[r]){var ce=`
6
- `+Y[s].replace(" at new "," at ");return e.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",e.displayName)),ce}while(1<=s&&0<=r);break}}}finally{it=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?je(i):""}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je("Lazy");case 13:return e.child!==t&&t!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Gt(e.type,!1);case 11:return Gt(e.type.render,!1);case 1:return Gt(e.type,!0);case 31:return je("Activity");default:return""}}function wt(e){try{var t="",i=null;do t+=Ae(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
7
- Error generating stack: `+s.message+`
8
- `+s.stack}}var _i=Object.prototype.hasOwnProperty,vi=S.unstable_scheduleCallback,ni=S.unstable_cancelCallback,Ui=S.unstable_shouldYield,_t=S.unstable_requestPaint,Pe=S.unstable_now,yt=S.unstable_getCurrentPriorityLevel,ti=S.unstable_ImmediatePriority,ai=S.unstable_UserBlockingPriority,Et=S.unstable_NormalPriority,vs=S.unstable_LowPriority,Tt=S.unstable_IdlePriority,mi=S.log,Ye=S.unstable_setDisableYieldValue,li=null,At=null;function oi(e){if(typeof mi=="function"&&Ye(e),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(li,e)}catch{}}var Ct=Math.clz32?Math.clz32:Fa,Pa=Math.log,Ga=Math.LN2;function Fa(e){return e>>>=0,e===0?32:31-(Pa(e)/Ga|0)|0}var Ns=256,zs=262144,fe=4194304;function _e(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 Se(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,a=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var M=s&134217727;return M!==0?(s=M&~a,s!==0?r=_e(s):(p&=M,p!==0?r=_e(p):i||(i=M&~e,i!==0&&(r=_e(i))))):(M=s&~a,M!==0?r=_e(M):p!==0?r=_e(p):i||(i=s&~e,i!==0&&(r=_e(i)))),r===0?0:t!==0&&t!==r&&(t&a)===0&&(a=r&-r,i=t&-t,a>=i||a===32&&(i&4194048)!==0)?t:r}function xe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(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 Ve(){var e=fe;return fe<<=1,(fe&62914560)===0&&(fe=4194304),e}function Ya(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function yr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T_(e,t,i,s,r,a){var p=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 M=e.entanglements,Y=e.expirationTimes,$=e.hiddenUpdates;for(i=p&~i;0<i;){var ce=31-Ct(i),he=1<<ce;M[ce]=0,Y[ce]=-1;var ie=$[ce];if(ie!==null)for($[ce]=null,ce=0;ce<ie.length;ce++){var ne=ie[ce];ne!==null&&(ne.lane&=-536870913)}i&=~he}s!==0&&Cc(e,s,0),a!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=a&~(p&~t))}function Cc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Ct(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function xc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Ct(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function wc(e,t){var i=t&-t;return i=(i&42)!==0?1:Va(i),(i&(e.suspendedLanes|t))!==0?0:i}function Va(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 Ka(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ec(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:hd(e.type))}function Ac(e,t){var i=X.p;try{return X.p=e,t()}finally{X.p=i}}var qi=Math.random().toString(36).slice(2),vt="__reactFiber$"+qi,Rt="__reactProps$"+qi,js="__reactContainer$"+qi,Xa="__reactEvents$"+qi,R_="__reactListeners$"+qi,k_="__reactHandles$"+qi,Dc="__reactResources$"+qi,Cr="__reactMarker$"+qi;function Wa(e){delete e[vt],delete e[Rt],delete e[Xa],delete e[R_],delete e[k_]}function Hs(e){var t=e[vt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[js]||i[vt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Wf(e);e!==null;){if(i=e[vt])return i;e=Wf(e)}return t}e=i,i=e.parentNode}return null}function Us(e){if(e=e[vt]||e[js]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(L(33))}function qs(e){var t=e[Dc];return t||(t=e[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[Cr]=!0}var Tc=new Set,Rc={};function ms(e,t){Is(e,t),Is(e+"Capture",t)}function Is(e,t){for(Rc[e]=t,e=0;e<t.length;e++)Tc.add(t[e])}var L_=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]*$"),kc={},Lc={};function M_(e){return _i.call(Lc,e)?!0:_i.call(kc,e)?!1:L_.test(e)?Lc[e]=!0:(kc[e]=!0,!1)}function Sn(e,t,i){if(M_(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 yn(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 gi(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 Ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function O_(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,a=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(p){i=""+p,a.call(this,p)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(p){i=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qa(e){if(!e._valueTracker){var t=Mc(e)?"checked":"value";e._valueTracker=O_(e,t,""+e[t])}}function Oc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Mc(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Cn(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 B_=/[\n"\\]/g;function Yt(e){return e.replace(B_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Za(e,t,i,s,r,a,p,M){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?Ja(e,p,Ft(t)):i!=null?Ja(e,p,Ft(i)):s!=null&&e.removeAttribute("value"),r==null&&a!=null&&(e.defaultChecked=!!a),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.name=""+Ft(M):e.removeAttribute("name")}function Bc(e,t,i,s,r,a,p,M){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||i!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Qa(e);return}i=i!=null?""+Ft(i):"",t=t!=null?""+Ft(t):i,M||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=M?e.checked:!!s,e.defaultChecked=!!s,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),Qa(e)}function Ja(e,t,i){t==="number"&&Cn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ps(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Ft(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Nc(e,t,i){if(t!=null&&(t=""+Ft(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ft(i):""}function zc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(L(92));if(se(s)){if(1<s.length)throw Error(L(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Ft(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Qa(e)}function Gs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var N_=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 jc(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||N_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Hc(e,t,i){if(t!=null&&typeof t!="object")throw Error(L(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&jc(e,r,s)}else for(var a in t)t.hasOwnProperty(a)&&jc(e,a,t[a])}function $a(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 z_=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"]]),j_=/^[\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 xn(e){return j_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function pi(){}var el=null;function tl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fs=null,Ys=null;function Uc(e){var t=Us(e);if(t&&(e=t.stateNode)){var i=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Za(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="'+Yt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[Rt]||null;if(!r)throw Error(L(90));Za(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Oc(s)}break e;case"textarea":Nc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ps(e,!!i.multiple,t,!1)}}}var il=!1;function qc(e,t,i){if(il)return e(t,i);il=!0;try{var s=e(t);return s}finally{if(il=!1,(Fs!==null||Ys!==null)&&(ua(),Fs&&(t=Fs,e=Ys,Ys=Fs=null,Uc(t),e)))for(t=0;t<e.length;t++)Uc(e[t])}}function wr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Rt]||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(L(231,t,typeof i));return i}var bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sl=!1;if(bi)try{var Er={};Object.defineProperty(Er,"passive",{get:function(){sl=!0}}),window.addEventListener("test",Er,Er),window.removeEventListener("test",Er,Er)}catch{sl=!1}var Ii=null,rl=null,wn=null;function Ic(){if(wn)return wn;var e,t=rl,i=t.length,s,r="value"in Ii?Ii.value:Ii.textContent,a=r.length;for(e=0;e<i&&t[e]===r[e];e++);var p=i-e;for(s=1;s<=p&&t[i-s]===r[a-s];s++);return wn=r.slice(e,1<s?1-s:void 0)}function En(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function An(){return!0}function Pc(){return!1}function kt(e){function t(i,s,r,a,p){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=a,this.target=p,this.currentTarget=null;for(var M in e)e.hasOwnProperty(M)&&(i=e[M],this[M]=i?i(a):a[M]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?An:Pc,this.isPropagationStopped=Pc,this}return f(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=An)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dn=kt(gs),Ar=f({},gs,{view:0,detail:0}),H_=kt(Ar),nl,al,Dr,Tn=f({},Ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ol,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!==Dr&&(Dr&&e.type==="mousemove"?(nl=e.screenX-Dr.screenX,al=e.screenY-Dr.screenY):al=nl=0,Dr=e),nl)},movementY:function(e){return"movementY"in e?e.movementY:al}}),Gc=kt(Tn),U_=f({},Tn,{dataTransfer:0}),q_=kt(U_),I_=f({},Ar,{relatedTarget:0}),ll=kt(I_),P_=f({},gs,{animationName:0,elapsedTime:0,pseudoElement:0}),G_=kt(P_),F_=f({},gs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Y_=kt(F_),V_=f({},gs,{data:0}),Fc=kt(V_),K_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X_={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"},W_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Q_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W_[e])?!!t[e]:!1}function ol(){return Q_}var Z_=f({},Ar,{key:function(e){if(e.key){var t=K_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=En(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?X_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ol,charCode:function(e){return e.type==="keypress"?En(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?En(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),J_=kt(Z_),$_=f({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yc=kt($_),ev=f({},Ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ol}),tv=kt(ev),iv=f({},gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),sv=kt(iv),rv=f({},Tn,{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}),nv=kt(rv),av=f({},gs,{newState:0,oldState:0}),lv=kt(av),ov=[9,13,27,32],cl=bi&&"CompositionEvent"in window,Tr=null;bi&&"documentMode"in document&&(Tr=document.documentMode);var cv=bi&&"TextEvent"in window&&!Tr,Vc=bi&&(!cl||Tr&&8<Tr&&11>=Tr),Kc=" ",Xc=!1;function Wc(e,t){switch(e){case"keyup":return ov.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vs=!1;function uv(e,t){switch(e){case"compositionend":return Qc(t);case"keypress":return t.which!==32?null:(Xc=!0,Kc);case"textInput":return e=t.data,e===Kc&&Xc?null:e;default:return null}}function hv(e,t){if(Vs)return e==="compositionend"||!cl&&Wc(e,t)?(e=Ic(),wn=rl=Ii=null,Vs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vc&&t.locale!=="ko"?null:t.data;default:return null}}var fv={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 Zc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fv[e.type]:t==="textarea"}function Jc(e,t,i,s){Fs?Ys?Ys.push(s):Ys=[s]:Fs=s,t=ga(t,"onChange"),0<t.length&&(i=new Dn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Rr=null,kr=null;function dv(e){Nf(e,0)}function Rn(e){var t=xr(e);if(Oc(t))return e}function $c(e,t){if(e==="change")return t}var eu=!1;if(bi){var ul;if(bi){var hl="oninput"in document;if(!hl){var tu=document.createElement("div");tu.setAttribute("oninput","return;"),hl=typeof tu.oninput=="function"}ul=hl}else ul=!1;eu=ul&&(!document.documentMode||9<document.documentMode)}function iu(){Rr&&(Rr.detachEvent("onpropertychange",su),kr=Rr=null)}function su(e){if(e.propertyName==="value"&&Rn(kr)){var t=[];Jc(t,kr,e,tl(e)),qc(dv,t)}}function _v(e,t,i){e==="focusin"?(iu(),Rr=t,kr=i,Rr.attachEvent("onpropertychange",su)):e==="focusout"&&iu()}function vv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rn(kr)}function mv(e,t){if(e==="click")return Rn(t)}function gv(e,t){if(e==="input"||e==="change")return Rn(t)}function pv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zt=typeof Object.is=="function"?Object.is:pv;function Lr(e,t){if(zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!_i.call(t,r)||!zt(e[r],t[r]))return!1}return!0}function ru(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nu(e,t){var i=ru(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=ru(i)}}function au(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?au(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Cn(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=Cn(e.document)}return t}function fl(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 bv=bi&&"documentMode"in document&&11>=document.documentMode,Ks=null,dl=null,Mr=null,_l=!1;function ou(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;_l||Ks==null||Ks!==Cn(s)||(s=Ks,"selectionStart"in s&&fl(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}),Mr&&Lr(Mr,s)||(Mr=s,s=ga(dl,"onSelect"),0<s.length&&(t=new Dn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ks)))}function ps(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Xs={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionrun:ps("Transition","TransitionRun"),transitionstart:ps("Transition","TransitionStart"),transitioncancel:ps("Transition","TransitionCancel"),transitionend:ps("Transition","TransitionEnd")},vl={},cu={};bi&&(cu=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 bs(e){if(vl[e])return vl[e];if(!Xs[e])return e;var t=Xs[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in cu)return vl[e]=t[i];return e}var uu=bs("animationend"),hu=bs("animationiteration"),fu=bs("animationstart"),Sv=bs("transitionrun"),yv=bs("transitionstart"),Cv=bs("transitioncancel"),du=bs("transitionend"),_u=new Map,ml="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(" ");ml.push("scrollEnd");function ii(e,t){_u.set(e,t),ms(t,[e])}var kn=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)},Vt=[],Ws=0,gl=0;function Ln(){for(var e=Ws,t=gl=Ws=0;t<e;){var i=Vt[t];Vt[t++]=null;var s=Vt[t];Vt[t++]=null;var r=Vt[t];Vt[t++]=null;var a=Vt[t];if(Vt[t++]=null,s!==null&&r!==null){var p=s.pending;p===null?r.next=r:(r.next=p.next,p.next=r),s.pending=r}a!==0&&vu(i,r,a)}}function Mn(e,t,i,s){Vt[Ws++]=e,Vt[Ws++]=t,Vt[Ws++]=i,Vt[Ws++]=s,gl|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function pl(e,t,i,s){return Mn(e,t,i,s),On(e)}function Ss(e,t){return Mn(e,null,null,t),On(e)}function vu(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,a=e.return;a!==null;)a.childLanes|=i,s=a.alternate,s!==null&&(s.childLanes|=i),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(r=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,r&&t!==null&&(r=31-Ct(i),e=a.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),a):null}function On(e){if(50<en)throw en=0,To=null,Error(L(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qs={};function xv(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 jt(e,t,i,s){return new xv(e,t,i,s)}function bl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Si(e,t){var i=e.alternate;return i===null?(i=jt(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 mu(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 Bn(e,t,i,s,r,a){var p=0;if(s=e,typeof e=="function")bl(e)&&(p=1);else if(typeof e=="string")p=Tm(e,i,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case E:return e=jt(31,i,t,r),e.elementType=E,e.lanes=a,e;case y:return ys(i.children,r,a,t);case n:p=8,r|=24;break;case c:return e=jt(12,i,t,r|2),e.elementType=c,e.lanes=a,e;case m:return e=jt(13,i,t,r),e.elementType=m,e.lanes=a,e;case w:return e=jt(19,i,t,r),e.elementType=w,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:p=10;break e;case o:p=9;break e;case v:p=11;break e;case D:p=14;break e;case _:p=16,s=null;break e}p=29,i=Error(L(130,e===null?"null":typeof e,"")),s=null}return t=jt(p,i,t,r),t.elementType=e,t.type=s,t.lanes=a,t}function ys(e,t,i,s){return e=jt(7,e,s,t),e.lanes=i,e}function Sl(e,t,i){return e=jt(6,e,null,t),e.lanes=i,e}function gu(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function yl(e,t,i){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pu=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var i=pu.get(e);return i!==void 0?i:(t={value:e,source:t,stack:wt(t)},pu.set(e,t),t)}return{value:e,source:t,stack:wt(t)}}var Zs=[],Js=0,Nn=null,Or=0,Xt=[],Wt=0,Pi=null,ci=1,ui="";function yi(e,t){Zs[Js++]=Or,Zs[Js++]=Nn,Nn=e,Or=t}function bu(e,t,i){Xt[Wt++]=ci,Xt[Wt++]=ui,Xt[Wt++]=Pi,Pi=e;var s=ci;e=ui;var r=32-Ct(s)-1;s&=~(1<<r),i+=1;var a=32-Ct(t)+r;if(30<a){var p=r-r%5;a=(s&(1<<p)-1).toString(32),s>>=p,r-=p,ci=1<<32-Ct(t)+r|i<<r|s,ui=a+e}else ci=1<<a|i<<r|s,ui=e}function Cl(e){e.return!==null&&(yi(e,1),bu(e,1,0))}function xl(e){for(;e===Nn;)Nn=Zs[--Js],Zs[Js]=null,Or=Zs[--Js],Zs[Js]=null;for(;e===Pi;)Pi=Xt[--Wt],Xt[Wt]=null,ui=Xt[--Wt],Xt[Wt]=null,ci=Xt[--Wt],Xt[Wt]=null}function Su(e,t){Xt[Wt++]=ci,Xt[Wt++]=ui,Xt[Wt++]=Pi,ci=t.id,ui=t.overflow,Pi=e}var mt=null,Ze=null,Ne=!1,Gi=null,Qt=!1,wl=Error(L(519));function Fi(e){var t=Error(L(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Br(Kt(t,e)),wl}function yu(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[vt]=e,t[Rt]=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<sn.length;i++)Me(sn[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),Bc(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),zc(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||Uf(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=pi),t=!0):t=!1,t||Fi(e,!0)}function Cu(e){for(mt=e.return;mt;)switch(mt.tag){case 5:case 31:case 13:Qt=!1;return;case 27:case 3:Qt=!0;return;default:mt=mt.return}}function $s(e){if(e!==mt)return!1;if(!Ne)return Cu(e),Ne=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Go(e.type,e.memoizedProps)),i=!i),i&&Ze&&Fi(e),Cu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ze=Xf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ze=Xf(e)}else t===27?(t=Ze,rs(e.type)?(e=Xo,Xo=null,Ze=e):Ze=t):Ze=mt?Jt(e.stateNode.nextSibling):null;return!0}function Cs(){Ze=mt=null,Ne=!1}function El(){var e=Gi;return e!==null&&(Bt===null?Bt=e:Bt.push.apply(Bt,e),Gi=null),e}function Br(e){Gi===null?Gi=[e]:Gi.push(e)}var Al=x(null),xs=null,Ci=null;function Yi(e,t,i){Z(Al,t._currentValue),t._currentValue=i}function xi(e){e._currentValue=Al.current,q(Al)}function Dl(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 Tl(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var a=r.dependencies;if(a!==null){var p=r.child;a=a.firstContext;e:for(;a!==null;){var M=a;a=r;for(var Y=0;Y<t.length;Y++)if(M.context===t[Y]){a.lanes|=i,M=a.alternate,M!==null&&(M.lanes|=i),Dl(a.return,i,e),s||(p=null);break e}a=M.next}}else if(r.tag===18){if(p=r.return,p===null)throw Error(L(341));p.lanes|=i,a=p.alternate,a!==null&&(a.lanes|=i),Dl(p,i,e),p=null}else p=r.child;if(p!==null)p.return=r;else for(p=r;p!==null;){if(p===e){p=null;break}if(r=p.sibling,r!==null){r.return=p.return,p=r;break}p=p.return}r=p}}function er(e,t,i,s){e=null;for(var r=t,a=!1;r!==null;){if(!a){if((r.flags&524288)!==0)a=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var p=r.alternate;if(p===null)throw Error(L(387));if(p=p.memoizedProps,p!==null){var M=r.type;zt(r.pendingProps.value,p.value)||(e!==null?e.push(M):e=[M])}}else if(r===k.current){if(p=r.alternate,p===null)throw Error(L(387));p.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(on):e=[on])}r=r.return}e!==null&&Tl(t,e,i,s),t.flags|=262144}function zn(e){for(e=e.firstContext;e!==null;){if(!zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ws(e){xs=e,Ci=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return xu(xs,e)}function jn(e,t){return xs===null&&ws(e),xu(e,t)}function xu(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Ci===null){if(e===null)throw Error(L(308));Ci=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ci=Ci.next=t;return i}var wv=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()})}},Ev=S.unstable_scheduleCallback,Av=S.unstable_NormalPriority,nt={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rl(){return{controller:new wv,data:new Map,refCount:0}}function Nr(e){e.refCount--,e.refCount===0&&Ev(Av,function(){e.controller.abort()})}var zr=null,kl=0,tr=0,ir=null;function Dv(e,t){if(zr===null){var i=zr=[];kl=0,tr=Bo(),ir={status:"pending",value:void 0,then:function(s){i.push(s)}}}return kl++,t.then(wu,wu),t}function wu(){if(--kl===0&&zr!==null){ir!==null&&(ir.status="fulfilled");var e=zr;zr=null,tr=0,ir=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tv(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var Eu=I.S;I.S=function(e,t){cf=Pe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Dv(e,t),Eu!==null&&Eu(e,t)};var Es=x(null);function Ll(){var e=Es.current;return e!==null?e:Qe.pooledCache}function Hn(e,t){t===null?Z(Es,Es.current):Z(Es,t.pool)}function Au(){var e=Ll();return e===null?null:{parent:nt._currentValue,pool:e}}var sr=Error(L(460)),Ml=Error(L(474)),Un=Error(L(542)),qn={then:function(){}};function Du(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Tu(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(pi,pi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ku(e),e;default:if(typeof t.status=="string")t.then(pi,pi);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(L(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ku(e),e}throw Ds=t,sr}}function As(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ds=i,sr):i}}var Ds=null;function Ru(){if(Ds===null)throw Error(L(459));var e=Ds;return Ds=null,e}function ku(e){if(e===sr||e===Un)throw Error(L(483))}var rr=null,jr=0;function In(e){var t=jr;return jr+=1,rr===null&&(rr=[]),Tu(rr,e,t)}function Hr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pn(e,t){throw t.$$typeof===g?Error(L(525)):(e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Lu(e){function t(W,V){if(e){var J=W.deletions;J===null?(W.deletions=[V],W.flags|=16):J.push(V)}}function i(W,V){if(!e)return null;for(;V!==null;)t(W,V),V=V.sibling;return null}function s(W){for(var V=new Map;W!==null;)W.key!==null?V.set(W.key,W):V.set(W.index,W),W=W.sibling;return V}function r(W,V){return W=Si(W,V),W.index=0,W.sibling=null,W}function a(W,V,J){return W.index=J,e?(J=W.alternate,J!==null?(J=J.index,J<V?(W.flags|=67108866,V):J):(W.flags|=67108866,V)):(W.flags|=1048576,V)}function p(W){return e&&W.alternate===null&&(W.flags|=67108866),W}function M(W,V,J,ue){return V===null||V.tag!==6?(V=Sl(J,W.mode,ue),V.return=W,V):(V=r(V,J),V.return=W,V)}function Y(W,V,J,ue){var Ce=J.type;return Ce===y?ce(W,V,J.props.children,ue,J.key):V!==null&&(V.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===_&&As(Ce)===V.type)?(V=r(V,J.props),Hr(V,J),V.return=W,V):(V=Bn(J.type,J.key,J.props,null,W.mode,ue),Hr(V,J),V.return=W,V)}function $(W,V,J,ue){return V===null||V.tag!==4||V.stateNode.containerInfo!==J.containerInfo||V.stateNode.implementation!==J.implementation?(V=yl(J,W.mode,ue),V.return=W,V):(V=r(V,J.children||[]),V.return=W,V)}function ce(W,V,J,ue,Ce){return V===null||V.tag!==7?(V=ys(J,W.mode,ue,Ce),V.return=W,V):(V=r(V,J),V.return=W,V)}function he(W,V,J){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Sl(""+V,W.mode,J),V.return=W,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case C:return J=Bn(V.type,V.key,V.props,null,W.mode,J),Hr(J,V),J.return=W,J;case A:return V=yl(V,W.mode,J),V.return=W,V;case _:return V=As(V),he(W,V,J)}if(se(V)||j(V))return V=ys(V,W.mode,J,null),V.return=W,V;if(typeof V.then=="function")return he(W,In(V),J);if(V.$$typeof===l)return he(W,jn(W,V),J);Pn(W,V)}return null}function ie(W,V,J,ue){var Ce=V!==null?V.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Ce!==null?null:M(W,V,""+J,ue);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case C:return J.key===Ce?Y(W,V,J,ue):null;case A:return J.key===Ce?$(W,V,J,ue):null;case _:return J=As(J),ie(W,V,J,ue)}if(se(J)||j(J))return Ce!==null?null:ce(W,V,J,ue,null);if(typeof J.then=="function")return ie(W,V,In(J),ue);if(J.$$typeof===l)return ie(W,V,jn(W,J),ue);Pn(W,J)}return null}function ne(W,V,J,ue,Ce){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return W=W.get(J)||null,M(V,W,""+ue,Ce);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case C:return W=W.get(ue.key===null?J:ue.key)||null,Y(V,W,ue,Ce);case A:return W=W.get(ue.key===null?J:ue.key)||null,$(V,W,ue,Ce);case _:return ue=As(ue),ne(W,V,J,ue,Ce)}if(se(ue)||j(ue))return W=W.get(J)||null,ce(V,W,ue,Ce,null);if(typeof ue.then=="function")return ne(W,V,J,In(ue),Ce);if(ue.$$typeof===l)return ne(W,V,J,jn(V,ue),Ce);Pn(V,ue)}return null}function me(W,V,J,ue){for(var Ce=null,He=null,be=V,Te=V=0,Be=null;be!==null&&Te<J.length;Te++){be.index>Te?(Be=be,be=null):Be=be.sibling;var Ue=ie(W,be,J[Te],ue);if(Ue===null){be===null&&(be=Be);break}e&&be&&Ue.alternate===null&&t(W,be),V=a(Ue,V,Te),He===null?Ce=Ue:He.sibling=Ue,He=Ue,be=Be}if(Te===J.length)return i(W,be),Ne&&yi(W,Te),Ce;if(be===null){for(;Te<J.length;Te++)be=he(W,J[Te],ue),be!==null&&(V=a(be,V,Te),He===null?Ce=be:He.sibling=be,He=be);return Ne&&yi(W,Te),Ce}for(be=s(be);Te<J.length;Te++)Be=ne(be,W,Te,J[Te],ue),Be!==null&&(e&&Be.alternate!==null&&be.delete(Be.key===null?Te:Be.key),V=a(Be,V,Te),He===null?Ce=Be:He.sibling=Be,He=Be);return e&&be.forEach(function(cs){return t(W,cs)}),Ne&&yi(W,Te),Ce}function we(W,V,J,ue){if(J==null)throw Error(L(151));for(var Ce=null,He=null,be=V,Te=V=0,Be=null,Ue=J.next();be!==null&&!Ue.done;Te++,Ue=J.next()){be.index>Te?(Be=be,be=null):Be=be.sibling;var cs=ie(W,be,Ue.value,ue);if(cs===null){be===null&&(be=Be);break}e&&be&&cs.alternate===null&&t(W,be),V=a(cs,V,Te),He===null?Ce=cs:He.sibling=cs,He=cs,be=Be}if(Ue.done)return i(W,be),Ne&&yi(W,Te),Ce;if(be===null){for(;!Ue.done;Te++,Ue=J.next())Ue=he(W,Ue.value,ue),Ue!==null&&(V=a(Ue,V,Te),He===null?Ce=Ue:He.sibling=Ue,He=Ue);return Ne&&yi(W,Te),Ce}for(be=s(be);!Ue.done;Te++,Ue=J.next())Ue=ne(be,W,Te,Ue.value,ue),Ue!==null&&(e&&Ue.alternate!==null&&be.delete(Ue.key===null?Te:Ue.key),V=a(Ue,V,Te),He===null?Ce=Ue:He.sibling=Ue,He=Ue);return e&&be.forEach(function(Um){return t(W,Um)}),Ne&&yi(W,Te),Ce}function We(W,V,J,ue){if(typeof J=="object"&&J!==null&&J.type===y&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case C:e:{for(var Ce=J.key;V!==null;){if(V.key===Ce){if(Ce=J.type,Ce===y){if(V.tag===7){i(W,V.sibling),ue=r(V,J.props.children),ue.return=W,W=ue;break e}}else if(V.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===_&&As(Ce)===V.type){i(W,V.sibling),ue=r(V,J.props),Hr(ue,J),ue.return=W,W=ue;break e}i(W,V);break}else t(W,V);V=V.sibling}J.type===y?(ue=ys(J.props.children,W.mode,ue,J.key),ue.return=W,W=ue):(ue=Bn(J.type,J.key,J.props,null,W.mode,ue),Hr(ue,J),ue.return=W,W=ue)}return p(W);case A:e:{for(Ce=J.key;V!==null;){if(V.key===Ce)if(V.tag===4&&V.stateNode.containerInfo===J.containerInfo&&V.stateNode.implementation===J.implementation){i(W,V.sibling),ue=r(V,J.children||[]),ue.return=W,W=ue;break e}else{i(W,V);break}else t(W,V);V=V.sibling}ue=yl(J,W.mode,ue),ue.return=W,W=ue}return p(W);case _:return J=As(J),We(W,V,J,ue)}if(se(J))return me(W,V,J,ue);if(j(J)){if(Ce=j(J),typeof Ce!="function")throw Error(L(150));return J=Ce.call(J),we(W,V,J,ue)}if(typeof J.then=="function")return We(W,V,In(J),ue);if(J.$$typeof===l)return We(W,V,jn(W,J),ue);Pn(W,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,V!==null&&V.tag===6?(i(W,V.sibling),ue=r(V,J),ue.return=W,W=ue):(i(W,V),ue=Sl(J,W.mode,ue),ue.return=W,W=ue),p(W)):i(W,V)}return function(W,V,J,ue){try{jr=0;var Ce=We(W,V,J,ue);return rr=null,Ce}catch(be){if(be===sr||be===Un)throw be;var He=jt(29,be,null,W.mode);return He.lanes=ue,He.return=W,He}}}var Ts=Lu(!0),Mu=Lu(!1),Vi=!1;function Ol(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bl(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 Ki(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(qe&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=On(e),vu(e,null,i),t}return Mn(e,s,t,i),On(e)}function Ur(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,xc(e,i)}}function Nl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,a=null;if(i=i.firstBaseUpdate,i!==null){do{var p={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};a===null?r=a=p:a=a.next=p,i=i.next}while(i!==null);a===null?r=a=t:a=a.next=t}else r=a=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:a,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 zl=!1;function qr(){if(zl){var e=ir;if(e!==null)throw e}}function Ir(e,t,i,s){zl=!1;var r=e.updateQueue;Vi=!1;var a=r.firstBaseUpdate,p=r.lastBaseUpdate,M=r.shared.pending;if(M!==null){r.shared.pending=null;var Y=M,$=Y.next;Y.next=null,p===null?a=$:p.next=$,p=Y;var ce=e.alternate;ce!==null&&(ce=ce.updateQueue,M=ce.lastBaseUpdate,M!==p&&(M===null?ce.firstBaseUpdate=$:M.next=$,ce.lastBaseUpdate=Y))}if(a!==null){var he=r.baseState;p=0,ce=$=Y=null,M=a;do{var ie=M.lane&-536870913,ne=ie!==M.lane;if(ne?(Oe&ie)===ie:(s&ie)===ie){ie!==0&&ie===tr&&(zl=!0),ce!==null&&(ce=ce.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var me=e,we=M;ie=t;var We=i;switch(we.tag){case 1:if(me=we.payload,typeof me=="function"){he=me.call(We,he,ie);break e}he=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=we.payload,ie=typeof me=="function"?me.call(We,he,ie):me,ie==null)break e;he=f({},he,ie);break e;case 2:Vi=!0}}ie=M.callback,ie!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=r.callbacks,ne===null?r.callbacks=[ie]:ne.push(ie))}else ne={lane:ie,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ce===null?($=ce=ne,Y=he):ce=ce.next=ne,p|=ie;if(M=M.next,M===null){if(M=r.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,r.lastBaseUpdate=ne,r.shared.pending=null}}while(!0);ce===null&&(Y=he),r.baseState=Y,r.firstBaseUpdate=$,r.lastBaseUpdate=ce,a===null&&(r.shared.lanes=0),$i|=p,e.lanes=p,e.memoizedState=he}}function Ou(e,t){if(typeof e!="function")throw Error(L(191,e));e.call(t)}function Bu(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Ou(i[e],t)}var nr=x(null),Gn=x(0);function Nu(e,t){e=Mi,Z(Gn,e),Z(nr,t),Mi=e|t.baseLanes}function jl(){Z(Gn,Mi),Z(nr,nr.current)}function Hl(){Mi=Gn.current,q(nr),q(Gn)}var Ht=x(null),Zt=null;function Wi(e){var t=e.alternate;Z(st,st.current&1),Z(Ht,e),Zt===null&&(t===null||nr.current!==null||t.memoizedState!==null)&&(Zt=e)}function Ul(e){Z(st,st.current),Z(Ht,e),Zt===null&&(Zt=e)}function zu(e){e.tag===22?(Z(st,st.current),Z(Ht,e),Zt===null&&(Zt=e)):Qi()}function Qi(){Z(st,st.current),Z(Ht,Ht.current)}function Ut(e){q(Ht),Zt===e&&(Zt=null),q(st)}var st=x(0);function Fn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Vo(i)||Ko(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 wi=0,De=null,Ke=null,at=null,Yn=!1,ar=!1,Rs=!1,Vn=0,Pr=0,lr=null,Rv=0;function et(){throw Error(L(321))}function ql(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!zt(e[i],t[i]))return!1;return!0}function Il(e,t,i,s,r,a){return wi=a,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?bh:io,Rs=!1,a=i(s,r),Rs=!1,ar&&(a=Hu(t,i,s,r)),ju(e),a}function ju(e){I.H=Yr;var t=Ke!==null&&Ke.next!==null;if(wi=0,at=Ke=De=null,Yn=!1,Pr=0,lr=null,t)throw Error(L(300));e===null||lt||(e=e.dependencies,e!==null&&zn(e)&&(lt=!0))}function Hu(e,t,i,s){De=e;var r=0;do{if(ar&&(lr=null),Pr=0,ar=!1,25<=r)throw Error(L(301));if(r+=1,at=Ke=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}I.H=Sh,a=t(i,s)}while(ar);return a}function kv(){var e=I.H,t=e.useState()[0];return t=typeof t.then=="function"?Gr(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(De.flags|=1024),t}function Pl(){var e=Vn!==0;return Vn=0,e}function Gl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Fl(e){if(Yn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Yn=!1}wi=0,at=Ke=De=null,ar=!1,Pr=Vn=0,lr=null}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?De.memoizedState=at=e:at=at.next=e,at}function rt(){if(Ke===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=at===null?De.memoizedState:at.next;if(t!==null)at=t,Ke=e;else{if(e===null)throw De.alternate===null?Error(L(467)):Error(L(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},at===null?De.memoizedState=at=e:at=at.next=e}return at}function Kn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gr(e){var t=Pr;return Pr+=1,lr===null&&(lr=[]),e=Tu(lr,e,t),t=De,(at===null?t.memoizedState:at.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?bh:io),e}function Xn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gr(e);if(e.$$typeof===l)return gt(e)}throw Error(L(438,String(e)))}function Yl(e){var t=null,i=De.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=De.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Kn(),De.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]=U;return t.index++,i}function Ei(e,t){return typeof t=="function"?t(e):t}function Wn(e){var t=rt();return Vl(t,Ke,e)}function Vl(e,t,i){var s=e.queue;if(s===null)throw Error(L(311));s.lastRenderedReducer=i;var r=e.baseQueue,a=s.pending;if(a!==null){if(r!==null){var p=r.next;r.next=a.next,a.next=p}t.baseQueue=r=a,s.pending=null}if(a=e.baseState,r===null)e.memoizedState=a;else{t=r.next;var M=p=null,Y=null,$=t,ce=!1;do{var he=$.lane&-536870913;if(he!==$.lane?(Oe&he)===he:(wi&he)===he){var ie=$.revertLane;if(ie===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),he===tr&&(ce=!0);else if((wi&ie)===ie){$=$.next,ie===tr&&(ce=!0);continue}else he={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},Y===null?(M=Y=he,p=a):Y=Y.next=he,De.lanes|=ie,$i|=ie;he=$.action,Rs&&i(a,he),a=$.hasEagerState?$.eagerState:i(a,he)}else ie={lane:he,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},Y===null?(M=Y=ie,p=a):Y=Y.next=ie,De.lanes|=he,$i|=he;$=$.next}while($!==null&&$!==t);if(Y===null?p=a:Y.next=M,!zt(a,e.memoizedState)&&(lt=!0,ce&&(i=ir,i!==null)))throw i;e.memoizedState=a,e.baseState=p,e.baseQueue=Y,s.lastRenderedState=a}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Kl(e){var t=rt(),i=t.queue;if(i===null)throw Error(L(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,a=t.memoizedState;if(r!==null){i.pending=null;var p=r=r.next;do a=e(a,p.action),p=p.next;while(p!==r);zt(a,t.memoizedState)||(lt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),i.lastRenderedState=a}return[a,s]}function Uu(e,t,i){var s=De,r=rt(),a=Ne;if(a){if(i===void 0)throw Error(L(407));i=i()}else i=t();var p=!zt((Ke||r).memoizedState,i);if(p&&(r.memoizedState=i,lt=!0),r=r.queue,Ql(Pu.bind(null,s,r,e),[e]),r.getSnapshot!==t||p||at!==null&&at.memoizedState.tag&1){if(s.flags|=2048,or(9,{destroy:void 0},Iu.bind(null,s,r,i,t),null),Qe===null)throw Error(L(349));a||(wi&127)!==0||qu(s,t,i)}return i}function qu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=De.updateQueue,t===null?(t=Kn(),De.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Iu(e,t,i,s){t.value=i,t.getSnapshot=s,Gu(t)&&Fu(e)}function Pu(e,t,i){return i(function(){Gu(t)&&Fu(e)})}function Gu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!zt(e,i)}catch{return!0}}function Fu(e){var t=Ss(e,2);t!==null&&Nt(t,e,2)}function Xl(e){var t=Dt();if(typeof e=="function"){var i=e;if(e=i(),Rs){oi(!0);try{i()}finally{oi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:e},t}function Yu(e,t,i,s){return e.baseState=i,Vl(e,Ke,typeof s=="function"?s:Ei)}function Lv(e,t,i,s,r){if(Jn(e))throw Error(L(485));if(e=t.action,e!==null){var a={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){a.listeners.push(p)}};I.T!==null?i(!0):a.isTransition=!1,s(a),i=t.pending,i===null?(a.next=t.pending=a,Vu(t,a)):(a.next=i.next,t.pending=i.next=a)}}function Vu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var a=I.T,p={};I.T=p;try{var M=i(r,s),Y=I.S;Y!==null&&Y(p,M),Ku(e,t,M)}catch($){Wl(e,t,$)}finally{a!==null&&p.types!==null&&(a.types=p.types),I.T=a}}else try{a=i(r,s),Ku(e,t,a)}catch($){Wl(e,t,$)}}function Ku(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Xu(e,t,s)},function(s){return Wl(e,t,s)}):Xu(e,t,i)}function Xu(e,t,i){t.status="fulfilled",t.value=i,Wu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Vu(e,i)))}function Wl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Wu(t),t=t.next;while(t!==s)}e.action=null}function Wu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qu(e,t){return t}function Zu(e,t){if(Ne){var i=Qe.formState;if(i!==null){e:{var s=De;if(Ne){if(Ze){t:{for(var r=Ze,a=Qt;r.nodeType!==8;){if(!a){r=null;break t}if(r=Jt(r.nextSibling),r===null){r=null;break t}}a=r.data,r=a==="F!"||a==="F"?r:null}if(r){Ze=Jt(r.nextSibling),s=r.data==="F!";break e}}Fi(s)}s=!1}s&&(t=i[0])}}return i=Dt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qu,lastRenderedState:t},i.queue=s,i=mh.bind(null,De,s),s.dispatch=i,s=Xl(!1),a=to.bind(null,De,!1,s.queue),s=Dt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=Lv.bind(null,De,r,a,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function Ju(e){var t=rt();return $u(t,Ke,e)}function $u(e,t,i){if(t=Vl(e,t,Qu)[0],e=Wn(Ei)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Gr(t)}catch(p){throw p===sr?Un:p}else s=t;t=rt();var r=t.queue,a=r.dispatch;return i!==t.memoizedState&&(De.flags|=2048,or(9,{destroy:void 0},Mv.bind(null,r,i),null)),[s,a,e]}function Mv(e,t){e.action=t}function eh(e){var t=rt(),i=Ke;if(i!==null)return $u(t,i,e);rt(),t=t.memoizedState,i=rt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function or(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=De.updateQueue,t===null&&(t=Kn(),De.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 th(){return rt().memoizedState}function Qn(e,t,i,s){var r=Dt();De.flags|=e,r.memoizedState=or(1|t,{destroy:void 0},i,s===void 0?null:s)}function Zn(e,t,i,s){var r=rt();s=s===void 0?null:s;var a=r.memoizedState.inst;Ke!==null&&s!==null&&ql(s,Ke.memoizedState.deps)?r.memoizedState=or(t,a,i,s):(De.flags|=e,r.memoizedState=or(1|t,a,i,s))}function ih(e,t){Qn(8390656,8,e,t)}function Ql(e,t){Zn(2048,8,e,t)}function Ov(e){De.flags|=4;var t=De.updateQueue;if(t===null)t=Kn(),De.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function sh(e){var t=rt().memoizedState;return Ov({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(L(440));return t.impl.apply(void 0,arguments)}}function rh(e,t){return Zn(4,2,e,t)}function nh(e,t){return Zn(4,4,e,t)}function ah(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 lh(e,t,i){i=i!=null?i.concat([e]):null,Zn(4,4,ah.bind(null,t,e),i)}function Zl(){}function oh(e,t){var i=rt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ql(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function ch(e,t){var i=rt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ql(t,s[1]))return s[0];if(s=e(),Rs){oi(!0);try{e()}finally{oi(!1)}}return i.memoizedState=[s,t],s}function Jl(e,t,i){return i===void 0||(wi&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=hf(),De.lanes|=e,$i|=e,i)}function uh(e,t,i,s){return zt(i,t)?i:nr.current!==null?(e=Jl(e,i,s),zt(e,t)||(lt=!0),e):(wi&42)===0||(wi&1073741824)!==0&&(Oe&261930)===0?(lt=!0,e.memoizedState=i):(e=hf(),De.lanes|=e,$i|=e,t)}function hh(e,t,i,s,r){var a=X.p;X.p=a!==0&&8>a?a:8;var p=I.T,M={};I.T=M,to(e,!1,t,i);try{var Y=r(),$=I.S;if($!==null&&$(M,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var ce=Tv(Y,s);Fr(e,t,ce,Pt(e))}else Fr(e,t,s,Pt(e))}catch(he){Fr(e,t,{then:function(){},status:"rejected",reason:he},Pt())}finally{X.p=a,p!==null&&M.types!==null&&(p.types=M.types),I.T=p}}function Bv(){}function $l(e,t,i,s){if(e.tag!==5)throw Error(L(476));var r=fh(e).queue;hh(e,r,t,T,i===null?Bv:function(){return dh(e),i(s)})}function fh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:T,baseState:T,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:T},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function dh(e){var t=fh(e);t.next===null&&(t=e.alternate.memoizedState),Fr(e,t.next.queue,{},Pt())}function eo(){return gt(on)}function _h(){return rt().memoizedState}function vh(){return rt().memoizedState}function Nv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Pt();e=Ki(i);var s=Xi(t,e,i);s!==null&&(Nt(s,t,i),Ur(s,t,i)),t={cache:Rl()},e.payload=t;return}t=t.return}}function zv(e,t,i){var s=Pt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Jn(e)?gh(t,i):(i=pl(e,t,i,s),i!==null&&(Nt(i,e,s),ph(i,t,s)))}function mh(e,t,i){var s=Pt();Fr(e,t,i,s)}function Fr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Jn(e))gh(t,r);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var p=t.lastRenderedState,M=a(p,i);if(r.hasEagerState=!0,r.eagerState=M,zt(M,p))return Mn(e,t,r,0),Qe===null&&Ln(),!1}catch{}if(i=pl(e,t,r,s),i!==null)return Nt(i,e,s),ph(i,t,s),!0}return!1}function to(e,t,i,s){if(s={lane:2,revertLane:Bo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Jn(e)){if(t)throw Error(L(479))}else t=pl(e,i,s,2),t!==null&&Nt(t,e,2)}function Jn(e){var t=e.alternate;return e===De||t!==null&&t===De}function gh(e,t){ar=Yn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function ph(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,xc(e,i)}}var Yr={readContext:gt,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};Yr.useEffectEvent=et;var bh={readContext:gt,use:Xn,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:ih,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Qn(4194308,4,ah.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Qn(4194308,4,e,t)},useInsertionEffect:function(e,t){Qn(4,2,e,t)},useMemo:function(e,t){var i=Dt();t=t===void 0?null:t;var s=e();if(Rs){oi(!0);try{e()}finally{oi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Dt();if(i!==void 0){var r=i(t);if(Rs){oi(!0);try{i(t)}finally{oi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=zv.bind(null,De,e),[s.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:function(e){e=Xl(e);var t=e.queue,i=mh.bind(null,De,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Zl,useDeferredValue:function(e,t){var i=Dt();return Jl(i,e,t)},useTransition:function(){var e=Xl(!1);return e=hh.bind(null,De,e.queue,!0,!1),Dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=De,r=Dt();if(Ne){if(i===void 0)throw Error(L(407));i=i()}else{if(i=t(),Qe===null)throw Error(L(349));(Oe&127)!==0||qu(s,t,i)}r.memoizedState=i;var a={value:i,getSnapshot:t};return r.queue=a,ih(Pu.bind(null,s,a,e),[e]),s.flags|=2048,or(9,{destroy:void 0},Iu.bind(null,s,a,i,t),null),i},useId:function(){var e=Dt(),t=Qe.identifierPrefix;if(Ne){var i=ui,s=ci;i=(s&~(1<<32-Ct(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Vn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Rv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:eo,useFormState:Zu,useActionState:Zu,useOptimistic:function(e){var t=Dt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=to.bind(null,De,!0,i),i.dispatch=t,[e,t]},useMemoCache:Yl,useCacheRefresh:function(){return Dt().memoizedState=Nv.bind(null,De)},useEffectEvent:function(e){var t=Dt(),i={impl:e};return t.memoizedState=i,function(){if((qe&2)!==0)throw Error(L(440));return i.impl.apply(void 0,arguments)}}},io={readContext:gt,use:Xn,useCallback:oh,useContext:gt,useEffect:Ql,useImperativeHandle:lh,useInsertionEffect:rh,useLayoutEffect:nh,useMemo:ch,useReducer:Wn,useRef:th,useState:function(){return Wn(Ei)},useDebugValue:Zl,useDeferredValue:function(e,t){var i=rt();return uh(i,Ke.memoizedState,e,t)},useTransition:function(){var e=Wn(Ei)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Gr(e),t]},useSyncExternalStore:Uu,useId:_h,useHostTransitionStatus:eo,useFormState:Ju,useActionState:Ju,useOptimistic:function(e,t){var i=rt();return Yu(i,Ke,e,t)},useMemoCache:Yl,useCacheRefresh:vh};io.useEffectEvent=sh;var Sh={readContext:gt,use:Xn,useCallback:oh,useContext:gt,useEffect:Ql,useImperativeHandle:lh,useInsertionEffect:rh,useLayoutEffect:nh,useMemo:ch,useReducer:Kl,useRef:th,useState:function(){return Kl(Ei)},useDebugValue:Zl,useDeferredValue:function(e,t){var i=rt();return Ke===null?Jl(i,e,t):uh(i,Ke.memoizedState,e,t)},useTransition:function(){var e=Kl(Ei)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Gr(e),t]},useSyncExternalStore:Uu,useId:_h,useHostTransitionStatus:eo,useFormState:eh,useActionState:eh,useOptimistic:function(e,t){var i=rt();return Ke!==null?Yu(i,Ke,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Yl,useCacheRefresh:vh};Sh.useEffectEvent=sh;function so(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:f({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var ro={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Pt(),r=Ki(s);r.payload=t,i!=null&&(r.callback=i),t=Xi(e,r,s),t!==null&&(Nt(t,e,s),Ur(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Pt(),r=Ki(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Xi(e,r,s),t!==null&&(Nt(t,e,s),Ur(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Pt(),s=Ki(i);s.tag=2,t!=null&&(s.callback=t),t=Xi(e,s,i),t!==null&&(Nt(t,e,i),Ur(t,e,i))}};function yh(e,t,i,s,r,a,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,a,p):t.prototype&&t.prototype.isPureReactComponent?!Lr(i,s)||!Lr(r,a):!0}function Ch(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&&ro.enqueueReplaceState(t,t.state,null)}function ks(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=f({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function xh(e){kn(e)}function wh(e){console.error(e)}function Eh(e){kn(e)}function $n(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Ah(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function no(e,t,i){return i=Ki(i),i.tag=3,i.payload={element:null},i.callback=function(){$n(e,t)},i}function Dh(e){return e=Ki(e),e.tag=3,e}function Th(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var a=s.value;e.payload=function(){return r(a)},e.callback=function(){Ah(t,i,s)}}var p=i.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Ah(t,i,s),typeof r!="function"&&(es===null?es=new Set([this]):es.add(this));var M=s.stack;this.componentDidCatch(s.value,{componentStack:M!==null?M:""})})}function jv(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&er(t,i,r,!0),i=Ht.current,i!==null){switch(i.tag){case 31:case 13:return Zt===null?ha():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===qn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Lo(e,s,r)),!1;case 22:return i.flags|=65536,s===qn?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)),Lo(e,s,r)),!1}throw Error(L(435,i.tag))}return Lo(e,s,r),ha(),!1}if(Ne)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==wl&&(e=Error(L(422),{cause:s}),Br(Kt(e,i)))):(s!==wl&&(t=Error(L(423),{cause:s}),Br(Kt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Kt(s,i),r=no(e.stateNode,s,r),Nl(e,r),tt!==4&&(tt=2)),!1;var a=Error(L(520),{cause:s});if(a=Kt(a,i),$r===null?$r=[a]:$r.push(a),tt!==4&&(tt=2),t===null)return!0;s=Kt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=no(i.stateNode,s,e),Nl(i,e),!1;case 1:if(t=i.type,a=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(es===null||!es.has(a))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Dh(r),Th(r,e,i,s),Nl(i,r),!1}i=i.return}while(i!==null);return!1}var ao=Error(L(461)),lt=!1;function pt(e,t,i,s){t.child=e===null?Mu(t,null,i,s):Ts(t,e.child,i,s)}function Rh(e,t,i,s,r){i=i.render;var a=t.ref;if("ref"in s){var p={};for(var M in s)M!=="ref"&&(p[M]=s[M])}else p=s;return ws(t),s=Il(e,t,i,p,a,r),M=Pl(),e!==null&&!lt?(Gl(e,t,r),Ai(e,t,r)):(Ne&&M&&Cl(t),t.flags|=1,pt(e,t,s,r),t.child)}function kh(e,t,i,s,r){if(e===null){var a=i.type;return typeof a=="function"&&!bl(a)&&a.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=a,Lh(e,t,a,s,r)):(e=Bn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!vo(e,r)){var p=a.memoizedProps;if(i=i.compare,i=i!==null?i:Lr,i(p,s)&&e.ref===t.ref)return Ai(e,t,r)}return t.flags|=1,e=Si(a,s),e.ref=t.ref,e.return=t,t.child=e}function Lh(e,t,i,s,r){if(e!==null){var a=e.memoizedProps;if(Lr(a,s)&&e.ref===t.ref)if(lt=!1,t.pendingProps=s=a,vo(e,r))(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,Ai(e,t,r)}return lo(e,t,i,s,r)}function Mh(e,t,i,s){var r=s.children,a=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(a=a!==null?a.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~a}else s=0,t.child=null;return Oh(e,t,a,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hn(t,a!==null?a.cachePool:null),a!==null?Nu(t,a):jl(),zu(t);else return s=t.lanes=536870912,Oh(e,t,a!==null?a.baseLanes|i:i,i,s)}else a!==null?(Hn(t,a.cachePool),Nu(t,a),Qi(),t.memoizedState=null):(e!==null&&Hn(t,null),jl(),Qi());return pt(e,t,r,i),t.child}function Vr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Oh(e,t,i,s,r){var a=Ll();return a=a===null?null:{parent:nt._currentValue,pool:a},t.memoizedState={baseLanes:i,cachePool:a},e!==null&&Hn(t,null),jl(),zu(t),e!==null&&er(e,t,s,!0),t.childLanes=r,null}function ea(e,t){return t=ia({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bh(e,t,i){return Ts(t,e.child,null,i),e=ea(t,t.pendingProps),e.flags|=2,Ut(t),t.memoizedState=null,e}function Hv(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(s.mode==="hidden")return e=ea(t,s),t.lanes=536870912,Vr(null,e);if(Ul(t),(e=Ze)?(e=Kf(e,Qt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pi!==null?{id:ci,overflow:ui}:null,retryLane:536870912,hydrationErrors:null},i=gu(e),i.return=t,t.child=i,mt=t,Ze=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return ea(t,s)}var a=e.memoizedState;if(a!==null){var p=a.dehydrated;if(Ul(t),r)if(t.flags&256)t.flags&=-257,t=Bh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(L(558));else if(lt||er(e,t,i,!1),r=(i&e.childLanes)!==0,lt||r){if(s=Qe,s!==null&&(p=wc(s,i),p!==0&&p!==a.retryLane))throw a.retryLane=p,Ss(e,p),Nt(s,e,p),ao;ha(),t=Bh(e,t,i)}else e=a.treeContext,Ze=Jt(p.nextSibling),mt=t,Ne=!0,Gi=null,Qt=!1,e!==null&&Su(t,e),t=ea(t,s),t.flags|=4096;return t}return e=Si(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ta(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(L(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function lo(e,t,i,s,r){return ws(t),i=Il(e,t,i,s,void 0,r),s=Pl(),e!==null&&!lt?(Gl(e,t,r),Ai(e,t,r)):(Ne&&s&&Cl(t),t.flags|=1,pt(e,t,i,r),t.child)}function Nh(e,t,i,s,r,a){return ws(t),t.updateQueue=null,i=Hu(t,s,i,r),ju(e),s=Pl(),e!==null&&!lt?(Gl(e,t,a),Ai(e,t,a)):(Ne&&s&&Cl(t),t.flags|=1,pt(e,t,i,a),t.child)}function zh(e,t,i,s,r){if(ws(t),t.stateNode===null){var a=Qs,p=i.contextType;typeof p=="object"&&p!==null&&(a=gt(p)),a=new i(s,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=ro,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=s,a.state=t.memoizedState,a.refs={},Ol(t),p=i.contextType,a.context=typeof p=="object"&&p!==null?gt(p):Qs,a.state=t.memoizedState,p=i.getDerivedStateFromProps,typeof p=="function"&&(so(t,i,p,s),a.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(p=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),p!==a.state&&ro.enqueueReplaceState(a,a.state,null),Ir(t,s,a,r),qr(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){a=t.stateNode;var M=t.memoizedProps,Y=ks(i,M);a.props=Y;var $=a.context,ce=i.contextType;p=Qs,typeof ce=="object"&&ce!==null&&(p=gt(ce));var he=i.getDerivedStateFromProps;ce=typeof he=="function"||typeof a.getSnapshotBeforeUpdate=="function",M=t.pendingProps!==M,ce||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(M||$!==p)&&Ch(t,a,s,p),Vi=!1;var ie=t.memoizedState;a.state=ie,Ir(t,s,a,r),qr(),$=t.memoizedState,M||ie!==$||Vi?(typeof he=="function"&&(so(t,i,he,s),$=t.memoizedState),(Y=Vi||yh(t,i,Y,s,ie,$,p))?(ce||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=$),a.props=s,a.state=$,a.context=p,s=Y):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{a=t.stateNode,Bl(e,t),p=t.memoizedProps,ce=ks(i,p),a.props=ce,he=t.pendingProps,ie=a.context,$=i.contextType,Y=Qs,typeof $=="object"&&$!==null&&(Y=gt($)),M=i.getDerivedStateFromProps,($=typeof M=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(p!==he||ie!==Y)&&Ch(t,a,s,Y),Vi=!1,ie=t.memoizedState,a.state=ie,Ir(t,s,a,r),qr();var ne=t.memoizedState;p!==he||ie!==ne||Vi||e!==null&&e.dependencies!==null&&zn(e.dependencies)?(typeof M=="function"&&(so(t,i,M,s),ne=t.memoizedState),(ce=Vi||yh(t,i,ce,s,ie,ne,Y)||e!==null&&e.dependencies!==null&&zn(e.dependencies))?($||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(s,ne,Y),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(s,ne,Y)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||p===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ne),a.props=s,a.state=ne,a.context=Y,s=ce):(typeof a.componentDidUpdate!="function"||p===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),s=!1)}return a=s,ta(e,t),s=(t.flags&128)!==0,a||s?(a=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&s?(t.child=Ts(t,e.child,null,r),t.child=Ts(t,null,i,r)):pt(e,t,i,r),t.memoizedState=a.state,e=t.child):e=Ai(e,t,r),e}function jh(e,t,i,s){return Cs(),t.flags|=256,pt(e,t,i,s),t.child}var oo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function co(e){return{baseLanes:e,cachePool:Au()}}function uo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=It),e}function Hh(e,t,i){var s=t.pendingProps,r=!1,a=(t.flags&128)!==0,p;if((p=a)||(p=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),p&&(r=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(r?Wi(t):Qi(),(e=Ze)?(e=Kf(e,Qt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pi!==null?{id:ci,overflow:ui}:null,retryLane:536870912,hydrationErrors:null},i=gu(e),i.return=t,t.child=i,mt=t,Ze=null)):e=null,e===null)throw Fi(t);return Ko(e)?t.lanes=32:t.lanes=536870912,null}var M=s.children;return s=s.fallback,r?(Qi(),r=t.mode,M=ia({mode:"hidden",children:M},r),s=ys(s,r,i,null),M.return=t,s.return=t,M.sibling=s,t.child=M,s=t.child,s.memoizedState=co(i),s.childLanes=uo(e,p,i),t.memoizedState=oo,Vr(null,s)):(Wi(t),ho(t,M))}var Y=e.memoizedState;if(Y!==null&&(M=Y.dehydrated,M!==null)){if(a)t.flags&256?(Wi(t),t.flags&=-257,t=fo(e,t,i)):t.memoizedState!==null?(Qi(),t.child=e.child,t.flags|=128,t=null):(Qi(),M=s.fallback,r=t.mode,s=ia({mode:"visible",children:s.children},r),M=ys(M,r,i,null),M.flags|=2,s.return=t,M.return=t,s.sibling=M,t.child=s,Ts(t,e.child,null,i),s=t.child,s.memoizedState=co(i),s.childLanes=uo(e,p,i),t.memoizedState=oo,t=Vr(null,s));else if(Wi(t),Ko(M)){if(p=M.nextSibling&&M.nextSibling.dataset,p)var $=p.dgst;p=$,s=Error(L(419)),s.stack="",s.digest=p,Br({value:s,source:null,stack:null}),t=fo(e,t,i)}else if(lt||er(e,t,i,!1),p=(i&e.childLanes)!==0,lt||p){if(p=Qe,p!==null&&(s=wc(p,i),s!==0&&s!==Y.retryLane))throw Y.retryLane=s,Ss(e,s),Nt(p,e,s),ao;Vo(M)||ha(),t=fo(e,t,i)}else Vo(M)?(t.flags|=192,t.child=e.child,t=null):(e=Y.treeContext,Ze=Jt(M.nextSibling),mt=t,Ne=!0,Gi=null,Qt=!1,e!==null&&Su(t,e),t=ho(t,s.children),t.flags|=4096);return t}return r?(Qi(),M=s.fallback,r=t.mode,Y=e.child,$=Y.sibling,s=Si(Y,{mode:"hidden",children:s.children}),s.subtreeFlags=Y.subtreeFlags&65011712,$!==null?M=Si($,M):(M=ys(M,r,i,null),M.flags|=2),M.return=t,s.return=t,s.sibling=M,t.child=s,Vr(null,s),s=t.child,M=e.child.memoizedState,M===null?M=co(i):(r=M.cachePool,r!==null?(Y=nt._currentValue,r=r.parent!==Y?{parent:Y,pool:Y}:r):r=Au(),M={baseLanes:M.baseLanes|i,cachePool:r}),s.memoizedState=M,s.childLanes=uo(e,p,i),t.memoizedState=oo,Vr(e.child,s)):(Wi(t),i=e.child,e=i.sibling,i=Si(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=i,t.memoizedState=null,i)}function ho(e,t){return t=ia({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ia(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function fo(e,t,i){return Ts(t,e.child,null,i),e=ho(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Uh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Dl(e.return,t,i)}function _o(e,t,i,s,r,a){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:a}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=s,p.tail=i,p.tailMode=r,p.treeForkCount=a)}function qh(e,t,i){var s=t.pendingProps,r=s.revealOrder,a=s.tail;s=s.children;var p=st.current,M=(p&2)!==0;if(M?(p=p&1|2,t.flags|=128):p&=1,Z(st,p),pt(e,t,s,i),s=Ne?Or:0,!M&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uh(e,i,t);else if(e.tag===19)Uh(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&Fn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),_o(t,!1,r,i,a,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Fn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}_o(t,!0,i,null,a,s);break;case"together":_o(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ai(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),$i|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(er(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,i=Si(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Si(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function vo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zn(e)))}function Uv(e,t,i){switch(t.tag){case 3:Q(t,t.stateNode.containerInfo),Yi(t,nt,e.memoizedState.cache),Cs();break;case 27:case 5:oe(t);break;case 4:Q(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ul(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Wi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Hh(e,t,i):(Wi(t),e=Ai(e,t,i),e!==null?e.sibling:null);Wi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(er(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return qh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Z(st,st.current),s)break;return null;case 22:return t.lanes=0,Mh(e,t,i,t.pendingProps);case 24:Yi(t,nt,e.memoizedState.cache)}return Ai(e,t,i)}function Ih(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)lt=!0;else{if(!vo(e,i)&&(t.flags&128)===0)return lt=!1,Uv(e,t,i);lt=(e.flags&131072)!==0}else lt=!1,Ne&&(t.flags&1048576)!==0&&bu(t,Or,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")bl(e)?(s=ks(e,s),t.tag=1,t=zh(null,t,e,s,i)):(t.tag=0,t=lo(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===v){t.tag=11,t=Rh(null,t,e,s,i);break e}else if(r===D){t.tag=14,t=kh(null,t,e,s,i);break e}}throw t=ee(e)||e,Error(L(306,t,""))}}return t;case 0:return lo(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=ks(s,t.pendingProps),zh(e,t,s,r,i);case 3:e:{if(Q(t,t.stateNode.containerInfo),e===null)throw Error(L(387));s=t.pendingProps;var a=t.memoizedState;r=a.element,Bl(e,t),Ir(t,s,null,i);var p=t.memoizedState;if(s=p.cache,Yi(t,nt,s),s!==a.cache&&Tl(t,[nt],i,!0),qr(),s=p.element,a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=jh(e,t,s,i);break e}else if(s!==r){r=Kt(Error(L(424)),t),Br(r),t=jh(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ze=Jt(e.firstChild),mt=t,Ne=!0,Gi=null,Qt=!0,i=Mu(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Cs(),s===r){t=Ai(e,t,i);break e}pt(e,t,s,i)}t=t.child}return t;case 26:return ta(e,t),e===null?(i=$f(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ne||(i=t.type,e=t.pendingProps,s=pa(de.current).createElement(i),s[vt]=t,s[Rt]=e,bt(s,i,e),ft(s),t.stateNode=s):t.memoizedState=$f(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return oe(t),e===null&&Ne&&(s=t.stateNode=Qf(t.type,t.pendingProps,de.current),mt=t,Qt=!0,r=Ze,rs(t.type)?(Xo=r,Ze=Jt(s.firstChild)):Ze=r),pt(e,t,t.pendingProps.children,i),ta(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((r=s=Ze)&&(s=vm(s,t.type,t.pendingProps,Qt),s!==null?(t.stateNode=s,mt=t,Ze=Jt(s.firstChild),Qt=!1,r=!0):r=!1),r||Fi(t)),oe(t),r=t.type,a=t.pendingProps,p=e!==null?e.memoizedProps:null,s=a.children,Go(r,a)?s=null:p!==null&&Go(r,p)&&(t.flags|=32),t.memoizedState!==null&&(r=Il(e,t,kv,null,null,i),on._currentValue=r),ta(e,t),pt(e,t,s,i),t.child;case 6:return e===null&&Ne&&((e=i=Ze)&&(i=mm(i,t.pendingProps,Qt),i!==null?(t.stateNode=i,mt=t,Ze=null,e=!0):e=!1),e||Fi(t)),null;case 13:return Hh(e,t,i);case 4:return Q(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ts(t,null,s,i):pt(e,t,s,i),t.child;case 11:return Rh(e,t,t.type,t.pendingProps,i);case 7:return pt(e,t,t.pendingProps,i),t.child;case 8:return pt(e,t,t.pendingProps.children,i),t.child;case 12:return pt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Yi(t,t.type,s.value),pt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,ws(t),r=gt(r),s=s(r),t.flags|=1,pt(e,t,s,i),t.child;case 14:return kh(e,t,t.type,t.pendingProps,i);case 15:return Lh(e,t,t.type,t.pendingProps,i);case 19:return qh(e,t,i);case 31:return Hv(e,t,i);case 22:return Mh(e,t,i,t.pendingProps);case 24:return ws(t),s=gt(nt),e===null?(r=Ll(),r===null&&(r=Qe,a=Rl(),r.pooledCache=a,a.refCount++,a!==null&&(r.pooledCacheLanes|=i),r=a),t.memoizedState={parent:s,cache:r},Ol(t),Yi(t,nt,r)):((e.lanes&i)!==0&&(Bl(e,t),Ir(t,null,null,i),qr()),r=e.memoizedState,a=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Yi(t,nt,s)):(s=a.cache,Yi(t,nt,s),s!==r.cache&&Tl(t,[nt],i,!0))),pt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(L(156,t.tag))}function Di(e){e.flags|=4}function mo(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(vf())e.flags|=8192;else throw Ds=qn,Ml}else e.flags&=-16777217}function Ph(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!rd(t))if(vf())e.flags|=8192;else throw Ds=qn,Ml}function sa(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ve():536870912,e.lanes|=t,fr|=t)}function Kr(e,t){if(!Ne)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 Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function qv(e,t,i){var s=t.pendingProps;switch(xl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Je(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),xi(nt),te(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&($s(t)?Di(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,El())),Je(t),null;case 26:var r=t.type,a=t.memoizedState;return e===null?(Di(t),a!==null?(Je(t),Ph(t,a)):(Je(t),mo(t,r,null,s,i))):a?a!==e.memoizedState?(Di(t),Je(t),Ph(t,a)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Di(t),Je(t),mo(t,r,e,s,i)),null;case 27:if(ye(t),i=de.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(!s){if(t.stateNode===null)throw Error(L(166));return Je(t),null}e=re.current,$s(t)?yu(t):(e=Qf(r,s,i),t.stateNode=e,Di(t))}return Je(t),null;case 5:if(ye(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(!s){if(t.stateNode===null)throw Error(L(166));return Je(t),null}if(a=re.current,$s(t))yu(t);else{var p=pa(de.current);switch(a){case 1:a=p.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:a=p.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":a=p.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":a=p.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":a=p.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof s.is=="string"?p.createElement("select",{is:s.is}):p.createElement("select"),s.multiple?a.multiple=!0:s.size&&(a.size=s.size);break;default:a=typeof s.is=="string"?p.createElement(r,{is:s.is}):p.createElement(r)}}a[vt]=t,a[Rt]=s;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)a.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=a;e:switch(bt(a,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Di(t)}}return Je(t),mo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Di(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(L(166));if(e=de.current,$s(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=mt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[vt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Uf(e.nodeValue,i)),e||Fi(t,!0)}else e=pa(e).createTextNode(s),e[vt]=t,t.stateNode=e}return Je(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=$s(t),i!==null){if(e===null){if(!s)throw Error(L(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(557));e[vt]=t}else Cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else i=El(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Ut(t),t):(Ut(t),null);if((t.flags&128)!==0)throw Error(L(558))}return Je(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=$s(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(L(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(L(317));r[vt]=t}else Cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),r=!1}else r=El(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Ut(t),t):(Ut(t),null)}return Ut(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),sa(t,t.updateQueue),Je(t),null);case 4:return te(),e===null&&Ho(t.stateNode.containerInfo),Je(t),null;case 10:return xi(t.type),Je(t),null;case 19:if(q(st),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)Kr(s,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Fn(e),a!==null){for(t.flags|=128,Kr(s,!1),e=a.updateQueue,t.updateQueue=e,sa(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)mu(i,e),i=i.sibling;return Z(st,st.current&1|2),Ne&&yi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Pe()>oa&&(t.flags|=128,r=!0,Kr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Fn(a),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,sa(t,e),Kr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Ne)return Je(t),null}else 2*Pe()-s.renderingStartTime>oa&&i!==536870912&&(t.flags|=128,r=!0,Kr(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(e=s.last,e!==null?e.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Pe(),e.sibling=null,i=st.current,Z(st,r?i&1|2:i&1),Ne&&yi(t,s.treeForkCount),e):(Je(t),null);case 22:case 23:return Ut(t),Hl(),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&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),i=t.updateQueue,i!==null&&sa(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&&q(Es),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),xi(nt),Je(t),null;case 25:return null;case 30:return null}throw Error(L(156,t.tag))}function Iv(e,t){switch(xl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(nt),te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(Ut(t),t.alternate===null)throw Error(L(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ut(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(st),null;case 4:return te(),null;case 10:return xi(t.type),null;case 22:case 23:return Ut(t),Hl(),e!==null&&q(Es),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xi(nt),null;case 25:return null;default:return null}}function Gh(e,t){switch(xl(t),t.tag){case 3:xi(nt),te();break;case 26:case 27:case 5:ye(t);break;case 4:te();break;case 31:t.memoizedState!==null&&Ut(t);break;case 13:Ut(t);break;case 19:q(st);break;case 10:xi(t.type);break;case 22:case 23:Ut(t),Hl(),e!==null&&q(Es);break;case 24:xi(nt)}}function Xr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var a=i.create,p=i.inst;s=a(),p.destroy=s}i=i.next}while(i!==r)}}catch(M){Fe(t,t.return,M)}}function Zi(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var a=r.next;s=a;do{if((s.tag&e)===e){var p=s.inst,M=p.destroy;if(M!==void 0){p.destroy=void 0,r=t;var Y=i,$=M;try{$()}catch(ce){Fe(r,Y,ce)}}}s=s.next}while(s!==a)}}catch(ce){Fe(t,t.return,ce)}}function Fh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Bu(t,i)}catch(s){Fe(e,e.return,s)}}}function Yh(e,t,i){i.props=ks(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Fe(e,t,s)}}function Wr(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){Fe(e,t,r)}}function hi(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){Fe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){Fe(e,t,r)}else i.current=null}function Vh(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){Fe(e,e.return,r)}}function go(e,t,i){try{var s=e.stateNode;cm(s,e.type,i,t),s[Rt]=t}catch(r){Fe(e,e.return,r)}}function Kh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rs(e.type)||e.tag===4}function po(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kh(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&&rs(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 bo(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=pi));else if(s!==4&&(s===27&&rs(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(bo(e,t,i),e=e.sibling;e!==null;)bo(e,t,i),e=e.sibling}function ra(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&&rs(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ra(e,t,i),e=e.sibling;e!==null;)ra(e,t,i),e=e.sibling}function Xh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);bt(t,s,i),t[vt]=e,t[Rt]=i}catch(a){Fe(e,e.return,a)}}var Ti=!1,ot=!1,So=!1,Wh=typeof WeakSet=="function"?WeakSet:Set,dt=null;function Pv(e,t){if(e=e.containerInfo,Io=Ea,e=lu(e),fl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,a=s.focusNode;s=s.focusOffset;try{i.nodeType,a.nodeType}catch{i=null;break e}var p=0,M=-1,Y=-1,$=0,ce=0,he=e,ie=null;t:for(;;){for(var ne;he!==i||r!==0&&he.nodeType!==3||(M=p+r),he!==a||s!==0&&he.nodeType!==3||(Y=p+s),he.nodeType===3&&(p+=he.nodeValue.length),(ne=he.firstChild)!==null;)ie=he,he=ne;for(;;){if(he===e)break t;if(ie===i&&++$===r&&(M=p),ie===a&&++ce===s&&(Y=p),(ne=he.nextSibling)!==null)break;he=ie,ie=he.parentNode}he=ne}i=M===-1||Y===-1?null:{start:M,end:Y}}else i=null}i=i||{start:0,end:0}}else i=null;for(Po={focusedElem:e,selectionRange:i},Ea=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){switch(t=dt,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,i=t,r=a.memoizedProps,a=a.memoizedState,s=i.stateNode;try{var me=ks(i.type,r);e=s.getSnapshotBeforeUpdate(me,a),s.__reactInternalSnapshotBeforeUpdate=e}catch(we){Fe(i,i.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Yo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yo(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(L(163))}if(e=t.sibling,e!==null){e.return=t.return,dt=e;break}dt=t.return}}function Qh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ki(e,i),s&4&&Xr(5,i);break;case 1:if(ki(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(p){Fe(i,i.return,p)}else{var r=ks(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Fe(i,i.return,p)}}s&64&&Fh(i),s&512&&Wr(i,i.return);break;case 3:if(ki(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{Bu(e,t)}catch(p){Fe(i,i.return,p)}}break;case 27:t===null&&s&4&&Xh(i);case 26:case 5:ki(e,i),t===null&&s&4&&Vh(i),s&512&&Wr(i,i.return);break;case 12:ki(e,i);break;case 31:ki(e,i),s&4&&$h(e,i);break;case 13:ki(e,i),s&4&&ef(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Zv.bind(null,i),gm(e,i))));break;case 22:if(s=i.memoizedState!==null||Ti,!s){t=t!==null&&t.memoizedState!==null||ot,r=Ti;var a=ot;Ti=s,(ot=t)&&!a?Li(e,i,(i.subtreeFlags&8772)!==0):ki(e,i),Ti=r,ot=a}break;case 30:break;default:ki(e,i)}}function Zh(e){var t=e.alternate;t!==null&&(e.alternate=null,Zh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Wa(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 $e=null,Lt=!1;function Ri(e,t,i){for(i=i.child;i!==null;)Jh(e,t,i),i=i.sibling}function Jh(e,t,i){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(li,i)}catch{}switch(i.tag){case 26:ot||hi(i,t),Ri(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ot||hi(i,t);var s=$e,r=Lt;rs(i.type)&&($e=i.stateNode,Lt=!1),Ri(e,t,i),nn(i.stateNode),$e=s,Lt=r;break;case 5:ot||hi(i,t);case 6:if(s=$e,r=Lt,$e=null,Ri(e,t,i),$e=s,Lt=r,$e!==null)if(Lt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(i.stateNode)}catch(a){Fe(i,t,a)}else try{$e.removeChild(i.stateNode)}catch(a){Fe(i,t,a)}break;case 18:$e!==null&&(Lt?(e=$e,Yf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Sr(e)):Yf($e,i.stateNode));break;case 4:s=$e,r=Lt,$e=i.stateNode.containerInfo,Lt=!0,Ri(e,t,i),$e=s,Lt=r;break;case 0:case 11:case 14:case 15:Zi(2,i,t),ot||Zi(4,i,t),Ri(e,t,i);break;case 1:ot||(hi(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Yh(i,t,s)),Ri(e,t,i);break;case 21:Ri(e,t,i);break;case 22:ot=(s=ot)||i.memoizedState!==null,Ri(e,t,i),ot=s;break;default:Ri(e,t,i)}}function $h(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Sr(e)}catch(i){Fe(t,t.return,i)}}}function ef(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Sr(e)}catch(i){Fe(t,t.return,i)}}function Gv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wh),t;default:throw Error(L(435,e.tag))}}function na(e,t){var i=Gv(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=Jv.bind(null,e,s);s.then(r,r)}})}function Mt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],a=e,p=t,M=p;e:for(;M!==null;){switch(M.tag){case 27:if(rs(M.type)){$e=M.stateNode,Lt=!1;break e}break;case 5:$e=M.stateNode,Lt=!1;break e;case 3:case 4:$e=M.stateNode.containerInfo,Lt=!0;break e}M=M.return}if($e===null)throw Error(L(160));Jh(a,p,r),$e=null,Lt=!1,a=r.alternate,a!==null&&(a.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)tf(t,e),t=t.sibling}var si=null;function tf(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(t,e),Ot(e),s&4&&(Zi(3,e,e.return),Xr(3,e),Zi(5,e,e.return));break;case 1:Mt(t,e),Ot(e),s&512&&(ot||i===null||hi(i,i.return)),s&64&&Ti&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=si;if(Mt(t,e),Ot(e),s&512&&(ot||i===null||hi(i,i.return)),s&4){var a=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":a=r.getElementsByTagName("title")[0],(!a||a[Cr]||a[vt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=r.createElement(s),r.head.insertBefore(a,r.querySelector("head > title"))),bt(a,s,i),a[vt]=e,ft(a),s=a;break e;case"link":var p=id("link","href",r).get(s+(i.href||""));if(p){for(var M=0;M<p.length;M++)if(a=p[M],a.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&a.getAttribute("rel")===(i.rel==null?null:i.rel)&&a.getAttribute("title")===(i.title==null?null:i.title)&&a.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){p.splice(M,1);break t}}a=r.createElement(s),bt(a,s,i),r.head.appendChild(a);break;case"meta":if(p=id("meta","content",r).get(s+(i.content||""))){for(M=0;M<p.length;M++)if(a=p[M],a.getAttribute("content")===(i.content==null?null:""+i.content)&&a.getAttribute("name")===(i.name==null?null:i.name)&&a.getAttribute("property")===(i.property==null?null:i.property)&&a.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&a.getAttribute("charset")===(i.charSet==null?null:i.charSet)){p.splice(M,1);break t}}a=r.createElement(s),bt(a,s,i),r.head.appendChild(a);break;default:throw Error(L(468,s))}a[vt]=e,ft(a),s=a}e.stateNode=s}else sd(r,e.type,e.stateNode);else e.stateNode=td(r,s,e.memoizedProps);else a!==s?(a===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):a.count--,s===null?sd(r,e.type,e.stateNode):td(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&go(e,e.memoizedProps,i.memoizedProps)}break;case 27:Mt(t,e),Ot(e),s&512&&(ot||i===null||hi(i,i.return)),i!==null&&s&4&&go(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Mt(t,e),Ot(e),s&512&&(ot||i===null||hi(i,i.return)),e.flags&32){r=e.stateNode;try{Gs(r,"")}catch(me){Fe(e,e.return,me)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,go(e,r,i!==null?i.memoizedProps:r)),s&1024&&(So=!0);break;case 6:if(Mt(t,e),Ot(e),s&4){if(e.stateNode===null)throw Error(L(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(me){Fe(e,e.return,me)}}break;case 3:if(ya=null,r=si,si=ba(t.containerInfo),Mt(t,e),si=r,Ot(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Sr(t.containerInfo)}catch(me){Fe(e,e.return,me)}So&&(So=!1,sf(e));break;case 4:s=si,si=ba(e.stateNode.containerInfo),Mt(t,e),Ot(e),si=s;break;case 12:Mt(t,e),Ot(e);break;case 31:Mt(t,e),Ot(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,na(e,s)));break;case 13:Mt(t,e),Ot(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(la=Pe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,na(e,s)));break;case 22:r=e.memoizedState!==null;var Y=i!==null&&i.memoizedState!==null,$=Ti,ce=ot;if(Ti=$||r,ot=ce||Y,Mt(t,e),ot=ce,Ti=$,Ot(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||Y||Ti||ot||Ls(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){Y=i=t;try{if(a=Y.stateNode,r)p=a.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{M=Y.stateNode;var he=Y.memoizedProps.style,ie=he!=null&&he.hasOwnProperty("display")?he.display:null;M.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(me){Fe(Y,Y.return,me)}}}else if(t.tag===6){if(i===null){Y=t;try{Y.stateNode.nodeValue=r?"":Y.memoizedProps}catch(me){Fe(Y,Y.return,me)}}}else if(t.tag===18){if(i===null){Y=t;try{var ne=Y.stateNode;r?Vf(ne,!0):Vf(Y.stateNode,!1)}catch(me){Fe(Y,Y.return,me)}}}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,na(e,i))));break;case 19:Mt(t,e),Ot(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,na(e,s)));break;case 30:break;case 21:break;default:Mt(t,e),Ot(e)}}function Ot(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Kh(s)){i=s;break}s=s.return}if(i==null)throw Error(L(160));switch(i.tag){case 27:var r=i.stateNode,a=po(e);ra(e,a,r);break;case 5:var p=i.stateNode;i.flags&32&&(Gs(p,""),i.flags&=-33);var M=po(e);ra(e,M,p);break;case 3:case 4:var Y=i.stateNode.containerInfo,$=po(e);bo(e,$,Y);break;default:throw Error(L(161))}}catch(ce){Fe(e,e.return,ce)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ki(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qh(e,t.alternate,t),t=t.sibling}function Ls(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Zi(4,t,t.return),Ls(t);break;case 1:hi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Yh(t,t.return,i),Ls(t);break;case 27:nn(t.stateNode);case 26:case 5:hi(t,t.return),Ls(t);break;case 22:t.memoizedState===null&&Ls(t);break;case 30:Ls(t);break;default:Ls(t)}e=e.sibling}}function Li(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,a=t,p=a.flags;switch(a.tag){case 0:case 11:case 15:Li(r,a,i),Xr(4,a);break;case 1:if(Li(r,a,i),s=a,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch($){Fe(s,s.return,$)}if(s=a,r=s.updateQueue,r!==null){var M=s.stateNode;try{var Y=r.shared.hiddenCallbacks;if(Y!==null)for(r.shared.hiddenCallbacks=null,r=0;r<Y.length;r++)Ou(Y[r],M)}catch($){Fe(s,s.return,$)}}i&&p&64&&Fh(a),Wr(a,a.return);break;case 27:Xh(a);case 26:case 5:Li(r,a,i),i&&s===null&&p&4&&Vh(a),Wr(a,a.return);break;case 12:Li(r,a,i);break;case 31:Li(r,a,i),i&&p&4&&$h(r,a);break;case 13:Li(r,a,i),i&&p&4&&ef(r,a);break;case 22:a.memoizedState===null&&Li(r,a,i),Wr(a,a.return);break;case 30:break;default:Li(r,a,i)}t=t.sibling}}function yo(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&&Nr(i))}function Co(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nr(e))}function ri(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)rf(e,t,i,s),t=t.sibling}function rf(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:ri(e,t,i,s),r&2048&&Xr(9,t);break;case 1:ri(e,t,i,s);break;case 3:ri(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nr(e)));break;case 12:if(r&2048){ri(e,t,i,s),e=t.stateNode;try{var a=t.memoizedProps,p=a.id,M=a.onPostCommit;typeof M=="function"&&M(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){Fe(t,t.return,Y)}}else ri(e,t,i,s);break;case 31:ri(e,t,i,s);break;case 13:ri(e,t,i,s);break;case 23:break;case 22:a=t.stateNode,p=t.alternate,t.memoizedState!==null?a._visibility&2?ri(e,t,i,s):Qr(e,t):a._visibility&2?ri(e,t,i,s):(a._visibility|=2,cr(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&yo(p,t);break;case 24:ri(e,t,i,s),r&2048&&Co(t.alternate,t);break;default:ri(e,t,i,s)}}function cr(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,p=t,M=i,Y=s,$=p.flags;switch(p.tag){case 0:case 11:case 15:cr(a,p,M,Y,r),Xr(8,p);break;case 23:break;case 22:var ce=p.stateNode;p.memoizedState!==null?ce._visibility&2?cr(a,p,M,Y,r):Qr(a,p):(ce._visibility|=2,cr(a,p,M,Y,r)),r&&$&2048&&yo(p.alternate,p);break;case 24:cr(a,p,M,Y,r),r&&$&2048&&Co(p.alternate,p);break;default:cr(a,p,M,Y,r)}t=t.sibling}}function Qr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:Qr(i,s),r&2048&&yo(s.alternate,s);break;case 24:Qr(i,s),r&2048&&Co(s.alternate,s);break;default:Qr(i,s)}t=t.sibling}}var Zr=8192;function ur(e,t,i){if(e.subtreeFlags&Zr)for(e=e.child;e!==null;)nf(e,t,i),e=e.sibling}function nf(e,t,i){switch(e.tag){case 26:ur(e,t,i),e.flags&Zr&&e.memoizedState!==null&&Rm(i,si,e.memoizedState,e.memoizedProps);break;case 5:ur(e,t,i);break;case 3:case 4:var s=si;si=ba(e.stateNode.containerInfo),ur(e,t,i),si=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Zr,Zr=16777216,ur(e,t,i),Zr=s):ur(e,t,i));break;default:ur(e,t,i)}}function af(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 Jr(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];dt=s,of(s,e)}af(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)lf(e),e=e.sibling}function lf(e){switch(e.tag){case 0:case 11:case 15:Jr(e),e.flags&2048&&Zi(9,e,e.return);break;case 3:Jr(e);break;case 12:Jr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,aa(e)):Jr(e);break;default:Jr(e)}}function aa(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];dt=s,of(s,e)}af(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Zi(8,t,t.return),aa(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,aa(t));break;default:aa(t)}e=e.sibling}}function of(e,t){for(;dt!==null;){var i=dt;switch(i.tag){case 0:case 11:case 15:Zi(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:Nr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,dt=s;else e:for(i=e;dt!==null;){s=dt;var r=s.sibling,a=s.return;if(Zh(s),s===i){dt=null;break e}if(r!==null){r.return=a,dt=r;break e}dt=a}}}var Fv={getCacheForType:function(e){var t=gt(nt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return gt(nt).controller.signal}},Yv=typeof WeakMap=="function"?WeakMap:Map,qe=0,Qe=null,Le=null,Oe=0,Ge=0,qt=null,Ji=!1,hr=!1,xo=!1,Mi=0,tt=0,$i=0,Ms=0,wo=0,It=0,fr=0,$r=null,Bt=null,Eo=!1,la=0,cf=0,oa=1/0,ca=null,es=null,ct=0,ts=null,dr=null,Oi=0,Ao=0,Do=null,uf=null,en=0,To=null;function Pt(){return(qe&2)!==0&&Oe!==0?Oe&-Oe:I.T!==null?Bo():Ec()}function hf(){if(It===0)if((Oe&536870912)===0||Ne){var e=zs;zs<<=1,(zs&3932160)===0&&(zs=262144),It=e}else It=536870912;return e=Ht.current,e!==null&&(e.flags|=32),It}function Nt(e,t,i){(e===Qe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(_r(e,0),is(e,Oe,It,!1)),yr(e,i),((qe&2)===0||e!==Qe)&&(e===Qe&&((qe&2)===0&&(Ms|=i),tt===4&&is(e,Oe,It,!1)),fi(e))}function ff(e,t,i){if((qe&6)!==0)throw Error(L(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||xe(e,t),r=s?Xv(e,t):ko(e,t,!0),a=s;do{if(r===0){hr&&!s&&is(e,t,0,!1);break}else{if(i=e.current.alternate,a&&!Vv(i)){r=ko(e,t,!1),a=!1;continue}if(r===2){if(a=t,e.errorRecoveryDisabledLanes&a)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var M=e;r=$r;var Y=M.current.memoizedState.isDehydrated;if(Y&&(_r(M,p).flags|=256),p=ko(M,p,!1),p!==2){if(xo&&!Y){M.errorRecoveryDisabledLanes|=a,Ms|=a,r=4;break e}a=Bt,Bt=r,a!==null&&(Bt===null?Bt=a:Bt.push.apply(Bt,a))}r=p}if(a=!1,r!==2)continue}}if(r===1){_r(e,0),is(e,t,0,!0);break}e:{switch(s=e,a=r,a){case 0:case 1:throw Error(L(345));case 4:if((t&4194048)!==t)break;case 6:is(s,t,It,!Ji);break e;case 2:Bt=null;break;case 3:case 5:break;default:throw Error(L(329))}if((t&62914560)===t&&(r=la+300-Pe(),10<r)){if(is(s,t,It,!Ji),Se(s,0,!0)!==0)break e;Oi=t,s.timeoutHandle=Gf(df.bind(null,s,i,Bt,ca,Eo,t,It,Ms,fr,Ji,a,"Throttled",-0,0),r);break e}df(s,i,Bt,ca,Eo,t,It,Ms,fr,Ji,a,null,-0,0)}}break}while(!0);fi(e)}function df(e,t,i,s,r,a,p,M,Y,$,ce,he,ie,ne){if(e.timeoutHandle=-1,he=t.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pi},nf(t,a,he);var me=(a&62914560)===a?la-Pe():(a&4194048)===a?cf-Pe():0;if(me=km(he,me),me!==null){Oi=a,e.cancelPendingCommit=me(yf.bind(null,e,t,a,i,s,r,p,M,Y,ce,he,null,ie,ne)),is(e,a,p,!$);return}}yf(e,t,a,i,s,r,p,M,Y)}function Vv(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],a=r.getSnapshot;r=r.value;try{if(!zt(a(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function is(e,t,i,s){t&=~wo,t&=~Ms,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var a=31-Ct(r),p=1<<a;s[a]=-1,r&=~p}i!==0&&Cc(e,i,t)}function ua(){return(qe&6)===0?(tn(0),!1):!0}function Ro(){if(Le!==null){if(Ge===0)var e=Le.return;else e=Le,Ci=xs=null,Fl(e),rr=null,jr=0,e=Le;for(;e!==null;)Gh(e.alternate,e),e=e.return;Le=null}}function _r(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,fm(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Oi=0,Ro(),Qe=e,Le=i=Si(e.current,null),Oe=t,Ge=0,qt=null,Ji=!1,hr=xe(e,t),xo=!1,fr=It=wo=Ms=$i=tt=0,Bt=$r=null,Eo=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-Ct(s),a=1<<r;t|=e[r],s&=~a}return Mi=t,Ln(),i}function _f(e,t){De=null,I.H=Yr,t===sr||t===Un?(t=Ru(),Ge=3):t===Ml?(t=Ru(),Ge=4):Ge=t===ao?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,Le===null&&(tt=1,$n(e,Kt(t,e.current)))}function vf(){var e=Ht.current;return e===null?!0:(Oe&4194048)===Oe?Zt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===Zt:!1}function mf(){var e=I.H;return I.H=Yr,e===null?Yr:e}function gf(){var e=I.A;return I.A=Fv,e}function ha(){tt=4,Ji||(Oe&4194048)!==Oe&&Ht.current!==null||(hr=!0),($i&134217727)===0&&(Ms&134217727)===0||Qe===null||is(Qe,Oe,It,!1)}function ko(e,t,i){var s=qe;qe|=2;var r=mf(),a=gf();(Qe!==e||Oe!==t)&&(ca=null,_r(e,t)),t=!1;var p=tt;e:do try{if(Ge!==0&&Le!==null){var M=Le,Y=qt;switch(Ge){case 8:Ro(),p=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var $=Ge;if(Ge=0,qt=null,vr(e,M,Y,$),i&&hr){p=0;break e}break;default:$=Ge,Ge=0,qt=null,vr(e,M,Y,$)}}Kv(),p=tt;break}catch(ce){_f(e,ce)}while(!0);return t&&e.shellSuspendCounter++,Ci=xs=null,qe=s,I.H=r,I.A=a,Le===null&&(Qe=null,Oe=0,Ln()),p}function Kv(){for(;Le!==null;)pf(Le)}function Xv(e,t){var i=qe;qe|=2;var s=mf(),r=gf();Qe!==e||Oe!==t?(ca=null,oa=Pe()+500,_r(e,t)):hr=xe(e,t);e:do try{if(Ge!==0&&Le!==null){t=Le;var a=qt;t:switch(Ge){case 1:Ge=0,qt=null,vr(e,t,a,1);break;case 2:case 9:if(Du(a)){Ge=0,qt=null,bf(t);break}t=function(){Ge!==2&&Ge!==9||Qe!==e||(Ge=7),fi(e)},a.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Du(a)?(Ge=0,qt=null,bf(t)):(Ge=0,qt=null,vr(e,t,a,7));break;case 5:var p=null;switch(Le.tag){case 26:p=Le.memoizedState;case 5:case 27:var M=Le;if(p?rd(p):M.stateNode.complete){Ge=0,qt=null;var Y=M.sibling;if(Y!==null)Le=Y;else{var $=M.return;$!==null?(Le=$,fa($)):Le=null}break t}}Ge=0,qt=null,vr(e,t,a,5);break;case 6:Ge=0,qt=null,vr(e,t,a,6);break;case 8:Ro(),tt=6;break e;default:throw Error(L(462))}}Wv();break}catch(ce){_f(e,ce)}while(!0);return Ci=xs=null,I.H=s,I.A=r,qe=i,Le!==null?0:(Qe=null,Oe=0,Ln(),tt)}function Wv(){for(;Le!==null&&!Ui();)pf(Le)}function pf(e){var t=Ih(e.alternate,e,Mi);e.memoizedProps=e.pendingProps,t===null?fa(e):Le=t}function bf(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Nh(i,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Nh(i,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:Fl(t);default:Gh(i,t),t=Le=mu(t,Mi),t=Ih(i,t,Mi)}e.memoizedProps=e.pendingProps,t===null?fa(e):Le=t}function vr(e,t,i,s){Ci=xs=null,Fl(t),rr=null,jr=0;var r=t.return;try{if(jv(e,r,t,i,Oe)){tt=1,$n(e,Kt(i,e.current)),Le=null;return}}catch(a){if(r!==null)throw Le=r,a;tt=1,$n(e,Kt(i,e.current)),Le=null;return}t.flags&32768?(Ne||s===1?e=!0:hr||(Oe&536870912)!==0?e=!1:(Ji=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ht.current,s!==null&&s.tag===13&&(s.flags|=16384))),Sf(t,e)):fa(t)}function fa(e){var t=e;do{if((t.flags&32768)!==0){Sf(t,Ji);return}e=t.return;var i=qv(t.alternate,t,Mi);if(i!==null){Le=i;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);tt===0&&(tt=5)}function Sf(e,t){do{var i=Iv(e.alternate,e);if(i!==null){i.flags&=32767,Le=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Le=e;return}Le=e=i}while(e!==null);tt=6,Le=null}function yf(e,t,i,s,r,a,p,M,Y){e.cancelPendingCommit=null;do da();while(ct!==0);if((qe&6)!==0)throw Error(L(327));if(t!==null){if(t===e.current)throw Error(L(177));if(a=t.lanes|t.childLanes,a|=gl,T_(e,i,a,p,M,Y),e===Qe&&(Le=Qe=null,Oe=0),dr=t,ts=e,Oi=i,Ao=a,Do=r,uf=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$v(Et,function(){return Af(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=I.T,I.T=null,r=X.p,X.p=2,p=qe,qe|=4;try{Pv(e,t,i)}finally{qe=p,X.p=r,I.T=s}}ct=1,Cf(),xf(),wf()}}function Cf(){if(ct===1){ct=0;var e=ts,t=dr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=I.T,I.T=null;var s=X.p;X.p=2;var r=qe;qe|=4;try{tf(t,e);var a=Po,p=lu(e.containerInfo),M=a.focusedElem,Y=a.selectionRange;if(p!==M&&M&&M.ownerDocument&&au(M.ownerDocument.documentElement,M)){if(Y!==null&&fl(M)){var $=Y.start,ce=Y.end;if(ce===void 0&&(ce=$),"selectionStart"in M)M.selectionStart=$,M.selectionEnd=Math.min(ce,M.value.length);else{var he=M.ownerDocument||document,ie=he&&he.defaultView||window;if(ie.getSelection){var ne=ie.getSelection(),me=M.textContent.length,we=Math.min(Y.start,me),We=Y.end===void 0?we:Math.min(Y.end,me);!ne.extend&&we>We&&(p=We,We=we,we=p);var W=nu(M,we),V=nu(M,We);if(W&&V&&(ne.rangeCount!==1||ne.anchorNode!==W.node||ne.anchorOffset!==W.offset||ne.focusNode!==V.node||ne.focusOffset!==V.offset)){var J=he.createRange();J.setStart(W.node,W.offset),ne.removeAllRanges(),we>We?(ne.addRange(J),ne.extend(V.node,V.offset)):(J.setEnd(V.node,V.offset),ne.addRange(J))}}}}for(he=[],ne=M;ne=ne.parentNode;)ne.nodeType===1&&he.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<he.length;M++){var ue=he[M];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Ea=!!Io,Po=Io=null}finally{qe=r,X.p=s,I.T=i}}e.current=t,ct=2}}function xf(){if(ct===2){ct=0;var e=ts,t=dr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=I.T,I.T=null;var s=X.p;X.p=2;var r=qe;qe|=4;try{Qh(e,t.alternate,t)}finally{qe=r,X.p=s,I.T=i}}ct=3}}function wf(){if(ct===4||ct===3){ct=0,_t();var e=ts,t=dr,i=Oi,s=uf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,dr=ts=null,Ef(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(es=null),Ka(i),t=t.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(li,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=I.T,r=X.p,X.p=2,I.T=null;try{for(var a=e.onRecoverableError,p=0;p<s.length;p++){var M=s[p];a(M.value,{componentStack:M.stack})}}finally{I.T=t,X.p=r}}(Oi&3)!==0&&da(),fi(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===To?en++:(en=0,To=e):en=0,tn(0)}}function Ef(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Nr(t)))}function da(){return Cf(),xf(),wf(),Af()}function Af(){if(ct!==5)return!1;var e=ts,t=Ao;Ao=0;var i=Ka(Oi),s=I.T,r=X.p;try{X.p=32>i?32:i,I.T=null,i=Do,Do=null;var a=ts,p=Oi;if(ct=0,dr=ts=null,Oi=0,(qe&6)!==0)throw Error(L(331));var M=qe;if(qe|=4,lf(a.current),rf(a,a.current,p,i),qe=M,tn(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(li,a)}catch{}return!0}finally{X.p=r,I.T=s,Ef(e,t)}}function Df(e,t,i){t=Kt(i,t),t=no(e.stateNode,t,2),e=Xi(e,t,2),e!==null&&(yr(e,2),fi(e))}function Fe(e,t,i){if(e.tag===3)Df(e,e,i);else for(;t!==null;){if(t.tag===3){Df(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(es===null||!es.has(s))){e=Kt(i,e),i=Dh(2),s=Xi(t,i,2),s!==null&&(Th(i,s,t,e),yr(s,2),fi(s));break}}t=t.return}}function Lo(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new Yv;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(xo=!0,r.add(i),e=Qv.bind(null,e,t,i),t.then(e,e))}function Qv(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Qe===e&&(Oe&i)===i&&(tt===4||tt===3&&(Oe&62914560)===Oe&&300>Pe()-la?(qe&2)===0&&_r(e,0):wo|=i,fr===Oe&&(fr=0)),fi(e)}function Tf(e,t){t===0&&(t=Ve()),e=Ss(e,t),e!==null&&(yr(e,t),fi(e))}function Zv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Tf(e,i)}function Jv(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(L(314))}s!==null&&s.delete(t),Tf(e,i)}function $v(e,t){return vi(e,t)}var _a=null,mr=null,Mo=!1,va=!1,Oo=!1,ss=0;function fi(e){e!==mr&&e.next===null&&(mr===null?_a=mr=e:mr=mr.next=e),va=!0,Mo||(Mo=!0,tm())}function tn(e,t){if(!Oo&&va){Oo=!0;do for(var i=!1,s=_a;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var a=0;else{var p=s.suspendedLanes,M=s.pingedLanes;a=(1<<31-Ct(42|e)+1)-1,a&=r&~(p&~M),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(i=!0,Mf(s,a))}else a=Oe,a=Se(s,s===Qe?a:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(a&3)===0||xe(s,a)||(i=!0,Mf(s,a));s=s.next}while(i);Oo=!1}}function em(){Rf()}function Rf(){va=Mo=!1;var e=0;ss!==0&&hm()&&(e=ss);for(var t=Pe(),i=null,s=_a;s!==null;){var r=s.next,a=kf(s,t);a===0?(s.next=null,i===null?_a=r:i.next=r,r===null&&(mr=i)):(i=s,(e!==0||(a&3)!==0)&&(va=!0)),s=r}ct!==0&&ct!==5||tn(e),ss!==0&&(ss=0)}function kf(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var p=31-Ct(a),M=1<<p,Y=r[p];Y===-1?((M&i)===0||(M&s)!==0)&&(r[p]=ze(M,t)):Y<=t&&(e.expiredLanes|=M),a&=~M}if(t=Qe,i=Oe,i=Se(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&ni(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||xe(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&ni(s),Ka(i)){case 2:case 8:i=ai;break;case 32:i=Et;break;case 268435456:i=Tt;break;default:i=Et}return s=Lf.bind(null,e),i=vi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&ni(s),e.callbackPriority=2,e.callbackNode=null,2}function Lf(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(da()&&e.callbackNode!==i)return null;var s=Oe;return s=Se(e,e===Qe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(ff(e,s,t),kf(e,Pe()),e.callbackNode!=null&&e.callbackNode===i?Lf.bind(null,e):null)}function Mf(e,t){if(da())return null;ff(e,t,!0)}function tm(){dm(function(){(qe&6)!==0?vi(ti,em):Rf()})}function Bo(){if(ss===0){var e=tr;e===0&&(e=Ns,Ns<<=1,(Ns&261888)===0&&(Ns=256)),ss=e}return ss}function Of(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xn(""+e)}function Bf(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 im(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var a=Of((r[Rt]||null).action),p=s.submitter;p&&(t=(t=p[Rt]||null)?Of(t.formAction):p.getAttribute("formAction"),t!==null&&(a=t,p=null));var M=new Dn("action","action",null,s,r);e.push({event:M,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ss!==0){var Y=p?Bf(r,p):new FormData(r);$l(i,{pending:!0,data:Y,method:r.method,action:a},null,Y)}}else typeof a=="function"&&(M.preventDefault(),Y=p?Bf(r,p):new FormData(r),$l(i,{pending:!0,data:Y,method:r.method,action:a},a,Y))},currentTarget:r}]})}}for(var No=0;No<ml.length;No++){var zo=ml[No],sm=zo.toLowerCase(),rm=zo[0].toUpperCase()+zo.slice(1);ii(sm,"on"+rm)}ii(uu,"onAnimationEnd"),ii(hu,"onAnimationIteration"),ii(fu,"onAnimationStart"),ii("dblclick","onDoubleClick"),ii("focusin","onFocus"),ii("focusout","onBlur"),ii(Sv,"onTransitionRun"),ii(yv,"onTransitionStart"),ii(Cv,"onTransitionCancel"),ii(du,"onTransitionEnd"),Is("onMouseEnter",["mouseout","mouseover"]),Is("onMouseLeave",["mouseout","mouseover"]),Is("onPointerEnter",["pointerout","pointerover"]),Is("onPointerLeave",["pointerout","pointerover"]),ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ms("onBeforeInput",["compositionend","keypress","textInput","paste"]),ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sn="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(" "),nm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sn));function Nf(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var a=void 0;if(t)for(var p=s.length-1;0<=p;p--){var M=s[p],Y=M.instance,$=M.currentTarget;if(M=M.listener,Y!==a&&r.isPropagationStopped())break e;a=M,r.currentTarget=$;try{a(r)}catch(ce){kn(ce)}r.currentTarget=null,a=Y}else for(p=0;p<s.length;p++){if(M=s[p],Y=M.instance,$=M.currentTarget,M=M.listener,Y!==a&&r.isPropagationStopped())break e;a=M,r.currentTarget=$;try{a(r)}catch(ce){kn(ce)}r.currentTarget=null,a=Y}}}}function Me(e,t){var i=t[Xa];i===void 0&&(i=t[Xa]=new Set);var s=e+"__bubble";i.has(s)||(zf(t,e,2,!1),i.add(s))}function jo(e,t,i){var s=0;t&&(s|=4),zf(i,e,s,t)}var ma="_reactListening"+Math.random().toString(36).slice(2);function Ho(e){if(!e[ma]){e[ma]=!0,Tc.forEach(function(i){i!=="selectionchange"&&(nm.has(i)||jo(i,!1,e),jo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ma]||(t[ma]=!0,jo("selectionchange",!1,t))}}function zf(e,t,i,s){switch(hd(t)){case 2:var r=Om;break;case 8:r=Bm;break;default:r=$o}i=r.bind(null,t,i,e),r=void 0,!sl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Uo(e,t,i,s,r){var a=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var p=s.tag;if(p===3||p===4){var M=s.stateNode.containerInfo;if(M===r)break;if(p===4)for(p=s.return;p!==null;){var Y=p.tag;if((Y===3||Y===4)&&p.stateNode.containerInfo===r)return;p=p.return}for(;M!==null;){if(p=Hs(M),p===null)return;if(Y=p.tag,Y===5||Y===6||Y===26||Y===27){s=a=p;continue e}M=M.parentNode}}s=s.return}qc(function(){var $=a,ce=tl(i),he=[];e:{var ie=_u.get(e);if(ie!==void 0){var ne=Dn,me=e;switch(e){case"keypress":if(En(i)===0)break e;case"keydown":case"keyup":ne=J_;break;case"focusin":me="focus",ne=ll;break;case"focusout":me="blur",ne=ll;break;case"beforeblur":case"afterblur":ne=ll;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":ne=Gc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=q_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=tv;break;case uu:case hu:case fu:ne=G_;break;case du:ne=sv;break;case"scroll":case"scrollend":ne=H_;break;case"wheel":ne=nv;break;case"copy":case"cut":case"paste":ne=Y_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Yc;break;case"toggle":case"beforetoggle":ne=lv}var we=(t&4)!==0,We=!we&&(e==="scroll"||e==="scrollend"),W=we?ie!==null?ie+"Capture":null:ie;we=[];for(var V=$,J;V!==null;){var ue=V;if(J=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||J===null||W===null||(ue=wr(V,W),ue!=null&&we.push(rn(V,ue,J))),We)break;V=V.return}0<we.length&&(ie=new ne(ie,me,null,i,ce),he.push({event:ie,listeners:we}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",ie&&i!==el&&(me=i.relatedTarget||i.fromElement)&&(Hs(me)||me[js]))break e;if((ne||ie)&&(ie=ce.window===ce?ce:(ie=ce.ownerDocument)?ie.defaultView||ie.parentWindow:window,ne?(me=i.relatedTarget||i.toElement,ne=$,me=me?Hs(me):null,me!==null&&(We=K(me),we=me.tag,me!==We||we!==5&&we!==27&&we!==6)&&(me=null)):(ne=null,me=$),ne!==me)){if(we=Gc,ue="onMouseLeave",W="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(we=Yc,ue="onPointerLeave",W="onPointerEnter",V="pointer"),We=ne==null?ie:xr(ne),J=me==null?ie:xr(me),ie=new we(ue,V+"leave",ne,i,ce),ie.target=We,ie.relatedTarget=J,ue=null,Hs(ce)===$&&(we=new we(W,V+"enter",me,i,ce),we.target=J,we.relatedTarget=We,ue=we),We=ue,ne&&me)t:{for(we=am,W=ne,V=me,J=0,ue=W;ue;ue=we(ue))J++;ue=0;for(var Ce=V;Ce;Ce=we(Ce))ue++;for(;0<J-ue;)W=we(W),J--;for(;0<ue-J;)V=we(V),ue--;for(;J--;){if(W===V||V!==null&&W===V.alternate){we=W;break t}W=we(W),V=we(V)}we=null}else we=null;ne!==null&&jf(he,ie,ne,we,!1),me!==null&&We!==null&&jf(he,We,me,we,!0)}}e:{if(ie=$?xr($):window,ne=ie.nodeName&&ie.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ie.type==="file")var He=$c;else if(Zc(ie))if(eu)He=gv;else{He=vv;var be=_v}else ne=ie.nodeName,!ne||ne.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?$&&$a($.elementType)&&(He=$c):He=mv;if(He&&(He=He(e,$))){Jc(he,He,i,ce);break e}be&&be(e,ie,$),e==="focusout"&&$&&ie.type==="number"&&$.memoizedProps.value!=null&&Ja(ie,"number",ie.value)}switch(be=$?xr($):window,e){case"focusin":(Zc(be)||be.contentEditable==="true")&&(Ks=be,dl=$,Mr=null);break;case"focusout":Mr=dl=Ks=null;break;case"mousedown":_l=!0;break;case"contextmenu":case"mouseup":case"dragend":_l=!1,ou(he,i,ce);break;case"selectionchange":if(bv)break;case"keydown":case"keyup":ou(he,i,ce)}var Te;if(cl)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Vs?Wc(e,i)&&(Be="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Be="onCompositionStart");Be&&(Vc&&i.locale!=="ko"&&(Vs||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Vs&&(Te=Ic()):(Ii=ce,rl="value"in Ii?Ii.value:Ii.textContent,Vs=!0)),be=ga($,Be),0<be.length&&(Be=new Fc(Be,e,null,i,ce),he.push({event:Be,listeners:be}),Te?Be.data=Te:(Te=Qc(i),Te!==null&&(Be.data=Te)))),(Te=cv?uv(e,i):hv(e,i))&&(Be=ga($,"onBeforeInput"),0<Be.length&&(be=new Fc("onBeforeInput","beforeinput",null,i,ce),he.push({event:be,listeners:Be}),be.data=Te)),im(he,e,$,i,ce)}Nf(he,t)})}function rn(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ga(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,a=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||a===null||(r=wr(e,i),r!=null&&s.unshift(rn(e,r,a)),r=wr(e,t),r!=null&&s.push(rn(e,r,a))),e.tag===3)return s;e=e.return}return[]}function am(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jf(e,t,i,s,r){for(var a=t._reactName,p=[];i!==null&&i!==s;){var M=i,Y=M.alternate,$=M.stateNode;if(M=M.tag,Y!==null&&Y===s)break;M!==5&&M!==26&&M!==27||$===null||(Y=$,r?($=wr(i,a),$!=null&&p.unshift(rn(i,$,Y))):r||($=wr(i,a),$!=null&&p.push(rn(i,$,Y)))),i=i.return}p.length!==0&&e.push({event:t,listeners:p})}var lm=/\r\n?/g,om=/\u0000|\uFFFD/g;function Hf(e){return(typeof e=="string"?e:""+e).replace(lm,`
9
- `).replace(om,"")}function Uf(e,t){return t=Hf(t),Hf(e)===t}function Xe(e,t,i,s,r,a){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Gs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Gs(e,""+s);break;case"className":yn(e,"class",s);break;case"tabIndex":yn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":yn(e,i,s);break;case"style":Hc(e,s,a);break;case"data":if(t!=="object"){yn(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=xn(""+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 a=="function"&&(i==="formAction"?(t!=="input"&&Xe(e,t,"name",r.name,r,null),Xe(e,t,"formEncType",r.formEncType,r,null),Xe(e,t,"formMethod",r.formMethod,r,null),Xe(e,t,"formTarget",r.formTarget,r,null)):(Xe(e,t,"encType",r.encType,r,null),Xe(e,t,"method",r.method,r,null),Xe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=xn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=pi);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(L(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(L(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=xn(""+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),Sn(e,"popover",s);break;case"xlinkActuate":gi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":gi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":gi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":gi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":gi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":gi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":gi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":gi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":gi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Sn(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=z_.get(i)||i,Sn(e,i,s))}}function qo(e,t,i,s,r,a){switch(i){case"style":Hc(e,s,a);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(L(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(L(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Gs(e,s):(typeof s=="number"||typeof s=="bigint")&&Gs(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=pi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rc.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),a=e[Rt]||null,a=a!=null?a[i]:null,typeof a=="function"&&e.removeEventListener(t,a,r),typeof s=="function")){typeof a!="function"&&a!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Sn(e,i,s)}}}function bt(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,r=!1,a;for(a in i)if(i.hasOwnProperty(a)){var p=i[a];if(p!=null)switch(a){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(L(137,t));default:Xe(e,t,a,p,i,null)}}r&&Xe(e,t,"srcSet",i.srcSet,i,null),s&&Xe(e,t,"src",i.src,i,null);return;case"input":Me("invalid",e);var M=a=p=r=null,Y=null,$=null;for(s in i)if(i.hasOwnProperty(s)){var ce=i[s];if(ce!=null)switch(s){case"name":r=ce;break;case"type":p=ce;break;case"checked":Y=ce;break;case"defaultChecked":$=ce;break;case"value":a=ce;break;case"defaultValue":M=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(L(137,t));break;default:Xe(e,t,s,ce,i,null)}}Bc(e,a,M,Y,$,p,r,!1);return;case"select":Me("invalid",e),s=p=a=null;for(r in i)if(i.hasOwnProperty(r)&&(M=i[r],M!=null))switch(r){case"value":a=M;break;case"defaultValue":p=M;break;case"multiple":s=M;default:Xe(e,t,r,M,i,null)}t=a,i=p,e.multiple=!!s,t!=null?Ps(e,!!s,t,!1):i!=null&&Ps(e,!!s,i,!0);return;case"textarea":Me("invalid",e),a=r=s=null;for(p in i)if(i.hasOwnProperty(p)&&(M=i[p],M!=null))switch(p){case"value":s=M;break;case"defaultValue":r=M;break;case"children":a=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(L(91));break;default:Xe(e,t,p,M,i,null)}zc(e,s,r,a);return;case"option":for(Y in i)i.hasOwnProperty(Y)&&(s=i[Y],s!=null)&&(Y==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Xe(e,t,Y,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<sn.length;s++)Me(sn[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($ in i)if(i.hasOwnProperty($)&&(s=i[$],s!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(L(137,t));default:Xe(e,t,$,s,i,null)}return;default:if($a(t)){for(ce in i)i.hasOwnProperty(ce)&&(s=i[ce],s!==void 0&&qo(e,t,ce,s,i,void 0));return}}for(M in i)i.hasOwnProperty(M)&&(s=i[M],s!=null&&Xe(e,t,M,s,i,null))}function cm(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,a=null,p=null,M=null,Y=null,$=null,ce=null;for(ne in i){var he=i[ne];if(i.hasOwnProperty(ne)&&he!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":Y=he;default:s.hasOwnProperty(ne)||Xe(e,t,ne,null,s,he)}}for(var ie in s){var ne=s[ie];if(he=i[ie],s.hasOwnProperty(ie)&&(ne!=null||he!=null))switch(ie){case"type":a=ne;break;case"name":r=ne;break;case"checked":$=ne;break;case"defaultChecked":ce=ne;break;case"value":p=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(L(137,t));break;default:ne!==he&&Xe(e,t,ie,ne,s,he)}}Za(e,p,M,Y,$,ce,a,r);return;case"select":ne=p=M=ie=null;for(a in i)if(Y=i[a],i.hasOwnProperty(a)&&Y!=null)switch(a){case"value":break;case"multiple":ne=Y;default:s.hasOwnProperty(a)||Xe(e,t,a,null,s,Y)}for(r in s)if(a=s[r],Y=i[r],s.hasOwnProperty(r)&&(a!=null||Y!=null))switch(r){case"value":ie=a;break;case"defaultValue":M=a;break;case"multiple":p=a;default:a!==Y&&Xe(e,t,r,a,s,Y)}t=M,i=p,s=ne,ie!=null?Ps(e,!!i,ie,!1):!!s!=!!i&&(t!=null?Ps(e,!!i,t,!0):Ps(e,!!i,i?[]:"",!1));return;case"textarea":ne=ie=null;for(M in i)if(r=i[M],i.hasOwnProperty(M)&&r!=null&&!s.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Xe(e,t,M,null,s,r)}for(p in s)if(r=s[p],a=i[p],s.hasOwnProperty(p)&&(r!=null||a!=null))switch(p){case"value":ie=r;break;case"defaultValue":ne=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(L(91));break;default:r!==a&&Xe(e,t,p,r,s,a)}Nc(e,ie,ne);return;case"option":for(var me in i)ie=i[me],i.hasOwnProperty(me)&&ie!=null&&!s.hasOwnProperty(me)&&(me==="selected"?e.selected=!1:Xe(e,t,me,null,s,ie));for(Y in s)ie=s[Y],ne=i[Y],s.hasOwnProperty(Y)&&ie!==ne&&(ie!=null||ne!=null)&&(Y==="selected"?e.selected=ie&&typeof ie!="function"&&typeof ie!="symbol":Xe(e,t,Y,ie,s,ne));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 we in i)ie=i[we],i.hasOwnProperty(we)&&ie!=null&&!s.hasOwnProperty(we)&&Xe(e,t,we,null,s,ie);for($ in s)if(ie=s[$],ne=i[$],s.hasOwnProperty($)&&ie!==ne&&(ie!=null||ne!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(L(137,t));break;default:Xe(e,t,$,ie,s,ne)}return;default:if($a(t)){for(var We in i)ie=i[We],i.hasOwnProperty(We)&&ie!==void 0&&!s.hasOwnProperty(We)&&qo(e,t,We,void 0,s,ie);for(ce in s)ie=s[ce],ne=i[ce],!s.hasOwnProperty(ce)||ie===ne||ie===void 0&&ne===void 0||qo(e,t,ce,ie,s,ne);return}}for(var W in i)ie=i[W],i.hasOwnProperty(W)&&ie!=null&&!s.hasOwnProperty(W)&&Xe(e,t,W,null,s,ie);for(he in s)ie=s[he],ne=i[he],!s.hasOwnProperty(he)||ie===ne||ie==null&&ne==null||Xe(e,t,he,ie,s,ne)}function qf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function um(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],a=r.transferSize,p=r.initiatorType,M=r.duration;if(a&&M&&qf(p)){for(p=0,M=r.responseEnd,s+=1;s<i.length;s++){var Y=i[s],$=Y.startTime;if($>M)break;var ce=Y.transferSize,he=Y.initiatorType;ce&&qf(he)&&(Y=Y.responseEnd,p+=ce*(Y<M?1:(M-$)/(Y-$)))}if(--s,t+=8*(a+p)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Io=null,Po=null;function pa(e){return e.nodeType===9?e:e.ownerDocument}function If(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 Pf(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 Go(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 Fo=null;function hm(){var e=window.event;return e&&e.type==="popstate"?e===Fo?!1:(Fo=e,!0):(Fo=null,!1)}var Gf=typeof setTimeout=="function"?setTimeout:void 0,fm=typeof clearTimeout=="function"?clearTimeout:void 0,Ff=typeof Promise=="function"?Promise:void 0,dm=typeof queueMicrotask=="function"?queueMicrotask:typeof Ff<"u"?function(e){return Ff.resolve(null).then(e).catch(_m)}:Gf;function _m(e){setTimeout(function(){throw e})}function rs(e){return e==="head"}function Yf(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Sr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")nn(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,nn(i);for(var a=i.firstChild;a;){var p=a.nextSibling,M=a.nodeName;a[Cr]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&a.rel.toLowerCase()==="stylesheet"||i.removeChild(a),a=p}}else i==="body"&&nn(e.ownerDocument.body);i=r}while(i);Sr(t)}function Vf(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 Yo(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":Yo(i),Wa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function vm(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Cr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Jt(e.nextSibling),e===null)break}return null}function mm(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Jt(e.nextSibling),e===null))return null;return e}function Kf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jt(e.nextSibling),e===null))return null;return e}function Vo(e){return e.data==="$?"||e.data==="$~"}function Ko(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function gm(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 Jt(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 Xo=null;function Xf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Jt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Wf(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 Qf(e,t,i){switch(t=pa(i),e){case"html":if(e=t.documentElement,!e)throw Error(L(452));return e;case"head":if(e=t.head,!e)throw Error(L(453));return e;case"body":if(e=t.body,!e)throw Error(L(454));return e;default:throw Error(L(451))}}function nn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Wa(e)}var $t=new Map,Zf=new Set;function ba(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Bi=X.d;X.d={f:pm,r:bm,D:Sm,C:ym,L:Cm,m:xm,X:Em,S:wm,M:Am};function pm(){var e=Bi.f(),t=ua();return e||t}function bm(e){var t=Us(e);t!==null&&t.tag===5&&t.type==="form"?dh(t):Bi.r(e)}var gr=typeof document>"u"?null:document;function Jf(e,t,i){var s=gr;if(s&&typeof t=="string"&&t){var r=Yt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),Zf.has(r)||(Zf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),bt(t,"link",e),ft(t),s.head.appendChild(t)))}}function Sm(e){Bi.D(e),Jf("dns-prefetch",e,null)}function ym(e,t){Bi.C(e,t),Jf("preconnect",e,t)}function Cm(e,t,i){Bi.L(e,t,i);var s=gr;if(s&&e&&t){var r='link[rel="preload"][as="'+Yt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Yt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Yt(i.imageSizes)+'"]')):r+='[href="'+Yt(e)+'"]';var a=r;switch(t){case"style":a=pr(e);break;case"script":a=br(e)}$t.has(a)||(e=f({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),$t.set(a,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(an(a))||t==="script"&&s.querySelector(ln(a))||(t=s.createElement("link"),bt(t,"link",e),ft(t),s.head.appendChild(t)))}}function xm(e,t){Bi.m(e,t);var i=gr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Yt(s)+'"][href="'+Yt(e)+'"]',a=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=br(e)}if(!$t.has(a)&&(e=f({rel:"modulepreload",href:e},t),$t.set(a,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ln(a)))return}s=i.createElement("link"),bt(s,"link",e),ft(s),i.head.appendChild(s)}}}function wm(e,t,i){Bi.S(e,t,i);var s=gr;if(s&&e){var r=qs(s).hoistableStyles,a=pr(e);t=t||"default";var p=r.get(a);if(!p){var M={loading:0,preload:null};if(p=s.querySelector(an(a)))M.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},i),(i=$t.get(a))&&Wo(e,i);var Y=p=s.createElement("link");ft(Y),bt(Y,"link",e),Y._p=new Promise(function($,ce){Y.onload=$,Y.onerror=ce}),Y.addEventListener("load",function(){M.loading|=1}),Y.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Sa(p,t,s)}p={type:"stylesheet",instance:p,count:1,state:M},r.set(a,p)}}}function Em(e,t){Bi.X(e,t);var i=gr;if(i&&e){var s=qs(i).hoistableScripts,r=br(e),a=s.get(r);a||(a=i.querySelector(ln(r)),a||(e=f({src:e,async:!0},t),(t=$t.get(r))&&Qo(e,t),a=i.createElement("script"),ft(a),bt(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function Am(e,t){Bi.M(e,t);var i=gr;if(i&&e){var s=qs(i).hoistableScripts,r=br(e),a=s.get(r);a||(a=i.querySelector(ln(r)),a||(e=f({src:e,async:!0,type:"module"},t),(t=$t.get(r))&&Qo(e,t),a=i.createElement("script"),ft(a),bt(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function $f(e,t,i,s){var r=(r=de.current)?ba(r):null;if(!r)throw Error(L(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=pr(i.href),i=qs(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=pr(i.href);var a=qs(r).hoistableStyles,p=a.get(e);if(p||(r=r.ownerDocument||r,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,p),(a=r.querySelector(an(e)))&&!a._p&&(p.instance=a,p.state.loading=5),$t.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},$t.set(e,i),a||Dm(r,e,i,p.state))),t&&s===null)throw Error(L(528,""));return p}if(t&&s!==null)throw Error(L(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=br(i),i=qs(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(L(444,e))}}function pr(e){return'href="'+Yt(e)+'"'}function an(e){return'link[rel="stylesheet"]['+e+"]"}function ed(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Dm(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}),bt(t,"link",i),ft(t),e.head.appendChild(t))}function br(e){return'[src="'+Yt(e)+'"]'}function ln(e){return"script[async]"+e}function td(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Yt(i.href)+'"]');if(s)return t.instance=s,ft(s),s;var r=f({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ft(s),bt(s,"style",r),Sa(s,i.precedence,e),t.instance=s;case"stylesheet":r=pr(i.href);var a=e.querySelector(an(r));if(a)return t.state.loading|=4,t.instance=a,ft(a),a;s=ed(i),(r=$t.get(r))&&Wo(s,r),a=(e.ownerDocument||e).createElement("link"),ft(a);var p=a;return p._p=new Promise(function(M,Y){p.onload=M,p.onerror=Y}),bt(a,"link",s),t.state.loading|=4,Sa(a,i.precedence,e),t.instance=a;case"script":return a=br(i.src),(r=e.querySelector(ln(a)))?(t.instance=r,ft(r),r):(s=i,(r=$t.get(a))&&(s=f({},i),Qo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),ft(r),bt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(L(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Sa(s,i.precedence,e));return t.instance}function Sa(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,a=r,p=0;p<s.length;p++){var M=s[p];if(M.dataset.precedence===t)a=M;else if(a!==r)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Wo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Qo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ya=null;function id(e,t,i){if(ya===null){var s=new Map,r=ya=new Map;r.set(i,s)}else r=ya,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var a=i[r];if(!(a[Cr]||a[vt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var p=a.getAttribute(t)||"";p=e+p;var M=s.get(p);M?M.push(a):s.set(p,[a])}}return s}function sd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Tm(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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 rd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Rm(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=pr(s.href),a=t.querySelector(an(r));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ca.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=a,ft(a);return}a=t.ownerDocument||t,s=ed(s),(r=$t.get(r))&&Wo(s,r),a=a.createElement("link"),ft(a);var p=a;p._p=new Promise(function(M,Y){p.onload=M,p.onerror=Y}),bt(a,"link",s),i.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Ca.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Zo=0;function km(e,t){return e.stylesheets&&e.count===0&&wa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&wa(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Zo===0&&(Zo=62500*um());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wa(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Zo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Ca(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xa=null;function wa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xa=new Map,t.forEach(Lm,e),xa=null,Ca.call(e))}function Lm(e,t){if(!(t.state.loading&4)){var i=xa.get(e);if(i)var s=i.get(null);else{i=new Map,xa.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<r.length;a++){var p=r[a];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(i.set(p.dataset.precedence,p),s=p)}s&&i.set(null,s)}r=t.instance,p=r.getAttribute("data-precedence"),a=i.get(p)||s,a===s&&i.set(null,r),i.set(p,r),this.count++,s=Ca.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),a?a.parentNode.insertBefore(r,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var on={$$typeof:l,Provider:null,Consumer:null,_currentValue:T,_currentValue2:T,_threadCount:0};function Mm(e,t,i,s,r,a,p,M,Y){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=Ya(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ya(0),this.hiddenUpdates=Ya(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function nd(e,t,i,s,r,a,p,M,Y,$,ce,he){return e=new Mm(e,t,i,p,Y,$,ce,he,M),t=1,a===!0&&(t|=24),a=jt(3,null,null,t),e.current=a,a.stateNode=e,t=Rl(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:s,isDehydrated:i,cache:t},Ol(a),e}function ad(e){return e?(e=Qs,e):Qs}function ld(e,t,i,s,r,a){r=ad(r),s.context===null?s.context=r:s.pendingContext=r,s=Ki(t),s.payload={element:i},a=a===void 0?null:a,a!==null&&(s.callback=a),i=Xi(e,s,t),i!==null&&(Nt(i,e,t),Ur(i,e,t))}function od(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Jo(e,t){od(e,t),(e=e.alternate)&&od(e,t)}function cd(e){if(e.tag===13||e.tag===31){var t=Ss(e,67108864);t!==null&&Nt(t,e,67108864),Jo(e,67108864)}}function ud(e){if(e.tag===13||e.tag===31){var t=Pt();t=Va(t);var i=Ss(e,t);i!==null&&Nt(i,e,t),Jo(e,t)}}var Ea=!0;function Om(e,t,i,s){var r=I.T;I.T=null;var a=X.p;try{X.p=2,$o(e,t,i,s)}finally{X.p=a,I.T=r}}function Bm(e,t,i,s){var r=I.T;I.T=null;var a=X.p;try{X.p=8,$o(e,t,i,s)}finally{X.p=a,I.T=r}}function $o(e,t,i,s){if(Ea){var r=ec(s);if(r===null)Uo(e,t,s,Aa,i),fd(e,s);else if(zm(r,e,t,i,s))s.stopPropagation();else if(fd(e,s),t&4&&-1<Nm.indexOf(e)){for(;r!==null;){var a=Us(r);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var p=_e(a.pendingLanes);if(p!==0){var M=a;for(M.pendingLanes|=2,M.entangledLanes|=2;p;){var Y=1<<31-Ct(p);M.entanglements[1]|=Y,p&=~Y}fi(a),(qe&6)===0&&(oa=Pe()+500,tn(0))}}break;case 31:case 13:M=Ss(a,2),M!==null&&Nt(M,a,2),ua(),Jo(a,2)}if(a=ec(s),a===null&&Uo(e,t,s,Aa,i),a===r)break;r=a}r!==null&&s.stopPropagation()}else Uo(e,t,s,null,i)}}function ec(e){return e=tl(e),tc(e)}var Aa=null;function tc(e){if(Aa=null,e=Hs(e),e!==null){var t=K(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=H(t),e!==null)return e;e=null}else if(i===31){if(e=u(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Aa=e,null}function hd(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(yt()){case ti:return 2;case ai:return 8;case Et:case vs:return 32;case Tt:return 268435456;default:return 32}default:return 32}}var ic=!1,ns=null,as=null,ls=null,cn=new Map,un=new Map,os=[],Nm="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 fd(e,t){switch(e){case"focusin":case"focusout":ns=null;break;case"dragenter":case"dragleave":as=null;break;case"mouseover":case"mouseout":ls=null;break;case"pointerover":case"pointerout":cn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":un.delete(t.pointerId)}}function hn(e,t,i,s,r,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:a,targetContainers:[r]},t!==null&&(t=Us(t),t!==null&&cd(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function zm(e,t,i,s,r){switch(t){case"focusin":return ns=hn(ns,e,t,i,s,r),!0;case"dragenter":return as=hn(as,e,t,i,s,r),!0;case"mouseover":return ls=hn(ls,e,t,i,s,r),!0;case"pointerover":var a=r.pointerId;return cn.set(a,hn(cn.get(a)||null,e,t,i,s,r)),!0;case"gotpointercapture":return a=r.pointerId,un.set(a,hn(un.get(a)||null,e,t,i,s,r)),!0}return!1}function dd(e){var t=Hs(e.target);if(t!==null){var i=K(t);if(i!==null){if(t=i.tag,t===13){if(t=H(i),t!==null){e.blockedOn=t,Ac(e.priority,function(){ud(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,Ac(e.priority,function(){ud(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 Da(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=ec(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);el=s,i.target.dispatchEvent(s),el=null}else return t=Us(i),t!==null&&cd(t),e.blockedOn=i,!1;t.shift()}return!0}function _d(e,t,i){Da(e)&&i.delete(t)}function jm(){ic=!1,ns!==null&&Da(ns)&&(ns=null),as!==null&&Da(as)&&(as=null),ls!==null&&Da(ls)&&(ls=null),cn.forEach(_d),un.forEach(_d)}function Ta(e,t){e.blockedOn===t&&(e.blockedOn=null,ic||(ic=!0,S.unstable_scheduleCallback(S.unstable_NormalPriority,jm)))}var Ra=null;function vd(e){Ra!==e&&(Ra=e,S.unstable_scheduleCallback(S.unstable_NormalPriority,function(){Ra===e&&(Ra=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(tc(s||i)===null)continue;break}var a=Us(i);a!==null&&(e.splice(t,3),t-=3,$l(a,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Sr(e){function t(Y){return Ta(Y,e)}ns!==null&&Ta(ns,e),as!==null&&Ta(as,e),ls!==null&&Ta(ls,e),cn.forEach(t),un.forEach(t);for(var i=0;i<os.length;i++){var s=os[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<os.length&&(i=os[0],i.blockedOn===null);)dd(i),i.blockedOn===null&&os.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],a=i[s+1],p=r[Rt]||null;if(typeof a=="function")p||vd(i);else if(p){var M=null;if(a&&a.hasAttribute("formAction")){if(r=a,p=a[Rt]||null)M=p.formAction;else if(tc(r)!==null)continue}else M=p.action;typeof M=="function"?i[s+1]=M:(i.splice(s,3),s-=3),vd(i)}}}function md(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(p){return r=p})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function sc(e){this._internalRoot=e}ka.prototype.render=sc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));var i=t.current,s=Pt();ld(i,s,e,t,null,null)},ka.prototype.unmount=sc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ld(e.current,2,null,e,null,null),ua(),t[js]=null}};function ka(e){this._internalRoot=e}ka.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ec();e={blockedOn:null,target:e,priority:t};for(var i=0;i<os.length&&t!==0&&t<os[i].priority;i++);os.splice(i,0,e),i===0&&dd(e)}};var gd=N.version;if(gd!=="19.2.4")throw Error(L(527,gd,"19.2.4"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=d(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Hm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var La=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!La.isDisabled&&La.supportsFiber)try{li=La.inject(Hm),At=La}catch{}}return dn.createRoot=function(e,t){if(!G(e))throw Error(L(299));var i=!1,s="",r=xh,a=wh,p=Eh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=nd(e,1,!1,null,null,i,s,null,r,a,p,md),e[js]=t.current,Ho(e),new sc(t)},dn.hydrateRoot=function(e,t,i){if(!G(e))throw Error(L(299));var s=!1,r="",a=xh,p=wh,M=Eh,Y=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(a=i.onUncaughtError),i.onCaughtError!==void 0&&(p=i.onCaughtError),i.onRecoverableError!==void 0&&(M=i.onRecoverableError),i.formState!==void 0&&(Y=i.formState)),t=nd(e,1,!0,t,i??null,s,r,Y,a,p,M,md),t.context=ad(null),i=t.current,s=Pt(),s=Va(s),r=Ki(s),r.callback=null,Xi(i,r,s),i=s,t.current.lanes=i,yr(t,i),fi(t),e[js]=t.current,Ho(e),new ka(t)},dn.version="19.2.4",dn}var Dd;function Xm(){if(Dd)return ac.exports;Dd=1;function S(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(S)}catch(N){console.error(N)}}return S(),ac.exports=Km(),ac.exports}var Wm=Xm();const Qm="modulepreload",Zm=function(S){return"/"+S},Td={},e_=function(N,z,L){let G=Promise.resolve();if(z&&z.length>0){let d=function(b){return Promise.all(b.map(f=>Promise.resolve(f).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};var H=d;document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),h=u?.nonce||u?.getAttribute("nonce");G=d(z.map(b=>{if(b=Zm(b),b in Td)return;Td[b]=!0;const f=b.endsWith(".css"),g=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${b}"]${g}`))return;const C=document.createElement("link");if(C.rel=f?"stylesheet":Qm,f||(C.as="script"),C.crossOrigin="",C.href=b,h&&C.setAttribute("nonce",h),document.head.appendChild(C),f)return new Promise((A,y)=>{C.addEventListener("load",A),C.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${b}`)))})}))}function K(u){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=u,window.dispatchEvent(h),!h.defaultPrevented)throw u}return G.then(u=>{for(const h of u||[])h.status==="rejected"&&K(h.reason);return N().catch(K)})};const t_=(...S)=>S.filter((N,z,L)=>!!N&&N.trim()!==""&&L.indexOf(N)===z).join(" ").trim();const Jm=S=>S.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const $m=S=>S.replace(/^([A-Z])|[\s-_]+(\w)/g,(N,z,L)=>L?L.toUpperCase():z.toLowerCase());const Rd=S=>{const N=$m(S);return N.charAt(0).toUpperCase()+N.slice(1)};var eg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const tg=S=>{for(const N in S)if(N.startsWith("aria-")||N==="role"||N==="title")return!0;return!1};const ig=ae.forwardRef(({color:S="currentColor",size:N=24,strokeWidth:z=2,absoluteStrokeWidth:L,className:G="",children:K,iconNode:H,...u},h)=>ae.createElement("svg",{ref:h,...eg,width:N,height:N,stroke:S,strokeWidth:L?Number(z)*24/Number(N):z,className:t_("lucide",G),...!K&&!tg(u)&&{"aria-hidden":"true"},...u},[...H.map(([d,b])=>ae.createElement(d,b)),...Array.isArray(K)?K:[K]]));const St=(S,N)=>{const z=ae.forwardRef(({className:L,...G},K)=>ae.createElement(ig,{ref:K,iconNode:N,className:t_(`lucide-${Jm(Rd(S))}`,`lucide-${S}`,L),...G}));return z.displayName=Rd(S),z};const sg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],kd=St("ban",sg);const rg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ld=St("check",rg);const ng=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Md=St("copy",ng);const ag=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],dc=St("eye-off",ag);const lg=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_c=St("eye",lg);const og=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cg=St("info",og);const ug=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ei=St("loader-circle",ug);const hg=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],fg=St("log-out",hg);const dg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Od=St("panel-left-close",dg);const _g=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],vg=St("panel-left-open",_g);const mg=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Bd=St("pencil",mg);const gg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],za=St("plus",gg);const pg=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],bg=St("rotate-cw",pg);const Sg=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],yg=St("settings",Sg);const Cg=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Nd=St("smartphone",Cg);const xg=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],wg=St("trash-2",xg);const Eg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],mn=St("x",Eg);function i_(S){var N,z,L="";if(typeof S=="string"||typeof S=="number")L+=S;else if(typeof S=="object")if(Array.isArray(S)){var G=S.length;for(N=0;N<G;N++)S[N]&&(z=i_(S[N]))&&(L&&(L+=" "),L+=z)}else for(z in S)S[z]&&(L&&(L+=" "),L+=z);return L}function s_(){for(var S,N,z=0,L="",G=arguments.length;z<G;z++)(S=arguments[z])&&(N=i_(S))&&(L&&(L+=" "),L+=N);return L}const zd=S=>typeof S=="boolean"?`${S}`:S===0?"0":S,jd=s_,Ag=(S,N)=>z=>{var L;if(N?.variants==null)return jd(S,z?.class,z?.className);const{variants:G,defaultVariants:K}=N,H=Object.keys(G).map(d=>{const b=z?.[d],f=K?.[d];if(b===null)return null;const g=zd(b)||zd(f);return G[d][g]}),u=z&&Object.entries(z).reduce((d,b)=>{let[f,g]=b;return g===void 0||(d[f]=g),d},{}),h=N==null||(L=N.compoundVariants)===null||L===void 0?void 0:L.reduce((d,b)=>{let{class:f,className:g,...C}=b;return Object.entries(C).every(A=>{let[y,n]=A;return Array.isArray(n)?n.includes({...K,...u}[y]):{...K,...u}[y]===n})?[...d,f,g]:d},[]);return jd(S,H,h,z?.class,z?.className)};function Hd(S,N){if(typeof S=="function")return S(N);S!=null&&(S.current=N)}function Dg(...S){return N=>{let z=!1;const L=S.map(G=>{const K=Hd(G,N);return!z&&typeof K=="function"&&(z=!0),K});if(z)return()=>{for(let G=0;G<L.length;G++){const K=L[G];typeof K=="function"?K():Hd(S[G],null)}}}}function Tg(S){const N=kg(S),z=ae.forwardRef((L,G)=>{const{children:K,...H}=L,u=ae.Children.toArray(K),h=u.find(Mg);if(h){const d=h.props.children,b=u.map(f=>f===h?ae.Children.count(d)>1?ae.Children.only(null):ae.isValidElement(d)?d.props.children:null:f);return O.jsx(N,{...H,ref:G,children:ae.isValidElement(d)?ae.cloneElement(d,void 0,b):null})}return O.jsx(N,{...H,ref:G,children:K})});return z.displayName=`${S}.Slot`,z}var Rg=Tg("Slot");function kg(S){const N=ae.forwardRef((z,L)=>{const{children:G,...K}=z;if(ae.isValidElement(G)){const H=Bg(G),u=Og(K,G.props);return G.type!==ae.Fragment&&(u.ref=L?Dg(L,H):H),ae.cloneElement(G,u)}return ae.Children.count(G)>1?ae.Children.only(null):null});return N.displayName=`${S}.SlotClone`,N}var Lg=Symbol("radix.slottable");function Mg(S){return ae.isValidElement(S)&&typeof S.type=="function"&&"__radixId"in S.type&&S.type.__radixId===Lg}function Og(S,N){const z={...N};for(const L in N){const G=S[L],K=N[L];/^on[A-Z]/.test(L)?G&&K?z[L]=(...u)=>{const h=K(...u);return G(...u),h}:G&&(z[L]=G):L==="style"?z[L]={...G,...K}:L==="className"&&(z[L]=[G,K].filter(Boolean).join(" "))}return{...S,...z}}function Bg(S){let N=Object.getOwnPropertyDescriptor(S.props,"ref")?.get,z=N&&"isReactWarning"in N&&N.isReactWarning;return z?S.ref:(N=Object.getOwnPropertyDescriptor(S,"ref")?.get,z=N&&"isReactWarning"in N&&N.isReactWarning,z?S.props.ref:S.props.ref||S.ref)}const Ng=(S,N)=>{const z=new Array(S.length+N.length);for(let L=0;L<S.length;L++)z[L]=S[L];for(let L=0;L<N.length;L++)z[S.length+L]=N[L];return z},zg=(S,N)=>({classGroupId:S,validator:N}),r_=(S=new Map,N=null,z)=>({nextPart:S,validators:N,classGroupId:z}),Ha="-",Ud=[],jg="arbitrary..",Hg=S=>{const N=qg(S),{conflictingClassGroups:z,conflictingClassGroupModifiers:L}=S;return{getClassGroupId:H=>{if(H.startsWith("[")&&H.endsWith("]"))return Ug(H);const u=H.split(Ha),h=u[0]===""&&u.length>1?1:0;return n_(u,h,N)},getConflictingClassGroupIds:(H,u)=>{if(u){const h=L[H],d=z[H];return h?d?Ng(d,h):h:d||Ud}return z[H]||Ud}}},n_=(S,N,z)=>{if(S.length-N===0)return z.classGroupId;const G=S[N],K=z.nextPart.get(G);if(K){const d=n_(S,N+1,K);if(d)return d}const H=z.validators;if(H===null)return;const u=N===0?S.join(Ha):S.slice(N).join(Ha),h=H.length;for(let d=0;d<h;d++){const b=H[d];if(b.validator(u))return b.classGroupId}},Ug=S=>S.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const N=S.slice(1,-1),z=N.indexOf(":"),L=N.slice(0,z);return L?jg+L:void 0})(),qg=S=>{const{theme:N,classGroups:z}=S;return Ig(z,N)},Ig=(S,N)=>{const z=r_();for(const L in S){const G=S[L];bc(G,z,L,N)}return z},bc=(S,N,z,L)=>{const G=S.length;for(let K=0;K<G;K++){const H=S[K];Pg(H,N,z,L)}},Pg=(S,N,z,L)=>{if(typeof S=="string"){Gg(S,N,z);return}if(typeof S=="function"){Fg(S,N,z,L);return}Yg(S,N,z,L)},Gg=(S,N,z)=>{const L=S===""?N:a_(N,S);L.classGroupId=z},Fg=(S,N,z,L)=>{if(Vg(S)){bc(S(L),N,z,L);return}N.validators===null&&(N.validators=[]),N.validators.push(zg(z,S))},Yg=(S,N,z,L)=>{const G=Object.entries(S),K=G.length;for(let H=0;H<K;H++){const[u,h]=G[H];bc(h,a_(N,u),z,L)}},a_=(S,N)=>{let z=S;const L=N.split(Ha),G=L.length;for(let K=0;K<G;K++){const H=L[K];let u=z.nextPart.get(H);u||(u=r_(),z.nextPart.set(H,u)),z=u}return z},Vg=S=>"isThemeGetter"in S&&S.isThemeGetter===!0,Kg=S=>{if(S<1)return{get:()=>{},set:()=>{}};let N=0,z=Object.create(null),L=Object.create(null);const G=(K,H)=>{z[K]=H,N++,N>S&&(N=0,L=z,z=Object.create(null))};return{get(K){let H=z[K];if(H!==void 0)return H;if((H=L[K])!==void 0)return G(K,H),H},set(K,H){K in z?z[K]=H:G(K,H)}}},vc="!",qd=":",Xg=[],Id=(S,N,z,L,G)=>({modifiers:S,hasImportantModifier:N,baseClassName:z,maybePostfixModifierPosition:L,isExternal:G}),Wg=S=>{const{prefix:N,experimentalParseClassName:z}=S;let L=G=>{const K=[];let H=0,u=0,h=0,d;const b=G.length;for(let y=0;y<b;y++){const n=G[y];if(H===0&&u===0){if(n===qd){K.push(G.slice(h,y)),h=y+1;continue}if(n==="/"){d=y;continue}}n==="["?H++:n==="]"?H--:n==="("?u++:n===")"&&u--}const f=K.length===0?G:G.slice(h);let g=f,C=!1;f.endsWith(vc)?(g=f.slice(0,-1),C=!0):f.startsWith(vc)&&(g=f.slice(1),C=!0);const A=d&&d>h?d-h:void 0;return Id(K,C,g,A)};if(N){const G=N+qd,K=L;L=H=>H.startsWith(G)?K(H.slice(G.length)):Id(Xg,!1,H,void 0,!0)}if(z){const G=L;L=K=>z({className:K,parseClassName:G})}return L},Qg=S=>{const N=new Map;return S.orderSensitiveModifiers.forEach((z,L)=>{N.set(z,1e6+L)}),z=>{const L=[];let G=[];for(let K=0;K<z.length;K++){const H=z[K],u=H[0]==="[",h=N.has(H);u||h?(G.length>0&&(G.sort(),L.push(...G),G=[]),L.push(H)):G.push(H)}return G.length>0&&(G.sort(),L.push(...G)),L}},Zg=S=>({cache:Kg(S.cacheSize),parseClassName:Wg(S),sortModifiers:Qg(S),...Hg(S)}),Jg=/\s+/,$g=(S,N)=>{const{parseClassName:z,getClassGroupId:L,getConflictingClassGroupIds:G,sortModifiers:K}=N,H=[],u=S.trim().split(Jg);let h="";for(let d=u.length-1;d>=0;d-=1){const b=u[d],{isExternal:f,modifiers:g,hasImportantModifier:C,baseClassName:A,maybePostfixModifierPosition:y}=z(b);if(f){h=b+(h.length>0?" "+h:h);continue}let n=!!y,c=L(n?A.substring(0,y):A);if(!c){if(!n){h=b+(h.length>0?" "+h:h);continue}if(c=L(A),!c){h=b+(h.length>0?" "+h:h);continue}n=!1}const o=g.length===0?"":g.length===1?g[0]:K(g).join(":"),l=C?o+vc:o,v=l+c;if(H.indexOf(v)>-1)continue;H.push(v);const m=G(c,n);for(let w=0;w<m.length;++w){const D=m[w];H.push(l+D)}h=b+(h.length>0?" "+h:h)}return h},ep=(...S)=>{let N=0,z,L,G="";for(;N<S.length;)(z=S[N++])&&(L=l_(z))&&(G&&(G+=" "),G+=L);return G},l_=S=>{if(typeof S=="string")return S;let N,z="";for(let L=0;L<S.length;L++)S[L]&&(N=l_(S[L]))&&(z&&(z+=" "),z+=N);return z},tp=(S,...N)=>{let z,L,G,K;const H=h=>{const d=N.reduce((b,f)=>f(b),S());return z=Zg(d),L=z.cache.get,G=z.cache.set,K=u,u(h)},u=h=>{const d=L(h);if(d)return d;const b=$g(h,z);return G(h,b),b};return K=H,(...h)=>K(ep(...h))},ip=[],ut=S=>{const N=z=>z[S]||ip;return N.isThemeGetter=!0,N},o_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,c_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sp=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,np=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ap=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,op=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,us=S=>sp.test(S),Re=S=>!!S&&!Number.isNaN(Number(S)),hs=S=>!!S&&Number.isInteger(Number(S)),uc=S=>S.endsWith("%")&&Re(S.slice(0,-1)),Ni=S=>rp.test(S),u_=()=>!0,cp=S=>np.test(S)&&!ap.test(S),Sc=()=>!1,up=S=>lp.test(S),hp=S=>op.test(S),fp=S=>!ge(S)&&!pe(S),dp=S=>ds(S,d_,Sc),ge=S=>o_.test(S),Os=S=>ds(S,__,cp),Pd=S=>ds(S,yp,Re),_p=S=>ds(S,m_,u_),vp=S=>ds(S,v_,Sc),Gd=S=>ds(S,h_,Sc),mp=S=>ds(S,f_,hp),Ma=S=>ds(S,g_,up),pe=S=>c_.test(S),_n=S=>Bs(S,__),gp=S=>Bs(S,v_),Fd=S=>Bs(S,h_),pp=S=>Bs(S,d_),bp=S=>Bs(S,f_),Oa=S=>Bs(S,g_,!0),Sp=S=>Bs(S,m_,!0),ds=(S,N,z)=>{const L=o_.exec(S);return L?L[1]?N(L[1]):z(L[2]):!1},Bs=(S,N,z=!1)=>{const L=c_.exec(S);return L?L[1]?N(L[1]):z:!1},h_=S=>S==="position"||S==="percentage",f_=S=>S==="image"||S==="url",d_=S=>S==="length"||S==="size"||S==="bg-size",__=S=>S==="length",yp=S=>S==="number",v_=S=>S==="family-name",m_=S=>S==="number"||S==="weight",g_=S=>S==="shadow",Cp=()=>{const S=ut("color"),N=ut("font"),z=ut("text"),L=ut("font-weight"),G=ut("tracking"),K=ut("leading"),H=ut("breakpoint"),u=ut("container"),h=ut("spacing"),d=ut("radius"),b=ut("shadow"),f=ut("inset-shadow"),g=ut("text-shadow"),C=ut("drop-shadow"),A=ut("blur"),y=ut("perspective"),n=ut("aspect"),c=ut("ease"),o=ut("animate"),l=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],m=()=>[...v(),pe,ge],w=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],_=()=>[pe,ge,h],E=()=>[us,"full","auto",..._()],U=()=>[hs,"none","subgrid",pe,ge],F=()=>["auto",{span:["full",hs,pe,ge]},hs,pe,ge],j=()=>[hs,"auto",pe,ge],P=()=>["auto","min","max","fr",pe,ge],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",..._()],X=()=>[us,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],T=()=>[us,"screen","full","dvw","lvw","svw","min","max","fit",..._()],B=()=>[us,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],R=()=>[S,pe,ge],x=()=>[...v(),Fd,Gd,{position:[pe,ge]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",pp,dp,{size:[pe,ge]}],re=()=>[uc,_n,Os],le=()=>["","none","full",d,pe,ge],de=()=>["",Re,_n,Os],k=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Re,uc,Fd,Gd],oe=()=>["","none",A,pe,ge],ye=()=>["none",Re,pe,ge],ve=()=>["none",Re,pe,ge],ke=()=>[Re,pe,ge],je=()=>[us,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ni],breakpoint:[Ni],color:[u_],container:[Ni],"drop-shadow":[Ni],ease:["in","out","in-out"],font:[fp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ni],shadow:[Ni],spacing:["px",Re],text:[Ni],"text-shadow":[Ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",us,ge,pe,n]}],container:["container"],columns:[{columns:[Re,ge,pe,u]}],"break-after":[{"break-after":l()}],"break-before":[{"break-before":l()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:m()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[hs,"auto",pe,ge]}],basis:[{basis:[us,"full","auto",u,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,us,"auto","initial","none",ge]}],grow:[{grow:["",Re,pe,ge]}],shrink:[{shrink:["",Re,pe,ge]}],order:[{order:[hs,"first","last","none",pe,ge]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...T()]}],"min-inline-size":[{"min-inline":["auto",...T()]}],"max-inline-size":[{"max-inline":["none",...T()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[H]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",z,_n,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[L,Sp,_p]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uc,ge]}],"font-family":[{font:[gp,vp,N]}],"font-features":[{"font-features":[ge]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[G,pe,ge]}],"line-clamp":[{"line-clamp":[Re,"none",pe,Pd]}],leading:[{leading:[K,..._()]}],"list-image":[{"list-image":["none",pe,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",pe,Os]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[Re,"auto",pe,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:x()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hs,pe,ge],radial:["",pe,ge],conic:[hs,pe,ge]},bp,mp]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...k(),"hidden","none"]}],"divide-style":[{divide:[...k(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...k(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,pe,ge]}],"outline-w":[{outline:["",Re,_n,Os]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",b,Oa,Ma]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,Oa,Ma]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[Re,Os]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",g,Oa,Ma]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[Re,pe,ge]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[pe,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:x()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,ge]}],filter:[{filter:["","none",pe,ge]}],blur:[{blur:oe()}],brightness:[{brightness:[Re,pe,ge]}],contrast:[{contrast:[Re,pe,ge]}],"drop-shadow":[{"drop-shadow":["","none",C,Oa,Ma]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",Re,pe,ge]}],"hue-rotate":[{"hue-rotate":[Re,pe,ge]}],invert:[{invert:["",Re,pe,ge]}],saturate:[{saturate:[Re,pe,ge]}],sepia:[{sepia:["",Re,pe,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,ge]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Re,pe,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Re,pe,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,pe,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,pe,ge]}],"backdrop-invert":[{"backdrop-invert":["",Re,pe,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Re,pe,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Re,pe,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,pe,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",pe,ge]}],ease:[{ease:["linear","initial",c,pe,ge]}],delay:[{delay:[Re,pe,ge]}],animate:[{animate:["none",o,pe,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,pe,ge]}],"perspective-origin":[{"perspective-origin":m()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[pe,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:m()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:je()}],"translate-x":[{"translate-x":je()}],"translate-y":[{"translate-y":je()}],"translate-z":[{"translate-z":je()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,ge]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[Re,_n,Os,Pd]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xp=tp(Cp);function ji(...S){return xp(s_(S))}const wp=Ag("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ie({className:S,variant:N="default",size:z="default",asChild:L=!1,...G}){const K=L?Rg:"button";return O.jsx(K,{"data-slot":"button","data-variant":N,"data-size":z,className:ji(wp({variant:N,size:z,className:S})),...G})}function Ep({sessions:S,activeSessionId:N,onSelectSession:z,onNewSession:L,onCloseSession:G,onRenameSession:K,onCloseAllSessions:H,loading:u,collapsed:h,onToggleCollapse:d,mobileOpen:b,onMobileClose:f,width:g=192,onWidthChange:C,inputLocks:A={},clientId:y="",onTakeControl:n,dataReceivedSessions:c=new Set}){const[o,l]=ae.useState(null),[v,m]=ae.useState(""),[w,D]=ae.useState(null),[_,E]=ae.useState(null),[U,F]=ae.useState(!1),j=ae.useRef(null),P=ae.useRef(!1);ae.useEffect(()=>{const B=q=>{if(!P.current)return;const Z=Math.max(180,Math.min(500,q.clientX));C?.(Z),q.clientX<100&&d()},R=()=>{P.current=!1},x=()=>{P.current&&(P.current=!1)};return document.addEventListener("mousemove",B),document.addEventListener("mouseup",R),window.addEventListener("blur",x),()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",R),window.removeEventListener("blur",x)}},[C]);const ee=()=>{P.current=!0},se=b!==void 0,I=B=>{const R=A?.[B];return!R||R===y};function X(B){I(B.id)&&(l(B.id),m(B.label),requestAnimationFrame(()=>j.current?.focus()))}function T(){o&&v.trim()&&K(o,v.trim()),l(null)}return se?b?O.jsxs("div",{className:"fixed inset-y-0 left-0 z-50 w-64 shadow-xl flex flex-col bg-sidebar border-r border-border",children:[O.jsxs("div",{className:"flex items-center gap-1 px-2 pt-2 pb-2 border-b border-border",children:[O.jsx(Ie,{variant:"outline",size:"sm",onClick:L,disabled:u,title:"New session",className:"px-2",children:u?O.jsx(ei,{className:"h-3.5 w-3.5 animate-spin flex-shrink-0"}):O.jsx(za,{className:"h-3.5 w-3.5 flex-shrink-0"})}),O.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>F(!0),disabled:S.length===0,title:"Close all sessions",className:"px-2",children:O.jsx(mn,{className:"h-3.5 w-3.5 flex-shrink-0"})}),O.jsx(Ie,{variant:"ghost",size:"icon-sm",title:"Close sidebar",onClick:f,className:"[&_svg]:size-4 flex-shrink-0 ml-auto",children:O.jsx(Od,{})})]}),O.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:S.length===0?O.jsx("p",{className:"text-xs text-muted-foreground px-3 py-4 text-center",children:"No sessions yet"}):S.map(B=>{const R=B.id===N,x=o===B.id;return O.jsxs("div",{className:`group flex items-center gap-2 px-2 py-1.5 mx-1 rounded-md cursor-pointer transition-colors ${R?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,onClick:()=>{x||(z(B.id),f?.())},onDoubleClick:q=>{q.stopPropagation(),X(B)},children:[O.jsx("span",{className:`inline-flex h-2 w-2 rounded-full flex-shrink-0 bg-green-500 ${c.has(B.id)?"data-received":""}`}),x?O.jsx("input",{ref:j,value:v,onChange:q=>m(q.target.value),onKeyDown:q=>{q.key==="Enter"&&T(),q.key==="Escape"&&l(null)},onBlur:T,onClick:q=>q.stopPropagation(),className:"flex-1 bg-transparent text-xs outline-none border-b border-foreground/30 py-0",autoFocus:!0}):O.jsx("span",{className:"flex-1 truncate text-xs",children:B.label}),!x&&O.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[A[B.id]&&A[B.id]!==y&&O.jsx("button",{onClick:q=>{q.stopPropagation(),D(B.id)},className:"p-0.5 rounded hover:bg-red-500/20",title:"Read-only: another client has control",children:O.jsx(kd,{className:"h-3 w-3 text-red-500 flex-shrink-0"})}),O.jsxs("div",{className:"flex items-center gap-0.5",children:[O.jsx("button",{disabled:!I(B.id),className:"p-0.5 rounded hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed",onClick:q=>{q.stopPropagation(),X(B)},title:I(B.id)?"Rename session":"Only owner can rename",children:O.jsx(Bd,{className:"h-3 w-3"})}),O.jsx("button",{disabled:!I(B.id),className:"p-0.5 rounded hover:bg-destructive/20 hover:text-destructive disabled:opacity-50 disabled:cursor-not-allowed",onClick:q=>{q.stopPropagation(),E(B.id)},title:I(B.id)?"Close session":"Only owner can close",children:O.jsx(mn,{className:"h-3 w-3"})})]})]})]},B.id)})}),O.jsx("div",{className:"border-t border-border px-3 py-2 text-muted-foreground",children:O.jsxs("div",{className:"text-xs space-y-1",children:[O.jsx("div",{className:"text-muted-foreground/70",children:"Session ID:"}),O.jsx("div",{className:"font-mono text-xs text-foreground/80",title:y,children:y.split("-").pop()})]})})]}):null:h?O.jsxs("div",{className:"flex flex-col items-center h-full w-11 min-w-[2.75rem] border-r border-border bg-sidebar py-2 gap-1",children:[O.jsx(Ie,{variant:"ghost",size:"icon-sm",title:"Expand sidebar",onClick:d,className:"[&_svg]:size-4 mb-1",children:O.jsx(vg,{})}),O.jsx(Ie,{variant:"ghost",size:"icon-sm",title:"New session",onClick:L,disabled:u,className:"[&_svg]:size-4",children:u?O.jsx(ei,{className:"animate-spin"}):O.jsx(za,{})}),O.jsx("div",{className:"w-6 border-t border-border my-1"}),O.jsx("div",{className:"flex-1 overflow-y-auto flex flex-col items-center gap-1",children:S.map(B=>{const R=B.id===N,x=B.label.slice(0,2).toUpperCase();return O.jsxs("button",{title:B.label,onClick:()=>z(B.id),className:`relative flex items-center justify-center w-8 h-8 rounded-md text-xs font-mono font-medium transition-colors ${R?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,children:[O.jsx("span",{children:x}),O.jsx("span",{className:`absolute bottom-0.5 right-0.5 h-1.5 w-1.5 rounded-full bg-green-500 ${c.has(B.id)?"data-received":""}`})]},B.id)})})]}):O.jsxs("div",{className:"flex h-full bg-sidebar relative",style:{width:`${g}px`},children:[O.jsxs("div",{className:"flex flex-col flex-1",children:[O.jsxs("div",{className:"flex items-center gap-1 px-2 pt-2 pb-2 border-b border-border relative",children:[O.jsx(Ie,{variant:"outline",size:"sm",onClick:L,disabled:u,title:"New session",className:"px-2",children:u?O.jsx(ei,{className:"h-3.5 w-3.5 animate-spin flex-shrink-0"}):O.jsx(za,{className:"h-3.5 w-3.5 flex-shrink-0"})}),O.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>F(!0),disabled:S.length===0,title:"Close all sessions",className:"px-2",children:O.jsx(mn,{className:"h-3.5 w-3.5 flex-shrink-0"})}),O.jsx(Ie,{variant:"ghost",size:"icon-sm",title:"Collapse sidebar",onClick:d,className:"[&_svg]:size-4 flex-shrink-0 ml-auto",children:O.jsx(Od,{})})]}),O.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:S.length===0?O.jsx("p",{className:"text-xs text-muted-foreground px-3 py-4 text-center",children:"No sessions yet"}):S.map(B=>{const R=B.id===N,x=o===B.id;return O.jsxs("div",{className:`group flex items-center gap-2 px-2 py-1.5 mx-1 rounded-md cursor-pointer transition-colors ${R?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"}`,onClick:()=>{x||z(B.id)},onDoubleClick:q=>{q.stopPropagation(),X(B)},children:[O.jsx("span",{className:`inline-flex h-2 w-2 rounded-full flex-shrink-0 bg-green-500 ${c.has(B.id)?"data-received":""}`}),x?O.jsx("input",{ref:j,value:v,onChange:q=>m(q.target.value),onKeyDown:q=>{q.key==="Enter"&&T(),q.key==="Escape"&&l(null)},onBlur:T,onClick:q=>q.stopPropagation(),className:"flex-1 bg-transparent text-xs outline-none border-b border-foreground/30 py-0",autoFocus:!0}):O.jsx("span",{className:"flex-1 truncate text-xs",children:B.label}),!x&&O.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[A[B.id]&&A[B.id]!==y&&O.jsx("button",{onClick:q=>{q.stopPropagation(),D(B.id)},className:"p-0.5 rounded hover:bg-red-500/20",title:"Read-only: another client has control",children:O.jsx(kd,{className:"h-3 w-3 text-red-500 flex-shrink-0"})}),O.jsxs("div",{className:"flex items-center gap-0.5",children:[O.jsx("button",{disabled:!I(B.id),className:"p-0.5 rounded hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed",onClick:q=>{q.stopPropagation(),X(B)},title:I(B.id)?"Rename session":"Only owner can rename",children:O.jsx(Bd,{className:"h-3 w-3"})}),O.jsx("button",{disabled:!I(B.id),className:"p-0.5 rounded hover:bg-destructive/20 hover:text-destructive disabled:opacity-50 disabled:cursor-not-allowed",onClick:q=>{q.stopPropagation(),E(B.id)},title:I(B.id)?"Close session":"Only owner can close",children:O.jsx(mn,{className:"h-3 w-3"})})]})]})]},B.id)})}),O.jsx("div",{className:"border-t border-border px-3 py-2 text-muted-foreground",children:O.jsxs("div",{className:"text-xs space-y-1",children:[O.jsx("div",{className:"text-muted-foreground/70",children:"Session ID:"}),O.jsx("div",{className:"font-mono text-xs text-foreground/80",title:y,children:y.split("-").pop()})]})})]}),O.jsx("div",{onMouseDown:ee,className:"absolute right-0 top-1/2 -translate-y-1/2 w-1 cursor-col-resize bg-border hover:bg-primary/50 transition-colors",style:{height:"40px"},title:"Drag to resize sidebar"}),_&&O.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[O.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>E(null)}),O.jsxs("div",{className:"relative bg-card border border-border rounded-lg p-6 shadow-lg max-w-sm mx-4",children:[O.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Close Session?"}),O.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Are you sure you want to close this session? This action cannot be undone."}),O.jsxs("div",{className:"flex gap-2 justify-end",children:[O.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>E(null),children:"Cancel"}),O.jsx(Ie,{variant:"destructive",size:"sm",onClick:()=>{_&&G(_),E(null)},children:"Close Session"})]})]})]}),w&&O.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[O.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>D(null)}),O.jsxs("div",{className:"relative bg-card border border-border rounded-lg p-6 shadow-lg max-w-sm mx-4",children:[O.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Session In Use"}),O.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"This session is currently being used by another client. Would you like to take control?"}),O.jsxs("div",{className:"flex gap-2 justify-end",children:[O.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>D(null),children:"Cancel"}),O.jsx(Ie,{variant:"default",size:"sm",onClick:()=>{n&&w&&n(w),D(null)},children:"Take Control"})]})]})]}),U&&O.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[O.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:()=>F(!1)}),O.jsxs("div",{className:"relative bg-card border border-border rounded-lg p-6 shadow-lg max-w-sm mx-4",children:[O.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Close All Sessions?"}),O.jsxs("p",{className:"text-sm text-muted-foreground mb-6",children:["Are you sure you want to close all ",S.length," session",S.length!==1?"s":"","? This action cannot be undone."]}),O.jsxs("div",{className:"flex gap-2 justify-end",children:[O.jsx(Ie,{variant:"outline",size:"sm",onClick:()=>F(!1),children:"Cancel"}),O.jsx(Ie,{variant:"destructive",size:"sm",onClick:()=>{H(),F(!1)},children:"Close All"})]})]})]})]})}const gn=ae.forwardRef(({className:S,checked:N,onCheckedChange:z,...L},G)=>O.jsxs("label",{className:"inline-flex items-center cursor-pointer",children:[O.jsx("input",{type:"checkbox",ref:G,checked:N,onChange:K=>z?.(K.target.checked),className:"sr-only",...L}),O.jsx("div",{className:ji("relative w-9 h-5 rounded-full transition-colors",N?"bg-primary":"bg-gray-300 dark:bg-gray-600"),children:O.jsx("div",{className:ji("absolute top-0.5 left-0.5 w-4 h-4 bg-white rounded-full shadow transition-transform",N&&"translate-x-4")})})]}));gn.displayName="Switch";const p_=ae.createContext(void 0);function b_(){const S=ae.useContext(p_);if(!S)throw new Error("Dialog components must be used within Dialog");return S}function Yd({open:S,onOpenChange:N,children:z}){return O.jsx(p_.Provider,{value:{open:S,setOpen:N},children:z})}function Vd({children:S,className:N}){const{open:z,setOpen:L}=b_(),G=ae.useRef(null);return ae.useEffect(()=>{if(!z)return;function K(H){G.current&&!G.current.contains(H.target)&&L(!1)}return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[z,L]),ae.useEffect(()=>(z?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[z]),z?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>L(!1)}),O.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:O.jsx("div",{ref:G,className:ji("relative w-full max-w-2xl max-h-[85vh] bg-card border border-border rounded-lg shadow-lg overflow-hidden flex flex-col",N),onClick:K=>K.stopPropagation(),children:S})})]}):null}function Kd({children:S,className:N}){return O.jsx("div",{className:ji("flex items-center justify-between px-6 py-4 border-b border-border",N),children:S})}function Xd({children:S,className:N}){return O.jsx("h2",{className:ji("text-lg font-semibold",N),children:S})}function Wd({onClick:S,className:N}){const{setOpen:z}=b_();return O.jsx("button",{onClick:()=>{S?.(),z(!1)},className:ji("inline-flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground transition-colors",N),title:"Close",children:O.jsx(mn,{className:"h-4 w-4"})})}function Qd({children:S,className:N}){return O.jsx("div",{className:ji("flex-1 overflow-y-auto px-6 py-6",N),children:S})}function Ap({children:S,className:N}){return O.jsx("div",{className:ji("flex items-center justify-end gap-2 px-6 py-4 border-t border-border",N),children:S})}let Dp={data:""},Tp=S=>{if(typeof window=="object"){let N=(S?S.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return N.nonce=window.__nonce__,N.parentNode||(S||document.head).appendChild(N),N.firstChild}return S||Dp},Rp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,kp=/\/\*[^]*?\*\/| +/g,Zd=/\n+/g,fs=(S,N)=>{let z="",L="",G="";for(let K in S){let H=S[K];K[0]=="@"?K[1]=="i"?z=K+" "+H+";":L+=K[1]=="f"?fs(H,K):K+"{"+fs(H,K[1]=="k"?"":N)+"}":typeof H=="object"?L+=fs(H,N?N.replace(/([^,])+/g,u=>K.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,h=>/&/.test(h)?h.replace(/&/g,u):u?u+" "+h:h)):K):H!=null&&(K=/^--/.test(K)?K:K.replace(/[A-Z]/g,"-$&").toLowerCase(),G+=fs.p?fs.p(K,H):K+":"+H+";")}return z+(N&&G?N+"{"+G+"}":G)+L},zi={},S_=S=>{if(typeof S=="object"){let N="";for(let z in S)N+=z+S_(S[z]);return N}return S},Lp=(S,N,z,L,G)=>{let K=S_(S),H=zi[K]||(zi[K]=(h=>{let d=0,b=11;for(;d<h.length;)b=101*b+h.charCodeAt(d++)>>>0;return"go"+b})(K));if(!zi[H]){let h=K!==S?S:(d=>{let b,f,g=[{}];for(;b=Rp.exec(d.replace(kp,""));)b[4]?g.shift():b[3]?(f=b[3].replace(Zd," ").trim(),g.unshift(g[0][f]=g[0][f]||{})):g[0][b[1]]=b[2].replace(Zd," ").trim();return g[0]})(S);zi[H]=fs(G?{["@keyframes "+H]:h}:h,z?"":"."+H)}let u=z&&zi.g?zi.g:null;return z&&(zi.g=zi[H]),((h,d,b,f)=>{f?d.data=d.data.replace(f,h):d.data.indexOf(h)===-1&&(d.data=b?h+d.data:d.data+h)})(zi[H],N,L,u),H},Mp=(S,N,z)=>S.reduce((L,G,K)=>{let H=N[K];if(H&&H.call){let u=H(z),h=u&&u.props&&u.props.className||/^go/.test(u)&&u;H=h?"."+h:u&&typeof u=="object"?u.props?"":fs(u,""):u===!1?"":u}return L+G+(H??"")},"");function qa(S){let N=this||{},z=S.call?S(N.p):S;return Lp(z.unshift?z.raw?Mp(z,[].slice.call(arguments,1),N.p):z.reduce((L,G)=>Object.assign(L,G&&G.call?G(N.p):G),{}):z,Tp(N.target),N.g,N.o,N.k)}let y_,mc,gc;qa.bind({g:1});let Hi=qa.bind({k:1});function Op(S,N,z,L){fs.p=N,y_=S,mc=z,gc=L}function _s(S,N){let z=this||{};return function(){let L=arguments;function G(K,H){let u=Object.assign({},K),h=u.className||G.className;z.p=Object.assign({theme:mc&&mc()},u),z.o=/ *go\d+/.test(h),u.className=qa.apply(z,L)+(h?" "+h:"");let d=S;return S[0]&&(d=u.as||S,delete u.as),gc&&d[0]&&gc(u),y_(d,u)}return G}}var Bp=S=>typeof S=="function",Ua=(S,N)=>Bp(S)?S(N):S,Np=(()=>{let S=0;return()=>(++S).toString()})(),C_=(()=>{let S;return()=>{if(S===void 0&&typeof window<"u"){let N=matchMedia("(prefers-reduced-motion: reduce)");S=!N||N.matches}return S}})(),zp=20,yc="default",x_=(S,N)=>{let{toastLimit:z}=S.settings;switch(N.type){case 0:return{...S,toasts:[N.toast,...S.toasts].slice(0,z)};case 1:return{...S,toasts:S.toasts.map(H=>H.id===N.toast.id?{...H,...N.toast}:H)};case 2:let{toast:L}=N;return x_(S,{type:S.toasts.find(H=>H.id===L.id)?1:0,toast:L});case 3:let{toastId:G}=N;return{...S,toasts:S.toasts.map(H=>H.id===G||G===void 0?{...H,dismissed:!0,visible:!1}:H)};case 4:return N.toastId===void 0?{...S,toasts:[]}:{...S,toasts:S.toasts.filter(H=>H.id!==N.toastId)};case 5:return{...S,pausedAt:N.time};case 6:let K=N.time-(S.pausedAt||0);return{...S,pausedAt:void 0,toasts:S.toasts.map(H=>({...H,pauseDuration:H.pauseDuration+K}))}}},ja=[],w_={toasts:[],pausedAt:void 0,settings:{toastLimit:zp}},di={},E_=(S,N=yc)=>{di[N]=x_(di[N]||w_,S),ja.forEach(([z,L])=>{z===N&&L(di[N])})},A_=S=>Object.keys(di).forEach(N=>E_(S,N)),jp=S=>Object.keys(di).find(N=>di[N].toasts.some(z=>z.id===S)),Ia=(S=yc)=>N=>{E_(N,S)},Hp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Up=(S={},N=yc)=>{let[z,L]=ae.useState(di[N]||w_),G=ae.useRef(di[N]);ae.useEffect(()=>(G.current!==di[N]&&L(di[N]),ja.push([N,L]),()=>{let H=ja.findIndex(([u])=>u===N);H>-1&&ja.splice(H,1)}),[N]);let K=z.toasts.map(H=>{var u,h,d;return{...S,...S[H.type],...H,removeDelay:H.removeDelay||((u=S[H.type])==null?void 0:u.removeDelay)||S?.removeDelay,duration:H.duration||((h=S[H.type])==null?void 0:h.duration)||S?.duration||Hp[H.type],style:{...S.style,...(d=S[H.type])==null?void 0:d.style,...H.style}}});return{...z,toasts:K}},qp=(S,N="blank",z)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:N,ariaProps:{role:"status","aria-live":"polite"},message:S,pauseDuration:0,...z,id:z?.id||Np()}),bn=S=>(N,z)=>{let L=qp(N,S,z);return Ia(L.toasterId||jp(L.id))({type:2,toast:L}),L.id},ht=(S,N)=>bn("blank")(S,N);ht.error=bn("error");ht.success=bn("success");ht.loading=bn("loading");ht.custom=bn("custom");ht.dismiss=(S,N)=>{let z={type:3,toastId:S};N?Ia(N)(z):A_(z)};ht.dismissAll=S=>ht.dismiss(void 0,S);ht.remove=(S,N)=>{let z={type:4,toastId:S};N?Ia(N)(z):A_(z)};ht.removeAll=S=>ht.remove(void 0,S);ht.promise=(S,N,z)=>{let L=ht.loading(N.loading,{...z,...z?.loading});return typeof S=="function"&&(S=S()),S.then(G=>{let K=N.success?Ua(N.success,G):void 0;return K?ht.success(K,{id:L,...z,...z?.success}):ht.dismiss(L),G}).catch(G=>{let K=N.error?Ua(N.error,G):void 0;K?ht.error(K,{id:L,...z,...z?.error}):ht.dismiss(L)}),S};var Ip=1e3,Pp=(S,N="default")=>{let{toasts:z,pausedAt:L}=Up(S,N),G=ae.useRef(new Map).current,K=ae.useCallback((f,g=Ip)=>{if(G.has(f))return;let C=setTimeout(()=>{G.delete(f),H({type:4,toastId:f})},g);G.set(f,C)},[]);ae.useEffect(()=>{if(L)return;let f=Date.now(),g=z.map(C=>{if(C.duration===1/0)return;let A=(C.duration||0)+C.pauseDuration-(f-C.createdAt);if(A<0){C.visible&&ht.dismiss(C.id);return}return setTimeout(()=>ht.dismiss(C.id,N),A)});return()=>{g.forEach(C=>C&&clearTimeout(C))}},[z,L,N]);let H=ae.useCallback(Ia(N),[N]),u=ae.useCallback(()=>{H({type:5,time:Date.now()})},[H]),h=ae.useCallback((f,g)=>{H({type:1,toast:{id:f,height:g}})},[H]),d=ae.useCallback(()=>{L&&H({type:6,time:Date.now()})},[L,H]),b=ae.useCallback((f,g)=>{let{reverseOrder:C=!1,gutter:A=8,defaultPosition:y}=g||{},n=z.filter(l=>(l.position||y)===(f.position||y)&&l.height),c=n.findIndex(l=>l.id===f.id),o=n.filter((l,v)=>v<c&&l.visible).length;return n.filter(l=>l.visible).slice(...C?[o+1]:[0,o]).reduce((l,v)=>l+(v.height||0)+A,0)},[z]);return ae.useEffect(()=>{z.forEach(f=>{if(f.dismissed)K(f.id,f.removeDelay);else{let g=G.get(f.id);g&&(clearTimeout(g),G.delete(f.id))}})},[z,K]),{toasts:z,handlers:{updateHeight:h,startPause:u,endPause:d,calculateOffset:b}}},Gp=Hi`
10
- from {
11
- transform: scale(0) rotate(45deg);
12
- opacity: 0;
13
- }
14
- to {
15
- transform: scale(1) rotate(45deg);
16
- opacity: 1;
17
- }`,Fp=Hi`
18
- from {
19
- transform: scale(0);
20
- opacity: 0;
21
- }
22
- to {
23
- transform: scale(1);
24
- opacity: 1;
25
- }`,Yp=Hi`
26
- from {
27
- transform: scale(0) rotate(90deg);
28
- opacity: 0;
29
- }
30
- to {
31
- transform: scale(1) rotate(90deg);
32
- opacity: 1;
33
- }`,Vp=_s("div")`
34
- width: 20px;
35
- opacity: 0;
36
- height: 20px;
37
- border-radius: 10px;
38
- background: ${S=>S.primary||"#ff4b4b"};
39
- position: relative;
40
- transform: rotate(45deg);
41
-
42
- animation: ${Gp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
43
- forwards;
44
- animation-delay: 100ms;
45
-
46
- &:after,
47
- &:before {
48
- content: '';
49
- animation: ${Fp} 0.15s ease-out forwards;
50
- animation-delay: 150ms;
51
- position: absolute;
52
- border-radius: 3px;
53
- opacity: 0;
54
- background: ${S=>S.secondary||"#fff"};
55
- bottom: 9px;
56
- left: 4px;
57
- height: 2px;
58
- width: 12px;
59
- }
60
-
61
- &:before {
62
- animation: ${Yp} 0.15s ease-out forwards;
63
- animation-delay: 180ms;
64
- transform: rotate(90deg);
65
- }
66
- `,Kp=Hi`
67
- from {
68
- transform: rotate(0deg);
69
- }
70
- to {
71
- transform: rotate(360deg);
72
- }
73
- `,Xp=_s("div")`
74
- width: 12px;
75
- height: 12px;
76
- box-sizing: border-box;
77
- border: 2px solid;
78
- border-radius: 100%;
79
- border-color: ${S=>S.secondary||"#e0e0e0"};
80
- border-right-color: ${S=>S.primary||"#616161"};
81
- animation: ${Kp} 1s linear infinite;
82
- `,Wp=Hi`
83
- from {
84
- transform: scale(0) rotate(45deg);
85
- opacity: 0;
86
- }
87
- to {
88
- transform: scale(1) rotate(45deg);
89
- opacity: 1;
90
- }`,Qp=Hi`
91
- 0% {
92
- height: 0;
93
- width: 0;
94
- opacity: 0;
95
- }
96
- 40% {
97
- height: 0;
98
- width: 6px;
99
- opacity: 1;
100
- }
101
- 100% {
102
- opacity: 1;
103
- height: 10px;
104
- }`,Zp=_s("div")`
105
- width: 20px;
106
- opacity: 0;
107
- height: 20px;
108
- border-radius: 10px;
109
- background: ${S=>S.primary||"#61d345"};
110
- position: relative;
111
- transform: rotate(45deg);
112
-
113
- animation: ${Wp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
114
- forwards;
115
- animation-delay: 100ms;
116
- &:after {
117
- content: '';
118
- box-sizing: border-box;
119
- animation: ${Qp} 0.2s ease-out forwards;
120
- opacity: 0;
121
- animation-delay: 200ms;
122
- position: absolute;
123
- border-right: 2px solid;
124
- border-bottom: 2px solid;
125
- border-color: ${S=>S.secondary||"#fff"};
126
- bottom: 6px;
127
- left: 6px;
128
- height: 10px;
129
- width: 6px;
130
- }
131
- `,Jp=_s("div")`
132
- position: absolute;
133
- `,$p=_s("div")`
134
- position: relative;
135
- display: flex;
136
- justify-content: center;
137
- align-items: center;
138
- min-width: 20px;
139
- min-height: 20px;
140
- `,e0=Hi`
141
- from {
142
- transform: scale(0.6);
143
- opacity: 0.4;
144
- }
145
- to {
146
- transform: scale(1);
147
- opacity: 1;
148
- }`,t0=_s("div")`
149
- position: relative;
150
- transform: scale(0.6);
151
- opacity: 0.4;
152
- min-width: 20px;
153
- animation: ${e0} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
154
- forwards;
155
- `,i0=({toast:S})=>{let{icon:N,type:z,iconTheme:L}=S;return N!==void 0?typeof N=="string"?ae.createElement(t0,null,N):N:z==="blank"?null:ae.createElement($p,null,ae.createElement(Xp,{...L}),z!=="loading"&&ae.createElement(Jp,null,z==="error"?ae.createElement(Vp,{...L}):ae.createElement(Zp,{...L})))},s0=S=>`
156
- 0% {transform: translate3d(0,${S*-200}%,0) scale(.6); opacity:.5;}
157
- 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
158
- `,r0=S=>`
159
- 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
160
- 100% {transform: translate3d(0,${S*-150}%,-1px) scale(.6); opacity:0;}
161
- `,n0="0%{opacity:0;} 100%{opacity:1;}",a0="0%{opacity:1;} 100%{opacity:0;}",l0=_s("div")`
162
- display: flex;
163
- align-items: center;
164
- background: #fff;
165
- color: #363636;
166
- line-height: 1.3;
167
- will-change: transform;
168
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
169
- max-width: 350px;
170
- pointer-events: auto;
171
- padding: 8px 10px;
172
- border-radius: 8px;
173
- `,o0=_s("div")`
174
- display: flex;
175
- justify-content: center;
176
- margin: 4px 10px;
177
- color: inherit;
178
- flex: 1 1 auto;
179
- white-space: pre-line;
180
- `,c0=(S,N)=>{let z=S.includes("top")?1:-1,[L,G]=C_()?[n0,a0]:[s0(z),r0(z)];return{animation:N?`${Hi(L)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Hi(G)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},u0=ae.memo(({toast:S,position:N,style:z,children:L})=>{let G=S.height?c0(S.position||N||"top-center",S.visible):{opacity:0},K=ae.createElement(i0,{toast:S}),H=ae.createElement(o0,{...S.ariaProps},Ua(S.message,S));return ae.createElement(l0,{className:S.className,style:{...G,...z,...S.style}},typeof L=="function"?L({icon:K,message:H}):ae.createElement(ae.Fragment,null,K,H))});Op(ae.createElement);var h0=({id:S,className:N,style:z,onHeightUpdate:L,children:G})=>{let K=ae.useCallback(H=>{if(H){let u=()=>{let h=H.getBoundingClientRect().height;L(S,h)};u(),new MutationObserver(u).observe(H,{subtree:!0,childList:!0,characterData:!0})}},[S,L]);return ae.createElement("div",{ref:K,className:N,style:z},G)},f0=(S,N)=>{let z=S.includes("top"),L=z?{top:0}:{bottom:0},G=S.includes("center")?{justifyContent:"center"}:S.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:C_()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${N*(z?1:-1)}px)`,...L,...G}},d0=qa`
181
- z-index: 9999;
182
- > * {
183
- pointer-events: auto;
184
- }
185
- `,Ba=16,_0=({reverseOrder:S,position:N="top-center",toastOptions:z,gutter:L,children:G,toasterId:K,containerStyle:H,containerClassName:u})=>{let{toasts:h,handlers:d}=Pp(z,K);return ae.createElement("div",{"data-rht-toaster":K||"",style:{position:"fixed",zIndex:9999,top:Ba,left:Ba,right:Ba,bottom:Ba,pointerEvents:"none",...H},className:u,onMouseEnter:d.startPause,onMouseLeave:d.endPause},h.map(b=>{let f=b.position||N,g=d.calculateOffset(b,{reverseOrder:S,gutter:L,defaultPosition:N}),C=f0(f,g);return ae.createElement(h0,{id:b.id,key:b.id,onHeightUpdate:d.updateHeight,className:b.visible?d0:"",style:C},b.type==="custom"?Ua(b.message,b):G?G(b):ae.createElement(u0,{toast:b,position:f}))}))},pn=ht;function v0({open:S,onOpenChange:N}){const[z,L]=ae.useState(null),[G,K]=ae.useState(null),[H,u]=ae.useState(!1),[h,d]=ae.useState(null),[b,f]=ae.useState(!1),[g,C]=ae.useState(!1),[A,y]=ae.useState(null),[n,c]=ae.useState(!1),[o,l]=ae.useState([]),[v,m]=ae.useState(!1),[w,D]=ae.useState(""),[_,E]=ae.useState(null);ae.useEffect(()=>{if(!S)return;async function R(){try{const[x,q,Z]=await Promise.all([fetch("/api/settings",{credentials:"include"}),fetch("/api/auth/session-password",{credentials:"include"}),fetch("/api/auth/passkeys",{credentials:"include"})]);if(x.ok){const re=await x.json();L(re),K(re)}if(q.ok){const re=await q.json();d(re.password)}if(Z.ok){const re=await Z.json();l(re)}}catch(x){console.error("Failed to fetch settings:",x)}}R()},[S]),ae.useEffect(()=>{S||(L(null),K(null))},[S]);const U=ae.useCallback(async(R,x)=>{const q=await fetch("/api/settings",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:R,value:String(x)})});q.ok&&(await q.json()).success&&L(re=>re?{...re,[R]:x}:null)},[]),F=G!==null&&z!==null&&Object.keys(G).some(R=>String(G[R])!==String(z[R]));async function j(){if(!(!G||!z)){u(!0);try{for(const R of Object.keys(G))String(G[R])!==String(z[R])&&await U(R,G[R]);pn.success("Settings saved")}catch(R){console.error("Failed to save settings:",R),pn.error("Failed to save settings")}finally{u(!1)}}}function P(){K(z)}function ee(R,x){K(q=>q?{...q,[R]:x}:null)}async function se(){c(!0);try{const R=await fetch("/api/auth/session-password/rotate",{method:"POST"});if(R.ok){const x=await R.json();y(x.password),d(x.password),pn.success("Password rotated")}}catch(R){console.error("Failed to rotate password:",R),pn.error("Failed to rotate password")}finally{c(!1)}}async function I(){m(!0),D("");try{const{startRegistration:R}=await e_(async()=>{const{startRegistration:k}=await import("./index-BDkarAkX.js");return{startRegistration:k}},[]),x=await fetch("/api/auth/passkey/register/options",{credentials:"include"});if(!x.ok){D("Failed to start registration");return}const q=await x.json(),Z=await R({optionsJSON:q}),re=window.prompt('Name this passkey (e.g. "iPhone Touch ID"):',"");if(!re){m(!1);return}const le=await fetch("/api/auth/passkey/register/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:Z,name:re})});if(!le.ok){const k=await le.json();D(k.error||"Registration failed");return}const de=await fetch("/api/auth/passkeys",{credentials:"include"});if(de.ok){const k=await de.json();l(k)}}catch(R){R.name==="NotAllowedError"?D("Registration cancelled"):(D("Registration failed"),console.error("[Passkey] Registration error:",R))}finally{m(!1)}}async function X(R){try{(await fetch(`/api/auth/passkey/${R}`,{method:"DELETE",credentials:"include"})).ok&&l(q=>q.filter(Z=>Z.id!==R))}catch(x){console.error("Failed to delete passkey:",x)}}if(!z||!G)return O.jsx(Yd,{open:S,onOpenChange:N,children:O.jsxs(Vd,{children:[O.jsxs(Kd,{children:[O.jsx(Xd,{children:"Settings"}),O.jsx(Wd,{})]}),O.jsx(Qd,{className:"flex items-center justify-center py-8",children:O.jsx(ei,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]})});const T=({label:R,description:x,children:q,note:Z})=>O.jsxs("div",{className:"flex items-start justify-between gap-4 py-4 px-4 border-b border-border/50 last:border-b-0",children:[O.jsxs("div",{className:"flex-1 min-w-0",children:[O.jsx("label",{className:"text-sm font-medium block text-foreground",children:R}),x&&O.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:x})]}),O.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[q,Z&&O.jsxs("div",{className:"text-xs text-muted-foreground italic ml-2",children:["ℹ️ ",Z]})]})]}),B=({title:R,children:x})=>O.jsxs("div",{className:"mb-8",children:[O.jsx("h3",{className:"text-base font-bold mb-3 text-foreground uppercase tracking-tight",children:R}),O.jsx("div",{className:"rounded-lg border border-border bg-card divide-y divide-border",children:x})]});return O.jsx(Yd,{open:S,onOpenChange:N,children:O.jsxs(Vd,{className:"max-w-2xl",children:[O.jsxs(Kd,{children:[O.jsx(Xd,{children:"Settings"}),O.jsx(Wd,{})]}),O.jsxs(Qd,{children:[O.jsxs(B,{title:"Session Password",children:[A?O.jsx(T,{label:"New Session Password",note:"",children:O.jsxs("div",{className:"w-80 flex items-center gap-1",children:[O.jsx("div",{className:"flex-1 px-2 py-1 rounded border border-green-500/30 bg-green-500/5 font-mono text-sm break-all",children:g?A:"••••••••"}),O.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>C(R=>!R),title:g?"Hide":"Show",children:g?O.jsx(dc,{className:"h-4 w-4"}):O.jsx(_c,{className:"h-4 w-4"})}),O.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>{A&&(navigator.clipboard.writeText(A),E("new"),setTimeout(()=>E(null),2e3))},className:_==="new"?"text-green-600 dark:text-green-400":"",title:"Copy to clipboard",children:_==="new"?O.jsx(Ld,{className:"h-4 w-4"}):O.jsx(Md,{className:"h-4 w-4"})})]})}):O.jsxs(O.Fragment,{children:[O.jsx(T,{label:"Current Password",children:O.jsxs("div",{className:"w-80 flex items-center gap-1",children:[O.jsx("div",{className:"flex-1 px-2 py-1 rounded border border-border bg-muted/50 font-mono text-sm break-all",children:b?h||"—":"••••••••"}),O.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>f(R=>!R),title:b?"Hide":"Show",children:b?O.jsx(dc,{className:"h-4 w-4"}):O.jsx(_c,{className:"h-4 w-4"})}),O.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>{h&&(navigator.clipboard.writeText(h),E("current"),setTimeout(()=>E(null),2e3))},className:_==="current"?"text-green-600 dark:text-green-400":"",title:"Copy to clipboard",children:_==="current"?O.jsx(Ld,{className:"h-4 w-4"}):O.jsx(Md,{className:"h-4 w-4"})})]})}),O.jsxs("div",{className:"px-4 py-4 border-b border-border/50 last:border-b-0 flex items-center justify-between",children:[O.jsx("label",{className:"text-sm font-medium",children:"Rotate Password"}),O.jsx(Ie,{variant:"outline",size:"icon-sm",onClick:se,disabled:n,title:n?"Rotating...":"Rotate password",children:n?O.jsx(ei,{className:"h-4 w-4 animate-spin"}):O.jsx(bg,{className:"h-4 w-4"})})]})]}),O.jsx(T,{label:"Password Type",description:"xkcd: memorable words, random: cryptographic string",children:O.jsxs("select",{value:G.SESSION_PASSWORD_TYPE,onChange:R=>ee("SESSION_PASSWORD_TYPE",R.target.value),className:"px-2 py-1 rounded border border-input bg-background text-sm",children:[O.jsx("option",{value:"xkcd",children:"xkcd"}),O.jsx("option",{value:"random",children:"random"})]})}),O.jsx(T,{label:"Password Length",children:O.jsx("input",{type:"number",value:G.SESSION_PASSWORD_LENGTH,onChange:R=>ee("SESSION_PASSWORD_LENGTH",parseInt(R.target.value)),min:G.SESSION_PASSWORD_TYPE==="xkcd"?2:8,max:G.SESSION_PASSWORD_TYPE==="xkcd"?10:64,className:"w-20 px-2 py-1 rounded border border-input bg-background text-sm text-center"})}),O.jsx(T,{label:"Log to Console",description:"Log password at startup",children:O.jsx(gn,{checked:G.LOG_SESSION_PASSWORD,onCheckedChange:R=>ee("LOG_SESSION_PASSWORD",R)})})]}),O.jsxs(B,{title:"Authentication",children:[O.jsx(T,{label:"Disable Authentication",description:"Allow access without password (skip login)",note:G.AUTH_DISABLED?"⚠️ Security risk":void 0,children:O.jsx(gn,{checked:G.AUTH_DISABLED,onCheckedChange:R=>ee("AUTH_DISABLED",R)})}),O.jsx(T,{label:"Show Auth Disabled Warning",description:"Show warning banner when auth is disabled",children:O.jsx(gn,{checked:G.SHOW_AUTH_DISABLED_WARNING,onCheckedChange:R=>ee("SHOW_AUTH_DISABLED_WARNING",R)})}),O.jsx(T,{label:"Enable TOTP",description:"Require TOTP for login. Affects next login attempt",children:O.jsx(gn,{checked:G.TOTP_ENABLED,onCheckedChange:R=>ee("TOTP_ENABLED",R)})})]}),O.jsxs(B,{title:"Passkeys",children:[O.jsx(T,{label:"Relying Party Origin",description:"URL for passkey verification",children:O.jsx("input",{type:"text",value:G.PASSKEY_RP_ORIGIN,onChange:R=>ee("PASSKEY_RP_ORIGIN",R.target.value),placeholder:"https://example.com",className:"w-80 px-3 py-2 rounded border border-input bg-background text-sm"})}),O.jsxs("div",{className:"px-4 py-4 border-b border-border/50 last:border-b-0",children:[O.jsxs("div",{className:"flex items-center justify-between mb-4",children:[O.jsx("label",{className:"text-sm font-medium",children:"Registered Passkeys"}),O.jsx(Ie,{variant:"outline",size:"icon-sm",onClick:I,disabled:v,title:"Add passkey",children:v?O.jsx(ei,{className:"h-4 w-4 animate-spin"}):O.jsx(za,{className:"h-4 w-4"})})]}),w&&O.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-2 mb-3",children:O.jsx("p",{className:"text-xs text-destructive",children:w})}),o.length===0?O.jsx("p",{className:"text-xs text-muted-foreground italic",children:"No passkeys registered"}):O.jsx("div",{className:"space-y-2",children:o.map(R=>O.jsxs("div",{className:"flex items-center justify-between p-3 rounded border border-border bg-muted/30 text-sm",children:[O.jsxs("div",{className:"flex-1 min-w-0",children:[O.jsx("p",{className:"font-medium truncate",children:R.name}),O.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(R.registeredAt).toLocaleDateString()})]}),O.jsx(Ie,{variant:"ghost",size:"icon-sm",onClick:()=>X(R.id),className:"ml-2 text-destructive hover:text-destructive hover:bg-destructive/10",children:O.jsx(wg,{className:"h-4 w-4"})})]},R.id))})]})]}),O.jsxs(B,{title:"Rate Limiting",children:[O.jsx(T,{label:"Global Rate Limit",description:"Max requests per 15 minutes (unauthenticated requests only)",children:O.jsx("input",{type:"number",value:G.RATE_LIMIT_GLOBAL_MAX,onChange:R=>ee("RATE_LIMIT_GLOBAL_MAX",parseInt(R.target.value)),min:10,className:"w-24 px-2 py-1 rounded border border-input bg-background text-sm text-center"})}),O.jsx(T,{label:"Password Login Rate Limit",description:"Max login attempts per hour",children:O.jsx("input",{type:"number",value:G.RATE_LIMIT_SESSION_PASSWORD_MAX,onChange:R=>ee("RATE_LIMIT_SESSION_PASSWORD_MAX",parseInt(R.target.value)),min:1,className:"w-24 px-2 py-1 rounded border border-input bg-background text-sm text-center"})})]}),O.jsx(B,{title:"Terminal",children:O.jsx(T,{label:"Scrollback Buffer Size",description:"Number of lines to keep in history. Affects new sessions",children:O.jsx("input",{type:"number",value:G.SCROLLBACK_LINES,onChange:R=>ee("SCROLLBACK_LINES",parseInt(R.target.value)),min:100,max:1e5,className:"w-32 px-2 py-1 rounded border border-input bg-background text-sm text-center"})})})]}),F&&O.jsxs(Ap,{children:[O.jsx(Ie,{variant:"ghost",onClick:P,disabled:H,children:"Discard"}),O.jsxs(Ie,{onClick:j,disabled:H,children:[H&&O.jsx(ei,{className:"h-4 w-4 animate-spin mr-2"}),"Save"]})]})]})})}var hc={exports:{}},Jd;function m0(){return Jd||(Jd=1,(function(S,N){(function(z,L){S.exports=L()})(self,(()=>(()=>{var z={4567:function(H,u,h){var d=this&&this.__decorate||function(l,v,m,w){var D,_=arguments.length,E=_<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,v,m,w);else for(var U=l.length-1;U>=0;U--)(D=l[U])&&(E=(_<3?D(E):_>3?D(v,m,E):D(v,m))||E);return _>3&&E&&Object.defineProperty(v,m,E),E},b=this&&this.__param||function(l,v){return function(m,w){v(m,w,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const f=h(9042),g=h(6114),C=h(9924),A=h(844),y=h(5596),n=h(4725),c=h(3656);let o=u.AccessibilityManager=class extends A.Disposable{constructor(l,v){super(),this._terminal=l,this._renderService=v,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let m=0;m<this._terminal.rows;m++)this._rowElements[m]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[m]);if(this._topBoundaryFocusListener=m=>this._handleBoundaryFocus(m,0),this._bottomBoundaryFocusListener=m=>this._handleBoundaryFocus(m,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=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new C.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((m=>this._handleResize(m.rows)))),this.register(this._terminal.onRender((m=>this._refreshRows(m.start,m.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((m=>this._handleChar(m)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
186
- `)))),this.register(this._terminal.onA11yTab((m=>this._handleTab(m)))),this.register(this._terminal.onKey((m=>this._handleKey(m.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this._screenDprMonitor=new y.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener((()=>this._refreshRowsDimensions())),this.register((0,c.addDisposableDomListener)(window,"resize",(()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,A.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(l){for(let v=0;v<l;v++)this._handleChar(" ")}_handleChar(l){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==l&&(this._charsToAnnounce+=l):this._charsToAnnounce+=l,l===`
187
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)),g.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((()=>{this._accessibilityContainer.appendChild(this._liveRegion)}),0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,g.isMac&&this._liveRegion.remove()}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,v){this._liveRegionDebouncer.refresh(l,v,this._terminal.rows)}_renderRows(l,v){const m=this._terminal.buffer,w=m.lines.length.toString();for(let D=l;D<=v;D++){const _=m.translateBufferLineToString(m.ydisp+D,!0),E=(m.ydisp+D+1).toString(),U=this._rowElements[D];U&&(_.length===0?U.innerText=" ":U.textContent=_,U.setAttribute("aria-posinset",E),U.setAttribute("aria-setsize",w))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,v){const m=l.target,w=this._rowElements[v===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(v===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==w)return;let D,_;if(v===0?(D=m,_=this._rowElements.pop(),this._rowContainer.removeChild(_)):(D=this._rowElements.shift(),_=m,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),_.removeEventListener("focus",this._bottomBoundaryFocusListener),v===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(v===0?-1:1),this._rowElements[v===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let v=this._rowContainer.children.length;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);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=document.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`}};u.AccessibilityManager=o=d([b(1,n.IRenderService)],o)},3614:(H,u)=>{function h(g){return g.replace(/\r?\n/g,"\r")}function d(g,C){return C?"\x1B[200~"+g+"\x1B[201~":g}function b(g,C,A,y){g=d(g=h(g),A.decPrivateModes.bracketedPasteMode&&y.rawOptions.ignoreBracketedPasteMode!==!0),A.triggerDataEvent(g,!0),C.value=""}function f(g,C,A){const y=A.getBoundingClientRect(),n=g.clientX-y.left-10,c=g.clientY-y.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${n}px`,C.style.top=`${c}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(u,"__esModule",{value:!0}),u.rightClickHandler=u.moveTextAreaUnderMouseCursor=u.paste=u.handlePasteEvent=u.copyHandler=u.bracketTextForPaste=u.prepareTextForTerminal=void 0,u.prepareTextForTerminal=h,u.bracketTextForPaste=d,u.copyHandler=function(g,C){g.clipboardData&&g.clipboardData.setData("text/plain",C.selectionText),g.preventDefault()},u.handlePasteEvent=function(g,C,A,y){g.stopPropagation(),g.clipboardData&&b(g.clipboardData.getData("text/plain"),C,A,y)},u.paste=b,u.moveTextAreaUnderMouseCursor=f,u.rightClickHandler=function(g,C,A,y,n){f(g,C,A),n&&y.rightClickSelect(g),C.value=y.selectionText,C.select()}},7239:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const d=h(1505);u.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(b,f,g){this._css.set(b,f,g)}getCss(b,f){return this._css.get(b,f)}setColor(b,f,g){this._color.set(b,f,g)}getColor(b,f){return this._color.get(b,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(h,d,b,f){h.addEventListener(d,b,f);let g=!1;return{dispose:()=>{g||(g=!0,h.removeEventListener(d,b,f))}}}},6465:function(H,u,h){var d=this&&this.__decorate||function(n,c,o,l){var v,m=arguments.length,w=m<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(n,c,o,l);else for(var D=n.length-1;D>=0;D--)(v=n[D])&&(w=(m<3?v(w):m>3?v(c,o,w):v(c,o))||w);return m>3&&w&&Object.defineProperty(c,o,w),w},b=this&&this.__param||function(n,c){return function(o,l){c(o,l,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier2=void 0;const f=h(3656),g=h(8460),C=h(844),A=h(2585);let y=u.Linkifier2=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(n){super(),this._bufferService=n,this._linkProviders=[],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,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(n){return this._linkProviders.push(n),{dispose:()=>{const c=this._linkProviders.indexOf(n);c!==-1&&this._linkProviders.splice(c,1)}}}attachToDom(n,c,o){this._element=n,this._mouseService=c,this._renderService=o,this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(n){if(this._lastMouseEvent=n,!this._element||!this._mouseService)return;const c=this._positionFromMouseEvent(n,this._element,this._mouseService);if(!c)return;this._isMouseOut=!1;const o=n.composedPath();for(let l=0;l<o.length;l++){const v=o[l];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&c.x===this._lastBufferCell.x&&c.y===this._lastBufferCell.y||(this._handleHover(c),this._lastBufferCell=c)}_handleHover(n){if(this._activeLine!==n.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(n,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,n)||(this._clearCurrentLink(),this._askForLink(n,!0))}_askForLink(n,c){var o,l;this._activeProviderReplies&&c||((o=this._activeProviderReplies)===null||o===void 0||o.forEach((m=>{m?.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=n.y);let v=!1;for(const[m,w]of this._linkProviders.entries())c?!((l=this._activeProviderReplies)===null||l===void 0)&&l.get(m)&&(v=this._checkLinkProviderResult(m,n,v)):w.provideLinks(n.y,(D=>{var _,E;if(this._isMouseOut)return;const U=D?.map((F=>({link:F})));(_=this._activeProviderReplies)===null||_===void 0||_.set(m,U),v=this._checkLinkProviderResult(m,n,v),((E=this._activeProviderReplies)===null||E===void 0?void 0:E.size)===this._linkProviders.length&&this._removeIntersectingLinks(n.y,this._activeProviderReplies)}))}_removeIntersectingLinks(n,c){const o=new Set;for(let l=0;l<c.size;l++){const v=c.get(l);if(v)for(let m=0;m<v.length;m++){const w=v[m],D=w.link.range.start.y<n?0:w.link.range.start.x,_=w.link.range.end.y>n?this._bufferService.cols:w.link.range.end.x;for(let E=D;E<=_;E++){if(o.has(E)){v.splice(m--,1);break}o.add(E)}}}}_checkLinkProviderResult(n,c,o){var l;if(!this._activeProviderReplies)return o;const v=this._activeProviderReplies.get(n);let m=!1;for(let w=0;w<n;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(m=!0);if(!m&&v){const w=v.find((D=>this._linkAtPosition(D.link,c)));w&&(o=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviders.length&&!o)for(let w=0;w<this._activeProviderReplies.size;w++){const D=(l=this._activeProviderReplies.get(w))===null||l===void 0?void 0:l.find((_=>this._linkAtPosition(_.link,c)));if(D){o=!0,this._handleNewLink(D);break}}return o}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(n){if(!this._element||!this._mouseService||!this._currentLink)return;const c=this._positionFromMouseEvent(n,this._element,this._mouseService);c&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,c)&&this._currentLink.link.activate(n,this._currentLink.link.text)}_clearCurrentLink(n,c){this._element&&this._currentLink&&this._lastMouseEvent&&(!n||!c||this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=c)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(n){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(n.link,c)&&(this._currentLink=n,this._currentLink.state={decorations:{underline:n.link.decorations===void 0||n.link.decorations.underline,pointerCursor:n.link.decorations===void 0||n.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,n.link,this._lastMouseEvent),n.link.decorations={},Object.defineProperties(n.link.decorations,{pointerCursor:{get:()=>{var o,l;return(l=(o=this._currentLink)===null||o===void 0?void 0:o.state)===null||l===void 0?void 0:l.decorations.pointerCursor},set:o=>{var l,v;!((l=this._currentLink)===null||l===void 0)&&l.state&&this._currentLink.state.decorations.pointerCursor!==o&&(this._currentLink.state.decorations.pointerCursor=o,this._currentLink.state.isHovered&&((v=this._element)===null||v===void 0||v.classList.toggle("xterm-cursor-pointer",o)))}},underline:{get:()=>{var o,l;return(l=(o=this._currentLink)===null||o===void 0?void 0:o.state)===null||l===void 0?void 0:l.decorations.underline},set:o=>{var l,v,m;!((l=this._currentLink)===null||l===void 0)&&l.state&&((m=(v=this._currentLink)===null||v===void 0?void 0:v.state)===null||m===void 0?void 0:m.decorations.underline)!==o&&(this._currentLink.state.decorations.underline=o,this._currentLink.state.isHovered&&this._fireUnderlineEvent(n.link,o))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((o=>{if(!this._currentLink)return;const l=o.start===0?0:o.start+1+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.ydisp+1+o.end;if(this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=v&&(this._clearCurrentLink(l,v),this._lastMouseEvent&&this._element)){const m=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);m&&this._askForLink(m,!1)}}))))}_linkHover(n,c,o){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(c,!0),this._currentLink.state.decorations.pointerCursor&&n.classList.add("xterm-cursor-pointer")),c.hover&&c.hover(o,c.text)}_fireUnderlineEvent(n,c){const o=n.range,l=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(o.start.x-1,o.start.y-l-1,o.end.x,o.end.y-l-1,void 0);(c?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)}_linkLeave(n,c,o){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(c,!1),this._currentLink.state.decorations.pointerCursor&&n.classList.remove("xterm-cursor-pointer")),c.leave&&c.leave(o,c.text)}_linkAtPosition(n,c){const o=n.range.start.y*this._bufferService.cols+n.range.start.x,l=n.range.end.y*this._bufferService.cols+n.range.end.x,v=c.y*this._bufferService.cols+c.x;return o<=v&&v<=l}_positionFromMouseEvent(n,c,o){const l=o.getCoords(n,c,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(n,c,o,l,v){return{x1:n,y1:c,x2:o,y2:l,cols:this._bufferService.cols,fg:v}}};u.Linkifier2=y=d([b(0,A.IBufferService)],y)},9042:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.tooMuchOutput=u.promptLabel=void 0,u.promptLabel="Terminal input",u.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(H,u,h){var d=this&&this.__decorate||function(y,n,c,o){var l,v=arguments.length,m=v<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(y,n,c,o);else for(var w=y.length-1;w>=0;w--)(l=y[w])&&(m=(v<3?l(m):v>3?l(n,c,m):l(n,c))||m);return v>3&&m&&Object.defineProperty(n,c,m),m},b=this&&this.__param||function(y,n){return function(c,o){n(c,o,y)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const f=h(511),g=h(2585);let C=u.OscLinkProvider=class{constructor(y,n,c){this._bufferService=y,this._optionsService=n,this._oscLinkService=c}provideLinks(y,n){var c;const o=this._bufferService.buffer.lines.get(y-1);if(!o)return void n(void 0);const l=[],v=this._optionsService.rawOptions.linkHandler,m=new f.CellData,w=o.getTrimmedLength();let D=-1,_=-1,E=!1;for(let U=0;U<w;U++)if(_!==-1||o.hasContent(U)){if(o.loadCell(U,m),m.hasExtendedAttrs()&&m.extended.urlId){if(_===-1){_=U,D=m.extended.urlId;continue}E=m.extended.urlId!==D}else _!==-1&&(E=!0);if(E||_!==-1&&U===w-1){const F=(c=this._oscLinkService.getLinkData(D))===null||c===void 0?void 0:c.uri;if(F){const j={start:{x:_+1,y},end:{x:U+(E||U!==w-1?0:1),y}};let P=!1;if(!v?.allowNonHttpProtocols)try{const ee=new URL(F);["http:","https:"].includes(ee.protocol)||(P=!0)}catch{P=!0}P||l.push({text:F,range:j,activate:(ee,se)=>v?v.activate(ee,se,j):A(0,se),hover:(ee,se)=>{var I;return(I=v?.hover)===null||I===void 0?void 0:I.call(v,ee,se,j)},leave:(ee,se)=>{var I;return(I=v?.leave)===null||I===void 0?void 0:I.call(v,ee,se,j)}})}E=!1,m.hasExtendedAttrs()&&m.extended.urlId?(_=U,D=m.extended.urlId):(_=-1,D=-1)}}n(l)}};function A(y,n){if(confirm(`Do you want to navigate to ${n}?
188
-
189
- WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=C=d([b(0,g.IBufferService),b(1,g.IOptionsService),b(2,g.IOscLinkService)],C)},6193:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(h,d){this._parentWindow=h,this._renderCallback=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(h){return this._refreshCallbacks.push(h),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(h,d,b){this._rowCount=b,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._parentWindow.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 h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const h of this._refreshCallbacks)h(0);this._refreshCallbacks=[]}}},5596:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ScreenDprMonitor=void 0;const d=h(844);class b extends d.Disposable{constructor(g){super(),this._parentWindow=g,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,d.toDisposable)((()=>{this.clearListener()})))}setListener(g){this._listener&&this.clearListener(),this._listener=g,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)===null||g===void 0||g.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}u.ScreenDprMonitor=b},3236:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=h(3614),b=h(3656),f=h(6465),g=h(9042),C=h(3730),A=h(1680),y=h(3107),n=h(5744),c=h(2950),o=h(1296),l=h(428),v=h(4269),m=h(5114),w=h(8934),D=h(3230),_=h(9312),E=h(4725),U=h(6731),F=h(8055),j=h(8969),P=h(8460),ee=h(844),se=h(6114),I=h(8437),X=h(2584),T=h(7399),B=h(5941),R=h(9074),x=h(2585),q=h(5435),Z=h(4567),re=typeof window<"u"?window.document:null;class le extends j.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(k={}){super(k),this.browser=se,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ee.MutableDisposable),this._onCursorMove=this.register(new P.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new P.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new P.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new P.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new P.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new P.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new P.EventEmitter),this._onBlur=this.register(new P.EventEmitter),this._onA11yCharEmitter=this.register(new P.EventEmitter),this._onA11yTabEmitter=this.register(new P.EventEmitter),this._onWillOpen=this.register(new P.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(f.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(R.DecorationService),this._instantiationService.setService(x.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((Q,te)=>this.refresh(Q,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((Q=>this._reportWindowsOptions(Q)))),this.register(this._inputHandler.onColor((Q=>this._handleColorEvent(Q)))),this.register((0,P.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,P.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,P.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,P.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((Q=>this._afterResize(Q.cols,Q.rows)))),this.register((0,ee.toDisposable)((()=>{var Q,te;this._customKeyEventHandler=void 0,(te=(Q=this.element)===null||Q===void 0?void 0:Q.parentNode)===null||te===void 0||te.removeChild(this.element)})))}_handleColorEvent(k){if(this._themeService)for(const Q of k){let te,oe="";switch(Q.index){case 256:te="foreground",oe="10";break;case 257:te="background",oe="11";break;case 258:te="cursor",oe="12";break;default:te="ansi",oe="4;"+Q.index}switch(Q.type){case 0:const ye=F.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[Q.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${oe};${(0,B.toRgbString)(ye)}${X.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((ve=>ve.ansi[Q.index]=F.rgba.toColor(...Q.color)));else{const ve=te;this._themeService.modifyColors((ke=>ke[ve]=F.rgba.toColor(...Q.color)))}break;case 2:this._themeService.restoreColor(Q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(k){k?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Z.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(k){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.updateCursorStyle(k),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var k;return(k=this.textarea)===null||k===void 0?void 0:k.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.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 k=this.buffer.ybase+this.buffer.y,Q=this.buffer.lines.get(k);if(!Q)return;const te=Math.min(this.buffer.x,this.cols-1),oe=this._renderService.dimensions.css.cell.height,ye=Q.getWidth(te),ve=this._renderService.dimensions.css.cell.width*ye,ke=this.buffer.y*this._renderService.dimensions.css.cell.height,je=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=je+"px",this.textarea.style.top=ke+"px",this.textarea.style.width=ve+"px",this.textarea.style.height=oe+"px",this.textarea.style.lineHeight=oe+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,b.addDisposableDomListener)(this.element,"copy",(Q=>{this.hasSelection()&&(0,d.copyHandler)(Q,this._selectionService)})));const k=Q=>(0,d.handlePasteEvent)(Q,this.textarea,this.coreService,this.optionsService);this.register((0,b.addDisposableDomListener)(this.textarea,"paste",k)),this.register((0,b.addDisposableDomListener)(this.element,"paste",k)),se.isFirefox?this.register((0,b.addDisposableDomListener)(this.element,"mousedown",(Q=>{Q.button===2&&(0,d.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,b.addDisposableDomListener)(this.element,"contextmenu",(Q=>{(0,d.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),se.isLinux&&this.register((0,b.addDisposableDomListener)(this.element,"auxclick",(Q=>{Q.button===1&&(0,d.moveTextAreaUnderMouseCursor)(Q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,b.addDisposableDomListener)(this.textarea,"keyup",(k=>this._keyUp(k)),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keydown",(k=>this._keyDown(k)),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keypress",(k=>this._keyPress(k)),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionupdate",(k=>this._compositionHelper.compositionupdate(k)))),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,b.addDisposableDomListener)(this.textarea,"input",(k=>this._inputEvent(k)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(k){var Q;if(!k)throw new Error("Terminal requires a parent element.");k.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=k.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),k.appendChild(this.element);const te=re.createDocumentFragment();this._viewportElement=re.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),te.appendChild(this._viewportElement),this._viewportScrollArea=re.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=re.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=re.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),te.appendChild(this.screenElement),this.textarea=re.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),se.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._instantiationService.createInstance(m.CoreBrowserService,this.textarea,(Q=this._document.defaultView)!==null&&Q!==void 0?Q:window),this._instantiationService.setService(E.ICoreBrowserService,this._coreBrowserService),this.register((0,b.addDisposableDomListener)(this.textarea,"focus",(oe=>this._handleTextAreaFocus(oe)))),this.register((0,b.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(E.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(U.ThemeService),this._instantiationService.setService(E.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(v.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(D.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((oe=>this._onRender.fire(oe)))),this.onResize((oe=>this._renderService.resize(oe.cols,oe.rows))),this._compositionView=re.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(te);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(w.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(A.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((oe=>this.scrollLines(oe.amount,oe.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(_.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((oe=>this.scrollLines(oe.amount,oe.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((oe=>this._renderService.handleSelectionChanged(oe.start,oe.end,oe.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((oe=>{this.textarea.value=oe,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((oe=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,b.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(y.BufferDecorationRenderer,this.screenElement)),this.register((0,b.addDisposableDomListener)(this.element,"mousedown",(oe=>this._selectionService.handleMouseDown(oe)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(Z.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(oe=>this._handleScreenReaderModeOptionChange(oe)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(n.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(oe=>{!this._overviewRulerRenderer&&oe&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(n.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const k=this,Q=this.element;function te(ve){const ke=k._mouseService.getMouseReportCoords(ve,k.screenElement);if(!ke)return!1;let je,it;switch(ve.overrideType||ve.type){case"mousemove":it=32,ve.buttons===void 0?(je=3,ve.button!==void 0&&(je=ve.button<3?ve.button:3)):je=1&ve.buttons?0:4&ve.buttons?1:2&ve.buttons?2:3;break;case"mouseup":it=0,je=ve.button<3?ve.button:3;break;case"mousedown":it=1,je=ve.button<3?ve.button:3;break;case"wheel":if(k.viewport.getLinesScrolled(ve)===0)return!1;it=ve.deltaY<0?0:1,je=4;break;default:return!1}return!(it===void 0||je===void 0||je>4)&&k.coreMouseService.triggerMouseEvent({col:ke.col,row:ke.row,x:ke.x,y:ke.y,button:je,action:it,ctrl:ve.ctrlKey,alt:ve.altKey,shift:ve.shiftKey})}const oe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ye={mouseup:ve=>(te(ve),ve.buttons||(this._document.removeEventListener("mouseup",oe.mouseup),oe.mousedrag&&this._document.removeEventListener("mousemove",oe.mousedrag)),this.cancel(ve)),wheel:ve=>(te(ve),this.cancel(ve,!0)),mousedrag:ve=>{ve.buttons&&te(ve)},mousemove:ve=>{ve.buttons||te(ve)}};this.register(this.coreMouseService.onProtocolChange((ve=>{ve?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ve)),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&ve?oe.mousemove||(Q.addEventListener("mousemove",ye.mousemove),oe.mousemove=ye.mousemove):(Q.removeEventListener("mousemove",oe.mousemove),oe.mousemove=null),16&ve?oe.wheel||(Q.addEventListener("wheel",ye.wheel,{passive:!1}),oe.wheel=ye.wheel):(Q.removeEventListener("wheel",oe.wheel),oe.wheel=null),2&ve?oe.mouseup||(Q.addEventListener("mouseup",ye.mouseup),oe.mouseup=ye.mouseup):(this._document.removeEventListener("mouseup",oe.mouseup),Q.removeEventListener("mouseup",oe.mouseup),oe.mouseup=null),4&ve?oe.mousedrag||(oe.mousedrag=ye.mousedrag):(this._document.removeEventListener("mousemove",oe.mousedrag),oe.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,b.addDisposableDomListener)(Q,"mousedown",(ve=>{if(ve.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ve))return te(ve),oe.mouseup&&this._document.addEventListener("mouseup",oe.mouseup),oe.mousedrag&&this._document.addEventListener("mousemove",oe.mousedrag),this.cancel(ve)}))),this.register((0,b.addDisposableDomListener)(Q,"wheel",(ve=>{if(!oe.wheel){if(!this.buffer.hasScrollback){const ke=this.viewport.getLinesScrolled(ve);if(ke===0)return;const je=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ve.deltaY<0?"A":"B");let it="";for(let Gt=0;Gt<Math.abs(ke);Gt++)it+=je;return this.coreService.triggerDataEvent(it,!0),this.cancel(ve,!0)}return this.viewport.handleWheel(ve)?this.cancel(ve):void 0}}),{passive:!1})),this.register((0,b.addDisposableDomListener)(Q,"touchstart",(ve=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ve),this.cancel(ve)}),{passive:!0})),this.register((0,b.addDisposableDomListener)(Q,"touchmove",(ve=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ve)?void 0:this.cancel(ve)}),{passive:!1}))}refresh(k,Q){var te;(te=this._renderService)===null||te===void 0||te.refreshRows(k,Q)}updateCursorStyle(k){var Q;!((Q=this._selectionService)===null||Q===void 0)&&Q.shouldColumnSelect(k)?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(k,Q,te=0){var oe;te===1?(super.scrollLines(k,Q,te),this.refresh(0,this.rows-1)):(oe=this.viewport)===null||oe===void 0||oe.scrollLines(k)}paste(k){(0,d.paste)(k,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(k){this._customKeyEventHandler=k}registerLinkProvider(k){return this.linkifier2.registerLinkProvider(k)}registerCharacterJoiner(k){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Q=this._characterJoinerService.register(k);return this.refresh(0,this.rows-1),Q}deregisterCharacterJoiner(k){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(k)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(k){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+k)}registerDecoration(k){return this._decorationService.registerDecoration(k)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(k,Q,te){this._selectionService.setSelection(k,Q,te)}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 k;(k=this._selectionService)===null||k===void 0||k.clearSelection()}selectAll(){var k;(k=this._selectionService)===null||k===void 0||k.selectAll()}selectLines(k,Q){var te;(te=this._selectionService)===null||te===void 0||te.selectLines(k,Q)}_keyDown(k){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(k)===!1)return!1;const Q=this.browser.isMac&&this.options.macOptionIsMeta&&k.altKey;if(!Q&&!this._compositionHelper.keydown(k))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Q||k.key!=="Dead"&&k.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,T.evaluateKeyboardEvent)(k,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(k),te.type===3||te.type===2){const oe=this.rows-1;return this.scrollLines(te.type===2?-oe:oe),this.cancel(k,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,k)||(te.cancel&&this.cancel(k,!0),!te.key||!!(k.key&&!k.ctrlKey&&!k.altKey&&!k.metaKey&&k.key.length===1&&k.key.charCodeAt(0)>=65&&k.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(te.key!==X.C0.ETX&&te.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:k}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||k.altKey||k.ctrlKey?this.cancel(k,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(k,Q){const te=k.isMac&&!this.options.macOptionIsMeta&&Q.altKey&&!Q.ctrlKey&&!Q.metaKey||k.isWindows&&Q.altKey&&Q.ctrlKey&&!Q.metaKey||k.isWindows&&Q.getModifierState("AltGraph");return Q.type==="keypress"?te:te&&(!Q.keyCode||Q.keyCode>47)}_keyUp(k){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(k)===!1||((function(Q){return Q.keyCode===16||Q.keyCode===17||Q.keyCode===18})(k)||this.focus(),this.updateCursorStyle(k),this._keyPressHandled=!1)}_keyPress(k){let Q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(k)===!1)return!1;if(this.cancel(k),k.charCode)Q=k.charCode;else if(k.which===null||k.which===void 0)Q=k.keyCode;else{if(k.which===0||k.charCode===0)return!1;Q=k.which}return!(!Q||(k.altKey||k.ctrlKey||k.metaKey)&&!this._isThirdLevelShift(this.browser,k)||(Q=String.fromCharCode(Q),this._onKey.fire({key:Q,domEvent:k}),this._showCursor(),this.coreService.triggerDataEvent(Q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(k){if(k.data&&k.inputType==="insertText"&&(!k.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Q=k.data;return this.coreService.triggerDataEvent(Q,!0),this.cancel(k),!0}return!1}resize(k,Q){k!==this.cols||Q!==this.rows?super.resize(k,Q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(k,Q){var te,oe;(te=this._charSizeService)===null||te===void 0||te.measure(),(oe=this.viewport)===null||oe===void 0||oe.syncScrollArea(!0)}clear(){var k;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 Q=1;Q<this.rows;Q++)this.buffer.lines.push(this.buffer.getBlankLine(I.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(k=this.viewport)===null||k===void 0||k.reset(),this.refresh(0,this.rows-1)}}reset(){var k,Q;this.options.rows=this.rows,this.options.cols=this.cols;const te=this._customKeyEventHandler;this._setup(),super.reset(),(k=this._selectionService)===null||k===void 0||k.reset(),this._decorationService.reset(),(Q=this.viewport)===null||Q===void 0||Q.reset(),this._customKeyEventHandler=te,this.refresh(0,this.rows-1)}clearTextureAtlas(){var k;(k=this._renderService)===null||k===void 0||k.clearTextureAtlas()}_reportFocus(){var k;!((k=this.element)===null||k===void 0)&&k.classList.contains("focus")?this.coreService.triggerDataEvent(X.C0.ESC+"[I"):this.coreService.triggerDataEvent(X.C0.ESC+"[O")}_reportWindowsOptions(k){if(this._renderService)switch(k){case q.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const Q=this._renderService.dimensions.css.canvas.width.toFixed(0),te=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[4;${te};${Q}t`);break;case q.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const oe=this._renderService.dimensions.css.cell.width.toFixed(0),ye=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[6;${ye};${oe}t`)}}cancel(k,Q){if(this.options.cancelEvents||Q)return k.preventDefault(),k.stopPropagation(),!1}}u.Terminal=le},9924:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(h,d=1e3){this._renderCallback=h,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(h,d,b){this._rowCount=b,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=f-this._lastRefreshMs,C=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),C)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d)}}},1680:function(H,u,h){var d=this&&this.__decorate||function(c,o,l,v){var m,w=arguments.length,D=w<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,o,l,v);else for(var _=c.length-1;_>=0;_--)(m=c[_])&&(D=(w<3?m(D):w>3?m(o,l,D):m(o,l))||D);return w>3&&D&&Object.defineProperty(o,l,D),D},b=this&&this.__param||function(c,o){return function(l,v){o(l,v,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const f=h(3656),g=h(4725),C=h(8460),A=h(844),y=h(2585);let n=u.Viewport=class extends A.Disposable{constructor(c,o,l,v,m,w,D,_){super(),this._viewportElement=c,this._scrollArea=o,this._bufferService=l,this._optionsService=v,this._charSizeService=m,this._renderService=w,this._coreBrowserService=D,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 C.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((E=>this._activeBuffer=E.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((E=>this._renderDimensions=E))),this._handleThemeChange(_.colors),this.register(_.onChangeColors((E=>this._handleThemeChange(E)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(c){if(c)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderService.dimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(c,o){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&l<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const o=this._getPixelsScrolled(c);return o!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(c,o))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let o=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(c,o){var l;let v,m="";const w=[],D=o??this._bufferService.buffer.lines.length,_=this._bufferService.buffer.lines;for(let E=c;E<D;E++){const U=_.get(E);if(!U)continue;const F=(l=_.get(E+1))===null||l===void 0?void 0:l.isWrapped;if(m+=U.translateToString(!F),!F||E===_.length-1){const j=document.createElement("div");j.textContent=m,w.push(j),m.length>0&&(v=j),m=""}}return{bufferElements:w,cursorElement:v}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let o=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(c,o){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&o.altKey||l==="ctrl"&&o.ctrlKey||l==="shift"&&o.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const o=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(c,o))}};u.Viewport=n=d([b(2,y.IBufferService),b(3,y.IOptionsService),b(4,g.ICharSizeService),b(5,g.IRenderService),b(6,g.ICoreBrowserService),b(7,g.IThemeService)],n)},3107:function(H,u,h){var d=this&&this.__decorate||function(n,c,o,l){var v,m=arguments.length,w=m<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(n,c,o,l);else for(var D=n.length-1;D>=0;D--)(v=n[D])&&(w=(m<3?v(w):m>3?v(c,o,w):v(c,o))||w);return m>3&&w&&Object.defineProperty(c,o,w),w},b=this&&this.__param||function(n,c){return function(o,l){c(o,l,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const f=h(3656),g=h(4725),C=h(844),A=h(2585);let y=u.BufferDecorationRenderer=class extends C.Disposable{constructor(n,c,o,l){super(),this._screenElement=n,this._bufferService=c,this._decorationService=o,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register((0,f.addDisposableDomListener)(window,"resize",(()=>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((v=>this._removeDecoration(v)))),this.register((0,C.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 n of this._decorationService.decorations)this._renderDecoration(n);this._dimensionsChanged=!1}_renderDecoration(n){this._refreshStyle(n),this._dimensionsChanged&&this._refreshXPosition(n)}_createElement(n){var c,o;const l=document.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((c=n?.options)===null||c===void 0?void 0:c.layer)==="top"),l.style.width=`${Math.round((n.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(n.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(n.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",l.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=(o=n.options.x)!==null&&o!==void 0?o:0;return v&&v>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(n,l),l}_refreshStyle(n){const c=n.marker.line-this._bufferService.buffers.active.ydisp;if(c<0||c>=this._bufferService.rows)n.element&&(n.element.style.display="none",n.onRenderEmitter.fire(n.element));else{let o=this._decorationElements.get(n);o||(o=this._createElement(n),n.element=o,this._decorationElements.set(n,o),this._container.appendChild(o),n.onDispose((()=>{this._decorationElements.delete(n),o.remove()}))),o.style.top=c*this._renderService.dimensions.css.cell.height+"px",o.style.display=this._altBufferIsActive?"none":"block",n.onRenderEmitter.fire(o)}}_refreshXPosition(n,c=n.element){var o;if(!c)return;const l=(o=n.options.x)!==null&&o!==void 0?o:0;(n.options.anchor||"left")==="right"?c.style.right=l?l*this._renderService.dimensions.css.cell.width+"px":"":c.style.left=l?l*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(n){var c;(c=this._decorationElements.get(n))===null||c===void 0||c.remove(),this._decorationElements.delete(n),n.dispose()}};u.BufferDecorationRenderer=y=d([b(1,A.IBufferService),b(2,A.IDecorationService),b(3,g.IRenderService)],y)},5871:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorZoneStore=void 0,u.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(h){if(h.options.overviewRulerOptions){for(const d of this._zones)if(d.color===h.options.overviewRulerOptions.color&&d.position===h.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,h.marker.line))return;if(this._lineAdjacentToZone(d,h.marker.line,h.options.overviewRulerOptions.position))return void this._addLineToZone(d,h.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=h.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=h.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=h.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=h.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:h.options.overviewRulerOptions.color,position:h.options.overviewRulerOptions.position,startBufferLine:h.marker.line,endBufferLine:h.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(h){this._linePadding=h}_lineIntersectsZone(h,d){return d>=h.startBufferLine&&d<=h.endBufferLine}_lineAdjacentToZone(h,d,b){return d>=h.startBufferLine-this._linePadding[b||"full"]&&d<=h.endBufferLine+this._linePadding[b||"full"]}_addLineToZone(h,d){h.startBufferLine=Math.min(h.startBufferLine,d),h.endBufferLine=Math.max(h.endBufferLine,d)}}},5744:function(H,u,h){var d=this&&this.__decorate||function(v,m,w,D){var _,E=arguments.length,U=E<3?m:D===null?D=Object.getOwnPropertyDescriptor(m,w):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(v,m,w,D);else for(var F=v.length-1;F>=0;F--)(_=v[F])&&(U=(E<3?_(U):E>3?_(m,w,U):_(m,w))||U);return E>3&&U&&Object.defineProperty(m,w,U),U},b=this&&this.__param||function(v,m){return function(w,D){m(w,D,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const f=h(5871),g=h(3656),C=h(4725),A=h(844),y=h(2585),n={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0};let l=u.OverviewRulerRenderer=class extends A.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(v,m,w,D,_,E,U){var F;super(),this._viewportElement=v,this._screenElement=m,this._bufferService=w,this._decorationService=D,this._renderService=_,this._optionsService=E,this._coreBrowseService=U,this._colorZoneStore=new f.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(F=this._viewportElement.parentElement)===null||F===void 0||F.insertBefore(this._canvas,this._viewportElement);const j=this._canvas.getContext("2d");if(!j)throw new Error("Ctx cannot be null");this._ctx=j,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,A.toDisposable)((()=>{var P;(P=this._canvas)===null||P===void 0||P.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((0,g.addDisposableDomListener)(this._coreBrowseService.window,"resize",(()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const v=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);c.full=this._canvas.width,c.left=v,c.center=m,c.right=v,this._refreshDrawHeightConstants(),o.full=0,o.left=0,o.center=c.left,o.right=c.left+c.center}_refreshDrawHeightConstants(){n.full=Math.round(2*this._coreBrowseService.dpr);const v=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(v,12),6)*this._coreBrowseService.dpr);n.left=m,n.center=m,n.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*n.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._coreBrowseService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowseService.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 v=this._colorZoneStore.zones;for(const m of v)m.position!=="full"&&this._renderColorZone(m);for(const m of v)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(v){this._ctx.fillStyle=v.color,this._ctx.fillRect(o[v.position||"full"],Math.round((this._canvas.height-1)*(v.startBufferLine/this._bufferService.buffers.active.lines.length)-n[v.position||"full"]/2),c[v.position||"full"],Math.round((this._canvas.height-1)*((v.endBufferLine-v.startBufferLine)/this._bufferService.buffers.active.lines.length)+n[v.position||"full"]))}_queueRefresh(v,m){this._shouldUpdateDimensions=v||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=l=d([b(2,y.IBufferService),b(3,y.IDecorationService),b(4,C.IRenderService),b(5,y.IOptionsService),b(6,C.ICoreBrowserService)],l)},2950:function(H,u,h){var d=this&&this.__decorate||function(y,n,c,o){var l,v=arguments.length,m=v<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(y,n,c,o);else for(var w=y.length-1;w>=0;w--)(l=y[w])&&(m=(v<3?l(m):v>3?l(n,c,m):l(n,c))||m);return v>3&&m&&Object.defineProperty(n,c,m),m},b=this&&this.__param||function(y,n){return function(c,o){n(c,o,y)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const f=h(4725),g=h(2585),C=h(2584);let A=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(y,n,c,o,l,v){this._textarea=y,this._compositionView=n,this._bufferService=c,this._optionsService=o,this._coreService=l,this._renderService=v,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(y){this._compositionView.textContent=y.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(y){if(this._isComposing||this._isSendingComposition){if(y.keyCode===229||y.keyCode===16||y.keyCode===17||y.keyCode===18)return!1;this._finalizeComposition(!1)}return y.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(y){if(this._compositionView.classList.remove("active"),this._isComposing=!1,y){const n={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,n.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(n.start,n.end):this._textarea.value.substring(n.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const n=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(n,!0)}}_handleAnyTextareaChanges(){const y=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const n=this._textarea.value,c=n.replace(y,"");this._dataAlreadySent=c,n.length>y.length?this._coreService.triggerDataEvent(c,!0):n.length<y.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):n.length===y.length&&n!==y&&this._coreService.triggerDataEvent(n,!0)}}),0)}updateCompositionElements(y){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const n=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=n*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const v=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(v.width,1)+"px",this._textarea.style.height=Math.max(v.height,1)+"px",this._textarea.style.lineHeight=v.height+"px"}y||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=A=d([b(2,g.IBufferService),b(3,g.IOptionsService),b(4,g.ICoreService),b(5,f.IRenderService)],A)},9806:(H,u)=>{function h(d,b,f){const g=f.getBoundingClientRect(),C=d.getComputedStyle(f),A=parseInt(C.getPropertyValue("padding-left")),y=parseInt(C.getPropertyValue("padding-top"));return[b.clientX-g.left-A,b.clientY-g.top-y]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=h,u.getCoords=function(d,b,f,g,C,A,y,n,c){if(!A)return;const o=h(d,b,f);return o?(o[0]=Math.ceil((o[0]+(c?y/2:0))/y),o[1]=Math.ceil(o[1]/n),o[0]=Math.min(Math.max(o[0],1),g+(c?1:0)),o[1]=Math.min(Math.max(o[1],1),C),o):void 0}},9504:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=h(2584);function b(n,c,o,l){const v=n-f(n,o),m=c-f(c,o),w=Math.abs(v-m)-(function(D,_,E){let U=0;const F=D-f(D,E),j=_-f(_,E);for(let P=0;P<Math.abs(F-j);P++){const ee=g(D,_)==="A"?-1:1,se=E.buffer.lines.get(F+ee*P);se?.isWrapped&&U++}return U})(n,c,o);return y(w,A(g(n,c),l))}function f(n,c){let o=0,l=c.buffer.lines.get(n),v=l?.isWrapped;for(;v&&n>=0&&n<c.rows;)o++,l=c.buffer.lines.get(--n),v=l?.isWrapped;return o}function g(n,c){return n>c?"A":"B"}function C(n,c,o,l,v,m){let w=n,D=c,_="";for(;w!==o||D!==l;)w+=v?1:-1,v&&w>m.cols-1?(_+=m.buffer.translateBufferLineToString(D,!1,n,w),w=0,n=0,D++):!v&&w<0&&(_+=m.buffer.translateBufferLineToString(D,!1,0,n+1),w=m.cols-1,n=w,D--);return _+m.buffer.translateBufferLineToString(D,!1,n,w)}function A(n,c){const o=c?"O":"[";return d.C0.ESC+o+n}function y(n,c){n=Math.floor(n);let o="";for(let l=0;l<n;l++)o+=c;return o}u.moveToCellSequence=function(n,c,o,l){const v=o.buffer.x,m=o.buffer.y;if(!o.buffer.hasScrollback)return(function(_,E,U,F,j,P){return b(E,F,j,P).length===0?"":y(C(_,E,_,E-f(E,j),!1,j).length,A("D",P))})(v,m,0,c,o,l)+b(m,c,o,l)+(function(_,E,U,F,j,P){let ee;ee=b(E,F,j,P).length>0?F-f(F,j):E;const se=F,I=(function(X,T,B,R,x,q){let Z;return Z=b(B,R,x,q).length>0?R-f(R,x):T,X<B&&Z<=R||X>=B&&Z<R?"C":"D"})(_,E,U,F,j,P);return y(C(_,ee,U,se,I==="C",j).length,A(I,P))})(v,m,n,c,o,l);let w;if(m===c)return w=v>n?"D":"C",y(Math.abs(v-n),A(w,l));w=m>c?"D":"C";const D=Math.abs(m-c);return y((function(_,E){return E.cols-_})(m>c?n:v,o)+(D-1)*o.cols+1+((m>c?v:n)-1),A(w,l))}},1296:function(H,u,h){var d=this&&this.__decorate||function(j,P,ee,se){var I,X=arguments.length,T=X<3?P:se===null?se=Object.getOwnPropertyDescriptor(P,ee):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(j,P,ee,se);else for(var B=j.length-1;B>=0;B--)(I=j[B])&&(T=(X<3?I(T):X>3?I(P,ee,T):I(P,ee))||T);return X>3&&T&&Object.defineProperty(P,ee,T),T},b=this&&this.__param||function(j,P){return function(ee,se){P(ee,se,j)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const f=h(3787),g=h(2550),C=h(2223),A=h(6171),y=h(4725),n=h(8055),c=h(8460),o=h(844),l=h(2585),v="xterm-dom-renderer-owner-",m="xterm-rows",w="xterm-fg-",D="xterm-bg-",_="xterm-focus",E="xterm-selection";let U=1,F=u.DomRenderer=class extends o.Disposable{constructor(j,P,ee,se,I,X,T,B,R,x){super(),this._element=j,this._screenElement=P,this._viewportElement=ee,this._linkifier2=se,this._charSizeService=X,this._optionsService=T,this._bufferService=B,this._coreBrowserService=R,this._themeService=x,this._terminalClass=U++,this._rowElements=[],this.onRequestRedraw=this.register(new c.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(m),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=document.createElement("div"),this._selectionContainer.classList.add(E),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,A.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((q=>this._injectCss(q)))),this._injectCss(this._themeService.colors),this._rowFactory=I.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(v+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((q=>this._handleLinkHover(q)))),this.register(this._linkifier2.onHideLinkUnderline((q=>this._handleLinkLeave(q)))),this.register((0,o.toDisposable)((()=>{this._element.classList.remove(v+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.WidthCache(document),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const j=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*j,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*j),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/j),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/j),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 ee of this._rowElements)ee.style.width=`${this.dimensions.css.canvas.width}px`,ee.style.height=`${this.dimensions.css.cell.height}px`,ee.style.lineHeight=`${this.dimensions.css.cell.height}px`,ee.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const P=`${this._terminalSelector} .${m} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=P,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(j){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let P=`${this._terminalSelector} .${m} { color: ${j.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;P+=`${this._terminalSelector} .${m} .xterm-dim { color: ${n.color.multiplyOpacity(j.foreground,.5).css};}`,P+=`${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;}`,P+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",P+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${j.cursor.css}; color: ${j.cursorAccent.css}; } 50% { background-color: inherit; color: ${j.cursor.css}; }}`,P+=`${this._terminalSelector} .${m}.${_} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${m}.${_} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-block { background-color: ${j.cursor.css}; color: ${j.cursorAccent.css};}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${j.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${j.cursor.css} inset;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${j.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,P+=`${this._terminalSelector} .${E} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${E} div { position: absolute; background-color: ${j.selectionBackgroundOpaque.css};}${this._terminalSelector} .${E} div { position: absolute; background-color: ${j.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,se]of j.ansi.entries())P+=`${this._terminalSelector} .${w}${ee} { color: ${se.css}; }${this._terminalSelector} .${w}${ee}.xterm-dim { color: ${n.color.multiplyOpacity(se,.5).css}; }${this._terminalSelector} .${D}${ee} { background-color: ${se.css}; }`;P+=`${this._terminalSelector} .${w}${C.INVERTED_DEFAULT_COLOR} { color: ${n.color.opaque(j.background).css}; }${this._terminalSelector} .${w}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${n.color.multiplyOpacity(n.color.opaque(j.background),.5).css}; }${this._terminalSelector} .${D}${C.INVERTED_DEFAULT_COLOR} { background-color: ${j.foreground.css}; }`,this._themeStyleElement.textContent=P}_setDefaultSpacing(){const j=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${j}px`,this._rowFactory.defaultSpacing=j}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(j,P){for(let ee=this._rowElements.length;ee<=P;ee++){const se=document.createElement("div");this._rowContainer.appendChild(se),this._rowElements.push(se)}for(;this._rowElements.length>P;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(j,P){this._refreshRowElements(j,P),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(_)}handleFocus(){this._rowContainer.classList.add(_),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(j,P,ee){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(j,P,ee),this.renderRows(0,this._bufferService.rows-1),!j||!P)return;const se=j[1]-this._bufferService.buffer.ydisp,I=P[1]-this._bufferService.buffer.ydisp,X=Math.max(se,0),T=Math.min(I,this._bufferService.rows-1);if(X>=this._bufferService.rows||T<0)return;const B=document.createDocumentFragment();if(ee){const R=j[0]>P[0];B.appendChild(this._createSelectionElement(X,R?P[0]:j[0],R?j[0]:P[0],T-X+1))}else{const R=se===X?j[0]:0,x=X===I?P[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(X,R,x));const q=T-X-1;if(B.appendChild(this._createSelectionElement(X+1,0,this._bufferService.cols,q)),X!==T){const Z=I===T?P[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(T,0,Z))}}this._selectionContainer.appendChild(B)}_createSelectionElement(j,P,ee,se=1){const I=document.createElement("div");return I.style.height=se*this.dimensions.css.cell.height+"px",I.style.top=j*this.dimensions.css.cell.height+"px",I.style.left=P*this.dimensions.css.cell.width+"px",I.style.width=this.dimensions.css.cell.width*(ee-P)+"px",I}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 j of this._rowElements)j.replaceChildren()}renderRows(j,P){const ee=this._bufferService.buffer,se=ee.ybase+ee.y,I=Math.min(ee.x,this._bufferService.cols-1),X=this._optionsService.rawOptions.cursorBlink,T=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let R=j;R<=P;R++){const x=R+ee.ydisp,q=this._rowElements[R],Z=ee.lines.get(x);if(!q||!Z)break;q.replaceChildren(...this._rowFactory.createRow(Z,x,x===se,T,B,I,X,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${v}${this._terminalClass}`}_handleLinkHover(j){this._setCellUnderline(j.x1,j.x2,j.y1,j.y2,j.cols,!0)}_handleLinkLeave(j){this._setCellUnderline(j.x1,j.x2,j.y1,j.y2,j.cols,!1)}_setCellUnderline(j,P,ee,se,I,X){ee<0&&(j=0),se<0&&(P=0);const T=this._bufferService.rows-1;ee=Math.max(Math.min(ee,T),0),se=Math.max(Math.min(se,T),0),I=Math.min(I,this._bufferService.cols);const B=this._bufferService.buffer,R=B.ybase+B.y,x=Math.min(B.x,I-1),q=this._optionsService.rawOptions.cursorBlink,Z=this._optionsService.rawOptions.cursorStyle,re=this._optionsService.rawOptions.cursorInactiveStyle;for(let le=ee;le<=se;++le){const de=le+B.ydisp,k=this._rowElements[le],Q=B.lines.get(de);if(!k||!Q)break;k.replaceChildren(...this._rowFactory.createRow(Q,de,de===R,Z,re,x,q,this.dimensions.css.cell.width,this._widthCache,X?le===ee?j:0:-1,X?(le===se?P:I)-1:-1))}}};u.DomRenderer=F=d([b(4,l.IInstantiationService),b(5,y.ICharSizeService),b(6,l.IOptionsService),b(7,l.IBufferService),b(8,y.ICoreBrowserService),b(9,y.IThemeService)],F)},3787:function(H,u,h){var d=this&&this.__decorate||function(w,D,_,E){var U,F=arguments.length,j=F<3?D:E===null?E=Object.getOwnPropertyDescriptor(D,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(w,D,_,E);else for(var P=w.length-1;P>=0;P--)(U=w[P])&&(j=(F<3?U(j):F>3?U(D,_,j):U(D,_))||j);return F>3&&j&&Object.defineProperty(D,_,j),j},b=this&&this.__param||function(w,D){return function(_,E){D(_,E,w)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const f=h(2223),g=h(643),C=h(511),A=h(2585),y=h(8055),n=h(4725),c=h(4269),o=h(6171),l=h(3734);let v=u.DomRendererRowFactory=class{constructor(w,D,_,E,U,F,j){this._document=w,this._characterJoinerService=D,this._optionsService=_,this._coreBrowserService=E,this._coreService=U,this._decorationService=F,this._themeService=j,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(w,D,_){this._selectionStart=w,this._selectionEnd=D,this._columnSelectMode=_}createRow(w,D,_,E,U,F,j,P,ee,se,I){const X=[],T=this._characterJoinerService.getJoinedCharacters(D),B=this._themeService.colors;let R,x=w.getNoBgTrimmedLength();_&&x<F+1&&(x=F+1);let q=0,Z="",re=0,le=0,de=0,k=!1,Q=0,te=!1,oe=0;const ye=[],ve=se!==-1&&I!==-1;for(let ke=0;ke<x;ke++){w.loadCell(ke,this._workCell);let je=this._workCell.getWidth();if(je===0)continue;let it=!1,Gt=ke,Ae=this._workCell;if(T.length>0&&ke===T[0][0]){it=!0;const Ye=T.shift();Ae=new c.JoinedCellData(this._workCell,w.translateToString(!0,Ye[0],Ye[1]),Ye[1]-Ye[0]),Gt=Ye[1]-1,je=Ae.getWidth()}const wt=this._isCellInSelection(ke,D),_i=_&&ke===F,vi=ve&&ke>=se&&ke<=I;let ni=!1;this._decorationService.forEachDecorationAtCell(ke,D,void 0,(Ye=>{ni=!0}));let Ui=Ae.getChars()||g.WHITESPACE_CELL_CHAR;if(Ui===" "&&(Ae.isUnderline()||Ae.isOverline())&&(Ui=" "),oe=je*P-ee.get(Ui,Ae.isBold(),Ae.isItalic()),R){if(q&&(wt&&te||!wt&&!te&&Ae.bg===re)&&(wt&&te&&B.selectionForeground||Ae.fg===le)&&Ae.extended.ext===de&&vi===k&&oe===Q&&!_i&&!it&&!ni){Z+=Ui,q++;continue}q&&(R.textContent=Z),R=this._document.createElement("span"),q=0,Z=""}else R=this._document.createElement("span");if(re=Ae.bg,le=Ae.fg,de=Ae.extended.ext,k=vi,Q=oe,te=wt,it&&F>=ke&&F<=Gt&&(F=ke),!this._coreService.isCursorHidden&&_i){if(ye.push("xterm-cursor"),this._coreBrowserService.isFocused)j&&ye.push("xterm-cursor-blink"),ye.push(E==="bar"?"xterm-cursor-bar":E==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(U)switch(U){case"outline":ye.push("xterm-cursor-outline");break;case"block":ye.push("xterm-cursor-block");break;case"bar":ye.push("xterm-cursor-bar");break;case"underline":ye.push("xterm-cursor-underline")}}if(Ae.isBold()&&ye.push("xterm-bold"),Ae.isItalic()&&ye.push("xterm-italic"),Ae.isDim()&&ye.push("xterm-dim"),Z=Ae.isInvisible()?g.WHITESPACE_CELL_CHAR:Ae.getChars()||g.WHITESPACE_CELL_CHAR,Ae.isUnderline()&&(ye.push(`xterm-underline-${Ae.extended.underlineStyle}`),Z===" "&&(Z=" "),!Ae.isUnderlineColorDefault()))if(Ae.isUnderlineColorRGB())R.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Ae.getUnderlineColor()).join(",")})`;else{let Ye=Ae.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ae.isBold()&&Ye<8&&(Ye+=8),R.style.textDecorationColor=B.ansi[Ye].css}Ae.isOverline()&&(ye.push("xterm-overline"),Z===" "&&(Z=" ")),Ae.isStrikethrough()&&ye.push("xterm-strikethrough"),vi&&(R.style.textDecoration="underline");let _t=Ae.getFgColor(),Pe=Ae.getFgColorMode(),yt=Ae.getBgColor(),ti=Ae.getBgColorMode();const ai=!!Ae.isInverse();if(ai){const Ye=_t;_t=yt,yt=Ye;const li=Pe;Pe=ti,ti=li}let Et,vs,Tt,mi=!1;switch(this._decorationService.forEachDecorationAtCell(ke,D,void 0,(Ye=>{Ye.options.layer!=="top"&&mi||(Ye.backgroundColorRGB&&(ti=50331648,yt=Ye.backgroundColorRGB.rgba>>8&16777215,Et=Ye.backgroundColorRGB),Ye.foregroundColorRGB&&(Pe=50331648,_t=Ye.foregroundColorRGB.rgba>>8&16777215,vs=Ye.foregroundColorRGB),mi=Ye.options.layer==="top")})),!mi&&wt&&(Et=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,yt=Et.rgba>>8&16777215,ti=50331648,mi=!0,B.selectionForeground&&(Pe=50331648,_t=B.selectionForeground.rgba>>8&16777215,vs=B.selectionForeground)),mi&&ye.push("xterm-decoration-top"),ti){case 16777216:case 33554432:Tt=B.ansi[yt],ye.push(`xterm-bg-${yt}`);break;case 50331648:Tt=y.rgba.toColor(yt>>16,yt>>8&255,255&yt),this._addStyle(R,`background-color:#${m((yt>>>0).toString(16),"0",6)}`);break;default:ai?(Tt=B.foreground,ye.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):Tt=B.background}switch(Et||Ae.isDim()&&(Et=y.color.multiplyOpacity(Tt,.5)),Pe){case 16777216:case 33554432:Ae.isBold()&&_t<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(_t+=8),this._applyMinimumContrast(R,Tt,B.ansi[_t],Ae,Et,void 0)||ye.push(`xterm-fg-${_t}`);break;case 50331648:const Ye=y.rgba.toColor(_t>>16&255,_t>>8&255,255&_t);this._applyMinimumContrast(R,Tt,Ye,Ae,Et,vs)||this._addStyle(R,`color:#${m(_t.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(R,Tt,B.foreground,Ae,Et,void 0)||ai&&ye.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ye.length&&(R.className=ye.join(" "),ye.length=0),_i||it||ni?R.textContent=Z:q++,oe!==this.defaultSpacing&&(R.style.letterSpacing=`${oe}px`),X.push(R),ke=Gt}return R&&q&&(R.textContent=Z),X}_applyMinimumContrast(w,D,_,E,U,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.excludeFromContrastRatioDemands)(E.getCode()))return!1;const j=this._getContrastCache(E);let P;if(U||F||(P=j.getColor(D.rgba,_.rgba)),P===void 0){const ee=this._optionsService.rawOptions.minimumContrastRatio/(E.isDim()?2:1);P=y.color.ensureContrastRatio(U||D,F||_,ee),j.setColor((U||D).rgba,(F||_).rgba,P??null)}return!!P&&(this._addStyle(w,`color:${P.css}`),!0)}_getContrastCache(w){return w.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(w,D){w.setAttribute("style",`${w.getAttribute("style")||""}${D};`)}_isCellInSelection(w,D){const _=this._selectionStart,E=this._selectionEnd;return!(!_||!E)&&(this._columnSelectMode?_[0]<=E[0]?w>=_[0]&&D>=_[1]&&w<E[0]&&D<=E[1]:w<_[0]&&D>=_[1]&&w>=E[0]&&D<=E[1]:D>_[1]&&D<E[1]||_[1]===E[1]&&D===_[1]&&w>=_[0]&&w<E[0]||_[1]<E[1]&&D===E[1]&&w<E[0]||_[1]<E[1]&&D===_[1]&&w>=_[0])}};function m(w,D,_){for(;w.length<_;)w=D+w;return w}u.DomRendererRowFactory=v=d([b(1,n.ICharacterJoinerService),b(2,A.IOptionsService),b(3,n.ICoreBrowserService),b(4,A.ICoreService),b(5,A.IDecorationService),b(6,n.IThemeService)],v)},2550:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=h.createElement("div"),this._container.style.position="absolute",this._container.style.top="-50000px",this._container.style.width="50000px",this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=h.createElement("span"),b=h.createElement("span");b.style.fontWeight="bold";const f=h.createElement("span");f.style.fontStyle="italic";const g=h.createElement("span");g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[d,b,f,g],this._container.appendChild(d),this._container.appendChild(b),this._container.appendChild(f),this._container.appendChild(g),h.body.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(h,d,b,f){h===this._font&&d===this._fontSize&&b===this._weight&&f===this._weightBold||(this._font=h,this._fontSize=d,this._weight=b,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${b}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${b}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(h,d,b){let f=0;if(!d&&!b&&h.length===1&&(f=h.charCodeAt(0))<256)return this._flat[f]!==-9999?this._flat[f]:this._flat[f]=this._measure(h,0);let g=h;d&&(g+="B"),b&&(g+="I");let C=this._holey.get(g);if(C===void 0){let A=0;d&&(A|=1),b&&(A|=2),C=this._measure(h,A),this._holey.set(g,C)}return C}_measure(h,d){const b=this._measureElements[d];return b.textContent=h.repeat(32),b.offsetWidth/32}}},2223:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const d=h(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(H,u)=>{function h(d){return 57508<=d&&d<=57558}Object.defineProperty(u,"__esModule",{value:!0}),u.createRenderDimensions=u.excludeFromContrastRatioDemands=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},u.isPowerlineGlyph=h,u.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},u.excludeFromContrastRatioDemands=function(d){return h(d)||(function(b){return 9472<=b&&b<=9631})(d)},u.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},456:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(h){this._bufferService=h,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 h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?h%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)-1]:[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[Math.max(h,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const h=this.selectionStart,d=this.selectionEnd;return!(!h||!d)&&(h[1]>d[1]||h[1]===d[1]&&h[0]>d[0])}handleTrim(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(H,u,h){var d=this&&this.__decorate||function(n,c,o,l){var v,m=arguments.length,w=m<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(n,c,o,l);else for(var D=n.length-1;D>=0;D--)(v=n[D])&&(w=(m<3?v(w):m>3?v(c,o,w):v(c,o))||w);return m>3&&w&&Object.defineProperty(c,o,w),w},b=this&&this.__param||function(n,c){return function(o,l){c(o,l,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const f=h(2585),g=h(8460),C=h(844);let A=u.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(n,c,o){super(),this._optionsService=o,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new y(n,c,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())}};u.CharSizeService=A=d([b(2,f.IOptionsService)],A);class y{constructor(c,o,l){this._document=c,this._parentElement=o,this._optionsService=l,this._result={width:0,height:0},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(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const c={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return c.width!==0&&c.height!==0&&(this._result.width=c.width/32,this._result.height=Math.ceil(c.height)),this._result}}},4269:function(H,u,h){var d=this&&this.__decorate||function(c,o,l,v){var m,w=arguments.length,D=w<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(c,o,l,v);else for(var _=c.length-1;_>=0;_--)(m=c[_])&&(D=(w<3?m(D):w>3?m(o,l,D):m(o,l))||D);return w>3&&D&&Object.defineProperty(o,l,D),D},b=this&&this.__param||function(c,o){return function(l,v){o(l,v,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const f=h(3734),g=h(643),C=h(511),A=h(2585);class y extends f.AttributeData{constructor(o,l,v){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=v}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=y;let n=u.CharacterJoinerService=class D_{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const v=[],m=l.translateToString(!0);let w=0,D=0,_=0,E=l.getFg(0),U=l.getBg(0);for(let F=0;F<l.getTrimmedLength();F++)if(l.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==U){if(F-w>1){const j=this._getJoinedRanges(m,_,D,l,w);for(let P=0;P<j.length;P++)v.push(j[P])}w=F,_=D,E=this._workCell.fg,U=this._workCell.bg}D+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-w>1){const F=this._getJoinedRanges(m,_,D,l,w);for(let j=0;j<F.length;j++)v.push(F[j])}return v}_getJoinedRanges(o,l,v,m,w){const D=o.substring(l,v);let _=[];try{_=this._characterJoiners[0].handler(D)}catch(E){console.error(E)}for(let E=1;E<this._characterJoiners.length;E++)try{const U=this._characterJoiners[E].handler(D);for(let F=0;F<U.length;F++)D_._mergeRanges(_,U[F])}catch(U){console.error(U)}return this._stringRangesToCellRanges(_,m,w),_}_stringRangesToCellRanges(o,l,v){let m=0,w=!1,D=0,_=o[m];if(_){for(let E=v;E<this._bufferService.cols;E++){const U=l.getWidth(E),F=l.getString(E).length||g.WHITESPACE_CELL_CHAR.length;if(U!==0){if(!w&&_[0]<=D&&(_[0]=E,w=!0),_[1]<=D){if(_[1]=E,_=o[++m],!_)break;_[0]<=D?(_[0]=E,w=!0):w=!1}D+=F}}_&&(_[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let v=!1;for(let m=0;m<o.length;m++){const w=o[m];if(v){if(l[1]<=w[0])return o[m-1][1]=l[1],o;if(l[1]<=w[1])return o[m-1][1]=Math.max(l[1],w[1]),o.splice(m,1),o;o.splice(m,1),m--}else{if(l[1]<=w[0])return o.splice(m,0,l),o;if(l[1]<=w[1])return w[0]=Math.min(l[0],w[0]),o;l[0]<w[1]&&(w[0]=Math.min(l[0],w[0]),v=!0)}}return v?o[o.length-1][1]=l[1]:o.push(l),o}};u.CharacterJoinerService=n=d([b(0,A.IBufferService)],n)},5114:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0,u.CoreBrowserService=class{constructor(h,d){this._textarea=h,this.window=d,this._isFocused=!1,this._cachedIsFocused=void 0,this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}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}}},8934:function(H,u,h){var d=this&&this.__decorate||function(A,y,n,c){var o,l=arguments.length,v=l<3?y:c===null?c=Object.getOwnPropertyDescriptor(y,n):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(A,y,n,c);else for(var m=A.length-1;m>=0;m--)(o=A[m])&&(v=(l<3?o(v):l>3?o(y,n,v):o(y,n))||v);return l>3&&v&&Object.defineProperty(y,n,v),v},b=this&&this.__param||function(A,y){return function(n,c){y(n,c,A)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const f=h(4725),g=h(9806);let C=u.MouseService=class{constructor(A,y){this._renderService=A,this._charSizeService=y}getCoords(A,y,n,c,o){return(0,g.getCoords)(window,A,y,n,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(A,y){const n=(0,g.getCoordsRelativeToElement)(window,A,y);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};u.MouseService=C=d([b(0,f.IRenderService),b(1,f.ICharSizeService)],C)},3230:function(H,u,h){var d=this&&this.__decorate||function(v,m,w,D){var _,E=arguments.length,U=E<3?m:D===null?D=Object.getOwnPropertyDescriptor(m,w):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(v,m,w,D);else for(var F=v.length-1;F>=0;F--)(_=v[F])&&(U=(E<3?_(U):E>3?_(m,w,U):_(m,w))||U);return E>3&&U&&Object.defineProperty(m,w,U),U},b=this&&this.__param||function(v,m){return function(w,D){m(w,D,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const f=h(3656),g=h(6193),C=h(5596),A=h(4725),y=h(8460),n=h(844),c=h(7226),o=h(2585);let l=u.RenderService=class extends n.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(v,m,w,D,_,E,U,F){if(super(),this._rowCount=v,this._charSizeService=D,this._renderer=this.register(new n.MutableDisposable),this._pausedResizeTask=new c.DebouncedIdleTask,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 g.RenderDebouncer(U.window,((j,P)=>this._renderRows(j,P))),this.register(this._renderDebouncer),this._screenDprMonitor=new C.ScreenDprMonitor(U.window),this._screenDprMonitor.setListener((()=>this.handleDevicePixelRatioChange())),this.register(this._screenDprMonitor),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var j;return(j=this._renderer.value)===null||j===void 0?void 0:j.clear()}))),this.register(w.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(_.onDecorationRegistered((()=>this._fullRefresh()))),this.register(_.onDecorationRemoved((()=>this._fullRefresh()))),this.register(w.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(w.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register((0,f.addDisposableDomListener)(U.window,"resize",(()=>this.handleDevicePixelRatioChange()))),this.register(F.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in U.window){const j=new U.window.IntersectionObserver((P=>this._handleIntersectionChange(P[P.length-1])),{threshold:0});j.observe(m),this.register({dispose:()=>j.disconnect()})}}_handleIntersectionChange(v){this._isPaused=v.isIntersecting===void 0?v.intersectionRatio===0:!v.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(v,m,w=!1){this._isPaused?this._needsFullRefresh=!0:(w||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(v,m,this._rowCount))}_renderRows(v,m){this._renderer.value&&(v=Math.min(v,this._rowCount-1),m=Math.min(m,this._rowCount-1),this._renderer.value.renderRows(v,m),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:v,end:m}),this._onRender.fire({start:v,end:m}),this._isNextRenderRedrawOnly=!0)}resize(v,m){this._rowCount=m,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(v){this._renderer.value=v,this._renderer.value.onRequestRedraw((m=>this.refreshRows(m.start,m.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(v){return this._renderDebouncer.addRefreshCallback(v)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var v,m;this._renderer.value&&((m=(v=this._renderer.value).clearTextureAtlas)===null||m===void 0||m.call(v),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(v,m){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(v,m))):this._renderer.value.handleResize(v,m),this._fullRefresh())}handleCharSizeChanged(){var v;(v=this._renderer.value)===null||v===void 0||v.handleCharSizeChanged()}handleBlur(){var v;(v=this._renderer.value)===null||v===void 0||v.handleBlur()}handleFocus(){var v;(v=this._renderer.value)===null||v===void 0||v.handleFocus()}handleSelectionChanged(v,m,w){var D;this._selectionState.start=v,this._selectionState.end=m,this._selectionState.columnSelectMode=w,(D=this._renderer.value)===null||D===void 0||D.handleSelectionChanged(v,m,w)}handleCursorMove(){var v;(v=this._renderer.value)===null||v===void 0||v.handleCursorMove()}clear(){var v;(v=this._renderer.value)===null||v===void 0||v.clear()}};u.RenderService=l=d([b(2,o.IOptionsService),b(3,A.ICharSizeService),b(4,o.IDecorationService),b(5,o.IBufferService),b(6,A.ICoreBrowserService),b(7,A.IThemeService)],l)},9312:function(H,u,h){var d=this&&this.__decorate||function(_,E,U,F){var j,P=arguments.length,ee=P<3?E:F===null?F=Object.getOwnPropertyDescriptor(E,U):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(_,E,U,F);else for(var se=_.length-1;se>=0;se--)(j=_[se])&&(ee=(P<3?j(ee):P>3?j(E,U,ee):j(E,U))||ee);return P>3&&ee&&Object.defineProperty(E,U,ee),ee},b=this&&this.__param||function(_,E){return function(U,F){E(U,F,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const f=h(9806),g=h(9504),C=h(456),A=h(4725),y=h(8460),n=h(844),c=h(6114),o=h(4841),l=h(511),v=h(2585),m=" ",w=new RegExp(m,"g");let D=u.SelectionService=class extends n.Disposable{constructor(_,E,U,F,j,P,ee,se,I){super(),this._element=_,this._screenElement=E,this._linkifier=U,this._bufferService=F,this._coreService=j,this._mouseService=P,this._optionsService=ee,this._renderService=se,this._coreBrowserService=I,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new y.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new y.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new y.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((X=>this._handleTrim(X))),this.register(this._bufferService.buffers.onBufferActivate((X=>this._handleBufferActivate(X)))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,n.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 _=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!(!_||!E||_[0]===E[0]&&_[1]===E[1])}get selectionText(){const _=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!_||!E)return"";const U=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(_[0]===E[0])return"";const j=_[0]<E[0]?_[0]:E[0],P=_[0]<E[0]?E[0]:_[0];for(let ee=_[1];ee<=E[1];ee++){const se=U.translateBufferLineToString(ee,!0,j,P);F.push(se)}}else{const j=_[1]===E[1]?E[0]:void 0;F.push(U.translateBufferLineToString(_[1],!0,_[0],j));for(let P=_[1]+1;P<=E[1]-1;P++){const ee=U.lines.get(P),se=U.translateBufferLineToString(P,!0);ee?.isWrapped?F[F.length-1]+=se:F.push(se)}if(_[1]!==E[1]){const P=U.lines.get(E[1]),ee=U.translateBufferLineToString(E[1],!0,0,E[0]);P&&P.isWrapped?F[F.length-1]+=ee:F.push(ee)}}return F.map((j=>j.replace(w," "))).join(c.isWindows?`\r
190
- `:`
191
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(_){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&_&&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(_){const E=this._getMouseBufferCoords(_),U=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(U&&F&&E)&&this._areCoordsInSelection(E,U,F)}isCellInSelection(_,E){const U=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!U||!F)&&this._areCoordsInSelection([_,E],U,F)}_areCoordsInSelection(_,E,U){return _[1]>E[1]&&_[1]<U[1]||E[1]===U[1]&&_[1]===E[1]&&_[0]>=E[0]&&_[0]<U[0]||E[1]<U[1]&&_[1]===U[1]&&_[0]<U[0]||E[1]<U[1]&&_[1]===E[1]&&_[0]>=E[0]}_selectWordAtCursor(_,E){var U,F;const j=(F=(U=this._linkifier.currentLink)===null||U===void 0?void 0:U.link)===null||F===void 0?void 0:F.range;if(j)return this._model.selectionStart=[j.start.x-1,j.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(j,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(_);return!!P&&(this._selectWordAt(P,E),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(_,E){this._model.clearSelection(),_=Math.max(_,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,_],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()}_handleTrim(_){this._model.handleTrim(_)&&this.refresh()}_getMouseBufferCoords(_){const E=this._mouseService.getCoords(_,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E}_getMouseEventScrollAmount(_){let E=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,_,this._screenElement)[1];const U=this._renderService.dimensions.css.canvas.height;return E>=0&&E<=U?0:(E>U&&(E-=U),E=Math.min(Math.max(E,-50),50),E/=50,E/Math.abs(E)+Math.round(14*E))}shouldForceSelection(_){return c.isMac?_.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:_.shiftKey}handleMouseDown(_){if(this._mouseDownTimeStamp=_.timeStamp,(_.button!==2||!this.hasSelection)&&_.button===0){if(!this._enabled){if(!this.shouldForceSelection(_))return;_.stopPropagation()}_.preventDefault(),this._dragScrollAmount=0,this._enabled&&_.shiftKey?this._handleIncrementalClick(_):_.detail===1?this._handleSingleClick(_):_.detail===2?this._handleDoubleClick(_):_.detail===3&&this._handleTripleClick(_),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(_){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(_))}_handleSingleClick(_){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(_)?3:0,this._model.selectionStart=this._getMouseBufferCoords(_),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(_){this._selectWordAtCursor(_,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(_){const E=this._getMouseBufferCoords(_);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))}shouldColumnSelect(_){return _.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(_){if(_.stopImmediatePropagation(),!this._model.selectionStart)return;const E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(_),!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(_),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const U=this._bufferService.buffer;if(this._model.selectionEnd[1]<U.lines.length){const F=U.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[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 _=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(_.ydisp+this._bufferService.rows,_.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=_.ydisp),this.refresh()}}_handleMouseUp(_){const E=_.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&_.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const U=this._mouseService.getCoords(_,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(U&&U[0]!==void 0&&U[1]!==void 0){const F=(0,g.moveToCellSequence)(U[0]-1,U[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const _=this._model.finalSelectionStart,E=this._model.finalSelectionEnd,U=!(!_||!E||_[0]===E[0]&&_[1]===E[1]);U?_&&E&&(this._oldSelectionStart&&this._oldSelectionEnd&&_[0]===this._oldSelectionStart[0]&&_[1]===this._oldSelectionStart[1]&&E[0]===this._oldSelectionEnd[0]&&E[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(_,E,U)):this._oldHasSelection&&this._fireOnSelectionChange(_,E,U)}_fireOnSelectionChange(_,E,U){this._oldSelectionStart=_,this._oldSelectionEnd=E,this._oldHasSelection=U,this._onSelectionChange.fire()}_handleBufferActivate(_){this.clearSelection(),this._trimListener.dispose(),this._trimListener=_.activeBuffer.lines.onTrim((E=>this._handleTrim(E)))}_convertViewportColToCharacterIndex(_,E){let U=E;for(let F=0;E>=F;F++){const j=_.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?U--:j>1&&E!==F&&(U+=j-1)}return U}setSelection(_,E,U){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[_,E],this._model.selectionStartLength=U,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(_){this._isClickInSelection(_)||(this._selectWordAtCursor(_,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(_,E,U=!0,F=!0){if(_[0]>=this._bufferService.cols)return;const j=this._bufferService.buffer,P=j.lines.get(_[1]);if(!P)return;const ee=j.translateBufferLineToString(_[1],!1);let se=this._convertViewportColToCharacterIndex(P,_[0]),I=se;const X=_[0]-se;let T=0,B=0,R=0,x=0;if(ee.charAt(se)===" "){for(;se>0&&ee.charAt(se-1)===" ";)se--;for(;I<ee.length&&ee.charAt(I+1)===" ";)I++}else{let re=_[0],le=_[0];P.getWidth(re)===0&&(T++,re--),P.getWidth(le)===2&&(B++,le++);const de=P.getString(le).length;for(de>1&&(x+=de-1,I+=de-1);re>0&&se>0&&!this._isCharWordSeparator(P.loadCell(re-1,this._workCell));){P.loadCell(re-1,this._workCell);const k=this._workCell.getChars().length;this._workCell.getWidth()===0?(T++,re--):k>1&&(R+=k-1,se-=k-1),se--,re--}for(;le<P.length&&I+1<ee.length&&!this._isCharWordSeparator(P.loadCell(le+1,this._workCell));){P.loadCell(le+1,this._workCell);const k=this._workCell.getChars().length;this._workCell.getWidth()===2?(B++,le++):k>1&&(x+=k-1,I+=k-1),I++,le++}}I++;let q=se+X-T+R,Z=Math.min(this._bufferService.cols,I-se+T+B-R-x);if(E||ee.slice(se,I).trim()!==""){if(U&&q===0&&P.getCodePoint(0)!==32){const re=j.lines.get(_[1]-1);if(re&&P.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const le=this._getWordAt([this._bufferService.cols-1,_[1]-1],!1,!0,!1);if(le){const de=this._bufferService.cols-le.start;q-=de,Z+=de}}}if(F&&q+Z===this._bufferService.cols&&P.getCodePoint(this._bufferService.cols-1)!==32){const re=j.lines.get(_[1]+1);if(re?.isWrapped&&re.getCodePoint(0)!==32){const le=this._getWordAt([0,_[1]+1],!1,!1,!0);le&&(Z+=le.length)}}return{start:q,length:Z}}}_selectWordAt(_,E){const U=this._getWordAt(_,E);if(U){for(;U.start<0;)U.start+=this._bufferService.cols,_[1]--;this._model.selectionStart=[U.start,_[1]],this._model.selectionStartLength=U.length}}_selectToWordAt(_){const E=this._getWordAt(_,!0);if(E){let U=_[1];for(;E.start<0;)E.start+=this._bufferService.cols,U--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,U++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,U]}}_isCharWordSeparator(_){return _.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(_.getChars())>=0}_selectLineAt(_){const E=this._bufferService.buffer.getWrappedRangeForLine(_),U={start:{x:0,y:E.first},end:{x:this._bufferService.cols-1,y:E.last}};this._model.selectionStart=[0,E.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(U,this._bufferService.cols)}};u.SelectionService=D=d([b(3,v.IBufferService),b(4,v.ICoreService),b(5,A.IMouseService),b(6,v.IOptionsService),b(7,A.IRenderService),b(8,A.ICoreBrowserService)],D)},4725:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const d=h(8343);u.ICharSizeService=(0,d.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),u.IMouseService=(0,d.createDecorator)("MouseService"),u.IRenderService=(0,d.createDecorator)("RenderService"),u.ISelectionService=(0,d.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,d.createDecorator)("ThemeService")},6731:function(H,u,h){var d=this&&this.__decorate||function(D,_,E,U){var F,j=arguments.length,P=j<3?_:U===null?U=Object.getOwnPropertyDescriptor(_,E):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(D,_,E,U);else for(var ee=D.length-1;ee>=0;ee--)(F=D[ee])&&(P=(j<3?F(P):j>3?F(_,E,P):F(_,E))||P);return j>3&&P&&Object.defineProperty(_,E,P),P},b=this&&this.__param||function(D,_){return function(E,U){_(E,U,D)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const f=h(7239),g=h(8055),C=h(8460),A=h(844),y=h(2585),n=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),o=g.css.toColor("#ffffff"),l=g.css.toColor("#000000"),v={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const D=[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")],_=[0,95,135,175,215,255];for(let E=0;E<216;E++){const U=_[E/36%6|0],F=_[E/6%6|0],j=_[E%6];D.push({css:g.channels.toCss(U,F,j),rgba:g.channels.toRgba(U,F,j)})}for(let E=0;E<24;E++){const U=8+10*E;D.push({css:g.channels.toCss(U,U,U),rgba:g.channels.toRgba(U,U,U)})}return D})());let m=u.ThemeService=class extends A.Disposable{get colors(){return this._colors}constructor(D){super(),this._optionsService=D,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:n,background:c,cursor:o,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:v,selectionBackgroundOpaque:g.color.blend(c,v),selectionInactiveBackgroundTransparent:v,selectionInactiveBackgroundOpaque:g.color.blend(c,v),ansi:u.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(D={}){const _=this._colors;if(_.foreground=w(D.foreground,n),_.background=w(D.background,c),_.cursor=w(D.cursor,o),_.cursorAccent=w(D.cursorAccent,l),_.selectionBackgroundTransparent=w(D.selectionBackground,v),_.selectionBackgroundOpaque=g.color.blend(_.background,_.selectionBackgroundTransparent),_.selectionInactiveBackgroundTransparent=w(D.selectionInactiveBackground,_.selectionBackgroundTransparent),_.selectionInactiveBackgroundOpaque=g.color.blend(_.background,_.selectionInactiveBackgroundTransparent),_.selectionForeground=D.selectionForeground?w(D.selectionForeground,g.NULL_COLOR):void 0,_.selectionForeground===g.NULL_COLOR&&(_.selectionForeground=void 0),g.color.isOpaque(_.selectionBackgroundTransparent)&&(_.selectionBackgroundTransparent=g.color.opacity(_.selectionBackgroundTransparent,.3)),g.color.isOpaque(_.selectionInactiveBackgroundTransparent)&&(_.selectionInactiveBackgroundTransparent=g.color.opacity(_.selectionInactiveBackgroundTransparent,.3)),_.ansi=u.DEFAULT_ANSI_COLORS.slice(),_.ansi[0]=w(D.black,u.DEFAULT_ANSI_COLORS[0]),_.ansi[1]=w(D.red,u.DEFAULT_ANSI_COLORS[1]),_.ansi[2]=w(D.green,u.DEFAULT_ANSI_COLORS[2]),_.ansi[3]=w(D.yellow,u.DEFAULT_ANSI_COLORS[3]),_.ansi[4]=w(D.blue,u.DEFAULT_ANSI_COLORS[4]),_.ansi[5]=w(D.magenta,u.DEFAULT_ANSI_COLORS[5]),_.ansi[6]=w(D.cyan,u.DEFAULT_ANSI_COLORS[6]),_.ansi[7]=w(D.white,u.DEFAULT_ANSI_COLORS[7]),_.ansi[8]=w(D.brightBlack,u.DEFAULT_ANSI_COLORS[8]),_.ansi[9]=w(D.brightRed,u.DEFAULT_ANSI_COLORS[9]),_.ansi[10]=w(D.brightGreen,u.DEFAULT_ANSI_COLORS[10]),_.ansi[11]=w(D.brightYellow,u.DEFAULT_ANSI_COLORS[11]),_.ansi[12]=w(D.brightBlue,u.DEFAULT_ANSI_COLORS[12]),_.ansi[13]=w(D.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),_.ansi[14]=w(D.brightCyan,u.DEFAULT_ANSI_COLORS[14]),_.ansi[15]=w(D.brightWhite,u.DEFAULT_ANSI_COLORS[15]),D.extendedAnsi){const E=Math.min(_.ansi.length-16,D.extendedAnsi.length);for(let U=0;U<E;U++)_.ansi[U+16]=w(D.extendedAnsi[U],u.DEFAULT_ANSI_COLORS[U+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(D){this._restoreColor(D),this._onChangeColors.fire(this.colors)}_restoreColor(D){if(D!==void 0)switch(D){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[D]=this._restoreColors.ansi[D]}else for(let _=0;_<this._restoreColors.ansi.length;++_)this._colors.ansi[_]=this._restoreColors.ansi[_]}modifyColors(D){D(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function w(D,_){if(D!==void 0)try{return g.css.toColor(D)}catch{}return _}u.ThemeService=m=d([b(0,y.IOptionsService)],m)},6349:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=h(8460),b=h(844);class f extends b.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(C){if(this._maxLength===C)return;const A=new Array(C);for(let y=0;y<Math.min(C,this.length);y++)A[y]=this._array[this._getCyclicIndex(y)];this._array=A,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let A=this._length;A<C;A++)this._array[A]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,A){this._array[this._getCyclicIndex(C)]=A}push(C){this._array[this._getCyclicIndex(this._length)]=C,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(C,A,...y){if(A){for(let n=C;n<this._length-A;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+A)];this._length-=A,this.onDeleteEmitter.fire({index:C,amount:A})}for(let n=this._length-1;n>=C;n--)this._array[this._getCyclicIndex(n+y.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<y.length;n++)this._array[this._getCyclicIndex(C+n)]=y[n];if(y.length&&this.onInsertEmitter.fire({index:C,amount:y.length}),this._length+y.length>this._maxLength){const n=this._length+y.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=y.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,A,y){if(!(A<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+y<0)throw new Error("Cannot shift elements in list beyond index 0");if(y>0){for(let c=A-1;c>=0;c--)this.set(C+c+y,this.get(C+c));const n=C+A+y-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<A;n++)this.set(C+n+y,this.get(C+n))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}u.CircularList=f},1439:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function h(d,b=5){if(typeof d!="object")return d;const f=Array.isArray(d)?[]:{};for(const g in d)f[g]=b<=1?d[g]:d[g]&&h(d[g],b-1);return f}},8055:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.contrastRatio=u.toPaddedHex=u.rgba=u.rgb=u.css=u.color=u.channels=u.NULL_COLOR=void 0;const d=h(6114);let b=0,f=0,g=0,C=0;var A,y,n,c,o;function l(m){const w=m.toString(16);return w.length<2?"0"+w:w}function v(m,w){return m<w?(w+.05)/(m+.05):(m+.05)/(w+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(m){m.toCss=function(w,D,_,E){return E!==void 0?`#${l(w)}${l(D)}${l(_)}${l(E)}`:`#${l(w)}${l(D)}${l(_)}`},m.toRgba=function(w,D,_,E=255){return(w<<24|D<<16|_<<8|E)>>>0}})(A||(u.channels=A={})),(function(m){function w(D,_){return C=Math.round(255*_),[b,f,g]=o.toChannels(D.rgba),{css:A.toCss(b,f,g,C),rgba:A.toRgba(b,f,g,C)}}m.blend=function(D,_){if(C=(255&_.rgba)/255,C===1)return{css:_.css,rgba:_.rgba};const E=_.rgba>>24&255,U=_.rgba>>16&255,F=_.rgba>>8&255,j=D.rgba>>24&255,P=D.rgba>>16&255,ee=D.rgba>>8&255;return b=j+Math.round((E-j)*C),f=P+Math.round((U-P)*C),g=ee+Math.round((F-ee)*C),{css:A.toCss(b,f,g),rgba:A.toRgba(b,f,g)}},m.isOpaque=function(D){return(255&D.rgba)==255},m.ensureContrastRatio=function(D,_,E){const U=o.ensureContrastRatio(D.rgba,_.rgba,E);if(U)return o.toColor(U>>24&255,U>>16&255,U>>8&255)},m.opaque=function(D){const _=(255|D.rgba)>>>0;return[b,f,g]=o.toChannels(_),{css:A.toCss(b,f,g),rgba:_}},m.opacity=w,m.multiplyOpacity=function(D,_){return C=255&D.rgba,w(D,C*_/255)},m.toColorRGB=function(D){return[D.rgba>>24&255,D.rgba>>16&255,D.rgba>>8&255]}})(y||(u.color=y={})),(function(m){let w,D;if(!d.isNode){const _=document.createElement("canvas");_.width=1,_.height=1;const E=_.getContext("2d",{willReadFrequently:!0});E&&(w=E,w.globalCompositeOperation="copy",D=w.createLinearGradient(0,0,1,1))}m.toColor=function(_){if(_.match(/#[\da-f]{3,8}/i))switch(_.length){case 4:return b=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),g=parseInt(_.slice(3,4).repeat(2),16),o.toColor(b,f,g);case 5:return b=parseInt(_.slice(1,2).repeat(2),16),f=parseInt(_.slice(2,3).repeat(2),16),g=parseInt(_.slice(3,4).repeat(2),16),C=parseInt(_.slice(4,5).repeat(2),16),o.toColor(b,f,g,C);case 7:return{css:_,rgba:(parseInt(_.slice(1),16)<<8|255)>>>0};case 9:return{css:_,rgba:parseInt(_.slice(1),16)>>>0}}const E=_.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 b=parseInt(E[1]),f=parseInt(E[2]),g=parseInt(E[3]),C=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),o.toColor(b,f,g,C);if(!w||!D)throw new Error("css.toColor: Unsupported css format");if(w.fillStyle=D,w.fillStyle=_,typeof w.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(w.fillRect(0,0,1,1),[b,f,g,C]=w.getImageData(0,0,1,1).data,C!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:A.toRgba(b,f,g,C),css:_}}})(n||(u.css=n={})),(function(m){function w(D,_,E){const U=D/255,F=_/255,j=E/255;return .2126*(U<=.03928?U/12.92:Math.pow((U+.055)/1.055,2.4))+.7152*(F<=.03928?F/12.92:Math.pow((F+.055)/1.055,2.4))+.0722*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))}m.relativeLuminance=function(D){return w(D>>16&255,D>>8&255,255&D)},m.relativeLuminance2=w})(c||(u.rgb=c={})),(function(m){function w(_,E,U){const F=_>>24&255,j=_>>16&255,P=_>>8&255;let ee=E>>24&255,se=E>>16&255,I=E>>8&255,X=v(c.relativeLuminance2(ee,se,I),c.relativeLuminance2(F,j,P));for(;X<U&&(ee>0||se>0||I>0);)ee-=Math.max(0,Math.ceil(.1*ee)),se-=Math.max(0,Math.ceil(.1*se)),I-=Math.max(0,Math.ceil(.1*I)),X=v(c.relativeLuminance2(ee,se,I),c.relativeLuminance2(F,j,P));return(ee<<24|se<<16|I<<8|255)>>>0}function D(_,E,U){const F=_>>24&255,j=_>>16&255,P=_>>8&255;let ee=E>>24&255,se=E>>16&255,I=E>>8&255,X=v(c.relativeLuminance2(ee,se,I),c.relativeLuminance2(F,j,P));for(;X<U&&(ee<255||se<255||I<255);)ee=Math.min(255,ee+Math.ceil(.1*(255-ee))),se=Math.min(255,se+Math.ceil(.1*(255-se))),I=Math.min(255,I+Math.ceil(.1*(255-I))),X=v(c.relativeLuminance2(ee,se,I),c.relativeLuminance2(F,j,P));return(ee<<24|se<<16|I<<8|255)>>>0}m.ensureContrastRatio=function(_,E,U){const F=c.relativeLuminance(_>>8),j=c.relativeLuminance(E>>8);if(v(F,j)<U){if(j<F){const se=w(_,E,U),I=v(F,c.relativeLuminance(se>>8));if(I<U){const X=D(_,E,U);return I>v(F,c.relativeLuminance(X>>8))?se:X}return se}const P=D(_,E,U),ee=v(F,c.relativeLuminance(P>>8));if(ee<U){const se=w(_,E,U);return ee>v(F,c.relativeLuminance(se>>8))?P:se}return P}},m.reduceLuminance=w,m.increaseLuminance=D,m.toChannels=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]},m.toColor=function(_,E,U,F){return{css:A.toCss(_,E,U,F),rgba:A.toRgba(_,E,U,F)}}})(o||(u.rgba=o={})),u.toPaddedHex=l,u.contrastRatio=v},8969:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=h(844),b=h(2585),f=h(4348),g=h(7866),C=h(744),A=h(7302),y=h(6975),n=h(8460),c=h(1753),o=h(1480),l=h(7994),v=h(9282),m=h(5435),w=h(5981),D=h(2660);let _=!1;class E extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new n.EventEmitter),this._onScroll.event((F=>{var j;(j=this._onScrollApi)===null||j===void 0||j.fire(F.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(F){for(const j in F)this.optionsService.options[j]=F[j]}constructor(F){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new n.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new n.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new n.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new n.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new n.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new A.OptionsService(F)),this._instantiationService.setService(b.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(b.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(b.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(y.CoreService)),this._instantiationService.setService(b.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(b.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(b.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(b.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(D.OscLinkService),this._instantiationService.setService(b.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new m.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,n.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,n.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,n.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,n.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((j=>{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((j=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new w.WriteBuffer(((j,P)=>this._inputHandler.parse(j,P)))),this.register((0,n.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,j){this._writeBuffer.write(F,j)}writeSync(F,j){this._logService.logLevel<=b.LogLevelEnum.WARN&&!_&&(this._logService.warn("writeSync is unreliable and will be removed soon."),_=!0),this._writeBuffer.writeSync(F,j)}resize(F,j){isNaN(F)||isNaN(j)||(F=Math.max(F,C.MINIMUM_COLS),j=Math.max(j,C.MINIMUM_ROWS),this._bufferService.resize(F,j))}scroll(F,j=!1){this._bufferService.scroll(F,j)}scrollLines(F,j,P){this._bufferService.scrollLines(F,j,P)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const j=F-this._bufferService.buffer.ydisp;j!==0&&this.scrollLines(j)}registerEscHandler(F,j){return this._inputHandler.registerEscHandler(F,j)}registerDcsHandler(F,j){return this._inputHandler.registerDcsHandler(F,j)}registerCsiHandler(F,j){return this._inputHandler.registerCsiHandler(F,j)}registerOscHandler(F,j){return this._inputHandler.registerOscHandler(F,j)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const j=this.optionsService.rawOptions.windowsPty;j&&j.buildNumber!==void 0&&j.buildNumber!==void 0?F=j.backend==="conpty"&&j.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(v.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},(()=>((0,v.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const j of F)j.dispose()}))}}}u.CoreTerminal=E},8460:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.forwardEvent=u.EventEmitter=void 0,u.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const b=[];for(let f=0;f<this._listeners.length;f++)b.push(this._listeners[f]);for(let f=0;f<b.length;f++)b[f].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(h,d){return h((b=>d.fire(b)))}},5435:function(H,u,h){var d=this&&this.__decorate||function(X,T,B,R){var x,q=arguments.length,Z=q<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,B):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(X,T,B,R);else for(var re=X.length-1;re>=0;re--)(x=X[re])&&(Z=(q<3?x(Z):q>3?x(T,B,Z):x(T,B))||Z);return q>3&&Z&&Object.defineProperty(T,B,Z),Z},b=this&&this.__param||function(X,T){return function(B,R){T(B,R,X)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const f=h(2584),g=h(7116),C=h(2015),A=h(844),y=h(482),n=h(8437),c=h(8460),o=h(643),l=h(511),v=h(3734),m=h(2585),w=h(6242),D=h(6351),_=h(5941),E={"(":0,")":1,"*":2,"+":3,"-":1,".":2},U=131072;function F(X,T){if(X>24)return T.setWinLines||!1;switch(X){case 1:return!!T.restoreWin;case 2:return!!T.minimizeWin;case 3:return!!T.setWinPosition;case 4:return!!T.setWinSizePixels;case 5:return!!T.raiseWin;case 6:return!!T.lowerWin;case 7:return!!T.refreshWin;case 8:return!!T.setWinSizeChars;case 9:return!!T.maximizeWin;case 10:return!!T.fullscreenWin;case 11:return!!T.getWinState;case 13:return!!T.getWinPosition;case 14:return!!T.getWinSizePixels;case 15:return!!T.getScreenSizePixels;case 16:return!!T.getCellSizePixels;case 18:return!!T.getWinSizeChars;case 19:return!!T.getScreenSizeChars;case 20:return!!T.getIconTitle;case 21:return!!T.getWinTitle;case 22:return!!T.pushTitle;case 23:return!!T.popTitle;case 24:return!!T.setWinLines}return!1}var j;(function(X){X[X.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",X[X.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(j||(u.WindowsOptionsReportType=j={}));let P=0;class ee extends A.Disposable{getAttrData(){return this._curAttrData}constructor(T,B,R,x,q,Z,re,le,de=new C.EscapeSequenceParser){super(),this._bufferService=T,this._charsetService=B,this._coreService=R,this._logService=x,this._optionsService=q,this._oscLinkService=Z,this._coreMouseService=re,this._unicodeService=le,this._parser=de,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new y.StringToUtf32,this._utf8Decoder=new y.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new se(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((k=>this._activeBuffer=k.activeBuffer))),this._parser.setCsiHandlerFallback(((k,Q)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(k),params:Q.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,Q,te)=>{this._logService.debug("Unknown OSC code: ",{identifier:k,action:Q,data:te})})),this._parser.setDcsHandlerFallback(((k,Q,te)=>{Q==="HOOK"&&(te=te.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(k),action:Q,payload:te})})),this._parser.setPrintHandler(((k,Q,te)=>this.print(k,Q,te))),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(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((k=>(this.setTitle(k),this.setIconName(k),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((k=>this.setIconName(k)))),this._parser.registerOscHandler(2,new w.OscHandler((k=>this.setTitle(k)))),this._parser.registerOscHandler(4,new w.OscHandler((k=>this.setOrReportIndexedColor(k)))),this._parser.registerOscHandler(8,new w.OscHandler((k=>this.setHyperlink(k)))),this._parser.registerOscHandler(10,new w.OscHandler((k=>this.setOrReportFgColor(k)))),this._parser.registerOscHandler(11,new w.OscHandler((k=>this.setOrReportBgColor(k)))),this._parser.registerOscHandler(12,new w.OscHandler((k=>this.setOrReportCursorColor(k)))),this._parser.registerOscHandler(104,new w.OscHandler((k=>this.restoreIndexedColor(k)))),this._parser.registerOscHandler(110,new w.OscHandler((k=>this.restoreFgColor(k)))),this._parser.registerOscHandler(111,new w.OscHandler((k=>this.restoreBgColor(k)))),this._parser.registerOscHandler(112,new w.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 D.DcsHandler(((k,Q)=>this.requestStatusString(k,Q))))}_preserveStack(T,B,R,x){this._parseStack.paused=!0,this._parseStack.cursorStartX=T,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=R,this._parseStack.position=x}_logSlowResolvingAsync(T){this._logService.logLevel<=m.LogLevelEnum.WARN&&Promise.race([T,new Promise(((B,R)=>setTimeout((()=>R("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(T,B){let R,x=this._activeBuffer.x,q=this._activeBuffer.y,Z=0;const re=this._parseStack.paused;if(re){if(R=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(R),R;x=this._parseStack.cursorStartX,q=this._parseStack.cursorStartY,this._parseStack.paused=!1,T.length>U&&(Z=this._parseStack.position+U)}if(this._logService.logLevel<=m.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof T=="string"?` "${T}"`:` "${Array.prototype.map.call(T,(le=>String.fromCharCode(le))).join("")}"`),typeof T=="string"?T.split("").map((le=>le.charCodeAt(0))):T),this._parseBuffer.length<T.length&&this._parseBuffer.length<U&&(this._parseBuffer=new Uint32Array(Math.min(T.length,U))),re||this._dirtyRowTracker.clearRange(),T.length>U)for(let le=Z;le<T.length;le+=U){const de=le+U<T.length?le+U:T.length,k=typeof T=="string"?this._stringDecoder.decode(T.substring(le,de),this._parseBuffer):this._utf8Decoder.decode(T.subarray(le,de),this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,k))return this._preserveStack(x,q,k,le),this._logSlowResolvingAsync(R),R}else if(!re){const le=typeof T=="string"?this._stringDecoder.decode(T,this._parseBuffer):this._utf8Decoder.decode(T,this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,le))return this._preserveStack(x,q,le,0),this._logSlowResolvingAsync(R),R}this._activeBuffer.x===x&&this._activeBuffer.y===q||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(T,B,R){let x,q;const Z=this._charsetService.charset,re=this._optionsService.rawOptions.screenReaderMode,le=this._bufferService.cols,de=this._coreService.decPrivateModes.wraparound,k=this._coreService.modes.insertMode,Q=this._curAttrData;let te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&R-B>0&&te.getWidth(this._activeBuffer.x-1)===2&&te.setCellFromCodePoint(this._activeBuffer.x-1,0,1,Q.fg,Q.bg,Q.extended);for(let oe=B;oe<R;++oe){if(x=T[oe],q=this._unicodeService.wcwidth(x),x<127&&Z){const ye=Z[String.fromCharCode(x)];ye&&(x=ye.charCodeAt(0))}if(re&&this._onA11yChar.fire((0,y.stringFromCodePoint)(x)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),q||!this._activeBuffer.x){if(this._activeBuffer.x+q-1>=le){if(de){for(;this._activeBuffer.x<le;)te.setCellFromCodePoint(this._activeBuffer.x++,0,1,Q.fg,Q.bg,Q.extended);this._activeBuffer.x=0,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),te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=le-1,q===2)continue}if(k&&(te.insertCells(this._activeBuffer.x,q,this._activeBuffer.getNullCell(Q),Q),te.getWidth(le-1)===2&&te.setCellFromCodePoint(le-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,Q.fg,Q.bg,Q.extended)),te.setCellFromCodePoint(this._activeBuffer.x++,x,q,Q.fg,Q.bg,Q.extended),q>0)for(;--q;)te.setCellFromCodePoint(this._activeBuffer.x++,0,0,Q.fg,Q.bg,Q.extended)}else te.getWidth(this._activeBuffer.x-1)?te.addCodepointToCell(this._activeBuffer.x-1,x):te.addCodepointToCell(this._activeBuffer.x-2,x)}R-B>0&&(te.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<le&&R-B>0&&te.getWidth(this._activeBuffer.x)===0&&!te.hasContent(this._activeBuffer.x)&&te.setCellFromCodePoint(this._activeBuffer.x,0,1,Q.fg,Q.bg,Q.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(T,B){return T.final!=="t"||T.prefix||T.intermediates?this._parser.registerCsiHandler(T,B):this._parser.registerCsiHandler(T,(R=>!F(R.params[0],this._optionsService.rawOptions.windowOptions)||B(R)))}registerDcsHandler(T,B){return this._parser.registerDcsHandler(T,new D.DcsHandler(B))}registerEscHandler(T,B){return this._parser.registerEscHandler(T,B)}registerOscHandler(T,B){return this._parser.registerOscHandler(T,new w.OscHandler(B))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var T;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&&(!((T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||T===void 0)&&T.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const T=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-T),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(T=this._bufferService.cols-1){this._activeBuffer.x=Math.min(T,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(T,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=T,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=T,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(T,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+T,this._activeBuffer.y+B)}cursorUp(T){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,T.params[0]||1)):this._moveCursor(0,-(T.params[0]||1)),!0}cursorDown(T){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,T.params[0]||1)):this._moveCursor(0,T.params[0]||1),!0}cursorForward(T){return this._moveCursor(T.params[0]||1,0),!0}cursorBackward(T){return this._moveCursor(-(T.params[0]||1),0),!0}cursorNextLine(T){return this.cursorDown(T),this._activeBuffer.x=0,!0}cursorPrecedingLine(T){return this.cursorUp(T),this._activeBuffer.x=0,!0}cursorCharAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(T){return this._setCursor(T.length>=2?(T.params[1]||1)-1:0,(T.params[0]||1)-1),!0}charPosAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(T){return this._moveCursor(T.params[0]||1,0),!0}linePosAbsolute(T){return this._setCursor(this._activeBuffer.x,(T.params[0]||1)-1),!0}vPositionRelative(T){return this._moveCursor(0,T.params[0]||1),!0}hVPosition(T){return this.cursorPosition(T),!0}tabClear(T){const B=T.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=T.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=T.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(T){const B=T.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(T,B,R,x=!1,q=!1){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);Z.replaceCells(B,R,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),q),x&&(Z.isWrapped=!1)}_resetBufferLine(T,B=!1){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);R&&(R.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+T),R.isWrapped=!1)}eraseInDisplay(T,B=!1){let R;switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);R<this._bufferService.rows;R++)this._resetBufferLine(R,B);this._dirtyRowTracker.markDirty(R);break;case 1:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(R+1).isWrapped=!1);R--;)this._resetBufferLine(R,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(R=this._bufferService.rows,this._dirtyRowTracker.markDirty(R-1);R--;)this._resetBufferLine(R,B);this._dirtyRowTracker.markDirty(0);break;case 3:const x=this._activeBuffer.lines.length-this._bufferService.rows;x>0&&(this._activeBuffer.lines.trimStart(x),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-x,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-x,0),this._onScroll.fire(0))}return!0}eraseInLine(T,B=!1){switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(T){this._restrictCursor();let B=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y,x=this._bufferService.rows-1-this._activeBuffer.scrollBottom,q=this._bufferService.rows-1+this._activeBuffer.ybase-x+1;for(;B--;)this._activeBuffer.lines.splice(q-1,1),this._activeBuffer.lines.splice(R,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(T){this._restrictCursor();let B=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y;let x;for(x=this._bufferService.rows-1-this._activeBuffer.scrollBottom,x=this._bufferService.rows-1+this._activeBuffer.ybase-x;B--;)this._activeBuffer.lines.splice(R,1),this._activeBuffer.lines.splice(x,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(T){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(T){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(T){let B=T.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(T){let B=T.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(n.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=T.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);x.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),x.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=T.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);x.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),x.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=T.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);x.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),x.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=T.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);x.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),x.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(T){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(T.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(T){if(!this._parser.precedingCodepoint)return!0;const B=T.params[0]||1,R=new Uint32Array(B);for(let x=0;x<B;++x)R[x]=this._parser.precedingCodepoint;return this.print(R,0,R.length),!0}sendDeviceAttributesPrimary(T){return T.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(T){return T.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(T.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(T){return(this._optionsService.rawOptions.termName+"").indexOf(T)===0}setMode(T){for(let B=0;B<T.length;B++)switch(T.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(T){for(let B=0;B<T.length;B++)switch(T.params[B]){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(T){for(let B=0;B<T.length;B++)switch(T.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(T){for(let B=0;B<T.length;B++)switch(T.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),T.params[B]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(T,B){const R=this._coreService.decPrivateModes,{activeProtocol:x,activeEncoding:q}=this._coreMouseService,Z=this._coreService,{buffers:re,cols:le}=this._bufferService,{active:de,alt:k}=re,Q=this._optionsService.rawOptions,te=ke=>ke?1:2,oe=T.params[0];return ye=oe,ve=B?oe===2?4:oe===4?te(Z.modes.insertMode):oe===12?3:oe===20?te(Q.convertEol):0:oe===1?te(R.applicationCursorKeys):oe===3?Q.windowOptions.setWinLines?le===80?2:le===132?1:0:0:oe===6?te(R.origin):oe===7?te(R.wraparound):oe===8?3:oe===9?te(x==="X10"):oe===12?te(Q.cursorBlink):oe===25?te(!Z.isCursorHidden):oe===45?te(R.reverseWraparound):oe===66?te(R.applicationKeypad):oe===67?4:oe===1e3?te(x==="VT200"):oe===1002?te(x==="DRAG"):oe===1003?te(x==="ANY"):oe===1004?te(R.sendFocus):oe===1005?4:oe===1006?te(q==="SGR"):oe===1015?4:oe===1016?te(q==="SGR_PIXELS"):oe===1048?1:oe===47||oe===1047||oe===1049?te(de===k):oe===2004?te(R.bracketedPasteMode):0,Z.triggerDataEvent(`${f.C0.ESC}[${B?"":"?"}${ye};${ve}$y`),!0;var ye,ve}_updateAttrColor(T,B,R,x,q){return B===2?(T|=50331648,T&=-16777216,T|=v.AttributeData.fromColorRGB([R,x,q])):B===5&&(T&=-50331904,T|=33554432|255&R),T}_extractColor(T,B,R){const x=[0,0,-1,0,0,0];let q=0,Z=0;do{if(x[Z+q]=T.params[B+Z],T.hasSubParams(B+Z)){const re=T.getSubParams(B+Z);let le=0;do x[1]===5&&(q=1),x[Z+le+1+q]=re[le];while(++le<re.length&&le+Z+1+q<x.length);break}if(x[1]===5&&Z+q>=2||x[1]===2&&Z+q>=5)break;x[1]&&(q=1)}while(++Z+B<T.length&&Z+q<x.length);for(let re=2;re<x.length;++re)x[re]===-1&&(x[re]=0);switch(x[0]){case 38:R.fg=this._updateAttrColor(R.fg,x[1],x[3],x[4],x[5]);break;case 48:R.bg=this._updateAttrColor(R.bg,x[1],x[3],x[4],x[5]);break;case 58:R.extended=R.extended.clone(),R.extended.underlineColor=this._updateAttrColor(R.extended.underlineColor,x[1],x[3],x[4],x[5])}return Z}_processUnderline(T,B){B.extended=B.extended.clone(),(!~T||T>5)&&(T=1),B.extended.underlineStyle=T,B.fg|=268435456,T===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(T){T.fg=n.DEFAULT_ATTR_DATA.fg,T.bg=n.DEFAULT_ATTR_DATA.bg,T.extended=T.extended.clone(),T.extended.underlineStyle=0,T.extended.underlineColor&=-67108864,T.updateExtended()}charAttributes(T){if(T.length===1&&T.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=T.length;let R;const x=this._curAttrData;for(let q=0;q<B;q++)R=T.params[q],R>=30&&R<=37?(x.fg&=-50331904,x.fg|=16777216|R-30):R>=40&&R<=47?(x.bg&=-50331904,x.bg|=16777216|R-40):R>=90&&R<=97?(x.fg&=-50331904,x.fg|=16777224|R-90):R>=100&&R<=107?(x.bg&=-50331904,x.bg|=16777224|R-100):R===0?this._processSGR0(x):R===1?x.fg|=134217728:R===3?x.bg|=67108864:R===4?(x.fg|=268435456,this._processUnderline(T.hasSubParams(q)?T.getSubParams(q)[0]:1,x)):R===5?x.fg|=536870912:R===7?x.fg|=67108864:R===8?x.fg|=1073741824:R===9?x.fg|=2147483648:R===2?x.bg|=134217728:R===21?this._processUnderline(2,x):R===22?(x.fg&=-134217729,x.bg&=-134217729):R===23?x.bg&=-67108865:R===24?(x.fg&=-268435457,this._processUnderline(0,x)):R===25?x.fg&=-536870913:R===27?x.fg&=-67108865:R===28?x.fg&=-1073741825:R===29?x.fg&=2147483647:R===39?(x.fg&=-67108864,x.fg|=16777215&n.DEFAULT_ATTR_DATA.fg):R===49?(x.bg&=-67108864,x.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):R===38||R===48||R===58?q+=this._extractColor(T,q,x):R===53?x.bg|=1073741824:R===55?x.bg&=-1073741825:R===59?(x.extended=x.extended.clone(),x.extended.underlineColor=-1,x.updateExtended()):R===100?(x.fg&=-67108864,x.fg|=16777215&n.DEFAULT_ATTR_DATA.fg,x.bg&=-67108864,x.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",R);return!0}deviceStatus(T){switch(T.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${B};${R}R`)}return!0}deviceStatusPrivate(T){if(T.params[0]===6){const B=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${B};${R}R`)}return!0}softReset(T){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=n.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(T){const B=T.params[0]||1;switch(B){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const R=B%2==1;return this._optionsService.options.cursorBlink=R,!0}setScrollRegion(T){const B=T.params[0]||1;let R;return(T.length<2||(R=T.params[1])>this._bufferService.rows||R===0)&&(R=this._bufferService.rows),R>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=R-1,this._setCursor(0,0)),!0}windowOptions(T){if(!F(T.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=T.length>1?T.params[1]:0;switch(T.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(j.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(j.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(T){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(T){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(T){return this._windowTitle=T,this._onTitleChange.fire(T),!0}setIconName(T){return this._iconName=T,!0}setOrReportIndexedColor(T){const B=[],R=T.split(";");for(;R.length>1;){const x=R.shift(),q=R.shift();if(/^\d+$/.exec(x)){const Z=parseInt(x);if(I(Z))if(q==="?")B.push({type:0,index:Z});else{const re=(0,_.parseColor)(q);re&&B.push({type:1,index:Z,color:re})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(T){const B=T.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(T,B){this._getCurrentLinkId()&&this._finishHyperlink();const R=T.split(":");let x;const q=R.findIndex((Z=>Z.startsWith("id=")));return q!==-1&&(x=R[q].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:x,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(T,B){const R=T.split(";");for(let x=0;x<R.length&&!(B>=this._specialColors.length);++x,++B)if(R[x]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const q=(0,_.parseColor)(R[x]);q&&this._onColor.fire([{type:1,index:this._specialColors[B],color:q}])}return!0}setOrReportFgColor(T){return this._setOrReportSpecialColor(T,0)}setOrReportBgColor(T){return this._setOrReportSpecialColor(T,1)}setOrReportCursorColor(T){return this._setOrReportSpecialColor(T,2)}restoreIndexedColor(T){if(!T)return this._onColor.fire([{type:2}]),!0;const B=[],R=T.split(";");for(let x=0;x<R.length;++x)if(/^\d+$/.exec(R[x])){const q=parseInt(R[x]);I(q)&&B.push({type:2,index:q})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(T){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(T){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(T){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(T){return T.length!==2?(this.selectDefaultCharset(),!0):(T[0]==="/"||this._charsetService.setgCharset(E[T[0]],g.CHARSETS[T[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 T=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,T,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=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(T){return this._charsetService.setgLevel(T),!0}screenAlignmentPattern(){const T=new l.CellData;T.content=4194373,T.fg=this._curAttrData.fg,T.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const R=this._activeBuffer.ybase+this._activeBuffer.y+B,x=this._activeBuffer.lines.get(R);x&&(x.fill(T),x.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(T,B){const R=this._bufferService.buffer,x=this._optionsService.rawOptions;return(q=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${q}${f.C0.ESC}\\`),!0))(T==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:T==='"p'?'P1$r61;1"p':T==="r"?`P1$r${R.scrollTop+1};${R.scrollBottom+1}r`:T==="m"?"P1$r0m":T===" q"?`P1$r${{block:2,underline:4,bar:6}[x.cursorStyle]-(x.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(T,B){this._dirtyRowTracker.markRangeDirty(T,B)}}u.InputHandler=ee;let se=class{constructor(X){this._bufferService=X,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(X){X<this.start?this.start=X:X>this.end&&(this.end=X)}markRangeDirty(X,T){X>T&&(P=X,X=T,T=P),X<this.start&&(this.start=X),T>this.end&&(this.end=T)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function I(X){return 0<=X&&X<256}se=d([b(0,m.IBufferService)],se)},844:(H,u)=>{function h(d){for(const b of d)b.dispose();d.length=0}Object.defineProperty(u,"__esModule",{value:!0}),u.getDisposeArrayDisposable=u.disposeArray=u.toDisposable=u.MutableDisposable=u.Disposable=void 0,u.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const b=this._disposables.indexOf(d);b!==-1&&this._disposables.splice(b,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var b;this._isDisposed||d===this._value||((b=this._value)===null||b===void 0||b.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)===null||d===void 0||d.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=h,u.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},1505:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(b,f,g){this._data[b]||(this._data[b]={}),this._data[b][f]=g}get(b,f){return this._data[b]?this._data[b][f]:void 0}clear(){this._data={}}}u.TwoKeyMap=h,u.FourKeyMap=class{constructor(){this._data=new h}set(d,b,f,g,C){this._data.get(d,b)||this._data.set(d,b,new h),this._data.get(d,b).set(f,g,C)}get(d,b,f,g){var C;return(C=this._data.get(d,b))===null||C===void 0?void 0:C.get(f,g)}clear(){this._data.clear()}}},6114:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isChromeOS=u.isLinux=u.isWindows=u.isIphone=u.isIpad=u.isMac=u.getSafariVersion=u.isSafari=u.isLegacyEdge=u.isFirefox=u.isNode=void 0,u.isNode=typeof navigator>"u";const h=u.isNode?"node":navigator.userAgent,d=u.isNode?"node":navigator.platform;u.isFirefox=h.includes("Firefox"),u.isLegacyEdge=h.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(h),u.getSafariVersion=function(){if(!u.isSafari)return 0;const b=h.match(/Version\/(\d+)/);return b===null||b.length<2?0:parseInt(b[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),u.isIpad=d==="iPad",u.isIphone=d==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),u.isLinux=d.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(h)},6106:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let h=0;u.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(h=this._search(this._getKey(d)),this._array.splice(h,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const b=this._getKey(d);if(b===void 0||(h=this._search(b),h===-1)||this._getKey(this._array[h])!==b)return!1;do if(this._array[h]===d)return this._array.splice(h,1),!0;while(++h<this._array.length&&this._getKey(this._array[h])===b);return!1}*getKeyIterator(d){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do yield this._array[h];while(++h<this._array.length&&this._getKey(this._array[h])===d)}forEachByKey(d,b){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do b(this._array[h]);while(++h<this._array.length&&this._getKey(this._array[h])===d)}values(){return[...this._array].values()}_search(d){let b=0,f=this._array.length-1;for(;f>=b;){let g=b+f>>1;const C=this._getKey(this._array[g]);if(C>d)f=g-1;else{if(!(C<d)){for(;g>0&&this._getKey(this._array[g-1])===d;)g--;return g}b=g+1}}return b}}},7226:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=h(6114);class b{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),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(C){this._idleCallback=void 0;let A=0,y=0,n=C.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(A=Date.now(),this._tasks[this._i]()||this._i++,A=Math.max(1,Date.now()-A),y=Math.max(A,y),c=C.timeRemaining(),1.5*y>c)return n-A<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-A))}ms`),void this._start();n=c}this.clear()}}class f extends b{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const A=Date.now()+C;return{timeRemaining:()=>Math.max(0,A-Date.now())}}}u.PriorityTaskQueue=f,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends b{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:f,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=h(643);u.updateWindowsModeWrappedState=function(b){const f=b.buffer.lines.get(b.buffer.ybase+b.buffer.y-1),g=f?.get(b.cols-1),C=b.buffer.lines.get(b.buffer.ybase+b.buffer.y);C&&g&&(C.isWrapped=g[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&g[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new h;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}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}}u.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}constructor(f=0,g=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=g}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=h(6349),b=h(7226),f=h(3734),g=h(8437),C=h(4634),A=h(511),y=h(643),n=h(4863),c=h(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(o,l,v){this._hasScrollback=o,this._optionsService=l,this._bufferService=v,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=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=A.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),this._whitespaceCell=A.CellData.fromCharData([0,y.WHITESPACE_CELL_CHAR,y.WHITESPACE_CELL_WIDTH,y.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new b.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,l){return new g.BufferLine(this._bufferService.cols,this.getNullCell(o),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const l=o+this._optionsService.rawOptions.scrollback;return l>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:l}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=g.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,l){const v=this.getNullCell(g.DEFAULT_ATTR_DATA);let m=0;const w=this._getCorrectBufferLength(l);if(w>this.lines.maxLength&&(this.lines.maxLength=w),this.lines.length>0){if(this._cols<o)for(let _=0;_<this.lines.length;_++)m+=+this.lines.get(_).resize(o,v);let D=0;if(this._rows<l)for(let _=this._rows;_<l;_++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(o,v)):this.ybase>0&&this.lines.length<=this.ybase+this.y+D+1?(this.ybase--,D++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(o,v)));else for(let _=this._rows;_>l;_--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(w<this.lines.maxLength){const _=this.lines.length-w;_>0&&(this.lines.trimStart(_),this.ybase=Math.max(this.ybase-_,0),this.ydisp=Math.max(this.ydisp-_,0),this.savedY=Math.max(this.savedY-_,0)),this.lines.maxLength=w}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,l-1),D&&(this.y+=D),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(o,l),this._cols>o))for(let D=0;D<this.lines.length;D++)m+=+this.lines.get(D).resize(o,v);this._cols=o,this._rows=l,this._memoryCleanupQueue.clear(),m>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,l){this._cols!==o&&(o>this._cols?this._reflowLarger(o,l):this._reflowSmaller(o,l))}_reflowLarger(o,l){const v=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(v.length>0){const m=(0,C.reflowLargerCreateNewLayout)(this.lines,v);(0,C.reflowLargerApplyNewLayout)(this.lines,m.layout),this._reflowLargerAdjustViewport(o,l,m.countRemoved)}}_reflowLargerAdjustViewport(o,l,v){const m=this.getNullCell(g.DEFAULT_ATTR_DATA);let w=v;for(;w-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new g.BufferLine(o,m))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-v,0)}_reflowSmaller(o,l){const v=this.getNullCell(g.DEFAULT_ATTR_DATA),m=[];let w=0;for(let D=this.lines.length-1;D>=0;D--){let _=this.lines.get(D);if(!_||!_.isWrapped&&_.getTrimmedLength()<=o)continue;const E=[_];for(;_.isWrapped&&D>0;)_=this.lines.get(--D),E.unshift(_);const U=this.ybase+this.y;if(U>=D&&U<D+E.length)continue;const F=E[E.length-1].getTrimmedLength(),j=(0,C.reflowSmallerGetNewLineLengths)(E,this._cols,o),P=j.length-E.length;let ee;ee=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+P):Math.max(0,this.lines.length-this.lines.maxLength+P);const se=[];for(let x=0;x<P;x++){const q=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);se.push(q)}se.length>0&&(m.push({start:D+E.length+w,newLines:se}),w+=se.length),E.push(...se);let I=j.length-1,X=j[I];X===0&&(I--,X=j[I]);let T=E.length-P-1,B=F;for(;T>=0;){const x=Math.min(B,X);if(E[I]===void 0)break;if(E[I].copyCellsFrom(E[T],B-x,X-x,x,!0),X-=x,X===0&&(I--,X=j[I]),B-=x,B===0){T--;const q=Math.max(T,0);B=(0,C.getWrappedLineTrimmedLength)(E,q,this._cols)}}for(let x=0;x<E.length;x++)j[x]<o&&E[x].setCell(j[x],v);let R=P-ee;for(;R-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+w)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+P,this.ybase+l-1)}if(m.length>0){const D=[],_=[];for(let I=0;I<this.lines.length;I++)_.push(this.lines.get(I));const E=this.lines.length;let U=E-1,F=0,j=m[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+w);let P=0;for(let I=Math.min(this.lines.maxLength-1,E+w-1);I>=0;I--)if(j&&j.start>U+P){for(let X=j.newLines.length-1;X>=0;X--)this.lines.set(I--,j.newLines[X]);I++,D.push({index:U+1,amount:j.newLines.length}),P+=j.newLines.length,j=m[++F]}else this.lines.set(I,_[U--]);let ee=0;for(let I=D.length-1;I>=0;I--)D[I].index+=ee,this.lines.onInsertEmitter.fire(D[I]),ee+=D[I].amount;const se=Math.max(0,E+w-this.lines.maxLength);se>0&&this.lines.onTrimEmitter.fire(se)}}translateBufferLineToString(o,l,v=0,m){const w=this.lines.get(o);return w?w.translateToString(l,v,m):""}getWrappedRangeForLine(o){let l=o,v=o;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;v+1<this.lines.length&&this.lines.get(v+1).isWrapped;)v++;return{first:l,last:v}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===o&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const l=new n.Marker(o);return this.markers.push(l),l.register(this.lines.onTrim((v=>{l.line-=v,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((v=>{l.line>=v.index&&(l.line+=v.amount)}))),l.register(this.lines.onDelete((v=>{l.line>=v.index&&l.line<v.index+v.amount&&l.dispose(),l.line>v.index&&(l.line-=v.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=h(3734),b=h(511),f=h(643),g=h(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let C=0;class A{constructor(n,c,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*n);const l=c||b.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let v=0;v<n;++v)this.setCell(v,l);this.length=n}get(n){const c=this._data[3*n+0],o=2097151&c;return[this._data[3*n+1],2097152&c?this._combined[n]:o?(0,g.stringFromCodePoint)(o):"",c>>22,2097152&c?this._combined[n].charCodeAt(this._combined[n].length-1):o]}set(n,c){this._data[3*n+1]=c[f.CHAR_DATA_ATTR_INDEX],c[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[n]=c[1],this._data[3*n+0]=2097152|n|c[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*n+0]=c[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(n){return this._data[3*n+0]>>22}hasWidth(n){return 12582912&this._data[3*n+0]}getFg(n){return this._data[3*n+1]}getBg(n){return this._data[3*n+2]}hasContent(n){return 4194303&this._data[3*n+0]}getCodePoint(n){const c=this._data[3*n+0];return 2097152&c?this._combined[n].charCodeAt(this._combined[n].length-1):2097151&c}isCombined(n){return 2097152&this._data[3*n+0]}getString(n){const c=this._data[3*n+0];return 2097152&c?this._combined[n]:2097151&c?(0,g.stringFromCodePoint)(2097151&c):""}isProtected(n){return 536870912&this._data[3*n+2]}loadCell(n,c){return C=3*n,c.content=this._data[C+0],c.fg=this._data[C+1],c.bg=this._data[C+2],2097152&c.content&&(c.combinedData=this._combined[n]),268435456&c.bg&&(c.extended=this._extendedAttrs[n]),c}setCell(n,c){2097152&c.content&&(this._combined[n]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[n]=c.extended),this._data[3*n+0]=c.content,this._data[3*n+1]=c.fg,this._data[3*n+2]=c.bg}setCellFromCodePoint(n,c,o,l,v,m){268435456&v&&(this._extendedAttrs[n]=m),this._data[3*n+0]=c|o<<22,this._data[3*n+1]=l,this._data[3*n+2]=v}addCodepointToCell(n,c){let o=this._data[3*n+0];2097152&o?this._combined[n]+=(0,g.stringFromCodePoint)(c):(2097151&o?(this._combined[n]=(0,g.stringFromCodePoint)(2097151&o)+(0,g.stringFromCodePoint)(c),o&=-2097152,o|=2097152):o=c|4194304,this._data[3*n+0]=o)}insertCells(n,c,o,l){if((n%=this.length)&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,l?.fg||0,l?.bg||0,l?.extended||new d.ExtendedAttrs),c<this.length-n){const v=new b.CellData;for(let m=this.length-n-c-1;m>=0;--m)this.setCell(n+c+m,this.loadCell(n+m,v));for(let m=0;m<c;++m)this.setCell(n+m,o)}else for(let v=n;v<this.length;++v)this.setCell(v,o);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,l?.fg||0,l?.bg||0,l?.extended||new d.ExtendedAttrs)}deleteCells(n,c,o,l){if(n%=this.length,c<this.length-n){const v=new b.CellData;for(let m=0;m<this.length-n-c;++m)this.setCell(n+m,this.loadCell(n+c+m,v));for(let m=this.length-c;m<this.length;++m)this.setCell(m,o)}else for(let v=n;v<this.length;++v)this.setCell(v,o);n&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,l?.fg||0,l?.bg||0,l?.extended||new d.ExtendedAttrs),this.getWidth(n)!==0||this.hasContent(n)||this.setCellFromCodePoint(n,0,1,l?.fg||0,l?.bg||0,l?.extended||new d.ExtendedAttrs)}replaceCells(n,c,o,l,v=!1){if(v)for(n&&this.getWidth(n-1)===2&&!this.isProtected(n-1)&&this.setCellFromCodePoint(n-1,0,1,l?.fg||0,l?.bg||0,l?.extended||new d.ExtendedAttrs),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodePoint(c,0,1,l?.fg||0,l?.bg||0,l?.extended||new d.ExtendedAttrs);n<c&&n<this.length;)this.isProtected(n)||this.setCell(n,o),n++;else for(n&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n-1,0,1,l?.fg||0,l?.bg||0,l?.extended||new d.ExtendedAttrs),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodePoint(c,0,1,l?.fg||0,l?.bg||0,l?.extended||new d.ExtendedAttrs);n<c&&n<this.length;)this.setCell(n++,o)}resize(n,c){if(n===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*n;if(n>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const l=new Uint32Array(o);l.set(this._data),this._data=l}for(let l=this.length;l<n;++l)this.setCell(l,c)}else{this._data=this._data.subarray(0,o);const l=Object.keys(this._combined);for(let m=0;m<l.length;m++){const w=parseInt(l[m],10);w>=n&&delete this._combined[w]}const v=Object.keys(this._extendedAttrs);for(let m=0;m<v.length;m++){const w=parseInt(v[m],10);w>=n&&delete this._extendedAttrs[w]}}return this.length=n,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const n=new Uint32Array(this._data.length);return n.set(this._data),this._data=n,1}return 0}fill(n,c=!1){if(c)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,n);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,n)}}copyFrom(n){this.length!==n.length?this._data=new Uint32Array(n._data):this._data.set(n._data),this.length=n.length,this._combined={};for(const c in n._combined)this._combined[c]=n._combined[c];this._extendedAttrs={};for(const c in n._extendedAttrs)this._extendedAttrs[c]=n._extendedAttrs[c];this.isWrapped=n.isWrapped}clone(){const n=new A(0);n._data=new Uint32Array(this._data),n.length=this.length;for(const c in this._combined)n._combined[c]=this._combined[c];for(const c in this._extendedAttrs)n._extendedAttrs[c]=this._extendedAttrs[c];return n.isWrapped=this.isWrapped,n}getTrimmedLength(){for(let n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0])return n+(this._data[3*n+0]>>22);return 0}getNoBgTrimmedLength(){for(let n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0]||50331648&this._data[3*n+2])return n+(this._data[3*n+0]>>22);return 0}copyCellsFrom(n,c,o,l,v){const m=n._data;if(v)for(let D=l-1;D>=0;D--){for(let _=0;_<3;_++)this._data[3*(o+D)+_]=m[3*(c+D)+_];268435456&m[3*(c+D)+2]&&(this._extendedAttrs[o+D]=n._extendedAttrs[c+D])}else for(let D=0;D<l;D++){for(let _=0;_<3;_++)this._data[3*(o+D)+_]=m[3*(c+D)+_];268435456&m[3*(c+D)+2]&&(this._extendedAttrs[o+D]=n._extendedAttrs[c+D])}const w=Object.keys(n._combined);for(let D=0;D<w.length;D++){const _=parseInt(w[D],10);_>=c&&(this._combined[_-c+o]=n._combined[_])}}translateToString(n=!1,c=0,o=this.length){n&&(o=Math.min(o,this.getTrimmedLength()));let l="";for(;c<o;){const v=this._data[3*c+0],m=2097151&v;l+=2097152&v?this._combined[c]:m?(0,g.stringFromCodePoint)(m):f.WHITESPACE_CELL_CHAR,c+=v>>22||1}return l}}u.BufferLine=A},4841:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(h,d){if(h.start.y>h.end.y)throw new Error(`Buffer range end (${h.end.x}, ${h.end.y}) cannot be before start (${h.start.x}, ${h.start.y})`);return d*(h.end.y-h.start.y)+(h.end.x-h.start.x+1)}},4634:(H,u)=>{function h(d,b,f){if(b===d.length-1)return d[b].getTrimmedLength();const g=!d[b].hasContent(f-1)&&d[b].getWidth(f-1)===1,C=d[b+1].getWidth(0)===2;return g&&C?f-1:f}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(d,b,f,g,C){const A=[];for(let y=0;y<d.length-1;y++){let n=y,c=d.get(++n);if(!c.isWrapped)continue;const o=[d.get(y)];for(;n<d.length&&c.isWrapped;)o.push(c),c=d.get(++n);if(g>=y&&g<n){y+=o.length-1;continue}let l=0,v=h(o,l,b),m=1,w=0;for(;m<o.length;){const _=h(o,m,b),E=_-w,U=f-v,F=Math.min(E,U);o[l].copyCellsFrom(o[m],w,v,F,!1),v+=F,v===f&&(l++,v=0),w+=F,w===_&&(m++,w=0),v===0&&l!==0&&o[l-1].getWidth(f-1)===2&&(o[l].copyCellsFrom(o[l-1],f-1,v++,1,!1),o[l-1].setCell(f-1,C))}o[l].replaceCells(v,f,C);let D=0;for(let _=o.length-1;_>0&&(_>l||o[_].getTrimmedLength()===0);_--)D++;D>0&&(A.push(y+o.length-D),A.push(D)),y+=o.length-1}return A},u.reflowLargerCreateNewLayout=function(d,b){const f=[];let g=0,C=b[g],A=0;for(let y=0;y<d.length;y++)if(C===y){const n=b[++g];d.onDeleteEmitter.fire({index:y-A,amount:n}),y+=n-1,A+=n,C=b[++g]}else f.push(y);return{layout:f,countRemoved:A}},u.reflowLargerApplyNewLayout=function(d,b){const f=[];for(let g=0;g<b.length;g++)f.push(d.get(b[g]));for(let g=0;g<f.length;g++)d.set(g,f[g]);d.length=b.length},u.reflowSmallerGetNewLineLengths=function(d,b,f){const g=[],C=d.map(((c,o)=>h(d,o,b))).reduce(((c,o)=>c+o));let A=0,y=0,n=0;for(;n<C;){if(C-n<f){g.push(C-n);break}A+=f;const c=h(d,y,b);A>c&&(A-=c,y++);const o=d[y].getWidth(A-1)===2;o&&A--;const l=o?f-1:f;g.push(l),n+=l}return g},u.getWrappedLineTrimmedLength=h},5295:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=h(8460),b=h(844),f=h(9092);class g extends b.Disposable{constructor(A,y){super(),this._optionsService=A,this._bufferService=y,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.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(A){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(A),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(A,y){this._normal.resize(A,y),this._alt.resize(A,y),this.setupTabStops(A)}setupTabStops(A){this._normal.setupTabStops(A),this._alt.setupTabStops(A)}}u.BufferSet=g},511:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=h(482),b=h(643),f=h(3734);class g extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(A){const y=new g;return y.setFromCharData(A),y}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(A){this.fg=A[b.CHAR_DATA_ATTR_INDEX],this.bg=0;let y=!1;if(A[b.CHAR_DATA_CHAR_INDEX].length>2)y=!0;else if(A[b.CHAR_DATA_CHAR_INDEX].length===2){const n=A[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){const c=A[b.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(n-55296)+c-56320+65536|A[b.CHAR_DATA_WIDTH_INDEX]<<22:y=!0}else y=!0}else this.content=A[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|A[b.CHAR_DATA_WIDTH_INDEX]<<22;y&&(this.combinedData=A[b.CHAR_DATA_CHAR_INDEX],this.content=2097152|A[b.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=g},643:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WHITESPACE_CELL_CODE=u.WHITESPACE_CELL_WIDTH=u.WHITESPACE_CELL_CHAR=u.NULL_CELL_CODE=u.NULL_CELL_WIDTH=u.NULL_CELL_CHAR=u.CHAR_DATA_CODE_INDEX=u.CHAR_DATA_WIDTH_INDEX=u.CHAR_DATA_CHAR_INDEX=u.CHAR_DATA_ATTR_INDEX=u.DEFAULT_EXT=u.DEFAULT_ATTR=u.DEFAULT_COLOR=void 0,u.DEFAULT_COLOR=0,u.DEFAULT_ATTR=256|u.DEFAULT_COLOR<<9,u.DEFAULT_EXT=0,u.CHAR_DATA_ATTR_INDEX=0,u.CHAR_DATA_CHAR_INDEX=1,u.CHAR_DATA_WIDTH_INDEX=2,u.CHAR_DATA_CODE_INDEX=3,u.NULL_CELL_CHAR="",u.NULL_CELL_WIDTH=1,u.NULL_CELL_CODE=0,u.WHITESPACE_CELL_CHAR=" ",u.WHITESPACE_CELL_WIDTH=1,u.WHITESPACE_CELL_CODE=32},4863:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=h(8460),b=h(844);class f{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,b.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}u.Marker=f,f._nextId=1},7116:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_CHARSET=u.CHARSETS=void 0,u.CHARSETS={},u.DEFAULT_CHARSET=u.CHARSETS.B,u.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},u.CHARSETS.A={"#":"£"},u.CHARSETS.B=void 0,u.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},u.CHARSETS.C=u.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},u.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},u.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},u.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},u.CHARSETS.E=u.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},u.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},u.CHARSETS.H=u.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(H,u)=>{var h,d,b;Object.defineProperty(u,"__esModule",{value:!0}),u.C1_ESCAPED=u.C1=u.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
192
- `,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(h||(u.C0=h={})),(function(f){f.PAD="€",f.HOP="",f.BPH="‚",f.NBH="ƒ",f.IND="„",f.NEL="…",f.SSA="†",f.ESA="‡",f.HTS="ˆ",f.HTJ="‰",f.VTS="Š",f.PLD="‹",f.PLU="Œ",f.RI="",f.SS2="Ž",f.SS3="",f.DCS="",f.PU1="‘",f.PU2="’",f.STS="“",f.CCH="”",f.MW="•",f.SPA="–",f.EPA="—",f.SOS="˜",f.SGCI="™",f.SCI="š",f.CSI="›",f.ST="œ",f.OSC="",f.PM="ž",f.APC="Ÿ"})(d||(u.C1=d={})),(function(f){f.ST=`${h.ESC}\\`})(b||(u.C1_ESCAPED=b={}))},7399:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=h(2584),b={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};u.evaluateKeyboardEvent=function(f,g,C,A){const y={type:0,cancel:!1,key:void 0},n=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?y.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?y.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?y.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(y.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:if(f.altKey){y.key=d.C0.ESC+d.C0.DEL;break}y.key=d.C0.DEL;break;case 9:if(f.shiftKey){y.key=d.C0.ESC+"[Z";break}y.key=d.C0.HT,y.cancel=!0;break;case 13:y.key=f.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,y.cancel=!0;break;case 27:y.key=d.C0.ESC,f.altKey&&(y.key=d.C0.ESC+d.C0.ESC),y.cancel=!0;break;case 37:if(f.metaKey)break;n?(y.key=d.C0.ESC+"[1;"+(n+1)+"D",y.key===d.C0.ESC+"[1;3D"&&(y.key=d.C0.ESC+(C?"b":"[1;5D"))):y.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(f.metaKey)break;n?(y.key=d.C0.ESC+"[1;"+(n+1)+"C",y.key===d.C0.ESC+"[1;3C"&&(y.key=d.C0.ESC+(C?"f":"[1;5C"))):y.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(f.metaKey)break;n?(y.key=d.C0.ESC+"[1;"+(n+1)+"A",C||y.key!==d.C0.ESC+"[1;3A"||(y.key=d.C0.ESC+"[1;5A")):y.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(f.metaKey)break;n?(y.key=d.C0.ESC+"[1;"+(n+1)+"B",C||y.key!==d.C0.ESC+"[1;3B"||(y.key=d.C0.ESC+"[1;5B")):y.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(y.key=d.C0.ESC+"[2~");break;case 46:y.key=n?d.C0.ESC+"[3;"+(n+1)+"~":d.C0.ESC+"[3~";break;case 36:y.key=n?d.C0.ESC+"[1;"+(n+1)+"H":g?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:y.key=n?d.C0.ESC+"[1;"+(n+1)+"F":g?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:f.shiftKey?y.type=2:f.ctrlKey?y.key=d.C0.ESC+"[5;"+(n+1)+"~":y.key=d.C0.ESC+"[5~";break;case 34:f.shiftKey?y.type=3:f.ctrlKey?y.key=d.C0.ESC+"[6;"+(n+1)+"~":y.key=d.C0.ESC+"[6~";break;case 112:y.key=n?d.C0.ESC+"[1;"+(n+1)+"P":d.C0.ESC+"OP";break;case 113:y.key=n?d.C0.ESC+"[1;"+(n+1)+"Q":d.C0.ESC+"OQ";break;case 114:y.key=n?d.C0.ESC+"[1;"+(n+1)+"R":d.C0.ESC+"OR";break;case 115:y.key=n?d.C0.ESC+"[1;"+(n+1)+"S":d.C0.ESC+"OS";break;case 116:y.key=n?d.C0.ESC+"[15;"+(n+1)+"~":d.C0.ESC+"[15~";break;case 117:y.key=n?d.C0.ESC+"[17;"+(n+1)+"~":d.C0.ESC+"[17~";break;case 118:y.key=n?d.C0.ESC+"[18;"+(n+1)+"~":d.C0.ESC+"[18~";break;case 119:y.key=n?d.C0.ESC+"[19;"+(n+1)+"~":d.C0.ESC+"[19~";break;case 120:y.key=n?d.C0.ESC+"[20;"+(n+1)+"~":d.C0.ESC+"[20~";break;case 121:y.key=n?d.C0.ESC+"[21;"+(n+1)+"~":d.C0.ESC+"[21~";break;case 122:y.key=n?d.C0.ESC+"[23;"+(n+1)+"~":d.C0.ESC+"[23~";break;case 123:y.key=n?d.C0.ESC+"[24;"+(n+1)+"~":d.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(C&&!A||!f.altKey||f.metaKey)!C||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?y.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(y.key=d.C0.US),f.key==="@"&&(y.key=d.C0.NUL)):f.keyCode===65&&(y.type=1);else{const c=b[f.keyCode],o=c?.[f.shiftKey?1:0];if(o)y.key=d.C0.ESC+o;else if(f.keyCode>=65&&f.keyCode<=90){const l=f.ctrlKey?f.keyCode-64:f.keyCode+32;let v=String.fromCharCode(l);f.shiftKey&&(v=v.toUpperCase()),y.key=d.C0.ESC+v}else if(f.keyCode===32)y.key=d.C0.ESC+(f.ctrlKey?d.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let l=f.code.slice(3,4);f.shiftKey||(l=l.toLowerCase()),y.key=d.C0.ESC+l,y.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?y.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?y.key=d.C0.NUL:f.keyCode>=51&&f.keyCode<=55?y.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?y.key=d.C0.DEL:f.keyCode===219?y.key=d.C0.ESC:f.keyCode===220?y.key=d.C0.FS:f.keyCode===221&&(y.key=d.C0.GS)}return y}},482:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},u.utf32ToString=function(h,d=0,b=h.length){let f="";for(let g=d;g<b;++g){let C=h[g];C>65535?(C-=65536,f+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):f+=String.fromCharCode(C)}return f},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const b=h.length;if(!b)return 0;let f=0,g=0;if(this._interim){const C=h.charCodeAt(g++);56320<=C&&C<=57343?d[f++]=1024*(this._interim-55296)+C-56320+65536:(d[f++]=this._interim,d[f++]=C),this._interim=0}for(let C=g;C<b;++C){const A=h.charCodeAt(C);if(55296<=A&&A<=56319){if(++C>=b)return this._interim=A,f;const y=h.charCodeAt(C);56320<=y&&y<=57343?d[f++]=1024*(A-55296)+y-56320+65536:(d[f++]=A,d[f++]=y)}else A!==65279&&(d[f++]=A)}return f}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const b=h.length;if(!b)return 0;let f,g,C,A,y=0,n=0,c=0;if(this.interim[0]){let v=!1,m=this.interim[0];m&=(224&m)==192?31:(240&m)==224?15:7;let w,D=0;for(;(w=63&this.interim[++D])&&D<4;)m<<=6,m|=w;const _=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=_-D;for(;c<E;){if(c>=b)return 0;if(w=h[c++],(192&w)!=128){c--,v=!0;break}this.interim[D++]=w,m<<=6,m|=63&w}v||(_===2?m<128?c--:d[y++]=m:_===3?m<2048||m>=55296&&m<=57343||m===65279||(d[y++]=m):m<65536||m>1114111||(d[y++]=m)),this.interim.fill(0)}const o=b-4;let l=c;for(;l<b;){for(;!(!(l<o)||128&(f=h[l])||128&(g=h[l+1])||128&(C=h[l+2])||128&(A=h[l+3]));)d[y++]=f,d[y++]=g,d[y++]=C,d[y++]=A,l+=4;if(f=h[l++],f<128)d[y++]=f;else if((224&f)==192){if(l>=b)return this.interim[0]=f,y;if(g=h[l++],(192&g)!=128){l--;continue}if(n=(31&f)<<6|63&g,n<128){l--;continue}d[y++]=n}else if((240&f)==224){if(l>=b)return this.interim[0]=f,y;if(g=h[l++],(192&g)!=128){l--;continue}if(l>=b)return this.interim[0]=f,this.interim[1]=g,y;if(C=h[l++],(192&C)!=128){l--;continue}if(n=(15&f)<<12|(63&g)<<6|63&C,n<2048||n>=55296&&n<=57343||n===65279)continue;d[y++]=n}else if((248&f)==240){if(l>=b)return this.interim[0]=f,y;if(g=h[l++],(192&g)!=128){l--;continue}if(l>=b)return this.interim[0]=f,this.interim[1]=g,y;if(C=h[l++],(192&C)!=128){l--;continue}if(l>=b)return this.interim[0]=f,this.interim[1]=g,this.interim[2]=C,y;if(A=h[l++],(192&A)!=128){l--;continue}if(n=(7&f)<<18|(63&g)<<12|(63&C)<<6|63&A,n<65536||n>1114111)continue;d[y++]=n}}return y}}},225:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],d=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let b;u.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let f=0;f<h.length;++f)b.fill(0,h[f][0],h[f][1]+1)}}wcwidth(f){return f<32?0:f<127?1:f<65536?b[f]:(function(g,C){let A,y=0,n=C.length-1;if(g<C[0][0]||g>C[n][1])return!1;for(;n>=y;)if(A=y+n>>1,g>C[A][1])y=A+1;else{if(!(g<C[A][0]))return!0;n=A-1}return!1})(f,d)?0:f>=131072&&f<=196605||f>=196608&&f<=262141?2:1}}},5981:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=h(8460),b=h(844);class f extends b.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,A){if(A!==void 0&&this._syncCalls>A)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let y;for(this._isSyncWriting=!0;y=this._writeBuffer.shift();){this._action(y);const n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,A){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+=C.length,this._writeBuffer.push(C),this._callbacks.push(A),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(A)}_innerWrite(C=0,A=!0){const y=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const n=this._writeBuffer[this._bufferOffset],c=this._action(n,A);if(c){const l=v=>Date.now()-y>=12?setTimeout((()=>this._innerWrite(0,v))):this._innerWrite(y,v);return void c.catch((v=>(queueMicrotask((()=>{throw v})),Promise.resolve(!1)))).then(l)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=n.length,Date.now()-y>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}u.WriteBuffer=f},5941:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const h=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function b(f,g){const C=f.toString(16),A=C.length<2?"0"+C:C;switch(g){case 4:return C[0];case 8:return A;case 12:return(A+A).slice(0,3);default:return A+A}}u.parseColor=function(f){if(!f)return;let g=f.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const C=h.exec(g);if(C){const A=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/A*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/A*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/A*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),d.exec(g)&&[3,6,9,12].includes(g.length))){const C=g.length/3,A=[0,0,0];for(let y=0;y<3;++y){const n=parseInt(g.slice(C*y,C*y+C),16);A[y]=C===1?n<<4:C===2?n:C===3?n>>4:n>>8}return A}},u.toRgbString=function(f,g=16){const[C,A,y]=f;return`rgb:${b(C,g)}/${b(A,g)}/${b(y,g)}`}},5770:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=h(482),b=h(8742),f=h(5770),g=[];u.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(A,y){this._handlers[A]===void 0&&(this._handlers[A]=[]);const n=this._handlers[A];return n.push(y),{dispose:()=>{const c=n.indexOf(y);c!==-1&&n.splice(c,1)}}}clearHandler(A){this._handlers[A]&&delete this._handlers[A]}setHandlerFallback(A){this._handlerFb=A}reset(){if(this._active.length)for(let A=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;A>=0;--A)this._active[A].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(A,y){if(this.reset(),this._ident=A,this._active=this._handlers[A]||g,this._active.length)for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(y);else this._handlerFb(this._ident,"HOOK",y)}put(A,y,n){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(A,y,n);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(A,y,n))}unhook(A,y=!0){if(this._active.length){let n=!1,c=this._active.length-1,o=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,n=y,o=this._stack.fallThrough,this._stack.paused=!1),!o&&n===!1){for(;c>=0&&(n=this._active[c].unhook(A),n!==!0);c--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,n;c--}for(;c>=0;c--)if(n=this._active[c].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,n}else this._handlerFb(this._ident,"UNHOOK",A);this._active=g,this._ident=0}};const C=new b.Params;C.addParam(0),u.DcsHandler=class{constructor(A){this._handler=A,this._data="",this._params=C,this._hitLimit=!1}hook(A){this._params=A.length>1||A.params[0]?A.clone():C,this._data="",this._hitLimit=!1}put(A,y,n){this._hitLimit||(this._data+=(0,d.utf32ToString)(A,y,n),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(A){let y=!1;if(this._hitLimit)y=!1;else if(A&&(y=this._handler(this._data,this._params),y instanceof Promise))return y.then((n=>(this._params=C,this._data="",this._hitLimit=!1,n)));return this._params=C,this._data="",this._hitLimit=!1,y}}},2015:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=h(844),b=h(8742),f=h(6242),g=h(6351);class C{constructor(c){this.table=new Uint8Array(c)}setDefault(c,o){this.table.fill(c<<4|o)}add(c,o,l,v){this.table[o<<8|c]=l<<4|v}addMany(c,o,l,v){for(let m=0;m<c.length;m++)this.table[o<<8|c[m]]=l<<4|v}}u.TransitionTable=C;const A=160;u.VT500_TRANSITION_TABLE=(function(){const n=new C(4095),c=Array.apply(null,Array(256)).map(((D,_)=>_)),o=(D,_)=>c.slice(D,_),l=o(32,127),v=o(0,24);v.push(25),v.push.apply(v,o(28,32));const m=o(0,14);let w;for(w in n.setDefault(1,0),n.addMany(l,0,2,0),m)n.addMany([24,26,153,154],w,3,0),n.addMany(o(128,144),w,3,0),n.addMany(o(144,152),w,3,0),n.add(156,w,0,0),n.add(27,w,11,1),n.add(157,w,4,8),n.addMany([152,158,159],w,0,7),n.add(155,w,11,3),n.add(144,w,11,9);return n.addMany(v,0,3,0),n.addMany(v,1,3,1),n.add(127,1,0,1),n.addMany(v,8,0,8),n.addMany(v,3,3,3),n.add(127,3,0,3),n.addMany(v,4,3,4),n.add(127,4,0,4),n.addMany(v,6,3,6),n.addMany(v,5,3,5),n.add(127,5,0,5),n.addMany(v,2,3,2),n.add(127,2,0,2),n.add(93,1,4,8),n.addMany(l,8,5,8),n.add(127,8,5,8),n.addMany([156,27,24,26,7],8,6,0),n.addMany(o(28,32),8,0,8),n.addMany([88,94,95],1,0,7),n.addMany(l,7,0,7),n.addMany(v,7,0,7),n.add(156,7,0,0),n.add(127,7,0,7),n.add(91,1,11,3),n.addMany(o(64,127),3,7,0),n.addMany(o(48,60),3,8,4),n.addMany([60,61,62,63],3,9,4),n.addMany(o(48,60),4,8,4),n.addMany(o(64,127),4,7,0),n.addMany([60,61,62,63],4,0,6),n.addMany(o(32,64),6,0,6),n.add(127,6,0,6),n.addMany(o(64,127),6,0,0),n.addMany(o(32,48),3,9,5),n.addMany(o(32,48),5,9,5),n.addMany(o(48,64),5,0,6),n.addMany(o(64,127),5,7,0),n.addMany(o(32,48),4,9,5),n.addMany(o(32,48),1,9,2),n.addMany(o(32,48),2,9,2),n.addMany(o(48,127),2,10,0),n.addMany(o(48,80),1,10,0),n.addMany(o(81,88),1,10,0),n.addMany([89,90,92],1,10,0),n.addMany(o(96,127),1,10,0),n.add(80,1,11,9),n.addMany(v,9,0,9),n.add(127,9,0,9),n.addMany(o(28,32),9,0,9),n.addMany(o(32,48),9,9,12),n.addMany(o(48,60),9,8,10),n.addMany([60,61,62,63],9,9,10),n.addMany(v,11,0,11),n.addMany(o(32,128),11,0,11),n.addMany(o(28,32),11,0,11),n.addMany(v,10,0,10),n.add(127,10,0,10),n.addMany(o(28,32),10,0,10),n.addMany(o(48,60),10,8,10),n.addMany([60,61,62,63],10,0,11),n.addMany(o(32,48),10,9,12),n.addMany(v,12,0,12),n.add(127,12,0,12),n.addMany(o(28,32),12,0,12),n.addMany(o(32,48),12,9,12),n.addMany(o(48,64),12,0,11),n.addMany(o(64,127),12,12,13),n.addMany(o(64,127),10,12,13),n.addMany(o(64,127),9,12,13),n.addMany(v,13,13,13),n.addMany(l,13,13,13),n.add(127,13,0,13),n.addMany([27,156,24,26],13,14,0),n.add(A,0,2,0),n.add(A,8,5,8),n.add(A,6,0,6),n.add(A,11,0,11),n.add(A,13,13,13),n})();class y extends d.Disposable{constructor(c=u.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new b.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(o,l,v)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,l)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,o=[64,126]){let l=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=c.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let m=0;m<c.intermediates.length;++m){const w=c.intermediates.charCodeAt(m);if(32>w||w>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=w}}if(c.final.length!==1)throw new Error("final must be a single byte");const v=c.final.charCodeAt(0);if(o[0]>v||v>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return l<<=8,l|=v,l}identToString(c){const o=[];for(;c;)o.push(String.fromCharCode(255&c)),c>>=8;return o.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,o){const l=this._identifier(c,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const v=this._escHandlers[l];return v.push(o),{dispose:()=>{const m=v.indexOf(o);m!==-1&&v.splice(m,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,o){this._executeHandlers[c.charCodeAt(0)]=o}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,o){const l=this._identifier(c);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const v=this._csiHandlers[l];return v.push(o),{dispose:()=>{const m=v.indexOf(o);m!==-1&&v.splice(m,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,o){return this._dcsParser.registerHandler(this._identifier(c),o)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,o){return this._oscParser.registerHandler(c,o)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(c,o,l,v,m){this._parseStack.state=c,this._parseStack.handlers=o,this._parseStack.handlerPos=l,this._parseStack.transition=v,this._parseStack.chunkPos=m}parse(c,o,l){let v,m=0,w=0,D=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,D=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const _=this._parseStack.handlers;let E=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&E>-1){for(;E>=0&&(v=_[E](this._params),v!==!0);E--)if(v instanceof Promise)return this._parseStack.handlerPos=E,v}this._parseStack.handlers=[];break;case 4:if(l===!1&&E>-1){for(;E>=0&&(v=_[E](),v!==!0);E--)if(v instanceof Promise)return this._parseStack.handlerPos=E,v}this._parseStack.handlers=[];break;case 6:if(m=c[this._parseStack.chunkPos],v=this._dcsParser.unhook(m!==24&&m!==26,l),v)return v;m===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(m=c[this._parseStack.chunkPos],v=this._oscParser.end(m!==24&&m!==26,l),v)return v;m===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,D=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let _=D;_<o;++_){switch(m=c[_],w=this._transitions.table[this.currentState<<8|(m<160?m:A)],w>>4){case 2:for(let P=_+1;;++P){if(P>=o||(m=c[P])<32||m>126&&m<A){this._printHandler(c,_,P),_=P-1;break}if(++P>=o||(m=c[P])<32||m>126&&m<A){this._printHandler(c,_,P),_=P-1;break}if(++P>=o||(m=c[P])<32||m>126&&m<A){this._printHandler(c,_,P),_=P-1;break}if(++P>=o||(m=c[P])<32||m>126&&m<A){this._printHandler(c,_,P),_=P-1;break}}break;case 3:this._executeHandlers[m]?this._executeHandlers[m]():this._executeHandlerFb(m),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:_,code:m,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const E=this._csiHandlers[this._collect<<8|m];let U=E?E.length-1:-1;for(;U>=0&&(v=E[U](this._params),v!==!0);U--)if(v instanceof Promise)return this._preserveStack(3,E,U,w,_),v;U<0&&this._csiHandlerFb(this._collect<<8|m,this._params),this.precedingCodepoint=0;break;case 8:do switch(m){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(m-48)}while(++_<o&&(m=c[_])>47&&m<60);_--;break;case 9:this._collect<<=8,this._collect|=m;break;case 10:const F=this._escHandlers[this._collect<<8|m];let j=F?F.length-1:-1;for(;j>=0&&(v=F[j](),v!==!0);j--)if(v instanceof Promise)return this._preserveStack(4,F,j,w,_),v;j<0&&this._escHandlerFb(this._collect<<8|m),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|m,this._params);break;case 13:for(let P=_+1;;++P)if(P>=o||(m=c[P])===24||m===26||m===27||m>127&&m<A){this._dcsParser.put(c,_,P),_=P-1;break}break;case 14:if(v=this._dcsParser.unhook(m!==24&&m!==26),v)return this._preserveStack(6,[],0,w,_),v;m===27&&(w|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let P=_+1;;P++)if(P>=o||(m=c[P])<32||m>127&&m<A){this._oscParser.put(c,_,P),_=P-1;break}break;case 6:if(v=this._oscParser.end(m!==24&&m!==26),v)return this._preserveStack(5,[],0,w,_),v;m===27&&(w|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&w}}}u.EscapeSequenceParser=y},6242:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=h(5770),b=h(482),f=[];u.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,C){this._handlers[g]===void 0&&(this._handlers[g]=[]);const A=this._handlers[g];return A.push(C),{dispose:()=>{const y=A.indexOf(C);y!==-1&&A.splice(y,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=f}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=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,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,C,A){if(this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].put(g,C,A);else this._handlerFb(this._id,"PUT",(0,b.utf32ToString)(g,C,A))}start(){this.reset(),this._state=1}put(g,C,A){if(this._state!==3){if(this._state===1)for(;C<A;){const y=g[C++];if(y===59){this._state=2,this._start();break}if(y<48||57<y)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+y-48}this._state===2&&A-C>0&&this._put(g,C,A)}}end(g,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let A=!1,y=this._active.length-1,n=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,A=C,n=this._stack.fallThrough,this._stack.paused=!1),!n&&A===!1){for(;y>=0&&(A=this._active[y].end(g),A!==!0);y--)if(A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!1,A;y--}for(;y>=0;y--)if(A=this._active[y].end(!1),A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!0,A}else this._handlerFb(this._id,"END",g);this._active=f,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,C,A){this._hitLimit||(this._data+=(0,b.utf32ToString)(g,C,A),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let C=!1;if(this._hitLimit)C=!1;else if(g&&(C=this._handler(this._data),C instanceof Promise))return C.then((A=>(this._data="",this._hitLimit=!1,A)));return this._data="",this._hitLimit=!1,C}}},8742:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const h=2147483647;class d{static fromArray(f){const g=new d;if(!f.length)return g;for(let C=Array.isArray(f[0])?1:0;C<f.length;++C){const A=f[C];if(Array.isArray(A))for(let y=0;y<A.length;++y)g.addSubParam(A[y]);else g.addParam(A)}return g}constructor(f=32,g=32){if(this.maxLength=f,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new d(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let g=0;g<this.length;++g){f.push(this.params[g]);const C=this._subParamsIdx[g]>>8,A=255&this._subParamsIdx[g];A-C>0&&f.push(Array.prototype.slice.call(this._subParams,C,A))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>h?h:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>h?h:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const g=this._subParamsIdx[f]>>8,C=255&this._subParamsIdx[f];return C-g>0?this._subParams.subarray(g,C):null}getSubParamsAll(){const f={};for(let g=0;g<this.length;++g){const C=this._subParamsIdx[g]>>8,A=255&this._subParamsIdx[g];A-C>0&&(f[g]=this._subParams.slice(C,A))}return f}addDigit(f){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,A=C[g-1];C[g-1]=~A?Math.min(10*A+f,h):f}}u.Params=d},5741:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()}loadAddon(h,d){const b={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(b),d.dispose=()=>this._wrappedAddonDispose(b),d.activate(h)}_wrappedAddonDispose(h){if(h.isDisposed)return;let d=-1;for(let b=0;b<this._addons.length;b++)if(this._addons[b]===h){d=b;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(d,1)}}},8771:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=h(3785),b=h(511);u.BufferApiView=class{constructor(f,g){this._buffer=f,this.type=g}init(f){return this._buffer=f,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(f){const g=this._buffer.lines.get(f);if(g)return new d.BufferLineApiView(g)}getNullCell(){return new b.CellData}}},3785:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=h(511);u.BufferLineApiView=class{constructor(b){this._line=b}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(b,f){if(!(b<0||b>=this._line.length))return f?(this._line.loadCell(b,f),f):this._line.loadCell(b,new d.CellData)}translateToString(b,f,g){return this._line.translateToString(b,f,g)}}},8285:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=h(8771),b=h(8460),f=h(844);class g extends f.Disposable{constructor(A){super(),this._core=A,this._onBufferChange=this.register(new b.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}u.BufferNamespaceApi=g},7975:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(h){this._core=h}registerCsiHandler(h,d){return this._core.registerCsiHandler(h,(b=>d(b.toArray())))}addCsiHandler(h,d){return this.registerCsiHandler(h,d)}registerDcsHandler(h,d){return this._core.registerDcsHandler(h,((b,f)=>d(b,f.toArray())))}addDcsHandler(h,d){return this.registerDcsHandler(h,d)}registerEscHandler(h,d){return this._core.registerEscHandler(h,d)}addEscHandler(h,d){return this.registerEscHandler(h,d)}registerOscHandler(h,d){return this._core.registerOscHandler(h,d)}addOscHandler(h,d){return this.registerOscHandler(h,d)}}},7090:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(h){this._core=h}register(h){this._core.unicodeService.register(h)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(h){this._core.unicodeService.activeVersion=h}}},744:function(H,u,h){var d=this&&this.__decorate||function(n,c,o,l){var v,m=arguments.length,w=m<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(n,c,o,l);else for(var D=n.length-1;D>=0;D--)(v=n[D])&&(w=(m<3?v(w):m>3?v(c,o,w):v(c,o))||w);return m>3&&w&&Object.defineProperty(c,o,w),w},b=this&&this.__param||function(n,c){return function(o,l){c(o,l,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const f=h(8460),g=h(844),C=h(5295),A=h(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let y=u.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(n){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(n.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(n.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(n,this))}resize(n,c){this.cols=n,this.rows=c,this.buffers.resize(n,c),this._onResize.fire({cols:n,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(n,c=!1){const o=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===n.fg&&l.getBg(0)===n.bg||(l=o.getBlankLine(n,c),this._cachedBlankLine=l),l.isWrapped=c;const v=o.ybase+o.scrollTop,m=o.ybase+o.scrollBottom;if(o.scrollTop===0){const w=o.lines.isFull;m===o.lines.length-1?w?o.lines.recycle().copyFrom(l):o.lines.push(l.clone()):o.lines.splice(m+1,0,l.clone()),w?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const w=m-v+1;o.lines.shiftElements(v+1,w-1,-1),o.lines.set(m,l.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(n,c,o){const l=this.buffer;if(n<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else n+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const v=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+n,l.ybase),0),v!==l.ydisp&&(c||this._onScroll.fire(l.ydisp))}};u.BufferService=y=d([b(0,A.IOptionsService)],y)},7994:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CharsetService=void 0,u.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(h){this.glevel=h,this.charset=this._charsets[h]}setgCharset(h,d){this._charsets[h]=d,this.glevel===h&&(this.charset=d)}}},1753:function(H,u,h){var d=this&&this.__decorate||function(l,v,m,w){var D,_=arguments.length,E=_<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,v,m,w);else for(var U=l.length-1;U>=0;U--)(D=l[U])&&(E=(_<3?D(E):_>3?D(v,m,E):D(v,m))||E);return _>3&&E&&Object.defineProperty(v,m,E),E},b=this&&this.__param||function(l,v){return function(m,w){v(m,w,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const f=h(2585),g=h(8460),C=h(844),A={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function y(l,v){let m=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(m|=64,m|=l.action):(m|=3&l.button,4&l.button&&(m|=64),8&l.button&&(m|=128),l.action===32?m|=32:l.action!==0||v||(m|=3)),m}const n=String.fromCharCode,c={DEFAULT:l=>{const v=[y(l,!1)+32,l.col+32,l.row+32];return v[0]>255||v[1]>255||v[2]>255?"":`\x1B[M${n(v[0])}${n(v[1])}${n(v[2])}`},SGR:l=>{const v=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${y(l,!0)};${l.col};${l.row}${v}`},SGR_PIXELS:l=>{const v=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${y(l,!0)};${l.x};${l.y}${v}`}};let o=u.CoreMouseService=class extends C.Disposable{constructor(l,v){super(),this._bufferService=l,this._coreService=v,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 m of Object.keys(A))this.addProtocol(m,A[m]);for(const m of Object.keys(c))this.addEncoding(m,c[m]);this.reset()}addProtocol(l,v){this._protocols[l]=v}addEncoding(l,v){this._encodings[l]=v}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const v=this._encodings[this._activeEncoding](l);return v&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(v):this._coreService.triggerDataEvent(v,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,v,m){if(m){if(l.x!==v.x||l.y!==v.y)return!1}else if(l.col!==v.col||l.row!==v.row)return!1;return l.button===v.button&&l.action===v.action&&l.ctrl===v.ctrl&&l.alt===v.alt&&l.shift===v.shift}};u.CoreMouseService=o=d([b(0,f.IBufferService),b(1,f.ICoreService)],o)},6975:function(H,u,h){var d=this&&this.__decorate||function(o,l,v,m){var w,D=arguments.length,_=D<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,v):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(o,l,v,m);else for(var E=o.length-1;E>=0;E--)(w=o[E])&&(_=(D<3?w(_):D>3?w(l,v,_):w(l,v))||_);return D>3&&_&&Object.defineProperty(l,v,_),_},b=this&&this.__param||function(o,l){return function(v,m){l(v,m,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const f=h(1439),g=h(8460),C=h(844),A=h(2585),y=Object.freeze({insertMode:!1}),n=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends C.Disposable{constructor(o,l,v){super(),this._bufferService=o,this._logService=l,this._optionsService=v,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,f.clone)(y),this.decPrivateModes=(0,f.clone)(n)}reset(){this.modes=(0,f.clone)(y),this.decPrivateModes=(0,f.clone)(n)}triggerDataEvent(o,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const v=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&v.ybase!==v.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((m=>m.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(o))}};u.CoreService=c=d([b(0,A.IBufferService),b(1,A.ILogService),b(2,A.IOptionsService)],c)},9074:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=h(8055),b=h(8460),f=h(844),g=h(6106);let C=0,A=0;class y extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((o=>o?.marker.line)),this._onDecorationRegistered=this.register(new b.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new b.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const l=new n(o);if(l){const v=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),v.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,l,v){var m,w,D;let _=0,E=0;for(const U of this._decorations.getKeyIterator(l))_=(m=U.options.x)!==null&&m!==void 0?m:0,E=_+((w=U.options.width)!==null&&w!==void 0?w:1),o>=_&&o<E&&(!v||((D=U.options.layer)!==null&&D!==void 0?D:"bottom")===v)&&(yield U)}forEachDecorationAtCell(o,l,v,m){this._decorations.forEachByKey(l,(w=>{var D,_,E;C=(D=w.options.x)!==null&&D!==void 0?D:0,A=C+((_=w.options.width)!==null&&_!==void 0?_:1),o>=C&&o<A&&(!v||((E=w.options.layer)!==null&&E!==void 0?E:"bottom")===v)&&m(w)}))}}u.DecorationService=y;class n extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new b.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new b.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=h(2585),b=h(8343);class f{constructor(...C){this._entries=new Map;for(const[A,y]of C)this.set(A,y)}set(C,A){const y=this._entries.get(C);return this._entries.set(C,A),y}forEach(C){for(const[A,y]of this._entries.entries())C(A,y)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}u.ServiceCollection=f,u.InstantiationService=class{constructor(){this._services=new f,this._services.set(d.IInstantiationService,this)}setService(g,C){this._services.set(g,C)}getService(g){return this._services.get(g)}createInstance(g,...C){const A=(0,b.getServiceDependencies)(g).sort(((c,o)=>c.index-o.index)),y=[];for(const c of A){const o=this._services.get(c.id);if(!o)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${c.id}.`);y.push(o)}const n=A.length>0?A[0].index:C.length;if(C.length!==n)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${n+1} conflicts with ${C.length} static arguments`);return new g(...C,...y)}}},7866:function(H,u,h){var d=this&&this.__decorate||function(n,c,o,l){var v,m=arguments.length,w=m<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(n,c,o,l);else for(var D=n.length-1;D>=0;D--)(v=n[D])&&(w=(m<3?v(w):m>3?v(c,o,w):v(c,o))||w);return m>3&&w&&Object.defineProperty(c,o,w),w},b=this&&this.__param||function(n,c){return function(o,l){c(o,l,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const f=h(844),g=h(2585),C={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 A,y=u.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(n){super(),this._optionsService=n,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),A=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(n){for(let c=0;c<n.length;c++)typeof n[c]=="function"&&(n[c]=n[c]())}_log(n,c,o){this._evalLazyOptionalParams(o),n.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...o)}trace(n,...c){var o,l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log((l=(o=this._optionsService.options.logger)===null||o===void 0?void 0:o.trace.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.log,n,c)}debug(n,...c){var o,l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log((l=(o=this._optionsService.options.logger)===null||o===void 0?void 0:o.debug.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.log,n,c)}info(n,...c){var o,l;this._logLevel<=g.LogLevelEnum.INFO&&this._log((l=(o=this._optionsService.options.logger)===null||o===void 0?void 0:o.info.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.info,n,c)}warn(n,...c){var o,l;this._logLevel<=g.LogLevelEnum.WARN&&this._log((l=(o=this._optionsService.options.logger)===null||o===void 0?void 0:o.warn.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.warn,n,c)}error(n,...c){var o,l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log((l=(o=this._optionsService.options.logger)===null||o===void 0?void 0:o.error.bind(this._optionsService.options.logger))!==null&&l!==void 0?l:console.error,n,c)}};u.LogService=y=d([b(0,g.IOptionsService)],y),u.setTraceLogger=function(n){A=n},u.traceCall=function(n,c,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...v){if(A.logLevel!==g.LogLevelEnum.TRACE)return l.apply(this,v);A.trace(`GlyphRenderer#${l.name}(${v.map((w=>JSON.stringify(w))).join(", ")})`);const m=l.apply(this,v);return A.trace(`GlyphRenderer#${l.name} return`,m),m}}},7302:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=h(8460),b=h(844),f=h(6114);u.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,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:{},rightClickSelectsWord:f.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 C extends b.Disposable{constructor(y){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const n=Object.assign({},u.DEFAULT_OPTIONS);for(const c in y)if(c in n)try{const o=y[c];n[c]=this._sanitizeAndValidateOption(c,o)}catch(o){console.error(o)}this.rawOptions=n,this.options=Object.assign({},n),this._setupOptions()}onSpecificOptionChange(y,n){return this.onOptionChange((c=>{c===y&&n(this.rawOptions[y])}))}onMultipleOptionChange(y,n){return this.onOptionChange((c=>{y.indexOf(c)!==-1&&n()}))}_setupOptions(){const y=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},n=(c,o)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);o=this._sanitizeAndValidateOption(c,o),this.rawOptions[c]!==o&&(this.rawOptions[c]=o,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const o={get:y.bind(this,c),set:n.bind(this,c)};Object.defineProperty(this.options,c,o)}}_sanitizeAndValidateOption(y,n){switch(y){case"cursorStyle":if(n||(n=u.DEFAULT_OPTIONS[y]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(n))throw new Error(`"${n}" is not a valid value for ${y}`);break;case"wordSeparator":n||(n=u.DEFAULT_OPTIONS[y]);break;case"fontWeight":case"fontWeightBold":if(typeof n=="number"&&1<=n&&n<=1e3)break;n=g.includes(n)?n:u.DEFAULT_OPTIONS[y];break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(`${y} cannot be less than 1, value: ${n}`);break;case"minimumContrastRatio":n=Math.max(1,Math.min(21,Math.round(10*n)/10));break;case"scrollback":if((n=Math.min(n,4294967295))<0)throw new Error(`${y} cannot be less than 0, value: ${n}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(`${y} cannot be less than or equal to 0, value: ${n}`);break;case"rows":case"cols":if(!n&&n!==0)throw new Error(`${y} must be numeric, value: ${n}`);break;case"windowsPty":n=n??{}}return n}}u.OptionsService=C},2660:function(H,u,h){var d=this&&this.__decorate||function(C,A,y,n){var c,o=arguments.length,l=o<3?A:n===null?n=Object.getOwnPropertyDescriptor(A,y):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(C,A,y,n);else for(var v=C.length-1;v>=0;v--)(c=C[v])&&(l=(o<3?c(l):o>3?c(A,y,l):c(A,y))||l);return o>3&&l&&Object.defineProperty(A,y,l),l},b=this&&this.__param||function(C,A){return function(y,n){A(y,n,C)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const f=h(2585);let g=u.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const A=this._bufferService.buffer;if(C.id===void 0){const v=A.addMarker(A.ybase+A.y),m={data:C,id:this._nextId++,lines:[v]};return v.onDispose((()=>this._removeMarkerFromLink(m,v))),this._dataByLinkId.set(m.id,m),m.id}const y=C,n=this._getEntryIdKey(y),c=this._entriesWithId.get(n);if(c)return this.addLineToLink(c.id,A.ybase+A.y),c.id;const o=A.addMarker(A.ybase+A.y),l={id:this._nextId++,key:this._getEntryIdKey(y),data:y,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(l,o))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(C,A){const y=this._dataByLinkId.get(C);if(y&&y.lines.every((n=>n.line!==A))){const n=this._bufferService.buffer.addMarker(A);y.lines.push(n),n.onDispose((()=>this._removeMarkerFromLink(y,n)))}}getLinkData(C){var A;return(A=this._dataByLinkId.get(C))===null||A===void 0?void 0:A.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,A){const y=C.lines.indexOf(A);y!==-1&&(C.lines.splice(y,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};u.OscLinkService=g=d([b(0,f.IBufferService)],g)},8343:(H,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const h="di$target",d="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(b){return b[d]||[]},u.createDecorator=function(b){if(u.serviceRegistry.has(b))return u.serviceRegistry.get(b);const f=function(g,C,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(y,n,c){n[h]===n?n[d].push({id:y,index:c}):(n[d]=[{id:y,index:c}],n[h]=n)})(f,g,A)};return f.toString=()=>b,u.serviceRegistry.set(b,f),f}},2585:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IDecorationService=u.IUnicodeService=u.IOscLinkService=u.IOptionsService=u.ILogService=u.LogLevelEnum=u.IInstantiationService=u.ICharsetService=u.ICoreService=u.ICoreMouseService=u.IBufferService=void 0;const d=h(8343);var b;u.IBufferService=(0,d.createDecorator)("BufferService"),u.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),u.ICoreService=(0,d.createDecorator)("CoreService"),u.ICharsetService=(0,d.createDecorator)("CharsetService"),u.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(b||(u.LogLevelEnum=b={})),u.ILogService=(0,d.createDecorator)("LogService"),u.IOptionsService=(0,d.createDecorator)("OptionsService"),u.IOscLinkService=(0,d.createDecorator)("OscLinkService"),u.IUnicodeService=(0,d.createDecorator)("UnicodeService"),u.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(H,u,h)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=h(8460),b=h(225);u.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const f=new b.UnicodeV6;this.register(f),this._active=f.version,this._activeProvider=f}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(f){if(!this._providers[f])throw new Error(`unknown Unicode version "${f}"`);this._active=f,this._activeProvider=this._providers[f],this._onChange.fire(f)}register(f){this._providers[f.version]=f}wcwidth(f){return this._activeProvider.wcwidth(f)}getStringCellWidth(f){let g=0;const C=f.length;for(let A=0;A<C;++A){let y=f.charCodeAt(A);if(55296<=y&&y<=56319){if(++A>=C)return g+this.wcwidth(y);const n=f.charCodeAt(A);56320<=n&&n<=57343?y=1024*(y-55296)+n-56320+65536:g+=this.wcwidth(n)}g+=this.wcwidth(y)}return g}}}},L={};function G(H){var u=L[H];if(u!==void 0)return u.exports;var h=L[H]={exports:{}};return z[H].call(h.exports,h,h.exports,G),h.exports}var K={};return(()=>{var H=K;Object.defineProperty(H,"__esModule",{value:!0}),H.Terminal=void 0;const u=G(9042),h=G(3236),d=G(844),b=G(5741),f=G(8285),g=G(7975),C=G(7090),A=["cols","rows"];class y extends d.Disposable{constructor(c){super(),this._core=this.register(new h.Terminal(c)),this._addonManager=this.register(new b.AddonManager),this._publicOptions=Object.assign({},this._core.options);const o=v=>this._core.options[v],l=(v,m)=>{this._checkReadonlyOptions(v),this._core.options[v]=m};for(const v in this._core.options){const m={get:o.bind(this,v),set:l.bind(this,v)};Object.defineProperty(this._publicOptions,v,m)}}_checkReadonlyOptions(c){if(A.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.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 f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const o in c)this._publicOptions[o]=c[o]}blur(){this._core.blur()}focus(){this._core.focus()}resize(c,o){this._verifyIntegers(c,o),this._core.resize(c,o)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){var o,l,v;return this._checkProposedApi(),this._verifyPositiveIntegers((o=c.x)!==null&&o!==void 0?o:0,(l=c.width)!==null&&l!==void 0?l:0,(v=c.height)!==null&&v!==void 0?v:0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,o,l){this._verifyIntegers(c,o,l),this._core.select(c,o,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,o){this._verifyIntegers(c,o),this._core.selectLines(c,o)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,o){this._core.write(c,o)}writeln(c,o){this._core.write(c),this._core.write(`\r
193
- `,o)}paste(c){this._core.paste(c)}refresh(c,o){this._verifyIntegers(c,o),this._core.refresh(c,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const o of c)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const o of c)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}H.Terminal=y})(),K})()))})(hc)),hc.exports}var g0=m0(),fc={exports:{}},$d;function p0(){return $d||($d=1,(function(S,N){(function(z,L){S.exports=L()})(self,(()=>(()=>{var z={};return(()=>{var L=z;Object.defineProperty(L,"__esModule",{value:!0}),L.FitAddon=void 0,L.FitAddon=class{activate(G){this._terminal=G}dispose(){}fit(){const G=this.proposeDimensions();if(!G||!this._terminal||isNaN(G.cols)||isNaN(G.rows))return;const K=this._terminal._core;this._terminal.rows===G.rows&&this._terminal.cols===G.cols||(K._renderService.clear(),this._terminal.resize(G.cols,G.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const G=this._terminal._core,K=G._renderService.dimensions;if(K.css.cell.width===0||K.css.cell.height===0)return;const H=this._terminal.options.scrollback===0?0:G.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),b=window.getComputedStyle(this._terminal.element),f=h-(parseInt(b.getPropertyValue("padding-top"))+parseInt(b.getPropertyValue("padding-bottom"))),g=d-(parseInt(b.getPropertyValue("padding-right"))+parseInt(b.getPropertyValue("padding-left")))-H;return{cols:Math.max(2,Math.floor(g/K.css.cell.width)),rows:Math.max(1,Math.floor(f/K.css.cell.height))}}}})(),z})()))})(fc)),fc.exports}var b0=p0();const Na=new Map;function S0({sessionId:S,isActive:N,clientId:z,lockHeldBy:L,scrollbackLines:G=1e4,onReadOnlyInput:K}){const H=ae.useRef(null),u=ae.useRef(null),h=ae.useRef(null),d=ae.useRef(null),b=ae.useRef(null),f=ae.useRef(null),[g,C]=ae.useState(!1),A=g||L===z;return ae.useEffect(()=>{if(!H.current)return;let y=Na.get(S),n=y?.terminal,c=y?.fitAddon;return(!n||!c)&&(n=new g0.Terminal({cursorBlink:!0,fontSize:14,theme:{background:"#1a1a1a",foreground:"#d4d4d4"},scrollback:G}),c=new b0.FitAddon,n.loadAddon(c),Na.set(S,{terminal:n,fitAddon:c})),u.current=n,h.current=c,()=>{}},[S,G]),ae.useEffect(()=>{const y=u.current,n=h.current;if(!y||!n)return;if(H.current&&(H.current.style.display=N?"block":"none"),N&&!y.element&&H.current){if(y.open(H.current),y.element){const m=y.element;m.style.padding="8px",m.style.boxSizing="border-box"}requestAnimationFrame(()=>{setTimeout(()=>{try{n.fit()}catch(m){console.error("Fit error on activation:",m)}},0)})}else N&&y.element&&requestAnimationFrame(()=>{setTimeout(()=>{try{n.fit()}catch(m){console.error("Refit error:",m)}},0)});if(!N){d.current&&d.current.readyState===WebSocket.OPEN&&d.current.close();return}const o=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/terminal/${S}?clientId=${encodeURIComponent(z)}`,l=new WebSocket(o);d.current=l,l.binaryType="arraybuffer",l.onopen=()=>{l.send(JSON.stringify({type:"resize",cols:y.cols,rows:y.rows})),(!L||L===z)&&(C(!0),l.send(JSON.stringify({type:"acquire-lock"})))},l.onmessage=m=>{if(typeof m.data=="string")try{JSON.parse(m.data).type==="exit"&&y.write(`\r
194
- [Process exited]`)}catch{y.write(m.data)}else{const w=new Uint8Array(m.data);y.write(new TextDecoder().decode(w))}},l.onclose=()=>{C(!1)},l.onerror=m=>{console.error("WebSocket error:",m),y.write(`\r
195
- [Connection error]`)};const v=new ResizeObserver(()=>{try{H.current&&H.current.offsetWidth>0&&H.current.offsetHeight>0&&(n.fit(),l.readyState===WebSocket.OPEN&&l.send(JSON.stringify({type:"resize",cols:y.cols,rows:y.rows})))}catch(m){console.error("Resize error:",m)}});return b.current=v,H.current&&v.observe(H.current),()=>{f.current&&(f.current.dispose(),f.current=null),b.current&&b.current.disconnect(),d.current&&d.current.readyState===WebSocket.OPEN&&d.current.close()}},[S,N,z]),ae.useEffect(()=>{const y=u.current;if(!y)return;y.options.cursorBlink=A,f.current&&f.current.dispose();const n=d.current;return f.current=y.onData(c=>{A&&n&&n.readyState===WebSocket.OPEN?n.send(c):!A&&K&&K(L)}),()=>{}},[A,g,L,K]),ae.useEffect(()=>{L!==null&&L!==z&&C(!1)},[L,z]),ae.useEffect(()=>{N&&!A&&!L&&d.current&&d.current.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify({type:"acquire-lock"}))},[L,N,A]),ae.useEffect(()=>()=>{const y=Na.get(S);y&&(y.terminal.dispose(),Na.delete(S))},[S]),O.jsx("div",{ref:H,style:{display:N?"block":"none",width:"100%",height:"100%",overflow:"hidden"}})}function vn({size:S="md"}={}){const N=S==="sm"?"h-8":"h-12";return O.jsxs("svg",{className:`w-auto ${N}`,viewBox:"0 0 320 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[O.jsx("rect",{x:"4",y:"8",width:"48",height:"48",rx:"2",className:"stroke-primary",strokeWidth:"1.5"}),O.jsx("polyline",{points:"16,24 28,32 16,40",className:"stroke-primary",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"miter",fill:"none"}),O.jsx("line",{x1:"32",y1:"40",x2:"40",y2:"40",className:"stroke-primary",strokeWidth:"2.5",strokeLinecap:"round"}),O.jsx("text",{x:"68",y:"41",fontFamily:"monospace",fontSize:"28",fontWeight:"600",className:"fill-primary",children:"PuTTrY"})]})}function y0(){let S=localStorage.getItem("wt_client_id");return S||(S=crypto.randomUUID(),localStorage.setItem("wt_client_id",S)),S}function C0(){const[S,N]=ae.useState("loading"),[z,L]=ae.useState(!1),[G,K]=ae.useState(""),[H,u]=ae.useState(""),[h,d]=ae.useState(!1),[b,f]=ae.useState(["","","","","",""]),[g,C]=ae.useState(""),[A,y]=ae.useState(""),[n,c]=ae.useState(!1),[o,l]=ae.useState(!1),v=ae.useRef([]),m=()=>b.join(""),[w,D]=ae.useState(!1),[_,E]=ae.useState(!1),[U,F]=ae.useState(""),[j,P]=ae.useState([]),[ee,se]=ae.useState(null),[I,X]=ae.useState(!1),[T,B]=ae.useState(192),[R,x]=ae.useState(!1),[q,Z]=ae.useState(1e4),re=ae.useRef(y0()),[le,de]=ae.useState({}),k=ae.useRef(0),Q=ae.useRef({}),[te,oe]=ae.useState(new Set),ye=ae.useRef({}),ve=fe=>{const _e=Date.now(),Se=3e3;_e-k.current<Se||(pn.error(fe,{position:"bottom-right",duration:Se,style:{fontSize:"12px",padding:"8px 12px"}}),k.current=_e)},ke=fe=>{const _e=new WebSocket(`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/terminal/${fe}?clientId=${encodeURIComponent(re.current)}`);_e.onopen=()=>{_e.send(JSON.stringify({type:"acquire-lock",force:!0}))},setTimeout(()=>{_e.readyState===WebSocket.OPEN&&_e.close()},500)},[je,it]=ae.useState(!1),[Gt,Ae]=ae.useState(!1),[wt,_i]=ae.useState(null),[vi,ni]=ae.useState(!1),Ui=ae.useRef(null),_t=ae.useRef(null),Pe=ae.useRef(null),[yt,ti]=ae.useState(!1);ae.useEffect(()=>{if(!yt)return;const fe=setTimeout(()=>ti(!1),4e3);return()=>clearTimeout(fe)},[yt]),ae.useEffect(()=>{Et()},[]);const ai=ae.useCallback(()=>{const fe=window.location.protocol==="https:"?"wss":"ws",_e=new WebSocket(`${fe}://${window.location.host}/sync?clientId=${encodeURIComponent(re.current)}`);_t.current=_e,_e.onmessage=Se=>{const xe=JSON.parse(Se.data);if(xe.type==="snapshot"){P(xe.sessions);const ze={};for(const Ve of xe.sessions)ze[Ve.id]=Ve.inputLockClientId??null;de(ze),Pe.current&&xe.sessions.find(Ve=>Ve.id===Pe.current)&&(se(Pe.current),Pe.current=null)}else xe.type==="session-created"?(P(ze=>ze.find(Ve=>Ve.id===xe.session.id)?ze:[...ze,xe.session]),Pe.current===xe.session.id&&(se(xe.session.id),Pe.current=null)):xe.type==="session-deleted"?(P(ze=>ze.filter(Ve=>Ve.id!==xe.sessionId)),se(ze=>ze===xe.sessionId?null:ze),de(ze=>{const Ve={...ze};return delete Ve[xe.sessionId],Ve})):xe.type==="session-renamed"?P(ze=>ze.map(Ve=>Ve.id===xe.sessionId?{...Ve,label:xe.label}:Ve)):xe.type==="input-lock-acquired"?de(ze=>({...ze,[xe.sessionId]:xe.clientId})):xe.type==="input-lock-released"?de(ze=>({...ze,[xe.sessionId]:null})):xe.type==="data-activity"&&(oe(ze=>{const Ve=new Set(ze);return Ve.add(xe.sessionId),Ve}),ye.current[xe.sessionId]&&clearTimeout(ye.current[xe.sessionId]),ye.current[xe.sessionId]=setTimeout(()=>{oe(ze=>{const Ve=new Set(ze);return Ve.delete(xe.sessionId),Ve}),delete ye.current[xe.sessionId]},500))},_e.onclose=()=>{setTimeout(ai,2e3)}},[]);ae.useEffect(()=>{if(S==="authenticated")return ai(),()=>{_t.current?.close()}},[S,ai]),ae.useEffect(()=>{if(S!=="authenticated")return;async function fe(){try{const _e=await fetch("/api/config");if(_e.ok){const Se=await _e.json();Z(Se.scrollbackLines)}}catch(_e){console.error("Failed to fetch config:",_e)}}fe()},[S]),ae.useEffect(()=>{for(const[fe,_e]of Object.entries(le))Q.current[fe]===re.current&&_e!==re.current&&_e!==null&&ve(`Session control lost to another browser with Session ID: ${_e.split("-").pop()}`);Q.current={...le}},[le]),ae.useEffect(()=>()=>{Object.values(ye.current).forEach(fe=>clearTimeout(fe))},[]),ae.useEffect(()=>{j.length>0&&!ee&&se(j[0].id)},[j,ee]);async function Et(){try{const _e=await(await fetch("/api/auth-status")).json();console.log("[Auth] Status response:",_e),L(_e.authDisabled),_e.authDisabled&&_e.showAuthDisabledWarning&&(console.log("[Auth] Setting showAuthDisabledWarning to true"),ti(!0)),_e.authenticated?N("authenticated"):N("unauthenticated")}catch(fe){console.error("Auth check failed:",fe),N("unauthenticated")}}async function vs(){x(!0);try{const fe=await fetch("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientId:re.current})});if(fe.ok){const _e=await fe.json();Pe.current=_e.id,setTimeout(()=>{Pe.current===_e.id&&(se(_e.id),Pe.current=null)},500)}}catch(fe){console.error("Failed to create session:",fe)}finally{x(!1)}}async function Tt(fe){fe.preventDefault(),K(""),x(!0);try{const _e=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:H})}),Se=await _e.json();if(!_e.ok){K("Invalid password");return}Se.authenticated?(u(""),N("authenticated")):Se.requiresPasskey&&!Se.requiresTOTP?(u(""),D(!1),N("passkey-verify")):Se.canChoose?(u(""),D(!0),N("totp-verify")):Se.requiresTOTP&&(u(""),D(!1),Se.totpMode==="setup"?(N("totp-setup"),await mi()):Se.totpMode==="verify"&&N("totp-verify"))}catch(_e){K("Login failed"),console.error("Login error:",_e)}finally{x(!1)}}async function mi(){try{const fe=await fetch("/api/auth/2fa/qr",{credentials:"include"});if(fe.ok){const _e=await fe.json();C(_e.dataUrl),y(_e.manualEntryKey)}else K("Failed to generate QR code")}catch(fe){K("Failed to fetch QR code"),console.error("QR fetch error:",fe)}}function Ye(fe,_e){const Se=_e.replace(/\D/g,"").slice(0,1),xe=[...b];if(xe[fe]=Se,f(xe),Se&&fe<5&&v.current[fe+1]?.focus(),Se&&xe.every(ze=>ze!=="")){const ze=xe.join("");S==="totp-setup"?At(ze):S==="totp-verify"&&oi(ze)}}function li(fe,_e){_e.key==="Backspace"&&!b[fe]&&fe>0&&v.current[fe-1]?.focus()}async function At(fe){const _e=typeof fe=="string"?fe:m();fe?.preventDefault?.(),K(""),l(!0);try{console.log("[TOTP] Setting up with code:",_e);const Se=await fetch("/api/auth/2fa/setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret:A,code:_e})}),xe=await Se.json();if(console.log("[TOTP] Setup response status:",Se.status,"data:",xe),!Se.ok){console.log("[TOTP] Setup failed:",xe.error),K(xe.error||"Failed to setup 2FA"),f(["","","","","",""]),v.current[0]?.focus(),l(!1);return}console.log("[TOTP] Setup successful, redirecting to authenticated"),f(["","","","","",""]),C(""),y(""),N("authenticated")}catch(Se){console.error("[TOTP] Setup error:",Se),K("Setup failed"),l(!1)}}async function oi(fe){const _e=typeof fe=="string"?fe:m();fe?.preventDefault?.(),K(""),l(!0);try{console.log("[TOTP] Verifying code:",_e);const Se=await fetch("/api/auth/2fa/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:_e})}),xe=await Se.json();if(console.log("[TOTP] Response status:",Se.status,"data:",xe),!Se.ok){console.log("[TOTP] Response not ok, error:",xe.error),K(xe.error||"Invalid code"),f(["","","","","",""]),v.current[0]?.focus(),l(!1);return}console.log("[TOTP] Verification successful, redirecting to authenticated"),f(["","","","","",""]),N("authenticated")}catch(Se){console.error("[TOTP] Verify error:",Se),K("Verification failed"),l(!1)}}async function Ct(){F(""),E(!0);try{const{startAuthentication:fe}=await e_(async()=>{const{startAuthentication:Ve}=await import("./index-BDkarAkX.js");return{startAuthentication:Ve}},[]),_e=await fetch("/api/auth/passkey/auth/options",{method:"POST",credentials:"include"});if(!_e.ok){F("Failed to start authentication");return}const Se=await _e.json(),xe=await fe({optionsJSON:Se}),ze=await fetch("/api/auth/passkey/auth/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:xe})});if(!ze.ok){const Ve=await ze.json();F(Ve.error||"Authentication failed");return}N("authenticated")}catch(fe){fe.name==="NotAllowedError"?F("Authentication cancelled"):(F("Authentication failed"),console.error("[Passkey] Auth error:",fe))}finally{E(!1)}}async function Pa(){if(ee){ni(!0);try{const fe=await fetch(`/api/sessions/${ee}/info`);if(fe.ok){const _e=await fe.json();_i(_e),Ae(!0)}}catch(fe){console.error("Failed to fetch process info:",fe)}finally{ni(!1)}}}async function Ga(){try{await fetch("/api/auth",{method:"DELETE"}),N("unauthenticated"),P([]),se(null)}catch(fe){console.error("Logout failed:",fe)}}async function Fa(fe,_e){try{await fetch(`/api/sessions/${fe}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:_e})}),P(Se=>Se.map(xe=>xe.id===fe?{...xe,label:_e}:xe))}catch(Se){console.error("Failed to rename session:",Se)}}async function Ns(fe){try{await fetch(`/api/sessions/${fe}`,{method:"DELETE"}),P(_e=>_e.filter(Se=>Se.id!==fe)),ee===fe&&se(j.find(_e=>_e.id!==fe)?.id??null)}catch(_e){console.error("Failed to close session:",_e)}}async function zs(){try{await Promise.all(j.map(fe=>fetch(`/api/sessions/${fe.id}`,{method:"DELETE"}))),P([]),se(null)}catch(fe){console.error("Failed to close all sessions:",fe)}}return S==="loading"?O.jsx("div",{className:"flex items-center justify-center w-full h-screen bg-background text-foreground",children:O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"mb-4 inline-block",children:O.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-border border-t-primary"})}),O.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})}):S==="unauthenticated"?O.jsx("div",{className:"flex flex-col items-center justify-center w-full h-screen bg-background text-foreground",children:O.jsxs("div",{className:"w-full max-w-sm px-6 -mt-24",children:[O.jsx("div",{className:"flex flex-col items-center mb-4",children:O.jsx(vn,{})}),O.jsx("div",{className:"rounded-lg border border-border bg-card p-6 space-y-4",children:O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your session password to continue"}),O.jsxs("div",{className:"relative",children:[O.jsx("input",{type:h?"text":"password",value:H,onChange:fe=>u(fe.target.value),onKeyDown:fe=>{fe.key==="Enter"&&Tt(fe)},placeholder:"Enter password...",className:"w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-sm outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-ring/50 focus:ring-[3px]",disabled:R,autoFocus:!0}),O.jsx("button",{type:"button",onClick:()=>d(!h),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",tabIndex:-1,children:h?O.jsx(dc,{className:"h-4 w-4"}):O.jsx(_c,{className:"h-4 w-4"})})]}),G&&O.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3",children:O.jsx("p",{className:"text-xs text-destructive",children:G})}),O.jsx(Ie,{className:"w-full",disabled:!H.trim()||R,onClick:Tt,children:R?O.jsxs(O.Fragment,{children:[O.jsx(ei,{className:"h-4 w-4 animate-spin mr-2"}),"Verifying..."]}):"Continue"})]})})]})}):S==="totp-setup"?O.jsx("div",{className:"flex flex-col items-center justify-center w-full h-screen bg-background text-foreground",children:O.jsxs("div",{className:"w-full max-w-sm px-6 -mt-24",children:[O.jsx("div",{className:"flex flex-col items-center mb-4",children:O.jsx(vn,{})}),O.jsx("div",{className:"rounded-lg border border-border bg-card p-6 space-y-4",children:O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-sm font-medium",children:"Setup Two-Factor Authentication"}),O.jsx("p",{className:"text-xs text-muted-foreground",children:"Scan the QR code with your authenticator app"}),g&&O.jsx("div",{className:"flex justify-center",children:O.jsx("img",{src:g,alt:"TOTP QR Code",className:"border border-border rounded-md p-2 bg-white dark:bg-slate-900"})}),A&&O.jsxs("div",{className:"space-y-1",children:[O.jsx("button",{type:"button",onClick:()=>c(!n),className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:n?"Hide":"Or enter manually"}),n&&O.jsx("div",{className:"px-3 py-2 rounded border border-border bg-muted/50 font-mono text-sm break-all text-center",children:A})]}),O.jsxs("div",{className:"space-y-3 pt-2",children:[O.jsx("label",{className:"text-xs font-medium block",children:"Enter 6-digit code"}),O.jsx("div",{className:"flex justify-center gap-2",children:b.map((fe,_e)=>O.jsx("input",{ref:Se=>{v.current[_e]=Se},type:"text",inputMode:"numeric",value:fe,onChange:Se=>Ye(_e,Se.target.value),onKeyDown:Se=>li(_e,Se),maxLength:1,className:"w-10 h-10 rounded-md border border-input bg-background text-sm font-semibold text-center outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-ring/50 focus:ring-[2px]",disabled:o,autoFocus:_e===0},_e))})]}),G&&O.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3 mt-3",children:O.jsx("p",{className:"text-xs text-destructive",children:G})}),o&&O.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground mt-3",children:[O.jsx(ei,{className:"h-4 w-4 animate-spin"}),"Verifying..."]})]})})]})}):S==="totp-verify"?O.jsx("div",{className:"flex flex-col items-center justify-center w-full h-screen bg-background text-foreground",children:O.jsxs("div",{className:"w-full max-w-sm px-6 -mt-24",children:[O.jsx("div",{className:"flex flex-col items-center mb-4",children:O.jsx(vn,{})}),O.jsx("div",{className:"rounded-lg border border-border bg-card p-6 space-y-4",children:O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-sm font-medium",children:"Enter Verification Code"}),O.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter the 6-digit code from your authenticator app"}),O.jsx("div",{className:"space-y-3 pt-4",children:O.jsx("div",{className:"flex justify-center gap-2",children:b.map((fe,_e)=>O.jsx("input",{ref:Se=>{v.current[_e]=Se},type:"text",inputMode:"numeric",value:fe,onChange:Se=>Ye(_e,Se.target.value),onKeyDown:Se=>li(_e,Se),maxLength:1,className:"w-10 h-10 rounded-md border border-input bg-background text-sm font-semibold text-center outline-none placeholder:text-muted-foreground focus:border-ring focus:ring-ring/50 focus:ring-[2px]",disabled:o,autoFocus:_e===0},_e))})}),G&&O.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3 mt-3",children:O.jsx("p",{className:"text-xs text-destructive",children:G})}),o&&O.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground mt-3",children:[O.jsx(ei,{className:"h-4 w-4 animate-spin"}),"Verifying..."]}),w&&O.jsxs("div",{className:"pt-2 border-t border-border/50",children:[O.jsx("p",{className:"text-xs text-muted-foreground text-center mb-3",children:"or"}),O.jsx(Ie,{className:"w-full",disabled:_,onClick:Ct,children:_?O.jsxs(O.Fragment,{children:[O.jsx(ei,{className:"h-4 w-4 animate-spin mr-2"}),"Waiting..."]}):O.jsxs(O.Fragment,{children:[O.jsx(Nd,{className:"h-4 w-4 mr-2"}),"Use Passkey"]})}),U&&O.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3 mt-3",children:O.jsx("p",{className:"text-xs text-destructive",children:U})})]})]})})]})}):S==="passkey-verify"?O.jsx("div",{className:"flex flex-col items-center justify-center w-full h-screen bg-background text-foreground",children:O.jsxs("div",{className:"w-full max-w-sm px-6 -mt-24",children:[O.jsx("div",{className:"flex flex-col items-center mb-4",children:O.jsx(vn,{})}),O.jsx("div",{className:"rounded-lg border border-border bg-card p-6 space-y-4",children:O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-sm font-medium",children:"Verify with Passkey"}),O.jsx("p",{className:"text-xs text-muted-foreground",children:"Use your fingerprint, face, or security key to continue"}),O.jsx(Ie,{className:"w-full",disabled:_,onClick:Ct,children:_?O.jsxs(O.Fragment,{children:[O.jsx(ei,{className:"h-4 w-4 animate-spin mr-2"}),"Waiting..."]}):O.jsxs(O.Fragment,{children:[O.jsx(Nd,{className:"h-4 w-4 mr-2"}),"Continue with Passkey"]})}),U&&O.jsx("div",{className:"rounded-md bg-destructive/10 border border-destructive/30 p-3",children:O.jsx("p",{className:"text-xs text-destructive",children:U})}),w&&O.jsxs("div",{className:"pt-2 border-t border-border/50",children:[O.jsx("p",{className:"text-xs text-muted-foreground text-center mb-3",children:"or"}),O.jsx(Ie,{className:"w-full",onClick:()=>N("totp-verify"),children:"Use Authenticator App"})]})]})})]})}):O.jsxs("div",{className:"flex flex-col h-screen w-full bg-background text-foreground",children:[yt&&O.jsx("div",{className:"px-4 py-2 bg-amber-400/40 border-b border-amber-600/50 text-sm text-black dark:text-black text-center animate-pulse",children:"⚠️ Authentication is disabled"}),O.jsx(_0,{position:"bottom-right"}),O.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[O.jsx(Ep,{sessions:j,activeSessionId:ee,onSelectSession:se,onNewSession:vs,onCloseSession:Ns,onRenameSession:Fa,onCloseAllSessions:zs,loading:R,collapsed:I,onToggleCollapse:()=>{X(!I),I&&B(192)},width:T,onWidthChange:B,inputLocks:le,clientId:re.current,onTakeControl:ke,dataReceivedSessions:te}),O.jsxs("div",{className:"flex-1 flex flex-col",children:[O.jsxs("div",{className:"border-b border-border bg-card px-4 py-2 flex items-center justify-between",children:[O.jsx(vn,{size:"sm"}),O.jsxs("div",{className:"flex items-center gap-2",children:[S==="authenticated"&&ee&&O.jsxs("div",{className:"relative",ref:Ui,children:[O.jsx(Ie,{variant:"ghost",size:"sm",onClick:Pa,disabled:vi,className:"[&_svg]:size-4",title:"Session info",children:O.jsx(cg,{className:"h-4 w-4"})}),Gt&&wt&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>Ae(!1)}),O.jsx("div",{className:"absolute right-0 top-full mt-1 z-50 bg-card border border-border rounded-lg shadow-lg w-80",onClick:fe=>fe.stopPropagation(),children:O.jsxs("div",{className:"p-3 space-y-2",children:[O.jsxs("div",{className:"flex justify-between items-center pb-2 border-b border-border/50",children:[O.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"PID"}),O.jsx("span",{className:"text-xs font-mono font-bold",children:wt.pid})]}),O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"Memory"}),O.jsx("span",{className:"text-xs font-mono font-bold",children:wt.memory})]}),O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"CPU"}),O.jsxs("span",{className:"text-xs font-mono font-bold",children:[wt.cpu.toFixed(1),"%"]})]}),O.jsxs("div",{className:"flex justify-between items-center",children:[O.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"Uptime"}),O.jsx("span",{className:"text-xs font-mono font-bold",children:wt.uptime})]}),O.jsxs("div",{className:"flex justify-between items-center pt-2 border-t border-border/50",children:[O.jsx("span",{className:"text-xs font-medium font-mono text-muted-foreground",children:"Started"}),O.jsx("span",{className:"text-xs font-mono font-bold text-right",children:new Date(wt.startedAt).toLocaleString()})]})]})})]})]}),!z&&O.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>it(!0),className:"[&_svg]:size-4",title:"Settings",children:O.jsx(yg,{className:"h-4 w-4"})}),O.jsx(v0,{open:je,onOpenChange:it}),!z&&O.jsxs(Ie,{variant:"ghost",size:"sm",onClick:Ga,className:"[&_svg]:size-4",children:[O.jsx(fg,{className:"mr-2"}),"Logout"]})]})]}),O.jsx("div",{className:"flex-1 relative overflow-hidden",children:j.map(fe=>O.jsx(S0,{sessionId:fe.id,isActive:ee===fe.id,clientId:re.current,lockHeldBy:le[fe.id]??null,scrollbackLines:q,onReadOnlyInput:_e=>{const Se=_e?`Terminal locked by another browser with Session ID: ${_e.split("-").pop()}`:"Terminal locked by another browser";ve(Se)}},fe.id))})]})]})]})}Wm.createRoot(document.getElementById("root")).render(O.jsx(ae.StrictMode,{children:O.jsx(C0,{})}));