vibe-coding-master 0.2.12 → 0.3.0
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/README.md +9 -0
- package/dist/backend/api/codex-review-routes.js +54 -0
- package/dist/backend/cli/install-vcm-harness.js +55 -0
- package/dist/backend/server.js +15 -0
- package/dist/backend/services/codex-review-service.js +765 -0
- package/dist/backend/services/harness-service.js +63 -3
- package/dist/backend/services/task-service.js +2 -0
- package/dist/backend/templates/harness/claude-root.js +2 -0
- package/dist/backend/templates/harness/codex-review.js +574 -0
- package/dist/backend/templates/harness/project-manager-agent.js +13 -3
- package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +6 -1
- package/dist/main.js +39 -0
- package/dist/shared/types/codex-review.js +5 -0
- package/dist-frontend/assets/index-C9l94uxA.js +92 -0
- package/dist-frontend/assets/index-D6jWo6Jd.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/docs/codex-review-gates.md +515 -0
- package/docs/product-design.md +31 -2
- package/package.json +1 -1
- package/scripts/verify-package.mjs +4 -0
- package/dist-frontend/assets/index-CT20u9Fk.js +0 -92
- package/dist-frontend/assets/index-DC9-SB7F.css +0 -32
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var A0=Object.defineProperty;var T0=(n,r,s)=>r in n?A0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var Gp=(n,r,s)=>T0(n,typeof r!="symbol"?r+"":r,s);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const b of m)if(b.type==="childList")for(const f of b.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(m){const b={};return m.integrity&&(b.integrity=m.integrity),m.referrerPolicy&&(b.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?b.credentials="include":m.crossOrigin==="anonymous"?b.credentials="omit":b.credentials="same-origin",b}function o(m){if(m.ep)return;m.ep=!0;const b=s(m);fetch(m.href,b)}})();function ng(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Gu={exports:{}},Us={};/**
|
|
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 $p;function D0(){if($p)return Us;$p=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,m,b){var f=null;if(b!==void 0&&(f=""+b),m.key!==void 0&&(f=""+m.key),"key"in m){b={};for(var a in m)a!=="key"&&(b[a]=m[a])}else b=m;return m=b.ref,{$$typeof:n,type:o,key:f,ref:m!==void 0?m:null,props:b}}return Us.Fragment=r,Us.jsx=s,Us.jsxs=s,Us}var Yp;function R0(){return Yp||(Yp=1,Gu.exports=D0()),Gu.exports}var N=R0(),$u={exports:{}},Be={};/**
|
|
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 Kp;function M0(){if(Kp)return Be;Kp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),f=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),S=Symbol.iterator;function w(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function _(j,V,I){this.props=j,this.context=V,this.refs=y,this.updater=I||k}_.prototype.isReactComponent={},_.prototype.setState=function(j,V){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,V,"setState")},_.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function g(){}g.prototype=_.prototype;function v(j,V,I){this.props=j,this.context=V,this.refs=y,this.updater=I||k}var A=v.prototype=new g;A.constructor=v,x(A,_.prototype),A.isPureReactComponent=!0;var M=Array.isArray;function D(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function R(j,V,I){var ie=I.ref;return{$$typeof:n,type:j,key:V,ref:ie!==void 0?ie:null,props:I}}function B(j,V){return R(j.type,V,j.props)}function H(j){return typeof j=="object"&&j!==null&&j.$$typeof===n}function F(j){var V={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(I){return V[I]})}var q=/\/+/g;function Y(j,V){return typeof j=="object"&&j!==null&&j.key!=null?F(""+j.key):V.toString(36)}function K(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(D,D):(j.status="pending",j.then(function(V){j.status==="pending"&&(j.status="fulfilled",j.value=V)},function(V){j.status==="pending"&&(j.status="rejected",j.reason=V)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function $(j,V,I,ie,ge){var ee=typeof j;(ee==="undefined"||ee==="boolean")&&(j=null);var G=!1;if(j===null)G=!0;else switch(ee){case"bigint":case"string":case"number":G=!0;break;case"object":switch(j.$$typeof){case n:case r:G=!0;break;case d:return G=j._init,$(G(j._payload),V,I,ie,ge)}}if(G)return ge=ge(j),G=ie===""?"."+Y(j,0):ie,M(ge)?(I="",G!=null&&(I=G.replace(q,"$&/")+"/"),$(ge,V,I,"",function(te){return te})):ge!=null&&(H(ge)&&(ge=B(ge,I+(ge.key==null||j&&j.key===ge.key?"":(""+ge.key).replace(q,"$&/")+"/")+G)),V.push(ge)),1;G=0;var U=ie===""?".":ie+":";if(M(j))for(var ne=0;ne<j.length;ne++)ie=j[ne],ee=U+Y(ie,ne),G+=$(ie,V,I,ee,ge);else if(ne=w(j),typeof ne=="function")for(j=ne.call(j),ne=0;!(ie=j.next()).done;)ie=ie.value,ee=U+Y(ie,ne++),G+=$(ie,V,I,ee,ge);else if(ee==="object"){if(typeof j.then=="function")return $(K(j),V,I,ie,ge);throw V=String(j),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return G}function X(j,V,I){if(j==null)return j;var ie=[],ge=0;return $(j,ie,"","",function(ee){return V.call(I,ee,ge++)}),ie}function Z(j){if(j._status===-1){var V=j._result;V=V(),V.then(function(I){(j._status===0||j._status===-1)&&(j._status=1,j._result=I)},function(I){(j._status===0||j._status===-1)&&(j._status=2,j._result=I)}),j._status===-1&&(j._status=0,j._result=V)}if(j._status===1)return j._result.default;throw j._result}var z=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},O={map:X,forEach:function(j,V,I){X(j,function(){V.apply(this,arguments)},I)},count:function(j){var V=0;return X(j,function(){V++}),V},toArray:function(j){return X(j,function(V){return V})||[]},only:function(j){if(!H(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Be.Activity=c,Be.Children=O,Be.Component=_,Be.Fragment=s,Be.Profiler=m,Be.PureComponent=v,Be.StrictMode=o,Be.Suspense=u,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Be.__COMPILER_RUNTIME={__proto__:null,c:function(j){return T.H.useMemoCache(j)}},Be.cache=function(j){return function(){return j.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(j,V,I){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ie=x({},j.props),ge=j.key;if(V!=null)for(ee in V.key!==void 0&&(ge=""+V.key),V)!E.call(V,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&V.ref===void 0||(ie[ee]=V[ee]);var ee=arguments.length-2;if(ee===1)ie.children=I;else if(1<ee){for(var G=Array(ee),U=0;U<ee;U++)G[U]=arguments[U+2];ie.children=G}return R(j.type,ge,ie)},Be.createContext=function(j){return j={$$typeof:f,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:b,_context:j},j},Be.createElement=function(j,V,I){var ie,ge={},ee=null;if(V!=null)for(ie in V.key!==void 0&&(ee=""+V.key),V)E.call(V,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ge[ie]=V[ie]);var G=arguments.length-2;if(G===1)ge.children=I;else if(1<G){for(var U=Array(G),ne=0;ne<G;ne++)U[ne]=arguments[ne+2];ge.children=U}if(j&&j.defaultProps)for(ie in G=j.defaultProps,G)ge[ie]===void 0&&(ge[ie]=G[ie]);return R(j,ee,ge)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(j){return{$$typeof:a,render:j}},Be.isValidElement=H,Be.lazy=function(j){return{$$typeof:d,_payload:{_status:-1,_result:j},_init:Z}},Be.memo=function(j,V){return{$$typeof:h,type:j,compare:V===void 0?null:V}},Be.startTransition=function(j){var V=T.T,I={};T.T=I;try{var ie=j(),ge=T.S;ge!==null&&ge(I,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(D,z)}catch(ee){z(ee)}finally{V!==null&&I.types!==null&&(V.types=I.types),T.T=V}},Be.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Be.use=function(j){return T.H.use(j)},Be.useActionState=function(j,V,I){return T.H.useActionState(j,V,I)},Be.useCallback=function(j,V){return T.H.useCallback(j,V)},Be.useContext=function(j){return T.H.useContext(j)},Be.useDebugValue=function(){},Be.useDeferredValue=function(j,V){return T.H.useDeferredValue(j,V)},Be.useEffect=function(j,V){return T.H.useEffect(j,V)},Be.useEffectEvent=function(j){return T.H.useEffectEvent(j)},Be.useId=function(){return T.H.useId()},Be.useImperativeHandle=function(j,V,I){return T.H.useImperativeHandle(j,V,I)},Be.useInsertionEffect=function(j,V){return T.H.useInsertionEffect(j,V)},Be.useLayoutEffect=function(j,V){return T.H.useLayoutEffect(j,V)},Be.useMemo=function(j,V){return T.H.useMemo(j,V)},Be.useOptimistic=function(j,V){return T.H.useOptimistic(j,V)},Be.useReducer=function(j,V,I){return T.H.useReducer(j,V,I)},Be.useRef=function(j){return T.H.useRef(j)},Be.useState=function(j){return T.H.useState(j)},Be.useSyncExternalStore=function(j,V,I){return T.H.useSyncExternalStore(j,V,I)},Be.useTransition=function(){return T.H.useTransition()},Be.version="19.2.6",Be}var Wp;function Rc(){return Wp||(Wp=1,$u.exports=M0()),$u.exports}var fe=Rc(),Yu={exports:{}},Ps={},Ku={exports:{}},Wu={};/**
|
|
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 Xp;function L0(){return Xp||(Xp=1,(function(n){function r($,X){var Z=$.length;$.push(X);e:for(;0<Z;){var z=Z-1>>>1,O=$[z];if(0<m(O,X))$[z]=X,$[Z]=O,Z=z;else break e}}function s($){return $.length===0?null:$[0]}function o($){if($.length===0)return null;var X=$[0],Z=$.pop();if(Z!==X){$[0]=Z;e:for(var z=0,O=$.length,j=O>>>1;z<j;){var V=2*(z+1)-1,I=$[V],ie=V+1,ge=$[ie];if(0>m(I,Z))ie<O&&0>m(ge,I)?($[z]=ge,$[ie]=Z,z=ie):($[z]=I,$[V]=Z,z=V);else if(ie<O&&0>m(ge,Z))$[z]=ge,$[ie]=Z,z=ie;else break e}}return X}function m($,X){var Z=$.sortIndex-X.sortIndex;return Z!==0?Z:$.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var b=performance;n.unstable_now=function(){return b.now()}}else{var f=Date,a=f.now();n.unstable_now=function(){return f.now()-a}}var u=[],h=[],d=1,c=null,S=3,w=!1,k=!1,x=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function A($){for(var X=s(h);X!==null;){if(X.callback===null)o(h);else if(X.startTime<=$)o(h),X.sortIndex=X.expirationTime,r(u,X);else break;X=s(h)}}function M($){if(x=!1,A($),!k)if(s(u)!==null)k=!0,D||(D=!0,F());else{var X=s(h);X!==null&&K(M,X.startTime-$)}}var D=!1,T=-1,E=5,R=-1;function B(){return y?!0:!(n.unstable_now()-R<E)}function H(){if(y=!1,D){var $=n.unstable_now();R=$;var X=!0;try{e:{k=!1,x&&(x=!1,g(T),T=-1),w=!0;var Z=S;try{t:{for(A($),c=s(u);c!==null&&!(c.expirationTime>$&&B());){var z=c.callback;if(typeof z=="function"){c.callback=null,S=c.priorityLevel;var O=z(c.expirationTime<=$);if($=n.unstable_now(),typeof O=="function"){c.callback=O,A($),X=!0;break t}c===s(u)&&o(u),A($)}else o(u);c=s(u)}if(c!==null)X=!0;else{var j=s(h);j!==null&&K(M,j.startTime-$),X=!1}}break e}finally{c=null,S=Z,w=!1}X=void 0}}finally{X?F():D=!1}}}var F;if(typeof v=="function")F=function(){v(H)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,Y=q.port2;q.port1.onmessage=H,F=function(){Y.postMessage(null)}}else F=function(){_(H,0)};function K($,X){T=_(function(){$(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function($){$.callback=null},n.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<$?Math.floor(1e3/$):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function($){switch(S){case 1:case 2:case 3:var X=3;break;default:X=S}var Z=S;S=X;try{return $()}finally{S=Z}},n.unstable_requestPaint=function(){y=!0},n.unstable_runWithPriority=function($,X){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var Z=S;S=$;try{return X()}finally{S=Z}},n.unstable_scheduleCallback=function($,X,Z){var z=n.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?z+Z:z):Z=z,$){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=Z+O,$={id:d++,callback:X,priorityLevel:$,startTime:Z,expirationTime:O,sortIndex:-1},Z>z?($.sortIndex=Z,r(h,$),s(u)===null&&$===s(h)&&(x?(g(T),T=-1):x=!0,K(M,Z-z))):($.sortIndex=O,r(u,$),k||w||(k=!0,D||(D=!0,F()))),$},n.unstable_shouldYield=B,n.unstable_wrapCallback=function($){var X=S;return function(){var Z=S;S=X;try{return $.apply(this,arguments)}finally{S=Z}}}})(Wu)),Wu}var Qp;function O0(){return Qp||(Qp=1,Ku.exports=L0()),Ku.exports}var Xu={exports:{}},Ut={};/**
|
|
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 Zp;function B0(){if(Zp)return Ut;Zp=1;var n=Rc();function r(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)h+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},m=Symbol.for("react.portal");function b(u,h,d){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:c==null?null:""+c,children:u,containerInfo:h,implementation:d}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ut.createPortal=function(u,h){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return b(u,h,null,d)},Ut.flushSync=function(u){var h=f.T,d=o.p;try{if(f.T=null,o.p=2,u)return u()}finally{f.T=h,o.p=d,o.d.f()}},Ut.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(u,h))},Ut.prefetchDNS=function(u){typeof u=="string"&&o.d.D(u)},Ut.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var d=h.as,c=a(d,h.crossOrigin),S=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?o.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:c,integrity:S,fetchPriority:w}):d==="script"&&o.d.X(u,{crossOrigin:c,integrity:S,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ut.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var d=a(h.as,h.crossOrigin);o.d.M(u,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(u)},Ut.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var d=h.as,c=a(d,h.crossOrigin);o.d.L(u,d,{crossOrigin:c,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ut.preloadModule=function(u,h){if(typeof u=="string")if(h){var d=a(h.as,h.crossOrigin);o.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(u)},Ut.requestFormReset=function(u){o.d.r(u)},Ut.unstable_batchedUpdates=function(u,h){return u(h)},Ut.useFormState=function(u,h,d){return f.H.useFormState(u,h,d)},Ut.useFormStatus=function(){return f.H.useHostTransitionStatus()},Ut.version="19.2.6",Ut}var Jp;function N0(){if(Jp)return Xu.exports;Jp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Xu.exports=B0(),Xu.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 em;function j0(){if(em)return Ps;em=1;var n=O0(),r=Rc(),s=N0();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 m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function b(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 f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function a(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(b(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=b(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,l=t;;){var p=i.return;if(p===null)break;var C=p.alternate;if(C===null){if(l=p.return,l!==null){i=l;continue}break}if(p.child===C.child){for(C=p.child;C;){if(C===i)return u(p),e;if(C===l)return u(p),t;C=C.sibling}throw Error(o(188))}if(i.return!==l.return)i=p,l=C;else{for(var L=!1,P=p.child;P;){if(P===i){L=!0,i=p,l=C;break}if(P===l){L=!0,l=p,i=C;break}P=P.sibling}if(!L){for(P=C.child;P;){if(P===i){L=!0,i=C,l=p;break}if(P===l){L=!0,l=C,i=p;break}P=P.sibling}if(!L)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var c=Object.assign,S=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),v=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var q=Symbol.for("react.client.reference");function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case _:return"Profiler";case y:return"StrictMode";case M:return"Suspense";case D:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case v:return e.displayName||"Context";case g:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case E:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}var K=Array.isArray,$=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},z=[],O=-1;function j(e){return{current:e}}function V(e){0>O||(e.current=z[O],z[O]=null,O--)}function I(e,t){O++,z[O]=e.current,e.current=t}var ie=j(null),ge=j(null),ee=j(null),G=j(null);function U(e,t){switch(I(ee,t),I(ge,e),I(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=mp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(ie),I(ie,e)}function ne(){V(ie),V(ge),V(ee)}function te(e){e.memoizedState!==null&&I(G,e);var t=ie.current,i=mp(t,e.type);t!==i&&(I(ge,e),I(ie,i))}function ve(e){ge.current===e&&(V(ie),V(ge)),G.current===e&&(V(G),js._currentValue=Z)}var Se,Me;function Le(e){if(Se===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||"",Me=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Se+e+Me}var Pe=!1;function Je(e,t){if(!e||Pe)return"";Pe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(ae){var le=ae}Reflect.construct(e,[],me)}else{try{me.call()}catch(ae){le=ae}e.call(me.prototype)}}else{try{throw Error()}catch(ae){le=ae}(me=e())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(ae){if(ae&&le&&typeof ae.stack=="string")return[ae.stack,le.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=l.DetermineComponentFrameRoot(),L=C[0],P=C[1];if(L&&P){var W=L.split(`
|
|
44
|
+
`),se=P.split(`
|
|
45
|
+
`);for(p=l=0;l<W.length&&!W[l].includes("DetermineComponentFrameRoot");)l++;for(;p<se.length&&!se[p].includes("DetermineComponentFrameRoot");)p++;if(l===W.length||p===se.length)for(l=W.length-1,p=se.length-1;1<=l&&0<=p&&W[l]!==se[p];)p--;for(;1<=l&&0<=p;l--,p--)if(W[l]!==se[p]){if(l!==1||p!==1)do if(l--,p--,0>p||W[l]!==se[p]){var he=`
|
|
46
|
+
`+W[l].replace(" at new "," at ");return e.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",e.displayName)),he}while(1<=l&&0<=p);break}}}finally{Pe=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Le(i):""}function de(e,t){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le("Lazy");case 13:return e.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Je(e.type,!1);case 11:return Je(e.type.render,!1);case 1:return Je(e.type,!0);case 31:return Le("Activity");default:return""}}function Ie(e){try{var t="",i=null;do t+=de(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var Re=Object.prototype.hasOwnProperty,ut=n.unstable_scheduleCallback,ce=n.unstable_cancelCallback,zt=n.unstable_shouldYield,Ye=n.unstable_requestPaint,pt=n.unstable_now,Ht=n.unstable_getCurrentPriorityLevel,ue=n.unstable_ImmediatePriority,_e=n.unstable_UserBlockingPriority,xe=n.unstable_NormalPriority,Oe=n.unstable_LowPriority,Ne=n.unstable_IdlePriority,vt=n.log,Ue=n.unstable_setDisableYieldValue,At=null,yt=null;function It(e){if(typeof vt=="function"&&Ue(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(At,e)}catch{}}var et=Math.clz32?Math.clz32:nr,Tn=Math.log,Mt=Math.LN2;function nr(e){return e>>>=0,e===0?32:31-(Tn(e)/Mt|0)|0}var Nn=256,ti=262144,ir=4194304;function Cn(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 ct(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var p=0,C=e.suspendedLanes,L=e.pingedLanes;e=e.warmLanes;var P=l&134217727;return P!==0?(l=P&~C,l!==0?p=Cn(l):(L&=P,L!==0?p=Cn(L):i||(i=P&~e,i!==0&&(p=Cn(i))))):(P=l&~C,P!==0?p=Cn(P):L!==0?p=Cn(L):i||(i=l&~e,i!==0&&(p=Cn(i)))),p===0?0:t!==0&&t!==p&&(t&C)===0&&(C=p&-p,i=t&-t,C>=i||C===32&&(i&4194048)!==0)?t:p}function Li(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function La(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 nl(){var e=ir;return ir<<=1,(ir&62914560)===0&&(ir=4194304),e}function Xr(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function oe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ee(e,t,i,l,p,C){var L=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 P=e.entanglements,W=e.expirationTimes,se=e.hiddenUpdates;for(i=L&~i;0<i;){var he=31-et(i),me=1<<he;P[he]=0,W[he]=-1;var le=se[he];if(le!==null)for(se[he]=null,he=0;he<le.length;he++){var ae=le[he];ae!==null&&(ae.lane&=-536870913)}i&=~me}l!==0&&mt(e,l,0),C!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=C&~(L&~t))}function mt(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-et(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function wn(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-et(i),p=1<<l;p&t|e[l]&t&&(e[l]|=t),i&=~p}}function Qc(e,t){var i=t&-t;return i=(i&42)!==0?1:Oa(i),(i&(e.suspendedLanes|t))!==0?0:i}function Oa(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 Ba(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zc(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Hp(e.type))}function Jc(e,t){var i=X.p;try{return X.p=e,t()}finally{X.p=i}}var ni=Math.random().toString(36).slice(2),Lt="__reactFiber$"+ni,$t="__reactProps$"+ni,rr="__reactContainer$"+ni,Na="__reactEvents$"+ni,g_="__reactListeners$"+ni,__="__reactHandles$"+ni,eh="__reactResources$"+ni,Qr="__reactMarker$"+ni;function ja(e){delete e[Lt],delete e[$t],delete e[Na],delete e[g_],delete e[__]}function sr(e){var t=e[Lt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[rr]||i[Lt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Cp(e);e!==null;){if(i=e[Lt])return i;e=Cp(e)}return t}e=i,i=e.parentNode}return null}function lr(e){if(e=e[Lt]||e[rr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Zr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ar(e){var t=e[eh];return t||(t=e[eh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Dt(e){e[Qr]=!0}var th=new Set,nh={};function Oi(e,t){or(e,t),or(e+"Capture",t)}function or(e,t){for(nh[e]=t,e=0;e<t.length;e++)th.add(t[e])}var v_=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]*$"),ih={},rh={};function y_(e){return Re.call(rh,e)?!0:Re.call(ih,e)?!1:v_.test(e)?rh[e]=!0:(ih[e]=!0,!1)}function il(e,t,i){if(y_(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function rl(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 jn(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function S_(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,C=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return p.call(this)},set:function(L){i=""+L,C.call(this,L)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(L){i=""+L},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function za(e){if(!e._valueTracker){var t=sh(e)?"checked":"value";e._valueTracker=S_(e,t,""+e[t])}}function lh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=sh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function sl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var b_=/[\n"\\]/g;function fn(e){return e.replace(b_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ha(e,t,i,l,p,C,L,P){e.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?e.type=L:e.removeAttribute("type"),t!=null?L==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hn(t)):e.value!==""+hn(t)&&(e.value=""+hn(t)):L!=="submit"&&L!=="reset"||e.removeAttribute("value"),t!=null?Ia(e,L,hn(t)):i!=null?Ia(e,L,hn(i)):l!=null&&e.removeAttribute("value"),p==null&&C!=null&&(e.defaultChecked=!!C),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?e.name=""+hn(P):e.removeAttribute("name")}function ah(e,t,i,l,p,C,L,P){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(e.type=C),t!=null||i!=null){if(!(C!=="submit"&&C!=="reset"||t!=null)){za(e);return}i=i!=null?""+hn(i):"",t=t!=null?""+hn(t):i,P||t===e.value||(e.value=t),e.defaultValue=t}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=P?e.checked:!!l,e.defaultChecked=!!l,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(e.name=L),za(e)}function Ia(e,t,i){t==="number"&&sl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ur(e,t,i,l){if(e=e.options,t){t={};for(var p=0;p<i.length;p++)t["$"+i[p]]=!0;for(i=0;i<e.length;i++)p=t.hasOwnProperty("$"+e[i].value),e[i].selected!==p&&(e[i].selected=p),p&&l&&(e[i].defaultSelected=!0)}else{for(i=""+hn(i),t=null,p=0;p<e.length;p++){if(e[p].value===i){e[p].selected=!0,l&&(e[p].defaultSelected=!0);return}t!==null||e[p].disabled||(t=e[p])}t!==null&&(t.selected=!0)}}function oh(e,t,i){if(t!=null&&(t=""+hn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+hn(i):""}function uh(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(o(92));if(K(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=hn(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),za(e)}function cr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var C_=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 ch(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||C_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function hh(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var p in t)l=t[p],t.hasOwnProperty(p)&&i[p]!==l&&ch(e,p,l)}else for(var C in t)t.hasOwnProperty(C)&&ch(e,C,t[C])}function Ua(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 w_=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"]]),x_=/^[\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 ll(e){return x_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function zn(){}var Pa=null;function Fa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hr=null,fr=null;function fh(e){var t=lr(e);if(t&&(e=t.stateNode)){var i=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ha(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="'+fn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var p=l[$t]||null;if(!p)throw Error(o(90));Ha(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&lh(l)}break e;case"textarea":oh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ur(e,!!i.multiple,t,!1)}}}var qa=!1;function dh(e,t,i){if(qa)return e(t,i);qa=!0;try{var l=e(t);return l}finally{if(qa=!1,(hr!==null||fr!==null)&&(Yl(),hr&&(t=hr,e=fr,fr=hr=null,fh(t),e)))for(t=0;t<e.length;t++)fh(e[t])}}function Jr(e,t){var i=e.stateNode;if(i===null)return null;var l=i[$t]||null;if(l===null)return null;i=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Va=!1;if(Hn)try{var es={};Object.defineProperty(es,"passive",{get:function(){Va=!0}}),window.addEventListener("test",es,es),window.removeEventListener("test",es,es)}catch{Va=!1}var ii=null,Ga=null,al=null;function ph(){if(al)return al;var e,t=Ga,i=t.length,l,p="value"in ii?ii.value:ii.textContent,C=p.length;for(e=0;e<i&&t[e]===p[e];e++);var L=i-e;for(l=1;l<=L&&t[i-l]===p[C-l];l++);return al=p.slice(e,1<l?1-l:void 0)}function ol(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 ul(){return!0}function mh(){return!1}function Yt(e){function t(i,l,p,C,L){this._reactName=i,this._targetInst=p,this.type=l,this.nativeEvent=C,this.target=L,this.currentTarget=null;for(var P in e)e.hasOwnProperty(P)&&(i=e[P],this[P]=i?i(C):C[P]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?ul:mh,this.isPropagationStopped=mh,this}return c(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=ul)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ul)},persist:function(){},isPersistent:ul}),t}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=Yt(Bi),ts=c({},Bi,{view:0,detail:0}),E_=Yt(ts),$a,Ya,ns,hl=c({},ts,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wa,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!==ns&&(ns&&e.type==="mousemove"?($a=e.screenX-ns.screenX,Ya=e.screenY-ns.screenY):Ya=$a=0,ns=e),$a)},movementY:function(e){return"movementY"in e?e.movementY:Ya}}),gh=Yt(hl),k_=c({},hl,{dataTransfer:0}),A_=Yt(k_),T_=c({},ts,{relatedTarget:0}),Ka=Yt(T_),D_=c({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),R_=Yt(D_),M_=c({},Bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),L_=Yt(M_),O_=c({},Bi,{data:0}),_h=Yt(O_),B_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N_={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"},j_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function z_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=j_[e])?!!t[e]:!1}function Wa(){return z_}var H_=c({},ts,{key:function(e){if(e.key){var t=B_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?N_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wa,charCode:function(e){return e.type==="keypress"?ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),I_=Yt(H_),U_=c({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vh=Yt(U_),P_=c({},ts,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wa}),F_=Yt(P_),q_=c({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),V_=Yt(q_),G_=c({},hl,{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}),$_=Yt(G_),Y_=c({},Bi,{newState:0,oldState:0}),K_=Yt(Y_),W_=[9,13,27,32],Xa=Hn&&"CompositionEvent"in window,is=null;Hn&&"documentMode"in document&&(is=document.documentMode);var X_=Hn&&"TextEvent"in window&&!is,yh=Hn&&(!Xa||is&&8<is&&11>=is),Sh=" ",bh=!1;function Ch(e,t){switch(e){case"keyup":return W_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dr=!1;function Q_(e,t){switch(e){case"compositionend":return wh(t);case"keypress":return t.which!==32?null:(bh=!0,Sh);case"textInput":return e=t.data,e===Sh&&bh?null:e;default:return null}}function Z_(e,t){if(dr)return e==="compositionend"||!Xa&&Ch(e,t)?(e=ph(),al=Ga=ii=null,dr=!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 yh&&t.locale!=="ko"?null:t.data;default:return null}}var J_={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 xh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!J_[e.type]:t==="textarea"}function Eh(e,t,i,l){hr?fr?fr.push(l):fr=[l]:hr=l,t=ea(t,"onChange"),0<t.length&&(i=new cl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var rs=null,ss=null;function ev(e){op(e,0)}function fl(e){var t=Zr(e);if(lh(t))return e}function kh(e,t){if(e==="change")return t}var Ah=!1;if(Hn){var Qa;if(Hn){var Za="oninput"in document;if(!Za){var Th=document.createElement("div");Th.setAttribute("oninput","return;"),Za=typeof Th.oninput=="function"}Qa=Za}else Qa=!1;Ah=Qa&&(!document.documentMode||9<document.documentMode)}function Dh(){rs&&(rs.detachEvent("onpropertychange",Rh),ss=rs=null)}function Rh(e){if(e.propertyName==="value"&&fl(ss)){var t=[];Eh(t,ss,e,Fa(e)),dh(ev,t)}}function tv(e,t,i){e==="focusin"?(Dh(),rs=t,ss=i,rs.attachEvent("onpropertychange",Rh)):e==="focusout"&&Dh()}function nv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fl(ss)}function iv(e,t){if(e==="click")return fl(t)}function rv(e,t){if(e==="input"||e==="change")return fl(t)}function sv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tn=typeof Object.is=="function"?Object.is:sv;function ls(e,t){if(tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var p=i[l];if(!Re.call(t,p)||!tn(e[p],t[p]))return!1}return!0}function Mh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lh(e,t){var i=Mh(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Mh(i)}}function Oh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Oh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=sl(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=sl(e.document)}return t}function Ja(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 lv=Hn&&"documentMode"in document&&11>=document.documentMode,pr=null,eo=null,as=null,to=!1;function Nh(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;to||pr==null||pr!==sl(l)||(l=pr,"selectionStart"in l&&Ja(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),as&&ls(as,l)||(as=l,l=ea(eo,"onSelect"),0<l.length&&(t=new cl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=pr)))}function Ni(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var mr={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},no={},jh={};Hn&&(jh=document.createElement("div").style,"AnimationEvent"in window||(delete mr.animationend.animation,delete mr.animationiteration.animation,delete mr.animationstart.animation),"TransitionEvent"in window||delete mr.transitionend.transition);function ji(e){if(no[e])return no[e];if(!mr[e])return e;var t=mr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in jh)return no[e]=t[i];return e}var zh=ji("animationend"),Hh=ji("animationiteration"),Ih=ji("animationstart"),av=ji("transitionrun"),ov=ji("transitionstart"),uv=ji("transitioncancel"),Uh=ji("transitionend"),Ph=new Map,io="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(" ");io.push("scrollEnd");function xn(e,t){Ph.set(e,t),Oi(t,[e])}var dl=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)},dn=[],gr=0,ro=0;function pl(){for(var e=gr,t=ro=gr=0;t<e;){var i=dn[t];dn[t++]=null;var l=dn[t];dn[t++]=null;var p=dn[t];dn[t++]=null;var C=dn[t];if(dn[t++]=null,l!==null&&p!==null){var L=l.pending;L===null?p.next=p:(p.next=L.next,L.next=p),l.pending=p}C!==0&&Fh(i,p,C)}}function ml(e,t,i,l){dn[gr++]=e,dn[gr++]=t,dn[gr++]=i,dn[gr++]=l,ro|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function so(e,t,i,l){return ml(e,t,i,l),gl(e)}function zi(e,t){return ml(e,null,null,t),gl(e)}function Fh(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var p=!1,C=e.return;C!==null;)C.childLanes|=i,l=C.alternate,l!==null&&(l.childLanes|=i),C.tag===22&&(e=C.stateNode,e===null||e._visibility&1||(p=!0)),e=C,C=C.return;return e.tag===3?(C=e.stateNode,p&&t!==null&&(p=31-et(i),e=C.hiddenUpdates,l=e[p],l===null?e[p]=[t]:l.push(t),t.lane=i|536870912),C):null}function gl(e){if(50<Ds)throw Ds=0,mu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _r={};function cv(e,t,i,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,i,l){return new cv(e,t,i,l)}function lo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var i=e.alternate;return i===null?(i=nn(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 qh(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 _l(e,t,i,l,p,C){var L=0;if(l=e,typeof e=="function")lo(e)&&(L=1);else if(typeof e=="string")L=m0(e,i,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=nn(31,i,t,p),e.elementType=R,e.lanes=C,e;case x:return Hi(i.children,p,C,t);case y:L=8,p|=24;break;case _:return e=nn(12,i,t,p|2),e.elementType=_,e.lanes=C,e;case M:return e=nn(13,i,t,p),e.elementType=M,e.lanes=C,e;case D:return e=nn(19,i,t,p),e.elementType=D,e.lanes=C,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case v:L=10;break e;case g:L=9;break e;case A:L=11;break e;case T:L=14;break e;case E:L=16,l=null;break e}L=29,i=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=nn(L,i,t,p),t.elementType=e,t.type=l,t.lanes=C,t}function Hi(e,t,i,l){return e=nn(7,e,l,t),e.lanes=i,e}function ao(e,t,i){return e=nn(6,e,null,t),e.lanes=i,e}function Vh(e){var t=nn(18,null,null,0);return t.stateNode=e,t}function oo(e,t,i){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gh=new WeakMap;function pn(e,t){if(typeof e=="object"&&e!==null){var i=Gh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Ie(t)},Gh.set(e,t),t)}return{value:e,source:t,stack:Ie(t)}}var vr=[],yr=0,vl=null,os=0,mn=[],gn=0,ri=null,Dn=1,Rn="";function Un(e,t){vr[yr++]=os,vr[yr++]=vl,vl=e,os=t}function $h(e,t,i){mn[gn++]=Dn,mn[gn++]=Rn,mn[gn++]=ri,ri=e;var l=Dn;e=Rn;var p=32-et(l)-1;l&=~(1<<p),i+=1;var C=32-et(t)+p;if(30<C){var L=p-p%5;C=(l&(1<<L)-1).toString(32),l>>=L,p-=L,Dn=1<<32-et(t)+p|i<<p|l,Rn=C+e}else Dn=1<<C|i<<p|l,Rn=e}function uo(e){e.return!==null&&(Un(e,1),$h(e,1,0))}function co(e){for(;e===vl;)vl=vr[--yr],vr[yr]=null,os=vr[--yr],vr[yr]=null;for(;e===ri;)ri=mn[--gn],mn[gn]=null,Rn=mn[--gn],mn[gn]=null,Dn=mn[--gn],mn[gn]=null}function Yh(e,t){mn[gn++]=Dn,mn[gn++]=Rn,mn[gn++]=ri,Dn=t.id,Rn=t.overflow,ri=e}var Ot=null,ht=null,Ke=!1,si=null,_n=!1,ho=Error(o(519));function li(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw us(pn(t,e)),ho}function Kh(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[Lt]=e,t[$t]=l,i){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(i=0;i<Ms.length;i++)qe(Ms[i],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),ah(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),uh(t,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||fp(t.textContent,i)?(l.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),l.onScroll!=null&&qe("scroll",t),l.onScrollEnd!=null&&qe("scrollend",t),l.onClick!=null&&(t.onclick=zn),t=!0):t=!1,t||li(e,!0)}function Wh(e){for(Ot=e.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Ot=Ot.return}}function Sr(e){if(e!==Ot)return!1;if(!Ke)return Wh(e),Ke=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Ru(e.type,e.memoizedProps)),i=!i),i&&ht&&li(e),Wh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=bp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=bp(e)}else t===27?(t=ht,Si(e.type)?(e=Nu,Nu=null,ht=e):ht=t):ht=Ot?yn(e.stateNode.nextSibling):null;return!0}function Ii(){ht=Ot=null,Ke=!1}function fo(){var e=si;return e!==null&&(Qt===null?Qt=e:Qt.push.apply(Qt,e),si=null),e}function us(e){si===null?si=[e]:si.push(e)}var po=j(null),Ui=null,Pn=null;function ai(e,t,i){I(po,t._currentValue),t._currentValue=i}function Fn(e){e._currentValue=po.current,V(po)}function mo(e,t,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===i)break;e=e.return}}function go(e,t,i,l){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var C=p.dependencies;if(C!==null){var L=p.child;C=C.firstContext;e:for(;C!==null;){var P=C;C=p;for(var W=0;W<t.length;W++)if(P.context===t[W]){C.lanes|=i,P=C.alternate,P!==null&&(P.lanes|=i),mo(C.return,i,e),l||(L=null);break e}C=P.next}}else if(p.tag===18){if(L=p.return,L===null)throw Error(o(341));L.lanes|=i,C=L.alternate,C!==null&&(C.lanes|=i),mo(L,i,e),L=null}else L=p.child;if(L!==null)L.return=p;else for(L=p;L!==null;){if(L===e){L=null;break}if(p=L.sibling,p!==null){p.return=L.return,L=p;break}L=L.return}p=L}}function br(e,t,i,l){e=null;for(var p=t,C=!1;p!==null;){if(!C){if((p.flags&524288)!==0)C=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var L=p.alternate;if(L===null)throw Error(o(387));if(L=L.memoizedProps,L!==null){var P=p.type;tn(p.pendingProps.value,L.value)||(e!==null?e.push(P):e=[P])}}else if(p===G.current){if(L=p.alternate,L===null)throw Error(o(387));L.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(js):e=[js])}p=p.return}e!==null&&go(t,e,i,l),t.flags|=262144}function yl(e){for(e=e.firstContext;e!==null;){if(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pi(e){Ui=e,Pn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Bt(e){return Xh(Ui,e)}function Sl(e,t){return Ui===null&&Pi(e),Xh(e,t)}function Xh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Pn===null){if(e===null)throw Error(o(308));Pn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pn=Pn.next=t;return i}var hv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},fv=n.unstable_scheduleCallback,dv=n.unstable_NormalPriority,Ct={$$typeof:v,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _o(){return{controller:new hv,data:new Map,refCount:0}}function cs(e){e.refCount--,e.refCount===0&&fv(dv,function(){e.controller.abort()})}var hs=null,vo=0,Cr=0,wr=null;function pv(e,t){if(hs===null){var i=hs=[];vo=0,Cr=bu(),wr={status:"pending",value:void 0,then:function(l){i.push(l)}}}return vo++,t.then(Qh,Qh),t}function Qh(){if(--vo===0&&hs!==null){wr!==null&&(wr.status="fulfilled");var e=hs;hs=null,Cr=0,wr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function mv(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var p=0;p<i.length;p++)(0,i[p])(t)},function(p){for(l.status="rejected",l.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),l}var Zh=$.S;$.S=function(e,t){jd=pt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&pv(e,t),Zh!==null&&Zh(e,t)};var Fi=j(null);function yo(){var e=Fi.current;return e!==null?e:lt.pooledCache}function bl(e,t){t===null?I(Fi,Fi.current):I(Fi,t.pool)}function Jh(){var e=yo();return e===null?null:{parent:Ct._currentValue,pool:e}}var xr=Error(o(460)),So=Error(o(474)),Cl=Error(o(542)),wl={then:function(){}};function ef(e){return e=e.status,e==="fulfilled"||e==="rejected"}function tf(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(zn,zn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rf(e),e;default:if(typeof t.status=="string")t.then(zn,zn);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var p=t;p.status="fulfilled",p.value=l}},function(l){if(t.status==="pending"){var p=t;p.status="rejected",p.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rf(e),e}throw Vi=t,xr}}function qi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Vi=i,xr):i}}var Vi=null;function nf(){if(Vi===null)throw Error(o(459));var e=Vi;return Vi=null,e}function rf(e){if(e===xr||e===Cl)throw Error(o(483))}var Er=null,fs=0;function xl(e){var t=fs;return fs+=1,Er===null&&(Er=[]),tf(Er,e,t)}function ds(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function El(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function sf(e){function t(J,Q){if(e){var re=J.deletions;re===null?(J.deletions=[Q],J.flags|=16):re.push(Q)}}function i(J,Q){if(!e)return null;for(;Q!==null;)t(J,Q),Q=Q.sibling;return null}function l(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function p(J,Q){return J=In(J,Q),J.index=0,J.sibling=null,J}function C(J,Q,re){return J.index=re,e?(re=J.alternate,re!==null?(re=re.index,re<Q?(J.flags|=67108866,Q):re):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function L(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function P(J,Q,re,pe){return Q===null||Q.tag!==6?(Q=ao(re,J.mode,pe),Q.return=J,Q):(Q=p(Q,re),Q.return=J,Q)}function W(J,Q,re,pe){var ke=re.type;return ke===x?he(J,Q,re.props.children,pe,re.key):Q!==null&&(Q.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===E&&qi(ke)===Q.type)?(Q=p(Q,re.props),ds(Q,re),Q.return=J,Q):(Q=_l(re.type,re.key,re.props,null,J.mode,pe),ds(Q,re),Q.return=J,Q)}function se(J,Q,re,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==re.containerInfo||Q.stateNode.implementation!==re.implementation?(Q=oo(re,J.mode,pe),Q.return=J,Q):(Q=p(Q,re.children||[]),Q.return=J,Q)}function he(J,Q,re,pe,ke){return Q===null||Q.tag!==7?(Q=Hi(re,J.mode,pe,ke),Q.return=J,Q):(Q=p(Q,re),Q.return=J,Q)}function me(J,Q,re){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=ao(""+Q,J.mode,re),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case w:return re=_l(Q.type,Q.key,Q.props,null,J.mode,re),ds(re,Q),re.return=J,re;case k:return Q=oo(Q,J.mode,re),Q.return=J,Q;case E:return Q=qi(Q),me(J,Q,re)}if(K(Q)||F(Q))return Q=Hi(Q,J.mode,re,null),Q.return=J,Q;if(typeof Q.then=="function")return me(J,xl(Q),re);if(Q.$$typeof===v)return me(J,Sl(J,Q),re);El(J,Q)}return null}function le(J,Q,re,pe){var ke=Q!==null?Q.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return ke!==null?null:P(J,Q,""+re,pe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case w:return re.key===ke?W(J,Q,re,pe):null;case k:return re.key===ke?se(J,Q,re,pe):null;case E:return re=qi(re),le(J,Q,re,pe)}if(K(re)||F(re))return ke!==null?null:he(J,Q,re,pe,null);if(typeof re.then=="function")return le(J,Q,xl(re),pe);if(re.$$typeof===v)return le(J,Q,Sl(J,re),pe);El(J,re)}return null}function ae(J,Q,re,pe,ke){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(re)||null,P(Q,J,""+pe,ke);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case w:return J=J.get(pe.key===null?re:pe.key)||null,W(Q,J,pe,ke);case k:return J=J.get(pe.key===null?re:pe.key)||null,se(Q,J,pe,ke);case E:return pe=qi(pe),ae(J,Q,re,pe,ke)}if(K(pe)||F(pe))return J=J.get(re)||null,he(Q,J,pe,ke,null);if(typeof pe.then=="function")return ae(J,Q,re,xl(pe),ke);if(pe.$$typeof===v)return ae(J,Q,re,Sl(Q,pe),ke);El(Q,pe)}return null}function Ce(J,Q,re,pe){for(var ke=null,Xe=null,we=Q,ze=Q=0,$e=null;we!==null&&ze<re.length;ze++){we.index>ze?($e=we,we=null):$e=we.sibling;var Qe=le(J,we,re[ze],pe);if(Qe===null){we===null&&(we=$e);break}e&&we&&Qe.alternate===null&&t(J,we),Q=C(Qe,Q,ze),Xe===null?ke=Qe:Xe.sibling=Qe,Xe=Qe,we=$e}if(ze===re.length)return i(J,we),Ke&&Un(J,ze),ke;if(we===null){for(;ze<re.length;ze++)we=me(J,re[ze],pe),we!==null&&(Q=C(we,Q,ze),Xe===null?ke=we:Xe.sibling=we,Xe=we);return Ke&&Un(J,ze),ke}for(we=l(we);ze<re.length;ze++)$e=ae(we,J,ze,re[ze],pe),$e!==null&&(e&&$e.alternate!==null&&we.delete($e.key===null?ze:$e.key),Q=C($e,Q,ze),Xe===null?ke=$e:Xe.sibling=$e,Xe=$e);return e&&we.forEach(function(Ei){return t(J,Ei)}),Ke&&Un(J,ze),ke}function Te(J,Q,re,pe){if(re==null)throw Error(o(151));for(var ke=null,Xe=null,we=Q,ze=Q=0,$e=null,Qe=re.next();we!==null&&!Qe.done;ze++,Qe=re.next()){we.index>ze?($e=we,we=null):$e=we.sibling;var Ei=le(J,we,Qe.value,pe);if(Ei===null){we===null&&(we=$e);break}e&&we&&Ei.alternate===null&&t(J,we),Q=C(Ei,Q,ze),Xe===null?ke=Ei:Xe.sibling=Ei,Xe=Ei,we=$e}if(Qe.done)return i(J,we),Ke&&Un(J,ze),ke;if(we===null){for(;!Qe.done;ze++,Qe=re.next())Qe=me(J,Qe.value,pe),Qe!==null&&(Q=C(Qe,Q,ze),Xe===null?ke=Qe:Xe.sibling=Qe,Xe=Qe);return Ke&&Un(J,ze),ke}for(we=l(we);!Qe.done;ze++,Qe=re.next())Qe=ae(we,J,ze,Qe.value,pe),Qe!==null&&(e&&Qe.alternate!==null&&we.delete(Qe.key===null?ze:Qe.key),Q=C(Qe,Q,ze),Xe===null?ke=Qe:Xe.sibling=Qe,Xe=Qe);return e&&we.forEach(function(k0){return t(J,k0)}),Ke&&Un(J,ze),ke}function st(J,Q,re,pe){if(typeof re=="object"&&re!==null&&re.type===x&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case w:e:{for(var ke=re.key;Q!==null;){if(Q.key===ke){if(ke=re.type,ke===x){if(Q.tag===7){i(J,Q.sibling),pe=p(Q,re.props.children),pe.return=J,J=pe;break e}}else if(Q.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===E&&qi(ke)===Q.type){i(J,Q.sibling),pe=p(Q,re.props),ds(pe,re),pe.return=J,J=pe;break e}i(J,Q);break}else t(J,Q);Q=Q.sibling}re.type===x?(pe=Hi(re.props.children,J.mode,pe,re.key),pe.return=J,J=pe):(pe=_l(re.type,re.key,re.props,null,J.mode,pe),ds(pe,re),pe.return=J,J=pe)}return L(J);case k:e:{for(ke=re.key;Q!==null;){if(Q.key===ke)if(Q.tag===4&&Q.stateNode.containerInfo===re.containerInfo&&Q.stateNode.implementation===re.implementation){i(J,Q.sibling),pe=p(Q,re.children||[]),pe.return=J,J=pe;break e}else{i(J,Q);break}else t(J,Q);Q=Q.sibling}pe=oo(re,J.mode,pe),pe.return=J,J=pe}return L(J);case E:return re=qi(re),st(J,Q,re,pe)}if(K(re))return Ce(J,Q,re,pe);if(F(re)){if(ke=F(re),typeof ke!="function")throw Error(o(150));return re=ke.call(re),Te(J,Q,re,pe)}if(typeof re.then=="function")return st(J,Q,xl(re),pe);if(re.$$typeof===v)return st(J,Q,Sl(J,re),pe);El(J,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,Q!==null&&Q.tag===6?(i(J,Q.sibling),pe=p(Q,re),pe.return=J,J=pe):(i(J,Q),pe=ao(re,J.mode,pe),pe.return=J,J=pe),L(J)):i(J,Q)}return function(J,Q,re,pe){try{fs=0;var ke=st(J,Q,re,pe);return Er=null,ke}catch(we){if(we===xr||we===Cl)throw we;var Xe=nn(29,we,null,J.mode);return Xe.lanes=pe,Xe.return=J,Xe}finally{}}}var Gi=sf(!0),lf=sf(!1),oi=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Co(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 ui(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ci(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var p=l.pending;return p===null?t.next=t:(t.next=p.next,p.next=t),l.pending=t,t=gl(e),Fh(e,null,i),t}return ml(e,l,t,i),gl(e)}function ps(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,wn(e,i)}}function wo(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var p=null,C=null;if(i=i.firstBaseUpdate,i!==null){do{var L={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};C===null?p=C=L:C=C.next=L,i=i.next}while(i!==null);C===null?p=C=t:C=C.next=t}else p=C=t;i={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:C,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var xo=!1;function ms(){if(xo){var e=wr;if(e!==null)throw e}}function gs(e,t,i,l){xo=!1;var p=e.updateQueue;oi=!1;var C=p.firstBaseUpdate,L=p.lastBaseUpdate,P=p.shared.pending;if(P!==null){p.shared.pending=null;var W=P,se=W.next;W.next=null,L===null?C=se:L.next=se,L=W;var he=e.alternate;he!==null&&(he=he.updateQueue,P=he.lastBaseUpdate,P!==L&&(P===null?he.firstBaseUpdate=se:P.next=se,he.lastBaseUpdate=W))}if(C!==null){var me=p.baseState;L=0,he=se=W=null,P=C;do{var le=P.lane&-536870913,ae=le!==P.lane;if(ae?(Ge&le)===le:(l&le)===le){le!==0&&le===Cr&&(xo=!0),he!==null&&(he=he.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ce=e,Te=P;le=t;var st=i;switch(Te.tag){case 1:if(Ce=Te.payload,typeof Ce=="function"){me=Ce.call(st,me,le);break e}me=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Te.payload,le=typeof Ce=="function"?Ce.call(st,me,le):Ce,le==null)break e;me=c({},me,le);break e;case 2:oi=!0}}le=P.callback,le!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=p.callbacks,ae===null?p.callbacks=[le]:ae.push(le))}else ae={lane:le,tag:P.tag,payload:P.payload,callback:P.callback,next:null},he===null?(se=he=ae,W=me):he=he.next=ae,L|=le;if(P=P.next,P===null){if(P=p.shared.pending,P===null)break;ae=P,P=ae.next,ae.next=null,p.lastBaseUpdate=ae,p.shared.pending=null}}while(!0);he===null&&(W=me),p.baseState=W,p.firstBaseUpdate=se,p.lastBaseUpdate=he,C===null&&(p.shared.lanes=0),mi|=L,e.lanes=L,e.memoizedState=me}}function af(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function of(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)af(i[e],t)}var kr=j(null),kl=j(0);function uf(e,t){e=Qn,I(kl,e),I(kr,t),Qn=e|t.baseLanes}function Eo(){I(kl,Qn),I(kr,kr.current)}function ko(){Qn=kl.current,V(kr),V(kl)}var rn=j(null),vn=null;function hi(e){var t=e.alternate;I(St,St.current&1),I(rn,e),vn===null&&(t===null||kr.current!==null||t.memoizedState!==null)&&(vn=e)}function Ao(e){I(St,St.current),I(rn,e),vn===null&&(vn=e)}function cf(e){e.tag===22?(I(St,St.current),I(rn,e),vn===null&&(vn=e)):fi()}function fi(){I(St,St.current),I(rn,rn.current)}function sn(e){V(rn),vn===e&&(vn=null),V(St)}var St=j(0);function Al(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Ou(i)||Bu(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 qn=0,je=null,it=null,wt=null,Tl=!1,Ar=!1,$i=!1,Dl=0,_s=0,Tr=null,gv=0;function gt(){throw Error(o(321))}function To(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!tn(e[i],t[i]))return!1;return!0}function Do(e,t,i,l,p,C){return qn=C,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?Yf:Vo,$i=!1,C=i(l,p),$i=!1,Ar&&(C=ff(t,i,l,p)),hf(e),C}function hf(e){$.H=Ss;var t=it!==null&&it.next!==null;if(qn=0,wt=it=je=null,Tl=!1,_s=0,Tr=null,t)throw Error(o(300));e===null||xt||(e=e.dependencies,e!==null&&yl(e)&&(xt=!0))}function ff(e,t,i,l){je=e;var p=0;do{if(Ar&&(Tr=null),_s=0,Ar=!1,25<=p)throw Error(o(301));if(p+=1,wt=it=null,e.updateQueue!=null){var C=e.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}$.H=Kf,C=t(i,l)}while(Ar);return C}function _v(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?vs(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(je.flags|=1024),t}function Ro(){var e=Dl!==0;return Dl=0,e}function Mo(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Lo(e){if(Tl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Tl=!1}qn=0,wt=it=je=null,Ar=!1,_s=Dl=0,Tr=null}function Vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?je.memoizedState=wt=e:wt=wt.next=e,wt}function bt(){if(it===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=wt===null?je.memoizedState:wt.next;if(t!==null)wt=t,it=e;else{if(e===null)throw je.alternate===null?Error(o(467)):Error(o(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},wt===null?je.memoizedState=wt=e:wt=wt.next=e}return wt}function Rl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vs(e){var t=_s;return _s+=1,Tr===null&&(Tr=[]),e=tf(Tr,e,t),t=je,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?Yf:Vo),e}function Ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return vs(e);if(e.$$typeof===v)return Bt(e)}throw Error(o(438,String(e)))}function Oo(e){var t=null,i=je.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=je.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(p){return p.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Rl(),je.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=B;return t.index++,i}function Vn(e,t){return typeof t=="function"?t(e):t}function Ll(e){var t=bt();return Bo(t,it,e)}function Bo(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var p=e.baseQueue,C=l.pending;if(C!==null){if(p!==null){var L=p.next;p.next=C.next,C.next=L}t.baseQueue=p=C,l.pending=null}if(C=e.baseState,p===null)e.memoizedState=C;else{t=p.next;var P=L=null,W=null,se=t,he=!1;do{var me=se.lane&-536870913;if(me!==se.lane?(Ge&me)===me:(qn&me)===me){var le=se.revertLane;if(le===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),me===Cr&&(he=!0);else if((qn&le)===le){se=se.next,le===Cr&&(he=!0);continue}else me={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},W===null?(P=W=me,L=C):W=W.next=me,je.lanes|=le,mi|=le;me=se.action,$i&&i(C,me),C=se.hasEagerState?se.eagerState:i(C,me)}else le={lane:me,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},W===null?(P=W=le,L=C):W=W.next=le,je.lanes|=me,mi|=me;se=se.next}while(se!==null&&se!==t);if(W===null?L=C:W.next=P,!tn(C,e.memoizedState)&&(xt=!0,he&&(i=wr,i!==null)))throw i;e.memoizedState=C,e.baseState=L,e.baseQueue=W,l.lastRenderedState=C}return p===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function No(e){var t=bt(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,p=i.pending,C=t.memoizedState;if(p!==null){i.pending=null;var L=p=p.next;do C=e(C,L.action),L=L.next;while(L!==p);tn(C,t.memoizedState)||(xt=!0),t.memoizedState=C,t.baseQueue===null&&(t.baseState=C),i.lastRenderedState=C}return[C,l]}function df(e,t,i){var l=je,p=bt(),C=Ke;if(C){if(i===void 0)throw Error(o(407));i=i()}else i=t();var L=!tn((it||p).memoizedState,i);if(L&&(p.memoizedState=i,xt=!0),p=p.queue,Ho(gf.bind(null,l,p,e),[e]),p.getSnapshot!==t||L||wt!==null&&wt.memoizedState.tag&1){if(l.flags|=2048,Dr(9,{destroy:void 0},mf.bind(null,l,p,i,t),null),lt===null)throw Error(o(349));C||(qn&127)!==0||pf(l,t,i)}return i}function pf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=je.updateQueue,t===null?(t=Rl(),je.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function mf(e,t,i,l){t.value=i,t.getSnapshot=l,_f(t)&&vf(e)}function gf(e,t,i){return i(function(){_f(t)&&vf(e)})}function _f(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!tn(e,i)}catch{return!0}}function vf(e){var t=zi(e,2);t!==null&&Zt(t,e,2)}function jo(e){var t=Vt();if(typeof e=="function"){var i=e;if(e=i(),$i){It(!0);try{i()}finally{It(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:e},t}function yf(e,t,i,l){return e.baseState=i,Bo(e,it,typeof l=="function"?l:Vn)}function vv(e,t,i,l,p){if(Nl(e))throw Error(o(485));if(e=t.action,e!==null){var C={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){C.listeners.push(L)}};$.T!==null?i(!0):C.isTransition=!1,l(C),i=t.pending,i===null?(C.next=t.pending=C,Sf(t,C)):(C.next=i.next,t.pending=i.next=C)}}function Sf(e,t){var i=t.action,l=t.payload,p=e.state;if(t.isTransition){var C=$.T,L={};$.T=L;try{var P=i(p,l),W=$.S;W!==null&&W(L,P),bf(e,t,P)}catch(se){zo(e,t,se)}finally{C!==null&&L.types!==null&&(C.types=L.types),$.T=C}}else try{C=i(p,l),bf(e,t,C)}catch(se){zo(e,t,se)}}function bf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Cf(e,t,l)},function(l){return zo(e,t,l)}):Cf(e,t,i)}function Cf(e,t,i){t.status="fulfilled",t.value=i,wf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Sf(e,i)))}function zo(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,wf(t),t=t.next;while(t!==l)}e.action=null}function wf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xf(e,t){return t}function Ef(e,t){if(Ke){var i=lt.formState;if(i!==null){e:{var l=je;if(Ke){if(ht){t:{for(var p=ht,C=_n;p.nodeType!==8;){if(!C){p=null;break t}if(p=yn(p.nextSibling),p===null){p=null;break t}}C=p.data,p=C==="F!"||C==="F"?p:null}if(p){ht=yn(p.nextSibling),l=p.data==="F!";break e}}li(l)}l=!1}l&&(t=i[0])}}return i=Vt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xf,lastRenderedState:t},i.queue=l,i=Vf.bind(null,je,l),l.dispatch=i,l=jo(!1),C=qo.bind(null,je,!1,l.queue),l=Vt(),p={state:t,dispatch:null,action:e,pending:null},l.queue=p,i=vv.bind(null,je,p,C,i),p.dispatch=i,l.memoizedState=e,[t,i,!1]}function kf(e){var t=bt();return Af(t,it,e)}function Af(e,t,i){if(t=Bo(e,t,xf)[0],e=Ll(Vn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=vs(t)}catch(L){throw L===xr?Cl:L}else l=t;t=bt();var p=t.queue,C=p.dispatch;return i!==t.memoizedState&&(je.flags|=2048,Dr(9,{destroy:void 0},yv.bind(null,p,i),null)),[l,C,e]}function yv(e,t){e.action=t}function Tf(e){var t=bt(),i=it;if(i!==null)return Af(t,i,e);bt(),t=t.memoizedState,i=bt();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Dr(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=je.updateQueue,t===null&&(t=Rl(),je.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Df(){return bt().memoizedState}function Ol(e,t,i,l){var p=Vt();je.flags|=e,p.memoizedState=Dr(1|t,{destroy:void 0},i,l===void 0?null:l)}function Bl(e,t,i,l){var p=bt();l=l===void 0?null:l;var C=p.memoizedState.inst;it!==null&&l!==null&&To(l,it.memoizedState.deps)?p.memoizedState=Dr(t,C,i,l):(je.flags|=e,p.memoizedState=Dr(1|t,C,i,l))}function Rf(e,t){Ol(8390656,8,e,t)}function Ho(e,t){Bl(2048,8,e,t)}function Sv(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Rl(),je.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Mf(e){var t=bt().memoizedState;return Sv({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Lf(e,t){return Bl(4,2,e,t)}function Of(e,t){return Bl(4,4,e,t)}function Bf(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 Nf(e,t,i){i=i!=null?i.concat([e]):null,Bl(4,4,Bf.bind(null,t,e),i)}function Io(){}function jf(e,t){var i=bt();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&To(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function zf(e,t){var i=bt();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&To(t,l[1]))return l[0];if(l=e(),$i){It(!0);try{e()}finally{It(!1)}}return i.memoizedState=[l,t],l}function Uo(e,t,i){return i===void 0||(qn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Hd(),je.lanes|=e,mi|=e,i)}function Hf(e,t,i,l){return tn(i,t)?i:kr.current!==null?(e=Uo(e,i,l),tn(e,t)||(xt=!0),e):(qn&42)===0||(qn&1073741824)!==0&&(Ge&261930)===0?(xt=!0,e.memoizedState=i):(e=Hd(),je.lanes|=e,mi|=e,t)}function If(e,t,i,l,p){var C=X.p;X.p=C!==0&&8>C?C:8;var L=$.T,P={};$.T=P,qo(e,!1,t,i);try{var W=p(),se=$.S;if(se!==null&&se(P,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var he=mv(W,l);ys(e,t,he,on(e))}else ys(e,t,l,on(e))}catch(me){ys(e,t,{then:function(){},status:"rejected",reason:me},on())}finally{X.p=C,L!==null&&P.types!==null&&(L.types=P.types),$.T=L}}function bv(){}function Po(e,t,i,l){if(e.tag!==5)throw Error(o(476));var p=Uf(e).queue;If(e,p,t,Z,i===null?bv:function(){return Pf(e),i(l)})}function Uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:Z},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pf(e){var t=Uf(e);t.next===null&&(t=e.alternate.memoizedState),ys(e,t.next.queue,{},on())}function Fo(){return Bt(js)}function Ff(){return bt().memoizedState}function qf(){return bt().memoizedState}function Cv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=on();e=ui(i);var l=ci(t,e,i);l!==null&&(Zt(l,t,i),ps(l,t,i)),t={cache:_o()},e.payload=t;return}t=t.return}}function wv(e,t,i){var l=on();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Nl(e)?Gf(t,i):(i=so(e,t,i,l),i!==null&&(Zt(i,e,l),$f(i,t,l)))}function Vf(e,t,i){var l=on();ys(e,t,i,l)}function ys(e,t,i,l){var p={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Nl(e))Gf(t,p);else{var C=e.alternate;if(e.lanes===0&&(C===null||C.lanes===0)&&(C=t.lastRenderedReducer,C!==null))try{var L=t.lastRenderedState,P=C(L,i);if(p.hasEagerState=!0,p.eagerState=P,tn(P,L))return ml(e,t,p,0),lt===null&&pl(),!1}catch{}finally{}if(i=so(e,t,p,l),i!==null)return Zt(i,e,l),$f(i,t,l),!0}return!1}function qo(e,t,i,l){if(l={lane:2,revertLane:bu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Nl(e)){if(t)throw Error(o(479))}else t=so(e,i,l,2),t!==null&&Zt(t,e,2)}function Nl(e){var t=e.alternate;return e===je||t!==null&&t===je}function Gf(e,t){Ar=Tl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function $f(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,wn(e,i)}}var Ss={readContext:Bt,use:Ml,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Ss.useEffectEvent=gt;var Yf={readContext:Bt,use:Ml,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:Rf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Ol(4194308,4,Bf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Ol(4194308,4,e,t)},useInsertionEffect:function(e,t){Ol(4,2,e,t)},useMemo:function(e,t){var i=Vt();t=t===void 0?null:t;var l=e();if($i){It(!0);try{e()}finally{It(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=Vt();if(i!==void 0){var p=i(t);if($i){It(!0);try{i(t)}finally{It(!1)}}}else p=t;return l.memoizedState=l.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},l.queue=e,e=e.dispatch=wv.bind(null,je,e),[l.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:function(e){e=jo(e);var t=e.queue,i=Vf.bind(null,je,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Io,useDeferredValue:function(e,t){var i=Vt();return Uo(i,e,t)},useTransition:function(){var e=jo(!1);return e=If.bind(null,je,e.queue,!0,!1),Vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=je,p=Vt();if(Ke){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),lt===null)throw Error(o(349));(Ge&127)!==0||pf(l,t,i)}p.memoizedState=i;var C={value:i,getSnapshot:t};return p.queue=C,Rf(gf.bind(null,l,C,e),[e]),l.flags|=2048,Dr(9,{destroy:void 0},mf.bind(null,l,C,i,t),null),i},useId:function(){var e=Vt(),t=lt.identifierPrefix;if(Ke){var i=Rn,l=Dn;i=(l&~(1<<32-et(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Dl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=gv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Fo,useFormState:Ef,useActionState:Ef,useOptimistic:function(e){var t=Vt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=qo.bind(null,je,!0,i),i.dispatch=t,[e,t]},useMemoCache:Oo,useCacheRefresh:function(){return Vt().memoizedState=Cv.bind(null,je)},useEffectEvent:function(e){var t=Vt(),i={impl:e};return t.memoizedState=i,function(){if((Ze&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Vo={readContext:Bt,use:Ml,useCallback:jf,useContext:Bt,useEffect:Ho,useImperativeHandle:Nf,useInsertionEffect:Lf,useLayoutEffect:Of,useMemo:zf,useReducer:Ll,useRef:Df,useState:function(){return Ll(Vn)},useDebugValue:Io,useDeferredValue:function(e,t){var i=bt();return Hf(i,it.memoizedState,e,t)},useTransition:function(){var e=Ll(Vn)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:vs(e),t]},useSyncExternalStore:df,useId:Ff,useHostTransitionStatus:Fo,useFormState:kf,useActionState:kf,useOptimistic:function(e,t){var i=bt();return yf(i,it,e,t)},useMemoCache:Oo,useCacheRefresh:qf};Vo.useEffectEvent=Mf;var Kf={readContext:Bt,use:Ml,useCallback:jf,useContext:Bt,useEffect:Ho,useImperativeHandle:Nf,useInsertionEffect:Lf,useLayoutEffect:Of,useMemo:zf,useReducer:No,useRef:Df,useState:function(){return No(Vn)},useDebugValue:Io,useDeferredValue:function(e,t){var i=bt();return it===null?Uo(i,e,t):Hf(i,it.memoizedState,e,t)},useTransition:function(){var e=No(Vn)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:vs(e),t]},useSyncExternalStore:df,useId:Ff,useHostTransitionStatus:Fo,useFormState:Tf,useActionState:Tf,useOptimistic:function(e,t){var i=bt();return it!==null?yf(i,it,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Oo,useCacheRefresh:qf};Kf.useEffectEvent=Mf;function Go(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:c({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var $o={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=on(),p=ui(l);p.payload=t,i!=null&&(p.callback=i),t=ci(e,p,l),t!==null&&(Zt(t,e,l),ps(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=on(),p=ui(l);p.tag=1,p.payload=t,i!=null&&(p.callback=i),t=ci(e,p,l),t!==null&&(Zt(t,e,l),ps(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=on(),l=ui(i);l.tag=2,t!=null&&(l.callback=t),t=ci(e,l,i),t!==null&&(Zt(t,e,i),ps(t,e,i))}};function Wf(e,t,i,l,p,C,L){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,C,L):t.prototype&&t.prototype.isPureReactComponent?!ls(i,l)||!ls(p,C):!0}function Xf(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&$o.enqueueReplaceState(t,t.state,null)}function Yi(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=c({},i));for(var p in e)i[p]===void 0&&(i[p]=e[p])}return i}function Qf(e){dl(e)}function Zf(e){console.error(e)}function Jf(e){dl(e)}function jl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function ed(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Yo(e,t,i){return i=ui(i),i.tag=3,i.payload={element:null},i.callback=function(){jl(e,t)},i}function td(e){return e=ui(e),e.tag=3,e}function nd(e,t,i,l){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var C=l.value;e.payload=function(){return p(C)},e.callback=function(){ed(t,i,l)}}var L=i.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(e.callback=function(){ed(t,i,l),typeof p!="function"&&(gi===null?gi=new Set([this]):gi.add(this));var P=l.stack;this.componentDidCatch(l.value,{componentStack:P!==null?P:""})})}function xv(e,t,i,l,p){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&br(t,i,p,!0),i=rn.current,i!==null){switch(i.tag){case 31:case 13:return vn===null?Kl():i.alternate===null&&_t===0&&(_t=3),i.flags&=-257,i.flags|=65536,i.lanes=p,l===wl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),vu(e,l,p)),!1;case 22:return i.flags|=65536,l===wl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),vu(e,l,p)),!1}throw Error(o(435,i.tag))}return vu(e,l,p),Kl(),!1}if(Ke)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=p,l!==ho&&(e=Error(o(422),{cause:l}),us(pn(e,i)))):(l!==ho&&(t=Error(o(423),{cause:l}),us(pn(t,i))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,l=pn(l,i),p=Yo(e.stateNode,l,p),wo(e,p),_t!==4&&(_t=2)),!1;var C=Error(o(520),{cause:l});if(C=pn(C,i),Ts===null?Ts=[C]:Ts.push(C),_t!==4&&(_t=2),t===null)return!0;l=pn(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=p&-p,i.lanes|=e,e=Yo(i.stateNode,l,e),wo(i,e),!1;case 1:if(t=i.type,C=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(gi===null||!gi.has(C))))return i.flags|=65536,p&=-p,i.lanes|=p,p=td(p),nd(p,e,i,l),wo(i,p),!1}i=i.return}while(i!==null);return!1}var Ko=Error(o(461)),xt=!1;function Nt(e,t,i,l){t.child=e===null?lf(t,null,i,l):Gi(t,e.child,i,l)}function id(e,t,i,l,p){i=i.render;var C=t.ref;if("ref"in l){var L={};for(var P in l)P!=="ref"&&(L[P]=l[P])}else L=l;return Pi(t),l=Do(e,t,i,L,C,p),P=Ro(),e!==null&&!xt?(Mo(e,t,p),Gn(e,t,p)):(Ke&&P&&uo(t),t.flags|=1,Nt(e,t,l,p),t.child)}function rd(e,t,i,l,p){if(e===null){var C=i.type;return typeof C=="function"&&!lo(C)&&C.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=C,sd(e,t,C,l,p)):(e=_l(i.type,null,l,t,t.mode,p),e.ref=t.ref,e.return=t,t.child=e)}if(C=e.child,!nu(e,p)){var L=C.memoizedProps;if(i=i.compare,i=i!==null?i:ls,i(L,l)&&e.ref===t.ref)return Gn(e,t,p)}return t.flags|=1,e=In(C,l),e.ref=t.ref,e.return=t,t.child=e}function sd(e,t,i,l,p){if(e!==null){var C=e.memoizedProps;if(ls(C,l)&&e.ref===t.ref)if(xt=!1,t.pendingProps=l=C,nu(e,p))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,Gn(e,t,p)}return Wo(e,t,i,l,p)}function ld(e,t,i,l){var p=l.children,C=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(C=C!==null?C.baseLanes|i:i,e!==null){for(l=t.child=e.child,p=0;l!==null;)p=p|l.lanes|l.childLanes,l=l.sibling;l=p&~C}else l=0,t.child=null;return ad(e,t,C,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bl(t,C!==null?C.cachePool:null),C!==null?uf(t,C):Eo(),cf(t);else return l=t.lanes=536870912,ad(e,t,C!==null?C.baseLanes|i:i,i,l)}else C!==null?(bl(t,C.cachePool),uf(t,C),fi(),t.memoizedState=null):(e!==null&&bl(t,null),Eo(),fi());return Nt(e,t,p,i),t.child}function bs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ad(e,t,i,l,p){var C=yo();return C=C===null?null:{parent:Ct._currentValue,pool:C},t.memoizedState={baseLanes:i,cachePool:C},e!==null&&bl(t,null),Eo(),cf(t),e!==null&&br(e,t,l,!0),t.childLanes=p,null}function zl(e,t){return t=Il({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function od(e,t,i){return Gi(t,e.child,null,i),e=zl(t,t.pendingProps),e.flags|=2,sn(t),t.memoizedState=null,e}function Ev(e,t,i){var l=t.pendingProps,p=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ke){if(l.mode==="hidden")return e=zl(t,l),t.lanes=536870912,bs(null,e);if(Ao(t),(e=ht)?(e=Sp(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ri!==null?{id:Dn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},i=Vh(e),i.return=t,t.child=i,Ot=t,ht=null)):e=null,e===null)throw li(t);return t.lanes=536870912,null}return zl(t,l)}var C=e.memoizedState;if(C!==null){var L=C.dehydrated;if(Ao(t),p)if(t.flags&256)t.flags&=-257,t=od(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(xt||br(e,t,i,!1),p=(i&e.childLanes)!==0,xt||p){if(l=lt,l!==null&&(L=Qc(l,i),L!==0&&L!==C.retryLane))throw C.retryLane=L,zi(e,L),Zt(l,e,L),Ko;Kl(),t=od(e,t,i)}else e=C.treeContext,ht=yn(L.nextSibling),Ot=t,Ke=!0,si=null,_n=!1,e!==null&&Yh(t,e),t=zl(t,l),t.flags|=4096;return t}return e=In(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hl(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 Wo(e,t,i,l,p){return Pi(t),i=Do(e,t,i,l,void 0,p),l=Ro(),e!==null&&!xt?(Mo(e,t,p),Gn(e,t,p)):(Ke&&l&&uo(t),t.flags|=1,Nt(e,t,i,p),t.child)}function ud(e,t,i,l,p,C){return Pi(t),t.updateQueue=null,i=ff(t,l,i,p),hf(e),l=Ro(),e!==null&&!xt?(Mo(e,t,C),Gn(e,t,C)):(Ke&&l&&uo(t),t.flags|=1,Nt(e,t,i,C),t.child)}function cd(e,t,i,l,p){if(Pi(t),t.stateNode===null){var C=_r,L=i.contextType;typeof L=="object"&&L!==null&&(C=Bt(L)),C=new i(l,C),t.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=$o,t.stateNode=C,C._reactInternals=t,C=t.stateNode,C.props=l,C.state=t.memoizedState,C.refs={},bo(t),L=i.contextType,C.context=typeof L=="object"&&L!==null?Bt(L):_r,C.state=t.memoizedState,L=i.getDerivedStateFromProps,typeof L=="function"&&(Go(t,i,L,l),C.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(L=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),L!==C.state&&$o.enqueueReplaceState(C,C.state,null),gs(t,l,C,p),ms(),C.state=t.memoizedState),typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){C=t.stateNode;var P=t.memoizedProps,W=Yi(i,P);C.props=W;var se=C.context,he=i.contextType;L=_r,typeof he=="object"&&he!==null&&(L=Bt(he));var me=i.getDerivedStateFromProps;he=typeof me=="function"||typeof C.getSnapshotBeforeUpdate=="function",P=t.pendingProps!==P,he||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(P||se!==L)&&Xf(t,C,l,L),oi=!1;var le=t.memoizedState;C.state=le,gs(t,l,C,p),ms(),se=t.memoizedState,P||le!==se||oi?(typeof me=="function"&&(Go(t,i,me,l),se=t.memoizedState),(W=oi||Wf(t,i,W,l,le,se,L))?(he||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(t.flags|=4194308)):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=se),C.props=l,C.state=se,C.context=L,l=W):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{C=t.stateNode,Co(e,t),L=t.memoizedProps,he=Yi(i,L),C.props=he,me=t.pendingProps,le=C.context,se=i.contextType,W=_r,typeof se=="object"&&se!==null&&(W=Bt(se)),P=i.getDerivedStateFromProps,(se=typeof P=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(L!==me||le!==W)&&Xf(t,C,l,W),oi=!1,le=t.memoizedState,C.state=le,gs(t,l,C,p),ms();var ae=t.memoizedState;L!==me||le!==ae||oi||e!==null&&e.dependencies!==null&&yl(e.dependencies)?(typeof P=="function"&&(Go(t,i,P,l),ae=t.memoizedState),(he=oi||Wf(t,i,he,l,le,ae,W)||e!==null&&e.dependencies!==null&&yl(e.dependencies))?(se||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(l,ae,W),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(l,ae,W)),typeof C.componentDidUpdate=="function"&&(t.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ae),C.props=l,C.state=ae,C.context=W,l=he):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),l=!1)}return C=l,Hl(e,t),l=(t.flags&128)!==0,C||l?(C=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:C.render(),t.flags|=1,e!==null&&l?(t.child=Gi(t,e.child,null,p),t.child=Gi(t,null,i,p)):Nt(e,t,i,p),t.memoizedState=C.state,e=t.child):e=Gn(e,t,p),e}function hd(e,t,i,l){return Ii(),t.flags|=256,Nt(e,t,i,l),t.child}var Xo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qo(e){return{baseLanes:e,cachePool:Jh()}}function Zo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=an),e}function fd(e,t,i){var l=t.pendingProps,p=!1,C=(t.flags&128)!==0,L;if((L=C)||(L=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),L&&(p=!0,t.flags&=-129),L=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ke){if(p?hi(t):fi(),(e=ht)?(e=Sp(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ri!==null?{id:Dn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},i=Vh(e),i.return=t,t.child=i,Ot=t,ht=null)):e=null,e===null)throw li(t);return Bu(e)?t.lanes=32:t.lanes=536870912,null}var P=l.children;return l=l.fallback,p?(fi(),p=t.mode,P=Il({mode:"hidden",children:P},p),l=Hi(l,p,i,null),P.return=t,l.return=t,P.sibling=l,t.child=P,l=t.child,l.memoizedState=Qo(i),l.childLanes=Zo(e,L,i),t.memoizedState=Xo,bs(null,l)):(hi(t),Jo(t,P))}var W=e.memoizedState;if(W!==null&&(P=W.dehydrated,P!==null)){if(C)t.flags&256?(hi(t),t.flags&=-257,t=eu(e,t,i)):t.memoizedState!==null?(fi(),t.child=e.child,t.flags|=128,t=null):(fi(),P=l.fallback,p=t.mode,l=Il({mode:"visible",children:l.children},p),P=Hi(P,p,i,null),P.flags|=2,l.return=t,P.return=t,l.sibling=P,t.child=l,Gi(t,e.child,null,i),l=t.child,l.memoizedState=Qo(i),l.childLanes=Zo(e,L,i),t.memoizedState=Xo,t=bs(null,l));else if(hi(t),Bu(P)){if(L=P.nextSibling&&P.nextSibling.dataset,L)var se=L.dgst;L=se,l=Error(o(419)),l.stack="",l.digest=L,us({value:l,source:null,stack:null}),t=eu(e,t,i)}else if(xt||br(e,t,i,!1),L=(i&e.childLanes)!==0,xt||L){if(L=lt,L!==null&&(l=Qc(L,i),l!==0&&l!==W.retryLane))throw W.retryLane=l,zi(e,l),Zt(L,e,l),Ko;Ou(P)||Kl(),t=eu(e,t,i)}else Ou(P)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,ht=yn(P.nextSibling),Ot=t,Ke=!0,si=null,_n=!1,e!==null&&Yh(t,e),t=Jo(t,l.children),t.flags|=4096);return t}return p?(fi(),P=l.fallback,p=t.mode,W=e.child,se=W.sibling,l=In(W,{mode:"hidden",children:l.children}),l.subtreeFlags=W.subtreeFlags&65011712,se!==null?P=In(se,P):(P=Hi(P,p,i,null),P.flags|=2),P.return=t,l.return=t,l.sibling=P,t.child=l,bs(null,l),l=t.child,P=e.child.memoizedState,P===null?P=Qo(i):(p=P.cachePool,p!==null?(W=Ct._currentValue,p=p.parent!==W?{parent:W,pool:W}:p):p=Jh(),P={baseLanes:P.baseLanes|i,cachePool:p}),l.memoizedState=P,l.childLanes=Zo(e,L,i),t.memoizedState=Xo,bs(e.child,l)):(hi(t),i=e.child,e=i.sibling,i=In(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(L=t.deletions,L===null?(t.deletions=[e],t.flags|=16):L.push(e)),t.child=i,t.memoizedState=null,i)}function Jo(e,t){return t=Il({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Il(e,t){return e=nn(22,e,null,t),e.lanes=0,e}function eu(e,t,i){return Gi(t,e.child,null,i),e=Jo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dd(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),mo(e.return,t,i)}function tu(e,t,i,l,p,C){var L=e.memoizedState;L===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:p,treeForkCount:C}:(L.isBackwards=t,L.rendering=null,L.renderingStartTime=0,L.last=l,L.tail=i,L.tailMode=p,L.treeForkCount=C)}function pd(e,t,i){var l=t.pendingProps,p=l.revealOrder,C=l.tail;l=l.children;var L=St.current,P=(L&2)!==0;if(P?(L=L&1|2,t.flags|=128):L&=1,I(St,L),Nt(e,t,l,i),l=Ke?os:0,!P&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dd(e,i,t);else if(e.tag===19)dd(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(p){case"forwards":for(i=t.child,p=null;i!==null;)e=i.alternate,e!==null&&Al(e)===null&&(p=i),i=i.sibling;i=p,i===null?(p=t.child,t.child=null):(p=i.sibling,i.sibling=null),tu(t,!1,p,i,C,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=t.child,t.child=null;p!==null;){if(e=p.alternate,e!==null&&Al(e)===null){t.child=p;break}e=p.sibling,p.sibling=i,i=p,p=e}tu(t,!0,i,null,C,l);break;case"together":tu(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Gn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),mi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(br(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=In(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=In(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function nu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&yl(e)))}function kv(e,t,i){switch(t.tag){case 3:U(t,t.stateNode.containerInfo),ai(t,Ct,e.memoizedState.cache),Ii();break;case 27:case 5:te(t);break;case 4:U(t,t.stateNode.containerInfo);break;case 10:ai(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ao(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(hi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?fd(e,t,i):(hi(t),e=Gn(e,t,i),e!==null?e.sibling:null);hi(t);break;case 19:var p=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(br(e,t,i,!1),l=(i&t.childLanes)!==0),p){if(l)return pd(e,t,i);t.flags|=128}if(p=t.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),I(St,St.current),l)break;return null;case 22:return t.lanes=0,ld(e,t,i,t.pendingProps);case 24:ai(t,Ct,e.memoizedState.cache)}return Gn(e,t,i)}function md(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!nu(e,i)&&(t.flags&128)===0)return xt=!1,kv(e,t,i);xt=(e.flags&131072)!==0}else xt=!1,Ke&&(t.flags&1048576)!==0&&$h(t,os,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=qi(t.elementType),t.type=e,typeof e=="function")lo(e)?(l=Yi(e,l),t.tag=1,t=cd(null,t,e,l,i)):(t.tag=0,t=Wo(null,t,e,l,i));else{if(e!=null){var p=e.$$typeof;if(p===A){t.tag=11,t=id(null,t,e,l,i);break e}else if(p===T){t.tag=14,t=rd(null,t,e,l,i);break e}}throw t=Y(e)||e,Error(o(306,t,""))}}return t;case 0:return Wo(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,p=Yi(l,t.pendingProps),cd(e,t,l,p,i);case 3:e:{if(U(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var C=t.memoizedState;p=C.element,Co(e,t),gs(t,l,null,i);var L=t.memoizedState;if(l=L.cache,ai(t,Ct,l),l!==C.cache&&go(t,[Ct],i,!0),ms(),l=L.element,C.isDehydrated)if(C={element:l,isDehydrated:!1,cache:L.cache},t.updateQueue.baseState=C,t.memoizedState=C,t.flags&256){t=hd(e,t,l,i);break e}else if(l!==p){p=pn(Error(o(424)),t),us(p),t=hd(e,t,l,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(ht=yn(e.firstChild),Ot=t,Ke=!0,si=null,_n=!0,i=lf(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ii(),l===p){t=Gn(e,t,i);break e}Nt(e,t,l,i)}t=t.child}return t;case 26:return Hl(e,t),e===null?(i=kp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ke||(i=t.type,e=t.pendingProps,l=ta(ee.current).createElement(i),l[Lt]=t,l[$t]=e,jt(l,i,e),Dt(l),t.stateNode=l):t.memoizedState=kp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&Ke&&(l=t.stateNode=wp(t.type,t.pendingProps,ee.current),Ot=t,_n=!0,p=ht,Si(t.type)?(Nu=p,ht=yn(l.firstChild)):ht=p),Nt(e,t,t.pendingProps.children,i),Hl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ke&&((p=l=ht)&&(l=n0(l,t.type,t.pendingProps,_n),l!==null?(t.stateNode=l,Ot=t,ht=yn(l.firstChild),_n=!1,p=!0):p=!1),p||li(t)),te(t),p=t.type,C=t.pendingProps,L=e!==null?e.memoizedProps:null,l=C.children,Ru(p,C)?l=null:L!==null&&Ru(p,L)&&(t.flags|=32),t.memoizedState!==null&&(p=Do(e,t,_v,null,null,i),js._currentValue=p),Hl(e,t),Nt(e,t,l,i),t.child;case 6:return e===null&&Ke&&((e=i=ht)&&(i=i0(i,t.pendingProps,_n),i!==null?(t.stateNode=i,Ot=t,ht=null,e=!0):e=!1),e||li(t)),null;case 13:return fd(e,t,i);case 4:return U(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Gi(t,null,l,i):Nt(e,t,l,i),t.child;case 11:return id(e,t,t.type,t.pendingProps,i);case 7:return Nt(e,t,t.pendingProps,i),t.child;case 8:return Nt(e,t,t.pendingProps.children,i),t.child;case 12:return Nt(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,ai(t,t.type,l.value),Nt(e,t,l.children,i),t.child;case 9:return p=t.type._context,l=t.pendingProps.children,Pi(t),p=Bt(p),l=l(p),t.flags|=1,Nt(e,t,l,i),t.child;case 14:return rd(e,t,t.type,t.pendingProps,i);case 15:return sd(e,t,t.type,t.pendingProps,i);case 19:return pd(e,t,i);case 31:return Ev(e,t,i);case 22:return ld(e,t,i,t.pendingProps);case 24:return Pi(t),l=Bt(Ct),e===null?(p=yo(),p===null&&(p=lt,C=_o(),p.pooledCache=C,C.refCount++,C!==null&&(p.pooledCacheLanes|=i),p=C),t.memoizedState={parent:l,cache:p},bo(t),ai(t,Ct,p)):((e.lanes&i)!==0&&(Co(e,t),gs(t,null,null,i),ms()),p=e.memoizedState,C=t.memoizedState,p.parent!==l?(p={parent:l,cache:l},t.memoizedState=p,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=p),ai(t,Ct,l)):(l=C.cache,ai(t,Ct,l),l!==p.cache&&go(t,[Ct],i,!0))),Nt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function $n(e){e.flags|=4}function iu(e,t,i,l,p){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(Fd())e.flags|=8192;else throw Vi=wl,So}else e.flags&=-16777217}function gd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Mp(t))if(Fd())e.flags|=8192;else throw Vi=wl,So}function Ul(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nl():536870912,e.lanes|=t,Or|=t)}function Cs(e,t){if(!Ke)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags,l|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function Av(e,t,i){var l=t.pendingProps;switch(co(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return ft(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Fn(Ct),ne(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Sr(t)?$n(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fo())),ft(t),null;case 26:var p=t.type,C=t.memoizedState;return e===null?($n(t),C!==null?(ft(t),gd(t,C)):(ft(t),iu(t,p,null,l,i))):C?C!==e.memoizedState?($n(t),ft(t),gd(t,C)):(ft(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&$n(t),ft(t),iu(t,p,e,l,i)),null;case 27:if(ve(t),i=ee.current,p=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&$n(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ft(t),null}e=ie.current,Sr(t)?Kh(t):(e=wp(p,l,i),t.stateNode=e,$n(t))}return ft(t),null;case 5:if(ve(t),p=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&$n(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ft(t),null}if(C=ie.current,Sr(t))Kh(t);else{var L=ta(ee.current);switch(C){case 1:C=L.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:C=L.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":C=L.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":C=L.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":C=L.createElement("div"),C.innerHTML="<script><\/script>",C=C.removeChild(C.firstChild);break;case"select":C=typeof l.is=="string"?L.createElement("select",{is:l.is}):L.createElement("select"),l.multiple?C.multiple=!0:l.size&&(C.size=l.size);break;default:C=typeof l.is=="string"?L.createElement(p,{is:l.is}):L.createElement(p)}}C[Lt]=t,C[$t]=l;e:for(L=t.child;L!==null;){if(L.tag===5||L.tag===6)C.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===t)break e;for(;L.sibling===null;){if(L.return===null||L.return===t)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}t.stateNode=C;e:switch(jt(C,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&$n(t)}}return ft(t),iu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&$n(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ee.current,Sr(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,p=Ot,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||fp(e.nodeValue,i)),e||li(t,!0)}else e=ta(e).createTextNode(l),e[Lt]=t,t.stateNode=e}return ft(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=Sr(t),i!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Lt]=t}else Ii(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),e=!1}else i=fo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(sn(t),t):(sn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ft(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=Sr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!p)throw Error(o(318));if(p=t.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[Lt]=t}else Ii(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),p=!1}else p=fo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return t.flags&256?(sn(t),t):(sn(t),null)}return sn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),C=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(C=l.memoizedState.cachePool.pool),C!==p&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Ul(t,t.updateQueue),ft(t),null);case 4:return ne(),e===null&&Eu(t.stateNode.containerInfo),ft(t),null;case 10:return Fn(t.type),ft(t),null;case 19:if(V(St),l=t.memoizedState,l===null)return ft(t),null;if(p=(t.flags&128)!==0,C=l.rendering,C===null)if(p)Cs(l,!1);else{if(_t!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(C=Al(e),C!==null){for(t.flags|=128,Cs(l,!1),e=C.updateQueue,t.updateQueue=e,Ul(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)qh(i,e),i=i.sibling;return I(St,St.current&1|2),Ke&&Un(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&pt()>Gl&&(t.flags|=128,p=!0,Cs(l,!1),t.lanes=4194304)}else{if(!p)if(e=Al(C),e!==null){if(t.flags|=128,p=!0,e=e.updateQueue,t.updateQueue=e,Ul(t,e),Cs(l,!0),l.tail===null&&l.tailMode==="hidden"&&!C.alternate&&!Ke)return ft(t),null}else 2*pt()-l.renderingStartTime>Gl&&i!==536870912&&(t.flags|=128,p=!0,Cs(l,!1),t.lanes=4194304);l.isBackwards?(C.sibling=t.child,t.child=C):(e=l.last,e!==null?e.sibling=C:t.child=C,l.last=C)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=pt(),e.sibling=null,i=St.current,I(St,p?i&1|2:i&1),Ke&&Un(t,l.treeForkCount),e):(ft(t),null);case 22:case 23:return sn(t),ko(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),i=t.updateQueue,i!==null&&Ul(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&V(Fi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Fn(Ct),ft(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Tv(e,t){switch(co(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fn(Ct),ne(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(sn(t),t.alternate===null)throw Error(o(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(sn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(St),null;case 4:return ne(),null;case 10:return Fn(t.type),null;case 22:case 23:return sn(t),ko(),e!==null&&V(Fi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Fn(Ct),null;case 25:return null;default:return null}}function _d(e,t){switch(co(t),t.tag){case 3:Fn(Ct),ne();break;case 26:case 27:case 5:ve(t);break;case 4:ne();break;case 31:t.memoizedState!==null&&sn(t);break;case 13:sn(t);break;case 19:V(St);break;case 10:Fn(t.type);break;case 22:case 23:sn(t),ko(),e!==null&&V(Fi);break;case 24:Fn(Ct)}}function ws(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var p=l.next;i=p;do{if((i.tag&e)===e){l=void 0;var C=i.create,L=i.inst;l=C(),L.destroy=l}i=i.next}while(i!==p)}}catch(P){nt(t,t.return,P)}}function di(e,t,i){try{var l=t.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var C=p.next;l=C;do{if((l.tag&e)===e){var L=l.inst,P=L.destroy;if(P!==void 0){L.destroy=void 0,p=t;var W=i,se=P;try{se()}catch(he){nt(p,W,he)}}}l=l.next}while(l!==C)}}catch(he){nt(t,t.return,he)}}function vd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{of(t,i)}catch(l){nt(e,e.return,l)}}}function yd(e,t,i){i.props=Yi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){nt(e,t,l)}}function xs(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(p){nt(e,t,p)}}function Mn(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(p){nt(e,t,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){nt(e,t,p)}else i.current=null}function Sd(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(p){nt(e,e.return,p)}}function ru(e,t,i){try{var l=e.stateNode;Xv(l,e.type,i,t),l[$t]=t}catch(p){nt(e,e.return,p)}}function bd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Si(e.type)||e.tag===4}function su(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bd(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&&Si(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 lu(e,t,i){var l=e.tag;if(l===5||l===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=zn));else if(l!==4&&(l===27&&Si(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(lu(e,t,i),e=e.sibling;e!==null;)lu(e,t,i),e=e.sibling}function Pl(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&Si(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Pl(e,t,i),e=e.sibling;e!==null;)Pl(e,t,i),e=e.sibling}function Cd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,p=t.attributes;p.length;)t.removeAttributeNode(p[0]);jt(t,l,i),t[Lt]=e,t[$t]=i}catch(C){nt(e,e.return,C)}}var Yn=!1,Et=!1,au=!1,wd=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function Dv(e,t){if(e=e.containerInfo,Tu=oa,e=Bh(e),Ja(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var p=l.anchorOffset,C=l.focusNode;l=l.focusOffset;try{i.nodeType,C.nodeType}catch{i=null;break e}var L=0,P=-1,W=-1,se=0,he=0,me=e,le=null;t:for(;;){for(var ae;me!==i||p!==0&&me.nodeType!==3||(P=L+p),me!==C||l!==0&&me.nodeType!==3||(W=L+l),me.nodeType===3&&(L+=me.nodeValue.length),(ae=me.firstChild)!==null;)le=me,me=ae;for(;;){if(me===e)break t;if(le===i&&++se===p&&(P=L),le===C&&++he===l&&(W=L),(ae=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=ae}i=P===-1||W===-1?null:{start:P,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(Du={focusedElem:e,selectionRange:i},oa=!1,Rt=t;Rt!==null;)if(t=Rt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Rt=e;else for(;Rt!==null;){switch(t=Rt,C=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++)p=e[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&C!==null){e=void 0,i=t,p=C.memoizedProps,C=C.memoizedState,l=i.stateNode;try{var Ce=Yi(i.type,p);e=l.getSnapshotBeforeUpdate(Ce,C),l.__reactInternalSnapshotBeforeUpdate=e}catch(Te){nt(i,i.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Lu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lu(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,Rt=e;break}Rt=t.return}}function xd(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Wn(e,i),l&4&&ws(5,i);break;case 1:if(Wn(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(L){nt(i,i.return,L)}else{var p=Yi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(p,t,e.__reactInternalSnapshotBeforeUpdate)}catch(L){nt(i,i.return,L)}}l&64&&vd(i),l&512&&xs(i,i.return);break;case 3:if(Wn(e,i),l&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{of(e,t)}catch(L){nt(i,i.return,L)}}break;case 27:t===null&&l&4&&Cd(i);case 26:case 5:Wn(e,i),t===null&&l&4&&Sd(i),l&512&&xs(i,i.return);break;case 12:Wn(e,i);break;case 31:Wn(e,i),l&4&&Ad(e,i);break;case 13:Wn(e,i),l&4&&Td(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Hv.bind(null,i),r0(e,i))));break;case 22:if(l=i.memoizedState!==null||Yn,!l){t=t!==null&&t.memoizedState!==null||Et,p=Yn;var C=Et;Yn=l,(Et=t)&&!C?Xn(e,i,(i.subtreeFlags&8772)!==0):Wn(e,i),Yn=p,Et=C}break;case 30:break;default:Wn(e,i)}}function Ed(e){var t=e.alternate;t!==null&&(e.alternate=null,Ed(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ja(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 dt=null,Kt=!1;function Kn(e,t,i){for(i=i.child;i!==null;)kd(e,t,i),i=i.sibling}function kd(e,t,i){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(At,i)}catch{}switch(i.tag){case 26:Et||Mn(i,t),Kn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Et||Mn(i,t);var l=dt,p=Kt;Si(i.type)&&(dt=i.stateNode,Kt=!1),Kn(e,t,i),Os(i.stateNode),dt=l,Kt=p;break;case 5:Et||Mn(i,t);case 6:if(l=dt,p=Kt,dt=null,Kn(e,t,i),dt=l,Kt=p,dt!==null)if(Kt)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(i.stateNode)}catch(C){nt(i,t,C)}else try{dt.removeChild(i.stateNode)}catch(C){nt(i,t,C)}break;case 18:dt!==null&&(Kt?(e=dt,vp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Pr(e)):vp(dt,i.stateNode));break;case 4:l=dt,p=Kt,dt=i.stateNode.containerInfo,Kt=!0,Kn(e,t,i),dt=l,Kt=p;break;case 0:case 11:case 14:case 15:di(2,i,t),Et||di(4,i,t),Kn(e,t,i);break;case 1:Et||(Mn(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&yd(i,t,l)),Kn(e,t,i);break;case 21:Kn(e,t,i);break;case 22:Et=(l=Et)||i.memoizedState!==null,Kn(e,t,i),Et=l;break;default:Kn(e,t,i)}}function Ad(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pr(e)}catch(i){nt(t,t.return,i)}}}function Td(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pr(e)}catch(i){nt(t,t.return,i)}}function Rv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new wd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new wd),t;default:throw Error(o(435,e.tag))}}function Fl(e,t){var i=Rv(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var p=Iv.bind(null,e,l);l.then(p,p)}})}function Wt(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var p=i[l],C=e,L=t,P=L;e:for(;P!==null;){switch(P.tag){case 27:if(Si(P.type)){dt=P.stateNode,Kt=!1;break e}break;case 5:dt=P.stateNode,Kt=!1;break e;case 3:case 4:dt=P.stateNode.containerInfo,Kt=!0;break e}P=P.return}if(dt===null)throw Error(o(160));kd(C,L,p),dt=null,Kt=!1,C=p.alternate,C!==null&&(C.return=null),p.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dd(t,e),t=t.sibling}var En=null;function Dd(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wt(t,e),Xt(e),l&4&&(di(3,e,e.return),ws(3,e),di(5,e,e.return));break;case 1:Wt(t,e),Xt(e),l&512&&(Et||i===null||Mn(i,i.return)),l&64&&Yn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var p=En;if(Wt(t,e),Xt(e),l&512&&(Et||i===null||Mn(i,i.return)),l&4){var C=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,p=p.ownerDocument||p;t:switch(l){case"title":C=p.getElementsByTagName("title")[0],(!C||C[Qr]||C[Lt]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=p.createElement(l),p.head.insertBefore(C,p.querySelector("head > title"))),jt(C,l,i),C[Lt]=e,Dt(C),l=C;break e;case"link":var L=Dp("link","href",p).get(l+(i.href||""));if(L){for(var P=0;P<L.length;P++)if(C=L[P],C.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&C.getAttribute("rel")===(i.rel==null?null:i.rel)&&C.getAttribute("title")===(i.title==null?null:i.title)&&C.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){L.splice(P,1);break t}}C=p.createElement(l),jt(C,l,i),p.head.appendChild(C);break;case"meta":if(L=Dp("meta","content",p).get(l+(i.content||""))){for(P=0;P<L.length;P++)if(C=L[P],C.getAttribute("content")===(i.content==null?null:""+i.content)&&C.getAttribute("name")===(i.name==null?null:i.name)&&C.getAttribute("property")===(i.property==null?null:i.property)&&C.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&C.getAttribute("charset")===(i.charSet==null?null:i.charSet)){L.splice(P,1);break t}}C=p.createElement(l),jt(C,l,i),p.head.appendChild(C);break;default:throw Error(o(468,l))}C[Lt]=e,Dt(C),l=C}e.stateNode=l}else Rp(p,e.type,e.stateNode);else e.stateNode=Tp(p,l,e.memoizedProps);else C!==l?(C===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):C.count--,l===null?Rp(p,e.type,e.stateNode):Tp(p,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ru(e,e.memoizedProps,i.memoizedProps)}break;case 27:Wt(t,e),Xt(e),l&512&&(Et||i===null||Mn(i,i.return)),i!==null&&l&4&&ru(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Wt(t,e),Xt(e),l&512&&(Et||i===null||Mn(i,i.return)),e.flags&32){p=e.stateNode;try{cr(p,"")}catch(Ce){nt(e,e.return,Ce)}}l&4&&e.stateNode!=null&&(p=e.memoizedProps,ru(e,p,i!==null?i.memoizedProps:p)),l&1024&&(au=!0);break;case 6:if(Wt(t,e),Xt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(Ce){nt(e,e.return,Ce)}}break;case 3:if(ra=null,p=En,En=na(t.containerInfo),Wt(t,e),En=p,Xt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Pr(t.containerInfo)}catch(Ce){nt(e,e.return,Ce)}au&&(au=!1,Rd(e));break;case 4:l=En,En=na(e.stateNode.containerInfo),Wt(t,e),Xt(e),En=l;break;case 12:Wt(t,e),Xt(e);break;case 31:Wt(t,e),Xt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Fl(e,l)));break;case 13:Wt(t,e),Xt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Vl=pt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Fl(e,l)));break;case 22:p=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,se=Yn,he=Et;if(Yn=se||p,Et=he||W,Wt(t,e),Et=he,Yn=se,Xt(e),l&8192)e:for(t=e.stateNode,t._visibility=p?t._visibility&-2:t._visibility|1,p&&(i===null||W||Yn||Et||Ki(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(C=W.stateNode,p)L=C.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{P=W.stateNode;var me=W.memoizedProps.style,le=me!=null&&me.hasOwnProperty("display")?me.display:null;P.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Ce){nt(W,W.return,Ce)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=p?"":W.memoizedProps}catch(Ce){nt(W,W.return,Ce)}}}else if(t.tag===18){if(i===null){W=t;try{var ae=W.stateNode;p?yp(ae,!0):yp(W.stateNode,!1)}catch(Ce){nt(W,W.return,Ce)}}}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}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,Fl(e,i))));break;case 19:Wt(t,e),Xt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Fl(e,l)));break;case 30:break;case 21:break;default:Wt(t,e),Xt(e)}}function Xt(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(bd(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var p=i.stateNode,C=su(e);Pl(e,C,p);break;case 5:var L=i.stateNode;i.flags&32&&(cr(L,""),i.flags&=-33);var P=su(e);Pl(e,P,L);break;case 3:case 4:var W=i.stateNode.containerInfo,se=su(e);lu(e,se,W);break;default:throw Error(o(161))}}catch(he){nt(e,e.return,he)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)xd(e,t.alternate,t),t=t.sibling}function Ki(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:di(4,t,t.return),Ki(t);break;case 1:Mn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&yd(t,t.return,i),Ki(t);break;case 27:Os(t.stateNode);case 26:case 5:Mn(t,t.return),Ki(t);break;case 22:t.memoizedState===null&&Ki(t);break;case 30:Ki(t);break;default:Ki(t)}e=e.sibling}}function Xn(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,p=e,C=t,L=C.flags;switch(C.tag){case 0:case 11:case 15:Xn(p,C,i),ws(4,C);break;case 1:if(Xn(p,C,i),l=C,p=l.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(se){nt(l,l.return,se)}if(l=C,p=l.updateQueue,p!==null){var P=l.stateNode;try{var W=p.shared.hiddenCallbacks;if(W!==null)for(p.shared.hiddenCallbacks=null,p=0;p<W.length;p++)af(W[p],P)}catch(se){nt(l,l.return,se)}}i&&L&64&&vd(C),xs(C,C.return);break;case 27:Cd(C);case 26:case 5:Xn(p,C,i),i&&l===null&&L&4&&Sd(C),xs(C,C.return);break;case 12:Xn(p,C,i);break;case 31:Xn(p,C,i),i&&L&4&&Ad(p,C);break;case 13:Xn(p,C,i),i&&L&4&&Td(p,C);break;case 22:C.memoizedState===null&&Xn(p,C,i),xs(C,C.return);break;case 30:break;default:Xn(p,C,i)}t=t.sibling}}function ou(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&&cs(i))}function uu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&cs(e))}function kn(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Md(e,t,i,l),t=t.sibling}function Md(e,t,i,l){var p=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,i,l),p&2048&&ws(9,t);break;case 1:kn(e,t,i,l);break;case 3:kn(e,t,i,l),p&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&cs(e)));break;case 12:if(p&2048){kn(e,t,i,l),e=t.stateNode;try{var C=t.memoizedProps,L=C.id,P=C.onPostCommit;typeof P=="function"&&P(L,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){nt(t,t.return,W)}}else kn(e,t,i,l);break;case 31:kn(e,t,i,l);break;case 13:kn(e,t,i,l);break;case 23:break;case 22:C=t.stateNode,L=t.alternate,t.memoizedState!==null?C._visibility&2?kn(e,t,i,l):Es(e,t):C._visibility&2?kn(e,t,i,l):(C._visibility|=2,Rr(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),p&2048&&ou(L,t);break;case 24:kn(e,t,i,l),p&2048&&uu(t.alternate,t);break;default:kn(e,t,i,l)}}function Rr(e,t,i,l,p){for(p=p&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var C=e,L=t,P=i,W=l,se=L.flags;switch(L.tag){case 0:case 11:case 15:Rr(C,L,P,W,p),ws(8,L);break;case 23:break;case 22:var he=L.stateNode;L.memoizedState!==null?he._visibility&2?Rr(C,L,P,W,p):Es(C,L):(he._visibility|=2,Rr(C,L,P,W,p)),p&&se&2048&&ou(L.alternate,L);break;case 24:Rr(C,L,P,W,p),p&&se&2048&&uu(L.alternate,L);break;default:Rr(C,L,P,W,p)}t=t.sibling}}function Es(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,p=l.flags;switch(l.tag){case 22:Es(i,l),p&2048&&ou(l.alternate,l);break;case 24:Es(i,l),p&2048&&uu(l.alternate,l);break;default:Es(i,l)}t=t.sibling}}var ks=8192;function Mr(e,t,i){if(e.subtreeFlags&ks)for(e=e.child;e!==null;)Ld(e,t,i),e=e.sibling}function Ld(e,t,i){switch(e.tag){case 26:Mr(e,t,i),e.flags&ks&&e.memoizedState!==null&&g0(i,En,e.memoizedState,e.memoizedProps);break;case 5:Mr(e,t,i);break;case 3:case 4:var l=En;En=na(e.stateNode.containerInfo),Mr(e,t,i),En=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=ks,ks=16777216,Mr(e,t,i),ks=l):Mr(e,t,i));break;default:Mr(e,t,i)}}function Od(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 As(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];Rt=l,Nd(l,e)}Od(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bd(e),e=e.sibling}function Bd(e){switch(e.tag){case 0:case 11:case 15:As(e),e.flags&2048&&di(9,e,e.return);break;case 3:As(e);break;case 12:As(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ql(e)):As(e);break;default:As(e)}}function ql(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];Rt=l,Nd(l,e)}Od(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:di(8,t,t.return),ql(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ql(t));break;default:ql(t)}e=e.sibling}}function Nd(e,t){for(;Rt!==null;){var i=Rt;switch(i.tag){case 0:case 11:case 15:di(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:cs(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Rt=l;else e:for(i=e;Rt!==null;){l=Rt;var p=l.sibling,C=l.return;if(Ed(l),l===i){Rt=null;break e}if(p!==null){p.return=C,Rt=p;break e}Rt=C}}}var Mv={getCacheForType:function(e){var t=Bt(Ct),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Bt(Ct).controller.signal}},Lv=typeof WeakMap=="function"?WeakMap:Map,Ze=0,lt=null,Fe=null,Ge=0,tt=0,ln=null,pi=!1,Lr=!1,cu=!1,Qn=0,_t=0,mi=0,Wi=0,hu=0,an=0,Or=0,Ts=null,Qt=null,fu=!1,Vl=0,jd=0,Gl=1/0,$l=null,gi=null,Tt=0,_i=null,Br=null,Zn=0,du=0,pu=null,zd=null,Ds=0,mu=null;function on(){return(Ze&2)!==0&&Ge!==0?Ge&-Ge:$.T!==null?bu():Zc()}function Hd(){if(an===0)if((Ge&536870912)===0||Ke){var e=ti;ti<<=1,(ti&3932160)===0&&(ti=262144),an=e}else an=536870912;return e=rn.current,e!==null&&(e.flags|=32),an}function Zt(e,t,i){(e===lt&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Nr(e,0),vi(e,Ge,an,!1)),oe(e,i),((Ze&2)===0||e!==lt)&&(e===lt&&((Ze&2)===0&&(Wi|=i),_t===4&&vi(e,Ge,an,!1)),Ln(e))}function Id(e,t,i){if((Ze&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Li(e,t),p=l?Nv(e,t):_u(e,t,!0),C=l;do{if(p===0){Lr&&!l&&vi(e,t,0,!1);break}else{if(i=e.current.alternate,C&&!Ov(i)){p=_u(e,t,!1),C=!1;continue}if(p===2){if(C=t,e.errorRecoveryDisabledLanes&C)var L=0;else L=e.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){t=L;e:{var P=e;p=Ts;var W=P.current.memoizedState.isDehydrated;if(W&&(Nr(P,L).flags|=256),L=_u(P,L,!1),L!==2){if(cu&&!W){P.errorRecoveryDisabledLanes|=C,Wi|=C,p=4;break e}C=Qt,Qt=p,C!==null&&(Qt===null?Qt=C:Qt.push.apply(Qt,C))}p=L}if(C=!1,p!==2)continue}}if(p===1){Nr(e,0),vi(e,t,0,!0);break}e:{switch(l=e,C=p,C){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:vi(l,t,an,!pi);break e;case 2:Qt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(p=Vl+300-pt(),10<p)){if(vi(l,t,an,!pi),ct(l,0,!0)!==0)break e;Zn=t,l.timeoutHandle=gp(Ud.bind(null,l,i,Qt,$l,fu,t,an,Wi,Or,pi,C,"Throttled",-0,0),p);break e}Ud(l,i,Qt,$l,fu,t,an,Wi,Or,pi,C,null,-0,0)}}break}while(!0);Ln(e)}function Ud(e,t,i,l,p,C,L,P,W,se,he,me,le,ae){if(e.timeoutHandle=-1,me=t.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:zn},Ld(t,C,me);var Ce=(C&62914560)===C?Vl-pt():(C&4194048)===C?jd-pt():0;if(Ce=_0(me,Ce),Ce!==null){Zn=C,e.cancelPendingCommit=Ce(Kd.bind(null,e,t,C,i,l,p,L,P,W,he,me,null,le,ae)),vi(e,C,L,!se);return}}Kd(e,t,C,i,l,p,L,P,W)}function Ov(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 l=0;l<i.length;l++){var p=i[l],C=p.getSnapshot;p=p.value;try{if(!tn(C(),p))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 vi(e,t,i,l){t&=~hu,t&=~Wi,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var p=t;0<p;){var C=31-et(p),L=1<<C;l[C]=-1,p&=~L}i!==0&&mt(e,i,t)}function Yl(){return(Ze&6)===0?(Rs(0),!1):!0}function gu(){if(Fe!==null){if(tt===0)var e=Fe.return;else e=Fe,Pn=Ui=null,Lo(e),Er=null,fs=0,e=Fe;for(;e!==null;)_d(e.alternate,e),e=e.return;Fe=null}}function Nr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Jv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Zn=0,gu(),lt=e,Fe=i=In(e.current,null),Ge=t,tt=0,ln=null,pi=!1,Lr=Li(e,t),cu=!1,Or=an=hu=Wi=mi=_t=0,Qt=Ts=null,fu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var p=31-et(l),C=1<<p;t|=e[p],l&=~C}return Qn=t,pl(),i}function Pd(e,t){je=null,$.H=Ss,t===xr||t===Cl?(t=nf(),tt=3):t===So?(t=nf(),tt=4):tt=t===Ko?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ln=t,Fe===null&&(_t=1,jl(e,pn(t,e.current)))}function Fd(){var e=rn.current;return e===null?!0:(Ge&4194048)===Ge?vn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===vn:!1}function qd(){var e=$.H;return $.H=Ss,e===null?Ss:e}function Vd(){var e=$.A;return $.A=Mv,e}function Kl(){_t=4,pi||(Ge&4194048)!==Ge&&rn.current!==null||(Lr=!0),(mi&134217727)===0&&(Wi&134217727)===0||lt===null||vi(lt,Ge,an,!1)}function _u(e,t,i){var l=Ze;Ze|=2;var p=qd(),C=Vd();(lt!==e||Ge!==t)&&($l=null,Nr(e,t)),t=!1;var L=_t;e:do try{if(tt!==0&&Fe!==null){var P=Fe,W=ln;switch(tt){case 8:gu(),L=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var se=tt;if(tt=0,ln=null,jr(e,P,W,se),i&&Lr){L=0;break e}break;default:se=tt,tt=0,ln=null,jr(e,P,W,se)}}Bv(),L=_t;break}catch(he){Pd(e,he)}while(!0);return t&&e.shellSuspendCounter++,Pn=Ui=null,Ze=l,$.H=p,$.A=C,Fe===null&&(lt=null,Ge=0,pl()),L}function Bv(){for(;Fe!==null;)Gd(Fe)}function Nv(e,t){var i=Ze;Ze|=2;var l=qd(),p=Vd();lt!==e||Ge!==t?($l=null,Gl=pt()+500,Nr(e,t)):Lr=Li(e,t);e:do try{if(tt!==0&&Fe!==null){t=Fe;var C=ln;t:switch(tt){case 1:tt=0,ln=null,jr(e,t,C,1);break;case 2:case 9:if(ef(C)){tt=0,ln=null,$d(t);break}t=function(){tt!==2&&tt!==9||lt!==e||(tt=7),Ln(e)},C.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:ef(C)?(tt=0,ln=null,$d(t)):(tt=0,ln=null,jr(e,t,C,7));break;case 5:var L=null;switch(Fe.tag){case 26:L=Fe.memoizedState;case 5:case 27:var P=Fe;if(L?Mp(L):P.stateNode.complete){tt=0,ln=null;var W=P.sibling;if(W!==null)Fe=W;else{var se=P.return;se!==null?(Fe=se,Wl(se)):Fe=null}break t}}tt=0,ln=null,jr(e,t,C,5);break;case 6:tt=0,ln=null,jr(e,t,C,6);break;case 8:gu(),_t=6;break e;default:throw Error(o(462))}}jv();break}catch(he){Pd(e,he)}while(!0);return Pn=Ui=null,$.H=l,$.A=p,Ze=i,Fe!==null?0:(lt=null,Ge=0,pl(),_t)}function jv(){for(;Fe!==null&&!zt();)Gd(Fe)}function Gd(e){var t=md(e.alternate,e,Qn);e.memoizedProps=e.pendingProps,t===null?Wl(e):Fe=t}function $d(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=ud(i,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=ud(i,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Lo(t);default:_d(i,t),t=Fe=qh(t,Qn),t=md(i,t,Qn)}e.memoizedProps=e.pendingProps,t===null?Wl(e):Fe=t}function jr(e,t,i,l){Pn=Ui=null,Lo(t),Er=null,fs=0;var p=t.return;try{if(xv(e,p,t,i,Ge)){_t=1,jl(e,pn(i,e.current)),Fe=null;return}}catch(C){if(p!==null)throw Fe=p,C;_t=1,jl(e,pn(i,e.current)),Fe=null;return}t.flags&32768?(Ke||l===1?e=!0:Lr||(Ge&536870912)!==0?e=!1:(pi=e=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Yd(t,e)):Wl(t)}function Wl(e){var t=e;do{if((t.flags&32768)!==0){Yd(t,pi);return}e=t.return;var i=Av(t.alternate,t,Qn);if(i!==null){Fe=i;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);_t===0&&(_t=5)}function Yd(e,t){do{var i=Tv(e.alternate,e);if(i!==null){i.flags&=32767,Fe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Fe=e;return}Fe=e=i}while(e!==null);_t=6,Fe=null}function Kd(e,t,i,l,p,C,L,P,W){e.cancelPendingCommit=null;do Xl();while(Tt!==0);if((Ze&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(C=t.lanes|t.childLanes,C|=ro,Ee(e,i,C,L,P,W),e===lt&&(Fe=lt=null,Ge=0),Br=t,_i=e,Zn=i,du=C,pu=p,zd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Uv(xe,function(){return Jd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,p=X.p,X.p=2,L=Ze,Ze|=4;try{Dv(e,t,i)}finally{Ze=L,X.p=p,$.T=l}}Tt=1,Wd(),Xd(),Qd()}}function Wd(){if(Tt===1){Tt=0;var e=_i,t=Br,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=$.T,$.T=null;var l=X.p;X.p=2;var p=Ze;Ze|=4;try{Dd(t,e);var C=Du,L=Bh(e.containerInfo),P=C.focusedElem,W=C.selectionRange;if(L!==P&&P&&P.ownerDocument&&Oh(P.ownerDocument.documentElement,P)){if(W!==null&&Ja(P)){var se=W.start,he=W.end;if(he===void 0&&(he=se),"selectionStart"in P)P.selectionStart=se,P.selectionEnd=Math.min(he,P.value.length);else{var me=P.ownerDocument||document,le=me&&me.defaultView||window;if(le.getSelection){var ae=le.getSelection(),Ce=P.textContent.length,Te=Math.min(W.start,Ce),st=W.end===void 0?Te:Math.min(W.end,Ce);!ae.extend&&Te>st&&(L=st,st=Te,Te=L);var J=Lh(P,Te),Q=Lh(P,st);if(J&&Q&&(ae.rangeCount!==1||ae.anchorNode!==J.node||ae.anchorOffset!==J.offset||ae.focusNode!==Q.node||ae.focusOffset!==Q.offset)){var re=me.createRange();re.setStart(J.node,J.offset),ae.removeAllRanges(),Te>st?(ae.addRange(re),ae.extend(Q.node,Q.offset)):(re.setEnd(Q.node,Q.offset),ae.addRange(re))}}}}for(me=[],ae=P;ae=ae.parentNode;)ae.nodeType===1&&me.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<me.length;P++){var pe=me[P];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}oa=!!Tu,Du=Tu=null}finally{Ze=p,X.p=l,$.T=i}}e.current=t,Tt=2}}function Xd(){if(Tt===2){Tt=0;var e=_i,t=Br,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=$.T,$.T=null;var l=X.p;X.p=2;var p=Ze;Ze|=4;try{xd(e,t.alternate,t)}finally{Ze=p,X.p=l,$.T=i}}Tt=3}}function Qd(){if(Tt===4||Tt===3){Tt=0,Ye();var e=_i,t=Br,i=Zn,l=zd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,Br=_i=null,Zd(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(gi=null),Ba(i),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(At,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=$.T,p=X.p,X.p=2,$.T=null;try{for(var C=e.onRecoverableError,L=0;L<l.length;L++){var P=l[L];C(P.value,{componentStack:P.stack})}}finally{$.T=t,X.p=p}}(Zn&3)!==0&&Xl(),Ln(e),p=e.pendingLanes,(i&261930)!==0&&(p&42)!==0?e===mu?Ds++:(Ds=0,mu=e):Ds=0,Rs(0)}}function Zd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,cs(t)))}function Xl(){return Wd(),Xd(),Qd(),Jd()}function Jd(){if(Tt!==5)return!1;var e=_i,t=du;du=0;var i=Ba(Zn),l=$.T,p=X.p;try{X.p=32>i?32:i,$.T=null,i=pu,pu=null;var C=_i,L=Zn;if(Tt=0,Br=_i=null,Zn=0,(Ze&6)!==0)throw Error(o(331));var P=Ze;if(Ze|=4,Bd(C.current),Md(C,C.current,L,i),Ze=P,Rs(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(At,C)}catch{}return!0}finally{X.p=p,$.T=l,Zd(e,t)}}function ep(e,t,i){t=pn(i,t),t=Yo(e.stateNode,t,2),e=ci(e,t,2),e!==null&&(oe(e,2),Ln(e))}function nt(e,t,i){if(e.tag===3)ep(e,e,i);else for(;t!==null;){if(t.tag===3){ep(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(gi===null||!gi.has(l))){e=pn(i,e),i=td(2),l=ci(t,i,2),l!==null&&(nd(i,l,t,e),oe(l,2),Ln(l));break}}t=t.return}}function vu(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new Lv;var p=new Set;l.set(t,p)}else p=l.get(t),p===void 0&&(p=new Set,l.set(t,p));p.has(i)||(cu=!0,p.add(i),e=zv.bind(null,e,t,i),t.then(e,e))}function zv(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,lt===e&&(Ge&i)===i&&(_t===4||_t===3&&(Ge&62914560)===Ge&&300>pt()-Vl?(Ze&2)===0&&Nr(e,0):hu|=i,Or===Ge&&(Or=0)),Ln(e)}function tp(e,t){t===0&&(t=nl()),e=zi(e,t),e!==null&&(oe(e,t),Ln(e))}function Hv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),tp(e,i)}function Iv(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,p=e.memoizedState;p!==null&&(i=p.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),tp(e,i)}function Uv(e,t){return ut(e,t)}var Ql=null,zr=null,yu=!1,Zl=!1,Su=!1,yi=0;function Ln(e){e!==zr&&e.next===null&&(zr===null?Ql=zr=e:zr=zr.next=e),Zl=!0,yu||(yu=!0,Fv())}function Rs(e,t){if(!Su&&Zl){Su=!0;do for(var i=!1,l=Ql;l!==null;){if(e!==0){var p=l.pendingLanes;if(p===0)var C=0;else{var L=l.suspendedLanes,P=l.pingedLanes;C=(1<<31-et(42|e)+1)-1,C&=p&~(L&~P),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(i=!0,sp(l,C))}else C=Ge,C=ct(l,l===lt?C:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(C&3)===0||Li(l,C)||(i=!0,sp(l,C));l=l.next}while(i);Su=!1}}function Pv(){np()}function np(){Zl=yu=!1;var e=0;yi!==0&&Zv()&&(e=yi);for(var t=pt(),i=null,l=Ql;l!==null;){var p=l.next,C=ip(l,t);C===0?(l.next=null,i===null?Ql=p:i.next=p,p===null&&(zr=i)):(i=l,(e!==0||(C&3)!==0)&&(Zl=!0)),l=p}Tt!==0&&Tt!==5||Rs(e),yi!==0&&(yi=0)}function ip(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,p=e.expirationTimes,C=e.pendingLanes&-62914561;0<C;){var L=31-et(C),P=1<<L,W=p[L];W===-1?((P&i)===0||(P&l)!==0)&&(p[L]=La(P,t)):W<=t&&(e.expiredLanes|=P),C&=~P}if(t=lt,i=Ge,i=ct(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&ce(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Li(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&ce(l),Ba(i)){case 2:case 8:i=_e;break;case 32:i=xe;break;case 268435456:i=Ne;break;default:i=xe}return l=rp.bind(null,e),i=ut(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&ce(l),e.callbackPriority=2,e.callbackNode=null,2}function rp(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Xl()&&e.callbackNode!==i)return null;var l=Ge;return l=ct(e,e===lt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Id(e,l,t),ip(e,pt()),e.callbackNode!=null&&e.callbackNode===i?rp.bind(null,e):null)}function sp(e,t){if(Xl())return null;Id(e,t,!0)}function Fv(){e0(function(){(Ze&6)!==0?ut(ue,Pv):np()})}function bu(){if(yi===0){var e=Cr;e===0&&(e=Nn,Nn<<=1,(Nn&261888)===0&&(Nn=256)),yi=e}return yi}function lp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ll(""+e)}function ap(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 qv(e,t,i,l,p){if(t==="submit"&&i&&i.stateNode===p){var C=lp((p[$t]||null).action),L=l.submitter;L&&(t=(t=L[$t]||null)?lp(t.formAction):L.getAttribute("formAction"),t!==null&&(C=t,L=null));var P=new cl("action","action",null,l,p);e.push({event:P,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(yi!==0){var W=L?ap(p,L):new FormData(p);Po(i,{pending:!0,data:W,method:p.method,action:C},null,W)}}else typeof C=="function"&&(P.preventDefault(),W=L?ap(p,L):new FormData(p),Po(i,{pending:!0,data:W,method:p.method,action:C},C,W))},currentTarget:p}]})}}for(var Cu=0;Cu<io.length;Cu++){var wu=io[Cu],Vv=wu.toLowerCase(),Gv=wu[0].toUpperCase()+wu.slice(1);xn(Vv,"on"+Gv)}xn(zh,"onAnimationEnd"),xn(Hh,"onAnimationIteration"),xn(Ih,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(av,"onTransitionRun"),xn(ov,"onTransitionStart"),xn(uv,"onTransitionCancel"),xn(Uh,"onTransitionEnd"),or("onMouseEnter",["mouseout","mouseover"]),or("onMouseLeave",["mouseout","mouseover"]),or("onPointerEnter",["pointerout","pointerover"]),or("onPointerLeave",["pointerout","pointerover"]),Oi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Oi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Oi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Oi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Oi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Oi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ms="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(" "),$v=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ms));function op(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],p=l.event;l=l.listeners;e:{var C=void 0;if(t)for(var L=l.length-1;0<=L;L--){var P=l[L],W=P.instance,se=P.currentTarget;if(P=P.listener,W!==C&&p.isPropagationStopped())break e;C=P,p.currentTarget=se;try{C(p)}catch(he){dl(he)}p.currentTarget=null,C=W}else for(L=0;L<l.length;L++){if(P=l[L],W=P.instance,se=P.currentTarget,P=P.listener,W!==C&&p.isPropagationStopped())break e;C=P,p.currentTarget=se;try{C(p)}catch(he){dl(he)}p.currentTarget=null,C=W}}}}function qe(e,t){var i=t[Na];i===void 0&&(i=t[Na]=new Set);var l=e+"__bubble";i.has(l)||(up(t,e,2,!1),i.add(l))}function xu(e,t,i){var l=0;t&&(l|=4),up(i,e,l,t)}var Jl="_reactListening"+Math.random().toString(36).slice(2);function Eu(e){if(!e[Jl]){e[Jl]=!0,th.forEach(function(i){i!=="selectionchange"&&($v.has(i)||xu(i,!1,e),xu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jl]||(t[Jl]=!0,xu("selectionchange",!1,t))}}function up(e,t,i,l){switch(Hp(t)){case 2:var p=S0;break;case 8:p=b0;break;default:p=Uu}i=p.bind(null,t,i,e),p=void 0,!Va||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(p=!0),l?p!==void 0?e.addEventListener(t,i,{capture:!0,passive:p}):e.addEventListener(t,i,!0):p!==void 0?e.addEventListener(t,i,{passive:p}):e.addEventListener(t,i,!1)}function ku(e,t,i,l,p){var C=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var L=l.tag;if(L===3||L===4){var P=l.stateNode.containerInfo;if(P===p)break;if(L===4)for(L=l.return;L!==null;){var W=L.tag;if((W===3||W===4)&&L.stateNode.containerInfo===p)return;L=L.return}for(;P!==null;){if(L=sr(P),L===null)return;if(W=L.tag,W===5||W===6||W===26||W===27){l=C=L;continue e}P=P.parentNode}}l=l.return}dh(function(){var se=C,he=Fa(i),me=[];e:{var le=Ph.get(e);if(le!==void 0){var ae=cl,Ce=e;switch(e){case"keypress":if(ol(i)===0)break e;case"keydown":case"keyup":ae=I_;break;case"focusin":Ce="focus",ae=Ka;break;case"focusout":Ce="blur",ae=Ka;break;case"beforeblur":case"afterblur":ae=Ka;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":ae=gh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=A_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=F_;break;case zh:case Hh:case Ih:ae=R_;break;case Uh:ae=V_;break;case"scroll":case"scrollend":ae=E_;break;case"wheel":ae=$_;break;case"copy":case"cut":case"paste":ae=L_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=vh;break;case"toggle":case"beforetoggle":ae=K_}var Te=(t&4)!==0,st=!Te&&(e==="scroll"||e==="scrollend"),J=Te?le!==null?le+"Capture":null:le;Te=[];for(var Q=se,re;Q!==null;){var pe=Q;if(re=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||re===null||J===null||(pe=Jr(Q,J),pe!=null&&Te.push(Ls(Q,pe,re))),st)break;Q=Q.return}0<Te.length&&(le=new ae(le,Ce,null,i,he),me.push({event:le,listeners:Te}))}}if((t&7)===0){e:{if(le=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",le&&i!==Pa&&(Ce=i.relatedTarget||i.fromElement)&&(sr(Ce)||Ce[rr]))break e;if((ae||le)&&(le=he.window===he?he:(le=he.ownerDocument)?le.defaultView||le.parentWindow:window,ae?(Ce=i.relatedTarget||i.toElement,ae=se,Ce=Ce?sr(Ce):null,Ce!==null&&(st=b(Ce),Te=Ce.tag,Ce!==st||Te!==5&&Te!==27&&Te!==6)&&(Ce=null)):(ae=null,Ce=se),ae!==Ce)){if(Te=gh,pe="onMouseLeave",J="onMouseEnter",Q="mouse",(e==="pointerout"||e==="pointerover")&&(Te=vh,pe="onPointerLeave",J="onPointerEnter",Q="pointer"),st=ae==null?le:Zr(ae),re=Ce==null?le:Zr(Ce),le=new Te(pe,Q+"leave",ae,i,he),le.target=st,le.relatedTarget=re,pe=null,sr(he)===se&&(Te=new Te(J,Q+"enter",Ce,i,he),Te.target=re,Te.relatedTarget=st,pe=Te),st=pe,ae&&Ce)t:{for(Te=Yv,J=ae,Q=Ce,re=0,pe=J;pe;pe=Te(pe))re++;pe=0;for(var ke=Q;ke;ke=Te(ke))pe++;for(;0<re-pe;)J=Te(J),re--;for(;0<pe-re;)Q=Te(Q),pe--;for(;re--;){if(J===Q||Q!==null&&J===Q.alternate){Te=J;break t}J=Te(J),Q=Te(Q)}Te=null}else Te=null;ae!==null&&cp(me,le,ae,Te,!1),Ce!==null&&st!==null&&cp(me,st,Ce,Te,!0)}}e:{if(le=se?Zr(se):window,ae=le.nodeName&&le.nodeName.toLowerCase(),ae==="select"||ae==="input"&&le.type==="file")var Xe=kh;else if(xh(le))if(Ah)Xe=rv;else{Xe=nv;var we=tv}else ae=le.nodeName,!ae||ae.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?se&&Ua(se.elementType)&&(Xe=kh):Xe=iv;if(Xe&&(Xe=Xe(e,se))){Eh(me,Xe,i,he);break e}we&&we(e,le,se),e==="focusout"&&se&&le.type==="number"&&se.memoizedProps.value!=null&&Ia(le,"number",le.value)}switch(we=se?Zr(se):window,e){case"focusin":(xh(we)||we.contentEditable==="true")&&(pr=we,eo=se,as=null);break;case"focusout":as=eo=pr=null;break;case"mousedown":to=!0;break;case"contextmenu":case"mouseup":case"dragend":to=!1,Nh(me,i,he);break;case"selectionchange":if(lv)break;case"keydown":case"keyup":Nh(me,i,he)}var ze;if(Xa)e:{switch(e){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else dr?Ch(e,i)&&($e="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&($e="onCompositionStart");$e&&(yh&&i.locale!=="ko"&&(dr||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&dr&&(ze=ph()):(ii=he,Ga="value"in ii?ii.value:ii.textContent,dr=!0)),we=ea(se,$e),0<we.length&&($e=new _h($e,e,null,i,he),me.push({event:$e,listeners:we}),ze?$e.data=ze:(ze=wh(i),ze!==null&&($e.data=ze)))),(ze=X_?Q_(e,i):Z_(e,i))&&($e=ea(se,"onBeforeInput"),0<$e.length&&(we=new _h("onBeforeInput","beforeinput",null,i,he),me.push({event:we,listeners:$e}),we.data=ze)),qv(me,e,se,i,he)}op(me,t)})}function Ls(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ea(e,t){for(var i=t+"Capture",l=[];e!==null;){var p=e,C=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||C===null||(p=Jr(e,i),p!=null&&l.unshift(Ls(e,p,C)),p=Jr(e,t),p!=null&&l.push(Ls(e,p,C))),e.tag===3)return l;e=e.return}return[]}function Yv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cp(e,t,i,l,p){for(var C=t._reactName,L=[];i!==null&&i!==l;){var P=i,W=P.alternate,se=P.stateNode;if(P=P.tag,W!==null&&W===l)break;P!==5&&P!==26&&P!==27||se===null||(W=se,p?(se=Jr(i,C),se!=null&&L.unshift(Ls(i,se,W))):p||(se=Jr(i,C),se!=null&&L.push(Ls(i,se,W)))),i=i.return}L.length!==0&&e.push({event:t,listeners:L})}var Kv=/\r\n?/g,Wv=/\u0000|\uFFFD/g;function hp(e){return(typeof e=="string"?e:""+e).replace(Kv,`
|
|
49
|
+
`).replace(Wv,"")}function fp(e,t){return t=hp(t),hp(e)===t}function rt(e,t,i,l,p,C){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||cr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&cr(e,""+l);break;case"className":rl(e,"class",l);break;case"tabIndex":rl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(e,i,l);break;case"style":hh(e,l,C);break;case"data":if(t!=="object"){rl(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=ll(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="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 C=="function"&&(i==="formAction"?(t!=="input"&&rt(e,t,"name",p.name,p,null),rt(e,t,"formEncType",p.formEncType,p,null),rt(e,t,"formMethod",p.formMethod,p,null),rt(e,t,"formTarget",p.formTarget,p,null)):(rt(e,t,"encType",p.encType,p,null),rt(e,t,"method",p.method,p,null),rt(e,t,"target",p.target,p,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=ll(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=zn);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=ll(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":qe("beforetoggle",e),qe("toggle",e),il(e,"popover",l);break;case"xlinkActuate":jn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":jn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":jn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":jn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":jn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":jn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":jn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":jn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":jn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":il(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=w_.get(i)||i,il(e,i,l))}}function Au(e,t,i,l,p,C){switch(i){case"style":hh(e,l,C);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?cr(e,l):(typeof l=="number"||typeof l=="bigint")&&cr(e,""+l);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),t=i.slice(2,p?i.length-7:void 0),C=e[$t]||null,C=C!=null?C[i]:null,typeof C=="function"&&e.removeEventListener(t,C,p),typeof l=="function")){typeof C!="function"&&C!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,p);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):il(e,i,l)}}}function jt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var l=!1,p=!1,C;for(C in i)if(i.hasOwnProperty(C)){var L=i[C];if(L!=null)switch(C){case"src":l=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,C,L,i,null)}}p&&rt(e,t,"srcSet",i.srcSet,i,null),l&&rt(e,t,"src",i.src,i,null);return;case"input":qe("invalid",e);var P=C=L=p=null,W=null,se=null;for(l in i)if(i.hasOwnProperty(l)){var he=i[l];if(he!=null)switch(l){case"name":p=he;break;case"type":L=he;break;case"checked":W=he;break;case"defaultChecked":se=he;break;case"value":C=he;break;case"defaultValue":P=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(o(137,t));break;default:rt(e,t,l,he,i,null)}}ah(e,C,P,W,se,L,p,!1);return;case"select":qe("invalid",e),l=L=C=null;for(p in i)if(i.hasOwnProperty(p)&&(P=i[p],P!=null))switch(p){case"value":C=P;break;case"defaultValue":L=P;break;case"multiple":l=P;default:rt(e,t,p,P,i,null)}t=C,i=L,e.multiple=!!l,t!=null?ur(e,!!l,t,!1):i!=null&&ur(e,!!l,i,!0);return;case"textarea":qe("invalid",e),C=p=l=null;for(L in i)if(i.hasOwnProperty(L)&&(P=i[L],P!=null))switch(L){case"value":l=P;break;case"defaultValue":p=P;break;case"children":C=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(91));break;default:rt(e,t,L,P,i,null)}uh(e,l,p,C);return;case"option":for(W in i)if(i.hasOwnProperty(W)&&(l=i[W],l!=null))switch(W){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:rt(e,t,W,l,i,null)}return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(l=0;l<Ms.length;l++)qe(Ms[l],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("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(se in i)if(i.hasOwnProperty(se)&&(l=i[se],l!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,se,l,i,null)}return;default:if(Ua(t)){for(he in i)i.hasOwnProperty(he)&&(l=i[he],l!==void 0&&Au(e,t,he,l,i,void 0));return}}for(P in i)i.hasOwnProperty(P)&&(l=i[P],l!=null&&rt(e,t,P,l,i,null))}function Xv(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,C=null,L=null,P=null,W=null,se=null,he=null;for(ae in i){var me=i[ae];if(i.hasOwnProperty(ae)&&me!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":W=me;default:l.hasOwnProperty(ae)||rt(e,t,ae,null,l,me)}}for(var le in l){var ae=l[le];if(me=i[le],l.hasOwnProperty(le)&&(ae!=null||me!=null))switch(le){case"type":C=ae;break;case"name":p=ae;break;case"checked":se=ae;break;case"defaultChecked":he=ae;break;case"value":L=ae;break;case"defaultValue":P=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:ae!==me&&rt(e,t,le,ae,l,me)}}Ha(e,L,P,W,se,he,C,p);return;case"select":ae=L=P=le=null;for(C in i)if(W=i[C],i.hasOwnProperty(C)&&W!=null)switch(C){case"value":break;case"multiple":ae=W;default:l.hasOwnProperty(C)||rt(e,t,C,null,l,W)}for(p in l)if(C=l[p],W=i[p],l.hasOwnProperty(p)&&(C!=null||W!=null))switch(p){case"value":le=C;break;case"defaultValue":P=C;break;case"multiple":L=C;default:C!==W&&rt(e,t,p,C,l,W)}t=P,i=L,l=ae,le!=null?ur(e,!!i,le,!1):!!l!=!!i&&(t!=null?ur(e,!!i,t,!0):ur(e,!!i,i?[]:"",!1));return;case"textarea":ae=le=null;for(P in i)if(p=i[P],i.hasOwnProperty(P)&&p!=null&&!l.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:rt(e,t,P,null,l,p)}for(L in l)if(p=l[L],C=i[L],l.hasOwnProperty(L)&&(p!=null||C!=null))switch(L){case"value":le=p;break;case"defaultValue":ae=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:p!==C&&rt(e,t,L,p,l,C)}oh(e,le,ae);return;case"option":for(var Ce in i)if(le=i[Ce],i.hasOwnProperty(Ce)&&le!=null&&!l.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:rt(e,t,Ce,null,l,le)}for(W in l)if(le=l[W],ae=i[W],l.hasOwnProperty(W)&&le!==ae&&(le!=null||ae!=null))switch(W){case"selected":e.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:rt(e,t,W,le,l,ae)}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 Te in i)le=i[Te],i.hasOwnProperty(Te)&&le!=null&&!l.hasOwnProperty(Te)&&rt(e,t,Te,null,l,le);for(se in l)if(le=l[se],ae=i[se],l.hasOwnProperty(se)&&le!==ae&&(le!=null||ae!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:rt(e,t,se,le,l,ae)}return;default:if(Ua(t)){for(var st in i)le=i[st],i.hasOwnProperty(st)&&le!==void 0&&!l.hasOwnProperty(st)&&Au(e,t,st,void 0,l,le);for(he in l)le=l[he],ae=i[he],!l.hasOwnProperty(he)||le===ae||le===void 0&&ae===void 0||Au(e,t,he,le,l,ae);return}}for(var J in i)le=i[J],i.hasOwnProperty(J)&&le!=null&&!l.hasOwnProperty(J)&&rt(e,t,J,null,l,le);for(me in l)le=l[me],ae=i[me],!l.hasOwnProperty(me)||le===ae||le==null&&ae==null||rt(e,t,me,le,l,ae)}function dp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Qv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var p=i[l],C=p.transferSize,L=p.initiatorType,P=p.duration;if(C&&P&&dp(L)){for(L=0,P=p.responseEnd,l+=1;l<i.length;l++){var W=i[l],se=W.startTime;if(se>P)break;var he=W.transferSize,me=W.initiatorType;he&&dp(me)&&(W=W.responseEnd,L+=he*(W<P?1:(P-se)/(W-se)))}if(--l,t+=8*(C+L)/(p.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 Tu=null,Du=null;function ta(e){return e.nodeType===9?e:e.ownerDocument}function pp(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 mp(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 Ru(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 Mu=null;function Zv(){var e=window.event;return e&&e.type==="popstate"?e===Mu?!1:(Mu=e,!0):(Mu=null,!1)}var gp=typeof setTimeout=="function"?setTimeout:void 0,Jv=typeof clearTimeout=="function"?clearTimeout:void 0,_p=typeof Promise=="function"?Promise:void 0,e0=typeof queueMicrotask=="function"?queueMicrotask:typeof _p<"u"?function(e){return _p.resolve(null).then(e).catch(t0)}:gp;function t0(e){setTimeout(function(){throw e})}function Si(e){return e==="head"}function vp(e,t){var i=t,l=0;do{var p=i.nextSibling;if(e.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(p),Pr(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Os(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Os(i);for(var C=i.firstChild;C;){var L=C.nextSibling,P=C.nodeName;C[Qr]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&C.rel.toLowerCase()==="stylesheet"||i.removeChild(C),C=L}}else i==="body"&&Os(e.ownerDocument.body);i=p}while(i);Pr(t)}function yp(e,t){var i=e;e=0;do{var l=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||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function Lu(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":Lu(i),ja(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function n0(e,t,i,l){for(;e.nodeType===1;){var p=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Qr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(C=e.getAttribute("rel"),C==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(C!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(C=e.getAttribute("src"),(C!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&C&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var C=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===C)return e}else return e;if(e=yn(e.nextSibling),e===null)break}return null}function i0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=yn(e.nextSibling),e===null))return null;return e}function Sp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=yn(e.nextSibling),e===null))return null;return e}function Ou(e){return e.data==="$?"||e.data==="$~"}function Bu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function r0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function yn(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 Nu=null;function bp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return yn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Cp(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 wp(e,t,i){switch(t=ta(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 Os(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ja(e)}var Sn=new Map,xp=new Set;function na(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Jn=X.d;X.d={f:s0,r:l0,D:a0,C:o0,L:u0,m:c0,X:f0,S:h0,M:d0};function s0(){var e=Jn.f(),t=Yl();return e||t}function l0(e){var t=lr(e);t!==null&&t.tag===5&&t.type==="form"?Pf(t):Jn.r(e)}var Hr=typeof document>"u"?null:document;function Ep(e,t,i){var l=Hr;if(l&&typeof t=="string"&&t){var p=fn(t);p='link[rel="'+e+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),xp.has(p)||(xp.add(p),e={rel:e,crossOrigin:i,href:t},l.querySelector(p)===null&&(t=l.createElement("link"),jt(t,"link",e),Dt(t),l.head.appendChild(t)))}}function a0(e){Jn.D(e),Ep("dns-prefetch",e,null)}function o0(e,t){Jn.C(e,t),Ep("preconnect",e,t)}function u0(e,t,i){Jn.L(e,t,i);var l=Hr;if(l&&e&&t){var p='link[rel="preload"][as="'+fn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+fn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+fn(i.imageSizes)+'"]')):p+='[href="'+fn(e)+'"]';var C=p;switch(t){case"style":C=Ir(e);break;case"script":C=Ur(e)}Sn.has(C)||(e=c({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Sn.set(C,e),l.querySelector(p)!==null||t==="style"&&l.querySelector(Bs(C))||t==="script"&&l.querySelector(Ns(C))||(t=l.createElement("link"),jt(t,"link",e),Dt(t),l.head.appendChild(t)))}}function c0(e,t){Jn.m(e,t);var i=Hr;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",p='link[rel="modulepreload"][as="'+fn(l)+'"][href="'+fn(e)+'"]',C=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=Ur(e)}if(!Sn.has(C)&&(e=c({rel:"modulepreload",href:e},t),Sn.set(C,e),i.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ns(C)))return}l=i.createElement("link"),jt(l,"link",e),Dt(l),i.head.appendChild(l)}}}function h0(e,t,i){Jn.S(e,t,i);var l=Hr;if(l&&e){var p=ar(l).hoistableStyles,C=Ir(e);t=t||"default";var L=p.get(C);if(!L){var P={loading:0,preload:null};if(L=l.querySelector(Bs(C)))P.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Sn.get(C))&&ju(e,i);var W=L=l.createElement("link");Dt(W),jt(W,"link",e),W._p=new Promise(function(se,he){W.onload=se,W.onerror=he}),W.addEventListener("load",function(){P.loading|=1}),W.addEventListener("error",function(){P.loading|=2}),P.loading|=4,ia(L,t,l)}L={type:"stylesheet",instance:L,count:1,state:P},p.set(C,L)}}}function f0(e,t){Jn.X(e,t);var i=Hr;if(i&&e){var l=ar(i).hoistableScripts,p=Ur(e),C=l.get(p);C||(C=i.querySelector(Ns(p)),C||(e=c({src:e,async:!0},t),(t=Sn.get(p))&&zu(e,t),C=i.createElement("script"),Dt(C),jt(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(p,C))}}function d0(e,t){Jn.M(e,t);var i=Hr;if(i&&e){var l=ar(i).hoistableScripts,p=Ur(e),C=l.get(p);C||(C=i.querySelector(Ns(p)),C||(e=c({src:e,async:!0,type:"module"},t),(t=Sn.get(p))&&zu(e,t),C=i.createElement("script"),Dt(C),jt(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(p,C))}}function kp(e,t,i,l){var p=(p=ee.current)?na(p):null;if(!p)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Ir(i.href),i=ar(p).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Ir(i.href);var C=ar(p).hoistableStyles,L=C.get(e);if(L||(p=p.ownerDocument||p,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(e,L),(C=p.querySelector(Bs(e)))&&!C._p&&(L.instance=C,L.state.loading=5),Sn.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},Sn.set(e,i),C||p0(p,e,i,L.state))),t&&l===null)throw Error(o(528,""));return L}if(t&&l!==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=Ur(i),i=ar(p).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ir(e){return'href="'+fn(e)+'"'}function Bs(e){return'link[rel="stylesheet"]['+e+"]"}function Ap(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function p0(e,t,i,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),jt(t,"link",i),Dt(t),e.head.appendChild(t))}function Ur(e){return'[src="'+fn(e)+'"]'}function Ns(e){return"script[async]"+e}function Tp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+fn(i.href)+'"]');if(l)return t.instance=l,Dt(l),l;var p=c({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Dt(l),jt(l,"style",p),ia(l,i.precedence,e),t.instance=l;case"stylesheet":p=Ir(i.href);var C=e.querySelector(Bs(p));if(C)return t.state.loading|=4,t.instance=C,Dt(C),C;l=Ap(i),(p=Sn.get(p))&&ju(l,p),C=(e.ownerDocument||e).createElement("link"),Dt(C);var L=C;return L._p=new Promise(function(P,W){L.onload=P,L.onerror=W}),jt(C,"link",l),t.state.loading|=4,ia(C,i.precedence,e),t.instance=C;case"script":return C=Ur(i.src),(p=e.querySelector(Ns(C)))?(t.instance=p,Dt(p),p):(l=i,(p=Sn.get(C))&&(l=c({},i),zu(l,p)),e=e.ownerDocument||e,p=e.createElement("script"),Dt(p),jt(p,"link",l),e.head.appendChild(p),t.instance=p);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ia(l,i.precedence,e));return t.instance}function ia(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,C=p,L=0;L<l.length;L++){var P=l[L];if(P.dataset.precedence===t)C=P;else if(C!==p)break}C?C.parentNode.insertBefore(e,C.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ra=null;function Dp(e,t,i){if(ra===null){var l=new Map,p=ra=new Map;p.set(i,l)}else p=ra,l=p.get(i),l||(l=new Map,p.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),p=0;p<i.length;p++){var C=i[p];if(!(C[Qr]||C[Lt]||e==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var L=C.getAttribute(t)||"";L=e+L;var P=l.get(L);P?P.push(C):l.set(L,[C])}}return l}function Rp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function m0(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 Mp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function g0(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var p=Ir(l.href),C=t.querySelector(Bs(p));if(C){t=C._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=sa.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=C,Dt(C);return}C=t.ownerDocument||t,l=Ap(l),(p=Sn.get(p))&&ju(l,p),C=C.createElement("link"),Dt(C);var L=C;L._p=new Promise(function(P,W){L.onload=P,L.onerror=W}),jt(C,"link",l),i.instance=C}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=sa.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Hu=0;function _0(e,t){return e.stylesheets&&e.count===0&&aa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&aa(e,e.stylesheets),e.unsuspend){var C=e.unsuspend;e.unsuspend=null,C()}},6e4+t);0<e.imgBytes&&Hu===0&&(Hu=62500*Qv());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&aa(e,e.stylesheets),e.unsuspend)){var C=e.unsuspend;e.unsuspend=null,C()}},(e.imgBytes>Hu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function sa(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)aa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var la=null;function aa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,la=new Map,t.forEach(v0,e),la=null,sa.call(e))}function v0(e,t){if(!(t.state.loading&4)){var i=la.get(e);if(i)var l=i.get(null);else{i=new Map,la.set(e,i);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<p.length;C++){var L=p[C];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(i.set(L.dataset.precedence,L),l=L)}l&&i.set(null,l)}p=t.instance,L=p.getAttribute("data-precedence"),C=i.get(L)||l,C===l&&i.set(null,p),i.set(L,p),this.count++,l=sa.bind(this),p.addEventListener("load",l),p.addEventListener("error",l),C?C.parentNode.insertBefore(p,C.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),t.state.loading|=4}}var js={$$typeof:v,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function y0(e,t,i,l,p,C,L,P,W){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=Xr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xr(0),this.hiddenUpdates=Xr(null),this.identifierPrefix=l,this.onUncaughtError=p,this.onCaughtError=C,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function Lp(e,t,i,l,p,C,L,P,W,se,he,me){return e=new y0(e,t,i,L,W,se,he,me,P),t=1,C===!0&&(t|=24),C=nn(3,null,null,t),e.current=C,C.stateNode=e,t=_o(),t.refCount++,e.pooledCache=t,t.refCount++,C.memoizedState={element:l,isDehydrated:i,cache:t},bo(C),e}function Op(e){return e?(e=_r,e):_r}function Bp(e,t,i,l,p,C){p=Op(p),l.context===null?l.context=p:l.pendingContext=p,l=ui(t),l.payload={element:i},C=C===void 0?null:C,C!==null&&(l.callback=C),i=ci(e,l,t),i!==null&&(Zt(i,e,t),ps(i,e,t))}function Np(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Iu(e,t){Np(e,t),(e=e.alternate)&&Np(e,t)}function jp(e){if(e.tag===13||e.tag===31){var t=zi(e,67108864);t!==null&&Zt(t,e,67108864),Iu(e,67108864)}}function zp(e){if(e.tag===13||e.tag===31){var t=on();t=Oa(t);var i=zi(e,t);i!==null&&Zt(i,e,t),Iu(e,t)}}var oa=!0;function S0(e,t,i,l){var p=$.T;$.T=null;var C=X.p;try{X.p=2,Uu(e,t,i,l)}finally{X.p=C,$.T=p}}function b0(e,t,i,l){var p=$.T;$.T=null;var C=X.p;try{X.p=8,Uu(e,t,i,l)}finally{X.p=C,$.T=p}}function Uu(e,t,i,l){if(oa){var p=Pu(l);if(p===null)ku(e,t,l,ua,i),Ip(e,l);else if(w0(p,e,t,i,l))l.stopPropagation();else if(Ip(e,l),t&4&&-1<C0.indexOf(e)){for(;p!==null;){var C=lr(p);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var L=Cn(C.pendingLanes);if(L!==0){var P=C;for(P.pendingLanes|=2,P.entangledLanes|=2;L;){var W=1<<31-et(L);P.entanglements[1]|=W,L&=~W}Ln(C),(Ze&6)===0&&(Gl=pt()+500,Rs(0))}}break;case 31:case 13:P=zi(C,2),P!==null&&Zt(P,C,2),Yl(),Iu(C,2)}if(C=Pu(l),C===null&&ku(e,t,l,ua,i),C===p)break;p=C}p!==null&&l.stopPropagation()}else ku(e,t,l,null,i)}}function Pu(e){return e=Fa(e),Fu(e)}var ua=null;function Fu(e){if(ua=null,e=sr(e),e!==null){var t=b(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=a(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ua=e,null}function Hp(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(Ht()){case ue:return 2;case _e:return 8;case xe:case Oe:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var qu=!1,bi=null,Ci=null,wi=null,zs=new Map,Hs=new Map,xi=[],C0="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 Ip(e,t){switch(e){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":zs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hs.delete(t.pointerId)}}function Is(e,t,i,l,p,C){return e===null||e.nativeEvent!==C?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:C,targetContainers:[p]},t!==null&&(t=lr(t),t!==null&&jp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,p!==null&&t.indexOf(p)===-1&&t.push(p),e)}function w0(e,t,i,l,p){switch(t){case"focusin":return bi=Is(bi,e,t,i,l,p),!0;case"dragenter":return Ci=Is(Ci,e,t,i,l,p),!0;case"mouseover":return wi=Is(wi,e,t,i,l,p),!0;case"pointerover":var C=p.pointerId;return zs.set(C,Is(zs.get(C)||null,e,t,i,l,p)),!0;case"gotpointercapture":return C=p.pointerId,Hs.set(C,Is(Hs.get(C)||null,e,t,i,l,p)),!0}return!1}function Up(e){var t=sr(e.target);if(t!==null){var i=b(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,Jc(e.priority,function(){zp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Jc(e.priority,function(){zp(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 ca(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Pu(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);Pa=l,i.target.dispatchEvent(l),Pa=null}else return t=lr(i),t!==null&&jp(t),e.blockedOn=i,!1;t.shift()}return!0}function Pp(e,t,i){ca(e)&&i.delete(t)}function x0(){qu=!1,bi!==null&&ca(bi)&&(bi=null),Ci!==null&&ca(Ci)&&(Ci=null),wi!==null&&ca(wi)&&(wi=null),zs.forEach(Pp),Hs.forEach(Pp)}function ha(e,t){e.blockedOn===t&&(e.blockedOn=null,qu||(qu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,x0)))}var fa=null;function Fp(e){fa!==e&&(fa=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){fa===e&&(fa=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],p=e[t+2];if(typeof l!="function"){if(Fu(l||i)===null)continue;break}var C=lr(i);C!==null&&(e.splice(t,3),t-=3,Po(C,{pending:!0,data:p,method:i.method,action:l},l,p))}}))}function Pr(e){function t(W){return ha(W,e)}bi!==null&&ha(bi,e),Ci!==null&&ha(Ci,e),wi!==null&&ha(wi,e),zs.forEach(t),Hs.forEach(t);for(var i=0;i<xi.length;i++){var l=xi[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<xi.length&&(i=xi[0],i.blockedOn===null);)Up(i),i.blockedOn===null&&xi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var p=i[l],C=i[l+1],L=p[$t]||null;if(typeof C=="function")L||Fp(i);else if(L){var P=null;if(C&&C.hasAttribute("formAction")){if(p=C,L=C[$t]||null)P=L.formAction;else if(Fu(p)!==null)continue}else P=L.action;typeof P=="function"?i[l+1]=P:(i.splice(l,3),l-=3),Fp(i)}}}function qp(){function e(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(L){return p=L})},focusReset:"manual",scroll:"manual"})}function t(){p!==null&&(p(),p=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var C=navigation.currentEntry;C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,p=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),p!==null&&(p(),p=null)}}}function Vu(e){this._internalRoot=e}da.prototype.render=Vu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=on();Bp(i,l,e,t,null,null)},da.prototype.unmount=Vu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bp(e.current,2,null,e,null,null),Yl(),t[rr]=null}};function da(e){this._internalRoot=e}da.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zc();e={blockedOn:null,target:e,priority:t};for(var i=0;i<xi.length&&t!==0&&t<xi[i].priority;i++);xi.splice(i,0,e),i===0&&Up(e)}};var Vp=r.version;if(Vp!=="19.2.6")throw Error(o(527,Vp,"19.2.6"));X.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=h(t),e=e!==null?d(e):null,e=e===null?null:e.stateNode,e};var E0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pa.isDisabled&&pa.supportsFiber)try{At=pa.inject(E0),yt=pa}catch{}}return Ps.createRoot=function(e,t){if(!m(e))throw Error(o(299));var i=!1,l="",p=Qf,C=Zf,L=Jf;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(p=t.onUncaughtError),t.onCaughtError!==void 0&&(C=t.onCaughtError),t.onRecoverableError!==void 0&&(L=t.onRecoverableError)),t=Lp(e,1,!1,null,null,i,l,null,p,C,L,qp),e[rr]=t.current,Eu(e),new Vu(t)},Ps.hydrateRoot=function(e,t,i){if(!m(e))throw Error(o(299));var l=!1,p="",C=Qf,L=Zf,P=Jf,W=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(C=i.onUncaughtError),i.onCaughtError!==void 0&&(L=i.onCaughtError),i.onRecoverableError!==void 0&&(P=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=Lp(e,1,!0,t,i??null,l,p,W,C,L,P,qp),t.context=Op(null),i=t.current,l=on(),l=Oa(l),p=ui(l),p.callback=null,ci(i,p,l),i=l,t.current.lanes=i,oe(t,i),Ln(t),e[rr]=t.current,Eu(e),new da(t)},Ps.version="19.2.6",Ps}var tm;function z0(){if(tm)return Yu.exports;tm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Yu.exports=j0(),Yu.exports}var H0=z0();const Yr=function(n,r){let m=n;const b=$s[r];let f=null,a=0,u=null;const h=[],d={},c=function(T,E){a=m*4+17,f=(function(R){const B=new Array(R);for(let H=0;H<R;H+=1){B[H]=new Array(R);for(let F=0;F<R;F+=1)B[H][F]=null}return B})(a),S(0,0),S(a-7,0),S(0,a-7),x(),k(),_(T,E),m>=7&&y(T),u==null&&(u=A(m,b,h)),g(u,E)},S=function(T,E){for(let R=-1;R<=7;R+=1)if(!(T+R<=-1||a<=T+R))for(let B=-1;B<=7;B+=1)E+B<=-1||a<=E+B||(0<=R&&R<=6&&(B==0||B==6)||0<=B&&B<=6&&(R==0||R==6)||2<=R&&R<=4&&2<=B&&B<=4?f[T+R][E+B]=!0:f[T+R][E+B]=!1)},w=function(){let T=0,E=0;for(let R=0;R<8;R+=1){c(!0,R);const B=Ai.getLostPoint(d);(R==0||T>B)&&(T=B,E=R)}return E},k=function(){for(let T=8;T<a-8;T+=1)f[T][6]==null&&(f[T][6]=T%2==0);for(let T=8;T<a-8;T+=1)f[6][T]==null&&(f[6][T]=T%2==0)},x=function(){const T=Ai.getPatternPosition(m);for(let E=0;E<T.length;E+=1)for(let R=0;R<T.length;R+=1){const B=T[E],H=T[R];if(f[B][H]==null)for(let F=-2;F<=2;F+=1)for(let q=-2;q<=2;q+=1)F==-2||F==2||q==-2||q==2||F==0&&q==0?f[B+F][H+q]=!0:f[B+F][H+q]=!1}},y=function(T){const E=Ai.getBCHTypeNumber(m);for(let R=0;R<18;R+=1){const B=!T&&(E>>R&1)==1;f[Math.floor(R/3)][R%3+a-8-3]=B}for(let R=0;R<18;R+=1){const B=!T&&(E>>R&1)==1;f[R%3+a-8-3][Math.floor(R/3)]=B}},_=function(T,E){const R=b<<3|E,B=Ai.getBCHTypeInfo(R);for(let H=0;H<15;H+=1){const F=!T&&(B>>H&1)==1;H<6?f[H][8]=F:H<8?f[H+1][8]=F:f[a-15+H][8]=F}for(let H=0;H<15;H+=1){const F=!T&&(B>>H&1)==1;H<8?f[8][a-H-1]=F:H<9?f[8][15-H-1+1]=F:f[8][15-H-1]=F}f[a-8][8]=!T},g=function(T,E){let R=-1,B=a-1,H=7,F=0;const q=Ai.getMaskFunction(E);for(let Y=a-1;Y>0;Y-=2)for(Y==6&&(Y-=1);;){for(let K=0;K<2;K+=1)if(f[B][Y-K]==null){let $=!1;F<T.length&&($=(T[F]>>>H&1)==1),q(B,Y-K)&&($=!$),f[B][Y-K]=$,H-=1,H==-1&&(F+=1,H=7)}if(B+=R,B<0||a<=B){B-=R,R=-R;break}}},v=function(T,E){let R=0,B=0,H=0;const F=new Array(E.length),q=new Array(E.length);for(let X=0;X<E.length;X+=1){const Z=E[X].dataCount,z=E[X].totalCount-Z;B=Math.max(B,Z),H=Math.max(H,z),F[X]=new Array(Z);for(let I=0;I<F[X].length;I+=1)F[X][I]=255&T.getBuffer()[I+R];R+=Z;const O=Ai.getErrorCorrectPolynomial(z),V=Xs(F[X],O.getLength()-1).mod(O);q[X]=new Array(O.getLength()-1);for(let I=0;I<q[X].length;I+=1){const ie=I+V.getLength()-q[X].length;q[X][I]=ie>=0?V.getAt(ie):0}}let Y=0;for(let X=0;X<E.length;X+=1)Y+=E[X].totalCount;const K=new Array(Y);let $=0;for(let X=0;X<B;X+=1)for(let Z=0;Z<E.length;Z+=1)X<F[Z].length&&(K[$]=F[Z][X],$+=1);for(let X=0;X<H;X+=1)for(let Z=0;Z<E.length;Z+=1)X<q[Z].length&&(K[$]=q[Z][X],$+=1);return K},A=function(T,E,R){const B=nm.getRSBlocks(T,E),H=im();for(let q=0;q<R.length;q+=1){const Y=R[q];H.put(Y.getMode(),4),H.put(Y.getLength(),Ai.getLengthInBits(Y.getMode(),T)),Y.write(H)}let F=0;for(let q=0;q<B.length;q+=1)F+=B[q].dataCount;if(H.getLengthInBits()>F*8)throw"code length overflow. ("+H.getLengthInBits()+">"+F*8+")";for(H.getLengthInBits()+4<=F*8&&H.put(0,4);H.getLengthInBits()%8!=0;)H.putBit(!1);for(;!(H.getLengthInBits()>=F*8||(H.put(236,8),H.getLengthInBits()>=F*8));)H.put(17,8);return v(H,B)};d.addData=function(T,E){E=E||"Byte";let R=null;switch(E){case"Numeric":R=I0(T);break;case"Alphanumeric":R=U0(T);break;case"Byte":R=P0(T);break;case"Kanji":R=F0(T);break;default:throw"mode:"+E}h.push(R),u=null},d.isDark=function(T,E){if(T<0||a<=T||E<0||a<=E)throw T+","+E;return f[T][E]},d.getModuleCount=function(){return a},d.make=function(){if(m<1){let T=1;for(;T<40;T++){const E=nm.getRSBlocks(T,b),R=im();for(let H=0;H<h.length;H++){const F=h[H];R.put(F.getMode(),4),R.put(F.getLength(),Ai.getLengthInBits(F.getMode(),T)),F.write(R)}let B=0;for(let H=0;H<E.length;H++)B+=E[H].dataCount;if(R.getLengthInBits()<=B*8)break}m=T}c(!1,w())},d.createTableTag=function(T,E){T=T||2,E=typeof E>"u"?T*4:E;let R="";R+='<table style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: "+E+"px;",R+='">',R+="<tbody>";for(let B=0;B<d.getModuleCount();B+=1){R+="<tr>";for(let H=0;H<d.getModuleCount();H+=1)R+='<td style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: 0px;",R+=" width: "+T+"px;",R+=" height: "+T+"px;",R+=" background-color: ",R+=d.isDark(B,H)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return R+="</tbody>",R+="</table>",R},d.createSvgTag=function(T,E,R,B){let H={};typeof arguments[0]=="object"&&(H=arguments[0],T=H.cellSize,E=H.margin,R=H.alt,B=H.title),T=T||2,E=typeof E>"u"?T*4:E,R=typeof R=="string"?{text:R}:R||{},R.text=R.text||null,R.id=R.text?R.id||"qrcode-description":null,B=typeof B=="string"?{text:B}:B||{},B.text=B.text||null,B.id=B.text?B.id||"qrcode-title":null;const F=d.getModuleCount()*T+E*2;let q,Y,K,$,X="",Z;for(Z="l"+T+",0 0,"+T+" -"+T+",0 0,-"+T+"z ",X+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',X+=H.scalable?"":' width="'+F+'px" height="'+F+'px"',X+=' viewBox="0 0 '+F+" "+F+'" ',X+=' preserveAspectRatio="xMinYMin meet"',X+=B.text||R.text?' role="img" aria-labelledby="'+M([B.id,R.id].join(" ").trim())+'"':"",X+=">",X+=B.text?'<title id="'+M(B.id)+'">'+M(B.text)+"</title>":"",X+=R.text?'<description id="'+M(R.id)+'">'+M(R.text)+"</description>":"",X+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',X+='<path d="',K=0;K<d.getModuleCount();K+=1)for($=K*T+E,q=0;q<d.getModuleCount();q+=1)d.isDark(K,q)&&(Y=q*T+E,X+="M"+Y+","+$+Z);return X+='" stroke="transparent" fill="black"/>',X+="</svg>",X},d.createDataURL=function(T,E){T=T||2,E=typeof E>"u"?T*4:E;const R=d.getModuleCount()*T+E*2,B=E,H=R-E;return $0(R,R,function(F,q){if(B<=F&&F<H&&B<=q&&q<H){const Y=Math.floor((F-B)/T),K=Math.floor((q-B)/T);return d.isDark(K,Y)?0:1}else return 1})},d.createImgTag=function(T,E,R){T=T||2,E=typeof E>"u"?T*4:E;const B=d.getModuleCount()*T+E*2;let H="";return H+="<img",H+=' src="',H+=d.createDataURL(T,E),H+='"',H+=' width="',H+=B,H+='"',H+=' height="',H+=B,H+='"',R&&(H+=' alt="',H+=M(R),H+='"'),H+="/>",H};const M=function(T){let E="";for(let R=0;R<T.length;R+=1){const B=T.charAt(R);switch(B){case"<":E+="<";break;case">":E+=">";break;case"&":E+="&";break;case'"':E+=""";break;default:E+=B;break}}return E},D=function(T){T=typeof T>"u"?2:T;const R=d.getModuleCount()*1+T*2,B=T,H=R-T;let F,q,Y,K,$;const X={"██":"█","█ ":"▀"," █":"▄"," ":" "},Z={"██":"▀","█ ":"▀"," █":" "," ":" "};let z="";for(F=0;F<R;F+=2){for(Y=Math.floor((F-B)/1),K=Math.floor((F+1-B)/1),q=0;q<R;q+=1)$="█",B<=q&&q<H&&B<=F&&F<H&&d.isDark(Y,Math.floor((q-B)/1))&&($=" "),B<=q&&q<H&&B<=F+1&&F+1<H&&d.isDark(K,Math.floor((q-B)/1))?$+=" ":$+="█",z+=T<1&&F+1>=H?Z[$]:X[$];z+=`
|
|
50
|
+
`}return R%2&&T>0?z.substring(0,z.length-R-1)+Array(R+1).join("▀"):z.substring(0,z.length-1)};return d.createASCII=function(T,E){if(T=T||1,T<2)return D(E);T-=1,E=typeof E>"u"?T*2:E;const R=d.getModuleCount()*T+E*2,B=E,H=R-E;let F,q,Y,K;const $=Array(T+1).join("██"),X=Array(T+1).join(" ");let Z="",z="";for(F=0;F<R;F+=1){for(Y=Math.floor((F-B)/T),z="",q=0;q<R;q+=1)K=1,B<=q&&q<H&&B<=F&&F<H&&d.isDark(Y,Math.floor((q-B)/T))&&(K=0),z+=K?$:X;for(Y=0;Y<T;Y+=1)Z+=z+`
|
|
51
|
+
`}return Z.substring(0,Z.length-1)},d.renderTo2dContext=function(T,E){E=E||2;const R=d.getModuleCount();for(let B=0;B<R;B++)for(let H=0;H<R;H++)T.fillStyle=d.isDark(B,H)?"black":"white",T.fillRect(H*E,B*E,E,E)},d};Yr.stringToBytes=function(n){const r=[];for(let s=0;s<n.length;s+=1){const o=n.charCodeAt(s);r.push(o&255)}return r};Yr.createStringToBytes=function(n,r){const s=(function(){const m=V0(n),b=function(){const u=m.read();if(u==-1)throw"eof";return u};let f=0;const a={};for(;;){const u=m.read();if(u==-1)break;const h=b(),d=b(),c=b(),S=String.fromCharCode(u<<8|h),w=d<<8|c;a[S]=w,f+=1}if(f!=r)throw f+" != "+r;return a})(),o=63;return function(m){const b=[];for(let f=0;f<m.length;f+=1){const a=m.charCodeAt(f);if(a<128)b.push(a);else{const u=s[m.charAt(f)];typeof u=="number"?(u&255)==u?b.push(u):(b.push(u>>>8),b.push(u&255)):b.push(o)}}return b}};const Pt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},$s={L:1,M:0,Q:3,H:2},ki={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Ai=(function(){const n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=1335,s=7973,o=21522,m={},b=function(f){let a=0;for(;f!=0;)a+=1,f>>>=1;return a};return m.getBCHTypeInfo=function(f){let a=f<<10;for(;b(a)-b(r)>=0;)a^=r<<b(a)-b(r);return(f<<10|a)^o},m.getBCHTypeNumber=function(f){let a=f<<12;for(;b(a)-b(s)>=0;)a^=s<<b(a)-b(s);return f<<12|a},m.getPatternPosition=function(f){return n[f-1]},m.getMaskFunction=function(f){switch(f){case ki.PATTERN000:return function(a,u){return(a+u)%2==0};case ki.PATTERN001:return function(a,u){return a%2==0};case ki.PATTERN010:return function(a,u){return u%3==0};case ki.PATTERN011:return function(a,u){return(a+u)%3==0};case ki.PATTERN100:return function(a,u){return(Math.floor(a/2)+Math.floor(u/3))%2==0};case ki.PATTERN101:return function(a,u){return a*u%2+a*u%3==0};case ki.PATTERN110:return function(a,u){return(a*u%2+a*u%3)%2==0};case ki.PATTERN111:return function(a,u){return(a*u%3+(a+u)%2)%2==0};default:throw"bad maskPattern:"+f}},m.getErrorCorrectPolynomial=function(f){let a=Xs([1],0);for(let u=0;u<f;u+=1)a=a.multiply(Xs([1,Di.gexp(u)],0));return a},m.getLengthInBits=function(f,a){if(1<=a&&a<10)switch(f){case Pt.MODE_NUMBER:return 10;case Pt.MODE_ALPHA_NUM:return 9;case Pt.MODE_8BIT_BYTE:return 8;case Pt.MODE_KANJI:return 8;default:throw"mode:"+f}else if(a<27)switch(f){case Pt.MODE_NUMBER:return 12;case Pt.MODE_ALPHA_NUM:return 11;case Pt.MODE_8BIT_BYTE:return 16;case Pt.MODE_KANJI:return 10;default:throw"mode:"+f}else if(a<41)switch(f){case Pt.MODE_NUMBER:return 14;case Pt.MODE_ALPHA_NUM:return 13;case Pt.MODE_8BIT_BYTE:return 16;case Pt.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+a},m.getLostPoint=function(f){const a=f.getModuleCount();let u=0;for(let c=0;c<a;c+=1)for(let S=0;S<a;S+=1){let w=0;const k=f.isDark(c,S);for(let x=-1;x<=1;x+=1)if(!(c+x<0||a<=c+x))for(let y=-1;y<=1;y+=1)S+y<0||a<=S+y||x==0&&y==0||k==f.isDark(c+x,S+y)&&(w+=1);w>5&&(u+=3+w-5)}for(let c=0;c<a-1;c+=1)for(let S=0;S<a-1;S+=1){let w=0;f.isDark(c,S)&&(w+=1),f.isDark(c+1,S)&&(w+=1),f.isDark(c,S+1)&&(w+=1),f.isDark(c+1,S+1)&&(w+=1),(w==0||w==4)&&(u+=3)}for(let c=0;c<a;c+=1)for(let S=0;S<a-6;S+=1)f.isDark(c,S)&&!f.isDark(c,S+1)&&f.isDark(c,S+2)&&f.isDark(c,S+3)&&f.isDark(c,S+4)&&!f.isDark(c,S+5)&&f.isDark(c,S+6)&&(u+=40);for(let c=0;c<a;c+=1)for(let S=0;S<a-6;S+=1)f.isDark(S,c)&&!f.isDark(S+1,c)&&f.isDark(S+2,c)&&f.isDark(S+3,c)&&f.isDark(S+4,c)&&!f.isDark(S+5,c)&&f.isDark(S+6,c)&&(u+=40);let h=0;for(let c=0;c<a;c+=1)for(let S=0;S<a;S+=1)f.isDark(S,c)&&(h+=1);const d=Math.abs(100*h/a/a-50)/5;return u+=d*10,u},m})(),Di=(function(){const n=new Array(256),r=new Array(256);for(let o=0;o<8;o+=1)n[o]=1<<o;for(let o=8;o<256;o+=1)n[o]=n[o-4]^n[o-5]^n[o-6]^n[o-8];for(let o=0;o<255;o+=1)r[n[o]]=o;const s={};return s.glog=function(o){if(o<1)throw"glog("+o+")";return r[o]},s.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return n[o]},s})(),Xs=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let m=0;for(;m<n.length&&n[m]==0;)m+=1;const b=new Array(n.length-m+r);for(let f=0;f<n.length-m;f+=1)b[f]=n[f+m];return b})(),o={};return o.getAt=function(m){return s[m]},o.getLength=function(){return s.length},o.multiply=function(m){const b=new Array(o.getLength()+m.getLength()-1);for(let f=0;f<o.getLength();f+=1)for(let a=0;a<m.getLength();a+=1)b[f+a]^=Di.gexp(Di.glog(o.getAt(f))+Di.glog(m.getAt(a)));return Xs(b,0)},o.mod=function(m){if(o.getLength()-m.getLength()<0)return o;const b=Di.glog(o.getAt(0))-Di.glog(m.getAt(0)),f=new Array(o.getLength());for(let a=0;a<o.getLength();a+=1)f[a]=o.getAt(a);for(let a=0;a<m.getLength();a+=1)f[a]^=Di.gexp(Di.glog(m.getAt(a))+b);return Xs(f,0).mod(m)},o},nm=(function(){const n=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(m,b){const f={};return f.totalCount=m,f.dataCount=b,f},s={},o=function(m,b){switch(b){case $s.L:return n[(m-1)*4+0];case $s.M:return n[(m-1)*4+1];case $s.Q:return n[(m-1)*4+2];case $s.H:return n[(m-1)*4+3];default:return}};return s.getRSBlocks=function(m,b){const f=o(m,b);if(typeof f>"u")throw"bad rs block @ typeNumber:"+m+"/errorCorrectionLevel:"+b;const a=f.length/3,u=[];for(let h=0;h<a;h+=1){const d=f[h*3+0],c=f[h*3+1],S=f[h*3+2];for(let w=0;w<d;w+=1)u.push(r(c,S))}return u},s})(),im=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(o){const m=Math.floor(o/8);return(n[m]>>>7-o%8&1)==1},s.put=function(o,m){for(let b=0;b<m;b+=1)s.putBit((o>>>m-b-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(o){const m=Math.floor(r/8);n.length<=m&&n.push(0),o&&(n[m]|=128>>>r%8),r+=1},s},I0=function(n){const r=Pt.MODE_NUMBER,s=n,o={};o.getMode=function(){return r},o.getLength=function(f){return s.length},o.write=function(f){const a=s;let u=0;for(;u+2<a.length;)f.put(m(a.substring(u,u+3)),10),u+=3;u<a.length&&(a.length-u==1?f.put(m(a.substring(u,u+1)),4):a.length-u==2&&f.put(m(a.substring(u,u+2)),7))};const m=function(f){let a=0;for(let u=0;u<f.length;u+=1)a=a*10+b(f.charAt(u));return a},b=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return o},U0=function(n){const r=Pt.MODE_ALPHA_NUM,s=n,o={};o.getMode=function(){return r},o.getLength=function(b){return s.length},o.write=function(b){const f=s;let a=0;for(;a+1<f.length;)b.put(m(f.charAt(a))*45+m(f.charAt(a+1)),11),a+=2;a<f.length&&b.put(m(f.charAt(a)),6)};const m=function(b){if("0"<=b&&b<="9")return b.charCodeAt(0)-48;if("A"<=b&&b<="Z")return b.charCodeAt(0)-65+10;switch(b){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+b}};return o},P0=function(n){const r=Pt.MODE_8BIT_BYTE,s=Yr.stringToBytes(n),o={};return o.getMode=function(){return r},o.getLength=function(m){return s.length},o.write=function(m){for(let b=0;b<s.length;b+=1)m.put(s[b],8)},o},F0=function(n){const r=Pt.MODE_KANJI,s=Yr.stringToBytes;(function(b,f){const a=s(b);if(a.length!=2||(a[0]<<8|a[1])!=f)throw"sjis not supported."})("友",38726);const o=s(n),m={};return m.getMode=function(){return r},m.getLength=function(b){return~~(o.length/2)},m.write=function(b){const f=o;let a=0;for(;a+1<f.length;){let u=(255&f[a])<<8|255&f[a+1];if(33088<=u&&u<=40956)u-=33088;else if(57408<=u&&u<=60351)u-=49472;else throw"illegal char at "+(a+1)+"/"+u;u=(u>>>8&255)*192+(u&255),b.put(u,13),a+=2}if(a<f.length)throw"illegal char at "+(a+1)},m},ig=function(){const n=[],r={};return r.writeByte=function(s){n.push(s&255)},r.writeShort=function(s){r.writeByte(s),r.writeByte(s>>>8)},r.writeBytes=function(s,o,m){o=o||0,m=m||s.length;for(let b=0;b<m;b+=1)r.writeByte(s[b+o])},r.writeString=function(s){for(let o=0;o<s.length;o+=1)r.writeByte(s.charCodeAt(o))},r.toByteArray=function(){return n},r.toString=function(){let s="";s+="[";for(let o=0;o<n.length;o+=1)o>0&&(s+=","),s+=n[o];return s+="]",s},r},q0=function(){let n=0,r=0,s=0,o="";const m={},b=function(a){o+=String.fromCharCode(f(a&63))},f=function(a){if(a<0)throw"n:"+a;if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47;throw"n:"+a};return m.writeByte=function(a){for(n=n<<8|a&255,r+=8,s+=1;r>=6;)b(n>>>r-6),r-=6},m.flush=function(){if(r>0&&(b(n<<6-r),n=0,r=0),s%3!=0){const a=3-s%3;for(let u=0;u<a;u+=1)o+="="}},m.toString=function(){return o},m},V0=function(n){const r=n;let s=0,o=0,m=0;const b={};b.read=function(){for(;m<8;){if(s>=r.length){if(m==0)return-1;throw"unexpected end of file./"+m}const u=r.charAt(s);if(s+=1,u=="=")return m=0,-1;if(u.match(/^\s$/))continue;o=o<<6|f(u.charCodeAt(0)),m+=6}const a=o>>>m-8&255;return m-=8,a};const f=function(a){if(65<=a&&a<=90)return a-65;if(97<=a&&a<=122)return a-97+26;if(48<=a&&a<=57)return a-48+52;if(a==43)return 62;if(a==47)return 63;throw"c:"+a};return b},G0=function(n,r){const s=n,o=r,m=new Array(n*r),b={};b.setPixel=function(h,d,c){m[d*s+h]=c},b.write=function(h){h.writeString("GIF87a"),h.writeShort(s),h.writeShort(o),h.writeByte(128),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(255),h.writeByte(255),h.writeByte(255),h.writeString(","),h.writeShort(0),h.writeShort(0),h.writeShort(s),h.writeShort(o),h.writeByte(0);const d=2,c=a(d);h.writeByte(d);let S=0;for(;c.length-S>255;)h.writeByte(255),h.writeBytes(c,S,255),S+=255;h.writeByte(c.length-S),h.writeBytes(c,S,c.length-S),h.writeByte(0),h.writeString(";")};const f=function(h){const d=h;let c=0,S=0;const w={};return w.write=function(k,x){if(k>>>x)throw"length over";for(;c+x>=8;)d.writeByte(255&(k<<c|S)),x-=8-c,k>>>=8-c,S=0,c=0;S=k<<c|S,c=c+x},w.flush=function(){c>0&&d.writeByte(S)},w},a=function(h){const d=1<<h,c=(1<<h)+1;let S=h+1;const w=u();for(let g=0;g<d;g+=1)w.add(String.fromCharCode(g));w.add(String.fromCharCode(d)),w.add(String.fromCharCode(c));const k=ig(),x=f(k);x.write(d,S);let y=0,_=String.fromCharCode(m[y]);for(y+=1;y<m.length;){const g=String.fromCharCode(m[y]);y+=1,w.contains(_+g)?_=_+g:(x.write(w.indexOf(_),S),w.size()<4095&&(w.size()==1<<S&&(S+=1),w.add(_+g)),_=g)}return x.write(w.indexOf(_),S),x.write(c,S),x.flush(),k.toByteArray()},u=function(){const h={};let d=0;const c={};return c.add=function(S){if(c.contains(S))throw"dup key:"+S;h[S]=d,d+=1},c.size=function(){return d},c.indexOf=function(S){return h[S]},c.contains=function(S){return typeof h[S]<"u"},c};return b},$0=function(n,r,s){const o=G0(n,r);for(let a=0;a<r;a+=1)for(let u=0;u<n;u+=1)o.setPixel(u,a,s(u,a));const m=ig();o.write(m);const b=q0(),f=m.toByteArray();for(let a=0;a<f.length;a+=1)b.writeByte(f[a]);return b.flush(),"data:image/gif;base64,"+b};Yr.stringToBytes;const Ji=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}],Y0=Ji.map(n=>n.name);Ji.filter(n=>n.dispatchable).map(n=>n.name);function K0(){const n={};for(const r of Y0)n[r]={permissionMode:"default",model:"default"};return{version:1,roles:n,autoOrchestration:!0,translationEnabled:!0}}function W0({sidebar:n,children:r}){const[s,o]=fe.useState(!1);return N.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[N.jsxs("aside",{className:"app-sidebar",children:[N.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>o(m=>!m)}),N.jsx("div",{className:"sidebar-content",children:n})]}),N.jsx("main",{className:"app-main",children:r})]})}function X0(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}const be={getAppPreferences(){return De("/api/settings/preferences")},updateAppPreferences(n){return De("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getCurrentProject(){return De("/api/projects/current")},pullCurrentProject(){return De("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return De("/api/projects/recent")},connectProject(n){return De("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return De("/api/tasks")},createTask(n){return De("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return De(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(){return De("/api/projects/harness")},applyHarness(){return De("/api/projects/harness/apply",{method:"POST"})},getHarnessBootstrapStatus(){return De("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return De("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return De(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return De(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return De(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return De(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return De(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return De(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},dispatchRoleCommand(n,r){return De(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return De(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return De(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return De(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return De(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return De(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return De(`/api/tasks/${encodeURIComponent(n)}/round`)},getCodexReviewState(n){return De(`/api/tasks/${encodeURIComponent(n)}/codex-review`)},requestCodexReviewGate(n,r){return De(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/request`,{method:"POST"})},retryCodexReviewGate(n,r){return De(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/retry`,{method:"POST"})},skipCodexReviewGate(n,r,s){return De(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideCodexReviewGate(n,r,s){return De(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getCodexReviewReport(n,r){return De(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/report`)},getTranslationSettings(){return De("/api/translation/settings")},updateTranslationSettings(n){return De("/api/translation/settings",{method:"PUT",body:JSON.stringify(n)})},getTranslationPrompts(){return De("/api/translation/prompts")},testTranslationProvider(){return De("/api/translation/test",{method:"POST"})},startTranslationSession(n,r){return De(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/start`,{method:"POST"})},pollTranslationSession(n,r,s){const o=new URLSearchParams({after:String(r)});return s!==void 0&&o.set("limit",String(s)),De(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,r,s){return De(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return De(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return De(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},retryTranslation(n,r){return De(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return De(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return De(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getGatewayStatus(){return De("/api/gateway/status")},updateGatewaySettings(n){return De("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return De("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return De("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return De("/api/gateway/binding/reset",{method:"POST"})}};async function De(n,r={}){var m,b;const s=new Headers(r.headers);r.body!==void 0&&r.body!==null&&!s.has("content-type")&&s.set("content-type","application/json");const o=await fetch(n,{...r,headers:s});if(!o.ok){const f=await o.json().catch(()=>null),a=(m=f==null?void 0:f.error)!=null&&m.hint?`${f.error.message} ${f.error.hint}`:((b=f==null?void 0:f.error)==null?void 0:b.message)??`Request failed: ${o.status}`;throw new Error(a)}return o.json()}function Q0({events:n,maxEvents:r=8,showHeader:s=!0}){const o=r===null?n:n.slice(-r);return N.jsxs("section",{className:"event-log",children:[s?N.jsx("h2",{children:"Events"}):null,n.length===0?N.jsx("p",{className:"muted",children:"No terminal events yet."}):N.jsx("ol",{children:o.map((m,b)=>N.jsx("li",{children:m},`${m}-${b}`))})]})}var Qu={exports:{}},rm;function Z0(){return rm||(rm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(m){this._terminal=m}dispose(){}fit(){const m=this.proposeDimensions();if(!m||!this._terminal||isNaN(m.cols)||isNaN(m.rows))return;const b=this._terminal._core;this._terminal.rows===m.rows&&this._terminal.cols===m.cols||(b._renderService.clear(),this._terminal.resize(m.cols,m.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const m=this._terminal._core,b=m._renderService.dimensions;if(b.css.cell.width===0||b.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:m.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),c=u-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),S=h-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(S/b.css.cell.width)),rows:Math.max(1,Math.floor(c/b.css.cell.height))}}}})(),s})()))})(Qu)),Qu.exports}var J0=Z0(),Zu={exports:{}},sm;function e1(){return sm||(sm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={6:(f,a)=>{function u(d){try{const c=new URL(d),S=c.password&&c.username?`${c.protocol}//${c.username}:${c.password}@${c.host}`:c.username?`${c.protocol}//${c.username}@${c.host}`:`${c.protocol}//${c.host}`;return d.toLocaleLowerCase().startsWith(S.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(d,c,S,w={}){this._terminal=d,this._regex=c,this._handler=S,this._options=w}provideLinks(d,c){const S=h.computeLink(d,this._regex,this._terminal,this._handler);c(this._addCallbacks(S))}_addCallbacks(d){return d.map((c=>(c.leave=this._options.leave,c.hover=(S,w)=>{if(this._options.hover){const{range:k}=c;this._options.hover(S,w,k)}},c)))}};class h{static computeLink(c,S,w,k){const x=new RegExp(S.source,(S.flags||"")+"g"),[y,_]=h._getWindowedLineStrings(c-1,w),g=y.join("");let v;const A=[];for(;v=x.exec(g);){const M=v[0];if(!u(M))continue;const[D,T]=h._mapStrIdx(w,_,0,v.index),[E,R]=h._mapStrIdx(w,D,T,M.length);if(D===-1||T===-1||E===-1||R===-1)continue;const B={start:{x:T+1,y:D+1},end:{x:R,y:E+1}};A.push({range:B,text:M,activate:k})}return A}static _getWindowedLineStrings(c,S){let w,k=c,x=c,y=0,_="";const g=[];if(w=S.buffer.active.getLine(c)){const v=w.translateToString(!0);if(w.isWrapped&&v[0]!==" "){for(y=0;(w=S.buffer.active.getLine(--k))&&y<2048&&(_=w.translateToString(!0),y+=_.length,g.push(_),w.isWrapped&&_.indexOf(" ")===-1););g.reverse()}for(g.push(v),y=0;(w=S.buffer.active.getLine(++x))&&w.isWrapped&&y<2048&&(_=w.translateToString(!0),y+=_.length,g.push(_),_.indexOf(" ")===-1););}return[g,k]}static _mapStrIdx(c,S,w,k){const x=c.buffer.active,y=x.getNullCell();let _=w;for(;k;){const g=x.getLine(S);if(!g)return[-1,-1];for(let v=_;v<g.length;++v){g.getCell(v,y);const A=y.getChars();if(y.getWidth()&&(k-=A.length||1,v===g.length-1&&A==="")){const M=x.getLine(S+1);M&&M.isWrapped&&(M.getCell(0,y),y.getWidth()===2&&(k+=1))}if(k<0)return[S,v]}S++,_=0}return[S,_]}}a.LinkComputer=h}},o={};function m(f){var a=o[f];if(a!==void 0)return a.exports;var u=o[f]={exports:{}};return s[f](u,u.exports,m),u.exports}var b={};return(()=>{var f=b;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const a=m(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(d,c){const S=window.open();if(S){try{S.opener=null}catch{}S.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(d=h,c={}){this._handler=d,this._options=c}activate(d){this._terminal=d;const c=this._options,S=c.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,S,this._handler,c))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),b})()))})(Zu)),Zu.exports}var t1=e1(),Ju={exports:{}},lm;function n1(){return lm||(lm=1,(function(n,r){(function(s,o){n.exports=o()})(globalThis,(()=>(()=>{var s={4567:function(f,a,u){var h=this&&this.__decorate||function(g,v,A,M){var D,T=arguments.length,E=T<3?v:M===null?M=Object.getOwnPropertyDescriptor(v,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,v,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(E=(T<3?D(E):T>3?D(v,A,E):D(v,A))||E);return T>3&&E&&Object.defineProperty(v,A,E),E},d=this&&this.__param||function(g,v){return function(A,M){v(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const c=u(9042),S=u(9924),w=u(844),k=u(4725),x=u(2585),y=u(3656);let _=a.AccessibilityManager=class extends w.Disposable{constructor(g,v,A,M){super(),this._terminal=g,this._coreBrowserService=A,this._renderService=M,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 D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,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 S.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((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
52
|
+
`)))),this.register(this._terminal.onA11yTab((D=>this._handleTab(D)))),this.register(this._terminal.onKey((D=>this._handleKey(D.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,y.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(g){for(let v=0;v<g;v++)this._handleChar(" ")}_handleChar(g){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==g&&(this._charsToAnnounce+=g):this._charsToAnnounce+=g,g===`
|
|
53
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=c.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(g){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(g)||this._charsToConsume.push(g)}_refreshRows(g,v){this._liveRegionDebouncer.refresh(g,v,this._terminal.rows)}_renderRows(g,v){const A=this._terminal.buffer,M=A.lines.length.toString();for(let D=g;D<=v;D++){const T=A.lines.get(A.ydisp+D),E=[],R=(T==null?void 0:T.translateToString(!0,void 0,void 0,E))||"",B=(A.ydisp+D+1).toString(),H=this._rowElements[D];H&&(R.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=R,this._rowColumns.set(H,E)),H.setAttribute("aria-posinset",B),H.setAttribute("aria-setsize",M))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(g,v){const A=g.target,M=this._rowElements[v===0?1:this._rowElements.length-2];if(A.getAttribute("aria-posinset")===(v===0?"1":`${this._terminal.buffer.lines.length}`)||g.relatedTarget!==M)return;let D,T;if(v===0?(D=A,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(D=this._rowElements.shift(),T=A,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),v===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(v===0?-1:1),this._rowElements[v===0?1:this._rowElements.length-2].focus(),g.preventDefault(),g.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const g=document.getSelection();if(!g)return;if(g.isCollapsed)return void(this._rowContainer.contains(g.anchorNode)&&this._terminal.clearSelection());if(!g.anchorNode||!g.focusNode)return void console.error("anchorNode and/or focusNode are null");let v={node:g.anchorNode,offset:g.anchorOffset},A={node:g.focusNode,offset:g.focusOffset};if((v.node.compareDocumentPosition(A.node)&Node.DOCUMENT_POSITION_PRECEDING||v.node===A.node&&v.offset>A.offset)&&([v,A]=[A,v]),v.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(v={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(v.node))return;const M=this._rowElements.slice(-1)[0];if(A.node.compareDocumentPosition(M)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(A={node:M,offset:((R=M.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(A.node))return;const D=({node:B,offset:H})=>{const F=B instanceof Text?B.parentNode:B;let q=parseInt(F==null?void 0:F.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(F);if(!Y)return console.warn("columns is null. Race condition?"),null;let K=H<Y.length?Y[H]:Y.slice(-1)[0]+1;return K>=this._terminal.cols&&(++q,K=0),{row:q,column:K}},T=D(v),E=D(A);if(T&&E){if(T.row>E.row||T.row===E.row&&T.column>=E.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(E.row-T.row)*this._terminal.cols-T.column+E.column)}}_handleResize(g){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let v=this._rowContainer.children.length;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);for(;this._rowElements.length>g;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const g=this._coreBrowserService.mainDocument.createElement("div");return g.setAttribute("role","listitem"),g.tabIndex=-1,this._refreshRowDimensions(g),g}_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 g=0;g<this._terminal.rows;g++)this._refreshRowDimensions(this._rowElements[g])}}_refreshRowDimensions(g){g.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=_=h([d(1,x.IInstantiationService),d(2,k.ICoreBrowserService),d(3,k.IRenderService)],_)},3614:(f,a)=>{function u(S){return S.replace(/\r?\n/g,"\r")}function h(S,w){return w?"\x1B[200~"+S+"\x1B[201~":S}function d(S,w,k,x){S=h(S=u(S),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(S,!0),w.value=""}function c(S,w,k){const x=k.getBoundingClientRect(),y=S.clientX-x.left-10,_=S.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${y}px`,w.style.top=`${_}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=u,a.bracketTextForPaste=h,a.copyHandler=function(S,w){S.clipboardData&&S.clipboardData.setData("text/plain",w.selectionText),S.preventDefault()},a.handlePasteEvent=function(S,w,k,x){S.stopPropagation(),S.clipboardData&&d(S.clipboardData.getData("text/plain"),w,k,x)},a.paste=d,a.moveTextAreaUnderMouseCursor=c,a.rightClickHandler=function(S,w,k,x,y){c(S,w,k),y&&x.rightClickSelect(S),w.value=x.selectionText,w.select()}},7239:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=u(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(d,c,S){this._css.set(d,c,S)}getCss(d,c){return this._css.get(d,c)}setColor(d,c,S){this._color.set(d,c,S)}getColor(d,c){return this._color.get(d,c)}clear(){this._color.clear(),this._css.clear()}}},3656:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,h,d,c){u.addEventListener(h,d,c);let S=!1;return{dispose:()=>{S||(S=!0,u.removeEventListener(h,d,c))}}}},3551:function(f,a,u){var h=this&&this.__decorate||function(_,g,v,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,v):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,v,A);else for(var E=_.length-1;E>=0;E--)(M=_[E])&&(T=(D<3?M(T):D>3?M(g,v,T):M(g,v))||T);return D>3&&T&&Object.defineProperty(g,v,T),T},d=this&&this.__param||function(_,g){return function(v,A){g(v,A,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const c=u(3656),S=u(8460),w=u(844),k=u(2585),x=u(4725);let y=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(_,g,v,A,M){super(),this._element=_,this._mouseService=g,this._renderService=v,this._bufferService=A,this._linkProviderService=M,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new S.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new S.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var D;this._lastMouseEvent=void 0,(D=this._activeProviderReplies)==null||D.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,c.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,c.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(_){this._lastMouseEvent=_;const g=this._positionFromMouseEvent(_,this._element,this._mouseService);if(!g)return;this._isMouseOut=!1;const v=_.composedPath();for(let A=0;A<v.length;A++){const M=v[A];if(M.classList.contains("xterm"))break;if(M.classList.contains("xterm-hover"))return}this._lastBufferCell&&g.x===this._lastBufferCell.x&&g.y===this._lastBufferCell.y||(this._handleHover(g),this._lastBufferCell=g)}_handleHover(_){if(this._activeLine!==_.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(_,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,_)||(this._clearCurrentLink(),this._askForLink(_,!0))}_askForLink(_,g){var A,M;this._activeProviderReplies&&g||((A=this._activeProviderReplies)==null||A.forEach((D=>{D==null||D.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=_.y);let v=!1;for(const[D,T]of this._linkProviderService.linkProviders.entries())g?(M=this._activeProviderReplies)!=null&&M.get(D)&&(v=this._checkLinkProviderResult(D,_,v)):T.provideLinks(_.y,(E=>{var B,H;if(this._isMouseOut)return;const R=E==null?void 0:E.map((F=>({link:F})));(B=this._activeProviderReplies)==null||B.set(D,R),v=this._checkLinkProviderResult(D,_,v),((H=this._activeProviderReplies)==null?void 0:H.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(_.y,this._activeProviderReplies)}))}_removeIntersectingLinks(_,g){const v=new Set;for(let A=0;A<g.size;A++){const M=g.get(A);if(M)for(let D=0;D<M.length;D++){const T=M[D],E=T.link.range.start.y<_?0:T.link.range.start.x,R=T.link.range.end.y>_?this._bufferService.cols:T.link.range.end.x;for(let B=E;B<=R;B++){if(v.has(B)){M.splice(D--,1);break}v.add(B)}}}}_checkLinkProviderResult(_,g,v){var D;if(!this._activeProviderReplies)return v;const A=this._activeProviderReplies.get(_);let M=!1;for(let T=0;T<_;T++)this._activeProviderReplies.has(T)&&!this._activeProviderReplies.get(T)||(M=!0);if(!M&&A){const T=A.find((E=>this._linkAtPosition(E.link,g)));T&&(v=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!v)for(let T=0;T<this._activeProviderReplies.size;T++){const E=(D=this._activeProviderReplies.get(T))==null?void 0:D.find((R=>this._linkAtPosition(R.link,g)));if(E){v=!0,this._handleNewLink(E);break}}return v}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(_){if(!this._currentLink)return;const g=this._positionFromMouseEvent(_,this._element,this._mouseService);g&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,g)&&this._currentLink.link.activate(_,this._currentLink.link.text)}_clearCurrentLink(_,g){this._currentLink&&this._lastMouseEvent&&(!_||!g||this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=g)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(_){if(!this._lastMouseEvent)return;const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._linkAtPosition(_.link,g)&&(this._currentLink=_,this._currentLink.state={decorations:{underline:_.link.decorations===void 0||_.link.decorations.underline,pointerCursor:_.link.decorations===void 0||_.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,_.link,this._lastMouseEvent),_.link.decorations={},Object.defineProperties(_.link.decorations,{pointerCursor:{get:()=>{var v,A;return(A=(v=this._currentLink)==null?void 0:v.state)==null?void 0:A.decorations.pointerCursor},set:v=>{var A;(A=this._currentLink)!=null&&A.state&&this._currentLink.state.decorations.pointerCursor!==v&&(this._currentLink.state.decorations.pointerCursor=v,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",v))}},underline:{get:()=>{var v,A;return(A=(v=this._currentLink)==null?void 0:v.state)==null?void 0:A.decorations.underline},set:v=>{var A,M,D;(A=this._currentLink)!=null&&A.state&&((D=(M=this._currentLink)==null?void 0:M.state)==null?void 0:D.decorations.underline)!==v&&(this._currentLink.state.decorations.underline=v,this._currentLink.state.isHovered&&this._fireUnderlineEvent(_.link,v))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((v=>{if(!this._currentLink)return;const A=v.start===0?0:v.start+1+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.ydisp+1+v.end;if(this._currentLink.link.range.start.y>=A&&this._currentLink.link.range.end.y<=M&&(this._clearCurrentLink(A,M),this._lastMouseEvent)){const D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}}))))}_linkHover(_,g,v){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!0),this._currentLink.state.decorations.pointerCursor&&_.classList.add("xterm-cursor-pointer")),g.hover&&g.hover(v,g.text)}_fireUnderlineEvent(_,g){const v=_.range,A=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(v.start.x-1,v.start.y-A-1,v.end.x,v.end.y-A-1,void 0);(g?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(_,g,v){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!1),this._currentLink.state.decorations.pointerCursor&&_.classList.remove("xterm-cursor-pointer")),g.leave&&g.leave(v,g.text)}_linkAtPosition(_,g){const v=_.range.start.y*this._bufferService.cols+_.range.start.x,A=_.range.end.y*this._bufferService.cols+_.range.end.x,M=g.y*this._bufferService.cols+g.x;return v<=M&&M<=A}_positionFromMouseEvent(_,g,v){const A=v.getCoords(_,g,this._bufferService.cols,this._bufferService.rows);if(A)return{x:A[0],y:A[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,g,v,A,M){return{x1:_,y1:g,x2:v,y2:A,cols:this._bufferService.cols,fg:M}}};a.Linkifier=y=h([d(1,x.IMouseService),d(2,x.IRenderService),d(3,k.IBufferService),d(4,x.ILinkProviderService)],y)},9042:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(f,a,u){var h=this&&this.__decorate||function(x,y,_,g){var v,A=arguments.length,M=A<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,_,g);else for(var D=x.length-1;D>=0;D--)(v=x[D])&&(M=(A<3?v(M):A>3?v(y,_,M):v(y,_))||M);return A>3&&M&&Object.defineProperty(y,_,M),M},d=this&&this.__param||function(x,y){return function(_,g){y(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const c=u(511),S=u(2585);let w=a.OscLinkProvider=class{constructor(x,y,_){this._bufferService=x,this._optionsService=y,this._oscLinkService=_}provideLinks(x,y){var R;const _=this._bufferService.buffer.lines.get(x-1);if(!_)return void y(void 0);const g=[],v=this._optionsService.rawOptions.linkHandler,A=new c.CellData,M=_.getTrimmedLength();let D=-1,T=-1,E=!1;for(let B=0;B<M;B++)if(T!==-1||_.hasContent(B)){if(_.loadCell(B,A),A.hasExtendedAttrs()&&A.extended.urlId){if(T===-1){T=B,D=A.extended.urlId;continue}E=A.extended.urlId!==D}else T!==-1&&(E=!0);if(E||T!==-1&&B===M-1){const H=(R=this._oscLinkService.getLinkData(D))==null?void 0:R.uri;if(H){const F={start:{x:T+1,y:x},end:{x:B+(E||B!==M-1?0:1),y:x}};let q=!1;if(!(v!=null&&v.allowNonHttpProtocols))try{const Y=new URL(H);["http:","https:"].includes(Y.protocol)||(q=!0)}catch{q=!0}q||g.push({text:H,range:F,activate:(Y,K)=>v?v.activate(Y,K,F):k(0,K),hover:(Y,K)=>{var $;return($=v==null?void 0:v.hover)==null?void 0:$.call(v,Y,K,F)},leave:(Y,K)=>{var $;return($=v==null?void 0:v.leave)==null?void 0:$.call(v,Y,K,F)}})}E=!1,A.hasExtendedAttrs()&&A.extended.urlId?(T=B,D=A.extended.urlId):(T=-1,D=-1)}}y(g)}};function k(x,y){if(confirm(`Do you want to navigate to ${y}?
|
|
54
|
+
|
|
55
|
+
WARNING: This link could potentially be dangerous`)){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=y}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([d(0,S.IBufferService),d(1,S.IOptionsService),d(2,S.IOscLinkService)],w)},6193:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,h){this._renderCallback=u,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,h,d){this._rowCount=d,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=u(3614),d=u(3656),c=u(3551),S=u(9042),w=u(3730),k=u(1680),x=u(3107),y=u(5744),_=u(2950),g=u(1296),v=u(428),A=u(4269),M=u(5114),D=u(8934),T=u(3230),E=u(9312),R=u(4725),B=u(6731),H=u(8055),F=u(8969),q=u(8460),Y=u(844),K=u(6114),$=u(8437),X=u(2584),Z=u(7399),z=u(5941),O=u(9074),j=u(2585),V=u(5435),I=u(4567),ie=u(779);class ge extends F.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(G={}){super(G),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(j.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ie.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((U,ne)=>this.refresh(U,ne)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((U=>this._reportWindowsOptions(U)))),this.register(this._inputHandler.onColor((U=>this._handleColorEvent(U)))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((U=>this._afterResize(U.cols,U.rows)))),this.register((0,Y.toDisposable)((()=>{var U,ne;this._customKeyEventHandler=void 0,(ne=(U=this.element)==null?void 0:U.parentNode)==null||ne.removeChild(this.element)})))}_handleColorEvent(G){if(this._themeService)for(const U of G){let ne,te="";switch(U.index){case 256:ne="foreground",te="10";break;case 257:ne="background",te="11";break;case 258:ne="cursor",te="12";break;default:ne="ansi",te="4;"+U.index}switch(U.type){case 0:const ve=H.color.toColorRGB(ne==="ansi"?this._themeService.colors.ansi[U.index]:this._themeService.colors[ne]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${te};${(0,z.toRgbString)(ve)}${X.C1_ESCAPED.ST}`);break;case 1:if(ne==="ansi")this._themeService.modifyColors((Se=>Se.ansi[U.index]=H.channels.toColor(...U.color)));else{const Se=ne;this._themeService.modifyColors((Me=>Me[Se]=H.channels.toColor(...U.color)))}break;case 2:this._themeService.restoreColor(U.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(G){G?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(I.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(G){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var G;return(G=this.textarea)==null?void 0:G.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const G=this.buffer.ybase+this.buffer.y,U=this.buffer.lines.get(G);if(!U)return;const ne=Math.min(this.buffer.x,this.cols-1),te=this._renderService.dimensions.css.cell.height,ve=U.getWidth(ne),Se=this._renderService.dimensions.css.cell.width*ve,Me=this.buffer.y*this._renderService.dimensions.css.cell.height,Le=ne*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Le+"px",this.textarea.style.top=Me+"px",this.textarea.style.width=Se+"px",this.textarea.style.height=te+"px",this.textarea.style.lineHeight=te+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(U=>{this.hasSelection()&&(0,h.copyHandler)(U,this._selectionService)})));const G=U=>(0,h.handlePasteEvent)(U,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",G)),this.register((0,d.addDisposableDomListener)(this.element,"paste",G)),K.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(U=>{U.button===2&&(0,h.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(U=>{(0,h.rightClickHandler)(U,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(U=>{U.button===1&&(0,h.moveTextAreaUnderMouseCursor)(U,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(G=>this._keyUp(G)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(G=>this._keyDown(G)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(G=>this._keyPress(G)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(G=>this._compositionHelper.compositionupdate(G)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(G=>this._inputEvent(G)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(G){var ne;if(!G)throw new Error("Terminal requires a parent element.");if(G.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ne=this.element)==null?void 0:ne.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=G.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"),G.appendChild(this.element);const U=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.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,d.addDisposableDomListener)(this.screenElement,"mousemove",(te=>this.updateCursorStyle(te)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",S.promptLabel),K.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(M.CoreBrowserService,this.textarea,G.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(te=>this._handleTextAreaFocus(te)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(v.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(B.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(A.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((te=>this._onRender.fire(te)))),this.onResize((te=>this._renderService.resize(te.cols,te.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(c.Linkifier,this.screenElement)),this.element.appendChild(U);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((te=>this.scrollLines(te.amount,te.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(E.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((te=>this.scrollLines(te.amount,te.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((te=>this._renderService.handleSelectionChanged(te.start,te.end,te.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((te=>{this.textarea.value=te,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((te=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(te=>this._selectionService.handleMouseDown(te)))),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(I.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(te=>this._handleScreenReaderModeOptionChange(te)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(y.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(te=>{!this._overviewRulerRenderer&&te&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(y.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(g.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const G=this,U=this.element;function ne(Se){const Me=G._mouseService.getMouseReportCoords(Se,G.screenElement);if(!Me)return!1;let Le,Pe;switch(Se.overrideType||Se.type){case"mousemove":Pe=32,Se.buttons===void 0?(Le=3,Se.button!==void 0&&(Le=Se.button<3?Se.button:3)):Le=1&Se.buttons?0:4&Se.buttons?1:2&Se.buttons?2:3;break;case"mouseup":Pe=0,Le=Se.button<3?Se.button:3;break;case"mousedown":Pe=1,Le=Se.button<3?Se.button:3;break;case"wheel":if(G._customWheelEventHandler&&G._customWheelEventHandler(Se)===!1||G.viewport.getLinesScrolled(Se)===0)return!1;Pe=Se.deltaY<0?0:1,Le=4;break;default:return!1}return!(Pe===void 0||Le===void 0||Le>4)&&G.coreMouseService.triggerMouseEvent({col:Me.col,row:Me.row,x:Me.x,y:Me.y,button:Le,action:Pe,ctrl:Se.ctrlKey,alt:Se.altKey,shift:Se.shiftKey})}const te={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:Se=>(ne(Se),Se.buttons||(this._document.removeEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.removeEventListener("mousemove",te.mousedrag)),this.cancel(Se)),wheel:Se=>(ne(Se),this.cancel(Se,!0)),mousedrag:Se=>{Se.buttons&&ne(Se)},mousemove:Se=>{Se.buttons||ne(Se)}};this.register(this.coreMouseService.onProtocolChange((Se=>{Se?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Se)),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&Se?te.mousemove||(U.addEventListener("mousemove",ve.mousemove),te.mousemove=ve.mousemove):(U.removeEventListener("mousemove",te.mousemove),te.mousemove=null),16&Se?te.wheel||(U.addEventListener("wheel",ve.wheel,{passive:!1}),te.wheel=ve.wheel):(U.removeEventListener("wheel",te.wheel),te.wheel=null),2&Se?te.mouseup||(te.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",te.mouseup),te.mouseup=null),4&Se?te.mousedrag||(te.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",te.mousedrag),te.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(U,"mousedown",(Se=>{if(Se.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Se))return ne(Se),te.mouseup&&this._document.addEventListener("mouseup",te.mouseup),te.mousedrag&&this._document.addEventListener("mousemove",te.mousedrag),this.cancel(Se)}))),this.register((0,d.addDisposableDomListener)(U,"wheel",(Se=>{if(!te.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Se)===!1)return!1;if(!this.buffer.hasScrollback){const Me=this.viewport.getLinesScrolled(Se);if(Me===0)return;const Le=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Se.deltaY<0?"A":"B");let Pe="";for(let Je=0;Je<Math.abs(Me);Je++)Pe+=Le;return this.coreService.triggerDataEvent(Pe,!0),this.cancel(Se,!0)}return this.viewport.handleWheel(Se)?this.cancel(Se):void 0}}),{passive:!1})),this.register((0,d.addDisposableDomListener)(U,"touchstart",(Se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Se),this.cancel(Se)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(U,"touchmove",(Se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Se)?void 0:this.cancel(Se)}),{passive:!1}))}refresh(G,U){var ne;(ne=this._renderService)==null||ne.refreshRows(G,U)}updateCursorStyle(G){var U;(U=this._selectionService)!=null&&U.shouldColumnSelect(G)?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(G,U,ne=0){var te;ne===1?(super.scrollLines(G,U,ne),this.refresh(0,this.rows-1)):(te=this.viewport)==null||te.scrollLines(G)}paste(G){(0,h.paste)(G,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(G){this._customKeyEventHandler=G}attachCustomWheelEventHandler(G){this._customWheelEventHandler=G}registerLinkProvider(G){return this._linkProviderService.registerLinkProvider(G)}registerCharacterJoiner(G){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const U=this._characterJoinerService.register(G);return this.refresh(0,this.rows-1),U}deregisterCharacterJoiner(G){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(G)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(G){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+G)}registerDecoration(G){return this._decorationService.registerDecoration(G)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(G,U,ne){this._selectionService.setSelection(G,U,ne)}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 G;(G=this._selectionService)==null||G.clearSelection()}selectAll(){var G;(G=this._selectionService)==null||G.selectAll()}selectLines(G,U){var ne;(ne=this._selectionService)==null||ne.selectLines(G,U)}_keyDown(G){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1)return!1;const U=this.browser.isMac&&this.options.macOptionIsMeta&&G.altKey;if(!U&&!this._compositionHelper.keydown(G))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;U||G.key!=="Dead"&&G.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ne=(0,Z.evaluateKeyboardEvent)(G,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(G),ne.type===3||ne.type===2){const te=this.rows-1;return this.scrollLines(ne.type===2?-te:te),this.cancel(G,!0)}return ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,G)||(ne.cancel&&this.cancel(G,!0),!ne.key||!!(G.key&&!G.ctrlKey&&!G.altKey&&!G.metaKey&&G.key.length===1&&G.key.charCodeAt(0)>=65&&G.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ne.key!==X.C0.ETX&&ne.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ne.key,domEvent:G}),this._showCursor(),this.coreService.triggerDataEvent(ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||G.altKey||G.ctrlKey?this.cancel(G,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(G,U){const ne=G.isMac&&!this.options.macOptionIsMeta&&U.altKey&&!U.ctrlKey&&!U.metaKey||G.isWindows&&U.altKey&&U.ctrlKey&&!U.metaKey||G.isWindows&&U.getModifierState("AltGraph");return U.type==="keypress"?ne:ne&&(!U.keyCode||U.keyCode>47)}_keyUp(G){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1||((function(U){return U.keyCode===16||U.keyCode===17||U.keyCode===18})(G)||this.focus(),this.updateCursorStyle(G),this._keyPressHandled=!1)}_keyPress(G){let U;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(G)===!1)return!1;if(this.cancel(G),G.charCode)U=G.charCode;else if(G.which===null||G.which===void 0)U=G.keyCode;else{if(G.which===0||G.charCode===0)return!1;U=G.which}return!(!U||(G.altKey||G.ctrlKey||G.metaKey)&&!this._isThirdLevelShift(this.browser,G)||(U=String.fromCharCode(U),this._onKey.fire({key:U,domEvent:G}),this._showCursor(),this.coreService.triggerDataEvent(U,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(G){if(G.data&&G.inputType==="insertText"&&(!G.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const U=G.data;return this.coreService.triggerDataEvent(U,!0),this.cancel(G),!0}return!1}resize(G,U){G!==this.cols||U!==this.rows?super.resize(G,U):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(G,U){var ne,te;(ne=this._charSizeService)==null||ne.measure(),(te=this.viewport)==null||te.syncScrollArea(!0)}clear(){var G;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 U=1;U<this.rows;U++)this.buffer.lines.push(this.buffer.getBlankLine($.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(G=this.viewport)==null||G.reset(),this.refresh(0,this.rows-1)}}reset(){var U,ne;this.options.rows=this.rows,this.options.cols=this.cols;const G=this._customKeyEventHandler;this._setup(),super.reset(),(U=this._selectionService)==null||U.reset(),this._decorationService.reset(),(ne=this.viewport)==null||ne.reset(),this._customKeyEventHandler=G,this.refresh(0,this.rows-1)}clearTextureAtlas(){var G;(G=this._renderService)==null||G.clearTextureAtlas()}_reportFocus(){var G;(G=this.element)!=null&&G.classList.contains("focus")?this.coreService.triggerDataEvent(X.C0.ESC+"[I"):this.coreService.triggerDataEvent(X.C0.ESC+"[O")}_reportWindowsOptions(G){if(this._renderService)switch(G){case V.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const U=this._renderService.dimensions.css.canvas.width.toFixed(0),ne=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[4;${ne};${U}t`);break;case V.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const te=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[6;${ve};${te}t`)}}cancel(G,U){if(this.options.cancelEvents||U)return G.preventDefault(),G.stopPropagation(),!1}}a.Terminal=ge},9924:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,h=1e3){this._renderCallback=u,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,h,d){this._rowCount=d,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const c=Date.now();if(c-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=c,this._innerRefresh();else if(!this._additionalRefreshRequested){const S=c-this._lastRefreshMs,w=this._debounceThresholdMS-S;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h)}}},1680:function(f,a,u){var h=this&&this.__decorate||function(_,g,v,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,v):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,v,A);else for(var E=_.length-1;E>=0;E--)(M=_[E])&&(T=(D<3?M(T):D>3?M(g,v,T):M(g,v))||T);return D>3&&T&&Object.defineProperty(g,v,T),T},d=this&&this.__param||function(_,g){return function(v,A){g(v,A,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const c=u(3656),S=u(4725),w=u(8460),k=u(844),x=u(2585);let y=a.Viewport=class extends k.Disposable{constructor(_,g,v,A,M,D,T,E){super(),this._viewportElement=_,this._scrollArea=g,this._bufferService=v,this._optionsService=A,this._charSizeService=M,this._renderService=D,this._coreBrowserService=T,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 w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,c.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(E.colors),this.register(E.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(_){this._viewportElement.style.backgroundColor=_.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(_){if(_)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 g=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==g&&(this._lastRecordedBufferHeight=g,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const _=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==_&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=_),this._refreshAnimationFrame=null}syncScrollArea(_=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(_);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(_)}_handleScroll(_){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 g=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:g,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const _=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(_*(this._smoothScrollState.target-this._smoothScrollState.origin)),_<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(_,g){const v=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(g<0&&this._viewportElement.scrollTop!==0||g>0&&v<this._lastRecordedBufferHeight)||(_.cancelable&&_.preventDefault(),!1)}handleWheel(_){const g=this._getPixelsScrolled(_);return g!==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+g:this._smoothScrollState.target+=g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=g,this._bubbleScroll(_,g))}scrollLines(_){if(_!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const g=_*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!1})}_getPixelsScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let g=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_LINE?g*=this._currentRowHeight:_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._currentRowHeight*this._bufferService.rows),g}getBufferElements(_,g){var E;let v,A="";const M=[],D=g??this._bufferService.buffer.lines.length,T=this._bufferService.buffer.lines;for(let R=_;R<D;R++){const B=T.get(R);if(!B)continue;const H=(E=T.get(R+1))==null?void 0:E.isWrapped;if(A+=B.translateToString(!H),!H||R===T.length-1){const F=document.createElement("div");F.textContent=A,M.push(F),A.length>0&&(v=F),A=""}}return{bufferElements:M,cursorElement:v}}getLinesScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let g=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(g/=this._currentRowHeight+0,this._wheelPartialScroll+=g,g=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._bufferService.rows),g}_applyScrollModifier(_,g){const v=this._optionsService.rawOptions.fastScrollModifier;return v==="alt"&&g.altKey||v==="ctrl"&&g.ctrlKey||v==="shift"&&g.shiftKey?_*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:_*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(_){this._lastTouchY=_.touches[0].pageY}handleTouchMove(_){const g=this._lastTouchY-_.touches[0].pageY;return this._lastTouchY=_.touches[0].pageY,g!==0&&(this._viewportElement.scrollTop+=g,this._bubbleScroll(_,g))}};a.Viewport=y=h([d(2,x.IBufferService),d(3,x.IOptionsService),d(4,S.ICharSizeService),d(5,S.IRenderService),d(6,S.ICoreBrowserService),d(7,S.IThemeService)],y)},3107:function(f,a,u){var h=this&&this.__decorate||function(x,y,_,g){var v,A=arguments.length,M=A<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,_,g);else for(var D=x.length-1;D>=0;D--)(v=x[D])&&(M=(A<3?v(M):A>3?v(y,_,M):v(y,_))||M);return A>3&&M&&Object.defineProperty(y,_,M),M},d=this&&this.__param||function(x,y){return function(_,g){y(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const c=u(4725),S=u(844),w=u(2585);let k=a.BufferDecorationRenderer=class extends S.Disposable{constructor(x,y,_,g,v){super(),this._screenElement=x,this._bufferService=y,this._coreBrowserService=_,this._decorationService=g,this._renderService=v,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((A=>this._removeDecoration(A)))),this.register((0,S.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 x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var g;const y=this._coreBrowserService.mainDocument.createElement("div");y.classList.add("xterm-decoration"),y.classList.toggle("xterm-decoration-top-layer",((g=x==null?void 0:x.options)==null?void 0:g.layer)==="top"),y.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,y.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",y.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",y.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=x.options.x??0;return _&&_>this._bufferService.cols&&(y.style.display="none"),this._refreshXPosition(x,y),y}_refreshStyle(x){const y=x.marker.line-this._bufferService.buffers.active.ydisp;if(y<0||y>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let _=this._decorationElements.get(x);_||(_=this._createElement(x),x.element=_,this._decorationElements.set(x,_),this._container.appendChild(_),x.onDispose((()=>{this._decorationElements.delete(x),_.remove()}))),_.style.top=y*this._renderService.dimensions.css.cell.height+"px",_.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(_)}}_refreshXPosition(x,y=x.element){if(!y)return;const _=x.options.x??0;(x.options.anchor||"left")==="right"?y.style.right=_?_*this._renderService.dimensions.css.cell.width+"px":"":y.style.left=_?_*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var y;(y=this._decorationElements.get(x))==null||y.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=k=h([d(1,w.IBufferService),d(2,c.ICoreBrowserService),d(3,w.IDecorationService),d(4,c.IRenderService)],k)},5871:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const h of this._zones)if(h.color===u.options.overviewRulerOptions.color&&h.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,u.marker.line))return;if(this._lineAdjacentToZone(h,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(h,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,h){return h>=u.startBufferLine&&h<=u.endBufferLine}_lineAdjacentToZone(u,h,d){return h>=u.startBufferLine-this._linePadding[d||"full"]&&h<=u.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(f,a,u){var h=this&&this.__decorate||function(v,A,M,D){var T,E=arguments.length,R=E<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(v,A,M,D);else for(var B=v.length-1;B>=0;B--)(T=v[B])&&(R=(E<3?T(R):E>3?T(A,M,R):T(A,M))||R);return E>3&&R&&Object.defineProperty(A,M,R),R},d=this&&this.__param||function(v,A){return function(M,D){A(M,D,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const c=u(5871),S=u(4725),w=u(844),k=u(2585),x={full:0,left:0,center:0,right:0},y={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0};let g=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(v,A,M,D,T,E,R){var H;super(),this._viewportElement=v,this._screenElement=A,this._bufferService=M,this._decorationService=D,this._renderService=T,this._optionsService=E,this._coreBrowserService=R,this._colorZoneStore=new c.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(),(H=this._viewportElement.parentElement)==null||H.insertBefore(this._canvas,this._viewportElement);const B=this._canvas.getContext("2d");if(!B)throw new Error("Ctx cannot be null");this._ctx=B,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var F;(F=this._canvas)==null||F.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 v=Math.floor(this._canvas.width/3),A=Math.ceil(this._canvas.width/3);y.full=this._canvas.width,y.left=v,y.center=A,y.right=v,this._refreshDrawHeightConstants(),_.full=0,_.left=0,_.center=y.left,_.right=y.left+y.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const v=this._canvas.height/this._bufferService.buffer.lines.length,A=Math.round(Math.max(Math.min(v,12),6)*this._coreBrowserService.dpr);x.left=A,x.center=A,x.right=A}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.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 A of this._decorationService.decorations)this._colorZoneStore.addDecoration(A);this._ctx.lineWidth=1;const v=this._colorZoneStore.zones;for(const A of v)A.position!=="full"&&this._renderColorZone(A);for(const A of v)A.position==="full"&&this._renderColorZone(A);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(v){this._ctx.fillStyle=v.color,this._ctx.fillRect(_[v.position||"full"],Math.round((this._canvas.height-1)*(v.startBufferLine/this._bufferService.buffers.active.lines.length)-x[v.position||"full"]/2),y[v.position||"full"],Math.round((this._canvas.height-1)*((v.endBufferLine-v.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[v.position||"full"]))}_queueRefresh(v,A){this._shouldUpdateDimensions=v||this._shouldUpdateDimensions,this._shouldUpdateAnchor=A||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=g=h([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,S.IRenderService),d(5,k.IOptionsService),d(6,S.ICoreBrowserService)],g)},2950:function(f,a,u){var h=this&&this.__decorate||function(x,y,_,g){var v,A=arguments.length,M=A<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,_,g);else for(var D=x.length-1;D>=0;D--)(v=x[D])&&(M=(A<3?v(M):A>3?v(y,_,M):v(y,_))||M);return A>3&&M&&Object.defineProperty(y,_,M),M},d=this&&this.__param||function(x,y){return function(_,g){y(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const c=u(4725),S=u(2585),w=u(2584);let k=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,y,_,g,v,A){this._textarea=x,this._compositionView=y,this._bufferService=_,this._optionsService=g,this._coreService=v,this._renderService=A,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(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const y={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let _;this._isSendingComposition=!1,y.start+=this._dataAlreadySent.length,_=this._isComposing?this._textarea.value.substring(y.start,y.end):this._textarea.value.substring(y.start),_.length>0&&this._coreService.triggerDataEvent(_,!0)}}),0)}else{this._isSendingComposition=!1;const y=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(y,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const y=this._textarea.value,_=y.replace(x,"");this._dataAlreadySent=_,y.length>x.length?this._coreService.triggerDataEvent(_,!0):y.length<x.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):y.length===x.length&&y!==x&&this._coreService.triggerDataEvent(y,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const y=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),_=this._renderService.dimensions.css.cell.height,g=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,v=y*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=v+"px",this._compositionView.style.top=g+"px",this._compositionView.style.height=_+"px",this._compositionView.style.lineHeight=_+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const A=this._compositionView.getBoundingClientRect();this._textarea.style.left=v+"px",this._textarea.style.top=g+"px",this._textarea.style.width=Math.max(A.width,1)+"px",this._textarea.style.height=Math.max(A.height,1)+"px",this._textarea.style.lineHeight=A.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=k=h([d(2,S.IBufferService),d(3,S.IOptionsService),d(4,S.ICoreService),d(5,c.IRenderService)],k)},9806:(f,a)=>{function u(h,d,c){const S=c.getBoundingClientRect(),w=h.getComputedStyle(c),k=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[d.clientX-S.left-k,d.clientY-S.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(h,d,c,S,w,k,x,y,_){if(!k)return;const g=u(h,d,c);return g?(g[0]=Math.ceil((g[0]+(_?x/2:0))/x),g[1]=Math.ceil(g[1]/y),g[0]=Math.min(Math.max(g[0],1),S+(_?1:0)),g[1]=Math.min(Math.max(g[1],1),w),g):void 0}},9504:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=u(2584);function d(y,_,g,v){const A=y-c(y,g),M=_-c(_,g),D=Math.abs(A-M)-(function(T,E,R){let B=0;const H=T-c(T,R),F=E-c(E,R);for(let q=0;q<Math.abs(H-F);q++){const Y=S(T,E)==="A"?-1:1,K=R.buffer.lines.get(H+Y*q);K!=null&&K.isWrapped&&B++}return B})(y,_,g);return x(D,k(S(y,_),v))}function c(y,_){let g=0,v=_.buffer.lines.get(y),A=v==null?void 0:v.isWrapped;for(;A&&y>=0&&y<_.rows;)g++,v=_.buffer.lines.get(--y),A=v==null?void 0:v.isWrapped;return g}function S(y,_){return y>_?"A":"B"}function w(y,_,g,v,A,M){let D=y,T=_,E="";for(;D!==g||T!==v;)D+=A?1:-1,A&&D>M.cols-1?(E+=M.buffer.translateBufferLineToString(T,!1,y,D),D=0,y=0,T++):!A&&D<0&&(E+=M.buffer.translateBufferLineToString(T,!1,0,y+1),D=M.cols-1,y=D,T--);return E+M.buffer.translateBufferLineToString(T,!1,y,D)}function k(y,_){const g=_?"O":"[";return h.C0.ESC+g+y}function x(y,_){y=Math.floor(y);let g="";for(let v=0;v<y;v++)g+=_;return g}a.moveToCellSequence=function(y,_,g,v){const A=g.buffer.x,M=g.buffer.y;if(!g.buffer.hasScrollback)return(function(E,R,B,H,F,q){return d(R,H,F,q).length===0?"":x(w(E,R,E,R-c(R,F),!1,F).length,k("D",q))})(A,M,0,_,g,v)+d(M,_,g,v)+(function(E,R,B,H,F,q){let Y;Y=d(R,H,F,q).length>0?H-c(H,F):R;const K=H,$=(function(X,Z,z,O,j,V){let I;return I=d(z,O,j,V).length>0?O-c(O,j):Z,X<z&&I<=O||X>=z&&I<O?"C":"D"})(E,R,B,H,F,q);return x(w(E,Y,B,K,$==="C",F).length,k($,q))})(A,M,y,_,g,v);let D;if(M===_)return D=A>y?"D":"C",x(Math.abs(A-y),k(D,v));D=M>_?"D":"C";const T=Math.abs(M-_);return x((function(E,R){return R.cols-E})(M>_?y:A,g)+(T-1)*g.cols+1+((M>_?A:y)-1),k(D,v))}},1296:function(f,a,u){var h=this&&this.__decorate||function(q,Y,K,$){var X,Z=arguments.length,z=Z<3?Y:$===null?$=Object.getOwnPropertyDescriptor(Y,K):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(q,Y,K,$);else for(var O=q.length-1;O>=0;O--)(X=q[O])&&(z=(Z<3?X(z):Z>3?X(Y,K,z):X(Y,K))||z);return Z>3&&z&&Object.defineProperty(Y,K,z),z},d=this&&this.__param||function(q,Y){return function(K,$){Y(K,$,q)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const c=u(3787),S=u(2550),w=u(2223),k=u(6171),x=u(6052),y=u(4725),_=u(8055),g=u(8460),v=u(844),A=u(2585),M="xterm-dom-renderer-owner-",D="xterm-rows",T="xterm-fg-",E="xterm-bg-",R="xterm-focus",B="xterm-selection";let H=1,F=a.DomRenderer=class extends v.Disposable{constructor(q,Y,K,$,X,Z,z,O,j,V,I,ie,ge){super(),this._terminal=q,this._document=Y,this._element=K,this._screenElement=$,this._viewportElement=X,this._helperContainer=Z,this._linkifier2=z,this._charSizeService=j,this._optionsService=V,this._bufferService=I,this._coreBrowserService=ie,this._themeService=ge,this._terminalClass=H++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new g.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),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(B),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,k.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ee=>this._injectCss(ee)))),this._injectCss(this._themeService.colors),this._rowFactory=O.createInstance(c.DomRendererRowFactory,document),this._element.classList.add(M+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ee=>this._handleLinkHover(ee)))),this.register(this._linkifier2.onHideLinkUnderline((ee=>this._handleLinkLeave(ee)))),this.register((0,v.toDisposable)((()=>{this._element.classList.remove(M+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new S.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 q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),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/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),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 K of this._rowElements)K.style.width=`${this.dimensions.css.canvas.width}px`,K.style.height=`${this.dimensions.css.cell.height}px`,K.style.lineHeight=`${this.dimensions.css.cell.height}px`,K.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Y=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Y,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(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${D} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Y+=`${this._terminalSelector} .${D} .xterm-dim { color: ${_.color.multiplyOpacity(q.foreground,.5).css};}`,Y+=`${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 K=`blink_underline_${this._terminalClass}`,$=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${$} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${X} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,Y+=`${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Y+=`${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[Z,z]of q.ansi.entries())Y+=`${this._terminalSelector} .${T}${Z} { color: ${z.css}; }${this._terminalSelector} .${T}${Z}.xterm-dim { color: ${_.color.multiplyOpacity(z,.5).css}; }${this._terminalSelector} .${E}${Z} { background-color: ${z.css}; }`;Y+=`${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(q.background).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${_.color.multiplyOpacity(_.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${E}${w.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,Y){for(let K=this._rowElements.length;K<=Y;K++){const $=this._document.createElement("div");this._rowContainer.appendChild($),this._rowElements.push($)}for(;this._rowElements.length>Y;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(q,Y){this._refreshRowElements(q,Y),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(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(q,Y,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,Y,K),this.renderRows(0,this._bufferService.rows-1),!q||!Y)return;this._selectionRenderModel.update(this._terminal,q,Y,K);const $=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,Z=this._selectionRenderModel.viewportCappedStartRow,z=this._selectionRenderModel.viewportCappedEndRow;if(Z>=this._bufferService.rows||z<0)return;const O=this._document.createDocumentFragment();if(K){const j=q[0]>Y[0];O.appendChild(this._createSelectionElement(Z,j?Y[0]:q[0],j?q[0]:Y[0],z-Z+1))}else{const j=$===Z?q[0]:0,V=Z===X?Y[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(Z,j,V));const I=z-Z-1;if(O.appendChild(this._createSelectionElement(Z+1,0,this._bufferService.cols,I)),Z!==z){const ie=X===z?Y[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(z,0,ie))}}this._selectionContainer.appendChild(O)}_createSelectionElement(q,Y,K,$=1){const X=this._document.createElement("div"),Z=Y*this.dimensions.css.cell.width;let z=this.dimensions.css.cell.width*(K-Y);return Z+z>this.dimensions.css.canvas.width&&(z=this.dimensions.css.canvas.width-Z),X.style.height=$*this.dimensions.css.cell.height+"px",X.style.top=q*this.dimensions.css.cell.height+"px",X.style.left=`${Z}px`,X.style.width=`${z}px`,X}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 q of this._rowElements)q.replaceChildren()}renderRows(q,Y){const K=this._bufferService.buffer,$=K.ybase+K.y,X=Math.min(K.x,this._bufferService.cols-1),Z=this._optionsService.rawOptions.cursorBlink,z=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let j=q;j<=Y;j++){const V=j+K.ydisp,I=this._rowElements[j],ie=K.lines.get(V);if(!I||!ie)break;I.replaceChildren(...this._rowFactory.createRow(ie,V,V===$,z,O,X,Z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${M}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,Y,K,$,X,Z){K<0&&(q=0),$<0&&(Y=0);const z=this._bufferService.rows-1;K=Math.max(Math.min(K,z),0),$=Math.max(Math.min($,z),0),X=Math.min(X,this._bufferService.cols);const O=this._bufferService.buffer,j=O.ybase+O.y,V=Math.min(O.x,X-1),I=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,ge=this._optionsService.rawOptions.cursorInactiveStyle;for(let ee=K;ee<=$;++ee){const G=ee+O.ydisp,U=this._rowElements[ee],ne=O.lines.get(G);if(!U||!ne)break;U.replaceChildren(...this._rowFactory.createRow(ne,G,G===j,ie,ge,V,I,this.dimensions.css.cell.width,this._widthCache,Z?ee===K?q:0:-1,Z?(ee===$?Y:X)-1:-1))}}};a.DomRenderer=F=h([d(7,A.IInstantiationService),d(8,y.ICharSizeService),d(9,A.IOptionsService),d(10,A.IBufferService),d(11,y.ICoreBrowserService),d(12,y.IThemeService)],F)},3787:function(f,a,u){var h=this&&this.__decorate||function(D,T,E,R){var B,H=arguments.length,F=H<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(D,T,E,R);else for(var q=D.length-1;q>=0;q--)(B=D[q])&&(F=(H<3?B(F):H>3?B(T,E,F):B(T,E))||F);return H>3&&F&&Object.defineProperty(T,E,F),F},d=this&&this.__param||function(D,T){return function(E,R){T(E,R,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const c=u(2223),S=u(643),w=u(511),k=u(2585),x=u(8055),y=u(4725),_=u(4269),g=u(6171),v=u(3734);let A=a.DomRendererRowFactory=class{constructor(D,T,E,R,B,H,F){this._document=D,this._characterJoinerService=T,this._optionsService=E,this._coreBrowserService=R,this._coreService=B,this._decorationService=H,this._themeService=F,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,T,E){this._selectionStart=D,this._selectionEnd=T,this._columnSelectMode=E}createRow(D,T,E,R,B,H,F,q,Y,K,$){const X=[],Z=this._characterJoinerService.getJoinedCharacters(T),z=this._themeService.colors;let O,j=D.getNoBgTrimmedLength();E&&j<H+1&&(j=H+1);let V=0,I="",ie=0,ge=0,ee=0,G=!1,U=0,ne=!1,te=0;const ve=[],Se=K!==-1&&$!==-1;for(let Me=0;Me<j;Me++){D.loadCell(Me,this._workCell);let Le=this._workCell.getWidth();if(Le===0)continue;let Pe=!1,Je=Me,de=this._workCell;if(Z.length>0&&Me===Z[0][0]){Pe=!0;const Ue=Z.shift();de=new _.JoinedCellData(this._workCell,D.translateToString(!0,Ue[0],Ue[1]),Ue[1]-Ue[0]),Je=Ue[1]-1,Le=de.getWidth()}const Ie=this._isCellInSelection(Me,T),Re=E&&Me===H,ut=Se&&Me>=K&&Me<=$;let ce=!1;this._decorationService.forEachDecorationAtCell(Me,T,void 0,(Ue=>{ce=!0}));let zt=de.getChars()||S.WHITESPACE_CELL_CHAR;if(zt===" "&&(de.isUnderline()||de.isOverline())&&(zt=" "),te=Le*q-Y.get(zt,de.isBold(),de.isItalic()),O){if(V&&(Ie&&ne||!Ie&&!ne&&de.bg===ie)&&(Ie&&ne&&z.selectionForeground||de.fg===ge)&&de.extended.ext===ee&&ut===G&&te===U&&!Re&&!Pe&&!ce){de.isInvisible()?I+=S.WHITESPACE_CELL_CHAR:I+=zt,V++;continue}V&&(O.textContent=I),O=this._document.createElement("span"),V=0,I=""}else O=this._document.createElement("span");if(ie=de.bg,ge=de.fg,ee=de.extended.ext,G=ut,U=te,ne=Ie,Pe&&H>=Me&&H<=Je&&(H=Me),!this._coreService.isCursorHidden&&Re&&this._coreService.isCursorInitialized){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)F&&ve.push("xterm-cursor-blink"),ve.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(B)switch(B){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(de.isBold()&&ve.push("xterm-bold"),de.isItalic()&&ve.push("xterm-italic"),de.isDim()&&ve.push("xterm-dim"),I=de.isInvisible()?S.WHITESPACE_CELL_CHAR:de.getChars()||S.WHITESPACE_CELL_CHAR,de.isUnderline()&&(ve.push(`xterm-underline-${de.extended.underlineStyle}`),I===" "&&(I=" "),!de.isUnderlineColorDefault()))if(de.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${v.AttributeData.toColorRGB(de.getUnderlineColor()).join(",")})`;else{let Ue=de.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&de.isBold()&&Ue<8&&(Ue+=8),O.style.textDecorationColor=z.ansi[Ue].css}de.isOverline()&&(ve.push("xterm-overline"),I===" "&&(I=" ")),de.isStrikethrough()&&ve.push("xterm-strikethrough"),ut&&(O.style.textDecoration="underline");let Ye=de.getFgColor(),pt=de.getFgColorMode(),Ht=de.getBgColor(),ue=de.getBgColorMode();const _e=!!de.isInverse();if(_e){const Ue=Ye;Ye=Ht,Ht=Ue;const At=pt;pt=ue,ue=At}let xe,Oe,Ne,vt=!1;switch(this._decorationService.forEachDecorationAtCell(Me,T,void 0,(Ue=>{Ue.options.layer!=="top"&&vt||(Ue.backgroundColorRGB&&(ue=50331648,Ht=Ue.backgroundColorRGB.rgba>>8&16777215,xe=Ue.backgroundColorRGB),Ue.foregroundColorRGB&&(pt=50331648,Ye=Ue.foregroundColorRGB.rgba>>8&16777215,Oe=Ue.foregroundColorRGB),vt=Ue.options.layer==="top")})),!vt&&Ie&&(xe=this._coreBrowserService.isFocused?z.selectionBackgroundOpaque:z.selectionInactiveBackgroundOpaque,Ht=xe.rgba>>8&16777215,ue=50331648,vt=!0,z.selectionForeground&&(pt=50331648,Ye=z.selectionForeground.rgba>>8&16777215,Oe=z.selectionForeground)),vt&&ve.push("xterm-decoration-top"),ue){case 16777216:case 33554432:Ne=z.ansi[Ht],ve.push(`xterm-bg-${Ht}`);break;case 50331648:Ne=x.channels.toColor(Ht>>16,Ht>>8&255,255&Ht),this._addStyle(O,`background-color:#${M((Ht>>>0).toString(16),"0",6)}`);break;default:_e?(Ne=z.foreground,ve.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):Ne=z.background}switch(xe||de.isDim()&&(xe=x.color.multiplyOpacity(Ne,.5)),pt){case 16777216:case 33554432:de.isBold()&&Ye<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ye+=8),this._applyMinimumContrast(O,Ne,z.ansi[Ye],de,xe,void 0)||ve.push(`xterm-fg-${Ye}`);break;case 50331648:const Ue=x.channels.toColor(Ye>>16&255,Ye>>8&255,255&Ye);this._applyMinimumContrast(O,Ne,Ue,de,xe,Oe)||this._addStyle(O,`color:#${M(Ye.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,Ne,z.foreground,de,xe,Oe)||_e&&ve.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}ve.length&&(O.className=ve.join(" "),ve.length=0),Re||Pe||ce?O.textContent=I:V++,te!==this.defaultSpacing&&(O.style.letterSpacing=`${te}px`),X.push(O),Me=Je}return O&&V&&(O.textContent=I),X}_applyMinimumContrast(D,T,E,R,B,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,g.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const F=this._getContrastCache(R);let q;if(B||H||(q=F.getColor(T.rgba,E.rgba)),q===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);q=x.color.ensureContrastRatio(B||T,H||E,Y),F.setColor((B||T).rgba,(H||E).rgba,q??null)}return!!q&&(this._addStyle(D,`color:${q.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,T){D.setAttribute("style",`${D.getAttribute("style")||""}${T};`)}_isCellInSelection(D,T){const E=this._selectionStart,R=this._selectionEnd;return!(!E||!R)&&(this._columnSelectMode?E[0]<=R[0]?D>=E[0]&&T>=E[1]&&D<R[0]&&T<=R[1]:D<E[0]&&T>=E[1]&&D>=R[0]&&T<=R[1]:T>E[1]&&T<R[1]||E[1]===R[1]&&T===E[1]&&D>=E[0]&&D<R[0]||E[1]<R[1]&&T===R[1]&&D<R[0]||E[1]<R[1]&&T===E[1]&&D>=E[0])}};function M(D,T,E){for(;D.length<E;)D=T+D;return D}a.DomRendererRowFactory=A=h([d(1,y.ICharacterJoinerService),d(2,k.IOptionsService),d(3,y.ICoreBrowserService),d(4,k.ICoreService),d(5,k.IDecorationService),d(6,y.IThemeService)],A)},2550:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.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 d=u.createElement("span");d.classList.add("xterm-char-measure-element");const c=u.createElement("span");c.classList.add("xterm-char-measure-element"),c.style.fontWeight="bold";const S=u.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[d,c,S,w],this._container.appendChild(d),this._container.appendChild(c),this._container.appendChild(S),this._container.appendChild(w),h.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(u,h,d,c){u===this._font&&h===this._fontSize&&d===this._weight&&c===this._weightBold||(this._font=u,this._fontSize=h,this._weight=d,this._weightBold=c,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${c}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${c}`,this.clear())}get(u,h,d){let c=0;if(!h&&!d&&u.length===1&&(c=u.charCodeAt(0))<256){if(this._flat[c]!==-9999)return this._flat[c];const k=this._measure(u,0);return k>0&&(this._flat[c]=k),k}let S=u;h&&(S+="B"),d&&(S+="I");let w=this._holey.get(S);if(w===void 0){let k=0;h&&(k|=1),d&&(k|=2),w=this._measure(u,k),w>0&&this._holey.set(S,w)}return w}_measure(u,h){const d=this._measureElements[h];return d.textContent=u.repeat(32),d.offsetWidth/32}}},2223:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(f,a)=>{function u(d){return 57508<=d&&d<=57558}function h(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},a.isEmoji=h,a.allowRescaling=function(d,c,S,w){return c===1&&S>Math.ceil(1.5*w)&&d!==void 0&&d>255&&!h(d)&&!u(d)&&!(function(k){return 57344<=k&&k<=63743})(d)},a.treatGlyphAsBackgroundColor=function(d){return u(d)||(function(c){return 9472<=c&&c<=9631})(d)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(d,c,S=0){return(d-(2*Math.round(c)-S))%(2*Math.round(c))}},6052:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{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(d,c,S,w=!1){if(this.selectionStart=c,this.selectionEnd=S,!c||!S||c[0]===S[0]&&c[1]===S[1])return void this.clear();const k=d.buffers.active.ydisp,x=c[1]-k,y=S[1]-k,_=Math.max(x,0),g=Math.min(y,d.rows-1);_>=d.rows||g<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=y,this.viewportCappedStartRow=_,this.viewportCappedEndRow=g,this.startCol=c[0],this.endCol=S[0])}isCellSelected(d,c,S){return!!this.hasSelection&&(S-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&S>=this.viewportCappedStartRow&&c<this.endCol&&S<=this.viewportCappedEndRow:c<this.startCol&&S>=this.viewportCappedStartRow&&c>=this.endCol&&S<=this.viewportCappedEndRow:S>this.viewportStartRow&&S<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&S===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&S===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&S===this.viewportStartRow&&c>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(u){this._bufferService=u,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 u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,h=this.selectionEnd;return!(!u||!h)&&(u[1]>h[1]||u[1]===h[1]&&u[0]>h[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(f,a,u){var h=this&&this.__decorate||function(g,v,A,M){var D,T=arguments.length,E=T<3?v:M===null?M=Object.getOwnPropertyDescriptor(v,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,v,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(E=(T<3?D(E):T>3?D(v,A,E):D(v,A))||E);return T>3&&E&&Object.defineProperty(v,A,E),E},d=this&&this.__param||function(g,v){return function(A,M){v(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const c=u(2585),S=u(8460),w=u(844);let k=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(g,v,A){super(),this._optionsService=A,this.width=0,this.height=0,this._onCharSizeChange=this.register(new S.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new _(this._optionsService))}catch{this._measureStrategy=this.register(new y(g,v,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const g=this._measureStrategy.measure();g.width===this.width&&g.height===this.height||(this.width=g.width,this.height=g.height,this._onCharSizeChange.fire())}};a.CharSizeService=k=h([d(2,c.IOptionsService)],k);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(v,A){v!==void 0&&v>0&&A!==void 0&&A>0&&(this._result.width=v,this._result.height=A)}}class y extends x{constructor(v,A,M){super(),this._document=v,this._parentElement=A,this._optionsService=M,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 _ extends x{constructor(v){super(),this._optionsService=v,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const A=this._ctx.measureText("W");if(!("width"in A&&"fontBoundingBoxAscent"in A&&"fontBoundingBoxDescent"in A))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const v=this._ctx.measureText("W");return this._validateAndSet(v.width,v.fontBoundingBoxAscent+v.fontBoundingBoxDescent),this._result}}},4269:function(f,a,u){var h=this&&this.__decorate||function(_,g,v,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,v):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,v,A);else for(var E=_.length-1;E>=0;E--)(M=_[E])&&(T=(D<3?M(T):D>3?M(g,v,T):M(g,v))||T);return D>3&&T&&Object.defineProperty(g,v,T),T},d=this&&this.__param||function(_,g){return function(v,A){g(v,A,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const c=u(3734),S=u(643),w=u(511),k=u(2585);class x extends c.AttributeData{constructor(g,v,A){super(),this.content=0,this.combinedData="",this.fg=g.fg,this.bg=g.bg,this.combinedData=v,this._width=A}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(g){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let y=a.CharacterJoinerService=class rg{constructor(g){this._bufferService=g,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(g){const v={id:this._nextCharacterJoinerId++,handler:g};return this._characterJoiners.push(v),v.id}deregister(g){for(let v=0;v<this._characterJoiners.length;v++)if(this._characterJoiners[v].id===g)return this._characterJoiners.splice(v,1),!0;return!1}getJoinedCharacters(g){if(this._characterJoiners.length===0)return[];const v=this._bufferService.buffer.lines.get(g);if(!v||v.length===0)return[];const A=[],M=v.translateToString(!0);let D=0,T=0,E=0,R=v.getFg(0),B=v.getBg(0);for(let H=0;H<v.getTrimmedLength();H++)if(v.loadCell(H,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==B){if(H-D>1){const F=this._getJoinedRanges(M,E,T,v,D);for(let q=0;q<F.length;q++)A.push(F[q])}D=H,E=T,R=this._workCell.fg,B=this._workCell.bg}T+=this._workCell.getChars().length||S.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-D>1){const H=this._getJoinedRanges(M,E,T,v,D);for(let F=0;F<H.length;F++)A.push(H[F])}return A}_getJoinedRanges(g,v,A,M,D){const T=g.substring(v,A);let E=[];try{E=this._characterJoiners[0].handler(T)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const B=this._characterJoiners[R].handler(T);for(let H=0;H<B.length;H++)rg._mergeRanges(E,B[H])}catch(B){console.error(B)}return this._stringRangesToCellRanges(E,M,D),E}_stringRangesToCellRanges(g,v,A){let M=0,D=!1,T=0,E=g[M];if(E){for(let R=A;R<this._bufferService.cols;R++){const B=v.getWidth(R),H=v.getString(R).length||S.WHITESPACE_CELL_CHAR.length;if(B!==0){if(!D&&E[0]<=T&&(E[0]=R,D=!0),E[1]<=T){if(E[1]=R,E=g[++M],!E)break;E[0]<=T?(E[0]=R,D=!0):D=!1}T+=H}}E&&(E[1]=this._bufferService.cols)}}static _mergeRanges(g,v){let A=!1;for(let M=0;M<g.length;M++){const D=g[M];if(A){if(v[1]<=D[0])return g[M-1][1]=v[1],g;if(v[1]<=D[1])return g[M-1][1]=Math.max(v[1],D[1]),g.splice(M,1),g;g.splice(M,1),M--}else{if(v[1]<=D[0])return g.splice(M,0,v),g;if(v[1]<=D[1])return D[0]=Math.min(v[0],D[0]),g;v[0]<D[1]&&(D[0]=Math.min(v[0],D[0]),A=!0)}}return A?g[g.length-1][1]=v[1]:g.push(v),g}};a.CharacterJoinerService=y=h([d(0,k.IBufferService)],y)},5114:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=u(844),d=u(8460),c=u(3656);class S extends h.Disposable{constructor(x,y,_){super(),this._textarea=x,this._window=y,this.mainDocument=_,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((g=>this._screenDprMonitor.setWindow(g)))),this.register((0,d.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(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=S;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,h.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,c.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var x;this._outerListener&&((x=this._resolutionMediaMatchList)==null||x.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:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=u(844);class d extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(S){return this.linkProviders.push(S),{dispose:()=>{const w=this.linkProviders.indexOf(S);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=d},8934:function(f,a,u){var h=this&&this.__decorate||function(k,x,y,_){var g,v=arguments.length,A=v<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,y):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,x,y,_);else for(var M=k.length-1;M>=0;M--)(g=k[M])&&(A=(v<3?g(A):v>3?g(x,y,A):g(x,y))||A);return v>3&&A&&Object.defineProperty(x,y,A),A},d=this&&this.__param||function(k,x){return function(y,_){x(y,_,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const c=u(4725),S=u(9806);let w=a.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,y,_,g){return(0,S.getCoords)(window,k,x,y,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,g)}getMouseReportCoords(k,x){const y=(0,S.getCoordsRelativeToElement)(window,k,x);if(this._charSizeService.hasValidSize)return y[0]=Math.min(Math.max(y[0],0),this._renderService.dimensions.css.canvas.width-1),y[1]=Math.min(Math.max(y[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(y[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(y[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(y[0]),y:Math.floor(y[1])}}};a.MouseService=w=h([d(0,c.IRenderService),d(1,c.ICharSizeService)],w)},3230:function(f,a,u){var h=this&&this.__decorate||function(g,v,A,M){var D,T=arguments.length,E=T<3?v:M===null?M=Object.getOwnPropertyDescriptor(v,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,v,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(E=(T<3?D(E):T>3?D(v,A,E):D(v,A))||E);return T>3&&E&&Object.defineProperty(v,A,E),E},d=this&&this.__param||function(g,v){return function(A,M){v(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const c=u(6193),S=u(4725),w=u(8460),k=u(844),x=u(7226),y=u(2585);let _=a.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,v,A,M,D,T,E,R){super(),this._rowCount=g,this._charSizeService=M,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new k.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 w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new c.RenderDebouncer(((B,H)=>this._renderRows(B,H)),E),this.register(this._renderDebouncer),this.register(E.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var B;return(B=this._renderer.value)==null?void 0:B.clear()}))),this.register(A.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(D.onDecorationRegistered((()=>this._fullRefresh()))),this.register(D.onDecorationRemoved((()=>this._fullRefresh()))),this.register(A.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(A.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(E.window,v),this.register(E.onWindowChange((B=>this._registerIntersectionObserver(B,v))))}_registerIntersectionObserver(g,v){if("IntersectionObserver"in g){const A=new g.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});A.observe(v),this._observerDisposable.value=(0,k.toDisposable)((()=>A.disconnect()))}}_handleIntersectionChange(g){this._isPaused=g.isIntersecting===void 0?g.intersectionRatio===0:!g.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(g,v,A=!1){this._isPaused?this._needsFullRefresh=!0:(A||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(g,v,this._rowCount))}_renderRows(g,v){this._renderer.value&&(g=Math.min(g,this._rowCount-1),v=Math.min(v,this._rowCount-1),this._renderer.value.renderRows(g,v),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:g,end:v}),this._onRender.fire({start:g,end:v}),this._isNextRenderRedrawOnly=!0)}resize(g,v){this._rowCount=v,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(g){this._renderer.value=g,this._renderer.value&&(this._renderer.value.onRequestRedraw((v=>this.refreshRows(v.start,v.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(g){return this._renderDebouncer.addRefreshCallback(g)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var g,v;this._renderer.value&&((v=(g=this._renderer.value).clearTextureAtlas)==null||v.call(g),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(g,v){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var A;return(A=this._renderer.value)==null?void 0:A.handleResize(g,v)})):this._renderer.value.handleResize(g,v),this._fullRefresh())}handleCharSizeChanged(){var g;(g=this._renderer.value)==null||g.handleCharSizeChanged()}handleBlur(){var g;(g=this._renderer.value)==null||g.handleBlur()}handleFocus(){var g;(g=this._renderer.value)==null||g.handleFocus()}handleSelectionChanged(g,v,A){var M;this._selectionState.start=g,this._selectionState.end=v,this._selectionState.columnSelectMode=A,(M=this._renderer.value)==null||M.handleSelectionChanged(g,v,A)}handleCursorMove(){var g;(g=this._renderer.value)==null||g.handleCursorMove()}clear(){var g;(g=this._renderer.value)==null||g.clear()}};a.RenderService=_=h([d(2,y.IOptionsService),d(3,S.ICharSizeService),d(4,y.IDecorationService),d(5,y.IBufferService),d(6,S.ICoreBrowserService),d(7,S.IThemeService)],_)},9312:function(f,a,u){var h=this&&this.__decorate||function(E,R,B,H){var F,q=arguments.length,Y=q<3?R:H===null?H=Object.getOwnPropertyDescriptor(R,B):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(E,R,B,H);else for(var K=E.length-1;K>=0;K--)(F=E[K])&&(Y=(q<3?F(Y):q>3?F(R,B,Y):F(R,B))||Y);return q>3&&Y&&Object.defineProperty(R,B,Y),Y},d=this&&this.__param||function(E,R){return function(B,H){R(B,H,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const c=u(9806),S=u(9504),w=u(456),k=u(4725),x=u(8460),y=u(844),_=u(6114),g=u(4841),v=u(511),A=u(2585),M=" ",D=new RegExp(M,"g");let T=a.SelectionService=class extends y.Disposable{constructor(E,R,B,H,F,q,Y,K,$){super(),this._element=E,this._screenElement=R,this._linkifier=B,this._bufferService=H,this._coreService=F,this._mouseService=q,this._optionsService=Y,this._renderService=K,this._coreBrowserService=$,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new v.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((X=>this._handleTrim(X))),this.register(this._bufferService.buffers.onBufferActivate((X=>this._handleBufferActivate(X)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,y.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 E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!E||!R||E[0]===R[0]&&E[1]===R[1])}get selectionText(){const E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!E||!R)return"";const B=this._bufferService.buffer,H=[];if(this._activeSelectionMode===3){if(E[0]===R[0])return"";const F=E[0]<R[0]?E[0]:R[0],q=E[0]<R[0]?R[0]:E[0];for(let Y=E[1];Y<=R[1];Y++){const K=B.translateBufferLineToString(Y,!0,F,q);H.push(K)}}else{const F=E[1]===R[1]?R[0]:void 0;H.push(B.translateBufferLineToString(E[1],!0,E[0],F));for(let q=E[1]+1;q<=R[1]-1;q++){const Y=B.lines.get(q),K=B.translateBufferLineToString(q,!0);Y!=null&&Y.isWrapped?H[H.length-1]+=K:H.push(K)}if(E[1]!==R[1]){const q=B.lines.get(R[1]),Y=B.translateBufferLineToString(R[1],!0,0,R[0]);q&&q.isWrapped?H[H.length-1]+=Y:H.push(Y)}}return H.map((F=>F.replace(D," "))).join(_.isWindows?`\r
|
|
56
|
+
`:`
|
|
57
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(E){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),_.isLinux&&E&&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(E){const R=this._getMouseBufferCoords(E),B=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(B&&H&&R)&&this._areCoordsInSelection(R,B,H)}isCellInSelection(E,R){const B=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!B||!H)&&this._areCoordsInSelection([E,R],B,H)}_areCoordsInSelection(E,R,B){return E[1]>R[1]&&E[1]<B[1]||R[1]===B[1]&&E[1]===R[1]&&E[0]>=R[0]&&E[0]<B[0]||R[1]<B[1]&&E[1]===B[1]&&E[0]<B[0]||R[1]<B[1]&&E[1]===R[1]&&E[0]>=R[0]}_selectWordAtCursor(E,R){var F,q;const B=(q=(F=this._linkifier.currentLink)==null?void 0:F.link)==null?void 0:q.range;if(B)return this._model.selectionStart=[B.start.x-1,B.start.y-1],this._model.selectionStartLength=(0,g.getRangeLength)(B,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(E);return!!H&&(this._selectWordAt(H,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(E,R){this._model.clearSelection(),E=Math.max(E,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(E){this._model.handleTrim(E)&&this.refresh()}_getMouseBufferCoords(E){const R=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(E){let R=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,E,this._screenElement)[1];const B=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=B?0:(R>B&&(R-=B),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(E){return _.isMac?E.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:E.shiftKey}handleMouseDown(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._handleIncrementalClick(E):E.detail===1?this._handleSingleClick(E):E.detail===2?this._handleDoubleClick(E):E.detail===3&&this._handleTripleClick(E),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(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))}_handleSingleClick(E){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(E)?3:0,this._model.selectionStart=this._getMouseBufferCoords(E),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(E){this._selectWordAtCursor(E,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(E){const R=this._getMouseBufferCoords(E);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(E){return E.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(E){if(E.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),!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(E),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const B=this._bufferService.buffer;if(this._model.selectionEnd[1]<B.lines.length){const H=B.lines.get(this._model.selectionEnd[1]);H&&H.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}R&&R[0]===this._model.selectionEnd[0]&&R[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 E=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}}_handleMouseUp(E){const R=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&E.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const B=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(B&&B[0]!==void 0&&B[1]!==void 0){const H=(0,S.moveToCellSequence)(B[0]-1,B[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const E=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,B=!(!E||!R||E[0]===R[0]&&E[1]===R[1]);B?E&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&E[0]===this._oldSelectionStart[0]&&E[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(E,R,B)):this._oldHasSelection&&this._fireOnSelectionChange(E,R,B)}_fireOnSelectionChange(E,R,B){this._oldSelectionStart=E,this._oldSelectionEnd=R,this._oldHasSelection=B,this._onSelectionChange.fire()}_handleBufferActivate(E){this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(E,R){let B=R;for(let H=0;R>=H;H++){const F=E.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?B--:F>1&&R!==H&&(B+=F-1)}return B}setSelection(E,R,B){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,R],this._model.selectionStartLength=B,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(E){this._isClickInSelection(E)||(this._selectWordAtCursor(E,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(E,R,B=!0,H=!0){if(E[0]>=this._bufferService.cols)return;const F=this._bufferService.buffer,q=F.lines.get(E[1]);if(!q)return;const Y=F.translateBufferLineToString(E[1],!1);let K=this._convertViewportColToCharacterIndex(q,E[0]),$=K;const X=E[0]-K;let Z=0,z=0,O=0,j=0;if(Y.charAt(K)===" "){for(;K>0&&Y.charAt(K-1)===" ";)K--;for(;$<Y.length&&Y.charAt($+1)===" ";)$++}else{let ie=E[0],ge=E[0];q.getWidth(ie)===0&&(Z++,ie--),q.getWidth(ge)===2&&(z++,ge++);const ee=q.getString(ge).length;for(ee>1&&(j+=ee-1,$+=ee-1);ie>0&&K>0&&!this._isCharWordSeparator(q.loadCell(ie-1,this._workCell));){q.loadCell(ie-1,this._workCell);const G=this._workCell.getChars().length;this._workCell.getWidth()===0?(Z++,ie--):G>1&&(O+=G-1,K-=G-1),K--,ie--}for(;ge<q.length&&$+1<Y.length&&!this._isCharWordSeparator(q.loadCell(ge+1,this._workCell));){q.loadCell(ge+1,this._workCell);const G=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,ge++):G>1&&(j+=G-1,$+=G-1),$++,ge++}}$++;let V=K+X-Z+O,I=Math.min(this._bufferService.cols,$-K+Z+z-O-j);if(R||Y.slice(K,$).trim()!==""){if(B&&V===0&&q.getCodePoint(0)!==32){const ie=F.lines.get(E[1]-1);if(ie&&q.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const ge=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(ge){const ee=this._bufferService.cols-ge.start;V-=ee,I+=ee}}}if(H&&V+I===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const ie=F.lines.get(E[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const ge=this._getWordAt([0,E[1]+1],!1,!1,!0);ge&&(I+=ge.length)}}return{start:V,length:I}}}_selectWordAt(E,R){const B=this._getWordAt(E,R);if(B){for(;B.start<0;)B.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[B.start,E[1]],this._model.selectionStartLength=B.length}}_selectToWordAt(E){const R=this._getWordAt(E,!0);if(R){let B=E[1];for(;R.start<0;)R.start+=this._bufferService.cols,B--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,B++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,B]}}_isCharWordSeparator(E){return E.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(E.getChars())>=0}_selectLineAt(E){const R=this._bufferService.buffer.getWrappedRangeForLine(E),B={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,g.getRangeLength)(B,this._bufferService.cols)}};a.SelectionService=T=h([d(3,A.IBufferService),d(4,A.ICoreService),d(5,k.IMouseService),d(6,A.IOptionsService),d(7,k.IRenderService),d(8,k.ICoreBrowserService)],T)},4725:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const h=u(8343);a.ICharSizeService=(0,h.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),a.IMouseService=(0,h.createDecorator)("MouseService"),a.IRenderService=(0,h.createDecorator)("RenderService"),a.ISelectionService=(0,h.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,h.createDecorator)("ThemeService"),a.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(f,a,u){var h=this&&this.__decorate||function(T,E,R,B){var H,F=arguments.length,q=F<3?E:B===null?B=Object.getOwnPropertyDescriptor(E,R):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(T,E,R,B);else for(var Y=T.length-1;Y>=0;Y--)(H=T[Y])&&(q=(F<3?H(q):F>3?H(E,R,q):H(E,R))||q);return F>3&&q&&Object.defineProperty(E,R,q),q},d=this&&this.__param||function(T,E){return function(R,B){E(R,B,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const c=u(7239),S=u(8055),w=u(8460),k=u(844),x=u(2585),y=S.css.toColor("#ffffff"),_=S.css.toColor("#000000"),g=S.css.toColor("#ffffff"),v=S.css.toColor("#000000"),A={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[S.css.toColor("#2e3436"),S.css.toColor("#cc0000"),S.css.toColor("#4e9a06"),S.css.toColor("#c4a000"),S.css.toColor("#3465a4"),S.css.toColor("#75507b"),S.css.toColor("#06989a"),S.css.toColor("#d3d7cf"),S.css.toColor("#555753"),S.css.toColor("#ef2929"),S.css.toColor("#8ae234"),S.css.toColor("#fce94f"),S.css.toColor("#729fcf"),S.css.toColor("#ad7fa8"),S.css.toColor("#34e2e2"),S.css.toColor("#eeeeec")],E=[0,95,135,175,215,255];for(let R=0;R<216;R++){const B=E[R/36%6|0],H=E[R/6%6|0],F=E[R%6];T.push({css:S.channels.toCss(B,H,F),rgba:S.channels.toRgba(B,H,F)})}for(let R=0;R<24;R++){const B=8+10*R;T.push({css:S.channels.toCss(B,B,B),rgba:S.channels.toRgba(B,B,B)})}return T})());let M=a.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new c.ColorContrastCache,this._halfContrastCache=new c.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:y,background:_,cursor:g,cursorAccent:v,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:S.color.blend(_,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:S.color.blend(_,A),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(T={}){const E=this._colors;if(E.foreground=D(T.foreground,y),E.background=D(T.background,_),E.cursor=D(T.cursor,g),E.cursorAccent=D(T.cursorAccent,v),E.selectionBackgroundTransparent=D(T.selectionBackground,A),E.selectionBackgroundOpaque=S.color.blend(E.background,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundTransparent=D(T.selectionInactiveBackground,E.selectionBackgroundTransparent),E.selectionInactiveBackgroundOpaque=S.color.blend(E.background,E.selectionInactiveBackgroundTransparent),E.selectionForeground=T.selectionForeground?D(T.selectionForeground,S.NULL_COLOR):void 0,E.selectionForeground===S.NULL_COLOR&&(E.selectionForeground=void 0),S.color.isOpaque(E.selectionBackgroundTransparent)&&(E.selectionBackgroundTransparent=S.color.opacity(E.selectionBackgroundTransparent,.3)),S.color.isOpaque(E.selectionInactiveBackgroundTransparent)&&(E.selectionInactiveBackgroundTransparent=S.color.opacity(E.selectionInactiveBackgroundTransparent,.3)),E.ansi=a.DEFAULT_ANSI_COLORS.slice(),E.ansi[0]=D(T.black,a.DEFAULT_ANSI_COLORS[0]),E.ansi[1]=D(T.red,a.DEFAULT_ANSI_COLORS[1]),E.ansi[2]=D(T.green,a.DEFAULT_ANSI_COLORS[2]),E.ansi[3]=D(T.yellow,a.DEFAULT_ANSI_COLORS[3]),E.ansi[4]=D(T.blue,a.DEFAULT_ANSI_COLORS[4]),E.ansi[5]=D(T.magenta,a.DEFAULT_ANSI_COLORS[5]),E.ansi[6]=D(T.cyan,a.DEFAULT_ANSI_COLORS[6]),E.ansi[7]=D(T.white,a.DEFAULT_ANSI_COLORS[7]),E.ansi[8]=D(T.brightBlack,a.DEFAULT_ANSI_COLORS[8]),E.ansi[9]=D(T.brightRed,a.DEFAULT_ANSI_COLORS[9]),E.ansi[10]=D(T.brightGreen,a.DEFAULT_ANSI_COLORS[10]),E.ansi[11]=D(T.brightYellow,a.DEFAULT_ANSI_COLORS[11]),E.ansi[12]=D(T.brightBlue,a.DEFAULT_ANSI_COLORS[12]),E.ansi[13]=D(T.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),E.ansi[14]=D(T.brightCyan,a.DEFAULT_ANSI_COLORS[14]),E.ansi[15]=D(T.brightWhite,a.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const R=Math.min(E.ansi.length-16,T.extendedAnsi.length);for(let B=0;B<R;B++)E.ansi[B+16]=D(T.extendedAnsi[B],a.DEFAULT_ANSI_COLORS[B+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(T){this._restoreColor(T),this._onChangeColors.fire(this.colors)}_restoreColor(T){if(T!==void 0)switch(T){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[T]=this._restoreColors.ansi[T]}else for(let E=0;E<this._restoreColors.ansi.length;++E)this._colors.ansi[E]=this._restoreColors.ansi[E]}modifyColors(T){T(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 D(T,E){if(T!==void 0)try{return S.css.toColor(T)}catch{}return E}a.ThemeService=M=h([d(0,x.IOptionsService)],M)},6349:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=u(8460),d=u(844);class c extends d.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.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(w){if(this._maxLength===w)return;const k=new Array(w);for(let x=0;x<Math.min(w,this.length);x++)k[x]=this._array[this._getCyclicIndex(x)];this._array=k,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let k=this._length;k<w;k++)this._array[k]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,k){this._array[this._getCyclicIndex(w)]=k}push(w){this._array[this._getCyclicIndex(this._length)]=w,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(w,k,...x){if(k){for(let y=w;y<this._length-k;y++)this._array[this._getCyclicIndex(y)]=this._array[this._getCyclicIndex(y+k)];this._length-=k,this.onDeleteEmitter.fire({index:w,amount:k})}for(let y=this._length-1;y>=w;y--)this._array[this._getCyclicIndex(y+x.length)]=this._array[this._getCyclicIndex(y)];for(let y=0;y<x.length;y++)this._array[this._getCyclicIndex(w+y)]=x[y];if(x.length&&this.onInsertEmitter.fire({index:w,amount:x.length}),this._length+x.length>this._maxLength){const y=this._length+x.length-this._maxLength;this._startIndex+=y,this._length=this._maxLength,this.onTrimEmitter.fire(y)}else this._length+=x.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,k,x){if(!(k<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let _=k-1;_>=0;_--)this.set(w+_+x,this.get(w+_));const y=w+k+x-this._length;if(y>0)for(this._length+=y;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let y=0;y<k;y++)this.set(w+y+x,this.get(w+y))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}a.CircularList=c},1439:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(h,d=5){if(typeof h!="object")return h;const c=Array.isArray(h)?[]:{};for(const S in h)c[S]=d<=1?h[S]:h[S]&&u(h[S],d-1);return c}},8055:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,h=0,d=0,c=0;var S,w,k,x,y;function _(v){const A=v.toString(16);return A.length<2?"0"+A:A}function g(v,A){return v<A?(A+.05)/(v+.05):(v+.05)/(A+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(v){v.toCss=function(A,M,D,T){return T!==void 0?`#${_(A)}${_(M)}${_(D)}${_(T)}`:`#${_(A)}${_(M)}${_(D)}`},v.toRgba=function(A,M,D,T=255){return(A<<24|M<<16|D<<8|T)>>>0},v.toColor=function(A,M,D,T){return{css:v.toCss(A,M,D,T),rgba:v.toRgba(A,M,D,T)}}})(S||(a.channels=S={})),(function(v){function A(M,D){return c=Math.round(255*D),[u,h,d]=y.toChannels(M.rgba),{css:S.toCss(u,h,d,c),rgba:S.toRgba(u,h,d,c)}}v.blend=function(M,D){if(c=(255&D.rgba)/255,c===1)return{css:D.css,rgba:D.rgba};const T=D.rgba>>24&255,E=D.rgba>>16&255,R=D.rgba>>8&255,B=M.rgba>>24&255,H=M.rgba>>16&255,F=M.rgba>>8&255;return u=B+Math.round((T-B)*c),h=H+Math.round((E-H)*c),d=F+Math.round((R-F)*c),{css:S.toCss(u,h,d),rgba:S.toRgba(u,h,d)}},v.isOpaque=function(M){return(255&M.rgba)==255},v.ensureContrastRatio=function(M,D,T){const E=y.ensureContrastRatio(M.rgba,D.rgba,T);if(E)return S.toColor(E>>24&255,E>>16&255,E>>8&255)},v.opaque=function(M){const D=(255|M.rgba)>>>0;return[u,h,d]=y.toChannels(D),{css:S.toCss(u,h,d),rgba:D}},v.opacity=A,v.multiplyOpacity=function(M,D){return c=255&M.rgba,A(M,c*D/255)},v.toColorRGB=function(M){return[M.rgba>>24&255,M.rgba>>16&255,M.rgba>>8&255]}})(w||(a.color=w={})),(function(v){let A,M;try{const D=document.createElement("canvas");D.width=1,D.height=1;const T=D.getContext("2d",{willReadFrequently:!0});T&&(A=T,A.globalCompositeOperation="copy",M=A.createLinearGradient(0,0,1,1))}catch{}v.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return u=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),d=parseInt(D.slice(3,4).repeat(2),16),S.toColor(u,h,d);case 5:return u=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),d=parseInt(D.slice(3,4).repeat(2),16),c=parseInt(D.slice(4,5).repeat(2),16),S.toColor(u,h,d,c);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}const T=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return u=parseInt(T[1]),h=parseInt(T[2]),d=parseInt(T[3]),c=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),S.toColor(u,h,d,c);if(!A||!M)throw new Error("css.toColor: Unsupported css format");if(A.fillStyle=M,A.fillStyle=D,typeof A.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(A.fillRect(0,0,1,1),[u,h,d,c]=A.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:S.toRgba(u,h,d,c),css:D}}})(k||(a.css=k={})),(function(v){function A(M,D,T){const E=M/255,R=D/255,B=T/255;return .2126*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))}v.relativeLuminance=function(M){return A(M>>16&255,M>>8&255,255&M)},v.relativeLuminance2=A})(x||(a.rgb=x={})),(function(v){function A(D,T,E){const R=D>>24&255,B=D>>16&255,H=D>>8&255;let F=T>>24&255,q=T>>16&255,Y=T>>8&255,K=g(x.relativeLuminance2(F,q,Y),x.relativeLuminance2(R,B,H));for(;K<E&&(F>0||q>0||Y>0);)F-=Math.max(0,Math.ceil(.1*F)),q-=Math.max(0,Math.ceil(.1*q)),Y-=Math.max(0,Math.ceil(.1*Y)),K=g(x.relativeLuminance2(F,q,Y),x.relativeLuminance2(R,B,H));return(F<<24|q<<16|Y<<8|255)>>>0}function M(D,T,E){const R=D>>24&255,B=D>>16&255,H=D>>8&255;let F=T>>24&255,q=T>>16&255,Y=T>>8&255,K=g(x.relativeLuminance2(F,q,Y),x.relativeLuminance2(R,B,H));for(;K<E&&(F<255||q<255||Y<255);)F=Math.min(255,F+Math.ceil(.1*(255-F))),q=Math.min(255,q+Math.ceil(.1*(255-q))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),K=g(x.relativeLuminance2(F,q,Y),x.relativeLuminance2(R,B,H));return(F<<24|q<<16|Y<<8|255)>>>0}v.blend=function(D,T){if(c=(255&T)/255,c===1)return T;const E=T>>24&255,R=T>>16&255,B=T>>8&255,H=D>>24&255,F=D>>16&255,q=D>>8&255;return u=H+Math.round((E-H)*c),h=F+Math.round((R-F)*c),d=q+Math.round((B-q)*c),S.toRgba(u,h,d)},v.ensureContrastRatio=function(D,T,E){const R=x.relativeLuminance(D>>8),B=x.relativeLuminance(T>>8);if(g(R,B)<E){if(B<R){const q=A(D,T,E),Y=g(R,x.relativeLuminance(q>>8));if(Y<E){const K=M(D,T,E);return Y>g(R,x.relativeLuminance(K>>8))?q:K}return q}const H=M(D,T,E),F=g(R,x.relativeLuminance(H>>8));if(F<E){const q=A(D,T,E);return F>g(R,x.relativeLuminance(q>>8))?H:q}return H}},v.reduceLuminance=A,v.increaseLuminance=M,v.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(y||(a.rgba=y={})),a.toPaddedHex=_,a.contrastRatio=g},8969:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=u(844),d=u(2585),c=u(4348),S=u(7866),w=u(744),k=u(7302),x=u(6975),y=u(8460),_=u(1753),g=u(1480),v=u(7994),A=u(9282),M=u(5435),D=u(5981),T=u(2660);let E=!1;class R extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new y.EventEmitter),this._onScroll.event((H=>{var F;(F=this._onScrollApi)==null||F.fire(H.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(H){for(const F in H)this.optionsService.options[F]=H[F]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new y.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new y.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new y.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new y.EventEmitter),this._instantiationService=new c.InstantiationService,this.optionsService=this.register(new k.OptionsService(H)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(S.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(_.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(g.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(v.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new M.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,y.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,y.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,y.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,y.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((F=>{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((F=>{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 D.WriteBuffer(((F,q)=>this._inputHandler.parse(F,q)))),this.register((0,y.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,F){this._writeBuffer.write(H,F)}writeSync(H,F){this._logService.logLevel<=d.LogLevelEnum.WARN&&!E&&(this._logService.warn("writeSync is unreliable and will be removed soon."),E=!0),this._writeBuffer.writeSync(H,F)}input(H,F=!0){this.coreService.triggerDataEvent(H,F)}resize(H,F){isNaN(H)||isNaN(F)||(H=Math.max(H,w.MINIMUM_COLS),F=Math.max(F,w.MINIMUM_ROWS),this._bufferService.resize(H,F))}scroll(H,F=!1){this._bufferService.scroll(H,F)}scrollLines(H,F,q){this._bufferService.scrollLines(H,F,q)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const F=H-this._bufferService.buffer.ydisp;F!==0&&this.scrollLines(F)}registerEscHandler(H,F){return this._inputHandler.registerEscHandler(H,F)}registerDcsHandler(H,F){return this._inputHandler.registerDcsHandler(H,F)}registerCsiHandler(H,F){return this._inputHandler.registerCsiHandler(H,F)}registerOscHandler(H,F){return this._inputHandler.registerOscHandler(H,F)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const F=this.optionsService.rawOptions.windowsPty;F&&F.buildNumber!==void 0&&F.buildNumber!==void 0?H=F.backend==="conpty"&&F.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(A.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},(()=>((0,A.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const F of H)F.dispose()}))}}}a.CoreTerminal=R},8460:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===u)return void this._listeners.splice(h,1)}}})),this._event}fire(u,h){const d=[];for(let c=0;c<this._listeners.length;c++)d.push(this._listeners[c]);for(let c=0;c<d.length;c++)d[c].call(void 0,u,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,h){return u((d=>h.fire(d)))},a.runAndSubscribe=function(u,h){return h(void 0),u((d=>h(d)))}},5435:function(f,a,u){var h=this&&this.__decorate||function(Z,z,O,j){var V,I=arguments.length,ie=I<3?z:j===null?j=Object.getOwnPropertyDescriptor(z,O):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(Z,z,O,j);else for(var ge=Z.length-1;ge>=0;ge--)(V=Z[ge])&&(ie=(I<3?V(ie):I>3?V(z,O,ie):V(z,O))||ie);return I>3&&ie&&Object.defineProperty(z,O,ie),ie},d=this&&this.__param||function(Z,z){return function(O,j){z(O,j,Z)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const c=u(2584),S=u(7116),w=u(2015),k=u(844),x=u(482),y=u(8437),_=u(8460),g=u(643),v=u(511),A=u(3734),M=u(2585),D=u(1480),T=u(6242),E=u(6351),R=u(5941),B={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function F(Z,z){if(Z>24)return z.setWinLines||!1;switch(Z){case 1:return!!z.restoreWin;case 2:return!!z.minimizeWin;case 3:return!!z.setWinPosition;case 4:return!!z.setWinSizePixels;case 5:return!!z.raiseWin;case 6:return!!z.lowerWin;case 7:return!!z.refreshWin;case 8:return!!z.setWinSizeChars;case 9:return!!z.maximizeWin;case 10:return!!z.fullscreenWin;case 11:return!!z.getWinState;case 13:return!!z.getWinPosition;case 14:return!!z.getWinSizePixels;case 15:return!!z.getScreenSizePixels;case 16:return!!z.getCellSizePixels;case 18:return!!z.getWinSizeChars;case 19:return!!z.getScreenSizeChars;case 20:return!!z.getIconTitle;case 21:return!!z.getWinTitle;case 22:return!!z.pushTitle;case 23:return!!z.popTitle;case 24:return!!z.setWinLines}return!1}var q;(function(Z){Z[Z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Z[Z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(a.WindowsOptionsReportType=q={}));let Y=0;class K extends k.Disposable{getAttrData(){return this._curAttrData}constructor(z,O,j,V,I,ie,ge,ee,G=new w.EscapeSequenceParser){super(),this._bufferService=z,this._charsetService=O,this._coreService=j,this._logService=V,this._optionsService=I,this._oscLinkService=ie,this._coreMouseService=ge,this._unicodeService=ee,this._parser=G,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new v.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new _.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new _.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new _.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new _.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new _.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new _.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new _.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new _.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new _.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new _.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new _.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 $(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((U=>this._activeBuffer=U.activeBuffer))),this._parser.setCsiHandlerFallback(((U,ne)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(U),params:ne.toArray()})})),this._parser.setEscHandlerFallback((U=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(U)})})),this._parser.setExecuteHandlerFallback((U=>{this._logService.debug("Unknown EXECUTE code: ",{code:U})})),this._parser.setOscHandlerFallback(((U,ne,te)=>{this._logService.debug("Unknown OSC code: ",{identifier:U,action:ne,data:te})})),this._parser.setDcsHandlerFallback(((U,ne,te)=>{ne==="HOOK"&&(te=te.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(U),action:ne,payload:te})})),this._parser.setPrintHandler(((U,ne,te)=>this.print(U,ne,te))),this._parser.registerCsiHandler({final:"@"},(U=>this.insertChars(U))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(U=>this.scrollLeft(U))),this._parser.registerCsiHandler({final:"A"},(U=>this.cursorUp(U))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(U=>this.scrollRight(U))),this._parser.registerCsiHandler({final:"B"},(U=>this.cursorDown(U))),this._parser.registerCsiHandler({final:"C"},(U=>this.cursorForward(U))),this._parser.registerCsiHandler({final:"D"},(U=>this.cursorBackward(U))),this._parser.registerCsiHandler({final:"E"},(U=>this.cursorNextLine(U))),this._parser.registerCsiHandler({final:"F"},(U=>this.cursorPrecedingLine(U))),this._parser.registerCsiHandler({final:"G"},(U=>this.cursorCharAbsolute(U))),this._parser.registerCsiHandler({final:"H"},(U=>this.cursorPosition(U))),this._parser.registerCsiHandler({final:"I"},(U=>this.cursorForwardTab(U))),this._parser.registerCsiHandler({final:"J"},(U=>this.eraseInDisplay(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(U=>this.eraseInDisplay(U,!0))),this._parser.registerCsiHandler({final:"K"},(U=>this.eraseInLine(U,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(U=>this.eraseInLine(U,!0))),this._parser.registerCsiHandler({final:"L"},(U=>this.insertLines(U))),this._parser.registerCsiHandler({final:"M"},(U=>this.deleteLines(U))),this._parser.registerCsiHandler({final:"P"},(U=>this.deleteChars(U))),this._parser.registerCsiHandler({final:"S"},(U=>this.scrollUp(U))),this._parser.registerCsiHandler({final:"T"},(U=>this.scrollDown(U))),this._parser.registerCsiHandler({final:"X"},(U=>this.eraseChars(U))),this._parser.registerCsiHandler({final:"Z"},(U=>this.cursorBackwardTab(U))),this._parser.registerCsiHandler({final:"`"},(U=>this.charPosAbsolute(U))),this._parser.registerCsiHandler({final:"a"},(U=>this.hPositionRelative(U))),this._parser.registerCsiHandler({final:"b"},(U=>this.repeatPrecedingCharacter(U))),this._parser.registerCsiHandler({final:"c"},(U=>this.sendDeviceAttributesPrimary(U))),this._parser.registerCsiHandler({prefix:">",final:"c"},(U=>this.sendDeviceAttributesSecondary(U))),this._parser.registerCsiHandler({final:"d"},(U=>this.linePosAbsolute(U))),this._parser.registerCsiHandler({final:"e"},(U=>this.vPositionRelative(U))),this._parser.registerCsiHandler({final:"f"},(U=>this.hVPosition(U))),this._parser.registerCsiHandler({final:"g"},(U=>this.tabClear(U))),this._parser.registerCsiHandler({final:"h"},(U=>this.setMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(U=>this.setModePrivate(U))),this._parser.registerCsiHandler({final:"l"},(U=>this.resetMode(U))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(U=>this.resetModePrivate(U))),this._parser.registerCsiHandler({final:"m"},(U=>this.charAttributes(U))),this._parser.registerCsiHandler({final:"n"},(U=>this.deviceStatus(U))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(U=>this.deviceStatusPrivate(U))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(U=>this.softReset(U))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(U=>this.setCursorStyle(U))),this._parser.registerCsiHandler({final:"r"},(U=>this.setScrollRegion(U))),this._parser.registerCsiHandler({final:"s"},(U=>this.saveCursor(U))),this._parser.registerCsiHandler({final:"t"},(U=>this.windowOptions(U))),this._parser.registerCsiHandler({final:"u"},(U=>this.restoreCursor(U))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(U=>this.insertColumns(U))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(U=>this.deleteColumns(U))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(U=>this.selectProtected(U))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(U=>this.requestMode(U,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(U=>this.requestMode(U,!1))),this._parser.setExecuteHandler(c.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(c.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(c.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(c.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(c.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(c.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(c.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(c.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(c.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((U=>(this.setTitle(U),this.setIconName(U),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((U=>this.setIconName(U)))),this._parser.registerOscHandler(2,new T.OscHandler((U=>this.setTitle(U)))),this._parser.registerOscHandler(4,new T.OscHandler((U=>this.setOrReportIndexedColor(U)))),this._parser.registerOscHandler(8,new T.OscHandler((U=>this.setHyperlink(U)))),this._parser.registerOscHandler(10,new T.OscHandler((U=>this.setOrReportFgColor(U)))),this._parser.registerOscHandler(11,new T.OscHandler((U=>this.setOrReportBgColor(U)))),this._parser.registerOscHandler(12,new T.OscHandler((U=>this.setOrReportCursorColor(U)))),this._parser.registerOscHandler(104,new T.OscHandler((U=>this.restoreIndexedColor(U)))),this._parser.registerOscHandler(110,new T.OscHandler((U=>this.restoreFgColor(U)))),this._parser.registerOscHandler(111,new T.OscHandler((U=>this.restoreBgColor(U)))),this._parser.registerOscHandler(112,new T.OscHandler((U=>this.restoreCursorColor(U)))),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 U in S.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:U},(()=>this.selectCharset("("+U))),this._parser.registerEscHandler({intermediates:")",final:U},(()=>this.selectCharset(")"+U))),this._parser.registerEscHandler({intermediates:"*",final:U},(()=>this.selectCharset("*"+U))),this._parser.registerEscHandler({intermediates:"+",final:U},(()=>this.selectCharset("+"+U))),this._parser.registerEscHandler({intermediates:"-",final:U},(()=>this.selectCharset("-"+U))),this._parser.registerEscHandler({intermediates:".",final:U},(()=>this.selectCharset("."+U))),this._parser.registerEscHandler({intermediates:"/",final:U},(()=>this.selectCharset("/"+U)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((U=>(this._logService.error("Parsing error: ",U),U))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new E.DcsHandler(((U,ne)=>this.requestStatusString(U,ne))))}_preserveStack(z,O,j,V){this._parseStack.paused=!0,this._parseStack.cursorStartX=z,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=j,this._parseStack.position=V}_logSlowResolvingAsync(z){this._logService.logLevel<=M.LogLevelEnum.WARN&&Promise.race([z,new Promise(((O,j)=>setTimeout((()=>j("#SLOW_TIMEOUT")),5e3)))]).catch((O=>{if(O!=="#SLOW_TIMEOUT")throw O;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(z,O){let j,V=this._activeBuffer.x,I=this._activeBuffer.y,ie=0;const ge=this._parseStack.paused;if(ge){if(j=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(j),j;V=this._parseStack.cursorStartX,I=this._parseStack.cursorStartY,this._parseStack.paused=!1,z.length>H&&(ie=this._parseStack.position+H)}if(this._logService.logLevel<=M.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof z=="string"?` "${z}"`:` "${Array.prototype.map.call(z,(U=>String.fromCharCode(U))).join("")}"`),typeof z=="string"?z.split("").map((U=>U.charCodeAt(0))):z),this._parseBuffer.length<z.length&&this._parseBuffer.length<H&&(this._parseBuffer=new Uint32Array(Math.min(z.length,H))),ge||this._dirtyRowTracker.clearRange(),z.length>H)for(let U=ie;U<z.length;U+=H){const ne=U+H<z.length?U+H:z.length,te=typeof z=="string"?this._stringDecoder.decode(z.substring(U,ne),this._parseBuffer):this._utf8Decoder.decode(z.subarray(U,ne),this._parseBuffer);if(j=this._parser.parse(this._parseBuffer,te))return this._preserveStack(V,I,te,U),this._logSlowResolvingAsync(j),j}else if(!ge){const U=typeof z=="string"?this._stringDecoder.decode(z,this._parseBuffer):this._utf8Decoder.decode(z,this._parseBuffer);if(j=this._parser.parse(this._parseBuffer,U))return this._preserveStack(V,I,U,0),this._logSlowResolvingAsync(j),j}this._activeBuffer.x===V&&this._activeBuffer.y===I||this._onCursorMove.fire();const ee=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),G=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);G<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(G,this._bufferService.rows-1),Math.min(ee,this._bufferService.rows-1))}print(z,O,j){let V,I;const ie=this._charsetService.charset,ge=this._optionsService.rawOptions.screenReaderMode,ee=this._bufferService.cols,G=this._coreService.decPrivateModes.wraparound,U=this._coreService.modes.insertMode,ne=this._curAttrData;let te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&j-O>0&&te.getWidth(this._activeBuffer.x-1)===2&&te.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ne);let ve=this._parser.precedingJoinState;for(let Se=O;Se<j;++Se){if(V=z[Se],V<127&&ie){const Je=ie[String.fromCharCode(V)];Je&&(V=Je.charCodeAt(0))}const Me=this._unicodeService.charProperties(V,ve);I=D.UnicodeService.extractWidth(Me);const Le=D.UnicodeService.extractShouldJoin(Me),Pe=Le?D.UnicodeService.extractWidth(ve):0;if(ve=Me,ge&&this._onA11yChar.fire((0,x.stringFromCodePoint)(V)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+I-Pe>ee){if(G){const Je=te;let de=this._activeBuffer.x-Pe;for(this._activeBuffer.x=Pe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Pe>0&&te instanceof y.BufferLine&&te.copyCellsFrom(Je,de,0,Pe,!1);de<ee;)Je.setCellFromCodepoint(de++,0,1,ne)}else if(this._activeBuffer.x=ee-1,I===2)continue}if(Le&&this._activeBuffer.x){const Je=te.getWidth(this._activeBuffer.x-1)?1:2;te.addCodepointToCell(this._activeBuffer.x-Je,V,I);for(let de=I-Pe;--de>=0;)te.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}else if(U&&(te.insertCells(this._activeBuffer.x,I-Pe,this._activeBuffer.getNullCell(ne)),te.getWidth(ee-1)===2&&te.setCellFromCodepoint(ee-1,g.NULL_CELL_CODE,g.NULL_CELL_WIDTH,ne)),te.setCellFromCodepoint(this._activeBuffer.x++,V,I,ne),I>0)for(;--I;)te.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}this._parser.precedingJoinState=ve,this._activeBuffer.x<ee&&j-O>0&&te.getWidth(this._activeBuffer.x)===0&&!te.hasContent(this._activeBuffer.x)&&te.setCellFromCodepoint(this._activeBuffer.x,0,1,ne),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(z,O){return z.final!=="t"||z.prefix||z.intermediates?this._parser.registerCsiHandler(z,O):this._parser.registerCsiHandler(z,(j=>!F(j.params[0],this._optionsService.rawOptions.windowOptions)||O(j)))}registerDcsHandler(z,O){return this._parser.registerDcsHandler(z,new E.DcsHandler(O))}registerEscHandler(z,O){return this._parser.registerEscHandler(z,O)}registerOscHandler(z,O){return this._parser.registerOscHandler(z,new T.OscHandler(O))}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 z;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&&((z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&z.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);O.hasWidth(this._activeBuffer.x)&&!O.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const z=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-z),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(z=this._bufferService.cols-1){this._activeBuffer.x=Math.min(z,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(z,O){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=z,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=z,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(z,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+z,this._activeBuffer.y+O)}cursorUp(z){const O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,z.params[0]||1)):this._moveCursor(0,-(z.params[0]||1)),!0}cursorDown(z){const O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,z.params[0]||1)):this._moveCursor(0,z.params[0]||1),!0}cursorForward(z){return this._moveCursor(z.params[0]||1,0),!0}cursorBackward(z){return this._moveCursor(-(z.params[0]||1),0),!0}cursorNextLine(z){return this.cursorDown(z),this._activeBuffer.x=0,!0}cursorPrecedingLine(z){return this.cursorUp(z),this._activeBuffer.x=0,!0}cursorCharAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(z){return this._setCursor(z.length>=2?(z.params[1]||1)-1:0,(z.params[0]||1)-1),!0}charPosAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(z){return this._moveCursor(z.params[0]||1,0),!0}linePosAbsolute(z){return this._setCursor(this._activeBuffer.x,(z.params[0]||1)-1),!0}vPositionRelative(z){return this._moveCursor(0,z.params[0]||1),!0}hVPosition(z){return this.cursorPosition(z),!0}tabClear(z){const O=z.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=z.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=z.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(z){const O=z.params[0];return O===1&&(this._curAttrData.bg|=536870912),O!==2&&O!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(z,O,j,V=!1,I=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);ie.replaceCells(O,j,this._activeBuffer.getNullCell(this._eraseAttrData()),I),V&&(ie.isWrapped=!1)}_resetBufferLine(z,O=!1){const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);j&&(j.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+z),j.isWrapped=!1)}eraseInDisplay(z,O=!1){let j;switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:for(j=this._activeBuffer.y,this._dirtyRowTracker.markDirty(j),this._eraseInBufferLine(j++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);j<this._bufferService.rows;j++)this._resetBufferLine(j,O);this._dirtyRowTracker.markDirty(j);break;case 1:for(j=this._activeBuffer.y,this._dirtyRowTracker.markDirty(j),this._eraseInBufferLine(j,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(j+1).isWrapped=!1);j--;)this._resetBufferLine(j,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(j=this._bufferService.rows,this._dirtyRowTracker.markDirty(j-1);j--;)this._resetBufferLine(j,O);this._dirtyRowTracker.markDirty(0);break;case 3:const V=this._activeBuffer.lines.length-this._bufferService.rows;V>0&&(this._activeBuffer.lines.trimStart(V),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-V,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-V,0),this._onScroll.fire(0))}return!0}eraseInLine(z,O=!1){switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,O);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,O)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(z){this._restrictCursor();let O=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=this._activeBuffer.ybase+this._activeBuffer.y,V=this._bufferService.rows-1-this._activeBuffer.scrollBottom,I=this._bufferService.rows-1+this._activeBuffer.ybase-V+1;for(;O--;)this._activeBuffer.lines.splice(I-1,1),this._activeBuffer.lines.splice(j,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(z){this._restrictCursor();let O=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const j=this._activeBuffer.ybase+this._activeBuffer.y;let V;for(V=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-V;O--;)this._activeBuffer.lines.splice(j,1),this._activeBuffer.lines.splice(V,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(z){let O=z.params[0]||1;for(;O--;)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(z){let O=z.params[0]||1;for(;O--;)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(y.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);V.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);V.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);V.insertCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let j=this._activeBuffer.scrollTop;j<=this._activeBuffer.scrollBottom;++j){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+j);V.deleteCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(z.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(z){const O=this._parser.precedingJoinState;if(!O)return!0;const j=z.params[0]||1,V=D.UnicodeService.extractWidth(O),I=this._activeBuffer.x-V,ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(I),ge=new Uint32Array(ie.length*j);let ee=0;for(let U=0;U<ie.length;){const ne=ie.codePointAt(U)||0;ge[ee++]=ne,U+=ne>65535?2:1}let G=ee;for(let U=1;U<j;++U)ge.copyWithin(G,0,ee),G+=ee;return this.print(ge,0,G),!0}sendDeviceAttributesPrimary(z){return z.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(z){return z.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(c.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(c.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(z.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(z){return(this._optionsService.rawOptions.termName+"").indexOf(z)===0}setMode(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,S.DEFAULT_CHARSET),this._charsetService.setgCharset(1,S.DEFAULT_CHARSET),this._charsetService.setgCharset(2,S.DEFAULT_CHARSET),this._charsetService.setgCharset(3,S.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(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(z){for(let O=0;O<z.length;O++)switch(z.params[O]){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(),z.params[O]===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(z,O){const j=this._coreService.decPrivateModes,{activeProtocol:V,activeEncoding:I}=this._coreMouseService,ie=this._coreService,{buffers:ge,cols:ee}=this._bufferService,{active:G,alt:U}=ge,ne=this._optionsService.rawOptions,te=Le=>Le?1:2,ve=z.params[0];return Se=ve,Me=O?ve===2?4:ve===4?te(ie.modes.insertMode):ve===12?3:ve===20?te(ne.convertEol):0:ve===1?te(j.applicationCursorKeys):ve===3?ne.windowOptions.setWinLines?ee===80?2:ee===132?1:0:0:ve===6?te(j.origin):ve===7?te(j.wraparound):ve===8?3:ve===9?te(V==="X10"):ve===12?te(ne.cursorBlink):ve===25?te(!ie.isCursorHidden):ve===45?te(j.reverseWraparound):ve===66?te(j.applicationKeypad):ve===67?4:ve===1e3?te(V==="VT200"):ve===1002?te(V==="DRAG"):ve===1003?te(V==="ANY"):ve===1004?te(j.sendFocus):ve===1005?4:ve===1006?te(I==="SGR"):ve===1015?4:ve===1016?te(I==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?te(G===U):ve===2004?te(j.bracketedPasteMode):0,ie.triggerDataEvent(`${c.C0.ESC}[${O?"":"?"}${Se};${Me}$y`),!0;var Se,Me}_updateAttrColor(z,O,j,V,I){return O===2?(z|=50331648,z&=-16777216,z|=A.AttributeData.fromColorRGB([j,V,I])):O===5&&(z&=-50331904,z|=33554432|255&j),z}_extractColor(z,O,j){const V=[0,0,-1,0,0,0];let I=0,ie=0;do{if(V[ie+I]=z.params[O+ie],z.hasSubParams(O+ie)){const ge=z.getSubParams(O+ie);let ee=0;do V[1]===5&&(I=1),V[ie+ee+1+I]=ge[ee];while(++ee<ge.length&&ee+ie+1+I<V.length);break}if(V[1]===5&&ie+I>=2||V[1]===2&&ie+I>=5)break;V[1]&&(I=1)}while(++ie+O<z.length&&ie+I<V.length);for(let ge=2;ge<V.length;++ge)V[ge]===-1&&(V[ge]=0);switch(V[0]){case 38:j.fg=this._updateAttrColor(j.fg,V[1],V[3],V[4],V[5]);break;case 48:j.bg=this._updateAttrColor(j.bg,V[1],V[3],V[4],V[5]);break;case 58:j.extended=j.extended.clone(),j.extended.underlineColor=this._updateAttrColor(j.extended.underlineColor,V[1],V[3],V[4],V[5])}return ie}_processUnderline(z,O){O.extended=O.extended.clone(),(!~z||z>5)&&(z=1),O.extended.underlineStyle=z,O.fg|=268435456,z===0&&(O.fg&=-268435457),O.updateExtended()}_processSGR0(z){z.fg=y.DEFAULT_ATTR_DATA.fg,z.bg=y.DEFAULT_ATTR_DATA.bg,z.extended=z.extended.clone(),z.extended.underlineStyle=0,z.extended.underlineColor&=-67108864,z.updateExtended()}charAttributes(z){if(z.length===1&&z.params[0]===0)return this._processSGR0(this._curAttrData),!0;const O=z.length;let j;const V=this._curAttrData;for(let I=0;I<O;I++)j=z.params[I],j>=30&&j<=37?(V.fg&=-50331904,V.fg|=16777216|j-30):j>=40&&j<=47?(V.bg&=-50331904,V.bg|=16777216|j-40):j>=90&&j<=97?(V.fg&=-50331904,V.fg|=16777224|j-90):j>=100&&j<=107?(V.bg&=-50331904,V.bg|=16777224|j-100):j===0?this._processSGR0(V):j===1?V.fg|=134217728:j===3?V.bg|=67108864:j===4?(V.fg|=268435456,this._processUnderline(z.hasSubParams(I)?z.getSubParams(I)[0]:1,V)):j===5?V.fg|=536870912:j===7?V.fg|=67108864:j===8?V.fg|=1073741824:j===9?V.fg|=2147483648:j===2?V.bg|=134217728:j===21?this._processUnderline(2,V):j===22?(V.fg&=-134217729,V.bg&=-134217729):j===23?V.bg&=-67108865:j===24?(V.fg&=-268435457,this._processUnderline(0,V)):j===25?V.fg&=-536870913:j===27?V.fg&=-67108865:j===28?V.fg&=-1073741825:j===29?V.fg&=2147483647:j===39?(V.fg&=-67108864,V.fg|=16777215&y.DEFAULT_ATTR_DATA.fg):j===49?(V.bg&=-67108864,V.bg|=16777215&y.DEFAULT_ATTR_DATA.bg):j===38||j===48||j===58?I+=this._extractColor(z,I,V):j===53?V.bg|=1073741824:j===55?V.bg&=-1073741825:j===59?(V.extended=V.extended.clone(),V.extended.underlineColor=-1,V.updateExtended()):j===100?(V.fg&=-67108864,V.fg|=16777215&y.DEFAULT_ATTR_DATA.fg,V.bg&=-67108864,V.bg|=16777215&y.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",j);return!0}deviceStatus(z){switch(z.params[0]){case 5:this._coreService.triggerDataEvent(`${c.C0.ESC}[0n`);break;case 6:const O=this._activeBuffer.y+1,j=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[${O};${j}R`)}return!0}deviceStatusPrivate(z){if(z.params[0]===6){const O=this._activeBuffer.y+1,j=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[?${O};${j}R`)}return!0}softReset(z){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=y.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(z){const O=z.params[0]||1;switch(O){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 j=O%2==1;return this._optionsService.options.cursorBlink=j,!0}setScrollRegion(z){const O=z.params[0]||1;let j;return(z.length<2||(j=z.params[1])>this._bufferService.rows||j===0)&&(j=this._bufferService.rows),j>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=j-1,this._setCursor(0,0)),!0}windowOptions(z){if(!F(z.params[0],this._optionsService.rawOptions.windowOptions))return!0;const O=z.length>1?z.params[1]:0;switch(z.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${c.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:O!==0&&O!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),O!==0&&O!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:O!==0&&O!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),O!==0&&O!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(z){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(z){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(z){return this._windowTitle=z,this._onTitleChange.fire(z),!0}setIconName(z){return this._iconName=z,!0}setOrReportIndexedColor(z){const O=[],j=z.split(";");for(;j.length>1;){const V=j.shift(),I=j.shift();if(/^\d+$/.exec(V)){const ie=parseInt(V);if(X(ie))if(I==="?")O.push({type:0,index:ie});else{const ge=(0,R.parseColor)(I);ge&&O.push({type:1,index:ie,color:ge})}}}return O.length&&this._onColor.fire(O),!0}setHyperlink(z){const O=z.split(";");return!(O.length<2)&&(O[1]?this._createHyperlink(O[0],O[1]):!O[0]&&this._finishHyperlink())}_createHyperlink(z,O){this._getCurrentLinkId()&&this._finishHyperlink();const j=z.split(":");let V;const I=j.findIndex((ie=>ie.startsWith("id=")));return I!==-1&&(V=j[I].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:V,uri:O}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(z,O){const j=z.split(";");for(let V=0;V<j.length&&!(O>=this._specialColors.length);++V,++O)if(j[V]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const I=(0,R.parseColor)(j[V]);I&&this._onColor.fire([{type:1,index:this._specialColors[O],color:I}])}return!0}setOrReportFgColor(z){return this._setOrReportSpecialColor(z,0)}setOrReportBgColor(z){return this._setOrReportSpecialColor(z,1)}setOrReportCursorColor(z){return this._setOrReportSpecialColor(z,2)}restoreIndexedColor(z){if(!z)return this._onColor.fire([{type:2}]),!0;const O=[],j=z.split(";");for(let V=0;V<j.length;++V)if(/^\d+$/.exec(j[V])){const I=parseInt(j[V]);X(I)&&O.push({type:2,index:I})}return O.length&&this._onColor.fire(O),!0}restoreFgColor(z){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(z){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(z){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,S.DEFAULT_CHARSET),!0}selectCharset(z){return z.length!==2?(this.selectDefaultCharset(),!0):(z[0]==="/"||this._charsetService.setgCharset(B[z[0]],S.CHARSETS[z[1]]||S.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 z=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,z,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=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(z){return this._charsetService.setgLevel(z),!0}screenAlignmentPattern(){const z=new v.CellData;z.content=4194373,z.fg=this._curAttrData.fg,z.bg=this._curAttrData.bg,this._setCursor(0,0);for(let O=0;O<this._bufferService.rows;++O){const j=this._activeBuffer.ybase+this._activeBuffer.y+O,V=this._activeBuffer.lines.get(j);V&&(V.fill(z),V.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(z,O){const j=this._bufferService.buffer,V=this._optionsService.rawOptions;return(I=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${I}${c.C0.ESC}\\`),!0))(z==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:z==='"p'?'P1$r61;1"p':z==="r"?`P1$r${j.scrollTop+1};${j.scrollBottom+1}r`:z==="m"?"P1$r0m":z===" q"?`P1$r${{block:2,underline:4,bar:6}[V.cursorStyle]-(V.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(z,O){this._dirtyRowTracker.markRangeDirty(z,O)}}a.InputHandler=K;let $=class{constructor(Z){this._bufferService=Z,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Z){Z<this.start?this.start=Z:Z>this.end&&(this.end=Z)}markRangeDirty(Z,z){Z>z&&(Y=Z,Z=z,z=Y),Z<this.start&&(this.start=Z),z>this.end&&(this.end=z)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(Z){return 0<=Z&&Z<256}$=h([d(0,M.IBufferService)],$)},844:(f,a)=>{function u(h){for(const d of h)d.dispose();h.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const d=this._disposables.indexOf(h);d!==-1&&this._disposables.splice(d,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var d;this._isDisposed||h===this._value||((d=this._value)==null||d.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},a.toDisposable=function(h){return{dispose:h}},a.disposeArray=u,a.getDisposeArrayDisposable=function(h){return{dispose:()=>u(h)}}},1505:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(d,c,S){this._data[d]||(this._data[d]={}),this._data[d][c]=S}get(d,c){return this._data[d]?this._data[d][c]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(h,d,c,S,w){this._data.get(h,d)||this._data.set(h,d,new u),this._data.get(h,d).set(c,S,w)}get(h,d,c,S){var w;return(w=this._data.get(h,d))==null?void 0:w.get(c,S)}clear(){this._data.clear()}}},6114:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const u=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const d=u.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),a.isIpad=h==="iPad",a.isIphone=h==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),a.isLinux=h.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},6106:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(u=this._search(this._getKey(h)),this._array.splice(u,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const d=this._getKey(h);if(d===void 0||(u=this._search(d),u===-1)||this._getKey(this._array[u])!==d)return!1;do if(this._array[u]===h)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===d);return!1}*getKeyIterator(h){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===h)}forEachByKey(h,d){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do d(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===h)}values(){return[...this._array].values()}_search(h){let d=0,c=this._array.length-1;for(;c>=d;){let S=d+c>>1;const w=this._getKey(this._array[S]);if(w>h)c=S-1;else{if(!(w<h)){for(;S>0&&this._getKey(this._array[S-1])===h;)S--;return S}d=S+1}}return d}}},7226:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=u(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let k=0,x=0,y=w.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(k=Date.now(),this._tasks[this._i]()||this._i++,k=Math.max(1,Date.now()-k),x=Math.max(k,x),_=w.timeRemaining(),1.5*x>_)return y-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(y-k))}ms`),void this._start();y=_}this.clear()}}class c extends d{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const k=Date.now()+w;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}a.PriorityTaskQueue=c,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(S){return requestIdleCallback(S)}_cancelCallback(S){cancelIdleCallback(S)}}:c,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(S){this._queue.clear(),this._queue.enqueue(S)}flush(){this._queue.flush()}}},9282:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=u(643);a.updateWindowsModeWrappedState=function(d){const c=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),S=c==null?void 0:c.get(d.cols-1),w=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);w&&S&&(w.isWrapped=S[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&S[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){const c=new u;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}get underlineVariantOffset(){const c=(3758096384&this._ext)>>29;return c<0?4294967288^c:c}set underlineVariantOffset(c){this._ext&=536870911,this._ext|=c<<29&3758096384}constructor(c=0,S=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=S}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=u(6349),d=u(7226),c=u(3734),S=u(8437),w=u(4634),k=u(511),x=u(643),y=u(4863),_=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(g,v,A){this._hasScrollback=g,this._optionsService=v,this._bufferService=A,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=S.DEFAULT_ATTR_DATA.clone(),this.savedCharset=_.DEFAULT_CHARSET,this.markers=[],this._nullCell=k.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=k.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(g){return g?(this._nullCell.fg=g.fg,this._nullCell.bg=g.bg,this._nullCell.extended=g.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(g){return g?(this._whitespaceCell.fg=g.fg,this._whitespaceCell.bg=g.bg,this._whitespaceCell.extended=g.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(g,v){return new S.BufferLine(this._bufferService.cols,this.getNullCell(g),v)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const g=this.ybase+this.y-this.ydisp;return g>=0&&g<this._rows}_getCorrectBufferLength(g){if(!this._hasScrollback)return g;const v=g+this._optionsService.rawOptions.scrollback;return v>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:v}fillViewportRows(g){if(this.lines.length===0){g===void 0&&(g=S.DEFAULT_ATTR_DATA);let v=this._rows;for(;v--;)this.lines.push(this.getBlankLine(g))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(g,v){const A=this.getNullCell(S.DEFAULT_ATTR_DATA);let M=0;const D=this._getCorrectBufferLength(v);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols<g)for(let E=0;E<this.lines.length;E++)M+=+this.lines.get(E).resize(g,A);let T=0;if(this._rows<v)for(let E=this._rows;E<v;E++)this.lines.length<v+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new S.BufferLine(g,A)):this.ybase>0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new S.BufferLine(g,A)));else for(let E=this._rows;E>v;E--)this.lines.length>v+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D<this.lines.maxLength){const E=this.lines.length-D;E>0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=D}this.x=Math.min(this.x,g-1),this.y=Math.min(this.y,v-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,g-1),this.scrollTop=0}if(this.scrollBottom=v-1,this._isReflowEnabled&&(this._reflow(g,v),this._cols>g))for(let T=0;T<this.lines.length;T++)M+=+this.lines.get(T).resize(g,A);this._cols=g,this._rows=v,this._memoryCleanupQueue.clear(),M>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let g=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,g=!1);let v=0;for(;this._memoryCleanupPosition<this.lines.length;)if(v+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),v>100)return!0;return g}get _isReflowEnabled(){const g=this._optionsService.rawOptions.windowsPty;return g&&g.buildNumber?this._hasScrollback&&g.backend==="conpty"&&g.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(g,v){this._cols!==g&&(g>this._cols?this._reflowLarger(g,v):this._reflowSmaller(g,v))}_reflowLarger(g,v){const A=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(S.DEFAULT_ATTR_DATA));if(A.length>0){const M=(0,w.reflowLargerCreateNewLayout)(this.lines,A);(0,w.reflowLargerApplyNewLayout)(this.lines,M.layout),this._reflowLargerAdjustViewport(g,v,M.countRemoved)}}_reflowLargerAdjustViewport(g,v,A){const M=this.getNullCell(S.DEFAULT_ATTR_DATA);let D=A;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<v&&this.lines.push(new S.BufferLine(g,M))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(g,v){const A=this.getNullCell(S.DEFAULT_ATTR_DATA),M=[];let D=0;for(let T=this.lines.length-1;T>=0;T--){let E=this.lines.get(T);if(!E||!E.isWrapped&&E.getTrimmedLength()<=g)continue;const R=[E];for(;E.isWrapped&&T>0;)E=this.lines.get(--T),R.unshift(E);const B=this.ybase+this.y;if(B>=T&&B<T+R.length)continue;const H=R[R.length-1].getTrimmedLength(),F=(0,w.reflowSmallerGetNewLineLengths)(R,this._cols,g),q=F.length-R.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+q):Math.max(0,this.lines.length-this.lines.maxLength+q);const K=[];for(let j=0;j<q;j++){const V=this.getBlankLine(S.DEFAULT_ATTR_DATA,!0);K.push(V)}K.length>0&&(M.push({start:T+R.length+D,newLines:K}),D+=K.length),R.push(...K);let $=F.length-1,X=F[$];X===0&&($--,X=F[$]);let Z=R.length-q-1,z=H;for(;Z>=0;){const j=Math.min(z,X);if(R[$]===void 0)break;if(R[$].copyCellsFrom(R[Z],z-j,X-j,j,!0),X-=j,X===0&&($--,X=F[$]),z-=j,z===0){Z--;const V=Math.max(Z,0);z=(0,w.getWrappedLineTrimmedLength)(R,V,this._cols)}}for(let j=0;j<R.length;j++)F[j]<g&&R[j].setCell(F[j],A);let O=q-Y;for(;O-- >0;)this.ybase===0?this.y<v-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+D)-v&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+q,this.ybase+v-1)}if(M.length>0){const T=[],E=[];for(let $=0;$<this.lines.length;$++)E.push(this.lines.get($));const R=this.lines.length;let B=R-1,H=0,F=M[H];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+D);let q=0;for(let $=Math.min(this.lines.maxLength-1,R+D-1);$>=0;$--)if(F&&F.start>B+q){for(let X=F.newLines.length-1;X>=0;X--)this.lines.set($--,F.newLines[X]);$++,T.push({index:B+1,amount:F.newLines.length}),q+=F.newLines.length,F=M[++H]}else this.lines.set($,E[B--]);let Y=0;for(let $=T.length-1;$>=0;$--)T[$].index+=Y,this.lines.onInsertEmitter.fire(T[$]),Y+=T[$].amount;const K=Math.max(0,R+D-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(g,v,A=0,M){const D=this.lines.get(g);return D?D.translateToString(v,A,M):""}getWrappedRangeForLine(g){let v=g,A=g;for(;v>0&&this.lines.get(v).isWrapped;)v--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:v,last:A}}setupTabStops(g){for(g!=null?this.tabs[g]||(g=this.prevStop(g)):(this.tabs={},g=0);g<this._cols;g+=this._optionsService.rawOptions.tabStopWidth)this.tabs[g]=!0}prevStop(g){for(g==null&&(g=this.x);!this.tabs[--g]&&g>0;);return g>=this._cols?this._cols-1:g<0?0:g}nextStop(g){for(g==null&&(g=this.x);!this.tabs[++g]&&g<this._cols;);return g>=this._cols?this._cols-1:g<0?0:g}clearMarkers(g){this._isClearing=!0;for(let v=0;v<this.markers.length;v++)this.markers[v].line===g&&(this.markers[v].dispose(),this.markers.splice(v--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].dispose(),this.markers.splice(g--,1);this._isClearing=!1}addMarker(g){const v=new y.Marker(g);return this.markers.push(v),v.register(this.lines.onTrim((A=>{v.line-=A,v.line<0&&v.dispose()}))),v.register(this.lines.onInsert((A=>{v.line>=A.index&&(v.line+=A.amount)}))),v.register(this.lines.onDelete((A=>{v.line>=A.index&&v.line<A.index+A.amount&&v.dispose(),v.line>A.index&&(v.line-=A.amount)}))),v.register(v.onDispose((()=>this._removeMarker(v)))),v}_removeMarker(g){this._isClearing||this.markers.splice(this.markers.indexOf(g),1)}}},8437:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=u(3734),d=u(511),c=u(643),S=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class k{constructor(y,_,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*y);const v=_||d.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]);for(let A=0;A<y;++A)this.setCell(A,v);this.length=y}get(y){const _=this._data[3*y+0],g=2097151&_;return[this._data[3*y+1],2097152&_?this._combined[y]:g?(0,S.stringFromCodePoint)(g):"",_>>22,2097152&_?this._combined[y].charCodeAt(this._combined[y].length-1):g]}set(y,_){this._data[3*y+1]=_[c.CHAR_DATA_ATTR_INDEX],_[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[y]=_[1],this._data[3*y+0]=2097152|y|_[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*y+0]=_[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[c.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(y){return this._data[3*y+0]>>22}hasWidth(y){return 12582912&this._data[3*y+0]}getFg(y){return this._data[3*y+1]}getBg(y){return this._data[3*y+2]}hasContent(y){return 4194303&this._data[3*y+0]}getCodePoint(y){const _=this._data[3*y+0];return 2097152&_?this._combined[y].charCodeAt(this._combined[y].length-1):2097151&_}isCombined(y){return 2097152&this._data[3*y+0]}getString(y){const _=this._data[3*y+0];return 2097152&_?this._combined[y]:2097151&_?(0,S.stringFromCodePoint)(2097151&_):""}isProtected(y){return 536870912&this._data[3*y+2]}loadCell(y,_){return w=3*y,_.content=this._data[w+0],_.fg=this._data[w+1],_.bg=this._data[w+2],2097152&_.content&&(_.combinedData=this._combined[y]),268435456&_.bg&&(_.extended=this._extendedAttrs[y]),_}setCell(y,_){2097152&_.content&&(this._combined[y]=_.combinedData),268435456&_.bg&&(this._extendedAttrs[y]=_.extended),this._data[3*y+0]=_.content,this._data[3*y+1]=_.fg,this._data[3*y+2]=_.bg}setCellFromCodepoint(y,_,g,v){268435456&v.bg&&(this._extendedAttrs[y]=v.extended),this._data[3*y+0]=_|g<<22,this._data[3*y+1]=v.fg,this._data[3*y+2]=v.bg}addCodepointToCell(y,_,g){let v=this._data[3*y+0];2097152&v?this._combined[y]+=(0,S.stringFromCodePoint)(_):2097151&v?(this._combined[y]=(0,S.stringFromCodePoint)(2097151&v)+(0,S.stringFromCodePoint)(_),v&=-2097152,v|=2097152):v=_|4194304,g&&(v&=-12582913,v|=g<<22),this._data[3*y+0]=v}insertCells(y,_,g){if((y%=this.length)&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),_<this.length-y){const v=new d.CellData;for(let A=this.length-y-_-1;A>=0;--A)this.setCell(y+_+A,this.loadCell(y+A,v));for(let A=0;A<_;++A)this.setCell(y+A,g)}else for(let v=y;v<this.length;++v)this.setCell(v,g);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,g)}deleteCells(y,_,g){if(y%=this.length,_<this.length-y){const v=new d.CellData;for(let A=0;A<this.length-y-_;++A)this.setCell(y+A,this.loadCell(y+_+A,v));for(let A=this.length-_;A<this.length;++A)this.setCell(A,g)}else for(let v=y;v<this.length;++v)this.setCell(v,g);y&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),this.getWidth(y)!==0||this.hasContent(y)||this.setCellFromCodepoint(y,0,1,g)}replaceCells(y,_,g,v=!1){if(v)for(y&&this.getWidth(y-1)===2&&!this.isProtected(y-1)&&this.setCellFromCodepoint(y-1,0,1,g),_<this.length&&this.getWidth(_-1)===2&&!this.isProtected(_)&&this.setCellFromCodepoint(_,0,1,g);y<_&&y<this.length;)this.isProtected(y)||this.setCell(y,g),y++;else for(y&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),_<this.length&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_,0,1,g);y<_&&y<this.length;)this.setCell(y++,g)}resize(y,_){if(y===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const g=3*y;if(y>this.length){if(this._data.buffer.byteLength>=4*g)this._data=new Uint32Array(this._data.buffer,0,g);else{const v=new Uint32Array(g);v.set(this._data),this._data=v}for(let v=this.length;v<y;++v)this.setCell(v,_)}else{this._data=this._data.subarray(0,g);const v=Object.keys(this._combined);for(let M=0;M<v.length;M++){const D=parseInt(v[M],10);D>=y&&delete this._combined[D]}const A=Object.keys(this._extendedAttrs);for(let M=0;M<A.length;M++){const D=parseInt(A[M],10);D>=y&&delete this._extendedAttrs[D]}}return this.length=y,4*g*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const y=new Uint32Array(this._data.length);return y.set(this._data),this._data=y,1}return 0}fill(y,_=!1){if(_)for(let g=0;g<this.length;++g)this.isProtected(g)||this.setCell(g,y);else{this._combined={},this._extendedAttrs={};for(let g=0;g<this.length;++g)this.setCell(g,y)}}copyFrom(y){this.length!==y.length?this._data=new Uint32Array(y._data):this._data.set(y._data),this.length=y.length,this._combined={};for(const _ in y._combined)this._combined[_]=y._combined[_];this._extendedAttrs={};for(const _ in y._extendedAttrs)this._extendedAttrs[_]=y._extendedAttrs[_];this.isWrapped=y.isWrapped}clone(){const y=new k(0);y._data=new Uint32Array(this._data),y.length=this.length;for(const _ in this._combined)y._combined[_]=this._combined[_];for(const _ in this._extendedAttrs)y._extendedAttrs[_]=this._extendedAttrs[_];return y.isWrapped=this.isWrapped,y}getTrimmedLength(){for(let y=this.length-1;y>=0;--y)if(4194303&this._data[3*y+0])return y+(this._data[3*y+0]>>22);return 0}getNoBgTrimmedLength(){for(let y=this.length-1;y>=0;--y)if(4194303&this._data[3*y+0]||50331648&this._data[3*y+2])return y+(this._data[3*y+0]>>22);return 0}copyCellsFrom(y,_,g,v,A){const M=y._data;if(A)for(let T=v-1;T>=0;T--){for(let E=0;E<3;E++)this._data[3*(g+T)+E]=M[3*(_+T)+E];268435456&M[3*(_+T)+2]&&(this._extendedAttrs[g+T]=y._extendedAttrs[_+T])}else for(let T=0;T<v;T++){for(let E=0;E<3;E++)this._data[3*(g+T)+E]=M[3*(_+T)+E];268435456&M[3*(_+T)+2]&&(this._extendedAttrs[g+T]=y._extendedAttrs[_+T])}const D=Object.keys(y._combined);for(let T=0;T<D.length;T++){const E=parseInt(D[T],10);E>=_&&(this._combined[E-_+g]=y._combined[E])}}translateToString(y,_,g,v){_=_??0,g=g??this.length,y&&(g=Math.min(g,this.getTrimmedLength())),v&&(v.length=0);let A="";for(;_<g;){const M=this._data[3*_+0],D=2097151&M,T=2097152&M?this._combined[_]:D?(0,S.stringFromCodePoint)(D):c.WHITESPACE_CELL_CHAR;if(A+=T,v)for(let E=0;E<T.length;++E)v.push(_);_+=M>>22||1}return v&&v.push(_),A}}a.BufferLine=k},4841:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,h){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return h*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(f,a)=>{function u(h,d,c){if(d===h.length-1)return h[d].getTrimmedLength();const S=!h[d].hasContent(c-1)&&h[d].getWidth(c-1)===1,w=h[d+1].getWidth(0)===2;return S&&w?c-1:c}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,d,c,S,w){const k=[];for(let x=0;x<h.length-1;x++){let y=x,_=h.get(++y);if(!_.isWrapped)continue;const g=[h.get(x)];for(;y<h.length&&_.isWrapped;)g.push(_),_=h.get(++y);if(S>=x&&S<y){x+=g.length-1;continue}let v=0,A=u(g,v,d),M=1,D=0;for(;M<g.length;){const E=u(g,M,d),R=E-D,B=c-A,H=Math.min(R,B);g[v].copyCellsFrom(g[M],D,A,H,!1),A+=H,A===c&&(v++,A=0),D+=H,D===E&&(M++,D=0),A===0&&v!==0&&g[v-1].getWidth(c-1)===2&&(g[v].copyCellsFrom(g[v-1],c-1,A++,1,!1),g[v-1].setCell(c-1,w))}g[v].replaceCells(A,c,w);let T=0;for(let E=g.length-1;E>0&&(E>v||g[E].getTrimmedLength()===0);E--)T++;T>0&&(k.push(x+g.length-T),k.push(T)),x+=g.length-1}return k},a.reflowLargerCreateNewLayout=function(h,d){const c=[];let S=0,w=d[S],k=0;for(let x=0;x<h.length;x++)if(w===x){const y=d[++S];h.onDeleteEmitter.fire({index:x-k,amount:y}),x+=y-1,k+=y,w=d[++S]}else c.push(x);return{layout:c,countRemoved:k}},a.reflowLargerApplyNewLayout=function(h,d){const c=[];for(let S=0;S<d.length;S++)c.push(h.get(d[S]));for(let S=0;S<c.length;S++)h.set(S,c[S]);h.length=d.length},a.reflowSmallerGetNewLineLengths=function(h,d,c){const S=[],w=h.map(((_,g)=>u(h,g,d))).reduce(((_,g)=>_+g));let k=0,x=0,y=0;for(;y<w;){if(w-y<c){S.push(w-y);break}k+=c;const _=u(h,x,d);k>_&&(k-=_,x++);const g=h[x].getWidth(k-1)===2;g&&k--;const v=g?c-1:c;S.push(v),y+=v}return S},a.getWrappedLineTrimmedLength=u},5295:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=u(8460),d=u(844),c=u(9092);class S extends d.Disposable{constructor(k,x){super(),this._optionsService=k,this._bufferService=x,this._onBufferActivate=this.register(new h.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 c.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c.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(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),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(k,x){this._normal.resize(k,x),this._alt.resize(k,x),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}a.BufferSet=S},511:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=u(482),d=u(643),c=u(3734);class S extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const x=new S;return x.setFromCharData(k),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(k){this.fg=k[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const y=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=y&&y<=56319){const _=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(y-55296)+_-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=S},643:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=u(8460),d=u(844);class c{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=c._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}a.Marker=c,c._nextId=1},7116:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(f,a)=>{var u,h,d;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(c){c.NUL="\0",c.SOH="",c.STX="",c.ETX="",c.EOT="",c.ENQ="",c.ACK="",c.BEL="\x07",c.BS="\b",c.HT=" ",c.LF=`
|
|
58
|
+
`,c.VT="\v",c.FF="\f",c.CR="\r",c.SO="",c.SI="",c.DLE="",c.DC1="",c.DC2="",c.DC3="",c.DC4="",c.NAK="",c.SYN="",c.ETB="",c.CAN="",c.EM="",c.SUB="",c.ESC="\x1B",c.FS="",c.GS="",c.RS="",c.US="",c.SP=" ",c.DEL=""})(u||(a.C0=u={})),(function(c){c.PAD="",c.HOP="",c.BPH="",c.NBH="",c.IND="",c.NEL="
",c.SSA="",c.ESA="",c.HTS="",c.HTJ="",c.VTS="",c.PLD="",c.PLU="",c.RI="",c.SS2="",c.SS3="",c.DCS="",c.PU1="",c.PU2="",c.STS="",c.CCH="",c.MW="",c.SPA="",c.EPA="",c.SOS="",c.SGCI="",c.SCI="",c.CSI="",c.ST="",c.OSC="",c.PM="",c.APC=""})(h||(a.C1=h={})),(function(c){c.ST=`${u.ESC}\\`})(d||(a.C1_ESCAPED=d={}))},7399:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=u(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(c,S,w,k){const x={type:0,cancel:!1,key:void 0},y=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?x.key=S?h.C0.ESC+"OA":h.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?x.key=S?h.C0.ESC+"OD":h.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?x.key=S?h.C0.ESC+"OC":h.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(x.key=S?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=c.ctrlKey?"\b":h.C0.DEL,c.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(c.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=c.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,c.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(c.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"D",x.key===h.C0.ESC+"[1;3D"&&(x.key=h.C0.ESC+(w?"b":"[1;5D"))):x.key=S?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(c.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"C",x.key===h.C0.ESC+"[1;3C"&&(x.key=h.C0.ESC+(w?"f":"[1;5C"))):x.key=S?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(c.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"A",w||x.key!==h.C0.ESC+"[1;3A"||(x.key=h.C0.ESC+"[1;5A")):x.key=S?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(c.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"B",w||x.key!==h.C0.ESC+"[1;3B"||(x.key=h.C0.ESC+"[1;5B")):x.key=S?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:c.shiftKey||c.ctrlKey||(x.key=h.C0.ESC+"[2~");break;case 46:x.key=y?h.C0.ESC+"[3;"+(y+1)+"~":h.C0.ESC+"[3~";break;case 36:x.key=y?h.C0.ESC+"[1;"+(y+1)+"H":S?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=y?h.C0.ESC+"[1;"+(y+1)+"F":S?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:c.shiftKey?x.type=2:c.ctrlKey?x.key=h.C0.ESC+"[5;"+(y+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:c.shiftKey?x.type=3:c.ctrlKey?x.key=h.C0.ESC+"[6;"+(y+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=y?h.C0.ESC+"[1;"+(y+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=y?h.C0.ESC+"[1;"+(y+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=y?h.C0.ESC+"[1;"+(y+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=y?h.C0.ESC+"[1;"+(y+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=y?h.C0.ESC+"[15;"+(y+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=y?h.C0.ESC+"[17;"+(y+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=y?h.C0.ESC+"[18;"+(y+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=y?h.C0.ESC+"[19;"+(y+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=y?h.C0.ESC+"[20;"+(y+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=y?h.C0.ESC+"[21;"+(y+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=y?h.C0.ESC+"[23;"+(y+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=y?h.C0.ESC+"[24;"+(y+1)+"~":h.C0.ESC+"[24~";break;default:if(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(w&&!k||!c.altKey||c.metaKey)!w||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?x.key=c.key:c.key&&c.ctrlKey&&(c.key==="_"&&(x.key=h.C0.US),c.key==="@"&&(x.key=h.C0.NUL)):c.keyCode===65&&(x.type=1);else{const _=d[c.keyCode],g=_==null?void 0:_[c.shiftKey?1:0];if(g)x.key=h.C0.ESC+g;else if(c.keyCode>=65&&c.keyCode<=90){const v=c.ctrlKey?c.keyCode-64:c.keyCode+32;let A=String.fromCharCode(v);c.shiftKey&&(A=A.toUpperCase()),x.key=h.C0.ESC+A}else if(c.keyCode===32)x.key=h.C0.ESC+(c.ctrlKey?h.C0.NUL:" ");else if(c.key==="Dead"&&c.code.startsWith("Key")){let v=c.code.slice(3,4);c.shiftKey||(v=v.toLowerCase()),x.key=h.C0.ESC+v,x.cancel=!0}}else c.keyCode>=65&&c.keyCode<=90?x.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?x.key=h.C0.NUL:c.keyCode>=51&&c.keyCode<=55?x.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?x.key=h.C0.DEL:c.keyCode===219?x.key=h.C0.ESC:c.keyCode===220?x.key=h.C0.FS:c.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,h=0,d=u.length){let c="";for(let S=h;S<d;++S){let w=u[S];w>65535?(w-=65536,c+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):c+=String.fromCharCode(w)}return c},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,h){const d=u.length;if(!d)return 0;let c=0,S=0;if(this._interim){const w=u.charCodeAt(S++);56320<=w&&w<=57343?h[c++]=1024*(this._interim-55296)+w-56320+65536:(h[c++]=this._interim,h[c++]=w),this._interim=0}for(let w=S;w<d;++w){const k=u.charCodeAt(w);if(55296<=k&&k<=56319){if(++w>=d)return this._interim=k,c;const x=u.charCodeAt(w);56320<=x&&x<=57343?h[c++]=1024*(k-55296)+x-56320+65536:(h[c++]=k,h[c++]=x)}else k!==65279&&(h[c++]=k)}return c}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,h){const d=u.length;if(!d)return 0;let c,S,w,k,x=0,y=0,_=0;if(this.interim[0]){let A=!1,M=this.interim[0];M&=(224&M)==192?31:(240&M)==224?15:7;let D,T=0;for(;(D=63&this.interim[++T])&&T<4;)M<<=6,M|=D;const E=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=E-T;for(;_<R;){if(_>=d)return 0;if(D=u[_++],(192&D)!=128){_--,A=!0;break}this.interim[T++]=D,M<<=6,M|=63&D}A||(E===2?M<128?_--:h[x++]=M:E===3?M<2048||M>=55296&&M<=57343||M===65279||(h[x++]=M):M<65536||M>1114111||(h[x++]=M)),this.interim.fill(0)}const g=d-4;let v=_;for(;v<d;){for(;!(!(v<g)||128&(c=u[v])||128&(S=u[v+1])||128&(w=u[v+2])||128&(k=u[v+3]));)h[x++]=c,h[x++]=S,h[x++]=w,h[x++]=k,v+=4;if(c=u[v++],c<128)h[x++]=c;else if((224&c)==192){if(v>=d)return this.interim[0]=c,x;if(S=u[v++],(192&S)!=128){v--;continue}if(y=(31&c)<<6|63&S,y<128){v--;continue}h[x++]=y}else if((240&c)==224){if(v>=d)return this.interim[0]=c,x;if(S=u[v++],(192&S)!=128){v--;continue}if(v>=d)return this.interim[0]=c,this.interim[1]=S,x;if(w=u[v++],(192&w)!=128){v--;continue}if(y=(15&c)<<12|(63&S)<<6|63&w,y<2048||y>=55296&&y<=57343||y===65279)continue;h[x++]=y}else if((248&c)==240){if(v>=d)return this.interim[0]=c,x;if(S=u[v++],(192&S)!=128){v--;continue}if(v>=d)return this.interim[0]=c,this.interim[1]=S,x;if(w=u[v++],(192&w)!=128){v--;continue}if(v>=d)return this.interim[0]=c,this.interim[1]=S,this.interim[2]=w,x;if(k=u[v++],(192&k)!=128){v--;continue}if(y=(7&c)<<18|(63&S)<<12|(63&w)<<6|63&k,y<65536||y>1114111)continue;h[x++]=y}}return x}}},225:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=u(1480),d=[[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]],c=[[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 S;a.UnicodeV6=class{constructor(){if(this.version="6",!S){S=new Uint8Array(65536),S.fill(1),S[0]=0,S.fill(0,1,32),S.fill(0,127,160),S.fill(2,4352,4448),S[9001]=2,S[9002]=2,S.fill(2,11904,42192),S[12351]=1,S.fill(2,44032,55204),S.fill(2,63744,64256),S.fill(2,65040,65050),S.fill(2,65072,65136),S.fill(2,65280,65377),S.fill(2,65504,65511);for(let w=0;w<d.length;++w)S.fill(0,d[w][0],d[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?S[w]:(function(k,x){let y,_=0,g=x.length-1;if(k<x[0][0]||k>x[g][1])return!1;for(;g>=_;)if(y=_+g>>1,k>x[y][1])_=y+1;else{if(!(k<x[y][0]))return!0;g=y-1}return!1})(w,c)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,k){let x=this.wcwidth(w),y=x===0&&k!==0;if(y){const _=h.UnicodeService.extractWidth(k);_===0?y=!1:_>x&&(x=_)}return h.UnicodeService.createPropertyValue(0,x,y)}}},5981:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=u(8460),d=u(844);class c extends d.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,k){if(k!==void 0&&this._syncCalls>k)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const y=this._callbacks.shift();y&&y()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,k){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+=w.length,this._writeBuffer.push(w),this._callbacks.push(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(k)}_innerWrite(w=0,k=!0){const x=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const y=this._writeBuffer[this._bufferOffset],_=this._action(y,k);if(_){const v=A=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,A))):this._innerWrite(x,A);return void _.catch((A=>(queueMicrotask((()=>{throw A})),Promise.resolve(!1)))).then(v)}const g=this._callbacks[this._bufferOffset];if(g&&g(),this._bufferOffset++,this._pendingData-=y.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=c},5941:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const u=/^([\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})$/,h=/^[\da-f]+$/;function d(c,S){const w=c.toString(16),k=w.length<2?"0"+w:w;switch(S){case 4:return w[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}a.parseColor=function(c){if(!c)return;let S=c.toLowerCase();if(S.indexOf("rgb:")===0){S=S.slice(4);const w=u.exec(S);if(w){const k=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/k*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/k*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/k*255)]}}else if(S.indexOf("#")===0&&(S=S.slice(1),h.exec(S)&&[3,6,9,12].includes(S.length))){const w=S.length/3,k=[0,0,0];for(let x=0;x<3;++x){const y=parseInt(S.slice(w*x,w*x+w),16);k[x]=w===1?y<<4:w===2?y:w===3?y>>4:y>>8}return k}},a.toRgbString=function(c,S=16){const[w,k,x]=c;return`rgb:${d(w,S)}/${d(k,S)}/${d(x,S)}`}},5770:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=u(482),d=u(8742),c=u(5770),S=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=S,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=S}registerHandler(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const y=this._handlers[k];return y.push(x),{dispose:()=>{const _=y.indexOf(x);_!==-1&&y.splice(_,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=S,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||S,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(k,x,y){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(k,x,y);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(k,x,y))}unhook(k,x=!0){if(this._active.length){let y=!1,_=this._active.length-1,g=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,y=x,g=this._stack.fallThrough,this._stack.paused=!1),!g&&y===!1){for(;_>=0&&(y=this._active[_].unhook(k),y!==!0);_--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,y;_--}for(;_>=0;_--)if(y=this._active[_].unhook(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,y}else this._handlerFb(this._ident,"UNHOOK",k);this._active=S,this._ident=0}};const w=new d.Params;w.addParam(0),a.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=w,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():w,this._data="",this._hitLimit=!1}put(k,x,y){this._hitLimit||(this._data+=(0,h.utf32ToString)(k,x,y),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let x=!1;if(this._hitLimit)x=!1;else if(k&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((y=>(this._params=w,this._data="",this._hitLimit=!1,y)));return this._params=w,this._data="",this._hitLimit=!1,x}}},2015:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=u(844),d=u(8742),c=u(6242),S=u(6351);class w{constructor(_){this.table=new Uint8Array(_)}setDefault(_,g){this.table.fill(_<<4|g)}add(_,g,v,A){this.table[g<<8|_]=v<<4|A}addMany(_,g,v,A){for(let M=0;M<_.length;M++)this.table[g<<8|_[M]]=v<<4|A}}a.TransitionTable=w;const k=160;a.VT500_TRANSITION_TABLE=(function(){const y=new w(4095),_=Array.apply(null,Array(256)).map(((T,E)=>E)),g=(T,E)=>_.slice(T,E),v=g(32,127),A=g(0,24);A.push(25),A.push.apply(A,g(28,32));const M=g(0,14);let D;for(D in y.setDefault(1,0),y.addMany(v,0,2,0),M)y.addMany([24,26,153,154],D,3,0),y.addMany(g(128,144),D,3,0),y.addMany(g(144,152),D,3,0),y.add(156,D,0,0),y.add(27,D,11,1),y.add(157,D,4,8),y.addMany([152,158,159],D,0,7),y.add(155,D,11,3),y.add(144,D,11,9);return y.addMany(A,0,3,0),y.addMany(A,1,3,1),y.add(127,1,0,1),y.addMany(A,8,0,8),y.addMany(A,3,3,3),y.add(127,3,0,3),y.addMany(A,4,3,4),y.add(127,4,0,4),y.addMany(A,6,3,6),y.addMany(A,5,3,5),y.add(127,5,0,5),y.addMany(A,2,3,2),y.add(127,2,0,2),y.add(93,1,4,8),y.addMany(v,8,5,8),y.add(127,8,5,8),y.addMany([156,27,24,26,7],8,6,0),y.addMany(g(28,32),8,0,8),y.addMany([88,94,95],1,0,7),y.addMany(v,7,0,7),y.addMany(A,7,0,7),y.add(156,7,0,0),y.add(127,7,0,7),y.add(91,1,11,3),y.addMany(g(64,127),3,7,0),y.addMany(g(48,60),3,8,4),y.addMany([60,61,62,63],3,9,4),y.addMany(g(48,60),4,8,4),y.addMany(g(64,127),4,7,0),y.addMany([60,61,62,63],4,0,6),y.addMany(g(32,64),6,0,6),y.add(127,6,0,6),y.addMany(g(64,127),6,0,0),y.addMany(g(32,48),3,9,5),y.addMany(g(32,48),5,9,5),y.addMany(g(48,64),5,0,6),y.addMany(g(64,127),5,7,0),y.addMany(g(32,48),4,9,5),y.addMany(g(32,48),1,9,2),y.addMany(g(32,48),2,9,2),y.addMany(g(48,127),2,10,0),y.addMany(g(48,80),1,10,0),y.addMany(g(81,88),1,10,0),y.addMany([89,90,92],1,10,0),y.addMany(g(96,127),1,10,0),y.add(80,1,11,9),y.addMany(A,9,0,9),y.add(127,9,0,9),y.addMany(g(28,32),9,0,9),y.addMany(g(32,48),9,9,12),y.addMany(g(48,60),9,8,10),y.addMany([60,61,62,63],9,9,10),y.addMany(A,11,0,11),y.addMany(g(32,128),11,0,11),y.addMany(g(28,32),11,0,11),y.addMany(A,10,0,10),y.add(127,10,0,10),y.addMany(g(28,32),10,0,10),y.addMany(g(48,60),10,8,10),y.addMany([60,61,62,63],10,0,11),y.addMany(g(32,48),10,9,12),y.addMany(A,12,0,12),y.add(127,12,0,12),y.addMany(g(28,32),12,0,12),y.addMany(g(32,48),12,9,12),y.addMany(g(48,64),12,0,11),y.addMany(g(64,127),12,12,13),y.addMany(g(64,127),10,12,13),y.addMany(g(64,127),9,12,13),y.addMany(A,13,13,13),y.addMany(v,13,13,13),y.add(127,13,0,13),y.addMany([27,156,24,26],13,14,0),y.add(k,0,2,0),y.add(k,8,5,8),y.add(k,6,0,6),y.add(k,11,0,11),y.add(k,13,13,13),y})();class x extends h.Disposable{constructor(_=a.VT500_TRANSITION_TABLE){super(),this._transitions=_,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(g,v,A)=>{},this._executeHandlerFb=g=>{},this._csiHandlerFb=(g,v)=>{},this._escHandlerFb=g=>{},this._errorHandlerFb=g=>g,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new c.OscParser),this._dcsParser=this.register(new S.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(_,g=[64,126]){let v=0;if(_.prefix){if(_.prefix.length>1)throw new Error("only one byte as prefix supported");if(v=_.prefix.charCodeAt(0),v&&60>v||v>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(_.intermediates){if(_.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let M=0;M<_.intermediates.length;++M){const D=_.intermediates.charCodeAt(M);if(32>D||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");v<<=8,v|=D}}if(_.final.length!==1)throw new Error("final must be a single byte");const A=_.final.charCodeAt(0);if(g[0]>A||A>g[1])throw new Error(`final must be in range ${g[0]} .. ${g[1]}`);return v<<=8,v|=A,v}identToString(_){const g=[];for(;_;)g.push(String.fromCharCode(255&_)),_>>=8;return g.reverse().join("")}setPrintHandler(_){this._printHandler=_}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(_,g){const v=this._identifier(_,[48,126]);this._escHandlers[v]===void 0&&(this._escHandlers[v]=[]);const A=this._escHandlers[v];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearEscHandler(_){this._escHandlers[this._identifier(_,[48,126])]&&delete this._escHandlers[this._identifier(_,[48,126])]}setEscHandlerFallback(_){this._escHandlerFb=_}setExecuteHandler(_,g){this._executeHandlers[_.charCodeAt(0)]=g}clearExecuteHandler(_){this._executeHandlers[_.charCodeAt(0)]&&delete this._executeHandlers[_.charCodeAt(0)]}setExecuteHandlerFallback(_){this._executeHandlerFb=_}registerCsiHandler(_,g){const v=this._identifier(_);this._csiHandlers[v]===void 0&&(this._csiHandlers[v]=[]);const A=this._csiHandlers[v];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearCsiHandler(_){this._csiHandlers[this._identifier(_)]&&delete this._csiHandlers[this._identifier(_)]}setCsiHandlerFallback(_){this._csiHandlerFb=_}registerDcsHandler(_,g){return this._dcsParser.registerHandler(this._identifier(_),g)}clearDcsHandler(_){this._dcsParser.clearHandler(this._identifier(_))}setDcsHandlerFallback(_){this._dcsParser.setHandlerFallback(_)}registerOscHandler(_,g){return this._oscParser.registerHandler(_,g)}clearOscHandler(_){this._oscParser.clearHandler(_)}setOscHandlerFallback(_){this._oscParser.setHandlerFallback(_)}setErrorHandler(_){this._errorHandler=_}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(_,g,v,A,M){this._parseStack.state=_,this._parseStack.handlers=g,this._parseStack.handlerPos=v,this._parseStack.transition=A,this._parseStack.chunkPos=M}parse(_,g,v){let A,M=0,D=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(v===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const E=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(v===!1&&R>-1){for(;R>=0&&(A=E[R](this._params),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 4:if(v===!1&&R>-1){for(;R>=0&&(A=E[R](),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 6:if(M=_[this._parseStack.chunkPos],A=this._dcsParser.unhook(M!==24&&M!==26,v),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(M=_[this._parseStack.chunkPos],A=this._oscParser.end(M!==24&&M!==26,v),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let E=T;E<g;++E){switch(M=_[E],D=this._transitions.table[this.currentState<<8|(M<160?M:k)],D>>4){case 2:for(let q=E+1;;++q){if(q>=g||(M=_[q])<32||M>126&&M<k){this._printHandler(_,E,q),E=q-1;break}if(++q>=g||(M=_[q])<32||M>126&&M<k){this._printHandler(_,E,q),E=q-1;break}if(++q>=g||(M=_[q])<32||M>126&&M<k){this._printHandler(_,E,q),E=q-1;break}if(++q>=g||(M=_[q])<32||M>126&&M<k){this._printHandler(_,E,q),E=q-1;break}}break;case 3:this._executeHandlers[M]?this._executeHandlers[M]():this._executeHandlerFb(M),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:E,code:M,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|M];let B=R?R.length-1:-1;for(;B>=0&&(A=R[B](this._params),A!==!0);B--)if(A instanceof Promise)return this._preserveStack(3,R,B,D,E),A;B<0&&this._csiHandlerFb(this._collect<<8|M,this._params),this.precedingJoinState=0;break;case 8:do switch(M){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(M-48)}while(++E<g&&(M=_[E])>47&&M<60);E--;break;case 9:this._collect<<=8,this._collect|=M;break;case 10:const H=this._escHandlers[this._collect<<8|M];let F=H?H.length-1:-1;for(;F>=0&&(A=H[F](),A!==!0);F--)if(A instanceof Promise)return this._preserveStack(4,H,F,D,E),A;F<0&&this._escHandlerFb(this._collect<<8|M),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|M,this._params);break;case 13:for(let q=E+1;;++q)if(q>=g||(M=_[q])===24||M===26||M===27||M>127&&M<k){this._dcsParser.put(_,E,q),E=q-1;break}break;case 14:if(A=this._dcsParser.unhook(M!==24&&M!==26),A)return this._preserveStack(6,[],0,D,E),A;M===27&&(D|=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 q=E+1;;q++)if(q>=g||(M=_[q])<32||M>127&&M<k){this._oscParser.put(_,E,q),E=q-1;break}break;case 6:if(A=this._oscParser.end(M!==24&&M!==26),A)return this._preserveStack(5,[],0,D,E),A;M===27&&(D|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&D}}}a.EscapeSequenceParser=x},6242:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=u(5770),d=u(482),c=[];a.OscParser=class{constructor(){this._state=0,this._active=c,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(S,w){this._handlers[S]===void 0&&(this._handlers[S]=[]);const k=this._handlers[S];return k.push(w),{dispose:()=>{const x=k.indexOf(w);x!==-1&&k.splice(x,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=c}reset(){if(this._state===2)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].end(!1);this._stack.paused=!1,this._active=c,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||c,this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].start();else this._handlerFb(this._id,"START")}_put(S,w,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(S,w,k);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(S,w,k))}start(){this.reset(),this._state=1}put(S,w,k){if(this._state!==3){if(this._state===1)for(;w<k;){const x=S[w++];if(x===59){this._state=2,this._start();break}if(x<48||57<x)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+x-48}this._state===2&&k-w>0&&this._put(S,w,k)}}end(S,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,x=this._active.length-1,y=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,k=w,y=this._stack.fallThrough,this._stack.paused=!1),!y&&k===!1){for(;x>=0&&(k=this._active[x].end(S),k!==!0);x--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,k;x--}for(;x>=0;x--)if(k=this._active[x].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",S);this._active=c,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(S){this._handler=S,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(S,w,k){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,w,k),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(S){let w=!1;if(this._hitLimit)w=!1;else if(S&&(w=this._handler(this._data),w instanceof Promise))return w.then((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,w}}},8742:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class h{static fromArray(c){const S=new h;if(!c.length)return S;for(let w=Array.isArray(c[0])?1:0;w<c.length;++w){const k=c[w];if(Array.isArray(k))for(let x=0;x<k.length;++x)S.addSubParam(k[x]);else S.addParam(k)}return S}constructor(c=32,S=32){if(this.maxLength=c,this.maxSubParamsLength=S,S>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(S),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const c=new h(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c}toArray(){const c=[];for(let S=0;S<this.length;++S){c.push(this.params[S]);const w=this._subParamsIdx[S]>>8,k=255&this._subParamsIdx[S];k-w>0&&c.push(Array.prototype.slice.call(this._subParams,w,k))}return c}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>u?u:c}}addSubParam(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>u?u:c,this._subParamsIdx[this.length-1]++}}hasSubParams(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0}getSubParams(c){const S=this._subParamsIdx[c]>>8,w=255&this._subParamsIdx[c];return w-S>0?this._subParams.subarray(S,w):null}getSubParamsAll(){const c={};for(let S=0;S<this.length;++S){const w=this._subParamsIdx[S]>>8,k=255&this._subParamsIdx[S];k-w>0&&(c[S]=this._subParams.slice(w,k))}return c}addDigit(c){let S;if(this._rejectDigits||!(S=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,k=w[S-1];w[S-1]=~k?Math.min(10*k+c,u):c}}a.Params=h},5741:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,h){const d={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(d),h.dispose=()=>this._wrappedAddonDispose(d),h.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let h=-1;for(let d=0;d<this._addons.length;d++)if(this._addons[d]===u){h=d;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(h,1)}}},8771:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=u(3785),d=u(511);a.BufferApiView=class{constructor(c,S){this._buffer=c,this.type=S}init(c){return this._buffer=c,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(c){const S=this._buffer.lines.get(c);if(S)return new h.BufferLineApiView(S)}getNullCell(){return new d.CellData}}},3785:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=u(511);a.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,c){if(!(d<0||d>=this._line.length))return c?(this._line.loadCell(d,c),c):this._line.loadCell(d,new h.CellData)}translateToString(d,c,S){return this._line.translateToString(d,c,S)}}},8285:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=u(8771),d=u(8460),c=u(844);class S extends c.Disposable{constructor(k){super(),this._core=k,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=S},7975:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,h){return this._core.registerCsiHandler(u,(d=>h(d.toArray())))}addCsiHandler(u,h){return this.registerCsiHandler(u,h)}registerDcsHandler(u,h){return this._core.registerDcsHandler(u,((d,c)=>h(d,c.toArray())))}addDcsHandler(u,h){return this.registerDcsHandler(u,h)}registerEscHandler(u,h){return this._core.registerEscHandler(u,h)}addEscHandler(u,h){return this.registerEscHandler(u,h)}registerOscHandler(u,h){return this._core.registerOscHandler(u,h)}addOscHandler(u,h){return this.registerOscHandler(u,h)}}},7090:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(f,a,u){var h=this&&this.__decorate||function(y,_,g,v){var A,M=arguments.length,D=M<3?_:v===null?v=Object.getOwnPropertyDescriptor(_,g):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,_,g,v);else for(var T=y.length-1;T>=0;T--)(A=y[T])&&(D=(M<3?A(D):M>3?A(_,g,D):A(_,g))||D);return M>3&&D&&Object.defineProperty(_,g,D),D},d=this&&this.__param||function(y,_){return function(g,v){_(g,v,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const c=u(8460),S=u(844),w=u(5295),k=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends S.Disposable{get buffer(){return this.buffers.active}constructor(y){super(),this.isUserScrolling=!1,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(y.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(y.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(y,this))}resize(y,_){this.cols=y,this.rows=_,this.buffers.resize(y,_),this._onResize.fire({cols:y,rows:_})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(y,_=!1){const g=this.buffer;let v;v=this._cachedBlankLine,v&&v.length===this.cols&&v.getFg(0)===y.fg&&v.getBg(0)===y.bg||(v=g.getBlankLine(y,_),this._cachedBlankLine=v),v.isWrapped=_;const A=g.ybase+g.scrollTop,M=g.ybase+g.scrollBottom;if(g.scrollTop===0){const D=g.lines.isFull;M===g.lines.length-1?D?g.lines.recycle().copyFrom(v):g.lines.push(v.clone()):g.lines.splice(M+1,0,v.clone()),D?this.isUserScrolling&&(g.ydisp=Math.max(g.ydisp-1,0)):(g.ybase++,this.isUserScrolling||g.ydisp++)}else{const D=M-A+1;g.lines.shiftElements(A+1,D-1,-1),g.lines.set(M,v.clone())}this.isUserScrolling||(g.ydisp=g.ybase),this._onScroll.fire(g.ydisp)}scrollLines(y,_,g){const v=this.buffer;if(y<0){if(v.ydisp===0)return;this.isUserScrolling=!0}else y+v.ydisp>=v.ybase&&(this.isUserScrolling=!1);const A=v.ydisp;v.ydisp=Math.max(Math.min(v.ydisp+y,v.ybase),0),A!==v.ydisp&&(_||this._onScroll.fire(v.ydisp))}};a.BufferService=x=h([d(0,k.IOptionsService)],x)},7994:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,h){this._charsets[u]=h,this.glevel===u&&(this.charset=h)}}},1753:function(f,a,u){var h=this&&this.__decorate||function(v,A,M,D){var T,E=arguments.length,R=E<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(v,A,M,D);else for(var B=v.length-1;B>=0;B--)(T=v[B])&&(R=(E<3?T(R):E>3?T(A,M,R):T(A,M))||R);return E>3&&R&&Object.defineProperty(A,M,R),R},d=this&&this.__param||function(v,A){return function(M,D){A(M,D,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const c=u(2585),S=u(8460),w=u(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:v=>v.button!==4&&v.action===1&&(v.ctrl=!1,v.alt=!1,v.shift=!1,!0)},VT200:{events:19,restrict:v=>v.action!==32},DRAG:{events:23,restrict:v=>v.action!==32||v.button!==3},ANY:{events:31,restrict:v=>!0}};function x(v,A){let M=(v.ctrl?16:0)|(v.shift?4:0)|(v.alt?8:0);return v.button===4?(M|=64,M|=v.action):(M|=3&v.button,4&v.button&&(M|=64),8&v.button&&(M|=128),v.action===32?M|=32:v.action!==0||A||(M|=3)),M}const y=String.fromCharCode,_={DEFAULT:v=>{const A=[x(v,!1)+32,v.col+32,v.row+32];return A[0]>255||A[1]>255||A[2]>255?"":`\x1B[M${y(A[0])}${y(A[1])}${y(A[2])}`},SGR:v=>{const A=v.action===0&&v.button!==4?"m":"M";return`\x1B[<${x(v,!0)};${v.col};${v.row}${A}`},SGR_PIXELS:v=>{const A=v.action===0&&v.button!==4?"m":"M";return`\x1B[<${x(v,!0)};${v.x};${v.y}${A}`}};let g=a.CoreMouseService=class extends w.Disposable{constructor(v,A){super(),this._bufferService=v,this._coreService=A,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new S.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const M of Object.keys(k))this.addProtocol(M,k[M]);for(const M of Object.keys(_))this.addEncoding(M,_[M]);this.reset()}addProtocol(v,A){this._protocols[v]=A}addEncoding(v,A){this._encodings[v]=A}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(v){if(!this._protocols[v])throw new Error(`unknown protocol "${v}"`);this._activeProtocol=v,this._onProtocolChange.fire(this._protocols[v].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(v){if(!this._encodings[v])throw new Error(`unknown encoding "${v}"`);this._activeEncoding=v}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(v){if(v.col<0||v.col>=this._bufferService.cols||v.row<0||v.row>=this._bufferService.rows||v.button===4&&v.action===32||v.button===3&&v.action!==32||v.button!==4&&(v.action===2||v.action===3)||(v.col++,v.row++,v.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,v,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(v))return!1;const A=this._encodings[this._activeEncoding](v);return A&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(A):this._coreService.triggerDataEvent(A,!0)),this._lastEvent=v,!0}explainEvents(v){return{down:!!(1&v),up:!!(2&v),drag:!!(4&v),move:!!(8&v),wheel:!!(16&v)}}_equalEvents(v,A,M){if(M){if(v.x!==A.x||v.y!==A.y)return!1}else if(v.col!==A.col||v.row!==A.row)return!1;return v.button===A.button&&v.action===A.action&&v.ctrl===A.ctrl&&v.alt===A.alt&&v.shift===A.shift}};a.CoreMouseService=g=h([d(0,c.IBufferService),d(1,c.ICoreService)],g)},6975:function(f,a,u){var h=this&&this.__decorate||function(g,v,A,M){var D,T=arguments.length,E=T<3?v:M===null?M=Object.getOwnPropertyDescriptor(v,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(g,v,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(E=(T<3?D(E):T>3?D(v,A,E):D(v,A))||E);return T>3&&E&&Object.defineProperty(v,A,E),E},d=this&&this.__param||function(g,v){return function(A,M){v(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const c=u(1439),S=u(8460),w=u(844),k=u(2585),x=Object.freeze({insertMode:!1}),y=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let _=a.CoreService=class extends w.Disposable{constructor(g,v,A){super(),this._bufferService=g,this._logService=v,this._optionsService=A,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new S.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new S.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new S.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new S.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(y)}reset(){this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(y)}triggerDataEvent(g,v=!1){if(this._optionsService.rawOptions.disableStdin)return;const A=this._bufferService.buffer;v&&this._optionsService.rawOptions.scrollOnUserInput&&A.ybase!==A.ydisp&&this._onRequestScrollToBottom.fire(),v&&this._onUserInput.fire(),this._logService.debug(`sending data "${g}"`,(()=>g.split("").map((M=>M.charCodeAt(0))))),this._onData.fire(g)}triggerBinaryEvent(g){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${g}"`,(()=>g.split("").map((v=>v.charCodeAt(0))))),this._onBinary.fire(g))}};a.CoreService=_=h([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],_)},9074:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=u(8055),d=u(8460),c=u(844),S=u(6106);let w=0,k=0;class x extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new S.SortedList((g=>g==null?void 0:g.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,c.toDisposable)((()=>this.reset())))}registerDecoration(g){if(g.marker.isDisposed)return;const v=new y(g);if(v){const A=v.marker.onDispose((()=>v.dispose()));v.onDispose((()=>{v&&(this._decorations.delete(v)&&this._onDecorationRemoved.fire(v),A.dispose())})),this._decorations.insert(v),this._onDecorationRegistered.fire(v)}return v}reset(){for(const g of this._decorations.values())g.dispose();this._decorations.clear()}*getDecorationsAtCell(g,v,A){let M=0,D=0;for(const T of this._decorations.getKeyIterator(v))M=T.options.x??0,D=M+(T.options.width??1),g>=M&&g<D&&(!A||(T.options.layer??"bottom")===A)&&(yield T)}forEachDecorationAtCell(g,v,A,M){this._decorations.forEachByKey(v,(D=>{w=D.options.x??0,k=w+(D.options.width??1),g>=w&&g<k&&(!A||(D.options.layer??"bottom")===A)&&M(D)}))}}a.DecorationService=x;class y extends c.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(g){super(),this.options=g,this.onRenderEmitter=this.register(new d.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=g.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=u(2585),d=u(8343);class c{constructor(...w){this._entries=new Map;for(const[k,x]of w)this.set(k,x)}set(w,k){const x=this._entries.get(w);return this._entries.set(w,k),x}forEach(w){for(const[k,x]of this._entries.entries())w(k,x)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}a.ServiceCollection=c,a.InstantiationService=class{constructor(){this._services=new c,this._services.set(h.IInstantiationService,this)}setService(S,w){this._services.set(S,w)}getService(S){return this._services.get(S)}createInstance(S,...w){const k=(0,d.getServiceDependencies)(S).sort(((_,g)=>_.index-g.index)),x=[];for(const _ of k){const g=this._services.get(_.id);if(!g)throw new Error(`[createInstance] ${S.name} depends on UNKNOWN service ${_.id}.`);x.push(g)}const y=k.length>0?k[0].index:w.length;if(w.length!==y)throw new Error(`[createInstance] First service dependency of ${S.name} at position ${y+1} conflicts with ${w.length} static arguments`);return new S(...w,...x)}}},7866:function(f,a,u){var h=this&&this.__decorate||function(y,_,g,v){var A,M=arguments.length,D=M<3?_:v===null?v=Object.getOwnPropertyDescriptor(_,g):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,_,g,v);else for(var T=y.length-1;T>=0;T--)(A=y[T])&&(D=(M<3?A(D):M>3?A(_,g,D):A(_,g))||D);return M>3&&D&&Object.defineProperty(_,g,D),D},d=this&&this.__param||function(y,_){return function(g,v){_(g,v,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const c=u(844),S=u(2585),w={trace:S.LogLevelEnum.TRACE,debug:S.LogLevelEnum.DEBUG,info:S.LogLevelEnum.INFO,warn:S.LogLevelEnum.WARN,error:S.LogLevelEnum.ERROR,off:S.LogLevelEnum.OFF};let k,x=a.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(y){super(),this._optionsService=y,this._logLevel=S.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),k=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(y){for(let _=0;_<y.length;_++)typeof y[_]=="function"&&(y[_]=y[_]())}_log(y,_,g){this._evalLazyOptionalParams(g),y.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...g)}trace(y,..._){var g;this._logLevel<=S.LogLevelEnum.TRACE&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.trace.bind(this._optionsService.options.logger))??console.log,y,_)}debug(y,..._){var g;this._logLevel<=S.LogLevelEnum.DEBUG&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.debug.bind(this._optionsService.options.logger))??console.log,y,_)}info(y,..._){var g;this._logLevel<=S.LogLevelEnum.INFO&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.info.bind(this._optionsService.options.logger))??console.info,y,_)}warn(y,..._){var g;this._logLevel<=S.LogLevelEnum.WARN&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.warn.bind(this._optionsService.options.logger))??console.warn,y,_)}error(y,..._){var g;this._logLevel<=S.LogLevelEnum.ERROR&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.error.bind(this._optionsService.options.logger))??console.error,y,_)}};a.LogService=x=h([d(0,S.IOptionsService)],x),a.setTraceLogger=function(y){k=y},a.traceCall=function(y,_,g){if(typeof g.value!="function")throw new Error("not supported");const v=g.value;g.value=function(...A){if(k.logLevel!==S.LogLevelEnum.TRACE)return v.apply(this,A);k.trace(`GlyphRenderer#${v.name}(${A.map((D=>JSON.stringify(D))).join(", ")})`);const M=v.apply(this,A);return k.trace(`GlyphRenderer#${v.name} return`,M),M}}},7302:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=u(8460),d=u(844),c=u(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:c.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const S=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends d.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const y={...a.DEFAULT_OPTIONS};for(const _ in x)if(_ in y)try{const g=x[_];y[_]=this._sanitizeAndValidateOption(_,g)}catch(g){console.error(g)}this.rawOptions=y,this.options={...y},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,y){return this.onOptionChange((_=>{_===x&&y(this.rawOptions[x])}))}onMultipleOptionChange(x,y){return this.onOptionChange((_=>{x.indexOf(_)!==-1&&y()}))}_setupOptions(){const x=_=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);return this.rawOptions[_]},y=(_,g)=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);g=this._sanitizeAndValidateOption(_,g),this.rawOptions[_]!==g&&(this.rawOptions[_]=g,this._onOptionChange.fire(_))};for(const _ in this.rawOptions){const g={get:x.bind(this,_),set:y.bind(this,_)};Object.defineProperty(this.options,_,g)}}_sanitizeAndValidateOption(x,y){switch(x){case"cursorStyle":if(y||(y=a.DEFAULT_OPTIONS[x]),!(function(_){return _==="block"||_==="underline"||_==="bar"})(y))throw new Error(`"${y}" is not a valid value for ${x}`);break;case"wordSeparator":y||(y=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof y=="number"&&1<=y&&y<=1e3)break;y=S.includes(y)?y:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":y=Math.floor(y);case"lineHeight":case"tabStopWidth":if(y<1)throw new Error(`${x} cannot be less than 1, value: ${y}`);break;case"minimumContrastRatio":y=Math.max(1,Math.min(21,Math.round(10*y)/10));break;case"scrollback":if((y=Math.min(y,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${y}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(y<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${y}`);break;case"rows":case"cols":if(!y&&y!==0)throw new Error(`${x} must be numeric, value: ${y}`);break;case"windowsPty":y=y??{}}return y}}a.OptionsService=w},2660:function(f,a,u){var h=this&&this.__decorate||function(w,k,x,y){var _,g=arguments.length,v=g<3?k:y===null?y=Object.getOwnPropertyDescriptor(k,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(w,k,x,y);else for(var A=w.length-1;A>=0;A--)(_=w[A])&&(v=(g<3?_(v):g>3?_(k,x,v):_(k,x))||v);return g>3&&v&&Object.defineProperty(k,x,v),v},d=this&&this.__param||function(w,k){return function(x,y){k(x,y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const c=u(2585);let S=a.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const k=this._bufferService.buffer;if(w.id===void 0){const A=k.addMarker(k.ybase+k.y),M={data:w,id:this._nextId++,lines:[A]};return A.onDispose((()=>this._removeMarkerFromLink(M,A))),this._dataByLinkId.set(M.id,M),M.id}const x=w,y=this._getEntryIdKey(x),_=this._entriesWithId.get(y);if(_)return this.addLineToLink(_.id,k.ybase+k.y),_.id;const g=k.addMarker(k.ybase+k.y),v={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(v,g))),this._entriesWithId.set(v.key,v),this._dataByLinkId.set(v.id,v),v.id}addLineToLink(w,k){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((y=>y.line!==k))){const y=this._bufferService.buffer.addMarker(k);x.lines.push(y),y.onDispose((()=>this._removeMarkerFromLink(x,y)))}}getLinkData(w){var k;return(k=this._dataByLinkId.get(w))==null?void 0:k.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,k){const x=w.lines.indexOf(k);x!==-1&&(w.lines.splice(x,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};a.OscLinkService=S=h([d(0,c.IBufferService)],S)},8343:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",h="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(d){return d[h]||[]},a.createDecorator=function(d){if(a.serviceRegistry.has(d))return a.serviceRegistry.get(d);const c=function(S,w,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,y,_){y[u]===y?y[h].push({id:x,index:_}):(y[h]=[{id:x,index:_}],y[u]=y)})(c,S,k)};return c.toString=()=>d,a.serviceRegistry.set(d,c),c}},2585:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const h=u(8343);var d;a.IBufferService=(0,h.createDecorator)("BufferService"),a.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),a.ICoreService=(0,h.createDecorator)("CoreService"),a.ICharsetService=(0,h.createDecorator)("CharsetService"),a.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(function(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.OFF=5]="OFF"})(d||(a.LogLevelEnum=d={})),a.ILogService=(0,h.createDecorator)("LogService"),a.IOptionsService=(0,h.createDecorator)("OptionsService"),a.IOscLinkService=(0,h.createDecorator)("OscLinkService"),a.IUnicodeService=(0,h.createDecorator)("UnicodeService"),a.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(f,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=u(8460),d=u(225);class c{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,k,x=!1){return(16777215&w)<<3|(3&k)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const w=new d.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let k=0,x=0;const y=w.length;for(let _=0;_<y;++_){let g=w.charCodeAt(_);if(55296<=g&&g<=56319){if(++_>=y)return k+this.wcwidth(g);const M=w.charCodeAt(_);56320<=M&&M<=57343?g=1024*(g-55296)+M-56320+65536:k+=this.wcwidth(M)}const v=this.charProperties(g,x);let A=c.extractWidth(v);c.extractShouldJoin(v)&&(A-=c.extractWidth(x)),k+=A,x=v}return k}charProperties(w,k){return this._activeProvider.charProperties(w,k)}}a.UnicodeService=c}},o={};function m(f){var a=o[f];if(a!==void 0)return a.exports;var u=o[f]={exports:{}};return s[f].call(u.exports,u,u.exports,m),u.exports}var b={};return(()=>{var f=b;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const a=m(9042),u=m(3236),h=m(844),d=m(5741),c=m(8285),S=m(7975),w=m(7090),k=["cols","rows"];class x extends h.Disposable{constructor(_){super(),this._core=this.register(new u.Terminal(_)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const g=A=>this._core.options[A],v=(A,M)=>{this._checkReadonlyOptions(A),this._core.options[A]=M};for(const A in this._core.options){const M={get:g.bind(this,A),set:v.bind(this,A)};Object.defineProperty(this._publicOptions,A,M)}}_checkReadonlyOptions(_){if(k.includes(_))throw new Error(`Option "${_}" 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 S.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.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 c.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const _=this._core.coreService.decPrivateModes;let g="none";switch(this._core.coreMouseService.activeProtocol){case"X10":g="x10";break;case"VT200":g="vt200";break;case"DRAG":g="drag";break;case"ANY":g="any"}return{applicationCursorKeysMode:_.applicationCursorKeys,applicationKeypadMode:_.applicationKeypad,bracketedPasteMode:_.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:g,originMode:_.origin,reverseWraparoundMode:_.reverseWraparound,sendFocusMode:_.sendFocus,wraparoundMode:_.wraparound}}get options(){return this._publicOptions}set options(_){for(const g in _)this._publicOptions[g]=_[g]}blur(){this._core.blur()}focus(){this._core.focus()}input(_,g=!0){this._core.input(_,g)}resize(_,g){this._verifyIntegers(_,g),this._core.resize(_,g)}open(_){this._core.open(_)}attachCustomKeyEventHandler(_){this._core.attachCustomKeyEventHandler(_)}attachCustomWheelEventHandler(_){this._core.attachCustomWheelEventHandler(_)}registerLinkProvider(_){return this._core.registerLinkProvider(_)}registerCharacterJoiner(_){return this._checkProposedApi(),this._core.registerCharacterJoiner(_)}deregisterCharacterJoiner(_){this._checkProposedApi(),this._core.deregisterCharacterJoiner(_)}registerMarker(_=0){return this._verifyIntegers(_),this._core.registerMarker(_)}registerDecoration(_){return this._checkProposedApi(),this._verifyPositiveIntegers(_.x??0,_.width??0,_.height??0),this._core.registerDecoration(_)}hasSelection(){return this._core.hasSelection()}select(_,g,v){this._verifyIntegers(_,g,v),this._core.select(_,g,v)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(_,g){this._verifyIntegers(_,g),this._core.selectLines(_,g)}dispose(){super.dispose()}scrollLines(_){this._verifyIntegers(_),this._core.scrollLines(_)}scrollPages(_){this._verifyIntegers(_),this._core.scrollPages(_)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(_){this._verifyIntegers(_),this._core.scrollToLine(_)}clear(){this._core.clear()}write(_,g){this._core.write(_,g)}writeln(_,g){this._core.write(_),this._core.write(`\r
|
|
59
|
+
`,g)}paste(_){this._core.paste(_)}refresh(_,g){this._verifyIntegers(_,g),this._core.refresh(_,g)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(_){this._addonManager.loadAddon(this,_)}static get strings(){return a}_verifyIntegers(..._){for(const g of _)if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(..._){for(const g of _)if(g&&(g===1/0||isNaN(g)||g%1!=0||g<0))throw new Error("This API only accepts positive integers")}}f.Terminal=x})(),b})()))})(Ju)),Ju.exports}var i1=n1();class r1{constructor(r,s){Gp(this,"socket");const o=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${o}//${window.location.host}/ws/terminal/${encodeURIComponent(r)}`),this.socket.addEventListener("message",m=>{var f,a;const b=JSON.parse(m.data);b.type==="output"?s.onOutput(b.data):b.type==="error"?(f=s.onError)==null||f.call(s,b.message):(a=s.onStatus)==null||a.call(s,b)}),this.socket.addEventListener("error",()=>{var m;(m=s.onError)==null||m.call(s,"Terminal connection failed.")})}sendInput(r){this.send({type:"input",data:r})}resize(r,s){this.send({type:"resize",cols:r,rows:s})}close(){this.socket.close()}send(r){const s=JSON.stringify(r);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(s);return}this.socket.addEventListener("open",()=>this.socket.send(s),{once:!0})}}function sg({sessionId:n,active:r=!0,onEvent:s}){const o=fe.useRef(null),m=fe.useRef(null),b=fe.useRef(null),f=fe.useRef(null),a=fe.useRef(r),u=fe.useRef(s);function h(d={}){const c=o.current,S=m.current,w=b.current,k=f.current;if(!c||!S||!w||!k)return!1;const x=c.getBoundingClientRect();return x.width<s1||x.height<l1||(w.fit(),k.cols<a1||k.rows<o1)?!1:(S.resize(k.cols,k.rows),d.focus&&k.focus(),!0)}return fe.useEffect(()=>{u.current=s},[s]),fe.useEffect(()=>{a.current=r},[r]),fe.useEffect(()=>{if(!o.current)return;const d=new i1.Terminal({cursorBlink:!0,convertEol:!0,drawBoldTextInBrightColors:!0,fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:13,fontWeight:"400",fontWeightBold:"700",lineHeight:1.35,macOptionIsMeta:!0,scrollback:1e4,theme:u1}),c=new J0.FitAddon;d.loadAddon(c),d.loadAddon(new t1.WebLinksAddon),d.open(o.current),f.current=d,b.current=c;const S=new r1(n,{onOutput(v){d.write(v)},onStatus(v){var A;(A=u.current)==null||A.call(u,v.type)},onError(v){var A;d.writeln(`\r
|
|
60
|
+
[VCM] ${v}`),(A=u.current)==null||A.call(u,v)}});m.current=S;const w=d.onData(v=>{S.sendInput(v)});let k=0,x=0,y=0;const _=()=>{k&&window.cancelAnimationFrame(k),k=window.requestAnimationFrame(()=>{k=0,h({focus:a.current})})},g=new ResizeObserver(()=>{_()});return g.observe(o.current),x=window.requestAnimationFrame(_),y=window.setTimeout(_,120),()=>{k&&window.cancelAnimationFrame(k),x&&window.cancelAnimationFrame(x),y&&window.clearTimeout(y),g.disconnect(),w.dispose(),S.close(),d.dispose(),m.current=null,f.current=null,b.current=null}},[n]),fe.useEffect(()=>{if(!r)return;const d=[],c=[];return d.push(window.requestAnimationFrame(()=>{h({focus:!0}),d.push(window.requestAnimationFrame(()=>h({focus:!0})))})),c.push(window.setTimeout(()=>h({focus:!0}),160)),c.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const S of d)window.cancelAnimationFrame(S);for(const S of c)window.clearTimeout(S)}},[r]),fe.useEffect(()=>{const d=()=>{a.current&&h()};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),N.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var d;return(d=f.current)==null?void 0:d.focus()}})}const s1=160,l1=80,a1=20,o1=5,u1={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"};function Zi({status:n}){return N.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function c1({status:n,bootstrapStatus:r,applyResult:s,busy:o=!1,onRefresh:m,onApply:b,onStartBootstrap:f}){const[a,u]=fe.useState(!1),h=r==null?void 0:r.session;return fe.useEffect(()=>{h||u(!1)},[h]),n?N.jsxs("section",{className:"harness-panel",children:[N.jsxs("div",{className:"harness-stage",children:[N.jsxs("div",{className:"harness-panel-header",children:[N.jsxs("div",{children:[N.jsx("strong",{children:"Fixed install"}),N.jsx("p",{className:"muted",children:n.needsApply?`${n.plannedChanges.length} planned changes`:"up to date"})]}),N.jsxs("div",{className:"harness-actions",children:[N.jsx("button",{type:"button",disabled:o,onClick:()=>void m(),children:"Refresh"}),N.jsx("button",{type:"button",disabled:o||!n.needsApply,onClick:()=>void b(),children:"Install / Update"})]})]}),N.jsx("ol",{className:"harness-file-list",children:n.files.map(d=>N.jsxs("li",{children:[N.jsx("span",{children:d.path}),N.jsx(Zi,{status:d.action})]},d.path))})]}),N.jsxs("div",{className:"harness-stage",children:[N.jsxs("div",{className:"harness-panel-header",children:[N.jsxs("div",{children:[N.jsx("strong",{children:"Bootstrap"}),N.jsx("p",{className:"muted",children:r?h1(r.status):"not loaded"})]}),N.jsx("div",{className:"harness-actions",children:N.jsx("button",{type:"button",disabled:o||!(r!=null&&r.canStart),onClick:()=>{u(!0),f()},children:"Run Bootstrap"})})]}),r?N.jsxs(N.Fragment,{children:[N.jsx("ol",{className:"harness-file-list",children:r.checks.map(d=>N.jsxs("li",{title:d.detail??d.path??"",children:[N.jsx("span",{children:d.path?`${d.label}: ${d.path}`:d.label}),N.jsx(Zi,{status:d.status})]},d.key))}),h?N.jsxs("div",{className:"harness-bootstrap-session",children:[N.jsxs("div",{children:[N.jsx("span",{children:h.command}),N.jsx(Zi,{status:h.status})]}),N.jsx("button",{type:"button",onClick:()=>u(!0),children:"Open Terminal"})]}):null]}):N.jsx("p",{className:"muted",children:"Refresh harness status to load bootstrap checks."})]}),n.plannedChanges.length>0?N.jsxs("div",{className:"harness-changes",children:[N.jsx("h3",{children:"Planned Changes"}),N.jsx("ul",{children:n.plannedChanges.map(d=>N.jsxs("li",{children:[N.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))})]}):null,s?N.jsxs("div",{className:"harness-result",children:[N.jsx("p",{children:s.message}),s.changedFiles.length>0?N.jsx("ul",{children:s.changedFiles.map(d=>N.jsxs("li",{children:[N.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))}):null]}):null,n.warnings.length>0?N.jsx("ul",{className:"warnings",children:n.warnings.map(d=>N.jsx("li",{children:d},d))}):null,r!=null&&r.warnings.length?N.jsx("ul",{className:"warnings",children:r.warnings.map(d=>N.jsx("li",{children:d},d))}):null,a&&h?N.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:N.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[N.jsxs("header",{className:"harness-bootstrap-modal-header",children:[N.jsxs("div",{children:[N.jsx("strong",{children:"Harness Bootstrap Terminal"}),N.jsx("p",{className:"muted",children:h.command})]}),N.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[N.jsx(Zi,{status:h.status}),N.jsx("button",{type:"button",onClick:()=>u(!1),children:"Close"})]})]}),N.jsx("div",{className:"harness-bootstrap-terminal",children:N.jsx(sg,{sessionId:h.id,active:a})})]})}):null]}):null}function h1(n){return n.replaceAll("_"," ")}function Mc(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function f1(n,r=6){const s=[...n].sort(m1).map((m,b)=>({message:m,sequence:b+1}));return[...r===null?s:s.slice(-r)].sort((m,b)=>b.sequence-m.sequence)}function d1({messages:n,orchestration:r,busy:s,maxMessages:o=6,showControls:m=!0,showHeader:b=!0,onModeChange:f,onMarkAllDone:a}){const[u,h]=fe.useState(null),d=Mc(n),c=(r==null?void 0:r.mode)??"auto",S=f1(n,o);async function w(k){await g1(k.body),h(k.id),window.setTimeout(()=>h(x=>x===k.id?null:x),1200)}return N.jsxs("section",{className:"message-panel",children:[b?N.jsxs("div",{className:"message-panel-header",children:[N.jsxs("div",{children:[N.jsx("h2",{children:"Messages"}),N.jsxs("p",{className:"muted",children:[d.total," total / ",d.accepted," accepted"]})]}),m&&f?N.jsx("div",{className:"message-controls",children:N.jsxs("label",{className:"message-mode-toggle",children:[N.jsx("input",{type:"checkbox",checked:c==="auto",disabled:s,onChange:k=>f(k.target.checked?"auto":"manual")}),N.jsx("span",{children:"Auto orchestration"})]})}):null,m&&a?N.jsx("button",{type:"button",disabled:s,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?N.jsx("p",{className:"muted",children:"No role messages yet."}):N.jsx("ol",{className:"message-list",children:S.map(({message:k,sequence:x})=>N.jsxs("li",{className:"message-item",children:[N.jsxs("div",{className:"message-item-main",children:[N.jsxs("div",{className:"message-meta",children:[N.jsxs("span",{className:"message-sequence",children:["#",x]}),N.jsx("time",{dateTime:Ca(k),children:p1(Ca(k))}),N.jsxs("strong",{children:[k.fromRole," ","->"," ",k.toRole]}),N.jsx("span",{children:k.type})]}),N.jsx("p",{children:k.body}),k.failureReason?N.jsx("span",{className:"message-reason",children:k.failureReason}):null,k.bodyPath?N.jsx("span",{className:"message-path",children:k.bodyPath}):null]}),N.jsx("div",{className:"message-actions",children:N.jsx("button",{type:"button",disabled:s,onClick:()=>void w(k),children:u===k.id?"Copied":"Copy"})})]},k.id))})]})}function p1(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Ca(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function m1(n,r){const s=Ca(n).localeCompare(Ca(r));if(s!==0)return s;const o=n.createdAt.localeCompare(r.createdAt);return o!==0?o:n.id.localeCompare(r.id)}async function g1(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function _1({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:o}){const[m,b]=fe.useState(n);fe.useEffect(()=>{n&&b(n)},[n]);async function f(a){a.preventDefault(),await o(m)}return N.jsx("form",{className:"repo-connect",onSubmit:f,children:N.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[N.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:m,onChange:a=>b(a.target.value),placeholder:"/path/to/repo"}),r.length>0?N.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&b(a.target.value)},children:[N.jsx("option",{value:"",children:"Recent"}),r.map(a=>N.jsx("option",{value:a,children:a},a))]}):null,N.jsx("button",{type:"submit",disabled:s||!m.trim(),children:"Connect"})]})})}function v1({tasks:n,activeTaskSlug:r,onSelect:s}){return N.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>N.jsxs("button",{className:o.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(o.taskSlug),children:[N.jsx("span",{children:o.title||o.taskSlug}),N.jsx(Zi,{status:o.status})]},o.taskSlug))})}function y1({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:o,messages:m,orchestration:b,events:f,roundState:a,harnessStatus:u,harnessBootstrapStatus:h,harnessApplyResult:d,gatewayStatus:c,gatewayQrLogin:S,gatewayQrCheck:w,busy:k,onConnect:x,onRefreshConnectedRepository:y,onPullConnectedRepository:_,onRefreshHarness:g,onApplyHarness:v,onStartHarnessBootstrap:A,onRefreshGateway:M,onGatewayEnabledChange:D,onGatewayTranslationChange:T,onStartGatewayQrLogin:E,onResetGatewayBinding:R,onCreateTask:B,onSelectTask:H,themeMode:F,onThemeModeChange:q,flowPauseAlerts:Y,onFlowPauseAlertsChange:K,permissionRequestMode:$,onPermissionRequestModeChange:X,launchTemplate:Z,canSaveLaunchTemplate:z,canOneClickStart:O,onSaveLaunchTemplate:j,onOneClickStart:V,onTryFlowPauseAlert:I,onMarkAllMessagesDone:ie,onDeleteMessageHistory:ge}){const[ee,G]=fe.useState(""),[U,ne]=fe.useState(!0),[te,ve]=fe.useState(!1),[Se,Me]=fe.useState(!1),[Le,Pe]=fe.useState(()=>o?null:"repository-path"),Je=Mc(m),de=ee.trim(),Ie=s.find(ce=>ce.taskSlug===o)??null;fe.useEffect(()=>{Pe(ce=>o&&ce==="repository-path"?null:!o&&ce===null?"repository-path":ce)},[o]);function Re(ce,zt){Pe(zt?ce:null)}async function ut(ce){ce.preventDefault(),await B({taskSlug:de,createWorktree:U}),G(""),ne(!0)}return N.jsxs("div",{className:"project-dashboard",children:[N.jsx("header",{className:"brand-header",children:N.jsx("strong",{children:"VibeCodingMaster"})}),N.jsx(Xi,{title:"Repository Path",open:Le==="repository-path",onOpenChange:ce=>Re("repository-path",ce),children:N.jsx(_1,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:k,onConnect:x})}),n?N.jsx(Xi,{title:"Connected Repository",open:Le==="connected-repository",onOpenChange:ce=>{Re("connected-repository",ce),ce&&y()},children:N.jsx(C1,{activeTask:Ie,busy:k,project:n,onPull:_})}):null,N.jsx(Xi,{title:"Settings",open:Le==="settings",onOpenChange:ce=>Re("settings",ce),children:N.jsxs("div",{className:"sidebar-settings",children:[N.jsxs("button",{"aria-label":`Theme mode: ${um(F)}`,className:"settings-toggle theme-mode-toggle",disabled:k,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>q(k1(F)),children:[N.jsx("span",{children:"Theme"}),N.jsx("span",{children:um(F)})]}),N.jsxs("button",{"aria-pressed":!(c!=null&&c.enabled)&&Y,className:!(c!=null&&c.enabled)&&Y?"settings-toggle is-active":"settings-toggle",disabled:k||(c==null?void 0:c.enabled),title:c!=null&&c.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:()=>K(!Y),children:[N.jsx("span",{children:"Flow pause alert"}),N.jsx("span",{children:c!=null&&c.enabled?"off":Y?"on":"off"})]}),N.jsxs("button",{className:"settings-toggle",disabled:k||(c==null?void 0:c.enabled),title:c!=null&&c.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:I,children:[N.jsx("span",{children:"Try alert"}),N.jsx("span",{children:"test"})]}),N.jsxs("label",{className:"settings-select-row",children:[N.jsx("span",{children:"Permission requests"}),N.jsxs("select",{value:$,disabled:k,onChange:ce=>X(ce.target.value),children:[N.jsx("option",{value:"off",children:"off"}),N.jsx("option",{value:"allowAll",children:"allow all"})]})]}),N.jsxs("button",{className:"settings-toggle",disabled:k||!z,title:"Save the current four role launch settings",type:"button",onClick:j,children:[N.jsx("span",{children:"Save launch template"}),N.jsx("span",{children:z?"ready":"needs 4 sessions"})]}),O?N.jsxs("button",{className:"settings-toggle is-active",disabled:k,title:S1(Z),type:"button",onClick:V,children:[N.jsx("span",{children:"One-click start"}),N.jsx("span",{children:lg(Z)})]}):null,o?N.jsxs(N.Fragment,{children:[N.jsxs("button",{type:"button",onClick:()=>ve(!0),children:[N.jsx("span",{children:"Messages"}),N.jsxs("span",{className:"muted",children:[Je.total," total"]})]}),N.jsxs("button",{type:"button",onClick:()=>Me(!0),children:[N.jsx("span",{children:"Events"}),N.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),N.jsx(Xi,{title:"Gateway",open:Le==="gateway",onOpenChange:ce=>{Re("gateway",ce),ce&&M()},children:N.jsx(b1,{busy:k,qrCheck:w,qrLogin:S,status:c,onEnabledChange:D,onResetBinding:R,onStartQrLogin:E,onTranslationChange:T})}),n?N.jsx(Xi,{title:"VCM Harness",open:Le==="vcm-harness",onOpenChange:ce=>Re("vcm-harness",ce),children:N.jsx(c1,{status:u,bootstrapStatus:h,applyResult:d,busy:k,onRefresh:g,onApply:v,onStartBootstrap:A})}):null,n?N.jsx(Xi,{title:"New Task",open:Le==="new-task",onOpenChange:ce=>Re("new-task",ce),children:N.jsx("div",{className:"task-create",children:N.jsxs("form",{onSubmit:ut,children:[N.jsx("input",{value:ee,onChange:ce=>G(ce.target.value),placeholder:"task name"}),N.jsxs("label",{className:"task-create-option",children:[N.jsx("input",{type:"checkbox",checked:U,onChange:ce=>ne(ce.target.checked)}),N.jsx("span",{children:"Create worktree and branch"})]}),U?N.jsxs("div",{className:"task-create-preview",children:[N.jsxs("small",{children:["branch: ",de?`feature/${de}`:"feature/<task>"]}),N.jsxs("small",{children:["worktree: ",de?`.claude/worktrees/${de}`:".claude/worktrees/<task>"]})]}):N.jsx("div",{className:"task-create-preview",children:N.jsx("small",{children:"uses current repository path and current branch"})}),N.jsx("button",{type:"submit",disabled:k||!de,children:"Create"})]})})}):null,s.length>0?N.jsx(Xi,{title:"Tasks",open:Le==="tasks",onOpenChange:ce=>Re("tasks",ce),children:N.jsx(v1,{tasks:s,activeTaskSlug:o,onSelect:H})}):null,n&&Ie?N.jsx(E1,{task:Ie,roundState:a}):null,te?N.jsx(T1,{busy:k,messages:m,orchestration:b,onClose:()=>ve(!1),onMarkAllDone:()=>{o&&ie(o)},onDeleteMessageHistory:()=>{o&&ge(o)}}):null,Se?N.jsx(A1,{events:f,onClose:()=>Me(!1)}):null]})}function lg(n){return[n.autoOrchestration?"auto":"manual",n.translationEnabled?"tx":"no tx"].join(" + ")}function S1(n){const r=Object.entries(n.roles).map(([s,o])=>`${s}: ${o.permissionMode} / ${o.model}`).join("; ");return`Launch template: ${lg(n)}; ${r}`}function b1({busy:n,onEnabledChange:r,onResetBinding:s,onStartQrLogin:o,onTranslationChange:m,qrCheck:b,qrLogin:f,status:a}){const u=!!(a!=null&&a.binding.tokenConfigured),h=!!(a!=null&&a.binding.tokenConfigured);return N.jsxs("div",{className:"gateway-panel",children:[N.jsxs("div",{className:"gateway-actions",children:[N.jsxs("button",{"aria-pressed":!!(a!=null&&a.enabled),className:a!=null&&a.enabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a||!a.enabled&&!u,title:u?"Enable or disable PM messages and task-changing Gateway commands":"Scan and confirm iLink login first",type:"button",onClick:()=>a?r(!a.enabled):void 0,children:[N.jsx("span",{children:"Gateway"}),N.jsx("span",{children:a!=null&&a.enabled?"on":"off"})]}),N.jsxs("button",{"aria-pressed":!!(a!=null&&a.translationEnabled),className:a!=null&&a.translationEnabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a,type:"button",onClick:()=>a?m(!a.translationEnabled):void 0,children:[N.jsx("span",{children:"Translation"}),N.jsx("span",{children:a!=null&&a.translationEnabled?"on":"off"})]}),h?N.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:s,children:"Reset Binding"}):N.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),f?N.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,b?N.jsxs("p",{className:"muted",children:["QR status: ",b.status,b.message?` · ${b.message}`:""]}):null]})}function C1({activeTask:n,busy:r,onPull:s,project:o}){const m=!!(n&&!n.worktreePath&&n.cleanupStatus!=="cleaned"),b=m?`Inline task "${n==null?void 0:n.taskSlug}" uses the base repository.`:o.pullDisabledReason,f=!!(o.canPull&&!m);return N.jsxs("div",{className:"project-summary",children:[N.jsxs("dl",{children:[N.jsxs("div",{children:[N.jsx("dt",{children:"Base path"}),N.jsx("dd",{children:o.repoRoot})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Branch"}),N.jsx("dd",{children:w1(o)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Remote"}),N.jsx("dd",{children:o.upstreamBranch??"no upstream"})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Status"}),N.jsx("dd",{children:x1(o)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Commit"}),N.jsx("dd",{children:o.shortHeadCommit??o.headCommit??"unknown"})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Working tree"}),N.jsx("dd",{children:o.isDirty?"uncommitted changes":"clean"})]})]}),N.jsxs("div",{className:"connected-repo-actions",children:[N.jsx("button",{type:"button",disabled:r||!f,title:b??"Pull latest changes with git pull --ff-only",onClick:()=>void s(),children:"Pull"}),N.jsx("span",{className:"muted",children:o.checkedAt?`checked ${_c(o.checkedAt)}`:"status not refreshed"})]}),b?N.jsx("p",{className:"muted",children:b}):null,o.warnings.length>0?N.jsx("ul",{className:"warnings",children:o.warnings.map(a=>N.jsx("li",{children:a},a))}):null]})}function w1(n){return n.branch||"unknown"}function x1(n){if(!n.upstreamBranch)return"no upstream";const r=n.ahead??0,s=n.behind??0;return r===0&&s===0?"up to date":r>0&&s>0?`ahead ${r}, behind ${s}`:r>0?`ahead ${r}`:`behind ${s}`}function E1({roundState:n,task:r}){var d;const[s,o]=fe.useState(()=>Date.now()),m=!!(n!=null&&n.startedAt&&n.status==="running"),b=om(r.createdAt,s),f=am(n,(n==null?void 0:n.totalCcActiveMs)??0,s),a=m&&n?am(n,n.currentRoundCcActiveMs,s):0,u=m&&(n!=null&&n.startedAt)?om(n.startedAt,s):0,h=((d=r.title)==null?void 0:d.trim())||r.taskSlug;return fe.useEffect(()=>{const c=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(c)},[]),N.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[N.jsxs("div",{className:"task-status-dock-title",children:[N.jsx("strong",{title:h,children:h}),N.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),N.jsxs("dl",{className:"task-status-stats",children:[N.jsxs("div",{children:[N.jsx("dt",{children:"Session start"}),N.jsx("dd",{children:_c(r.createdAt)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Session total"}),N.jsx("dd",{children:ma(b)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Rounds"}),N.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"CC runtime"}),N.jsx("dd",{children:ma(f)})]})]}),m&&n?N.jsxs("div",{className:"current-round-status",children:[N.jsxs("div",{className:"current-round-title",children:[N.jsx("span",{children:"Current Round"}),N.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),N.jsxs("dl",{className:"task-status-stats",children:[N.jsxs("div",{children:[N.jsx("dt",{children:"Started"}),N.jsx("dd",{children:_c(n.startedAt)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Total"}),N.jsx("dd",{children:ma(u)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"CC runtime"}),N.jsx("dd",{children:ma(a)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Turn count"}),N.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function am(n,r,s){if(!(n!=null&&n.activeTurnStartedAt)||n.status!=="running")return r;const o=Date.parse(n.updatedAt);return Number.isFinite(o)?r+Math.max(0,s-o):r}function om(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function _c(n){if(!n)return"-";const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(r)}function ma(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),o=Math.floor(r%3600/60),m=r%60;return s>0?o>0?`${s}h ${o}m`:`${s}h`:o>0?m>0?`${o}m ${m}s`:`${o}m`:`${m}s`}function k1(n){return n==="system"?"light":n==="light"?"dark":"system"}function um(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function A1({events:n,onClose:r}){return N.jsx("div",{className:"modal-backdrop",children:N.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h2",{children:"Events"}),N.jsxs("p",{className:"muted",children:[n.length," total"]})]}),N.jsx("button",{type:"button",onClick:r,children:"Close"})]}),N.jsx(Q0,{events:n,maxEvents:null,showHeader:!1})]})})}function T1({busy:n,messages:r,orchestration:s,onClose:o,onMarkAllDone:m,onDeleteMessageHistory:b}){const f=Mc(r);function a(){window.confirm(["Clear all pending route-file messages?","","Use this only after you manually copied or handled stuck route-file messages.","VCM will clear non-empty handoff message files so Stop-hook orchestration can continue."].join(`
|
|
61
|
+
`))&&m()}function u(){window.confirm([`Delete ${f.total} message histor${f.total===1?"y item":"y items"}?`,"","This removes message history from the Messages panel.","Pending route-file messages are not touched."].join(`
|
|
62
|
+
`))&&b()}return N.jsx("div",{className:"modal-backdrop",children:N.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h2",{children:"Messages"}),N.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),N.jsxs("div",{className:"modal-actions",children:[N.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),N.jsx("button",{type:"button",disabled:n||f.total===0,onClick:u,children:"Delete All"}),N.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),N.jsx(d1,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function Xi({children:n,onOpenChange:r,open:s,title:o}){return N.jsxs("section",{className:"sidebar-section",children:[N.jsxs("button",{"aria-expanded":s,className:"sidebar-section-toggle",type:"button",onClick:()=>{r==null||r(!s)},children:[N.jsx("span",{children:o}),N.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),s?N.jsx("div",{className:"sidebar-section-content",children:n}):null]})}const D1=["architecture-plan","validation-adequacy","final-diff"];function ag(n,r){return n.find(s=>s.role===r)}function R1({activeRole:n,sessions:r,onSelect:s}){return N.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:Ji.map(o=>{const m=ag(r,o.name),b=(m==null?void 0:m.status)==="running"?m.activityStatus??"idle":(m==null?void 0:m.status)??"not_started";return N.jsxs("button",{className:o.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":o.name===n,onClick:()=>s(o.name),children:[N.jsx("span",{children:o.label}),N.jsx(Zi,{status:b})]},o.name)})})}const og=[{value:"default",label:"Default",description:"Account default"},{value:"best",label:"Best",description:"Fable 5 or latest Opus"},{value:"fable",label:"Fable 5",description:"1M context, v2.1.170+"},{value:"opus",label:"Opus",description:"latest Opus"},{value:"opus[1m]",label:"Opus 1M",description:"Force 1M context"},{value:"claude-opus-4-8",label:"Opus 4.8",description:"Current Opus"},{value:"claude-opus-4-8[1m]",label:"Opus 4.8 1M",description:"Opus 4.8 + 1M context"}];function M1({role:n,session:r,permissionMode:s,model:o,busy:m=!1,onPermissionModeChange:b,onModelChange:f,onStart:a,onResume:u,onStop:h,onRestart:d}){const c=(r==null?void 0:r.status)==="running",S=!!(r!=null&&r.claudeSessionId&&!c),w=!c&&!(r!=null&&r.claudeSessionId),k=!!(r&&r.permissionMode!==s),x=(r==null?void 0:r.model)??"default",y=!!(r&&x!==o);return N.jsxs("div",{className:"session-controls",children:[N.jsxs("label",{className:"session-option-field permission-mode-field",children:[N.jsxs("span",{children:["Permission",N.jsx("small",{children:r?`current: ${r.permissionMode}${k?" / next launch":""}`:"applies on start"})]}),N.jsxs("select",{value:s,onChange:_=>b(_.target.value),children:[N.jsx("option",{value:"default",children:"默认"}),N.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),N.jsxs("label",{className:"session-option-field model-field",children:[N.jsxs("span",{children:["Model",N.jsx("small",{children:r?`current: ${L1(x)}${y?" / next launch":""}`:"applies on start"})]}),N.jsx("select",{value:o,onChange:_=>f(_.target.value),children:og.map(_=>N.jsx("option",{value:_.value,children:_.label},_.value))})]}),N.jsxs("div",{className:"session-toolbar",children:[N.jsx("button",{type:"button",disabled:m||!w,onClick:a,children:"Start"}),N.jsx("button",{type:"button",disabled:m||!S,onClick:u,children:"Resume"}),N.jsx("button",{type:"button",disabled:m||!r,onClick:d,children:"Restart"}),N.jsx("button",{type:"button",disabled:m||!r,onClick:h,children:"Stop"})]})]})}function L1(n){var r;return((r=og.find(s=>s.value===n))==null?void 0:r.label)??n}function O1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const B1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,j1={};function cm(n,r){return(j1.jsx?N1:B1).test(n)}const z1=/[ \t\n\f\r]/g;function H1(n){return typeof n=="object"?n.type==="text"?hm(n.value):!1:hm(n)}function hm(n){return n.replace(z1,"")===""}class Js{constructor(r,s,o){this.normal=s,this.property=r,o&&(this.space=o)}}Js.prototype.normal={};Js.prototype.property={};Js.prototype.space=void 0;function ug(n,r){const s={},o={};for(const m of n)Object.assign(s,m.property),Object.assign(o,m.normal);return new Js(s,o,r)}function vc(n){return n.toLowerCase()}class en{constructor(r,s){this.attribute=s,this.property=r}}en.prototype.attribute="";en.prototype.booleanish=!1;en.prototype.boolean=!1;en.prototype.commaOrSpaceSeparated=!1;en.prototype.commaSeparated=!1;en.prototype.defined=!1;en.prototype.mustUseProperty=!1;en.prototype.number=!1;en.prototype.overloadedBoolean=!1;en.prototype.property="";en.prototype.spaceSeparated=!1;en.prototype.space=void 0;let I1=0;const He=tr(),kt=tr(),yc=tr(),ye=tr(),ot=tr(),Gr=tr(),un=tr();function tr(){return 2**++I1}const Sc=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:kt,commaOrSpaceSeparated:un,commaSeparated:Gr,number:ye,overloadedBoolean:yc,spaceSeparated:ot},Symbol.toStringTag,{value:"Module"})),ec=Object.keys(Sc);class Lc extends en{constructor(r,s,o,m){let b=-1;if(super(r,s),fm(this,"space",m),typeof o=="number")for(;++b<ec.length;){const f=ec[b];fm(this,ec[b],(o&Sc[f])===Sc[f])}}}Lc.prototype.defined=!0;function fm(n,r,s){s&&(n[r]=s)}function Kr(n){const r={},s={};for(const[o,m]of Object.entries(n.properties)){const b=new Lc(o,n.transform(n.attributes||{},o),m,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(b.mustUseProperty=!0),r[o]=b,s[vc(o)]=o,s[vc(b.attribute)]=o}return new Js(r,s,n.space)}const cg=Kr({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:ot,ariaCurrent:null,ariaDescribedBy:ot,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:ot,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:ot,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ot,ariaLevel:ye,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:ot,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:ot,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:kt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(n,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function hg(n,r){return r in n?n[r]:r}function fg(n,r){return hg(n,r.toLowerCase())}const U1=Kr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gr,acceptCharset:ot,accessKey:ot,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:ot,autoFocus:He,autoPlay:He,blocking:ot,capture:null,charSet:null,checked:He,cite:null,className:ot,cols:ye,colSpan:null,content:null,contentEditable:kt,controls:He,controlsList:ot,coords:ye|Gr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:yc,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:ot,height:ye,hidden:yc,high:ye,href:null,hrefLang:null,htmlFor:ot,httpEquiv:ot,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:ot,itemRef:ot,itemScope:He,itemType:ot,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:He,optimum:ye,pattern:null,ping:ot,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:ot,required:He,reversed:He,rows:ye,rowSpan:ye,sandbox:ot,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:kt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ot,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:fg}),P1=Kr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:un,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className:ot,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Gr,g2:Gr,glyphName:Gr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ot,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:un,rev:un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:un,requiredFeatures:un,requiredFonts:un,requiredFormats:un,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:un,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hg}),dg=Kr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,r){return"xlink:"+r.slice(5).toLowerCase()}}),pg=Kr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fg}),mg=Kr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),F1={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},q1=/[A-Z]/g,dm=/-[a-z]/g,V1=/^data[-\w.:]+$/i;function G1(n,r){const s=vc(r);let o=r,m=en;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&V1.test(r)){if(r.charAt(4)==="-"){const b=r.slice(5).replace(dm,Y1);o="data"+b.charAt(0).toUpperCase()+b.slice(1)}else{const b=r.slice(4);if(!dm.test(b)){let f=b.replace(q1,$1);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}m=Lc}return new m(o,r)}function $1(n){return"-"+n.toLowerCase()}function Y1(n){return n.charAt(1).toUpperCase()}const K1=ug([cg,U1,dg,pg,mg],"html"),Oc=ug([cg,P1,dg,pg,mg],"svg");function W1(n){return n.join(" ").trim()}var Fr={},tc,pm;function X1(){if(pm)return tc;pm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,m=/^:\s*/,b=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
|
|
63
|
+
`,h="/",d="*",c="",S="comment",w="declaration";function k(y,_){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];_=_||{};var g=1,v=1;function A(Y){var K=Y.match(r);K&&(g+=K.length);var $=Y.lastIndexOf(u);v=~$?Y.length-$:v+Y.length}function M(){var Y={line:g,column:v};return function(K){return K.position=new D(Y),R(),K}}function D(Y){this.start=Y,this.end={line:g,column:v},this.source=_.source}D.prototype.content=y;function T(Y){var K=new Error(_.source+":"+g+":"+v+": "+Y);if(K.reason=Y,K.filename=_.source,K.line=g,K.column=v,K.source=y,!_.silent)throw K}function E(Y){var K=Y.exec(y);if(K){var $=K[0];return A($),y=y.slice($.length),K}}function R(){E(s)}function B(Y){var K;for(Y=Y||[];K=H();)K!==!1&&Y.push(K);return Y}function H(){var Y=M();if(!(h!=y.charAt(0)||d!=y.charAt(1))){for(var K=2;c!=y.charAt(K)&&(d!=y.charAt(K)||h!=y.charAt(K+1));)++K;if(K+=2,c===y.charAt(K-1))return T("End of comment missing");var $=y.slice(2,K-2);return v+=2,A($),y=y.slice(K),v+=2,Y({type:S,comment:$})}}function F(){var Y=M(),K=E(o);if(K){if(H(),!E(m))return T("property missing ':'");var $=E(b),X=Y({type:w,property:x(K[0].replace(n,c)),value:$?x($[0].replace(n,c)):c});return E(f),X}}function q(){var Y=[];B(Y);for(var K;K=F();)K!==!1&&(Y.push(K),B(Y));return Y}return R(),q()}function x(y){return y?y.replace(a,c):c}return tc=k,tc}var mm;function Q1(){if(mm)return Fr;mm=1;var n=Fr&&Fr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.default=s;const r=n(X1());function s(o,m){let b=null;if(!o||typeof o!="string")return b;const f=(0,r.default)(o),a=typeof m=="function";return f.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:d}=u;a?m(h,d,u):d&&(b=b||{},b[h]=d)}),b}return Fr}var Fs={},gm;function Z1(){if(gm)return Fs;gm=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,m=/^-(ms)-/,b=function(h){return!h||s.test(h)||n.test(h)},f=function(h,d){return d.toUpperCase()},a=function(h,d){return"".concat(d,"-")},u=function(h,d){return d===void 0&&(d={}),b(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(m,a):h=h.replace(o,a),h.replace(r,f))};return Fs.camelCase=u,Fs}var qs,_m;function J1(){if(_m)return qs;_m=1;var n=qs&&qs.__importDefault||function(m){return m&&m.__esModule?m:{default:m}},r=n(Q1()),s=Z1();function o(m,b){var f={};return!m||typeof m!="string"||(0,r.default)(m,function(a,u){a&&u&&(f[(0,s.camelCase)(a,b)]=u)}),f}return o.default=o,qs=o,qs}var ey=J1();const ty=ng(ey),gg=_g("end"),Bc=_g("start");function _g(n){return r;function r(s){const o=s&&s.position&&s.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function ny(n){const r=Bc(n),s=gg(n);if(r&&s)return{start:r,end:s}}function Ys(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?vm(n.position):"start"in n||"end"in n?vm(n):"line"in n||"column"in n?bc(n):""}function bc(n){return ym(n&&n.line)+":"+ym(n&&n.column)}function vm(n){return bc(n&&n.start)+"-"+bc(n&&n.end)}function ym(n){return n&&typeof n=="number"?n:1}class qt extends Error{constructor(r,s,o){super(),typeof s=="string"&&(o=s,s=void 0);let m="",b={},f=!1;if(s&&("line"in s&&"column"in s?b={place:s}:"start"in s&&"end"in s?b={place:s}:"type"in s?b={ancestors:[s],place:s.position}:b={...s}),typeof r=="string"?m=r:!b.cause&&r&&(f=!0,m=r.message,b.cause=r),!b.ruleId&&!b.source&&typeof o=="string"){const u=o.indexOf(":");u===-1?b.ruleId=o:(b.source=o.slice(0,u),b.ruleId=o.slice(u+1))}if(!b.place&&b.ancestors&&b.ancestors){const u=b.ancestors[b.ancestors.length-1];u&&(b.place=u.position)}const a=b.place&&"start"in b.place?b.place.start:b.place;this.ancestors=b.ancestors||void 0,this.cause=b.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=m,this.line=a?a.line:void 0,this.name=Ys(b.place)||"1:1",this.place=b.place||void 0,this.reason=this.message,this.ruleId=b.ruleId||void 0,this.source=b.source||void 0,this.stack=f&&b.cause&&typeof b.cause.stack=="string"?b.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qt.prototype.file="";qt.prototype.name="";qt.prototype.reason="";qt.prototype.message="";qt.prototype.stack="";qt.prototype.column=void 0;qt.prototype.line=void 0;qt.prototype.ancestors=void 0;qt.prototype.cause=void 0;qt.prototype.fatal=void 0;qt.prototype.place=void 0;qt.prototype.ruleId=void 0;qt.prototype.source=void 0;const Nc={}.hasOwnProperty,iy=new Map,ry=/[A-Z]/g,sy=new Set(["table","tbody","thead","tfoot","tr"]),ly=new Set(["td","th"]),vg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ay(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=r.filePath||void 0;let o;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=my(s,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=py(s,r.jsx,r.jsxs)}const m={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:o,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Oc:K1,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},b=yg(m,n,void 0);return b&&typeof b!="string"?b:m.create(n,m.Fragment,{children:b||void 0},void 0)}function yg(n,r,s){if(r.type==="element")return oy(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return uy(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return hy(n,r,s);if(r.type==="mdxjsEsm")return cy(n,r);if(r.type==="root")return fy(n,r,s);if(r.type==="text")return dy(n,r)}function oy(n,r,s){const o=n.schema;let m=o;r.tagName.toLowerCase()==="svg"&&o.space==="html"&&(m=Oc,n.schema=m),n.ancestors.push(r);const b=bg(n,r.tagName,!1),f=gy(n,r);let a=zc(n,r);return sy.has(r.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!H1(u):!0})),Sg(n,f,b,r),jc(f,a),n.ancestors.pop(),n.schema=o,n.create(r,b,f,s)}function uy(n,r){if(r.data&&r.data.estree&&n.evaluater){const o=r.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Qs(n,r.position)}function cy(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);Qs(n,r.position)}function hy(n,r,s){const o=n.schema;let m=o;r.name==="svg"&&o.space==="html"&&(m=Oc,n.schema=m),n.ancestors.push(r);const b=r.name===null?n.Fragment:bg(n,r.name,!0),f=_y(n,r),a=zc(n,r);return Sg(n,f,b,r),jc(f,a),n.ancestors.pop(),n.schema=o,n.create(r,b,f,s)}function fy(n,r,s){const o={};return jc(o,zc(n,r)),n.create(r,n.Fragment,o,s)}function dy(n,r){return r.value}function Sg(n,r,s,o){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=o)}function jc(n,r){if(r.length>0){const s=r.length>1?r:r[0];s&&(n.children=s)}}function py(n,r,s){return o;function o(m,b,f,a){const h=Array.isArray(f.children)?s:r;return a?h(b,f,a):h(b,f)}}function my(n,r){return s;function s(o,m,b,f){const a=Array.isArray(b.children),u=Bc(o);return r(m,b,f,a,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function gy(n,r){const s={};let o,m;for(m in r.properties)if(m!=="children"&&Nc.call(r.properties,m)){const b=vy(n,m,r.properties[m]);if(b){const[f,a]=b;n.tableCellAlignToStyle&&f==="align"&&typeof a=="string"&&ly.has(r.tagName)?o=a:s[f]=a}}if(o){const b=s.style||(s.style={});b[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return s}function _y(n,r){const s={};for(const o of r.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const b=o.data.estree.body[0];b.type;const f=b.expression;f.type;const a=f.properties[0];a.type,Object.assign(s,n.evaluater.evaluateExpression(a.argument))}else Qs(n,r.position);else{const m=o.name;let b;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const a=o.value.data.estree.body[0];a.type,b=n.evaluater.evaluateExpression(a.expression)}else Qs(n,r.position);else b=o.value===null?!0:o.value;s[m]=b}return s}function zc(n,r){const s=[];let o=-1;const m=n.passKeys?new Map:iy;for(;++o<r.children.length;){const b=r.children[o];let f;if(n.passKeys){const u=b.type==="element"?b.tagName:b.type==="mdxJsxFlowElement"||b.type==="mdxJsxTextElement"?b.name:void 0;if(u){const h=m.get(u)||0;f=u+"-"+h,m.set(u,h+1)}}const a=yg(n,b,f);a!==void 0&&s.push(a)}return s}function vy(n,r,s){const o=G1(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=o.commaSeparated?O1(s):W1(s)),o.property==="style"){let m=typeof s=="object"?s:yy(n,String(s));return n.stylePropertyNameCase==="css"&&(m=Sy(m)),["style",m]}return[n.elementAttributeNameCase==="react"&&o.space?F1[o.property]||o.property:o.attribute,s]}}function yy(n,r){try{return ty(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const o=s,m=new qt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw m.file=n.filePath||void 0,m.url=vg+"#cannot-parse-style-attribute",m}}function bg(n,r,s){let o;if(!s)o={type:"Literal",value:r};else if(r.includes(".")){const m=r.split(".");let b=-1,f;for(;++b<m.length;){const a=cm(m[b])?{type:"Identifier",name:m[b]}:{type:"Literal",value:m[b]};f=f?{type:"MemberExpression",object:f,property:a,computed:!!(b&&a.type==="Literal"),optional:!1}:a}o=f}else o=cm(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(o.type==="Literal"){const m=o.value;return Nc.call(n.components,m)?n.components[m]:m}if(n.evaluater)return n.evaluater.evaluateExpression(o);Qs(n)}function Qs(n,r){const s=new qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=vg+"#cannot-handle-mdx-estrees-without-createevaluater",s}function Sy(n){const r={};let s;for(s in n)Nc.call(n,s)&&(r[by(s)]=n[s]);return r}function by(n){let r=n.replace(ry,Cy);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function Cy(n){return"-"+n.toLowerCase()}const nc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},wy={};function Hc(n,r){const s=wy,o=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,m=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Cg(n,o,m)}function Cg(n,r,s){if(xy(n)){if("value"in n)return n.type==="html"&&!s?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Sm(n.children,r,s)}return Array.isArray(n)?Sm(n,r,s):""}function Sm(n,r,s){const o=[];let m=-1;for(;++m<n.length;)o[m]=Cg(n[m],r,s);return o.join("")}function xy(n){return!!(n&&typeof n=="object")}const bm=document.createElement("i");function Ic(n){const r="&"+n+";";bm.innerHTML=r;const s=bm.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function cn(n,r,s,o){const m=n.length;let b=0,f;if(r<0?r=-r>m?0:m+r:r=r>m?m:r,s=s>0?s:0,o.length<1e4)f=Array.from(o),f.unshift(r,s),n.splice(...f);else for(s&&n.splice(r,s);b<o.length;)f=o.slice(b,b+1e4),f.unshift(r,0),n.splice(...f),b+=1e4,r+=1e4}function bn(n,r){return n.length>0?(cn(n,n.length,0,r),n):r}const Cm={}.hasOwnProperty;function wg(n){const r={};let s=-1;for(;++s<n.length;)Ey(r,n[s]);return r}function Ey(n,r){let s;for(s in r){const m=(Cm.call(n,s)?n[s]:void 0)||(n[s]={}),b=r[s];let f;if(b)for(f in b){Cm.call(m,f)||(m[f]=[]);const a=b[f];ky(m[f],Array.isArray(a)?a:a?[a]:[])}}}function ky(n,r){let s=-1;const o=[];for(;++s<r.length;)(r[s].add==="after"?n:o).push(r[s]);cn(n,0,0,o)}function xg(n,r){const s=Number.parseInt(n,r);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function An(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Gt=Mi(/[A-Za-z]/),Ft=Mi(/[\dA-Za-z]/),Ay=Mi(/[#-'*+\--9=?A-Z^-~]/);function wa(n){return n!==null&&(n<32||n===127)}const Cc=Mi(/\d/),Ty=Mi(/[\dA-Fa-f]/),Dy=Mi(/[!-/:-@[-`{-~]/);function Ae(n){return n!==null&&n<-2}function at(n){return n!==null&&(n<0||n===32)}function Ve(n){return n===-2||n===-1||n===32}const Aa=Mi(new RegExp("\\p{P}|\\p{S}","u")),er=Mi(/\s/);function Mi(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function Wr(n){const r=[];let s=-1,o=0,m=0;for(;++s<n.length;){const b=n.charCodeAt(s);let f="";if(b===37&&Ft(n.charCodeAt(s+1))&&Ft(n.charCodeAt(s+2)))m=2;else if(b<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(b))||(f=String.fromCharCode(b));else if(b>55295&&b<57344){const a=n.charCodeAt(s+1);b<56320&&a>56319&&a<57344?(f=String.fromCharCode(b,a),m=1):f="�"}else f=String.fromCharCode(b);f&&(r.push(n.slice(o,s),encodeURIComponent(f)),o=s+m+1,f=""),m&&(s+=m,m=0)}return r.join("")+n.slice(o)}function We(n,r,s,o){const m=o?o-1:Number.POSITIVE_INFINITY;let b=0;return f;function f(u){return Ve(u)?(n.enter(s),a(u)):r(u)}function a(u){return Ve(u)&&b++<m?(n.consume(u),a):(n.exit(s),r(u))}}const Ry={tokenize:My};function My(n){const r=n.attempt(this.parser.constructs.contentInitial,o,m);let s;return r;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),We(n,r,"linePrefix")}function m(a){return n.enter("paragraph"),b(a)}function b(a){const u=n.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=u),s=u,f(a)}function f(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Ae(a)?(n.consume(a),n.exit("chunkText"),b):(n.consume(a),f)}}const Ly={tokenize:Oy},wm={tokenize:By};function Oy(n){const r=this,s=[];let o=0,m,b,f;return a;function a(v){if(o<s.length){const A=s[o];return r.containerState=A[1],n.attempt(A[0].continuation,u,h)(v)}return h(v)}function u(v){if(o++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,m&&g();const A=r.events.length;let M=A,D;for(;M--;)if(r.events[M][0]==="exit"&&r.events[M][1].type==="chunkFlow"){D=r.events[M][1].end;break}_(o);let T=A;for(;T<r.events.length;)r.events[T][1].end={...D},T++;return cn(r.events,M+1,0,r.events.slice(A)),r.events.length=T,h(v)}return a(v)}function h(v){if(o===s.length){if(!m)return S(v);if(m.currentConstruct&&m.currentConstruct.concrete)return k(v);r.interrupt=!!(m.currentConstruct&&!m._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(wm,d,c)(v)}function d(v){return m&&g(),_(o),S(v)}function c(v){return r.parser.lazy[r.now().line]=o!==s.length,f=r.now().offset,k(v)}function S(v){return r.containerState={},n.attempt(wm,w,k)(v)}function w(v){return o++,s.push([r.currentConstruct,r.containerState]),S(v)}function k(v){if(v===null){m&&g(),_(0),n.consume(v);return}return m=m||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:m,contentType:"flow",previous:b}),x(v)}function x(v){if(v===null){y(n.exit("chunkFlow"),!0),_(0),n.consume(v);return}return Ae(v)?(n.consume(v),y(n.exit("chunkFlow")),o=0,r.interrupt=void 0,a):(n.consume(v),x)}function y(v,A){const M=r.sliceStream(v);if(A&&M.push(null),v.previous=b,b&&(b.next=v),b=v,m.defineSkip(v.start),m.write(M),r.parser.lazy[v.start.line]){let D=m.events.length;for(;D--;)if(m.events[D][1].start.offset<f&&(!m.events[D][1].end||m.events[D][1].end.offset>f))return;const T=r.events.length;let E=T,R,B;for(;E--;)if(r.events[E][0]==="exit"&&r.events[E][1].type==="chunkFlow"){if(R){B=r.events[E][1].end;break}R=!0}for(_(o),D=T;D<r.events.length;)r.events[D][1].end={...B},D++;cn(r.events,E+1,0,r.events.slice(T)),r.events.length=D}}function _(v){let A=s.length;for(;A-- >v;){const M=s[A];r.containerState=M[1],M[0].exit.call(r,n)}s.length=v}function g(){m.write([null]),b=void 0,m=void 0,r.containerState._closeFlow=void 0}}function By(n,r,s){return We(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $r(n){if(n===null||at(n)||er(n))return 1;if(Aa(n))return 2}function Ta(n,r,s){const o=[];let m=-1;for(;++m<n.length;){const b=n[m].resolveAll;b&&!o.includes(b)&&(r=b(r,s),o.push(b))}return r}const wc={name:"attention",resolveAll:Ny,tokenize:jy};function Ny(n,r){let s=-1,o,m,b,f,a,u,h,d;for(;++s<n.length;)if(n[s][0]==="enter"&&n[s][1].type==="attentionSequence"&&n[s][1]._close){for(o=s;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&r.sliceSerialize(n[o][1]).charCodeAt(0)===r.sliceSerialize(n[s][1]).charCodeAt(0)){if((n[o][1]._close||n[s][1]._open)&&(n[s][1].end.offset-n[s][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[s][1].end.offset-n[s][1].start.offset)%3))continue;u=n[o][1].end.offset-n[o][1].start.offset>1&&n[s][1].end.offset-n[s][1].start.offset>1?2:1;const c={...n[o][1].end},S={...n[s][1].start};xm(c,-u),xm(S,u),f={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...n[o][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...n[s][1].start},end:S},b={type:u>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[s][1].start}},m={type:u>1?"strong":"emphasis",start:{...f.start},end:{...a.end}},n[o][1].end={...f.start},n[s][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=bn(h,[["enter",n[o][1],r],["exit",n[o][1],r]])),h=bn(h,[["enter",m,r],["enter",f,r],["exit",f,r],["enter",b,r]]),h=bn(h,Ta(r.parser.constructs.insideSpan.null,n.slice(o+1,s),r)),h=bn(h,[["exit",b,r],["enter",a,r],["exit",a,r],["exit",m,r]]),n[s][1].end.offset-n[s][1].start.offset?(d=2,h=bn(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):d=0,cn(n,o-1,s-o+3,h),s=o+h.length-d-2;break}}for(s=-1;++s<n.length;)n[s][1].type==="attentionSequence"&&(n[s][1].type="data");return n}function jy(n,r){const s=this.parser.constructs.attentionMarkers.null,o=this.previous,m=$r(o);let b;return f;function f(u){return b=u,n.enter("attentionSequence"),a(u)}function a(u){if(u===b)return n.consume(u),a;const h=n.exit("attentionSequence"),d=$r(u),c=!d||d===2&&m||s.includes(u),S=!m||m===2&&d||s.includes(o);return h._open=!!(b===42?c:c&&(m||!S)),h._close=!!(b===42?S:S&&(d||!c)),r(u)}}function xm(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const zy={name:"autolink",tokenize:Hy};function Hy(n,r,s){let o=0;return m;function m(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),b}function b(w){return Gt(w)?(n.consume(w),f):w===64?s(w):h(w)}function f(w){return w===43||w===45||w===46||Ft(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(n.consume(w),o=0,u):(w===43||w===45||w===46||Ft(w))&&o++<32?(n.consume(w),a):(o=0,h(w))}function u(w){return w===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),r):w===null||w===32||w===60||wa(w)?s(w):(n.consume(w),u)}function h(w){return w===64?(n.consume(w),d):Ay(w)?(n.consume(w),h):s(w)}function d(w){return Ft(w)?c(w):s(w)}function c(w){return w===46?(n.consume(w),o=0,d):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),r):S(w)}function S(w){if((w===45||Ft(w))&&o++<63){const k=w===45?S:c;return n.consume(w),k}return s(w)}}const el={partial:!0,tokenize:Iy};function Iy(n,r,s){return o;function o(b){return Ve(b)?We(n,m,"linePrefix")(b):m(b)}function m(b){return b===null||Ae(b)?r(b):s(b)}}const Eg={continuation:{tokenize:Py},exit:Fy,name:"blockQuote",tokenize:Uy};function Uy(n,r,s){const o=this;return m;function m(f){if(f===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),b}return s(f)}function b(f){return Ve(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function Py(n,r,s){const o=this;return m;function m(f){return Ve(f)?We(n,b,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):b(f)}function b(f){return n.attempt(Eg,r,s)(f)}}function Fy(n){n.exit("blockQuote")}const kg={name:"characterEscape",tokenize:qy};function qy(n,r,s){return o;function o(b){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(b),n.exit("escapeMarker"),m}function m(b){return Dy(b)?(n.enter("characterEscapeValue"),n.consume(b),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(b)}}const Ag={name:"characterReference",tokenize:Vy};function Vy(n,r,s){const o=this;let m=0,b,f;return a;function a(c){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),u}function u(c){return c===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(c),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),b=31,f=Ft,d(c))}function h(c){return c===88||c===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(c),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),b=6,f=Ty,d):(n.enter("characterReferenceValue"),b=7,f=Cc,d(c))}function d(c){if(c===59&&m){const S=n.exit("characterReferenceValue");return f===Ft&&!Ic(o.sliceSerialize(S))?s(c):(n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(c)&&m++<b?(n.consume(c),d):s(c)}}const Em={partial:!0,tokenize:$y},km={concrete:!0,name:"codeFenced",tokenize:Gy};function Gy(n,r,s){const o=this,m={partial:!0,tokenize:M};let b=0,f=0,a;return u;function u(D){return h(D)}function h(D){const T=o.events[o.events.length-1];return b=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),d(D)}function d(D){return D===a?(f++,n.consume(D),d):f<3?s(D):(n.exit("codeFencedFenceSequence"),Ve(D)?We(n,c,"whitespace")(D):c(D))}function c(D){return D===null||Ae(D)?(n.exit("codeFencedFence"),o.interrupt?r(D):n.check(Em,x,A)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||Ae(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),c(D)):Ve(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),We(n,w,"whitespace")(D)):D===96&&D===a?s(D):(n.consume(D),S)}function w(D){return D===null||Ae(D)?c(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(D))}function k(D){return D===null||Ae(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),c(D)):D===96&&D===a?s(D):(n.consume(D),k)}function x(D){return n.attempt(m,A,y)(D)}function y(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),_}function _(D){return b>0&&Ve(D)?We(n,g,"linePrefix",b+1)(D):g(D)}function g(D){return D===null||Ae(D)?n.check(Em,x,A)(D):(n.enter("codeFlowValue"),v(D))}function v(D){return D===null||Ae(D)?(n.exit("codeFlowValue"),g(D)):(n.consume(D),v)}function A(D){return n.exit("codeFenced"),r(D)}function M(D,T,E){let R=0;return B;function B(K){return D.enter("lineEnding"),D.consume(K),D.exit("lineEnding"),H}function H(K){return D.enter("codeFencedFence"),Ve(K)?We(D,F,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):F(K)}function F(K){return K===a?(D.enter("codeFencedFenceSequence"),q(K)):E(K)}function q(K){return K===a?(R++,D.consume(K),q):R>=f?(D.exit("codeFencedFenceSequence"),Ve(K)?We(D,Y,"whitespace")(K):Y(K)):E(K)}function Y(K){return K===null||Ae(K)?(D.exit("codeFencedFence"),T(K)):E(K)}}}function $y(n,r,s){const o=this;return m;function m(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),b)}function b(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}const ic={name:"codeIndented",tokenize:Ky},Yy={partial:!0,tokenize:Wy};function Ky(n,r,s){const o=this;return m;function m(h){return n.enter("codeIndented"),We(n,b,"linePrefix",5)(h)}function b(h){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?u(h):Ae(h)?n.attempt(Yy,f,u)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Ae(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),a)}function u(h){return n.exit("codeIndented"),r(h)}}function Wy(n,r,s){const o=this;return m;function m(f){return o.parser.lazy[o.now().line]?s(f):Ae(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m):We(n,b,"linePrefix",5)(f)}function b(f){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):Ae(f)?m(f):s(f)}}const Xy={name:"codeText",previous:Zy,resolve:Qy,tokenize:Jy};function Qy(n){let r=n.length-4,s=3,o,m;if((n[s][1].type==="lineEnding"||n[s][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(o=s;++o<r;)if(n[o][1].type==="codeTextData"){n[s][1].type="codeTextPadding",n[r][1].type="codeTextPadding",s+=2,r-=2;break}}for(o=s-1,r++;++o<=r;)m===void 0?o!==r&&n[o][1].type!=="lineEnding"&&(m=o):(o===r||n[o][1].type==="lineEnding")&&(n[m][1].type="codeTextData",o!==m+2&&(n[m][1].end=n[o-1][1].end,n.splice(m+2,o-m-2),r-=o-m-2,o=m+2),m=void 0);return n}function Zy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jy(n,r,s){let o=0,m,b;return f;function f(c){return n.enter("codeText"),n.enter("codeTextSequence"),a(c)}function a(c){return c===96?(n.consume(c),o++,a):(n.exit("codeTextSequence"),u(c))}function u(c){return c===null?s(c):c===32?(n.enter("space"),n.consume(c),n.exit("space"),u):c===96?(b=n.enter("codeTextSequence"),m=0,d(c)):Ae(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):(n.enter("codeTextData"),h(c))}function h(c){return c===null||c===32||c===96||Ae(c)?(n.exit("codeTextData"),u(c)):(n.consume(c),h)}function d(c){return c===96?(n.consume(c),m++,d):m===o?(n.exit("codeTextSequence"),n.exit("codeText"),r(c)):(b.type="codeTextData",h(c))}}class eS{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,s){const o=s??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(r,o):r>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(r,s,o){const m=s||0;this.setCursor(Math.trunc(r));const b=this.right.splice(this.right.length-m,Number.POSITIVE_INFINITY);return o&&Vs(this.left,o),b.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Vs(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Vs(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const s=this.left.splice(r,Number.POSITIVE_INFINITY);Vs(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Vs(this.left,s.reverse())}}}function Vs(n,r){let s=0;if(r.length<1e4)n.push(...r);else for(;s<r.length;)n.push(...r.slice(s,s+1e4)),s+=1e4}function Tg(n){const r={};let s=-1,o,m,b,f,a,u,h;const d=new eS(n);for(;++s<d.length;){for(;s in r;)s=r[s];if(o=d.get(s),s&&o[1].type==="chunkFlow"&&d.get(s-1)[1].type==="listItemPrefix"&&(u=o[1]._tokenizer.events,b=0,b<u.length&&u[b][1].type==="lineEndingBlank"&&(b+=2),b<u.length&&u[b][1].type==="content"))for(;++b<u.length&&u[b][1].type!=="content";)u[b][1].type==="chunkText"&&(u[b][1]._isInFirstContentOfListItem=!0,b++);if(o[0]==="enter")o[1].contentType&&(Object.assign(r,tS(d,s)),s=r[s],h=!0);else if(o[1]._container){for(b=s,m=void 0;b--;)if(f=d.get(b),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(m&&(d.get(m)[1].type="lineEndingBlank"),f[1].type="lineEnding",m=b);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;m&&(o[1].end={...d.get(m)[1].start},a=d.slice(m,s),a.unshift(o),d.splice(m,s-m+1,a))}}return cn(n,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function tS(n,r){const s=n.get(r)[1],o=n.get(r)[2];let m=r-1;const b=[];let f=s._tokenizer;f||(f=o.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const a=f.events,u=[],h={};let d,c,S=-1,w=s,k=0,x=0;const y=[x];for(;w;){for(;n.get(++m)[1]!==w;);b.push(m),w._tokenizer||(d=o.sliceStream(w),w.next||d.push(null),c&&f.defineSkip(w.start),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(d),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),c=w,w=w.next}for(w=s;++S<a.length;)a[S][0]==="exit"&&a[S-1][0]==="enter"&&a[S][1].type===a[S-1][1].type&&a[S][1].start.line!==a[S][1].end.line&&(x=S+1,y.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(f.events=[],w?(w._tokenizer=void 0,w.previous=void 0):y.pop(),S=y.length;S--;){const _=a.slice(y[S],y[S+1]),g=b.pop();u.push([g,g+_.length-1]),n.splice(g,2,_)}for(u.reverse(),S=-1;++S<u.length;)h[k+u[S][0]]=k+u[S][1],k+=u[S][1]-u[S][0]-1;return h}const nS={resolve:rS,tokenize:sS},iS={partial:!0,tokenize:lS};function rS(n){return Tg(n),n}function sS(n,r){let s;return o;function o(a){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),m(a)}function m(a){return a===null?b(a):Ae(a)?n.check(iS,f,b)(a):(n.consume(a),m)}function b(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function f(a){return n.consume(a),n.exit("chunkContent"),s.next=n.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,m}}function lS(n,r,s){const o=this;return m;function m(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),We(n,b,"linePrefix")}function b(f){if(f===null||Ae(f))return s(f);const a=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):n.interrupt(o.parser.constructs.flow,s,r)(f)}}function Dg(n,r,s,o,m,b,f,a,u){const h=u||Number.POSITIVE_INFINITY;let d=0;return c;function c(_){return _===60?(n.enter(o),n.enter(m),n.enter(b),n.consume(_),n.exit(b),S):_===null||_===32||_===41||wa(_)?s(_):(n.enter(o),n.enter(f),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(_))}function S(_){return _===62?(n.enter(b),n.consume(_),n.exit(b),n.exit(m),n.exit(o),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===62?(n.exit("chunkString"),n.exit(a),S(_)):_===null||_===60||Ae(_)?s(_):(n.consume(_),_===92?k:w)}function k(_){return _===60||_===62||_===92?(n.consume(_),w):w(_)}function x(_){return!d&&(_===null||_===41||at(_))?(n.exit("chunkString"),n.exit(a),n.exit(f),n.exit(o),r(_)):d<h&&_===40?(n.consume(_),d++,x):_===41?(n.consume(_),d--,x):_===null||_===32||_===40||wa(_)?s(_):(n.consume(_),_===92?y:x)}function y(_){return _===40||_===41||_===92?(n.consume(_),x):x(_)}}function Rg(n,r,s,o,m,b){const f=this;let a=0,u;return h;function h(w){return n.enter(o),n.enter(m),n.consume(w),n.exit(m),n.enter(b),d}function d(w){return a>999||w===null||w===91||w===93&&!u||w===94&&!a&&"_hiddenFootnoteSupport"in f.parser.constructs?s(w):w===93?(n.exit(b),n.enter(m),n.consume(w),n.exit(m),n.exit(o),r):Ae(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),d):(n.enter("chunkString",{contentType:"string"}),c(w))}function c(w){return w===null||w===91||w===93||Ae(w)||a++>999?(n.exit("chunkString"),d(w)):(n.consume(w),u||(u=!Ve(w)),w===92?S:c)}function S(w){return w===91||w===92||w===93?(n.consume(w),a++,c):c(w)}}function Mg(n,r,s,o,m,b){let f;return a;function a(S){return S===34||S===39||S===40?(n.enter(o),n.enter(m),n.consume(S),n.exit(m),f=S===40?41:S,u):s(S)}function u(S){return S===f?(n.enter(m),n.consume(S),n.exit(m),n.exit(o),r):(n.enter(b),h(S))}function h(S){return S===f?(n.exit(b),u(f)):S===null?s(S):Ae(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),We(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),d(S))}function d(S){return S===f||S===null||Ae(S)?(n.exit("chunkString"),h(S)):(n.consume(S),S===92?c:d)}function c(S){return S===f||S===92?(n.consume(S),d):d(S)}}function Ks(n,r){let s;return o;function o(m){return Ae(m)?(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),s=!0,o):Ve(m)?We(n,o,s?"linePrefix":"lineSuffix")(m):r(m)}}const aS={name:"definition",tokenize:uS},oS={partial:!0,tokenize:cS};function uS(n,r,s){const o=this;let m;return b;function b(w){return n.enter("definition"),f(w)}function f(w){return Rg.call(o,n,a,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return m=An(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),u):s(w)}function u(w){return at(w)?Ks(n,h)(w):h(w)}function h(w){return Dg(n,d,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function d(w){return n.attempt(oS,c,c)(w)}function c(w){return Ve(w)?We(n,S,"whitespace")(w):S(w)}function S(w){return w===null||Ae(w)?(n.exit("definition"),o.parser.defined.push(m),r(w)):s(w)}}function cS(n,r,s){return o;function o(a){return at(a)?Ks(n,m)(a):s(a)}function m(a){return Mg(n,b,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function b(a){return Ve(a)?We(n,f,"whitespace")(a):f(a)}function f(a){return a===null||Ae(a)?r(a):s(a)}}const hS={name:"hardBreakEscape",tokenize:fS};function fS(n,r,s){return o;function o(b){return n.enter("hardBreakEscape"),n.consume(b),m}function m(b){return Ae(b)?(n.exit("hardBreakEscape"),r(b)):s(b)}}const dS={name:"headingAtx",resolve:pS,tokenize:mS};function pS(n,r){let s=n.length-2,o=3,m,b;return n[o][1].type==="whitespace"&&(o+=2),s-2>o&&n[s][1].type==="whitespace"&&(s-=2),n[s][1].type==="atxHeadingSequence"&&(o===s-1||s-4>o&&n[s-2][1].type==="whitespace")&&(s-=o+1===s?2:4),s>o&&(m={type:"atxHeadingText",start:n[o][1].start,end:n[s][1].end},b={type:"chunkText",start:n[o][1].start,end:n[s][1].end,contentType:"text"},cn(n,o,s-o+1,[["enter",m,r],["enter",b,r],["exit",b,r],["exit",m,r]])),n}function mS(n,r,s){let o=0;return m;function m(d){return n.enter("atxHeading"),b(d)}function b(d){return n.enter("atxHeadingSequence"),f(d)}function f(d){return d===35&&o++<6?(n.consume(d),f):d===null||at(d)?(n.exit("atxHeadingSequence"),a(d)):s(d)}function a(d){return d===35?(n.enter("atxHeadingSequence"),u(d)):d===null||Ae(d)?(n.exit("atxHeading"),r(d)):Ve(d)?We(n,a,"whitespace")(d):(n.enter("atxHeadingText"),h(d))}function u(d){return d===35?(n.consume(d),u):(n.exit("atxHeadingSequence"),a(d))}function h(d){return d===null||d===35||at(d)?(n.exit("atxHeadingText"),a(d)):(n.consume(d),h)}}const gS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Am=["pre","script","style","textarea"],_S={concrete:!0,name:"htmlFlow",resolveTo:SS,tokenize:bS},vS={partial:!0,tokenize:wS},yS={partial:!0,tokenize:CS};function SS(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function bS(n,r,s){const o=this;let m,b,f,a,u;return h;function h(I){return d(I)}function d(I){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(I),c}function c(I){return I===33?(n.consume(I),S):I===47?(n.consume(I),b=!0,x):I===63?(n.consume(I),m=3,o.interrupt?r:O):Gt(I)?(n.consume(I),f=String.fromCharCode(I),y):s(I)}function S(I){return I===45?(n.consume(I),m=2,w):I===91?(n.consume(I),m=5,a=0,k):Gt(I)?(n.consume(I),m=4,o.interrupt?r:O):s(I)}function w(I){return I===45?(n.consume(I),o.interrupt?r:O):s(I)}function k(I){const ie="CDATA[";return I===ie.charCodeAt(a++)?(n.consume(I),a===ie.length?o.interrupt?r:F:k):s(I)}function x(I){return Gt(I)?(n.consume(I),f=String.fromCharCode(I),y):s(I)}function y(I){if(I===null||I===47||I===62||at(I)){const ie=I===47,ge=f.toLowerCase();return!ie&&!b&&Am.includes(ge)?(m=1,o.interrupt?r(I):F(I)):gS.includes(f.toLowerCase())?(m=6,ie?(n.consume(I),_):o.interrupt?r(I):F(I)):(m=7,o.interrupt&&!o.parser.lazy[o.now().line]?s(I):b?g(I):v(I))}return I===45||Ft(I)?(n.consume(I),f+=String.fromCharCode(I),y):s(I)}function _(I){return I===62?(n.consume(I),o.interrupt?r:F):s(I)}function g(I){return Ve(I)?(n.consume(I),g):B(I)}function v(I){return I===47?(n.consume(I),B):I===58||I===95||Gt(I)?(n.consume(I),A):Ve(I)?(n.consume(I),v):B(I)}function A(I){return I===45||I===46||I===58||I===95||Ft(I)?(n.consume(I),A):M(I)}function M(I){return I===61?(n.consume(I),D):Ve(I)?(n.consume(I),M):v(I)}function D(I){return I===null||I===60||I===61||I===62||I===96?s(I):I===34||I===39?(n.consume(I),u=I,T):Ve(I)?(n.consume(I),D):E(I)}function T(I){return I===u?(n.consume(I),u=null,R):I===null||Ae(I)?s(I):(n.consume(I),T)}function E(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||at(I)?M(I):(n.consume(I),E)}function R(I){return I===47||I===62||Ve(I)?v(I):s(I)}function B(I){return I===62?(n.consume(I),H):s(I)}function H(I){return I===null||Ae(I)?F(I):Ve(I)?(n.consume(I),H):s(I)}function F(I){return I===45&&m===2?(n.consume(I),$):I===60&&m===1?(n.consume(I),X):I===62&&m===4?(n.consume(I),j):I===63&&m===3?(n.consume(I),O):I===93&&m===5?(n.consume(I),z):Ae(I)&&(m===6||m===7)?(n.exit("htmlFlowData"),n.check(vS,V,q)(I)):I===null||Ae(I)?(n.exit("htmlFlowData"),q(I)):(n.consume(I),F)}function q(I){return n.check(yS,Y,V)(I)}function Y(I){return n.enter("lineEnding"),n.consume(I),n.exit("lineEnding"),K}function K(I){return I===null||Ae(I)?q(I):(n.enter("htmlFlowData"),F(I))}function $(I){return I===45?(n.consume(I),O):F(I)}function X(I){return I===47?(n.consume(I),f="",Z):F(I)}function Z(I){if(I===62){const ie=f.toLowerCase();return Am.includes(ie)?(n.consume(I),j):F(I)}return Gt(I)&&f.length<8?(n.consume(I),f+=String.fromCharCode(I),Z):F(I)}function z(I){return I===93?(n.consume(I),O):F(I)}function O(I){return I===62?(n.consume(I),j):I===45&&m===2?(n.consume(I),O):F(I)}function j(I){return I===null||Ae(I)?(n.exit("htmlFlowData"),V(I)):(n.consume(I),j)}function V(I){return n.exit("htmlFlow"),r(I)}}function CS(n,r,s){const o=this;return m;function m(f){return Ae(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),b):s(f)}function b(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}function wS(n,r,s){return o;function o(m){return n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),n.attempt(el,r,s)}}const xS={name:"htmlText",tokenize:ES};function ES(n,r,s){const o=this;let m,b,f;return a;function a(O){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(O),u}function u(O){return O===33?(n.consume(O),h):O===47?(n.consume(O),M):O===63?(n.consume(O),v):Gt(O)?(n.consume(O),E):s(O)}function h(O){return O===45?(n.consume(O),d):O===91?(n.consume(O),b=0,k):Gt(O)?(n.consume(O),g):s(O)}function d(O){return O===45?(n.consume(O),w):s(O)}function c(O){return O===null?s(O):O===45?(n.consume(O),S):Ae(O)?(f=c,X(O)):(n.consume(O),c)}function S(O){return O===45?(n.consume(O),w):c(O)}function w(O){return O===62?$(O):O===45?S(O):c(O)}function k(O){const j="CDATA[";return O===j.charCodeAt(b++)?(n.consume(O),b===j.length?x:k):s(O)}function x(O){return O===null?s(O):O===93?(n.consume(O),y):Ae(O)?(f=x,X(O)):(n.consume(O),x)}function y(O){return O===93?(n.consume(O),_):x(O)}function _(O){return O===62?$(O):O===93?(n.consume(O),_):x(O)}function g(O){return O===null||O===62?$(O):Ae(O)?(f=g,X(O)):(n.consume(O),g)}function v(O){return O===null?s(O):O===63?(n.consume(O),A):Ae(O)?(f=v,X(O)):(n.consume(O),v)}function A(O){return O===62?$(O):v(O)}function M(O){return Gt(O)?(n.consume(O),D):s(O)}function D(O){return O===45||Ft(O)?(n.consume(O),D):T(O)}function T(O){return Ae(O)?(f=T,X(O)):Ve(O)?(n.consume(O),T):$(O)}function E(O){return O===45||Ft(O)?(n.consume(O),E):O===47||O===62||at(O)?R(O):s(O)}function R(O){return O===47?(n.consume(O),$):O===58||O===95||Gt(O)?(n.consume(O),B):Ae(O)?(f=R,X(O)):Ve(O)?(n.consume(O),R):$(O)}function B(O){return O===45||O===46||O===58||O===95||Ft(O)?(n.consume(O),B):H(O)}function H(O){return O===61?(n.consume(O),F):Ae(O)?(f=H,X(O)):Ve(O)?(n.consume(O),H):R(O)}function F(O){return O===null||O===60||O===61||O===62||O===96?s(O):O===34||O===39?(n.consume(O),m=O,q):Ae(O)?(f=F,X(O)):Ve(O)?(n.consume(O),F):(n.consume(O),Y)}function q(O){return O===m?(n.consume(O),m=void 0,K):O===null?s(O):Ae(O)?(f=q,X(O)):(n.consume(O),q)}function Y(O){return O===null||O===34||O===39||O===60||O===61||O===96?s(O):O===47||O===62||at(O)?R(O):(n.consume(O),Y)}function K(O){return O===47||O===62||at(O)?R(O):s(O)}function $(O){return O===62?(n.consume(O),n.exit("htmlTextData"),n.exit("htmlText"),r):s(O)}function X(O){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),Z}function Z(O){return Ve(O)?We(n,z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):z(O)}function z(O){return n.enter("htmlTextData"),f(O)}}const Uc={name:"labelEnd",resolveAll:DS,resolveTo:RS,tokenize:MS},kS={tokenize:LS},AS={tokenize:OS},TS={tokenize:BS};function DS(n){let r=-1;const s=[];for(;++r<n.length;){const o=n[r][1];if(s.push(n[r]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const m=o.type==="labelImage"?4:2;o.type="data",r+=m}}return n.length!==s.length&&cn(n,0,n.length,s),n}function RS(n,r){let s=n.length,o=0,m,b,f,a;for(;s--;)if(m=n[s][1],b){if(m.type==="link"||m.type==="labelLink"&&m._inactive)break;n[s][0]==="enter"&&m.type==="labelLink"&&(m._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(m.type==="labelImage"||m.type==="labelLink")&&!m._balanced&&(b=s,m.type!=="labelLink")){o=2;break}}else m.type==="labelEnd"&&(f=s);const u={type:n[b][1].type==="labelLink"?"link":"image",start:{...n[b][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[b][1].start},end:{...n[f][1].end}},d={type:"labelText",start:{...n[b+o+2][1].end},end:{...n[f-2][1].start}};return a=[["enter",u,r],["enter",h,r]],a=bn(a,n.slice(b+1,b+o+3)),a=bn(a,[["enter",d,r]]),a=bn(a,Ta(r.parser.constructs.insideSpan.null,n.slice(b+o+4,f-3),r)),a=bn(a,[["exit",d,r],n[f-2],n[f-1],["exit",h,r]]),a=bn(a,n.slice(f+1)),a=bn(a,[["exit",u,r]]),cn(n,b,n.length,a),n}function MS(n,r,s){const o=this;let m=o.events.length,b,f;for(;m--;)if((o.events[m][1].type==="labelImage"||o.events[m][1].type==="labelLink")&&!o.events[m][1]._balanced){b=o.events[m][1];break}return a;function a(S){return b?b._inactive?c(S):(f=o.parser.defined.includes(An(o.sliceSerialize({start:b.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(S),n.exit("labelMarker"),n.exit("labelEnd"),u):s(S)}function u(S){return S===40?n.attempt(kS,d,f?d:c)(S):S===91?n.attempt(AS,d,f?h:c)(S):f?d(S):c(S)}function h(S){return n.attempt(TS,d,c)(S)}function d(S){return r(S)}function c(S){return b._balanced=!0,s(S)}}function LS(n,r,s){return o;function o(c){return n.enter("resource"),n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),m}function m(c){return at(c)?Ks(n,b)(c):b(c)}function b(c){return c===41?d(c):Dg(n,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function f(c){return at(c)?Ks(n,u)(c):d(c)}function a(c){return s(c)}function u(c){return c===34||c===39||c===40?Mg(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function h(c){return at(c)?Ks(n,d)(c):d(c)}function d(c){return c===41?(n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),n.exit("resource"),r):s(c)}}function OS(n,r,s){const o=this;return m;function m(a){return Rg.call(o,n,b,f,"reference","referenceMarker","referenceString")(a)}function b(a){return o.parser.defined.includes(An(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?r(a):s(a)}function f(a){return s(a)}}function BS(n,r,s){return o;function o(b){return n.enter("reference"),n.enter("referenceMarker"),n.consume(b),n.exit("referenceMarker"),m}function m(b){return b===93?(n.enter("referenceMarker"),n.consume(b),n.exit("referenceMarker"),n.exit("reference"),r):s(b)}}const NS={name:"labelStartImage",resolveAll:Uc.resolveAll,tokenize:jS};function jS(n,r,s){const o=this;return m;function m(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),b}function b(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),f):s(a)}function f(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(a):r(a)}}const zS={name:"labelStartLink",resolveAll:Uc.resolveAll,tokenize:HS};function HS(n,r,s){const o=this;return m;function m(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),b}function b(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(f):r(f)}}const rc={name:"lineEnding",tokenize:IS};function IS(n,r){return s;function s(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),We(n,r,"linePrefix")}}const ba={name:"thematicBreak",tokenize:US};function US(n,r,s){let o=0,m;return b;function b(h){return n.enter("thematicBreak"),f(h)}function f(h){return m=h,a(h)}function a(h){return h===m?(n.enter("thematicBreakSequence"),u(h)):o>=3&&(h===null||Ae(h))?(n.exit("thematicBreak"),r(h)):s(h)}function u(h){return h===m?(n.consume(h),o++,u):(n.exit("thematicBreakSequence"),Ve(h)?We(n,a,"whitespace")(h):a(h))}}const Jt={continuation:{tokenize:VS},exit:$S,name:"list",tokenize:qS},PS={partial:!0,tokenize:YS},FS={partial:!0,tokenize:GS};function qS(n,r,s){const o=this,m=o.events[o.events.length-1];let b=m&&m[1].type==="linePrefix"?m[2].sliceSerialize(m[1],!0).length:0,f=0;return a;function a(w){const k=o.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!o.containerState.marker||w===o.containerState.marker:Cc(w)){if(o.containerState.type||(o.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),w===42||w===45?n.check(ba,s,h)(w):h(w);if(!o.interrupt||w===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),u(w)}return s(w)}function u(w){return Cc(w)&&++f<10?(n.consume(w),u):(!o.interrupt||f<2)&&(o.containerState.marker?w===o.containerState.marker:w===41||w===46)?(n.exit("listItemValue"),h(w)):s(w)}function h(w){return n.enter("listItemMarker"),n.consume(w),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||w,n.check(el,o.interrupt?s:d,n.attempt(PS,S,c))}function d(w){return o.containerState.initialBlankLine=!0,b++,S(w)}function c(w){return Ve(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),S):s(w)}function S(w){return o.containerState.size=b+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(w)}}function VS(n,r,s){const o=this;return o.containerState._closeFlow=void 0,n.check(el,m,b);function m(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,We(n,r,"listItemIndent",o.containerState.size+1)(a)}function b(a){return o.containerState.furtherBlankLines||!Ve(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,f(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(FS,r,f)(a))}function f(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,We(n,n.attempt(Jt,r,s),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function GS(n,r,s){const o=this;return We(n,m,"listItemIndent",o.containerState.size+1);function m(b){const f=o.events[o.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===o.containerState.size?r(b):s(b)}}function $S(n){n.exit(this.containerState.type)}function YS(n,r,s){const o=this;return We(n,m,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function m(b){const f=o.events[o.events.length-1];return!Ve(b)&&f&&f[1].type==="listItemPrefixWhitespace"?r(b):s(b)}}const Tm={name:"setextUnderline",resolveTo:KS,tokenize:WS};function KS(n,r){let s=n.length,o,m,b;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){o=s;break}n[s][1].type==="paragraph"&&(m=s)}else n[s][1].type==="content"&&n.splice(s,1),!b&&n[s][1].type==="definition"&&(b=s);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[m][1].type="setextHeadingText",b?(n.splice(m,0,["enter",f,r]),n.splice(b+1,0,["exit",n[o][1],r]),n[o][1].end={...n[b][1].end}):n[o][1]=f,n.push(["exit",f,r]),n}function WS(n,r,s){const o=this;let m;return b;function b(h){let d=o.events.length,c;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){c=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||c)?(n.enter("setextHeadingLine"),m=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===m?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),Ve(h)?We(n,u,"lineSuffix")(h):u(h))}function u(h){return h===null||Ae(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const XS={tokenize:QS};function QS(n){const r=this,s=n.attempt(el,o,n.attempt(this.parser.constructs.flowInitial,m,We(n,n.attempt(this.parser.constructs.flow,m,n.attempt(nS,m)),"linePrefix")));return s;function o(b){if(b===null){n.consume(b);return}return n.enter("lineEndingBlank"),n.consume(b),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function m(b){if(b===null){n.consume(b);return}return n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const ZS={resolveAll:Og()},JS=Lg("string"),eb=Lg("text");function Lg(n){return{resolveAll:Og(n==="text"?tb:void 0),tokenize:r};function r(s){const o=this,m=this.parser.constructs[n],b=s.attempt(m,f,a);return f;function f(d){return h(d)?b(d):a(d)}function a(d){if(d===null){s.consume(d);return}return s.enter("data"),s.consume(d),u}function u(d){return h(d)?(s.exit("data"),b(d)):(s.consume(d),u)}function h(d){if(d===null)return!0;const c=m[d];let S=-1;if(c)for(;++S<c.length;){const w=c[S];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function Og(n){return r;function r(s,o){let m=-1,b;for(;++m<=s.length;)b===void 0?s[m]&&s[m][1].type==="data"&&(b=m,m++):(!s[m]||s[m][1].type!=="data")&&(m!==b+2&&(s[b][1].end=s[m-1][1].end,s.splice(b+2,m-b-2),m=b+2),b=void 0);return n?n(s,o):s}}function tb(n,r){let s=0;for(;++s<=n.length;)if((s===n.length||n[s][1].type==="lineEnding")&&n[s-1][1].type==="data"){const o=n[s-1][1],m=r.sliceStream(o);let b=m.length,f=-1,a=0,u;for(;b--;){const h=m[b];if(typeof h=="string"){for(f=h.length;h.charCodeAt(f-1)===32;)a++,f--;if(f)break;f=-1}else if(h===-2)u=!0,a++;else if(h!==-1){b++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(a=0),a){const h={type:s===n.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:b?f:o.start._bufferIndex+f,_index:o.start._index+b,line:o.end.line,column:o.end.column-a,offset:o.end.offset-a},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(n.splice(s,0,["enter",h,r],["exit",h,r]),s+=2)}s++}return n}const nb={42:Jt,43:Jt,45:Jt,48:Jt,49:Jt,50:Jt,51:Jt,52:Jt,53:Jt,54:Jt,55:Jt,56:Jt,57:Jt,62:Eg},ib={91:aS},rb={[-2]:ic,[-1]:ic,32:ic},sb={35:dS,42:ba,45:[Tm,ba],60:_S,61:Tm,95:ba,96:km,126:km},lb={38:Ag,92:kg},ab={[-5]:rc,[-4]:rc,[-3]:rc,33:NS,38:Ag,42:wc,60:[zy,xS],91:zS,92:[hS,kg],93:Uc,95:wc,96:Xy},ob={null:[wc,ZS]},ub={null:[42,95]},cb={null:[]},hb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ub,contentInitial:ib,disable:cb,document:nb,flow:sb,flowInitial:rb,insideSpan:ob,string:lb,text:ab},Symbol.toStringTag,{value:"Module"}));function fb(n,r,s){let o={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const m={},b=[];let f=[],a=[];const u={attempt:T(M),check:T(D),consume:g,enter:v,exit:A,interrupt:T(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:n,previous:null,sliceSerialize:S,sliceStream:w,write:c};let d=r.tokenize.call(h,u);return r.resolveAll&&b.push(r),h;function c(H){return f=bn(f,H),y(),f[f.length-1]!==null?[]:(E(r,0),h.events=Ta(b,h.events,h),h.events)}function S(H,F){return pb(w(H),F)}function w(H){return db(f,H)}function k(){const{_bufferIndex:H,_index:F,line:q,column:Y,offset:K}=o;return{_bufferIndex:H,_index:F,line:q,column:Y,offset:K}}function x(H){m[H.line]=H.column,B()}function y(){let H;for(;o._index<f.length;){const F=f[o._index];if(typeof F=="string")for(H=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===H&&o._bufferIndex<F.length;)_(F.charCodeAt(o._bufferIndex));else _(F)}}function _(H){d=d(H)}function g(H){Ae(H)?(o.line++,o.column=1,o.offset+=H===-3?2:1,B()):H!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===f[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=H}function v(H,F){const q=F||{};return q.type=H,q.start=k(),h.events.push(["enter",q,h]),a.push(q),q}function A(H){const F=a.pop();return F.end=k(),h.events.push(["exit",F,h]),F}function M(H,F){E(H,F.from)}function D(H,F){F.restore()}function T(H,F){return q;function q(Y,K,$){let X,Z,z,O;return Array.isArray(Y)?V(Y):"tokenize"in Y?V([Y]):j(Y);function j(ee){return G;function G(U){const ne=U!==null&&ee[U],te=U!==null&&ee.null,ve=[...Array.isArray(ne)?ne:ne?[ne]:[],...Array.isArray(te)?te:te?[te]:[]];return V(ve)(U)}}function V(ee){return X=ee,Z=0,ee.length===0?$:I(ee[Z])}function I(ee){return G;function G(U){return O=R(),z=ee,ee.partial||(h.currentConstruct=ee),ee.name&&h.parser.constructs.disable.null.includes(ee.name)?ge():ee.tokenize.call(F?Object.assign(Object.create(h),F):h,u,ie,ge)(U)}}function ie(ee){return H(z,O),K}function ge(ee){return O.restore(),++Z<X.length?I(X[Z]):$}}}function E(H,F){H.resolveAll&&!b.includes(H)&&b.push(H),H.resolve&&cn(h.events,F,h.events.length-F,H.resolve(h.events.slice(F),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function R(){const H=k(),F=h.previous,q=h.currentConstruct,Y=h.events.length,K=Array.from(a);return{from:Y,restore:$};function $(){o=H,h.previous=F,h.currentConstruct=q,h.events.length=Y,a=K,B()}}function B(){o.line in m&&o.column<2&&(o.column=m[o.line],o.offset+=m[o.line]-1)}}function db(n,r){const s=r.start._index,o=r.start._bufferIndex,m=r.end._index,b=r.end._bufferIndex;let f;if(s===m)f=[n[s].slice(o,b)];else{if(f=n.slice(s,m),o>-1){const a=f[0];typeof a=="string"?f[0]=a.slice(o):f.shift()}b>0&&f.push(n[m].slice(0,b))}return f}function pb(n,r){let s=-1;const o=[];let m;for(;++s<n.length;){const b=n[s];let f;if(typeof b=="string")f=b;else switch(b){case-5:{f="\r";break}case-4:{f=`
|
|
64
|
+
`;break}case-3:{f=`\r
|
|
65
|
+
`;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&m)continue;f=" ";break}default:f=String.fromCharCode(b)}m=b===-2,o.push(f)}return o.join("")}function mb(n){const o={constructs:wg([hb,...(n||{}).extensions||[]]),content:m(Ry),defined:[],document:m(Ly),flow:m(XS),lazy:{},string:m(JS),text:m(eb)};return o;function m(b){return f;function f(a){return fb(o,b,a)}}}function gb(n){for(;!Tg(n););return n}const Dm=/[\0\t\n\r]/g;function _b(){let n=1,r="",s=!0,o;return m;function m(b,f,a){const u=[];let h,d,c,S,w;for(b=r+(typeof b=="string"?b.toString():new TextDecoder(f||void 0).decode(b)),c=0,r="",s&&(b.charCodeAt(0)===65279&&c++,s=void 0);c<b.length;){if(Dm.lastIndex=c,h=Dm.exec(b),S=h&&h.index!==void 0?h.index:b.length,w=b.charCodeAt(S),!h){r=b.slice(c);break}if(w===10&&c===S&&o)u.push(-3),o=void 0;else switch(o&&(u.push(-5),o=void 0),c<S&&(u.push(b.slice(c,S)),n+=S-c),w){case 0:{u.push(65533),n++;break}case 9:{for(d=Math.ceil(n/4)*4,u.push(-2);n++<d;)u.push(-1);break}case 10:{u.push(-4),n=1;break}default:o=!0,n=1}c=S+1}return a&&(o&&u.push(-5),r&&u.push(r),u.push(null)),u}}const vb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yb(n){return n.replace(vb,Sb)}function Sb(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const m=s.charCodeAt(1),b=m===120||m===88;return xg(s.slice(b?2:1),b?16:10)}return Ic(s)||n}const Bg={}.hasOwnProperty;function bb(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),Cb(s)(gb(mb(s).document().write(_b()(n,r,!0))))}function Cb(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:b(Re),autolinkProtocol:R,autolinkEmail:R,atxHeading:b(Pe),blockQuote:b(te),characterEscape:R,characterReference:R,codeFenced:b(ve),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:b(ve,f),codeText:b(Se,f),codeTextData:R,data:R,codeFlowValue:R,definition:b(Me),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:b(Le),hardBreakEscape:b(Je),hardBreakTrailing:b(Je),htmlFlow:b(de,f),htmlFlowData:R,htmlText:b(de,f),htmlTextData:R,image:b(Ie),label:f,link:b(Re),listItem:b(ce),listItemValue:S,listOrdered:b(ut,c),listUnordered:b(ut),paragraph:b(zt),reference:I,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:b(Pe),strong:b(Ye),thematicBreak:b(Ht)},exit:{atxHeading:u(),atxHeadingSequence:M,autolink:u(),autolinkEmail:ne,autolinkProtocol:U,blockQuote:u(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:ee,characterReference:G,codeFenced:u(y),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:B,codeIndented:u(_),codeText:u(K),codeTextData:B,data:B,definition:u(),definitionDestinationString:A,definitionLabelString:g,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(q),htmlFlowData:B,htmlText:u(Y),htmlTextData:B,image:u(X),label:z,labelText:Z,lineEnding:H,link:u($),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ie,resourceDestinationString:O,resourceTitleString:j,resource:V,setextHeading:u(E),setextHeadingLineSequence:T,setextHeadingText:D,strong:u(),thematicBreak:u()}};Ng(r,(n||{}).mdastExtensions||[]);const s={};return o;function o(ue){let _e={type:"root",children:[]};const xe={stack:[_e],tokenStack:[],config:r,enter:a,exit:h,buffer:f,resume:d,data:s},Oe=[];let Ne=-1;for(;++Ne<ue.length;)if(ue[Ne][1].type==="listOrdered"||ue[Ne][1].type==="listUnordered")if(ue[Ne][0]==="enter")Oe.push(Ne);else{const vt=Oe.pop();Ne=m(ue,vt,Ne)}for(Ne=-1;++Ne<ue.length;){const vt=r[ue[Ne][0]];Bg.call(vt,ue[Ne][1].type)&&vt[ue[Ne][1].type].call(Object.assign({sliceSerialize:ue[Ne][2].sliceSerialize},xe),ue[Ne][1])}if(xe.tokenStack.length>0){const vt=xe.tokenStack[xe.tokenStack.length-1];(vt[1]||Rm).call(xe,void 0,vt[0])}for(_e.position={start:Ti(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:Ti(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<r.transforms.length;)_e=r.transforms[Ne](_e)||_e;return _e}function m(ue,_e,xe){let Oe=_e-1,Ne=-1,vt=!1,Ue,At,yt,It;for(;++Oe<=xe;){const et=ue[Oe];switch(et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{et[0]==="enter"?Ne++:Ne--,It=void 0;break}case"lineEndingBlank":{et[0]==="enter"&&(Ue&&!It&&!Ne&&!yt&&(yt=Oe),It=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:It=void 0}if(!Ne&&et[0]==="enter"&&et[1].type==="listItemPrefix"||Ne===-1&&et[0]==="exit"&&(et[1].type==="listUnordered"||et[1].type==="listOrdered")){if(Ue){let Tn=Oe;for(At=void 0;Tn--;){const Mt=ue[Tn];if(Mt[1].type==="lineEnding"||Mt[1].type==="lineEndingBlank"){if(Mt[0]==="exit")continue;At&&(ue[At][1].type="lineEndingBlank",vt=!0),Mt[1].type="lineEnding",At=Tn}else if(!(Mt[1].type==="linePrefix"||Mt[1].type==="blockQuotePrefix"||Mt[1].type==="blockQuotePrefixWhitespace"||Mt[1].type==="blockQuoteMarker"||Mt[1].type==="listItemIndent"))break}yt&&(!At||yt<At)&&(Ue._spread=!0),Ue.end=Object.assign({},At?ue[At][1].start:et[1].end),ue.splice(At||Oe,0,["exit",Ue,et[2]]),Oe++,xe++}if(et[1].type==="listItemPrefix"){const Tn={type:"listItem",_spread:!1,start:Object.assign({},et[1].start),end:void 0};Ue=Tn,ue.splice(Oe,0,["enter",Tn,et[2]]),Oe++,xe++,yt=void 0,It=!0}}}return ue[_e][1]._spread=vt,xe}function b(ue,_e){return xe;function xe(Oe){a.call(this,ue(Oe),Oe),_e&&_e.call(this,Oe)}}function f(){this.stack.push({type:"fragment",children:[]})}function a(ue,_e,xe){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([_e,xe||void 0]),ue.position={start:Ti(_e.start),end:void 0}}function u(ue){return _e;function _e(xe){ue&&ue.call(this,xe),h.call(this,xe)}}function h(ue,_e){const xe=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==ue.type&&(_e?_e.call(this,ue,Oe[0]):(Oe[1]||Rm).call(this,ue,Oe[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Ys({start:ue.start,end:ue.end})+"): it’s not open");xe.position.end=Ti(ue.end)}function d(){return Hc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function S(ue){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=ue}function k(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=ue}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue.replace(/(\r?\n|\r)$/g,"")}function g(ue){const _e=this.resume(),xe=this.stack[this.stack.length-1];xe.label=_e,xe.identifier=An(this.sliceSerialize(ue)).toLowerCase()}function v(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ue}function A(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ue}function M(ue){const _e=this.stack[this.stack.length-1];if(!_e.depth){const xe=this.sliceSerialize(ue).length;_e.depth=xe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function T(ue){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function R(ue){const xe=this.stack[this.stack.length-1].children;let Oe=xe[xe.length-1];(!Oe||Oe.type!=="text")&&(Oe=pt(),Oe.position={start:Ti(ue.start),end:void 0},xe.push(Oe)),this.stack.push(Oe)}function B(ue){const _e=this.stack.pop();_e.value+=this.sliceSerialize(ue),_e.position.end=Ti(ue.end)}function H(ue){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=_e.children[_e.children.length-1];xe.position.end=Ti(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(_e.type)&&(R.call(this,ue),B.call(this,ue))}function F(){this.data.atHardBreak=!0}function q(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue}function Y(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue}function K(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue}function $(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=_e,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function X(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=_e,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function Z(ue){const _e=this.sliceSerialize(ue),xe=this.stack[this.stack.length-2];xe.label=yb(_e),xe.identifier=An(_e).toLowerCase()}function z(){const ue=this.stack[this.stack.length-1],_e=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Oe=ue.children;xe.children=Oe}else xe.alt=_e}function O(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ue}function j(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ue}function V(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ie(ue){const _e=this.resume(),xe=this.stack[this.stack.length-1];xe.label=_e,xe.identifier=An(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function ge(ue){this.data.characterReferenceType=ue.type}function ee(ue){const _e=this.sliceSerialize(ue),xe=this.data.characterReferenceType;let Oe;xe?(Oe=xg(_e,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=Ic(_e);const Ne=this.stack[this.stack.length-1];Ne.value+=Oe}function G(ue){const _e=this.stack.pop();_e.position.end=Ti(ue.end)}function U(ue){B.call(this,ue);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(ue)}function ne(ue){B.call(this,ue);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(ue)}function te(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function Se(){return{type:"inlineCode",value:""}}function Me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Le(){return{type:"emphasis",children:[]}}function Pe(){return{type:"heading",depth:0,children:[]}}function Je(){return{type:"break"}}function de(){return{type:"html",value:""}}function Ie(){return{type:"image",title:null,url:"",alt:null}}function Re(){return{type:"link",title:null,url:"",children:[]}}function ut(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function ce(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function zt(){return{type:"paragraph",children:[]}}function Ye(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function Ht(){return{type:"thematicBreak"}}}function Ti(n){return{line:n.line,column:n.column,offset:n.offset}}function Ng(n,r){let s=-1;for(;++s<r.length;){const o=r[s];Array.isArray(o)?Ng(n,o):wb(n,o)}}function wb(n,r){let s;for(s in r)if(Bg.call(r,s))switch(s){case"canContainEols":{const o=r[s];o&&n[s].push(...o);break}case"transforms":{const o=r[s];o&&n[s].push(...o);break}case"enter":case"exit":{const o=r[s];o&&Object.assign(n[s],o);break}}}function Rm(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+Ys({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+Ys({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Ys({start:r.start,end:r.end})+") is still open")}function xb(n){const r=this;r.parser=s;function s(o){return bb(o,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function Eb(n,r){const s={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(r),!0)};return n.patch(r,s),n.applyData(r,s)}function kb(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
|
|
66
|
+
`}]}function Ab(n,r){const s=r.value?r.value+`
|
|
67
|
+
`:"",o={},m=r.lang?r.lang.split(/\s+/):[];m.length>0&&(o.className=["language-"+m[0]]);let b={type:"element",tagName:"code",properties:o,children:[{type:"text",value:s}]};return r.meta&&(b.data={meta:r.meta}),n.patch(r,b),b=n.applyData(r,b),b={type:"element",tagName:"pre",properties:{},children:[b]},n.patch(r,b),b}function Tb(n,r){const s={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Db(n,r){const s={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Rb(n,r){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(r.identifier).toUpperCase(),m=Wr(o.toLowerCase()),b=n.footnoteOrder.indexOf(o);let f,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),f=n.footnoteOrder.length):f=b+1,a+=1,n.footnoteCounts.set(o,a);const u={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+m,id:s+"fnref-"+m+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(r,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return n.patch(r,h),n.applyData(r,h)}function Mb(n,r){const s={type:"element",tagName:"h"+r.depth,properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Lb(n,r){if(n.options.allowDangerousHtml){const s={type:"raw",value:r.value};return n.patch(r,s),n.applyData(r,s)}}function jg(n,r){const s=r.referenceType;let o="]";if(s==="collapsed"?o+="[]":s==="full"&&(o+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+o}];const m=n.all(r),b=m[0];b&&b.type==="text"?b.value="["+b.value:m.unshift({type:"text",value:"["});const f=m[m.length-1];return f&&f.type==="text"?f.value+=o:m.push({type:"text",value:o}),m}function Ob(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return jg(n,r);const m={src:Wr(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(m.title=o.title);const b={type:"element",tagName:"img",properties:m,children:[]};return n.patch(r,b),n.applyData(r,b)}function Bb(n,r){const s={src:Wr(r.url)};r.alt!==null&&r.alt!==void 0&&(s.alt=r.alt),r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return n.patch(r,o),n.applyData(r,o)}function Nb(n,r){const s={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};n.patch(r,s);const o={type:"element",tagName:"code",properties:{},children:[s]};return n.patch(r,o),n.applyData(r,o)}function jb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return jg(n,r);const m={href:Wr(o.url||"")};o.title!==null&&o.title!==void 0&&(m.title=o.title);const b={type:"element",tagName:"a",properties:m,children:n.all(r)};return n.patch(r,b),n.applyData(r,b)}function zb(n,r){const s={href:Wr(r.url)};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:n.all(r)};return n.patch(r,o),n.applyData(r,o)}function Hb(n,r,s){const o=n.all(r),m=s?Ib(s):zg(r),b={},f=[];if(typeof r.checked=="boolean"){const d=o[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},o.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),b.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const d=o[a];(m||a!==0||d.type!=="element"||d.tagName!=="p")&&f.push({type:"text",value:`
|
|
68
|
+
`}),d.type==="element"&&d.tagName==="p"&&!m?f.push(...d.children):f.push(d)}const u=o[o.length-1];u&&(m||u.type!=="element"||u.tagName!=="p")&&f.push({type:"text",value:`
|
|
69
|
+
`});const h={type:"element",tagName:"li",properties:b,children:f};return n.patch(r,h),n.applyData(r,h)}function Ib(n){let r=!1;if(n.type==="list"){r=n.spread||!1;const s=n.children;let o=-1;for(;!r&&++o<s.length;)r=zg(s[o])}return r}function zg(n){const r=n.spread;return r??n.children.length>1}function Ub(n,r){const s={},o=n.all(r);let m=-1;for(typeof r.start=="number"&&r.start!==1&&(s.start=r.start);++m<o.length;){const f=o[m];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){s.className=["contains-task-list"];break}}const b={type:"element",tagName:r.ordered?"ol":"ul",properties:s,children:n.wrap(o,!0)};return n.patch(r,b),n.applyData(r,b)}function Pb(n,r){const s={type:"element",tagName:"p",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Fb(n,r){const s={type:"root",children:n.wrap(n.all(r))};return n.patch(r,s),n.applyData(r,s)}function qb(n,r){const s={type:"element",tagName:"strong",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Vb(n,r){const s=n.all(r),o=s.shift(),m=[];if(o){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(r.children[0],f),m.push(f)}if(s.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(s,!0)},a=Bc(r.children[1]),u=gg(r.children[r.children.length-1]);a&&u&&(f.position={start:a,end:u}),m.push(f)}const b={type:"element",tagName:"table",properties:{},children:n.wrap(m,!0)};return n.patch(r,b),n.applyData(r,b)}function Gb(n,r,s){const o=s?s.children:void 0,b=(o?o.indexOf(r):1)===0?"th":"td",f=s&&s.type==="table"?s.align:void 0,a=f?f.length:r.children.length;let u=-1;const h=[];for(;++u<a;){const c=r.children[u],S={},w=f?f[u]:void 0;w&&(S.align=w);let k={type:"element",tagName:b,properties:S,children:[]};c&&(k.children=n.all(c),n.patch(c,k),k=n.applyData(c,k)),h.push(k)}const d={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(r,d),n.applyData(r,d)}function $b(n,r){const s={type:"element",tagName:"td",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}const Mm=9,Lm=32;function Yb(n){const r=String(n),s=/\r?\n|\r/g;let o=s.exec(r),m=0;const b=[];for(;o;)b.push(Om(r.slice(m,o.index),m>0,!0),o[0]),m=o.index+o[0].length,o=s.exec(r);return b.push(Om(r.slice(m),m>0,!1)),b.join("")}function Om(n,r,s){let o=0,m=n.length;if(r){let b=n.codePointAt(o);for(;b===Mm||b===Lm;)o++,b=n.codePointAt(o)}if(s){let b=n.codePointAt(m-1);for(;b===Mm||b===Lm;)m--,b=n.codePointAt(m-1)}return m>o?n.slice(o,m):""}function Kb(n,r){const s={type:"text",value:Yb(String(r.value))};return n.patch(r,s),n.applyData(r,s)}function Wb(n,r){const s={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,s),n.applyData(r,s)}const Xb={blockquote:Eb,break:kb,code:Ab,delete:Tb,emphasis:Db,footnoteReference:Rb,heading:Mb,html:Lb,imageReference:Ob,image:Bb,inlineCode:Nb,linkReference:jb,link:zb,listItem:Hb,list:Ub,paragraph:Pb,root:Fb,strong:qb,table:Vb,tableCell:$b,tableRow:Gb,text:Kb,thematicBreak:Wb,toml:ga,yaml:ga,definition:ga,footnoteDefinition:ga};function ga(){}const Hg=-1,Da=0,Ws=1,xa=2,Pc=3,Fc=4,qc=5,Vc=6,Ig=7,Ug=8,Qb=typeof self=="object"?self:globalThis,Bm=(n,r)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new Qb[n](r)},Zb=(n,r)=>{const s=(m,b)=>(n.set(b,m),m),o=m=>{if(n.has(m))return n.get(m);const[b,f]=r[m];switch(b){case Da:case Hg:return s(f,m);case Ws:{const a=s([],m);for(const u of f)a.push(o(u));return a}case xa:{const a=s({},m);for(const[u,h]of f)a[o(u)]=o(h);return a}case Pc:return s(new Date(f),m);case Fc:{const{source:a,flags:u}=f;return s(new RegExp(a,u),m)}case qc:{const a=s(new Map,m);for(const[u,h]of f)a.set(o(u),o(h));return a}case Vc:{const a=s(new Set,m);for(const u of f)a.add(o(u));return a}case Ig:{const{name:a,message:u}=f;return s(Bm(a,u),m)}case Ug:return s(BigInt(f),m);case"BigInt":return s(Object(BigInt(f)),m);case"ArrayBuffer":return s(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:a}=new Uint8Array(f);return s(new DataView(a),f)}}return s(Bm(b,f),m)};return o},Nm=n=>Zb(new Map,n)(0),qr="",{toString:Jb}={},{keys:eC}=Object,Gs=n=>{const r=typeof n;if(r!=="object"||!n)return[Da,r];const s=Jb.call(n).slice(8,-1);switch(s){case"Array":return[Ws,qr];case"Object":return[xa,qr];case"Date":return[Pc,qr];case"RegExp":return[Fc,qr];case"Map":return[qc,qr];case"Set":return[Vc,qr];case"DataView":return[Ws,s]}return s.includes("Array")?[Ws,s]:s.includes("Error")?[Ig,s]:[xa,s]},_a=([n,r])=>n===Da&&(r==="function"||r==="symbol"),tC=(n,r,s,o)=>{const m=(f,a)=>{const u=o.push(f)-1;return s.set(a,u),u},b=f=>{if(s.has(f))return s.get(f);let[a,u]=Gs(f);switch(a){case Da:{let d=f;switch(u){case"bigint":a=Ug,d=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return m([Hg],f)}return m([a,d],f)}case Ws:{if(u){let S=f;return u==="DataView"?S=new Uint8Array(f.buffer):u==="ArrayBuffer"&&(S=new Uint8Array(f)),m([u,[...S]],f)}const d=[],c=m([a,d],f);for(const S of f)d.push(b(S));return c}case xa:{if(u)switch(u){case"BigInt":return m([u,f.toString()],f);case"Boolean":case"Number":case"String":return m([u,f.valueOf()],f)}if(r&&"toJSON"in f)return b(f.toJSON());const d=[],c=m([a,d],f);for(const S of eC(f))(n||!_a(Gs(f[S])))&&d.push([b(S),b(f[S])]);return c}case Pc:return m([a,f.toISOString()],f);case Fc:{const{source:d,flags:c}=f;return m([a,{source:d,flags:c}],f)}case qc:{const d=[],c=m([a,d],f);for(const[S,w]of f)(n||!(_a(Gs(S))||_a(Gs(w))))&&d.push([b(S),b(w)]);return c}case Vc:{const d=[],c=m([a,d],f);for(const S of f)(n||!_a(Gs(S)))&&d.push(b(S));return c}}const{message:h}=f;return m([a,{name:u,message:h}],f)};return b},jm=(n,{json:r,lossy:s}={})=>{const o=[];return tC(!(r||s),!!r,new Map,o)(n),o},Ea=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?Nm(jm(n,r)):structuredClone(n):(n,r)=>Nm(jm(n,r));function nC(n,r){const s=[{type:"text",value:"↩"}];return r>1&&s.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),s}function iC(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function rC(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",s=n.options.footnoteBackContent||nC,o=n.options.footnoteBackLabel||iC,m=n.options.footnoteLabel||"Footnotes",b=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[u]);if(!h)continue;const d=n.all(h),c=String(h.identifier).toUpperCase(),S=Wr(c.toLowerCase());let w=0;const k=[],x=n.footnoteCounts.get(c);for(;x!==void 0&&++w<=x;){k.length>0&&k.push({type:"text",value:" "});let g=typeof s=="string"?s:s(u,w);typeof g=="string"&&(g={type:"text",value:g}),k.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+S+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(u,w),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...k)}else d.push(...k);const _={type:"element",tagName:"li",properties:{id:r+"fn-"+S},children:n.wrap(d,!0)};n.patch(h,_),a.push(_)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:b,properties:{...Ea(f),id:"footnote-label"},children:[{type:"text",value:m}]},{type:"text",value:`
|
|
70
|
+
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
|
|
71
|
+
`}]}}const Ra=(function(n){if(n==null)return oC;if(typeof n=="function")return Ma(n);if(typeof n=="object")return Array.isArray(n)?sC(n):lC(n);if(typeof n=="string")return aC(n);throw new Error("Expected function, string, or object as test")});function sC(n){const r=[];let s=-1;for(;++s<n.length;)r[s]=Ra(n[s]);return Ma(o);function o(...m){let b=-1;for(;++b<r.length;)if(r[b].apply(this,m))return!0;return!1}}function lC(n){const r=n;return Ma(s);function s(o){const m=o;let b;for(b in n)if(m[b]!==r[b])return!1;return!0}}function aC(n){return Ma(r);function r(s){return s&&s.type===n}}function Ma(n){return r;function r(s,o,m){return!!(uC(s)&&n.call(this,s,typeof o=="number"?o:void 0,m||void 0))}}function oC(){return!0}function uC(n){return n!==null&&typeof n=="object"&&"type"in n}const Pg=[],cC=!0,xc=!1,hC="skip";function Fg(n,r,s,o){let m;typeof r=="function"&&typeof s!="function"?(o=s,s=r):m=r;const b=Ra(m),f=o?-1:1;a(n,void 0,[])();function a(u,h,d){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const w=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(u.type+(w?"<"+w+">":""))+")"})}return S;function S(){let w=Pg,k,x,y;if((!r||b(u,h,d[d.length-1]||void 0))&&(w=fC(s(u,d)),w[0]===xc))return w;if("children"in u&&u.children){const _=u;if(_.children&&w[0]!==hC)for(x=(o?_.children.length:-1)+f,y=d.concat(_);x>-1&&x<_.children.length;){const g=_.children[x];if(k=a(g,x,y)(),k[0]===xc)return k;x=typeof k[1]=="number"?k[1]:x+f}}return w}}}function fC(n){return Array.isArray(n)?n:typeof n=="number"?[cC,n]:n==null?Pg:[n]}function Gc(n,r,s,o){let m,b,f;typeof r=="function"&&typeof s!="function"?(b=void 0,f=r,m=s):(b=r,f=s,m=o),Fg(n,b,a,m);function a(u,h){const d=h[h.length-1],c=d?d.children.indexOf(u):void 0;return f(u,c,d)}}const Ec={}.hasOwnProperty,dC={};function pC(n,r){const s=r||dC,o=new Map,m=new Map,b=new Map,f={...Xb,...s.handlers},a={all:h,applyData:gC,definitionById:o,footnoteById:m,footnoteCounts:b,footnoteOrder:[],handlers:f,one:u,options:s,patch:mC,wrap:vC};return Gc(n,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?o:m,S=String(d.identifier).toUpperCase();c.has(S)||c.set(S,d)}}),a;function u(d,c){const S=d.type,w=a.handlers[S];if(Ec.call(a.handlers,S)&&w)return w(a,d,c);if(a.options.passThrough&&a.options.passThrough.includes(S)){if("children"in d){const{children:x,...y}=d,_=Ea(y);return _.children=a.all(d),_}return Ea(d)}return(a.options.unknownHandler||_C)(a,d,c)}function h(d){const c=[];if("children"in d){const S=d.children;let w=-1;for(;++w<S.length;){const k=a.one(S[w],d);if(k){if(w&&S[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=zm(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=zm(x.value))}Array.isArray(k)?c.push(...k):c.push(k)}}}return c}}function mC(n,r){n.position&&(r.position=ny(n))}function gC(n,r){let s=r;if(n&&n.data){const o=n.data.hName,m=n.data.hChildren,b=n.data.hProperties;if(typeof o=="string")if(s.type==="element")s.tagName=o;else{const f="children"in s?s.children:[s];s={type:"element",tagName:o,properties:{},children:f}}s.type==="element"&&b&&Object.assign(s.properties,Ea(b)),"children"in s&&s.children&&m!==null&&m!==void 0&&(s.children=m)}return s}function _C(n,r){const s=r.data||{},o="value"in r&&!(Ec.call(s,"hProperties")||Ec.call(s,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:n.all(r)};return n.patch(r,o),n.applyData(r,o)}function vC(n,r){const s=[];let o=-1;for(r&&s.push({type:"text",value:`
|
|
72
|
+
`});++o<n.length;)o&&s.push({type:"text",value:`
|
|
73
|
+
`}),s.push(n[o]);return r&&n.length>0&&s.push({type:"text",value:`
|
|
74
|
+
`}),s}function zm(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function Hm(n,r){const s=pC(n,r),o=s.one(n,void 0),m=rC(s),b=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return m&&b.children.push({type:"text",value:`
|
|
75
|
+
`},m),b}function yC(n,r){return n&&"run"in n?async function(s,o){const m=Hm(s,{file:o,...r});await n.run(m,o)}:function(s,o){return Hm(s,{file:o,...n||r})}}function Im(n){if(n)throw n}var sc,Um;function SC(){if(Um)return sc;Um=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,m=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},b=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var d=n.call(h,"constructor"),c=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!c)return!1;var S;for(S in h);return typeof S>"u"||n.call(h,S)},f=function(h,d){s&&d.name==="__proto__"?s(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},a=function(h,d){if(d==="__proto__")if(n.call(h,d)){if(o)return o(h,d).value}else return;return h[d]};return sc=function u(){var h,d,c,S,w,k,x=arguments[0],y=1,_=arguments.length,g=!1;for(typeof x=="boolean"&&(g=x,x=arguments[1]||{},y=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});y<_;++y)if(h=arguments[y],h!=null)for(d in h)c=a(x,d),S=a(h,d),x!==S&&(g&&S&&(b(S)||(w=m(S)))?(w?(w=!1,k=c&&m(c)?c:[]):k=c&&b(c)?c:{},f(x,{name:d,newValue:u(g,k,S)})):typeof S<"u"&&f(x,{name:d,newValue:S}));return x},sc}var bC=SC();const lc=ng(bC);function kc(n){if(typeof n!="object"||n===null)return!1;const r=Object.getPrototypeOf(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function CC(){const n=[],r={run:s,use:o};return r;function s(...m){let b=-1;const f=m.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);a(null,...m);function a(u,...h){const d=n[++b];let c=-1;if(u){f(u);return}for(;++c<m.length;)(h[c]===null||h[c]===void 0)&&(h[c]=m[c]);m=h,d?wC(d,a)(...h):f(null,...h)}}function o(m){if(typeof m!="function")throw new TypeError("Expected `middelware` to be a function, not "+m);return n.push(m),r}}function wC(n,r){let s;return o;function o(...f){const a=n.length>f.length;let u;a&&f.push(m);try{u=n.apply(this,f)}catch(h){const d=h;if(a&&s)throw d;return m(d)}a||(u&&u.then&&typeof u.then=="function"?u.then(b,m):u instanceof Error?m(u):b(u))}function m(f,...a){s||(s=!0,r(f,...a))}function b(f){m(null,f)}}const On={basename:xC,dirname:EC,extname:kC,join:AC,sep:"/"};function xC(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');tl(n);let s=0,o=-1,m=n.length,b;if(r===void 0||r.length===0||r.length>n.length){for(;m--;)if(n.codePointAt(m)===47){if(b){s=m+1;break}}else o<0&&(b=!0,o=m+1);return o<0?"":n.slice(s,o)}if(r===n)return"";let f=-1,a=r.length-1;for(;m--;)if(n.codePointAt(m)===47){if(b){s=m+1;break}}else f<0&&(b=!0,f=m+1),a>-1&&(n.codePointAt(m)===r.codePointAt(a--)?a<0&&(o=m):(a=-1,o=f));return s===o?o=f:o<0&&(o=n.length),n.slice(s,o)}function EC(n){if(tl(n),n.length===0)return".";let r=-1,s=n.length,o;for(;--s;)if(n.codePointAt(s)===47){if(o){r=s;break}}else o||(o=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function kC(n){tl(n);let r=n.length,s=-1,o=0,m=-1,b=0,f;for(;r--;){const a=n.codePointAt(r);if(a===47){if(f){o=r+1;break}continue}s<0&&(f=!0,s=r+1),a===46?m<0?m=r:b!==1&&(b=1):m>-1&&(b=-1)}return m<0||s<0||b===0||b===1&&m===s-1&&m===o+1?"":n.slice(m,s)}function AC(...n){let r=-1,s;for(;++r<n.length;)tl(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":TC(s)}function TC(n){tl(n);const r=n.codePointAt(0)===47;let s=DC(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function DC(n,r){let s="",o=0,m=-1,b=0,f=-1,a,u;for(;++f<=n.length;){if(f<n.length)a=n.codePointAt(f);else{if(a===47)break;a=47}if(a===47){if(!(m===f-1||b===1))if(m!==f-1&&b===2){if(s.length<2||o!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(u=s.lastIndexOf("/"),u!==s.length-1){u<0?(s="",o=0):(s=s.slice(0,u),o=s.length-1-s.lastIndexOf("/")),m=f,b=0;continue}}else if(s.length>0){s="",o=0,m=f,b=0;continue}}r&&(s=s.length>0?s+"/..":"..",o=2)}else s.length>0?s+="/"+n.slice(m+1,f):s=n.slice(m+1,f),o=f-m-1;m=f,b=0}else a===46&&b>-1?b++:b=-1}return s}function tl(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const RC={cwd:MC};function MC(){return"/"}function Ac(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function LC(n){if(typeof n=="string")n=new URL(n);else if(!Ac(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return OC(n)}function OC(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=n.pathname;let s=-1;for(;++s<r.length;)if(r.codePointAt(s)===37&&r.codePointAt(s+1)===50){const o=r.codePointAt(s+2);if(o===70||o===102){const m=new TypeError("File URL path must not include encoded / characters");throw m.code="ERR_INVALID_FILE_URL_PATH",m}}return decodeURIComponent(r)}const ac=["history","path","basename","stem","extname","dirname"];class qg{constructor(r){let s;r?Ac(r)?s={path:r}:typeof r=="string"||BC(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":RC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<ac.length;){const b=ac[o];b in s&&s[b]!==void 0&&s[b]!==null&&(this[b]=b==="history"?[...s[b]]:s[b])}let m;for(m in s)ac.includes(m)||(this[m]=s[m])}get basename(){return typeof this.path=="string"?On.basename(this.path):void 0}set basename(r){uc(r,"basename"),oc(r,"basename"),this.path=On.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?On.dirname(this.path):void 0}set dirname(r){Pm(this.basename,"dirname"),this.path=On.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?On.extname(this.path):void 0}set extname(r){if(oc(r,"extname"),Pm(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=On.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Ac(r)&&(r=LC(r)),uc(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?On.basename(this.path,this.extname):void 0}set stem(r){uc(r,"stem"),oc(r,"stem"),this.path=On.join(this.dirname||"",r+(this.extname||""))}fail(r,s,o){const m=this.message(r,s,o);throw m.fatal=!0,m}info(r,s,o){const m=this.message(r,s,o);return m.fatal=void 0,m}message(r,s,o){const m=new qt(r,s,o);return this.path&&(m.name=this.path+":"+m.name,m.file=this.path),m.fatal=!1,this.messages.push(m),m}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function oc(n,r){if(n&&n.includes(On.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+On.sep+"`")}function uc(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function Pm(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function BC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const NC=(function(n){const o=this.constructor.prototype,m=o[n],b=function(){return m.apply(b,arguments)};return Object.setPrototypeOf(b,o),b}),jC={}.hasOwnProperty;class $c extends NC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=CC()}copy(){const r=new $c;let s=-1;for(;++s<this.attachers.length;){const o=this.attachers[s];r.use(...o)}return r.data(lc(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(fc("data",this.frozen),this.namespace[r]=s,this):jC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(fc("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[s,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const m=s.call(r,...o);typeof m=="function"&&this.transformers.use(m)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=va(r),o=this.parser||this.Parser;return cc("parse",o),o(String(s),s)}process(r,s){const o=this;return this.freeze(),cc("process",this.parser||this.Parser),hc("process",this.compiler||this.Compiler),s?m(void 0,s):new Promise(m);function m(b,f){const a=va(r),u=o.parse(a);o.run(u,a,function(d,c,S){if(d||!c||!S)return h(d);const w=c,k=o.stringify(w,S);IC(k)?S.value=k:S.result=k,h(d,S)});function h(d,c){d||!c?f(d):b?b(c):s(void 0,c)}}}processSync(r){let s=!1,o;return this.freeze(),cc("processSync",this.parser||this.Parser),hc("processSync",this.compiler||this.Compiler),this.process(r,m),qm("processSync","process",s),o;function m(b,f){s=!0,Im(b),o=f}}run(r,s,o){Fm(r),this.freeze();const m=this.transformers;return!o&&typeof s=="function"&&(o=s,s=void 0),o?b(void 0,o):new Promise(b);function b(f,a){const u=va(s);m.run(r,u,h);function h(d,c,S){const w=c||r;d?a(d):f?f(w):o(void 0,w,S)}}}runSync(r,s){let o=!1,m;return this.run(r,s,b),qm("runSync","run",o),m;function b(f,a){Im(f),m=a,o=!0}}stringify(r,s){this.freeze();const o=va(s),m=this.compiler||this.Compiler;return hc("stringify",m),Fm(r),m(r,o)}use(r,...s){const o=this.attachers,m=this.namespace;if(fc("use",this.frozen),r!=null)if(typeof r=="function")u(r,s);else if(typeof r=="object")Array.isArray(r)?a(r):f(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function b(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[d,...c]=h;u(d,c)}else f(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function f(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(h.plugins),h.settings&&(m.settings=lc(!0,m.settings,h.settings))}function a(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const c=h[d];b(c)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,d){let c=-1,S=-1;for(;++c<o.length;)if(o[c][0]===h){S=c;break}if(S===-1)o.push([h,...d]);else if(d.length>0){let[w,...k]=d;const x=o[S][1];kc(x)&&kc(w)&&(w=lc(!0,x,w)),o[S]=[h,w,...k]}}}}const zC=new $c().freeze();function cc(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function hc(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function fc(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Fm(n){if(!kc(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function qm(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function va(n){return HC(n)?n:new qg(n)}function HC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function IC(n){return typeof n=="string"||UC(n)}function UC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const PC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Vm=[],Gm={allowDangerousHtml:!0},FC=/^(https?|ircs?|mailto|xmpp)$/i,qC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function VC(n){const r=GC(n),s=$C(n);return YC(r.runSync(r.parse(s),s),n)}function GC(n){const r=n.rehypePlugins||Vm,s=n.remarkPlugins||Vm,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Gm}:Gm;return zC().use(xb).use(s).use(yC,o).use(r)}function $C(n){const r=n.children||"",s=new qg;return typeof r=="string"&&(s.value=r),s}function YC(n,r){const s=r.allowedElements,o=r.allowElement,m=r.components,b=r.disallowedElements,f=r.skipHtml,a=r.unwrapDisallowed,u=r.urlTransform||KC;for(const d of qC)Object.hasOwn(r,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+PC+d.id,void 0);return Gc(n,h),ay(n,{Fragment:N.Fragment,components:m,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function h(d,c,S){if(d.type==="raw"&&S&&typeof c=="number")return f?S.children.splice(c,1):S.children[c]={type:"text",value:d.value},c;if(d.type==="element"){let w;for(w in nc)if(Object.hasOwn(nc,w)&&Object.hasOwn(d.properties,w)){const k=d.properties[w],x=nc[w];(x===null||x.includes(d.tagName))&&(d.properties[w]=u(String(k||""),w,d))}}if(d.type==="element"){let w=s?!s.includes(d.tagName):b?b.includes(d.tagName):!1;if(!w&&o&&typeof c=="number"&&(w=!o(d,c,S)),w&&S&&typeof c=="number")return a&&d.children?S.children.splice(c,1,...d.children):S.children.splice(c,1),c}}}function KC(n){const r=n.indexOf(":"),s=n.indexOf("?"),o=n.indexOf("#"),m=n.indexOf("/");return r===-1||m!==-1&&r>m||s!==-1&&r>s||o!==-1&&r>o||FC.test(n.slice(0,r))?n:""}function $m(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let o=0,m=s.indexOf(r);for(;m!==-1;)o++,m=s.indexOf(r,m+r.length);return o}function WC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function XC(n,r,s){const m=Ra((s||{}).ignore||[]),b=QC(r);let f=-1;for(;++f<b.length;)Fg(n,"text",a);function a(h,d){let c=-1,S;for(;++c<d.length;){const w=d[c],k=S?S.children:void 0;if(m(w,k?k.indexOf(w):void 0,S))return;S=w}if(S)return u(h,d)}function u(h,d){const c=d[d.length-1],S=b[f][0],w=b[f][1];let k=0;const y=c.children.indexOf(h);let _=!1,g=[];S.lastIndex=0;let v=S.exec(h.value);for(;v;){const A=v.index,M={index:v.index,input:v.input,stack:[...d,h]};let D=w(...v,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?S.lastIndex=A+1:(k!==A&&g.push({type:"text",value:h.value.slice(k,A)}),Array.isArray(D)?g.push(...D):D&&g.push(D),k=A+v[0].length,_=!0),!S.global)break;v=S.exec(h.value)}return _?(k<h.value.length&&g.push({type:"text",value:h.value.slice(k)}),c.children.splice(y,1,...g)):g=[h],y+g.length}}function QC(n){const r=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const s=!n[0]||Array.isArray(n[0])?n:[n];let o=-1;for(;++o<s.length;){const m=s[o];r.push([ZC(m[0]),JC(m[1])])}return r}function ZC(n){return typeof n=="string"?new RegExp(WC(n),"g"):n}function JC(n){return typeof n=="function"?n:function(){return n}}const dc="phrasing",pc=["autolink","link","image","label"];function ew(){return{transforms:[aw],enter:{literalAutolink:nw,literalAutolinkEmail:mc,literalAutolinkHttp:mc,literalAutolinkWww:mc},exit:{literalAutolink:lw,literalAutolinkEmail:sw,literalAutolinkHttp:iw,literalAutolinkWww:rw}}}function tw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:dc,notInConstruct:pc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:dc,notInConstruct:pc},{character:":",before:"[ps]",after:"\\/",inConstruct:dc,notInConstruct:pc}]}}function nw(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function mc(n){this.config.enter.autolinkProtocol.call(this,n)}function iw(n){this.config.exit.autolinkProtocol.call(this,n)}function rw(n){this.config.exit.data.call(this,n);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(n)}function sw(n){this.config.exit.autolinkEmail.call(this,n)}function lw(n){this.exit(n)}function aw(n){XC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ow],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),uw]],{ignore:["link","linkReference"]})}function ow(n,r,s,o,m){let b="";if(!Vg(m)||(/^w/i.test(r)&&(s=r+s,r="",b="http://"),!cw(s)))return!1;const f=hw(s+o);if(!f[0])return!1;const a={type:"link",title:null,url:b+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[a,{type:"text",value:f[1]}]:a}function uw(n,r,s,o){return!Vg(o,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function cw(n){const r=n.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function hw(n){const r=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let s=r[0],o=s.indexOf(")");const m=$m(n,"(");let b=$m(n,")");for(;o!==-1&&m>b;)n+=s.slice(0,o+1),s=s.slice(o+1),o=s.indexOf(")"),b++;return[n,s]}function Vg(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||er(s)||Aa(s))&&(!r||s!==47)}Gg.peek=Sw;function fw(){this.buffer()}function dw(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function pw(){this.buffer()}function mw(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function gw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=An(this.sliceSerialize(n)).toLowerCase(),s.label=r}function _w(n){this.exit(n)}function vw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=An(this.sliceSerialize(n)).toLowerCase(),s.label=r}function yw(n){this.exit(n)}function Sw(){return"["}function Gg(n,r,s,o){const m=s.createTracker(o);let b=m.move("[^");const f=s.enter("footnoteReference"),a=s.enter("reference");return b+=m.move(s.safe(s.associationId(n),{after:"]",before:b})),a(),f(),b+=m.move("]"),b}function bw(){return{enter:{gfmFootnoteCallString:fw,gfmFootnoteCall:dw,gfmFootnoteDefinitionLabelString:pw,gfmFootnoteDefinition:mw},exit:{gfmFootnoteCallString:gw,gfmFootnoteCall:_w,gfmFootnoteDefinitionLabelString:vw,gfmFootnoteDefinition:yw}}}function Cw(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:Gg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(o,m,b,f){const a=b.createTracker(f);let u=a.move("[^");const h=b.enter("footnoteDefinition"),d=b.enter("label");return u+=a.move(b.safe(b.associationId(o),{before:u,after:"]"})),d(),u+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),u+=a.move((r?`
|
|
76
|
+
`:" ")+b.indentLines(b.containerFlow(o,a.current()),r?$g:ww))),h(),u}}function ww(n,r,s){return r===0?n:$g(n,r,s)}function $g(n,r,s){return(s?"":" ")+n}const xw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Yg.peek=Dw;function Ew(){return{canContainEols:["delete"],enter:{strikethrough:Aw},exit:{strikethrough:Tw}}}function kw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xw}],handlers:{delete:Yg}}}function Aw(n){this.enter({type:"delete",children:[]},n)}function Tw(n){this.exit(n)}function Yg(n,r,s,o){const m=s.createTracker(o),b=s.enter("strikethrough");let f=m.move("~~");return f+=s.containerPhrasing(n,{...m.current(),before:f,after:"~"}),f+=m.move("~~"),b(),f}function Dw(){return"~"}function Rw(n){return n.length}function Mw(n,r){const s=r||{},o=(s.align||[]).concat(),m=s.stringLength||Rw,b=[],f=[],a=[],u=[];let h=0,d=-1;for(;++d<n.length;){const x=[],y=[];let _=-1;for(n[d].length>h&&(h=n[d].length);++_<n[d].length;){const g=Lw(n[d][_]);if(s.alignDelimiters!==!1){const v=m(g);y[_]=v,(u[_]===void 0||v>u[_])&&(u[_]=v)}x.push(g)}f[d]=x,a[d]=y}let c=-1;if(typeof o=="object"&&"length"in o)for(;++c<h;)b[c]=Ym(o[c]);else{const x=Ym(o);for(;++c<h;)b[c]=x}c=-1;const S=[],w=[];for(;++c<h;){const x=b[c];let y="",_="";x===99?(y=":",_=":"):x===108?y=":":x===114&&(_=":");let g=s.alignDelimiters===!1?1:Math.max(1,u[c]-y.length-_.length);const v=y+"-".repeat(g)+_;s.alignDelimiters!==!1&&(g=y.length+g+_.length,g>u[c]&&(u[c]=g),w[c]=g),S[c]=v}f.splice(1,0,S),a.splice(1,0,w),d=-1;const k=[];for(;++d<f.length;){const x=f[d],y=a[d];c=-1;const _=[];for(;++c<h;){const g=x[c]||"";let v="",A="";if(s.alignDelimiters!==!1){const M=u[c]-(y[c]||0),D=b[c];D===114?v=" ".repeat(M):D===99?M%2?(v=" ".repeat(M/2+.5),A=" ".repeat(M/2-.5)):(v=" ".repeat(M/2),A=v):A=" ".repeat(M)}s.delimiterStart!==!1&&!c&&_.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&g==="")&&(s.delimiterStart!==!1||c)&&_.push(" "),s.alignDelimiters!==!1&&_.push(v),_.push(g),s.alignDelimiters!==!1&&_.push(A),s.padding!==!1&&_.push(" "),(s.delimiterEnd!==!1||c!==h-1)&&_.push("|")}k.push(s.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return k.join(`
|
|
77
|
+
`)}function Lw(n){return n==null?"":String(n)}function Ym(n){const r=typeof n=="string"?n.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function Ow(n,r,s,o){const m=s.enter("blockquote"),b=s.createTracker(o);b.move("> "),b.shift(2);const f=s.indentLines(s.containerFlow(n,b.current()),Bw);return m(),f}function Bw(n,r,s){return">"+(s?"":" ")+n}function Nw(n,r){return Km(n,r.inConstruct,!0)&&!Km(n,r.notInConstruct,!1)}function Km(n,r,s){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return s;let o=-1;for(;++o<r.length;)if(n.includes(r[o]))return!0;return!1}function Wm(n,r,s,o){let m=-1;for(;++m<s.unsafe.length;)if(s.unsafe[m].character===`
|
|
78
|
+
`&&Nw(s.stack,s.unsafe[m]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
79
|
+
`}function jw(n,r){const s=String(n);let o=s.indexOf(r),m=o,b=0,f=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===m?++b>f&&(f=b):b=1,m=o+r.length,o=s.indexOf(r,m);return f}function zw(n,r){return!!(r.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function Hw(n){const r=n.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function Iw(n,r,s,o){const m=Hw(s),b=n.value||"",f=m==="`"?"GraveAccent":"Tilde";if(zw(n,s)){const c=s.enter("codeIndented"),S=s.indentLines(b,Uw);return c(),S}const a=s.createTracker(o),u=m.repeat(Math.max(jw(b,m)+1,3)),h=s.enter("codeFenced");let d=a.move(u);if(n.lang){const c=s.enter(`codeFencedLang${f}`);d+=a.move(s.safe(n.lang,{before:d,after:" ",encode:["`"],...a.current()})),c()}if(n.lang&&n.meta){const c=s.enter(`codeFencedMeta${f}`);d+=a.move(" "),d+=a.move(s.safe(n.meta,{before:d,after:`
|
|
80
|
+
`,encode:["`"],...a.current()})),c()}return d+=a.move(`
|
|
81
|
+
`),b&&(d+=a.move(b+`
|
|
82
|
+
`)),d+=a.move(u),h(),d}function Uw(n,r,s){return(s?"":" ")+n}function Yc(n){const r=n.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function Pw(n,r,s,o){const m=Yc(s),b=m==='"'?"Quote":"Apostrophe",f=s.enter("definition");let a=s.enter("label");const u=s.createTracker(o);let h=u.move("[");return h+=u.move(s.safe(s.associationId(n),{before:h,after:"]",...u.current()})),h+=u.move("]: "),a(),!n.url||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(s.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=s.enter("destinationRaw"),h+=u.move(s.safe(n.url,{before:h,after:n.title?" ":`
|
|
83
|
+
`,...u.current()}))),a(),n.title&&(a=s.enter(`title${b}`),h+=u.move(" "+m),h+=u.move(s.safe(n.title,{before:h,after:m,...u.current()})),h+=u.move(m),a()),f(),h}function Fw(n){const r=n.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Zs(n){return"&#x"+n.toString(16).toUpperCase()+";"}function ka(n,r,s){const o=$r(n),m=$r(r);return o===void 0?m===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:m===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?m===void 0?{inside:!1,outside:!1}:m===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:m===void 0?{inside:!1,outside:!1}:m===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Kg.peek=qw;function Kg(n,r,s,o){const m=Fw(s),b=s.enter("emphasis"),f=s.createTracker(o),a=f.move(m);let u=f.move(s.containerPhrasing(n,{after:m,before:a,...f.current()}));const h=u.charCodeAt(0),d=ka(o.before.charCodeAt(o.before.length-1),h,m);d.inside&&(u=Zs(h)+u.slice(1));const c=u.charCodeAt(u.length-1),S=ka(o.after.charCodeAt(0),c,m);S.inside&&(u=u.slice(0,-1)+Zs(c));const w=f.move(m);return b(),s.attentionEncodeSurroundingInfo={after:S.outside,before:d.outside},a+u+w}function qw(n,r,s){return s.options.emphasis||"*"}function Vw(n,r){let s=!1;return Gc(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return s=!0,xc}),!!((!n.depth||n.depth<3)&&Hc(n)&&(r.options.setext||s))}function Gw(n,r,s,o){const m=Math.max(Math.min(6,n.depth||1),1),b=s.createTracker(o);if(Vw(n,s)){const d=s.enter("headingSetext"),c=s.enter("phrasing"),S=s.containerPhrasing(n,{...b.current(),before:`
|
|
84
|
+
`,after:`
|
|
85
|
+
`});return c(),d(),S+`
|
|
86
|
+
`+(m===1?"=":"-").repeat(S.length-(Math.max(S.lastIndexOf("\r"),S.lastIndexOf(`
|
|
87
|
+
`))+1))}const f="#".repeat(m),a=s.enter("headingAtx"),u=s.enter("phrasing");b.move(f+" ");let h=s.containerPhrasing(n,{before:"# ",after:`
|
|
88
|
+
`,...b.current()});return/^[\t ]/.test(h)&&(h=Zs(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),u(),a(),h}Wg.peek=$w;function Wg(n){return n.value||""}function $w(){return"<"}Xg.peek=Yw;function Xg(n,r,s,o){const m=Yc(s),b=m==='"'?"Quote":"Apostrophe",f=s.enter("image");let a=s.enter("label");const u=s.createTracker(o);let h=u.move("![");return h+=u.move(s.safe(n.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(s.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(a=s.enter("destinationRaw"),h+=u.move(s.safe(n.url,{before:h,after:n.title?" ":")",...u.current()}))),a(),n.title&&(a=s.enter(`title${b}`),h+=u.move(" "+m),h+=u.move(s.safe(n.title,{before:h,after:m,...u.current()})),h+=u.move(m),a()),h+=u.move(")"),f(),h}function Yw(){return"!"}Qg.peek=Kw;function Qg(n,r,s,o){const m=n.referenceType,b=s.enter("imageReference");let f=s.enter("label");const a=s.createTracker(o);let u=a.move("![");const h=s.safe(n.alt,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),f();const d=s.stack;s.stack=[],f=s.enter("reference");const c=s.safe(s.associationId(n),{before:u,after:"]",...a.current()});return f(),s.stack=d,b(),m==="full"||!h||h!==c?u+=a.move(c+"]"):m==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Kw(){return"!"}Zg.peek=Ww;function Zg(n,r,s){let o=n.value||"",m="`",b=-1;for(;new RegExp("(^|[^`])"+m+"([^`]|$)").test(o);)m+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++b<s.unsafe.length;){const f=s.unsafe[b],a=s.compilePattern(f);let u;if(f.atBreak)for(;u=a.exec(o);){let h=u.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(u.index+1)}}return m+o+m}function Ww(){return"`"}function Jg(n,r){const s=Hc(n);return!!(!r.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(s===n.url||"mailto:"+s===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}e_.peek=Xw;function e_(n,r,s,o){const m=Yc(s),b=m==='"'?"Quote":"Apostrophe",f=s.createTracker(o);let a,u;if(Jg(n,s)){const d=s.stack;s.stack=[],a=s.enter("autolink");let c=f.move("<");return c+=f.move(s.containerPhrasing(n,{before:c,after:">",...f.current()})),c+=f.move(">"),a(),s.stack=d,c}a=s.enter("link"),u=s.enter("label");let h=f.move("[");return h+=f.move(s.containerPhrasing(n,{before:h,after:"](",...f.current()})),h+=f.move("]("),u(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(u=s.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(s.safe(n.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(u=s.enter("destinationRaw"),h+=f.move(s.safe(n.url,{before:h,after:n.title?" ":")",...f.current()}))),u(),n.title&&(u=s.enter(`title${b}`),h+=f.move(" "+m),h+=f.move(s.safe(n.title,{before:h,after:m,...f.current()})),h+=f.move(m),u()),h+=f.move(")"),a(),h}function Xw(n,r,s){return Jg(n,s)?"<":"["}t_.peek=Qw;function t_(n,r,s,o){const m=n.referenceType,b=s.enter("linkReference");let f=s.enter("label");const a=s.createTracker(o);let u=a.move("[");const h=s.containerPhrasing(n,{before:u,after:"]",...a.current()});u+=a.move(h+"]["),f();const d=s.stack;s.stack=[],f=s.enter("reference");const c=s.safe(s.associationId(n),{before:u,after:"]",...a.current()});return f(),s.stack=d,b(),m==="full"||!h||h!==c?u+=a.move(c+"]"):m==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Qw(){return"["}function Kc(n){const r=n.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function Zw(n){const r=Kc(n),s=n.options.bulletOther;if(!s)return r==="*"?"-":"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(s===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+s+"`) to be different");return s}function Jw(n){const r=n.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function n_(n){const r=n.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function ex(n,r,s,o){const m=s.enter("list"),b=s.bulletCurrent;let f=n.ordered?Jw(s):Kc(s);const a=n.ordered?f==="."?")":".":Zw(s);let u=r&&s.bulletLastUsed?f===s.bulletLastUsed:!1;if(!n.ordered){const d=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&d&&(!d.children||!d.children[0])&&s.stack[s.stack.length-1]==="list"&&s.stack[s.stack.length-2]==="listItem"&&s.stack[s.stack.length-3]==="list"&&s.stack[s.stack.length-4]==="listItem"&&s.indexStack[s.indexStack.length-1]===0&&s.indexStack[s.indexStack.length-2]===0&&s.indexStack[s.indexStack.length-3]===0&&(u=!0),n_(s)===f&&d){let c=-1;for(;++c<n.children.length;){const S=n.children[c];if(S&&S.type==="listItem"&&S.children&&S.children[0]&&S.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(f=a),s.bulletCurrent=f;const h=s.containerFlow(n,o);return s.bulletLastUsed=f,s.bulletCurrent=b,m(),h}function tx(n){const r=n.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function nx(n,r,s,o){const m=tx(s);let b=s.bulletCurrent||Kc(s);r&&r.type==="list"&&r.ordered&&(b=(typeof r.start=="number"&&r.start>-1?r.start:1)+(s.options.incrementListMarker===!1?0:r.children.indexOf(n))+b);let f=b.length+1;(m==="tab"||m==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const a=s.createTracker(o);a.move(b+" ".repeat(f-b.length)),a.shift(f);const u=s.enter("listItem"),h=s.indentLines(s.containerFlow(n,a.current()),d);return u(),h;function d(c,S,w){return S?(w?"":" ".repeat(f))+c:(w?b:b+" ".repeat(f-b.length))+c}}function ix(n,r,s,o){const m=s.enter("paragraph"),b=s.enter("phrasing"),f=s.containerPhrasing(n,o);return b(),m(),f}const rx=Ra(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function sx(n,r,s,o){return(n.children.some(function(f){return rx(f)})?s.containerPhrasing:s.containerFlow).call(s,n,o)}function lx(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}i_.peek=ax;function i_(n,r,s,o){const m=lx(s),b=s.enter("strong"),f=s.createTracker(o),a=f.move(m+m);let u=f.move(s.containerPhrasing(n,{after:m,before:a,...f.current()}));const h=u.charCodeAt(0),d=ka(o.before.charCodeAt(o.before.length-1),h,m);d.inside&&(u=Zs(h)+u.slice(1));const c=u.charCodeAt(u.length-1),S=ka(o.after.charCodeAt(0),c,m);S.inside&&(u=u.slice(0,-1)+Zs(c));const w=f.move(m+m);return b(),s.attentionEncodeSurroundingInfo={after:S.outside,before:d.outside},a+u+w}function ax(n,r,s){return s.options.strong||"*"}function ox(n,r,s,o){return s.safe(n.value,o)}function ux(n){const r=n.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function cx(n,r,s){const o=(n_(s)+(s.options.ruleSpaces?" ":"")).repeat(ux(s));return s.options.ruleSpaces?o.slice(0,-1):o}const r_={blockquote:Ow,break:Wm,code:Iw,definition:Pw,emphasis:Kg,hardBreak:Wm,heading:Gw,html:Wg,image:Xg,imageReference:Qg,inlineCode:Zg,link:e_,linkReference:t_,list:ex,listItem:nx,paragraph:ix,root:sx,strong:i_,text:ox,thematicBreak:cx};function hx(){return{enter:{table:fx,tableData:Xm,tableHeader:Xm,tableRow:px},exit:{codeText:mx,table:dx,tableData:gc,tableHeader:gc,tableRow:gc}}}function fx(n){const r=n._align;this.enter({type:"table",align:r.map(function(s){return s==="none"?null:s}),children:[]},n),this.data.inTable=!0}function dx(n){this.exit(n),this.data.inTable=void 0}function px(n){this.enter({type:"tableRow",children:[]},n)}function gc(n){this.exit(n)}function Xm(n){this.enter({type:"tableCell",children:[]},n)}function mx(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,gx));const s=this.stack[this.stack.length-1];s.type,s.value=r,this.exit(n)}function gx(n,r){return r==="|"?r:n}function _x(n){const r=n||{},s=r.tableCellPadding,o=r.tablePipeAlign,m=r.stringLength,b=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
89
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:S,table:f,tableCell:u,tableRow:a}};function f(w,k,x,y){return h(d(w,x,y),w.align)}function a(w,k,x,y){const _=c(w,x,y),g=h([_]);return g.slice(0,g.indexOf(`
|
|
90
|
+
`))}function u(w,k,x,y){const _=x.enter("tableCell"),g=x.enter("phrasing"),v=x.containerPhrasing(w,{...y,before:b,after:b});return g(),_(),v}function h(w,k){return Mw(w,{align:k,alignDelimiters:o,padding:s,stringLength:m})}function d(w,k,x){const y=w.children;let _=-1;const g=[],v=k.enter("table");for(;++_<y.length;)g[_]=c(y[_],k,x);return v(),g}function c(w,k,x){const y=w.children;let _=-1;const g=[],v=k.enter("tableRow");for(;++_<y.length;)g[_]=u(y[_],w,k,x);return v(),g}function S(w,k,x){let y=r_.inlineCode(w,k,x);return x.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function vx(){return{exit:{taskListCheckValueChecked:Qm,taskListCheckValueUnchecked:Qm,paragraph:Sx}}}function yx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:bx}}}function Qm(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function Sx(n){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const o=s.children[0];if(o&&o.type==="text"){const m=r.children;let b=-1,f;for(;++b<m.length;){const a=m[b];if(a.type==="paragraph"){f=a;break}}f===s&&(o.value=o.value.slice(1),o.value.length===0?s.children.shift():s.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,s.position.start=Object.assign({},o.position.start)))}}this.exit(n)}function bx(n,r,s,o){const m=n.children[0],b=typeof n.checked=="boolean"&&m&&m.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",a=s.createTracker(o);b&&a.move(f);let u=r_.listItem(n,r,s,{...o,...a.current()});return b&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(d){return d+f}}function Cx(){return[ew(),bw(),Ew(),hx(),vx()]}function wx(n){return{extensions:[tw(),Cw(n),kw(),_x(n),yx()]}}const xx={tokenize:Rx,partial:!0},s_={tokenize:Mx,partial:!0},l_={tokenize:Lx,partial:!0},a_={tokenize:Ox,partial:!0},Ex={tokenize:Bx,partial:!0},o_={name:"wwwAutolink",tokenize:Tx,previous:c_},u_={name:"protocolAutolink",tokenize:Dx,previous:h_},ei={name:"emailAutolink",tokenize:Ax,previous:f_},Bn={};function kx(){return{text:Bn}}let Qi=48;for(;Qi<123;)Bn[Qi]=ei,Qi++,Qi===58?Qi=65:Qi===91&&(Qi=97);Bn[43]=ei;Bn[45]=ei;Bn[46]=ei;Bn[95]=ei;Bn[72]=[ei,u_];Bn[104]=[ei,u_];Bn[87]=[ei,o_];Bn[119]=[ei,o_];function Ax(n,r,s){const o=this;let m,b;return f;function f(c){return!Tc(c)||!f_.call(o,o.previous)||Wc(o.events)?s(c):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(c))}function a(c){return Tc(c)?(n.consume(c),a):c===64?(n.consume(c),u):s(c)}function u(c){return c===46?n.check(Ex,d,h)(c):c===45||c===95||Ft(c)?(b=!0,n.consume(c),u):d(c)}function h(c){return n.consume(c),m=!0,u}function d(c){return b&&m&&Gt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(c)):s(c)}}function Tx(n,r,s){const o=this;return m;function m(f){return f!==87&&f!==119||!c_.call(o,o.previous)||Wc(o.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(xx,n.attempt(s_,n.attempt(l_,b),s),s)(f))}function b(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function Dx(n,r,s){const o=this;let m="",b=!1;return f;function f(c){return(c===72||c===104)&&h_.call(o,o.previous)&&!Wc(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),m+=String.fromCodePoint(c),n.consume(c),a):s(c)}function a(c){if(Gt(c)&&m.length<5)return m+=String.fromCodePoint(c),n.consume(c),a;if(c===58){const S=m.toLowerCase();if(S==="http"||S==="https")return n.consume(c),u}return s(c)}function u(c){return c===47?(n.consume(c),b?h:(b=!0,u)):s(c)}function h(c){return c===null||wa(c)||at(c)||er(c)||Aa(c)?s(c):n.attempt(s_,n.attempt(l_,d),s)(c)}function d(c){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(c)}}function Rx(n,r,s){let o=0;return m;function m(f){return(f===87||f===119)&&o<3?(o++,n.consume(f),m):f===46&&o===3?(n.consume(f),b):s(f)}function b(f){return f===null?s(f):r(f)}}function Mx(n,r,s){let o,m,b;return f;function f(h){return h===46||h===95?n.check(a_,u,a)(h):h===null||at(h)||er(h)||h!==45&&Aa(h)?u(h):(b=!0,n.consume(h),f)}function a(h){return h===95?o=!0:(m=o,o=void 0),n.consume(h),f}function u(h){return m||o||!b?s(h):r(h)}}function Lx(n,r){let s=0,o=0;return m;function m(f){return f===40?(s++,n.consume(f),m):f===41&&o<s?b(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?n.check(a_,r,b)(f):f===null||at(f)||er(f)?r(f):(n.consume(f),m)}function b(f){return f===41&&o++,n.consume(f),m}}function Ox(n,r,s){return o;function o(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(n.consume(a),o):a===38?(n.consume(a),b):a===93?(n.consume(a),m):a===60||a===null||at(a)||er(a)?r(a):s(a)}function m(a){return a===null||a===40||a===91||at(a)||er(a)?r(a):o(a)}function b(a){return Gt(a)?f(a):s(a)}function f(a){return a===59?(n.consume(a),o):Gt(a)?(n.consume(a),f):s(a)}}function Bx(n,r,s){return o;function o(b){return n.consume(b),m}function m(b){return Ft(b)?s(b):r(b)}}function c_(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||at(n)}function h_(n){return!Gt(n)}function f_(n){return!(n===47||Tc(n))}function Tc(n){return n===43||n===45||n===46||n===95||Ft(n)}function Wc(n){let r=n.length,s=!1;for(;r--;){const o=n[r][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){s=!0;break}if(o._gfmAutolinkLiteralWalkedInto){s=!1;break}}return n.length>0&&!s&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const Nx={tokenize:qx,partial:!0};function jx(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ux,continuation:{tokenize:Px},exit:Fx}},text:{91:{name:"gfmFootnoteCall",tokenize:Ix},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zx,resolveTo:Hx}}}}function zx(n,r,s){const o=this;let m=o.events.length;const b=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let f;for(;m--;){const u=o.events[m][1];if(u.type==="labelImage"){f=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!f||!f._balanced)return s(u);const h=An(o.sliceSerialize({start:f.end,end:o.now()}));return h.codePointAt(0)!==94||!b.includes(h.slice(1))?s(u):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),r(u))}}function Hx(n,r){let s=n.length;for(;s--;)if(n[s][1].type==="labelImage"&&n[s][0]==="enter"){n[s][1];break}n[s+1][1].type="data",n[s+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},n[s+3][1].start),end:Object.assign({},n[n.length-1][1].end)},m={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};m.end.column++,m.end.offset++,m.end._bufferIndex++;const b={type:"gfmFootnoteCallString",start:Object.assign({},m.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},b.start),end:Object.assign({},b.end)},a=[n[s+1],n[s+2],["enter",o,r],n[s+3],n[s+4],["enter",m,r],["exit",m,r],["enter",b,r],["enter",f,r],["exit",f,r],["exit",b,r],n[n.length-2],n[n.length-1],["exit",o,r]];return n.splice(s,n.length-s+1,...a),n}function Ix(n,r,s){const o=this,m=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b=0,f;return a;function a(c){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?s(c):(n.enter("gfmFootnoteCallMarker"),n.consume(c),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(c){if(b>999||c===93&&!f||c===null||c===91||at(c))return s(c);if(c===93){n.exit("chunkString");const S=n.exit("gfmFootnoteCallString");return m.includes(An(o.sliceSerialize(S)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(c)}return at(c)||(f=!0),b++,n.consume(c),c===92?d:h}function d(c){return c===91||c===92||c===93?(n.consume(c),b++,h):h(c)}}function Ux(n,r,s){const o=this,m=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let b,f=0,a;return u;function u(k){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",d):s(k)}function d(k){if(f>999||k===93&&!a||k===null||k===91||at(k))return s(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return b=An(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),S}return at(k)||(a=!0),f++,n.consume(k),k===92?c:d}function c(k){return k===91||k===92||k===93?(n.consume(k),f++,d):d(k)}function S(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),m.includes(b)||m.push(b),We(n,w,"gfmFootnoteDefinitionWhitespace")):s(k)}function w(k){return r(k)}}function Px(n,r,s){return n.check(el,r,n.attempt(Nx,r,s))}function Fx(n){n.exit("gfmFootnoteDefinition")}function qx(n,r,s){const o=this;return We(n,m,"gfmFootnoteDefinitionIndent",5);function m(b){const f=o.events[o.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(b):s(b)}}function Vx(n){let s=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:b,resolveAll:m};return s==null&&(s=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function m(f,a){let u=-1;for(;++u<f.length;)if(f[u][0]==="enter"&&f[u][1].type==="strikethroughSequenceTemporary"&&f[u][1]._close){let h=u;for(;h--;)if(f[h][0]==="exit"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._open&&f[u][1].end.offset-f[u][1].start.offset===f[h][1].end.offset-f[h][1].start.offset){f[u][1].type="strikethroughSequence",f[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},f[h][1].start),end:Object.assign({},f[u][1].end)},c={type:"strikethroughText",start:Object.assign({},f[h][1].end),end:Object.assign({},f[u][1].start)},S=[["enter",d,a],["enter",f[h][1],a],["exit",f[h][1],a],["enter",c,a]],w=a.parser.constructs.insideSpan.null;w&&cn(S,S.length,0,Ta(w,f.slice(h+1,u),a)),cn(S,S.length,0,[["exit",c,a],["enter",f[u][1],a],["exit",f[u][1],a],["exit",d,a]]),cn(f,h-1,u-h+3,S),u=h+S.length-2;break}}for(u=-1;++u<f.length;)f[u][1].type==="strikethroughSequenceTemporary"&&(f[u][1].type="data");return f}function b(f,a,u){const h=this.previous,d=this.events;let c=0;return S;function S(k){return h===126&&d[d.length-1][1].type!=="characterEscape"?u(k):(f.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const x=$r(h);if(k===126)return c>1?u(k):(f.consume(k),c++,w);if(c<2&&!s)return u(k);const y=f.exit("strikethroughSequenceTemporary"),_=$r(k);return y._open=!_||_===2&&!!x,y._close=!x||x===2&&!!_,a(k)}}}class Gx{constructor(){this.map=[]}add(r,s,o){$x(this,r,s,o)}consume(r){if(this.map.sort(function(b,f){return b[0]-f[0]}),this.map.length===0)return;let s=this.map.length;const o=[];for(;s>0;)s-=1,o.push(r.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),r.length=this.map[s][0];o.push(r.slice()),r.length=0;let m=o.pop();for(;m;){for(const b of m)r.push(b);m=o.pop()}this.map.length=0}}function $x(n,r,s,o){let m=0;if(!(s===0&&o.length===0)){for(;m<n.map.length;){if(n.map[m][0]===r){n.map[m][1]+=s,n.map[m][2].push(...o);return}m+=1}n.map.push([r,s,o])}}function Yx(n,r){let s=!1;const o=[];for(;r<n.length;){const m=n[r];if(s){if(m[0]==="enter")m[1].type==="tableContent"&&o.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(m[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const b=o.length-1;o[b]=o[b]==="left"?"center":"right"}}else if(m[1].type==="tableDelimiterRow")break}else m[0]==="enter"&&m[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return o}function Kx(){return{flow:{null:{name:"table",tokenize:Wx,resolveAll:Xx}}}}function Wx(n,r,s){const o=this;let m=0,b=0,f;return a;function a(B){let H=o.events.length-1;for(;H>-1;){const Y=o.events[H][1].type;if(Y==="lineEnding"||Y==="linePrefix")H--;else break}const F=H>-1?o.events[H][1].type:null,q=F==="tableHead"||F==="tableRow"?D:u;return q===D&&o.parser.lazy[o.now().line]?s(B):q(B)}function u(B){return n.enter("tableHead"),n.enter("tableRow"),h(B)}function h(B){return B===124||(f=!0,b+=1),d(B)}function d(B){return B===null?s(B):Ae(B)?b>1?(b=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(B),n.exit("lineEnding"),w):s(B):Ve(B)?We(n,d,"whitespace")(B):(b+=1,f&&(f=!1,m+=1),B===124?(n.enter("tableCellDivider"),n.consume(B),n.exit("tableCellDivider"),f=!0,d):(n.enter("data"),c(B)))}function c(B){return B===null||B===124||at(B)?(n.exit("data"),d(B)):(n.consume(B),B===92?S:c)}function S(B){return B===92||B===124?(n.consume(B),c):c(B)}function w(B){return o.interrupt=!1,o.parser.lazy[o.now().line]?s(B):(n.enter("tableDelimiterRow"),f=!1,Ve(B)?We(n,k,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):k(B))}function k(B){return B===45||B===58?y(B):B===124?(f=!0,n.enter("tableCellDivider"),n.consume(B),n.exit("tableCellDivider"),x):M(B)}function x(B){return Ve(B)?We(n,y,"whitespace")(B):y(B)}function y(B){return B===58?(b+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(B),n.exit("tableDelimiterMarker"),_):B===45?(b+=1,_(B)):B===null||Ae(B)?A(B):M(B)}function _(B){return B===45?(n.enter("tableDelimiterFiller"),g(B)):M(B)}function g(B){return B===45?(n.consume(B),g):B===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(B),n.exit("tableDelimiterMarker"),v):(n.exit("tableDelimiterFiller"),v(B))}function v(B){return Ve(B)?We(n,A,"whitespace")(B):A(B)}function A(B){return B===124?k(B):B===null||Ae(B)?!f||m!==b?M(B):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(B)):M(B)}function M(B){return s(B)}function D(B){return n.enter("tableRow"),T(B)}function T(B){return B===124?(n.enter("tableCellDivider"),n.consume(B),n.exit("tableCellDivider"),T):B===null||Ae(B)?(n.exit("tableRow"),r(B)):Ve(B)?We(n,T,"whitespace")(B):(n.enter("data"),E(B))}function E(B){return B===null||B===124||at(B)?(n.exit("data"),T(B)):(n.consume(B),B===92?R:E)}function R(B){return B===92||B===124?(n.consume(B),E):E(B)}}function Xx(n,r){let s=-1,o=!0,m=0,b=[0,0,0,0],f=[0,0,0,0],a=!1,u=0,h,d,c;const S=new Gx;for(;++s<n.length;){const w=n[s],k=w[1];w[0]==="enter"?k.type==="tableHead"?(a=!1,u!==0&&(Zm(S,r,u,h,d),d=void 0,u=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},S.add(s,0,[["enter",h,r]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(o=!0,c=void 0,b=[0,0,0,0],f=[0,s+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},S.add(s,0,[["enter",d,r]])),m=k.type==="tableDelimiterRow"?2:d?3:1):m&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(o=!1,f[2]===0&&(b[1]!==0&&(f[0]=f[1],c=ya(S,r,b,m,void 0,c),b=[0,0,0,0]),f[2]=s)):k.type==="tableCellDivider"&&(o?o=!1:(b[1]!==0&&(f[0]=f[1],c=ya(S,r,b,m,void 0,c)),b=f,f=[b[1],s,0,0])):k.type==="tableHead"?(a=!0,u=s):k.type==="tableRow"||k.type==="tableDelimiterRow"?(u=s,b[1]!==0?(f[0]=f[1],c=ya(S,r,b,m,s,c)):f[1]!==0&&(c=ya(S,r,f,m,s,c)),m=0):m&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(f[3]=s)}for(u!==0&&Zm(S,r,u,h,d),S.consume(r.events),s=-1;++s<r.events.length;){const w=r.events[s];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=Yx(r.events,s))}return n}function ya(n,r,s,o,m,b){const f=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";s[0]!==0&&(b.end=Object.assign({},Vr(r.events,s[0])),n.add(s[0],0,[["exit",b,r]]));const u=Vr(r.events,s[1]);if(b={type:f,start:Object.assign({},u),end:Object.assign({},u)},n.add(s[1],0,[["enter",b,r]]),s[2]!==0){const h=Vr(r.events,s[2]),d=Vr(r.events,s[3]),c={type:a,start:Object.assign({},h),end:Object.assign({},d)};if(n.add(s[2],0,[["enter",c,r]]),o!==2){const S=r.events[s[2]],w=r.events[s[3]];if(S[1].end=Object.assign({},w[1].end),S[1].type="chunkText",S[1].contentType="text",s[3]>s[2]+1){const k=s[2]+1,x=s[3]-s[2]-1;n.add(k,x,[])}}n.add(s[3]+1,0,[["exit",c,r]])}return m!==void 0&&(b.end=Object.assign({},Vr(r.events,m)),n.add(m,0,[["exit",b,r]]),b=void 0),b}function Zm(n,r,s,o,m){const b=[],f=Vr(r.events,s);m&&(m.end=Object.assign({},f),b.push(["exit",m,r])),o.end=Object.assign({},f),b.push(["exit",o,r]),n.add(s+1,0,b)}function Vr(n,r){const s=n[r],o=s[0]==="enter"?"start":"end";return s[1][o]}const Qx={name:"tasklistCheck",tokenize:Jx};function Zx(){return{text:{91:Qx}}}function Jx(n,r,s){const o=this;return m;function m(u){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?s(u):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),b)}function b(u){return at(u)?(n.enter("taskListCheckValueUnchecked"),n.consume(u),n.exit("taskListCheckValueUnchecked"),f):u===88||u===120?(n.enter("taskListCheckValueChecked"),n.consume(u),n.exit("taskListCheckValueChecked"),f):s(u)}function f(u){return u===93?(n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):s(u)}function a(u){return Ae(u)?r(u):Ve(u)?n.check({tokenize:e2},r,s)(u):s(u)}}function e2(n,r,s){return We(n,o,"whitespace");function o(m){return m===null?s(m):r(m)}}function t2(n){return wg([kx(),jx(),Vx(n),Kx(),Zx()])}const n2={};function i2(n){const r=this,s=n||n2,o=r.data(),m=o.micromarkExtensions||(o.micromarkExtensions=[]),b=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),f=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);m.push(t2(s)),b.push(Cx()),f.push(wx(s))}const r2=500;function s2({settings:n,busy:r=!1,promptPreviews:s,testResult:o,onSave:m,onTest:b,onClose:f}){const[a,u]=fe.useState(n),[h,d]=fe.useState(n.apiKey??"");return fe.useEffect(()=>{u(n),d(n.apiKey??"")},[n]),N.jsx("div",{className:"modal-backdrop",children:N.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h2",{children:"Translation Settings"}),N.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),N.jsx("button",{type:"button",onClick:f,children:"Close"})]}),N.jsxs("div",{className:"translation-settings-grid",children:[N.jsxs("label",{children:[N.jsx("span",{children:"Base URL"}),N.jsx("input",{value:a.baseUrl,onChange:c=>u({...a,baseUrl:c.target.value}),placeholder:"https://api.openai.com/v1"})]}),N.jsxs("label",{children:[N.jsx("span",{children:"API key"}),N.jsx("input",{value:h,onChange:c=>d(c.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Model"}),N.jsx("input",{value:a.model,onChange:c=>u({...a,model:c.target.value})})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Target language"}),N.jsx("input",{value:a.targetLanguage,onChange:c=>u({...a,targetLanguage:c.target.value})})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Use context"}),N.jsx("input",{checked:a.contextEnabled,type:"checkbox",onChange:c=>u({...a,contextEnabled:c.target.checked})})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Timeout ms"}),N.jsx("input",{min:3e3,type:"number",value:a.requestTimeoutMs,onChange:c=>u({...a,requestTimeoutMs:Number(c.target.value)})})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Temperature"}),N.jsx("input",{min:0,max:1,step:.1,type:"number",value:a.temperature,onChange:c=>u({...a,temperature:Number(c.target.value)})})]})]}),N.jsxs("section",{className:"translation-prompt-settings",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h3",{children:"Translation Prompts"}),N.jsx("p",{children:"Edit the three cc-pm style prompt slots directly."})]}),N.jsx("button",{type:"button",disabled:r,onClick:()=>u({...a,prompts:void 0}),children:"Reset prompts"})]}),N.jsx("div",{className:"translation-prompt-stack",children:s.map(c=>N.jsxs("label",{children:[N.jsx("span",{children:c.label}),N.jsx("textarea",{value:a2(a,c),onChange:S=>u({...a,prompts:l2(a.prompts,c.key,S.target.value,c.defaultPrompt)})})]},c.key))})]}),o?N.jsx("div",{className:o.ok?"translation-test-result is-ok":"translation-test-result is-error",children:o.ok?`Connection ok: ${o.model} in ${o.elapsedMs}ms`:o.error}):null,N.jsxs("footer",{children:[N.jsx("button",{type:"button",disabled:r,onClick:b,children:"Test Connection"}),N.jsx("button",{type:"button",disabled:r,onClick:()=>void m({...a,enabled:!0,translateOutput:!0,translateUserInput:!0,inputMode:"review-before-send"},h.trim()),children:"Save"})]})]})})}function l2(n,r,s,o){const m={...n??{}};return s.trim()&&s!==o?m[r]=s:delete m[r],Object.keys(m).length>0?m:void 0}function a2(n,r){var s;return((s=n.prompts)==null?void 0:s[r.key])??r.defaultPrompt}function o2({active:n=!0,taskSlug:r,role:s,sessionId:o}){const[m,b]=fe.useState(null),[f,a]=fe.useState([]),[u,h]=fe.useState([]),[d,c]=fe.useState(""),[S,w]=fe.useState(!1),[k,x]=fe.useState(!1),[y,_]=fe.useState(!1),[g,v]=fe.useState("ready"),[A,M]=fe.useState(""),[D,T]=fe.useState(Date.now()),[E,R]=fe.useState(!1),[B,H]=fe.useState(""),[F,q]=fe.useState(!1),[Y,K]=fe.useState([]),[$,X]=fe.useState(),[Z,z]=fe.useState(0),[O,j]=fe.useState(0),V=fe.useRef(n),I=fe.useRef(1),ie=fe.useRef(null);fe.useEffect(()=>{V.current=n},[n]),fe.useEffect(()=>{Promise.all([be.getTranslationSettings(),be.getTranslationPrompts()]).then(([de,Ie])=>{b(de),K(Ie)}).catch(de=>H(de.message))},[]),fe.useEffect(()=>{a([]),h([]),H(""),v("ready"),M(""),I.current=1;let de=!1,Ie;const Re=()=>{de||(Ie=window.setTimeout(ut,V.current?200:1e3))},ut=async()=>{if(!de)try{const ce=await be.pollTranslationSession(o,I.current);if(de)return;G(ce.events),I.current=ce.nextCursor,v(ce.status),V.current&&M(v2(new Date().toISOString()))}catch(ce){de||H(ce instanceof Error?ce.message:"Translation poll failed.")}finally{Re()}};return be.startTranslationSession(r,s).then(ce=>{de||(v(ce.status),I.current=ce.nextCursor,ut())}).catch(ce=>{de||H(ce instanceof Error?ce.message:"Translation start failed.")}),()=>{de=!0,Ie!==void 0&&window.clearTimeout(Ie)}},[o,r,s,Z]),fe.useEffect(()=>{if(!n)return;const de=ie.current;if(!de)return;const Ie=window.requestAnimationFrame(()=>{de.scrollTop=de.scrollHeight});return()=>window.cancelAnimationFrame(Ie)},[n,O]);const ge=h2(f);fe.useEffect(()=>{if(!ge)return;T(Date.now());const de=window.setInterval(()=>T(Date.now()),250);return()=>window.clearInterval(de)},[ge]);async function ee(de=!1){if(m){R(!0),H(""),w(!1);try{const Ie=await be.translateUserInput(r,s,{text:d,mode:de?"auto-send":"review-before-send",useContext:m.contextEnabled,send:de});_(Ie.contextUsed),Ie.sent?(c(""),w(!1)):(c(Ie.englishPreview),w(!0))}catch(Ie){H(Ie instanceof Error?Ie.message:"Translation failed.")}finally{R(!1)}}}function G(de){if(de.length===0)return;for(const Re of de)Re.type==="status"?v(Re.status):Re.type==="error"?H(Re.message):Re.type==="failures"&&h(Re.failures);const Ie=de.filter(Re=>Re.type==="entry");Ie.length>0&&(a(Re=>{const ut=Ie.reduce((zt,Ye)=>g2(zt,Ye.entry),Re),ce=d2(ut);return ce.removedIds.size>0&&h(zt=>zt.filter(Ye=>!ce.removedIds.has(Ye.translationId))),ce.entries}),j(Re=>Re+1))}async function U(){if(d.trim()){R(!0),H("");try{await be.sendTranslatedInput(r,s,{englishText:d}),c(""),w(!1),_(!1)}catch(de){H(de instanceof Error?de.message:"Failed to send English input.")}finally{R(!1)}}}function ne(de){de.key!=="Enter"||de.shiftKey||de.nativeEvent.isComposing||(de.preventDefault(),!E&&d.trim()&&(S?U():ee(k)))}async function te(de,Ie){R(!0),H("");try{const Re=await be.updateTranslationSettings({...de,...Ie!==void 0?{apiKey:Ie}:{}}),ut=await be.getTranslationPrompts();b(Re),K(ut),q(!1),z(ce=>ce+1)}catch(Re){H(Re instanceof Error?Re.message:"Failed to save translation settings.")}finally{R(!1)}}async function ve(){R(!0),H("");try{X(await be.testTranslationProvider())}catch(de){H(de instanceof Error?de.message:"Provider test failed.")}finally{R(!1)}}async function Se(){a([]),h([]),I.current=1,await be.clearTranslationSession(o).catch(de=>H(de.message))}async function Me(){R(!0),H("");try{const de=await be.ignoreTranslationFailures(o);h(de.failures)}catch(de){H(de instanceof Error?de.message:"Failed to ignore translation failures.")}finally{R(!1)}}async function Le(){R(!0),H("");try{const de=await be.retryTranslationFailures(o);h(de.failures)}catch(de){H(de instanceof Error?de.message:"Failed to retry translation failures.")}finally{R(!1)}}if(!m)return N.jsx("aside",{className:"translation-panel",children:N.jsx("p",{className:"muted",children:"Loading translation settings..."})});const Pe=f2(f,g,D),Je=u.length;return N.jsxs("aside",{className:"translation-panel",children:[N.jsxs("header",{className:"translation-panel-header",children:[N.jsxs("div",{className:"translation-panel-titlebar",children:[N.jsx("h2",{children:"Translation"}),N.jsxs("div",{className:"translation-panel-actions",children:[N.jsx("button",{"aria-pressed":k,className:`auto-send-toggle${k?" is-active":""}`,type:"button",onClick:()=>x(de=>!de),children:k?"✅ Auto-send":"× Auto-send"}),Je>0?N.jsxs(N.Fragment,{children:[N.jsxs("button",{type:"button",disabled:E,onClick:()=>void Me(),children:["Ignore ",Je]}),N.jsxs("button",{type:"button",disabled:E,onClick:()=>void Le(),children:["Retry ",Je]})]}):null,N.jsx("button",{type:"button",onClick:()=>q(!0),children:"Settings"}),N.jsx("button",{type:"button",onClick:()=>void Se(),children:"Clear"})]})]}),N.jsxs("div",{className:"translation-status-row",children:[N.jsxs("p",{children:[m.model," · ",Pe,y?" · context used":""]}),N.jsx("p",{children:A?`poll ${A}`:"poll -"})]})]}),B?N.jsx("div",{className:"error-banner",children:B}):null,N.jsxs("div",{className:"translation-entry-list",ref:ie,children:[f.length===0?N.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,f.map(de=>N.jsx(u2,{entry:de},de.id))]}),N.jsx("div",{className:"translation-composer",children:N.jsxs("div",{className:"translation-composer-row",children:[N.jsx("textarea",{value:d,onChange:de=>{c(de.target.value),de.target.value.trim()||w(!1)},onKeyDown:ne,placeholder:"输入中文,先翻译成英文工程指令..."}),N.jsx("div",{className:"translation-composer-actions",children:N.jsx("button",{type:"button",disabled:E||!S||!d.trim(),onClick:()=>void U(),children:"Send English"})})]})}),F?N.jsx(s2,{settings:m,busy:E,promptPreviews:Y,testResult:$,onSave:te,onTest:ve,onClose:()=>q(!1)}):null]})}function u2({entry:n}){if(n.sourceKind==="conversation-boundary")return N.jsx(c2,{entry:n});const r=m2(n),s=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",m=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return N.jsxs("article",{className:m,children:[s?N.jsx("pre",{children:r}):N.jsx("div",{className:"translation-markdown",children:N.jsx(VC,{remarkPlugins:[i2],children:r})}),n.warning?N.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?N.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function c2({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,o=y2(n.occurredAt??n.createdAt);return N.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${o}`,children:[N.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),N.jsx("span",{children:r}),N.jsxs("span",{children:["第 ",s," 轮"]}),N.jsx("time",{children:o}),N.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function h2(n){const r=n.find(Xc);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function f2(n,r,s){const o=n.find(Xc);if(o)return`translating ${_2(Math.max(0,s-p2(o)))}`;const m=n.at(-1);return(m==null?void 0:m.status)==="failed"||r==="failed"?"error":r}function Xc(n){return n.status==="queued"||n.status==="translating"}function d2(n){const r=n.length-r2;if(r<=0)return{entries:n,removedIds:new Set};const s=new Set;for(const o of n){if(s.size>=r)break;Xc(o)||s.add(o.id)}return s.size===0?{entries:n,removedIds:s}:{entries:n.filter(o=>!s.has(o.id)),removedIds:s}}function p2(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function m2(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.translatedText:n.translatedText||n.sourceText}function g2(n,r){return n.findIndex(o=>o.id===r.id)===-1?[...n,r]:n.map(o=>o.id===r.id?r:o)}function _2(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const r=n/1e3;if(r<60)return`${r.toFixed(1)}s`;const s=Math.floor(r/60),o=Math.floor(r%60).toString().padStart(2,"0");return`${s}:${o}`}function v2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function y2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function S2({role:n,session:r,permissionMode:s,model:o,active:m=!0,busy:b,orchestrationMode:f,translationEnabled:a,onPermissionModeChange:u,onModelChange:h,onOrchestrationModeChange:d,onStart:c,onResume:S,onStop:w,onRestart:k,onTerminalEvent:x}){const y=f==="auto";return N.jsxs("section",{className:"session-console",children:[N.jsxs("div",{className:"session-console-top",children:[N.jsx(M1,{role:n,session:r,permissionMode:s,model:o,busy:b,onPermissionModeChange:u,onModelChange:h,onStart:c,onResume:S,onStop:w,onRestart:k}),N.jsx("div",{className:"session-console-actions",children:N.jsx("button",{"aria-label":`Auto orchestration is ${y?"on":"off"}`,"aria-pressed":y,className:`translation-toggle${y?" is-active":""}`,disabled:b,type:"button",onClick:()=>d(y?"manual":"auto"),children:y?"✅ Auto orchestration":"× Auto orchestration"})})]}),(r==null?void 0:r.status)==="running"?N.jsx(b2,{active:m,onTerminalEvent:x,role:n,session:r,taskSlug:r.taskSlug,translationEnabled:a}):N.jsxs("div",{className:"terminal-empty",children:[N.jsx("strong",{children:n}),N.jsx("span",{children:r!=null&&r.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]})}function b2({active:n,onTerminalEvent:r,role:s,session:o,taskSlug:m,translationEnabled:b}){return N.jsxs("div",{className:b?"session-console-body has-translation":"session-console-body",children:[N.jsx("div",{className:"terminal-pane",children:N.jsx(sg,{sessionId:o.id,active:n,onEvent:r},o.id)}),b?N.jsx("div",{className:"translation-pane",children:N.jsx(o2,{active:n,taskSlug:m,role:s,sessionId:o.id},o.id)}):null]})}function C2(n,r,s){var b;if(!n||s.mode!=="auto")return null;const o=new Map(n.map(f=>[f.id,f])),m=r.filter(f=>{var a;return f.dispatchingAt?((a=o.get(f.id))==null?void 0:a.dispatchingAt)!==f.dispatchingAt:!1});return m.length===0?null:((b=m.sort(w2)[m.length-1])==null?void 0:b.toRole)??null}function w2(n,r){const s=n.dispatchingAt??n.deliveredAt??n.acceptedAt??"",o=r.dispatchingAt??r.deliveredAt??r.acceptedAt??"";return s!==o?s.localeCompare(o):n.createdAt.localeCompare(r.createdAt)}function x2({task:n,activeRole:r,translationEnabled:s,refreshNonce:o=0,onTaskChanged:m,onActiveRoleChange:b,onTranslationEnabledChange:f,onMessagesChanged:a,onOrchestrationChanged:u,onRoundStateChanged:h,onEventsChanged:d,onLaunchStateChanged:c}){const[S,w]=fe.useState(null),[k,x]=fe.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[y,_]=fe.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[g,v]=fe.useState(!1),[A,M]=fe.useState(""),[D,T]=fe.useState([]),[E,R]=fe.useState(null),[B,H]=fe.useState(null),F=fe.useRef(null),q=fe.useCallback((ee,G)=>{var te;const U=((te=F.current)==null?void 0:te.taskSlug)===n.taskSlug?F.current.messages:null,ne=C2(U,ee,G);F.current={taskSlug:n.taskSlug,messages:ee},R(G),a==null||a(ee),u==null||u(G),ne&&(b(ne),Z(`auto switched to ${ne} before VCM dispatch`))},[b,a,u,n.taskSlug]),Y=fe.useCallback((ee,G,U,ne,te)=>{w(ee),H(te),q(G,U),h==null||h(ne)},[q,h]),K=fe.useCallback(async()=>{const[ee,G,U,ne,te]=await Promise.all([be.getTaskStatus(n.taskSlug),be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug),be.getSessionRoundState(n.taskSlug),be.getCodexReviewState(n.taskSlug)]);Y(ee,G,U,ne,te)},[Y,n.taskSlug]);fe.useEffect(()=>{K().catch(ee=>M(ee.message))},[K,o]),fe.useEffect(()=>{T([]),d==null||d([])},[d,n.taskSlug]),fe.useEffect(()=>{x(ee=>{let G=!1;const U={...ee};for(const ne of(S==null?void 0:S.sessions)??[])U[ne.role]!==ne.permissionMode&&(U[ne.role]=ne.permissionMode,G=!0);return G?U:ee})},[S==null?void 0:S.sessions]),fe.useEffect(()=>{_(ee=>{let G=!1;const U={...ee};for(const ne of(S==null?void 0:S.sessions)??[]){const te=ne.model??"default";U[ne.role]!==te&&(U[ne.role]=te,G=!0)}return G?U:ee})},[S==null?void 0:S.sessions]),fe.useEffect(()=>{const ee=(S==null?void 0:S.sessions)??[],G=new Set(ee.map(ne=>ne.role)),U={};for(const ne of Ji)U[ne.name]={permissionMode:k[ne.name],model:y[ne.name]};c==null||c({taskSlug:n.taskSlug,roles:U,autoOrchestration:((E==null?void 0:E.mode)??"auto")==="auto",translationEnabled:s,statusLoaded:!!S,sessionCount:ee.length,hasAnySession:ee.length>0,allRolesHaveSession:Ji.every(ne=>G.has(ne.name))})},[y,c,E==null?void 0:E.mode,k,S,n.taskSlug,s]),fe.useEffect(()=>{const ee=window.setInterval(()=>{Promise.all([be.getTaskStatus(n.taskSlug),be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug),be.getSessionRoundState(n.taskSlug),be.getCodexReviewState(n.taskSlug)]).then(([G,U,ne,te,ve])=>{Y(G,U,ne,te,ve)}).catch(G=>M(G.message))},3e3);return()=>window.clearInterval(ee)},[Y,n.taskSlug]),fe.useEffect(()=>{let ee=!1,G=!1;const U=window.setInterval(()=>{G||(G=!0,Promise.all([be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug)]).then(([ne,te])=>{ee||q(ne,te)}).catch(ne=>{ee||M(ne.message)}).finally(()=>{G=!1}))},200);return()=>{ee=!0,window.clearInterval(U)}},[q,n.taskSlug]);async function $(ee){v(!0),M("");try{await ee(),await K(),await m()}catch(G){M(G instanceof Error?G.message:"Action failed.")}finally{v(!1)}}async function X(){const ee=n.worktreePath?[`Close task "${n.taskSlug}"?`,"","This is destructive:","- stops VCM-managed running role sessions for this task",`- deletes the task worktree: ${n.worktreePath}`,`- deletes the Git branch: ${n.branch}`,"- deletes VCM task/session/message/orchestration state","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
91
|
+
`):[`Close task "${n.taskSlug}"?`,"","This task was created without a separate worktree/branch.","VCM will stop VCM-managed running role sessions for this task.","VCM will delete task/session/message/orchestration state only.","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
92
|
+
`);if(window.confirm(ee)){v(!0),M("");try{await be.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),Z(`closed ${n.taskSlug}`),await m()}catch(U){M(U instanceof Error?U.message:"Close task failed.")}finally{v(!1)}}}function Z(ee){T(G=>{const U=[...G,`${new Date().toLocaleTimeString()} ${ee}`];return d==null||d(U),U})}function z(ee,G){x(U=>({...U,[ee]:G}))}function O(ee,G){_(U=>({...U,[ee]:G}))}async function j(ee){v(!0),M("");try{const G=await be.updateOrchestrationState(n.taskSlug,{mode:ee});R(G),u==null||u(G),Z(`auto orchestration ${ee==="auto"?"enabled":"disabled"}`)}catch(G){M(G instanceof Error?G.message:"Failed to update orchestration mode.")}finally{v(!1)}}async function V(ee){await $(async()=>{const G=await be.requestCodexReviewGate(n.taskSlug,ee);Z(`codex ${ee}: ${G.status}`)})}async function I(ee){await $(async()=>{const G=await be.retryCodexReviewGate(n.taskSlug,ee);Z(`codex ${ee}: retry ${G.status}`)})}async function ie(ee){const G=window.prompt(`Skip Codex review gate "${ee}"? Enter the reason.`);G!=null&&G.trim()&&await $(async()=>{const U=await be.skipCodexReviewGate(n.taskSlug,ee,{reason:G});H(U),Z(`codex ${ee}: skipped`)})}async function ge(ee){const G=window.prompt(`Override Codex review gate "${ee}"? Enter the reason.`);G!=null&&G.trim()&&await $(async()=>{const U=await be.overrideCodexReviewGate(n.taskSlug,ee,{reason:G});H(U),Z(`codex ${ee}: overridden`)})}return N.jsxs("div",{className:"task-workspace",children:[N.jsxs("header",{className:"workspace-header",children:[N.jsx("div",{className:"workspace-title-line",children:N.jsx("h1",{children:n.title||n.taskSlug})}),N.jsx(R1,{activeRole:r,sessions:(S==null?void 0:S.sessions)??[],onSelect:b}),N.jsxs("div",{className:"workspace-header-actions",children:[N.jsx("button",{"aria-pressed":s,className:`translation-toggle${s?" is-active":""}`,type:"button",onClick:()=>f(!s),children:s?"✅ Translate":"× Translate"}),N.jsx("button",{className:"danger-button",type:"button",disabled:g,onClick:()=>void X(),children:"Close Task"})]})]}),A?N.jsx("div",{className:"error-banner",children:A}):null,B?N.jsxs("section",{className:"codex-review-panel",children:[N.jsxs("div",{className:"codex-review-panel-header",children:[N.jsx("h2",{children:"Codex Review Gates"}),N.jsx("span",{children:B.enabled?"enabled":"disabled"})]}),N.jsx("div",{className:"codex-review-gates",children:D1.map(ee=>{const G=B.gates[ee],U=B.enabled&&G.required&&G.status!=="running",ne=G.status==="failed";return N.jsxs("div",{className:"codex-review-gate",children:[N.jsxs("div",{className:"codex-review-gate-main",children:[N.jsx("strong",{children:E2(ee)}),N.jsx(Zi,{status:G.status}),G.decision?N.jsx("span",{className:"codex-review-decision",children:G.decision}):null,G.callbackStatus&&G.callbackStatus!=="not_sent"?N.jsxs("span",{className:"codex-review-callback",children:["callback ",G.callbackStatus]}):null]}),N.jsxs("div",{className:"codex-review-gate-meta",children:[N.jsx("span",{children:G.required?"required":"optional"}),N.jsx("span",{children:G.reportPath}),G.error?N.jsx("span",{className:"codex-review-error",children:G.error}):null]}),N.jsxs("div",{className:"codex-review-actions",children:[N.jsx("button",{type:"button",disabled:g||!U,onClick:()=>void V(ee),children:G.status==="completed"||G.status==="failed"?"Run Again":"Run"}),ne?N.jsxs(N.Fragment,{children:[N.jsx("button",{type:"button",disabled:g,onClick:()=>void I(ee),children:"Retry"}),N.jsx("button",{type:"button",disabled:g,onClick:()=>void ie(ee),children:"Skip"}),N.jsx("button",{type:"button",disabled:g,onClick:()=>void ge(ee),children:"Override"})]}):null]})]},ee)})})]}):null,N.jsx("div",{className:"workspace-grid",children:N.jsx("div",{className:"workspace-main",children:N.jsx("div",{className:"role-console-stack",children:Ji.map(ee=>{const G=ee.name,U=G===r,ne=ag((S==null?void 0:S.sessions)??[],G);return N.jsx("div",{className:U?"role-console-panel is-active":"role-console-panel","aria-hidden":!U,children:N.jsx(S2,{role:G,session:ne,permissionMode:k[G],model:y[G],active:U,busy:g,orchestrationMode:(E==null?void 0:E.mode)??"auto",translationEnabled:s,onPermissionModeChange:te=>z(G,te),onModelChange:te=>O(G,te),onOrchestrationModeChange:te=>void j(te),onStart:()=>void $(async()=>{await be.startRoleSession(n.taskSlug,G,{cols:100,rows:28,permissionMode:k[G],model:y[G]}),Z(`started ${G} with ${k[G]} / ${y[G]}`)}),onResume:()=>void $(async()=>{await be.resumeRoleSession(n.taskSlug,G,{cols:100,rows:28,permissionMode:k[G],model:y[G]}),Z(`resumed ${G} with ${k[G]} / ${y[G]}`)}),onStop:()=>void $(async()=>{await be.stopRoleSession(n.taskSlug,G),Z(`stopped ${G}`)}),onRestart:()=>void $(async()=>{await be.restartRoleSession(n.taskSlug,G,{cols:100,rows:28,permissionMode:k[G],model:y[G]}),Z(`restarted ${G} with ${k[G]} / ${y[G]}`)}),onTerminalEvent:te=>Z(`${ee.label}: ${te}`)})},G)})})})})]})}function E2(n){return n.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}const k2=120*1e3,Jm=1400,A2=3;function T2(){const[n,r]=fe.useState(null),[s,o]=fe.useState([]),[m,b]=fe.useState(null),[f,a]=fe.useState(null),[u,h]=fe.useState(null),[d,c]=fe.useState(null),[S,w]=fe.useState(null),[k,x]=fe.useState(null),[y,_]=fe.useState(!1),[g,v]=fe.useState([]),[A,M]=fe.useState(null),[D,T]=fe.useState(null),[E,R]=fe.useState(null),[B,H]=fe.useState(null),[F,q]=fe.useState(null),[Y,K]=fe.useState("project-manager"),[$,X]=fe.useState("system"),[Z,z]=fe.useState(!0),[O,j]=fe.useState("off"),[V,I]=fe.useState(()=>K0()),[ie,ge]=fe.useState(null),[ee,G]=fe.useState({}),[U,ne]=fe.useState(0),[te,ve]=fe.useState(null),[Se,Me]=fe.useState(!1),[Le,Pe]=fe.useState(!1),[Je,de]=fe.useState(""),Ie=fe.useRef({}),Re=fe.useRef(null),ut=fe.useRef(""),ce=fe.useMemo(()=>X0(g,A),[g,A]),zt=ce?ee[ce.taskSlug]??!1:!1,Ye=(ie==null?void 0:ie.taskSlug)===(ce==null?void 0:ce.taskSlug)?ie:null,pt=!!(Ye!=null&&Ye.statusLoaded&&Ye.allRolesHaveSession),Ht=!!(ce&&(Ye!=null&&Ye.statusLoaded)&&!Ye.hasAnySession),ue=fe.useCallback(oe=>{X(oe.themeMode),z(oe.flowPauseAlerts),j(oe.permissionRequestMode),I(oe.launchTemplate)},[]),_e=fe.useCallback(()=>{Re.current!==null&&(window.clearInterval(Re.current),Re.current=null)},[]),xe=fe.useCallback((oe={})=>{_e(),oe.resetAudio&&B2(),Sa(),Re.current=window.setInterval(()=>{Sa()},Jm)},[_e]),Oe=fe.useCallback(()=>{_e(),ve(null);let oe=1;Sa(),Re.current=window.setInterval(()=>{oe+=1,Sa(),oe>=A2&&Re.current!==null&&(window.clearInterval(Re.current),Re.current=null)},Jm)},[_e]),Ne=fe.useCallback((oe,Ee=`manual-${Date.now()}`,mt={})=>{ve({id:Ee,text:oe}),xe(mt)},[xe]),vt=fe.useCallback(()=>{_e(),ve(null)},[_e]),Ue=fe.useCallback(()=>{_e(),ve(null),z(!1)},[_e]),At=fe.useCallback(oe=>{ce!=null&&ce.taskSlug&&T({taskSlug:ce.taskSlug,messages:oe})},[ce==null?void 0:ce.taskSlug]),yt=fe.useCallback(oe=>{ce!=null&&ce.taskSlug&&R({taskSlug:ce.taskSlug,orchestration:oe})},[ce==null?void 0:ce.taskSlug]),It=fe.useCallback(oe=>{ce!=null&&ce.taskSlug&&H({taskSlug:ce.taskSlug,events:oe})},[ce==null?void 0:ce.taskSlug]),et=fe.useCallback(oe=>{if(!(ce!=null&&ce.taskSlug)||oe.taskSlug!==ce.taskSlug||(q({taskSlug:oe.taskSlug,roundState:oe}),oe.status!=="stopped"||!oe.roundId))return;const Ee=L2(oe);if(Ie.current[oe.taskSlug]===Ee||!Z)return;const wn=oe.activeRole??"role";M2(oe)>=k2?Ne(`No new turn started after ${wn} stopped.`,Ee):Oe(),Ie.current[oe.taskSlug]=Ee},[ce==null?void 0:ce.taskSlug,Z,Oe,Ne]),Tn=fe.useCallback(oe=>{ge(Ee=>(Ee==null?void 0:Ee.taskSlug)===oe.taskSlug&&Ee.statusLoaded===oe.statusLoaded&&Ee.sessionCount===oe.sessionCount&&Ee.hasAnySession===oe.hasAnySession&&Ee.allRolesHaveSession===oe.allRolesHaveSession&&Ee.autoOrchestration===oe.autoOrchestration&&Ee.translationEnabled===oe.translationEnabled&&JSON.stringify(Ee.roles)===JSON.stringify(oe.roles)?Ee:oe)},[]);async function Mt(){const oe=await be.listTasks();return v(oe),M(Ee=>{var mt;return Ee&&oe.some(wn=>wn.taskSlug===Ee)?Ee:((mt=oe[0])==null?void 0:mt.taskSlug)??null}),oe}async function nr(){const oe=await be.getHarnessStatus();return b(oe),oe}async function Nn(){const oe=await be.getHarnessBootstrapStatus();return a(oe),oe}async function ti(){const oe=await be.getGatewayStatus();return c(oe),oe}async function ir(){const oe=await be.getRecentRepositoryPaths();return o(oe),oe}async function Cn(oe){const[Ee,mt]=await Promise.all([be.listMessages(oe),be.getOrchestrationState(oe)]);T({taskSlug:oe,messages:Ee}),R({taskSlug:oe,orchestration:mt})}fe.useEffect(()=>{Promise.all([be.getCurrentProject(),be.getRecentRepositoryPaths(),be.getAppPreferences(),be.getGatewayStatus()]).then(async([oe,Ee,mt,wn])=>{r(oe),o(Ee),c(wn),ue(mt),oe&&await Promise.all([Mt(),nr(),Nn()])}).catch(oe=>de(oe.message))},[ue]),fe.useEffect(()=>{const oe=window.matchMedia("(prefers-color-scheme: dark)"),Ee=()=>Me(oe.matches);return Ee(),oe.addEventListener("change",Ee),()=>oe.removeEventListener("change",Ee)},[]),fe.useEffect(()=>()=>_e(),[_e]),fe.useEffect(()=>{const oe=$==="system"?Se?"dark":"light":$;document.documentElement.dataset.theme=oe,document.documentElement.dataset.themeMode=$},[Se,$]),fe.useEffect(()=>{!(d!=null&&d.enabled)||!Z||(Ue(),be.updateAppPreferences({flowPauseAlerts:!1}).then(oe=>ue(oe)).catch(oe=>de(oe.message)))},[ue,Ue,Z,d==null?void 0:d.enabled]),fe.useEffect(()=>{if(!(d!=null&&d.enabled)||!n||!ce)return;const oe=`${n.repoRoot}:${ce.taskSlug}`;if(d.currentProjectId===n.repoRoot&&d.currentTaskSlug===ce.taskSlug){ut.current=oe;return}ut.current!==oe&&(ut.current=oe,be.updateGatewaySettings({currentProjectId:n.repoRoot,currentTaskSlug:ce.taskSlug}).then(Ee=>c(Ee)).catch(Ee=>{ut.current===oe&&(ut.current=""),de(Ee.message)}))},[ce==null?void 0:ce.taskSlug,d==null?void 0:d.currentProjectId,d==null?void 0:d.currentTaskSlug,d==null?void 0:d.enabled,n==null?void 0:n.repoRoot]);async function ct(oe){Pe(!0),de("");try{await oe()}catch(Ee){de(Ee instanceof Error?Ee.message:"Action failed.")}finally{Pe(!1)}}const Li=D&&D.taskSlug===(ce==null?void 0:ce.taskSlug)?D.messages:[],La=E&&E.taskSlug===(ce==null?void 0:ce.taskSlug)?E.orchestration:null,nl=B&&B.taskSlug===(ce==null?void 0:ce.taskSlug)?B.events:[],Xr=F&&F.taskSlug===(ce==null?void 0:ce.taskSlug)?F.roundState:null;return N.jsxs(W0,{sidebar:N.jsx(y1,{project:n,recentRepositoryPaths:s,tasks:g,activeTaskSlug:(ce==null?void 0:ce.taskSlug)??null,messages:Li,orchestration:La,events:nl,roundState:Xr,harnessStatus:m,harnessBootstrapStatus:f,harnessApplyResult:u,gatewayStatus:d,gatewayQrLogin:S,gatewayQrCheck:k,busy:Le,onConnect:oe=>ct(async()=>{const Ee=await be.connectProject({repoPath:oe});r(Ee),h(null),await Promise.all([Mt(),nr(),Nn(),ir()])}),onRefreshConnectedRepository:()=>ct(async()=>{const oe=await be.getCurrentProject();r(oe)}),onPullConnectedRepository:()=>ct(async()=>{const oe=await be.pullCurrentProject();r(oe)}),onRefreshHarness:()=>ct(async()=>{h(null),await Promise.all([nr(),Nn()])}),onApplyHarness:()=>ct(async()=>{const oe=await be.applyHarness();h(oe),await Promise.all([nr(),Nn()])}),onStartHarnessBootstrap:()=>ct(async()=>{const oe=await be.startHarnessBootstrap();a(oe.status)}),onRefreshGateway:()=>ct(async()=>{await ti()}),onGatewayEnabledChange:oe=>{ct(async()=>{const[Ee,mt]=await Promise.all([be.updateGatewaySettings({enabled:oe,...oe&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(ce==null?void 0:ce.taskSlug)??null}:{}}),oe?be.updateAppPreferences({flowPauseAlerts:!1}):Promise.resolve(null)]);mt&&ue(mt),oe&&Ue(),c(Ee)})},onGatewayTranslationChange:oe=>{ct(async()=>{const Ee=await be.updateGatewaySettings({translationEnabled:oe});c(Ee)})},onStartGatewayQrLogin:()=>{ct(async()=>{const oe=await be.startGatewayQrLogin();w(oe),x(null),_(!0),await ti()})},onResetGatewayBinding:()=>{ct(async()=>{const oe=await be.resetGatewayBinding();c(oe),w(null),x(null),_(!1)})},onCreateTask:oe=>ct(async()=>{const Ee=await be.createTask(oe);await Mt(),M(Ee.taskSlug)}),onSelectTask:M,themeMode:$,onThemeModeChange:oe=>{X(oe),ct(async()=>{const Ee=await be.updateAppPreferences({themeMode:oe});ue(Ee)})},flowPauseAlerts:Z,onFlowPauseAlertsChange:oe=>{if(d!=null&&d.enabled){Ue();return}z(oe),oe&&O2(),ct(async()=>{const Ee=await be.updateAppPreferences({flowPauseAlerts:oe});ue(Ee)})},permissionRequestMode:O,onPermissionRequestModeChange:oe=>{j(oe),ct(async()=>{const Ee=await be.updateAppPreferences({permissionRequestMode:oe});ue(Ee)})},launchTemplate:V,canSaveLaunchTemplate:pt,canOneClickStart:Ht,onSaveLaunchTemplate:()=>{ct(async()=>{if(!(Ye!=null&&Ye.allRolesHaveSession))throw new Error("Start all four role sessions before saving a launch template.");const oe=await be.updateAppPreferences({launchTemplate:{version:1,roles:Ye.roles,autoOrchestration:Ye.autoOrchestration,translationEnabled:Ye.translationEnabled}});ue(oe)})},onOneClickStart:()=>{ct(async()=>{if(!ce)throw new Error("Create or select a task before one-click start.");if((await be.getTaskStatus(ce.taskSlug)).sessions.length>0)throw new Error("One-click start is only available before any role session has started.");G(mt=>({...mt,[ce.taskSlug]:V.translationEnabled}));const Ee=await be.updateOrchestrationState(ce.taskSlug,{mode:V.autoOrchestration?"auto":"manual"});R({taskSlug:ce.taskSlug,orchestration:Ee});for(const mt of Ji){const wn=V.roles[mt.name];await be.startRoleSession(ce.taskSlug,mt.name,{cols:100,rows:28,permissionMode:wn.permissionMode,model:wn.model})}K("project-manager"),await Cn(ce.taskSlug),await Mt(),ne(mt=>mt+1)})},onTryFlowPauseAlert:()=>{Ne("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:oe=>{ct(async()=>{const Ee=await be.markAllMessagesDone(oe);T({taskSlug:oe,messages:Ee.messages}),await Cn(oe)})},onDeleteMessageHistory:oe=>{ct(async()=>{const Ee=await be.deleteMessageHistory(oe);T({taskSlug:oe,messages:Ee.messages}),await Cn(oe)})}}),children:[Je?N.jsx("div",{className:"error-banner",children:Je}):null,te?N.jsx("div",{className:"flow-pause-alert-backdrop",children:N.jsxs("section",{"aria-describedby":"flow-pause-alert-body flow-pause-alert-hint","aria-labelledby":"flow-pause-alert-title","aria-modal":"true",className:"flow-pause-alert",role:"alertdialog",children:[N.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),N.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),N.jsx("p",{id:"flow-pause-alert-body",children:te.text}),N.jsx("p",{id:"flow-pause-alert-hint",className:"flow-pause-alert-hint",children:"The task may be complete, waiting for your decision, or blocked by a workflow issue."}),N.jsx("button",{type:"button",autoFocus:!0,onClick:vt,children:"Confirm"})]})}):null,y&&S?N.jsx(D2,{busy:Le,qrCheck:k,qrLogin:S,onCheck:()=>{ct(async()=>{const oe=await be.checkGatewayQrLogin();x(oe),(oe.status==="confirmed"||oe.status==="binded_redirect")&&_(!1),await ti()})},onClose:()=>_(!1)}):null,n&&ce?N.jsx(x2,{task:ce,activeRole:Y,translationEnabled:zt,refreshNonce:U,onTaskChanged:async()=>{await Mt()},onActiveRoleChange:K,onTranslationEnabledChange:oe=>{G(Ee=>({...Ee,[ce.taskSlug]:oe}))},onMessagesChanged:At,onOrchestrationChanged:yt,onRoundStateChanged:et,onEventsChanged:It,onLaunchStateChanged:Tn}):N.jsxs("section",{className:"empty-workspace",children:[N.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),N.jsx("p",{children:n?"Tasks create local role commands, logs, and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, logs, and handoff artifacts."})]})]})}function D2({busy:n,onCheck:r,onClose:s,qrCheck:o,qrLogin:m}){const[b,f]=fe.useState(""),[a,u]=fe.useState("");return fe.useEffect(()=>{let h=!1;if(u(""),f(""),m.qrcodeUrl.startsWith("data:image/")){f(m.qrcodeUrl);return}try{const d=Yr(0,"M");d.addData(m.qrcodeUrl),d.make(),h||f(d.createDataURL(8,2))}catch(d){h||u(d instanceof Error?d.message:"Failed to render QR code.")}return()=>{h=!0}},[m.qrcodeUrl]),N.jsx("div",{className:"modal-backdrop",children:N.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),N.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),N.jsx("button",{type:"button",onClick:s,children:"Close"})]}),N.jsxs("div",{className:"gateway-qr-modal-body",children:[N.jsx("div",{className:"gateway-qr-code-frame",children:b?N.jsx("img",{alt:"Weixin Gateway QR login",src:b}):N.jsx("div",{className:"gateway-qr-placeholder",children:a||"Rendering QR code..."})}),N.jsxs("dl",{className:"gateway-qr-meta",children:[N.jsxs("div",{children:[N.jsx("dt",{children:"Status"}),N.jsx("dd",{children:(o==null?void 0:o.status)??m.status})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Expires"}),N.jsx("dd",{children:R2(m.expiresAt)})]}),o!=null&&o.message?N.jsxs("div",{children:[N.jsx("dt",{children:"Message"}),N.jsx("dd",{children:o.message})]}):null]})]}),N.jsx("footer",{children:N.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function R2(n){const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r)}let Ri=null;function M2(n){const r=Date.parse(n.startedAt??""),s=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!Number.isFinite(r)||!Number.isFinite(s)?0:Math.max(0,s-r)}function L2(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}async function O2(){const n=d_();return n?p_(n):!1}async function Sa(){const n=d_();if(!n||!await p_(n))return!1;try{const s=n.createGain(),o=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),tg(n,s,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),tg(n,s,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function d_(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Ri||Ri.state==="closed")&&(Ri=new n),Ri}catch{return null}}function B2(){Dc(Ri)}function Dc(n){Ri=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function p_(n){if(eg(n))return!0;try{await n.resume();const r=eg(n);return!r&&n===Ri&&Dc(n),r}catch{return n===Ri&&Dc(n),!1}}function eg(n){return n.state==="running"}function tg(n,r,s){const o=n.createGain(),m=n.createOscillator(),b=n.createOscillator(),f=s.startAt+s.duration;o.gain.setValueAtTime(1e-4,s.startAt),o.gain.exponentialRampToValueAtTime(s.peakGain,s.startAt+.018),o.gain.exponentialRampToValueAtTime(1e-4,f),m.type="sine",m.frequency.setValueAtTime(s.frequency,s.startAt),b.type="triangle",b.frequency.setValueAtTime(s.frequency*2.01,s.startAt),m.connect(o),b.connect(o),o.connect(r),m.start(s.startAt),b.start(s.startAt),m.stop(f+.02),b.stop(f+.02)}const m_=document.getElementById("root");if(!m_)throw new Error("Missing #root element.");H0.createRoot(m_).render(N.jsx(fe.StrictMode,{children:N.jsx(T2,{})}));
|