@sapiom/harness 0.1.3 → 0.1.5
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.
- package/CHANGELOG.md +57 -0
- package/dist/core/adapters/adapter.d.ts +9 -0
- package/dist/core/adapters/adapter.d.ts.map +1 -1
- package/dist/core/adapters/claude-code-info.d.ts.map +1 -1
- package/dist/core/adapters/claude-code-info.js +2 -0
- package/dist/core/adapters/claude-code-info.js.map +1 -1
- package/dist/core/adapters/claude-code.d.ts +4 -0
- package/dist/core/adapters/claude-code.d.ts.map +1 -1
- package/dist/core/adapters/claude-code.js +133 -47
- package/dist/core/adapters/claude-code.js.map +1 -1
- package/dist/core/adapters/codex-info.d.ts.map +1 -1
- package/dist/core/adapters/codex-info.js +2 -0
- package/dist/core/adapters/codex-info.js.map +1 -1
- package/dist/core/adapters/conductor.d.ts.map +1 -1
- package/dist/core/adapters/conductor.js +2 -0
- package/dist/core/adapters/conductor.js.map +1 -1
- package/dist/core/adapters/opencode.d.ts.map +1 -1
- package/dist/core/adapters/opencode.js +2 -0
- package/dist/core/adapters/opencode.js.map +1 -1
- package/dist/core/adapters/pi.d.ts.map +1 -1
- package/dist/core/adapters/pi.js +2 -0
- package/dist/core/adapters/pi.js.map +1 -1
- package/dist/core/canvas-run-state.d.ts +95 -0
- package/dist/core/canvas-run-state.d.ts.map +1 -0
- package/dist/core/canvas-run-state.js +162 -0
- package/dist/core/canvas-run-state.js.map +1 -0
- package/dist/core/canvas-svg.d.ts.map +1 -1
- package/dist/core/canvas-svg.js +28 -8
- package/dist/core/canvas-svg.js.map +1 -1
- package/dist/core/canvas-template.d.ts +4 -3
- package/dist/core/canvas-template.d.ts.map +1 -1
- package/dist/core/canvas-template.js +75 -3
- package/dist/core/canvas-template.js.map +1 -1
- package/dist/core/definition-slug-resolver.d.ts +33 -0
- package/dist/core/definition-slug-resolver.d.ts.map +1 -0
- package/dist/core/definition-slug-resolver.js +81 -0
- package/dist/core/definition-slug-resolver.js.map +1 -0
- package/dist/core/execution-detector.d.ts +59 -0
- package/dist/core/execution-detector.d.ts.map +1 -0
- package/dist/core/execution-detector.js +110 -0
- package/dist/core/execution-detector.js.map +1 -0
- package/dist/core/inject/mcp-config.d.ts.map +1 -1
- package/dist/core/inject/mcp-config.js +9 -1
- package/dist/core/inject/mcp-config.js.map +1 -1
- package/dist/core/render-run-state.d.ts +9 -0
- package/dist/core/render-run-state.d.ts.map +1 -0
- package/dist/core/render-run-state.js +139 -0
- package/dist/core/render-run-state.js.map +1 -0
- package/dist/core/run-spend.d.ts +55 -0
- package/dist/core/run-spend.d.ts.map +1 -0
- package/dist/core/run-spend.js +109 -0
- package/dist/core/run-spend.js.map +1 -0
- package/dist/core/run-state.d.ts +45 -0
- package/dist/core/run-state.d.ts.map +1 -0
- package/dist/core/run-state.js +72 -0
- package/dist/core/run-state.js.map +1 -0
- package/dist/core/run-transactions.d.ts +60 -0
- package/dist/core/run-transactions.d.ts.map +1 -0
- package/dist/core/run-transactions.js +129 -0
- package/dist/core/run-transactions.js.map +1 -0
- package/dist/core/workflow-registry.d.ts +12 -1
- package/dist/core/workflow-registry.d.ts.map +1 -1
- package/dist/core/workflow-registry.js +2 -0
- package/dist/core/workflow-registry.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +0 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/rest.d.ts +5 -0
- package/dist/server/rest.d.ts.map +1 -1
- package/dist/server/rest.js +151 -12
- package/dist/server/rest.js.map +1 -1
- package/dist/server/runs.d.ts +33 -0
- package/dist/server/runs.d.ts.map +1 -0
- package/dist/server/runs.js +124 -0
- package/dist/server/runs.js.map +1 -0
- package/dist/shared/types.d.ts +157 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js +30 -0
- package/dist/shared/types.js.map +1 -1
- package/dist/web/assets/index-DM84J83Y.js +234 -0
- package/dist/web/assets/index-DemtWW4L.css +32 -0
- package/dist/web/index.html +2 -2
- package/package.json +4 -4
- package/dist/web/assets/index-BTm-QNRt.css +0 -32
- package/dist/web/assets/index-CvNiFngP.js +0 -204
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
var Ov=Object.defineProperty;var Bv=(k,I,F)=>I in k?Ov(k,I,{enumerable:!0,configurable:!0,writable:!0,value:F}):k[I]=F;var Ao=(k,I,F)=>Bv(k,typeof I!="symbol"?I+"":I,F);(function(){const I=document.createElement("link").relList;if(I&&I.supports&&I.supports("modulepreload"))return;for(const ie of document.querySelectorAll('link[rel="modulepreload"]'))O(ie);new MutationObserver(ie=>{for(const le of ie)if(le.type==="childList")for(const K of le.addedNodes)K.tagName==="LINK"&&K.rel==="modulepreload"&&O(K)}).observe(document,{childList:!0,subtree:!0});function F(ie){const le={};return ie.integrity&&(le.integrity=ie.integrity),ie.referrerPolicy&&(le.referrerPolicy=ie.referrerPolicy),ie.crossOrigin==="use-credentials"?le.credentials="include":ie.crossOrigin==="anonymous"?le.credentials="omit":le.credentials="same-origin",le}function O(ie){if(ie.ep)return;ie.ep=!0;const le=F(ie);fetch(ie.href,le)}})();var Do={exports:{}},Gr={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Gf;function Hv(){if(Gf)return Gr;Gf=1;var k=Symbol.for("react.transitional.element"),I=Symbol.for("react.fragment");function F(O,ie,le){var K=null;if(le!==void 0&&(K=""+le),ie.key!==void 0&&(K=""+ie.key),"key"in ie){le={};for(var u in ie)u!=="key"&&(le[u]=ie[u])}else le=ie;return ie=le.ref,{$$typeof:k,type:O,key:K,ref:ie!==void 0?ie:null,props:le}}return Gr.Fragment=I,Gr.jsx=F,Gr.jsxs=F,Gr}var Yf;function Nv(){return Yf||(Yf=1,Do.exports=Hv()),Do.exports}var M=Nv(),To={exports:{}},ye={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ff;function zv(){if(Ff)return ye;Ff=1;var k=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),le=Symbol.for("react.consumer"),K=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),m=Symbol.iterator;function y(A){return A===null||typeof A!="object"?null:(A=m&&A[m]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,c={};function o(A,L,Z){this.props=A,this.context=L,this.refs=c,this.updater=Z||E}o.prototype.isReactComponent={},o.prototype.setState=function(A,L){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,L,"setState")},o.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function n(){}n.prototype=o.prototype;function l(A,L,Z){this.props=A,this.context=L,this.refs=c,this.updater=Z||E}var _=l.prototype=new n;_.constructor=l,v(_,o.prototype),_.isPureReactComponent=!0;var b=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},g=Object.prototype.hasOwnProperty;function x(A,L,Z){var Y=Z.ref;return{$$typeof:k,type:A,key:L,ref:Y!==void 0?Y:null,props:Z}}function z(A,L){return x(A.type,L,A.props)}function U(A){return typeof A=="object"&&A!==null&&A.$$typeof===k}function j(A){var L={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(Z){return L[Z]})}var N=/\/+/g;function te(A,L){return typeof A=="object"&&A!==null&&A.key!=null?j(""+A.key):L.toString(36)}function oe(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(C,C):(A.status="pending",A.then(function(L){A.status==="pending"&&(A.status="fulfilled",A.value=L)},function(L){A.status==="pending"&&(A.status="rejected",A.reason=L)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function W(A,L,Z,Y,X){var Q=typeof A;(Q==="undefined"||Q==="boolean")&&(A=null);var H=!1;if(A===null)H=!0;else switch(Q){case"bigint":case"string":case"number":H=!0;break;case"object":switch(A.$$typeof){case k:case I:H=!0;break;case p:return H=A._init,W(H(A._payload),L,Z,Y,X)}}if(H)return X=X(A),H=Y===""?"."+te(A,0):Y,b(X)?(Z="",H!=null&&(Z=H.replace(N,"$&/")+"/"),W(X,L,Z,"",function(ae){return ae})):X!=null&&(U(X)&&(X=z(X,Z+(X.key==null||A&&A.key===X.key?"":(""+X.key).replace(N,"$&/")+"/")+H)),L.push(X)),1;H=0;var T=Y===""?".":Y+":";if(b(A))for(var se=0;se<A.length;se++)Y=A[se],Q=T+te(Y,se),H+=W(Y,L,Z,Q,X);else if(se=y(A),typeof se=="function")for(A=se.call(A),se=0;!(Y=A.next()).done;)Y=Y.value,Q=T+te(Y,se++),H+=W(Y,L,Z,Q,X);else if(Q==="object"){if(typeof A.then=="function")return W(oe(A),L,Z,Y,X);throw L=String(A),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return H}function G(A,L,Z){if(A==null)return A;var Y=[],X=0;return W(A,Y,"","",function(Q){return L.call(Z,Q,X++)}),Y}function re(A){if(A._status===-1){var L=A._result;L=L(),L.then(function(Z){(A._status===0||A._status===-1)&&(A._status=1,A._result=Z)},function(Z){(A._status===0||A._status===-1)&&(A._status=2,A._result=Z)}),A._status===-1&&(A._status=0,A._result=L)}if(A._status===1)return A._result.default;throw A._result}var D=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},B={map:G,forEach:function(A,L,Z){G(A,function(){L.apply(this,arguments)},Z)},count:function(A){var L=0;return G(A,function(){L++}),L},toArray:function(A){return G(A,function(L){return L})||[]},only:function(A){if(!U(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ye.Activity=h,ye.Children=B,ye.Component=o,ye.Fragment=F,ye.Profiler=ie,ye.PureComponent=l,ye.StrictMode=O,ye.Suspense=f,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,ye.__COMPILER_RUNTIME={__proto__:null,c:function(A){return w.H.useMemoCache(A)}},ye.cache=function(A){return function(){return A.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(A,L,Z){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var Y=v({},A.props),X=A.key;if(L!=null)for(Q in L.key!==void 0&&(X=""+L.key),L)!g.call(L,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&L.ref===void 0||(Y[Q]=L[Q]);var Q=arguments.length-2;if(Q===1)Y.children=Z;else if(1<Q){for(var H=Array(Q),T=0;T<Q;T++)H[T]=arguments[T+2];Y.children=H}return x(A.type,X,Y)},ye.createContext=function(A){return A={$$typeof:K,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:le,_context:A},A},ye.createElement=function(A,L,Z){var Y,X={},Q=null;if(L!=null)for(Y in L.key!==void 0&&(Q=""+L.key),L)g.call(L,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(X[Y]=L[Y]);var H=arguments.length-2;if(H===1)X.children=Z;else if(1<H){for(var T=Array(H),se=0;se<H;se++)T[se]=arguments[se+2];X.children=T}if(A&&A.defaultProps)for(Y in H=A.defaultProps,H)X[Y]===void 0&&(X[Y]=H[Y]);return x(A,Q,X)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(A){return{$$typeof:u,render:A}},ye.isValidElement=U,ye.lazy=function(A){return{$$typeof:p,_payload:{_status:-1,_result:A},_init:re}},ye.memo=function(A,L){return{$$typeof:d,type:A,compare:L===void 0?null:L}},ye.startTransition=function(A){var L=w.T,Z={};w.T=Z;try{var Y=A(),X=w.S;X!==null&&X(Z,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(C,D)}catch(Q){D(Q)}finally{L!==null&&Z.types!==null&&(L.types=Z.types),w.T=L}},ye.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},ye.use=function(A){return w.H.use(A)},ye.useActionState=function(A,L,Z){return w.H.useActionState(A,L,Z)},ye.useCallback=function(A,L){return w.H.useCallback(A,L)},ye.useContext=function(A){return w.H.useContext(A)},ye.useDebugValue=function(){},ye.useDeferredValue=function(A,L){return w.H.useDeferredValue(A,L)},ye.useEffect=function(A,L){return w.H.useEffect(A,L)},ye.useEffectEvent=function(A){return w.H.useEffectEvent(A)},ye.useId=function(){return w.H.useId()},ye.useImperativeHandle=function(A,L,Z){return w.H.useImperativeHandle(A,L,Z)},ye.useInsertionEffect=function(A,L){return w.H.useInsertionEffect(A,L)},ye.useLayoutEffect=function(A,L){return w.H.useLayoutEffect(A,L)},ye.useMemo=function(A,L){return w.H.useMemo(A,L)},ye.useOptimistic=function(A,L){return w.H.useOptimistic(A,L)},ye.useReducer=function(A,L,Z){return w.H.useReducer(A,L,Z)},ye.useRef=function(A){return w.H.useRef(A)},ye.useState=function(A){return w.H.useState(A)},ye.useSyncExternalStore=function(A,L,Z){return w.H.useSyncExternalStore(A,L,Z)},ye.useTransition=function(){return w.H.useTransition()},ye.version="19.2.7",ye}var Xf;function Po(){return Xf||(Xf=1,To.exports=zv()),To.exports}var ue=Po(),Ro={exports:{}},Yr={},ko={exports:{}},Lo={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Vf;function jv(){return Vf||(Vf=1,(function(k){function I(W,G){var re=W.length;W.push(G);e:for(;0<re;){var D=re-1>>>1,B=W[D];if(0<ie(B,G))W[D]=G,W[re]=B,re=D;else break e}}function F(W){return W.length===0?null:W[0]}function O(W){if(W.length===0)return null;var G=W[0],re=W.pop();if(re!==G){W[0]=re;e:for(var D=0,B=W.length,A=B>>>1;D<A;){var L=2*(D+1)-1,Z=W[L],Y=L+1,X=W[Y];if(0>ie(Z,re))Y<B&&0>ie(X,Z)?(W[D]=X,W[Y]=re,D=Y):(W[D]=Z,W[L]=re,D=L);else if(Y<B&&0>ie(X,re))W[D]=X,W[Y]=re,D=Y;else break e}}return G}function ie(W,G){var re=W.sortIndex-G.sortIndex;return re!==0?re:W.id-G.id}if(k.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var le=performance;k.unstable_now=function(){return le.now()}}else{var K=Date,u=K.now();k.unstable_now=function(){return K.now()-u}}var f=[],d=[],p=1,h=null,m=3,y=!1,E=!1,v=!1,c=!1,o=typeof setTimeout=="function"?setTimeout:null,n=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function _(W){for(var G=F(d);G!==null;){if(G.callback===null)O(d);else if(G.startTime<=W)O(d),G.sortIndex=G.expirationTime,I(f,G);else break;G=F(d)}}function b(W){if(v=!1,_(W),!E)if(F(f)!==null)E=!0,C||(C=!0,j());else{var G=F(d);G!==null&&oe(b,G.startTime-W)}}var C=!1,w=-1,g=5,x=-1;function z(){return c?!0:!(k.unstable_now()-x<g)}function U(){if(c=!1,C){var W=k.unstable_now();x=W;var G=!0;try{e:{E=!1,v&&(v=!1,n(w),w=-1),y=!0;var re=m;try{t:{for(_(W),h=F(f);h!==null&&!(h.expirationTime>W&&z());){var D=h.callback;if(typeof D=="function"){h.callback=null,m=h.priorityLevel;var B=D(h.expirationTime<=W);if(W=k.unstable_now(),typeof B=="function"){h.callback=B,_(W),G=!0;break t}h===F(f)&&O(f),_(W)}else O(f);h=F(f)}if(h!==null)G=!0;else{var A=F(d);A!==null&&oe(b,A.startTime-W),G=!1}}break e}finally{h=null,m=re,y=!1}G=void 0}}finally{G?j():C=!1}}}var j;if(typeof l=="function")j=function(){l(U)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,te=N.port2;N.port1.onmessage=U,j=function(){te.postMessage(null)}}else j=function(){o(U,0)};function oe(W,G){w=o(function(){W(k.unstable_now())},G)}k.unstable_IdlePriority=5,k.unstable_ImmediatePriority=1,k.unstable_LowPriority=4,k.unstable_NormalPriority=3,k.unstable_Profiling=null,k.unstable_UserBlockingPriority=2,k.unstable_cancelCallback=function(W){W.callback=null},k.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=0<W?Math.floor(1e3/W):5},k.unstable_getCurrentPriorityLevel=function(){return m},k.unstable_next=function(W){switch(m){case 1:case 2:case 3:var G=3;break;default:G=m}var re=m;m=G;try{return W()}finally{m=re}},k.unstable_requestPaint=function(){c=!0},k.unstable_runWithPriority=function(W,G){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var re=m;m=W;try{return G()}finally{m=re}},k.unstable_scheduleCallback=function(W,G,re){var D=k.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?D+re:D):re=D,W){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=re+B,W={id:p++,callback:G,priorityLevel:W,startTime:re,expirationTime:B,sortIndex:-1},re>D?(W.sortIndex=re,I(d,W),F(f)===null&&W===F(d)&&(v?(n(w),w=-1):v=!0,oe(b,re-D))):(W.sortIndex=B,I(f,W),E||y||(E=!0,C||(C=!0,j()))),W},k.unstable_shouldYield=z,k.unstable_wrapCallback=function(W){var G=m;return function(){var re=m;m=G;try{return W.apply(this,arguments)}finally{m=re}}}})(Lo)),Lo}var Zf;function Uv(){return Zf||(Zf=1,ko.exports=jv()),ko.exports}var Mo={exports:{}},ht={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Qf;function qv(){if(Qf)return ht;Qf=1;var k=Po();function I(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function F(){}var O={d:{f:F,r:function(){throw Error(I(522))},D:F,C:F,L:F,m:F,X:F,S:F,M:F},p:0,findDOMNode:null},ie=Symbol.for("react.portal");function le(f,d,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ie,key:h==null?null:""+h,children:f,containerInfo:d,implementation:p}}var K=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,ht.createPortal=function(f,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(I(299));return le(f,d,null,p)},ht.flushSync=function(f){var d=K.T,p=O.p;try{if(K.T=null,O.p=2,f)return f()}finally{K.T=d,O.p=p,O.d.f()}},ht.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,O.d.C(f,d))},ht.prefetchDNS=function(f){typeof f=="string"&&O.d.D(f)},ht.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var p=d.as,h=u(p,d.crossOrigin),m=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?O.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:m,fetchPriority:y}):p==="script"&&O.d.X(f,{crossOrigin:h,integrity:m,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ht.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=u(d.as,d.crossOrigin);O.d.M(f,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&O.d.M(f)},ht.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,h=u(p,d.crossOrigin);O.d.L(f,p,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ht.preloadModule=function(f,d){if(typeof f=="string")if(d){var p=u(d.as,d.crossOrigin);O.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else O.d.m(f)},ht.requestFormReset=function(f){O.d.r(f)},ht.unstable_batchedUpdates=function(f,d){return f(d)},ht.useFormState=function(f,d,p){return K.H.useFormState(f,d,p)},ht.useFormStatus=function(){return K.H.useHostTransitionStatus()},ht.version="19.2.7",ht}var $f;function Iv(){if($f)return Mo.exports;$f=1;function k(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(k)}catch(I){console.error(I)}}return k(),Mo.exports=qv(),Mo.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Jf;function Wv(){if(Jf)return Yr;Jf=1;var k=Uv(),I=Po(),F=Iv();function O(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 ie(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function le(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function K(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(le(e)!==e)throw Error(O(188))}function d(e){var t=e.alternate;if(!t){if(t=le(e),t===null)throw Error(O(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 f(r),e;if(a===s)return f(r),t;a=a.sibling}throw Error(O(188))}if(i.return!==s.return)i=r,s=a;else{for(var S=!1,R=r.child;R;){if(R===i){S=!0,i=r,s=a;break}if(R===s){S=!0,s=r,i=a;break}R=R.sibling}if(!S){for(R=a.child;R;){if(R===i){S=!0,i=a,s=r;break}if(R===s){S=!0,s=a,i=r;break}R=R.sibling}if(!S)throw Error(O(189))}}if(i.alternate!==s)throw Error(O(190))}if(i.tag!==3)throw Error(O(188));return i.stateNode.current===i?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),n=Symbol.for("react.consumer"),l=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function j(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var N=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case v:return"Fragment";case o:return"Profiler";case c:return"StrictMode";case b:return"Suspense";case C:return"SuspenseList";case x:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case l:return e.displayName||"Context";case n:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case g:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var oe=Array.isArray,W=I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=F.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},D=[],B=-1;function A(e){return{current:e}}function L(e){0>B||(e.current=D[B],D[B]=null,B--)}function Z(e,t){B++,D[B]=e.current,e.current=t}var Y=A(null),X=A(null),Q=A(null),H=A(null);function T(e,t){switch(Z(Q,t),Z(X,e),Z(Y,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?_f(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=_f(t),e=vf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(Y),Z(Y,e)}function se(){L(Y),L(X),L(Q)}function ae(e){e.memoizedState!==null&&Z(H,e);var t=Y.current,i=vf(t,e.type);t!==i&&(Z(X,e),Z(Y,i))}function _e(e){X.current===e&&(L(Y),L(X)),H.current===e&&(L(H),Ir._currentValue=re)}var de,we;function Me(e){if(de===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",we=-1<i.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+de+e+we}var Ue=!1;function tt(e,t){if(!e||Ue)return"";Ue=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ne){var ee=ne}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(ne){ee=ne}e.call(fe.prototype)}}else{try{throw Error()}catch(ne){ee=ne}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ne){if(ne&&ee&&typeof ne.stack=="string")return[ne.stack,ee.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(),S=a[0],R=a[1];if(S&&R){var q=S.split(`
|
|
44
|
-
`),J=R.split(`
|
|
45
|
-
`);for(r=s=0;s<q.length&&!q[s].includes("DetermineComponentFrameRoot");)s++;for(;r<J.length&&!J[r].includes("DetermineComponentFrameRoot");)r++;if(s===q.length||r===J.length)for(s=q.length-1,r=J.length-1;1<=s&&0<=r&&q[s]!==J[r];)r--;for(;1<=s&&0<=r;s--,r--)if(q[s]!==J[r]){if(s!==1||r!==1)do if(s--,r--,0>r||q[s]!==J[r]){var ce=`
|
|
46
|
-
`+q[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{Ue=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Me(i):""}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me("Lazy");case 13:return e.child!==t&&t!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return tt(e.type,!1);case 11:return tt(e.type.render,!1);case 1:return tt(e.type,!0);case 31:return Me("Activity");default:return""}}function _i(e){try{var t="",i=null;do t+=Se(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
-
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var Wi=Object.prototype.hasOwnProperty,Pi=k.unstable_scheduleCallback,Ki=k.unstable_cancelCallback,fs=k.unstable_shouldYield,dt=k.unstable_requestPaint,Je=k.unstable_now,Lt=k.unstable_getCurrentPriorityLevel,vi=k.unstable_ImmediatePriority,ds=k.unstable_UserBlockingPriority,bt=k.unstable_NormalPriority,_s=k.unstable_LowPriority,Wt=k.unstable_IdlePriority,Gi=k.log,qe=k.unstable_setDisableYieldValue,Yi=null,Ct=null;function mi(e){if(typeof Gi=="function"&&qe(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Yi,e)}catch{}}var wt=Math.clz32?Math.clz32:Sd,gd=Math.log,pd=Math.LN2;function Sd(e){return e>>>=0,e===0?32:31-(gd(e)/pd|0)|0}var Fr=256,Xr=262144,Vr=4194304;function Fi(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 Zr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,a=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var R=s&134217727;return R!==0?(s=R&~a,s!==0?r=Fi(s):(S&=R,S!==0?r=Fi(S):i||(i=R&~e,i!==0&&(r=Fi(i))))):(R=s&~a,R!==0?r=Fi(R):S!==0?r=Fi(S):i||(i=s&~e,i!==0&&(r=Fi(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 er(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yd(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 Xo(){var e=Vr;return Vr<<=1,(Vr&62914560)===0&&(Vr=4194304),e}function da(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function tr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bd(e,t,i,s,r,a){var S=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var R=e.entanglements,q=e.expirationTimes,J=e.hiddenUpdates;for(i=S&~i;0<i;){var ce=31-wt(i),fe=1<<ce;R[ce]=0,q[ce]=-1;var ee=J[ce];if(ee!==null)for(J[ce]=null,ce=0;ce<ee.length;ce++){var ne=ee[ce];ne!==null&&(ne.lane&=-536870913)}i&=~fe}s!==0&&Vo(e,s,0),a!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=a&~(S&~t))}function Vo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-wt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Zo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-wt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function Qo(e,t){var i=t&-t;return i=(i&42)!==0?1:_a(i),(i&(e.suspendedLanes|t))!==0?0:i}function _a(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 va(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $o(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:jf(e.type))}function Jo(e,t){var i=G.p;try{return G.p=e,t()}finally{G.p=i}}var gi=Math.random().toString(36).slice(2),rt="__reactFiber$"+gi,_t="__reactProps$"+gi,vs="__reactContainer$"+gi,ma="__reactEvents$"+gi,Cd="__reactListeners$"+gi,wd="__reactHandles$"+gi,ec="__reactResources$"+gi,ir="__reactMarker$"+gi;function ga(e){delete e[rt],delete e[_t],delete e[ma],delete e[Cd],delete e[wd]}function ms(e){var t=e[rt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[vs]||i[rt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Cf(e);e!==null;){if(i=e[rt])return i;e=Cf(e)}return t}e=i,i=e.parentNode}return null}function gs(e){if(e=e[rt]||e[vs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function sr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(O(33))}function ps(e){var t=e[ec];return t||(t=e[ec]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function it(e){e[ir]=!0}var tc=new Set,ic={};function Xi(e,t){Ss(e,t),Ss(e+"Capture",t)}function Ss(e,t){for(ic[e]=t,e=0;e<t.length;e++)tc.add(t[e])}var Ed=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]*$"),sc={},rc={};function xd(e){return Wi.call(rc,e)?!0:Wi.call(sc,e)?!1:Ed.test(e)?rc[e]=!0:(sc[e]=!0,!1)}function Qr(e,t,i){if(xd(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 $r(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 Zt(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 Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ad(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(S){i=""+S,a.call(this,S)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pa(e){if(!e._valueTracker){var t=nc(e)?"checked":"value";e._valueTracker=Ad(e,t,""+e[t])}}function ac(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=nc(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Jr(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 Dd=/[\n"\\]/g;function Ot(e){return e.replace(Dd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Sa(e,t,i,s,r,a,S,R){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),t!=null?S==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mt(t)):e.value!==""+Mt(t)&&(e.value=""+Mt(t)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),t!=null?ya(e,S,Mt(t)):i!=null?ya(e,S,Mt(i)):s!=null&&e.removeAttribute("value"),r==null&&a!=null&&(e.defaultChecked=!!a),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+Mt(R):e.removeAttribute("name")}function lc(e,t,i,s,r,a,S,R){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)){pa(e);return}i=i!=null?""+Mt(i):"",t=t!=null?""+Mt(t):i,R||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=R?e.checked:!!s,e.defaultChecked=!!s,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),pa(e)}function ya(e,t,i){t==="number"&&Jr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ys(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=""+Mt(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 oc(e,t,i){if(t!=null&&(t=""+Mt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Mt(i):""}function cc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(O(92));if(oe(s)){if(1<s.length)throw Error(O(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Mt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),pa(e)}function bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Td=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 uc(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||Td.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(O(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&&uc(e,r,s)}else for(var a in t)t.hasOwnProperty(a)&&uc(e,a,t[a])}function ba(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 Rd=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"]]),kd=/^[\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 en(e){return kd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var Ca=null;function wa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cs=null,ws=null;function fc(e){var t=gs(e);if(t&&(e=t.stateNode)){var i=e[_t]||null;e:switch(e=t.stateNode,t.type){case"input":if(Sa(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ot(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[_t]||null;if(!r)throw Error(O(90));Sa(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&&ac(s)}break e;case"textarea":oc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ys(e,!!i.multiple,t,!1)}}}var Ea=!1;function dc(e,t,i){if(Ea)return e(t,i);Ea=!0;try{var s=e(t);return s}finally{if(Ea=!1,(Cs!==null||ws!==null)&&(Wn(),Cs&&(t=Cs,e=ws,ws=Cs=null,fc(t),e)))for(t=0;t<e.length;t++)fc(e[t])}}function rr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[_t]||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(O(231,t,typeof i));return i}var $t=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xa=!1;if($t)try{var nr={};Object.defineProperty(nr,"passive",{get:function(){xa=!0}}),window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{xa=!1}var pi=null,Aa=null,tn=null;function _c(){if(tn)return tn;var e,t=Aa,i=t.length,s,r="value"in pi?pi.value:pi.textContent,a=r.length;for(e=0;e<i&&t[e]===r[e];e++);var S=i-e;for(s=1;s<=S&&t[i-s]===r[a-s];s++);return tn=r.slice(e,1<s?1-s:void 0)}function sn(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 rn(){return!0}function vc(){return!1}function vt(e){function t(i,s,r,a,S){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=a,this.target=S,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(i=e[R],this[R]=i?i(a):a[R]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?rn:vc,this.isPropagationStopped=vc,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var Vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=vt(Vi),ar=h({},Vi,{view:0,detail:0}),Ld=vt(ar),Da,Ta,lr,an=h({},ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ka,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!==lr&&(lr&&e.type==="mousemove"?(Da=e.screenX-lr.screenX,Ta=e.screenY-lr.screenY):Ta=Da=0,lr=e),Da)},movementY:function(e){return"movementY"in e?e.movementY:Ta}}),mc=vt(an),Md=h({},an,{dataTransfer:0}),Od=vt(Md),Bd=h({},ar,{relatedTarget:0}),Ra=vt(Bd),Hd=h({},Vi,{animationName:0,elapsedTime:0,pseudoElement:0}),Nd=vt(Hd),zd=h({},Vi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jd=vt(zd),Ud=h({},Vi,{data:0}),gc=vt(Ud),qd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Id={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"},Wd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wd[e])?!!t[e]:!1}function ka(){return Pd}var Kd=h({},ar,{key:function(e){if(e.key){var t=qd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=sn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Id[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ka,charCode:function(e){return e.type==="keypress"?sn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?sn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gd=vt(Kd),Yd=h({},an,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pc=vt(Yd),Fd=h({},ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ka}),Xd=vt(Fd),Vd=h({},Vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zd=vt(Vd),Qd=h({},an,{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}),$d=vt(Qd),Jd=h({},Vi,{newState:0,oldState:0}),e_=vt(Jd),t_=[9,13,27,32],La=$t&&"CompositionEvent"in window,or=null;$t&&"documentMode"in document&&(or=document.documentMode);var i_=$t&&"TextEvent"in window&&!or,Sc=$t&&(!La||or&&8<or&&11>=or),yc=" ",bc=!1;function Cc(e,t){switch(e){case"keyup":return t_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Es=!1;function s_(e,t){switch(e){case"compositionend":return wc(t);case"keypress":return t.which!==32?null:(bc=!0,yc);case"textInput":return e=t.data,e===yc&&bc?null:e;default:return null}}function r_(e,t){if(Es)return e==="compositionend"||!La&&Cc(e,t)?(e=_c(),tn=Aa=pi=null,Es=!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 Sc&&t.locale!=="ko"?null:t.data;default:return null}}var n_={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 Ec(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!n_[e.type]:t==="textarea"}function xc(e,t,i,s){Cs?ws?ws.push(s):ws=[s]:Cs=s,t=Vn(t,"onChange"),0<t.length&&(i=new nn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var cr=null,ur=null;function a_(e){of(e,0)}function ln(e){var t=sr(e);if(ac(t))return e}function Ac(e,t){if(e==="change")return t}var Dc=!1;if($t){var Ma;if($t){var Oa="oninput"in document;if(!Oa){var Tc=document.createElement("div");Tc.setAttribute("oninput","return;"),Oa=typeof Tc.oninput=="function"}Ma=Oa}else Ma=!1;Dc=Ma&&(!document.documentMode||9<document.documentMode)}function Rc(){cr&&(cr.detachEvent("onpropertychange",kc),ur=cr=null)}function kc(e){if(e.propertyName==="value"&&ln(ur)){var t=[];xc(t,ur,e,wa(e)),dc(a_,t)}}function l_(e,t,i){e==="focusin"?(Rc(),cr=t,ur=i,cr.attachEvent("onpropertychange",kc)):e==="focusout"&&Rc()}function o_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ln(ur)}function c_(e,t){if(e==="click")return ln(t)}function u_(e,t){if(e==="input"||e==="change")return ln(t)}function h_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:h_;function hr(e,t){if(Et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!Wi.call(t,r)||!Et(e[r],t[r]))return!1}return!0}function Lc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mc(e,t){var i=Lc(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=Lc(i)}}function Oc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Oc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Jr(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=Jr(e.document)}return t}function Ba(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 f_=$t&&"documentMode"in document&&11>=document.documentMode,xs=null,Ha=null,fr=null,Na=!1;function Hc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Na||xs==null||xs!==Jr(s)||(s=xs,"selectionStart"in s&&Ba(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}),fr&&hr(fr,s)||(fr=s,s=Vn(Ha,"onSelect"),0<s.length&&(t=new nn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=xs)))}function Zi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var As={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},za={},Nc={};$t&&(Nc=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function Qi(e){if(za[e])return za[e];if(!As[e])return e;var t=As[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Nc)return za[e]=t[i];return e}var zc=Qi("animationend"),jc=Qi("animationiteration"),Uc=Qi("animationstart"),d_=Qi("transitionrun"),__=Qi("transitionstart"),v_=Qi("transitioncancel"),qc=Qi("transitionend"),Ic=new Map,ja="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(" ");ja.push("scrollEnd");function Pt(e,t){Ic.set(e,t),Xi(t,[e])}var on=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bt=[],Ds=0,Ua=0;function cn(){for(var e=Ds,t=Ua=Ds=0;t<e;){var i=Bt[t];Bt[t++]=null;var s=Bt[t];Bt[t++]=null;var r=Bt[t];Bt[t++]=null;var a=Bt[t];if(Bt[t++]=null,s!==null&&r!==null){var S=s.pending;S===null?r.next=r:(r.next=S.next,S.next=r),s.pending=r}a!==0&&Wc(i,r,a)}}function un(e,t,i,s){Bt[Ds++]=e,Bt[Ds++]=t,Bt[Ds++]=i,Bt[Ds++]=s,Ua|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function qa(e,t,i,s){return un(e,t,i,s),hn(e)}function $i(e,t){return un(e,null,null,t),hn(e)}function Wc(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-wt(i),e=a.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),a):null}function hn(e){if(50<Br)throw Br=0,Vl=null,Error(O(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ts={};function m_(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 xt(e,t,i,s){return new m_(e,t,i,s)}function Ia(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jt(e,t){var i=e.alternate;return i===null?(i=xt(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 Pc(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 fn(e,t,i,s,r,a){var S=0;if(s=e,typeof e=="function")Ia(e)&&(S=1);else if(typeof e=="string")S=bv(e,i,Y.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case x:return e=xt(31,i,t,r),e.elementType=x,e.lanes=a,e;case v:return Ji(i.children,r,a,t);case c:S=8,r|=24;break;case o:return e=xt(12,i,t,r|2),e.elementType=o,e.lanes=a,e;case b:return e=xt(13,i,t,r),e.elementType=b,e.lanes=a,e;case C:return e=xt(19,i,t,r),e.elementType=C,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:S=10;break e;case n:S=9;break e;case _:S=11;break e;case w:S=14;break e;case g:S=16,s=null;break e}S=29,i=Error(O(130,e===null?"null":typeof e,"")),s=null}return t=xt(S,i,t,r),t.elementType=e,t.type=s,t.lanes=a,t}function Ji(e,t,i,s){return e=xt(7,e,s,t),e.lanes=i,e}function Wa(e,t,i){return e=xt(6,e,null,t),e.lanes=i,e}function Kc(e){var t=xt(18,null,null,0);return t.stateNode=e,t}function Pa(e,t,i){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gc=new WeakMap;function Ht(e,t){if(typeof e=="object"&&e!==null){var i=Gc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:_i(t)},Gc.set(e,t),t)}return{value:e,source:t,stack:_i(t)}}var Rs=[],ks=0,dn=null,dr=0,Nt=[],zt=0,Si=null,Yt=1,Ft="";function ei(e,t){Rs[ks++]=dr,Rs[ks++]=dn,dn=e,dr=t}function Yc(e,t,i){Nt[zt++]=Yt,Nt[zt++]=Ft,Nt[zt++]=Si,Si=e;var s=Yt;e=Ft;var r=32-wt(s)-1;s&=~(1<<r),i+=1;var a=32-wt(t)+r;if(30<a){var S=r-r%5;a=(s&(1<<S)-1).toString(32),s>>=S,r-=S,Yt=1<<32-wt(t)+r|i<<r|s,Ft=a+e}else Yt=1<<a|i<<r|s,Ft=e}function Ka(e){e.return!==null&&(ei(e,1),Yc(e,1,0))}function Ga(e){for(;e===dn;)dn=Rs[--ks],Rs[ks]=null,dr=Rs[--ks],Rs[ks]=null;for(;e===Si;)Si=Nt[--zt],Nt[zt]=null,Ft=Nt[--zt],Nt[zt]=null,Yt=Nt[--zt],Nt[zt]=null}function Fc(e,t){Nt[zt++]=Yt,Nt[zt++]=Ft,Nt[zt++]=Si,Yt=t.id,Ft=t.overflow,Si=e}var nt=null,Ie=null,Te=!1,yi=null,jt=!1,Ya=Error(O(519));function bi(e){var t=Error(O(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _r(Ht(t,e)),Ya}function Xc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[rt]=e,t[_t]=s,i){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(i=0;i<Nr.length;i++)xe(Nr[i],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),lc(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),cc(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||ff(t.textContent,i)?(s.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),s.onScroll!=null&&xe("scroll",t),s.onScrollEnd!=null&&xe("scrollend",t),s.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||bi(e,!0)}function Vc(e){for(nt=e.return;nt;)switch(nt.tag){case 5:case 31:case 13:jt=!1;return;case 27:case 3:jt=!0;return;default:nt=nt.return}}function Ls(e){if(e!==nt)return!1;if(!Te)return Vc(e),Te=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||uo(e.type,e.memoizedProps)),i=!i),i&&Ie&&bi(e),Vc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));Ie=bf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));Ie=bf(e)}else t===27?(t=Ie,Hi(e.type)?(e=mo,mo=null,Ie=e):Ie=t):Ie=nt?qt(e.stateNode.nextSibling):null;return!0}function es(){Ie=nt=null,Te=!1}function Fa(){var e=yi;return e!==null&&(St===null?St=e:St.push.apply(St,e),yi=null),e}function _r(e){yi===null?yi=[e]:yi.push(e)}var Xa=A(null),ts=null,ti=null;function Ci(e,t,i){Z(Xa,t._currentValue),t._currentValue=i}function ii(e){e._currentValue=Xa.current,L(Xa)}function Va(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 Za(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var a=r.dependencies;if(a!==null){var S=r.child;a=a.firstContext;e:for(;a!==null;){var R=a;a=r;for(var q=0;q<t.length;q++)if(R.context===t[q]){a.lanes|=i,R=a.alternate,R!==null&&(R.lanes|=i),Va(a.return,i,e),s||(S=null);break e}a=R.next}}else if(r.tag===18){if(S=r.return,S===null)throw Error(O(341));S.lanes|=i,a=S.alternate,a!==null&&(a.lanes|=i),Va(S,i,e),S=null}else S=r.child;if(S!==null)S.return=r;else for(S=r;S!==null;){if(S===e){S=null;break}if(r=S.sibling,r!==null){r.return=S.return,S=r;break}S=S.return}r=S}}function Ms(e,t,i,s){e=null;for(var r=t,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 S=r.alternate;if(S===null)throw Error(O(387));if(S=S.memoizedProps,S!==null){var R=r.type;Et(r.pendingProps.value,S.value)||(e!==null?e.push(R):e=[R])}}else if(r===H.current){if(S=r.alternate,S===null)throw Error(O(387));S.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Ir):e=[Ir])}r=r.return}e!==null&&Za(t,e,i,s),t.flags|=262144}function _n(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function is(e){ts=e,ti=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function at(e){return Zc(ts,e)}function vn(e,t){return ts===null&&is(e),Zc(e,t)}function Zc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ti===null){if(e===null)throw Error(O(308));ti=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ti=ti.next=t;return i}var g_=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()})}},p_=k.unstable_scheduleCallback,S_=k.unstable_NormalPriority,Ve={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qa(){return{controller:new g_,data:new Map,refCount:0}}function vr(e){e.refCount--,e.refCount===0&&p_(S_,function(){e.controller.abort()})}var mr=null,$a=0,Os=0,Bs=null;function y_(e,t){if(mr===null){var i=mr=[];$a=0,Os=to(),Bs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return $a++,t.then(Qc,Qc),t}function Qc(){if(--$a===0&&mr!==null){Bs!==null&&(Bs.status="fulfilled");var e=mr;mr=null,Os=0,Bs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function b_(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 $c=W.S;W.S=function(e,t){Hh=Je(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&y_(e,t),$c!==null&&$c(e,t)};var ss=A(null);function Ja(){var e=ss.current;return e!==null?e:je.pooledCache}function mn(e,t){t===null?Z(ss,ss.current):Z(ss,t.pool)}function Jc(){var e=Ja();return e===null?null:{parent:Ve._currentValue,pool:e}}var Hs=Error(O(460)),el=Error(O(474)),gn=Error(O(542)),pn={then:function(){}};function eu(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(Qt,Qt),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,su(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=je,e!==null&&100<e.shellSuspendCounter)throw Error(O(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,su(e),e}throw ns=t,Hs}}function rs(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ns=i,Hs):i}}var ns=null;function iu(){if(ns===null)throw Error(O(459));var e=ns;return ns=null,e}function su(e){if(e===Hs||e===gn)throw Error(O(483))}var Ns=null,gr=0;function Sn(e){var t=gr;return gr+=1,Ns===null&&(Ns=[]),tu(Ns,e,t)}function pr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yn(e,t){throw t.$$typeof===m?Error(O(525)):(e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ru(e){function t(V,P){if(e){var $=V.deletions;$===null?(V.deletions=[P],V.flags|=16):$.push(P)}}function i(V,P){if(!e)return null;for(;P!==null;)t(V,P),P=P.sibling;return null}function s(V){for(var P=new Map;V!==null;)V.key!==null?P.set(V.key,V):P.set(V.index,V),V=V.sibling;return P}function r(V,P){return V=Jt(V,P),V.index=0,V.sibling=null,V}function a(V,P,$){return V.index=$,e?($=V.alternate,$!==null?($=$.index,$<P?(V.flags|=67108866,P):$):(V.flags|=67108866,P)):(V.flags|=1048576,P)}function S(V){return e&&V.alternate===null&&(V.flags|=67108866),V}function R(V,P,$,he){return P===null||P.tag!==6?(P=Wa($,V.mode,he),P.return=V,P):(P=r(P,$),P.return=V,P)}function q(V,P,$,he){var ge=$.type;return ge===v?ce(V,P,$.props.children,he,$.key):P!==null&&(P.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===g&&rs(ge)===P.type)?(P=r(P,$.props),pr(P,$),P.return=V,P):(P=fn($.type,$.key,$.props,null,V.mode,he),pr(P,$),P.return=V,P)}function J(V,P,$,he){return P===null||P.tag!==4||P.stateNode.containerInfo!==$.containerInfo||P.stateNode.implementation!==$.implementation?(P=Pa($,V.mode,he),P.return=V,P):(P=r(P,$.children||[]),P.return=V,P)}function ce(V,P,$,he,ge){return P===null||P.tag!==7?(P=Ji($,V.mode,he,ge),P.return=V,P):(P=r(P,$),P.return=V,P)}function fe(V,P,$){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Wa(""+P,V.mode,$),P.return=V,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case y:return $=fn(P.type,P.key,P.props,null,V.mode,$),pr($,P),$.return=V,$;case E:return P=Pa(P,V.mode,$),P.return=V,P;case g:return P=rs(P),fe(V,P,$)}if(oe(P)||j(P))return P=Ji(P,V.mode,$,null),P.return=V,P;if(typeof P.then=="function")return fe(V,Sn(P),$);if(P.$$typeof===l)return fe(V,vn(V,P),$);yn(V,P)}return null}function ee(V,P,$,he){var ge=P!==null?P.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return ge!==null?null:R(V,P,""+$,he);if(typeof $=="object"&&$!==null){switch($.$$typeof){case y:return $.key===ge?q(V,P,$,he):null;case E:return $.key===ge?J(V,P,$,he):null;case g:return $=rs($),ee(V,P,$,he)}if(oe($)||j($))return ge!==null?null:ce(V,P,$,he,null);if(typeof $.then=="function")return ee(V,P,Sn($),he);if($.$$typeof===l)return ee(V,P,vn(V,$),he);yn(V,$)}return null}function ne(V,P,$,he,ge){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return V=V.get($)||null,R(P,V,""+he,ge);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case y:return V=V.get(he.key===null?$:he.key)||null,q(P,V,he,ge);case E:return V=V.get(he.key===null?$:he.key)||null,J(P,V,he,ge);case g:return he=rs(he),ne(V,P,$,he,ge)}if(oe(he)||j(he))return V=V.get($)||null,ce(P,V,he,ge,null);if(typeof he.then=="function")return ne(V,P,$,Sn(he),ge);if(he.$$typeof===l)return ne(V,P,$,vn(P,he),ge);yn(P,he)}return null}function ve(V,P,$,he){for(var ge=null,Re=null,me=P,Ce=P=0,De=null;me!==null&&Ce<$.length;Ce++){me.index>Ce?(De=me,me=null):De=me.sibling;var ke=ee(V,me,$[Ce],he);if(ke===null){me===null&&(me=De);break}e&&me&&ke.alternate===null&&t(V,me),P=a(ke,P,Ce),Re===null?ge=ke:Re.sibling=ke,Re=ke,me=De}if(Ce===$.length)return i(V,me),Te&&ei(V,Ce),ge;if(me===null){for(;Ce<$.length;Ce++)me=fe(V,$[Ce],he),me!==null&&(P=a(me,P,Ce),Re===null?ge=me:Re.sibling=me,Re=me);return Te&&ei(V,Ce),ge}for(me=s(me);Ce<$.length;Ce++)De=ne(me,V,Ce,$[Ce],he),De!==null&&(e&&De.alternate!==null&&me.delete(De.key===null?Ce:De.key),P=a(De,P,Ce),Re===null?ge=De:Re.sibling=De,Re=De);return e&&me.forEach(function(qi){return t(V,qi)}),Te&&ei(V,Ce),ge}function pe(V,P,$,he){if($==null)throw Error(O(151));for(var ge=null,Re=null,me=P,Ce=P=0,De=null,ke=$.next();me!==null&&!ke.done;Ce++,ke=$.next()){me.index>Ce?(De=me,me=null):De=me.sibling;var qi=ee(V,me,ke.value,he);if(qi===null){me===null&&(me=De);break}e&&me&&qi.alternate===null&&t(V,me),P=a(qi,P,Ce),Re===null?ge=qi:Re.sibling=qi,Re=qi,me=De}if(ke.done)return i(V,me),Te&&ei(V,Ce),ge;if(me===null){for(;!ke.done;Ce++,ke=$.next())ke=fe(V,ke.value,he),ke!==null&&(P=a(ke,P,Ce),Re===null?ge=ke:Re.sibling=ke,Re=ke);return Te&&ei(V,Ce),ge}for(me=s(me);!ke.done;Ce++,ke=$.next())ke=ne(me,V,Ce,ke.value,he),ke!==null&&(e&&ke.alternate!==null&&me.delete(ke.key===null?Ce:ke.key),P=a(ke,P,Ce),Re===null?ge=ke:Re.sibling=ke,Re=ke);return e&&me.forEach(function(Mv){return t(V,Mv)}),Te&&ei(V,Ce),ge}function ze(V,P,$,he){if(typeof $=="object"&&$!==null&&$.type===v&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case y:e:{for(var ge=$.key;P!==null;){if(P.key===ge){if(ge=$.type,ge===v){if(P.tag===7){i(V,P.sibling),he=r(P,$.props.children),he.return=V,V=he;break e}}else if(P.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===g&&rs(ge)===P.type){i(V,P.sibling),he=r(P,$.props),pr(he,$),he.return=V,V=he;break e}i(V,P);break}else t(V,P);P=P.sibling}$.type===v?(he=Ji($.props.children,V.mode,he,$.key),he.return=V,V=he):(he=fn($.type,$.key,$.props,null,V.mode,he),pr(he,$),he.return=V,V=he)}return S(V);case E:e:{for(ge=$.key;P!==null;){if(P.key===ge)if(P.tag===4&&P.stateNode.containerInfo===$.containerInfo&&P.stateNode.implementation===$.implementation){i(V,P.sibling),he=r(P,$.children||[]),he.return=V,V=he;break e}else{i(V,P);break}else t(V,P);P=P.sibling}he=Pa($,V.mode,he),he.return=V,V=he}return S(V);case g:return $=rs($),ze(V,P,$,he)}if(oe($))return ve(V,P,$,he);if(j($)){if(ge=j($),typeof ge!="function")throw Error(O(150));return $=ge.call($),pe(V,P,$,he)}if(typeof $.then=="function")return ze(V,P,Sn($),he);if($.$$typeof===l)return ze(V,P,vn(V,$),he);yn(V,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,P!==null&&P.tag===6?(i(V,P.sibling),he=r(P,$),he.return=V,V=he):(i(V,P),he=Wa($,V.mode,he),he.return=V,V=he),S(V)):i(V,P)}return function(V,P,$,he){try{gr=0;var ge=ze(V,P,$,he);return Ns=null,ge}catch(me){if(me===Hs||me===gn)throw me;var Re=xt(29,me,null,V.mode);return Re.lanes=he,Re.return=V,Re}finally{}}}var as=ru(!0),nu=ru(!1),wi=!1;function tl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function il(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Le&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=hn(e),Wc(e,null,i),t}return un(e,s,t,i),hn(e)}function Sr(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,Zo(e,i)}}function sl(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 S={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};a===null?r=a=S:a=a.next=S,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 rl=!1;function yr(){if(rl){var e=Bs;if(e!==null)throw e}}function br(e,t,i,s){rl=!1;var r=e.updateQueue;wi=!1;var a=r.firstBaseUpdate,S=r.lastBaseUpdate,R=r.shared.pending;if(R!==null){r.shared.pending=null;var q=R,J=q.next;q.next=null,S===null?a=J:S.next=J,S=q;var ce=e.alternate;ce!==null&&(ce=ce.updateQueue,R=ce.lastBaseUpdate,R!==S&&(R===null?ce.firstBaseUpdate=J:R.next=J,ce.lastBaseUpdate=q))}if(a!==null){var fe=r.baseState;S=0,ce=J=q=null,R=a;do{var ee=R.lane&-536870913,ne=ee!==R.lane;if(ne?(Ae&ee)===ee:(s&ee)===ee){ee!==0&&ee===Os&&(rl=!0),ce!==null&&(ce=ce.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ve=e,pe=R;ee=t;var ze=i;switch(pe.tag){case 1:if(ve=pe.payload,typeof ve=="function"){fe=ve.call(ze,fe,ee);break e}fe=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=pe.payload,ee=typeof ve=="function"?ve.call(ze,fe,ee):ve,ee==null)break e;fe=h({},fe,ee);break e;case 2:wi=!0}}ee=R.callback,ee!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=r.callbacks,ne===null?r.callbacks=[ee]:ne.push(ee))}else ne={lane:ee,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ce===null?(J=ce=ne,q=fe):ce=ce.next=ne,S|=ee;if(R=R.next,R===null){if(R=r.shared.pending,R===null)break;ne=R,R=ne.next,ne.next=null,r.lastBaseUpdate=ne,r.shared.pending=null}}while(!0);ce===null&&(q=fe),r.baseState=q,r.firstBaseUpdate=J,r.lastBaseUpdate=ce,a===null&&(r.shared.lanes=0),ki|=S,e.lanes=S,e.memoizedState=fe}}function au(e,t){if(typeof e!="function")throw Error(O(191,e));e.call(t)}function lu(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)au(i[e],t)}var zs=A(null),bn=A(0);function ou(e,t){e=hi,Z(bn,e),Z(zs,t),hi=e|t.baseLanes}function nl(){Z(bn,hi),Z(zs,zs.current)}function al(){hi=bn.current,L(zs),L(bn)}var At=A(null),Ut=null;function Ai(e){var t=e.alternate;Z(Fe,Fe.current&1),Z(At,e),Ut===null&&(t===null||zs.current!==null||t.memoizedState!==null)&&(Ut=e)}function ll(e){Z(Fe,Fe.current),Z(At,e),Ut===null&&(Ut=e)}function cu(e){e.tag===22?(Z(Fe,Fe.current),Z(At,e),Ut===null&&(Ut=e)):Di()}function Di(){Z(Fe,Fe.current),Z(At,At.current)}function Dt(e){L(At),Ut===e&&(Ut=null),L(Fe)}var Fe=A(0);function Cn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||_o(i)||vo(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 si=0,be=null,He=null,Ze=null,wn=!1,js=!1,ls=!1,En=0,Cr=0,Us=null,C_=0;function Ke(){throw Error(O(321))}function ol(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Et(e[i],t[i]))return!1;return!0}function cl(e,t,i,s,r,a){return si=a,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,W.H=e===null||e.memoizedState===null?Yu:El,ls=!1,a=i(s,r),ls=!1,js&&(a=hu(t,i,s,r)),uu(e),a}function uu(e){W.H=xr;var t=He!==null&&He.next!==null;if(si=0,Ze=He=be=null,wn=!1,Cr=0,Us=null,t)throw Error(O(300));e===null||Qe||(e=e.dependencies,e!==null&&_n(e)&&(Qe=!0))}function hu(e,t,i,s){be=e;var r=0;do{if(js&&(Us=null),Cr=0,js=!1,25<=r)throw Error(O(301));if(r+=1,Ze=He=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}W.H=Fu,a=t(i,s)}while(js);return a}function w_(){var e=W.H,t=e.useState()[0];return t=typeof t.then=="function"?wr(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(be.flags|=1024),t}function ul(){var e=En!==0;return En=0,e}function hl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function fl(e){if(wn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}wn=!1}si=0,Ze=He=be=null,js=!1,Cr=En=0,Us=null}function ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?be.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Xe(){if(He===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=Ze===null?be.memoizedState:Ze.next;if(t!==null)Ze=t,He=e;else{if(e===null)throw be.alternate===null?Error(O(467)):Error(O(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},Ze===null?be.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function xn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wr(e){var t=Cr;return Cr+=1,Us===null&&(Us=[]),e=tu(Us,e,t),t=be,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,W.H=t===null||t.memoizedState===null?Yu:El),e}function An(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return wr(e);if(e.$$typeof===l)return at(e)}throw Error(O(438,String(e)))}function dl(e){var t=null,i=be.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=be.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=xn(),be.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=z;return t.index++,i}function ri(e,t){return typeof t=="function"?t(e):t}function Dn(e){var t=Xe();return _l(t,He,e)}function _l(e,t,i){var s=e.queue;if(s===null)throw Error(O(311));s.lastRenderedReducer=i;var r=e.baseQueue,a=s.pending;if(a!==null){if(r!==null){var S=r.next;r.next=a.next,a.next=S}t.baseQueue=r=a,s.pending=null}if(a=e.baseState,r===null)e.memoizedState=a;else{t=r.next;var R=S=null,q=null,J=t,ce=!1;do{var fe=J.lane&-536870913;if(fe!==J.lane?(Ae&fe)===fe:(si&fe)===fe){var ee=J.revertLane;if(ee===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),fe===Os&&(ce=!0);else if((si&ee)===ee){J=J.next,ee===Os&&(ce=!0);continue}else fe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},q===null?(R=q=fe,S=a):q=q.next=fe,be.lanes|=ee,ki|=ee;fe=J.action,ls&&i(a,fe),a=J.hasEagerState?J.eagerState:i(a,fe)}else ee={lane:fe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},q===null?(R=q=ee,S=a):q=q.next=ee,be.lanes|=fe,ki|=fe;J=J.next}while(J!==null&&J!==t);if(q===null?S=a:q.next=R,!Et(a,e.memoizedState)&&(Qe=!0,ce&&(i=Bs,i!==null)))throw i;e.memoizedState=a,e.baseState=S,e.baseQueue=q,s.lastRenderedState=a}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function vl(e){var t=Xe(),i=t.queue;if(i===null)throw Error(O(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,a=t.memoizedState;if(r!==null){i.pending=null;var S=r=r.next;do a=e(a,S.action),S=S.next;while(S!==r);Et(a,t.memoizedState)||(Qe=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),i.lastRenderedState=a}return[a,s]}function fu(e,t,i){var s=be,r=Xe(),a=Te;if(a){if(i===void 0)throw Error(O(407));i=i()}else i=t();var S=!Et((He||r).memoizedState,i);if(S&&(r.memoizedState=i,Qe=!0),r=r.queue,pl(vu.bind(null,s,r,e),[e]),r.getSnapshot!==t||S||Ze!==null&&Ze.memoizedState.tag&1){if(s.flags|=2048,qs(9,{destroy:void 0},_u.bind(null,s,r,i,t),null),je===null)throw Error(O(349));a||(si&127)!==0||du(s,t,i)}return i}function du(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=be.updateQueue,t===null?(t=xn(),be.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function _u(e,t,i,s){t.value=i,t.getSnapshot=s,mu(t)&&gu(e)}function vu(e,t,i){return i(function(){mu(t)&&gu(e)})}function mu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Et(e,i)}catch{return!0}}function gu(e){var t=$i(e,2);t!==null&&yt(t,e,2)}function ml(e){var t=ft();if(typeof e=="function"){var i=e;if(e=i(),ls){mi(!0);try{i()}finally{mi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:e},t}function pu(e,t,i,s){return e.baseState=i,_l(e,He,typeof s=="function"?s:ri)}function E_(e,t,i,s,r){if(kn(e))throw Error(O(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(S){a.listeners.push(S)}};W.T!==null?i(!0):a.isTransition=!1,s(a),i=t.pending,i===null?(a.next=t.pending=a,Su(t,a)):(a.next=i.next,t.pending=i.next=a)}}function Su(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var a=W.T,S={};W.T=S;try{var R=i(r,s),q=W.S;q!==null&&q(S,R),yu(e,t,R)}catch(J){gl(e,t,J)}finally{a!==null&&S.types!==null&&(a.types=S.types),W.T=a}}else try{a=i(r,s),yu(e,t,a)}catch(J){gl(e,t,J)}}function yu(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){bu(e,t,s)},function(s){return gl(e,t,s)}):bu(e,t,i)}function bu(e,t,i){t.status="fulfilled",t.value=i,Cu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Su(e,i)))}function gl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Cu(t),t=t.next;while(t!==s)}e.action=null}function Cu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function wu(e,t){return t}function Eu(e,t){if(Te){var i=je.formState;if(i!==null){e:{var s=be;if(Te){if(Ie){t:{for(var r=Ie,a=jt;r.nodeType!==8;){if(!a){r=null;break t}if(r=qt(r.nextSibling),r===null){r=null;break t}}a=r.data,r=a==="F!"||a==="F"?r:null}if(r){Ie=qt(r.nextSibling),s=r.data==="F!";break e}}bi(s)}s=!1}s&&(t=i[0])}}return i=ft(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wu,lastRenderedState:t},i.queue=s,i=Pu.bind(null,be,s),s.dispatch=i,s=ml(!1),a=wl.bind(null,be,!1,s.queue),s=ft(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=E_.bind(null,be,r,a,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function xu(e){var t=Xe();return Au(t,He,e)}function Au(e,t,i){if(t=_l(e,t,wu)[0],e=Dn(ri)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=wr(t)}catch(S){throw S===Hs?gn:S}else s=t;t=Xe();var r=t.queue,a=r.dispatch;return i!==t.memoizedState&&(be.flags|=2048,qs(9,{destroy:void 0},x_.bind(null,r,i),null)),[s,a,e]}function x_(e,t){e.action=t}function Du(e){var t=Xe(),i=He;if(i!==null)return Au(t,i,e);Xe(),t=t.memoizedState,i=Xe();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function qs(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=be.updateQueue,t===null&&(t=xn(),be.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Tu(){return Xe().memoizedState}function Tn(e,t,i,s){var r=ft();be.flags|=e,r.memoizedState=qs(1|t,{destroy:void 0},i,s===void 0?null:s)}function Rn(e,t,i,s){var r=Xe();s=s===void 0?null:s;var a=r.memoizedState.inst;He!==null&&s!==null&&ol(s,He.memoizedState.deps)?r.memoizedState=qs(t,a,i,s):(be.flags|=e,r.memoizedState=qs(1|t,a,i,s))}function Ru(e,t){Tn(8390656,8,e,t)}function pl(e,t){Rn(2048,8,e,t)}function A_(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=xn(),be.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function ku(e){var t=Xe().memoizedState;return A_({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(O(440));return t.impl.apply(void 0,arguments)}}function Lu(e,t){return Rn(4,2,e,t)}function Mu(e,t){return Rn(4,4,e,t)}function Ou(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 Bu(e,t,i){i=i!=null?i.concat([e]):null,Rn(4,4,Ou.bind(null,t,e),i)}function Sl(){}function Hu(e,t){var i=Xe();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ol(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Nu(e,t){var i=Xe();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ol(t,s[1]))return s[0];if(s=e(),ls){mi(!0);try{e()}finally{mi(!1)}}return i.memoizedState=[s,t],s}function yl(e,t,i){return i===void 0||(si&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=zh(),be.lanes|=e,ki|=e,i)}function zu(e,t,i,s){return Et(i,t)?i:zs.current!==null?(e=yl(e,i,s),Et(e,t)||(Qe=!0),e):(si&42)===0||(si&1073741824)!==0&&(Ae&261930)===0?(Qe=!0,e.memoizedState=i):(e=zh(),be.lanes|=e,ki|=e,t)}function ju(e,t,i,s,r){var a=G.p;G.p=a!==0&&8>a?a:8;var S=W.T,R={};W.T=R,wl(e,!1,t,i);try{var q=r(),J=W.S;if(J!==null&&J(R,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var ce=b_(q,s);Er(e,t,ce,kt(e))}else Er(e,t,s,kt(e))}catch(fe){Er(e,t,{then:function(){},status:"rejected",reason:fe},kt())}finally{G.p=a,S!==null&&R.types!==null&&(S.types=R.types),W.T=S}}function D_(){}function bl(e,t,i,s){if(e.tag!==5)throw Error(O(476));var r=Uu(e).queue;ju(e,r,t,re,i===null?D_:function(){return qu(e),i(s)})}function Uu(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:re},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function qu(e){var t=Uu(e);t.next===null&&(t=e.alternate.memoizedState),Er(e,t.next.queue,{},kt())}function Cl(){return at(Ir)}function Iu(){return Xe().memoizedState}function Wu(){return Xe().memoizedState}function T_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=kt();e=Ei(i);var s=xi(t,e,i);s!==null&&(yt(s,t,i),Sr(s,t,i)),t={cache:Qa()},e.payload=t;return}t=t.return}}function R_(e,t,i){var s=kt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},kn(e)?Ku(t,i):(i=qa(e,t,i,s),i!==null&&(yt(i,e,s),Gu(i,t,s)))}function Pu(e,t,i){var s=kt();Er(e,t,i,s)}function Er(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(kn(e))Ku(t,r);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var S=t.lastRenderedState,R=a(S,i);if(r.hasEagerState=!0,r.eagerState=R,Et(R,S))return un(e,t,r,0),je===null&&cn(),!1}catch{}finally{}if(i=qa(e,t,r,s),i!==null)return yt(i,e,s),Gu(i,t,s),!0}return!1}function wl(e,t,i,s){if(s={lane:2,revertLane:to(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},kn(e)){if(t)throw Error(O(479))}else t=qa(e,i,s,2),t!==null&&yt(t,e,2)}function kn(e){var t=e.alternate;return e===be||t!==null&&t===be}function Ku(e,t){js=wn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Gu(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Zo(e,i)}}var xr={readContext:at,use:An,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useInsertionEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useSyncExternalStore:Ke,useId:Ke,useHostTransitionStatus:Ke,useFormState:Ke,useActionState:Ke,useOptimistic:Ke,useMemoCache:Ke,useCacheRefresh:Ke};xr.useEffectEvent=Ke;var Yu={readContext:at,use:An,useCallback:function(e,t){return ft().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Ru,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Tn(4194308,4,Ou.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Tn(4194308,4,e,t)},useInsertionEffect:function(e,t){Tn(4,2,e,t)},useMemo:function(e,t){var i=ft();t=t===void 0?null:t;var s=e();if(ls){mi(!0);try{e()}finally{mi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=ft();if(i!==void 0){var r=i(t);if(ls){mi(!0);try{i(t)}finally{mi(!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=R_.bind(null,be,e),[s.memoizedState,e]},useRef:function(e){var t=ft();return e={current:e},t.memoizedState=e},useState:function(e){e=ml(e);var t=e.queue,i=Pu.bind(null,be,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Sl,useDeferredValue:function(e,t){var i=ft();return yl(i,e,t)},useTransition:function(){var e=ml(!1);return e=ju.bind(null,be,e.queue,!0,!1),ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=be,r=ft();if(Te){if(i===void 0)throw Error(O(407));i=i()}else{if(i=t(),je===null)throw Error(O(349));(Ae&127)!==0||du(s,t,i)}r.memoizedState=i;var a={value:i,getSnapshot:t};return r.queue=a,Ru(vu.bind(null,s,a,e),[e]),s.flags|=2048,qs(9,{destroy:void 0},_u.bind(null,s,a,i,t),null),i},useId:function(){var e=ft(),t=je.identifierPrefix;if(Te){var i=Ft,s=Yt;i=(s&~(1<<32-wt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=En++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=C_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cl,useFormState:Eu,useActionState:Eu,useOptimistic:function(e){var t=ft();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=wl.bind(null,be,!0,i),i.dispatch=t,[e,t]},useMemoCache:dl,useCacheRefresh:function(){return ft().memoizedState=T_.bind(null,be)},useEffectEvent:function(e){var t=ft(),i={impl:e};return t.memoizedState=i,function(){if((Le&2)!==0)throw Error(O(440));return i.impl.apply(void 0,arguments)}}},El={readContext:at,use:An,useCallback:Hu,useContext:at,useEffect:pl,useImperativeHandle:Bu,useInsertionEffect:Lu,useLayoutEffect:Mu,useMemo:Nu,useReducer:Dn,useRef:Tu,useState:function(){return Dn(ri)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=Xe();return zu(i,He.memoizedState,e,t)},useTransition:function(){var e=Dn(ri)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:wr(e),t]},useSyncExternalStore:fu,useId:Iu,useHostTransitionStatus:Cl,useFormState:xu,useActionState:xu,useOptimistic:function(e,t){var i=Xe();return pu(i,He,e,t)},useMemoCache:dl,useCacheRefresh:Wu};El.useEffectEvent=ku;var Fu={readContext:at,use:An,useCallback:Hu,useContext:at,useEffect:pl,useImperativeHandle:Bu,useInsertionEffect:Lu,useLayoutEffect:Mu,useMemo:Nu,useReducer:vl,useRef:Tu,useState:function(){return vl(ri)},useDebugValue:Sl,useDeferredValue:function(e,t){var i=Xe();return He===null?yl(i,e,t):zu(i,He.memoizedState,e,t)},useTransition:function(){var e=vl(ri)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:wr(e),t]},useSyncExternalStore:fu,useId:Iu,useHostTransitionStatus:Cl,useFormState:Du,useActionState:Du,useOptimistic:function(e,t){var i=Xe();return He!==null?pu(i,He,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:dl,useCacheRefresh:Wu};Fu.useEffectEvent=ku;function xl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:h({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Al={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=kt(),r=Ei(s);r.payload=t,i!=null&&(r.callback=i),t=xi(e,r,s),t!==null&&(yt(t,e,s),Sr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=kt(),r=Ei(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=xi(e,r,s),t!==null&&(yt(t,e,s),Sr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=kt(),s=Ei(i);s.tag=2,t!=null&&(s.callback=t),t=xi(e,s,i),t!==null&&(yt(t,e,i),Sr(t,e,i))}};function Xu(e,t,i,s,r,a,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,a,S):t.prototype&&t.prototype.isPureReactComponent?!hr(i,s)||!hr(r,a):!0}function Vu(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&&Al.enqueueReplaceState(t,t.state,null)}function os(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=h({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Zu(e){on(e)}function Qu(e){console.error(e)}function $u(e){on(e)}function Ln(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Ju(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 Dl(e,t,i){return i=Ei(i),i.tag=3,i.payload={element:null},i.callback=function(){Ln(e,t)},i}function eh(e){return e=Ei(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(){Ju(t,i,s)}}var S=i.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){Ju(t,i,s),typeof r!="function"&&(Li===null?Li=new Set([this]):Li.add(this));var R=s.stack;this.componentDidCatch(s.value,{componentStack:R!==null?R:""})})}function k_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Ms(t,i,r,!0),i=At.current,i!==null){switch(i.tag){case 31:case 13:return Ut===null?Pn():i.alternate===null&&Ge===0&&(Ge=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===pn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),$l(e,s,r)),!1;case 22:return i.flags|=65536,s===pn?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)),$l(e,s,r)),!1}throw Error(O(435,i.tag))}return $l(e,s,r),Pn(),!1}if(Te)return t=At.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Ya&&(e=Error(O(422),{cause:s}),_r(Ht(e,i)))):(s!==Ya&&(t=Error(O(423),{cause:s}),_r(Ht(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Ht(s,i),r=Dl(e.stateNode,s,r),sl(e,r),Ge!==4&&(Ge=2)),!1;var a=Error(O(520),{cause:s});if(a=Ht(a,i),Or===null?Or=[a]:Or.push(a),Ge!==4&&(Ge=2),t===null)return!0;s=Ht(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=Dl(i.stateNode,s,e),sl(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"&&(Li===null||!Li.has(a))))return i.flags|=65536,r&=-r,i.lanes|=r,r=eh(r),th(r,e,i,s),sl(i,r),!1}i=i.return}while(i!==null);return!1}var Tl=Error(O(461)),Qe=!1;function lt(e,t,i,s){t.child=e===null?nu(t,null,i,s):as(t,e.child,i,s)}function ih(e,t,i,s,r){i=i.render;var a=t.ref;if("ref"in s){var S={};for(var R in s)R!=="ref"&&(S[R]=s[R])}else S=s;return is(t),s=cl(e,t,i,S,a,r),R=ul(),e!==null&&!Qe?(hl(e,t,r),ni(e,t,r)):(Te&&R&&Ka(t),t.flags|=1,lt(e,t,s,r),t.child)}function sh(e,t,i,s,r){if(e===null){var a=i.type;return typeof a=="function"&&!Ia(a)&&a.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=a,rh(e,t,a,s,r)):(e=fn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Nl(e,r)){var S=a.memoizedProps;if(i=i.compare,i=i!==null?i:hr,i(S,s)&&e.ref===t.ref)return ni(e,t,r)}return t.flags|=1,e=Jt(a,s),e.ref=t.ref,e.return=t,t.child=e}function rh(e,t,i,s,r){if(e!==null){var a=e.memoizedProps;if(hr(a,s)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=s=a,Nl(e,r))(e.flags&131072)!==0&&(Qe=!0);else return t.lanes=e.lanes,ni(e,t,r)}return Rl(e,t,i,s,r)}function nh(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 ah(e,t,a,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&mn(t,a!==null?a.cachePool:null),a!==null?ou(t,a):nl(),cu(t);else return s=t.lanes=536870912,ah(e,t,a!==null?a.baseLanes|i:i,i,s)}else a!==null?(mn(t,a.cachePool),ou(t,a),Di(),t.memoizedState=null):(e!==null&&mn(t,null),nl(),Di());return lt(e,t,r,i),t.child}function Ar(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ah(e,t,i,s,r){var a=Ja();return a=a===null?null:{parent:Ve._currentValue,pool:a},t.memoizedState={baseLanes:i,cachePool:a},e!==null&&mn(t,null),nl(),cu(t),e!==null&&Ms(e,t,s,!0),t.childLanes=r,null}function Mn(e,t){return t=Bn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lh(e,t,i){return as(t,e.child,null,i),e=Mn(t,t.pendingProps),e.flags|=2,Dt(t),t.memoizedState=null,e}function L_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=Mn(t,s),t.lanes=536870912,Ar(null,e);if(ll(t),(e=Ie)?(e=yf(e,jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si!==null?{id:Yt,overflow:Ft}:null,retryLane:536870912,hydrationErrors:null},i=Kc(e),i.return=t,t.child=i,nt=t,Ie=null)):e=null,e===null)throw bi(t);return t.lanes=536870912,null}return Mn(t,s)}var a=e.memoizedState;if(a!==null){var S=a.dehydrated;if(ll(t),r)if(t.flags&256)t.flags&=-257,t=lh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(O(558));else if(Qe||Ms(e,t,i,!1),r=(i&e.childLanes)!==0,Qe||r){if(s=je,s!==null&&(S=Qo(s,i),S!==0&&S!==a.retryLane))throw a.retryLane=S,$i(e,S),yt(s,e,S),Tl;Pn(),t=lh(e,t,i)}else e=a.treeContext,Ie=qt(S.nextSibling),nt=t,Te=!0,yi=null,jt=!1,e!==null&&Fc(t,e),t=Mn(t,s),t.flags|=4096;return t}return e=Jt(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function On(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(O(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Rl(e,t,i,s,r){return is(t),i=cl(e,t,i,s,void 0,r),s=ul(),e!==null&&!Qe?(hl(e,t,r),ni(e,t,r)):(Te&&s&&Ka(t),t.flags|=1,lt(e,t,i,r),t.child)}function oh(e,t,i,s,r,a){return is(t),t.updateQueue=null,i=hu(t,s,i,r),uu(e),s=ul(),e!==null&&!Qe?(hl(e,t,a),ni(e,t,a)):(Te&&s&&Ka(t),t.flags|=1,lt(e,t,i,a),t.child)}function ch(e,t,i,s,r){if(is(t),t.stateNode===null){var a=Ts,S=i.contextType;typeof S=="object"&&S!==null&&(a=at(S)),a=new i(s,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Al,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=s,a.state=t.memoizedState,a.refs={},tl(t),S=i.contextType,a.context=typeof S=="object"&&S!==null?at(S):Ts,a.state=t.memoizedState,S=i.getDerivedStateFromProps,typeof S=="function"&&(xl(t,i,S,s),a.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(S=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),S!==a.state&&Al.enqueueReplaceState(a,a.state,null),br(t,s,a,r),yr(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){a=t.stateNode;var R=t.memoizedProps,q=os(i,R);a.props=q;var J=a.context,ce=i.contextType;S=Ts,typeof ce=="object"&&ce!==null&&(S=at(ce));var fe=i.getDerivedStateFromProps;ce=typeof fe=="function"||typeof a.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,ce||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(R||J!==S)&&Vu(t,a,s,S),wi=!1;var ee=t.memoizedState;a.state=ee,br(t,s,a,r),yr(),J=t.memoizedState,R||ee!==J||wi?(typeof fe=="function"&&(xl(t,i,fe,s),J=t.memoizedState),(q=wi||Xu(t,i,q,s,ee,J,S))?(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=J),a.props=s,a.state=J,a.context=S,s=q):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{a=t.stateNode,il(e,t),S=t.memoizedProps,ce=os(i,S),a.props=ce,fe=t.pendingProps,ee=a.context,J=i.contextType,q=Ts,typeof J=="object"&&J!==null&&(q=at(J)),R=i.getDerivedStateFromProps,(J=typeof R=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(S!==fe||ee!==q)&&Vu(t,a,s,q),wi=!1,ee=t.memoizedState,a.state=ee,br(t,s,a,r),yr();var ne=t.memoizedState;S!==fe||ee!==ne||wi||e!==null&&e.dependencies!==null&&_n(e.dependencies)?(typeof R=="function"&&(xl(t,i,R,s),ne=t.memoizedState),(ce=wi||Xu(t,i,ce,s,ee,ne,q)||e!==null&&e.dependencies!==null&&_n(e.dependencies))?(J||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(s,ne,q),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(s,ne,q)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||S===e.memoizedProps&&ee===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&ee===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ne),a.props=s,a.state=ne,a.context=q,s=ce):(typeof a.componentDidUpdate!="function"||S===e.memoizedProps&&ee===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&ee===e.memoizedState||(t.flags|=1024),s=!1)}return a=s,On(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=as(t,e.child,null,r),t.child=as(t,null,i,r)):lt(e,t,i,r),t.memoizedState=a.state,e=t.child):e=ni(e,t,r),e}function uh(e,t,i,s){return es(),t.flags|=256,lt(e,t,i,s),t.child}var kl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ll(e){return{baseLanes:e,cachePool:Jc()}}function Ml(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Rt),e}function hh(e,t,i){var s=t.pendingProps,r=!1,a=(t.flags&128)!==0,S;if((S=a)||(S=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),S&&(r=!0,t.flags&=-129),S=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?Ai(t):Di(),(e=Ie)?(e=yf(e,jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si!==null?{id:Yt,overflow:Ft}:null,retryLane:536870912,hydrationErrors:null},i=Kc(e),i.return=t,t.child=i,nt=t,Ie=null)):e=null,e===null)throw bi(t);return vo(e)?t.lanes=32:t.lanes=536870912,null}var R=s.children;return s=s.fallback,r?(Di(),r=t.mode,R=Bn({mode:"hidden",children:R},r),s=Ji(s,r,i,null),R.return=t,s.return=t,R.sibling=s,t.child=R,s=t.child,s.memoizedState=Ll(i),s.childLanes=Ml(e,S,i),t.memoizedState=kl,Ar(null,s)):(Ai(t),Ol(t,R))}var q=e.memoizedState;if(q!==null&&(R=q.dehydrated,R!==null)){if(a)t.flags&256?(Ai(t),t.flags&=-257,t=Bl(e,t,i)):t.memoizedState!==null?(Di(),t.child=e.child,t.flags|=128,t=null):(Di(),R=s.fallback,r=t.mode,s=Bn({mode:"visible",children:s.children},r),R=Ji(R,r,i,null),R.flags|=2,s.return=t,R.return=t,s.sibling=R,t.child=s,as(t,e.child,null,i),s=t.child,s.memoizedState=Ll(i),s.childLanes=Ml(e,S,i),t.memoizedState=kl,t=Ar(null,s));else if(Ai(t),vo(R)){if(S=R.nextSibling&&R.nextSibling.dataset,S)var J=S.dgst;S=J,s=Error(O(419)),s.stack="",s.digest=S,_r({value:s,source:null,stack:null}),t=Bl(e,t,i)}else if(Qe||Ms(e,t,i,!1),S=(i&e.childLanes)!==0,Qe||S){if(S=je,S!==null&&(s=Qo(S,i),s!==0&&s!==q.retryLane))throw q.retryLane=s,$i(e,s),yt(S,e,s),Tl;_o(R)||Pn(),t=Bl(e,t,i)}else _o(R)?(t.flags|=192,t.child=e.child,t=null):(e=q.treeContext,Ie=qt(R.nextSibling),nt=t,Te=!0,yi=null,jt=!1,e!==null&&Fc(t,e),t=Ol(t,s.children),t.flags|=4096);return t}return r?(Di(),R=s.fallback,r=t.mode,q=e.child,J=q.sibling,s=Jt(q,{mode:"hidden",children:s.children}),s.subtreeFlags=q.subtreeFlags&65011712,J!==null?R=Jt(J,R):(R=Ji(R,r,i,null),R.flags|=2),R.return=t,s.return=t,s.sibling=R,t.child=s,Ar(null,s),s=t.child,R=e.child.memoizedState,R===null?R=Ll(i):(r=R.cachePool,r!==null?(q=Ve._currentValue,r=r.parent!==q?{parent:q,pool:q}:r):r=Jc(),R={baseLanes:R.baseLanes|i,cachePool:r}),s.memoizedState=R,s.childLanes=Ml(e,S,i),t.memoizedState=kl,Ar(e.child,s)):(Ai(t),i=e.child,e=i.sibling,i=Jt(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(S=t.deletions,S===null?(t.deletions=[e],t.flags|=16):S.push(e)),t.child=i,t.memoizedState=null,i)}function Ol(e,t){return t=Bn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bn(e,t){return e=xt(22,e,null,t),e.lanes=0,e}function Bl(e,t,i){return as(t,e.child,null,i),e=Ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Va(e.return,t,i)}function Hl(e,t,i,s,r,a){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:a}:(S.isBackwards=t,S.rendering=null,S.renderingStartTime=0,S.last=s,S.tail=i,S.tailMode=r,S.treeForkCount=a)}function dh(e,t,i){var s=t.pendingProps,r=s.revealOrder,a=s.tail;s=s.children;var S=Fe.current,R=(S&2)!==0;if(R?(S=S&1|2,t.flags|=128):S&=1,Z(Fe,S),lt(e,t,s,i),s=Te?dr:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fh(e,i,t);else if(e.tag===19)fh(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&&Cn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Hl(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&&Cn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Hl(t,!0,i,null,a,s);break;case"together":Hl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function ni(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ki|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ms(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,i=Jt(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Jt(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Nl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_n(e)))}function M_(e,t,i){switch(t.tag){case 3:T(t,t.stateNode.containerInfo),Ci(t,Ve,e.memoizedState.cache),es();break;case 27:case 5:ae(t);break;case 4:T(t,t.stateNode.containerInfo);break;case 10:Ci(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ll(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ai(t),t.flags|=128,null):(i&t.child.childLanes)!==0?hh(e,t,i):(Ai(t),e=ni(e,t,i),e!==null?e.sibling:null);Ai(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Ms(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return dh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Z(Fe,Fe.current),s)break;return null;case 22:return t.lanes=0,nh(e,t,i,t.pendingProps);case 24:Ci(t,Ve,e.memoizedState.cache)}return ni(e,t,i)}function _h(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qe=!0;else{if(!Nl(e,i)&&(t.flags&128)===0)return Qe=!1,M_(e,t,i);Qe=(e.flags&131072)!==0}else Qe=!1,Te&&(t.flags&1048576)!==0&&Yc(t,dr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=rs(t.elementType),t.type=e,typeof e=="function")Ia(e)?(s=os(e,s),t.tag=1,t=ch(null,t,e,s,i)):(t.tag=0,t=Rl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=ih(null,t,e,s,i);break e}else if(r===w){t.tag=14,t=sh(null,t,e,s,i);break e}}throw t=te(e)||e,Error(O(306,t,""))}}return t;case 0:return Rl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=os(s,t.pendingProps),ch(e,t,s,r,i);case 3:e:{if(T(t,t.stateNode.containerInfo),e===null)throw Error(O(387));s=t.pendingProps;var a=t.memoizedState;r=a.element,il(e,t),br(t,s,null,i);var S=t.memoizedState;if(s=S.cache,Ci(t,Ve,s),s!==a.cache&&Za(t,[Ve],i,!0),yr(),s=S.element,a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:S.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=uh(e,t,s,i);break e}else if(s!==r){r=Ht(Error(O(424)),t),_r(r),t=uh(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ie=qt(e.firstChild),nt=t,Te=!0,yi=null,jt=!0,i=nu(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(es(),s===r){t=ni(e,t,i);break e}lt(e,t,s,i)}t=t.child}return t;case 26:return On(e,t),e===null?(i=Af(t.type,null,t.pendingProps,null))?t.memoizedState=i:Te||(i=t.type,e=t.pendingProps,s=Zn(Q.current).createElement(i),s[rt]=t,s[_t]=e,ot(s,i,e),it(s),t.stateNode=s):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&Te&&(s=t.stateNode=wf(t.type,t.pendingProps,Q.current),nt=t,jt=!0,r=Ie,Hi(t.type)?(mo=r,Ie=qt(s.firstChild)):Ie=r),lt(e,t,t.pendingProps.children,i),On(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=s=Ie)&&(s=ov(s,t.type,t.pendingProps,jt),s!==null?(t.stateNode=s,nt=t,Ie=qt(s.firstChild),jt=!1,r=!0):r=!1),r||bi(t)),ae(t),r=t.type,a=t.pendingProps,S=e!==null?e.memoizedProps:null,s=a.children,uo(r,a)?s=null:S!==null&&uo(r,S)&&(t.flags|=32),t.memoizedState!==null&&(r=cl(e,t,w_,null,null,i),Ir._currentValue=r),On(e,t),lt(e,t,s,i),t.child;case 6:return e===null&&Te&&((e=i=Ie)&&(i=cv(i,t.pendingProps,jt),i!==null?(t.stateNode=i,nt=t,Ie=null,e=!0):e=!1),e||bi(t)),null;case 13:return hh(e,t,i);case 4:return T(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=as(t,null,s,i):lt(e,t,s,i),t.child;case 11:return ih(e,t,t.type,t.pendingProps,i);case 7:return lt(e,t,t.pendingProps,i),t.child;case 8:return lt(e,t,t.pendingProps.children,i),t.child;case 12:return lt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Ci(t,t.type,s.value),lt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,is(t),r=at(r),s=s(r),t.flags|=1,lt(e,t,s,i),t.child;case 14:return sh(e,t,t.type,t.pendingProps,i);case 15:return rh(e,t,t.type,t.pendingProps,i);case 19:return dh(e,t,i);case 31:return L_(e,t,i);case 22:return nh(e,t,i,t.pendingProps);case 24:return is(t),s=at(Ve),e===null?(r=Ja(),r===null&&(r=je,a=Qa(),r.pooledCache=a,a.refCount++,a!==null&&(r.pooledCacheLanes|=i),r=a),t.memoizedState={parent:s,cache:r},tl(t),Ci(t,Ve,r)):((e.lanes&i)!==0&&(il(e,t),br(t,null,null,i),yr()),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),Ci(t,Ve,s)):(s=a.cache,Ci(t,Ve,s),s!==r.cache&&Za(t,[Ve],i,!0))),lt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(O(156,t.tag))}function ai(e){e.flags|=4}function zl(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(Ih())e.flags|=8192;else throw ns=pn,el}else e.flags&=-16777217}function vh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lf(t))if(Ih())e.flags|=8192;else throw ns=pn,el}function Hn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xo():536870912,e.lanes|=t,Ks|=t)}function Dr(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function We(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 O_(e,t,i){var s=t.pendingProps;switch(Ga(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ii(Ve),se(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ls(t)?ai(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fa())),We(t),null;case 26:var r=t.type,a=t.memoizedState;return e===null?(ai(t),a!==null?(We(t),vh(t,a)):(We(t),zl(t,r,null,s,i))):a?a!==e.memoizedState?(ai(t),We(t),vh(t,a)):(We(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ai(t),We(t),zl(t,r,e,s,i)),null;case 27:if(_e(t),i=Q.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ai(t);else{if(!s){if(t.stateNode===null)throw Error(O(166));return We(t),null}e=Y.current,Ls(t)?Xc(t):(e=wf(r,s,i),t.stateNode=e,ai(t))}return We(t),null;case 5:if(_e(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ai(t);else{if(!s){if(t.stateNode===null)throw Error(O(166));return We(t),null}if(a=Y.current,Ls(t))Xc(t);else{var S=Zn(Q.current);switch(a){case 1:a=S.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:a=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":a=S.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":a=S.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":a=S.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof s.is=="string"?S.createElement("select",{is:s.is}):S.createElement("select"),s.multiple?a.multiple=!0:s.size&&(a.size=s.size);break;default:a=typeof s.is=="string"?S.createElement(r,{is:s.is}):S.createElement(r)}}a[rt]=t,a[_t]=s;e:for(S=t.child;S!==null;){if(S.tag===5||S.tag===6)a.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===t)break e;for(;S.sibling===null;){if(S.return===null||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}t.stateNode=a;e:switch(ot(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&&ai(t)}}return We(t),zl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ai(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(O(166));if(e=Q.current,Ls(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=nt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[rt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ff(e.nodeValue,i)),e||bi(t,!0)}else e=Zn(e).createTextNode(s),e[rt]=t,t.stateNode=e}return We(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ls(t),i!==null){if(e===null){if(!s)throw Error(O(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(557));e[rt]=t}else es(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else i=Fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Dt(t),t):(Dt(t),null);if((t.flags&128)!==0)throw Error(O(558))}return We(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ls(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(O(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(O(317));r[rt]=t}else es(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),r=!1}else r=Fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Dt(t),t):(Dt(t),null)}return Dt(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),Hn(t,t.updateQueue),We(t),null);case 4:return se(),e===null&&no(t.stateNode.containerInfo),We(t),null;case 10:return ii(t.type),We(t),null;case 19:if(L(Fe),s=t.memoizedState,s===null)return We(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)Dr(s,!1);else{if(Ge!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Cn(e),a!==null){for(t.flags|=128,Dr(s,!1),e=a.updateQueue,t.updateQueue=e,Hn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Pc(i,e),i=i.sibling;return Z(Fe,Fe.current&1|2),Te&&ei(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Je()>qn&&(t.flags|=128,r=!0,Dr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Cn(a),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Hn(t,e),Dr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Te)return We(t),null}else 2*Je()-s.renderingStartTime>qn&&i!==536870912&&(t.flags|=128,r=!0,Dr(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=Je(),e.sibling=null,i=Fe.current,Z(Fe,r?i&1|2:i&1),Te&&ei(t,s.treeForkCount),e):(We(t),null);case 22:case 23:return Dt(t),al(),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&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),i=t.updateQueue,i!==null&&Hn(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&&L(ss),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ii(Ve),We(t),null;case 25:return null;case 30:return null}throw Error(O(156,t.tag))}function B_(e,t){switch(Ga(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ii(Ve),se(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(Dt(t),t.alternate===null)throw Error(O(340));es()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Dt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));es()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Fe),null;case 4:return se(),null;case 10:return ii(t.type),null;case 22:case 23:return Dt(t),al(),e!==null&&L(ss),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ii(Ve),null;case 25:return null;default:return null}}function mh(e,t){switch(Ga(t),t.tag){case 3:ii(Ve),se();break;case 26:case 27:case 5:_e(t);break;case 4:se();break;case 31:t.memoizedState!==null&&Dt(t);break;case 13:Dt(t);break;case 19:L(Fe);break;case 10:ii(t.type);break;case 22:case 23:Dt(t),al(),e!==null&&L(ss);break;case 24:ii(Ve)}}function Tr(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,S=i.inst;s=a(),S.destroy=s}i=i.next}while(i!==r)}}catch(R){Be(t,t.return,R)}}function Ti(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 S=s.inst,R=S.destroy;if(R!==void 0){S.destroy=void 0,r=t;var q=i,J=R;try{J()}catch(ce){Be(r,q,ce)}}}s=s.next}while(s!==a)}}catch(ce){Be(t,t.return,ce)}}function gh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{lu(t,i)}catch(s){Be(e,e.return,s)}}}function ph(e,t,i){i.props=os(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Be(e,t,s)}}function Rr(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){Be(e,t,r)}}function Xt(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){Be(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){Be(e,t,r)}else i.current=null}function Sh(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){Be(e,e.return,r)}}function jl(e,t,i){try{var s=e.stateNode;iv(s,e.type,i,t),s[_t]=t}catch(r){Be(e,e.return,r)}}function yh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hi(e.type)||e.tag===4}function Ul(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yh(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&&Hi(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 ql(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Qt));else if(s!==4&&(s===27&&Hi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(ql(e,t,i),e=e.sibling;e!==null;)ql(e,t,i),e=e.sibling}function Nn(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&&Hi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Nn(e,t,i),e=e.sibling;e!==null;)Nn(e,t,i),e=e.sibling}function bh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ot(t,s,i),t[rt]=e,t[_t]=i}catch(a){Be(e,e.return,a)}}var li=!1,$e=!1,Il=!1,Ch=typeof WeakSet=="function"?WeakSet:Set,st=null;function H_(e,t){if(e=e.containerInfo,oo=sa,e=Bc(e),Ba(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 S=0,R=-1,q=-1,J=0,ce=0,fe=e,ee=null;t:for(;;){for(var ne;fe!==i||r!==0&&fe.nodeType!==3||(R=S+r),fe!==a||s!==0&&fe.nodeType!==3||(q=S+s),fe.nodeType===3&&(S+=fe.nodeValue.length),(ne=fe.firstChild)!==null;)ee=fe,fe=ne;for(;;){if(fe===e)break t;if(ee===i&&++J===r&&(R=S),ee===a&&++ce===s&&(q=S),(ne=fe.nextSibling)!==null)break;fe=ee,ee=fe.parentNode}fe=ne}i=R===-1||q===-1?null:{start:R,end:q}}else i=null}i=i||{start:0,end:0}}else i=null;for(co={focusedElem:e,selectionRange:i},sa=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){switch(t=st,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 ve=os(i.type,r);e=s.getSnapshotBeforeUpdate(ve,a),s.__reactInternalSnapshotBeforeUpdate=e}catch(pe){Be(i,i.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)fo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fo(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(O(163))}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}}function wh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:ci(e,i),s&4&&Tr(5,i);break;case 1:if(ci(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(S){Be(i,i.return,S)}else{var r=os(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(S){Be(i,i.return,S)}}s&64&&gh(i),s&512&&Rr(i,i.return);break;case 3:if(ci(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{lu(e,t)}catch(S){Be(i,i.return,S)}}break;case 27:t===null&&s&4&&bh(i);case 26:case 5:ci(e,i),t===null&&s&4&&Sh(i),s&512&&Rr(i,i.return);break;case 12:ci(e,i);break;case 31:ci(e,i),s&4&&Ah(e,i);break;case 13:ci(e,i),s&4&&Dh(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=K_.bind(null,i),uv(e,i))));break;case 22:if(s=i.memoizedState!==null||li,!s){t=t!==null&&t.memoizedState!==null||$e,r=li;var a=$e;li=s,($e=t)&&!a?ui(e,i,(i.subtreeFlags&8772)!==0):ci(e,i),li=r,$e=a}break;case 30:break;default:ci(e,i)}}function Eh(e){var t=e.alternate;t!==null&&(e.alternate=null,Eh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ga(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Pe=null,mt=!1;function oi(e,t,i){for(i=i.child;i!==null;)xh(e,t,i),i=i.sibling}function xh(e,t,i){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Yi,i)}catch{}switch(i.tag){case 26:$e||Xt(i,t),oi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:$e||Xt(i,t);var s=Pe,r=mt;Hi(i.type)&&(Pe=i.stateNode,mt=!1),oi(e,t,i),jr(i.stateNode),Pe=s,mt=r;break;case 5:$e||Xt(i,t);case 6:if(s=Pe,r=mt,Pe=null,oi(e,t,i),Pe=s,mt=r,Pe!==null)if(mt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(i.stateNode)}catch(a){Be(i,t,a)}else try{Pe.removeChild(i.stateNode)}catch(a){Be(i,t,a)}break;case 18:Pe!==null&&(mt?(e=Pe,pf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),$s(e)):pf(Pe,i.stateNode));break;case 4:s=Pe,r=mt,Pe=i.stateNode.containerInfo,mt=!0,oi(e,t,i),Pe=s,mt=r;break;case 0:case 11:case 14:case 15:Ti(2,i,t),$e||Ti(4,i,t),oi(e,t,i);break;case 1:$e||(Xt(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&ph(i,t,s)),oi(e,t,i);break;case 21:oi(e,t,i);break;case 22:$e=(s=$e)||i.memoizedState!==null,oi(e,t,i),$e=s;break;default:oi(e,t,i)}}function Ah(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$s(e)}catch(i){Be(t,t.return,i)}}}function Dh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$s(e)}catch(i){Be(t,t.return,i)}}function N_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ch),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ch),t;default:throw Error(O(435,e.tag))}}function zn(e,t){var i=N_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=G_.bind(null,e,s);s.then(r,r)}})}function gt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],a=e,S=t,R=S;e:for(;R!==null;){switch(R.tag){case 27:if(Hi(R.type)){Pe=R.stateNode,mt=!1;break e}break;case 5:Pe=R.stateNode,mt=!1;break e;case 3:case 4:Pe=R.stateNode.containerInfo,mt=!0;break e}R=R.return}if(Pe===null)throw Error(O(160));xh(a,S,r),Pe=null,mt=!1,a=r.alternate,a!==null&&(a.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Th(t,e),t=t.sibling}var Kt=null;function Th(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gt(t,e),pt(e),s&4&&(Ti(3,e,e.return),Tr(3,e),Ti(5,e,e.return));break;case 1:gt(t,e),pt(e),s&512&&($e||i===null||Xt(i,i.return)),s&64&&li&&(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=Kt;if(gt(t,e),pt(e),s&512&&($e||i===null||Xt(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[ir]||a[rt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=r.createElement(s),r.head.insertBefore(a,r.querySelector("head > title"))),ot(a,s,i),a[rt]=e,it(a),s=a;break e;case"link":var S=Rf("link","href",r).get(s+(i.href||""));if(S){for(var R=0;R<S.length;R++)if(a=S[R],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)){S.splice(R,1);break t}}a=r.createElement(s),ot(a,s,i),r.head.appendChild(a);break;case"meta":if(S=Rf("meta","content",r).get(s+(i.content||""))){for(R=0;R<S.length;R++)if(a=S[R],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)){S.splice(R,1);break t}}a=r.createElement(s),ot(a,s,i),r.head.appendChild(a);break;default:throw Error(O(468,s))}a[rt]=e,it(a),s=a}e.stateNode=s}else kf(r,e.type,e.stateNode);else e.stateNode=Tf(r,s,e.memoizedProps);else a!==s?(a===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):a.count--,s===null?kf(r,e.type,e.stateNode):Tf(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&jl(e,e.memoizedProps,i.memoizedProps)}break;case 27:gt(t,e),pt(e),s&512&&($e||i===null||Xt(i,i.return)),i!==null&&s&4&&jl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(gt(t,e),pt(e),s&512&&($e||i===null||Xt(i,i.return)),e.flags&32){r=e.stateNode;try{bs(r,"")}catch(ve){Be(e,e.return,ve)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,jl(e,r,i!==null?i.memoizedProps:r)),s&1024&&(Il=!0);break;case 6:if(gt(t,e),pt(e),s&4){if(e.stateNode===null)throw Error(O(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){Be(e,e.return,ve)}}break;case 3:if(Jn=null,r=Kt,Kt=Qn(t.containerInfo),gt(t,e),Kt=r,pt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{$s(t.containerInfo)}catch(ve){Be(e,e.return,ve)}Il&&(Il=!1,Rh(e));break;case 4:s=Kt,Kt=Qn(e.stateNode.containerInfo),gt(t,e),pt(e),Kt=s;break;case 12:gt(t,e),pt(e);break;case 31:gt(t,e),pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 13:gt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Un=Je()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 22:r=e.memoizedState!==null;var q=i!==null&&i.memoizedState!==null,J=li,ce=$e;if(li=J||r,$e=ce||q,gt(t,e),$e=ce,li=J,pt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||q||li||$e||cs(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){q=i=t;try{if(a=q.stateNode,r)S=a.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{R=q.stateNode;var fe=q.memoizedProps.style,ee=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;R.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(ve){Be(q,q.return,ve)}}}else if(t.tag===6){if(i===null){q=t;try{q.stateNode.nodeValue=r?"":q.memoizedProps}catch(ve){Be(q,q.return,ve)}}}else if(t.tag===18){if(i===null){q=t;try{var ne=q.stateNode;r?Sf(ne,!0):Sf(q.stateNode,!1)}catch(ve){Be(q,q.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,zn(e,i))));break;case 19:gt(t,e),pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 30:break;case 21:break;default:gt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(yh(s)){i=s;break}s=s.return}if(i==null)throw Error(O(160));switch(i.tag){case 27:var r=i.stateNode,a=Ul(e);Nn(e,a,r);break;case 5:var S=i.stateNode;i.flags&32&&(bs(S,""),i.flags&=-33);var R=Ul(e);Nn(e,R,S);break;case 3:case 4:var q=i.stateNode.containerInfo,J=Ul(e);ql(e,J,q);break;default:throw Error(O(161))}}catch(ce){Be(e,e.return,ce)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ci(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wh(e,t.alternate,t),t=t.sibling}function cs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ti(4,t,t.return),cs(t);break;case 1:Xt(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&ph(t,t.return,i),cs(t);break;case 27:jr(t.stateNode);case 26:case 5:Xt(t,t.return),cs(t);break;case 22:t.memoizedState===null&&cs(t);break;case 30:cs(t);break;default:cs(t)}e=e.sibling}}function ui(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,a=t,S=a.flags;switch(a.tag){case 0:case 11:case 15:ui(r,a,i),Tr(4,a);break;case 1:if(ui(r,a,i),s=a,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(J){Be(s,s.return,J)}if(s=a,r=s.updateQueue,r!==null){var R=s.stateNode;try{var q=r.shared.hiddenCallbacks;if(q!==null)for(r.shared.hiddenCallbacks=null,r=0;r<q.length;r++)au(q[r],R)}catch(J){Be(s,s.return,J)}}i&&S&64&&gh(a),Rr(a,a.return);break;case 27:bh(a);case 26:case 5:ui(r,a,i),i&&s===null&&S&4&&Sh(a),Rr(a,a.return);break;case 12:ui(r,a,i);break;case 31:ui(r,a,i),i&&S&4&&Ah(r,a);break;case 13:ui(r,a,i),i&&S&4&&Dh(r,a);break;case 22:a.memoizedState===null&&ui(r,a,i),Rr(a,a.return);break;case 30:break;default:ui(r,a,i)}t=t.sibling}}function Wl(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&&vr(i))}function Pl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vr(e))}function Gt(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kh(e,t,i,s),t=t.sibling}function kh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Gt(e,t,i,s),r&2048&&Tr(9,t);break;case 1:Gt(e,t,i,s);break;case 3:Gt(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vr(e)));break;case 12:if(r&2048){Gt(e,t,i,s),e=t.stateNode;try{var a=t.memoizedProps,S=a.id,R=a.onPostCommit;typeof R=="function"&&R(S,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(q){Be(t,t.return,q)}}else Gt(e,t,i,s);break;case 31:Gt(e,t,i,s);break;case 13:Gt(e,t,i,s);break;case 23:break;case 22:a=t.stateNode,S=t.alternate,t.memoizedState!==null?a._visibility&2?Gt(e,t,i,s):kr(e,t):a._visibility&2?Gt(e,t,i,s):(a._visibility|=2,Is(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Wl(S,t);break;case 24:Gt(e,t,i,s),r&2048&&Pl(t.alternate,t);break;default:Gt(e,t,i,s)}}function Is(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,S=t,R=i,q=s,J=S.flags;switch(S.tag){case 0:case 11:case 15:Is(a,S,R,q,r),Tr(8,S);break;case 23:break;case 22:var ce=S.stateNode;S.memoizedState!==null?ce._visibility&2?Is(a,S,R,q,r):kr(a,S):(ce._visibility|=2,Is(a,S,R,q,r)),r&&J&2048&&Wl(S.alternate,S);break;case 24:Is(a,S,R,q,r),r&&J&2048&&Pl(S.alternate,S);break;default:Is(a,S,R,q,r)}t=t.sibling}}function kr(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:kr(i,s),r&2048&&Wl(s.alternate,s);break;case 24:kr(i,s),r&2048&&Pl(s.alternate,s);break;default:kr(i,s)}t=t.sibling}}var Lr=8192;function Ws(e,t,i){if(e.subtreeFlags&Lr)for(e=e.child;e!==null;)Lh(e,t,i),e=e.sibling}function Lh(e,t,i){switch(e.tag){case 26:Ws(e,t,i),e.flags&Lr&&e.memoizedState!==null&&Cv(i,Kt,e.memoizedState,e.memoizedProps);break;case 5:Ws(e,t,i);break;case 3:case 4:var s=Kt;Kt=Qn(e.stateNode.containerInfo),Ws(e,t,i),Kt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Lr,Lr=16777216,Ws(e,t,i),Lr=s):Ws(e,t,i));break;default:Ws(e,t,i)}}function Mh(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 Mr(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];st=s,Bh(s,e)}Mh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Oh(e),e=e.sibling}function Oh(e){switch(e.tag){case 0:case 11:case 15:Mr(e),e.flags&2048&&Ti(9,e,e.return);break;case 3:Mr(e);break;case 12:Mr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,jn(e)):Mr(e);break;default:Mr(e)}}function jn(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];st=s,Bh(s,e)}Mh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ti(8,t,t.return),jn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,jn(t));break;default:jn(t)}e=e.sibling}}function Bh(e,t){for(;st!==null;){var i=st;switch(i.tag){case 0:case 11:case 15:Ti(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:vr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,st=s;else e:for(i=e;st!==null;){s=st;var r=s.sibling,a=s.return;if(Eh(s),s===i){st=null;break e}if(r!==null){r.return=a,st=r;break e}st=a}}}var z_={getCacheForType:function(e){var t=at(Ve),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return at(Ve).controller.signal}},j_=typeof WeakMap=="function"?WeakMap:Map,Le=0,je=null,Ee=null,Ae=0,Oe=0,Tt=null,Ri=!1,Ps=!1,Kl=!1,hi=0,Ge=0,ki=0,us=0,Gl=0,Rt=0,Ks=0,Or=null,St=null,Yl=!1,Un=0,Hh=0,qn=1/0,In=null,Li=null,et=0,Mi=null,Gs=null,fi=0,Fl=0,Xl=null,Nh=null,Br=0,Vl=null;function kt(){return(Le&2)!==0&&Ae!==0?Ae&-Ae:W.T!==null?to():$o()}function zh(){if(Rt===0)if((Ae&536870912)===0||Te){var e=Xr;Xr<<=1,(Xr&3932160)===0&&(Xr=262144),Rt=e}else Rt=536870912;return e=At.current,e!==null&&(e.flags|=32),Rt}function yt(e,t,i){(e===je&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),Oi(e,Ae,Rt,!1)),tr(e,i),((Le&2)===0||e!==je)&&(e===je&&((Le&2)===0&&(us|=i),Ge===4&&Oi(e,Ae,Rt,!1)),Vt(e))}function jh(e,t,i){if((Le&6)!==0)throw Error(O(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||er(e,t),r=s?I_(e,t):Ql(e,t,!0),a=s;do{if(r===0){Ps&&!s&&Oi(e,t,0,!1);break}else{if(i=e.current.alternate,a&&!U_(i)){r=Ql(e,t,!1),a=!1;continue}if(r===2){if(a=t,e.errorRecoveryDisabledLanes&a)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){t=S;e:{var R=e;r=Or;var q=R.current.memoizedState.isDehydrated;if(q&&(Ys(R,S).flags|=256),S=Ql(R,S,!1),S!==2){if(Kl&&!q){R.errorRecoveryDisabledLanes|=a,us|=a,r=4;break e}a=St,St=r,a!==null&&(St===null?St=a:St.push.apply(St,a))}r=S}if(a=!1,r!==2)continue}}if(r===1){Ys(e,0),Oi(e,t,0,!0);break}e:{switch(s=e,a=r,a){case 0:case 1:throw Error(O(345));case 4:if((t&4194048)!==t)break;case 6:Oi(s,t,Rt,!Ri);break e;case 2:St=null;break;case 3:case 5:break;default:throw Error(O(329))}if((t&62914560)===t&&(r=Un+300-Je(),10<r)){if(Oi(s,t,Rt,!Ri),Zr(s,0,!0)!==0)break e;fi=t,s.timeoutHandle=mf(Uh.bind(null,s,i,St,In,Yl,t,Rt,us,Ks,Ri,a,"Throttled",-0,0),r);break e}Uh(s,i,St,In,Yl,t,Rt,us,Ks,Ri,a,null,-0,0)}}break}while(!0);Vt(e)}function Uh(e,t,i,s,r,a,S,R,q,J,ce,fe,ee,ne){if(e.timeoutHandle=-1,fe=t.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Lh(t,a,fe);var ve=(a&62914560)===a?Un-Je():(a&4194048)===a?Hh-Je():0;if(ve=wv(fe,ve),ve!==null){fi=a,e.cancelPendingCommit=ve(Fh.bind(null,e,t,a,i,s,r,S,R,q,ce,fe,null,ee,ne)),Oi(e,a,S,!J);return}}Fh(e,t,a,i,s,r,S,R,q)}function U_(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(!Et(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 Oi(e,t,i,s){t&=~Gl,t&=~us,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var a=31-wt(r),S=1<<a;s[a]=-1,r&=~S}i!==0&&Vo(e,i,t)}function Wn(){return(Le&6)===0?(Hr(0),!1):!0}function Zl(){if(Ee!==null){if(Oe===0)var e=Ee.return;else e=Ee,ti=ts=null,fl(e),Ns=null,gr=0,e=Ee;for(;e!==null;)mh(e.alternate,e),e=e.return;Ee=null}}function Ys(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,nv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),fi=0,Zl(),je=e,Ee=i=Jt(e.current,null),Ae=t,Oe=0,Tt=null,Ri=!1,Ps=er(e,t),Kl=!1,Ks=Rt=Gl=us=ki=Ge=0,St=Or=null,Yl=!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-wt(s),a=1<<r;t|=e[r],s&=~a}return hi=t,cn(),i}function qh(e,t){be=null,W.H=xr,t===Hs||t===gn?(t=iu(),Oe=3):t===el?(t=iu(),Oe=4):Oe=t===Tl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tt=t,Ee===null&&(Ge=1,Ln(e,Ht(t,e.current)))}function Ih(){var e=At.current;return e===null?!0:(Ae&4194048)===Ae?Ut===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===Ut:!1}function Wh(){var e=W.H;return W.H=xr,e===null?xr:e}function Ph(){var e=W.A;return W.A=z_,e}function Pn(){Ge=4,Ri||(Ae&4194048)!==Ae&&At.current!==null||(Ps=!0),(ki&134217727)===0&&(us&134217727)===0||je===null||Oi(je,Ae,Rt,!1)}function Ql(e,t,i){var s=Le;Le|=2;var r=Wh(),a=Ph();(je!==e||Ae!==t)&&(In=null,Ys(e,t)),t=!1;var S=Ge;e:do try{if(Oe!==0&&Ee!==null){var R=Ee,q=Tt;switch(Oe){case 8:Zl(),S=6;break e;case 3:case 2:case 9:case 6:At.current===null&&(t=!0);var J=Oe;if(Oe=0,Tt=null,Fs(e,R,q,J),i&&Ps){S=0;break e}break;default:J=Oe,Oe=0,Tt=null,Fs(e,R,q,J)}}q_(),S=Ge;break}catch(ce){qh(e,ce)}while(!0);return t&&e.shellSuspendCounter++,ti=ts=null,Le=s,W.H=r,W.A=a,Ee===null&&(je=null,Ae=0,cn()),S}function q_(){for(;Ee!==null;)Kh(Ee)}function I_(e,t){var i=Le;Le|=2;var s=Wh(),r=Ph();je!==e||Ae!==t?(In=null,qn=Je()+500,Ys(e,t)):Ps=er(e,t);e:do try{if(Oe!==0&&Ee!==null){t=Ee;var a=Tt;t:switch(Oe){case 1:Oe=0,Tt=null,Fs(e,t,a,1);break;case 2:case 9:if(eu(a)){Oe=0,Tt=null,Gh(t);break}t=function(){Oe!==2&&Oe!==9||je!==e||(Oe=7),Vt(e)},a.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:eu(a)?(Oe=0,Tt=null,Gh(t)):(Oe=0,Tt=null,Fs(e,t,a,7));break;case 5:var S=null;switch(Ee.tag){case 26:S=Ee.memoizedState;case 5:case 27:var R=Ee;if(S?Lf(S):R.stateNode.complete){Oe=0,Tt=null;var q=R.sibling;if(q!==null)Ee=q;else{var J=R.return;J!==null?(Ee=J,Kn(J)):Ee=null}break t}}Oe=0,Tt=null,Fs(e,t,a,5);break;case 6:Oe=0,Tt=null,Fs(e,t,a,6);break;case 8:Zl(),Ge=6;break e;default:throw Error(O(462))}}W_();break}catch(ce){qh(e,ce)}while(!0);return ti=ts=null,W.H=s,W.A=r,Le=i,Ee!==null?0:(je=null,Ae=0,cn(),Ge)}function W_(){for(;Ee!==null&&!fs();)Kh(Ee)}function Kh(e){var t=_h(e.alternate,e,hi);e.memoizedProps=e.pendingProps,t===null?Kn(e):Ee=t}function Gh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=oh(i,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=oh(i,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:fl(t);default:mh(i,t),t=Ee=Pc(t,hi),t=_h(i,t,hi)}e.memoizedProps=e.pendingProps,t===null?Kn(e):Ee=t}function Fs(e,t,i,s){ti=ts=null,fl(t),Ns=null,gr=0;var r=t.return;try{if(k_(e,r,t,i,Ae)){Ge=1,Ln(e,Ht(i,e.current)),Ee=null;return}}catch(a){if(r!==null)throw Ee=r,a;Ge=1,Ln(e,Ht(i,e.current)),Ee=null;return}t.flags&32768?(Te||s===1?e=!0:Ps||(Ae&536870912)!==0?e=!1:(Ri=e=!0,(s===2||s===9||s===3||s===6)&&(s=At.current,s!==null&&s.tag===13&&(s.flags|=16384))),Yh(t,e)):Kn(t)}function Kn(e){var t=e;do{if((t.flags&32768)!==0){Yh(t,Ri);return}e=t.return;var i=O_(t.alternate,t,hi);if(i!==null){Ee=i;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Ge===0&&(Ge=5)}function Yh(e,t){do{var i=B_(e.alternate,e);if(i!==null){i.flags&=32767,Ee=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=i}while(e!==null);Ge=6,Ee=null}function Fh(e,t,i,s,r,a,S,R,q){e.cancelPendingCommit=null;do Gn();while(et!==0);if((Le&6)!==0)throw Error(O(327));if(t!==null){if(t===e.current)throw Error(O(177));if(a=t.lanes|t.childLanes,a|=Ua,bd(e,i,a,S,R,q),e===je&&(Ee=je=null,Ae=0),Gs=t,Mi=e,fi=i,Fl=a,Xl=r,Nh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Y_(bt,function(){return $h(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=W.T,W.T=null,r=G.p,G.p=2,S=Le,Le|=4;try{H_(e,t,i)}finally{Le=S,G.p=r,W.T=s}}et=1,Xh(),Vh(),Zh()}}function Xh(){if(et===1){et=0;var e=Mi,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=W.T,W.T=null;var s=G.p;G.p=2;var r=Le;Le|=4;try{Th(t,e);var a=co,S=Bc(e.containerInfo),R=a.focusedElem,q=a.selectionRange;if(S!==R&&R&&R.ownerDocument&&Oc(R.ownerDocument.documentElement,R)){if(q!==null&&Ba(R)){var J=q.start,ce=q.end;if(ce===void 0&&(ce=J),"selectionStart"in R)R.selectionStart=J,R.selectionEnd=Math.min(ce,R.value.length);else{var fe=R.ownerDocument||document,ee=fe&&fe.defaultView||window;if(ee.getSelection){var ne=ee.getSelection(),ve=R.textContent.length,pe=Math.min(q.start,ve),ze=q.end===void 0?pe:Math.min(q.end,ve);!ne.extend&&pe>ze&&(S=ze,ze=pe,pe=S);var V=Mc(R,pe),P=Mc(R,ze);if(V&&P&&(ne.rangeCount!==1||ne.anchorNode!==V.node||ne.anchorOffset!==V.offset||ne.focusNode!==P.node||ne.focusOffset!==P.offset)){var $=fe.createRange();$.setStart(V.node,V.offset),ne.removeAllRanges(),pe>ze?(ne.addRange($),ne.extend(P.node,P.offset)):($.setEnd(P.node,P.offset),ne.addRange($))}}}}for(fe=[],ne=R;ne=ne.parentNode;)ne.nodeType===1&&fe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<fe.length;R++){var he=fe[R];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}sa=!!oo,co=oo=null}finally{Le=r,G.p=s,W.T=i}}e.current=t,et=2}}function Vh(){if(et===2){et=0;var e=Mi,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=W.T,W.T=null;var s=G.p;G.p=2;var r=Le;Le|=4;try{wh(e,t.alternate,t)}finally{Le=r,G.p=s,W.T=i}}et=3}}function Zh(){if(et===4||et===3){et=0,dt();var e=Mi,t=Gs,i=fi,s=Nh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?et=5:(et=0,Gs=Mi=null,Qh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Li=null),va(i),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Yi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=W.T,r=G.p,G.p=2,W.T=null;try{for(var a=e.onRecoverableError,S=0;S<s.length;S++){var R=s[S];a(R.value,{componentStack:R.stack})}}finally{W.T=t,G.p=r}}(fi&3)!==0&&Gn(),Vt(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Vl?Br++:(Br=0,Vl=e):Br=0,Hr(0)}}function Qh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vr(t)))}function Gn(){return Xh(),Vh(),Zh(),$h()}function $h(){if(et!==5)return!1;var e=Mi,t=Fl;Fl=0;var i=va(fi),s=W.T,r=G.p;try{G.p=32>i?32:i,W.T=null,i=Xl,Xl=null;var a=Mi,S=fi;if(et=0,Gs=Mi=null,fi=0,(Le&6)!==0)throw Error(O(331));var R=Le;if(Le|=4,Oh(a.current),kh(a,a.current,S,i),Le=R,Hr(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Yi,a)}catch{}return!0}finally{G.p=r,W.T=s,Qh(e,t)}}function Jh(e,t,i){t=Ht(i,t),t=Dl(e.stateNode,t,2),e=xi(e,t,2),e!==null&&(tr(e,2),Vt(e))}function Be(e,t,i){if(e.tag===3)Jh(e,e,i);else for(;t!==null;){if(t.tag===3){Jh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Li===null||!Li.has(s))){e=Ht(i,e),i=eh(2),s=xi(t,i,2),s!==null&&(th(i,s,t,e),tr(s,2),Vt(s));break}}t=t.return}}function $l(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new j_;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)||(Kl=!0,r.add(i),e=P_.bind(null,e,t,i),t.then(e,e))}function P_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,je===e&&(Ae&i)===i&&(Ge===4||Ge===3&&(Ae&62914560)===Ae&&300>Je()-Un?(Le&2)===0&&Ys(e,0):Gl|=i,Ks===Ae&&(Ks=0)),Vt(e)}function ef(e,t){t===0&&(t=Xo()),e=$i(e,t),e!==null&&(tr(e,t),Vt(e))}function K_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),ef(e,i)}function G_(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(O(314))}s!==null&&s.delete(t),ef(e,i)}function Y_(e,t){return Pi(e,t)}var Yn=null,Xs=null,Jl=!1,Fn=!1,eo=!1,Bi=0;function Vt(e){e!==Xs&&e.next===null&&(Xs===null?Yn=Xs=e:Xs=Xs.next=e),Fn=!0,Jl||(Jl=!0,X_())}function Hr(e,t){if(!eo&&Fn){eo=!0;do for(var i=!1,s=Yn;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var a=0;else{var S=s.suspendedLanes,R=s.pingedLanes;a=(1<<31-wt(42|e)+1)-1,a&=r&~(S&~R),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(i=!0,nf(s,a))}else a=Ae,a=Zr(s,s===je?a:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(a&3)===0||er(s,a)||(i=!0,nf(s,a));s=s.next}while(i);eo=!1}}function F_(){tf()}function tf(){Fn=Jl=!1;var e=0;Bi!==0&&rv()&&(e=Bi);for(var t=Je(),i=null,s=Yn;s!==null;){var r=s.next,a=sf(s,t);a===0?(s.next=null,i===null?Yn=r:i.next=r,r===null&&(Xs=i)):(i=s,(e!==0||(a&3)!==0)&&(Fn=!0)),s=r}et!==0&&et!==5||Hr(e),Bi!==0&&(Bi=0)}function sf(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var S=31-wt(a),R=1<<S,q=r[S];q===-1?((R&i)===0||(R&s)!==0)&&(r[S]=yd(R,t)):q<=t&&(e.expiredLanes|=R),a&=~R}if(t=je,i=Ae,i=Zr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ki(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||er(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Ki(s),va(i)){case 2:case 8:i=ds;break;case 32:i=bt;break;case 268435456:i=Wt;break;default:i=bt}return s=rf.bind(null,e),i=Pi(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Ki(s),e.callbackPriority=2,e.callbackNode=null,2}function rf(e,t){if(et!==0&&et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=Ae;return s=Zr(e,e===je?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(jh(e,s,t),sf(e,Je()),e.callbackNode!=null&&e.callbackNode===i?rf.bind(null,e):null)}function nf(e,t){if(Gn())return null;jh(e,t,!0)}function X_(){av(function(){(Le&6)!==0?Pi(vi,F_):tf()})}function to(){if(Bi===0){var e=Os;e===0&&(e=Fr,Fr<<=1,(Fr&261888)===0&&(Fr=256)),Bi=e}return Bi}function af(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:en(""+e)}function lf(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 V_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var a=af((r[_t]||null).action),S=s.submitter;S&&(t=(t=S[_t]||null)?af(t.formAction):S.getAttribute("formAction"),t!==null&&(a=t,S=null));var R=new nn("action","action",null,s,r);e.push({event:R,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Bi!==0){var q=S?lf(r,S):new FormData(r);bl(i,{pending:!0,data:q,method:r.method,action:a},null,q)}}else typeof a=="function"&&(R.preventDefault(),q=S?lf(r,S):new FormData(r),bl(i,{pending:!0,data:q,method:r.method,action:a},a,q))},currentTarget:r}]})}}for(var io=0;io<ja.length;io++){var so=ja[io],Z_=so.toLowerCase(),Q_=so[0].toUpperCase()+so.slice(1);Pt(Z_,"on"+Q_)}Pt(zc,"onAnimationEnd"),Pt(jc,"onAnimationIteration"),Pt(Uc,"onAnimationStart"),Pt("dblclick","onDoubleClick"),Pt("focusin","onFocus"),Pt("focusout","onBlur"),Pt(d_,"onTransitionRun"),Pt(__,"onTransitionStart"),Pt(v_,"onTransitionCancel"),Pt(qc,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="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(" "),$_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Nr));function of(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 S=s.length-1;0<=S;S--){var R=s[S],q=R.instance,J=R.currentTarget;if(R=R.listener,q!==a&&r.isPropagationStopped())break e;a=R,r.currentTarget=J;try{a(r)}catch(ce){on(ce)}r.currentTarget=null,a=q}else for(S=0;S<s.length;S++){if(R=s[S],q=R.instance,J=R.currentTarget,R=R.listener,q!==a&&r.isPropagationStopped())break e;a=R,r.currentTarget=J;try{a(r)}catch(ce){on(ce)}r.currentTarget=null,a=q}}}}function xe(e,t){var i=t[ma];i===void 0&&(i=t[ma]=new Set);var s=e+"__bubble";i.has(s)||(cf(t,e,2,!1),i.add(s))}function ro(e,t,i){var s=0;t&&(s|=4),cf(i,e,s,t)}var Xn="_reactListening"+Math.random().toString(36).slice(2);function no(e){if(!e[Xn]){e[Xn]=!0,tc.forEach(function(i){i!=="selectionchange"&&($_.has(i)||ro(i,!1,e),ro(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xn]||(t[Xn]=!0,ro("selectionchange",!1,t))}}function cf(e,t,i,s){switch(jf(t)){case 2:var r=Av;break;case 8:r=Dv;break;default:r=bo}i=r.bind(null,t,i,e),r=void 0,!xa||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 ao(e,t,i,s,r){var a=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var S=s.tag;if(S===3||S===4){var R=s.stateNode.containerInfo;if(R===r)break;if(S===4)for(S=s.return;S!==null;){var q=S.tag;if((q===3||q===4)&&S.stateNode.containerInfo===r)return;S=S.return}for(;R!==null;){if(S=ms(R),S===null)return;if(q=S.tag,q===5||q===6||q===26||q===27){s=a=S;continue e}R=R.parentNode}}s=s.return}dc(function(){var J=a,ce=wa(i),fe=[];e:{var ee=Ic.get(e);if(ee!==void 0){var ne=nn,ve=e;switch(e){case"keypress":if(sn(i)===0)break e;case"keydown":case"keyup":ne=Gd;break;case"focusin":ve="focus",ne=Ra;break;case"focusout":ve="blur",ne=Ra;break;case"beforeblur":case"afterblur":ne=Ra;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=mc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Od;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Xd;break;case zc:case jc:case Uc:ne=Nd;break;case qc:ne=Zd;break;case"scroll":case"scrollend":ne=Ld;break;case"wheel":ne=$d;break;case"copy":case"cut":case"paste":ne=jd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=pc;break;case"toggle":case"beforetoggle":ne=e_}var pe=(t&4)!==0,ze=!pe&&(e==="scroll"||e==="scrollend"),V=pe?ee!==null?ee+"Capture":null:ee;pe=[];for(var P=J,$;P!==null;){var he=P;if($=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||$===null||V===null||(he=rr(P,V),he!=null&&pe.push(zr(P,he,$))),ze)break;P=P.return}0<pe.length&&(ee=new ne(ee,ve,null,i,ce),fe.push({event:ee,listeners:pe}))}}if((t&7)===0){e:{if(ee=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",ee&&i!==Ca&&(ve=i.relatedTarget||i.fromElement)&&(ms(ve)||ve[vs]))break e;if((ne||ee)&&(ee=ce.window===ce?ce:(ee=ce.ownerDocument)?ee.defaultView||ee.parentWindow:window,ne?(ve=i.relatedTarget||i.toElement,ne=J,ve=ve?ms(ve):null,ve!==null&&(ze=le(ve),pe=ve.tag,ve!==ze||pe!==5&&pe!==27&&pe!==6)&&(ve=null)):(ne=null,ve=J),ne!==ve)){if(pe=mc,he="onMouseLeave",V="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(pe=pc,he="onPointerLeave",V="onPointerEnter",P="pointer"),ze=ne==null?ee:sr(ne),$=ve==null?ee:sr(ve),ee=new pe(he,P+"leave",ne,i,ce),ee.target=ze,ee.relatedTarget=$,he=null,ms(ce)===J&&(pe=new pe(V,P+"enter",ve,i,ce),pe.target=$,pe.relatedTarget=ze,he=pe),ze=he,ne&&ve)t:{for(pe=J_,V=ne,P=ve,$=0,he=V;he;he=pe(he))$++;he=0;for(var ge=P;ge;ge=pe(ge))he++;for(;0<$-he;)V=pe(V),$--;for(;0<he-$;)P=pe(P),he--;for(;$--;){if(V===P||P!==null&&V===P.alternate){pe=V;break t}V=pe(V),P=pe(P)}pe=null}else pe=null;ne!==null&&uf(fe,ee,ne,pe,!1),ve!==null&&ze!==null&&uf(fe,ze,ve,pe,!0)}}e:{if(ee=J?sr(J):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var Re=Ac;else if(Ec(ee))if(Dc)Re=u_;else{Re=o_;var me=l_}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?J&&ba(J.elementType)&&(Re=Ac):Re=c_;if(Re&&(Re=Re(e,J))){xc(fe,Re,i,ce);break e}me&&me(e,ee,J),e==="focusout"&&J&&ee.type==="number"&&J.memoizedProps.value!=null&&ya(ee,"number",ee.value)}switch(me=J?sr(J):window,e){case"focusin":(Ec(me)||me.contentEditable==="true")&&(xs=me,Ha=J,fr=null);break;case"focusout":fr=Ha=xs=null;break;case"mousedown":Na=!0;break;case"contextmenu":case"mouseup":case"dragend":Na=!1,Hc(fe,i,ce);break;case"selectionchange":if(f_)break;case"keydown":case"keyup":Hc(fe,i,ce)}var Ce;if(La)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Es?Cc(e,i)&&(De="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(De="onCompositionStart");De&&(Sc&&i.locale!=="ko"&&(Es||De!=="onCompositionStart"?De==="onCompositionEnd"&&Es&&(Ce=_c()):(pi=ce,Aa="value"in pi?pi.value:pi.textContent,Es=!0)),me=Vn(J,De),0<me.length&&(De=new gc(De,e,null,i,ce),fe.push({event:De,listeners:me}),Ce?De.data=Ce:(Ce=wc(i),Ce!==null&&(De.data=Ce)))),(Ce=i_?s_(e,i):r_(e,i))&&(De=Vn(J,"onBeforeInput"),0<De.length&&(me=new gc("onBeforeInput","beforeinput",null,i,ce),fe.push({event:me,listeners:De}),me.data=Ce)),V_(fe,e,J,i,ce)}of(fe,t)})}function zr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Vn(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,a=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||a===null||(r=rr(e,i),r!=null&&s.unshift(zr(e,r,a)),r=rr(e,t),r!=null&&s.push(zr(e,r,a))),e.tag===3)return s;e=e.return}return[]}function J_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function uf(e,t,i,s,r){for(var a=t._reactName,S=[];i!==null&&i!==s;){var R=i,q=R.alternate,J=R.stateNode;if(R=R.tag,q!==null&&q===s)break;R!==5&&R!==26&&R!==27||J===null||(q=J,r?(J=rr(i,a),J!=null&&S.unshift(zr(i,J,q))):r||(J=rr(i,a),J!=null&&S.push(zr(i,J,q)))),i=i.return}S.length!==0&&e.push({event:t,listeners:S})}var ev=/\r\n?/g,tv=/\u0000|\uFFFD/g;function hf(e){return(typeof e=="string"?e:""+e).replace(ev,`
|
|
49
|
-
`).replace(tv,"")}function ff(e,t){return t=hf(t),hf(e)===t}function Ne(e,t,i,s,r,a){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&bs(e,""+s);break;case"className":$r(e,"class",s);break;case"tabIndex":$r(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":$r(e,i,s);break;case"style":hc(e,s,a);break;case"data":if(t!=="object"){$r(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=en(""+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"&&Ne(e,t,"name",r.name,r,null),Ne(e,t,"formEncType",r.formEncType,r,null),Ne(e,t,"formMethod",r.formMethod,r,null),Ne(e,t,"formTarget",r.formTarget,r,null)):(Ne(e,t,"encType",r.encType,r,null),Ne(e,t,"method",r.method,r,null),Ne(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=en(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Qt);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(O(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(O(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=en(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Qr(e,"popover",s);break;case"xlinkActuate":Zt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Zt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Zt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Zt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Zt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Zt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Qr(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=Rd.get(i)||i,Qr(e,i,s))}}function lo(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(O(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(O(60));e.innerHTML=i}}break;case"children":typeof s=="string"?bs(e,s):(typeof s=="number"||typeof s=="bigint")&&bs(e,""+s);break;case"onScroll":s!=null&&xe("scroll",e);break;case"onScrollEnd":s!=null&&xe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ic.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[_t]||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,""):Qr(e,i,s)}}}function ot(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var s=!1,r=!1,a;for(a in i)if(i.hasOwnProperty(a)){var S=i[a];if(S!=null)switch(a){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(O(137,t));default:Ne(e,t,a,S,i,null)}}r&&Ne(e,t,"srcSet",i.srcSet,i,null),s&&Ne(e,t,"src",i.src,i,null);return;case"input":xe("invalid",e);var R=a=S=r=null,q=null,J=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":S=ce;break;case"checked":q=ce;break;case"defaultChecked":J=ce;break;case"value":a=ce;break;case"defaultValue":R=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(O(137,t));break;default:Ne(e,t,s,ce,i,null)}}lc(e,a,R,q,J,S,r,!1);return;case"select":xe("invalid",e),s=S=a=null;for(r in i)if(i.hasOwnProperty(r)&&(R=i[r],R!=null))switch(r){case"value":a=R;break;case"defaultValue":S=R;break;case"multiple":s=R;default:Ne(e,t,r,R,i,null)}t=a,i=S,e.multiple=!!s,t!=null?ys(e,!!s,t,!1):i!=null&&ys(e,!!s,i,!0);return;case"textarea":xe("invalid",e),a=r=s=null;for(S in i)if(i.hasOwnProperty(S)&&(R=i[S],R!=null))switch(S){case"value":s=R;break;case"defaultValue":r=R;break;case"children":a=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(O(91));break;default:Ne(e,t,S,R,i,null)}cc(e,s,r,a);return;case"option":for(q in i)if(i.hasOwnProperty(q)&&(s=i[q],s!=null))switch(q){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ne(e,t,q,s,i,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(s=0;s<Nr.length;s++)xe(Nr[s],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in i)if(i.hasOwnProperty(J)&&(s=i[J],s!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(O(137,t));default:Ne(e,t,J,s,i,null)}return;default:if(ba(t)){for(ce in i)i.hasOwnProperty(ce)&&(s=i[ce],s!==void 0&&lo(e,t,ce,s,i,void 0));return}}for(R in i)i.hasOwnProperty(R)&&(s=i[R],s!=null&&Ne(e,t,R,s,i,null))}function iv(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,S=null,R=null,q=null,J=null,ce=null;for(ne in i){var fe=i[ne];if(i.hasOwnProperty(ne)&&fe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":q=fe;default:s.hasOwnProperty(ne)||Ne(e,t,ne,null,s,fe)}}for(var ee in s){var ne=s[ee];if(fe=i[ee],s.hasOwnProperty(ee)&&(ne!=null||fe!=null))switch(ee){case"type":a=ne;break;case"name":r=ne;break;case"checked":J=ne;break;case"defaultChecked":ce=ne;break;case"value":S=ne;break;case"defaultValue":R=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(O(137,t));break;default:ne!==fe&&Ne(e,t,ee,ne,s,fe)}}Sa(e,S,R,q,J,ce,a,r);return;case"select":ne=S=R=ee=null;for(a in i)if(q=i[a],i.hasOwnProperty(a)&&q!=null)switch(a){case"value":break;case"multiple":ne=q;default:s.hasOwnProperty(a)||Ne(e,t,a,null,s,q)}for(r in s)if(a=s[r],q=i[r],s.hasOwnProperty(r)&&(a!=null||q!=null))switch(r){case"value":ee=a;break;case"defaultValue":R=a;break;case"multiple":S=a;default:a!==q&&Ne(e,t,r,a,s,q)}t=R,i=S,s=ne,ee!=null?ys(e,!!i,ee,!1):!!s!=!!i&&(t!=null?ys(e,!!i,t,!0):ys(e,!!i,i?[]:"",!1));return;case"textarea":ne=ee=null;for(R in i)if(r=i[R],i.hasOwnProperty(R)&&r!=null&&!s.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Ne(e,t,R,null,s,r)}for(S in s)if(r=s[S],a=i[S],s.hasOwnProperty(S)&&(r!=null||a!=null))switch(S){case"value":ee=r;break;case"defaultValue":ne=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(O(91));break;default:r!==a&&Ne(e,t,S,r,s,a)}oc(e,ee,ne);return;case"option":for(var ve in i)if(ee=i[ve],i.hasOwnProperty(ve)&&ee!=null&&!s.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:Ne(e,t,ve,null,s,ee)}for(q in s)if(ee=s[q],ne=i[q],s.hasOwnProperty(q)&&ee!==ne&&(ee!=null||ne!=null))switch(q){case"selected":e.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:Ne(e,t,q,ee,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 pe in i)ee=i[pe],i.hasOwnProperty(pe)&&ee!=null&&!s.hasOwnProperty(pe)&&Ne(e,t,pe,null,s,ee);for(J in s)if(ee=s[J],ne=i[J],s.hasOwnProperty(J)&&ee!==ne&&(ee!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(O(137,t));break;default:Ne(e,t,J,ee,s,ne)}return;default:if(ba(t)){for(var ze in i)ee=i[ze],i.hasOwnProperty(ze)&&ee!==void 0&&!s.hasOwnProperty(ze)&&lo(e,t,ze,void 0,s,ee);for(ce in s)ee=s[ce],ne=i[ce],!s.hasOwnProperty(ce)||ee===ne||ee===void 0&&ne===void 0||lo(e,t,ce,ee,s,ne);return}}for(var V in i)ee=i[V],i.hasOwnProperty(V)&&ee!=null&&!s.hasOwnProperty(V)&&Ne(e,t,V,null,s,ee);for(fe in s)ee=s[fe],ne=i[fe],!s.hasOwnProperty(fe)||ee===ne||ee==null&&ne==null||Ne(e,t,fe,ee,s,ne)}function df(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sv(){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,S=r.initiatorType,R=r.duration;if(a&&R&&df(S)){for(S=0,R=r.responseEnd,s+=1;s<i.length;s++){var q=i[s],J=q.startTime;if(J>R)break;var ce=q.transferSize,fe=q.initiatorType;ce&&df(fe)&&(q=q.responseEnd,S+=ce*(q<R?1:(R-J)/(q-J)))}if(--s,t+=8*(a+S)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var oo=null,co=null;function Zn(e){return e.nodeType===9?e:e.ownerDocument}function _f(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 vf(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 uo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ho=null;function rv(){var e=window.event;return e&&e.type==="popstate"?e===ho?!1:(ho=e,!0):(ho=null,!1)}var mf=typeof setTimeout=="function"?setTimeout:void 0,nv=typeof clearTimeout=="function"?clearTimeout:void 0,gf=typeof Promise=="function"?Promise:void 0,av=typeof queueMicrotask=="function"?queueMicrotask:typeof gf<"u"?function(e){return gf.resolve(null).then(e).catch(lv)}:mf;function lv(e){setTimeout(function(){throw e})}function Hi(e){return e==="head"}function pf(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),$s(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")jr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,jr(i);for(var a=i.firstChild;a;){var S=a.nextSibling,R=a.nodeName;a[ir]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&a.rel.toLowerCase()==="stylesheet"||i.removeChild(a),a=S}}else i==="body"&&jr(e.ownerDocument.body);i=r}while(i);$s(t)}function Sf(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 fo(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":fo(i),ga(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function ov(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[ir])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=qt(e.nextSibling),e===null)break}return null}function cv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=qt(e.nextSibling),e===null))return null;return e}function yf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qt(e.nextSibling),e===null))return null;return e}function _o(e){return e.data==="$?"||e.data==="$~"}function vo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function uv(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 qt(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 mo=null;function bf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return qt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Cf(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 wf(e,t,i){switch(t=Zn(i),e){case"html":if(e=t.documentElement,!e)throw Error(O(452));return e;case"head":if(e=t.head,!e)throw Error(O(453));return e;case"body":if(e=t.body,!e)throw Error(O(454));return e;default:throw Error(O(451))}}function jr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ga(e)}var It=new Map,Ef=new Set;function Qn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var di=G.d;G.d={f:hv,r:fv,D:dv,C:_v,L:vv,m:mv,X:pv,S:gv,M:Sv};function hv(){var e=di.f(),t=Wn();return e||t}function fv(e){var t=gs(e);t!==null&&t.tag===5&&t.type==="form"?qu(t):di.r(e)}var Vs=typeof document>"u"?null:document;function xf(e,t,i){var s=Vs;if(s&&typeof t=="string"&&t){var r=Ot(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),Ef.has(r)||(Ef.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),ot(t,"link",e),it(t),s.head.appendChild(t)))}}function dv(e){di.D(e),xf("dns-prefetch",e,null)}function _v(e,t){di.C(e,t),xf("preconnect",e,t)}function vv(e,t,i){di.L(e,t,i);var s=Vs;if(s&&e&&t){var r='link[rel="preload"][as="'+Ot(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ot(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ot(i.imageSizes)+'"]')):r+='[href="'+Ot(e)+'"]';var a=r;switch(t){case"style":a=Zs(e);break;case"script":a=Qs(e)}It.has(a)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),It.set(a,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Ur(a))||t==="script"&&s.querySelector(qr(a))||(t=s.createElement("link"),ot(t,"link",e),it(t),s.head.appendChild(t)))}}function mv(e,t){di.m(e,t);var i=Vs;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ot(s)+'"][href="'+Ot(e)+'"]',a=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Qs(e)}if(!It.has(a)&&(e=h({rel:"modulepreload",href:e},t),It.set(a,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(qr(a)))return}s=i.createElement("link"),ot(s,"link",e),it(s),i.head.appendChild(s)}}}function gv(e,t,i){di.S(e,t,i);var s=Vs;if(s&&e){var r=ps(s).hoistableStyles,a=Zs(e);t=t||"default";var S=r.get(a);if(!S){var R={loading:0,preload:null};if(S=s.querySelector(Ur(a)))R.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=It.get(a))&&go(e,i);var q=S=s.createElement("link");it(q),ot(q,"link",e),q._p=new Promise(function(J,ce){q.onload=J,q.onerror=ce}),q.addEventListener("load",function(){R.loading|=1}),q.addEventListener("error",function(){R.loading|=2}),R.loading|=4,$n(S,t,s)}S={type:"stylesheet",instance:S,count:1,state:R},r.set(a,S)}}}function pv(e,t){di.X(e,t);var i=Vs;if(i&&e){var s=ps(i).hoistableScripts,r=Qs(e),a=s.get(r);a||(a=i.querySelector(qr(r)),a||(e=h({src:e,async:!0},t),(t=It.get(r))&&po(e,t),a=i.createElement("script"),it(a),ot(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function Sv(e,t){di.M(e,t);var i=Vs;if(i&&e){var s=ps(i).hoistableScripts,r=Qs(e),a=s.get(r);a||(a=i.querySelector(qr(r)),a||(e=h({src:e,async:!0,type:"module"},t),(t=It.get(r))&&po(e,t),a=i.createElement("script"),it(a),ot(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function Af(e,t,i,s){var r=(r=Q.current)?Qn(r):null;if(!r)throw Error(O(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Zs(i.href),i=ps(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=Zs(i.href);var a=ps(r).hoistableStyles,S=a.get(e);if(S||(r=r.ownerDocument||r,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,S),(a=r.querySelector(Ur(e)))&&!a._p&&(S.instance=a,S.state.loading=5),It.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},It.set(e,i),a||yv(r,e,i,S.state))),t&&s===null)throw Error(O(528,""));return S}if(t&&s!==null)throw Error(O(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Qs(i),i=ps(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(O(444,e))}}function Zs(e){return'href="'+Ot(e)+'"'}function Ur(e){return'link[rel="stylesheet"]['+e+"]"}function Df(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function yv(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}),ot(t,"link",i),it(t),e.head.appendChild(t))}function Qs(e){return'[src="'+Ot(e)+'"]'}function qr(e){return"script[async]"+e}function Tf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ot(i.href)+'"]');if(s)return t.instance=s,it(s),s;var r=h({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),it(s),ot(s,"style",r),$n(s,i.precedence,e),t.instance=s;case"stylesheet":r=Zs(i.href);var a=e.querySelector(Ur(r));if(a)return t.state.loading|=4,t.instance=a,it(a),a;s=Df(i),(r=It.get(r))&&go(s,r),a=(e.ownerDocument||e).createElement("link"),it(a);var S=a;return S._p=new Promise(function(R,q){S.onload=R,S.onerror=q}),ot(a,"link",s),t.state.loading|=4,$n(a,i.precedence,e),t.instance=a;case"script":return a=Qs(i.src),(r=e.querySelector(qr(a)))?(t.instance=r,it(r),r):(s=i,(r=It.get(a))&&(s=h({},i),po(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),it(r),ot(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(O(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,$n(s,i.precedence,e));return t.instance}function $n(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,S=0;S<s.length;S++){var R=s[S];if(R.dataset.precedence===t)a=R;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 go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function po(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Jn=null;function Rf(e,t,i){if(Jn===null){var s=new Map,r=Jn=new Map;r.set(i,s)}else r=Jn,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[ir]||a[rt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var S=a.getAttribute(t)||"";S=e+S;var R=s.get(S);R?R.push(a):s.set(S,[a])}}return s}function kf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function bv(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Lf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Cv(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=Zs(s.href),a=t.querySelector(Ur(r));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ea.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=a,it(a);return}a=t.ownerDocument||t,s=Df(s),(r=It.get(r))&&go(s,r),a=a.createElement("link"),it(a);var S=a;S._p=new Promise(function(R,q){S.onload=R,S.onerror=q}),ot(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=ea.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var So=0;function wv(e,t){return e.stylesheets&&e.count===0&&ia(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ia(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&So===0&&(So=62500*sv());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ia(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>So?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function ea(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ia(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ta=null;function ia(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ta=new Map,t.forEach(Ev,e),ta=null,ea.call(e))}function Ev(e,t){if(!(t.state.loading&4)){var i=ta.get(e);if(i)var s=i.get(null);else{i=new Map,ta.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<r.length;a++){var S=r[a];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(i.set(S.dataset.precedence,S),s=S)}s&&i.set(null,s)}r=t.instance,S=r.getAttribute("data-precedence"),a=i.get(S)||s,a===s&&i.set(null,r),i.set(S,r),this.count++,s=ea.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 Ir={$$typeof:l,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function xv(e,t,i,s,r,a,S,R,q){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=da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=da(0),this.hiddenUpdates=da(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function Mf(e,t,i,s,r,a,S,R,q,J,ce,fe){return e=new xv(e,t,i,S,q,J,ce,fe,R),t=1,a===!0&&(t|=24),a=xt(3,null,null,t),e.current=a,a.stateNode=e,t=Qa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:s,isDehydrated:i,cache:t},tl(a),e}function Of(e){return e?(e=Ts,e):Ts}function Bf(e,t,i,s,r,a){r=Of(r),s.context===null?s.context=r:s.pendingContext=r,s=Ei(t),s.payload={element:i},a=a===void 0?null:a,a!==null&&(s.callback=a),i=xi(e,s,t),i!==null&&(yt(i,e,t),Sr(i,e,t))}function Hf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function yo(e,t){Hf(e,t),(e=e.alternate)&&Hf(e,t)}function Nf(e){if(e.tag===13||e.tag===31){var t=$i(e,67108864);t!==null&&yt(t,e,67108864),yo(e,67108864)}}function zf(e){if(e.tag===13||e.tag===31){var t=kt();t=_a(t);var i=$i(e,t);i!==null&&yt(i,e,t),yo(e,t)}}var sa=!0;function Av(e,t,i,s){var r=W.T;W.T=null;var a=G.p;try{G.p=2,bo(e,t,i,s)}finally{G.p=a,W.T=r}}function Dv(e,t,i,s){var r=W.T;W.T=null;var a=G.p;try{G.p=8,bo(e,t,i,s)}finally{G.p=a,W.T=r}}function bo(e,t,i,s){if(sa){var r=Co(s);if(r===null)ao(e,t,s,ra,i),Uf(e,s);else if(Rv(r,e,t,i,s))s.stopPropagation();else if(Uf(e,s),t&4&&-1<Tv.indexOf(e)){for(;r!==null;){var a=gs(r);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var S=Fi(a.pendingLanes);if(S!==0){var R=a;for(R.pendingLanes|=2,R.entangledLanes|=2;S;){var q=1<<31-wt(S);R.entanglements[1]|=q,S&=~q}Vt(a),(Le&6)===0&&(qn=Je()+500,Hr(0))}}break;case 31:case 13:R=$i(a,2),R!==null&&yt(R,a,2),Wn(),yo(a,2)}if(a=Co(s),a===null&&ao(e,t,s,ra,i),a===r)break;r=a}r!==null&&s.stopPropagation()}else ao(e,t,s,null,i)}}function Co(e){return e=wa(e),wo(e)}var ra=null;function wo(e){if(ra=null,e=ms(e),e!==null){var t=le(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=K(t),e!==null)return e;e=null}else if(i===31){if(e=u(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ra=e,null}function jf(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(Lt()){case vi:return 2;case ds:return 8;case bt:case _s:return 32;case Wt:return 268435456;default:return 32}default:return 32}}var Eo=!1,Ni=null,zi=null,ji=null,Wr=new Map,Pr=new Map,Ui=[],Tv="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 Uf(e,t){switch(e){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":Wr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pr.delete(t.pointerId)}}function Kr(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=gs(t),t!==null&&Nf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Rv(e,t,i,s,r){switch(t){case"focusin":return Ni=Kr(Ni,e,t,i,s,r),!0;case"dragenter":return zi=Kr(zi,e,t,i,s,r),!0;case"mouseover":return ji=Kr(ji,e,t,i,s,r),!0;case"pointerover":var a=r.pointerId;return Wr.set(a,Kr(Wr.get(a)||null,e,t,i,s,r)),!0;case"gotpointercapture":return a=r.pointerId,Pr.set(a,Kr(Pr.get(a)||null,e,t,i,s,r)),!0}return!1}function qf(e){var t=ms(e.target);if(t!==null){var i=le(t);if(i!==null){if(t=i.tag,t===13){if(t=K(i),t!==null){e.blockedOn=t,Jo(e.priority,function(){zf(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,Jo(e.priority,function(){zf(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 na(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Co(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Ca=s,i.target.dispatchEvent(s),Ca=null}else return t=gs(i),t!==null&&Nf(t),e.blockedOn=i,!1;t.shift()}return!0}function If(e,t,i){na(e)&&i.delete(t)}function kv(){Eo=!1,Ni!==null&&na(Ni)&&(Ni=null),zi!==null&&na(zi)&&(zi=null),ji!==null&&na(ji)&&(ji=null),Wr.forEach(If),Pr.forEach(If)}function aa(e,t){e.blockedOn===t&&(e.blockedOn=null,Eo||(Eo=!0,k.unstable_scheduleCallback(k.unstable_NormalPriority,kv)))}var la=null;function Wf(e){la!==e&&(la=e,k.unstable_scheduleCallback(k.unstable_NormalPriority,function(){la===e&&(la=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(wo(s||i)===null)continue;break}var a=gs(i);a!==null&&(e.splice(t,3),t-=3,bl(a,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function $s(e){function t(q){return aa(q,e)}Ni!==null&&aa(Ni,e),zi!==null&&aa(zi,e),ji!==null&&aa(ji,e),Wr.forEach(t),Pr.forEach(t);for(var i=0;i<Ui.length;i++){var s=Ui[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Ui.length&&(i=Ui[0],i.blockedOn===null);)qf(i),i.blockedOn===null&&Ui.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],S=r[_t]||null;if(typeof a=="function")S||Wf(i);else if(S){var R=null;if(a&&a.hasAttribute("formAction")){if(r=a,S=a[_t]||null)R=S.formAction;else if(wo(r)!==null)continue}else R=S.action;typeof R=="function"?i[s+1]=R:(i.splice(s,3),s-=3),Wf(i)}}}function Pf(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(S){return r=S})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var 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 xo(e){this._internalRoot=e}oa.prototype.render=xo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));var i=t.current,s=kt();Bf(i,s,e,t,null,null)},oa.prototype.unmount=xo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bf(e.current,2,null,e,null,null),Wn(),t[vs]=null}};function oa(e){this._internalRoot=e}oa.prototype.unstable_scheduleHydration=function(e){if(e){var t=$o();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ui.length&&t!==0&&t<Ui[i].priority;i++);Ui.splice(i,0,e),i===0&&qf(e)}};var Kf=I.version;if(Kf!=="19.2.7")throw Error(O(527,Kf,"19.2.7"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=d(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var Lv={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ca=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ca.isDisabled&&ca.supportsFiber)try{Yi=ca.inject(Lv),Ct=ca}catch{}}return Yr.createRoot=function(e,t){if(!ie(e))throw Error(O(299));var i=!1,s="",r=Zu,a=Qu,S=$u;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&&(S=t.onRecoverableError)),t=Mf(e,1,!1,null,null,i,s,null,r,a,S,Pf),e[vs]=t.current,no(e),new xo(t)},Yr.hydrateRoot=function(e,t,i){if(!ie(e))throw Error(O(299));var s=!1,r="",a=Zu,S=Qu,R=$u,q=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&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(R=i.onRecoverableError),i.formState!==void 0&&(q=i.formState)),t=Mf(e,1,!0,t,i??null,s,r,q,a,S,R,Pf),t.context=Of(null),i=t.current,s=kt(),s=_a(s),r=Ei(s),r.callback=null,xi(i,r,s),i=s,t.current.lanes=i,tr(t,i),Vt(t),e[vs]=t.current,no(e),new oa(t)},Yr.version="19.2.7",Yr}var ed;function Pv(){if(ed)return Ro.exports;ed=1;function k(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(k)}catch(I){console.error(I)}}return k(),Ro.exports=Wv(),Ro.exports}var Kv=Pv();const Gv="data:image/svg+xml,%3csvg%20width='115'%20height='122'%20viewBox='0%200%20115%20122'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M105.267%2060.7219L98.8902%2071.7648L92.1353%2083.4669L83.3114%2098.7521L70.18%20121.491H0L13.1249%2098.7521H57.042L72.6274%2071.7648L79.0038%2060.7219L72.2619%2049.0459H98.5247L105.267%2060.7219Z'%20fill='%236BE195'/%3e%3cpath%20d='M114.072%200L100.954%2022.7189H57.0694L57.0498%2022.6928L57.0368%2022.7189L41.8365%2049.047L35.0945%2060.723L41.471%2071.7659H15.2016L8.8252%2060.723L15.5671%2049.047L21.9631%2037.978L30.774%2022.7189L43.8923%200H114.072Z'%20fill='%236BE195'/%3e%3c/svg%3e",ld="sapiom-harness-theme",jo=new Set;function Yv(){var k;return typeof window<"u"&&((k=window.matchMedia)==null?void 0:k.call(window,"(prefers-color-scheme: dark)").matches)===!0}function Fv(){const k=typeof window<"u"?window.localStorage.getItem(ld):null;return k==="light"||k==="dark"?k:Yv()?"dark":"light"}let Ko=Fv();function ua(){return Ko}function Xv(k){Ko=k,document.documentElement.dataset.theme=k,window.localStorage.setItem(ld,k),jo.forEach(I=>I(k))}function Vv(){Xv(Ko==="dark"?"light":"dark")}function Go(k){return jo.add(k),()=>jo.delete(k)}/**
|
|
50
|
-
* @license lucide-react v1.23.0 - ISC
|
|
51
|
-
*
|
|
52
|
-
* This source code is licensed under the ISC license.
|
|
53
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const od=(...k)=>k.filter((I,F,O)=>!!I&&I.trim()!==""&&O.indexOf(I)===F).join(" ").trim();/**
|
|
55
|
-
* @license lucide-react v1.23.0 - ISC
|
|
56
|
-
*
|
|
57
|
-
* This source code is licensed under the ISC license.
|
|
58
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const Zv=k=>k.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
60
|
-
* @license lucide-react v1.23.0 - ISC
|
|
61
|
-
*
|
|
62
|
-
* This source code is licensed under the ISC license.
|
|
63
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const Qv=k=>k.replace(/^([A-Z])|[\s-_]+(\w)/g,(I,F,O)=>O?O.toUpperCase():F.toLowerCase());/**
|
|
65
|
-
* @license lucide-react v1.23.0 - ISC
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the ISC license.
|
|
68
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const td=k=>{const I=Qv(k);return I.charAt(0).toUpperCase()+I.slice(1)};/**
|
|
70
|
-
* @license lucide-react v1.23.0 - ISC
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the ISC license.
|
|
73
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/var Oo={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"};/**
|
|
75
|
-
* @license lucide-react v1.23.0 - ISC
|
|
76
|
-
*
|
|
77
|
-
* This source code is licensed under the ISC license.
|
|
78
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const $v=k=>{for(const I in k)if(I.startsWith("aria-")||I==="role"||I==="title")return!0;return!1},Jv=ue.createContext({}),em=()=>ue.useContext(Jv),tm=ue.forwardRef(({color:k,size:I,strokeWidth:F,absoluteStrokeWidth:O,className:ie="",children:le,iconNode:K,...u},f)=>{const{size:d=24,strokeWidth:p=2,absoluteStrokeWidth:h=!1,color:m="currentColor",className:y=""}=em()??{},E=O??h?Number(F??p)*24/Number(I??d):F??p;return ue.createElement("svg",{ref:f,...Oo,width:I??d??Oo.width,height:I??d??Oo.height,stroke:k??m,strokeWidth:E,className:od("lucide",y,ie),...!le&&!$v(u)&&{"aria-hidden":"true"},...u},[...K.map(([v,c])=>ue.createElement(v,c)),...Array.isArray(le)?le:[le]])});/**
|
|
80
|
-
* @license lucide-react v1.23.0 - ISC
|
|
81
|
-
*
|
|
82
|
-
* This source code is licensed under the ISC license.
|
|
83
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const Ye=(k,I)=>{const F=ue.forwardRef(({className:O,...ie},le)=>ue.createElement(tm,{ref:le,iconNode:I,className:od(`lucide-${Zv(td(k))}`,`lucide-${k}`,O),...ie}));return F.displayName=td(k),F};/**
|
|
85
|
-
* @license lucide-react v1.23.0 - ISC
|
|
86
|
-
*
|
|
87
|
-
* This source code is licensed under the ISC license.
|
|
88
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const im=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],sm=Ye("arrow-left",im);/**
|
|
90
|
-
* @license lucide-react v1.23.0 - ISC
|
|
91
|
-
*
|
|
92
|
-
* This source code is licensed under the ISC license.
|
|
93
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/const rm=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],nm=Ye("chevron-down",rm);/**
|
|
95
|
-
* @license lucide-react v1.23.0 - ISC
|
|
96
|
-
*
|
|
97
|
-
* This source code is licensed under the ISC license.
|
|
98
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const am=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lm=Ye("circle-question-mark",am);/**
|
|
100
|
-
* @license lucide-react v1.23.0 - ISC
|
|
101
|
-
*
|
|
102
|
-
* This source code is licensed under the ISC license.
|
|
103
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const om=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],cm=Ye("cloud",om);/**
|
|
105
|
-
* @license lucide-react v1.23.0 - ISC
|
|
106
|
-
*
|
|
107
|
-
* This source code is licensed under the ISC license.
|
|
108
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const um=[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]],hm=Ye("corner-left-up",um);/**
|
|
110
|
-
* @license lucide-react v1.23.0 - ISC
|
|
111
|
-
*
|
|
112
|
-
* This source code is licensed under the ISC license.
|
|
113
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/const fm=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],dm=Ye("external-link",fm);/**
|
|
115
|
-
* @license lucide-react v1.23.0 - ISC
|
|
116
|
-
*
|
|
117
|
-
* This source code is licensed under the ISC license.
|
|
118
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/const _m=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],vm=Ye("folder",_m);/**
|
|
120
|
-
* @license lucide-react v1.23.0 - ISC
|
|
121
|
-
*
|
|
122
|
-
* This source code is licensed under the ISC license.
|
|
123
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
-
*/const mm=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],gm=Ye("history",mm);/**
|
|
125
|
-
* @license lucide-react v1.23.0 - ISC
|
|
126
|
-
*
|
|
127
|
-
* This source code is licensed under the ISC license.
|
|
128
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/const pm=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Sm=Ye("moon",pm);/**
|
|
130
|
-
* @license lucide-react v1.23.0 - ISC
|
|
131
|
-
*
|
|
132
|
-
* This source code is licensed under the ISC license.
|
|
133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/const ym=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],bm=Ye("play",ym);/**
|
|
135
|
-
* @license lucide-react v1.23.0 - ISC
|
|
136
|
-
*
|
|
137
|
-
* This source code is licensed under the ISC license.
|
|
138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const Cm=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],wm=Ye("plug",Cm);/**
|
|
140
|
-
* @license lucide-react v1.23.0 - ISC
|
|
141
|
-
*
|
|
142
|
-
* This source code is licensed under the ISC license.
|
|
143
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const Em=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],xm=Ye("plus",Em);/**
|
|
145
|
-
* @license lucide-react v1.23.0 - ISC
|
|
146
|
-
*
|
|
147
|
-
* This source code is licensed under the ISC license.
|
|
148
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const Am=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Dm=Ye("radio",Am);/**
|
|
150
|
-
* @license lucide-react v1.23.0 - ISC
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the ISC license.
|
|
153
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/const Tm=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Rm=Ye("refresh-cw",Tm);/**
|
|
155
|
-
* @license lucide-react v1.23.0 - ISC
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the ISC license.
|
|
158
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const km=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Lm=Ye("search",km);/**
|
|
160
|
-
* @license lucide-react v1.23.0 - ISC
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the ISC license.
|
|
163
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const Mm=[["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"}]],Om=Ye("settings",Mm);/**
|
|
165
|
-
* @license lucide-react v1.23.0 - ISC
|
|
166
|
-
*
|
|
167
|
-
* This source code is licensed under the ISC license.
|
|
168
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const Bm=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Hm=Ye("sparkles",Bm);/**
|
|
170
|
-
* @license lucide-react v1.23.0 - ISC
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the ISC license.
|
|
173
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const Nm=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],zm=Ye("sun",Nm);/**
|
|
175
|
-
* @license lucide-react v1.23.0 - ISC
|
|
176
|
-
*
|
|
177
|
-
* This source code is licensed under the ISC license.
|
|
178
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const jm=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Um=Ye("triangle-alert",jm);/**
|
|
180
|
-
* @license lucide-react v1.23.0 - ISC
|
|
181
|
-
*
|
|
182
|
-
* This source code is licensed under the ISC license.
|
|
183
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/const qm=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Im=Ye("wand-sparkles",qm);/**
|
|
185
|
-
* @license lucide-react v1.23.0 - ISC
|
|
186
|
-
*
|
|
187
|
-
* This source code is licensed under the ISC license.
|
|
188
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
-
*/const Wm=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pm=Ye("x",Wm);/**
|
|
190
|
-
* @license lucide-react v1.23.0 - ISC
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the ISC license.
|
|
193
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/const Km=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Gm=Ye("zap",Km),Ym={ArrowLeft:sm,ChevronDown:nm,Cloud:cm,CornerLeftUp:hm,ExternalLink:dm,Folder:vm,History:gm,Moon:Sm,Play:bm,Plug:wm,Plus:xm,Radio:Dm,RefreshCw:Rm,Search:Lm,Settings:Om,Sparkles:Hm,Sun:zm,TriangleAlert:Um,Wand2:Im,X:Pm,Zap:Gm};function ut({name:k,size:I=16}){const F=Ym[k]??lm;return M.jsx(F,{size:I,strokeWidth:1.75,"aria-hidden":"true"})}const Fm=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC"),Xm=Fm?"⌘K":"Ctrl+K";function Vm(k,I){return I==="env-forced-off"?"analytics off (env)":k?"analytics on":"analytics off"}function Zm(k,I,F){return I==="env-forced-off"?`Remote analytics disabled by ${F?`$${F}`:"environment variable"}. Click to open settings.`:k?"Remote analytics enabled. Click to open settings.":"Remote analytics disabled. Click to open settings."}function Qm(k,I){return I==="env-forced-off"?"env":k?"on":"off"}function $m({authenticated:k,organizationName:I,onOpenPalette:F,telemetryOptIn:O,consentSource:ie,consentEnvReason:le,onOpenSettings:K}){const[u,f]=ue.useState(ua());ue.useEffect(()=>Go(f),[]);const d=Qm(O,ie),p=Vm(O,ie),h=Zm(O,ie,le);return M.jsxs("header",{className:"brand-header",children:[M.jsxs("div",{className:"brand-lockup",children:[M.jsx("img",{src:Gv,alt:"",className:"brand-mark"}),M.jsx("span",{className:"brand-name",children:"Sapiom"}),M.jsx("span",{className:"brand-divider"}),M.jsx("span",{className:"brand-product",children:"Harness"})]}),M.jsxs("div",{className:"brand-header-right",children:[M.jsxs("button",{className:"palette-trigger","data-testid":"palette-trigger","aria-label":"Jump to session, workflow, or path",onClick:F,children:[M.jsx(ut,{name:"Search",size:13}),"Jump",M.jsx("span",{className:"palette-trigger-hint",children:Xm})]}),M.jsxs("button",{className:"telemetry-chip","data-testid":"telemetry-chip","data-state":d,"aria-label":h,title:h,onClick:K,children:[M.jsx("span",{className:"telemetry-chip-dot","aria-hidden":"true"}),M.jsx("span",{className:"telemetry-chip-label",children:p})]}),M.jsx("button",{className:"theme-toggle","data-testid":"theme-toggle","aria-label":u==="dark"?"Switch to light mode":"Switch to dark mode",title:u==="dark"?"Switch to light mode":"Switch to dark mode",onClick:Vv,children:M.jsx(ut,{name:u==="dark"?"Sun":"Moon",size:15})}),M.jsxs("div",{className:"brand-identity","data-testid":"brand-identity",children:[M.jsx("span",{className:"identity-dot","data-authenticated":k}),k?I??"Signed in":"Not signed in"]})]})]})}const cd=Date.now(),hs=k=>new Date(cd-k*6e4).toISOString(),ha=k=>new Date(cd-k*24*60*6e4).toISOString(),Jm="/Users/demo/acme-app";hs(1),hs(1),hs(42),hs(20),ha(2),ha(1),hs(0),hs(0);hs(1),ha(1),ha(1);function eg(){return!1}function ud(k){return(k==null?void 0:k.boundWorkflowPath)??null}class Js extends Error{constructor(F,O,ie){super(O);Ao(this,"status");Ao(this,"reason");this.name="ApiError",this.status=F,this.reason=ie}}function fa(){const k=window.__HARNESS__;return k!=null&&k.token?k.token:new URLSearchParams(window.location.search).get("token")??""}class tg{async request(I,F){const O=await fetch(I,{...F,headers:{"Content-Type":"application/json","X-Harness-Token":fa(),...F==null?void 0:F.headers}});if(!O.ok){const ie=await O.text().catch(()=>"");let le;try{const K=ie?JSON.parse(ie):void 0;K&&typeof K=="object"&&typeof K.error=="string"&&(le=K.error)}catch{}throw new Js(O.status,`${(F==null?void 0:F.method)??"GET"} ${I} → ${O.status}${ie?`: ${ie}`:""}`,le)}if(O.status!==204)return await O.json()}getState(){return this.request("/api/state")}createSession(I){return this.request("/api/sessions",{method:"POST",body:JSON.stringify(I)})}listSessions(){return this.request("/api/sessions")}sessionHistory(I){return this.request(`/api/sessions/history?cwd=${encodeURIComponent(I)}`)}resumeSession(I){return this.request(`/api/sessions/${encodeURIComponent(I)}/resume`,{method:"POST"})}async killSession(I){await this.request(`/api/sessions/${encodeURIComponent(I)}`,{method:"DELETE"})}async injectInput(I,F){await this.request(`/api/sessions/${encodeURIComponent(I)}/input`,{method:"POST",body:JSON.stringify(F)})}listWorkflows(){return this.request("/api/workflows")}connectWorkflow(I){return this.request("/api/workflows/connect",{method:"POST",body:JSON.stringify({path:I})})}scanWorkflows(I){return this.request("/api/workflows/scan",{method:"POST",body:JSON.stringify({root:I})})}listMacros(){return this.request("/api/macros")}async runMacro(I,F){await this.request(`/api/macros/${encodeURIComponent(I)}/run`,{method:"POST",body:JSON.stringify(F)})}getSettings(){return this.request("/api/settings")}updateSettings(I){return this.request("/api/settings",{method:"PATCH",body:JSON.stringify(I)})}listDir(I){const F=I?`?path=${encodeURIComponent(I)}`:"";return this.request(`/api/fs/list${F}`)}bindWorkflow(I,F){const O={workflowPath:F};return this.request(`/api/sessions/${encodeURIComponent(I)}/workflow`,{method:"PATCH",body:JSON.stringify(O)})}seedSampleProject(){return this.request("/api/sample-project",{method:"POST"})}listSkills(){return this.request("/api/skills")}getSkill(I){return this.request(`/api/skills/${encodeURIComponent(I)}`)}}function ig(){return new tg}function sg(k){return k.find(I=>I.id==="visualize")}function hd(k,I,F){if(k.requiresWorkflow){if(!I)return"Select a workflow first";if(k.action.kind==="open-url"&&k.action.url.includes("{{workflow.definitionId}}")&&I.definitionId==null)return"Not deployed yet"}return k.action.kind!=="open-url"&&!F?"Start a session first":null}function rg(k,I){return k.replace("{{workflow.definitionId}}",String((I==null?void 0:I.definitionId)??""))}function Ii(k,I,F){const O={event:k,...I?{data:I}:{},...F?{harnessSessionId:F}:{}};fetch("/api/track",{method:"POST",headers:{"Content-Type":"application/json","X-Harness-Token":fa()},body:JSON.stringify(O),keepalive:!0}).catch(()=>{})}function ng({workflow:k,onReVisualize:I,reVisualizeDisabledReason:F}){return M.jsxs("div",{className:"workflow-actions-header","data-testid":"workflow-actions-header",children:[M.jsx("span",{className:"workflow-actions-name",children:k.name}),k.definitionId!=null&&M.jsx("span",{className:"workflow-dot workflow-dot-pinned","data-tooltip":"Deployed to production"}),M.jsx("button",{className:"macro-icon-btn canvas-refresh-btn","aria-label":"Re-visualize","data-testid":"canvas-revisualize","data-tooltip":F??"Re-visualize",disabled:!!F,onClick:I,children:M.jsx(ut,{name:"RefreshCw",size:14})})]})}function ag({sessionId:k,lastMessage:I,boundWorkflow:F,activeSessionId:O,macros:ie,tasks:le,onRunMacro:K}){const[u,f]=ue.useState(!1),[d,p]=ue.useState(0),[h,m]=ue.useState(ua()),[y,E]=ue.useState(!1),[v,c]=ue.useState(!0),[o,n]=ue.useState(new Set);ue.useEffect(()=>Go(m),[]),ue.useEffect(()=>{if(f(!1),c(!0),!k||eg())return;let j=!1;return E(!0),fetch(`/canvas/${k}/`,{method:"HEAD"}).then(N=>!j&&f(N.ok)).catch(()=>{}).finally(()=>!j&&E(!1)),()=>{j=!0}},[k]),ue.useEffect(()=>{!I||!k||I.type==="canvas.reload"&&I.harnessSessionId===k&&(f(!0),c(!0),p(j=>j+1))},[I,k]);const l=(F==null?void 0:F.path)??null;ue.useEffect(()=>{c(!0),p(j=>j+1)},[l]);const _=sg(ie),b=_?hd(_,F,O):null,C=le.filter(j=>j.harnessSessionId===k&&(j.workflowPath==null||j.workflowPath===l)),w=C.find(j=>j.status==="running")??null,g=C.filter(j=>j.status!=="running").sort((j,N)=>(N.endedAt??"").localeCompare(j.endedAt??""))[0],x=!w&&(g==null?void 0:g.status)==="failed"&&!o.has(g.id)?g:null,z=x?ie.find(j=>j.id===x.macroId)??null:null,U=()=>{_&&(K(_),Ii("visualize.triggered"))};return M.jsxs("aside",{className:"canvas-pane",children:[F&&M.jsx(ng,{workflow:F,onReVisualize:U,reVisualizeDisabledReason:b}),k?x?M.jsxs("div",{className:"canvas-task-failed","data-testid":"canvas-task-failed",children:[M.jsxs("p",{className:"canvas-task-title",children:[M.jsx(ut,{name:"TriangleAlert",size:14})," ",x.label," failed."]}),x.errorTail&&M.jsx("pre",{className:"canvas-task-error",children:x.errorTail}),M.jsxs("div",{className:"canvas-task-actions",children:[z&&M.jsx("button",{className:"btn-primary","data-testid":"canvas-task-retry",onClick:()=>K(z),children:"Retry"}),M.jsx("button",{className:"btn-ghost","data-testid":"canvas-task-dismiss",onClick:()=>n(j=>{const N=new Set(j);return N.add(x.id),N}),children:"Dismiss"})]})]}):w&&!u?M.jsxs("div",{className:"canvas-task-activity","data-testid":"canvas-task-activity",children:[M.jsxs("div",{className:"canvas-task-title",children:[M.jsx("span",{className:"canvas-task-spinner","aria-hidden":"true"}),M.jsxs("span",{children:[w.label," is running…"]})]}),w.statusLines.length>0&&M.jsx("ul",{className:"canvas-task-lines","data-testid":"canvas-task-lines",children:w.statusLines.slice(-8).map((j,N)=>M.jsx("li",{children:j},`${N}-${j}`))}),M.jsx("p",{className:"canvas-empty-hint",children:"Running as a background task — your session stays free. The canvas reloads here when it finishes."})]}):y?M.jsxs("div",{className:"canvas-loading","data-testid":"canvas-loading",children:[M.jsx("span",{className:"canvas-task-spinner","aria-hidden":"true"}),M.jsx("p",{className:"canvas-empty-hint",children:"Loading canvas…"})]}):u?M.jsxs("div",{className:"canvas-frame-wrap",children:[v&&M.jsxs("div",{className:"canvas-loading canvas-loading--overlay","data-testid":"canvas-loading",children:[M.jsx("span",{className:"canvas-task-spinner","aria-hidden":"true"}),M.jsx("p",{className:"canvas-empty-hint",children:"Rendering diagram…"})]}),w&&M.jsxs("div",{className:"canvas-task-activity canvas-task-activity--overlay","data-testid":"canvas-task-activity",children:[M.jsxs("div",{className:"canvas-task-title",children:[M.jsx("span",{className:"canvas-task-spinner","aria-hidden":"true"}),M.jsxs("span",{children:[w.label," is running…"]})]}),w.statusLines.length>0&&M.jsx("ul",{className:"canvas-task-lines","data-testid":"canvas-task-lines",children:w.statusLines.slice(-8).map((j,N)=>M.jsx("li",{children:j},`${N}-${j}`))}),M.jsx("p",{className:"canvas-empty-hint",children:"Running as a background task — your session stays free. The canvas reloads here when it finishes."})]}),M.jsx("iframe",{className:"canvas-iframe",src:`/canvas/${k}/?theme=${h}`,sandbox:"allow-scripts",onLoad:()=>c(!1)},`${k}:${d}`)]}):M.jsxs("div",{className:"canvas-empty",children:[M.jsx("p",{children:"Nothing generated yet."}),_&&M.jsxs("button",{className:"btn-primary canvas-visualize-cta","data-testid":"canvas-visualize-cta","data-tooltip":b??_.label,disabled:!!b,onClick:()=>{K(_),Ii("visualize.triggered")},children:[M.jsx(ut,{name:"Sparkles",size:14})," Visualize"]}),M.jsxs("p",{className:"canvas-empty-hint",children:["Ask your agent to visualize, or write HTML directly to ",M.jsx("code",{children:".sapiom/canvas/index.html"})," — this pane hot-reloads whenever it changes."]})]}):M.jsx("div",{className:"canvas-empty",children:"Start a session to see its canvas here."})]})}function lg(k,I){if(!k)return 0;const F=k.toLowerCase(),O=I.toLowerCase();let ie=0,le=0,K=0;for(let u=0;u<F.length;u++){const f=F[u],d=O.indexOf(f,le);if(d===-1)return null;K=d===le?K+1:0,ie+=10-Math.min(d-le,8),ie+=K*3,d===0&&(ie+=5),le=d+1}return ie}const og={session:"Radio",workflow:"Folder",recent:"Folder",path:"Folder"};function cg({sessions:k,workflows:I,recentDirs:F,listDir:O,onSelectSession:ie,onOpenPath:le,onClose:K}){const[u,f]=ue.useState(""),[d,p]=ue.useState([]),[h,m]=ue.useState(!1),[y,E]=ue.useState(0),v=ue.useRef(null);ue.useEffect(()=>{var _;(_=v.current)==null||_.focus()},[]);const c=u.startsWith("/")||u.startsWith("~");ue.useEffect(()=>{if(!c){p([]);return}let _=!1;m(!0);const b=setTimeout(()=>{O(u).then(C=>{_||p(C.dirs)}).catch(()=>{}).finally(()=>!_&&m(!1))},150);return()=>{_=!0,clearTimeout(b)}},[u,c,O]);const o=ue.useMemo(()=>{if(c){const x=u.trim(),z=x?[{id:`confirm:${x}`,kind:"path",label:x,meta:"Open this path",path:x}]:[],U=d.map(j=>({id:`dir:${j.path}`,kind:"path",label:j.name,meta:j.path,path:j.path}));return[...z,...U]}const _=k.filter(x=>x.status!=="exited").map(x=>({id:`session:${x.id}`,kind:"session",label:x.title,meta:x.cwd,sessionId:x.id})),b=I.map(x=>({id:`workflow:${x.path}`,kind:"workflow",label:x.name,meta:x.path,path:x.path})),C=new Set(I.map(x=>x.path)),w=F.filter(x=>!C.has(x)).map(x=>({id:`recent:${x}`,kind:"recent",label:x.split("/").filter(Boolean).pop()??x,meta:x,path:x})),g=[..._,...b,...w];return u?g.map(x=>({item:x,score:lg(u,`${x.label} ${x.meta}`)})).filter(x=>x.score!==null).sort((x,z)=>z.score-x.score).map(x=>x.item).slice(0,20):g.slice(0,20)},[u,c,d,k,I,F]);ue.useEffect(()=>E(0),[o.length,u]);const n=_=>{_.kind==="session"&&_.sessionId?ie(_.sessionId):_.path&&le(_.path),K()},l=_=>{if(_.key==="ArrowDown")_.preventDefault(),E(b=>Math.min(b+1,o.length-1));else if(_.key==="ArrowUp")_.preventDefault(),E(b=>Math.max(b-1,0));else if(_.key==="Enter"){_.preventDefault();const b=o[y];b&&n(b)}else _.key==="Escape"&&K()};return M.jsx("div",{className:"modal-backdrop",onClick:K,children:M.jsxs("div",{className:"modal command-palette",onClick:_=>_.stopPropagation(),children:[M.jsx("input",{ref:v,className:"command-palette-input","data-testid":"command-palette-input",placeholder:"Jump to a session, workflow, or path…",value:u,onChange:_=>f(_.target.value),onKeyDown:l}),M.jsxs("div",{className:"command-palette-list","data-testid":"command-palette-list",children:[c&&h&&M.jsx("div",{className:"command-palette-empty",children:"Loading…"}),o.length===0&&!h&&M.jsx("div",{className:"command-palette-empty",children:"No matches"}),o.map((_,b)=>M.jsxs("button",{type:"button",className:"command-palette-item"+(b===y?" is-selected":""),"data-testid":`command-palette-item-${b}`,onMouseEnter:()=>E(b),onClick:()=>n(_),children:[M.jsx(ut,{name:og[_.kind],size:14}),M.jsx("span",{className:"command-palette-item-label",children:_.label}),M.jsx("span",{className:"command-palette-item-meta",children:_.meta})]},_.id))]})]})})}function ug({session:k,onResume:I,onClose:F}){const O=k.agentSessionId!=null;return M.jsxs("div",{className:"dead-session-pane","data-testid":"dead-session-pane",children:[M.jsx("div",{className:"dead-session-title",children:"Session exited"}),M.jsxs("div",{className:"dead-session-meta",children:[k.cwd,k.exitCode!=null&&` · exit code ${k.exitCode}`]}),M.jsxs("div",{className:"dead-session-actions",children:[M.jsx("button",{className:"btn-primary","data-testid":"dead-session-resume",onClick:I,disabled:!O,title:O?void 0:"This session can't be resumed — it exited before establishing a session id",children:"Resume"}),M.jsx("button",{className:"btn-ghost","data-testid":"dead-session-close",onClick:F,children:"Close"})]}),!O&&M.jsx("div",{className:"dead-session-resume-reason","data-testid":"dead-session-resume-reason",children:"This session can't be resumed — it exited before establishing a session id."})]})}function Uo(k,{onDismiss:I,containerRef:F,triggerRef:O}){ue.useEffect(()=>{if(!k)return;const ie=K=>{const u=F.current;u&&K.target instanceof Node&&!u.contains(K.target)&&I()},le=K=>{var u;K.key==="Escape"&&(I(),(u=O==null?void 0:O.current)==null||u.focus())};return document.addEventListener("mousedown",ie),document.addEventListener("keydown",le),()=>{document.removeEventListener("mousedown",ie),document.removeEventListener("keydown",le)}},[k,I,F,O])}function hg({value:k,onChange:I,onSubmit:F,recentDirs:O,listDir:ie}){const[le,K]=ue.useState(k),[u,f]=ue.useState([]),[d,p]=ue.useState(k),[h,m]=ue.useState(!1);ue.useEffect(()=>{let o=!1;m(!0);const n=setTimeout(()=>{ie(k||void 0).then(l=>{o||(K(l.path),f(l.dirs),p(l.parent))}).catch(()=>{}).finally(()=>!o&&m(!1))},150);return()=>{o=!0,clearTimeout(n)}},[k]);const y=k.startsWith(le)?k.slice(le.length).replace(/^\//,""):"",E=y?u.filter(o=>o.name.toLowerCase().startsWith(y.toLowerCase())):u,v=o=>I(o),c=o=>{o.key==="Enter"&&(E.length>0?v(E[0].path):F())};return M.jsxs("div",{className:"dir-picker",children:[M.jsxs("div",{className:"dir-picker-inputrow",children:[M.jsx("button",{type:"button",className:"dir-picker-up","data-testid":"dir-picker-up",disabled:d===le,onClick:()=>v(d),title:"Up to parent directory",children:M.jsx(ut,{name:"CornerLeftUp",size:14})}),M.jsx("input",{id:"new-session-cwd",autoFocus:!0,className:"modal-input dir-picker-input","data-testid":"dir-picker-input",value:k,placeholder:"/path/to/project",onChange:o=>I(o.target.value),onKeyDown:c})]}),O.length>0&&M.jsx("div",{className:"recent-dirs",children:O.map(o=>M.jsx("button",{type:"button",className:"recent-dir-chip",onClick:()=>v(o),children:o},o))}),M.jsxs("div",{className:"dir-picker-listing","data-testid":"dir-picker-listing",children:[M.jsx("div",{className:"dir-picker-path",children:le}),h&&M.jsx("div",{className:"dir-picker-empty",children:"Loading…"}),!h&&E.length===0&&M.jsx("div",{className:"dir-picker-empty",children:"No subdirectories"}),!h&&E.map(o=>M.jsxs("button",{type:"button",className:"dir-picker-item","data-testid":`dir-picker-item-${o.name}`,onClick:()=>v(o.path),children:[M.jsx(ut,{name:"Folder",size:13}),o.name]},o.path))]})]})}const fg=[{id:"claude-code",label:"Claude Code"},{id:"codex",label:"Codex"}];function fd({recentDirs:k,launchDir:I,listDir:F,onClose:O,onCreate:ie,triggerRef:le}){const[K,u]=ue.useState(I??k[0]??""),[f,d]=ue.useState("claude-code"),[p,h]=ue.useState(!1),[m,y]=ue.useState(null),E=ue.useRef(null);Uo(!0,{onDismiss:O,containerRef:E,triggerRef:le});const v=async()=>{const c=K.trim();if(c){h(!0),y(null);try{await ie(c,f),Ii("session.created"),O()}catch(o){y(o.message)}finally{h(!1)}}};return M.jsx("div",{className:"modal-backdrop",children:M.jsxs("div",{className:"modal modal-new-session",ref:E,children:[M.jsx("div",{className:"modal-header",children:"New session"}),M.jsx("label",{className:"modal-label",htmlFor:"new-session-cwd",children:"Directory"}),M.jsx(hg,{value:K,onChange:u,onSubmit:()=>void v(),recentDirs:k,listDir:F}),M.jsx("div",{className:"modal-label",children:"Harness"}),M.jsx("div",{className:"harness-picker",children:fg.map(c=>M.jsx("button",{type:"button",className:"harness-option"+(f===c.id?" is-selected":""),onClick:()=>d(c.id),children:c.label},c.id))}),m&&M.jsx("div",{className:"modal-error",children:m}),M.jsxs("div",{className:"modal-actions",children:[M.jsx("button",{className:"btn-ghost",onClick:O,disabled:p,children:"Cancel"}),M.jsx("button",{className:"btn-primary",onClick:()=>void v(),disabled:p||!K.trim(),children:p?"Starting…":"Start session"})]})]})})}const dg="~/.sapiom/harness",_g={events:`${dg}/events.ndjson`};function vg({authenticated:k,organizationName:I,telemetryOptIn:F,onToggleTelemetry:O,onClose:ie}){const[le,K]=ue.useState(!1),u=async()=>{const f=!F;K(!0);try{await O(f),Ii("consent.changed",{optIn:f})}finally{K(!1)}};return M.jsxs("div",{className:"settings-popover","data-testid":"settings-popover",children:[M.jsx("div",{className:"settings-identity",children:k?I??"Signed in":"Not signed in"}),M.jsxs("label",{className:"settings-toggle-row",children:[M.jsx("span",{children:"Send usage analytics to Sapiom"}),M.jsx("button",{type:"button",role:"switch","aria-checked":F,"data-testid":"telemetry-toggle",className:"toggle-switch"+(F?" is-on":""),disabled:le,onClick:()=>void u(),children:M.jsx("span",{className:"toggle-knob"})})]}),M.jsxs("p",{className:"settings-note",children:["Prompts, tool calls, and session lifecycle events are always written locally to"," ",M.jsx("code",{children:_g.events}),". With your consent, they’re also sent to Sapiom."]}),M.jsx("button",{className:"btn-ghost settings-close",onClick:ie,children:"Close"})]})}function mg({sessions:k,activeSessionId:I,onSelectSession:F,onResumeHistory:O,history:ie,historyLoading:le,onOpenHistory:K,recentDirs:u,launchDir:f,listDir:d,onCreateSession:p,boundWorkflowName:h,authenticated:m,organizationName:y,telemetryOptIn:E,onToggleTelemetry:v,busySessionIds:c,settingsOpen:o,onSetSettingsOpen:n}){const[l,_]=ue.useState(!1),[b,C]=ue.useState(!1),w=ue.useRef(null),g=ue.useRef(null),x=ue.useRef(null),z=ue.useRef(null),U=ue.useRef(null),j=ue.useCallback(()=>_(!1),[]),N=ue.useCallback(()=>n(!1),[n]);Uo(l,{onDismiss:j,containerRef:w,triggerRef:g}),Uo(o,{onDismiss:N,containerRef:x,triggerRef:z});const te=ue.useMemo(()=>k.filter(G=>G.status!=="exited").sort((G,re)=>G.createdAt.localeCompare(re.createdAt)),[k]),oe=k.filter(G=>G.status==="exited"),W=()=>{const G=!l;if(_(G),G){const re=k.find(B=>B.id===I)??null,D=(re==null?void 0:re.cwd)??u[0];D&&K(D)}};return M.jsxs("div",{className:"session-bar",children:[M.jsxs("div",{className:"session-tabs",role:"tablist","data-testid":"session-tabs",children:[te.map(G=>{const re=G.id===I;return M.jsxs("button",{role:"tab","aria-selected":re,className:"session-tab"+(re?" is-active":""),"data-testid":`session-tab-${G.id}`,onClick:()=>{F(G.id),Ii("session.switched",{},G.id)},children:[M.jsx("span",{className:"session-dot","data-status":G.status}),M.jsx("span",{className:"session-tab-title",children:G.title}),c.has(G.id)&&M.jsx("span",{className:"session-tab-busy","data-testid":`session-tab-busy-${G.id}`,"aria-hidden":"true"}),re&&h&&M.jsxs("span",{className:"session-workflow-chip","data-testid":"session-workflow-chip",children:["▸ working on ",h]})]},G.id)}),M.jsx("button",{ref:U,className:"session-tab-add","data-testid":"new-session-btn",onClick:()=>C(!0),"aria-label":"New session",title:"New session",children:M.jsx(ut,{name:"Plus",size:14})})]}),M.jsxs("div",{className:"session-history-wrap",ref:w,children:[M.jsxs("button",{ref:g,className:"session-history-trigger","data-testid":"history-trigger",onClick:W,"aria-label":"Session history",title:"Session history",children:[M.jsx(ut,{name:"History",size:14}),oe.length>0&&M.jsx("span",{className:"session-history-badge","data-testid":"session-history-badge",children:oe.length})]}),l&&M.jsxs("div",{className:"session-dropdown-menu","data-testid":"history-menu",children:[M.jsx("div",{className:"session-dropdown-section",children:"Exited"}),oe.length===0&&M.jsx("div",{className:"session-dropdown-empty",children:"No exited sessions"}),oe.map(G=>M.jsxs("button",{"data-testid":`exited-session-${G.id}`,className:"session-dropdown-item"+(G.id===I?" is-selected":""),onClick:()=>{F(G.id),_(!1)},children:[M.jsx("span",{className:"session-dot","data-status":G.status}),M.jsx("span",{className:"session-item-title",children:G.title}),M.jsx("span",{className:"session-item-cwd",children:G.cwd})]},G.id)),M.jsx("div",{className:"session-dropdown-section",children:"History"}),le&&M.jsx("div",{className:"session-dropdown-empty",children:"Loading…"}),!le&&ie.length===0&&M.jsx("div",{className:"session-dropdown-empty",children:"No past sessions for this directory"}),!le&&ie.map(G=>M.jsxs("button",{className:"session-dropdown-item","data-testid":`history-${G.agentSessionId}`,onClick:()=>{O(G),_(!1)},children:[M.jsx("span",{className:"session-item-title",children:G.title}),M.jsxs("span",{className:"session-item-meta",children:[G.harness," · ",new Date(G.lastActiveAt).toLocaleString()]})]},G.agentSessionId))]})]}),M.jsxs("div",{className:"settings-wrap",ref:x,children:[M.jsx("button",{ref:z,className:"gear-btn","aria-label":"Settings","data-testid":"settings-trigger",onClick:()=>n(!o),children:M.jsx(ut,{name:"Settings",size:16})}),o&&M.jsx(vg,{authenticated:m,organizationName:y,telemetryOptIn:E,onToggleTelemetry:v,onClose:()=>n(!1)})]}),b&&M.jsx(fd,{recentDirs:u,launchDir:f,listDir:d,onClose:()=>C(!1),onCreate:p,triggerRef:U})]})}function gg({text:k}){const I=k.split(`
|
|
195
|
-
`),F=[];let O=0,ie=0;function le(){return ie++}function K(u){const f=[],d=/(`[^`]+`|\*\*[^*]+\*\*|\*[^*]+\*)/g;let p=0,h;for(;(h=d.exec(u))!==null;){h.index>p&&f.push(u.slice(p,h.index));const m=h[0];m.startsWith("`")&&m.endsWith("`")?f.push(M.jsx("code",{className:"chat-inline-code",children:m.slice(1,-1)},le())):m.startsWith("**")&&m.endsWith("**")?f.push(M.jsx("strong",{children:m.slice(2,-2)},le())):m.startsWith("*")&&m.endsWith("*")?f.push(M.jsx("em",{children:m.slice(1,-1)},le())):f.push(m),p=h.index+m.length}return p<u.length&&f.push(u.slice(p)),f}for(;O<I.length;){const u=I[O];if(u.startsWith("```")){const d=u.slice(3).trim(),p=[];for(O++;O<I.length&&!I[O].startsWith("```");)p.push(I[O]),O++;O++,F.push(M.jsx("pre",{className:"chat-code-block","data-lang":d||void 0,children:M.jsx("code",{className:d?`language-${d}`:void 0,children:p.join(`
|
|
196
|
-
`)})},le()));continue}const f=u.match(/^(#{1,3})\s+(.+)/);if(f){const p=`h${f[1].length}`;F.push(M.jsx(p,{className:"chat-heading",children:K(f[2])},le())),O++;continue}if(u.startsWith("> ")){F.push(M.jsx("blockquote",{className:"chat-blockquote",children:K(u.slice(2))},le())),O++;continue}if(/^- \[[ x]\]/.test(u)){const d=[];for(;O<I.length&&/^- \[[ x]\]/.test(I[O]);){const p=I[O][3]==="x";d.push({text:I[O].replace(/^- \[[ x]\]\s?/,""),checked:p}),O++}F.push(M.jsx("ul",{className:"chat-list chat-checklist",children:d.map((p,h)=>M.jsx("li",{children:K(p.text)},h))},le()));continue}if(/^[-*+]\s+/.test(u)){const d=[];for(;O<I.length&&/^[-*+]\s+/.test(I[O]);){const p=I[O].replace(/^[-*+]\s+/,"");d.push(M.jsx("li",{children:K(p)},le())),O++}F.push(M.jsx("ul",{className:"chat-list",children:d},le()));continue}if(!u.trim()){O++;continue}F.push(M.jsx("p",{className:"chat-paragraph",children:K(u)},le())),O++}return M.jsx(M.Fragment,{children:F})}function pg(k){return k.source==="package"?`/${k.id} `:`Use the "${k.name}" skill: ${k.description}`}function Sg({skill:k,onBack:I,activeSession:F,onUseSkill:O}){const ie=(F==null?void 0:F.ready)===!0&&F.status!=="exited",le=F?F.status==="exited"?"Session has exited":F.ready?null:"Session is starting":"No active session",K=()=>{ie&&(Ii("skill.used",{skillId:k.id,source:k.source}),O(pg(k)))};return M.jsxs("div",{className:"skill-detail","data-testid":"skill-detail",children:[M.jsxs("div",{className:"skill-detail-header",children:[M.jsx("button",{className:"skill-back btn-ghost",onClick:I,"data-testid":"skill-back","aria-label":"Back to skills list",children:M.jsx(ut,{name:"ArrowLeft",size:13})}),M.jsx("span",{className:"skill-detail-name",children:k.name}),M.jsx("span",{className:"skill-source-badge skill-source-"+k.source,children:k.source==="user"?"user":"pkg"})]}),M.jsxs("div",{className:"skill-detail-actions",children:[M.jsx("button",{className:"skill-use-btn","data-testid":"skill-use-btn",disabled:!ie,title:le??"Populate the terminal with this skill",onClick:K,"aria-label":le?`Use skill — ${le}`:"Use skill",children:"Use skill"}),le&&M.jsx("span",{className:"skill-use-disabled-reason","data-testid":"skill-use-disabled-reason",children:le})]}),M.jsx("div",{className:"skill-detail-body",children:M.jsx(gg,{text:k.body})})]})}function yg({skills:k,loading:I,error:F,onSelectSkill:O}){if(I)return M.jsx("div",{className:"skills-loading",children:"Loading skills…"});if(F)return M.jsx("div",{className:"skills-error",children:F});if(k.length===0)return M.jsxs("div",{className:"skills-empty",children:[M.jsx("p",{children:"No skills found yet."}),M.jsxs("p",{children:["Browse Sapiom's skills and your own here. Create your own under"," ",M.jsx("code",{children:"~/.claude/skills/<id>/SKILL.md"})," in the terminal (claude-code or codex) and they appear here. Tell your agent to use a skill when you want it."]})]});const ie=k.filter(u=>u.source==="user"),le=k.filter(u=>u.source==="package"),K=(u,f)=>u.length===0?null:M.jsxs("div",{className:"skills-group",children:[M.jsx("div",{className:"skills-group-header",children:f}),u.map(d=>M.jsxs("button",{className:"skill-card","data-testid":`skill-card-${d.id}`,onClick:()=>O(d.id),children:[M.jsx("span",{className:"skill-card-name",children:d.name}),M.jsx("span",{className:"skill-card-desc",children:d.description})]},d.id))]},f);return M.jsxs("div",{className:"skills-list","data-testid":"skills-list",children:[K(ie,"Your skills"),K(le,"Sapiom")]})}function bg({listSkills:k,getSkill:I,isActive:F,activeSession:O,onUseSkill:ie}){const[le,K]=ue.useState([]),[u,f]=ue.useState(!0),[d,p]=ue.useState(null),[h,m]=ue.useState(null),[y,E]=ue.useState(!1);ue.useEffect(()=>{if(!F)return;let c=!1;return f(!0),p(null),k().then(o=>{c||K(o)}).catch(o=>{c||p(o.message)}).finally(()=>{c||f(!1)}),()=>{c=!0}},[F,k]);const v=ue.useCallback(async c=>{E(!0),Ii("skill.viewed",{skillId:c});try{const o=await I(c);m(o)}catch(o){const n=o instanceof Js?o.reason??o.message:o.message;p(n)}finally{E(!1)}},[I]);return M.jsxs("aside",{className:"rail rail-skills","data-testid":"skills-panel",children:[M.jsx("div",{className:"rail-header",children:"Skills"}),M.jsx("div",{className:"rail-body",children:y?M.jsx("div",{className:"skills-loading",children:"Loading…"}):h?M.jsx(Sg,{skill:h,onBack:()=>m(null),activeSession:O,onUseSkill:c=>{O&&ie(O.id,c)}}):M.jsx(yg,{skills:le,loading:u,error:d,onSelectSkill:c=>void v(c)})})]})}function Cg({onDismiss:k,onOpenSettings:I}){return M.jsxs("div",{className:"telemetry-notice",role:"status","data-testid":"telemetry-notice",children:[M.jsx("div",{className:"telemetry-notice-body",children:M.jsxs("p",{className:"telemetry-notice-text",children:["Analytics are ",M.jsx("strong",{children:"on by default"})," — usage events (including prompts and tool calls) are collected locally and sent to Sapiom to help improve the product. Change this any time in"," ",M.jsx("button",{className:"telemetry-notice-settings-link",onClick:()=>{I(),k()},children:"Settings"}),", or use the indicator in the top bar."]})}),M.jsx("button",{className:"telemetry-notice-dismiss","aria-label":"Dismiss analytics notice","data-testid":"telemetry-notice-dismiss",onClick:k,children:"×"})]})}var Bo={exports:{}},id;function wg(){return id||(id=1,(function(k,I){(function(F,O){k.exports=O()})(globalThis,(()=>(()=>{var F={4567:function(K,u,f){var d=this&&this.__decorate||function(n,l,_,b){var C,w=arguments.length,g=w<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,l,_,b);else for(var x=n.length-1;x>=0;x--)(C=n[x])&&(g=(w<3?C(g):w>3?C(l,_,g):C(l,_))||g);return w>3&&g&&Object.defineProperty(l,_,g),g},p=this&&this.__param||function(n,l){return function(_,b){l(_,b,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=f(9042),m=f(9924),y=f(844),E=f(4725),v=f(2585),c=f(3656);let o=u.AccessibilityManager=class extends y.Disposable{constructor(n,l,_,b){super(),this._terminal=n,this._coreBrowserService=_,this._renderService=b,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let C=0;C<this._terminal.rows;C++)this._rowElements[C]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[C]);if(this._topBoundaryFocusListener=C=>this._handleBoundaryFocus(C,0),this._bottomBoundaryFocusListener=C=>this._handleBoundaryFocus(C,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new m.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((C=>this._handleResize(C.rows)))),this.register(this._terminal.onRender((C=>this._refreshRows(C.start,C.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((C=>this._handleChar(C)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
197
|
-
`)))),this.register(this._terminal.onA11yTab((C=>this._handleTab(C)))),this.register(this._terminal.onKey((C=>this._handleKey(C.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,c.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(n){for(let l=0;l<n;l++)this._handleChar(" ")}_handleChar(n){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==n&&(this._charsToAnnounce+=n):this._charsToAnnounce+=n,n===`
|
|
198
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(n){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(n)||this._charsToConsume.push(n)}_refreshRows(n,l){this._liveRegionDebouncer.refresh(n,l,this._terminal.rows)}_renderRows(n,l){const _=this._terminal.buffer,b=_.lines.length.toString();for(let C=n;C<=l;C++){const w=_.lines.get(_.ydisp+C),g=[],x=(w==null?void 0:w.translateToString(!0,void 0,void 0,g))||"",z=(_.ydisp+C+1).toString(),U=this._rowElements[C];U&&(x.length===0?(U.innerText=" ",this._rowColumns.set(U,[0,1])):(U.textContent=x,this._rowColumns.set(U,g)),U.setAttribute("aria-posinset",z),U.setAttribute("aria-setsize",b))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(n,l){const _=n.target,b=this._rowElements[l===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||n.relatedTarget!==b)return;let C,w;if(l===0?(C=_,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(C=this._rowElements.shift(),w=_,this._rowContainer.removeChild(C)),C.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{const g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),n.preventDefault(),n.stopImmediatePropagation()}_handleSelectionChange(){var x;if(this._rowElements.length===0)return;const n=document.getSelection();if(!n)return;if(n.isCollapsed)return void(this._rowContainer.contains(n.anchorNode)&&this._terminal.clearSelection());if(!n.anchorNode||!n.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:n.anchorNode,offset:n.anchorOffset},_={node:n.focusNode,offset:n.focusOffset};if((l.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===_.node&&l.offset>_.offset)&&([l,_]=[_,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const b=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(b)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:b,offset:((x=b.textContent)==null?void 0:x.length)??0}),!this._rowContainer.contains(_.node))return;const C=({node:z,offset:U})=>{const j=z instanceof Text?z.parentNode:z;let N=parseInt(j==null?void 0:j.getAttribute("aria-posinset"),10)-1;if(isNaN(N))return console.warn("row is invalid. Race condition?"),null;const te=this._rowColumns.get(j);if(!te)return console.warn("columns is null. Race condition?"),null;let oe=U<te.length?te[U]:te.slice(-1)[0]+1;return oe>=this._terminal.cols&&(++N,oe=0),{row:N,column:oe}},w=C(l),g=C(_);if(w&&g){if(w.row>g.row||w.row===g.row&&w.column>=g.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(g.row-w.row)*this._terminal.cols-w.column+g.column)}}_handleResize(n){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>n;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const n=this._coreBrowserService.mainDocument.createElement("div");return n.setAttribute("role","listitem"),n.tabIndex=-1,this._refreshRowDimensions(n),n}_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 n=0;n<this._terminal.rows;n++)this._refreshRowDimensions(this._rowElements[n])}}_refreshRowDimensions(n){n.style.height=`${this._renderService.dimensions.css.cell.height}px`}};u.AccessibilityManager=o=d([p(1,v.IInstantiationService),p(2,E.ICoreBrowserService),p(3,E.IRenderService)],o)},3614:(K,u)=>{function f(m){return m.replace(/\r?\n/g,"\r")}function d(m,y){return y?"\x1B[200~"+m+"\x1B[201~":m}function p(m,y,E,v){m=d(m=f(m),E.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(m,!0),y.value=""}function h(m,y,E){const v=E.getBoundingClientRect(),c=m.clientX-v.left-10,o=m.clientY-v.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${c}px`,y.style.top=`${o}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(u,"__esModule",{value:!0}),u.rightClickHandler=u.moveTextAreaUnderMouseCursor=u.paste=u.handlePasteEvent=u.copyHandler=u.bracketTextForPaste=u.prepareTextForTerminal=void 0,u.prepareTextForTerminal=f,u.bracketTextForPaste=d,u.copyHandler=function(m,y){m.clipboardData&&m.clipboardData.setData("text/plain",y.selectionText),m.preventDefault()},u.handlePasteEvent=function(m,y,E,v){m.stopPropagation(),m.clipboardData&&p(m.clipboardData.getData("text/plain"),y,E,v)},u.paste=p,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(m,y,E,v,c){h(m,y,E),c&&v.rightClickSelect(m),y.value=v.selectionText,y.select()}},7239:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const d=f(1505);u.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(p,h,m){this._css.set(p,h,m)}getCss(p,h){return this._css.get(p,h)}setColor(p,h,m){this._color.set(p,h,m)}getColor(p,h){return this._color.get(p,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(f,d,p,h){f.addEventListener(d,p,h);let m=!1;return{dispose:()=>{m||(m=!0,f.removeEventListener(d,p,h))}}}},3551:function(K,u,f){var d=this&&this.__decorate||function(o,n,l,_){var b,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,n,l,_);else for(var g=o.length-1;g>=0;g--)(b=o[g])&&(w=(C<3?b(w):C>3?b(n,l,w):b(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},p=this&&this.__param||function(o,n){return function(l,_){n(l,_,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier=void 0;const h=f(3656),m=f(8460),y=f(844),E=f(2585),v=f(4725);let c=u.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(o,n,l,_,b){super(),this._element=o,this._mouseService=n,this._renderService=l,this._bufferService=_,this._linkProviderService=b,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var C;this._lastMouseEvent=void 0,(C=this._activeProviderReplies)==null||C.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(o){this._lastMouseEvent=o;const n=this._positionFromMouseEvent(o,this._element,this._mouseService);if(!n)return;this._isMouseOut=!1;const l=o.composedPath();for(let _=0;_<l.length;_++){const b=l[_];if(b.classList.contains("xterm"))break;if(b.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._handleHover(n),this._lastBufferCell=n)}_handleHover(o){if(this._activeLine!==o.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(o,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,o)||(this._clearCurrentLink(),this._askForLink(o,!0))}_askForLink(o,n){var _,b;this._activeProviderReplies&&n||((_=this._activeProviderReplies)==null||_.forEach((C=>{C==null||C.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=o.y);let l=!1;for(const[C,w]of this._linkProviderService.linkProviders.entries())n?(b=this._activeProviderReplies)!=null&&b.get(C)&&(l=this._checkLinkProviderResult(C,o,l)):w.provideLinks(o.y,(g=>{var z,U;if(this._isMouseOut)return;const x=g==null?void 0:g.map((j=>({link:j})));(z=this._activeProviderReplies)==null||z.set(C,x),l=this._checkLinkProviderResult(C,o,l),((U=this._activeProviderReplies)==null?void 0:U.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(o.y,this._activeProviderReplies)}))}_removeIntersectingLinks(o,n){const l=new Set;for(let _=0;_<n.size;_++){const b=n.get(_);if(b)for(let C=0;C<b.length;C++){const w=b[C],g=w.link.range.start.y<o?0:w.link.range.start.x,x=w.link.range.end.y>o?this._bufferService.cols:w.link.range.end.x;for(let z=g;z<=x;z++){if(l.has(z)){b.splice(C--,1);break}l.add(z)}}}}_checkLinkProviderResult(o,n,l){var C;if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(o);let b=!1;for(let w=0;w<o;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(b=!0);if(!b&&_){const w=_.find((g=>this._linkAtPosition(g.link,n)));w&&(l=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let w=0;w<this._activeProviderReplies.size;w++){const g=(C=this._activeProviderReplies.get(w))==null?void 0:C.find((x=>this._linkAtPosition(x.link,n)));if(g){l=!0,this._handleNewLink(g);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(o){if(!this._currentLink)return;const n=this._positionFromMouseEvent(o,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(o,this._currentLink.link.text)}_clearCurrentLink(o,n){this._currentLink&&this._lastMouseEvent&&(!o||!n||this._currentLink.link.range.start.y>=o&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(o){if(!this._lastMouseEvent)return;const n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._linkAtPosition(o.link,n)&&(this._currentLink=o,this._currentLink.state={decorations:{underline:o.link.decorations===void 0||o.link.decorations.underline,pointerCursor:o.link.decorations===void 0||o.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,o.link,this._lastMouseEvent),o.link.decorations={},Object.defineProperties(o.link.decorations,{pointerCursor:{get:()=>{var l,_;return(_=(l=this._currentLink)==null?void 0:l.state)==null?void 0:_.decorations.pointerCursor},set:l=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,_;return(_=(l=this._currentLink)==null?void 0:l.state)==null?void 0:_.decorations.underline},set:l=>{var _,b,C;(_=this._currentLink)!=null&&_.state&&((C=(b=this._currentLink)==null?void 0:b.state)==null?void 0:C.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(o.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const _=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,b=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=b&&(this._clearCurrentLink(_,b),this._lastMouseEvent)){const C=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);C&&this._askForLink(C,!1)}}))))}_linkHover(o,n,l){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&o.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)}_fireUnderlineEvent(o,n){const l=o.range,_=this._bufferService.buffer.ydisp,b=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-_-1,l.end.x,l.end.y-_-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(b)}_linkLeave(o,n,l){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&o.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)}_linkAtPosition(o,n){const l=o.range.start.y*this._bufferService.cols+o.range.start.x,_=o.range.end.y*this._bufferService.cols+o.range.end.x,b=n.y*this._bufferService.cols+n.x;return l<=b&&b<=_}_positionFromMouseEvent(o,n,l){const _=l.getCoords(o,n,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(o,n,l,_,b){return{x1:o,y1:n,x2:l,y2:_,cols:this._bufferService.cols,fg:b}}};u.Linkifier=c=d([p(1,v.IMouseService),p(2,v.IRenderService),p(3,E.IBufferService),p(4,v.ILinkProviderService)],c)},9042:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.tooMuchOutput=u.promptLabel=void 0,u.promptLabel="Terminal input",u.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(K,u,f){var d=this&&this.__decorate||function(v,c,o,n){var l,_=arguments.length,b=_<3?c:n===null?n=Object.getOwnPropertyDescriptor(c,o):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(v,c,o,n);else for(var C=v.length-1;C>=0;C--)(l=v[C])&&(b=(_<3?l(b):_>3?l(c,o,b):l(c,o))||b);return _>3&&b&&Object.defineProperty(c,o,b),b},p=this&&this.__param||function(v,c){return function(o,n){c(o,n,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=f(511),m=f(2585);let y=u.OscLinkProvider=class{constructor(v,c,o){this._bufferService=v,this._optionsService=c,this._oscLinkService=o}provideLinks(v,c){var x;const o=this._bufferService.buffer.lines.get(v-1);if(!o)return void c(void 0);const n=[],l=this._optionsService.rawOptions.linkHandler,_=new h.CellData,b=o.getTrimmedLength();let C=-1,w=-1,g=!1;for(let z=0;z<b;z++)if(w!==-1||o.hasContent(z)){if(o.loadCell(z,_),_.hasExtendedAttrs()&&_.extended.urlId){if(w===-1){w=z,C=_.extended.urlId;continue}g=_.extended.urlId!==C}else w!==-1&&(g=!0);if(g||w!==-1&&z===b-1){const U=(x=this._oscLinkService.getLinkData(C))==null?void 0:x.uri;if(U){const j={start:{x:w+1,y:v},end:{x:z+(g||z!==b-1?0:1),y:v}};let N=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const te=new URL(U);["http:","https:"].includes(te.protocol)||(N=!0)}catch{N=!0}N||n.push({text:U,range:j,activate:(te,oe)=>l?l.activate(te,oe,j):E(0,oe),hover:(te,oe)=>{var W;return(W=l==null?void 0:l.hover)==null?void 0:W.call(l,te,oe,j)},leave:(te,oe)=>{var W;return(W=l==null?void 0:l.leave)==null?void 0:W.call(l,te,oe,j)}})}g=!1,_.hasExtendedAttrs()&&_.extended.urlId?(w=z,C=_.extended.urlId):(w=-1,C=-1)}}c(n)}};function E(v,c){if(confirm(`Do you want to navigate to ${c}?
|
|
199
|
-
|
|
200
|
-
WARNING: This link could potentially be dangerous`)){const o=window.open();if(o){try{o.opener=null}catch{}o.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=y=d([p(0,m.IBufferService),p(1,m.IOptionsService),p(2,m.IOscLinkService)],y)},6193:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(f,d){this._renderCallback=f,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(f){return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(f,d,p){this._rowCount=p,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const f of this._refreshCallbacks)f(0);this._refreshCallbacks=[]}}},3236:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=f(3614),p=f(3656),h=f(3551),m=f(9042),y=f(3730),E=f(1680),v=f(3107),c=f(5744),o=f(2950),n=f(1296),l=f(428),_=f(4269),b=f(5114),C=f(8934),w=f(3230),g=f(9312),x=f(4725),z=f(6731),U=f(8055),j=f(8969),N=f(8460),te=f(844),oe=f(6114),W=f(8437),G=f(2584),re=f(7399),D=f(5941),B=f(9074),A=f(2585),L=f(5435),Z=f(4567),Y=f(779);class X 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(H={}){super(H),this.browser=oe,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new te.MutableDisposable),this._onCursorMove=this.register(new N.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new N.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new N.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new N.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new N.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new N.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new N.EventEmitter),this._onBlur=this.register(new N.EventEmitter),this._onA11yCharEmitter=this.register(new N.EventEmitter),this._onA11yTabEmitter=this.register(new N.EventEmitter),this._onWillOpen=this.register(new N.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(A.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Y.LinkProviderService),this._instantiationService.setService(x.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(y.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((T,se)=>this.refresh(T,se)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((T=>this._reportWindowsOptions(T)))),this.register(this._inputHandler.onColor((T=>this._handleColorEvent(T)))),this.register((0,N.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,N.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,N.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,N.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((T=>this._afterResize(T.cols,T.rows)))),this.register((0,te.toDisposable)((()=>{var T,se;this._customKeyEventHandler=void 0,(se=(T=this.element)==null?void 0:T.parentNode)==null||se.removeChild(this.element)})))}_handleColorEvent(H){if(this._themeService)for(const T of H){let se,ae="";switch(T.index){case 256:se="foreground",ae="10";break;case 257:se="background",ae="11";break;case 258:se="cursor",ae="12";break;default:se="ansi",ae="4;"+T.index}switch(T.type){case 0:const _e=U.color.toColorRGB(se==="ansi"?this._themeService.colors.ansi[T.index]:this._themeService.colors[se]);this.coreService.triggerDataEvent(`${G.C0.ESC}]${ae};${(0,D.toRgbString)(_e)}${G.C1_ESCAPED.ST}`);break;case 1:if(se==="ansi")this._themeService.modifyColors((de=>de.ansi[T.index]=U.channels.toColor(...T.color)));else{const de=se;this._themeService.modifyColors((we=>we[de]=U.channels.toColor(...T.color)))}break;case 2:this._themeService.restoreColor(T.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(H){H?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Z.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(H){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(G.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var H;return(H=this.textarea)==null?void 0:H.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(G.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 H=this.buffer.ybase+this.buffer.y,T=this.buffer.lines.get(H);if(!T)return;const se=Math.min(this.buffer.x,this.cols-1),ae=this._renderService.dimensions.css.cell.height,_e=T.getWidth(se),de=this._renderService.dimensions.css.cell.width*_e,we=this.buffer.y*this._renderService.dimensions.css.cell.height,Me=se*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Me+"px",this.textarea.style.top=we+"px",this.textarea.style.width=de+"px",this.textarea.style.height=ae+"px",this.textarea.style.lineHeight=ae+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(T=>{this.hasSelection()&&(0,d.copyHandler)(T,this._selectionService)})));const H=T=>(0,d.handlePasteEvent)(T,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",H)),this.register((0,p.addDisposableDomListener)(this.element,"paste",H)),oe.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(T=>{T.button===2&&(0,d.rightClickHandler)(T,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(T=>{(0,d.rightClickHandler)(T,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),oe.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(T=>{T.button===1&&(0,d.moveTextAreaUnderMouseCursor)(T,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(H=>this._keyUp(H)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(H=>this._keyDown(H)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(H=>this._keyPress(H)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(H=>this._compositionHelper.compositionupdate(H)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(H=>this._inputEvent(H)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(H){var se;if(!H)throw new Error("Terminal requires a parent element.");if(H.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((se=this.element)==null?void 0:se.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=H.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),H.appendChild(this.element);const T=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),T.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",(ae=>this.updateCursorStyle(ae)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),T.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),oe.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(b.CoreBrowserService,this.textarea,H.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(x.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(ae=>this._handleTextAreaFocus(ae)))),this.register((0,p.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(x.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(z.ThemeService),this._instantiationService.setService(x.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ae=>this._onRender.fire(ae)))),this.onResize((ae=>this._renderService.resize(ae.cols,ae.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(o.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(C.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(T);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(g.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ae=>this._renderService.handleSelectionChanged(ae.start,ae.end,ae.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ae=>{this.textarea.value=ae,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ae=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(ae=>this._selectionService.handleMouseDown(ae)))),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",(ae=>this._handleScreenReaderModeOptionChange(ae)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ae=>{!this._overviewRulerRenderer&&ae&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(c.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(n.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const H=this,T=this.element;function se(de){const we=H._mouseService.getMouseReportCoords(de,H.screenElement);if(!we)return!1;let Me,Ue;switch(de.overrideType||de.type){case"mousemove":Ue=32,de.buttons===void 0?(Me=3,de.button!==void 0&&(Me=de.button<3?de.button:3)):Me=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":Ue=0,Me=de.button<3?de.button:3;break;case"mousedown":Ue=1,Me=de.button<3?de.button:3;break;case"wheel":if(H._customWheelEventHandler&&H._customWheelEventHandler(de)===!1||H.viewport.getLinesScrolled(de)===0)return!1;Ue=de.deltaY<0?0:1,Me=4;break;default:return!1}return!(Ue===void 0||Me===void 0||Me>4)&&H.coreMouseService.triggerMouseEvent({col:we.col,row:we.row,x:we.x,y:we.y,button:Me,action:Ue,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const ae={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:de=>(se(de),de.buttons||(this._document.removeEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.removeEventListener("mousemove",ae.mousedrag)),this.cancel(de)),wheel:de=>(se(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&se(de)},mousemove:de=>{de.buttons||se(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),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&de?ae.mousemove||(T.addEventListener("mousemove",_e.mousemove),ae.mousemove=_e.mousemove):(T.removeEventListener("mousemove",ae.mousemove),ae.mousemove=null),16&de?ae.wheel||(T.addEventListener("wheel",_e.wheel,{passive:!1}),ae.wheel=_e.wheel):(T.removeEventListener("wheel",ae.wheel),ae.wheel=null),2&de?ae.mouseup||(ae.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",ae.mouseup),ae.mouseup=null),4&de?ae.mousedrag||(ae.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",ae.mousedrag),ae.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(T,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return se(de),ae.mouseup&&this._document.addEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.addEventListener("mousemove",ae.mousedrag),this.cancel(de)}))),this.register((0,p.addDisposableDomListener)(T,"wheel",(de=>{if(!ae.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const we=this.viewport.getLinesScrolled(de);if(we===0)return;const Me=G.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let Ue="";for(let tt=0;tt<Math.abs(we);tt++)Ue+=Me;return this.coreService.triggerDataEvent(Ue,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(T,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(T,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(H,T){var se;(se=this._renderService)==null||se.refreshRows(H,T)}updateCursorStyle(H){var T;(T=this._selectionService)!=null&&T.shouldColumnSelect(H)?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(H,T,se=0){var ae;se===1?(super.scrollLines(H,T,se),this.refresh(0,this.rows-1)):(ae=this.viewport)==null||ae.scrollLines(H)}paste(H){(0,d.paste)(H,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(H){this._customKeyEventHandler=H}attachCustomWheelEventHandler(H){this._customWheelEventHandler=H}registerLinkProvider(H){return this._linkProviderService.registerLinkProvider(H)}registerCharacterJoiner(H){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const T=this._characterJoinerService.register(H);return this.refresh(0,this.rows-1),T}deregisterCharacterJoiner(H){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(H)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(H){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+H)}registerDecoration(H){return this._decorationService.registerDecoration(H)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(H,T,se){this._selectionService.setSelection(H,T,se)}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 H;(H=this._selectionService)==null||H.clearSelection()}selectAll(){var H;(H=this._selectionService)==null||H.selectAll()}selectLines(H,T){var se;(se=this._selectionService)==null||se.selectLines(H,T)}_keyDown(H){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(H)===!1)return!1;const T=this.browser.isMac&&this.options.macOptionIsMeta&&H.altKey;if(!T&&!this._compositionHelper.keydown(H))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;T||H.key!=="Dead"&&H.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const se=(0,re.evaluateKeyboardEvent)(H,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(H),se.type===3||se.type===2){const ae=this.rows-1;return this.scrollLines(se.type===2?-ae:ae),this.cancel(H,!0)}return se.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,H)||(se.cancel&&this.cancel(H,!0),!se.key||!!(H.key&&!H.ctrlKey&&!H.altKey&&!H.metaKey&&H.key.length===1&&H.key.charCodeAt(0)>=65&&H.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(se.key!==G.C0.ETX&&se.key!==G.C0.CR||(this.textarea.value=""),this._onKey.fire({key:se.key,domEvent:H}),this._showCursor(),this.coreService.triggerDataEvent(se.key,!0),!this.optionsService.rawOptions.screenReaderMode||H.altKey||H.ctrlKey?this.cancel(H,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(H,T){const se=H.isMac&&!this.options.macOptionIsMeta&&T.altKey&&!T.ctrlKey&&!T.metaKey||H.isWindows&&T.altKey&&T.ctrlKey&&!T.metaKey||H.isWindows&&T.getModifierState("AltGraph");return T.type==="keypress"?se:se&&(!T.keyCode||T.keyCode>47)}_keyUp(H){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(H)===!1||((function(T){return T.keyCode===16||T.keyCode===17||T.keyCode===18})(H)||this.focus(),this.updateCursorStyle(H),this._keyPressHandled=!1)}_keyPress(H){let T;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(H)===!1)return!1;if(this.cancel(H),H.charCode)T=H.charCode;else if(H.which===null||H.which===void 0)T=H.keyCode;else{if(H.which===0||H.charCode===0)return!1;T=H.which}return!(!T||(H.altKey||H.ctrlKey||H.metaKey)&&!this._isThirdLevelShift(this.browser,H)||(T=String.fromCharCode(T),this._onKey.fire({key:T,domEvent:H}),this._showCursor(),this.coreService.triggerDataEvent(T,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(H){if(H.data&&H.inputType==="insertText"&&(!H.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const T=H.data;return this.coreService.triggerDataEvent(T,!0),this.cancel(H),!0}return!1}resize(H,T){H!==this.cols||T!==this.rows?super.resize(H,T):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(H,T){var se,ae;(se=this._charSizeService)==null||se.measure(),(ae=this.viewport)==null||ae.syncScrollArea(!0)}clear(){var H;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 T=1;T<this.rows;T++)this.buffer.lines.push(this.buffer.getBlankLine(W.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(H=this.viewport)==null||H.reset(),this.refresh(0,this.rows-1)}}reset(){var T,se;this.options.rows=this.rows,this.options.cols=this.cols;const H=this._customKeyEventHandler;this._setup(),super.reset(),(T=this._selectionService)==null||T.reset(),this._decorationService.reset(),(se=this.viewport)==null||se.reset(),this._customKeyEventHandler=H,this.refresh(0,this.rows-1)}clearTextureAtlas(){var H;(H=this._renderService)==null||H.clearTextureAtlas()}_reportFocus(){var H;(H=this.element)!=null&&H.classList.contains("focus")?this.coreService.triggerDataEvent(G.C0.ESC+"[I"):this.coreService.triggerDataEvent(G.C0.ESC+"[O")}_reportWindowsOptions(H){if(this._renderService)switch(H){case L.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const T=this._renderService.dimensions.css.canvas.width.toFixed(0),se=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${G.C0.ESC}[4;${se};${T}t`);break;case L.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ae=this._renderService.dimensions.css.cell.width.toFixed(0),_e=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${G.C0.ESC}[6;${_e};${ae}t`)}}cancel(H,T){if(this.options.cancelEvents||T)return H.preventDefault(),H.stopPropagation(),!1}}u.Terminal=X},9924:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(f,d=1e3){this._renderCallback=f,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(f,d,p){this._rowCount=p,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=h-this._lastRefreshMs,y=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),y)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d)}}},1680:function(K,u,f){var d=this&&this.__decorate||function(o,n,l,_){var b,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,n,l,_);else for(var g=o.length-1;g>=0;g--)(b=o[g])&&(w=(C<3?b(w):C>3?b(n,l,w):b(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},p=this&&this.__param||function(o,n){return function(l,_){n(l,_,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=f(3656),m=f(4725),y=f(8460),E=f(844),v=f(2585);let c=u.Viewport=class extends E.Disposable{constructor(o,n,l,_,b,C,w,g){super(),this._viewportElement=o,this._scrollArea=n,this._bufferService=l,this._optionsService=_,this._charSizeService=b,this._renderService=C,this._coreBrowserService=w,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new y.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((x=>this._activeBuffer=x.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((x=>this._renderDimensions=x))),this._handleThemeChange(g.colors),this.register(g.onChangeColors((x=>this._handleThemeChange(x)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(o){this._viewportElement.style.backgroundColor=o.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(o){if(o)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const n=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==n&&(this._lastRecordedBufferHeight=n,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const o=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==o&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=o),this._refreshAnimationFrame=null}syncScrollArea(o=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(o);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(o)}_handleScroll(o){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const n=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:n,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const o=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(o*(this._smoothScrollState.target-this._smoothScrollState.origin)),o<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(o,n){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(n<0&&this._viewportElement.scrollTop!==0||n>0&&l<this._lastRecordedBufferHeight)||(o.cancelable&&o.preventDefault(),!1)}handleWheel(o){const n=this._getPixelsScrolled(o);return n!==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+n:this._smoothScrollState.target+=n,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=n,this._bubbleScroll(o,n))}scrollLines(o){if(o!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const n=o*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+n,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!1})}_getPixelsScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let n=this._applyScrollModifier(o.deltaY,o);return o.deltaMode===WheelEvent.DOM_DELTA_LINE?n*=this._currentRowHeight:o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._currentRowHeight*this._bufferService.rows),n}getBufferElements(o,n){var g;let l,_="";const b=[],C=n??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let x=o;x<C;x++){const z=w.get(x);if(!z)continue;const U=(g=w.get(x+1))==null?void 0:g.isWrapped;if(_+=z.translateToString(!U),!U||x===w.length-1){const j=document.createElement("div");j.textContent=_,b.push(j),_.length>0&&(l=j),_=""}}return{bufferElements:b,cursorElement:l}}getLinesScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let n=this._applyScrollModifier(o.deltaY,o);return o.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(n/=this._currentRowHeight+0,this._wheelPartialScroll+=n,n=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._bufferService.rows),n}_applyScrollModifier(o,n){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&n.altKey||l==="ctrl"&&n.ctrlKey||l==="shift"&&n.shiftKey?o*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:o*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(o){this._lastTouchY=o.touches[0].pageY}handleTouchMove(o){const n=this._lastTouchY-o.touches[0].pageY;return this._lastTouchY=o.touches[0].pageY,n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(o,n))}};u.Viewport=c=d([p(2,v.IBufferService),p(3,v.IOptionsService),p(4,m.ICharSizeService),p(5,m.IRenderService),p(6,m.ICoreBrowserService),p(7,m.IThemeService)],c)},3107:function(K,u,f){var d=this&&this.__decorate||function(v,c,o,n){var l,_=arguments.length,b=_<3?c:n===null?n=Object.getOwnPropertyDescriptor(c,o):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(v,c,o,n);else for(var C=v.length-1;C>=0;C--)(l=v[C])&&(b=(_<3?l(b):_>3?l(c,o,b):l(c,o))||b);return _>3&&b&&Object.defineProperty(c,o,b),b},p=this&&this.__param||function(v,c){return function(o,n){c(o,n,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=f(4725),m=f(844),y=f(2585);let E=u.BufferDecorationRenderer=class extends m.Disposable{constructor(v,c,o,n,l){super(),this._screenElement=v,this._bufferService=c,this._coreBrowserService=o,this._decorationService=n,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((_=>this._removeDecoration(_)))),this.register((0,m.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const v of this._decorationService.decorations)this._renderDecoration(v);this._dimensionsChanged=!1}_renderDecoration(v){this._refreshStyle(v),this._dimensionsChanged&&this._refreshXPosition(v)}_createElement(v){var n;const c=this._coreBrowserService.mainDocument.createElement("div");c.classList.add("xterm-decoration"),c.classList.toggle("xterm-decoration-top-layer",((n=v==null?void 0:v.options)==null?void 0:n.layer)==="top"),c.style.width=`${Math.round((v.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,c.style.height=(v.options.height||1)*this._renderService.dimensions.css.cell.height+"px",c.style.top=(v.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",c.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const o=v.options.x??0;return o&&o>this._bufferService.cols&&(c.style.display="none"),this._refreshXPosition(v,c),c}_refreshStyle(v){const c=v.marker.line-this._bufferService.buffers.active.ydisp;if(c<0||c>=this._bufferService.rows)v.element&&(v.element.style.display="none",v.onRenderEmitter.fire(v.element));else{let o=this._decorationElements.get(v);o||(o=this._createElement(v),v.element=o,this._decorationElements.set(v,o),this._container.appendChild(o),v.onDispose((()=>{this._decorationElements.delete(v),o.remove()}))),o.style.top=c*this._renderService.dimensions.css.cell.height+"px",o.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(o)}}_refreshXPosition(v,c=v.element){if(!c)return;const o=v.options.x??0;(v.options.anchor||"left")==="right"?c.style.right=o?o*this._renderService.dimensions.css.cell.width+"px":"":c.style.left=o?o*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(v){var c;(c=this._decorationElements.get(v))==null||c.remove(),this._decorationElements.delete(v),v.dispose()}};u.BufferDecorationRenderer=E=d([p(1,y.IBufferService),p(2,h.ICoreBrowserService),p(3,y.IDecorationService),p(4,h.IRenderService)],E)},5871:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorZoneStore=void 0,u.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(f){if(f.options.overviewRulerOptions){for(const d of this._zones)if(d.color===f.options.overviewRulerOptions.color&&d.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,f.marker.line))return;if(this._lineAdjacentToZone(d,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(d,f.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=f.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=f.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=f.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=f.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:f.options.overviewRulerOptions.color,position:f.options.overviewRulerOptions.position,startBufferLine:f.marker.line,endBufferLine:f.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(f){this._linePadding=f}_lineIntersectsZone(f,d){return d>=f.startBufferLine&&d<=f.endBufferLine}_lineAdjacentToZone(f,d,p){return d>=f.startBufferLine-this._linePadding[p||"full"]&&d<=f.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)}}},5744:function(K,u,f){var d=this&&this.__decorate||function(l,_,b,C){var w,g=arguments.length,x=g<3?_:C===null?C=Object.getOwnPropertyDescriptor(_,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(l,_,b,C);else for(var z=l.length-1;z>=0;z--)(w=l[z])&&(x=(g<3?w(x):g>3?w(_,b,x):w(_,b))||x);return g>3&&x&&Object.defineProperty(_,b,x),x},p=this&&this.__param||function(l,_){return function(b,C){_(b,C,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=f(5871),m=f(4725),y=f(844),E=f(2585),v={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 n=u.OverviewRulerRenderer=class extends y.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,b,C,w,g,x){var U;super(),this._viewportElement=l,this._screenElement=_,this._bufferService=b,this._decorationService=C,this._renderService=w,this._optionsService=g,this._coreBrowserService=x,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(U=this._viewportElement.parentElement)==null||U.insertBefore(this._canvas,this._viewportElement);const z=this._canvas.getContext("2d");if(!z)throw new Error("Ctx cannot be null");this._ctx=z,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,y.toDisposable)((()=>{var j;(j=this._canvas)==null||j.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const l=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);c.full=this._canvas.width,c.left=l,c.center=_,c.right=l,this._refreshDrawHeightConstants(),o.full=0,o.left=0,o.center=c.left,o.right=c.left+c.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);v.left=_,v.center=_,v.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const _ of l)_.position!=="full"&&this._renderColorZone(_);for(const _ of l)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(o[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-v[l.position||"full"]/2),c[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[l.position||"full"]))}_queueRefresh(l,_){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=n=d([p(2,E.IBufferService),p(3,E.IDecorationService),p(4,m.IRenderService),p(5,E.IOptionsService),p(6,m.ICoreBrowserService)],n)},2950:function(K,u,f){var d=this&&this.__decorate||function(v,c,o,n){var l,_=arguments.length,b=_<3?c:n===null?n=Object.getOwnPropertyDescriptor(c,o):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(v,c,o,n);else for(var C=v.length-1;C>=0;C--)(l=v[C])&&(b=(_<3?l(b):_>3?l(c,o,b):l(c,o))||b);return _>3&&b&&Object.defineProperty(c,o,b),b},p=this&&this.__param||function(v,c){return function(o,n){c(o,n,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=f(4725),m=f(2585),y=f(2584);let E=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,c,o,n,l,_){this._textarea=v,this._compositionView=c,this._bufferService=o,this._optionsService=n,this._coreService=l,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(v){this._compositionView.textContent=v.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(v){if(this._isComposing||this._isSendingComposition){if(v.keyCode===229||v.keyCode===16||v.keyCode===17||v.keyCode===18)return!1;this._finalizeComposition(!1)}return v.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(v){if(this._compositionView.classList.remove("active"),this._isComposing=!1,v){const c={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let o;this._isSendingComposition=!1,c.start+=this._dataAlreadySent.length,o=this._isComposing?this._textarea.value.substring(c.start,c.end):this._textarea.value.substring(c.start),o.length>0&&this._coreService.triggerDataEvent(o,!0)}}),0)}else{this._isSendingComposition=!1;const c=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(c,!0)}}_handleAnyTextareaChanges(){const v=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const c=this._textarea.value,o=c.replace(v,"");this._dataAlreadySent=o,c.length>v.length?this._coreService.triggerDataEvent(o,!0):c.length<v.length?this._coreService.triggerDataEvent(`${y.C0.DEL}`,!0):c.length===v.length&&c!==v&&this._coreService.triggerDataEvent(c,!0)}}),0)}updateCompositionElements(v){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const c=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),o=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=c*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=o+"px",this._compositionView.style.lineHeight=o+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}v||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=E=d([p(2,m.IBufferService),p(3,m.IOptionsService),p(4,m.ICoreService),p(5,h.IRenderService)],E)},9806:(K,u)=>{function f(d,p,h){const m=h.getBoundingClientRect(),y=d.getComputedStyle(h),E=parseInt(y.getPropertyValue("padding-left")),v=parseInt(y.getPropertyValue("padding-top"));return[p.clientX-m.left-E,p.clientY-m.top-v]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=f,u.getCoords=function(d,p,h,m,y,E,v,c,o){if(!E)return;const n=f(d,p,h);return n?(n[0]=Math.ceil((n[0]+(o?v/2:0))/v),n[1]=Math.ceil(n[1]/c),n[0]=Math.min(Math.max(n[0],1),m+(o?1:0)),n[1]=Math.min(Math.max(n[1],1),y),n):void 0}},9504:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=f(2584);function p(c,o,n,l){const _=c-h(c,n),b=o-h(o,n),C=Math.abs(_-b)-(function(w,g,x){let z=0;const U=w-h(w,x),j=g-h(g,x);for(let N=0;N<Math.abs(U-j);N++){const te=m(w,g)==="A"?-1:1,oe=x.buffer.lines.get(U+te*N);oe!=null&&oe.isWrapped&&z++}return z})(c,o,n);return v(C,E(m(c,o),l))}function h(c,o){let n=0,l=o.buffer.lines.get(c),_=l==null?void 0:l.isWrapped;for(;_&&c>=0&&c<o.rows;)n++,l=o.buffer.lines.get(--c),_=l==null?void 0:l.isWrapped;return n}function m(c,o){return c>o?"A":"B"}function y(c,o,n,l,_,b){let C=c,w=o,g="";for(;C!==n||w!==l;)C+=_?1:-1,_&&C>b.cols-1?(g+=b.buffer.translateBufferLineToString(w,!1,c,C),C=0,c=0,w++):!_&&C<0&&(g+=b.buffer.translateBufferLineToString(w,!1,0,c+1),C=b.cols-1,c=C,w--);return g+b.buffer.translateBufferLineToString(w,!1,c,C)}function E(c,o){const n=o?"O":"[";return d.C0.ESC+n+c}function v(c,o){c=Math.floor(c);let n="";for(let l=0;l<c;l++)n+=o;return n}u.moveToCellSequence=function(c,o,n,l){const _=n.buffer.x,b=n.buffer.y;if(!n.buffer.hasScrollback)return(function(g,x,z,U,j,N){return p(x,U,j,N).length===0?"":v(y(g,x,g,x-h(x,j),!1,j).length,E("D",N))})(_,b,0,o,n,l)+p(b,o,n,l)+(function(g,x,z,U,j,N){let te;te=p(x,U,j,N).length>0?U-h(U,j):x;const oe=U,W=(function(G,re,D,B,A,L){let Z;return Z=p(D,B,A,L).length>0?B-h(B,A):re,G<D&&Z<=B||G>=D&&Z<B?"C":"D"})(g,x,z,U,j,N);return v(y(g,te,z,oe,W==="C",j).length,E(W,N))})(_,b,c,o,n,l);let C;if(b===o)return C=_>c?"D":"C",v(Math.abs(_-c),E(C,l));C=b>o?"D":"C";const w=Math.abs(b-o);return v((function(g,x){return x.cols-g})(b>o?c:_,n)+(w-1)*n.cols+1+((b>o?_:c)-1),E(C,l))}},1296:function(K,u,f){var d=this&&this.__decorate||function(N,te,oe,W){var G,re=arguments.length,D=re<3?te:W===null?W=Object.getOwnPropertyDescriptor(te,oe):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(N,te,oe,W);else for(var B=N.length-1;B>=0;B--)(G=N[B])&&(D=(re<3?G(D):re>3?G(te,oe,D):G(te,oe))||D);return re>3&&D&&Object.defineProperty(te,oe,D),D},p=this&&this.__param||function(N,te){return function(oe,W){te(oe,W,N)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=f(3787),m=f(2550),y=f(2223),E=f(6171),v=f(6052),c=f(4725),o=f(8055),n=f(8460),l=f(844),_=f(2585),b="xterm-dom-renderer-owner-",C="xterm-rows",w="xterm-fg-",g="xterm-bg-",x="xterm-focus",z="xterm-selection";let U=1,j=u.DomRenderer=class extends l.Disposable{constructor(N,te,oe,W,G,re,D,B,A,L,Z,Y,X){super(),this._terminal=N,this._document=te,this._element=oe,this._screenElement=W,this._viewportElement=G,this._helperContainer=re,this._linkifier2=D,this._charSizeService=A,this._optionsService=L,this._bufferService=Z,this._coreBrowserService=Y,this._themeService=X,this._terminalClass=U++,this._rowElements=[],this._selectionRenderModel=(0,v.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new n.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(C),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(z),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Q=>this._injectCss(Q)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(b+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,l.toDisposable)((()=>{this._element.classList.remove(b+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const N=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*N,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*N),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/N),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/N),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 oe of this._rowElements)oe.style.width=`${this.dimensions.css.canvas.width}px`,oe.style.height=`${this.dimensions.css.cell.height}px`,oe.style.lineHeight=`${this.dimensions.css.cell.height}px`,oe.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const te=`${this._terminalSelector} .${C} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=te,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(N){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let te=`${this._terminalSelector} .${C} { color: ${N.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;te+=`${this._terminalSelector} .${C} .xterm-dim { color: ${o.color.multiplyOpacity(N.foreground,.5).css};}`,te+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const oe=`blink_underline_${this._terminalClass}`,W=`blink_bar_${this._terminalClass}`,G=`blink_block_${this._terminalClass}`;te+=`@keyframes ${oe} { 50% { border-bottom-style: hidden; }}`,te+=`@keyframes ${W} { 50% { box-shadow: none; }}`,te+=`@keyframes ${G} { 0% { background-color: ${N.cursor.css}; color: ${N.cursorAccent.css}; } 50% { background-color: inherit; color: ${N.cursor.css}; }}`,te+=`${this._terminalSelector} .${C}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${oe} 1s step-end infinite;}${this._terminalSelector} .${C}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${C}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-block { background-color: ${N.cursor.css}; color: ${N.cursorAccent.css};}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${N.cursor.css} !important; color: ${N.cursorAccent.css} !important;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${N.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${N.cursor.css} inset;}${this._terminalSelector} .${C} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${N.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,te+=`${this._terminalSelector} .${z} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${z} div { position: absolute; background-color: ${N.selectionBackgroundOpaque.css};}${this._terminalSelector} .${z} div { position: absolute; background-color: ${N.selectionInactiveBackgroundOpaque.css};}`;for(const[re,D]of N.ansi.entries())te+=`${this._terminalSelector} .${w}${re} { color: ${D.css}; }${this._terminalSelector} .${w}${re}.xterm-dim { color: ${o.color.multiplyOpacity(D,.5).css}; }${this._terminalSelector} .${g}${re} { background-color: ${D.css}; }`;te+=`${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR} { color: ${o.color.opaque(N.background).css}; }${this._terminalSelector} .${w}${y.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${o.color.multiplyOpacity(o.color.opaque(N.background),.5).css}; }${this._terminalSelector} .${g}${y.INVERTED_DEFAULT_COLOR} { background-color: ${N.foreground.css}; }`,this._themeStyleElement.textContent=te}_setDefaultSpacing(){const N=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${N}px`,this._rowFactory.defaultSpacing=N}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(N,te){for(let oe=this._rowElements.length;oe<=te;oe++){const W=this._document.createElement("div");this._rowContainer.appendChild(W),this._rowElements.push(W)}for(;this._rowElements.length>te;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(N,te){this._refreshRowElements(N,te),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(x),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(x),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(N,te,oe){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(N,te,oe),this.renderRows(0,this._bufferService.rows-1),!N||!te)return;this._selectionRenderModel.update(this._terminal,N,te,oe);const W=this._selectionRenderModel.viewportStartRow,G=this._selectionRenderModel.viewportEndRow,re=this._selectionRenderModel.viewportCappedStartRow,D=this._selectionRenderModel.viewportCappedEndRow;if(re>=this._bufferService.rows||D<0)return;const B=this._document.createDocumentFragment();if(oe){const A=N[0]>te[0];B.appendChild(this._createSelectionElement(re,A?te[0]:N[0],A?N[0]:te[0],D-re+1))}else{const A=W===re?N[0]:0,L=re===G?te[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(re,A,L));const Z=D-re-1;if(B.appendChild(this._createSelectionElement(re+1,0,this._bufferService.cols,Z)),re!==D){const Y=G===D?te[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(D,0,Y))}}this._selectionContainer.appendChild(B)}_createSelectionElement(N,te,oe,W=1){const G=this._document.createElement("div"),re=te*this.dimensions.css.cell.width;let D=this.dimensions.css.cell.width*(oe-te);return re+D>this.dimensions.css.canvas.width&&(D=this.dimensions.css.canvas.width-re),G.style.height=W*this.dimensions.css.cell.height+"px",G.style.top=N*this.dimensions.css.cell.height+"px",G.style.left=`${re}px`,G.style.width=`${D}px`,G}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 N of this._rowElements)N.replaceChildren()}renderRows(N,te){const oe=this._bufferService.buffer,W=oe.ybase+oe.y,G=Math.min(oe.x,this._bufferService.cols-1),re=this._optionsService.rawOptions.cursorBlink,D=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let A=N;A<=te;A++){const L=A+oe.ydisp,Z=this._rowElements[A],Y=oe.lines.get(L);if(!Z||!Y)break;Z.replaceChildren(...this._rowFactory.createRow(Y,L,L===W,D,B,G,re,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${b}${this._terminalClass}`}_handleLinkHover(N){this._setCellUnderline(N.x1,N.x2,N.y1,N.y2,N.cols,!0)}_handleLinkLeave(N){this._setCellUnderline(N.x1,N.x2,N.y1,N.y2,N.cols,!1)}_setCellUnderline(N,te,oe,W,G,re){oe<0&&(N=0),W<0&&(te=0);const D=this._bufferService.rows-1;oe=Math.max(Math.min(oe,D),0),W=Math.max(Math.min(W,D),0),G=Math.min(G,this._bufferService.cols);const B=this._bufferService.buffer,A=B.ybase+B.y,L=Math.min(B.x,G-1),Z=this._optionsService.rawOptions.cursorBlink,Y=this._optionsService.rawOptions.cursorStyle,X=this._optionsService.rawOptions.cursorInactiveStyle;for(let Q=oe;Q<=W;++Q){const H=Q+B.ydisp,T=this._rowElements[Q],se=B.lines.get(H);if(!T||!se)break;T.replaceChildren(...this._rowFactory.createRow(se,H,H===A,Y,X,L,Z,this.dimensions.css.cell.width,this._widthCache,re?Q===oe?N:0:-1,re?(Q===W?te:G)-1:-1))}}};u.DomRenderer=j=d([p(7,_.IInstantiationService),p(8,c.ICharSizeService),p(9,_.IOptionsService),p(10,_.IBufferService),p(11,c.ICoreBrowserService),p(12,c.IThemeService)],j)},3787:function(K,u,f){var d=this&&this.__decorate||function(C,w,g,x){var z,U=arguments.length,j=U<3?w:x===null?x=Object.getOwnPropertyDescriptor(w,g):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(C,w,g,x);else for(var N=C.length-1;N>=0;N--)(z=C[N])&&(j=(U<3?z(j):U>3?z(w,g,j):z(w,g))||j);return U>3&&j&&Object.defineProperty(w,g,j),j},p=this&&this.__param||function(C,w){return function(g,x){w(g,x,C)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=f(2223),m=f(643),y=f(511),E=f(2585),v=f(8055),c=f(4725),o=f(4269),n=f(6171),l=f(3734);let _=u.DomRendererRowFactory=class{constructor(C,w,g,x,z,U,j){this._document=C,this._characterJoinerService=w,this._optionsService=g,this._coreBrowserService=x,this._coreService=z,this._decorationService=U,this._themeService=j,this._workCell=new y.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(C,w,g){this._selectionStart=C,this._selectionEnd=w,this._columnSelectMode=g}createRow(C,w,g,x,z,U,j,N,te,oe,W){const G=[],re=this._characterJoinerService.getJoinedCharacters(w),D=this._themeService.colors;let B,A=C.getNoBgTrimmedLength();g&&A<U+1&&(A=U+1);let L=0,Z="",Y=0,X=0,Q=0,H=!1,T=0,se=!1,ae=0;const _e=[],de=oe!==-1&&W!==-1;for(let we=0;we<A;we++){C.loadCell(we,this._workCell);let Me=this._workCell.getWidth();if(Me===0)continue;let Ue=!1,tt=we,Se=this._workCell;if(re.length>0&&we===re[0][0]){Ue=!0;const qe=re.shift();Se=new o.JoinedCellData(this._workCell,C.translateToString(!0,qe[0],qe[1]),qe[1]-qe[0]),tt=qe[1]-1,Me=Se.getWidth()}const _i=this._isCellInSelection(we,w),Wi=g&&we===U,Pi=de&&we>=oe&&we<=W;let Ki=!1;this._decorationService.forEachDecorationAtCell(we,w,void 0,(qe=>{Ki=!0}));let fs=Se.getChars()||m.WHITESPACE_CELL_CHAR;if(fs===" "&&(Se.isUnderline()||Se.isOverline())&&(fs=" "),ae=Me*N-te.get(fs,Se.isBold(),Se.isItalic()),B){if(L&&(_i&&se||!_i&&!se&&Se.bg===Y)&&(_i&&se&&D.selectionForeground||Se.fg===X)&&Se.extended.ext===Q&&Pi===H&&ae===T&&!Wi&&!Ue&&!Ki){Se.isInvisible()?Z+=m.WHITESPACE_CELL_CHAR:Z+=fs,L++;continue}L&&(B.textContent=Z),B=this._document.createElement("span"),L=0,Z=""}else B=this._document.createElement("span");if(Y=Se.bg,X=Se.fg,Q=Se.extended.ext,H=Pi,T=ae,se=_i,Ue&&U>=we&&U<=tt&&(U=we),!this._coreService.isCursorHidden&&Wi&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)j&&_e.push("xterm-cursor-blink"),_e.push(x==="bar"?"xterm-cursor-bar":x==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(z)switch(z){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(Se.isBold()&&_e.push("xterm-bold"),Se.isItalic()&&_e.push("xterm-italic"),Se.isDim()&&_e.push("xterm-dim"),Z=Se.isInvisible()?m.WHITESPACE_CELL_CHAR:Se.getChars()||m.WHITESPACE_CELL_CHAR,Se.isUnderline()&&(_e.push(`xterm-underline-${Se.extended.underlineStyle}`),Z===" "&&(Z=" "),!Se.isUnderlineColorDefault()))if(Se.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Se.getUnderlineColor()).join(",")})`;else{let qe=Se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Se.isBold()&&qe<8&&(qe+=8),B.style.textDecorationColor=D.ansi[qe].css}Se.isOverline()&&(_e.push("xterm-overline"),Z===" "&&(Z=" ")),Se.isStrikethrough()&&_e.push("xterm-strikethrough"),Pi&&(B.style.textDecoration="underline");let dt=Se.getFgColor(),Je=Se.getFgColorMode(),Lt=Se.getBgColor(),vi=Se.getBgColorMode();const ds=!!Se.isInverse();if(ds){const qe=dt;dt=Lt,Lt=qe;const Yi=Je;Je=vi,vi=Yi}let bt,_s,Wt,Gi=!1;switch(this._decorationService.forEachDecorationAtCell(we,w,void 0,(qe=>{qe.options.layer!=="top"&&Gi||(qe.backgroundColorRGB&&(vi=50331648,Lt=qe.backgroundColorRGB.rgba>>8&16777215,bt=qe.backgroundColorRGB),qe.foregroundColorRGB&&(Je=50331648,dt=qe.foregroundColorRGB.rgba>>8&16777215,_s=qe.foregroundColorRGB),Gi=qe.options.layer==="top")})),!Gi&&_i&&(bt=this._coreBrowserService.isFocused?D.selectionBackgroundOpaque:D.selectionInactiveBackgroundOpaque,Lt=bt.rgba>>8&16777215,vi=50331648,Gi=!0,D.selectionForeground&&(Je=50331648,dt=D.selectionForeground.rgba>>8&16777215,_s=D.selectionForeground)),Gi&&_e.push("xterm-decoration-top"),vi){case 16777216:case 33554432:Wt=D.ansi[Lt],_e.push(`xterm-bg-${Lt}`);break;case 50331648:Wt=v.channels.toColor(Lt>>16,Lt>>8&255,255&Lt),this._addStyle(B,`background-color:#${b((Lt>>>0).toString(16),"0",6)}`);break;default:ds?(Wt=D.foreground,_e.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Wt=D.background}switch(bt||Se.isDim()&&(bt=v.color.multiplyOpacity(Wt,.5)),Je){case 16777216:case 33554432:Se.isBold()&&dt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(dt+=8),this._applyMinimumContrast(B,Wt,D.ansi[dt],Se,bt,void 0)||_e.push(`xterm-fg-${dt}`);break;case 50331648:const qe=v.channels.toColor(dt>>16&255,dt>>8&255,255&dt);this._applyMinimumContrast(B,Wt,qe,Se,bt,_s)||this._addStyle(B,`color:#${b(dt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Wt,D.foreground,Se,bt,_s)||ds&&_e.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}_e.length&&(B.className=_e.join(" "),_e.length=0),Wi||Ue||Ki?B.textContent=Z:L++,ae!==this.defaultSpacing&&(B.style.letterSpacing=`${ae}px`),G.push(B),we=tt}return B&&L&&(B.textContent=Z),G}_applyMinimumContrast(C,w,g,x,z,U){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,n.treatGlyphAsBackgroundColor)(x.getCode()))return!1;const j=this._getContrastCache(x);let N;if(z||U||(N=j.getColor(w.rgba,g.rgba)),N===void 0){const te=this._optionsService.rawOptions.minimumContrastRatio/(x.isDim()?2:1);N=v.color.ensureContrastRatio(z||w,U||g,te),j.setColor((z||w).rgba,(U||g).rgba,N??null)}return!!N&&(this._addStyle(C,`color:${N.css}`),!0)}_getContrastCache(C){return C.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(C,w){C.setAttribute("style",`${C.getAttribute("style")||""}${w};`)}_isCellInSelection(C,w){const g=this._selectionStart,x=this._selectionEnd;return!(!g||!x)&&(this._columnSelectMode?g[0]<=x[0]?C>=g[0]&&w>=g[1]&&C<x[0]&&w<=x[1]:C<g[0]&&w>=g[1]&&C>=x[0]&&w<=x[1]:w>g[1]&&w<x[1]||g[1]===x[1]&&w===g[1]&&C>=g[0]&&C<x[0]||g[1]<x[1]&&w===x[1]&&C<x[0]||g[1]<x[1]&&w===g[1]&&C>=g[0])}};function b(C,w,g){for(;C.length<g;)C=w+C;return C}u.DomRendererRowFactory=_=d([p(1,c.ICharacterJoinerService),p(2,E.IOptionsService),p(3,c.ICoreBrowserService),p(4,E.ICoreService),p(5,E.IDecorationService),p(6,c.IThemeService)],_)},2550:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(f,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=f.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=f.createElement("span");p.classList.add("xterm-char-measure-element");const h=f.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const m=f.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const y=f.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontWeight="bold",y.style.fontStyle="italic",this._measureElements=[p,h,m,y],this._container.appendChild(p),this._container.appendChild(h),this._container.appendChild(m),this._container.appendChild(y),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(f,d,p,h){f===this._font&&d===this._fontSize&&p===this._weight&&h===this._weightBold||(this._font=f,this._fontSize=d,this._weight=p,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(f,d,p){let h=0;if(!d&&!p&&f.length===1&&(h=f.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const E=this._measure(f,0);return E>0&&(this._flat[h]=E),E}let m=f;d&&(m+="B"),p&&(m+="I");let y=this._holey.get(m);if(y===void 0){let E=0;d&&(E|=1),p&&(E|=2),y=this._measure(f,E),y>0&&this._holey.set(m,y)}return y}_measure(f,d){const p=this._measureElements[d];return p.textContent=f.repeat(32),p.offsetWidth/32}}},2223:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const d=f(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(K,u)=>{function f(p){return 57508<=p&&p<=57558}function d(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(u,"__esModule",{value:!0}),u.computeNextVariantOffset=u.createRenderDimensions=u.treatGlyphAsBackgroundColor=u.allowRescaling=u.isEmoji=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},u.isPowerlineGlyph=f,u.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},u.isEmoji=d,u.allowRescaling=function(p,h,m,y){return h===1&&m>Math.ceil(1.5*y)&&p!==void 0&&p>255&&!d(p)&&!f(p)&&!(function(E){return 57344<=E&&E<=63743})(p)},u.treatGlyphAsBackgroundColor=function(p){return f(p)||(function(h){return 9472<=h&&h<=9631})(p)},u.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},u.computeNextVariantOffset=function(p,h,m=0){return(p-(2*Math.round(h)-m))%(2*Math.round(h))}},6052:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createSelectionRenderModel=void 0;class f{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,h,m,y=!1){if(this.selectionStart=h,this.selectionEnd=m,!h||!m||h[0]===m[0]&&h[1]===m[1])return void this.clear();const E=p.buffers.active.ydisp,v=h[1]-E,c=m[1]-E,o=Math.max(v,0),n=Math.min(c,p.rows-1);o>=p.rows||n<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=y,this.viewportStartRow=v,this.viewportEndRow=c,this.viewportCappedStartRow=o,this.viewportCappedEndRow=n,this.startCol=h[0],this.endCol=m[0])}isCellSelected(p,h,m){return!!this.hasSelection&&(m-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&m>=this.viewportCappedStartRow&&h<this.endCol&&m<=this.viewportCappedEndRow:h<this.startCol&&m>=this.viewportCappedStartRow&&h>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&m===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&m===this.viewportStartRow&&h>=this.startCol)}}u.createSelectionRenderModel=function(){return new f}},456:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(f){this._bufferService=f,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?f%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)-1]:[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[f,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[Math.max(f,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const f=this.selectionStart,d=this.selectionEnd;return!(!f||!d)&&(f[1]>d[1]||f[1]===d[1]&&f[0]>d[0])}handleTrim(f){return this.selectionStart&&(this.selectionStart[1]-=f),this.selectionEnd&&(this.selectionEnd[1]-=f),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(K,u,f){var d=this&&this.__decorate||function(n,l,_,b){var C,w=arguments.length,g=w<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,l,_,b);else for(var x=n.length-1;x>=0;x--)(C=n[x])&&(g=(w<3?C(g):w>3?C(l,_,g):C(l,_))||g);return w>3&&g&&Object.defineProperty(l,_,g),g},p=this&&this.__param||function(n,l){return function(_,b){l(_,b,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=f(2585),m=f(8460),y=f(844);let E=u.CharSizeService=class extends y.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(n,l,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new o(this._optionsService))}catch{this._measureStrategy=this.register(new c(n,l,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=E=d([p(2,h.IOptionsService)],E);class v extends y.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,_){l!==void 0&&l>0&&_!==void 0&&_>0&&(this._result.width=l,this._result.height=_)}}class c extends v{constructor(l,_,b){super(),this._document=l,this._parentElement=_,this._optionsService=b,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class o extends v{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(K,u,f){var d=this&&this.__decorate||function(o,n,l,_){var b,C=arguments.length,w=C<3?n:_===null?_=Object.getOwnPropertyDescriptor(n,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(o,n,l,_);else for(var g=o.length-1;g>=0;g--)(b=o[g])&&(w=(C<3?b(w):C>3?b(n,l,w):b(n,l))||w);return C>3&&w&&Object.defineProperty(n,l,w),w},p=this&&this.__param||function(o,n){return function(l,_){n(l,_,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=f(3734),m=f(643),y=f(511),E=f(2585);class v extends h.AttributeData{constructor(n,l,_){super(),this.content=0,this.combinedData="",this.fg=n.fg,this.bg=n.bg,this.combinedData=l,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(n){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=v;let c=u.CharacterJoinerService=class dd{constructor(n){this._bufferService=n,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new y.CellData}register(n){const l={id:this._nextCharacterJoinerId++,handler:n};return this._characterJoiners.push(l),l.id}deregister(n){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===n)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(n){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(n);if(!l||l.length===0)return[];const _=[],b=l.translateToString(!0);let C=0,w=0,g=0,x=l.getFg(0),z=l.getBg(0);for(let U=0;U<l.getTrimmedLength();U++)if(l.loadCell(U,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==x||this._workCell.bg!==z){if(U-C>1){const j=this._getJoinedRanges(b,g,w,l,C);for(let N=0;N<j.length;N++)_.push(j[N])}C=U,g=w,x=this._workCell.fg,z=this._workCell.bg}w+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-C>1){const U=this._getJoinedRanges(b,g,w,l,C);for(let j=0;j<U.length;j++)_.push(U[j])}return _}_getJoinedRanges(n,l,_,b,C){const w=n.substring(l,_);let g=[];try{g=this._characterJoiners[0].handler(w)}catch(x){console.error(x)}for(let x=1;x<this._characterJoiners.length;x++)try{const z=this._characterJoiners[x].handler(w);for(let U=0;U<z.length;U++)dd._mergeRanges(g,z[U])}catch(z){console.error(z)}return this._stringRangesToCellRanges(g,b,C),g}_stringRangesToCellRanges(n,l,_){let b=0,C=!1,w=0,g=n[b];if(g){for(let x=_;x<this._bufferService.cols;x++){const z=l.getWidth(x),U=l.getString(x).length||m.WHITESPACE_CELL_CHAR.length;if(z!==0){if(!C&&g[0]<=w&&(g[0]=x,C=!0),g[1]<=w){if(g[1]=x,g=n[++b],!g)break;g[0]<=w?(g[0]=x,C=!0):C=!1}w+=U}}g&&(g[1]=this._bufferService.cols)}}static _mergeRanges(n,l){let _=!1;for(let b=0;b<n.length;b++){const C=n[b];if(_){if(l[1]<=C[0])return n[b-1][1]=l[1],n;if(l[1]<=C[1])return n[b-1][1]=Math.max(l[1],C[1]),n.splice(b,1),n;n.splice(b,1),b--}else{if(l[1]<=C[0])return n.splice(b,0,l),n;if(l[1]<=C[1])return C[0]=Math.min(l[0],C[0]),n;l[0]<C[1]&&(C[0]=Math.min(l[0],C[0]),_=!0)}}return _?n[n.length-1][1]=l[1]:n.push(l),n}};u.CharacterJoinerService=c=d([p(0,E.IBufferService)],c)},5114:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0;const d=f(844),p=f(8460),h=f(3656);class m extends d.Disposable{constructor(v,c,o){super(),this._textarea=v,this._window=c,this.mainDocument=o,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new y(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((n=>this._screenDprMonitor.setWindow(n)))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(v){this._window!==v&&(this._window=v,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}u.CoreBrowserService=m;class y extends d.Disposable{constructor(v){super(),this._parentWindow=v,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(v){this._parentWindow=v,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)==null||v.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.LinkProviderService=void 0;const d=f(844);class p extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const y=this.linkProviders.indexOf(m);y!==-1&&this.linkProviders.splice(y,1)}}}}u.LinkProviderService=p},8934:function(K,u,f){var d=this&&this.__decorate||function(E,v,c,o){var n,l=arguments.length,_=l<3?v:o===null?o=Object.getOwnPropertyDescriptor(v,c):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(E,v,c,o);else for(var b=E.length-1;b>=0;b--)(n=E[b])&&(_=(l<3?n(_):l>3?n(v,c,_):n(v,c))||_);return l>3&&_&&Object.defineProperty(v,c,_),_},p=this&&this.__param||function(E,v){return function(c,o){v(c,o,E)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=f(4725),m=f(9806);let y=u.MouseService=class{constructor(E,v){this._renderService=E,this._charSizeService=v}getCoords(E,v,c,o,n){return(0,m.getCoords)(window,E,v,c,o,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,n)}getMouseReportCoords(E,v){const c=(0,m.getCoordsRelativeToElement)(window,E,v);if(this._charSizeService.hasValidSize)return c[0]=Math.min(Math.max(c[0],0),this._renderService.dimensions.css.canvas.width-1),c[1]=Math.min(Math.max(c[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(c[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(c[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(c[0]),y:Math.floor(c[1])}}};u.MouseService=y=d([p(0,h.IRenderService),p(1,h.ICharSizeService)],y)},3230:function(K,u,f){var d=this&&this.__decorate||function(n,l,_,b){var C,w=arguments.length,g=w<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,l,_,b);else for(var x=n.length-1;x>=0;x--)(C=n[x])&&(g=(w<3?C(g):w>3?C(l,_,g):C(l,_))||g);return w>3&&g&&Object.defineProperty(l,_,g),g},p=this&&this.__param||function(n,l){return function(_,b){l(_,b,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=f(6193),m=f(4725),y=f(8460),E=f(844),v=f(7226),c=f(2585);let o=u.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(n,l,_,b,C,w,g,x){super(),this._rowCount=n,this._charSizeService=b,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new E.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new y.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new y.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new y.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((z,U)=>this._renderRows(z,U)),g),this.register(this._renderDebouncer),this.register(g.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var z;return(z=this._renderer.value)==null?void 0:z.clear()}))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(C.onDecorationRegistered((()=>this._fullRefresh()))),this.register(C.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(x.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(g.window,l),this.register(g.onWindowChange((z=>this._registerIntersectionObserver(z,l))))}_registerIntersectionObserver(n,l){if("IntersectionObserver"in n){const _=new n.IntersectionObserver((b=>this._handleIntersectionChange(b[b.length-1])),{threshold:0});_.observe(l),this._observerDisposable.value=(0,E.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(n){this._isPaused=n.isIntersecting===void 0?n.intersectionRatio===0:!n.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(n,l,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(n,l,this._rowCount))}_renderRows(n,l){this._renderer.value&&(n=Math.min(n,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(n,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:n,end:l}),this._onRender.fire({start:n,end:l}),this._isNextRenderRedrawOnly=!0)}resize(n,l){this._rowCount=l,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(n){this._renderer.value=n,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(n){return this._renderDebouncer.addRefreshCallback(n)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var n,l;this._renderer.value&&((l=(n=this._renderer.value).clearTextureAtlas)==null||l.call(n),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(n,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(n,l)})):this._renderer.value.handleResize(n,l),this._fullRefresh())}handleCharSizeChanged(){var n;(n=this._renderer.value)==null||n.handleCharSizeChanged()}handleBlur(){var n;(n=this._renderer.value)==null||n.handleBlur()}handleFocus(){var n;(n=this._renderer.value)==null||n.handleFocus()}handleSelectionChanged(n,l,_){var b;this._selectionState.start=n,this._selectionState.end=l,this._selectionState.columnSelectMode=_,(b=this._renderer.value)==null||b.handleSelectionChanged(n,l,_)}handleCursorMove(){var n;(n=this._renderer.value)==null||n.handleCursorMove()}clear(){var n;(n=this._renderer.value)==null||n.clear()}};u.RenderService=o=d([p(2,c.IOptionsService),p(3,m.ICharSizeService),p(4,c.IDecorationService),p(5,c.IBufferService),p(6,m.ICoreBrowserService),p(7,m.IThemeService)],o)},9312:function(K,u,f){var d=this&&this.__decorate||function(g,x,z,U){var j,N=arguments.length,te=N<3?x:U===null?U=Object.getOwnPropertyDescriptor(x,z):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(g,x,z,U);else for(var oe=g.length-1;oe>=0;oe--)(j=g[oe])&&(te=(N<3?j(te):N>3?j(x,z,te):j(x,z))||te);return N>3&&te&&Object.defineProperty(x,z,te),te},p=this&&this.__param||function(g,x){return function(z,U){x(z,U,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=f(9806),m=f(9504),y=f(456),E=f(4725),v=f(8460),c=f(844),o=f(6114),n=f(4841),l=f(511),_=f(2585),b=" ",C=new RegExp(b,"g");let w=u.SelectionService=class extends c.Disposable{constructor(g,x,z,U,j,N,te,oe,W){super(),this._element=g,this._screenElement=x,this._linkifier=z,this._bufferService=U,this._coreService=j,this._mouseService=N,this._optionsService=te,this._renderService=oe,this._coreBrowserService=W,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new v.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new v.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new v.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new v.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=G=>this._handleMouseMove(G),this._mouseUpListener=G=>this._handleMouseUp(G),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((G=>this._handleTrim(G))),this.register(this._bufferService.buffers.onBufferActivate((G=>this._handleBufferActivate(G)))),this.enable(),this._model=new y.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,c.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const g=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!g||!x||g[0]===x[0]&&g[1]===x[1])}get selectionText(){const g=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!g||!x)return"";const z=this._bufferService.buffer,U=[];if(this._activeSelectionMode===3){if(g[0]===x[0])return"";const j=g[0]<x[0]?g[0]:x[0],N=g[0]<x[0]?x[0]:g[0];for(let te=g[1];te<=x[1];te++){const oe=z.translateBufferLineToString(te,!0,j,N);U.push(oe)}}else{const j=g[1]===x[1]?x[0]:void 0;U.push(z.translateBufferLineToString(g[1],!0,g[0],j));for(let N=g[1]+1;N<=x[1]-1;N++){const te=z.lines.get(N),oe=z.translateBufferLineToString(N,!0);te!=null&&te.isWrapped?U[U.length-1]+=oe:U.push(oe)}if(g[1]!==x[1]){const N=z.lines.get(x[1]),te=z.translateBufferLineToString(x[1],!0,0,x[0]);N&&N.isWrapped?U[U.length-1]+=te:U.push(te)}}return U.map((j=>j.replace(C," "))).join(o.isWindows?`\r
|
|
201
|
-
`:`
|
|
202
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(g){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),o.isLinux&&g&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(g){const x=this._getMouseBufferCoords(g),z=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!!(z&&U&&x)&&this._areCoordsInSelection(x,z,U)}isCellInSelection(g,x){const z=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!(!z||!U)&&this._areCoordsInSelection([g,x],z,U)}_areCoordsInSelection(g,x,z){return g[1]>x[1]&&g[1]<z[1]||x[1]===z[1]&&g[1]===x[1]&&g[0]>=x[0]&&g[0]<z[0]||x[1]<z[1]&&g[1]===z[1]&&g[0]<z[0]||x[1]<z[1]&&g[1]===x[1]&&g[0]>=x[0]}_selectWordAtCursor(g,x){var j,N;const z=(N=(j=this._linkifier.currentLink)==null?void 0:j.link)==null?void 0:N.range;if(z)return this._model.selectionStart=[z.start.x-1,z.start.y-1],this._model.selectionStartLength=(0,n.getRangeLength)(z,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const U=this._getMouseBufferCoords(g);return!!U&&(this._selectWordAt(U,x),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(g,x){this._model.clearSelection(),g=Math.max(g,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()}_handleTrim(g){this._model.handleTrim(g)&&this.refresh()}_getMouseBufferCoords(g){const x=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x}_getMouseEventScrollAmount(g){let x=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,g,this._screenElement)[1];const z=this._renderService.dimensions.css.canvas.height;return x>=0&&x<=z?0:(x>z&&(x-=z),x=Math.min(Math.max(x,-50),50),x/=50,x/Math.abs(x)+Math.round(14*x))}shouldForceSelection(g){return o.isMac?g.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:g.shiftKey}handleMouseDown(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._handleIncrementalClick(g):g.detail===1?this._handleSingleClick(g):g.detail===2?this._handleDoubleClick(g):g.detail===3&&this._handleTripleClick(g),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))}_handleSingleClick(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(g){this._selectWordAtCursor(g,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(g){const x=this._getMouseBufferCoords(g);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))}shouldColumnSelect(g){return g.altKey&&!(o.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(g){if(g.stopImmediatePropagation(),!this._model.selectionStart)return;const x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(g),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const z=this._bufferService.buffer;if(this._model.selectionEnd[1]<z.lines.length){const U=z.lines.get(this._model.selectionEnd[1]);U&&U.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}}_handleMouseUp(g){const x=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&g.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const z=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(z&&z[0]!==void 0&&z[1]!==void 0){const U=(0,m.moveToCellSequence)(z[0]-1,z[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(U,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const g=this._model.finalSelectionStart,x=this._model.finalSelectionEnd,z=!(!g||!x||g[0]===x[0]&&g[1]===x[1]);z?g&&x&&(this._oldSelectionStart&&this._oldSelectionEnd&&g[0]===this._oldSelectionStart[0]&&g[1]===this._oldSelectionStart[1]&&x[0]===this._oldSelectionEnd[0]&&x[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(g,x,z)):this._oldHasSelection&&this._fireOnSelectionChange(g,x,z)}_fireOnSelectionChange(g,x,z){this._oldSelectionStart=g,this._oldSelectionEnd=x,this._oldHasSelection=z,this._onSelectionChange.fire()}_handleBufferActivate(g){this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim((x=>this._handleTrim(x)))}_convertViewportColToCharacterIndex(g,x){let z=x;for(let U=0;x>=U;U++){const j=g.loadCell(U,this._workCell).getChars().length;this._workCell.getWidth()===0?z--:j>1&&x!==U&&(z+=j-1)}return z}setSelection(g,x,z){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,x],this._model.selectionStartLength=z,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(g){this._isClickInSelection(g)||(this._selectWordAtCursor(g,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(g,x,z=!0,U=!0){if(g[0]>=this._bufferService.cols)return;const j=this._bufferService.buffer,N=j.lines.get(g[1]);if(!N)return;const te=j.translateBufferLineToString(g[1],!1);let oe=this._convertViewportColToCharacterIndex(N,g[0]),W=oe;const G=g[0]-oe;let re=0,D=0,B=0,A=0;if(te.charAt(oe)===" "){for(;oe>0&&te.charAt(oe-1)===" ";)oe--;for(;W<te.length&&te.charAt(W+1)===" ";)W++}else{let Y=g[0],X=g[0];N.getWidth(Y)===0&&(re++,Y--),N.getWidth(X)===2&&(D++,X++);const Q=N.getString(X).length;for(Q>1&&(A+=Q-1,W+=Q-1);Y>0&&oe>0&&!this._isCharWordSeparator(N.loadCell(Y-1,this._workCell));){N.loadCell(Y-1,this._workCell);const H=this._workCell.getChars().length;this._workCell.getWidth()===0?(re++,Y--):H>1&&(B+=H-1,oe-=H-1),oe--,Y--}for(;X<N.length&&W+1<te.length&&!this._isCharWordSeparator(N.loadCell(X+1,this._workCell));){N.loadCell(X+1,this._workCell);const H=this._workCell.getChars().length;this._workCell.getWidth()===2?(D++,X++):H>1&&(A+=H-1,W+=H-1),W++,X++}}W++;let L=oe+G-re+B,Z=Math.min(this._bufferService.cols,W-oe+re+D-B-A);if(x||te.slice(oe,W).trim()!==""){if(z&&L===0&&N.getCodePoint(0)!==32){const Y=j.lines.get(g[1]-1);if(Y&&N.isWrapped&&Y.getCodePoint(this._bufferService.cols-1)!==32){const X=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(X){const Q=this._bufferService.cols-X.start;L-=Q,Z+=Q}}}if(U&&L+Z===this._bufferService.cols&&N.getCodePoint(this._bufferService.cols-1)!==32){const Y=j.lines.get(g[1]+1);if(Y!=null&&Y.isWrapped&&Y.getCodePoint(0)!==32){const X=this._getWordAt([0,g[1]+1],!1,!1,!0);X&&(Z+=X.length)}}return{start:L,length:Z}}}_selectWordAt(g,x){const z=this._getWordAt(g,x);if(z){for(;z.start<0;)z.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[z.start,g[1]],this._model.selectionStartLength=z.length}}_selectToWordAt(g){const x=this._getWordAt(g,!0);if(x){let z=g[1];for(;x.start<0;)x.start+=this._bufferService.cols,z--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,z++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,z]}}_isCharWordSeparator(g){return g.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(g.getChars())>=0}_selectLineAt(g){const x=this._bufferService.buffer.getWrappedRangeForLine(g),z={start:{x:0,y:x.first},end:{x:this._bufferService.cols-1,y:x.last}};this._model.selectionStart=[0,x.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,n.getRangeLength)(z,this._bufferService.cols)}};u.SelectionService=w=d([p(3,_.IBufferService),p(4,_.ICoreService),p(5,E.IMouseService),p(6,_.IOptionsService),p(7,E.IRenderService),p(8,E.ICoreBrowserService)],w)},4725:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ILinkProviderService=u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const d=f(8343);u.ICharSizeService=(0,d.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),u.IMouseService=(0,d.createDecorator)("MouseService"),u.IRenderService=(0,d.createDecorator)("RenderService"),u.ISelectionService=(0,d.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,d.createDecorator)("ThemeService"),u.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(K,u,f){var d=this&&this.__decorate||function(w,g,x,z){var U,j=arguments.length,N=j<3?g:z===null?z=Object.getOwnPropertyDescriptor(g,x):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,g,x,z);else for(var te=w.length-1;te>=0;te--)(U=w[te])&&(N=(j<3?U(N):j>3?U(g,x,N):U(g,x))||N);return j>3&&N&&Object.defineProperty(g,x,N),N},p=this&&this.__param||function(w,g){return function(x,z){g(x,z,w)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=f(7239),m=f(8055),y=f(8460),E=f(844),v=f(2585),c=m.css.toColor("#ffffff"),o=m.css.toColor("#000000"),n=m.css.toColor("#ffffff"),l=m.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],g=[0,95,135,175,215,255];for(let x=0;x<216;x++){const z=g[x/36%6|0],U=g[x/6%6|0],j=g[x%6];w.push({css:m.channels.toCss(z,U,j),rgba:m.channels.toRgba(z,U,j)})}for(let x=0;x<24;x++){const z=8+10*x;w.push({css:m.channels.toCss(z,z,z),rgba:m.channels.toRgba(z,z,z)})}return w})());let b=u.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new y.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:c,background:o,cursor:n,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:m.color.blend(o,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:m.color.blend(o,_),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(w={}){const g=this._colors;if(g.foreground=C(w.foreground,c),g.background=C(w.background,o),g.cursor=C(w.cursor,n),g.cursorAccent=C(w.cursorAccent,l),g.selectionBackgroundTransparent=C(w.selectionBackground,_),g.selectionBackgroundOpaque=m.color.blend(g.background,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundTransparent=C(w.selectionInactiveBackground,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundOpaque=m.color.blend(g.background,g.selectionInactiveBackgroundTransparent),g.selectionForeground=w.selectionForeground?C(w.selectionForeground,m.NULL_COLOR):void 0,g.selectionForeground===m.NULL_COLOR&&(g.selectionForeground=void 0),m.color.isOpaque(g.selectionBackgroundTransparent)&&(g.selectionBackgroundTransparent=m.color.opacity(g.selectionBackgroundTransparent,.3)),m.color.isOpaque(g.selectionInactiveBackgroundTransparent)&&(g.selectionInactiveBackgroundTransparent=m.color.opacity(g.selectionInactiveBackgroundTransparent,.3)),g.ansi=u.DEFAULT_ANSI_COLORS.slice(),g.ansi[0]=C(w.black,u.DEFAULT_ANSI_COLORS[0]),g.ansi[1]=C(w.red,u.DEFAULT_ANSI_COLORS[1]),g.ansi[2]=C(w.green,u.DEFAULT_ANSI_COLORS[2]),g.ansi[3]=C(w.yellow,u.DEFAULT_ANSI_COLORS[3]),g.ansi[4]=C(w.blue,u.DEFAULT_ANSI_COLORS[4]),g.ansi[5]=C(w.magenta,u.DEFAULT_ANSI_COLORS[5]),g.ansi[6]=C(w.cyan,u.DEFAULT_ANSI_COLORS[6]),g.ansi[7]=C(w.white,u.DEFAULT_ANSI_COLORS[7]),g.ansi[8]=C(w.brightBlack,u.DEFAULT_ANSI_COLORS[8]),g.ansi[9]=C(w.brightRed,u.DEFAULT_ANSI_COLORS[9]),g.ansi[10]=C(w.brightGreen,u.DEFAULT_ANSI_COLORS[10]),g.ansi[11]=C(w.brightYellow,u.DEFAULT_ANSI_COLORS[11]),g.ansi[12]=C(w.brightBlue,u.DEFAULT_ANSI_COLORS[12]),g.ansi[13]=C(w.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),g.ansi[14]=C(w.brightCyan,u.DEFAULT_ANSI_COLORS[14]),g.ansi[15]=C(w.brightWhite,u.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const x=Math.min(g.ansi.length-16,w.extendedAnsi.length);for(let z=0;z<x;z++)g.ansi[z+16]=C(w.extendedAnsi[z],u.DEFAULT_ANSI_COLORS[z+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){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[w]=this._restoreColors.ansi[w]}else for(let g=0;g<this._restoreColors.ansi.length;++g)this._colors.ansi[g]=this._restoreColors.ansi[g]}modifyColors(w){w(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 C(w,g){if(w!==void 0)try{return m.css.toColor(w)}catch{}return g}u.ThemeService=b=d([p(0,v.IOptionsService)],b)},6349:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=f(8460),p=f(844);class h extends p.Disposable{constructor(y){super(),this._maxLength=y,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(y){if(this._maxLength===y)return;const E=new Array(y);for(let v=0;v<Math.min(y,this.length);v++)E[v]=this._array[this._getCyclicIndex(v)];this._array=E,this._maxLength=y,this._startIndex=0}get length(){return this._length}set length(y){if(y>this._length)for(let E=this._length;E<y;E++)this._array[E]=void 0;this._length=y}get(y){return this._array[this._getCyclicIndex(y)]}set(y,E){this._array[this._getCyclicIndex(y)]=E}push(y){this._array[this._getCyclicIndex(this._length)]=y,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(y,E,...v){if(E){for(let c=y;c<this._length-E;c++)this._array[this._getCyclicIndex(c)]=this._array[this._getCyclicIndex(c+E)];this._length-=E,this.onDeleteEmitter.fire({index:y,amount:E})}for(let c=this._length-1;c>=y;c--)this._array[this._getCyclicIndex(c+v.length)]=this._array[this._getCyclicIndex(c)];for(let c=0;c<v.length;c++)this._array[this._getCyclicIndex(y+c)]=v[c];if(v.length&&this.onInsertEmitter.fire({index:y,amount:v.length}),this._length+v.length>this._maxLength){const c=this._length+v.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}else this._length+=v.length}trimStart(y){y>this._length&&(y=this._length),this._startIndex+=y,this._length-=y,this.onTrimEmitter.fire(y)}shiftElements(y,E,v){if(!(E<=0)){if(y<0||y>=this._length)throw new Error("start argument out of range");if(y+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(let o=E-1;o>=0;o--)this.set(y+o+v,this.get(y+o));const c=y+E+v-this._length;if(c>0)for(this._length+=c;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let c=0;c<E;c++)this.set(y+c+v,this.get(y+c))}}_getCyclicIndex(y){return(this._startIndex+y)%this._maxLength}}u.CircularList=h},1439:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function f(d,p=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const m in d)h[m]=p<=1?d[m]:d[m]&&f(d[m],p-1);return h}},8055:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.contrastRatio=u.toPaddedHex=u.rgba=u.rgb=u.css=u.color=u.channels=u.NULL_COLOR=void 0;let f=0,d=0,p=0,h=0;var m,y,E,v,c;function o(l){const _=l.toString(16);return _.length<2?"0"+_:_}function n(l,_){return l<_?(_+.05)/(l+.05):(l+.05)/(_+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(_,b,C,w){return w!==void 0?`#${o(_)}${o(b)}${o(C)}${o(w)}`:`#${o(_)}${o(b)}${o(C)}`},l.toRgba=function(_,b,C,w=255){return(_<<24|b<<16|C<<8|w)>>>0},l.toColor=function(_,b,C,w){return{css:l.toCss(_,b,C,w),rgba:l.toRgba(_,b,C,w)}}})(m||(u.channels=m={})),(function(l){function _(b,C){return h=Math.round(255*C),[f,d,p]=c.toChannels(b.rgba),{css:m.toCss(f,d,p,h),rgba:m.toRgba(f,d,p,h)}}l.blend=function(b,C){if(h=(255&C.rgba)/255,h===1)return{css:C.css,rgba:C.rgba};const w=C.rgba>>24&255,g=C.rgba>>16&255,x=C.rgba>>8&255,z=b.rgba>>24&255,U=b.rgba>>16&255,j=b.rgba>>8&255;return f=z+Math.round((w-z)*h),d=U+Math.round((g-U)*h),p=j+Math.round((x-j)*h),{css:m.toCss(f,d,p),rgba:m.toRgba(f,d,p)}},l.isOpaque=function(b){return(255&b.rgba)==255},l.ensureContrastRatio=function(b,C,w){const g=c.ensureContrastRatio(b.rgba,C.rgba,w);if(g)return m.toColor(g>>24&255,g>>16&255,g>>8&255)},l.opaque=function(b){const C=(255|b.rgba)>>>0;return[f,d,p]=c.toChannels(C),{css:m.toCss(f,d,p),rgba:C}},l.opacity=_,l.multiplyOpacity=function(b,C){return h=255&b.rgba,_(b,h*C/255)},l.toColorRGB=function(b){return[b.rgba>>24&255,b.rgba>>16&255,b.rgba>>8&255]}})(y||(u.color=y={})),(function(l){let _,b;try{const C=document.createElement("canvas");C.width=1,C.height=1;const w=C.getContext("2d",{willReadFrequently:!0});w&&(_=w,_.globalCompositeOperation="copy",b=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(C){if(C.match(/#[\da-f]{3,8}/i))switch(C.length){case 4:return f=parseInt(C.slice(1,2).repeat(2),16),d=parseInt(C.slice(2,3).repeat(2),16),p=parseInt(C.slice(3,4).repeat(2),16),m.toColor(f,d,p);case 5:return f=parseInt(C.slice(1,2).repeat(2),16),d=parseInt(C.slice(2,3).repeat(2),16),p=parseInt(C.slice(3,4).repeat(2),16),h=parseInt(C.slice(4,5).repeat(2),16),m.toColor(f,d,p,h);case 7:return{css:C,rgba:(parseInt(C.slice(1),16)<<8|255)>>>0};case 9:return{css:C,rgba:parseInt(C.slice(1),16)>>>0}}const w=C.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return f=parseInt(w[1]),d=parseInt(w[2]),p=parseInt(w[3]),h=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),m.toColor(f,d,p,h);if(!_||!b)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=b,_.fillStyle=C,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[f,d,p,h]=_.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(f,d,p,h),css:C}}})(E||(u.css=E={})),(function(l){function _(b,C,w){const g=b/255,x=C/255,z=w/255;return .2126*(g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))}l.relativeLuminance=function(b){return _(b>>16&255,b>>8&255,255&b)},l.relativeLuminance2=_})(v||(u.rgb=v={})),(function(l){function _(C,w,g){const x=C>>24&255,z=C>>16&255,U=C>>8&255;let j=w>>24&255,N=w>>16&255,te=w>>8&255,oe=n(v.relativeLuminance2(j,N,te),v.relativeLuminance2(x,z,U));for(;oe<g&&(j>0||N>0||te>0);)j-=Math.max(0,Math.ceil(.1*j)),N-=Math.max(0,Math.ceil(.1*N)),te-=Math.max(0,Math.ceil(.1*te)),oe=n(v.relativeLuminance2(j,N,te),v.relativeLuminance2(x,z,U));return(j<<24|N<<16|te<<8|255)>>>0}function b(C,w,g){const x=C>>24&255,z=C>>16&255,U=C>>8&255;let j=w>>24&255,N=w>>16&255,te=w>>8&255,oe=n(v.relativeLuminance2(j,N,te),v.relativeLuminance2(x,z,U));for(;oe<g&&(j<255||N<255||te<255);)j=Math.min(255,j+Math.ceil(.1*(255-j))),N=Math.min(255,N+Math.ceil(.1*(255-N))),te=Math.min(255,te+Math.ceil(.1*(255-te))),oe=n(v.relativeLuminance2(j,N,te),v.relativeLuminance2(x,z,U));return(j<<24|N<<16|te<<8|255)>>>0}l.blend=function(C,w){if(h=(255&w)/255,h===1)return w;const g=w>>24&255,x=w>>16&255,z=w>>8&255,U=C>>24&255,j=C>>16&255,N=C>>8&255;return f=U+Math.round((g-U)*h),d=j+Math.round((x-j)*h),p=N+Math.round((z-N)*h),m.toRgba(f,d,p)},l.ensureContrastRatio=function(C,w,g){const x=v.relativeLuminance(C>>8),z=v.relativeLuminance(w>>8);if(n(x,z)<g){if(z<x){const N=_(C,w,g),te=n(x,v.relativeLuminance(N>>8));if(te<g){const oe=b(C,w,g);return te>n(x,v.relativeLuminance(oe>>8))?N:oe}return N}const U=b(C,w,g),j=n(x,v.relativeLuminance(U>>8));if(j<g){const N=_(C,w,g);return j>n(x,v.relativeLuminance(N>>8))?U:N}return U}},l.reduceLuminance=_,l.increaseLuminance=b,l.toChannels=function(C){return[C>>24&255,C>>16&255,C>>8&255,255&C]}})(c||(u.rgba=c={})),u.toPaddedHex=o,u.contrastRatio=n},8969:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=f(844),p=f(2585),h=f(4348),m=f(7866),y=f(744),E=f(7302),v=f(6975),c=f(8460),o=f(1753),n=f(1480),l=f(7994),_=f(9282),b=f(5435),C=f(5981),w=f(2660);let g=!1;class x extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new c.EventEmitter),this._onScroll.event((U=>{var j;(j=this._onScrollApi)==null||j.fire(U.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(U){for(const j in U)this.optionsService.options[j]=U[j]}constructor(U){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new c.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new c.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new c.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new E.OptionsService(U)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(y.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(o.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(n.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new b.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,c.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,c.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,c.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,c.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 C.WriteBuffer(((j,N)=>this._inputHandler.parse(j,N)))),this.register((0,c.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(U,j){this._writeBuffer.write(U,j)}writeSync(U,j){this._logService.logLevel<=p.LogLevelEnum.WARN&&!g&&(this._logService.warn("writeSync is unreliable and will be removed soon."),g=!0),this._writeBuffer.writeSync(U,j)}input(U,j=!0){this.coreService.triggerDataEvent(U,j)}resize(U,j){isNaN(U)||isNaN(j)||(U=Math.max(U,y.MINIMUM_COLS),j=Math.max(j,y.MINIMUM_ROWS),this._bufferService.resize(U,j))}scroll(U,j=!1){this._bufferService.scroll(U,j)}scrollLines(U,j,N){this._bufferService.scrollLines(U,j,N)}scrollPages(U){this.scrollLines(U*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(U){const j=U-this._bufferService.buffer.ydisp;j!==0&&this.scrollLines(j)}registerEscHandler(U,j){return this._inputHandler.registerEscHandler(U,j)}registerDcsHandler(U,j){return this._inputHandler.registerDcsHandler(U,j)}registerCsiHandler(U,j){return this._inputHandler.registerCsiHandler(U,j)}registerOscHandler(U,j){return this._inputHandler.registerOscHandler(U,j)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let U=!1;const j=this.optionsService.rawOptions.windowsPty;j&&j.buildNumber!==void 0&&j.buildNumber!==void 0?U=j.backend==="conpty"&&j.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(U=!0),U?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const U=[];U.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),U.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const j of U)j.dispose()}))}}}u.CoreTerminal=x},8460:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.runAndSubscribe=u.forwardEvent=u.EventEmitter=void 0,u.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=f=>(this._listeners.push(f),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===f)return void this._listeners.splice(d,1)}}})),this._event}fire(f,d){const p=[];for(let h=0;h<this._listeners.length;h++)p.push(this._listeners[h]);for(let h=0;h<p.length;h++)p[h].call(void 0,f,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(f,d){return f((p=>d.fire(p)))},u.runAndSubscribe=function(f,d){return d(void 0),f((p=>d(p)))}},5435:function(K,u,f){var d=this&&this.__decorate||function(re,D,B,A){var L,Z=arguments.length,Y=Z<3?D:A===null?A=Object.getOwnPropertyDescriptor(D,B):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(re,D,B,A);else for(var X=re.length-1;X>=0;X--)(L=re[X])&&(Y=(Z<3?L(Y):Z>3?L(D,B,Y):L(D,B))||Y);return Z>3&&Y&&Object.defineProperty(D,B,Y),Y},p=this&&this.__param||function(re,D){return function(B,A){D(B,A,re)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=f(2584),m=f(7116),y=f(2015),E=f(844),v=f(482),c=f(8437),o=f(8460),n=f(643),l=f(511),_=f(3734),b=f(2585),C=f(1480),w=f(6242),g=f(6351),x=f(5941),z={"(":0,")":1,"*":2,"+":3,"-":1,".":2},U=131072;function j(re,D){if(re>24)return D.setWinLines||!1;switch(re){case 1:return!!D.restoreWin;case 2:return!!D.minimizeWin;case 3:return!!D.setWinPosition;case 4:return!!D.setWinSizePixels;case 5:return!!D.raiseWin;case 6:return!!D.lowerWin;case 7:return!!D.refreshWin;case 8:return!!D.setWinSizeChars;case 9:return!!D.maximizeWin;case 10:return!!D.fullscreenWin;case 11:return!!D.getWinState;case 13:return!!D.getWinPosition;case 14:return!!D.getWinSizePixels;case 15:return!!D.getScreenSizePixels;case 16:return!!D.getCellSizePixels;case 18:return!!D.getWinSizeChars;case 19:return!!D.getScreenSizeChars;case 20:return!!D.getIconTitle;case 21:return!!D.getWinTitle;case 22:return!!D.pushTitle;case 23:return!!D.popTitle;case 24:return!!D.setWinLines}return!1}var N;(function(re){re[re.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",re[re.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(N||(u.WindowsOptionsReportType=N={}));let te=0;class oe extends E.Disposable{getAttrData(){return this._curAttrData}constructor(D,B,A,L,Z,Y,X,Q,H=new y.EscapeSequenceParser){super(),this._bufferService=D,this._charsetService=B,this._coreService=A,this._logService=L,this._optionsService=Z,this._oscLinkService=Y,this._coreMouseService=X,this._unicodeService=Q,this._parser=H,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new o.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new o.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new o.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new o.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new o.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new o.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new o.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new o.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new o.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new o.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new o.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new W(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((T=>this._activeBuffer=T.activeBuffer))),this._parser.setCsiHandlerFallback(((T,se)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(T),params:se.toArray()})})),this._parser.setEscHandlerFallback((T=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(T)})})),this._parser.setExecuteHandlerFallback((T=>{this._logService.debug("Unknown EXECUTE code: ",{code:T})})),this._parser.setOscHandlerFallback(((T,se,ae)=>{this._logService.debug("Unknown OSC code: ",{identifier:T,action:se,data:ae})})),this._parser.setDcsHandlerFallback(((T,se,ae)=>{se==="HOOK"&&(ae=ae.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(T),action:se,payload:ae})})),this._parser.setPrintHandler(((T,se,ae)=>this.print(T,se,ae))),this._parser.registerCsiHandler({final:"@"},(T=>this.insertChars(T))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(T=>this.scrollLeft(T))),this._parser.registerCsiHandler({final:"A"},(T=>this.cursorUp(T))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(T=>this.scrollRight(T))),this._parser.registerCsiHandler({final:"B"},(T=>this.cursorDown(T))),this._parser.registerCsiHandler({final:"C"},(T=>this.cursorForward(T))),this._parser.registerCsiHandler({final:"D"},(T=>this.cursorBackward(T))),this._parser.registerCsiHandler({final:"E"},(T=>this.cursorNextLine(T))),this._parser.registerCsiHandler({final:"F"},(T=>this.cursorPrecedingLine(T))),this._parser.registerCsiHandler({final:"G"},(T=>this.cursorCharAbsolute(T))),this._parser.registerCsiHandler({final:"H"},(T=>this.cursorPosition(T))),this._parser.registerCsiHandler({final:"I"},(T=>this.cursorForwardTab(T))),this._parser.registerCsiHandler({final:"J"},(T=>this.eraseInDisplay(T,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(T=>this.eraseInDisplay(T,!0))),this._parser.registerCsiHandler({final:"K"},(T=>this.eraseInLine(T,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(T=>this.eraseInLine(T,!0))),this._parser.registerCsiHandler({final:"L"},(T=>this.insertLines(T))),this._parser.registerCsiHandler({final:"M"},(T=>this.deleteLines(T))),this._parser.registerCsiHandler({final:"P"},(T=>this.deleteChars(T))),this._parser.registerCsiHandler({final:"S"},(T=>this.scrollUp(T))),this._parser.registerCsiHandler({final:"T"},(T=>this.scrollDown(T))),this._parser.registerCsiHandler({final:"X"},(T=>this.eraseChars(T))),this._parser.registerCsiHandler({final:"Z"},(T=>this.cursorBackwardTab(T))),this._parser.registerCsiHandler({final:"`"},(T=>this.charPosAbsolute(T))),this._parser.registerCsiHandler({final:"a"},(T=>this.hPositionRelative(T))),this._parser.registerCsiHandler({final:"b"},(T=>this.repeatPrecedingCharacter(T))),this._parser.registerCsiHandler({final:"c"},(T=>this.sendDeviceAttributesPrimary(T))),this._parser.registerCsiHandler({prefix:">",final:"c"},(T=>this.sendDeviceAttributesSecondary(T))),this._parser.registerCsiHandler({final:"d"},(T=>this.linePosAbsolute(T))),this._parser.registerCsiHandler({final:"e"},(T=>this.vPositionRelative(T))),this._parser.registerCsiHandler({final:"f"},(T=>this.hVPosition(T))),this._parser.registerCsiHandler({final:"g"},(T=>this.tabClear(T))),this._parser.registerCsiHandler({final:"h"},(T=>this.setMode(T))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(T=>this.setModePrivate(T))),this._parser.registerCsiHandler({final:"l"},(T=>this.resetMode(T))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(T=>this.resetModePrivate(T))),this._parser.registerCsiHandler({final:"m"},(T=>this.charAttributes(T))),this._parser.registerCsiHandler({final:"n"},(T=>this.deviceStatus(T))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(T=>this.deviceStatusPrivate(T))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(T=>this.softReset(T))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(T=>this.setCursorStyle(T))),this._parser.registerCsiHandler({final:"r"},(T=>this.setScrollRegion(T))),this._parser.registerCsiHandler({final:"s"},(T=>this.saveCursor(T))),this._parser.registerCsiHandler({final:"t"},(T=>this.windowOptions(T))),this._parser.registerCsiHandler({final:"u"},(T=>this.restoreCursor(T))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(T=>this.insertColumns(T))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(T=>this.deleteColumns(T))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(T=>this.selectProtected(T))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(T=>this.requestMode(T,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(T=>this.requestMode(T,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((T=>(this.setTitle(T),this.setIconName(T),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((T=>this.setIconName(T)))),this._parser.registerOscHandler(2,new w.OscHandler((T=>this.setTitle(T)))),this._parser.registerOscHandler(4,new w.OscHandler((T=>this.setOrReportIndexedColor(T)))),this._parser.registerOscHandler(8,new w.OscHandler((T=>this.setHyperlink(T)))),this._parser.registerOscHandler(10,new w.OscHandler((T=>this.setOrReportFgColor(T)))),this._parser.registerOscHandler(11,new w.OscHandler((T=>this.setOrReportBgColor(T)))),this._parser.registerOscHandler(12,new w.OscHandler((T=>this.setOrReportCursorColor(T)))),this._parser.registerOscHandler(104,new w.OscHandler((T=>this.restoreIndexedColor(T)))),this._parser.registerOscHandler(110,new w.OscHandler((T=>this.restoreFgColor(T)))),this._parser.registerOscHandler(111,new w.OscHandler((T=>this.restoreBgColor(T)))),this._parser.registerOscHandler(112,new w.OscHandler((T=>this.restoreCursorColor(T)))),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 T in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:T},(()=>this.selectCharset("("+T))),this._parser.registerEscHandler({intermediates:")",final:T},(()=>this.selectCharset(")"+T))),this._parser.registerEscHandler({intermediates:"*",final:T},(()=>this.selectCharset("*"+T))),this._parser.registerEscHandler({intermediates:"+",final:T},(()=>this.selectCharset("+"+T))),this._parser.registerEscHandler({intermediates:"-",final:T},(()=>this.selectCharset("-"+T))),this._parser.registerEscHandler({intermediates:".",final:T},(()=>this.selectCharset("."+T))),this._parser.registerEscHandler({intermediates:"/",final:T},(()=>this.selectCharset("/"+T)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((T=>(this._logService.error("Parsing error: ",T),T))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new g.DcsHandler(((T,se)=>this.requestStatusString(T,se))))}_preserveStack(D,B,A,L){this._parseStack.paused=!0,this._parseStack.cursorStartX=D,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=A,this._parseStack.position=L}_logSlowResolvingAsync(D){this._logService.logLevel<=b.LogLevelEnum.WARN&&Promise.race([D,new Promise(((B,A)=>setTimeout((()=>A("#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(D,B){let A,L=this._activeBuffer.x,Z=this._activeBuffer.y,Y=0;const X=this._parseStack.paused;if(X){if(A=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(A),A;L=this._parseStack.cursorStartX,Z=this._parseStack.cursorStartY,this._parseStack.paused=!1,D.length>U&&(Y=this._parseStack.position+U)}if(this._logService.logLevel<=b.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof D=="string"?` "${D}"`:` "${Array.prototype.map.call(D,(T=>String.fromCharCode(T))).join("")}"`),typeof D=="string"?D.split("").map((T=>T.charCodeAt(0))):D),this._parseBuffer.length<D.length&&this._parseBuffer.length<U&&(this._parseBuffer=new Uint32Array(Math.min(D.length,U))),X||this._dirtyRowTracker.clearRange(),D.length>U)for(let T=Y;T<D.length;T+=U){const se=T+U<D.length?T+U:D.length,ae=typeof D=="string"?this._stringDecoder.decode(D.substring(T,se),this._parseBuffer):this._utf8Decoder.decode(D.subarray(T,se),this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,ae))return this._preserveStack(L,Z,ae,T),this._logSlowResolvingAsync(A),A}else if(!X){const T=typeof D=="string"?this._stringDecoder.decode(D,this._parseBuffer):this._utf8Decoder.decode(D,this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,T))return this._preserveStack(L,Z,T,0),this._logSlowResolvingAsync(A),A}this._activeBuffer.x===L&&this._activeBuffer.y===Z||this._onCursorMove.fire();const Q=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),H=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);H<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(H,this._bufferService.rows-1),Math.min(Q,this._bufferService.rows-1))}print(D,B,A){let L,Z;const Y=this._charsetService.charset,X=this._optionsService.rawOptions.screenReaderMode,Q=this._bufferService.cols,H=this._coreService.decPrivateModes.wraparound,T=this._coreService.modes.insertMode,se=this._curAttrData;let ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&A-B>0&&ae.getWidth(this._activeBuffer.x-1)===2&&ae.setCellFromCodepoint(this._activeBuffer.x-1,0,1,se);let _e=this._parser.precedingJoinState;for(let de=B;de<A;++de){if(L=D[de],L<127&&Y){const tt=Y[String.fromCharCode(L)];tt&&(L=tt.charCodeAt(0))}const we=this._unicodeService.charProperties(L,_e);Z=C.UnicodeService.extractWidth(we);const Me=C.UnicodeService.extractShouldJoin(we),Ue=Me?C.UnicodeService.extractWidth(_e):0;if(_e=we,X&&this._onA11yChar.fire((0,v.stringFromCodePoint)(L)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+Z-Ue>Q){if(H){const tt=ae;let Se=this._activeBuffer.x-Ue;for(this._activeBuffer.x=Ue,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),ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ue>0&&ae instanceof c.BufferLine&&ae.copyCellsFrom(tt,Se,0,Ue,!1);Se<Q;)tt.setCellFromCodepoint(Se++,0,1,se)}else if(this._activeBuffer.x=Q-1,Z===2)continue}if(Me&&this._activeBuffer.x){const tt=ae.getWidth(this._activeBuffer.x-1)?1:2;ae.addCodepointToCell(this._activeBuffer.x-tt,L,Z);for(let Se=Z-Ue;--Se>=0;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}else if(T&&(ae.insertCells(this._activeBuffer.x,Z-Ue,this._activeBuffer.getNullCell(se)),ae.getWidth(Q-1)===2&&ae.setCellFromCodepoint(Q-1,n.NULL_CELL_CODE,n.NULL_CELL_WIDTH,se)),ae.setCellFromCodepoint(this._activeBuffer.x++,L,Z,se),Z>0)for(;--Z;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}this._parser.precedingJoinState=_e,this._activeBuffer.x<Q&&A-B>0&&ae.getWidth(this._activeBuffer.x)===0&&!ae.hasContent(this._activeBuffer.x)&&ae.setCellFromCodepoint(this._activeBuffer.x,0,1,se),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(D,B){return D.final!=="t"||D.prefix||D.intermediates?this._parser.registerCsiHandler(D,B):this._parser.registerCsiHandler(D,(A=>!j(A.params[0],this._optionsService.rawOptions.windowOptions)||B(A)))}registerDcsHandler(D,B){return this._parser.registerDcsHandler(D,new g.DcsHandler(B))}registerEscHandler(D,B){return this._parser.registerEscHandler(D,B)}registerOscHandler(D,B){return this._parser.registerOscHandler(D,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 D;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&D.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const 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 D=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-D),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(D=this._bufferService.cols-1){this._activeBuffer.x=Math.min(D,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(D,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=D,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=D,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(D,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+D,this._activeBuffer.y+B)}cursorUp(D){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,D.params[0]||1)):this._moveCursor(0,-(D.params[0]||1)),!0}cursorDown(D){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,D.params[0]||1)):this._moveCursor(0,D.params[0]||1),!0}cursorForward(D){return this._moveCursor(D.params[0]||1,0),!0}cursorBackward(D){return this._moveCursor(-(D.params[0]||1),0),!0}cursorNextLine(D){return this.cursorDown(D),this._activeBuffer.x=0,!0}cursorPrecedingLine(D){return this.cursorUp(D),this._activeBuffer.x=0,!0}cursorCharAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(D){return this._setCursor(D.length>=2?(D.params[1]||1)-1:0,(D.params[0]||1)-1),!0}charPosAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(D){return this._moveCursor(D.params[0]||1,0),!0}linePosAbsolute(D){return this._setCursor(this._activeBuffer.x,(D.params[0]||1)-1),!0}vPositionRelative(D){return this._moveCursor(0,D.params[0]||1),!0}hVPosition(D){return this.cursorPosition(D),!0}tabClear(D){const B=D.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=D.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=D.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(D){const B=D.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(D,B,A,L=!1,Z=!1){const Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);Y.replaceCells(B,A,this._activeBuffer.getNullCell(this._eraseAttrData()),Z),L&&(Y.isWrapped=!1)}_resetBufferLine(D,B=!1){const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);A&&(A.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+D),A.isWrapped=!1)}eraseInDisplay(D,B=!1){let A;switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);A<this._bufferService.rows;A++)this._resetBufferLine(A,B);this._dirtyRowTracker.markDirty(A);break;case 1:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(A+1).isWrapped=!1);A--;)this._resetBufferLine(A,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(A=this._bufferService.rows,this._dirtyRowTracker.markDirty(A-1);A--;)this._resetBufferLine(A,B);this._dirtyRowTracker.markDirty(0);break;case 3:const L=this._activeBuffer.lines.length-this._bufferService.rows;L>0&&(this._activeBuffer.lines.trimStart(L),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-L,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-L,0),this._onScroll.fire(0))}return!0}eraseInLine(D,B=!1){switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,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(D){this._restrictCursor();let B=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y,L=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Z=this._bufferService.rows-1+this._activeBuffer.ybase-L+1;for(;B--;)this._activeBuffer.lines.splice(Z-1,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(D){this._restrictCursor();let B=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y;let L;for(L=this._bufferService.rows-1-this._activeBuffer.scrollBottom,L=this._bufferService.rows-1+this._activeBuffer.ybase-L;B--;)this._activeBuffer.lines.splice(A,1),this._activeBuffer.lines.splice(L,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(D){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(D){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(D){let B=D.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(D){let B=D.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(c.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=D.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);L.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=D.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);L.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=D.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);L.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=D.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);L.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(D){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(D.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(D){const B=this._parser.precedingJoinState;if(!B)return!0;const A=D.params[0]||1,L=C.UnicodeService.extractWidth(B),Z=this._activeBuffer.x-L,Y=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(Z),X=new Uint32Array(Y.length*A);let Q=0;for(let T=0;T<Y.length;){const se=Y.codePointAt(T)||0;X[Q++]=se,T+=se>65535?2:1}let H=Q;for(let T=1;T<A;++T)X.copyWithin(H,0,Q),H+=Q;return this.print(X,0,H),!0}sendDeviceAttributesPrimary(D){return D.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(D){return D.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(D.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(D){return(this._optionsService.rawOptions.termName+"").indexOf(D)===0}setMode(D){for(let B=0;B<D.length;B++)switch(D.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(D){for(let B=0;B<D.length;B++)switch(D.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(D){for(let B=0;B<D.length;B++)switch(D.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(D){for(let B=0;B<D.length;B++)switch(D.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(),D.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(D,B){const A=this._coreService.decPrivateModes,{activeProtocol:L,activeEncoding:Z}=this._coreMouseService,Y=this._coreService,{buffers:X,cols:Q}=this._bufferService,{active:H,alt:T}=X,se=this._optionsService.rawOptions,ae=Me=>Me?1:2,_e=D.params[0];return de=_e,we=B?_e===2?4:_e===4?ae(Y.modes.insertMode):_e===12?3:_e===20?ae(se.convertEol):0:_e===1?ae(A.applicationCursorKeys):_e===3?se.windowOptions.setWinLines?Q===80?2:Q===132?1:0:0:_e===6?ae(A.origin):_e===7?ae(A.wraparound):_e===8?3:_e===9?ae(L==="X10"):_e===12?ae(se.cursorBlink):_e===25?ae(!Y.isCursorHidden):_e===45?ae(A.reverseWraparound):_e===66?ae(A.applicationKeypad):_e===67?4:_e===1e3?ae(L==="VT200"):_e===1002?ae(L==="DRAG"):_e===1003?ae(L==="ANY"):_e===1004?ae(A.sendFocus):_e===1005?4:_e===1006?ae(Z==="SGR"):_e===1015?4:_e===1016?ae(Z==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?ae(H===T):_e===2004?ae(A.bracketedPasteMode):0,Y.triggerDataEvent(`${h.C0.ESC}[${B?"":"?"}${de};${we}$y`),!0;var de,we}_updateAttrColor(D,B,A,L,Z){return B===2?(D|=50331648,D&=-16777216,D|=_.AttributeData.fromColorRGB([A,L,Z])):B===5&&(D&=-50331904,D|=33554432|255&A),D}_extractColor(D,B,A){const L=[0,0,-1,0,0,0];let Z=0,Y=0;do{if(L[Y+Z]=D.params[B+Y],D.hasSubParams(B+Y)){const X=D.getSubParams(B+Y);let Q=0;do L[1]===5&&(Z=1),L[Y+Q+1+Z]=X[Q];while(++Q<X.length&&Q+Y+1+Z<L.length);break}if(L[1]===5&&Y+Z>=2||L[1]===2&&Y+Z>=5)break;L[1]&&(Z=1)}while(++Y+B<D.length&&Y+Z<L.length);for(let X=2;X<L.length;++X)L[X]===-1&&(L[X]=0);switch(L[0]){case 38:A.fg=this._updateAttrColor(A.fg,L[1],L[3],L[4],L[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,L[1],L[3],L[4],L[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,L[1],L[3],L[4],L[5])}return Y}_processUnderline(D,B){B.extended=B.extended.clone(),(!~D||D>5)&&(D=1),B.extended.underlineStyle=D,B.fg|=268435456,D===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(D){D.fg=c.DEFAULT_ATTR_DATA.fg,D.bg=c.DEFAULT_ATTR_DATA.bg,D.extended=D.extended.clone(),D.extended.underlineStyle=0,D.extended.underlineColor&=-67108864,D.updateExtended()}charAttributes(D){if(D.length===1&&D.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=D.length;let A;const L=this._curAttrData;for(let Z=0;Z<B;Z++)A=D.params[Z],A>=30&&A<=37?(L.fg&=-50331904,L.fg|=16777216|A-30):A>=40&&A<=47?(L.bg&=-50331904,L.bg|=16777216|A-40):A>=90&&A<=97?(L.fg&=-50331904,L.fg|=16777224|A-90):A>=100&&A<=107?(L.bg&=-50331904,L.bg|=16777224|A-100):A===0?this._processSGR0(L):A===1?L.fg|=134217728:A===3?L.bg|=67108864:A===4?(L.fg|=268435456,this._processUnderline(D.hasSubParams(Z)?D.getSubParams(Z)[0]:1,L)):A===5?L.fg|=536870912:A===7?L.fg|=67108864:A===8?L.fg|=1073741824:A===9?L.fg|=2147483648:A===2?L.bg|=134217728:A===21?this._processUnderline(2,L):A===22?(L.fg&=-134217729,L.bg&=-134217729):A===23?L.bg&=-67108865:A===24?(L.fg&=-268435457,this._processUnderline(0,L)):A===25?L.fg&=-536870913:A===27?L.fg&=-67108865:A===28?L.fg&=-1073741825:A===29?L.fg&=2147483647:A===39?(L.fg&=-67108864,L.fg|=16777215&c.DEFAULT_ATTR_DATA.fg):A===49?(L.bg&=-67108864,L.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):A===38||A===48||A===58?Z+=this._extractColor(D,Z,L):A===53?L.bg|=1073741824:A===55?L.bg&=-1073741825:A===59?(L.extended=L.extended.clone(),L.extended.underlineColor=-1,L.updateExtended()):A===100?(L.fg&=-67108864,L.fg|=16777215&c.DEFAULT_ATTR_DATA.fg,L.bg&=-67108864,L.bg|=16777215&c.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",A);return!0}deviceStatus(D){switch(D.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${B};${A}R`)}return!0}deviceStatusPrivate(D){if(D.params[0]===6){const B=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${B};${A}R`)}return!0}softReset(D){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(D){const B=D.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 A=B%2==1;return this._optionsService.options.cursorBlink=A,!0}setScrollRegion(D){const B=D.params[0]||1;let A;return(D.length<2||(A=D.params[1])>this._bufferService.rows||A===0)&&(A=this._bufferService.rows),A>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=A-1,this._setCursor(0,0)),!0}windowOptions(D){if(!j(D.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=D.length>1?D.params[1]:0;switch(D.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(N.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(N.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(D){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(D){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(D){return this._windowTitle=D,this._onTitleChange.fire(D),!0}setIconName(D){return this._iconName=D,!0}setOrReportIndexedColor(D){const B=[],A=D.split(";");for(;A.length>1;){const L=A.shift(),Z=A.shift();if(/^\d+$/.exec(L)){const Y=parseInt(L);if(G(Y))if(Z==="?")B.push({type:0,index:Y});else{const X=(0,x.parseColor)(Z);X&&B.push({type:1,index:Y,color:X})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(D){const B=D.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(D,B){this._getCurrentLinkId()&&this._finishHyperlink();const A=D.split(":");let L;const Z=A.findIndex((Y=>Y.startsWith("id=")));return Z!==-1&&(L=A[Z].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:L,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(D,B){const A=D.split(";");for(let L=0;L<A.length&&!(B>=this._specialColors.length);++L,++B)if(A[L]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const Z=(0,x.parseColor)(A[L]);Z&&this._onColor.fire([{type:1,index:this._specialColors[B],color:Z}])}return!0}setOrReportFgColor(D){return this._setOrReportSpecialColor(D,0)}setOrReportBgColor(D){return this._setOrReportSpecialColor(D,1)}setOrReportCursorColor(D){return this._setOrReportSpecialColor(D,2)}restoreIndexedColor(D){if(!D)return this._onColor.fire([{type:2}]),!0;const B=[],A=D.split(";");for(let L=0;L<A.length;++L)if(/^\d+$/.exec(A[L])){const Z=parseInt(A[L]);G(Z)&&B.push({type:2,index:Z})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(D){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(D){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(D){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),!0}selectCharset(D){return D.length!==2?(this.selectDefaultCharset(),!0):(D[0]==="/"||this._charsetService.setgCharset(z[D[0]],m.CHARSETS[D[1]]||m.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const D=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,D,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=c.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=c.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(D){return this._charsetService.setgLevel(D),!0}screenAlignmentPattern(){const D=new l.CellData;D.content=4194373,D.fg=this._curAttrData.fg,D.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const A=this._activeBuffer.ybase+this._activeBuffer.y+B,L=this._activeBuffer.lines.get(A);L&&(L.fill(D),L.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(D,B){const A=this._bufferService.buffer,L=this._optionsService.rawOptions;return(Z=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${Z}${h.C0.ESC}\\`),!0))(D==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:D==='"p'?'P1$r61;1"p':D==="r"?`P1$r${A.scrollTop+1};${A.scrollBottom+1}r`:D==="m"?"P1$r0m":D===" q"?`P1$r${{block:2,underline:4,bar:6}[L.cursorStyle]-(L.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(D,B){this._dirtyRowTracker.markRangeDirty(D,B)}}u.InputHandler=oe;let W=class{constructor(re){this._bufferService=re,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(re){re<this.start?this.start=re:re>this.end&&(this.end=re)}markRangeDirty(re,D){re>D&&(te=re,re=D,D=te),re<this.start&&(this.start=re),D>this.end&&(this.end=D)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function G(re){return 0<=re&&re<256}W=d([p(0,b.IBufferService)],W)},844:(K,u)=>{function f(d){for(const p of d)p.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 p=this._disposables.indexOf(d);p!==-1&&this._disposables.splice(p,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var p;this._isDisposed||d===this._value||((p=this._value)==null||p.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=f,u.getDisposeArrayDisposable=function(d){return{dispose:()=>f(d)}}},1505:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(p,h,m){this._data[p]||(this._data[p]={}),this._data[p][h]=m}get(p,h){return this._data[p]?this._data[p][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=f,u.FourKeyMap=class{constructor(){this._data=new f}set(d,p,h,m,y){this._data.get(d,p)||this._data.set(d,p,new f),this._data.get(d,p).set(h,m,y)}get(d,p,h,m){var y;return(y=this._data.get(d,p))==null?void 0:y.get(h,m)}clear(){this._data.clear()}}},6114:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isChromeOS=u.isLinux=u.isWindows=u.isIphone=u.isIpad=u.isMac=u.getSafariVersion=u.isSafari=u.isLegacyEdge=u.isFirefox=u.isNode=void 0,u.isNode=typeof process<"u"&&"title"in process;const f=u.isNode?"node":navigator.userAgent,d=u.isNode?"node":navigator.platform;u.isFirefox=f.includes("Firefox"),u.isLegacyEdge=f.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(f),u.getSafariVersion=function(){if(!u.isSafari)return 0;const p=f.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),u.isIpad=d==="iPad",u.isIphone=d==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),u.isLinux=d.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(f)},6106:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let f=0;u.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(f=this._search(this._getKey(d)),this._array.splice(f,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const p=this._getKey(d);if(p===void 0||(f=this._search(p),f===-1)||this._getKey(this._array[f])!==p)return!1;do if(this._array[f]===d)return this._array.splice(f,1),!0;while(++f<this._array.length&&this._getKey(this._array[f])===p);return!1}*getKeyIterator(d){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do yield this._array[f];while(++f<this._array.length&&this._getKey(this._array[f])===d)}forEachByKey(d,p){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do p(this._array[f]);while(++f<this._array.length&&this._getKey(this._array[f])===d)}values(){return[...this._array].values()}_search(d){let p=0,h=this._array.length-1;for(;h>=p;){let m=p+h>>1;const y=this._getKey(this._array[m]);if(y>d)h=m-1;else{if(!(y<d)){for(;m>0&&this._getKey(this._array[m-1])===d;)m--;return m}p=m+1}}return p}}},7226:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=f(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(y){this._tasks.push(y),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(y){this._idleCallback=void 0;let E=0,v=0,c=y.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),v=Math.max(E,v),o=y.timeRemaining(),1.5*v>o)return c-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(c-E))}ms`),void this._start();c=o}this.clear()}}class h extends p{_requestCallback(y){return setTimeout((()=>y(this._createDeadline(16))))}_cancelCallback(y){clearTimeout(y)}_createDeadline(y){const E=Date.now()+y;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=f(643);u.updateWindowsModeWrappedState=function(p){const h=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),m=h==null?void 0:h.get(p.cols-1),y=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);y&&m&&(y.isWrapped=m[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&m[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class f{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new f;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}u.AttributeData=f;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,m=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=f(6349),p=f(7226),h=f(3734),m=f(8437),y=f(4634),E=f(511),v=f(643),c=f(4863),o=f(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(n,l,_){this._hasScrollback=n,this._optionsService=l,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=o.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.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(n){return n?(this._nullCell.fg=n.fg,this._nullCell.bg=n.bg,this._nullCell.extended=n.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(n){return n?(this._whitespaceCell.fg=n.fg,this._whitespaceCell.bg=n.bg,this._whitespaceCell.extended=n.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(n,l){return new m.BufferLine(this._bufferService.cols,this.getNullCell(n),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const n=this.ybase+this.y-this.ydisp;return n>=0&&n<this._rows}_getCorrectBufferLength(n){if(!this._hasScrollback)return n;const l=n+this._optionsService.rawOptions.scrollback;return l>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:l}fillViewportRows(n){if(this.lines.length===0){n===void 0&&(n=m.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(n))}}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(n,l){const _=this.getNullCell(m.DEFAULT_ATTR_DATA);let b=0;const C=this._getCorrectBufferLength(l);if(C>this.lines.maxLength&&(this.lines.maxLength=C),this.lines.length>0){if(this._cols<n)for(let g=0;g<this.lines.length;g++)b+=+this.lines.get(g).resize(n,_);let w=0;if(this._rows<l)for(let g=this._rows;g<l;g++)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 m.BufferLine(n,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(n,_)));else for(let g=this._rows;g>l;g--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(C<this.lines.maxLength){const g=this.lines.length-C;g>0&&(this.lines.trimStart(g),this.ybase=Math.max(this.ybase-g,0),this.ydisp=Math.max(this.ydisp-g,0),this.savedY=Math.max(this.savedY-g,0)),this.lines.maxLength=C}this.x=Math.min(this.x,n-1),this.y=Math.min(this.y,l-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,n-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(n,l),this._cols>n))for(let w=0;w<this.lines.length;w++)b+=+this.lines.get(w).resize(n,_);this._cols=n,this._rows=l,this._memoryCleanupQueue.clear(),b>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let n=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,n=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return n}get _isReflowEnabled(){const n=this._optionsService.rawOptions.windowsPty;return n&&n.buildNumber?this._hasScrollback&&n.backend==="conpty"&&n.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(n,l){this._cols!==n&&(n>this._cols?this._reflowLarger(n,l):this._reflowSmaller(n,l))}_reflowLarger(n,l){const _=(0,y.reflowLargerGetLinesToRemove)(this.lines,this._cols,n,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(_.length>0){const b=(0,y.reflowLargerCreateNewLayout)(this.lines,_);(0,y.reflowLargerApplyNewLayout)(this.lines,b.layout),this._reflowLargerAdjustViewport(n,l,b.countRemoved)}}_reflowLargerAdjustViewport(n,l,_){const b=this.getNullCell(m.DEFAULT_ATTR_DATA);let C=_;for(;C-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new m.BufferLine(n,b))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(n,l){const _=this.getNullCell(m.DEFAULT_ATTR_DATA),b=[];let C=0;for(let w=this.lines.length-1;w>=0;w--){let g=this.lines.get(w);if(!g||!g.isWrapped&&g.getTrimmedLength()<=n)continue;const x=[g];for(;g.isWrapped&&w>0;)g=this.lines.get(--w),x.unshift(g);const z=this.ybase+this.y;if(z>=w&&z<w+x.length)continue;const U=x[x.length-1].getTrimmedLength(),j=(0,y.reflowSmallerGetNewLineLengths)(x,this._cols,n),N=j.length-x.length;let te;te=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+N):Math.max(0,this.lines.length-this.lines.maxLength+N);const oe=[];for(let A=0;A<N;A++){const L=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);oe.push(L)}oe.length>0&&(b.push({start:w+x.length+C,newLines:oe}),C+=oe.length),x.push(...oe);let W=j.length-1,G=j[W];G===0&&(W--,G=j[W]);let re=x.length-N-1,D=U;for(;re>=0;){const A=Math.min(D,G);if(x[W]===void 0)break;if(x[W].copyCellsFrom(x[re],D-A,G-A,A,!0),G-=A,G===0&&(W--,G=j[W]),D-=A,D===0){re--;const L=Math.max(re,0);D=(0,y.getWrappedLineTrimmedLength)(x,L,this._cols)}}for(let A=0;A<x.length;A++)j[A]<n&&x[A].setCell(j[A],_);let B=N-te;for(;B-- >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+C)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+N,this.ybase+l-1)}if(b.length>0){const w=[],g=[];for(let W=0;W<this.lines.length;W++)g.push(this.lines.get(W));const x=this.lines.length;let z=x-1,U=0,j=b[U];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+C);let N=0;for(let W=Math.min(this.lines.maxLength-1,x+C-1);W>=0;W--)if(j&&j.start>z+N){for(let G=j.newLines.length-1;G>=0;G--)this.lines.set(W--,j.newLines[G]);W++,w.push({index:z+1,amount:j.newLines.length}),N+=j.newLines.length,j=b[++U]}else this.lines.set(W,g[z--]);let te=0;for(let W=w.length-1;W>=0;W--)w[W].index+=te,this.lines.onInsertEmitter.fire(w[W]),te+=w[W].amount;const oe=Math.max(0,x+C-this.lines.maxLength);oe>0&&this.lines.onTrimEmitter.fire(oe)}}translateBufferLineToString(n,l,_=0,b){const C=this.lines.get(n);return C?C.translateToString(l,_,b):""}getWrappedRangeForLine(n){let l=n,_=n;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,last:_}}setupTabStops(n){for(n!=null?this.tabs[n]||(n=this.prevStop(n)):(this.tabs={},n=0);n<this._cols;n+=this._optionsService.rawOptions.tabStopWidth)this.tabs[n]=!0}prevStop(n){for(n==null&&(n=this.x);!this.tabs[--n]&&n>0;);return n>=this._cols?this._cols-1:n<0?0:n}nextStop(n){for(n==null&&(n=this.x);!this.tabs[++n]&&n<this._cols;);return n>=this._cols?this._cols-1:n<0?0:n}clearMarkers(n){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===n&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let n=0;n<this.markers.length;n++)this.markers[n].dispose(),this.markers.splice(n--,1);this._isClearing=!1}addMarker(n){const l=new c.Marker(n);return this.markers.push(l),l.register(this.lines.onTrim((_=>{l.line-=_,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((_=>{l.line>=_.index&&(l.line+=_.amount)}))),l.register(this.lines.onDelete((_=>{l.line>=_.index&&l.line<_.index+_.amount&&l.dispose(),l.line>_.index&&(l.line-=_.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(n){this._isClearing||this.markers.splice(this.markers.indexOf(n),1)}}},8437:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=f(3734),p=f(511),h=f(643),m=f(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let y=0;class E{constructor(c,o,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*c);const l=o||p.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<c;++_)this.setCell(_,l);this.length=c}get(c){const o=this._data[3*c+0],n=2097151&o;return[this._data[3*c+1],2097152&o?this._combined[c]:n?(0,m.stringFromCodePoint)(n):"",o>>22,2097152&o?this._combined[c].charCodeAt(this._combined[c].length-1):n]}set(c,o){this._data[3*c+1]=o[h.CHAR_DATA_ATTR_INDEX],o[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[c]=o[1],this._data[3*c+0]=2097152|c|o[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*c+0]=o[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(c){return this._data[3*c+0]>>22}hasWidth(c){return 12582912&this._data[3*c+0]}getFg(c){return this._data[3*c+1]}getBg(c){return this._data[3*c+2]}hasContent(c){return 4194303&this._data[3*c+0]}getCodePoint(c){const o=this._data[3*c+0];return 2097152&o?this._combined[c].charCodeAt(this._combined[c].length-1):2097151&o}isCombined(c){return 2097152&this._data[3*c+0]}getString(c){const o=this._data[3*c+0];return 2097152&o?this._combined[c]:2097151&o?(0,m.stringFromCodePoint)(2097151&o):""}isProtected(c){return 536870912&this._data[3*c+2]}loadCell(c,o){return y=3*c,o.content=this._data[y+0],o.fg=this._data[y+1],o.bg=this._data[y+2],2097152&o.content&&(o.combinedData=this._combined[c]),268435456&o.bg&&(o.extended=this._extendedAttrs[c]),o}setCell(c,o){2097152&o.content&&(this._combined[c]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[c]=o.extended),this._data[3*c+0]=o.content,this._data[3*c+1]=o.fg,this._data[3*c+2]=o.bg}setCellFromCodepoint(c,o,n,l){268435456&l.bg&&(this._extendedAttrs[c]=l.extended),this._data[3*c+0]=o|n<<22,this._data[3*c+1]=l.fg,this._data[3*c+2]=l.bg}addCodepointToCell(c,o,n){let l=this._data[3*c+0];2097152&l?this._combined[c]+=(0,m.stringFromCodePoint)(o):2097151&l?(this._combined[c]=(0,m.stringFromCodePoint)(2097151&l)+(0,m.stringFromCodePoint)(o),l&=-2097152,l|=2097152):l=o|4194304,n&&(l&=-12582913,l|=n<<22),this._data[3*c+0]=l}insertCells(c,o,n){if((c%=this.length)&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,n),o<this.length-c){const l=new p.CellData;for(let _=this.length-c-o-1;_>=0;--_)this.setCell(c+o+_,this.loadCell(c+_,l));for(let _=0;_<o;++_)this.setCell(c+_,n)}else for(let l=c;l<this.length;++l)this.setCell(l,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(c,o,n){if(c%=this.length,o<this.length-c){const l=new p.CellData;for(let _=0;_<this.length-c-o;++_)this.setCell(c+_,this.loadCell(c+o+_,l));for(let _=this.length-o;_<this.length;++_)this.setCell(_,n)}else for(let l=c;l<this.length;++l)this.setCell(l,n);c&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,n),this.getWidth(c)!==0||this.hasContent(c)||this.setCellFromCodepoint(c,0,1,n)}replaceCells(c,o,n,l=!1){if(l)for(c&&this.getWidth(c-1)===2&&!this.isProtected(c-1)&&this.setCellFromCodepoint(c-1,0,1,n),o<this.length&&this.getWidth(o-1)===2&&!this.isProtected(o)&&this.setCellFromCodepoint(o,0,1,n);c<o&&c<this.length;)this.isProtected(c)||this.setCell(c,n),c++;else for(c&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c-1,0,1,n),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o,0,1,n);c<o&&c<this.length;)this.setCell(c++,n)}resize(c,o){if(c===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const n=3*c;if(c>this.length){if(this._data.buffer.byteLength>=4*n)this._data=new Uint32Array(this._data.buffer,0,n);else{const l=new Uint32Array(n);l.set(this._data),this._data=l}for(let l=this.length;l<c;++l)this.setCell(l,o)}else{this._data=this._data.subarray(0,n);const l=Object.keys(this._combined);for(let b=0;b<l.length;b++){const C=parseInt(l[b],10);C>=c&&delete this._combined[C]}const _=Object.keys(this._extendedAttrs);for(let b=0;b<_.length;b++){const C=parseInt(_[b],10);C>=c&&delete this._extendedAttrs[C]}}return this.length=c,4*n*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const c=new Uint32Array(this._data.length);return c.set(this._data),this._data=c,1}return 0}fill(c,o=!1){if(o)for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,c);else{this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,c)}}copyFrom(c){this.length!==c.length?this._data=new Uint32Array(c._data):this._data.set(c._data),this.length=c.length,this._combined={};for(const o in c._combined)this._combined[o]=c._combined[o];this._extendedAttrs={};for(const o in c._extendedAttrs)this._extendedAttrs[o]=c._extendedAttrs[o];this.isWrapped=c.isWrapped}clone(){const c=new E(0);c._data=new Uint32Array(this._data),c.length=this.length;for(const o in this._combined)c._combined[o]=this._combined[o];for(const o in this._extendedAttrs)c._extendedAttrs[o]=this._extendedAttrs[o];return c.isWrapped=this.isWrapped,c}getTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0])return c+(this._data[3*c+0]>>22);return 0}getNoBgTrimmedLength(){for(let c=this.length-1;c>=0;--c)if(4194303&this._data[3*c+0]||50331648&this._data[3*c+2])return c+(this._data[3*c+0]>>22);return 0}copyCellsFrom(c,o,n,l,_){const b=c._data;if(_)for(let w=l-1;w>=0;w--){for(let g=0;g<3;g++)this._data[3*(n+w)+g]=b[3*(o+w)+g];268435456&b[3*(o+w)+2]&&(this._extendedAttrs[n+w]=c._extendedAttrs[o+w])}else for(let w=0;w<l;w++){for(let g=0;g<3;g++)this._data[3*(n+w)+g]=b[3*(o+w)+g];268435456&b[3*(o+w)+2]&&(this._extendedAttrs[n+w]=c._extendedAttrs[o+w])}const C=Object.keys(c._combined);for(let w=0;w<C.length;w++){const g=parseInt(C[w],10);g>=o&&(this._combined[g-o+n]=c._combined[g])}}translateToString(c,o,n,l){o=o??0,n=n??this.length,c&&(n=Math.min(n,this.getTrimmedLength())),l&&(l.length=0);let _="";for(;o<n;){const b=this._data[3*o+0],C=2097151&b,w=2097152&b?this._combined[o]:C?(0,m.stringFromCodePoint)(C):h.WHITESPACE_CELL_CHAR;if(_+=w,l)for(let g=0;g<w.length;++g)l.push(o);o+=b>>22||1}return l&&l.push(o),_}}u.BufferLine=E},4841:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(f,d){if(f.start.y>f.end.y)throw new Error(`Buffer range end (${f.end.x}, ${f.end.y}) cannot be before start (${f.start.x}, ${f.start.y})`);return d*(f.end.y-f.start.y)+(f.end.x-f.start.x+1)}},4634:(K,u)=>{function f(d,p,h){if(p===d.length-1)return d[p].getTrimmedLength();const m=!d[p].hasContent(h-1)&&d[p].getWidth(h-1)===1,y=d[p+1].getWidth(0)===2;return m&&y?h-1:h}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(d,p,h,m,y){const E=[];for(let v=0;v<d.length-1;v++){let c=v,o=d.get(++c);if(!o.isWrapped)continue;const n=[d.get(v)];for(;c<d.length&&o.isWrapped;)n.push(o),o=d.get(++c);if(m>=v&&m<c){v+=n.length-1;continue}let l=0,_=f(n,l,p),b=1,C=0;for(;b<n.length;){const g=f(n,b,p),x=g-C,z=h-_,U=Math.min(x,z);n[l].copyCellsFrom(n[b],C,_,U,!1),_+=U,_===h&&(l++,_=0),C+=U,C===g&&(b++,C=0),_===0&&l!==0&&n[l-1].getWidth(h-1)===2&&(n[l].copyCellsFrom(n[l-1],h-1,_++,1,!1),n[l-1].setCell(h-1,y))}n[l].replaceCells(_,h,y);let w=0;for(let g=n.length-1;g>0&&(g>l||n[g].getTrimmedLength()===0);g--)w++;w>0&&(E.push(v+n.length-w),E.push(w)),v+=n.length-1}return E},u.reflowLargerCreateNewLayout=function(d,p){const h=[];let m=0,y=p[m],E=0;for(let v=0;v<d.length;v++)if(y===v){const c=p[++m];d.onDeleteEmitter.fire({index:v-E,amount:c}),v+=c-1,E+=c,y=p[++m]}else h.push(v);return{layout:h,countRemoved:E}},u.reflowLargerApplyNewLayout=function(d,p){const h=[];for(let m=0;m<p.length;m++)h.push(d.get(p[m]));for(let m=0;m<h.length;m++)d.set(m,h[m]);d.length=p.length},u.reflowSmallerGetNewLineLengths=function(d,p,h){const m=[],y=d.map(((o,n)=>f(d,n,p))).reduce(((o,n)=>o+n));let E=0,v=0,c=0;for(;c<y;){if(y-c<h){m.push(y-c);break}E+=h;const o=f(d,v,p);E>o&&(E-=o,v++);const n=d[v].getWidth(E-1)===2;n&&E--;const l=n?h-1:h;m.push(l),c+=l}return m},u.getWrappedLineTrimmedLength=f},5295:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=f(8460),p=f(844),h=f(9092);class m extends p.Disposable{constructor(E,v){super(),this._optionsService=E,this._bufferService=v,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(E,v){this._normal.resize(E,v),this._alt.resize(E,v),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}u.BufferSet=m},511:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=f(482),p=f(643),h=f(3734);class m extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const v=new m;return v.setFromCharData(E),v}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(E[p.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(E[p.CHAR_DATA_CHAR_INDEX].length===2){const c=E[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){const o=E[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(c-55296)+o-56320+65536|E[p.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=E[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[p.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=E[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=m},643:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WHITESPACE_CELL_CODE=u.WHITESPACE_CELL_WIDTH=u.WHITESPACE_CELL_CHAR=u.NULL_CELL_CODE=u.NULL_CELL_WIDTH=u.NULL_CELL_CHAR=u.CHAR_DATA_CODE_INDEX=u.CHAR_DATA_WIDTH_INDEX=u.CHAR_DATA_CHAR_INDEX=u.CHAR_DATA_ATTR_INDEX=u.DEFAULT_EXT=u.DEFAULT_ATTR=u.DEFAULT_COLOR=void 0,u.DEFAULT_COLOR=0,u.DEFAULT_ATTR=256|u.DEFAULT_COLOR<<9,u.DEFAULT_EXT=0,u.CHAR_DATA_ATTR_INDEX=0,u.CHAR_DATA_CHAR_INDEX=1,u.CHAR_DATA_WIDTH_INDEX=2,u.CHAR_DATA_CODE_INDEX=3,u.NULL_CELL_CHAR="",u.NULL_CELL_WIDTH=1,u.NULL_CELL_CODE=0,u.WHITESPACE_CELL_CHAR=" ",u.WHITESPACE_CELL_WIDTH=1,u.WHITESPACE_CELL_CODE=32},4863:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=f(8460),p=f(844);class h{get id(){return this._id}constructor(y){this.line=y,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(y){return this._disposables.push(y),y}}u.Marker=h,h._nextId=1},7116:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_CHARSET=u.CHARSETS=void 0,u.CHARSETS={},u.DEFAULT_CHARSET=u.CHARSETS.B,u.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},u.CHARSETS.A={"#":"£"},u.CHARSETS.B=void 0,u.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},u.CHARSETS.C=u.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},u.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},u.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},u.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},u.CHARSETS.E=u.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},u.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},u.CHARSETS.H=u.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(K,u)=>{var f,d,p;Object.defineProperty(u,"__esModule",{value:!0}),u.C1_ESCAPED=u.C1=u.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
203
|
-
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(f||(u.C0=f={})),(function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""})(d||(u.C1=d={})),(function(h){h.ST=`${f.ESC}\\`})(p||(u.C1_ESCAPED=p={}))},7399:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=f(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};u.evaluateKeyboardEvent=function(h,m,y,E){const v={type:0,cancel:!1,key:void 0},c=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?v.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?v.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?v.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(v.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:v.key=h.ctrlKey?"\b":d.C0.DEL,h.altKey&&(v.key=d.C0.ESC+v.key);break;case 9:if(h.shiftKey){v.key=d.C0.ESC+"[Z";break}v.key=d.C0.HT,v.cancel=!0;break;case 13:v.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,v.cancel=!0;break;case 27:v.key=d.C0.ESC,h.altKey&&(v.key=d.C0.ESC+d.C0.ESC),v.cancel=!0;break;case 37:if(h.metaKey)break;c?(v.key=d.C0.ESC+"[1;"+(c+1)+"D",v.key===d.C0.ESC+"[1;3D"&&(v.key=d.C0.ESC+(y?"b":"[1;5D"))):v.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;c?(v.key=d.C0.ESC+"[1;"+(c+1)+"C",v.key===d.C0.ESC+"[1;3C"&&(v.key=d.C0.ESC+(y?"f":"[1;5C"))):v.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;c?(v.key=d.C0.ESC+"[1;"+(c+1)+"A",y||v.key!==d.C0.ESC+"[1;3A"||(v.key=d.C0.ESC+"[1;5A")):v.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;c?(v.key=d.C0.ESC+"[1;"+(c+1)+"B",y||v.key!==d.C0.ESC+"[1;3B"||(v.key=d.C0.ESC+"[1;5B")):v.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(v.key=d.C0.ESC+"[2~");break;case 46:v.key=c?d.C0.ESC+"[3;"+(c+1)+"~":d.C0.ESC+"[3~";break;case 36:v.key=c?d.C0.ESC+"[1;"+(c+1)+"H":m?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:v.key=c?d.C0.ESC+"[1;"+(c+1)+"F":m?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?v.type=2:h.ctrlKey?v.key=d.C0.ESC+"[5;"+(c+1)+"~":v.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?v.type=3:h.ctrlKey?v.key=d.C0.ESC+"[6;"+(c+1)+"~":v.key=d.C0.ESC+"[6~";break;case 112:v.key=c?d.C0.ESC+"[1;"+(c+1)+"P":d.C0.ESC+"OP";break;case 113:v.key=c?d.C0.ESC+"[1;"+(c+1)+"Q":d.C0.ESC+"OQ";break;case 114:v.key=c?d.C0.ESC+"[1;"+(c+1)+"R":d.C0.ESC+"OR";break;case 115:v.key=c?d.C0.ESC+"[1;"+(c+1)+"S":d.C0.ESC+"OS";break;case 116:v.key=c?d.C0.ESC+"[15;"+(c+1)+"~":d.C0.ESC+"[15~";break;case 117:v.key=c?d.C0.ESC+"[17;"+(c+1)+"~":d.C0.ESC+"[17~";break;case 118:v.key=c?d.C0.ESC+"[18;"+(c+1)+"~":d.C0.ESC+"[18~";break;case 119:v.key=c?d.C0.ESC+"[19;"+(c+1)+"~":d.C0.ESC+"[19~";break;case 120:v.key=c?d.C0.ESC+"[20;"+(c+1)+"~":d.C0.ESC+"[20~";break;case 121:v.key=c?d.C0.ESC+"[21;"+(c+1)+"~":d.C0.ESC+"[21~";break;case 122:v.key=c?d.C0.ESC+"[23;"+(c+1)+"~":d.C0.ESC+"[23~";break;case 123:v.key=c?d.C0.ESC+"[24;"+(c+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(y&&!E||!h.altKey||h.metaKey)!y||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?v.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(v.key=d.C0.US),h.key==="@"&&(v.key=d.C0.NUL)):h.keyCode===65&&(v.type=1);else{const o=p[h.keyCode],n=o==null?void 0:o[h.shiftKey?1:0];if(n)v.key=d.C0.ESC+n;else if(h.keyCode>=65&&h.keyCode<=90){const l=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(l);h.shiftKey&&(_=_.toUpperCase()),v.key=d.C0.ESC+_}else if(h.keyCode===32)v.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let l=h.code.slice(3,4);h.shiftKey||(l=l.toLowerCase()),v.key=d.C0.ESC+l,v.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?v.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?v.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?v.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?v.key=d.C0.DEL:h.keyCode===219?v.key=d.C0.ESC:h.keyCode===220?v.key=d.C0.FS:h.keyCode===221&&(v.key=d.C0.GS)}return v}},482:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},u.utf32ToString=function(f,d=0,p=f.length){let h="";for(let m=d;m<p;++m){let y=f[m];y>65535?(y-=65536,h+=String.fromCharCode(55296+(y>>10))+String.fromCharCode(y%1024+56320)):h+=String.fromCharCode(y)}return h},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(f,d){const p=f.length;if(!p)return 0;let h=0,m=0;if(this._interim){const y=f.charCodeAt(m++);56320<=y&&y<=57343?d[h++]=1024*(this._interim-55296)+y-56320+65536:(d[h++]=this._interim,d[h++]=y),this._interim=0}for(let y=m;y<p;++y){const E=f.charCodeAt(y);if(55296<=E&&E<=56319){if(++y>=p)return this._interim=E,h;const v=f.charCodeAt(y);56320<=v&&v<=57343?d[h++]=1024*(E-55296)+v-56320+65536:(d[h++]=E,d[h++]=v)}else E!==65279&&(d[h++]=E)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,d){const p=f.length;if(!p)return 0;let h,m,y,E,v=0,c=0,o=0;if(this.interim[0]){let _=!1,b=this.interim[0];b&=(224&b)==192?31:(240&b)==224?15:7;let C,w=0;for(;(C=63&this.interim[++w])&&w<4;)b<<=6,b|=C;const g=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=g-w;for(;o<x;){if(o>=p)return 0;if(C=f[o++],(192&C)!=128){o--,_=!0;break}this.interim[w++]=C,b<<=6,b|=63&C}_||(g===2?b<128?o--:d[v++]=b:g===3?b<2048||b>=55296&&b<=57343||b===65279||(d[v++]=b):b<65536||b>1114111||(d[v++]=b)),this.interim.fill(0)}const n=p-4;let l=o;for(;l<p;){for(;!(!(l<n)||128&(h=f[l])||128&(m=f[l+1])||128&(y=f[l+2])||128&(E=f[l+3]));)d[v++]=h,d[v++]=m,d[v++]=y,d[v++]=E,l+=4;if(h=f[l++],h<128)d[v++]=h;else if((224&h)==192){if(l>=p)return this.interim[0]=h,v;if(m=f[l++],(192&m)!=128){l--;continue}if(c=(31&h)<<6|63&m,c<128){l--;continue}d[v++]=c}else if((240&h)==224){if(l>=p)return this.interim[0]=h,v;if(m=f[l++],(192&m)!=128){l--;continue}if(l>=p)return this.interim[0]=h,this.interim[1]=m,v;if(y=f[l++],(192&y)!=128){l--;continue}if(c=(15&h)<<12|(63&m)<<6|63&y,c<2048||c>=55296&&c<=57343||c===65279)continue;d[v++]=c}else if((248&h)==240){if(l>=p)return this.interim[0]=h,v;if(m=f[l++],(192&m)!=128){l--;continue}if(l>=p)return this.interim[0]=h,this.interim[1]=m,v;if(y=f[l++],(192&y)!=128){l--;continue}if(l>=p)return this.interim[0]=h,this.interim[1]=m,this.interim[2]=y,v;if(E=f[l++],(192&E)!=128){l--;continue}if(c=(7&h)<<18|(63&m)<<12|(63&y)<<6|63&E,c<65536||c>1114111)continue;d[v++]=c}}return v}}},225:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const d=f(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let m;u.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let y=0;y<p.length;++y)m.fill(0,p[y][0],p[y][1]+1)}}wcwidth(y){return y<32?0:y<127?1:y<65536?m[y]:(function(E,v){let c,o=0,n=v.length-1;if(E<v[0][0]||E>v[n][1])return!1;for(;n>=o;)if(c=o+n>>1,E>v[c][1])o=c+1;else{if(!(E<v[c][0]))return!0;n=c-1}return!1})(y,h)?0:y>=131072&&y<=196605||y>=196608&&y<=262141?2:1}charProperties(y,E){let v=this.wcwidth(y),c=v===0&&E!==0;if(c){const o=d.UnicodeService.extractWidth(E);o===0?c=!1:o>v&&(v=o)}return d.UnicodeService.createPropertyValue(0,v,c)}}},5981:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=f(8460),p=f(844);class h extends p.Disposable{constructor(y){super(),this._action=y,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(y,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let v;for(this._isSyncWriting=!0;v=this._writeBuffer.shift();){this._action(v);const c=this._callbacks.shift();c&&c()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(y,E){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=y.length,this._writeBuffer.push(y),this._callbacks.push(E)}_innerWrite(y=0,E=!0){const v=y||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const c=this._writeBuffer[this._bufferOffset],o=this._action(c,E);if(o){const l=_=>Date.now()-v>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(v,_);return void o.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(l)}const n=this._callbacks[this._bufferOffset];if(n&&n(),this._bufferOffset++,this._pendingData-=c.length,Date.now()-v>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}u.WriteBuffer=h},5941:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const f=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function p(h,m){const y=h.toString(16),E=y.length<2?"0"+y:y;switch(m){case 4:return y[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}u.parseColor=function(h){if(!h)return;let m=h.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const y=f.exec(m);if(y){const E=y[1]?15:y[4]?255:y[7]?4095:65535;return[Math.round(parseInt(y[1]||y[4]||y[7]||y[10],16)/E*255),Math.round(parseInt(y[2]||y[5]||y[8]||y[11],16)/E*255),Math.round(parseInt(y[3]||y[6]||y[9]||y[12],16)/E*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),d.exec(m)&&[3,6,9,12].includes(m.length))){const y=m.length/3,E=[0,0,0];for(let v=0;v<3;++v){const c=parseInt(m.slice(y*v,y*v+y),16);E[v]=y===1?c<<4:y===2?c:y===3?c>>4:c>>8}return E}},u.toRgbString=function(h,m=16){const[y,E,v]=h;return`rgb:${p(y,m)}/${p(E,m)}/${p(v,m)}`}},5770:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=f(482),p=f(8742),h=f(5770),m=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(E,v){this._handlers[E]===void 0&&(this._handlers[E]=[]);const c=this._handlers[E];return c.push(v),{dispose:()=>{const o=c.indexOf(v);o!==-1&&c.splice(o,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(E,v){if(this.reset(),this._ident=E,this._active=this._handlers[E]||m,this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].hook(v);else this._handlerFb(this._ident,"HOOK",v)}put(E,v,c){if(this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].put(E,v,c);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(E,v,c))}unhook(E,v=!0){if(this._active.length){let c=!1,o=this._active.length-1,n=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,c=v,n=this._stack.fallThrough,this._stack.paused=!1),!n&&c===!1){for(;o>=0&&(c=this._active[o].unhook(E),c!==!0);o--)if(c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,c;o--}for(;o>=0;o--)if(c=this._active[o].unhook(!1),c instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,c}else this._handlerFb(this._ident,"UNHOOK",E);this._active=m,this._ident=0}};const y=new p.Params;y.addParam(0),u.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=y,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():y,this._data="",this._hitLimit=!1}put(E,v,c){this._hitLimit||(this._data+=(0,d.utf32ToString)(E,v,c),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let v=!1;if(this._hitLimit)v=!1;else if(E&&(v=this._handler(this._data,this._params),v instanceof Promise))return v.then((c=>(this._params=y,this._data="",this._hitLimit=!1,c)));return this._params=y,this._data="",this._hitLimit=!1,v}}},2015:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=f(844),p=f(8742),h=f(6242),m=f(6351);class y{constructor(o){this.table=new Uint8Array(o)}setDefault(o,n){this.table.fill(o<<4|n)}add(o,n,l,_){this.table[n<<8|o]=l<<4|_}addMany(o,n,l,_){for(let b=0;b<o.length;b++)this.table[n<<8|o[b]]=l<<4|_}}u.TransitionTable=y;const E=160;u.VT500_TRANSITION_TABLE=(function(){const c=new y(4095),o=Array.apply(null,Array(256)).map(((w,g)=>g)),n=(w,g)=>o.slice(w,g),l=n(32,127),_=n(0,24);_.push(25),_.push.apply(_,n(28,32));const b=n(0,14);let C;for(C in c.setDefault(1,0),c.addMany(l,0,2,0),b)c.addMany([24,26,153,154],C,3,0),c.addMany(n(128,144),C,3,0),c.addMany(n(144,152),C,3,0),c.add(156,C,0,0),c.add(27,C,11,1),c.add(157,C,4,8),c.addMany([152,158,159],C,0,7),c.add(155,C,11,3),c.add(144,C,11,9);return c.addMany(_,0,3,0),c.addMany(_,1,3,1),c.add(127,1,0,1),c.addMany(_,8,0,8),c.addMany(_,3,3,3),c.add(127,3,0,3),c.addMany(_,4,3,4),c.add(127,4,0,4),c.addMany(_,6,3,6),c.addMany(_,5,3,5),c.add(127,5,0,5),c.addMany(_,2,3,2),c.add(127,2,0,2),c.add(93,1,4,8),c.addMany(l,8,5,8),c.add(127,8,5,8),c.addMany([156,27,24,26,7],8,6,0),c.addMany(n(28,32),8,0,8),c.addMany([88,94,95],1,0,7),c.addMany(l,7,0,7),c.addMany(_,7,0,7),c.add(156,7,0,0),c.add(127,7,0,7),c.add(91,1,11,3),c.addMany(n(64,127),3,7,0),c.addMany(n(48,60),3,8,4),c.addMany([60,61,62,63],3,9,4),c.addMany(n(48,60),4,8,4),c.addMany(n(64,127),4,7,0),c.addMany([60,61,62,63],4,0,6),c.addMany(n(32,64),6,0,6),c.add(127,6,0,6),c.addMany(n(64,127),6,0,0),c.addMany(n(32,48),3,9,5),c.addMany(n(32,48),5,9,5),c.addMany(n(48,64),5,0,6),c.addMany(n(64,127),5,7,0),c.addMany(n(32,48),4,9,5),c.addMany(n(32,48),1,9,2),c.addMany(n(32,48),2,9,2),c.addMany(n(48,127),2,10,0),c.addMany(n(48,80),1,10,0),c.addMany(n(81,88),1,10,0),c.addMany([89,90,92],1,10,0),c.addMany(n(96,127),1,10,0),c.add(80,1,11,9),c.addMany(_,9,0,9),c.add(127,9,0,9),c.addMany(n(28,32),9,0,9),c.addMany(n(32,48),9,9,12),c.addMany(n(48,60),9,8,10),c.addMany([60,61,62,63],9,9,10),c.addMany(_,11,0,11),c.addMany(n(32,128),11,0,11),c.addMany(n(28,32),11,0,11),c.addMany(_,10,0,10),c.add(127,10,0,10),c.addMany(n(28,32),10,0,10),c.addMany(n(48,60),10,8,10),c.addMany([60,61,62,63],10,0,11),c.addMany(n(32,48),10,9,12),c.addMany(_,12,0,12),c.add(127,12,0,12),c.addMany(n(28,32),12,0,12),c.addMany(n(32,48),12,9,12),c.addMany(n(48,64),12,0,11),c.addMany(n(64,127),12,12,13),c.addMany(n(64,127),10,12,13),c.addMany(n(64,127),9,12,13),c.addMany(_,13,13,13),c.addMany(l,13,13,13),c.add(127,13,0,13),c.addMany([27,156,24,26],13,14,0),c.add(E,0,2,0),c.add(E,8,5,8),c.add(E,6,0,6),c.add(E,11,0,11),c.add(E,13,13,13),c})();class v extends d.Disposable{constructor(o=u.VT500_TRANSITION_TABLE){super(),this._transitions=o,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(n,l,_)=>{},this._executeHandlerFb=n=>{},this._csiHandlerFb=(n,l)=>{},this._escHandlerFb=n=>{},this._errorHandlerFb=n=>n,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(o,n=[64,126]){let l=0;if(o.prefix){if(o.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=o.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(o.intermediates){if(o.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let b=0;b<o.intermediates.length;++b){const C=o.intermediates.charCodeAt(b);if(32>C||C>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=C}}if(o.final.length!==1)throw new Error("final must be a single byte");const _=o.final.charCodeAt(0);if(n[0]>_||_>n[1])throw new Error(`final must be in range ${n[0]} .. ${n[1]}`);return l<<=8,l|=_,l}identToString(o){const n=[];for(;o;)n.push(String.fromCharCode(255&o)),o>>=8;return n.reverse().join("")}setPrintHandler(o){this._printHandler=o}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(o,n){const l=this._identifier(o,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(n),{dispose:()=>{const b=_.indexOf(n);b!==-1&&_.splice(b,1)}}}clearEscHandler(o){this._escHandlers[this._identifier(o,[48,126])]&&delete this._escHandlers[this._identifier(o,[48,126])]}setEscHandlerFallback(o){this._escHandlerFb=o}setExecuteHandler(o,n){this._executeHandlers[o.charCodeAt(0)]=n}clearExecuteHandler(o){this._executeHandlers[o.charCodeAt(0)]&&delete this._executeHandlers[o.charCodeAt(0)]}setExecuteHandlerFallback(o){this._executeHandlerFb=o}registerCsiHandler(o,n){const l=this._identifier(o);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(n),{dispose:()=>{const b=_.indexOf(n);b!==-1&&_.splice(b,1)}}}clearCsiHandler(o){this._csiHandlers[this._identifier(o)]&&delete this._csiHandlers[this._identifier(o)]}setCsiHandlerFallback(o){this._csiHandlerFb=o}registerDcsHandler(o,n){return this._dcsParser.registerHandler(this._identifier(o),n)}clearDcsHandler(o){this._dcsParser.clearHandler(this._identifier(o))}setDcsHandlerFallback(o){this._dcsParser.setHandlerFallback(o)}registerOscHandler(o,n){return this._oscParser.registerHandler(o,n)}clearOscHandler(o){this._oscParser.clearHandler(o)}setOscHandlerFallback(o){this._oscParser.setHandlerFallback(o)}setErrorHandler(o){this._errorHandler=o}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(o,n,l,_,b){this._parseStack.state=o,this._parseStack.handlers=n,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=b}parse(o,n,l){let _,b=0,C=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=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 g=this._parseStack.handlers;let x=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&x>-1){for(;x>=0&&(_=g[x](this._params),_!==!0);x--)if(_ instanceof Promise)return this._parseStack.handlerPos=x,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&x>-1){for(;x>=0&&(_=g[x](),_!==!0);x--)if(_ instanceof Promise)return this._parseStack.handlerPos=x,_}this._parseStack.handlers=[];break;case 6:if(b=o[this._parseStack.chunkPos],_=this._dcsParser.unhook(b!==24&&b!==26,l),_)return _;b===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(b=o[this._parseStack.chunkPos],_=this._oscParser.end(b!==24&&b!==26,l),_)return _;b===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let g=w;g<n;++g){switch(b=o[g],C=this._transitions.table[this.currentState<<8|(b<160?b:E)],C>>4){case 2:for(let N=g+1;;++N){if(N>=n||(b=o[N])<32||b>126&&b<E){this._printHandler(o,g,N),g=N-1;break}if(++N>=n||(b=o[N])<32||b>126&&b<E){this._printHandler(o,g,N),g=N-1;break}if(++N>=n||(b=o[N])<32||b>126&&b<E){this._printHandler(o,g,N),g=N-1;break}if(++N>=n||(b=o[N])<32||b>126&&b<E){this._printHandler(o,g,N),g=N-1;break}}break;case 3:this._executeHandlers[b]?this._executeHandlers[b]():this._executeHandlerFb(b),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:g,code:b,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const x=this._csiHandlers[this._collect<<8|b];let z=x?x.length-1:-1;for(;z>=0&&(_=x[z](this._params),_!==!0);z--)if(_ instanceof Promise)return this._preserveStack(3,x,z,C,g),_;z<0&&this._csiHandlerFb(this._collect<<8|b,this._params),this.precedingJoinState=0;break;case 8:do switch(b){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(b-48)}while(++g<n&&(b=o[g])>47&&b<60);g--;break;case 9:this._collect<<=8,this._collect|=b;break;case 10:const U=this._escHandlers[this._collect<<8|b];let j=U?U.length-1:-1;for(;j>=0&&(_=U[j](),_!==!0);j--)if(_ instanceof Promise)return this._preserveStack(4,U,j,C,g),_;j<0&&this._escHandlerFb(this._collect<<8|b),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|b,this._params);break;case 13:for(let N=g+1;;++N)if(N>=n||(b=o[N])===24||b===26||b===27||b>127&&b<E){this._dcsParser.put(o,g,N),g=N-1;break}break;case 14:if(_=this._dcsParser.unhook(b!==24&&b!==26),_)return this._preserveStack(6,[],0,C,g),_;b===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let N=g+1;;N++)if(N>=n||(b=o[N])<32||b>127&&b<E){this._oscParser.put(o,g,N),g=N-1;break}break;case 6:if(_=this._oscParser.end(b!==24&&b!==26),_)return this._preserveStack(5,[],0,C,g),_;b===27&&(C|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&C}}}u.EscapeSequenceParser=v},6242:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=f(5770),p=f(482),h=[];u.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(m,y){this._handlers[m]===void 0&&(this._handlers[m]=[]);const E=this._handlers[m];return E.push(y),{dispose:()=>{const v=E.indexOf(y);v!==-1&&E.splice(v,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,y,E){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(m,y,E);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(m,y,E))}start(){this.reset(),this._state=1}put(m,y,E){if(this._state!==3){if(this._state===1)for(;y<E;){const v=m[y++];if(v===59){this._state=2,this._start();break}if(v<48||57<v)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+v-48}this._state===2&&E-y>0&&this._put(m,y,E)}}end(m,y=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,v=this._active.length-1,c=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,E=y,c=this._stack.fallThrough,this._stack.paused=!1),!c&&E===!1){for(;v>=0&&(E=this._active[v].end(m),E!==!0);v--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,E;v--}for(;v>=0;v--)if(E=this._active[v].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",m);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,y,E){this._hitLimit||(this._data+=(0,p.utf32ToString)(m,y,E),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let y=!1;if(this._hitLimit)y=!1;else if(m&&(y=this._handler(this._data),y instanceof Promise))return y.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,y}}},8742:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const f=2147483647;class d{static fromArray(h){const m=new d;if(!h.length)return m;for(let y=Array.isArray(h[0])?1:0;y<h.length;++y){const E=h[y];if(Array.isArray(E))for(let v=0;v<E.length;++v)m.addSubParam(E[v]);else m.addParam(E)}return m}constructor(h=32,m=32){if(this.maxLength=h,this.maxSubParamsLength=m,m>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let m=0;m<this.length;++m){h.push(this.params[m]);const y=this._subParamsIdx[m]>>8,E=255&this._subParamsIdx[m];E-y>0&&h.push(Array.prototype.slice.call(this._subParams,y,E))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>f?f:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>f?f:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const m=this._subParamsIdx[h]>>8,y=255&this._subParamsIdx[h];return y-m>0?this._subParams.subarray(m,y):null}getSubParamsAll(){const h={};for(let m=0;m<this.length;++m){const y=this._subParamsIdx[m]>>8,E=255&this._subParamsIdx[m];E-y>0&&(h[m]=this._subParams.slice(y,E))}return h}addDigit(h){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const y=this._digitIsSub?this._subParams:this.params,E=y[m-1];y[m-1]=~E?Math.min(10*E+h,f):h}}u.Params=d},5741:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let f=this._addons.length-1;f>=0;f--)this._addons[f].instance.dispose()}loadAddon(f,d){const p={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(p),d.dispose=()=>this._wrappedAddonDispose(p),d.activate(f)}_wrappedAddonDispose(f){if(f.isDisposed)return;let d=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===f){d=p;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");f.isDisposed=!0,f.dispose.apply(f.instance),this._addons.splice(d,1)}}},8771:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=f(3785),p=f(511);u.BufferApiView=class{constructor(h,m){this._buffer=h,this.type=m}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const m=this._buffer.lines.get(h);if(m)return new d.BufferLineApiView(m)}getNullCell(){return new p.CellData}}},3785:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=f(511);u.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,h){if(!(p<0||p>=this._line.length))return h?(this._line.loadCell(p,h),h):this._line.loadCell(p,new d.CellData)}translateToString(p,h,m){return this._line.translateToString(p,h,m)}}},8285:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=f(8771),p=f(8460),h=f(844);class m extends h.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new p.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=m},7975:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(f){this._core=f}registerCsiHandler(f,d){return this._core.registerCsiHandler(f,(p=>d(p.toArray())))}addCsiHandler(f,d){return this.registerCsiHandler(f,d)}registerDcsHandler(f,d){return this._core.registerDcsHandler(f,((p,h)=>d(p,h.toArray())))}addDcsHandler(f,d){return this.registerDcsHandler(f,d)}registerEscHandler(f,d){return this._core.registerEscHandler(f,d)}addEscHandler(f,d){return this.registerEscHandler(f,d)}registerOscHandler(f,d){return this._core.registerOscHandler(f,d)}addOscHandler(f,d){return this.registerOscHandler(f,d)}}},7090:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(f){this._core=f}register(f){this._core.unicodeService.register(f)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(f){this._core.unicodeService.activeVersion=f}}},744:function(K,u,f){var d=this&&this.__decorate||function(c,o,n,l){var _,b=arguments.length,C=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,o,n,l);else for(var w=c.length-1;w>=0;w--)(_=c[w])&&(C=(b<3?_(C):b>3?_(o,n,C):_(o,n))||C);return b>3&&C&&Object.defineProperty(o,n,C),C},p=this&&this.__param||function(c,o){return function(n,l){o(n,l,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=f(8460),m=f(844),y=f(5295),E=f(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let v=u.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(c){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(c.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(c.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new y.BufferSet(c,this))}resize(c,o){this.cols=c,this.rows=o,this.buffers.resize(c,o),this._onResize.fire({cols:c,rows:o})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(c,o=!1){const n=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===c.fg&&l.getBg(0)===c.bg||(l=n.getBlankLine(c,o),this._cachedBlankLine=l),l.isWrapped=o;const _=n.ybase+n.scrollTop,b=n.ybase+n.scrollBottom;if(n.scrollTop===0){const C=n.lines.isFull;b===n.lines.length-1?C?n.lines.recycle().copyFrom(l):n.lines.push(l.clone()):n.lines.splice(b+1,0,l.clone()),C?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{const C=b-_+1;n.lines.shiftElements(_+1,C-1,-1),n.lines.set(b,l.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(c,o,n){const l=this.buffer;if(c<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else c+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const _=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+c,l.ybase),0),_!==l.ydisp&&(o||this._onScroll.fire(l.ydisp))}};u.BufferService=v=d([p(0,E.IOptionsService)],v)},7994:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CharsetService=void 0,u.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(f){this.glevel=f,this.charset=this._charsets[f]}setgCharset(f,d){this._charsets[f]=d,this.glevel===f&&(this.charset=d)}}},1753:function(K,u,f){var d=this&&this.__decorate||function(l,_,b,C){var w,g=arguments.length,x=g<3?_:C===null?C=Object.getOwnPropertyDescriptor(_,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(l,_,b,C);else for(var z=l.length-1;z>=0;z--)(w=l[z])&&(x=(g<3?w(x):g>3?w(_,b,x):w(_,b))||x);return g>3&&x&&Object.defineProperty(_,b,x),x},p=this&&this.__param||function(l,_){return function(b,C){_(b,C,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=f(2585),m=f(8460),y=f(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function v(l,_){let b=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(b|=64,b|=l.action):(b|=3&l.button,4&l.button&&(b|=64),8&l.button&&(b|=128),l.action===32?b|=32:l.action!==0||_||(b|=3)),b}const c=String.fromCharCode,o={DEFAULT:l=>{const _=[v(l,!1)+32,l.col+32,l.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${c(_[0])}${c(_[1])}${c(_[2])}`},SGR:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.col};${l.row}${_}`},SGR_PIXELS:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.x};${l.y}${_}`}};let n=u.CoreMouseService=class extends y.Disposable{constructor(l,_){super(),this._bufferService=l,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const b of Object.keys(E))this.addProtocol(b,E[b]);for(const b of Object.keys(o))this.addEncoding(b,o[b]);this.reset()}addProtocol(l,_){this._protocols[l]=_}addEncoding(l,_){this._encodings[l]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const _=this._encodings[this._activeEncoding](l);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,_,b){if(b){if(l.x!==_.x||l.y!==_.y)return!1}else if(l.col!==_.col||l.row!==_.row)return!1;return l.button===_.button&&l.action===_.action&&l.ctrl===_.ctrl&&l.alt===_.alt&&l.shift===_.shift}};u.CoreMouseService=n=d([p(0,h.IBufferService),p(1,h.ICoreService)],n)},6975:function(K,u,f){var d=this&&this.__decorate||function(n,l,_,b){var C,w=arguments.length,g=w<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,l,_,b);else for(var x=n.length-1;x>=0;x--)(C=n[x])&&(g=(w<3?C(g):w>3?C(l,_,g):C(l,_))||g);return w>3&&g&&Object.defineProperty(l,_,g),g},p=this&&this.__param||function(n,l){return function(_,b){l(_,b,n)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=f(1439),m=f(8460),y=f(844),E=f(2585),v=Object.freeze({insertMode:!1}),c=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let o=u.CoreService=class extends y.Disposable{constructor(n,l,_){super(),this._bufferService=n,this._logService=l,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(c)}reset(){this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(c)}triggerDataEvent(n,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${n}"`,(()=>n.split("").map((b=>b.charCodeAt(0))))),this._onData.fire(n)}triggerBinaryEvent(n){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${n}"`,(()=>n.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(n))}};u.CoreService=o=d([p(0,E.IBufferService),p(1,E.ILogService),p(2,E.IOptionsService)],o)},9074:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=f(8055),p=f(8460),h=f(844),m=f(6106);let y=0,E=0;class v extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((n=>n==null?void 0:n.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(n){if(n.marker.isDisposed)return;const l=new c(n);if(l){const _=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),_.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const n of this._decorations.values())n.dispose();this._decorations.clear()}*getDecorationsAtCell(n,l,_){let b=0,C=0;for(const w of this._decorations.getKeyIterator(l))b=w.options.x??0,C=b+(w.options.width??1),n>=b&&n<C&&(!_||(w.options.layer??"bottom")===_)&&(yield w)}forEachDecorationAtCell(n,l,_,b){this._decorations.forEachByKey(l,(C=>{y=C.options.x??0,E=y+(C.options.width??1),n>=y&&n<E&&(!_||(C.options.layer??"bottom")===_)&&b(C)}))}}u.DecorationService=v;class c extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(n){super(),this.options=n,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=n.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=f(2585),p=f(8343);class h{constructor(...y){this._entries=new Map;for(const[E,v]of y)this.set(E,v)}set(y,E){const v=this._entries.get(y);return this._entries.set(y,E),v}forEach(y){for(const[E,v]of this._entries.entries())y(E,v)}has(y){return this._entries.has(y)}get(y){return this._entries.get(y)}}u.ServiceCollection=h,u.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(m,y){this._services.set(m,y)}getService(m){return this._services.get(m)}createInstance(m,...y){const E=(0,p.getServiceDependencies)(m).sort(((o,n)=>o.index-n.index)),v=[];for(const o of E){const n=this._services.get(o.id);if(!n)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${o.id}.`);v.push(n)}const c=E.length>0?E[0].index:y.length;if(y.length!==c)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${c+1} conflicts with ${y.length} static arguments`);return new m(...y,...v)}}},7866:function(K,u,f){var d=this&&this.__decorate||function(c,o,n,l){var _,b=arguments.length,C=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,o,n,l);else for(var w=c.length-1;w>=0;w--)(_=c[w])&&(C=(b<3?_(C):b>3?_(o,n,C):_(o,n))||C);return b>3&&C&&Object.defineProperty(o,n,C),C},p=this&&this.__param||function(c,o){return function(n,l){o(n,l,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=f(844),m=f(2585),y={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let E,v=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(c){super(),this._optionsService=c,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=y[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(c){for(let o=0;o<c.length;o++)typeof c[o]=="function"&&(c[o]=c[o]())}_log(c,o,n){this._evalLazyOptionalParams(n),c.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+o,...n)}trace(c,...o){var n;this._logLevel<=m.LogLevelEnum.TRACE&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.trace.bind(this._optionsService.options.logger))??console.log,c,o)}debug(c,...o){var n;this._logLevel<=m.LogLevelEnum.DEBUG&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.debug.bind(this._optionsService.options.logger))??console.log,c,o)}info(c,...o){var n;this._logLevel<=m.LogLevelEnum.INFO&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.info.bind(this._optionsService.options.logger))??console.info,c,o)}warn(c,...o){var n;this._logLevel<=m.LogLevelEnum.WARN&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.warn.bind(this._optionsService.options.logger))??console.warn,c,o)}error(c,...o){var n;this._logLevel<=m.LogLevelEnum.ERROR&&this._log(((n=this._optionsService.options.logger)==null?void 0:n.error.bind(this._optionsService.options.logger))??console.error,c,o)}};u.LogService=v=d([p(0,m.IOptionsService)],v),u.setTraceLogger=function(c){E=c},u.traceCall=function(c,o,n){if(typeof n.value!="function")throw new Error("not supported");const l=n.value;n.value=function(..._){if(E.logLevel!==m.LogLevelEnum.TRACE)return l.apply(this,_);E.trace(`GlyphRenderer#${l.name}(${_.map((C=>JSON.stringify(C))).join(", ")})`);const b=l.apply(this,_);return E.trace(`GlyphRenderer#${l.name} return`,b),b}}},7302:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=f(8460),p=f(844),h=f(6114);u.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const m=["normal","bold","100","200","300","400","500","600","700","800","900"];class y extends p.Disposable{constructor(v){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const c={...u.DEFAULT_OPTIONS};for(const o in v)if(o in c)try{const n=v[o];c[o]=this._sanitizeAndValidateOption(o,n)}catch(n){console.error(n)}this.rawOptions=c,this.options={...c},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(v,c){return this.onOptionChange((o=>{o===v&&c(this.rawOptions[v])}))}onMultipleOptionChange(v,c){return this.onOptionChange((o=>{v.indexOf(o)!==-1&&c()}))}_setupOptions(){const v=o=>{if(!(o in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);return this.rawOptions[o]},c=(o,n)=>{if(!(o in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);n=this._sanitizeAndValidateOption(o,n),this.rawOptions[o]!==n&&(this.rawOptions[o]=n,this._onOptionChange.fire(o))};for(const o in this.rawOptions){const n={get:v.bind(this,o),set:c.bind(this,o)};Object.defineProperty(this.options,o,n)}}_sanitizeAndValidateOption(v,c){switch(v){case"cursorStyle":if(c||(c=u.DEFAULT_OPTIONS[v]),!(function(o){return o==="block"||o==="underline"||o==="bar"})(c))throw new Error(`"${c}" is not a valid value for ${v}`);break;case"wordSeparator":c||(c=u.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof c=="number"&&1<=c&&c<=1e3)break;c=m.includes(c)?c:u.DEFAULT_OPTIONS[v];break;case"cursorWidth":c=Math.floor(c);case"lineHeight":case"tabStopWidth":if(c<1)throw new Error(`${v} cannot be less than 1, value: ${c}`);break;case"minimumContrastRatio":c=Math.max(1,Math.min(21,Math.round(10*c)/10));break;case"scrollback":if((c=Math.min(c,4294967295))<0)throw new Error(`${v} cannot be less than 0, value: ${c}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(c<=0)throw new Error(`${v} cannot be less than or equal to 0, value: ${c}`);break;case"rows":case"cols":if(!c&&c!==0)throw new Error(`${v} must be numeric, value: ${c}`);break;case"windowsPty":c=c??{}}return c}}u.OptionsService=y},2660:function(K,u,f){var d=this&&this.__decorate||function(y,E,v,c){var o,n=arguments.length,l=n<3?E:c===null?c=Object.getOwnPropertyDescriptor(E,v):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(y,E,v,c);else for(var _=y.length-1;_>=0;_--)(o=y[_])&&(l=(n<3?o(l):n>3?o(E,v,l):o(E,v))||l);return n>3&&l&&Object.defineProperty(E,v,l),l},p=this&&this.__param||function(y,E){return function(v,c){E(v,c,y)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=f(2585);let m=u.OscLinkService=class{constructor(y){this._bufferService=y,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(y){const E=this._bufferService.buffer;if(y.id===void 0){const _=E.addMarker(E.ybase+E.y),b={data:y,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(b,_))),this._dataByLinkId.set(b.id,b),b.id}const v=y,c=this._getEntryIdKey(v),o=this._entriesWithId.get(c);if(o)return this.addLineToLink(o.id,E.ybase+E.y),o.id;const n=E.addMarker(E.ybase+E.y),l={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[n]};return n.onDispose((()=>this._removeMarkerFromLink(l,n))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(y,E){const v=this._dataByLinkId.get(y);if(v&&v.lines.every((c=>c.line!==E))){const c=this._bufferService.buffer.addMarker(E);v.lines.push(c),c.onDispose((()=>this._removeMarkerFromLink(v,c)))}}getLinkData(y){var E;return(E=this._dataByLinkId.get(y))==null?void 0:E.data}_getEntryIdKey(y){return`${y.id};;${y.uri}`}_removeMarkerFromLink(y,E){const v=y.lines.indexOf(E);v!==-1&&(y.lines.splice(v,1),y.lines.length===0&&(y.data.id!==void 0&&this._entriesWithId.delete(y.key),this._dataByLinkId.delete(y.id)))}};u.OscLinkService=m=d([p(0,h.IBufferService)],m)},8343:(K,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const f="di$target",d="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(p){return p[d]||[]},u.createDecorator=function(p){if(u.serviceRegistry.has(p))return u.serviceRegistry.get(p);const h=function(m,y,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,c,o){c[f]===c?c[d].push({id:v,index:o}):(c[d]=[{id:v,index:o}],c[f]=c)})(h,m,E)};return h.toString=()=>p,u.serviceRegistry.set(p,h),h}},2585:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IDecorationService=u.IUnicodeService=u.IOscLinkService=u.IOptionsService=u.ILogService=u.LogLevelEnum=u.IInstantiationService=u.ICharsetService=u.ICoreService=u.ICoreMouseService=u.IBufferService=void 0;const d=f(8343);var p;u.IBufferService=(0,d.createDecorator)("BufferService"),u.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),u.ICoreService=(0,d.createDecorator)("CoreService"),u.ICharsetService=(0,d.createDecorator)("CharsetService"),u.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(p||(u.LogLevelEnum=p={})),u.ILogService=(0,d.createDecorator)("LogService"),u.IOptionsService=(0,d.createDecorator)("OptionsService"),u.IOscLinkService=(0,d.createDecorator)("OscLinkService"),u.IUnicodeService=(0,d.createDecorator)("UnicodeService"),u.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(K,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=f(8460),p=f(225);class h{static extractShouldJoin(y){return(1&y)!=0}static extractWidth(y){return y>>1&3}static extractCharKind(y){return y>>3}static createPropertyValue(y,E,v=!1){return(16777215&y)<<3|(3&E)<<1|(v?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const y=new p.UnicodeV6;this.register(y),this._active=y.version,this._activeProvider=y}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(y){if(!this._providers[y])throw new Error(`unknown Unicode version "${y}"`);this._active=y,this._activeProvider=this._providers[y],this._onChange.fire(y)}register(y){this._providers[y.version]=y}wcwidth(y){return this._activeProvider.wcwidth(y)}getStringCellWidth(y){let E=0,v=0;const c=y.length;for(let o=0;o<c;++o){let n=y.charCodeAt(o);if(55296<=n&&n<=56319){if(++o>=c)return E+this.wcwidth(n);const b=y.charCodeAt(o);56320<=b&&b<=57343?n=1024*(n-55296)+b-56320+65536:E+=this.wcwidth(b)}const l=this.charProperties(n,v);let _=h.extractWidth(l);h.extractShouldJoin(l)&&(_-=h.extractWidth(v)),E+=_,v=l}return E}charProperties(y,E){return this._activeProvider.charProperties(y,E)}}u.UnicodeService=h}},O={};function ie(K){var u=O[K];if(u!==void 0)return u.exports;var f=O[K]={exports:{}};return F[K].call(f.exports,f,f.exports,ie),f.exports}var le={};return(()=>{var K=le;Object.defineProperty(K,"__esModule",{value:!0}),K.Terminal=void 0;const u=ie(9042),f=ie(3236),d=ie(844),p=ie(5741),h=ie(8285),m=ie(7975),y=ie(7090),E=["cols","rows"];class v extends d.Disposable{constructor(o){super(),this._core=this.register(new f.Terminal(o)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const n=_=>this._core.options[_],l=(_,b)=>{this._checkReadonlyOptions(_),this._core.options[_]=b};for(const _ in this._core.options){const b={get:n.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,b)}}_checkReadonlyOptions(o){if(E.includes(o))throw new Error(`Option "${o}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new y.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const o=this._core.coreService.decPrivateModes;let n="none";switch(this._core.coreMouseService.activeProtocol){case"X10":n="x10";break;case"VT200":n="vt200";break;case"DRAG":n="drag";break;case"ANY":n="any"}return{applicationCursorKeysMode:o.applicationCursorKeys,applicationKeypadMode:o.applicationKeypad,bracketedPasteMode:o.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:n,originMode:o.origin,reverseWraparoundMode:o.reverseWraparound,sendFocusMode:o.sendFocus,wraparoundMode:o.wraparound}}get options(){return this._publicOptions}set options(o){for(const n in o)this._publicOptions[n]=o[n]}blur(){this._core.blur()}focus(){this._core.focus()}input(o,n=!0){this._core.input(o,n)}resize(o,n){this._verifyIntegers(o,n),this._core.resize(o,n)}open(o){this._core.open(o)}attachCustomKeyEventHandler(o){this._core.attachCustomKeyEventHandler(o)}attachCustomWheelEventHandler(o){this._core.attachCustomWheelEventHandler(o)}registerLinkProvider(o){return this._core.registerLinkProvider(o)}registerCharacterJoiner(o){return this._checkProposedApi(),this._core.registerCharacterJoiner(o)}deregisterCharacterJoiner(o){this._checkProposedApi(),this._core.deregisterCharacterJoiner(o)}registerMarker(o=0){return this._verifyIntegers(o),this._core.registerMarker(o)}registerDecoration(o){return this._checkProposedApi(),this._verifyPositiveIntegers(o.x??0,o.width??0,o.height??0),this._core.registerDecoration(o)}hasSelection(){return this._core.hasSelection()}select(o,n,l){this._verifyIntegers(o,n,l),this._core.select(o,n,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(o,n){this._verifyIntegers(o,n),this._core.selectLines(o,n)}dispose(){super.dispose()}scrollLines(o){this._verifyIntegers(o),this._core.scrollLines(o)}scrollPages(o){this._verifyIntegers(o),this._core.scrollPages(o)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(o){this._verifyIntegers(o),this._core.scrollToLine(o)}clear(){this._core.clear()}write(o,n){this._core.write(o,n)}writeln(o,n){this._core.write(o),this._core.write(`\r
|
|
204
|
-
`,n)}paste(o){this._core.paste(o)}refresh(o,n){this._verifyIntegers(o,n),this._core.refresh(o,n)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(o){this._addonManager.loadAddon(this,o)}static get strings(){return u}_verifyIntegers(...o){for(const n of o)if(n===1/0||isNaN(n)||n%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...o){for(const n of o)if(n&&(n===1/0||isNaN(n)||n%1!=0||n<0))throw new Error("This API only accepts positive integers")}}K.Terminal=v})(),le})()))})(Bo)),Bo.exports}var Eg=wg(),Ho={exports:{}},sd;function xg(){return sd||(sd=1,(function(k,I){(function(F,O){k.exports=O()})(self,(()=>(()=>{var F={};return(()=>{var O=F;Object.defineProperty(O,"__esModule",{value:!0}),O.FitAddon=void 0,O.FitAddon=class{activate(ie){this._terminal=ie}dispose(){}fit(){const ie=this.proposeDimensions();if(!ie||!this._terminal||isNaN(ie.cols)||isNaN(ie.rows))return;const le=this._terminal._core;this._terminal.rows===ie.rows&&this._terminal.cols===ie.cols||(le._renderService.clear(),this._terminal.resize(ie.cols,ie.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ie=this._terminal._core,le=ie._renderService.dimensions;if(le.css.cell.width===0||le.css.cell.height===0)return;const K=this._terminal.options.scrollback===0?0:ie.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),f=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),h=f-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),m=d-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-K;return{cols:Math.max(2,Math.floor(m/le.css.cell.width)),rows:Math.max(1,Math.floor(h/le.css.cell.height))}}}})(),F})()))})(Ho)),Ho.exports}var Ag=xg(),No={exports:{}},rd;function Dg(){return rd||(rd=1,(function(k,I){(function(F,O){k.exports=O()})(self,(()=>(()=>{var F={6:(K,u)=>{function f(p){try{const h=new URL(p),m=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return p.toLocaleLowerCase().startsWith(m.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(u,"__esModule",{value:!0}),u.LinkComputer=u.WebLinkProvider=void 0,u.WebLinkProvider=class{constructor(p,h,m,y={}){this._terminal=p,this._regex=h,this._handler=m,this._options=y}provideLinks(p,h){const m=d.computeLink(p,this._regex,this._terminal,this._handler);h(this._addCallbacks(m))}_addCallbacks(p){return p.map((h=>(h.leave=this._options.leave,h.hover=(m,y)=>{if(this._options.hover){const{range:E}=h;this._options.hover(m,y,E)}},h)))}};class d{static computeLink(h,m,y,E){const v=new RegExp(m.source,(m.flags||"")+"g"),[c,o]=d._getWindowedLineStrings(h-1,y),n=c.join("");let l;const _=[];for(;l=v.exec(n);){const b=l[0];if(!f(b))continue;const[C,w]=d._mapStrIdx(y,o,0,l.index),[g,x]=d._mapStrIdx(y,C,w,b.length);if(C===-1||w===-1||g===-1||x===-1)continue;const z={start:{x:w+1,y:C+1},end:{x,y:g+1}};_.push({range:z,text:b,activate:E})}return _}static _getWindowedLineStrings(h,m){let y,E=h,v=h,c=0,o="";const n=[];if(y=m.buffer.active.getLine(h)){const l=y.translateToString(!0);if(y.isWrapped&&l[0]!==" "){for(c=0;(y=m.buffer.active.getLine(--E))&&c<2048&&(o=y.translateToString(!0),c+=o.length,n.push(o),y.isWrapped&&o.indexOf(" ")===-1););n.reverse()}for(n.push(l),c=0;(y=m.buffer.active.getLine(++v))&&y.isWrapped&&c<2048&&(o=y.translateToString(!0),c+=o.length,n.push(o),o.indexOf(" ")===-1););}return[n,E]}static _mapStrIdx(h,m,y,E){const v=h.buffer.active,c=v.getNullCell();let o=y;for(;E;){const n=v.getLine(m);if(!n)return[-1,-1];for(let l=o;l<n.length;++l){n.getCell(l,c);const _=c.getChars();if(c.getWidth()&&(E-=_.length||1,l===n.length-1&&_==="")){const b=v.getLine(m+1);b&&b.isWrapped&&(b.getCell(0,c),c.getWidth()===2&&(E+=1))}if(E<0)return[m,l]}m++,o=0}return[m,o]}}u.LinkComputer=d}},O={};function ie(K){var u=O[K];if(u!==void 0)return u.exports;var f=O[K]={exports:{}};return F[K](f,f.exports,ie),f.exports}var le={};return(()=>{var K=le;Object.defineProperty(K,"__esModule",{value:!0}),K.WebLinksAddon=void 0;const u=ie(6),f=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(p,h){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}K.WebLinksAddon=class{constructor(p=d,h={}){this._handler=p,this._options=h}activate(p){this._terminal=p;const h=this._options,m=h.urlRegex||f;this._linkProvider=this._terminal.registerLinkProvider(new u.WebLinkProvider(this._terminal,m,this._handler,h))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),le})()))})(No)),No.exports}var Tg=Dg();function Rg(k,I){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal?session=${encodeURIComponent(k)}&token=${encodeURIComponent(I)}`}const kg=15e3,Lg=new Set([4001,4004]),Mg="#10B981",Og="#F59E0B",Bg="#EF4444",nd='"SF Mono", Menlo, Monaco, Inconsolata, "Source Code Pro", Consolas, "Liberation Mono", "Ubuntu Mono", "Courier Prime", "JetBrains Mono", "Courier New", monospace',Hg={panelBackground:"#0E0E0E",textMuted:"#A1A1AA",borderSubtle:"#2E2E2E",xterm:{background:"#0E0E0E",foreground:"#FAFAFA",cursor:"#6BE195",cursorAccent:"#0E0E0E",selectionBackground:"rgba(107, 225, 149, 0.25)",black:"#1A1A1A",red:"#f87171",green:"#6BE195",yellow:"#f59e0b",blue:"#3b82f6",magenta:"#a78bfa",cyan:"#22d3ee",white:"#FAFAFA",brightBlack:"#404040",brightRed:"#ff9b96",brightGreen:"#8bd4a6",brightYellow:"#ffd966",brightBlue:"#60a5fa",brightMagenta:"#c4b5fd",brightCyan:"#67e8f9",brightWhite:"#ffffff"}},Ng={panelBackground:"#FFFFFF",textMuted:"#737373",borderSubtle:"#E5E5E5",xterm:{background:"#FFFFFF",foreground:"#1A1A1A",cursor:"#05A9BC",cursorAccent:"#FFFFFF",selectionBackground:"rgba(5, 169, 188, 0.18)",black:"#3A3A3A",red:"#dc2626",green:"#05A9BC",yellow:"#b45309",blue:"#2563eb",magenta:"#7c3aed",cyan:"#0891b2",white:"#d4d4d8",brightBlack:"#737373",brightRed:"#ef4444",brightGreen:"#06b6d4",brightYellow:"#f59e0b",brightBlue:"#3b82f6",brightMagenta:"#a78bfa",brightCyan:"#22d3ee",brightWhite:"#ffffff"}},zo=k=>k==="dark"?Hg:Ng,zg=({sessionId:k,token:I})=>{const F=ue.useRef(null),O=ue.useRef(null),[ie,le]=ue.useState("connecting"),[K,u]=ue.useState(null),[f,d]=ue.useState(ua());ue.useEffect(()=>Go(d),[]),ue.useEffect(()=>{O.current&&(O.current.options.theme=zo(f).xterm)},[f]),ue.useEffect(()=>{const y=F.current;if(!y)return;let E=!1,v=0,c=null,o=null;const n=new Eg.Terminal({cursorBlink:!0,fontSize:13,fontFamily:nd,theme:zo(ua()).xterm,scrollback:1e4,allowProposedApi:!0});O.current=n;const l=new Ag.FitAddon;n.loadAddon(l),n.loadAddon(new Tg.WebLinksAddon),n.parser.registerCsiHandler({prefix:">",final:"q"},()=>(n.write("\x1BP>|XTerm(370)\x1B\\"),!0)),n.parser.registerOscHandler(52,g=>{var U;const x=g.split(";");if(x.length<2)return!1;const z=x[x.length-1];try{const j=atob(z),N=Uint8Array.from(j,oe=>oe.charCodeAt(0)),te=new TextDecoder().decode(N);(U=navigator.clipboard)==null||U.writeText(te).catch(()=>{})}catch{}return!0}),n.open(y),l.fit();const _=n.onData(g=>{(o==null?void 0:o.readyState)===WebSocket.OPEN&&o.send(g)}),b=()=>{(o==null?void 0:o.readyState)===WebSocket.OPEN&&o.send(JSON.stringify({type:"resize",cols:n.cols,rows:n.rows}))},C=new ResizeObserver(()=>{l.fit(),b()});C.observe(y);function w(){if(E)return;const g=new WebSocket(Rg(k,I));o=g,g.onopen=()=>{v=0,le("connected"),u(null),l.fit(),b()},g.onmessage=x=>{const z=typeof x.data=="string"?x.data:new TextDecoder().decode(x.data);n.write(z)},g.onclose=x=>{if(E)return;if(Lg.has(x.code)){le("error"),u(x.reason||`Connection refused (${x.code})`);return}const z=Math.min(1e3*2**v,kg);v+=1,le("connecting"),c=setTimeout(w,z)}}return w(),()=>{E=!0,c&&clearTimeout(c),C.disconnect(),_.dispose(),o==null||o.close(),n.dispose(),O.current=null}},[k,I]);const p=ie==="connected"?Mg:ie==="error"?Bg:Og,h=ie==="connected"?"Connected":ie==="error"?K??"Error":"Connecting…",m=zo(f);return M.jsxs("div",{className:"harness-terminal",style:{display:"flex",flexDirection:"column",height:"100%",width:"100%",background:m.panelBackground,borderRadius:8,border:`1px solid ${m.borderSubtle}`,overflow:"hidden"},children:[M.jsxs("div",{"data-status":ie,style:{display:"flex",alignItems:"center",gap:6,flexShrink:0,padding:"6px 10px",borderBottom:`1px solid ${m.borderSubtle}`,fontFamily:nd,fontSize:11},children:[M.jsx("span",{"aria-hidden":"true",style:{width:7,height:7,borderRadius:"50%",background:p,boxShadow:ie==="connecting"?`0 0 0 3px ${p}33`:"none",flexShrink:0}}),M.jsx("span",{style:{color:m.textMuted},children:h})]}),M.jsx("div",{ref:F,style:{flex:1,minHeight:0,padding:8,overflow:"hidden"}})]})},jg=8e3;function Ug({message:k,onDismiss:I}){return ue.useEffect(()=>{const F=window.setTimeout(I,jg);return()=>window.clearTimeout(F)},[k,I]),M.jsxs("div",{className:"toast",role:"alert","data-testid":"toast",children:[M.jsx("span",{className:"toast-message",children:k}),M.jsx("button",{className:"toast-dismiss","aria-label":"Dismiss",onClick:I,children:"×"})]})}function qg({recentDirs:k,launchDir:I,listDir:F,onCreateSession:O,onRunSample:ie,onDismiss:le}){const[K,u]=ue.useState(!1),[f,d]=ue.useState(!1),[p,h]=ue.useState(null),m=ue.useRef(null),y=async()=>{d(!0),h(null);try{await ie()}catch(E){h(E.message),d(!1)}};return M.jsxs("div",{className:"welcome-panel","data-testid":"welcome-panel",children:[M.jsxs("div",{className:"welcome-card",children:[M.jsx("div",{className:"welcome-eyebrow",children:"Welcome"}),M.jsx("h1",{className:"welcome-title",children:"Your coding agent, wired into Sapiom"}),M.jsx("p",{className:"welcome-intro",children:"This is your own coding agent — Claude Code or Codex — running in a Sapiom-configured workspace. Agent workflows you build here show up in the rail, get visualized live on the canvas, and can be run locally or deployed with one click."}),M.jsxs("div",{className:"welcome-actions",children:[M.jsx("button",{ref:m,className:"btn-primary welcome-action","data-testid":"welcome-start-project",onClick:()=>u(!0),children:"Start a new project"}),M.jsx("button",{className:"btn-ghost welcome-action","data-testid":"welcome-run-sample",onClick:()=>void y(),disabled:f,children:f?"Setting up the sample…":"Run the sample project"})]}),M.jsxs("p",{className:"welcome-sample-note",children:["The sample is ",M.jsx("code",{children:"order-triage"}),", a small support-ticket triage agent — ready to visualize, run, and deploy."]}),p&&M.jsx("div",{className:"welcome-error",children:p}),M.jsxs("div",{className:"welcome-hints","data-testid":"welcome-hints",children:[M.jsx("span",{className:"welcome-hints-label",children:"In a project you can"}),M.jsxs("span",{className:"welcome-hint-chip",children:[M.jsx(ut,{name:"Sparkles",size:11})," Visualize"]}),M.jsxs("span",{className:"welcome-hint-chip",children:[M.jsx(ut,{name:"Play",size:11})," Run local"]}),M.jsxs("span",{className:"welcome-hint-chip",children:[M.jsx(ut,{name:"Cloud",size:11})," Deploy"]}),M.jsxs("span",{className:"welcome-hints-kbd",children:["— or press ",M.jsx("kbd",{children:"⌘K"})]})]}),M.jsx("button",{className:"welcome-dismiss","data-testid":"welcome-dismiss",onClick:le,children:"Skip for now"})]}),K&&M.jsx(fd,{recentDirs:k,launchDir:I,listDir:F,onClose:()=>u(!1),onCreate:O,triggerRef:m})]})}function Ig({workflow:k,top:I,height:F,activeSessionId:O,macros:ie,onRunMacro:le}){const K={top:I,height:F},u={top:I};return M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"workflow-action-strip-notch",style:K,"data-testid":"workflow-action-strip-notch"}),M.jsx("div",{className:"workflow-action-strip",style:u,"data-testid":"workflow-action-strip",children:ie.map(f=>{const d=hd(f,k,O);return M.jsxs("button",{className:"strip-item","data-testid":`macro-${f.id}`,"aria-label":d?`${f.label}: ${d}`:f.label,disabled:!!d,onClick:()=>{le(f),Ii("macro.invoked",{macroId:f.id})},children:[M.jsx("span",{className:"strip-item-icon",children:M.jsx(ut,{name:f.icon,size:15})}),M.jsxs("span",{className:"strip-item-text",children:[M.jsx("span",{className:"strip-item-label",children:f.label}),d&&M.jsx("span",{className:"strip-item-reason",children:d})]})]},f.id)})})]})}const Wg=k=>k.split("/").filter(Boolean).pop()??k,Pg=(k,I)=>k===I||k.startsWith(`${I}/`);function Kg(k,I,F){const O=I.find(f=>f.id===F)??null,ie=new Set(k),le=[],K=new Set,u=[...O?[O.cwd]:[],...I.map(f=>f.cwd).filter(f=>f!==(O==null?void 0:O.cwd))].filter(f=>K.has(f)?!1:(K.add(f),!0));for(const f of u){const d=k.filter(h=>ie.has(h)&&Pg(h.path,f)),p=f===(O==null?void 0:O.cwd);d.length===0&&!p||(d.forEach(h=>ie.delete(h)),le.push({cwd:f,label:Wg(f),isActive:p,workflows:d}))}return{groups:le,ungrouped:Array.from(ie)}}function Gg({workflow:k,isSelected:I,onSelect:F,onSelectedRowElement:O}){return M.jsx("div",{ref:I?O:void 0,className:"workflow-item"+(I?" is-selected":""),"data-testid":`workflow-${k.name}`,children:M.jsxs("button",{className:"workflow-item-trigger",onClick:()=>F(k.path),title:k.path,children:[M.jsx("span",{className:"workflow-caret",children:"▸"}),M.jsx("span",{className:"workflow-name",children:k.name}),k.definitionId!=null&&M.jsx("span",{className:"workflow-dot",title:"Deployed"})]})})}function Yg({workflows:k,sessions:I,activeSessionId:F,selectedPath:O,onSelect:ie,onSelectedRowElement:le,onConnect:K}){const[u,f]=ue.useState(!1),[d,p]=ue.useState(""),[h,m]=ue.useState(!1),[y,E]=ue.useState(null),v=async()=>{const l=d.trim();if(l){m(!0),E(null);try{await K(l),p(""),f(!1)}catch(_){E(_.message)}finally{m(!1)}}},{groups:c,ungrouped:o}=Kg(k,I,F),n=l=>M.jsx(Gg,{workflow:l,isSelected:l.path===O,onSelect:ie,onSelectedRowElement:le},l.path);return M.jsxs("aside",{className:"rail rail-workflows",children:[M.jsx("div",{className:"rail-header",children:"Workspace"}),M.jsxs("div",{className:"rail-list",children:[c.length===0&&o.length===0&&M.jsx("div",{className:"rail-empty",children:"No workflows yet"}),c.map(l=>M.jsxs("div",{className:"workspace-group"+(l.isActive?" is-active":""),children:[M.jsxs("div",{className:"workspace-group-header","data-testid":`workspace-group-${l.label}`,children:[M.jsx(ut,{name:l.isActive?"Radio":"Folder",size:11}),l.label]}),l.workflows.length===0&&M.jsx("div",{className:"workspace-group-empty",children:"No workflows here yet"}),l.workflows.map(n)]},l.cwd)),o.length>0&&M.jsxs("div",{className:"workspace-group",children:[M.jsx("div",{className:"workspace-group-header",children:"Other"}),o.map(n)]})]}),u?M.jsxs("div",{className:"connect-form",children:[M.jsx("input",{autoFocus:!0,className:"connect-input",placeholder:"/path/to/project",value:d,onChange:l=>p(l.target.value),onKeyDown:l=>{l.key==="Enter"&&v(),l.key==="Escape"&&f(!1)}}),y&&M.jsx("div",{className:"connect-error",children:y}),M.jsxs("div",{className:"connect-actions",children:[M.jsx("button",{className:"btn-ghost",onClick:()=>f(!1),disabled:h,children:"Cancel"}),M.jsx("button",{className:"btn-primary",onClick:()=>void v(),disabled:h||!d.trim(),children:h?"Connecting…":"Connect"})]})]}):M.jsx("button",{className:"connect-trigger",onClick:()=>f(!0),children:"+ Connect"})]})}function Fg(k,I){const[F,O]=ue.useState(null);return ue.useLayoutEffect(()=>{if(!k||!I){O(null);return}const ie=()=>{const u=k.getBoundingClientRect(),f=I.getBoundingClientRect();O({top:u.top-f.top,height:u.height})};ie();const le=k.closest(".rail-list");le==null||le.addEventListener("scroll",ie),window.addEventListener("resize",ie);const K=new ResizeObserver(ie);return K.observe(k),K.observe(I),()=>{le==null||le.removeEventListener("scroll",ie),window.removeEventListener("resize",ie),K.disconnect()}},[k,I]),F}const _d="sapiom-harness-pane-widths",Yo=180,vd=480,qo=220,Fo=280,md=720,Io=420;function Wo(k,I,F){return Math.min(Math.max(k,I),F)}function Xg(){const k={rail:qo,canvas:Io};if(typeof window>"u")return k;try{const I=window.localStorage.getItem(_d);if(!I)return k;const F=JSON.parse(I);return{rail:Wo(typeof F.rail=="number"?F.rail:qo,Yo,vd),canvas:Wo(typeof F.canvas=="number"?F.canvas:Io,Fo,md)}}catch{return k}}function ad(k){window.localStorage.setItem(_d,JSON.stringify(k))}function Vg(){const[k,I]=ue.useState(Xg),F=(ie,le,K,u)=>f=>{const d=f.currentTarget;d.setPointerCapture(f.pointerId);const p=f.clientX,h=k[ie],m=E=>{const v=Wo(h+(E.clientX-p)*le,K,u);I(c=>c[ie]===v?c:{...c,[ie]:v})},y=()=>{d.removeEventListener("pointermove",m),d.removeEventListener("pointerup",y),I(E=>(ad(E),E))};d.addEventListener("pointermove",m),d.addEventListener("pointerup",y)},O=(ie,le)=>{I(K=>{const u={...K,[ie]:le};return ad(u),u})};return{widths:k,startRailDrag:F("rail",1,Yo,vd),startCanvasDrag:F("canvas",-1,Fo,md),resetRail:()=>O("rail",qo),resetCanvas:()=>O("canvas",Io)}}const Zg=2e3;function Qg(k){const I=new URL("/ws/events",window.location.href);I.protocol=I.protocol==="https:"?"wss:":"ws:",I.searchParams.set("token",fa());let F=null,O=null,ie=!1;const le=()=>{F=new WebSocket(I),F.addEventListener("message",K=>{try{k(JSON.parse(K.data))}catch{}}),F.addEventListener("close",()=>{ie||(O=setTimeout(le,Zg))})};return le(),()=>{ie=!0,O&&clearTimeout(O),F==null||F.close()}}const ct=ig(),$g=3e3;function Jg(){const[k,I]=ue.useState(null),[F,O]=ue.useState(null),[ie,le]=ue.useState(!0),[K,u]=ue.useState(null),[f,d]=ue.useState(null),[p,h]=ue.useState(null),[m,y]=ue.useState([]),[E,v]=ue.useState(null),[c,o]=ue.useState(!1),[n,l]=ue.useState(null),[_,b]=ue.useState(new Set),[C,w]=ue.useState([]),g=ue.useRef(new Map);ue.useEffect(()=>{const X=g.current;return()=>{X.forEach(Q=>clearTimeout(Q)),X.clear()}},[]),ue.useEffect(()=>{let X=!1;return Promise.all([ct.getState(),ct.getSettings()]).then(([Q,H])=>{if(X)return;I(Q),O(H),Q.tasks&&w(Q.tasks);const T=Q.sessions.find(se=>se.status!=="exited");T&&h(T.id),Q.workflows[0]&&d(Q.workflows[0].path)}).catch(Q=>!X&&u(Q.message)).finally(()=>!X&&le(!1)),()=>{X=!0}},[]),ue.useEffect(()=>{if(!p)return;const X=k==null?void 0:k.sessions.find(H=>H.id===p),Q=ud(X);Q&&d(Q)},[p]);const x=ue.useCallback(async()=>{const X=await ct.listWorkflows();I(Q=>Q&&{...Q,workflows:X})},[]);ue.useEffect(()=>Qg(X=>{if(l(X),X.type==="session.status"){if(I(Q=>{if(!Q)return Q;const T=Q.sessions.some(se=>se.id===X.session.id)?Q.sessions.map(se=>se.id===X.session.id?X.session:se):[...Q.sessions,X.session];return{...Q,sessions:T}}),X.session.status==="exited"){const Q=X.session.id,H=g.current.get(Q);H&&(clearTimeout(H),g.current.delete(Q)),b(T=>{if(!T.has(Q))return T;const se=new Set(T);return se.delete(Q),se})}}else if(X.type==="workflows.changed")x();else if(X.type==="task.status")w(Q=>Q.some(T=>T.id===X.task.id)?Q.map(T=>T.id===X.task.id?X.task:T):[...Q,X.task]);else if(X.type==="session.activity"){const Q=X.harnessSessionId;b(T=>T.has(Q)?T:new Set(T).add(Q));const H=g.current.get(Q);H&&clearTimeout(H),g.current.set(Q,setTimeout(()=>{g.current.delete(Q),b(T=>{if(!T.has(Q))return T;const se=new Set(T);return se.delete(Q),se})},$g))}}),[x]);const z=ue.useCallback(async X=>{o(!0);try{y(await ct.sessionHistory(X))}finally{o(!1)}},[]),U=ue.useCallback(async X=>{const Q=await ct.createSession(X);I(T=>T&&!T.sessions.some(se=>se.id===Q.id)?{...T,sessions:[...T.sessions,Q]}:T),h(Q.id);let H=[];O(T=>(H=[X.cwd,...((T==null?void 0:T.recentDirs)??[]).filter(se=>se!==X.cwd)].slice(0,8),T&&{...T,recentDirs:H}));try{const T=await ct.updateSettings({recentDirs:H});O(se=>se&&{...se,recentDirs:T.recentDirs})}catch{}return Q},[]),j=ue.useCallback(async()=>{var H;const X=await ct.seedSampleProject(),Q=((H=k==null?void 0:k.availableHarnesses)==null?void 0:H[0])??"claude-code";return U({cwd:X.root,harness:Q})},[k==null?void 0:k.availableHarnesses,U]),N=ue.useCallback(async X=>{try{const Q=await ct.resumeSession(X);return I(H=>H&&{...H,sessions:H.sessions.map(T=>T.id===Q.id?Q:T)}),h(Q.id),Q}catch(Q){throw v(Q instanceof Js&&Q.reason?Q.reason:Q.message),Q}},[]),te=ue.useCallback(async X=>{var H;const Q=X.harnessSessionId??((H=k==null?void 0:k.sessions.find(T=>T.agentSessionId===X.agentSessionId))==null?void 0:H.id);return Q?N(Q):U({cwd:X.cwd,harness:X.harness})},[k,N,U]),oe=ue.useCallback(async X=>{try{await ct.killSession(X)}catch(H){throw v(H instanceof Js&&H.reason?H.reason:H.message),H}const Q=((k==null?void 0:k.sessions)??[]).filter(H=>H.id!==X);if(I(H=>H&&{...H,sessions:Q}),p===X){const H=Q.find(T=>T.status!=="exited");h(H?H.id:null)}},[k,p]),W=ue.useCallback(async X=>{const Q=await ct.connectWorkflow(X);return I(H=>H&&{...H,workflows:[...H.workflows.filter(T=>T.path!==Q.path),Q]}),Q},[]),G=ue.useCallback(async(X,Q)=>{const H=await ct.bindWorkflow(X,Q);I(T=>T&&{...T,sessions:T.sessions.map(se=>se.id===H.id?H:se)})},[]),re=ue.useCallback(async X=>{const Q=await ct.updateSettings(X);return O(Q),X.telemetryOptIn!==void 0&&I(H=>H&&{...H,telemetryOptIn:Q.telemetryOptIn}),Q},[]),D=ue.useCallback(async(X,Q)=>{try{await ct.runMacro(X,Q)}catch(H){v(H instanceof Js&&H.reason?H.reason:H.message)}},[]),B=ue.useCallback(()=>v(null),[]),A=ue.useCallback(async(X,Q)=>{await ct.injectInput(X,{text:Q,submit:!0})},[]),L=ue.useCallback(async(X,Q)=>{try{await ct.injectInput(X,{text:Q,submit:!1}),v("Typed into the terminal — edit and press Enter.")}catch(H){v(H instanceof Js&&H.reason?H.reason:H.message)}},[]),Z=ue.useCallback(X=>{v(X)},[]),Y=ue.useCallback(X=>ct.listDir(X),[]);return{state:k,loading:ie,error:K,settings:F,bootToken:fa(),selectedWorkflowPath:f,setSelectedWorkflowPath:d,activeSessionId:p,setActiveSessionId:h,history:m,historyLoading:c,loadHistory:z,createSession:U,createSampleSession:j,resumeSession:N,resumeFromHistory:te,closeSession:oe,connectWorkflow:W,bindWorkflow:G,updateSettings:re,runMacro:D,injectInput:A,useSkill:L,showToast:Z,listDir:Y,lastMessage:n,toast:E,dismissToast:B,busySessionIds:_,tasks:C,api:ct}}const ep=()=>{var G,re,D,B,A,L,Z;const k=Jg(),[I,F]=ue.useState(!1),[O,ie]=ue.useState(!1),[le,K]=ue.useState(!1),[u,f]=ue.useState(null),[d,p]=ue.useState(null),[h,m]=ue.useState("canvas"),[y,E]=ue.useState(!1),v=Fg(u,d),c=ue.useMemo(()=>k.api.listSkills.bind(k.api),[k.api]),o=ue.useMemo(()=>k.api.getSkill.bind(k.api),[k.api]),{widths:n,startRailDrag:l,startCanvasDrag:_,resetRail:b,resetCanvas:C}=Vg();if(ue.useEffect(()=>{const Y=X=>{var H;const Q=X.key.toLowerCase();if((X.metaKey||X.ctrlKey)&&(Q==="k"||Q==="p")){X.preventDefault(),F(!0);return}if((X.metaKey||X.ctrlKey)&&/^[1-9]$/.test(X.key)){const T=(H=k.state)==null?void 0:H.sessions.filter(ae=>ae.status!=="exited").sort((ae,_e)=>ae.createdAt.localeCompare(_e.createdAt)),se=T==null?void 0:T[Number(X.key)-1];se&&(X.preventDefault(),k.setActiveSessionId(se.id))}};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[(G=k.state)==null?void 0:G.sessions]),k.loading)return M.jsx("div",{className:"app-status",children:"Loading Sapiom Harness…"});if(k.error||!k.state)return M.jsxs("div",{className:"app-status app-status-error",children:["Failed to load: ",k.error]});const{state:w}=k,g=w.sessions.find(Y=>Y.id===k.activeSessionId)??null,x=ud(g),z=w.workflows.find(Y=>Y.path===x)??null,U=w.workflows.find(Y=>Y.path===k.selectedWorkflowPath)??null,j=w.sessions.some(Y=>Y.status!=="exited"),N=w.firstRun===!0&&!j&&!O,te=async(Y,X)=>{await k.createSession({cwd:Y,harness:X})},oe=Y=>{k.setSelectedWorkflowPath(Y),k.activeSessionId&&k.bindWorkflow(k.activeSessionId,Y)},W=(Y,X)=>{if(Y&&oe(Y.path),X.action.kind==="open-url"){window.open(rg(X.action.url,Y),"_blank","noopener,noreferrer");return}k.activeSessionId&&k.runMacro(X.id,{harnessSessionId:k.activeSessionId,workflowPath:Y==null?void 0:Y.path})};return M.jsxs("div",{className:"app-shell",children:[M.jsx($m,{authenticated:w.authenticated,organizationName:w.organizationName,onOpenPalette:()=>F(!0),telemetryOptIn:((re=k.settings)==null?void 0:re.telemetryOptIn)??w.telemetryOptIn,consentSource:w.consentSource,consentEnvReason:w.consentEnvReason,onOpenSettings:()=>K(!0)}),w.consentSource==="default-silent"&&!((D=k.settings)!=null&&D.telemetryNoticeDismissed)&&M.jsx(Cg,{onDismiss:()=>{k.updateSettings({telemetryNoticeDismissed:!0})},onOpenSettings:()=>K(!0)}),M.jsxs("div",{className:"app",style:{gridTemplateColumns:`minmax(${Yo}px, ${n.rail}px) 32px minmax(360px, 1fr) minmax(${Fo}px, ${n.canvas}px)`},children:[M.jsx(Yg,{workflows:w.workflows,sessions:w.sessions,activeSessionId:k.activeSessionId,selectedPath:k.selectedWorkflowPath,onSelect:oe,onSelectedRowElement:f,onConnect:async Y=>{await k.connectWorkflow(Y)}}),M.jsx("div",{className:"workflow-action-strip-col",ref:p,children:U&&v&&M.jsx(Ig,{workflow:U,top:v.top,height:v.height,activeSessionId:k.activeSessionId,macros:w.macros,onRunMacro:Y=>W(U,Y)})}),M.jsx("div",{className:"pane-resize-handle pane-resize-handle-rail",style:{left:n.rail+32},onPointerDown:l,onDoubleClick:b,role:"separator","aria-orientation":"vertical","aria-label":"Resize workspace rail","data-testid":"resize-handle-rail"}),M.jsxs("div",{className:"center-pane",children:[M.jsx(mg,{sessions:w.sessions,activeSessionId:k.activeSessionId,onSelectSession:k.setActiveSessionId,onResumeHistory:Y=>void k.resumeFromHistory(Y),history:k.history,historyLoading:k.historyLoading,onOpenHistory:Y=>void k.loadHistory(Y),recentDirs:((B=k.settings)==null?void 0:B.recentDirs)??[],launchDir:w.launchDir??null,listDir:k.listDir,onCreateSession:te,boundWorkflowName:(z==null?void 0:z.name)??null,authenticated:w.authenticated,organizationName:w.organizationName,telemetryOptIn:((A=k.settings)==null?void 0:A.telemetryOptIn)??w.telemetryOptIn,onToggleTelemetry:async Y=>{await k.updateSettings({telemetryOptIn:Y})},busySessionIds:k.busySessionIds,settingsOpen:le,onSetSettingsOpen:K}),M.jsx("div",{className:"terminal-slot",children:(g==null?void 0:g.status)==="exited"?M.jsx(ug,{session:g,onResume:()=>void k.resumeSession(g.id),onClose:()=>void k.closeSession(g.id)}):k.activeSessionId?M.jsx(zg,{sessionId:k.activeSessionId,token:k.bootToken}):N?M.jsx(qg,{recentDirs:((L=k.settings)==null?void 0:L.recentDirs)??[],launchDir:w.launchDir??null,listDir:k.listDir,onCreateSession:te,onRunSample:async()=>{await k.createSampleSession()},onDismiss:()=>ie(!0)}):M.jsx("div",{className:"terminal-empty",children:'No active session — click "+ new" to start one.'})})]}),M.jsx("div",{className:"pane-resize-handle pane-resize-handle-canvas",style:{right:n.canvas},onPointerDown:_,onDoubleClick:C,role:"separator","aria-orientation":"vertical","aria-label":"Resize canvas pane","data-testid":"resize-handle-canvas"}),M.jsxs("div",{className:"right-pane",children:[M.jsxs("div",{className:"right-pane-tabs",role:"tablist","aria-label":"Right pane",children:[M.jsx("button",{role:"tab","aria-selected":h==="canvas",className:"right-pane-tab"+(h==="canvas"?" is-active":""),onClick:()=>m("canvas"),"data-testid":"right-tab-canvas",children:"Canvas"}),M.jsx("button",{role:"tab","aria-selected":h==="skills",className:"right-pane-tab"+(h==="skills"?" is-active":""),onClick:()=>{m("skills"),E(!0)},"data-testid":"right-tab-skills",children:"Skills"})]}),M.jsx("div",{className:"right-pane-panel"+(h==="canvas"?"":" is-hidden"),"data-testid":"right-panel-canvas",children:M.jsx(ag,{sessionId:k.activeSessionId,lastMessage:k.lastMessage,boundWorkflow:z,activeSessionId:k.activeSessionId,macros:w.macros,tasks:k.tasks,onRunMacro:Y=>W(z,Y)})}),(h==="skills"||y)&&M.jsx("div",{className:"right-pane-panel"+(h==="skills"?"":" is-hidden"),"data-testid":"right-panel-skills",children:M.jsx(bg,{listSkills:c,getSkill:o,isActive:h==="skills",activeSession:g,onUseSkill:(Y,X)=>void k.useSkill(Y,X)})})]})]}),I&&M.jsx(cg,{sessions:w.sessions,workflows:w.workflows,recentDirs:((Z=k.settings)==null?void 0:Z.recentDirs)??[],listDir:k.listDir,onSelectSession:k.setActiveSessionId,onOpenPath:Y=>void te(Y,"claude-code"),onClose:()=>F(!1)}),k.toast&&M.jsx(Ug,{message:k.toast,onDismiss:k.dismissToast})]})};window.addEventListener("scroll",()=>{(window.scrollX!==0||window.scrollY!==0)&&window.scrollTo(0,0)},{passive:!0});Kv.createRoot(document.getElementById("root")).render(M.jsx(ue.StrictMode,{children:M.jsx(ep,{})}));
|