vibe-coding-master 0.3.22 → 0.3.24
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 +2 -2
- package/dist/backend/adapters/git-adapter.js +53 -0
- package/dist/backend/api/artifact-routes.js +1 -28
- package/dist/backend/api/codex-translation-routes.js +24 -0
- package/dist/backend/api/harness-routes.js +10 -0
- package/dist/backend/api/task-routes.js +2 -6
- package/dist/backend/gateway/gateway-service.js +3 -16
- package/dist/backend/server.js +5 -2
- package/dist/backend/services/artifact-service.js +1 -30
- package/dist/backend/services/codex-hook-service.js +30 -9
- package/dist/backend/services/codex-translation-service.js +17 -40
- package/dist/backend/services/harness-service.js +106 -0
- package/dist/backend/services/session-service.js +189 -15
- package/dist/backend/services/status-service.js +1 -6
- package/dist/backend/services/task-service.js +42 -110
- package/dist/backend/services/translation-service.js +15 -4
- package/dist/backend/templates/handoff.js +3 -3
- package/dist/backend/templates/harness/architect-agent.js +3 -2
- package/dist/backend/templates/harness/coder-agent.js +6 -1
- package/dist/backend/templates/harness/project-manager-agent.js +10 -1
- package/dist/backend/templates/harness/vcm-route-message-skill.js +8 -2
- package/dist/shared/types/app-settings.js +3 -2
- package/dist-frontend/assets/index-CKWy15WL.js +94 -0
- package/dist-frontend/assets/index-Cfum1Prr.css +32 -0
- package/dist-frontend/index.html +2 -2
- package/docs/cc-best-practices.md +1 -1
- package/docs/codex-translation-plan.md +41 -37
- package/docs/full-harness-baseline.md +0 -1
- package/docs/gateway-design.md +9 -13
- package/docs/product-design.md +23 -44
- package/docs/v0.4-custom-workflow-plan.md +785 -0
- package/docs/vcm-cc-best-practices.md +15 -13
- package/package.json +1 -1
- package/dist-frontend/assets/index-CEB6Bssn.js +0 -95
- package/dist-frontend/assets/index-Dmefx9m7.css +0 -32
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
var I0=Object.defineProperty;var U0=(n,r,s)=>r in n?I0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var Xp=(n,r,s)=>U0(n,typeof r!="symbol"?r+"":r,s);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))o(p);new MutationObserver(p=>{for(const y of p)if(y.type==="childList")for(const f of y.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(p){const y={};return p.integrity&&(y.integrity=p.integrity),p.referrerPolicy&&(y.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?y.credentials="include":p.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function o(p){if(p.ep)return;p.ep=!0;const y=s(p);fetch(p.href,y)}})();function cg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Qc={exports:{}},$s={};/**
|
|
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 Qp;function P0(){if(Qp)return $s;Qp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,p,y){var f=null;if(y!==void 0&&(f=""+y),p.key!==void 0&&(f=""+p.key),"key"in p){y={};for(var a in p)a!=="key"&&(y[a]=p[a])}else y=p;return p=y.ref,{$$typeof:n,type:o,key:f,ref:p!==void 0?p:null,props:y}}return $s.Fragment=r,$s.jsx=s,$s.jsxs=s,$s}var Zp;function F0(){return Zp||(Zp=1,Qc.exports=P0()),Qc.exports}var B=F0(),Zc={exports:{}},ze={};/**
|
|
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 Jp;function q0(){if(Jp)return ze;Jp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),f=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),b=Symbol.iterator;function w(z){return z===null||typeof z!="object"?null:(z=b&&z[b]||z["@@iterator"],typeof z=="function"?z:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function S(z,V,j){this.props=z,this.context=V,this.refs=v,this.updater=j||E}S.prototype.isReactComponent={},S.prototype.setState=function(z,V){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,V,"setState")},S.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function g(){}g.prototype=S.prototype;function _(z,V,j){this.props=z,this.context=V,this.refs=v,this.updater=j||E}var A=_.prototype=new g;A.constructor=_,x(A,S.prototype),A.isPureReactComponent=!0;var M=Array.isArray;function D(){}var T={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function R(z,V,j){var ee=j.ref;return{$$typeof:n,type:z,key:V,ref:ee!==void 0?ee:null,props:j}}function N(z,V){return R(z.type,V,z.props)}function I(z){return typeof z=="object"&&z!==null&&z.$$typeof===n}function P(z){var V={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(j){return V[j]})}var F=/\/+/g;function Y(z,V){return typeof z=="object"&&z!==null&&z.key!=null?P(""+z.key):V.toString(36)}function W(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(D,D):(z.status="pending",z.then(function(V){z.status==="pending"&&(z.status="fulfilled",z.value=V)},function(V){z.status==="pending"&&(z.status="rejected",z.reason=V)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function G(z,V,j,ee,ae){var ge=typeof z;(ge==="undefined"||ge==="boolean")&&(z=null);var K=!1;if(z===null)K=!0;else switch(ge){case"bigint":case"string":case"number":K=!0;break;case"object":switch(z.$$typeof){case n:case r:K=!0;break;case d:return K=z._init,G(K(z._payload),V,j,ee,ae)}}if(K)return ae=ae(z),K=ee===""?"."+Y(z,0):ee,M(ae)?(j="",K!=null&&(j=K.replace(F,"$&/")+"/"),G(ae,V,j,"",function(le){return le})):ae!=null&&(I(ae)&&(ae=N(ae,j+(ae.key==null||z&&z.key===ae.key?"":(""+ae.key).replace(F,"$&/")+"/")+K)),V.push(ae)),1;K=0;var q=ee===""?".":ee+":";if(M(z))for(var ce=0;ce<z.length;ce++)ee=z[ce],ge=q+Y(ee,ce),K+=G(ee,V,j,ge,ae);else if(ce=w(z),typeof ce=="function")for(z=ce.call(z),ce=0;!(ee=z.next()).done;)ee=ee.value,ge=q+Y(ee,ce++),K+=G(ee,V,j,ge,ae);else if(ge==="object"){if(typeof z.then=="function")return G(W(z),V,j,ee,ae);throw V=String(z),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return K}function $(z,V,j){if(z==null)return z;var ee=[],ae=0;return G(z,ee,"","",function(ge){return V.call(j,ge,ae++)}),ee}function Q(z){if(z._status===-1){var V=z._result;V=V(),V.then(function(j){(z._status===0||z._status===-1)&&(z._status=1,z._result=j)},function(j){(z._status===0||z._status===-1)&&(z._status=2,z._result=j)}),z._status===-1&&(z._status=0,z._result=V)}if(z._status===1)return z._result.default;throw z._result}var H=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},O={map:$,forEach:function(z,V,j){$(z,function(){V.apply(this,arguments)},j)},count:function(z){var V=0;return $(z,function(){V++}),V},toArray:function(z){return $(z,function(V){return V})||[]},only:function(z){if(!I(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return ze.Activity=u,ze.Children=O,ze.Component=S,ze.Fragment=s,ze.Profiler=p,ze.PureComponent=_,ze.StrictMode=o,ze.Suspense=c,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,ze.__COMPILER_RUNTIME={__proto__:null,c:function(z){return T.H.useMemoCache(z)}},ze.cache=function(z){return function(){return z.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(z,V,j){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ee=x({},z.props),ae=z.key;if(V!=null)for(ge in V.key!==void 0&&(ae=""+V.key),V)!k.call(V,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&V.ref===void 0||(ee[ge]=V[ge]);var ge=arguments.length-2;if(ge===1)ee.children=j;else if(1<ge){for(var K=Array(ge),q=0;q<ge;q++)K[q]=arguments[q+2];ee.children=K}return R(z.type,ae,ee)},ze.createContext=function(z){return z={$$typeof:f,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:y,_context:z},z},ze.createElement=function(z,V,j){var ee,ae={},ge=null;if(V!=null)for(ee in V.key!==void 0&&(ge=""+V.key),V)k.call(V,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ae[ee]=V[ee]);var K=arguments.length-2;if(K===1)ae.children=j;else if(1<K){for(var q=Array(K),ce=0;ce<K;ce++)q[ce]=arguments[ce+2];ae.children=q}if(z&&z.defaultProps)for(ee in K=z.defaultProps,K)ae[ee]===void 0&&(ae[ee]=K[ee]);return R(z,ge,ae)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(z){return{$$typeof:a,render:z}},ze.isValidElement=I,ze.lazy=function(z){return{$$typeof:d,_payload:{_status:-1,_result:z},_init:Q}},ze.memo=function(z,V){return{$$typeof:h,type:z,compare:V===void 0?null:V}},ze.startTransition=function(z){var V=T.T,j={};T.T=j;try{var ee=z(),ae=T.S;ae!==null&&ae(j,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(D,H)}catch(ge){H(ge)}finally{V!==null&&j.types!==null&&(V.types=j.types),T.T=V}},ze.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},ze.use=function(z){return T.H.use(z)},ze.useActionState=function(z,V,j){return T.H.useActionState(z,V,j)},ze.useCallback=function(z,V){return T.H.useCallback(z,V)},ze.useContext=function(z){return T.H.useContext(z)},ze.useDebugValue=function(){},ze.useDeferredValue=function(z,V){return T.H.useDeferredValue(z,V)},ze.useEffect=function(z,V){return T.H.useEffect(z,V)},ze.useEffectEvent=function(z){return T.H.useEffectEvent(z)},ze.useId=function(){return T.H.useId()},ze.useImperativeHandle=function(z,V,j){return T.H.useImperativeHandle(z,V,j)},ze.useInsertionEffect=function(z,V){return T.H.useInsertionEffect(z,V)},ze.useLayoutEffect=function(z,V){return T.H.useLayoutEffect(z,V)},ze.useMemo=function(z,V){return T.H.useMemo(z,V)},ze.useOptimistic=function(z,V){return T.H.useOptimistic(z,V)},ze.useReducer=function(z,V,j){return T.H.useReducer(z,V,j)},ze.useRef=function(z){return T.H.useRef(z)},ze.useState=function(z){return T.H.useState(z)},ze.useSyncExternalStore=function(z,V,j){return T.H.useSyncExternalStore(z,V,j)},ze.useTransition=function(){return T.H.useTransition()},ze.version="19.2.6",ze}var em;function ju(){return em||(em=1,Zc.exports=q0()),Zc.exports}var he=ju(),Jc={exports:{}},Ys={},eu={exports:{}},tu={};/**
|
|
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 tm;function V0(){return tm||(tm=1,(function(n){function r(G,$){var Q=G.length;G.push($);e:for(;0<Q;){var H=Q-1>>>1,O=G[H];if(0<p(O,$))G[H]=$,G[Q]=O,Q=H;else break e}}function s(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var $=G[0],Q=G.pop();if(Q!==$){G[0]=Q;e:for(var H=0,O=G.length,z=O>>>1;H<z;){var V=2*(H+1)-1,j=G[V],ee=V+1,ae=G[ee];if(0>p(j,Q))ee<O&&0>p(ae,j)?(G[H]=ae,G[ee]=Q,H=ee):(G[H]=j,G[V]=Q,H=V);else if(ee<O&&0>p(ae,Q))G[H]=ae,G[ee]=Q,H=ee;else break e}}return $}function p(G,$){var Q=G.sortIndex-$.sortIndex;return Q!==0?Q:G.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;n.unstable_now=function(){return y.now()}}else{var f=Date,a=f.now();n.unstable_now=function(){return f.now()-a}}var c=[],h=[],d=1,u=null,b=3,w=!1,E=!1,x=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function A(G){for(var $=s(h);$!==null;){if($.callback===null)o(h);else if($.startTime<=G)o(h),$.sortIndex=$.expirationTime,r(c,$);else break;$=s(h)}}function M(G){if(x=!1,A(G),!E)if(s(c)!==null)E=!0,D||(D=!0,P());else{var $=s(h);$!==null&&W(M,$.startTime-G)}}var D=!1,T=-1,k=5,R=-1;function N(){return v?!0:!(n.unstable_now()-R<k)}function I(){if(v=!1,D){var G=n.unstable_now();R=G;var $=!0;try{e:{E=!1,x&&(x=!1,g(T),T=-1),w=!0;var Q=b;try{t:{for(A(G),u=s(c);u!==null&&!(u.expirationTime>G&&N());){var H=u.callback;if(typeof H=="function"){u.callback=null,b=u.priorityLevel;var O=H(u.expirationTime<=G);if(G=n.unstable_now(),typeof O=="function"){u.callback=O,A(G),$=!0;break t}u===s(c)&&o(c),A(G)}else o(c);u=s(c)}if(u!==null)$=!0;else{var z=s(h);z!==null&&W(M,z.startTime-G),$=!1}}break e}finally{u=null,b=Q,w=!1}$=void 0}}finally{$?P():D=!1}}}var P;if(typeof _=="function")P=function(){_(I)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Y=F.port2;F.port1.onmessage=I,P=function(){Y.postMessage(null)}}else P=function(){S(I,0)};function W(G,$){T=S(function(){G(n.unstable_now())},$)}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(G){G.callback=null},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(G){switch(b){case 1:case 2:case 3:var $=3;break;default:$=b}var Q=b;b=$;try{return G()}finally{b=Q}},n.unstable_requestPaint=function(){v=!0},n.unstable_runWithPriority=function(G,$){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Q=b;b=G;try{return $()}finally{b=Q}},n.unstable_scheduleCallback=function(G,$,Q){var H=n.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?H+Q:H):Q=H,G){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=Q+O,G={id:d++,callback:$,priorityLevel:G,startTime:Q,expirationTime:O,sortIndex:-1},Q>H?(G.sortIndex=Q,r(h,G),s(c)===null&&G===s(h)&&(x?(g(T),T=-1):x=!0,W(M,Q-H))):(G.sortIndex=O,r(c,G),E||w||(E=!0,D||(D=!0,P()))),G},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(G){var $=b;return function(){var Q=b;b=$;try{return G.apply(this,arguments)}finally{b=Q}}}})(tu)),tu}var nm;function G0(){return nm||(nm=1,eu.exports=V0()),eu.exports}var nu={exports:{}},zt={};/**
|
|
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 im;function $0(){if(im)return zt;im=1;var n=ju();function r(c){var h="https://react.dev/errors/"+c;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 #"+c+"; 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},p=Symbol.for("react.portal");function y(c,h,d){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:u==null?null:""+u,children:c,containerInfo:h,implementation:d}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(c,h){if(c==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,zt.createPortal=function(c,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 y(c,h,null,d)},zt.flushSync=function(c){var h=f.T,d=o.p;try{if(f.T=null,o.p=2,c)return c()}finally{f.T=h,o.p=d,o.d.f()}},zt.preconnect=function(c,h){typeof c=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(c,h))},zt.prefetchDNS=function(c){typeof c=="string"&&o.d.D(c)},zt.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var d=h.as,u=a(d,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?o.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:u,integrity:b,fetchPriority:w}):d==="script"&&o.d.X(c,{crossOrigin:u,integrity:b,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},zt.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var d=a(h.as,h.crossOrigin);o.d.M(c,{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(c)},zt.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var d=h.as,u=a(d,h.crossOrigin);o.d.L(c,d,{crossOrigin:u,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})}},zt.preloadModule=function(c,h){if(typeof c=="string")if(h){var d=a(h.as,h.crossOrigin);o.d.m(c,{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(c)},zt.requestFormReset=function(c){o.d.r(c)},zt.unstable_batchedUpdates=function(c,h){return c(h)},zt.useFormState=function(c,h,d){return f.H.useFormState(c,h,d)},zt.useFormStatus=function(){return f.H.useHostTransitionStatus()},zt.version="19.2.6",zt}var rm;function Y0(){if(rm)return nu.exports;rm=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(),nu.exports=$0(),nu.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 sm;function K0(){if(sm)return Ys;sm=1;var n=G0(),r=ju(),s=Y0();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 p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(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 c(e){if(y(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,l=t;;){var m=i.return;if(m===null)break;var C=m.alternate;if(C===null){if(l=m.return,l!==null){i=l;continue}break}if(m.child===C.child){for(C=m.child;C;){if(C===i)return c(m),e;if(C===l)return c(m),t;C=C.sibling}throw Error(o(188))}if(i.return!==l.return)i=m,l=C;else{for(var L=!1,U=m.child;U;){if(U===i){L=!0,i=m,l=C;break}if(U===l){L=!0,l=m,i=C;break}U=U.sibling}if(!L){for(U=C.child;U;){if(U===i){L=!0,i=C,l=m;break}if(U===l){L=!0,l=C,i=m;break}U=U.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 u=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),_=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"),k=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var F=Symbol.for("react.client.reference");function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===F?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case S:return"Profiler";case v:return"StrictMode";case M:return"Suspense";case D:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case _: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 k:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}var W=Array.isArray,G=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},H=[],O=-1;function z(e){return{current:e}}function V(e){0>O||(e.current=H[O],H[O]=null,O--)}function j(e,t){O++,H[O]=e.current,e.current=t}var ee=z(null),ae=z(null),ge=z(null),K=z(null);function q(e,t){switch(j(ge,t),j(ae,e),j(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yp(t),e=Sp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(ee),j(ee,e)}function ce(){V(ee),V(ae),V(ge)}function le(e){e.memoizedState!==null&&j(K,e);var t=ee.current,i=Sp(t,e.type);t!==i&&(j(ae,e),j(ee,i))}function ue(e){ae.current===e&&(V(ee),V(ae)),K.current===e&&(V(K),Fs._currentValue=Q)}var te,Se;function we(e){if(te===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);te=t&&t[1]||"",Se=-1<i.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+te+e+Se}var xe=!1;function nt(e,t){if(!e||xe)return"";xe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(oe){var se=oe}Reflect.construct(e,[],_e)}else{try{_e.call()}catch(oe){se=oe}e.call(_e.prototype)}}else{try{throw Error()}catch(oe){se=oe}(_e=e())&&typeof _e.catch=="function"&&_e.catch(function(){})}}catch(oe){if(oe&&se&&typeof oe.stack=="string")return[oe.stack,se.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=l.DetermineComponentFrameRoot(),L=C[0],U=C[1];if(L&&U){var X=L.split(`
|
|
44
|
-
`),re=U.split(`
|
|
45
|
-
`);for(m=l=0;l<X.length&&!X[l].includes("DetermineComponentFrameRoot");)l++;for(;m<re.length&&!re[m].includes("DetermineComponentFrameRoot");)m++;if(l===X.length||m===re.length)for(l=X.length-1,m=re.length-1;1<=l&&0<=m&&X[l]!==re[m];)m--;for(;1<=l&&0<=m;l--,m--)if(X[l]!==re[m]){if(l!==1||m!==1)do if(l--,m--,0>m||X[l]!==re[m]){var de=`
|
|
46
|
-
`+X[l].replace(" at new "," at ");return e.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",e.displayName)),de}while(1<=l&&0<=m);break}}}finally{xe=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?we(i):""}function Le(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return nt(e.type,!1);case 11:return nt(e.type.render,!1);case 1:return nt(e.type,!0);case 31:return we("Activity");default:return""}}function Vt(e){try{var t="",i=null;do t+=Le(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var Pt=Object.prototype.hasOwnProperty,jt=n.unstable_scheduleCallback,Tt=n.unstable_cancelCallback,Gt=n.unstable_shouldYield,yt=n.unstable_requestPaint,lt=n.unstable_now,kt=n.unstable_getCurrentPriorityLevel,fe=n.unstable_ImmediatePriority,ve=n.unstable_UserBlockingPriority,ke=n.unstable_NormalPriority,Oe=n.unstable_LowPriority,Be=n.unstable_IdlePriority,me=n.log,Te=n.unstable_setDisableYieldValue,mt=null,De=null;function Je(e){if(typeof me=="function"&&Te(e),De&&typeof De.setStrictMode=="function")try{De.setStrictMode(mt,e)}catch{}}var Pe=Math.clz32?Math.clz32:es,wn=Math.log,$t=Math.LN2;function es(e){return e>>>=0,e===0?32:31-(wn(e)/$t|0)|0}var nr=256,jn=262144,ir=4194304;function zn(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 rr(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var m=0,C=e.suspendedLanes,L=e.pingedLanes;e=e.warmLanes;var U=l&134217727;return U!==0?(l=U&~C,l!==0?m=zn(l):(L&=U,L!==0?m=zn(L):i||(i=U&~e,i!==0&&(m=zn(i))))):(U=l&~C,U!==0?m=zn(U):L!==0?m=zn(L):i||(i=l&~e,i!==0&&(m=zn(i)))),m===0?0:t!==0&&t!==m&&(t&C)===0&&(C=m&-m,i=t&-t,C>=i||C===32&&(i&4194048)!==0)?t:m}function Ni(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pa(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 ri(){var e=ir;return ir<<=1,(ir&62914560)===0&&(ir=4194304),e}function si(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Tn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ts(e,t,i,l,m,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 U=e.entanglements,X=e.expirationTimes,re=e.hiddenUpdates;for(i=L&~i;0<i;){var de=31-Pe(i),_e=1<<de;U[de]=0,X[de]=-1;var se=re[de];if(se!==null)for(re[de]=null,de=0;de<se.length;de++){var oe=se[de];oe!==null&&(oe.lane&=-536870913)}i&=~_e}l!==0&&ol(e,l,0),C!==0&&m===0&&e.tag!==0&&(e.suspendedLanes|=C&~(L&~t))}function ol(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Pe(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function sr(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Pe(i),m=1<<l;m&t|e[l]&t&&(e[l]|=t),i&=~m}}function lr(e,t){var i=t&-t;return i=(i&42)!==0?1:Qe(i),(i&(e.suspendedLanes|t))!==0?0:i}function Qe(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 ns(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function cl(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:qp(e.type))}function ul(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var Dn=Math.random().toString(36).slice(2),gt="__reactFiber$"+Dn,Mt="__reactProps$"+Dn,ne="__reactContainer$"+Dn,be="__reactEvents$"+Dn,St="__reactListeners$"+Dn,Yt="__reactHandles$"+Dn,sh="__reactResources$"+Dn,is="__reactMarker$"+Dn;function Fa(e){delete e[gt],delete e[Mt],delete e[be],delete e[St],delete e[Yt]}function ar(e){var t=e[gt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ne]||i[gt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Ap(e);e!==null;){if(i=e[gt])return i;e=Ap(e)}return t}e=i,i=e.parentNode}return null}function or(e){if(e=e[gt]||e[ne]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function cr(e){var t=e[sh];return t||(t=e[sh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Dt(e){e[is]=!0}var lh=new Set,ah={};function ji(e,t){ur(e,t),ur(e+"Capture",t)}function ur(e,t){for(ah[e]=t,e=0;e<t.length;e++)lh.add(t[e])}var R_=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]*$"),oh={},ch={};function M_(e){return Pt.call(ch,e)?!0:Pt.call(oh,e)?!1:R_.test(e)?ch[e]=!0:(oh[e]=!0,!1)}function hl(e,t,i){if(M_(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function fl(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 Hn(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 fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function L_(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 m=l.get,C=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return m.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 qa(e){if(!e._valueTracker){var t=uh(e)?"checked":"value";e._valueTracker=L_(e,t,""+e[t])}}function hh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=uh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function dl(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 O_=/[\n"\\]/g;function dn(e){return e.replace(O_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Va(e,t,i,l,m,C,L,U){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=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):L!=="submit"&&L!=="reset"||e.removeAttribute("value"),t!=null?Ga(e,L,fn(t)):i!=null?Ga(e,L,fn(i)):l!=null&&e.removeAttribute("value"),m==null&&C!=null&&(e.defaultChecked=!!C),m!=null&&(e.checked=m&&typeof m!="function"&&typeof m!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+fn(U):e.removeAttribute("name")}function fh(e,t,i,l,m,C,L,U){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)){qa(e);return}i=i!=null?""+fn(i):"",t=t!=null?""+fn(t):i,U||t===e.value||(e.value=t),e.defaultValue=t}l=l??m,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=U?e.checked:!!l,e.defaultChecked=!!l,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(e.name=L),qa(e)}function Ga(e,t,i){t==="number"&&dl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function hr(e,t,i,l){if(e=e.options,t){t={};for(var m=0;m<i.length;m++)t["$"+i[m]]=!0;for(i=0;i<e.length;i++)m=t.hasOwnProperty("$"+e[i].value),e[i].selected!==m&&(e[i].selected=m),m&&l&&(e[i].defaultSelected=!0)}else{for(i=""+fn(i),t=null,m=0;m<e.length;m++){if(e[m].value===i){e[m].selected=!0,l&&(e[m].defaultSelected=!0);return}t!==null||e[m].disabled||(t=e[m])}t!==null&&(t.selected=!0)}}function dh(e,t,i){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+fn(i):""}function ph(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(o(92));if(W(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=fn(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),qa(e)}function fr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var B_=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 mh(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||B_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function gh(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 m in t)l=t[m],t.hasOwnProperty(m)&&i[m]!==l&&mh(e,m,l)}else for(var C in t)t.hasOwnProperty(C)&&mh(e,C,t[C])}function $a(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var N_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),j_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function pl(e){return j_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function In(){}var Ya=null;function Ka(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dr=null,pr=null;function _h(e){var t=or(e);if(t&&(e=t.stateNode)){var i=e[Mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Va(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+dn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var m=l[Mt]||null;if(!m)throw Error(o(90));Va(l,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&hh(l)}break e;case"textarea":dh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&hr(e,!!i.multiple,t,!1)}}}var Wa=!1;function vh(e,t,i){if(Wa)return e(t,i);Wa=!0;try{var l=e(t);return l}finally{if(Wa=!1,(dr!==null||pr!==null)&&(ta(),dr&&(t=dr,e=pr,pr=dr=null,_h(t),e)))for(t=0;t<e.length;t++)_h(e[t])}}function ss(e,t){var i=e.stateNode;if(i===null)return null;var l=i[Mt]||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 Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xa=!1;if(Un)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){Xa=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{Xa=!1}var li=null,Qa=null,ml=null;function yh(){if(ml)return ml;var e,t=Qa,i=t.length,l,m="value"in li?li.value:li.textContent,C=m.length;for(e=0;e<i&&t[e]===m[e];e++);var L=i-e;for(l=1;l<=L&&t[i-l]===m[C-l];l++);return ml=m.slice(e,1<l?1-l:void 0)}function gl(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 _l(){return!0}function Sh(){return!1}function Kt(e){function t(i,l,m,C,L){this._reactName=i,this._targetInst=m,this.type=l,this.nativeEvent=C,this.target=L,this.currentTarget=null;for(var U in e)e.hasOwnProperty(U)&&(i=e[U],this[U]=i?i(C):C[U]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?_l:Sh,this.isPropagationStopped=Sh,this}return u(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=_l)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=_l)},persist:function(){},isPersistent:_l}),t}var zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vl=Kt(zi),as=u({},zi,{view:0,detail:0}),z_=Kt(as),Za,Ja,os,yl=u({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:to,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!==os&&(os&&e.type==="mousemove"?(Za=e.screenX-os.screenX,Ja=e.screenY-os.screenY):Ja=Za=0,os=e),Za)},movementY:function(e){return"movementY"in e?e.movementY:Ja}}),bh=Kt(yl),H_=u({},yl,{dataTransfer:0}),I_=Kt(H_),U_=u({},as,{relatedTarget:0}),eo=Kt(U_),P_=u({},zi,{animationName:0,elapsedTime:0,pseudoElement:0}),F_=Kt(P_),q_=u({},zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),V_=Kt(q_),G_=u({},zi,{data:0}),Ch=Kt(G_),$_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y_={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"},K_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=K_[e])?!!t[e]:!1}function to(){return W_}var X_=u({},as,{key:function(e){if(e.key){var t=$_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Y_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:to,charCode:function(e){return e.type==="keypress"?gl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Q_=Kt(X_),Z_=u({},yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wh=Kt(Z_),J_=u({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:to}),ev=Kt(J_),tv=u({},zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),nv=Kt(tv),iv=u({},yl,{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}),rv=Kt(iv),sv=u({},zi,{newState:0,oldState:0}),lv=Kt(sv),av=[9,13,27,32],no=Un&&"CompositionEvent"in window,cs=null;Un&&"documentMode"in document&&(cs=document.documentMode);var ov=Un&&"TextEvent"in window&&!cs,xh=Un&&(!no||cs&&8<cs&&11>=cs),Eh=" ",kh=!1;function Ah(e,t){switch(e){case"keyup":return av.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Th(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mr=!1;function cv(e,t){switch(e){case"compositionend":return Th(t);case"keypress":return t.which!==32?null:(kh=!0,Eh);case"textInput":return e=t.data,e===Eh&&kh?null:e;default:return null}}function uv(e,t){if(mr)return e==="compositionend"||!no&&Ah(e,t)?(e=yh(),ml=Qa=li=null,mr=!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 xh&&t.locale!=="ko"?null:t.data;default:return null}}var hv={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 Dh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hv[e.type]:t==="textarea"}function Rh(e,t,i,l){dr?pr?pr.push(l):pr=[l]:dr=l,t=oa(t,"onChange"),0<t.length&&(i=new vl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var us=null,hs=null;function fv(e){dp(e,0)}function Sl(e){var t=rs(e);if(hh(t))return e}function Mh(e,t){if(e==="change")return t}var Lh=!1;if(Un){var io;if(Un){var ro="oninput"in document;if(!ro){var Oh=document.createElement("div");Oh.setAttribute("oninput","return;"),ro=typeof Oh.oninput=="function"}io=ro}else io=!1;Lh=io&&(!document.documentMode||9<document.documentMode)}function Bh(){us&&(us.detachEvent("onpropertychange",Nh),hs=us=null)}function Nh(e){if(e.propertyName==="value"&&Sl(hs)){var t=[];Rh(t,hs,e,Ka(e)),vh(fv,t)}}function dv(e,t,i){e==="focusin"?(Bh(),us=t,hs=i,us.attachEvent("onpropertychange",Nh)):e==="focusout"&&Bh()}function pv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sl(hs)}function mv(e,t){if(e==="click")return Sl(t)}function gv(e,t){if(e==="input"||e==="change")return Sl(t)}function _v(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nn=typeof Object.is=="function"?Object.is:_v;function fs(e,t){if(nn(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 m=i[l];if(!Pt.call(t,m)||!nn(e[m],t[m]))return!1}return!0}function jh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zh(e,t){var i=jh(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=jh(i)}}function Hh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ih(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=dl(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=dl(e.document)}return t}function so(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 vv=Un&&"documentMode"in document&&11>=document.documentMode,gr=null,lo=null,ds=null,ao=!1;function Uh(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ao||gr==null||gr!==dl(l)||(l=gr,"selectionStart"in l&&so(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}),ds&&fs(ds,l)||(ds=l,l=oa(lo,"onSelect"),0<l.length&&(t=new vl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=gr)))}function Hi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var _r={animationend:Hi("Animation","AnimationEnd"),animationiteration:Hi("Animation","AnimationIteration"),animationstart:Hi("Animation","AnimationStart"),transitionrun:Hi("Transition","TransitionRun"),transitionstart:Hi("Transition","TransitionStart"),transitioncancel:Hi("Transition","TransitionCancel"),transitionend:Hi("Transition","TransitionEnd")},oo={},Ph={};Un&&(Ph=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function Ii(e){if(oo[e])return oo[e];if(!_r[e])return e;var t=_r[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ph)return oo[e]=t[i];return e}var Fh=Ii("animationend"),qh=Ii("animationiteration"),Vh=Ii("animationstart"),yv=Ii("transitionrun"),Sv=Ii("transitionstart"),bv=Ii("transitioncancel"),Gh=Ii("transitionend"),$h=new Map,co="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(" ");co.push("scrollEnd");function xn(e,t){$h.set(e,t),ji(t,[e])}var bl=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)},pn=[],vr=0,uo=0;function Cl(){for(var e=vr,t=uo=vr=0;t<e;){var i=pn[t];pn[t++]=null;var l=pn[t];pn[t++]=null;var m=pn[t];pn[t++]=null;var C=pn[t];if(pn[t++]=null,l!==null&&m!==null){var L=l.pending;L===null?m.next=m:(m.next=L.next,L.next=m),l.pending=m}C!==0&&Yh(i,m,C)}}function wl(e,t,i,l){pn[vr++]=e,pn[vr++]=t,pn[vr++]=i,pn[vr++]=l,uo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function ho(e,t,i,l){return wl(e,t,i,l),xl(e)}function Ui(e,t){return wl(e,null,null,t),xl(e)}function Yh(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var m=!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||(m=!0)),e=C,C=C.return;return e.tag===3?(C=e.stateNode,m&&t!==null&&(m=31-Pe(i),e=C.hiddenUpdates,l=e[m],l===null?e[m]=[t]:l.push(t),t.lane=i|536870912),C):null}function xl(e){if(50<Ns)throw Ns=0,bc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yr={};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 rn(e,t,i,l){return new Cv(e,t,i,l)}function fo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pn(e,t){var i=e.alternate;return i===null?(i=rn(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 Kh(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 El(e,t,i,l,m,C){var L=0;if(l=e,typeof e=="function")fo(e)&&(L=1);else if(typeof e=="string")L=A0(e,i,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=rn(31,i,t,m),e.elementType=R,e.lanes=C,e;case x:return Pi(i.children,m,C,t);case v:L=8,m|=24;break;case S:return e=rn(12,i,t,m|2),e.elementType=S,e.lanes=C,e;case M:return e=rn(13,i,t,m),e.elementType=M,e.lanes=C,e;case D:return e=rn(19,i,t,m),e.elementType=D,e.lanes=C,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:L=10;break e;case g:L=9;break e;case A:L=11;break e;case T:L=14;break e;case k:L=16,l=null;break e}L=29,i=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=rn(L,i,t,m),t.elementType=e,t.type=l,t.lanes=C,t}function Pi(e,t,i,l){return e=rn(7,e,l,t),e.lanes=i,e}function po(e,t,i){return e=rn(6,e,null,t),e.lanes=i,e}function Wh(e){var t=rn(18,null,null,0);return t.stateNode=e,t}function mo(e,t,i){return t=rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xh=new WeakMap;function mn(e,t){if(typeof e=="object"&&e!==null){var i=Xh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Vt(t)},Xh.set(e,t),t)}return{value:e,source:t,stack:Vt(t)}}var Sr=[],br=0,kl=null,ps=0,gn=[],_n=0,ai=null,Rn=1,Mn="";function Fn(e,t){Sr[br++]=ps,Sr[br++]=kl,kl=e,ps=t}function Qh(e,t,i){gn[_n++]=Rn,gn[_n++]=Mn,gn[_n++]=ai,ai=e;var l=Rn;e=Mn;var m=32-Pe(l)-1;l&=~(1<<m),i+=1;var C=32-Pe(t)+m;if(30<C){var L=m-m%5;C=(l&(1<<L)-1).toString(32),l>>=L,m-=L,Rn=1<<32-Pe(t)+m|i<<m|l,Mn=C+e}else Rn=1<<C|i<<m|l,Mn=e}function go(e){e.return!==null&&(Fn(e,1),Qh(e,1,0))}function _o(e){for(;e===kl;)kl=Sr[--br],Sr[br]=null,ps=Sr[--br],Sr[br]=null;for(;e===ai;)ai=gn[--_n],gn[_n]=null,Mn=gn[--_n],gn[_n]=null,Rn=gn[--_n],gn[_n]=null}function Zh(e,t){gn[_n++]=Rn,gn[_n++]=Mn,gn[_n++]=ai,Rn=t.id,Mn=t.overflow,ai=e}var Lt=null,ut=null,Ye=!1,oi=null,vn=!1,vo=Error(o(519));function ci(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ms(mn(t,e)),vo}function Jh(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[gt]=e,t[Mt]=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<zs.length;i++)qe(zs[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),fh(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),ph(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||_p(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=In),t=!0):t=!1,t||ci(e,!0)}function ef(e){for(Lt=e.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:Lt=Lt.return}}function Cr(e){if(e!==Lt)return!1;if(!Ye)return ef(e),Ye=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||jc(e.type,e.memoizedProps)),i=!i),i&&ut&&ci(e),ef(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ut=kp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ut=kp(e)}else t===27?(t=ut,wi(e.type)?(e=Pc,Pc=null,ut=e):ut=t):ut=Lt?Sn(e.stateNode.nextSibling):null;return!0}function Fi(){ut=Lt=null,Ye=!1}function yo(){var e=oi;return e!==null&&(Zt===null?Zt=e:Zt.push.apply(Zt,e),oi=null),e}function ms(e){oi===null?oi=[e]:oi.push(e)}var So=z(null),qi=null,qn=null;function ui(e,t,i){j(So,t._currentValue),t._currentValue=i}function Vn(e){e._currentValue=So.current,V(So)}function bo(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 Co(e,t,i,l){var m=e.child;for(m!==null&&(m.return=e);m!==null;){var C=m.dependencies;if(C!==null){var L=m.child;C=C.firstContext;e:for(;C!==null;){var U=C;C=m;for(var X=0;X<t.length;X++)if(U.context===t[X]){C.lanes|=i,U=C.alternate,U!==null&&(U.lanes|=i),bo(C.return,i,e),l||(L=null);break e}C=U.next}}else if(m.tag===18){if(L=m.return,L===null)throw Error(o(341));L.lanes|=i,C=L.alternate,C!==null&&(C.lanes|=i),bo(L,i,e),L=null}else L=m.child;if(L!==null)L.return=m;else for(L=m;L!==null;){if(L===e){L=null;break}if(m=L.sibling,m!==null){m.return=L.return,L=m;break}L=L.return}m=L}}function wr(e,t,i,l){e=null;for(var m=t,C=!1;m!==null;){if(!C){if((m.flags&524288)!==0)C=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var L=m.alternate;if(L===null)throw Error(o(387));if(L=L.memoizedProps,L!==null){var U=m.type;nn(m.pendingProps.value,L.value)||(e!==null?e.push(U):e=[U])}}else if(m===K.current){if(L=m.alternate,L===null)throw Error(o(387));L.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(e!==null?e.push(Fs):e=[Fs])}m=m.return}e!==null&&Co(t,e,i,l),t.flags|=262144}function Al(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vi(e){qi=e,qn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return tf(qi,e)}function Tl(e,t){return qi===null&&Vi(e),tf(e,t)}function tf(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},qn===null){if(e===null)throw Error(o(308));qn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qn=qn.next=t;return i}var wv=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()})}},xv=n.unstable_scheduleCallback,Ev=n.unstable_NormalPriority,bt={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wo(){return{controller:new wv,data:new Map,refCount:0}}function gs(e){e.refCount--,e.refCount===0&&xv(Ev,function(){e.controller.abort()})}var _s=null,xo=0,xr=0,Er=null;function kv(e,t){if(_s===null){var i=_s=[];xo=0,xr=Ac(),Er={status:"pending",value:void 0,then:function(l){i.push(l)}}}return xo++,t.then(nf,nf),t}function nf(){if(--xo===0&&_s!==null){Er!==null&&(Er.status="fulfilled");var e=_s;_s=null,xr=0,Er=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Av(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(m){i.push(m)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var m=0;m<i.length;m++)(0,i[m])(t)},function(m){for(l.status="rejected",l.reason=m,m=0;m<i.length;m++)(0,i[m])(void 0)}),l}var rf=G.S;G.S=function(e,t){Pd=lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&kv(e,t),rf!==null&&rf(e,t)};var Gi=z(null);function Eo(){var e=Gi.current;return e!==null?e:at.pooledCache}function Dl(e,t){t===null?j(Gi,Gi.current):j(Gi,t.pool)}function sf(){var e=Eo();return e===null?null:{parent:bt._currentValue,pool:e}}var kr=Error(o(460)),ko=Error(o(474)),Rl=Error(o(542)),Ml={then:function(){}};function lf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function af(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(In,In),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cf(e),e;default:if(typeof t.status=="string")t.then(In,In);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var m=t;m.status="fulfilled",m.value=l}},function(l){if(t.status==="pending"){var m=t;m.status="rejected",m.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,cf(e),e}throw Yi=t,kr}}function $i(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Yi=i,kr):i}}var Yi=null;function of(){if(Yi===null)throw Error(o(459));var e=Yi;return Yi=null,e}function cf(e){if(e===kr||e===Rl)throw Error(o(483))}var Ar=null,vs=0;function Ll(e){var t=vs;return vs+=1,Ar===null&&(Ar=[]),af(Ar,e,t)}function ys(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ol(e,t){throw t.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function uf(e){function t(J,Z){if(e){var ie=J.deletions;ie===null?(J.deletions=[Z],J.flags|=16):ie.push(Z)}}function i(J,Z){if(!e)return null;for(;Z!==null;)t(J,Z),Z=Z.sibling;return null}function l(J){for(var Z=new Map;J!==null;)J.key!==null?Z.set(J.key,J):Z.set(J.index,J),J=J.sibling;return Z}function m(J,Z){return J=Pn(J,Z),J.index=0,J.sibling=null,J}function C(J,Z,ie){return J.index=ie,e?(ie=J.alternate,ie!==null?(ie=ie.index,ie<Z?(J.flags|=67108866,Z):ie):(J.flags|=67108866,Z)):(J.flags|=1048576,Z)}function L(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function U(J,Z,ie,pe){return Z===null||Z.tag!==6?(Z=po(ie,J.mode,pe),Z.return=J,Z):(Z=m(Z,ie),Z.return=J,Z)}function X(J,Z,ie,pe){var Re=ie.type;return Re===x?de(J,Z,ie.props.children,pe,ie.key):Z!==null&&(Z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===k&&$i(Re)===Z.type)?(Z=m(Z,ie.props),ys(Z,ie),Z.return=J,Z):(Z=El(ie.type,ie.key,ie.props,null,J.mode,pe),ys(Z,ie),Z.return=J,Z)}function re(J,Z,ie,pe){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ie.containerInfo||Z.stateNode.implementation!==ie.implementation?(Z=mo(ie,J.mode,pe),Z.return=J,Z):(Z=m(Z,ie.children||[]),Z.return=J,Z)}function de(J,Z,ie,pe,Re){return Z===null||Z.tag!==7?(Z=Pi(ie,J.mode,pe,Re),Z.return=J,Z):(Z=m(Z,ie),Z.return=J,Z)}function _e(J,Z,ie){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=po(""+Z,J.mode,ie),Z.return=J,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:return ie=El(Z.type,Z.key,Z.props,null,J.mode,ie),ys(ie,Z),ie.return=J,ie;case E:return Z=mo(Z,J.mode,ie),Z.return=J,Z;case k:return Z=$i(Z),_e(J,Z,ie)}if(W(Z)||P(Z))return Z=Pi(Z,J.mode,ie,null),Z.return=J,Z;if(typeof Z.then=="function")return _e(J,Ll(Z),ie);if(Z.$$typeof===_)return _e(J,Tl(J,Z),ie);Ol(J,Z)}return null}function se(J,Z,ie,pe){var Re=Z!==null?Z.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Re!==null?null:U(J,Z,""+ie,pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:return ie.key===Re?X(J,Z,ie,pe):null;case E:return ie.key===Re?re(J,Z,ie,pe):null;case k:return ie=$i(ie),se(J,Z,ie,pe)}if(W(ie)||P(ie))return Re!==null?null:de(J,Z,ie,pe,null);if(typeof ie.then=="function")return se(J,Z,Ll(ie),pe);if(ie.$$typeof===_)return se(J,Z,Tl(J,ie),pe);Ol(J,ie)}return null}function oe(J,Z,ie,pe,Re){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(ie)||null,U(Z,J,""+pe,Re);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case w:return J=J.get(pe.key===null?ie:pe.key)||null,X(Z,J,pe,Re);case E:return J=J.get(pe.key===null?ie:pe.key)||null,re(Z,J,pe,Re);case k:return pe=$i(pe),oe(J,Z,ie,pe,Re)}if(W(pe)||P(pe))return J=J.get(ie)||null,de(Z,J,pe,Re,null);if(typeof pe.then=="function")return oe(J,Z,ie,Ll(pe),Re);if(pe.$$typeof===_)return oe(J,Z,ie,Tl(Z,pe),Re);Ol(Z,pe)}return null}function Ee(J,Z,ie,pe){for(var Re=null,We=null,Ae=Z,Ie=Z=0,$e=null;Ae!==null&&Ie<ie.length;Ie++){Ae.index>Ie?($e=Ae,Ae=null):$e=Ae.sibling;var Xe=se(J,Ae,ie[Ie],pe);if(Xe===null){Ae===null&&(Ae=$e);break}e&&Ae&&Xe.alternate===null&&t(J,Ae),Z=C(Xe,Z,Ie),We===null?Re=Xe:We.sibling=Xe,We=Xe,Ae=$e}if(Ie===ie.length)return i(J,Ae),Ye&&Fn(J,Ie),Re;if(Ae===null){for(;Ie<ie.length;Ie++)Ae=_e(J,ie[Ie],pe),Ae!==null&&(Z=C(Ae,Z,Ie),We===null?Re=Ae:We.sibling=Ae,We=Ae);return Ye&&Fn(J,Ie),Re}for(Ae=l(Ae);Ie<ie.length;Ie++)$e=oe(Ae,J,Ie,ie[Ie],pe),$e!==null&&(e&&$e.alternate!==null&&Ae.delete($e.key===null?Ie:$e.key),Z=C($e,Z,Ie),We===null?Re=$e:We.sibling=$e,We=$e);return e&&Ae.forEach(function(Ti){return t(J,Ti)}),Ye&&Fn(J,Ie),Re}function je(J,Z,ie,pe){if(ie==null)throw Error(o(151));for(var Re=null,We=null,Ae=Z,Ie=Z=0,$e=null,Xe=ie.next();Ae!==null&&!Xe.done;Ie++,Xe=ie.next()){Ae.index>Ie?($e=Ae,Ae=null):$e=Ae.sibling;var Ti=se(J,Ae,Xe.value,pe);if(Ti===null){Ae===null&&(Ae=$e);break}e&&Ae&&Ti.alternate===null&&t(J,Ae),Z=C(Ti,Z,Ie),We===null?Re=Ti:We.sibling=Ti,We=Ti,Ae=$e}if(Xe.done)return i(J,Ae),Ye&&Fn(J,Ie),Re;if(Ae===null){for(;!Xe.done;Ie++,Xe=ie.next())Xe=_e(J,Xe.value,pe),Xe!==null&&(Z=C(Xe,Z,Ie),We===null?Re=Xe:We.sibling=Xe,We=Xe);return Ye&&Fn(J,Ie),Re}for(Ae=l(Ae);!Xe.done;Ie++,Xe=ie.next())Xe=oe(Ae,J,Ie,Xe.value,pe),Xe!==null&&(e&&Xe.alternate!==null&&Ae.delete(Xe.key===null?Ie:Xe.key),Z=C(Xe,Z,Ie),We===null?Re=Xe:We.sibling=Xe,We=Xe);return e&&Ae.forEach(function(H0){return t(J,H0)}),Ye&&Fn(J,Ie),Re}function st(J,Z,ie,pe){if(typeof ie=="object"&&ie!==null&&ie.type===x&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:e:{for(var Re=ie.key;Z!==null;){if(Z.key===Re){if(Re=ie.type,Re===x){if(Z.tag===7){i(J,Z.sibling),pe=m(Z,ie.props.children),pe.return=J,J=pe;break e}}else if(Z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===k&&$i(Re)===Z.type){i(J,Z.sibling),pe=m(Z,ie.props),ys(pe,ie),pe.return=J,J=pe;break e}i(J,Z);break}else t(J,Z);Z=Z.sibling}ie.type===x?(pe=Pi(ie.props.children,J.mode,pe,ie.key),pe.return=J,J=pe):(pe=El(ie.type,ie.key,ie.props,null,J.mode,pe),ys(pe,ie),pe.return=J,J=pe)}return L(J);case E:e:{for(Re=ie.key;Z!==null;){if(Z.key===Re)if(Z.tag===4&&Z.stateNode.containerInfo===ie.containerInfo&&Z.stateNode.implementation===ie.implementation){i(J,Z.sibling),pe=m(Z,ie.children||[]),pe.return=J,J=pe;break e}else{i(J,Z);break}else t(J,Z);Z=Z.sibling}pe=mo(ie,J.mode,pe),pe.return=J,J=pe}return L(J);case k:return ie=$i(ie),st(J,Z,ie,pe)}if(W(ie))return Ee(J,Z,ie,pe);if(P(ie)){if(Re=P(ie),typeof Re!="function")throw Error(o(150));return ie=Re.call(ie),je(J,Z,ie,pe)}if(typeof ie.then=="function")return st(J,Z,Ll(ie),pe);if(ie.$$typeof===_)return st(J,Z,Tl(J,ie),pe);Ol(J,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Z!==null&&Z.tag===6?(i(J,Z.sibling),pe=m(Z,ie),pe.return=J,J=pe):(i(J,Z),pe=po(ie,J.mode,pe),pe.return=J,J=pe),L(J)):i(J,Z)}return function(J,Z,ie,pe){try{vs=0;var Re=st(J,Z,ie,pe);return Ar=null,Re}catch(Ae){if(Ae===kr||Ae===Rl)throw Ae;var We=rn(29,Ae,null,J.mode);return We.lanes=pe,We.return=J,We}finally{}}}var Ki=uf(!0),hf=uf(!1),hi=!1;function Ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function To(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 fi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function di(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var m=l.pending;return m===null?t.next=t:(t.next=m.next,m.next=t),l.pending=t,t=xl(e),Yh(e,null,i),t}return wl(e,l,t,i),xl(e)}function Ss(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,sr(e,i)}}function Do(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var m=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?m=C=L:C=C.next=L,i=i.next}while(i!==null);C===null?m=C=t:C=C.next=t}else m=C=t;i={baseState:l.baseState,firstBaseUpdate:m,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 Ro=!1;function bs(){if(Ro){var e=Er;if(e!==null)throw e}}function Cs(e,t,i,l){Ro=!1;var m=e.updateQueue;hi=!1;var C=m.firstBaseUpdate,L=m.lastBaseUpdate,U=m.shared.pending;if(U!==null){m.shared.pending=null;var X=U,re=X.next;X.next=null,L===null?C=re:L.next=re,L=X;var de=e.alternate;de!==null&&(de=de.updateQueue,U=de.lastBaseUpdate,U!==L&&(U===null?de.firstBaseUpdate=re:U.next=re,de.lastBaseUpdate=X))}if(C!==null){var _e=m.baseState;L=0,de=re=X=null,U=C;do{var se=U.lane&-536870913,oe=se!==U.lane;if(oe?(Ge&se)===se:(l&se)===se){se!==0&&se===xr&&(Ro=!0),de!==null&&(de=de.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Ee=e,je=U;se=t;var st=i;switch(je.tag){case 1:if(Ee=je.payload,typeof Ee=="function"){_e=Ee.call(st,_e,se);break e}_e=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=je.payload,se=typeof Ee=="function"?Ee.call(st,_e,se):Ee,se==null)break e;_e=u({},_e,se);break e;case 2:hi=!0}}se=U.callback,se!==null&&(e.flags|=64,oe&&(e.flags|=8192),oe=m.callbacks,oe===null?m.callbacks=[se]:oe.push(se))}else oe={lane:se,tag:U.tag,payload:U.payload,callback:U.callback,next:null},de===null?(re=de=oe,X=_e):de=de.next=oe,L|=se;if(U=U.next,U===null){if(U=m.shared.pending,U===null)break;oe=U,U=oe.next,oe.next=null,m.lastBaseUpdate=oe,m.shared.pending=null}}while(!0);de===null&&(X=_e),m.baseState=X,m.firstBaseUpdate=re,m.lastBaseUpdate=de,C===null&&(m.shared.lanes=0),vi|=L,e.lanes=L,e.memoizedState=_e}}function ff(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function df(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ff(i[e],t)}var Tr=z(null),Bl=z(0);function pf(e,t){e=Jn,j(Bl,e),j(Tr,t),Jn=e|t.baseLanes}function Mo(){j(Bl,Jn),j(Tr,Tr.current)}function Lo(){Jn=Bl.current,V(Tr),V(Bl)}var sn=z(null),yn=null;function pi(e){var t=e.alternate;j(_t,_t.current&1),j(sn,e),yn===null&&(t===null||Tr.current!==null||t.memoizedState!==null)&&(yn=e)}function Oo(e){j(_t,_t.current),j(sn,e),yn===null&&(yn=e)}function mf(e){e.tag===22?(j(_t,_t.current),j(sn,e),yn===null&&(yn=e)):mi()}function mi(){j(_t,_t.current),j(sn,sn.current)}function ln(e){V(sn),yn===e&&(yn=null),V(_t)}var _t=z(0);function Nl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Ic(i)||Uc(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 Gn=0,He=null,it=null,Ct=null,jl=!1,Dr=!1,Wi=!1,zl=0,ws=0,Rr=null,Tv=0;function dt(){throw Error(o(321))}function Bo(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!nn(e[i],t[i]))return!1;return!0}function No(e,t,i,l,m,C){return Gn=C,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Zf:Xo,Wi=!1,C=i(l,m),Wi=!1,Dr&&(C=_f(t,i,l,m)),gf(e),C}function gf(e){G.H=ks;var t=it!==null&&it.next!==null;if(Gn=0,Ct=it=He=null,jl=!1,ws=0,Rr=null,t)throw Error(o(300));e===null||wt||(e=e.dependencies,e!==null&&Al(e)&&(wt=!0))}function _f(e,t,i,l){He=e;var m=0;do{if(Dr&&(Rr=null),ws=0,Dr=!1,25<=m)throw Error(o(301));if(m+=1,Ct=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)}G.H=Jf,C=t(i,l)}while(Dr);return C}function Dv(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?xs(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(He.flags|=1024),t}function jo(){var e=zl!==0;return zl=0,e}function zo(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Ho(e){if(jl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}jl=!1}Gn=0,Ct=it=He=null,Dr=!1,ws=zl=0,Rr=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?He.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function vt(){if(it===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=Ct===null?He.memoizedState:Ct.next;if(t!==null)Ct=t,it=e;else{if(e===null)throw He.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},Ct===null?He.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Hl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xs(e){var t=ws;return ws+=1,Rr===null&&(Rr=[]),e=af(Rr,e,t),t=He,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Zf:Xo),e}function Il(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xs(e);if(e.$$typeof===_)return Ot(e)}throw Error(o(438,String(e)))}function Io(e){var t=null,i=He.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=He.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(m){return m.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Hl(),He.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]=N;return t.index++,i}function $n(e,t){return typeof t=="function"?t(e):t}function Ul(e){var t=vt();return Uo(t,it,e)}function Uo(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var m=e.baseQueue,C=l.pending;if(C!==null){if(m!==null){var L=m.next;m.next=C.next,C.next=L}t.baseQueue=m=C,l.pending=null}if(C=e.baseState,m===null)e.memoizedState=C;else{t=m.next;var U=L=null,X=null,re=t,de=!1;do{var _e=re.lane&-536870913;if(_e!==re.lane?(Ge&_e)===_e:(Gn&_e)===_e){var se=re.revertLane;if(se===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),_e===xr&&(de=!0);else if((Gn&se)===se){re=re.next,se===xr&&(de=!0);continue}else _e={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},X===null?(U=X=_e,L=C):X=X.next=_e,He.lanes|=se,vi|=se;_e=re.action,Wi&&i(C,_e),C=re.hasEagerState?re.eagerState:i(C,_e)}else se={lane:_e,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},X===null?(U=X=se,L=C):X=X.next=se,He.lanes|=_e,vi|=_e;re=re.next}while(re!==null&&re!==t);if(X===null?L=C:X.next=U,!nn(C,e.memoizedState)&&(wt=!0,de&&(i=Er,i!==null)))throw i;e.memoizedState=C,e.baseState=L,e.baseQueue=X,l.lastRenderedState=C}return m===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Po(e){var t=vt(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,m=i.pending,C=t.memoizedState;if(m!==null){i.pending=null;var L=m=m.next;do C=e(C,L.action),L=L.next;while(L!==m);nn(C,t.memoizedState)||(wt=!0),t.memoizedState=C,t.baseQueue===null&&(t.baseState=C),i.lastRenderedState=C}return[C,l]}function vf(e,t,i){var l=He,m=vt(),C=Ye;if(C){if(i===void 0)throw Error(o(407));i=i()}else i=t();var L=!nn((it||m).memoizedState,i);if(L&&(m.memoizedState=i,wt=!0),m=m.queue,Vo(bf.bind(null,l,m,e),[e]),m.getSnapshot!==t||L||Ct!==null&&Ct.memoizedState.tag&1){if(l.flags|=2048,Mr(9,{destroy:void 0},Sf.bind(null,l,m,i,t),null),at===null)throw Error(o(349));C||(Gn&127)!==0||yf(l,t,i)}return i}function yf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=He.updateQueue,t===null?(t=Hl(),He.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Sf(e,t,i,l){t.value=i,t.getSnapshot=l,Cf(t)&&wf(e)}function bf(e,t,i){return i(function(){Cf(t)&&wf(e)})}function Cf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!nn(e,i)}catch{return!0}}function wf(e){var t=Ui(e,2);t!==null&&Jt(t,e,2)}function Fo(e){var t=Ft();if(typeof e=="function"){var i=e;if(e=i(),Wi){Je(!0);try{i()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:e},t}function xf(e,t,i,l){return e.baseState=i,Uo(e,it,typeof l=="function"?l:$n)}function Rv(e,t,i,l,m){if(ql(e))throw Error(o(485));if(e=t.action,e!==null){var C={payload:m,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){C.listeners.push(L)}};G.T!==null?i(!0):C.isTransition=!1,l(C),i=t.pending,i===null?(C.next=t.pending=C,Ef(t,C)):(C.next=i.next,t.pending=i.next=C)}}function Ef(e,t){var i=t.action,l=t.payload,m=e.state;if(t.isTransition){var C=G.T,L={};G.T=L;try{var U=i(m,l),X=G.S;X!==null&&X(L,U),kf(e,t,U)}catch(re){qo(e,t,re)}finally{C!==null&&L.types!==null&&(C.types=L.types),G.T=C}}else try{C=i(m,l),kf(e,t,C)}catch(re){qo(e,t,re)}}function kf(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Af(e,t,l)},function(l){return qo(e,t,l)}):Af(e,t,i)}function Af(e,t,i){t.status="fulfilled",t.value=i,Tf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Ef(e,i)))}function qo(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,Tf(t),t=t.next;while(t!==l)}e.action=null}function Tf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Df(e,t){return t}function Rf(e,t){if(Ye){var i=at.formState;if(i!==null){e:{var l=He;if(Ye){if(ut){t:{for(var m=ut,C=vn;m.nodeType!==8;){if(!C){m=null;break t}if(m=Sn(m.nextSibling),m===null){m=null;break t}}C=m.data,m=C==="F!"||C==="F"?m:null}if(m){ut=Sn(m.nextSibling),l=m.data==="F!";break e}}ci(l)}l=!1}l&&(t=i[0])}}return i=Ft(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Df,lastRenderedState:t},i.queue=l,i=Wf.bind(null,He,l),l.dispatch=i,l=Fo(!1),C=Wo.bind(null,He,!1,l.queue),l=Ft(),m={state:t,dispatch:null,action:e,pending:null},l.queue=m,i=Rv.bind(null,He,m,C,i),m.dispatch=i,l.memoizedState=e,[t,i,!1]}function Mf(e){var t=vt();return Lf(t,it,e)}function Lf(e,t,i){if(t=Uo(e,t,Df)[0],e=Ul($n)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=xs(t)}catch(L){throw L===kr?Rl:L}else l=t;t=vt();var m=t.queue,C=m.dispatch;return i!==t.memoizedState&&(He.flags|=2048,Mr(9,{destroy:void 0},Mv.bind(null,m,i),null)),[l,C,e]}function Mv(e,t){e.action=t}function Of(e){var t=vt(),i=it;if(i!==null)return Lf(t,i,e);vt(),t=t.memoizedState,i=vt();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Mr(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=He.updateQueue,t===null&&(t=Hl(),He.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 Bf(){return vt().memoizedState}function Pl(e,t,i,l){var m=Ft();He.flags|=e,m.memoizedState=Mr(1|t,{destroy:void 0},i,l===void 0?null:l)}function Fl(e,t,i,l){var m=vt();l=l===void 0?null:l;var C=m.memoizedState.inst;it!==null&&l!==null&&Bo(l,it.memoizedState.deps)?m.memoizedState=Mr(t,C,i,l):(He.flags|=e,m.memoizedState=Mr(1|t,C,i,l))}function Nf(e,t){Pl(8390656,8,e,t)}function Vo(e,t){Fl(2048,8,e,t)}function Lv(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=Hl(),He.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function jf(e){var t=vt().memoizedState;return Lv({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function zf(e,t){return Fl(4,2,e,t)}function Hf(e,t){return Fl(4,4,e,t)}function If(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 Uf(e,t,i){i=i!=null?i.concat([e]):null,Fl(4,4,If.bind(null,t,e),i)}function Go(){}function Pf(e,t){var i=vt();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&Bo(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function Ff(e,t){var i=vt();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&Bo(t,l[1]))return l[0];if(l=e(),Wi){Je(!0);try{e()}finally{Je(!1)}}return i.memoizedState=[l,t],l}function $o(e,t,i){return i===void 0||(Gn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=qd(),He.lanes|=e,vi|=e,i)}function qf(e,t,i,l){return nn(i,t)?i:Tr.current!==null?(e=$o(e,i,l),nn(e,t)||(wt=!0),e):(Gn&42)===0||(Gn&1073741824)!==0&&(Ge&261930)===0?(wt=!0,e.memoizedState=i):(e=qd(),He.lanes|=e,vi|=e,t)}function Vf(e,t,i,l,m){var C=$.p;$.p=C!==0&&8>C?C:8;var L=G.T,U={};G.T=U,Wo(e,!1,t,i);try{var X=m(),re=G.S;if(re!==null&&re(U,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var de=Av(X,l);Es(e,t,de,cn(e))}else Es(e,t,l,cn(e))}catch(_e){Es(e,t,{then:function(){},status:"rejected",reason:_e},cn())}finally{$.p=C,L!==null&&U.types!==null&&(L.types=U.types),G.T=L}}function Ov(){}function Yo(e,t,i,l){if(e.tag!==5)throw Error(o(476));var m=Gf(e).queue;Vf(e,m,t,Q,i===null?Ov:function(){return $f(e),i(l)})}function Gf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:Q},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $f(e){var t=Gf(e);t.next===null&&(t=e.alternate.memoizedState),Es(e,t.next.queue,{},cn())}function Ko(){return Ot(Fs)}function Yf(){return vt().memoizedState}function Kf(){return vt().memoizedState}function Bv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=cn();e=fi(i);var l=di(t,e,i);l!==null&&(Jt(l,t,i),Ss(l,t,i)),t={cache:wo()},e.payload=t;return}t=t.return}}function Nv(e,t,i){var l=cn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},ql(e)?Xf(t,i):(i=ho(e,t,i,l),i!==null&&(Jt(i,e,l),Qf(i,t,l)))}function Wf(e,t,i){var l=cn();Es(e,t,i,l)}function Es(e,t,i,l){var m={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(ql(e))Xf(t,m);else{var C=e.alternate;if(e.lanes===0&&(C===null||C.lanes===0)&&(C=t.lastRenderedReducer,C!==null))try{var L=t.lastRenderedState,U=C(L,i);if(m.hasEagerState=!0,m.eagerState=U,nn(U,L))return wl(e,t,m,0),at===null&&Cl(),!1}catch{}finally{}if(i=ho(e,t,m,l),i!==null)return Jt(i,e,l),Qf(i,t,l),!0}return!1}function Wo(e,t,i,l){if(l={lane:2,revertLane:Ac(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ql(e)){if(t)throw Error(o(479))}else t=ho(e,i,l,2),t!==null&&Jt(t,e,2)}function ql(e){var t=e.alternate;return e===He||t!==null&&t===He}function Xf(e,t){Dr=jl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Qf(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,sr(e,i)}}var ks={readContext:Ot,use:Il,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};ks.useEffectEvent=dt;var Zf={readContext:Ot,use:Il,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Nf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Pl(4194308,4,If.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Pl(4194308,4,e,t)},useInsertionEffect:function(e,t){Pl(4,2,e,t)},useMemo:function(e,t){var i=Ft();t=t===void 0?null:t;var l=e();if(Wi){Je(!0);try{e()}finally{Je(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=Ft();if(i!==void 0){var m=i(t);if(Wi){Je(!0);try{i(t)}finally{Je(!1)}}}else m=t;return l.memoizedState=l.baseState=m,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:m},l.queue=e,e=e.dispatch=Nv.bind(null,He,e),[l.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=Fo(e);var t=e.queue,i=Wf.bind(null,He,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Go,useDeferredValue:function(e,t){var i=Ft();return $o(i,e,t)},useTransition:function(){var e=Fo(!1);return e=Vf.bind(null,He,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=He,m=Ft();if(Ye){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),at===null)throw Error(o(349));(Ge&127)!==0||yf(l,t,i)}m.memoizedState=i;var C={value:i,getSnapshot:t};return m.queue=C,Nf(bf.bind(null,l,C,e),[e]),l.flags|=2048,Mr(9,{destroy:void 0},Sf.bind(null,l,C,i,t),null),i},useId:function(){var e=Ft(),t=at.identifierPrefix;if(Ye){var i=Mn,l=Rn;i=(l&~(1<<32-Pe(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=zl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Tv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ko,useFormState:Rf,useActionState:Rf,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Wo.bind(null,He,!0,i),i.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return Ft().memoizedState=Bv.bind(null,He)},useEffectEvent:function(e){var t=Ft(),i={impl:e};return t.memoizedState=i,function(){if((Ze&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Xo={readContext:Ot,use:Il,useCallback:Pf,useContext:Ot,useEffect:Vo,useImperativeHandle:Uf,useInsertionEffect:zf,useLayoutEffect:Hf,useMemo:Ff,useReducer:Ul,useRef:Bf,useState:function(){return Ul($n)},useDebugValue:Go,useDeferredValue:function(e,t){var i=vt();return qf(i,it.memoizedState,e,t)},useTransition:function(){var e=Ul($n)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:xs(e),t]},useSyncExternalStore:vf,useId:Yf,useHostTransitionStatus:Ko,useFormState:Mf,useActionState:Mf,useOptimistic:function(e,t){var i=vt();return xf(i,it,e,t)},useMemoCache:Io,useCacheRefresh:Kf};Xo.useEffectEvent=jf;var Jf={readContext:Ot,use:Il,useCallback:Pf,useContext:Ot,useEffect:Vo,useImperativeHandle:Uf,useInsertionEffect:zf,useLayoutEffect:Hf,useMemo:Ff,useReducer:Po,useRef:Bf,useState:function(){return Po($n)},useDebugValue:Go,useDeferredValue:function(e,t){var i=vt();return it===null?$o(i,e,t):qf(i,it.memoizedState,e,t)},useTransition:function(){var e=Po($n)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:xs(e),t]},useSyncExternalStore:vf,useId:Yf,useHostTransitionStatus:Ko,useFormState:Of,useActionState:Of,useOptimistic:function(e,t){var i=vt();return it!==null?xf(i,it,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Io,useCacheRefresh:Kf};Jf.useEffectEvent=jf;function Qo(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Zo={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=cn(),m=fi(l);m.payload=t,i!=null&&(m.callback=i),t=di(e,m,l),t!==null&&(Jt(t,e,l),Ss(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=cn(),m=fi(l);m.tag=1,m.payload=t,i!=null&&(m.callback=i),t=di(e,m,l),t!==null&&(Jt(t,e,l),Ss(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=cn(),l=fi(i);l.tag=2,t!=null&&(l.callback=t),t=di(e,l,i),t!==null&&(Jt(t,e,i),Ss(t,e,i))}};function ed(e,t,i,l,m,C,L){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,C,L):t.prototype&&t.prototype.isPureReactComponent?!fs(i,l)||!fs(m,C):!0}function td(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&&Zo.enqueueReplaceState(t,t.state,null)}function Xi(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=u({},i));for(var m in e)i[m]===void 0&&(i[m]=e[m])}return i}function nd(e){bl(e)}function id(e){console.error(e)}function rd(e){bl(e)}function Vl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function sd(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Jo(e,t,i){return i=fi(i),i.tag=3,i.payload={element:null},i.callback=function(){Vl(e,t)},i}function ld(e){return e=fi(e),e.tag=3,e}function ad(e,t,i,l){var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var C=l.value;e.payload=function(){return m(C)},e.callback=function(){sd(t,i,l)}}var L=i.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(e.callback=function(){sd(t,i,l),typeof m!="function"&&(yi===null?yi=new Set([this]):yi.add(this));var U=l.stack;this.componentDidCatch(l.value,{componentStack:U!==null?U:""})})}function jv(e,t,i,l,m){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&wr(t,i,m,!0),i=sn.current,i!==null){switch(i.tag){case 31:case 13:return yn===null?na():i.alternate===null&&pt===0&&(pt=3),i.flags&=-257,i.flags|=65536,i.lanes=m,l===Ml?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),xc(e,l,m)),!1;case 22:return i.flags|=65536,l===Ml?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)),xc(e,l,m)),!1}throw Error(o(435,i.tag))}return xc(e,l,m),na(),!1}if(Ye)return t=sn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=m,l!==vo&&(e=Error(o(422),{cause:l}),ms(mn(e,i)))):(l!==vo&&(t=Error(o(423),{cause:l}),ms(mn(t,i))),e=e.current.alternate,e.flags|=65536,m&=-m,e.lanes|=m,l=mn(l,i),m=Jo(e.stateNode,l,m),Do(e,m),pt!==4&&(pt=2)),!1;var C=Error(o(520),{cause:l});if(C=mn(C,i),Bs===null?Bs=[C]:Bs.push(C),pt!==4&&(pt=2),t===null)return!0;l=mn(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=m&-m,i.lanes|=e,e=Jo(i.stateNode,l,e),Do(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"&&(yi===null||!yi.has(C))))return i.flags|=65536,m&=-m,i.lanes|=m,m=ld(m),ad(m,e,i,l),Do(i,m),!1}i=i.return}while(i!==null);return!1}var ec=Error(o(461)),wt=!1;function Bt(e,t,i,l){t.child=e===null?hf(t,null,i,l):Ki(t,e.child,i,l)}function od(e,t,i,l,m){i=i.render;var C=t.ref;if("ref"in l){var L={};for(var U in l)U!=="ref"&&(L[U]=l[U])}else L=l;return Vi(t),l=No(e,t,i,L,C,m),U=jo(),e!==null&&!wt?(zo(e,t,m),Yn(e,t,m)):(Ye&&U&&go(t),t.flags|=1,Bt(e,t,l,m),t.child)}function cd(e,t,i,l,m){if(e===null){var C=i.type;return typeof C=="function"&&!fo(C)&&C.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=C,ud(e,t,C,l,m)):(e=El(i.type,null,l,t,t.mode,m),e.ref=t.ref,e.return=t,t.child=e)}if(C=e.child,!oc(e,m)){var L=C.memoizedProps;if(i=i.compare,i=i!==null?i:fs,i(L,l)&&e.ref===t.ref)return Yn(e,t,m)}return t.flags|=1,e=Pn(C,l),e.ref=t.ref,e.return=t,t.child=e}function ud(e,t,i,l,m){if(e!==null){var C=e.memoizedProps;if(fs(C,l)&&e.ref===t.ref)if(wt=!1,t.pendingProps=l=C,oc(e,m))(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,Yn(e,t,m)}return tc(e,t,i,l,m)}function hd(e,t,i,l){var m=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,m=0;l!==null;)m=m|l.lanes|l.childLanes,l=l.sibling;l=m&~C}else l=0,t.child=null;return fd(e,t,C,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Dl(t,C!==null?C.cachePool:null),C!==null?pf(t,C):Mo(),mf(t);else return l=t.lanes=536870912,fd(e,t,C!==null?C.baseLanes|i:i,i,l)}else C!==null?(Dl(t,C.cachePool),pf(t,C),mi(),t.memoizedState=null):(e!==null&&Dl(t,null),Mo(),mi());return Bt(e,t,m,i),t.child}function As(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fd(e,t,i,l,m){var C=Eo();return C=C===null?null:{parent:bt._currentValue,pool:C},t.memoizedState={baseLanes:i,cachePool:C},e!==null&&Dl(t,null),Mo(),mf(t),e!==null&&wr(e,t,l,!0),t.childLanes=m,null}function Gl(e,t){return t=Yl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dd(e,t,i){return Ki(t,e.child,null,i),e=Gl(t,t.pendingProps),e.flags|=2,ln(t),t.memoizedState=null,e}function zv(e,t,i){var l=t.pendingProps,m=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ye){if(l.mode==="hidden")return e=Gl(t,l),t.lanes=536870912,As(null,e);if(Oo(t),(e=ut)?(e=Ep(e,vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ai!==null?{id:Rn,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},i=Wh(e),i.return=t,t.child=i,Lt=t,ut=null)):e=null,e===null)throw ci(t);return t.lanes=536870912,null}return Gl(t,l)}var C=e.memoizedState;if(C!==null){var L=C.dehydrated;if(Oo(t),m)if(t.flags&256)t.flags&=-257,t=dd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(wt||wr(e,t,i,!1),m=(i&e.childLanes)!==0,wt||m){if(l=at,l!==null&&(L=lr(l,i),L!==0&&L!==C.retryLane))throw C.retryLane=L,Ui(e,L),Jt(l,e,L),ec;na(),t=dd(e,t,i)}else e=C.treeContext,ut=Sn(L.nextSibling),Lt=t,Ye=!0,oi=null,vn=!1,e!==null&&Zh(t,e),t=Gl(t,l),t.flags|=4096;return t}return e=Pn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function $l(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 tc(e,t,i,l,m){return Vi(t),i=No(e,t,i,l,void 0,m),l=jo(),e!==null&&!wt?(zo(e,t,m),Yn(e,t,m)):(Ye&&l&&go(t),t.flags|=1,Bt(e,t,i,m),t.child)}function pd(e,t,i,l,m,C){return Vi(t),t.updateQueue=null,i=_f(t,l,i,m),gf(e),l=jo(),e!==null&&!wt?(zo(e,t,C),Yn(e,t,C)):(Ye&&l&&go(t),t.flags|=1,Bt(e,t,i,C),t.child)}function md(e,t,i,l,m){if(Vi(t),t.stateNode===null){var C=yr,L=i.contextType;typeof L=="object"&&L!==null&&(C=Ot(L)),C=new i(l,C),t.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=Zo,t.stateNode=C,C._reactInternals=t,C=t.stateNode,C.props=l,C.state=t.memoizedState,C.refs={},Ao(t),L=i.contextType,C.context=typeof L=="object"&&L!==null?Ot(L):yr,C.state=t.memoizedState,L=i.getDerivedStateFromProps,typeof L=="function"&&(Qo(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&&Zo.enqueueReplaceState(C,C.state,null),Cs(t,l,C,m),bs(),C.state=t.memoizedState),typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){C=t.stateNode;var U=t.memoizedProps,X=Xi(i,U);C.props=X;var re=C.context,de=i.contextType;L=yr,typeof de=="object"&&de!==null&&(L=Ot(de));var _e=i.getDerivedStateFromProps;de=typeof _e=="function"||typeof C.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,de||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(U||re!==L)&&td(t,C,l,L),hi=!1;var se=t.memoizedState;C.state=se,Cs(t,l,C,m),bs(),re=t.memoizedState,U||se!==re||hi?(typeof _e=="function"&&(Qo(t,i,_e,l),re=t.memoizedState),(X=hi||ed(t,i,X,l,se,re,L))?(de||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=re),C.props=l,C.state=re,C.context=L,l=X):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{C=t.stateNode,To(e,t),L=t.memoizedProps,de=Xi(i,L),C.props=de,_e=t.pendingProps,se=C.context,re=i.contextType,X=yr,typeof re=="object"&&re!==null&&(X=Ot(re)),U=i.getDerivedStateFromProps,(re=typeof U=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(L!==_e||se!==X)&&td(t,C,l,X),hi=!1,se=t.memoizedState,C.state=se,Cs(t,l,C,m),bs();var oe=t.memoizedState;L!==_e||se!==oe||hi||e!==null&&e.dependencies!==null&&Al(e.dependencies)?(typeof U=="function"&&(Qo(t,i,U,l),oe=t.memoizedState),(de=hi||ed(t,i,de,l,se,oe,X)||e!==null&&e.dependencies!==null&&Al(e.dependencies))?(re||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(l,oe,X),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(l,oe,X)),typeof C.componentDidUpdate=="function"&&(t.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=oe),C.props=l,C.state=oe,C.context=X,l=de):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),l=!1)}return C=l,$l(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=Ki(t,e.child,null,m),t.child=Ki(t,null,i,m)):Bt(e,t,i,m),t.memoizedState=C.state,e=t.child):e=Yn(e,t,m),e}function gd(e,t,i,l){return Fi(),t.flags|=256,Bt(e,t,i,l),t.child}var nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ic(e){return{baseLanes:e,cachePool:sf()}}function rc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=on),e}function _d(e,t,i){var l=t.pendingProps,m=!1,C=(t.flags&128)!==0,L;if((L=C)||(L=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),L&&(m=!0,t.flags&=-129),L=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ye){if(m?pi(t):mi(),(e=ut)?(e=Ep(e,vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ai!==null?{id:Rn,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},i=Wh(e),i.return=t,t.child=i,Lt=t,ut=null)):e=null,e===null)throw ci(t);return Uc(e)?t.lanes=32:t.lanes=536870912,null}var U=l.children;return l=l.fallback,m?(mi(),m=t.mode,U=Yl({mode:"hidden",children:U},m),l=Pi(l,m,i,null),U.return=t,l.return=t,U.sibling=l,t.child=U,l=t.child,l.memoizedState=ic(i),l.childLanes=rc(e,L,i),t.memoizedState=nc,As(null,l)):(pi(t),sc(t,U))}var X=e.memoizedState;if(X!==null&&(U=X.dehydrated,U!==null)){if(C)t.flags&256?(pi(t),t.flags&=-257,t=lc(e,t,i)):t.memoizedState!==null?(mi(),t.child=e.child,t.flags|=128,t=null):(mi(),U=l.fallback,m=t.mode,l=Yl({mode:"visible",children:l.children},m),U=Pi(U,m,i,null),U.flags|=2,l.return=t,U.return=t,l.sibling=U,t.child=l,Ki(t,e.child,null,i),l=t.child,l.memoizedState=ic(i),l.childLanes=rc(e,L,i),t.memoizedState=nc,t=As(null,l));else if(pi(t),Uc(U)){if(L=U.nextSibling&&U.nextSibling.dataset,L)var re=L.dgst;L=re,l=Error(o(419)),l.stack="",l.digest=L,ms({value:l,source:null,stack:null}),t=lc(e,t,i)}else if(wt||wr(e,t,i,!1),L=(i&e.childLanes)!==0,wt||L){if(L=at,L!==null&&(l=lr(L,i),l!==0&&l!==X.retryLane))throw X.retryLane=l,Ui(e,l),Jt(L,e,l),ec;Ic(U)||na(),t=lc(e,t,i)}else Ic(U)?(t.flags|=192,t.child=e.child,t=null):(e=X.treeContext,ut=Sn(U.nextSibling),Lt=t,Ye=!0,oi=null,vn=!1,e!==null&&Zh(t,e),t=sc(t,l.children),t.flags|=4096);return t}return m?(mi(),U=l.fallback,m=t.mode,X=e.child,re=X.sibling,l=Pn(X,{mode:"hidden",children:l.children}),l.subtreeFlags=X.subtreeFlags&65011712,re!==null?U=Pn(re,U):(U=Pi(U,m,i,null),U.flags|=2),U.return=t,l.return=t,l.sibling=U,t.child=l,As(null,l),l=t.child,U=e.child.memoizedState,U===null?U=ic(i):(m=U.cachePool,m!==null?(X=bt._currentValue,m=m.parent!==X?{parent:X,pool:X}:m):m=sf(),U={baseLanes:U.baseLanes|i,cachePool:m}),l.memoizedState=U,l.childLanes=rc(e,L,i),t.memoizedState=nc,As(e.child,l)):(pi(t),i=e.child,e=i.sibling,i=Pn(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 sc(e,t){return t=Yl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yl(e,t){return e=rn(22,e,null,t),e.lanes=0,e}function lc(e,t,i){return Ki(t,e.child,null,i),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vd(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),bo(e.return,t,i)}function ac(e,t,i,l,m,C){var L=e.memoizedState;L===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:m,treeForkCount:C}:(L.isBackwards=t,L.rendering=null,L.renderingStartTime=0,L.last=l,L.tail=i,L.tailMode=m,L.treeForkCount=C)}function yd(e,t,i){var l=t.pendingProps,m=l.revealOrder,C=l.tail;l=l.children;var L=_t.current,U=(L&2)!==0;if(U?(L=L&1|2,t.flags|=128):L&=1,j(_t,L),Bt(e,t,l,i),l=Ye?ps:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vd(e,i,t);else if(e.tag===19)vd(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(m){case"forwards":for(i=t.child,m=null;i!==null;)e=i.alternate,e!==null&&Nl(e)===null&&(m=i),i=i.sibling;i=m,i===null?(m=t.child,t.child=null):(m=i.sibling,i.sibling=null),ac(t,!1,m,i,C,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,m=t.child,t.child=null;m!==null;){if(e=m.alternate,e!==null&&Nl(e)===null){t.child=m;break}e=m.sibling,m.sibling=i,i=m,m=e}ac(t,!0,i,null,C,l);break;case"together":ac(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Yn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),vi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(wr(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=Pn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Pn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Al(e)))}function Hv(e,t,i){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),ui(t,bt,e.memoizedState.cache),Fi();break;case 27:case 5:le(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:ui(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Oo(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(pi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?_d(e,t,i):(pi(t),e=Yn(e,t,i),e!==null?e.sibling:null);pi(t);break;case 19:var m=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(wr(e,t,i,!1),l=(i&t.childLanes)!==0),m){if(l)return yd(e,t,i);t.flags|=128}if(m=t.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),j(_t,_t.current),l)break;return null;case 22:return t.lanes=0,hd(e,t,i,t.pendingProps);case 24:ui(t,bt,e.memoizedState.cache)}return Yn(e,t,i)}function Sd(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)wt=!0;else{if(!oc(e,i)&&(t.flags&128)===0)return wt=!1,Hv(e,t,i);wt=(e.flags&131072)!==0}else wt=!1,Ye&&(t.flags&1048576)!==0&&Qh(t,ps,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=$i(t.elementType),t.type=e,typeof e=="function")fo(e)?(l=Xi(e,l),t.tag=1,t=md(null,t,e,l,i)):(t.tag=0,t=tc(null,t,e,l,i));else{if(e!=null){var m=e.$$typeof;if(m===A){t.tag=11,t=od(null,t,e,l,i);break e}else if(m===T){t.tag=14,t=cd(null,t,e,l,i);break e}}throw t=Y(e)||e,Error(o(306,t,""))}}return t;case 0:return tc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,m=Xi(l,t.pendingProps),md(e,t,l,m,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var C=t.memoizedState;m=C.element,To(e,t),Cs(t,l,null,i);var L=t.memoizedState;if(l=L.cache,ui(t,bt,l),l!==C.cache&&Co(t,[bt],i,!0),bs(),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=gd(e,t,l,i);break e}else if(l!==m){m=mn(Error(o(424)),t),ms(m),t=gd(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(ut=Sn(e.firstChild),Lt=t,Ye=!0,oi=null,vn=!0,i=hf(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Fi(),l===m){t=Yn(e,t,i);break e}Bt(e,t,l,i)}t=t.child}return t;case 26:return $l(e,t),e===null?(i=Mp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ye||(i=t.type,e=t.pendingProps,l=ca(ge.current).createElement(i),l[gt]=t,l[Mt]=e,Nt(l,i,e),Dt(l),t.stateNode=l):t.memoizedState=Mp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&Ye&&(l=t.stateNode=Tp(t.type,t.pendingProps,ge.current),Lt=t,vn=!0,m=ut,wi(t.type)?(Pc=m,ut=Sn(l.firstChild)):ut=m),Bt(e,t,t.pendingProps.children,i),$l(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ye&&((m=l=ut)&&(l=p0(l,t.type,t.pendingProps,vn),l!==null?(t.stateNode=l,Lt=t,ut=Sn(l.firstChild),vn=!1,m=!0):m=!1),m||ci(t)),le(t),m=t.type,C=t.pendingProps,L=e!==null?e.memoizedProps:null,l=C.children,jc(m,C)?l=null:L!==null&&jc(m,L)&&(t.flags|=32),t.memoizedState!==null&&(m=No(e,t,Dv,null,null,i),Fs._currentValue=m),$l(e,t),Bt(e,t,l,i),t.child;case 6:return e===null&&Ye&&((e=i=ut)&&(i=m0(i,t.pendingProps,vn),i!==null?(t.stateNode=i,Lt=t,ut=null,e=!0):e=!1),e||ci(t)),null;case 13:return _d(e,t,i);case 4:return q(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ki(t,null,l,i):Bt(e,t,l,i),t.child;case 11:return od(e,t,t.type,t.pendingProps,i);case 7:return Bt(e,t,t.pendingProps,i),t.child;case 8:return Bt(e,t,t.pendingProps.children,i),t.child;case 12:return Bt(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,ui(t,t.type,l.value),Bt(e,t,l.children,i),t.child;case 9:return m=t.type._context,l=t.pendingProps.children,Vi(t),m=Ot(m),l=l(m),t.flags|=1,Bt(e,t,l,i),t.child;case 14:return cd(e,t,t.type,t.pendingProps,i);case 15:return ud(e,t,t.type,t.pendingProps,i);case 19:return yd(e,t,i);case 31:return zv(e,t,i);case 22:return hd(e,t,i,t.pendingProps);case 24:return Vi(t),l=Ot(bt),e===null?(m=Eo(),m===null&&(m=at,C=wo(),m.pooledCache=C,C.refCount++,C!==null&&(m.pooledCacheLanes|=i),m=C),t.memoizedState={parent:l,cache:m},Ao(t),ui(t,bt,m)):((e.lanes&i)!==0&&(To(e,t),Cs(t,null,null,i),bs()),m=e.memoizedState,C=t.memoizedState,m.parent!==l?(m={parent:l,cache:l},t.memoizedState=m,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=m),ui(t,bt,l)):(l=C.cache,ui(t,bt,l),l!==m.cache&&Co(t,[bt],i,!0))),Bt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Kn(e){e.flags|=4}function cc(e,t,i,l,m){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(m&335544128)===m)if(e.stateNode.complete)e.flags|=8192;else if(Yd())e.flags|=8192;else throw Yi=Ml,ko}else e.flags&=-16777217}function bd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jp(t))if(Yd())e.flags|=8192;else throw Yi=Ml,ko}function Kl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ri():536870912,e.lanes|=t,Nr|=t)}function Ts(e,t){if(!Ye)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 ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var m=e.child;m!==null;)i|=m.lanes|m.childLanes,l|=m.subtreeFlags&65011712,l|=m.flags&65011712,m.return=e,m=m.sibling;else for(m=e.child;m!==null;)i|=m.lanes|m.childLanes,l|=m.subtreeFlags,l|=m.flags,m.return=e,m=m.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function Iv(e,t,i){var l=t.pendingProps;switch(_o(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Vn(bt),ce(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Cr(t)?Kn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,yo())),ht(t),null;case 26:var m=t.type,C=t.memoizedState;return e===null?(Kn(t),C!==null?(ht(t),bd(t,C)):(ht(t),cc(t,m,null,l,i))):C?C!==e.memoizedState?(Kn(t),ht(t),bd(t,C)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Kn(t),ht(t),cc(t,m,e,l,i)),null;case 27:if(ue(t),i=ge.current,m=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Kn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ht(t),null}e=ee.current,Cr(t)?Jh(t):(e=Tp(m,l,i),t.stateNode=e,Kn(t))}return ht(t),null;case 5:if(ue(t),m=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Kn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ht(t),null}if(C=ee.current,Cr(t))Jh(t);else{var L=ca(ge.current);switch(C){case 1:C=L.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:C=L.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":C=L.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":C=L.createElementNS("http://www.w3.org/1998/Math/MathML",m);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(m,{is:l.is}):L.createElement(m)}}C[gt]=t,C[Mt]=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(Nt(C,m,l),m){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Kn(t)}}return ht(t),cc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Kn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ge.current,Cr(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,m=Lt,m!==null)switch(m.tag){case 27:case 5:l=m.memoizedProps}e[gt]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||_p(e.nodeValue,i)),e||ci(t,!0)}else e=ca(e).createTextNode(l),e[gt]=t,t.stateNode=e}return ht(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=Cr(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[gt]=t}else Fi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else i=yo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(ln(t),t):(ln(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ht(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(m=Cr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!m)throw Error(o(318));if(m=t.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[gt]=t}else Fi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),m=!1}else m=yo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=m),m=!0;if(!m)return t.flags&256?(ln(t),t):(ln(t),null)}return ln(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,m=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(m=l.alternate.memoizedState.cachePool.pool),C=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(C=l.memoizedState.cachePool.pool),C!==m&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Kl(t,t.updateQueue),ht(t),null);case 4:return ce(),e===null&&Mc(t.stateNode.containerInfo),ht(t),null;case 10:return Vn(t.type),ht(t),null;case 19:if(V(_t),l=t.memoizedState,l===null)return ht(t),null;if(m=(t.flags&128)!==0,C=l.rendering,C===null)if(m)Ts(l,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(C=Nl(e),C!==null){for(t.flags|=128,Ts(l,!1),e=C.updateQueue,t.updateQueue=e,Kl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Kh(i,e),i=i.sibling;return j(_t,_t.current&1|2),Ye&&Fn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&<()>Jl&&(t.flags|=128,m=!0,Ts(l,!1),t.lanes=4194304)}else{if(!m)if(e=Nl(C),e!==null){if(t.flags|=128,m=!0,e=e.updateQueue,t.updateQueue=e,Kl(t,e),Ts(l,!0),l.tail===null&&l.tailMode==="hidden"&&!C.alternate&&!Ye)return ht(t),null}else 2*lt()-l.renderingStartTime>Jl&&i!==536870912&&(t.flags|=128,m=!0,Ts(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=lt(),e.sibling=null,i=_t.current,j(_t,m?i&1|2:i&1),Ye&&Fn(t,l.treeForkCount),e):(ht(t),null);case 22:case 23:return ln(t),Lo(),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&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),i=t.updateQueue,i!==null&&Kl(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(Gi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Vn(bt),ht(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Uv(e,t){switch(_o(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vn(bt),ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(ln(t),t.alternate===null)throw Error(o(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(_t),null;case 4:return ce(),null;case 10:return Vn(t.type),null;case 22:case 23:return ln(t),Lo(),e!==null&&V(Gi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vn(bt),null;case 25:return null;default:return null}}function Cd(e,t){switch(_o(t),t.tag){case 3:Vn(bt),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&ln(t);break;case 13:ln(t);break;case 19:V(_t);break;case 10:Vn(t.type);break;case 22:case 23:ln(t),Lo(),e!==null&&V(Gi);break;case 24:Vn(bt)}}function Ds(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var m=l.next;i=m;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!==m)}}catch(U){tt(t,t.return,U)}}function gi(e,t,i){try{var l=t.updateQueue,m=l!==null?l.lastEffect:null;if(m!==null){var C=m.next;l=C;do{if((l.tag&e)===e){var L=l.inst,U=L.destroy;if(U!==void 0){L.destroy=void 0,m=t;var X=i,re=U;try{re()}catch(de){tt(m,X,de)}}}l=l.next}while(l!==C)}}catch(de){tt(t,t.return,de)}}function wd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{df(t,i)}catch(l){tt(e,e.return,l)}}}function xd(e,t,i){i.props=Xi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){tt(e,t,l)}}function Rs(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(m){tt(e,t,m)}}function Ln(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(m){tt(e,t,m)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(m){tt(e,t,m)}else i.current=null}function Ed(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(m){tt(e,e.return,m)}}function uc(e,t,i){try{var l=e.stateNode;o0(l,e.type,i,t),l[Mt]=t}catch(m){tt(e,e.return,m)}}function kd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wi(e.type)||e.tag===4}function hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kd(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&&wi(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 fc(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=In));else if(l!==4&&(l===27&&wi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(fc(e,t,i),e=e.sibling;e!==null;)fc(e,t,i),e=e.sibling}function Wl(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&&wi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Wl(e,t,i),e=e.sibling;e!==null;)Wl(e,t,i),e=e.sibling}function Ad(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,m=t.attributes;m.length;)t.removeAttributeNode(m[0]);Nt(t,l,i),t[gt]=e,t[Mt]=i}catch(C){tt(e,e.return,C)}}var Wn=!1,xt=!1,dc=!1,Td=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function Pv(e,t){if(e=e.containerInfo,Bc=ga,e=Ih(e),so(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 m=l.anchorOffset,C=l.focusNode;l=l.focusOffset;try{i.nodeType,C.nodeType}catch{i=null;break e}var L=0,U=-1,X=-1,re=0,de=0,_e=e,se=null;t:for(;;){for(var oe;_e!==i||m!==0&&_e.nodeType!==3||(U=L+m),_e!==C||l!==0&&_e.nodeType!==3||(X=L+l),_e.nodeType===3&&(L+=_e.nodeValue.length),(oe=_e.firstChild)!==null;)se=_e,_e=oe;for(;;){if(_e===e)break t;if(se===i&&++re===m&&(U=L),se===C&&++de===l&&(X=L),(oe=_e.nextSibling)!==null)break;_e=se,se=_e.parentNode}_e=oe}i=U===-1||X===-1?null:{start:U,end:X}}else i=null}i=i||{start:0,end:0}}else i=null;for(Nc={focusedElem:e,selectionRange:i},ga=!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++)m=e[i],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&C!==null){e=void 0,i=t,m=C.memoizedProps,C=C.memoizedState,l=i.stateNode;try{var Ee=Xi(i.type,m);e=l.getSnapshotBeforeUpdate(Ee,C),l.__reactInternalSnapshotBeforeUpdate=e}catch(je){tt(i,i.return,je)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Hc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(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 Dd(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:Qn(e,i),l&4&&Ds(5,i);break;case 1:if(Qn(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(L){tt(i,i.return,L)}else{var m=Xi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(m,t,e.__reactInternalSnapshotBeforeUpdate)}catch(L){tt(i,i.return,L)}}l&64&&wd(i),l&512&&Rs(i,i.return);break;case 3:if(Qn(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{df(e,t)}catch(L){tt(i,i.return,L)}}break;case 27:t===null&&l&4&&Ad(i);case 26:case 5:Qn(e,i),t===null&&l&4&&Ed(i),l&512&&Rs(i,i.return);break;case 12:Qn(e,i);break;case 31:Qn(e,i),l&4&&Ld(e,i);break;case 13:Qn(e,i),l&4&&Od(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Xv.bind(null,i),g0(e,i))));break;case 22:if(l=i.memoizedState!==null||Wn,!l){t=t!==null&&t.memoizedState!==null||xt,m=Wn;var C=xt;Wn=l,(xt=t)&&!C?Zn(e,i,(i.subtreeFlags&8772)!==0):Qn(e,i),Wn=m,xt=C}break;case 30:break;default:Qn(e,i)}}function Rd(e){var t=e.alternate;t!==null&&(e.alternate=null,Rd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fa(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 ft=null,Wt=!1;function Xn(e,t,i){for(i=i.child;i!==null;)Md(e,t,i),i=i.sibling}function Md(e,t,i){if(De&&typeof De.onCommitFiberUnmount=="function")try{De.onCommitFiberUnmount(mt,i)}catch{}switch(i.tag){case 26:xt||Ln(i,t),Xn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:xt||Ln(i,t);var l=ft,m=Wt;wi(i.type)&&(ft=i.stateNode,Wt=!1),Xn(e,t,i),Is(i.stateNode),ft=l,Wt=m;break;case 5:xt||Ln(i,t);case 6:if(l=ft,m=Wt,ft=null,Xn(e,t,i),ft=l,Wt=m,ft!==null)if(Wt)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(i.stateNode)}catch(C){tt(i,t,C)}else try{ft.removeChild(i.stateNode)}catch(C){tt(i,t,C)}break;case 18:ft!==null&&(Wt?(e=ft,wp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),qr(e)):wp(ft,i.stateNode));break;case 4:l=ft,m=Wt,ft=i.stateNode.containerInfo,Wt=!0,Xn(e,t,i),ft=l,Wt=m;break;case 0:case 11:case 14:case 15:gi(2,i,t),xt||gi(4,i,t),Xn(e,t,i);break;case 1:xt||(Ln(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&xd(i,t,l)),Xn(e,t,i);break;case 21:Xn(e,t,i);break;case 22:xt=(l=xt)||i.memoizedState!==null,Xn(e,t,i),xt=l;break;default:Xn(e,t,i)}}function Ld(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qr(e)}catch(i){tt(t,t.return,i)}}}function Od(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qr(e)}catch(i){tt(t,t.return,i)}}function Fv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Td),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Td),t;default:throw Error(o(435,e.tag))}}function Xl(e,t){var i=Fv(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var m=Qv.bind(null,e,l);l.then(m,m)}})}function Xt(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var m=i[l],C=e,L=t,U=L;e:for(;U!==null;){switch(U.tag){case 27:if(wi(U.type)){ft=U.stateNode,Wt=!1;break e}break;case 5:ft=U.stateNode,Wt=!1;break e;case 3:case 4:ft=U.stateNode.containerInfo,Wt=!0;break e}U=U.return}if(ft===null)throw Error(o(160));Md(C,L,m),ft=null,Wt=!1,C=m.alternate,C!==null&&(C.return=null),m.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bd(t,e),t=t.sibling}var En=null;function Bd(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Xt(t,e),Qt(e),l&4&&(gi(3,e,e.return),Ds(3,e),gi(5,e,e.return));break;case 1:Xt(t,e),Qt(e),l&512&&(xt||i===null||Ln(i,i.return)),l&64&&Wn&&(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 m=En;if(Xt(t,e),Qt(e),l&512&&(xt||i===null||Ln(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,m=m.ownerDocument||m;t:switch(l){case"title":C=m.getElementsByTagName("title")[0],(!C||C[is]||C[gt]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=m.createElement(l),m.head.insertBefore(C,m.querySelector("head > title"))),Nt(C,l,i),C[gt]=e,Dt(C),l=C;break e;case"link":var L=Bp("link","href",m).get(l+(i.href||""));if(L){for(var U=0;U<L.length;U++)if(C=L[U],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(U,1);break t}}C=m.createElement(l),Nt(C,l,i),m.head.appendChild(C);break;case"meta":if(L=Bp("meta","content",m).get(l+(i.content||""))){for(U=0;U<L.length;U++)if(C=L[U],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(U,1);break t}}C=m.createElement(l),Nt(C,l,i),m.head.appendChild(C);break;default:throw Error(o(468,l))}C[gt]=e,Dt(C),l=C}e.stateNode=l}else Np(m,e.type,e.stateNode);else e.stateNode=Op(m,l,e.memoizedProps);else C!==l?(C===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):C.count--,l===null?Np(m,e.type,e.stateNode):Op(m,l,e.memoizedProps)):l===null&&e.stateNode!==null&&uc(e,e.memoizedProps,i.memoizedProps)}break;case 27:Xt(t,e),Qt(e),l&512&&(xt||i===null||Ln(i,i.return)),i!==null&&l&4&&uc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Xt(t,e),Qt(e),l&512&&(xt||i===null||Ln(i,i.return)),e.flags&32){m=e.stateNode;try{fr(m,"")}catch(Ee){tt(e,e.return,Ee)}}l&4&&e.stateNode!=null&&(m=e.memoizedProps,uc(e,m,i!==null?i.memoizedProps:m)),l&1024&&(dc=!0);break;case 6:if(Xt(t,e),Qt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(Ee){tt(e,e.return,Ee)}}break;case 3:if(fa=null,m=En,En=ua(t.containerInfo),Xt(t,e),En=m,Qt(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{qr(t.containerInfo)}catch(Ee){tt(e,e.return,Ee)}dc&&(dc=!1,Nd(e));break;case 4:l=En,En=ua(e.stateNode.containerInfo),Xt(t,e),Qt(e),En=l;break;case 12:Xt(t,e),Qt(e);break;case 31:Xt(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xl(e,l)));break;case 13:Xt(t,e),Qt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Zl=lt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xl(e,l)));break;case 22:m=e.memoizedState!==null;var X=i!==null&&i.memoizedState!==null,re=Wn,de=xt;if(Wn=re||m,xt=de||X,Xt(t,e),xt=de,Wn=re,Qt(e),l&8192)e:for(t=e.stateNode,t._visibility=m?t._visibility&-2:t._visibility|1,m&&(i===null||X||Wn||xt||Qi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){X=i=t;try{if(C=X.stateNode,m)L=C.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{U=X.stateNode;var _e=X.memoizedProps.style,se=_e!=null&&_e.hasOwnProperty("display")?_e.display:null;U.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(Ee){tt(X,X.return,Ee)}}}else if(t.tag===6){if(i===null){X=t;try{X.stateNode.nodeValue=m?"":X.memoizedProps}catch(Ee){tt(X,X.return,Ee)}}}else if(t.tag===18){if(i===null){X=t;try{var oe=X.stateNode;m?xp(oe,!0):xp(X.stateNode,!1)}catch(Ee){tt(X,X.return,Ee)}}}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,Xl(e,i))));break;case 19:Xt(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xl(e,l)));break;case 30:break;case 21:break;default:Xt(t,e),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(kd(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var m=i.stateNode,C=hc(e);Wl(e,C,m);break;case 5:var L=i.stateNode;i.flags&32&&(fr(L,""),i.flags&=-33);var U=hc(e);Wl(e,U,L);break;case 3:case 4:var X=i.stateNode.containerInfo,re=hc(e);fc(e,re,X);break;default:throw Error(o(161))}}catch(de){tt(e,e.return,de)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Qn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dd(e,t.alternate,t),t=t.sibling}function Qi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:gi(4,t,t.return),Qi(t);break;case 1:Ln(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&xd(t,t.return,i),Qi(t);break;case 27:Is(t.stateNode);case 26:case 5:Ln(t,t.return),Qi(t);break;case 22:t.memoizedState===null&&Qi(t);break;case 30:Qi(t);break;default:Qi(t)}e=e.sibling}}function Zn(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,m=e,C=t,L=C.flags;switch(C.tag){case 0:case 11:case 15:Zn(m,C,i),Ds(4,C);break;case 1:if(Zn(m,C,i),l=C,m=l.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(re){tt(l,l.return,re)}if(l=C,m=l.updateQueue,m!==null){var U=l.stateNode;try{var X=m.shared.hiddenCallbacks;if(X!==null)for(m.shared.hiddenCallbacks=null,m=0;m<X.length;m++)ff(X[m],U)}catch(re){tt(l,l.return,re)}}i&&L&64&&wd(C),Rs(C,C.return);break;case 27:Ad(C);case 26:case 5:Zn(m,C,i),i&&l===null&&L&4&&Ed(C),Rs(C,C.return);break;case 12:Zn(m,C,i);break;case 31:Zn(m,C,i),i&&L&4&&Ld(m,C);break;case 13:Zn(m,C,i),i&&L&4&&Od(m,C);break;case 22:C.memoizedState===null&&Zn(m,C,i),Rs(C,C.return);break;case 30:break;default:Zn(m,C,i)}t=t.sibling}}function pc(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&&gs(i))}function mc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gs(e))}function kn(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jd(e,t,i,l),t=t.sibling}function jd(e,t,i,l){var m=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,i,l),m&2048&&Ds(9,t);break;case 1:kn(e,t,i,l);break;case 3:kn(e,t,i,l),m&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gs(e)));break;case 12:if(m&2048){kn(e,t,i,l),e=t.stateNode;try{var C=t.memoizedProps,L=C.id,U=C.onPostCommit;typeof U=="function"&&U(L,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(X){tt(t,t.return,X)}}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):Ms(e,t):C._visibility&2?kn(e,t,i,l):(C._visibility|=2,Lr(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),m&2048&&pc(L,t);break;case 24:kn(e,t,i,l),m&2048&&mc(t.alternate,t);break;default:kn(e,t,i,l)}}function Lr(e,t,i,l,m){for(m=m&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var C=e,L=t,U=i,X=l,re=L.flags;switch(L.tag){case 0:case 11:case 15:Lr(C,L,U,X,m),Ds(8,L);break;case 23:break;case 22:var de=L.stateNode;L.memoizedState!==null?de._visibility&2?Lr(C,L,U,X,m):Ms(C,L):(de._visibility|=2,Lr(C,L,U,X,m)),m&&re&2048&&pc(L.alternate,L);break;case 24:Lr(C,L,U,X,m),m&&re&2048&&mc(L.alternate,L);break;default:Lr(C,L,U,X,m)}t=t.sibling}}function Ms(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,m=l.flags;switch(l.tag){case 22:Ms(i,l),m&2048&&pc(l.alternate,l);break;case 24:Ms(i,l),m&2048&&mc(l.alternate,l);break;default:Ms(i,l)}t=t.sibling}}var Ls=8192;function Or(e,t,i){if(e.subtreeFlags&Ls)for(e=e.child;e!==null;)zd(e,t,i),e=e.sibling}function zd(e,t,i){switch(e.tag){case 26:Or(e,t,i),e.flags&Ls&&e.memoizedState!==null&&T0(i,En,e.memoizedState,e.memoizedProps);break;case 5:Or(e,t,i);break;case 3:case 4:var l=En;En=ua(e.stateNode.containerInfo),Or(e,t,i),En=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ls,Ls=16777216,Or(e,t,i),Ls=l):Or(e,t,i));break;default:Or(e,t,i)}}function Hd(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 Os(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,Ud(l,e)}Hd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Id(e),e=e.sibling}function Id(e){switch(e.tag){case 0:case 11:case 15:Os(e),e.flags&2048&&gi(9,e,e.return);break;case 3:Os(e);break;case 12:Os(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)):Os(e);break;default:Os(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,Ud(l,e)}Hd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gi(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 Ud(e,t){for(;Rt!==null;){var i=Rt;switch(i.tag){case 0:case 11:case 15:gi(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:gs(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Rt=l;else e:for(i=e;Rt!==null;){l=Rt;var m=l.sibling,C=l.return;if(Rd(l),l===i){Rt=null;break e}if(m!==null){m.return=C,Rt=m;break e}Rt=C}}}var qv={getCacheForType:function(e){var t=Ot(bt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ot(bt).controller.signal}},Vv=typeof WeakMap=="function"?WeakMap:Map,Ze=0,at=null,Fe=null,Ge=0,et=0,an=null,_i=!1,Br=!1,gc=!1,Jn=0,pt=0,vi=0,Zi=0,_c=0,on=0,Nr=0,Bs=null,Zt=null,vc=!1,Zl=0,Pd=0,Jl=1/0,ea=null,yi=null,At=0,Si=null,jr=null,ei=0,yc=0,Sc=null,Fd=null,Ns=0,bc=null;function cn(){return(Ze&2)!==0&&Ge!==0?Ge&-Ge:G.T!==null?Ac():cl()}function qd(){if(on===0)if((Ge&536870912)===0||Ye){var e=jn;jn<<=1,(jn&3932160)===0&&(jn=262144),on=e}else on=536870912;return e=sn.current,e!==null&&(e.flags|=32),on}function Jt(e,t,i){(e===at&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(zr(e,0),bi(e,Ge,on,!1)),Tn(e,i),((Ze&2)===0||e!==at)&&(e===at&&((Ze&2)===0&&(Zi|=i),pt===4&&bi(e,Ge,on,!1)),On(e))}function Vd(e,t,i){if((Ze&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ni(e,t),m=l?Yv(e,t):wc(e,t,!0),C=l;do{if(m===0){Br&&!l&&bi(e,t,0,!1);break}else{if(i=e.current.alternate,C&&!Gv(i)){m=wc(e,t,!1),C=!1;continue}if(m===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 U=e;m=Bs;var X=U.current.memoizedState.isDehydrated;if(X&&(zr(U,L).flags|=256),L=wc(U,L,!1),L!==2){if(gc&&!X){U.errorRecoveryDisabledLanes|=C,Zi|=C,m=4;break e}C=Zt,Zt=m,C!==null&&(Zt===null?Zt=C:Zt.push.apply(Zt,C))}m=L}if(C=!1,m!==2)continue}}if(m===1){zr(e,0),bi(e,t,0,!0);break}e:{switch(l=e,C=m,C){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:bi(l,t,on,!_i);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(m=Zl+300-lt(),10<m)){if(bi(l,t,on,!_i),rr(l,0,!0)!==0)break e;ei=t,l.timeoutHandle=bp(Gd.bind(null,l,i,Zt,ea,vc,t,on,Zi,Nr,_i,C,"Throttled",-0,0),m);break e}Gd(l,i,Zt,ea,vc,t,on,Zi,Nr,_i,C,null,-0,0)}}break}while(!0);On(e)}function Gd(e,t,i,l,m,C,L,U,X,re,de,_e,se,oe){if(e.timeoutHandle=-1,_e=t.subtreeFlags,_e&8192||(_e&16785408)===16785408){_e={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},zd(t,C,_e);var Ee=(C&62914560)===C?Zl-lt():(C&4194048)===C?Pd-lt():0;if(Ee=D0(_e,Ee),Ee!==null){ei=C,e.cancelPendingCommit=Ee(Jd.bind(null,e,t,C,i,l,m,L,U,X,de,_e,null,se,oe)),bi(e,C,L,!re);return}}Jd(e,t,C,i,l,m,L,U,X)}function Gv(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 m=i[l],C=m.getSnapshot;m=m.value;try{if(!nn(C(),m))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 bi(e,t,i,l){t&=~_c,t&=~Zi,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var m=t;0<m;){var C=31-Pe(m),L=1<<C;l[C]=-1,m&=~L}i!==0&&ol(e,i,t)}function ta(){return(Ze&6)===0?(js(0),!1):!0}function Cc(){if(Fe!==null){if(et===0)var e=Fe.return;else e=Fe,qn=qi=null,Ho(e),Ar=null,vs=0,e=Fe;for(;e!==null;)Cd(e.alternate,e),e=e.return;Fe=null}}function zr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,h0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ei=0,Cc(),at=e,Fe=i=Pn(e.current,null),Ge=t,et=0,an=null,_i=!1,Br=Ni(e,t),gc=!1,Nr=on=_c=Zi=vi=pt=0,Zt=Bs=null,vc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var m=31-Pe(l),C=1<<m;t|=e[m],l&=~C}return Jn=t,Cl(),i}function $d(e,t){He=null,G.H=ks,t===kr||t===Rl?(t=of(),et=3):t===ko?(t=of(),et=4):et=t===ec?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,Fe===null&&(pt=1,Vl(e,mn(t,e.current)))}function Yd(){var e=sn.current;return e===null?!0:(Ge&4194048)===Ge?yn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===yn:!1}function Kd(){var e=G.H;return G.H=ks,e===null?ks:e}function Wd(){var e=G.A;return G.A=qv,e}function na(){pt=4,_i||(Ge&4194048)!==Ge&&sn.current!==null||(Br=!0),(vi&134217727)===0&&(Zi&134217727)===0||at===null||bi(at,Ge,on,!1)}function wc(e,t,i){var l=Ze;Ze|=2;var m=Kd(),C=Wd();(at!==e||Ge!==t)&&(ea=null,zr(e,t)),t=!1;var L=pt;e:do try{if(et!==0&&Fe!==null){var U=Fe,X=an;switch(et){case 8:Cc(),L=6;break e;case 3:case 2:case 9:case 6:sn.current===null&&(t=!0);var re=et;if(et=0,an=null,Hr(e,U,X,re),i&&Br){L=0;break e}break;default:re=et,et=0,an=null,Hr(e,U,X,re)}}$v(),L=pt;break}catch(de){$d(e,de)}while(!0);return t&&e.shellSuspendCounter++,qn=qi=null,Ze=l,G.H=m,G.A=C,Fe===null&&(at=null,Ge=0,Cl()),L}function $v(){for(;Fe!==null;)Xd(Fe)}function Yv(e,t){var i=Ze;Ze|=2;var l=Kd(),m=Wd();at!==e||Ge!==t?(ea=null,Jl=lt()+500,zr(e,t)):Br=Ni(e,t);e:do try{if(et!==0&&Fe!==null){t=Fe;var C=an;t:switch(et){case 1:et=0,an=null,Hr(e,t,C,1);break;case 2:case 9:if(lf(C)){et=0,an=null,Qd(t);break}t=function(){et!==2&&et!==9||at!==e||(et=7),On(e)},C.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:lf(C)?(et=0,an=null,Qd(t)):(et=0,an=null,Hr(e,t,C,7));break;case 5:var L=null;switch(Fe.tag){case 26:L=Fe.memoizedState;case 5:case 27:var U=Fe;if(L?jp(L):U.stateNode.complete){et=0,an=null;var X=U.sibling;if(X!==null)Fe=X;else{var re=U.return;re!==null?(Fe=re,ia(re)):Fe=null}break t}}et=0,an=null,Hr(e,t,C,5);break;case 6:et=0,an=null,Hr(e,t,C,6);break;case 8:Cc(),pt=6;break e;default:throw Error(o(462))}}Kv();break}catch(de){$d(e,de)}while(!0);return qn=qi=null,G.H=l,G.A=m,Ze=i,Fe!==null?0:(at=null,Ge=0,Cl(),pt)}function Kv(){for(;Fe!==null&&!Gt();)Xd(Fe)}function Xd(e){var t=Sd(e.alternate,e,Jn);e.memoizedProps=e.pendingProps,t===null?ia(e):Fe=t}function Qd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=pd(i,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=pd(i,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Ho(t);default:Cd(i,t),t=Fe=Kh(t,Jn),t=Sd(i,t,Jn)}e.memoizedProps=e.pendingProps,t===null?ia(e):Fe=t}function Hr(e,t,i,l){qn=qi=null,Ho(t),Ar=null,vs=0;var m=t.return;try{if(jv(e,m,t,i,Ge)){pt=1,Vl(e,mn(i,e.current)),Fe=null;return}}catch(C){if(m!==null)throw Fe=m,C;pt=1,Vl(e,mn(i,e.current)),Fe=null;return}t.flags&32768?(Ye||l===1?e=!0:Br||(Ge&536870912)!==0?e=!1:(_i=e=!0,(l===2||l===9||l===3||l===6)&&(l=sn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Zd(t,e)):ia(t)}function ia(e){var t=e;do{if((t.flags&32768)!==0){Zd(t,_i);return}e=t.return;var i=Iv(t.alternate,t,Jn);if(i!==null){Fe=i;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);pt===0&&(pt=5)}function Zd(e,t){do{var i=Uv(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);pt=6,Fe=null}function Jd(e,t,i,l,m,C,L,U,X){e.cancelPendingCommit=null;do ra();while(At!==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|=uo,ts(e,i,C,L,U,X),e===at&&(Fe=at=null,Ge=0),jr=t,Si=e,ei=i,yc=C,Sc=m,Fd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zv(ke,function(){return rp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=G.T,G.T=null,m=$.p,$.p=2,L=Ze,Ze|=4;try{Pv(e,t,i)}finally{Ze=L,$.p=m,G.T=l}}At=1,ep(),tp(),np()}}function ep(){if(At===1){At=0;var e=Si,t=jr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=G.T,G.T=null;var l=$.p;$.p=2;var m=Ze;Ze|=4;try{Bd(t,e);var C=Nc,L=Ih(e.containerInfo),U=C.focusedElem,X=C.selectionRange;if(L!==U&&U&&U.ownerDocument&&Hh(U.ownerDocument.documentElement,U)){if(X!==null&&so(U)){var re=X.start,de=X.end;if(de===void 0&&(de=re),"selectionStart"in U)U.selectionStart=re,U.selectionEnd=Math.min(de,U.value.length);else{var _e=U.ownerDocument||document,se=_e&&_e.defaultView||window;if(se.getSelection){var oe=se.getSelection(),Ee=U.textContent.length,je=Math.min(X.start,Ee),st=X.end===void 0?je:Math.min(X.end,Ee);!oe.extend&&je>st&&(L=st,st=je,je=L);var J=zh(U,je),Z=zh(U,st);if(J&&Z&&(oe.rangeCount!==1||oe.anchorNode!==J.node||oe.anchorOffset!==J.offset||oe.focusNode!==Z.node||oe.focusOffset!==Z.offset)){var ie=_e.createRange();ie.setStart(J.node,J.offset),oe.removeAllRanges(),je>st?(oe.addRange(ie),oe.extend(Z.node,Z.offset)):(ie.setEnd(Z.node,Z.offset),oe.addRange(ie))}}}}for(_e=[],oe=U;oe=oe.parentNode;)oe.nodeType===1&&_e.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<_e.length;U++){var pe=_e[U];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}ga=!!Bc,Nc=Bc=null}finally{Ze=m,$.p=l,G.T=i}}e.current=t,At=2}}function tp(){if(At===2){At=0;var e=Si,t=jr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=G.T,G.T=null;var l=$.p;$.p=2;var m=Ze;Ze|=4;try{Dd(e,t.alternate,t)}finally{Ze=m,$.p=l,G.T=i}}At=3}}function np(){if(At===4||At===3){At=0,yt();var e=Si,t=jr,i=ei,l=Fd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?At=5:(At=0,jr=Si=null,ip(e,e.pendingLanes));var m=e.pendingLanes;if(m===0&&(yi=null),ns(i),t=t.stateNode,De&&typeof De.onCommitFiberRoot=="function")try{De.onCommitFiberRoot(mt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=G.T,m=$.p,$.p=2,G.T=null;try{for(var C=e.onRecoverableError,L=0;L<l.length;L++){var U=l[L];C(U.value,{componentStack:U.stack})}}finally{G.T=t,$.p=m}}(ei&3)!==0&&ra(),On(e),m=e.pendingLanes,(i&261930)!==0&&(m&42)!==0?e===bc?Ns++:(Ns=0,bc=e):Ns=0,js(0)}}function ip(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,gs(t)))}function ra(){return ep(),tp(),np(),rp()}function rp(){if(At!==5)return!1;var e=Si,t=yc;yc=0;var i=ns(ei),l=G.T,m=$.p;try{$.p=32>i?32:i,G.T=null,i=Sc,Sc=null;var C=Si,L=ei;if(At=0,jr=Si=null,ei=0,(Ze&6)!==0)throw Error(o(331));var U=Ze;if(Ze|=4,Id(C.current),jd(C,C.current,L,i),Ze=U,js(0,!1),De&&typeof De.onPostCommitFiberRoot=="function")try{De.onPostCommitFiberRoot(mt,C)}catch{}return!0}finally{$.p=m,G.T=l,ip(e,t)}}function sp(e,t,i){t=mn(i,t),t=Jo(e.stateNode,t,2),e=di(e,t,2),e!==null&&(Tn(e,2),On(e))}function tt(e,t,i){if(e.tag===3)sp(e,e,i);else for(;t!==null;){if(t.tag===3){sp(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(yi===null||!yi.has(l))){e=mn(i,e),i=ld(2),l=di(t,i,2),l!==null&&(ad(i,l,t,e),Tn(l,2),On(l));break}}t=t.return}}function xc(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new Vv;var m=new Set;l.set(t,m)}else m=l.get(t),m===void 0&&(m=new Set,l.set(t,m));m.has(i)||(gc=!0,m.add(i),e=Wv.bind(null,e,t,i),t.then(e,e))}function Wv(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,at===e&&(Ge&i)===i&&(pt===4||pt===3&&(Ge&62914560)===Ge&&300>lt()-Zl?(Ze&2)===0&&zr(e,0):_c|=i,Nr===Ge&&(Nr=0)),On(e)}function lp(e,t){t===0&&(t=ri()),e=Ui(e,t),e!==null&&(Tn(e,t),On(e))}function Xv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),lp(e,i)}function Qv(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,m=e.memoizedState;m!==null&&(i=m.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),lp(e,i)}function Zv(e,t){return jt(e,t)}var sa=null,Ir=null,Ec=!1,la=!1,kc=!1,Ci=0;function On(e){e!==Ir&&e.next===null&&(Ir===null?sa=Ir=e:Ir=Ir.next=e),la=!0,Ec||(Ec=!0,e0())}function js(e,t){if(!kc&&la){kc=!0;do for(var i=!1,l=sa;l!==null;){if(e!==0){var m=l.pendingLanes;if(m===0)var C=0;else{var L=l.suspendedLanes,U=l.pingedLanes;C=(1<<31-Pe(42|e)+1)-1,C&=m&~(L&~U),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(i=!0,up(l,C))}else C=Ge,C=rr(l,l===at?C:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(C&3)===0||Ni(l,C)||(i=!0,up(l,C));l=l.next}while(i);kc=!1}}function Jv(){ap()}function ap(){la=Ec=!1;var e=0;Ci!==0&&u0()&&(e=Ci);for(var t=lt(),i=null,l=sa;l!==null;){var m=l.next,C=op(l,t);C===0?(l.next=null,i===null?sa=m:i.next=m,m===null&&(Ir=i)):(i=l,(e!==0||(C&3)!==0)&&(la=!0)),l=m}At!==0&&At!==5||js(e),Ci!==0&&(Ci=0)}function op(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,m=e.expirationTimes,C=e.pendingLanes&-62914561;0<C;){var L=31-Pe(C),U=1<<L,X=m[L];X===-1?((U&i)===0||(U&l)!==0)&&(m[L]=Pa(U,t)):X<=t&&(e.expiredLanes|=U),C&=~U}if(t=at,i=Ge,i=rr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(et===2||et===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Tt(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ni(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Tt(l),ns(i)){case 2:case 8:i=ve;break;case 32:i=ke;break;case 268435456:i=Be;break;default:i=ke}return l=cp.bind(null,e),i=jt(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Tt(l),e.callbackPriority=2,e.callbackNode=null,2}function cp(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ra()&&e.callbackNode!==i)return null;var l=Ge;return l=rr(e,e===at?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Vd(e,l,t),op(e,lt()),e.callbackNode!=null&&e.callbackNode===i?cp.bind(null,e):null)}function up(e,t){if(ra())return null;Vd(e,t,!0)}function e0(){f0(function(){(Ze&6)!==0?jt(fe,Jv):ap()})}function Ac(){if(Ci===0){var e=xr;e===0&&(e=nr,nr<<=1,(nr&261888)===0&&(nr=256)),Ci=e}return Ci}function hp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pl(""+e)}function fp(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 t0(e,t,i,l,m){if(t==="submit"&&i&&i.stateNode===m){var C=hp((m[Mt]||null).action),L=l.submitter;L&&(t=(t=L[Mt]||null)?hp(t.formAction):L.getAttribute("formAction"),t!==null&&(C=t,L=null));var U=new vl("action","action",null,l,m);e.push({event:U,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ci!==0){var X=L?fp(m,L):new FormData(m);Yo(i,{pending:!0,data:X,method:m.method,action:C},null,X)}}else typeof C=="function"&&(U.preventDefault(),X=L?fp(m,L):new FormData(m),Yo(i,{pending:!0,data:X,method:m.method,action:C},C,X))},currentTarget:m}]})}}for(var Tc=0;Tc<co.length;Tc++){var Dc=co[Tc],n0=Dc.toLowerCase(),i0=Dc[0].toUpperCase()+Dc.slice(1);xn(n0,"on"+i0)}xn(Fh,"onAnimationEnd"),xn(qh,"onAnimationIteration"),xn(Vh,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(yv,"onTransitionRun"),xn(Sv,"onTransitionStart"),xn(bv,"onTransitionCancel"),xn(Gh,"onTransitionEnd"),ur("onMouseEnter",["mouseout","mouseover"]),ur("onMouseLeave",["mouseout","mouseover"]),ur("onPointerEnter",["pointerout","pointerover"]),ur("onPointerLeave",["pointerout","pointerover"]),ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zs="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(" "),r0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zs));function dp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],m=l.event;l=l.listeners;e:{var C=void 0;if(t)for(var L=l.length-1;0<=L;L--){var U=l[L],X=U.instance,re=U.currentTarget;if(U=U.listener,X!==C&&m.isPropagationStopped())break e;C=U,m.currentTarget=re;try{C(m)}catch(de){bl(de)}m.currentTarget=null,C=X}else for(L=0;L<l.length;L++){if(U=l[L],X=U.instance,re=U.currentTarget,U=U.listener,X!==C&&m.isPropagationStopped())break e;C=U,m.currentTarget=re;try{C(m)}catch(de){bl(de)}m.currentTarget=null,C=X}}}}function qe(e,t){var i=t[be];i===void 0&&(i=t[be]=new Set);var l=e+"__bubble";i.has(l)||(pp(t,e,2,!1),i.add(l))}function Rc(e,t,i){var l=0;t&&(l|=4),pp(i,e,l,t)}var aa="_reactListening"+Math.random().toString(36).slice(2);function Mc(e){if(!e[aa]){e[aa]=!0,lh.forEach(function(i){i!=="selectionchange"&&(r0.has(i)||Rc(i,!1,e),Rc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[aa]||(t[aa]=!0,Rc("selectionchange",!1,t))}}function pp(e,t,i,l){switch(qp(t)){case 2:var m=L0;break;case 8:m=O0;break;default:m=$c}i=m.bind(null,t,i,e),m=void 0,!Xa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(m=!0),l?m!==void 0?e.addEventListener(t,i,{capture:!0,passive:m}):e.addEventListener(t,i,!0):m!==void 0?e.addEventListener(t,i,{passive:m}):e.addEventListener(t,i,!1)}function Lc(e,t,i,l,m){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 U=l.stateNode.containerInfo;if(U===m)break;if(L===4)for(L=l.return;L!==null;){var X=L.tag;if((X===3||X===4)&&L.stateNode.containerInfo===m)return;L=L.return}for(;U!==null;){if(L=ar(U),L===null)return;if(X=L.tag,X===5||X===6||X===26||X===27){l=C=L;continue e}U=U.parentNode}}l=l.return}vh(function(){var re=C,de=Ka(i),_e=[];e:{var se=$h.get(e);if(se!==void 0){var oe=vl,Ee=e;switch(e){case"keypress":if(gl(i)===0)break e;case"keydown":case"keyup":oe=Q_;break;case"focusin":Ee="focus",oe=eo;break;case"focusout":Ee="blur",oe=eo;break;case"beforeblur":case"afterblur":oe=eo;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":oe=bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=I_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=ev;break;case Fh:case qh:case Vh:oe=F_;break;case Gh:oe=nv;break;case"scroll":case"scrollend":oe=z_;break;case"wheel":oe=rv;break;case"copy":case"cut":case"paste":oe=V_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=wh;break;case"toggle":case"beforetoggle":oe=lv}var je=(t&4)!==0,st=!je&&(e==="scroll"||e==="scrollend"),J=je?se!==null?se+"Capture":null:se;je=[];for(var Z=re,ie;Z!==null;){var pe=Z;if(ie=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ie===null||J===null||(pe=ss(Z,J),pe!=null&&je.push(Hs(Z,pe,ie))),st)break;Z=Z.return}0<je.length&&(se=new oe(se,Ee,null,i,de),_e.push({event:se,listeners:je}))}}if((t&7)===0){e:{if(se=e==="mouseover"||e==="pointerover",oe=e==="mouseout"||e==="pointerout",se&&i!==Ya&&(Ee=i.relatedTarget||i.fromElement)&&(ar(Ee)||Ee[ne]))break e;if((oe||se)&&(se=de.window===de?de:(se=de.ownerDocument)?se.defaultView||se.parentWindow:window,oe?(Ee=i.relatedTarget||i.toElement,oe=re,Ee=Ee?ar(Ee):null,Ee!==null&&(st=y(Ee),je=Ee.tag,Ee!==st||je!==5&&je!==27&&je!==6)&&(Ee=null)):(oe=null,Ee=re),oe!==Ee)){if(je=bh,pe="onMouseLeave",J="onMouseEnter",Z="mouse",(e==="pointerout"||e==="pointerover")&&(je=wh,pe="onPointerLeave",J="onPointerEnter",Z="pointer"),st=oe==null?se:rs(oe),ie=Ee==null?se:rs(Ee),se=new je(pe,Z+"leave",oe,i,de),se.target=st,se.relatedTarget=ie,pe=null,ar(de)===re&&(je=new je(J,Z+"enter",Ee,i,de),je.target=ie,je.relatedTarget=st,pe=je),st=pe,oe&&Ee)t:{for(je=s0,J=oe,Z=Ee,ie=0,pe=J;pe;pe=je(pe))ie++;pe=0;for(var Re=Z;Re;Re=je(Re))pe++;for(;0<ie-pe;)J=je(J),ie--;for(;0<pe-ie;)Z=je(Z),pe--;for(;ie--;){if(J===Z||Z!==null&&J===Z.alternate){je=J;break t}J=je(J),Z=je(Z)}je=null}else je=null;oe!==null&&mp(_e,se,oe,je,!1),Ee!==null&&st!==null&&mp(_e,st,Ee,je,!0)}}e:{if(se=re?rs(re):window,oe=se.nodeName&&se.nodeName.toLowerCase(),oe==="select"||oe==="input"&&se.type==="file")var We=Mh;else if(Dh(se))if(Lh)We=gv;else{We=pv;var Ae=dv}else oe=se.nodeName,!oe||oe.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?re&&$a(re.elementType)&&(We=Mh):We=mv;if(We&&(We=We(e,re))){Rh(_e,We,i,de);break e}Ae&&Ae(e,se,re),e==="focusout"&&re&&se.type==="number"&&re.memoizedProps.value!=null&&Ga(se,"number",se.value)}switch(Ae=re?rs(re):window,e){case"focusin":(Dh(Ae)||Ae.contentEditable==="true")&&(gr=Ae,lo=re,ds=null);break;case"focusout":ds=lo=gr=null;break;case"mousedown":ao=!0;break;case"contextmenu":case"mouseup":case"dragend":ao=!1,Uh(_e,i,de);break;case"selectionchange":if(vv)break;case"keydown":case"keyup":Uh(_e,i,de)}var Ie;if(no)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 mr?Ah(e,i)&&($e="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&($e="onCompositionStart");$e&&(xh&&i.locale!=="ko"&&(mr||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&mr&&(Ie=yh()):(li=de,Qa="value"in li?li.value:li.textContent,mr=!0)),Ae=oa(re,$e),0<Ae.length&&($e=new Ch($e,e,null,i,de),_e.push({event:$e,listeners:Ae}),Ie?$e.data=Ie:(Ie=Th(i),Ie!==null&&($e.data=Ie)))),(Ie=ov?cv(e,i):uv(e,i))&&($e=oa(re,"onBeforeInput"),0<$e.length&&(Ae=new Ch("onBeforeInput","beforeinput",null,i,de),_e.push({event:Ae,listeners:$e}),Ae.data=Ie)),t0(_e,e,re,i,de)}dp(_e,t)})}function Hs(e,t,i){return{instance:e,listener:t,currentTarget:i}}function oa(e,t){for(var i=t+"Capture",l=[];e!==null;){var m=e,C=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||C===null||(m=ss(e,i),m!=null&&l.unshift(Hs(e,m,C)),m=ss(e,t),m!=null&&l.push(Hs(e,m,C))),e.tag===3)return l;e=e.return}return[]}function s0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function mp(e,t,i,l,m){for(var C=t._reactName,L=[];i!==null&&i!==l;){var U=i,X=U.alternate,re=U.stateNode;if(U=U.tag,X!==null&&X===l)break;U!==5&&U!==26&&U!==27||re===null||(X=re,m?(re=ss(i,C),re!=null&&L.unshift(Hs(i,re,X))):m||(re=ss(i,C),re!=null&&L.push(Hs(i,re,X)))),i=i.return}L.length!==0&&e.push({event:t,listeners:L})}var l0=/\r\n?/g,a0=/\u0000|\uFFFD/g;function gp(e){return(typeof e=="string"?e:""+e).replace(l0,`
|
|
49
|
-
`).replace(a0,"")}function _p(e,t){return t=gp(t),gp(e)===t}function rt(e,t,i,l,m,C){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||fr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&fr(e,""+l);break;case"className":fl(e,"class",l);break;case"tabIndex":fl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":fl(e,i,l);break;case"style":gh(e,l,C);break;case"data":if(t!=="object"){fl(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=pl(""+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",m.name,m,null),rt(e,t,"formEncType",m.formEncType,m,null),rt(e,t,"formMethod",m.formMethod,m,null),rt(e,t,"formTarget",m.formTarget,m,null)):(rt(e,t,"encType",m.encType,m,null),rt(e,t,"method",m.method,m,null),rt(e,t,"target",m.target,m,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=pl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=In);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(m.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=pl(""+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),hl(e,"popover",l);break;case"xlinkActuate":Hn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Hn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Hn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Hn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Hn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Hn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Hn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":hl(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=N_.get(i)||i,hl(e,i,l))}}function Oc(e,t,i,l,m,C){switch(i){case"style":gh(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(m.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?fr(e,l):(typeof l=="number"||typeof l=="bigint")&&fr(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=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ah.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(m=i.endsWith("Capture"),t=i.slice(2,m?i.length-7:void 0),C=e[Mt]||null,C=C!=null?C[i]:null,typeof C=="function"&&e.removeEventListener(t,C,m),typeof l=="function")){typeof C!="function"&&C!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,m);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):hl(e,i,l)}}}function Nt(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,m=!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":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,C,L,i,null)}}m&&rt(e,t,"srcSet",i.srcSet,i,null),l&&rt(e,t,"src",i.src,i,null);return;case"input":qe("invalid",e);var U=C=L=m=null,X=null,re=null;for(l in i)if(i.hasOwnProperty(l)){var de=i[l];if(de!=null)switch(l){case"name":m=de;break;case"type":L=de;break;case"checked":X=de;break;case"defaultChecked":re=de;break;case"value":C=de;break;case"defaultValue":U=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:rt(e,t,l,de,i,null)}}fh(e,C,U,X,re,L,m,!1);return;case"select":qe("invalid",e),l=L=C=null;for(m in i)if(i.hasOwnProperty(m)&&(U=i[m],U!=null))switch(m){case"value":C=U;break;case"defaultValue":L=U;break;case"multiple":l=U;default:rt(e,t,m,U,i,null)}t=C,i=L,e.multiple=!!l,t!=null?hr(e,!!l,t,!1):i!=null&&hr(e,!!l,i,!0);return;case"textarea":qe("invalid",e),C=m=l=null;for(L in i)if(i.hasOwnProperty(L)&&(U=i[L],U!=null))switch(L){case"value":l=U;break;case"defaultValue":m=U;break;case"children":C=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:rt(e,t,L,U,i,null)}ph(e,l,m,C);return;case"option":for(X in i)if(i.hasOwnProperty(X)&&(l=i[X],l!=null))switch(X){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:rt(e,t,X,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<zs.length;l++)qe(zs[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(re in i)if(i.hasOwnProperty(re)&&(l=i[re],l!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,re,l,i,null)}return;default:if($a(t)){for(de in i)i.hasOwnProperty(de)&&(l=i[de],l!==void 0&&Oc(e,t,de,l,i,void 0));return}}for(U in i)i.hasOwnProperty(U)&&(l=i[U],l!=null&&rt(e,t,U,l,i,null))}function o0(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 m=null,C=null,L=null,U=null,X=null,re=null,de=null;for(oe in i){var _e=i[oe];if(i.hasOwnProperty(oe)&&_e!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":X=_e;default:l.hasOwnProperty(oe)||rt(e,t,oe,null,l,_e)}}for(var se in l){var oe=l[se];if(_e=i[se],l.hasOwnProperty(se)&&(oe!=null||_e!=null))switch(se){case"type":C=oe;break;case"name":m=oe;break;case"checked":re=oe;break;case"defaultChecked":de=oe;break;case"value":L=oe;break;case"defaultValue":U=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,t));break;default:oe!==_e&&rt(e,t,se,oe,l,_e)}}Va(e,L,U,X,re,de,C,m);return;case"select":oe=L=U=se=null;for(C in i)if(X=i[C],i.hasOwnProperty(C)&&X!=null)switch(C){case"value":break;case"multiple":oe=X;default:l.hasOwnProperty(C)||rt(e,t,C,null,l,X)}for(m in l)if(C=l[m],X=i[m],l.hasOwnProperty(m)&&(C!=null||X!=null))switch(m){case"value":se=C;break;case"defaultValue":U=C;break;case"multiple":L=C;default:C!==X&&rt(e,t,m,C,l,X)}t=U,i=L,l=oe,se!=null?hr(e,!!i,se,!1):!!l!=!!i&&(t!=null?hr(e,!!i,t,!0):hr(e,!!i,i?[]:"",!1));return;case"textarea":oe=se=null;for(U in i)if(m=i[U],i.hasOwnProperty(U)&&m!=null&&!l.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:rt(e,t,U,null,l,m)}for(L in l)if(m=l[L],C=i[L],l.hasOwnProperty(L)&&(m!=null||C!=null))switch(L){case"value":se=m;break;case"defaultValue":oe=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==C&&rt(e,t,L,m,l,C)}dh(e,se,oe);return;case"option":for(var Ee in i)if(se=i[Ee],i.hasOwnProperty(Ee)&&se!=null&&!l.hasOwnProperty(Ee))switch(Ee){case"selected":e.selected=!1;break;default:rt(e,t,Ee,null,l,se)}for(X in l)if(se=l[X],oe=i[X],l.hasOwnProperty(X)&&se!==oe&&(se!=null||oe!=null))switch(X){case"selected":e.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:rt(e,t,X,se,l,oe)}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 je in i)se=i[je],i.hasOwnProperty(je)&&se!=null&&!l.hasOwnProperty(je)&&rt(e,t,je,null,l,se);for(re in l)if(se=l[re],oe=i[re],l.hasOwnProperty(re)&&se!==oe&&(se!=null||oe!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:rt(e,t,re,se,l,oe)}return;default:if($a(t)){for(var st in i)se=i[st],i.hasOwnProperty(st)&&se!==void 0&&!l.hasOwnProperty(st)&&Oc(e,t,st,void 0,l,se);for(de in l)se=l[de],oe=i[de],!l.hasOwnProperty(de)||se===oe||se===void 0&&oe===void 0||Oc(e,t,de,se,l,oe);return}}for(var J in i)se=i[J],i.hasOwnProperty(J)&&se!=null&&!l.hasOwnProperty(J)&&rt(e,t,J,null,l,se);for(_e in l)se=l[_e],oe=i[_e],!l.hasOwnProperty(_e)||se===oe||se==null&&oe==null||rt(e,t,_e,se,l,oe)}function vp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function c0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var m=i[l],C=m.transferSize,L=m.initiatorType,U=m.duration;if(C&&U&&vp(L)){for(L=0,U=m.responseEnd,l+=1;l<i.length;l++){var X=i[l],re=X.startTime;if(re>U)break;var de=X.transferSize,_e=X.initiatorType;de&&vp(_e)&&(X=X.responseEnd,L+=de*(X<U?1:(U-re)/(X-re)))}if(--l,t+=8*(C+L)/(m.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 Bc=null,Nc=null;function ca(e){return e.nodeType===9?e:e.ownerDocument}function yp(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 Sp(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 jc(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 zc=null;function u0(){var e=window.event;return e&&e.type==="popstate"?e===zc?!1:(zc=e,!0):(zc=null,!1)}var bp=typeof setTimeout=="function"?setTimeout:void 0,h0=typeof clearTimeout=="function"?clearTimeout:void 0,Cp=typeof Promise=="function"?Promise:void 0,f0=typeof queueMicrotask=="function"?queueMicrotask:typeof Cp<"u"?function(e){return Cp.resolve(null).then(e).catch(d0)}:bp;function d0(e){setTimeout(function(){throw e})}function wi(e){return e==="head"}function wp(e,t){var i=t,l=0;do{var m=i.nextSibling;if(e.removeChild(i),m&&m.nodeType===8)if(i=m.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(m),qr(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Is(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Is(i);for(var C=i.firstChild;C;){var L=C.nextSibling,U=C.nodeName;C[is]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&C.rel.toLowerCase()==="stylesheet"||i.removeChild(C),C=L}}else i==="body"&&Is(e.ownerDocument.body);i=m}while(i);qr(t)}function xp(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 Hc(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":Hc(i),Fa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function p0(e,t,i,l){for(;e.nodeType===1;){var m=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[is])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!==m.rel||e.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||e.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||e.getAttribute("title")!==(m.title==null?null:m.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(C=e.getAttribute("src"),(C!==(m.src==null?null:m.src)||e.getAttribute("type")!==(m.type==null?null:m.type)||e.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&C&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var C=m.name==null?null:""+m.name;if(m.type==="hidden"&&e.getAttribute("name")===C)return e}else return e;if(e=Sn(e.nextSibling),e===null)break}return null}function m0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Sn(e.nextSibling),e===null))return null;return e}function Ep(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Sn(e.nextSibling),e===null))return null;return e}function Ic(e){return e.data==="$?"||e.data==="$~"}function Uc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function g0(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 Sn(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 Pc=null;function kp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Sn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Ap(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 Tp(e,t,i){switch(t=ca(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 Is(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Fa(e)}var bn=new Map,Dp=new Set;function ua(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ti=$.d;$.d={f:_0,r:v0,D:y0,C:S0,L:b0,m:C0,X:x0,S:w0,M:E0};function _0(){var e=ti.f(),t=ta();return e||t}function v0(e){var t=or(e);t!==null&&t.tag===5&&t.type==="form"?$f(t):ti.r(e)}var Ur=typeof document>"u"?null:document;function Rp(e,t,i){var l=Ur;if(l&&typeof t=="string"&&t){var m=dn(t);m='link[rel="'+e+'"][href="'+m+'"]',typeof i=="string"&&(m+='[crossorigin="'+i+'"]'),Dp.has(m)||(Dp.add(m),e={rel:e,crossOrigin:i,href:t},l.querySelector(m)===null&&(t=l.createElement("link"),Nt(t,"link",e),Dt(t),l.head.appendChild(t)))}}function y0(e){ti.D(e),Rp("dns-prefetch",e,null)}function S0(e,t){ti.C(e,t),Rp("preconnect",e,t)}function b0(e,t,i){ti.L(e,t,i);var l=Ur;if(l&&e&&t){var m='link[rel="preload"][as="'+dn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(m+='[imagesrcset="'+dn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(m+='[imagesizes="'+dn(i.imageSizes)+'"]')):m+='[href="'+dn(e)+'"]';var C=m;switch(t){case"style":C=Pr(e);break;case"script":C=Fr(e)}bn.has(C)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),bn.set(C,e),l.querySelector(m)!==null||t==="style"&&l.querySelector(Us(C))||t==="script"&&l.querySelector(Ps(C))||(t=l.createElement("link"),Nt(t,"link",e),Dt(t),l.head.appendChild(t)))}}function C0(e,t){ti.m(e,t);var i=Ur;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",m='link[rel="modulepreload"][as="'+dn(l)+'"][href="'+dn(e)+'"]',C=m;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=Fr(e)}if(!bn.has(C)&&(e=u({rel:"modulepreload",href:e},t),bn.set(C,e),i.querySelector(m)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ps(C)))return}l=i.createElement("link"),Nt(l,"link",e),Dt(l),i.head.appendChild(l)}}}function w0(e,t,i){ti.S(e,t,i);var l=Ur;if(l&&e){var m=cr(l).hoistableStyles,C=Pr(e);t=t||"default";var L=m.get(C);if(!L){var U={loading:0,preload:null};if(L=l.querySelector(Us(C)))U.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=bn.get(C))&&Fc(e,i);var X=L=l.createElement("link");Dt(X),Nt(X,"link",e),X._p=new Promise(function(re,de){X.onload=re,X.onerror=de}),X.addEventListener("load",function(){U.loading|=1}),X.addEventListener("error",function(){U.loading|=2}),U.loading|=4,ha(L,t,l)}L={type:"stylesheet",instance:L,count:1,state:U},m.set(C,L)}}}function x0(e,t){ti.X(e,t);var i=Ur;if(i&&e){var l=cr(i).hoistableScripts,m=Fr(e),C=l.get(m);C||(C=i.querySelector(Ps(m)),C||(e=u({src:e,async:!0},t),(t=bn.get(m))&&qc(e,t),C=i.createElement("script"),Dt(C),Nt(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(m,C))}}function E0(e,t){ti.M(e,t);var i=Ur;if(i&&e){var l=cr(i).hoistableScripts,m=Fr(e),C=l.get(m);C||(C=i.querySelector(Ps(m)),C||(e=u({src:e,async:!0,type:"module"},t),(t=bn.get(m))&&qc(e,t),C=i.createElement("script"),Dt(C),Nt(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(m,C))}}function Mp(e,t,i,l){var m=(m=ge.current)?ua(m):null;if(!m)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Pr(i.href),i=cr(m).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=Pr(i.href);var C=cr(m).hoistableStyles,L=C.get(e);if(L||(m=m.ownerDocument||m,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(e,L),(C=m.querySelector(Us(e)))&&!C._p&&(L.instance=C,L.state.loading=5),bn.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},bn.set(e,i),C||k0(m,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=Fr(i),i=cr(m).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 Pr(e){return'href="'+dn(e)+'"'}function Us(e){return'link[rel="stylesheet"]['+e+"]"}function Lp(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function k0(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}),Nt(t,"link",i),Dt(t),e.head.appendChild(t))}function Fr(e){return'[src="'+dn(e)+'"]'}function Ps(e){return"script[async]"+e}function Op(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+dn(i.href)+'"]');if(l)return t.instance=l,Dt(l),l;var m=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Dt(l),Nt(l,"style",m),ha(l,i.precedence,e),t.instance=l;case"stylesheet":m=Pr(i.href);var C=e.querySelector(Us(m));if(C)return t.state.loading|=4,t.instance=C,Dt(C),C;l=Lp(i),(m=bn.get(m))&&Fc(l,m),C=(e.ownerDocument||e).createElement("link"),Dt(C);var L=C;return L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),Nt(C,"link",l),t.state.loading|=4,ha(C,i.precedence,e),t.instance=C;case"script":return C=Fr(i.src),(m=e.querySelector(Ps(C)))?(t.instance=m,Dt(m),m):(l=i,(m=bn.get(C))&&(l=u({},i),qc(l,m)),e=e.ownerDocument||e,m=e.createElement("script"),Dt(m),Nt(m,"link",l),e.head.appendChild(m),t.instance=m);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,ha(l,i.precedence,e));return t.instance}function ha(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=l.length?l[l.length-1]:null,C=m,L=0;L<l.length;L++){var U=l[L];if(U.dataset.precedence===t)C=U;else if(C!==m)break}C?C.parentNode.insertBefore(e,C.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var fa=null;function Bp(e,t,i){if(fa===null){var l=new Map,m=fa=new Map;m.set(i,l)}else m=fa,l=m.get(i),l||(l=new Map,m.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),m=0;m<i.length;m++){var C=i[m];if(!(C[is]||C[gt]||e==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var L=C.getAttribute(t)||"";L=e+L;var U=l.get(L);U?U.push(C):l.set(L,[C])}}return l}function Np(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function A0(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 jp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function T0(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 m=Pr(l.href),C=t.querySelector(Us(m));if(C){t=C._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=da.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=C,Dt(C);return}C=t.ownerDocument||t,l=Lp(l),(m=bn.get(m))&&Fc(l,m),C=C.createElement("link"),Dt(C);var L=C;L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),Nt(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=da.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Vc=0;function D0(e,t){return e.stylesheets&&e.count===0&&ma(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&ma(e,e.stylesheets),e.unsuspend){var C=e.unsuspend;e.unsuspend=null,C()}},6e4+t);0<e.imgBytes&&Vc===0&&(Vc=62500*c0());var m=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ma(e,e.stylesheets),e.unsuspend)){var C=e.unsuspend;e.unsuspend=null,C()}},(e.imgBytes>Vc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(m)}}:null}function da(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ma(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pa=null;function ma(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pa=new Map,t.forEach(R0,e),pa=null,da.call(e))}function R0(e,t){if(!(t.state.loading&4)){var i=pa.get(e);if(i)var l=i.get(null);else{i=new Map,pa.set(e,i);for(var m=e.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<m.length;C++){var L=m[C];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(i.set(L.dataset.precedence,L),l=L)}l&&i.set(null,l)}m=t.instance,L=m.getAttribute("data-precedence"),C=i.get(L)||l,C===l&&i.set(null,m),i.set(L,m),this.count++,l=da.bind(this),m.addEventListener("load",l),m.addEventListener("error",l),C?C.parentNode.insertBefore(m,C.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(m,e.firstChild)),t.state.loading|=4}}var Fs={$$typeof:_,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function M0(e,t,i,l,m,C,L,U,X){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=si(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=si(0),this.hiddenUpdates=si(null),this.identifierPrefix=l,this.onUncaughtError=m,this.onCaughtError=C,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function zp(e,t,i,l,m,C,L,U,X,re,de,_e){return e=new M0(e,t,i,L,X,re,de,_e,U),t=1,C===!0&&(t|=24),C=rn(3,null,null,t),e.current=C,C.stateNode=e,t=wo(),t.refCount++,e.pooledCache=t,t.refCount++,C.memoizedState={element:l,isDehydrated:i,cache:t},Ao(C),e}function Hp(e){return e?(e=yr,e):yr}function Ip(e,t,i,l,m,C){m=Hp(m),l.context===null?l.context=m:l.pendingContext=m,l=fi(t),l.payload={element:i},C=C===void 0?null:C,C!==null&&(l.callback=C),i=di(e,l,t),i!==null&&(Jt(i,e,t),Ss(i,e,t))}function Up(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Gc(e,t){Up(e,t),(e=e.alternate)&&Up(e,t)}function Pp(e){if(e.tag===13||e.tag===31){var t=Ui(e,67108864);t!==null&&Jt(t,e,67108864),Gc(e,67108864)}}function Fp(e){if(e.tag===13||e.tag===31){var t=cn();t=Qe(t);var i=Ui(e,t);i!==null&&Jt(i,e,t),Gc(e,t)}}var ga=!0;function L0(e,t,i,l){var m=G.T;G.T=null;var C=$.p;try{$.p=2,$c(e,t,i,l)}finally{$.p=C,G.T=m}}function O0(e,t,i,l){var m=G.T;G.T=null;var C=$.p;try{$.p=8,$c(e,t,i,l)}finally{$.p=C,G.T=m}}function $c(e,t,i,l){if(ga){var m=Yc(l);if(m===null)Lc(e,t,l,_a,i),Vp(e,l);else if(N0(m,e,t,i,l))l.stopPropagation();else if(Vp(e,l),t&4&&-1<B0.indexOf(e)){for(;m!==null;){var C=or(m);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var L=zn(C.pendingLanes);if(L!==0){var U=C;for(U.pendingLanes|=2,U.entangledLanes|=2;L;){var X=1<<31-Pe(L);U.entanglements[1]|=X,L&=~X}On(C),(Ze&6)===0&&(Jl=lt()+500,js(0))}}break;case 31:case 13:U=Ui(C,2),U!==null&&Jt(U,C,2),ta(),Gc(C,2)}if(C=Yc(l),C===null&&Lc(e,t,l,_a,i),C===m)break;m=C}m!==null&&l.stopPropagation()}else Lc(e,t,l,null,i)}}function Yc(e){return e=Ka(e),Kc(e)}var _a=null;function Kc(e){if(_a=null,e=ar(e),e!==null){var t=y(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 _a=e,null}function qp(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(kt()){case fe:return 2;case ve:return 8;case ke:case Oe:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Wc=!1,xi=null,Ei=null,ki=null,qs=new Map,Vs=new Map,Ai=[],B0="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 Vp(e,t){switch(e){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":ki=null;break;case"pointerover":case"pointerout":qs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vs.delete(t.pointerId)}}function Gs(e,t,i,l,m,C){return e===null||e.nativeEvent!==C?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:C,targetContainers:[m]},t!==null&&(t=or(t),t!==null&&Pp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,m!==null&&t.indexOf(m)===-1&&t.push(m),e)}function N0(e,t,i,l,m){switch(t){case"focusin":return xi=Gs(xi,e,t,i,l,m),!0;case"dragenter":return Ei=Gs(Ei,e,t,i,l,m),!0;case"mouseover":return ki=Gs(ki,e,t,i,l,m),!0;case"pointerover":var C=m.pointerId;return qs.set(C,Gs(qs.get(C)||null,e,t,i,l,m)),!0;case"gotpointercapture":return C=m.pointerId,Vs.set(C,Gs(Vs.get(C)||null,e,t,i,l,m)),!0}return!1}function Gp(e){var t=ar(e.target);if(t!==null){var i=y(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,ul(e.priority,function(){Fp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,ul(e.priority,function(){Fp(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 va(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Yc(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);Ya=l,i.target.dispatchEvent(l),Ya=null}else return t=or(i),t!==null&&Pp(t),e.blockedOn=i,!1;t.shift()}return!0}function $p(e,t,i){va(e)&&i.delete(t)}function j0(){Wc=!1,xi!==null&&va(xi)&&(xi=null),Ei!==null&&va(Ei)&&(Ei=null),ki!==null&&va(ki)&&(ki=null),qs.forEach($p),Vs.forEach($p)}function ya(e,t){e.blockedOn===t&&(e.blockedOn=null,Wc||(Wc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,j0)))}var Sa=null;function Yp(e){Sa!==e&&(Sa=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Sa===e&&(Sa=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],m=e[t+2];if(typeof l!="function"){if(Kc(l||i)===null)continue;break}var C=or(i);C!==null&&(e.splice(t,3),t-=3,Yo(C,{pending:!0,data:m,method:i.method,action:l},l,m))}}))}function qr(e){function t(X){return ya(X,e)}xi!==null&&ya(xi,e),Ei!==null&&ya(Ei,e),ki!==null&&ya(ki,e),qs.forEach(t),Vs.forEach(t);for(var i=0;i<Ai.length;i++){var l=Ai[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ai.length&&(i=Ai[0],i.blockedOn===null);)Gp(i),i.blockedOn===null&&Ai.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var m=i[l],C=i[l+1],L=m[Mt]||null;if(typeof C=="function")L||Yp(i);else if(L){var U=null;if(C&&C.hasAttribute("formAction")){if(m=C,L=C[Mt]||null)U=L.formAction;else if(Kc(m)!==null)continue}else U=L.action;typeof U=="function"?i[l+1]=U:(i.splice(l,3),l-=3),Yp(i)}}}function Kp(){function e(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(L){return m=L})},focusReset:"manual",scroll:"manual"})}function t(){m!==null&&(m(),m=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,m=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),m!==null&&(m(),m=null)}}}function Xc(e){this._internalRoot=e}ba.prototype.render=Xc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=cn();Ip(i,l,e,t,null,null)},ba.prototype.unmount=Xc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ip(e.current,2,null,e,null,null),ta(),t[ne]=null}};function ba(e){this._internalRoot=e}ba.prototype.unstable_scheduleHydration=function(e){if(e){var t=cl();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ai.length&&t!==0&&t<Ai[i].priority;i++);Ai.splice(i,0,e),i===0&&Gp(e)}};var Wp=r.version;if(Wp!=="19.2.6")throw Error(o(527,Wp,"19.2.6"));$.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 z0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ca=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ca.isDisabled&&Ca.supportsFiber)try{mt=Ca.inject(z0),De=Ca}catch{}}return Ys.createRoot=function(e,t){if(!p(e))throw Error(o(299));var i=!1,l="",m=nd,C=id,L=rd;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(m=t.onUncaughtError),t.onCaughtError!==void 0&&(C=t.onCaughtError),t.onRecoverableError!==void 0&&(L=t.onRecoverableError)),t=zp(e,1,!1,null,null,i,l,null,m,C,L,Kp),e[ne]=t.current,Mc(e),new Xc(t)},Ys.hydrateRoot=function(e,t,i){if(!p(e))throw Error(o(299));var l=!1,m="",C=nd,L=id,U=rd,X=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(m=i.identifierPrefix),i.onUncaughtError!==void 0&&(C=i.onUncaughtError),i.onCaughtError!==void 0&&(L=i.onCaughtError),i.onRecoverableError!==void 0&&(U=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),t=zp(e,1,!0,t,i??null,l,m,X,C,L,U,Kp),t.context=Hp(null),i=t.current,l=cn(),l=Qe(l),m=fi(l),m.callback=null,di(i,m,l),i=l,t.current.lanes=i,Tn(t,i),On(t),e[ne]=t.current,Mc(e),new ba(t)},Ys.version="19.2.6",Ys}var lm;function W0(){if(lm)return Jc.exports;lm=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(),Jc.exports=K0(),Jc.exports}var X0=W0();const Qr=function(n,r){let p=n;const y=Zs[r];let f=null,a=0,c=null;const h=[],d={},u=function(T,k){a=p*4+17,f=(function(R){const N=new Array(R);for(let I=0;I<R;I+=1){N[I]=new Array(R);for(let P=0;P<R;P+=1)N[I][P]=null}return N})(a),b(0,0),b(a-7,0),b(0,a-7),x(),E(),S(T,k),p>=7&&v(T),c==null&&(c=A(p,y,h)),g(c,k)},b=function(T,k){for(let R=-1;R<=7;R+=1)if(!(T+R<=-1||a<=T+R))for(let N=-1;N<=7;N+=1)k+N<=-1||a<=k+N||(0<=R&&R<=6&&(N==0||N==6)||0<=N&&N<=6&&(R==0||R==6)||2<=R&&R<=4&&2<=N&&N<=4?f[T+R][k+N]=!0:f[T+R][k+N]=!1)},w=function(){let T=0,k=0;for(let R=0;R<8;R+=1){u(!0,R);const N=Ri.getLostPoint(d);(R==0||T>N)&&(T=N,k=R)}return k},E=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=Ri.getPatternPosition(p);for(let k=0;k<T.length;k+=1)for(let R=0;R<T.length;R+=1){const N=T[k],I=T[R];if(f[N][I]==null)for(let P=-2;P<=2;P+=1)for(let F=-2;F<=2;F+=1)P==-2||P==2||F==-2||F==2||P==0&&F==0?f[N+P][I+F]=!0:f[N+P][I+F]=!1}},v=function(T){const k=Ri.getBCHTypeNumber(p);for(let R=0;R<18;R+=1){const N=!T&&(k>>R&1)==1;f[Math.floor(R/3)][R%3+a-8-3]=N}for(let R=0;R<18;R+=1){const N=!T&&(k>>R&1)==1;f[R%3+a-8-3][Math.floor(R/3)]=N}},S=function(T,k){const R=y<<3|k,N=Ri.getBCHTypeInfo(R);for(let I=0;I<15;I+=1){const P=!T&&(N>>I&1)==1;I<6?f[I][8]=P:I<8?f[I+1][8]=P:f[a-15+I][8]=P}for(let I=0;I<15;I+=1){const P=!T&&(N>>I&1)==1;I<8?f[8][a-I-1]=P:I<9?f[8][15-I-1+1]=P:f[8][15-I-1]=P}f[a-8][8]=!T},g=function(T,k){let R=-1,N=a-1,I=7,P=0;const F=Ri.getMaskFunction(k);for(let Y=a-1;Y>0;Y-=2)for(Y==6&&(Y-=1);;){for(let W=0;W<2;W+=1)if(f[N][Y-W]==null){let G=!1;P<T.length&&(G=(T[P]>>>I&1)==1),F(N,Y-W)&&(G=!G),f[N][Y-W]=G,I-=1,I==-1&&(P+=1,I=7)}if(N+=R,N<0||a<=N){N-=R,R=-R;break}}},_=function(T,k){let R=0,N=0,I=0;const P=new Array(k.length),F=new Array(k.length);for(let $=0;$<k.length;$+=1){const Q=k[$].dataCount,H=k[$].totalCount-Q;N=Math.max(N,Q),I=Math.max(I,H),P[$]=new Array(Q);for(let j=0;j<P[$].length;j+=1)P[$][j]=255&T.getBuffer()[j+R];R+=Q;const O=Ri.getErrorCorrectPolynomial(H),V=nl(P[$],O.getLength()-1).mod(O);F[$]=new Array(O.getLength()-1);for(let j=0;j<F[$].length;j+=1){const ee=j+V.getLength()-F[$].length;F[$][j]=ee>=0?V.getAt(ee):0}}let Y=0;for(let $=0;$<k.length;$+=1)Y+=k[$].totalCount;const W=new Array(Y);let G=0;for(let $=0;$<N;$+=1)for(let Q=0;Q<k.length;Q+=1)$<P[Q].length&&(W[G]=P[Q][$],G+=1);for(let $=0;$<I;$+=1)for(let Q=0;Q<k.length;Q+=1)$<F[Q].length&&(W[G]=F[Q][$],G+=1);return W},A=function(T,k,R){const N=am.getRSBlocks(T,k),I=om();for(let F=0;F<R.length;F+=1){const Y=R[F];I.put(Y.getMode(),4),I.put(Y.getLength(),Ri.getLengthInBits(Y.getMode(),T)),Y.write(I)}let P=0;for(let F=0;F<N.length;F+=1)P+=N[F].dataCount;if(I.getLengthInBits()>P*8)throw"code length overflow. ("+I.getLengthInBits()+">"+P*8+")";for(I.getLengthInBits()+4<=P*8&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=P*8||(I.put(236,8),I.getLengthInBits()>=P*8));)I.put(17,8);return _(I,N)};d.addData=function(T,k){k=k||"Byte";let R=null;switch(k){case"Numeric":R=Q0(T);break;case"Alphanumeric":R=Z0(T);break;case"Byte":R=J0(T);break;case"Kanji":R=e1(T);break;default:throw"mode:"+k}h.push(R),c=null},d.isDark=function(T,k){if(T<0||a<=T||k<0||a<=k)throw T+","+k;return f[T][k]},d.getModuleCount=function(){return a},d.make=function(){if(p<1){let T=1;for(;T<40;T++){const k=am.getRSBlocks(T,y),R=om();for(let I=0;I<h.length;I++){const P=h[I];R.put(P.getMode(),4),R.put(P.getLength(),Ri.getLengthInBits(P.getMode(),T)),P.write(R)}let N=0;for(let I=0;I<k.length;I++)N+=k[I].dataCount;if(R.getLengthInBits()<=N*8)break}p=T}u(!1,w())},d.createTableTag=function(T,k){T=T||2,k=typeof k>"u"?T*4:k;let R="";R+='<table style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: "+k+"px;",R+='">',R+="<tbody>";for(let N=0;N<d.getModuleCount();N+=1){R+="<tr>";for(let I=0;I<d.getModuleCount();I+=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(N,I)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return R+="</tbody>",R+="</table>",R},d.createSvgTag=function(T,k,R,N){let I={};typeof arguments[0]=="object"&&(I=arguments[0],T=I.cellSize,k=I.margin,R=I.alt,N=I.title),T=T||2,k=typeof k>"u"?T*4:k,R=typeof R=="string"?{text:R}:R||{},R.text=R.text||null,R.id=R.text?R.id||"qrcode-description":null,N=typeof N=="string"?{text:N}:N||{},N.text=N.text||null,N.id=N.text?N.id||"qrcode-title":null;const P=d.getModuleCount()*T+k*2;let F,Y,W,G,$="",Q;for(Q="l"+T+",0 0,"+T+" -"+T+",0 0,-"+T+"z ",$+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',$+=I.scalable?"":' width="'+P+'px" height="'+P+'px"',$+=' viewBox="0 0 '+P+" "+P+'" ',$+=' preserveAspectRatio="xMinYMin meet"',$+=N.text||R.text?' role="img" aria-labelledby="'+M([N.id,R.id].join(" ").trim())+'"':"",$+=">",$+=N.text?'<title id="'+M(N.id)+'">'+M(N.text)+"</title>":"",$+=R.text?'<description id="'+M(R.id)+'">'+M(R.text)+"</description>":"",$+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',$+='<path d="',W=0;W<d.getModuleCount();W+=1)for(G=W*T+k,F=0;F<d.getModuleCount();F+=1)d.isDark(W,F)&&(Y=F*T+k,$+="M"+Y+","+G+Q);return $+='" stroke="transparent" fill="black"/>',$+="</svg>",$},d.createDataURL=function(T,k){T=T||2,k=typeof k>"u"?T*4:k;const R=d.getModuleCount()*T+k*2,N=k,I=R-k;return r1(R,R,function(P,F){if(N<=P&&P<I&&N<=F&&F<I){const Y=Math.floor((P-N)/T),W=Math.floor((F-N)/T);return d.isDark(W,Y)?0:1}else return 1})},d.createImgTag=function(T,k,R){T=T||2,k=typeof k>"u"?T*4:k;const N=d.getModuleCount()*T+k*2;let I="";return I+="<img",I+=' src="',I+=d.createDataURL(T,k),I+='"',I+=' width="',I+=N,I+='"',I+=' height="',I+=N,I+='"',R&&(I+=' alt="',I+=M(R),I+='"'),I+="/>",I};const M=function(T){let k="";for(let R=0;R<T.length;R+=1){const N=T.charAt(R);switch(N){case"<":k+="<";break;case">":k+=">";break;case"&":k+="&";break;case'"':k+=""";break;default:k+=N;break}}return k},D=function(T){T=typeof T>"u"?2:T;const R=d.getModuleCount()*1+T*2,N=T,I=R-T;let P,F,Y,W,G;const $={"██":"█","█ ":"▀"," █":"▄"," ":" "},Q={"██":"▀","█ ":"▀"," █":" "," ":" "};let H="";for(P=0;P<R;P+=2){for(Y=Math.floor((P-N)/1),W=Math.floor((P+1-N)/1),F=0;F<R;F+=1)G="█",N<=F&&F<I&&N<=P&&P<I&&d.isDark(Y,Math.floor((F-N)/1))&&(G=" "),N<=F&&F<I&&N<=P+1&&P+1<I&&d.isDark(W,Math.floor((F-N)/1))?G+=" ":G+="█",H+=T<1&&P+1>=I?Q[G]:$[G];H+=`
|
|
50
|
-
`}return R%2&&T>0?H.substring(0,H.length-R-1)+Array(R+1).join("▀"):H.substring(0,H.length-1)};return d.createASCII=function(T,k){if(T=T||1,T<2)return D(k);T-=1,k=typeof k>"u"?T*2:k;const R=d.getModuleCount()*T+k*2,N=k,I=R-k;let P,F,Y,W;const G=Array(T+1).join("██"),$=Array(T+1).join(" ");let Q="",H="";for(P=0;P<R;P+=1){for(Y=Math.floor((P-N)/T),H="",F=0;F<R;F+=1)W=1,N<=F&&F<I&&N<=P&&P<I&&d.isDark(Y,Math.floor((F-N)/T))&&(W=0),H+=W?G:$;for(Y=0;Y<T;Y+=1)Q+=H+`
|
|
51
|
-
`}return Q.substring(0,Q.length-1)},d.renderTo2dContext=function(T,k){k=k||2;const R=d.getModuleCount();for(let N=0;N<R;N++)for(let I=0;I<R;I++)T.fillStyle=d.isDark(N,I)?"black":"white",T.fillRect(I*k,N*k,k,k)},d};Qr.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};Qr.createStringToBytes=function(n,r){const s=(function(){const p=n1(n),y=function(){const c=p.read();if(c==-1)throw"eof";return c};let f=0;const a={};for(;;){const c=p.read();if(c==-1)break;const h=y(),d=y(),u=y(),b=String.fromCharCode(c<<8|h),w=d<<8|u;a[b]=w,f+=1}if(f!=r)throw f+" != "+r;return a})(),o=63;return function(p){const y=[];for(let f=0;f<p.length;f+=1){const a=p.charCodeAt(f);if(a<128)y.push(a);else{const c=s[p.charAt(f)];typeof c=="number"?(c&255)==c?y.push(c):(y.push(c>>>8),y.push(c&255)):y.push(o)}}return y}};const Ht={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Zs={L:1,M:0,Q:3,H:2},Di={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Ri=(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,p={},y=function(f){let a=0;for(;f!=0;)a+=1,f>>>=1;return a};return p.getBCHTypeInfo=function(f){let a=f<<10;for(;y(a)-y(r)>=0;)a^=r<<y(a)-y(r);return(f<<10|a)^o},p.getBCHTypeNumber=function(f){let a=f<<12;for(;y(a)-y(s)>=0;)a^=s<<y(a)-y(s);return f<<12|a},p.getPatternPosition=function(f){return n[f-1]},p.getMaskFunction=function(f){switch(f){case Di.PATTERN000:return function(a,c){return(a+c)%2==0};case Di.PATTERN001:return function(a,c){return a%2==0};case Di.PATTERN010:return function(a,c){return c%3==0};case Di.PATTERN011:return function(a,c){return(a+c)%3==0};case Di.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case Di.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case Di.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case Di.PATTERN111:return function(a,c){return(a*c%3+(a+c)%2)%2==0};default:throw"bad maskPattern:"+f}},p.getErrorCorrectPolynomial=function(f){let a=nl([1],0);for(let c=0;c<f;c+=1)a=a.multiply(nl([1,Li.gexp(c)],0));return a},p.getLengthInBits=function(f,a){if(1<=a&&a<10)switch(f){case Ht.MODE_NUMBER:return 10;case Ht.MODE_ALPHA_NUM:return 9;case Ht.MODE_8BIT_BYTE:return 8;case Ht.MODE_KANJI:return 8;default:throw"mode:"+f}else if(a<27)switch(f){case Ht.MODE_NUMBER:return 12;case Ht.MODE_ALPHA_NUM:return 11;case Ht.MODE_8BIT_BYTE:return 16;case Ht.MODE_KANJI:return 10;default:throw"mode:"+f}else if(a<41)switch(f){case Ht.MODE_NUMBER:return 14;case Ht.MODE_ALPHA_NUM:return 13;case Ht.MODE_8BIT_BYTE:return 16;case Ht.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+a},p.getLostPoint=function(f){const a=f.getModuleCount();let c=0;for(let u=0;u<a;u+=1)for(let b=0;b<a;b+=1){let w=0;const E=f.isDark(u,b);for(let x=-1;x<=1;x+=1)if(!(u+x<0||a<=u+x))for(let v=-1;v<=1;v+=1)b+v<0||a<=b+v||x==0&&v==0||E==f.isDark(u+x,b+v)&&(w+=1);w>5&&(c+=3+w-5)}for(let u=0;u<a-1;u+=1)for(let b=0;b<a-1;b+=1){let w=0;f.isDark(u,b)&&(w+=1),f.isDark(u+1,b)&&(w+=1),f.isDark(u,b+1)&&(w+=1),f.isDark(u+1,b+1)&&(w+=1),(w==0||w==4)&&(c+=3)}for(let u=0;u<a;u+=1)for(let b=0;b<a-6;b+=1)f.isDark(u,b)&&!f.isDark(u,b+1)&&f.isDark(u,b+2)&&f.isDark(u,b+3)&&f.isDark(u,b+4)&&!f.isDark(u,b+5)&&f.isDark(u,b+6)&&(c+=40);for(let u=0;u<a;u+=1)for(let b=0;b<a-6;b+=1)f.isDark(b,u)&&!f.isDark(b+1,u)&&f.isDark(b+2,u)&&f.isDark(b+3,u)&&f.isDark(b+4,u)&&!f.isDark(b+5,u)&&f.isDark(b+6,u)&&(c+=40);let h=0;for(let u=0;u<a;u+=1)for(let b=0;b<a;b+=1)f.isDark(b,u)&&(h+=1);const d=Math.abs(100*h/a/a-50)/5;return c+=d*10,c},p})(),Li=(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})(),nl=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let p=0;for(;p<n.length&&n[p]==0;)p+=1;const y=new Array(n.length-p+r);for(let f=0;f<n.length-p;f+=1)y[f]=n[f+p];return y})(),o={};return o.getAt=function(p){return s[p]},o.getLength=function(){return s.length},o.multiply=function(p){const y=new Array(o.getLength()+p.getLength()-1);for(let f=0;f<o.getLength();f+=1)for(let a=0;a<p.getLength();a+=1)y[f+a]^=Li.gexp(Li.glog(o.getAt(f))+Li.glog(p.getAt(a)));return nl(y,0)},o.mod=function(p){if(o.getLength()-p.getLength()<0)return o;const y=Li.glog(o.getAt(0))-Li.glog(p.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<p.getLength();a+=1)f[a]^=Li.gexp(Li.glog(p.getAt(a))+y);return nl(f,0).mod(p)},o},am=(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(p,y){const f={};return f.totalCount=p,f.dataCount=y,f},s={},o=function(p,y){switch(y){case Zs.L:return n[(p-1)*4+0];case Zs.M:return n[(p-1)*4+1];case Zs.Q:return n[(p-1)*4+2];case Zs.H:return n[(p-1)*4+3];default:return}};return s.getRSBlocks=function(p,y){const f=o(p,y);if(typeof f>"u")throw"bad rs block @ typeNumber:"+p+"/errorCorrectionLevel:"+y;const a=f.length/3,c=[];for(let h=0;h<a;h+=1){const d=f[h*3+0],u=f[h*3+1],b=f[h*3+2];for(let w=0;w<d;w+=1)c.push(r(u,b))}return c},s})(),om=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(o){const p=Math.floor(o/8);return(n[p]>>>7-o%8&1)==1},s.put=function(o,p){for(let y=0;y<p;y+=1)s.putBit((o>>>p-y-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(o){const p=Math.floor(r/8);n.length<=p&&n.push(0),o&&(n[p]|=128>>>r%8),r+=1},s},Q0=function(n){const r=Ht.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 c=0;for(;c+2<a.length;)f.put(p(a.substring(c,c+3)),10),c+=3;c<a.length&&(a.length-c==1?f.put(p(a.substring(c,c+1)),4):a.length-c==2&&f.put(p(a.substring(c,c+2)),7))};const p=function(f){let a=0;for(let c=0;c<f.length;c+=1)a=a*10+y(f.charAt(c));return a},y=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return o},Z0=function(n){const r=Ht.MODE_ALPHA_NUM,s=n,o={};o.getMode=function(){return r},o.getLength=function(y){return s.length},o.write=function(y){const f=s;let a=0;for(;a+1<f.length;)y.put(p(f.charAt(a))*45+p(f.charAt(a+1)),11),a+=2;a<f.length&&y.put(p(f.charAt(a)),6)};const p=function(y){if("0"<=y&&y<="9")return y.charCodeAt(0)-48;if("A"<=y&&y<="Z")return y.charCodeAt(0)-65+10;switch(y){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 :"+y}};return o},J0=function(n){const r=Ht.MODE_8BIT_BYTE,s=Qr.stringToBytes(n),o={};return o.getMode=function(){return r},o.getLength=function(p){return s.length},o.write=function(p){for(let y=0;y<s.length;y+=1)p.put(s[y],8)},o},e1=function(n){const r=Ht.MODE_KANJI,s=Qr.stringToBytes;(function(y,f){const a=s(y);if(a.length!=2||(a[0]<<8|a[1])!=f)throw"sjis not supported."})("友",38726);const o=s(n),p={};return p.getMode=function(){return r},p.getLength=function(y){return~~(o.length/2)},p.write=function(y){const f=o;let a=0;for(;a+1<f.length;){let c=(255&f[a])<<8|255&f[a+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(a+1)+"/"+c;c=(c>>>8&255)*192+(c&255),y.put(c,13),a+=2}if(a<f.length)throw"illegal char at "+(a+1)},p},ug=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,p){o=o||0,p=p||s.length;for(let y=0;y<p;y+=1)r.writeByte(s[y+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},t1=function(){let n=0,r=0,s=0,o="";const p={},y=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 p.writeByte=function(a){for(n=n<<8|a&255,r+=8,s+=1;r>=6;)y(n>>>r-6),r-=6},p.flush=function(){if(r>0&&(y(n<<6-r),n=0,r=0),s%3!=0){const a=3-s%3;for(let c=0;c<a;c+=1)o+="="}},p.toString=function(){return o},p},n1=function(n){const r=n;let s=0,o=0,p=0;const y={};y.read=function(){for(;p<8;){if(s>=r.length){if(p==0)return-1;throw"unexpected end of file./"+p}const c=r.charAt(s);if(s+=1,c=="=")return p=0,-1;if(c.match(/^\s$/))continue;o=o<<6|f(c.charCodeAt(0)),p+=6}const a=o>>>p-8&255;return p-=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 y},i1=function(n,r){const s=n,o=r,p=new Array(n*r),y={};y.setPixel=function(h,d,u){p[d*s+h]=u},y.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,u=a(d);h.writeByte(d);let b=0;for(;u.length-b>255;)h.writeByte(255),h.writeBytes(u,b,255),b+=255;h.writeByte(u.length-b),h.writeBytes(u,b,u.length-b),h.writeByte(0),h.writeString(";")};const f=function(h){const d=h;let u=0,b=0;const w={};return w.write=function(E,x){if(E>>>x)throw"length over";for(;u+x>=8;)d.writeByte(255&(E<<u|b)),x-=8-u,E>>>=8-u,b=0,u=0;b=E<<u|b,u=u+x},w.flush=function(){u>0&&d.writeByte(b)},w},a=function(h){const d=1<<h,u=(1<<h)+1;let b=h+1;const w=c();for(let g=0;g<d;g+=1)w.add(String.fromCharCode(g));w.add(String.fromCharCode(d)),w.add(String.fromCharCode(u));const E=ug(),x=f(E);x.write(d,b);let v=0,S=String.fromCharCode(p[v]);for(v+=1;v<p.length;){const g=String.fromCharCode(p[v]);v+=1,w.contains(S+g)?S=S+g:(x.write(w.indexOf(S),b),w.size()<4095&&(w.size()==1<<b&&(b+=1),w.add(S+g)),S=g)}return x.write(w.indexOf(S),b),x.write(u,b),x.flush(),E.toByteArray()},c=function(){const h={};let d=0;const u={};return u.add=function(b){if(u.contains(b))throw"dup key:"+b;h[b]=d,d+=1},u.size=function(){return d},u.indexOf=function(b){return h[b]},u.contains=function(b){return typeof h[b]<"u"},u};return y},r1=function(n,r,s){const o=i1(n,r);for(let a=0;a<r;a+=1)for(let c=0;c<n;c+=1)o.setPixel(c,a,s(c,a));const p=ug();o.write(p);const y=t1(),f=p.toByteArray();for(let a=0;a<f.length;a+=1)y.writeByte(f[a]);return y.flush(),"data:image/gif;base64,"+y};Qr.stringToBytes;const Kr=[{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}],hg={name:"codex-reviewer",label:"Codex Reviewer",commandAgent:"codex-reviewer",dispatchable:!1},fg={name:"codex-translator",label:"Codex Translator",commandAgent:"codex-translator",dispatchable:!1},dg=[hg,fg],zu=[...Kr,...dg],s1=Kr.map(n=>n.name),l1=dg.map(n=>n.name);zu.map(n=>n.name);zu.filter(n=>n.dispatchable).map(n=>n.name);function Hu(n){return l1.includes(n)}const a1="zh-CN",o1="final-only",pg=[{value:"zh-CN",label:"Chinese"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"}],c1=[{value:"final-only",label:"Final summary"},{value:"all",label:"All output"}];function u1(){const n={};for(const r of s1)n[r]={permissionMode:"default",model:"default",effort:"default"};return{version:1,roles:n,autoOrchestration:!0}}function h1({sidebar:n,children:r}){const[s,o]=he.useState(!1);return B.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[B.jsxs("aside",{className:"app-sidebar",children:[B.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>o(p=>!p)}),B.jsx("div",{className:"sidebar-content",children:n})]}),B.jsx("main",{className:"app-main",children:r})]})}function f1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const d1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,p1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m1={};function cm(n,r){return(m1.jsx?p1:d1).test(n)}const g1=/[ \t\n\f\r]/g;function _1(n){return typeof n=="object"?n.type==="text"?um(n.value):!1:um(n)}function um(n){return n.replace(g1,"")===""}class sl{constructor(r,s,o){this.normal=s,this.property=r,o&&(this.space=o)}}sl.prototype.normal={};sl.prototype.property={};sl.prototype.space=void 0;function mg(n,r){const s={},o={};for(const p of n)Object.assign(s,p.property),Object.assign(o,p.normal);return new sl(s,o,r)}function wu(n){return n.toLowerCase()}class tn{constructor(r,s){this.attribute=s,this.property=r}}tn.prototype.attribute="";tn.prototype.booleanish=!1;tn.prototype.boolean=!1;tn.prototype.commaOrSpaceSeparated=!1;tn.prototype.commaSeparated=!1;tn.prototype.defined=!1;tn.prototype.mustUseProperty=!1;tn.prototype.number=!1;tn.prototype.overloadedBoolean=!1;tn.prototype.property="";tn.prototype.spaceSeparated=!1;tn.prototype.space=void 0;let v1=0;const Ue=tr(),Et=tr(),xu=tr(),ye=tr(),ct=tr(),Wr=tr(),un=tr();function tr(){return 2**++v1}const Eu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Et,commaOrSpaceSeparated:un,commaSeparated:Wr,number:ye,overloadedBoolean:xu,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),iu=Object.keys(Eu);class Iu extends tn{constructor(r,s,o,p){let y=-1;if(super(r,s),hm(this,"space",p),typeof o=="number")for(;++y<iu.length;){const f=iu[y];hm(this,iu[y],(o&Eu[f])===Eu[f])}}}Iu.prototype.defined=!0;function hm(n,r,s){s&&(n[r]=s)}function Zr(n){const r={},s={};for(const[o,p]of Object.entries(n.properties)){const y=new Iu(o,n.transform(n.attributes||{},o),p,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(y.mustUseProperty=!0),r[o]=y,s[wu(o)]=o,s[wu(y.attribute)]=o}return new sl(r,s,n.space)}const gg=Zr({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:ct,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:ye,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:ct,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Et,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 _g(n,r){return r in n?n[r]:r}function vg(n,r){return _g(n,r.toLowerCase())}const y1=Zr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wr,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ct,autoFocus:Ue,autoPlay:Ue,blocking:ct,capture:null,charSet:null,checked:Ue,cite:null,className:ct,cols:ye,colSpan:null,content:null,contentEditable:Et,controls:Ue,controlsList:ct,coords:ye|Wr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:xu,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ct,height:ye,hidden:xu,high:ye,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ue,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:ye,pattern:null,ping:ct,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ct,required:Ue,reversed:Ue,rows:ye,rowSpan:ye,sandbox:ct,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Et,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:Ue,useMap:null,value:Et,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,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:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Et,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:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:vg}),S1=Zr({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:ct,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:Ue,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:Wr,g2:Wr,glyphName:Wr,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:ct,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:_g}),yg=Zr({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()}}),Sg=Zr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vg}),bg=Zr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),b1={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"},C1=/[A-Z]/g,fm=/-[a-z]/g,w1=/^data[-\w.:]+$/i;function x1(n,r){const s=wu(r);let o=r,p=tn;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&w1.test(r)){if(r.charAt(4)==="-"){const y=r.slice(5).replace(fm,k1);o="data"+y.charAt(0).toUpperCase()+y.slice(1)}else{const y=r.slice(4);if(!fm.test(y)){let f=y.replace(C1,E1);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}p=Iu}return new p(o,r)}function E1(n){return"-"+n.toLowerCase()}function k1(n){return n.charAt(1).toUpperCase()}const A1=mg([gg,y1,yg,Sg,bg],"html"),Uu=mg([gg,S1,yg,Sg,bg],"svg");function T1(n){return n.join(" ").trim()}var Vr={},ru,dm;function D1(){if(dm)return ru;dm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,p=/^:\s*/,y=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
52
|
-
`,h="/",d="*",u="",b="comment",w="declaration";function E(v,S){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];S=S||{};var g=1,_=1;function A(Y){var W=Y.match(r);W&&(g+=W.length);var G=Y.lastIndexOf(c);_=~G?Y.length-G:_+Y.length}function M(){var Y={line:g,column:_};return function(W){return W.position=new D(Y),R(),W}}function D(Y){this.start=Y,this.end={line:g,column:_},this.source=S.source}D.prototype.content=v;function T(Y){var W=new Error(S.source+":"+g+":"+_+": "+Y);if(W.reason=Y,W.filename=S.source,W.line=g,W.column=_,W.source=v,!S.silent)throw W}function k(Y){var W=Y.exec(v);if(W){var G=W[0];return A(G),v=v.slice(G.length),W}}function R(){k(s)}function N(Y){var W;for(Y=Y||[];W=I();)W!==!1&&Y.push(W);return Y}function I(){var Y=M();if(!(h!=v.charAt(0)||d!=v.charAt(1))){for(var W=2;u!=v.charAt(W)&&(d!=v.charAt(W)||h!=v.charAt(W+1));)++W;if(W+=2,u===v.charAt(W-1))return T("End of comment missing");var G=v.slice(2,W-2);return _+=2,A(G),v=v.slice(W),_+=2,Y({type:b,comment:G})}}function P(){var Y=M(),W=k(o);if(W){if(I(),!k(p))return T("property missing ':'");var G=k(y),$=Y({type:w,property:x(W[0].replace(n,u)),value:G?x(G[0].replace(n,u)):u});return k(f),$}}function F(){var Y=[];N(Y);for(var W;W=P();)W!==!1&&(Y.push(W),N(Y));return Y}return R(),F()}function x(v){return v?v.replace(a,u):u}return ru=E,ru}var pm;function R1(){if(pm)return Vr;pm=1;var n=Vr&&Vr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.default=s;const r=n(D1());function s(o,p){let y=null;if(!o||typeof o!="string")return y;const f=(0,r.default)(o),a=typeof p=="function";return f.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:d}=c;a?p(h,d,c):d&&(y=y||{},y[h]=d)}),y}return Vr}var Ks={},mm;function M1(){if(mm)return Ks;mm=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,p=/^-(ms)-/,y=function(h){return!h||s.test(h)||n.test(h)},f=function(h,d){return d.toUpperCase()},a=function(h,d){return"".concat(d,"-")},c=function(h,d){return d===void 0&&(d={}),y(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(p,a):h=h.replace(o,a),h.replace(r,f))};return Ks.camelCase=c,Ks}var Ws,gm;function L1(){if(gm)return Ws;gm=1;var n=Ws&&Ws.__importDefault||function(p){return p&&p.__esModule?p:{default:p}},r=n(R1()),s=M1();function o(p,y){var f={};return!p||typeof p!="string"||(0,r.default)(p,function(a,c){a&&c&&(f[(0,s.camelCase)(a,y)]=c)}),f}return o.default=o,Ws=o,Ws}var O1=L1();const B1=cg(O1),Cg=wg("end"),Pu=wg("start");function wg(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 N1(n){const r=Pu(n),s=Cg(n);if(r&&s)return{start:r,end:s}}function Js(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?_m(n.position):"start"in n||"end"in n?_m(n):"line"in n||"column"in n?ku(n):""}function ku(n){return vm(n&&n.line)+":"+vm(n&&n.column)}function _m(n){return ku(n&&n.start)+"-"+ku(n&&n.end)}function vm(n){return n&&typeof n=="number"?n:1}class Ut extends Error{constructor(r,s,o){super(),typeof s=="string"&&(o=s,s=void 0);let p="",y={},f=!1;if(s&&("line"in s&&"column"in s?y={place:s}:"start"in s&&"end"in s?y={place:s}:"type"in s?y={ancestors:[s],place:s.position}:y={...s}),typeof r=="string"?p=r:!y.cause&&r&&(f=!0,p=r.message,y.cause=r),!y.ruleId&&!y.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?y.ruleId=o:(y.source=o.slice(0,c),y.ruleId=o.slice(c+1))}if(!y.place&&y.ancestors&&y.ancestors){const c=y.ancestors[y.ancestors.length-1];c&&(y.place=c.position)}const a=y.place&&"start"in y.place?y.place.start:y.place;this.ancestors=y.ancestors||void 0,this.cause=y.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=p,this.line=a?a.line:void 0,this.name=Js(y.place)||"1:1",this.place=y.place||void 0,this.reason=this.message,this.ruleId=y.ruleId||void 0,this.source=y.source||void 0,this.stack=f&&y.cause&&typeof y.cause.stack=="string"?y.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ut.prototype.file="";Ut.prototype.name="";Ut.prototype.reason="";Ut.prototype.message="";Ut.prototype.stack="";Ut.prototype.column=void 0;Ut.prototype.line=void 0;Ut.prototype.ancestors=void 0;Ut.prototype.cause=void 0;Ut.prototype.fatal=void 0;Ut.prototype.place=void 0;Ut.prototype.ruleId=void 0;Ut.prototype.source=void 0;const Fu={}.hasOwnProperty,j1=new Map,z1=/[A-Z]/g,H1=new Set(["table","tbody","thead","tfoot","tr"]),I1=new Set(["td","th"]),xg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function U1(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=K1(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=Y1(s,r.jsx,r.jsxs)}const p={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"?Uu:A1,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},y=Eg(p,n,void 0);return y&&typeof y!="string"?y:p.create(n,p.Fragment,{children:y||void 0},void 0)}function Eg(n,r,s){if(r.type==="element")return P1(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return F1(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return V1(n,r,s);if(r.type==="mdxjsEsm")return q1(n,r);if(r.type==="root")return G1(n,r,s);if(r.type==="text")return $1(n,r)}function P1(n,r,s){const o=n.schema;let p=o;r.tagName.toLowerCase()==="svg"&&o.space==="html"&&(p=Uu,n.schema=p),n.ancestors.push(r);const y=Ag(n,r.tagName,!1),f=W1(n,r);let a=Vu(n,r);return H1.has(r.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!_1(c):!0})),kg(n,f,y,r),qu(f,a),n.ancestors.pop(),n.schema=o,n.create(r,y,f,s)}function F1(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)}il(n,r.position)}function q1(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);il(n,r.position)}function V1(n,r,s){const o=n.schema;let p=o;r.name==="svg"&&o.space==="html"&&(p=Uu,n.schema=p),n.ancestors.push(r);const y=r.name===null?n.Fragment:Ag(n,r.name,!0),f=X1(n,r),a=Vu(n,r);return kg(n,f,y,r),qu(f,a),n.ancestors.pop(),n.schema=o,n.create(r,y,f,s)}function G1(n,r,s){const o={};return qu(o,Vu(n,r)),n.create(r,n.Fragment,o,s)}function $1(n,r){return r.value}function kg(n,r,s,o){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=o)}function qu(n,r){if(r.length>0){const s=r.length>1?r:r[0];s&&(n.children=s)}}function Y1(n,r,s){return o;function o(p,y,f,a){const h=Array.isArray(f.children)?s:r;return a?h(y,f,a):h(y,f)}}function K1(n,r){return s;function s(o,p,y,f){const a=Array.isArray(y.children),c=Pu(o);return r(p,y,f,a,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function W1(n,r){const s={};let o,p;for(p in r.properties)if(p!=="children"&&Fu.call(r.properties,p)){const y=Q1(n,p,r.properties[p]);if(y){const[f,a]=y;n.tableCellAlignToStyle&&f==="align"&&typeof a=="string"&&I1.has(r.tagName)?o=a:s[f]=a}}if(o){const y=s.style||(s.style={});y[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return s}function X1(n,r){const s={};for(const o of r.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const y=o.data.estree.body[0];y.type;const f=y.expression;f.type;const a=f.properties[0];a.type,Object.assign(s,n.evaluater.evaluateExpression(a.argument))}else il(n,r.position);else{const p=o.name;let y;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,y=n.evaluater.evaluateExpression(a.expression)}else il(n,r.position);else y=o.value===null?!0:o.value;s[p]=y}return s}function Vu(n,r){const s=[];let o=-1;const p=n.passKeys?new Map:j1;for(;++o<r.children.length;){const y=r.children[o];let f;if(n.passKeys){const c=y.type==="element"?y.tagName:y.type==="mdxJsxFlowElement"||y.type==="mdxJsxTextElement"?y.name:void 0;if(c){const h=p.get(c)||0;f=c+"-"+h,p.set(c,h+1)}}const a=Eg(n,y,f);a!==void 0&&s.push(a)}return s}function Q1(n,r,s){const o=x1(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=o.commaSeparated?f1(s):T1(s)),o.property==="style"){let p=typeof s=="object"?s:Z1(n,String(s));return n.stylePropertyNameCase==="css"&&(p=J1(p)),["style",p]}return[n.elementAttributeNameCase==="react"&&o.space?b1[o.property]||o.property:o.attribute,s]}}function Z1(n,r){try{return B1(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const o=s,p=new Ut("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw p.file=n.filePath||void 0,p.url=xg+"#cannot-parse-style-attribute",p}}function Ag(n,r,s){let o;if(!s)o={type:"Literal",value:r};else if(r.includes(".")){const p=r.split(".");let y=-1,f;for(;++y<p.length;){const a=cm(p[y])?{type:"Identifier",name:p[y]}:{type:"Literal",value:p[y]};f=f?{type:"MemberExpression",object:f,property:a,computed:!!(y&&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 p=o.value;return Fu.call(n.components,p)?n.components[p]:p}if(n.evaluater)return n.evaluater.evaluateExpression(o);il(n)}function il(n,r){const s=new Ut("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=xg+"#cannot-handle-mdx-estrees-without-createevaluater",s}function J1(n){const r={};let s;for(s in n)Fu.call(n,s)&&(r[ey(s)]=n[s]);return r}function ey(n){let r=n.replace(z1,ty);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function ty(n){return"-"+n.toLowerCase()}const su={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"]},ny={};function Gu(n,r){const s=ny,o=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,p=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Tg(n,o,p)}function Tg(n,r,s){if(iy(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 ym(n.children,r,s)}return Array.isArray(n)?ym(n,r,s):""}function ym(n,r,s){const o=[];let p=-1;for(;++p<n.length;)o[p]=Tg(n[p],r,s);return o.join("")}function iy(n){return!!(n&&typeof n=="object")}const Sm=document.createElement("i");function $u(n){const r="&"+n+";";Sm.innerHTML=r;const s=Sm.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function hn(n,r,s,o){const p=n.length;let y=0,f;if(r<0?r=-r>p?0:p+r:r=r>p?p: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);y<o.length;)f=o.slice(y,y+1e4),f.unshift(r,0),n.splice(...f),y+=1e4,r+=1e4}function Cn(n,r){return n.length>0?(hn(n,n.length,0,r),n):r}const bm={}.hasOwnProperty;function Dg(n){const r={};let s=-1;for(;++s<n.length;)ry(r,n[s]);return r}function ry(n,r){let s;for(s in r){const p=(bm.call(n,s)?n[s]:void 0)||(n[s]={}),y=r[s];let f;if(y)for(f in y){bm.call(p,f)||(p[f]=[]);const a=y[f];sy(p[f],Array.isArray(a)?a:a?[a]:[])}}}function sy(n,r){let s=-1;const o=[];for(;++s<r.length;)(r[s].add==="after"?n:o).push(r[s]);hn(n,0,0,o)}function Rg(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 qt=Bi(/[A-Za-z]/),It=Bi(/[\dA-Za-z]/),ly=Bi(/[#-'*+\--9=?A-Z^-~]/);function Ra(n){return n!==null&&(n<32||n===127)}const Au=Bi(/\d/),ay=Bi(/[\dA-Fa-f]/),oy=Bi(/[!-/:-@[-`{-~]/);function Ne(n){return n!==null&&n<-2}function ot(n){return n!==null&&(n<0||n===32)}function Ve(n){return n===-2||n===-1||n===32}const ja=Bi(new RegExp("\\p{P}|\\p{S}","u")),er=Bi(/\s/);function Bi(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function Jr(n){const r=[];let s=-1,o=0,p=0;for(;++s<n.length;){const y=n.charCodeAt(s);let f="";if(y===37&&It(n.charCodeAt(s+1))&&It(n.charCodeAt(s+2)))p=2;else if(y<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(y))||(f=String.fromCharCode(y));else if(y>55295&&y<57344){const a=n.charCodeAt(s+1);y<56320&&a>56319&&a<57344?(f=String.fromCharCode(y,a),p=1):f="�"}else f=String.fromCharCode(y);f&&(r.push(n.slice(o,s),encodeURIComponent(f)),o=s+p+1,f=""),p&&(s+=p,p=0)}return r.join("")+n.slice(o)}function Ke(n,r,s,o){const p=o?o-1:Number.POSITIVE_INFINITY;let y=0;return f;function f(c){return Ve(c)?(n.enter(s),a(c)):r(c)}function a(c){return Ve(c)&&y++<p?(n.consume(c),a):(n.exit(s),r(c))}}const cy={tokenize:uy};function uy(n){const r=n.attempt(this.parser.constructs.contentInitial,o,p);let s;return r;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Ke(n,r,"linePrefix")}function p(a){return n.enter("paragraph"),y(a)}function y(a){const c=n.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=c),s=c,f(a)}function f(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Ne(a)?(n.consume(a),n.exit("chunkText"),y):(n.consume(a),f)}}const hy={tokenize:fy},Cm={tokenize:dy};function fy(n){const r=this,s=[];let o=0,p,y,f;return a;function a(_){if(o<s.length){const A=s[o];return r.containerState=A[1],n.attempt(A[0].continuation,c,h)(_)}return h(_)}function c(_){if(o++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,p&&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}S(o);let T=A;for(;T<r.events.length;)r.events[T][1].end={...D},T++;return hn(r.events,M+1,0,r.events.slice(A)),r.events.length=T,h(_)}return a(_)}function h(_){if(o===s.length){if(!p)return b(_);if(p.currentConstruct&&p.currentConstruct.concrete)return E(_);r.interrupt=!!(p.currentConstruct&&!p._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Cm,d,u)(_)}function d(_){return p&&g(),S(o),b(_)}function u(_){return r.parser.lazy[r.now().line]=o!==s.length,f=r.now().offset,E(_)}function b(_){return r.containerState={},n.attempt(Cm,w,E)(_)}function w(_){return o++,s.push([r.currentConstruct,r.containerState]),b(_)}function E(_){if(_===null){p&&g(),S(0),n.consume(_);return}return p=p||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:p,contentType:"flow",previous:y}),x(_)}function x(_){if(_===null){v(n.exit("chunkFlow"),!0),S(0),n.consume(_);return}return Ne(_)?(n.consume(_),v(n.exit("chunkFlow")),o=0,r.interrupt=void 0,a):(n.consume(_),x)}function v(_,A){const M=r.sliceStream(_);if(A&&M.push(null),_.previous=y,y&&(y.next=_),y=_,p.defineSkip(_.start),p.write(M),r.parser.lazy[_.start.line]){let D=p.events.length;for(;D--;)if(p.events[D][1].start.offset<f&&(!p.events[D][1].end||p.events[D][1].end.offset>f))return;const T=r.events.length;let k=T,R,N;for(;k--;)if(r.events[k][0]==="exit"&&r.events[k][1].type==="chunkFlow"){if(R){N=r.events[k][1].end;break}R=!0}for(S(o),D=T;D<r.events.length;)r.events[D][1].end={...N},D++;hn(r.events,k+1,0,r.events.slice(T)),r.events.length=D}}function S(_){let A=s.length;for(;A-- >_;){const M=s[A];r.containerState=M[1],M[0].exit.call(r,n)}s.length=_}function g(){p.write([null]),y=void 0,p=void 0,r.containerState._closeFlow=void 0}}function dy(n,r,s){return Ke(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Xr(n){if(n===null||ot(n)||er(n))return 1;if(ja(n))return 2}function za(n,r,s){const o=[];let p=-1;for(;++p<n.length;){const y=n[p].resolveAll;y&&!o.includes(y)&&(r=y(r,s),o.push(y))}return r}const Tu={name:"attention",resolveAll:py,tokenize:my};function py(n,r){let s=-1,o,p,y,f,a,c,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;c=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 u={...n[o][1].end},b={...n[s][1].start};wm(u,-c),wm(b,c),f={type:c>1?"strongSequence":"emphasisSequence",start:u,end:{...n[o][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...n[s][1].start},end:b},y={type:c>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[s][1].start}},p={type:c>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=Cn(h,[["enter",n[o][1],r],["exit",n[o][1],r]])),h=Cn(h,[["enter",p,r],["enter",f,r],["exit",f,r],["enter",y,r]]),h=Cn(h,za(r.parser.constructs.insideSpan.null,n.slice(o+1,s),r)),h=Cn(h,[["exit",y,r],["enter",a,r],["exit",a,r],["exit",p,r]]),n[s][1].end.offset-n[s][1].start.offset?(d=2,h=Cn(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):d=0,hn(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 my(n,r){const s=this.parser.constructs.attentionMarkers.null,o=this.previous,p=Xr(o);let y;return f;function f(c){return y=c,n.enter("attentionSequence"),a(c)}function a(c){if(c===y)return n.consume(c),a;const h=n.exit("attentionSequence"),d=Xr(c),u=!d||d===2&&p||s.includes(c),b=!p||p===2&&d||s.includes(o);return h._open=!!(y===42?u:u&&(p||!b)),h._close=!!(y===42?b:b&&(d||!u)),r(c)}}function wm(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const gy={name:"autolink",tokenize:_y};function _y(n,r,s){let o=0;return p;function p(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),y}function y(w){return qt(w)?(n.consume(w),f):w===64?s(w):h(w)}function f(w){return w===43||w===45||w===46||It(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(n.consume(w),o=0,c):(w===43||w===45||w===46||It(w))&&o++<32?(n.consume(w),a):(o=0,h(w))}function c(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||Ra(w)?s(w):(n.consume(w),c)}function h(w){return w===64?(n.consume(w),d):ly(w)?(n.consume(w),h):s(w)}function d(w){return It(w)?u(w):s(w)}function u(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):b(w)}function b(w){if((w===45||It(w))&&o++<63){const E=w===45?b:u;return n.consume(w),E}return s(w)}}const ll={partial:!0,tokenize:vy};function vy(n,r,s){return o;function o(y){return Ve(y)?Ke(n,p,"linePrefix")(y):p(y)}function p(y){return y===null||Ne(y)?r(y):s(y)}}const Mg={continuation:{tokenize:Sy},exit:by,name:"blockQuote",tokenize:yy};function yy(n,r,s){const o=this;return p;function p(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"),y}return s(f)}function y(f){return Ve(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function Sy(n,r,s){const o=this;return p;function p(f){return Ve(f)?Ke(n,y,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):y(f)}function y(f){return n.attempt(Mg,r,s)(f)}}function by(n){n.exit("blockQuote")}const Lg={name:"characterEscape",tokenize:Cy};function Cy(n,r,s){return o;function o(y){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(y),n.exit("escapeMarker"),p}function p(y){return oy(y)?(n.enter("characterEscapeValue"),n.consume(y),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(y)}}const Og={name:"characterReference",tokenize:wy};function wy(n,r,s){const o=this;let p=0,y,f;return a;function a(u){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),c}function c(u){return u===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(u),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),y=31,f=It,d(u))}function h(u){return u===88||u===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(u),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),y=6,f=ay,d):(n.enter("characterReferenceValue"),y=7,f=Au,d(u))}function d(u){if(u===59&&p){const b=n.exit("characterReferenceValue");return f===It&&!$u(o.sliceSerialize(b))?s(u):(n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(u)&&p++<y?(n.consume(u),d):s(u)}}const xm={partial:!0,tokenize:Ey},Em={concrete:!0,name:"codeFenced",tokenize:xy};function xy(n,r,s){const o=this,p={partial:!0,tokenize:M};let y=0,f=0,a;return c;function c(D){return h(D)}function h(D){const T=o.events[o.events.length-1];return y=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)?Ke(n,u,"whitespace")(D):u(D))}function u(D){return D===null||Ne(D)?(n.exit("codeFencedFence"),o.interrupt?r(D):n.check(xm,x,A)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Ne(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(D)):Ve(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ke(n,w,"whitespace")(D)):D===96&&D===a?s(D):(n.consume(D),b)}function w(D){return D===null||Ne(D)?u(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||Ne(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),u(D)):D===96&&D===a?s(D):(n.consume(D),E)}function x(D){return n.attempt(p,A,v)(D)}function v(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),S}function S(D){return y>0&&Ve(D)?Ke(n,g,"linePrefix",y+1)(D):g(D)}function g(D){return D===null||Ne(D)?n.check(xm,x,A)(D):(n.enter("codeFlowValue"),_(D))}function _(D){return D===null||Ne(D)?(n.exit("codeFlowValue"),g(D)):(n.consume(D),_)}function A(D){return n.exit("codeFenced"),r(D)}function M(D,T,k){let R=0;return N;function N(W){return D.enter("lineEnding"),D.consume(W),D.exit("lineEnding"),I}function I(W){return D.enter("codeFencedFence"),Ve(W)?Ke(D,P,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):P(W)}function P(W){return W===a?(D.enter("codeFencedFenceSequence"),F(W)):k(W)}function F(W){return W===a?(R++,D.consume(W),F):R>=f?(D.exit("codeFencedFenceSequence"),Ve(W)?Ke(D,Y,"whitespace")(W):Y(W)):k(W)}function Y(W){return W===null||Ne(W)?(D.exit("codeFencedFence"),T(W)):k(W)}}}function Ey(n,r,s){const o=this;return p;function p(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),y)}function y(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}const lu={name:"codeIndented",tokenize:Ay},ky={partial:!0,tokenize:Ty};function Ay(n,r,s){const o=this;return p;function p(h){return n.enter("codeIndented"),Ke(n,y,"linePrefix",5)(h)}function y(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?c(h):Ne(h)?n.attempt(ky,f,c)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Ne(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),a)}function c(h){return n.exit("codeIndented"),r(h)}}function Ty(n,r,s){const o=this;return p;function p(f){return o.parser.lazy[o.now().line]?s(f):Ne(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),p):Ke(n,y,"linePrefix",5)(f)}function y(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):Ne(f)?p(f):s(f)}}const Dy={name:"codeText",previous:My,resolve:Ry,tokenize:Ly};function Ry(n){let r=n.length-4,s=3,o,p;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;)p===void 0?o!==r&&n[o][1].type!=="lineEnding"&&(p=o):(o===r||n[o][1].type==="lineEnding")&&(n[p][1].type="codeTextData",o!==p+2&&(n[p][1].end=n[o-1][1].end,n.splice(p+2,o-p-2),r-=o-p-2,o=p+2),p=void 0);return n}function My(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ly(n,r,s){let o=0,p,y;return f;function f(u){return n.enter("codeText"),n.enter("codeTextSequence"),a(u)}function a(u){return u===96?(n.consume(u),o++,a):(n.exit("codeTextSequence"),c(u))}function c(u){return u===null?s(u):u===32?(n.enter("space"),n.consume(u),n.exit("space"),c):u===96?(y=n.enter("codeTextSequence"),p=0,d(u)):Ne(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(u))}function h(u){return u===null||u===32||u===96||Ne(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function d(u){return u===96?(n.consume(u),p++,d):p===o?(n.exit("codeTextSequence"),n.exit("codeText"),r(u)):(y.type="codeTextData",h(u))}}class Oy{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 p=s||0;this.setCursor(Math.trunc(r));const y=this.right.splice(this.right.length-p,Number.POSITIVE_INFINITY);return o&&Xs(this.left,o),y.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),Xs(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Xs(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);Xs(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Xs(this.left,s.reverse())}}}function Xs(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 Bg(n){const r={};let s=-1,o,p,y,f,a,c,h;const d=new Oy(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"&&(c=o[1]._tokenizer.events,y=0,y<c.length&&c[y][1].type==="lineEndingBlank"&&(y+=2),y<c.length&&c[y][1].type==="content"))for(;++y<c.length&&c[y][1].type!=="content";)c[y][1].type==="chunkText"&&(c[y][1]._isInFirstContentOfListItem=!0,y++);if(o[0]==="enter")o[1].contentType&&(Object.assign(r,By(d,s)),s=r[s],h=!0);else if(o[1]._container){for(y=s,p=void 0;y--;)if(f=d.get(y),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(p&&(d.get(p)[1].type="lineEndingBlank"),f[1].type="lineEnding",p=y);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;p&&(o[1].end={...d.get(p)[1].start},a=d.slice(p,s),a.unshift(o),d.splice(p,s-p+1,a))}}return hn(n,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function By(n,r){const s=n.get(r)[1],o=n.get(r)[2];let p=r-1;const y=[];let f=s._tokenizer;f||(f=o.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const a=f.events,c=[],h={};let d,u,b=-1,w=s,E=0,x=0;const v=[x];for(;w;){for(;n.get(++p)[1]!==w;);y.push(p),w._tokenizer||(d=o.sliceStream(w),w.next||d.push(null),u&&f.defineSkip(w.start),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(d),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),u=w,w=w.next}for(w=s;++b<a.length;)a[b][0]==="exit"&&a[b-1][0]==="enter"&&a[b][1].type===a[b-1][1].type&&a[b][1].start.line!==a[b][1].end.line&&(x=b+1,v.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):v.pop(),b=v.length;b--;){const S=a.slice(v[b],v[b+1]),g=y.pop();c.push([g,g+S.length-1]),n.splice(g,2,S)}for(c.reverse(),b=-1;++b<c.length;)h[E+c[b][0]]=E+c[b][1],E+=c[b][1]-c[b][0]-1;return h}const Ny={resolve:zy,tokenize:Hy},jy={partial:!0,tokenize:Iy};function zy(n){return Bg(n),n}function Hy(n,r){let s;return o;function o(a){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),p(a)}function p(a){return a===null?y(a):Ne(a)?n.check(jy,f,y)(a):(n.consume(a),p)}function y(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,p}}function Iy(n,r,s){const o=this;return p;function p(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Ke(n,y,"linePrefix")}function y(f){if(f===null||Ne(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 Ng(n,r,s,o,p,y,f,a,c){const h=c||Number.POSITIVE_INFINITY;let d=0;return u;function u(S){return S===60?(n.enter(o),n.enter(p),n.enter(y),n.consume(S),n.exit(y),b):S===null||S===32||S===41||Ra(S)?s(S):(n.enter(o),n.enter(f),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(S))}function b(S){return S===62?(n.enter(y),n.consume(S),n.exit(y),n.exit(p),n.exit(o),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(S))}function w(S){return S===62?(n.exit("chunkString"),n.exit(a),b(S)):S===null||S===60||Ne(S)?s(S):(n.consume(S),S===92?E:w)}function E(S){return S===60||S===62||S===92?(n.consume(S),w):w(S)}function x(S){return!d&&(S===null||S===41||ot(S))?(n.exit("chunkString"),n.exit(a),n.exit(f),n.exit(o),r(S)):d<h&&S===40?(n.consume(S),d++,x):S===41?(n.consume(S),d--,x):S===null||S===32||S===40||Ra(S)?s(S):(n.consume(S),S===92?v:x)}function v(S){return S===40||S===41||S===92?(n.consume(S),x):x(S)}}function jg(n,r,s,o,p,y){const f=this;let a=0,c;return h;function h(w){return n.enter(o),n.enter(p),n.consume(w),n.exit(p),n.enter(y),d}function d(w){return a>999||w===null||w===91||w===93&&!c||w===94&&!a&&"_hiddenFootnoteSupport"in f.parser.constructs?s(w):w===93?(n.exit(y),n.enter(p),n.consume(w),n.exit(p),n.exit(o),r):Ne(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),d):(n.enter("chunkString",{contentType:"string"}),u(w))}function u(w){return w===null||w===91||w===93||Ne(w)||a++>999?(n.exit("chunkString"),d(w)):(n.consume(w),c||(c=!Ve(w)),w===92?b:u)}function b(w){return w===91||w===92||w===93?(n.consume(w),a++,u):u(w)}}function zg(n,r,s,o,p,y){let f;return a;function a(b){return b===34||b===39||b===40?(n.enter(o),n.enter(p),n.consume(b),n.exit(p),f=b===40?41:b,c):s(b)}function c(b){return b===f?(n.enter(p),n.consume(b),n.exit(p),n.exit(o),r):(n.enter(y),h(b))}function h(b){return b===f?(n.exit(y),c(f)):b===null?s(b):Ne(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),Ke(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===f||b===null||Ne(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?u:d)}function u(b){return b===f||b===92?(n.consume(b),d):d(b)}}function el(n,r){let s;return o;function o(p){return Ne(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),s=!0,o):Ve(p)?Ke(n,o,s?"linePrefix":"lineSuffix")(p):r(p)}}const Uy={name:"definition",tokenize:Fy},Py={partial:!0,tokenize:qy};function Fy(n,r,s){const o=this;let p;return y;function y(w){return n.enter("definition"),f(w)}function f(w){return jg.call(o,n,a,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return p=An(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),c):s(w)}function c(w){return ot(w)?el(n,h)(w):h(w)}function h(w){return Ng(n,d,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function d(w){return n.attempt(Py,u,u)(w)}function u(w){return Ve(w)?Ke(n,b,"whitespace")(w):b(w)}function b(w){return w===null||Ne(w)?(n.exit("definition"),o.parser.defined.push(p),r(w)):s(w)}}function qy(n,r,s){return o;function o(a){return ot(a)?el(n,p)(a):s(a)}function p(a){return zg(n,y,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function y(a){return Ve(a)?Ke(n,f,"whitespace")(a):f(a)}function f(a){return a===null||Ne(a)?r(a):s(a)}}const Vy={name:"hardBreakEscape",tokenize:Gy};function Gy(n,r,s){return o;function o(y){return n.enter("hardBreakEscape"),n.consume(y),p}function p(y){return Ne(y)?(n.exit("hardBreakEscape"),r(y)):s(y)}}const $y={name:"headingAtx",resolve:Yy,tokenize:Ky};function Yy(n,r){let s=n.length-2,o=3,p,y;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&&(p={type:"atxHeadingText",start:n[o][1].start,end:n[s][1].end},y={type:"chunkText",start:n[o][1].start,end:n[s][1].end,contentType:"text"},hn(n,o,s-o+1,[["enter",p,r],["enter",y,r],["exit",y,r],["exit",p,r]])),n}function Ky(n,r,s){let o=0;return p;function p(d){return n.enter("atxHeading"),y(d)}function y(d){return n.enter("atxHeadingSequence"),f(d)}function f(d){return d===35&&o++<6?(n.consume(d),f):d===null||ot(d)?(n.exit("atxHeadingSequence"),a(d)):s(d)}function a(d){return d===35?(n.enter("atxHeadingSequence"),c(d)):d===null||Ne(d)?(n.exit("atxHeading"),r(d)):Ve(d)?Ke(n,a,"whitespace")(d):(n.enter("atxHeadingText"),h(d))}function c(d){return d===35?(n.consume(d),c):(n.exit("atxHeadingSequence"),a(d))}function h(d){return d===null||d===35||ot(d)?(n.exit("atxHeadingText"),a(d)):(n.consume(d),h)}}const Wy=["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"],km=["pre","script","style","textarea"],Xy={concrete:!0,name:"htmlFlow",resolveTo:Jy,tokenize:eS},Qy={partial:!0,tokenize:nS},Zy={partial:!0,tokenize:tS};function Jy(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 eS(n,r,s){const o=this;let p,y,f,a,c;return h;function h(j){return d(j)}function d(j){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(j),u}function u(j){return j===33?(n.consume(j),b):j===47?(n.consume(j),y=!0,x):j===63?(n.consume(j),p=3,o.interrupt?r:O):qt(j)?(n.consume(j),f=String.fromCharCode(j),v):s(j)}function b(j){return j===45?(n.consume(j),p=2,w):j===91?(n.consume(j),p=5,a=0,E):qt(j)?(n.consume(j),p=4,o.interrupt?r:O):s(j)}function w(j){return j===45?(n.consume(j),o.interrupt?r:O):s(j)}function E(j){const ee="CDATA[";return j===ee.charCodeAt(a++)?(n.consume(j),a===ee.length?o.interrupt?r:P:E):s(j)}function x(j){return qt(j)?(n.consume(j),f=String.fromCharCode(j),v):s(j)}function v(j){if(j===null||j===47||j===62||ot(j)){const ee=j===47,ae=f.toLowerCase();return!ee&&!y&&km.includes(ae)?(p=1,o.interrupt?r(j):P(j)):Wy.includes(f.toLowerCase())?(p=6,ee?(n.consume(j),S):o.interrupt?r(j):P(j)):(p=7,o.interrupt&&!o.parser.lazy[o.now().line]?s(j):y?g(j):_(j))}return j===45||It(j)?(n.consume(j),f+=String.fromCharCode(j),v):s(j)}function S(j){return j===62?(n.consume(j),o.interrupt?r:P):s(j)}function g(j){return Ve(j)?(n.consume(j),g):N(j)}function _(j){return j===47?(n.consume(j),N):j===58||j===95||qt(j)?(n.consume(j),A):Ve(j)?(n.consume(j),_):N(j)}function A(j){return j===45||j===46||j===58||j===95||It(j)?(n.consume(j),A):M(j)}function M(j){return j===61?(n.consume(j),D):Ve(j)?(n.consume(j),M):_(j)}function D(j){return j===null||j===60||j===61||j===62||j===96?s(j):j===34||j===39?(n.consume(j),c=j,T):Ve(j)?(n.consume(j),D):k(j)}function T(j){return j===c?(n.consume(j),c=null,R):j===null||Ne(j)?s(j):(n.consume(j),T)}function k(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||ot(j)?M(j):(n.consume(j),k)}function R(j){return j===47||j===62||Ve(j)?_(j):s(j)}function N(j){return j===62?(n.consume(j),I):s(j)}function I(j){return j===null||Ne(j)?P(j):Ve(j)?(n.consume(j),I):s(j)}function P(j){return j===45&&p===2?(n.consume(j),G):j===60&&p===1?(n.consume(j),$):j===62&&p===4?(n.consume(j),z):j===63&&p===3?(n.consume(j),O):j===93&&p===5?(n.consume(j),H):Ne(j)&&(p===6||p===7)?(n.exit("htmlFlowData"),n.check(Qy,V,F)(j)):j===null||Ne(j)?(n.exit("htmlFlowData"),F(j)):(n.consume(j),P)}function F(j){return n.check(Zy,Y,V)(j)}function Y(j){return n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),W}function W(j){return j===null||Ne(j)?F(j):(n.enter("htmlFlowData"),P(j))}function G(j){return j===45?(n.consume(j),O):P(j)}function $(j){return j===47?(n.consume(j),f="",Q):P(j)}function Q(j){if(j===62){const ee=f.toLowerCase();return km.includes(ee)?(n.consume(j),z):P(j)}return qt(j)&&f.length<8?(n.consume(j),f+=String.fromCharCode(j),Q):P(j)}function H(j){return j===93?(n.consume(j),O):P(j)}function O(j){return j===62?(n.consume(j),z):j===45&&p===2?(n.consume(j),O):P(j)}function z(j){return j===null||Ne(j)?(n.exit("htmlFlowData"),V(j)):(n.consume(j),z)}function V(j){return n.exit("htmlFlow"),r(j)}}function tS(n,r,s){const o=this;return p;function p(f){return Ne(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),y):s(f)}function y(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}function nS(n,r,s){return o;function o(p){return n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),n.attempt(ll,r,s)}}const iS={name:"htmlText",tokenize:rS};function rS(n,r,s){const o=this;let p,y,f;return a;function a(O){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(O),c}function c(O){return O===33?(n.consume(O),h):O===47?(n.consume(O),M):O===63?(n.consume(O),_):qt(O)?(n.consume(O),k):s(O)}function h(O){return O===45?(n.consume(O),d):O===91?(n.consume(O),y=0,E):qt(O)?(n.consume(O),g):s(O)}function d(O){return O===45?(n.consume(O),w):s(O)}function u(O){return O===null?s(O):O===45?(n.consume(O),b):Ne(O)?(f=u,$(O)):(n.consume(O),u)}function b(O){return O===45?(n.consume(O),w):u(O)}function w(O){return O===62?G(O):O===45?b(O):u(O)}function E(O){const z="CDATA[";return O===z.charCodeAt(y++)?(n.consume(O),y===z.length?x:E):s(O)}function x(O){return O===null?s(O):O===93?(n.consume(O),v):Ne(O)?(f=x,$(O)):(n.consume(O),x)}function v(O){return O===93?(n.consume(O),S):x(O)}function S(O){return O===62?G(O):O===93?(n.consume(O),S):x(O)}function g(O){return O===null||O===62?G(O):Ne(O)?(f=g,$(O)):(n.consume(O),g)}function _(O){return O===null?s(O):O===63?(n.consume(O),A):Ne(O)?(f=_,$(O)):(n.consume(O),_)}function A(O){return O===62?G(O):_(O)}function M(O){return qt(O)?(n.consume(O),D):s(O)}function D(O){return O===45||It(O)?(n.consume(O),D):T(O)}function T(O){return Ne(O)?(f=T,$(O)):Ve(O)?(n.consume(O),T):G(O)}function k(O){return O===45||It(O)?(n.consume(O),k):O===47||O===62||ot(O)?R(O):s(O)}function R(O){return O===47?(n.consume(O),G):O===58||O===95||qt(O)?(n.consume(O),N):Ne(O)?(f=R,$(O)):Ve(O)?(n.consume(O),R):G(O)}function N(O){return O===45||O===46||O===58||O===95||It(O)?(n.consume(O),N):I(O)}function I(O){return O===61?(n.consume(O),P):Ne(O)?(f=I,$(O)):Ve(O)?(n.consume(O),I):R(O)}function P(O){return O===null||O===60||O===61||O===62||O===96?s(O):O===34||O===39?(n.consume(O),p=O,F):Ne(O)?(f=P,$(O)):Ve(O)?(n.consume(O),P):(n.consume(O),Y)}function F(O){return O===p?(n.consume(O),p=void 0,W):O===null?s(O):Ne(O)?(f=F,$(O)):(n.consume(O),F)}function Y(O){return O===null||O===34||O===39||O===60||O===61||O===96?s(O):O===47||O===62||ot(O)?R(O):(n.consume(O),Y)}function W(O){return O===47||O===62||ot(O)?R(O):s(O)}function G(O){return O===62?(n.consume(O),n.exit("htmlTextData"),n.exit("htmlText"),r):s(O)}function $(O){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),Q}function Q(O){return Ve(O)?Ke(n,H,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):H(O)}function H(O){return n.enter("htmlTextData"),f(O)}}const Yu={name:"labelEnd",resolveAll:oS,resolveTo:cS,tokenize:uS},sS={tokenize:hS},lS={tokenize:fS},aS={tokenize:dS};function oS(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 p=o.type==="labelImage"?4:2;o.type="data",r+=p}}return n.length!==s.length&&hn(n,0,n.length,s),n}function cS(n,r){let s=n.length,o=0,p,y,f,a;for(;s--;)if(p=n[s][1],y){if(p.type==="link"||p.type==="labelLink"&&p._inactive)break;n[s][0]==="enter"&&p.type==="labelLink"&&(p._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(p.type==="labelImage"||p.type==="labelLink")&&!p._balanced&&(y=s,p.type!=="labelLink")){o=2;break}}else p.type==="labelEnd"&&(f=s);const c={type:n[y][1].type==="labelLink"?"link":"image",start:{...n[y][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[y][1].start},end:{...n[f][1].end}},d={type:"labelText",start:{...n[y+o+2][1].end},end:{...n[f-2][1].start}};return a=[["enter",c,r],["enter",h,r]],a=Cn(a,n.slice(y+1,y+o+3)),a=Cn(a,[["enter",d,r]]),a=Cn(a,za(r.parser.constructs.insideSpan.null,n.slice(y+o+4,f-3),r)),a=Cn(a,[["exit",d,r],n[f-2],n[f-1],["exit",h,r]]),a=Cn(a,n.slice(f+1)),a=Cn(a,[["exit",c,r]]),hn(n,y,n.length,a),n}function uS(n,r,s){const o=this;let p=o.events.length,y,f;for(;p--;)if((o.events[p][1].type==="labelImage"||o.events[p][1].type==="labelLink")&&!o.events[p][1]._balanced){y=o.events[p][1];break}return a;function a(b){return y?y._inactive?u(b):(f=o.parser.defined.includes(An(o.sliceSerialize({start:y.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),c):s(b)}function c(b){return b===40?n.attempt(sS,d,f?d:u)(b):b===91?n.attempt(lS,d,f?h:u)(b):f?d(b):u(b)}function h(b){return n.attempt(aS,d,u)(b)}function d(b){return r(b)}function u(b){return y._balanced=!0,s(b)}}function hS(n,r,s){return o;function o(u){return n.enter("resource"),n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),p}function p(u){return ot(u)?el(n,y)(u):y(u)}function y(u){return u===41?d(u):Ng(n,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return ot(u)?el(n,c)(u):d(u)}function a(u){return s(u)}function c(u){return u===34||u===39||u===40?zg(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function h(u){return ot(u)?el(n,d)(u):d(u)}function d(u){return u===41?(n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),n.exit("resource"),r):s(u)}}function fS(n,r,s){const o=this;return p;function p(a){return jg.call(o,n,y,f,"reference","referenceMarker","referenceString")(a)}function y(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 dS(n,r,s){return o;function o(y){return n.enter("reference"),n.enter("referenceMarker"),n.consume(y),n.exit("referenceMarker"),p}function p(y){return y===93?(n.enter("referenceMarker"),n.consume(y),n.exit("referenceMarker"),n.exit("reference"),r):s(y)}}const pS={name:"labelStartImage",resolveAll:Yu.resolveAll,tokenize:mS};function mS(n,r,s){const o=this;return p;function p(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),y}function y(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 gS={name:"labelStartLink",resolveAll:Yu.resolveAll,tokenize:_S};function _S(n,r,s){const o=this;return p;function p(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),y}function y(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(f):r(f)}}const au={name:"lineEnding",tokenize:vS};function vS(n,r){return s;function s(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ke(n,r,"linePrefix")}}const Da={name:"thematicBreak",tokenize:yS};function yS(n,r,s){let o=0,p;return y;function y(h){return n.enter("thematicBreak"),f(h)}function f(h){return p=h,a(h)}function a(h){return h===p?(n.enter("thematicBreakSequence"),c(h)):o>=3&&(h===null||Ne(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===p?(n.consume(h),o++,c):(n.exit("thematicBreakSequence"),Ve(h)?Ke(n,a,"whitespace")(h):a(h))}}const en={continuation:{tokenize:wS},exit:ES,name:"list",tokenize:CS},SS={partial:!0,tokenize:kS},bS={partial:!0,tokenize:xS};function CS(n,r,s){const o=this,p=o.events[o.events.length-1];let y=p&&p[1].type==="linePrefix"?p[2].sliceSerialize(p[1],!0).length:0,f=0;return a;function a(w){const E=o.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!o.containerState.marker||w===o.containerState.marker:Au(w)){if(o.containerState.type||(o.containerState.type=E,n.enter(E,{_container:!0})),E==="listUnordered")return n.enter("listItemPrefix"),w===42||w===45?n.check(Da,s,h)(w):h(w);if(!o.interrupt||w===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(w)}return s(w)}function c(w){return Au(w)&&++f<10?(n.consume(w),c):(!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(ll,o.interrupt?s:d,n.attempt(SS,b,u))}function d(w){return o.containerState.initialBlankLine=!0,y++,b(w)}function u(w){return Ve(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),b):s(w)}function b(w){return o.containerState.size=y+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(w)}}function wS(n,r,s){const o=this;return o.containerState._closeFlow=void 0,n.check(ll,p,y);function p(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ke(n,r,"listItemIndent",o.containerState.size+1)(a)}function y(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(bS,r,f)(a))}function f(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ke(n,n.attempt(en,r,s),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function xS(n,r,s){const o=this;return Ke(n,p,"listItemIndent",o.containerState.size+1);function p(y){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(y):s(y)}}function ES(n){n.exit(this.containerState.type)}function kS(n,r,s){const o=this;return Ke(n,p,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function p(y){const f=o.events[o.events.length-1];return!Ve(y)&&f&&f[1].type==="listItemPrefixWhitespace"?r(y):s(y)}}const Am={name:"setextUnderline",resolveTo:AS,tokenize:TS};function AS(n,r){let s=n.length,o,p,y;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){o=s;break}n[s][1].type==="paragraph"&&(p=s)}else n[s][1].type==="content"&&n.splice(s,1),!y&&n[s][1].type==="definition"&&(y=s);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[p][1].type="setextHeadingText",y?(n.splice(p,0,["enter",f,r]),n.splice(y+1,0,["exit",n[o][1],r]),n[o][1].end={...n[y][1].end}):n[o][1]=f,n.push(["exit",f,r]),n}function TS(n,r,s){const o=this;let p;return y;function y(h){let d=o.events.length,u;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){u=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(n.enter("setextHeadingLine"),p=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===p?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),Ve(h)?Ke(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||Ne(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const DS={tokenize:RS};function RS(n){const r=this,s=n.attempt(ll,o,n.attempt(this.parser.constructs.flowInitial,p,Ke(n,n.attempt(this.parser.constructs.flow,p,n.attempt(Ny,p)),"linePrefix")));return s;function o(y){if(y===null){n.consume(y);return}return n.enter("lineEndingBlank"),n.consume(y),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function p(y){if(y===null){n.consume(y);return}return n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const MS={resolveAll:Ig()},LS=Hg("string"),OS=Hg("text");function Hg(n){return{resolveAll:Ig(n==="text"?BS:void 0),tokenize:r};function r(s){const o=this,p=this.parser.constructs[n],y=s.attempt(p,f,a);return f;function f(d){return h(d)?y(d):a(d)}function a(d){if(d===null){s.consume(d);return}return s.enter("data"),s.consume(d),c}function c(d){return h(d)?(s.exit("data"),y(d)):(s.consume(d),c)}function h(d){if(d===null)return!0;const u=p[d];let b=-1;if(u)for(;++b<u.length;){const w=u[b];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function Ig(n){return r;function r(s,o){let p=-1,y;for(;++p<=s.length;)y===void 0?s[p]&&s[p][1].type==="data"&&(y=p,p++):(!s[p]||s[p][1].type!=="data")&&(p!==y+2&&(s[y][1].end=s[p-1][1].end,s.splice(y+2,p-y-2),p=y+2),y=void 0);return n?n(s,o):s}}function BS(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],p=r.sliceStream(o);let y=p.length,f=-1,a=0,c;for(;y--;){const h=p[y];if(typeof h=="string"){for(f=h.length;h.charCodeAt(f-1)===32;)a++,f--;if(f)break;f=-1}else if(h===-2)c=!0,a++;else if(h!==-1){y++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(a=0),a){const h={type:s===n.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:y?f:o.start._bufferIndex+f,_index:o.start._index+y,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 NS={42:en,43:en,45:en,48:en,49:en,50:en,51:en,52:en,53:en,54:en,55:en,56:en,57:en,62:Mg},jS={91:Uy},zS={[-2]:lu,[-1]:lu,32:lu},HS={35:$y,42:Da,45:[Am,Da],60:Xy,61:Am,95:Da,96:Em,126:Em},IS={38:Og,92:Lg},US={[-5]:au,[-4]:au,[-3]:au,33:pS,38:Og,42:Tu,60:[gy,iS],91:gS,92:[Vy,Lg],93:Yu,95:Tu,96:Dy},PS={null:[Tu,MS]},FS={null:[42,95]},qS={null:[]},VS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:FS,contentInitial:jS,disable:qS,document:NS,flow:HS,flowInitial:zS,insideSpan:PS,string:IS,text:US},Symbol.toStringTag,{value:"Module"}));function GS(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 p={},y=[];let f=[],a=[];const c={attempt:T(M),check:T(D),consume:g,enter:_,exit:A,interrupt:T(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:E,parser:n,previous:null,sliceSerialize:b,sliceStream:w,write:u};let d=r.tokenize.call(h,c);return r.resolveAll&&y.push(r),h;function u(I){return f=Cn(f,I),v(),f[f.length-1]!==null?[]:(k(r,0),h.events=za(y,h.events,h),h.events)}function b(I,P){return YS(w(I),P)}function w(I){return $S(f,I)}function E(){const{_bufferIndex:I,_index:P,line:F,column:Y,offset:W}=o;return{_bufferIndex:I,_index:P,line:F,column:Y,offset:W}}function x(I){p[I.line]=I.column,N()}function v(){let I;for(;o._index<f.length;){const P=f[o._index];if(typeof P=="string")for(I=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===I&&o._bufferIndex<P.length;)S(P.charCodeAt(o._bufferIndex));else S(P)}}function S(I){d=d(I)}function g(I){Ne(I)?(o.line++,o.column=1,o.offset+=I===-3?2:1,N()):I!==-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=I}function _(I,P){const F=P||{};return F.type=I,F.start=E(),h.events.push(["enter",F,h]),a.push(F),F}function A(I){const P=a.pop();return P.end=E(),h.events.push(["exit",P,h]),P}function M(I,P){k(I,P.from)}function D(I,P){P.restore()}function T(I,P){return F;function F(Y,W,G){let $,Q,H,O;return Array.isArray(Y)?V(Y):"tokenize"in Y?V([Y]):z(Y);function z(ge){return K;function K(q){const ce=q!==null&&ge[q],le=q!==null&&ge.null,ue=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(le)?le:le?[le]:[]];return V(ue)(q)}}function V(ge){return $=ge,Q=0,ge.length===0?G:j(ge[Q])}function j(ge){return K;function K(q){return O=R(),H=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?ae():ge.tokenize.call(P?Object.assign(Object.create(h),P):h,c,ee,ae)(q)}}function ee(ge){return I(H,O),W}function ae(ge){return O.restore(),++Q<$.length?j($[Q]):G}}}function k(I,P){I.resolveAll&&!y.includes(I)&&y.push(I),I.resolve&&hn(h.events,P,h.events.length-P,I.resolve(h.events.slice(P),h)),I.resolveTo&&(h.events=I.resolveTo(h.events,h))}function R(){const I=E(),P=h.previous,F=h.currentConstruct,Y=h.events.length,W=Array.from(a);return{from:Y,restore:G};function G(){o=I,h.previous=P,h.currentConstruct=F,h.events.length=Y,a=W,N()}}function N(){o.line in p&&o.column<2&&(o.column=p[o.line],o.offset+=p[o.line]-1)}}function $S(n,r){const s=r.start._index,o=r.start._bufferIndex,p=r.end._index,y=r.end._bufferIndex;let f;if(s===p)f=[n[s].slice(o,y)];else{if(f=n.slice(s,p),o>-1){const a=f[0];typeof a=="string"?f[0]=a.slice(o):f.shift()}y>0&&f.push(n[p].slice(0,y))}return f}function YS(n,r){let s=-1;const o=[];let p;for(;++s<n.length;){const y=n[s];let f;if(typeof y=="string")f=y;else switch(y){case-5:{f="\r";break}case-4:{f=`
|
|
53
|
-
`;break}case-3:{f=`\r
|
|
54
|
-
`;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&p)continue;f=" ";break}default:f=String.fromCharCode(y)}p=y===-2,o.push(f)}return o.join("")}function KS(n){const o={constructs:Dg([VS,...(n||{}).extensions||[]]),content:p(cy),defined:[],document:p(hy),flow:p(DS),lazy:{},string:p(LS),text:p(OS)};return o;function p(y){return f;function f(a){return GS(o,y,a)}}}function WS(n){for(;!Bg(n););return n}const Tm=/[\0\t\n\r]/g;function XS(){let n=1,r="",s=!0,o;return p;function p(y,f,a){const c=[];let h,d,u,b,w;for(y=r+(typeof y=="string"?y.toString():new TextDecoder(f||void 0).decode(y)),u=0,r="",s&&(y.charCodeAt(0)===65279&&u++,s=void 0);u<y.length;){if(Tm.lastIndex=u,h=Tm.exec(y),b=h&&h.index!==void 0?h.index:y.length,w=y.charCodeAt(b),!h){r=y.slice(u);break}if(w===10&&u===b&&o)c.push(-3),o=void 0;else switch(o&&(c.push(-5),o=void 0),u<b&&(c.push(y.slice(u,b)),n+=b-u),w){case 0:{c.push(65533),n++;break}case 9:{for(d=Math.ceil(n/4)*4,c.push(-2);n++<d;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:o=!0,n=1}u=b+1}return a&&(o&&c.push(-5),r&&c.push(r),c.push(null)),c}}const QS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ZS(n){return n.replace(QS,JS)}function JS(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const p=s.charCodeAt(1),y=p===120||p===88;return Rg(s.slice(y?2:1),y?16:10)}return $u(s)||n}const Ug={}.hasOwnProperty;function eb(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),tb(s)(WS(KS(s).document().write(XS()(n,r,!0))))}function tb(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:y(Pt),autolinkProtocol:R,autolinkEmail:R,atxHeading:y(xe),blockQuote:y(le),characterEscape:R,characterReference:R,codeFenced:y(ue),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:y(ue,f),codeText:y(te,f),codeTextData:R,data:R,codeFlowValue:R,definition:y(Se),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:y(we),hardBreakEscape:y(nt),hardBreakTrailing:y(nt),htmlFlow:y(Le,f),htmlFlowData:R,htmlText:y(Le,f),htmlTextData:R,image:y(Vt),label:f,link:y(Pt),listItem:y(Tt),listItemValue:b,listOrdered:y(jt,u),listUnordered:y(jt),paragraph:y(Gt),reference:j,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:y(xe),strong:y(yt),thematicBreak:y(kt)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:ce,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:ge,characterReference:K,codeFenced:c(v),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:E,codeFlowValue:N,codeIndented:c(S),codeText:c(W),codeTextData:N,data:N,definition:c(),definitionDestinationString:A,definitionLabelString:g,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(F),htmlFlowData:N,htmlText:c(Y),htmlTextData:N,image:c($),label:H,labelText:Q,lineEnding:I,link:c(G),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ee,resourceDestinationString:O,resourceTitleString:z,resource:V,setextHeading:c(k),setextHeadingLineSequence:T,setextHeadingText:D,strong:c(),thematicBreak:c()}};Pg(r,(n||{}).mdastExtensions||[]);const s={};return o;function o(fe){let ve={type:"root",children:[]};const ke={stack:[ve],tokenStack:[],config:r,enter:a,exit:h,buffer:f,resume:d,data:s},Oe=[];let Be=-1;for(;++Be<fe.length;)if(fe[Be][1].type==="listOrdered"||fe[Be][1].type==="listUnordered")if(fe[Be][0]==="enter")Oe.push(Be);else{const me=Oe.pop();Be=p(fe,me,Be)}for(Be=-1;++Be<fe.length;){const me=r[fe[Be][0]];Ug.call(me,fe[Be][1].type)&&me[fe[Be][1].type].call(Object.assign({sliceSerialize:fe[Be][2].sliceSerialize},ke),fe[Be][1])}if(ke.tokenStack.length>0){const me=ke.tokenStack[ke.tokenStack.length-1];(me[1]||Dm).call(ke,void 0,me[0])}for(ve.position={start:Mi(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:Mi(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<r.transforms.length;)ve=r.transforms[Be](ve)||ve;return ve}function p(fe,ve,ke){let Oe=ve-1,Be=-1,me=!1,Te,mt,De,Je;for(;++Oe<=ke;){const Pe=fe[Oe];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?Be++:Be--,Je=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&(Te&&!Je&&!Be&&!De&&(De=Oe),Je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Je=void 0}if(!Be&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||Be===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(Te){let wn=Oe;for(mt=void 0;wn--;){const $t=fe[wn];if($t[1].type==="lineEnding"||$t[1].type==="lineEndingBlank"){if($t[0]==="exit")continue;mt&&(fe[mt][1].type="lineEndingBlank",me=!0),$t[1].type="lineEnding",mt=wn}else if(!($t[1].type==="linePrefix"||$t[1].type==="blockQuotePrefix"||$t[1].type==="blockQuotePrefixWhitespace"||$t[1].type==="blockQuoteMarker"||$t[1].type==="listItemIndent"))break}De&&(!mt||De<mt)&&(Te._spread=!0),Te.end=Object.assign({},mt?fe[mt][1].start:Pe[1].end),fe.splice(mt||Oe,0,["exit",Te,Pe[2]]),Oe++,ke++}if(Pe[1].type==="listItemPrefix"){const wn={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};Te=wn,fe.splice(Oe,0,["enter",wn,Pe[2]]),Oe++,ke++,De=void 0,Je=!0}}}return fe[ve][1]._spread=me,ke}function y(fe,ve){return ke;function ke(Oe){a.call(this,fe(Oe),Oe),ve&&ve.call(this,Oe)}}function f(){this.stack.push({type:"fragment",children:[]})}function a(fe,ve,ke){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([ve,ke||void 0]),fe.position={start:Mi(ve.start),end:void 0}}function c(fe){return ve;function ve(ke){fe&&fe.call(this,ke),h.call(this,ke)}}function h(fe,ve){const ke=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==fe.type&&(ve?ve.call(this,fe,Oe[0]):(Oe[1]||Dm).call(this,fe,Oe[0]));else throw new Error("Cannot close `"+fe.type+"` ("+Js({start:fe.start,end:fe.end})+"): it’s not open");ke.position.end=Mi(fe.end)}function d(){return Gu(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function b(fe){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function w(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=fe}function E(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=fe}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe.replace(/(\r?\n|\r)$/g,"")}function g(fe){const ve=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ve,ke.identifier=An(this.sliceSerialize(fe)).toLowerCase()}function _(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.title=fe}function A(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.url=fe}function M(fe){const ve=this.stack[this.stack.length-1];if(!ve.depth){const ke=this.sliceSerialize(fe).length;ve.depth=ke}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function T(fe){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function R(fe){const ke=this.stack[this.stack.length-1].children;let Oe=ke[ke.length-1];(!Oe||Oe.type!=="text")&&(Oe=lt(),Oe.position={start:Mi(fe.start),end:void 0},ke.push(Oe)),this.stack.push(Oe)}function N(fe){const ve=this.stack.pop();ve.value+=this.sliceSerialize(fe),ve.position.end=Mi(fe.end)}function I(fe){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=ve.children[ve.children.length-1];ke.position.end=Mi(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(ve.type)&&(R.call(this,fe),N.call(this,fe))}function P(){this.data.atHardBreak=!0}function F(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function Y(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function W(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function G(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ve,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function $(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ve,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function Q(fe){const ve=this.sliceSerialize(fe),ke=this.stack[this.stack.length-2];ke.label=ZS(ve),ke.identifier=An(ve).toLowerCase()}function H(){const fe=this.stack[this.stack.length-1],ve=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Oe=fe.children;ke.children=Oe}else ke.alt=ve}function O(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.url=fe}function z(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.title=fe}function V(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function ee(fe){const ve=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ve,ke.identifier=An(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function ae(fe){this.data.characterReferenceType=fe.type}function ge(fe){const ve=this.sliceSerialize(fe),ke=this.data.characterReferenceType;let Oe;ke?(Oe=Rg(ve,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=$u(ve);const Be=this.stack[this.stack.length-1];Be.value+=Oe}function K(fe){const ve=this.stack.pop();ve.position.end=Mi(fe.end)}function q(fe){N.call(this,fe);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(fe)}function ce(fe){N.call(this,fe);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(fe)}function le(){return{type:"blockquote",children:[]}}function ue(){return{type:"code",lang:null,meta:null,value:""}}function te(){return{type:"inlineCode",value:""}}function Se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function nt(){return{type:"break"}}function Le(){return{type:"html",value:""}}function Vt(){return{type:"image",title:null,url:"",alt:null}}function Pt(){return{type:"link",title:null,url:"",children:[]}}function jt(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function Tt(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function Gt(){return{type:"paragraph",children:[]}}function yt(){return{type:"strong",children:[]}}function lt(){return{type:"text",value:""}}function kt(){return{type:"thematicBreak"}}}function Mi(n){return{line:n.line,column:n.column,offset:n.offset}}function Pg(n,r){let s=-1;for(;++s<r.length;){const o=r[s];Array.isArray(o)?Pg(n,o):nb(n,o)}}function nb(n,r){let s;for(s in r)if(Ug.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 Dm(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+Js({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+Js({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Js({start:r.start,end:r.end})+") is still open")}function ib(n){const r=this;r.parser=s;function s(o){return eb(o,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function rb(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 sb(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
|
|
55
|
-
`}]}function lb(n,r){const s=r.value?r.value+`
|
|
56
|
-
`:"",o={},p=r.lang?r.lang.split(/\s+/):[];p.length>0&&(o.className=["language-"+p[0]]);let y={type:"element",tagName:"code",properties:o,children:[{type:"text",value:s}]};return r.meta&&(y.data={meta:r.meta}),n.patch(r,y),y=n.applyData(r,y),y={type:"element",tagName:"pre",properties:{},children:[y]},n.patch(r,y),y}function ab(n,r){const s={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function ob(n,r){const s={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function cb(n,r){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(r.identifier).toUpperCase(),p=Jr(o.toLowerCase()),y=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=y+1,a+=1,n.footnoteCounts.set(o,a);const c={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+p,id:s+"fnref-"+p+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(r,c);const h={type:"element",tagName:"sup",properties:{},children:[c]};return n.patch(r,h),n.applyData(r,h)}function ub(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 hb(n,r){if(n.options.allowDangerousHtml){const s={type:"raw",value:r.value};return n.patch(r,s),n.applyData(r,s)}}function Fg(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 p=n.all(r),y=p[0];y&&y.type==="text"?y.value="["+y.value:p.unshift({type:"text",value:"["});const f=p[p.length-1];return f&&f.type==="text"?f.value+=o:p.push({type:"text",value:o}),p}function fb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return Fg(n,r);const p={src:Jr(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(p.title=o.title);const y={type:"element",tagName:"img",properties:p,children:[]};return n.patch(r,y),n.applyData(r,y)}function db(n,r){const s={src:Jr(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 pb(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 mb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return Fg(n,r);const p={href:Jr(o.url||"")};o.title!==null&&o.title!==void 0&&(p.title=o.title);const y={type:"element",tagName:"a",properties:p,children:n.all(r)};return n.patch(r,y),n.applyData(r,y)}function gb(n,r){const s={href:Jr(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 _b(n,r,s){const o=n.all(r),p=s?vb(s):qg(r),y={},f=[];if(typeof r.checked=="boolean"){const d=o[0];let u;d&&d.type==="element"&&d.tagName==="p"?u=d:(u={type:"element",tagName:"p",properties:{},children:[]},o.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),y.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const d=o[a];(p||a!==0||d.type!=="element"||d.tagName!=="p")&&f.push({type:"text",value:`
|
|
57
|
-
`}),d.type==="element"&&d.tagName==="p"&&!p?f.push(...d.children):f.push(d)}const c=o[o.length-1];c&&(p||c.type!=="element"||c.tagName!=="p")&&f.push({type:"text",value:`
|
|
58
|
-
`});const h={type:"element",tagName:"li",properties:y,children:f};return n.patch(r,h),n.applyData(r,h)}function vb(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=qg(s[o])}return r}function qg(n){const r=n.spread;return r??n.children.length>1}function yb(n,r){const s={},o=n.all(r);let p=-1;for(typeof r.start=="number"&&r.start!==1&&(s.start=r.start);++p<o.length;){const f=o[p];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 y={type:"element",tagName:r.ordered?"ol":"ul",properties:s,children:n.wrap(o,!0)};return n.patch(r,y),n.applyData(r,y)}function Sb(n,r){const s={type:"element",tagName:"p",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function bb(n,r){const s={type:"root",children:n.wrap(n.all(r))};return n.patch(r,s),n.applyData(r,s)}function Cb(n,r){const s={type:"element",tagName:"strong",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function wb(n,r){const s=n.all(r),o=s.shift(),p=[];if(o){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(r.children[0],f),p.push(f)}if(s.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(s,!0)},a=Pu(r.children[1]),c=Cg(r.children[r.children.length-1]);a&&c&&(f.position={start:a,end:c}),p.push(f)}const y={type:"element",tagName:"table",properties:{},children:n.wrap(p,!0)};return n.patch(r,y),n.applyData(r,y)}function xb(n,r,s){const o=s?s.children:void 0,y=(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 c=-1;const h=[];for(;++c<a;){const u=r.children[c],b={},w=f?f[c]:void 0;w&&(b.align=w);let E={type:"element",tagName:y,properties:b,children:[]};u&&(E.children=n.all(u),n.patch(u,E),E=n.applyData(u,E)),h.push(E)}const d={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(r,d),n.applyData(r,d)}function Eb(n,r){const s={type:"element",tagName:"td",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}const Rm=9,Mm=32;function kb(n){const r=String(n),s=/\r?\n|\r/g;let o=s.exec(r),p=0;const y=[];for(;o;)y.push(Lm(r.slice(p,o.index),p>0,!0),o[0]),p=o.index+o[0].length,o=s.exec(r);return y.push(Lm(r.slice(p),p>0,!1)),y.join("")}function Lm(n,r,s){let o=0,p=n.length;if(r){let y=n.codePointAt(o);for(;y===Rm||y===Mm;)o++,y=n.codePointAt(o)}if(s){let y=n.codePointAt(p-1);for(;y===Rm||y===Mm;)p--,y=n.codePointAt(p-1)}return p>o?n.slice(o,p):""}function Ab(n,r){const s={type:"text",value:kb(String(r.value))};return n.patch(r,s),n.applyData(r,s)}function Tb(n,r){const s={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,s),n.applyData(r,s)}const Db={blockquote:rb,break:sb,code:lb,delete:ab,emphasis:ob,footnoteReference:cb,heading:ub,html:hb,imageReference:fb,image:db,inlineCode:pb,linkReference:mb,link:gb,listItem:_b,list:yb,paragraph:Sb,root:bb,strong:Cb,table:wb,tableCell:Eb,tableRow:xb,text:Ab,thematicBreak:Tb,toml:wa,yaml:wa,definition:wa,footnoteDefinition:wa};function wa(){}const Vg=-1,Ha=0,tl=1,Ma=2,Ku=3,Wu=4,Xu=5,Qu=6,Gg=7,$g=8,Rb=typeof self=="object"?self:globalThis,Om=(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 Rb[n](r)},Mb=(n,r)=>{const s=(p,y)=>(n.set(y,p),p),o=p=>{if(n.has(p))return n.get(p);const[y,f]=r[p];switch(y){case Ha:case Vg:return s(f,p);case tl:{const a=s([],p);for(const c of f)a.push(o(c));return a}case Ma:{const a=s({},p);for(const[c,h]of f)a[o(c)]=o(h);return a}case Ku:return s(new Date(f),p);case Wu:{const{source:a,flags:c}=f;return s(new RegExp(a,c),p)}case Xu:{const a=s(new Map,p);for(const[c,h]of f)a.set(o(c),o(h));return a}case Qu:{const a=s(new Set,p);for(const c of f)a.add(o(c));return a}case Gg:{const{name:a,message:c}=f;return s(Om(a,c),p)}case $g:return s(BigInt(f),p);case"BigInt":return s(Object(BigInt(f)),p);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(Om(y,f),p)};return o},Bm=n=>Mb(new Map,n)(0),Gr="",{toString:Lb}={},{keys:Ob}=Object,Qs=n=>{const r=typeof n;if(r!=="object"||!n)return[Ha,r];const s=Lb.call(n).slice(8,-1);switch(s){case"Array":return[tl,Gr];case"Object":return[Ma,Gr];case"Date":return[Ku,Gr];case"RegExp":return[Wu,Gr];case"Map":return[Xu,Gr];case"Set":return[Qu,Gr];case"DataView":return[tl,s]}return s.includes("Array")?[tl,s]:s.includes("Error")?[Gg,s]:[Ma,s]},xa=([n,r])=>n===Ha&&(r==="function"||r==="symbol"),Bb=(n,r,s,o)=>{const p=(f,a)=>{const c=o.push(f)-1;return s.set(a,c),c},y=f=>{if(s.has(f))return s.get(f);let[a,c]=Qs(f);switch(a){case Ha:{let d=f;switch(c){case"bigint":a=$g,d=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return p([Vg],f)}return p([a,d],f)}case tl:{if(c){let b=f;return c==="DataView"?b=new Uint8Array(f.buffer):c==="ArrayBuffer"&&(b=new Uint8Array(f)),p([c,[...b]],f)}const d=[],u=p([a,d],f);for(const b of f)d.push(y(b));return u}case Ma:{if(c)switch(c){case"BigInt":return p([c,f.toString()],f);case"Boolean":case"Number":case"String":return p([c,f.valueOf()],f)}if(r&&"toJSON"in f)return y(f.toJSON());const d=[],u=p([a,d],f);for(const b of Ob(f))(n||!xa(Qs(f[b])))&&d.push([y(b),y(f[b])]);return u}case Ku:return p([a,f.toISOString()],f);case Wu:{const{source:d,flags:u}=f;return p([a,{source:d,flags:u}],f)}case Xu:{const d=[],u=p([a,d],f);for(const[b,w]of f)(n||!(xa(Qs(b))||xa(Qs(w))))&&d.push([y(b),y(w)]);return u}case Qu:{const d=[],u=p([a,d],f);for(const b of f)(n||!xa(Qs(b)))&&d.push(y(b));return u}}const{message:h}=f;return p([a,{name:c,message:h}],f)};return y},Nm=(n,{json:r,lossy:s}={})=>{const o=[];return Bb(!(r||s),!!r,new Map,o)(n),o},La=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?Bm(Nm(n,r)):structuredClone(n):(n,r)=>Bm(Nm(n,r));function Nb(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 jb(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function zb(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",s=n.options.footnoteBackContent||Nb,o=n.options.footnoteBackLabel||jb,p=n.options.footnoteLabel||"Footnotes",y=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[c]);if(!h)continue;const d=n.all(h),u=String(h.identifier).toUpperCase(),b=Jr(u.toLowerCase());let w=0;const E=[],x=n.footnoteCounts.get(u);for(;x!==void 0&&++w<=x;){E.length>0&&E.push({type:"text",value:" "});let g=typeof s=="string"?s:s(c,w);typeof g=="string"&&(g={type:"text",value:g}),E.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+b+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(c,w),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const g=v.children[v.children.length-1];g&&g.type==="text"?g.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...E)}else d.push(...E);const S={type:"element",tagName:"li",properties:{id:r+"fn-"+b},children:n.wrap(d,!0)};n.patch(h,S),a.push(S)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:y,properties:{...La(f),id:"footnote-label"},children:[{type:"text",value:p}]},{type:"text",value:`
|
|
59
|
-
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
|
|
60
|
-
`}]}}const Ia=(function(n){if(n==null)return Pb;if(typeof n=="function")return Ua(n);if(typeof n=="object")return Array.isArray(n)?Hb(n):Ib(n);if(typeof n=="string")return Ub(n);throw new Error("Expected function, string, or object as test")});function Hb(n){const r=[];let s=-1;for(;++s<n.length;)r[s]=Ia(n[s]);return Ua(o);function o(...p){let y=-1;for(;++y<r.length;)if(r[y].apply(this,p))return!0;return!1}}function Ib(n){const r=n;return Ua(s);function s(o){const p=o;let y;for(y in n)if(p[y]!==r[y])return!1;return!0}}function Ub(n){return Ua(r);function r(s){return s&&s.type===n}}function Ua(n){return r;function r(s,o,p){return!!(Fb(s)&&n.call(this,s,typeof o=="number"?o:void 0,p||void 0))}}function Pb(){return!0}function Fb(n){return n!==null&&typeof n=="object"&&"type"in n}const Yg=[],qb=!0,Du=!1,Vb="skip";function Kg(n,r,s,o){let p;typeof r=="function"&&typeof s!="function"?(o=s,s=r):p=r;const y=Ia(p),f=o?-1:1;a(n,void 0,[])();function a(c,h,d){const u=c&&typeof c=="object"?c:{};if(typeof u.type=="string"){const w=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(c.type+(w?"<"+w+">":""))+")"})}return b;function b(){let w=Yg,E,x,v;if((!r||y(c,h,d[d.length-1]||void 0))&&(w=Gb(s(c,d)),w[0]===Du))return w;if("children"in c&&c.children){const S=c;if(S.children&&w[0]!==Vb)for(x=(o?S.children.length:-1)+f,v=d.concat(S);x>-1&&x<S.children.length;){const g=S.children[x];if(E=a(g,x,v)(),E[0]===Du)return E;x=typeof E[1]=="number"?E[1]:x+f}}return w}}}function Gb(n){return Array.isArray(n)?n:typeof n=="number"?[qb,n]:n==null?Yg:[n]}function Zu(n,r,s,o){let p,y,f;typeof r=="function"&&typeof s!="function"?(y=void 0,f=r,p=s):(y=r,f=s,p=o),Kg(n,y,a,p);function a(c,h){const d=h[h.length-1],u=d?d.children.indexOf(c):void 0;return f(c,u,d)}}const Ru={}.hasOwnProperty,$b={};function Yb(n,r){const s=r||$b,o=new Map,p=new Map,y=new Map,f={...Db,...s.handlers},a={all:h,applyData:Wb,definitionById:o,footnoteById:p,footnoteCounts:y,footnoteOrder:[],handlers:f,one:c,options:s,patch:Kb,wrap:Qb};return Zu(n,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const u=d.type==="definition"?o:p,b=String(d.identifier).toUpperCase();u.has(b)||u.set(b,d)}}),a;function c(d,u){const b=d.type,w=a.handlers[b];if(Ru.call(a.handlers,b)&&w)return w(a,d,u);if(a.options.passThrough&&a.options.passThrough.includes(b)){if("children"in d){const{children:x,...v}=d,S=La(v);return S.children=a.all(d),S}return La(d)}return(a.options.unknownHandler||Xb)(a,d,u)}function h(d){const u=[];if("children"in d){const b=d.children;let w=-1;for(;++w<b.length;){const E=a.one(b[w],d);if(E){if(w&&b[w-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=jm(E.value)),!Array.isArray(E)&&E.type==="element")){const x=E.children[0];x&&x.type==="text"&&(x.value=jm(x.value))}Array.isArray(E)?u.push(...E):u.push(E)}}}return u}}function Kb(n,r){n.position&&(r.position=N1(n))}function Wb(n,r){let s=r;if(n&&n.data){const o=n.data.hName,p=n.data.hChildren,y=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"&&y&&Object.assign(s.properties,La(y)),"children"in s&&s.children&&p!==null&&p!==void 0&&(s.children=p)}return s}function Xb(n,r){const s=r.data||{},o="value"in r&&!(Ru.call(s,"hProperties")||Ru.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 Qb(n,r){const s=[];let o=-1;for(r&&s.push({type:"text",value:`
|
|
61
|
-
`});++o<n.length;)o&&s.push({type:"text",value:`
|
|
62
|
-
`}),s.push(n[o]);return r&&n.length>0&&s.push({type:"text",value:`
|
|
63
|
-
`}),s}function jm(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function zm(n,r){const s=Yb(n,r),o=s.one(n,void 0),p=zb(s),y=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return p&&y.children.push({type:"text",value:`
|
|
64
|
-
`},p),y}function Zb(n,r){return n&&"run"in n?async function(s,o){const p=zm(s,{file:o,...r});await n.run(p,o)}:function(s,o){return zm(s,{file:o,...n||r})}}function Hm(n){if(n)throw n}var ou,Im;function Jb(){if(Im)return ou;Im=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,p=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},y=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var d=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!u)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},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 ou=function c(){var h,d,u,b,w,E,x=arguments[0],v=1,S=arguments.length,g=!1;for(typeof x=="boolean"&&(g=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});v<S;++v)if(h=arguments[v],h!=null)for(d in h)u=a(x,d),b=a(h,d),x!==b&&(g&&b&&(y(b)||(w=p(b)))?(w?(w=!1,E=u&&p(u)?u:[]):E=u&&y(u)?u:{},f(x,{name:d,newValue:c(g,E,b)})):typeof b<"u"&&f(x,{name:d,newValue:b}));return x},ou}var eC=Jb();const cu=cg(eC);function Mu(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 tC(){const n=[],r={run:s,use:o};return r;function s(...p){let y=-1;const f=p.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);a(null,...p);function a(c,...h){const d=n[++y];let u=-1;if(c){f(c);return}for(;++u<p.length;)(h[u]===null||h[u]===void 0)&&(h[u]=p[u]);p=h,d?nC(d,a)(...h):f(null,...h)}}function o(p){if(typeof p!="function")throw new TypeError("Expected `middelware` to be a function, not "+p);return n.push(p),r}}function nC(n,r){let s;return o;function o(...f){const a=n.length>f.length;let c;a&&f.push(p);try{c=n.apply(this,f)}catch(h){const d=h;if(a&&s)throw d;return p(d)}a||(c&&c.then&&typeof c.then=="function"?c.then(y,p):c instanceof Error?p(c):y(c))}function p(f,...a){s||(s=!0,r(f,...a))}function y(f){p(null,f)}}const Bn={basename:iC,dirname:rC,extname:sC,join:lC,sep:"/"};function iC(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');al(n);let s=0,o=-1,p=n.length,y;if(r===void 0||r.length===0||r.length>n.length){for(;p--;)if(n.codePointAt(p)===47){if(y){s=p+1;break}}else o<0&&(y=!0,o=p+1);return o<0?"":n.slice(s,o)}if(r===n)return"";let f=-1,a=r.length-1;for(;p--;)if(n.codePointAt(p)===47){if(y){s=p+1;break}}else f<0&&(y=!0,f=p+1),a>-1&&(n.codePointAt(p)===r.codePointAt(a--)?a<0&&(o=p):(a=-1,o=f));return s===o?o=f:o<0&&(o=n.length),n.slice(s,o)}function rC(n){if(al(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 sC(n){al(n);let r=n.length,s=-1,o=0,p=-1,y=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?p<0?p=r:y!==1&&(y=1):p>-1&&(y=-1)}return p<0||s<0||y===0||y===1&&p===s-1&&p===o+1?"":n.slice(p,s)}function lC(...n){let r=-1,s;for(;++r<n.length;)al(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":aC(s)}function aC(n){al(n);const r=n.codePointAt(0)===47;let s=oC(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function oC(n,r){let s="",o=0,p=-1,y=0,f=-1,a,c;for(;++f<=n.length;){if(f<n.length)a=n.codePointAt(f);else{if(a===47)break;a=47}if(a===47){if(!(p===f-1||y===1))if(p!==f-1&&y===2){if(s.length<2||o!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(c=s.lastIndexOf("/"),c!==s.length-1){c<0?(s="",o=0):(s=s.slice(0,c),o=s.length-1-s.lastIndexOf("/")),p=f,y=0;continue}}else if(s.length>0){s="",o=0,p=f,y=0;continue}}r&&(s=s.length>0?s+"/..":"..",o=2)}else s.length>0?s+="/"+n.slice(p+1,f):s=n.slice(p+1,f),o=f-p-1;p=f,y=0}else a===46&&y>-1?y++:y=-1}return s}function al(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const cC={cwd:uC};function uC(){return"/"}function Lu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function hC(n){if(typeof n=="string")n=new URL(n);else if(!Lu(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 fC(n)}function fC(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 p=new TypeError("File URL path must not include encoded / characters");throw p.code="ERR_INVALID_FILE_URL_PATH",p}}return decodeURIComponent(r)}const uu=["history","path","basename","stem","extname","dirname"];class Wg{constructor(r){let s;r?Lu(r)?s={path:r}:typeof r=="string"||dC(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":cC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<uu.length;){const y=uu[o];y in s&&s[y]!==void 0&&s[y]!==null&&(this[y]=y==="history"?[...s[y]]:s[y])}let p;for(p in s)uu.includes(p)||(this[p]=s[p])}get basename(){return typeof this.path=="string"?Bn.basename(this.path):void 0}set basename(r){fu(r,"basename"),hu(r,"basename"),this.path=Bn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Bn.dirname(this.path):void 0}set dirname(r){Um(this.basename,"dirname"),this.path=Bn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Bn.extname(this.path):void 0}set extname(r){if(hu(r,"extname"),Um(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=Bn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Lu(r)&&(r=hC(r)),fu(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Bn.basename(this.path,this.extname):void 0}set stem(r){fu(r,"stem"),hu(r,"stem"),this.path=Bn.join(this.dirname||"",r+(this.extname||""))}fail(r,s,o){const p=this.message(r,s,o);throw p.fatal=!0,p}info(r,s,o){const p=this.message(r,s,o);return p.fatal=void 0,p}message(r,s,o){const p=new Ut(r,s,o);return this.path&&(p.name=this.path+":"+p.name,p.file=this.path),p.fatal=!1,this.messages.push(p),p}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function hu(n,r){if(n&&n.includes(Bn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Bn.sep+"`")}function fu(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function Um(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function dC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const pC=(function(n){const o=this.constructor.prototype,p=o[n],y=function(){return p.apply(y,arguments)};return Object.setPrototypeOf(y,o),y}),mC={}.hasOwnProperty;class Ju extends pC{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=tC()}copy(){const r=new Ju;let s=-1;for(;++s<this.attachers.length;){const o=this.attachers[s];r.use(...o)}return r.data(cu(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(mu("data",this.frozen),this.namespace[r]=s,this):mC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(mu("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 p=s.call(r,...o);typeof p=="function"&&this.transformers.use(p)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=Ea(r),o=this.parser||this.Parser;return du("parse",o),o(String(s),s)}process(r,s){const o=this;return this.freeze(),du("process",this.parser||this.Parser),pu("process",this.compiler||this.Compiler),s?p(void 0,s):new Promise(p);function p(y,f){const a=Ea(r),c=o.parse(a);o.run(c,a,function(d,u,b){if(d||!u||!b)return h(d);const w=u,E=o.stringify(w,b);vC(E)?b.value=E:b.result=E,h(d,b)});function h(d,u){d||!u?f(d):y?y(u):s(void 0,u)}}}processSync(r){let s=!1,o;return this.freeze(),du("processSync",this.parser||this.Parser),pu("processSync",this.compiler||this.Compiler),this.process(r,p),Fm("processSync","process",s),o;function p(y,f){s=!0,Hm(y),o=f}}run(r,s,o){Pm(r),this.freeze();const p=this.transformers;return!o&&typeof s=="function"&&(o=s,s=void 0),o?y(void 0,o):new Promise(y);function y(f,a){const c=Ea(s);p.run(r,c,h);function h(d,u,b){const w=u||r;d?a(d):f?f(w):o(void 0,w,b)}}}runSync(r,s){let o=!1,p;return this.run(r,s,y),Fm("runSync","run",o),p;function y(f,a){Hm(f),p=a,o=!0}}stringify(r,s){this.freeze();const o=Ea(s),p=this.compiler||this.Compiler;return pu("stringify",p),Pm(r),p(r,o)}use(r,...s){const o=this.attachers,p=this.namespace;if(mu("use",this.frozen),r!=null)if(typeof r=="function")c(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 y(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[d,...u]=h;c(d,u)}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&&(p.settings=cu(!0,p.settings,h.settings))}function a(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const u=h[d];y(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,d){let u=-1,b=-1;for(;++u<o.length;)if(o[u][0]===h){b=u;break}if(b===-1)o.push([h,...d]);else if(d.length>0){let[w,...E]=d;const x=o[b][1];Mu(x)&&Mu(w)&&(w=cu(!0,x,w)),o[b]=[h,w,...E]}}}}const gC=new Ju().freeze();function du(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function pu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function mu(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 Pm(n){if(!Mu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Fm(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function Ea(n){return _C(n)?n:new Wg(n)}function _C(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function vC(n){return typeof n=="string"||yC(n)}function yC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const SC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qm=[],Vm={allowDangerousHtml:!0},bC=/^(https?|ircs?|mailto|xmpp)$/i,CC=[{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 Xg(n){const r=wC(n),s=xC(n);return EC(r.runSync(r.parse(s),s),n)}function wC(n){const r=n.rehypePlugins||qm,s=n.remarkPlugins||qm,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Vm}:Vm;return gC().use(ib).use(s).use(Zb,o).use(r)}function xC(n){const r=n.children||"",s=new Wg;return typeof r=="string"&&(s.value=r),s}function EC(n,r){const s=r.allowedElements,o=r.allowElement,p=r.components,y=r.disallowedElements,f=r.skipHtml,a=r.unwrapDisallowed,c=r.urlTransform||kC;for(const d of CC)Object.hasOwn(r,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+SC+d.id,void 0);return Zu(n,h),U1(n,{Fragment:B.Fragment,components:p,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function h(d,u,b){if(d.type==="raw"&&b&&typeof u=="number")return f?b.children.splice(u,1):b.children[u]={type:"text",value:d.value},u;if(d.type==="element"){let w;for(w in su)if(Object.hasOwn(su,w)&&Object.hasOwn(d.properties,w)){const E=d.properties[w],x=su[w];(x===null||x.includes(d.tagName))&&(d.properties[w]=c(String(E||""),w,d))}}if(d.type==="element"){let w=s?!s.includes(d.tagName):y?y.includes(d.tagName):!1;if(!w&&o&&typeof u=="number"&&(w=!o(d,u,b)),w&&b&&typeof u=="number")return a&&d.children?b.children.splice(u,1,...d.children):b.children.splice(u,1),u}}}function kC(n){const r=n.indexOf(":"),s=n.indexOf("?"),o=n.indexOf("#"),p=n.indexOf("/");return r===-1||p!==-1&&r>p||s!==-1&&r>s||o!==-1&&r>o||bC.test(n.slice(0,r))?n:""}function Gm(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let o=0,p=s.indexOf(r);for(;p!==-1;)o++,p=s.indexOf(r,p+r.length);return o}function AC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function TC(n,r,s){const p=Ia((s||{}).ignore||[]),y=DC(r);let f=-1;for(;++f<y.length;)Kg(n,"text",a);function a(h,d){let u=-1,b;for(;++u<d.length;){const w=d[u],E=b?b.children:void 0;if(p(w,E?E.indexOf(w):void 0,b))return;b=w}if(b)return c(h,d)}function c(h,d){const u=d[d.length-1],b=y[f][0],w=y[f][1];let E=0;const v=u.children.indexOf(h);let S=!1,g=[];b.lastIndex=0;let _=b.exec(h.value);for(;_;){const A=_.index,M={index:_.index,input:_.input,stack:[...d,h]};let D=w(..._,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=A+1:(E!==A&&g.push({type:"text",value:h.value.slice(E,A)}),Array.isArray(D)?g.push(...D):D&&g.push(D),E=A+_[0].length,S=!0),!b.global)break;_=b.exec(h.value)}return S?(E<h.value.length&&g.push({type:"text",value:h.value.slice(E)}),u.children.splice(v,1,...g)):g=[h],v+g.length}}function DC(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 p=s[o];r.push([RC(p[0]),MC(p[1])])}return r}function RC(n){return typeof n=="string"?new RegExp(AC(n),"g"):n}function MC(n){return typeof n=="function"?n:function(){return n}}const gu="phrasing",_u=["autolink","link","image","label"];function LC(){return{transforms:[IC],enter:{literalAutolink:BC,literalAutolinkEmail:vu,literalAutolinkHttp:vu,literalAutolinkWww:vu},exit:{literalAutolink:HC,literalAutolinkEmail:zC,literalAutolinkHttp:NC,literalAutolinkWww:jC}}}function OC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:gu,notInConstruct:_u},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:gu,notInConstruct:_u},{character:":",before:"[ps]",after:"\\/",inConstruct:gu,notInConstruct:_u}]}}function BC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function vu(n){this.config.enter.autolinkProtocol.call(this,n)}function NC(n){this.config.exit.autolinkProtocol.call(this,n)}function jC(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 zC(n){this.config.exit.autolinkEmail.call(this,n)}function HC(n){this.exit(n)}function IC(n){TC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,UC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),PC]],{ignore:["link","linkReference"]})}function UC(n,r,s,o,p){let y="";if(!Qg(p)||(/^w/i.test(r)&&(s=r+s,r="",y="http://"),!FC(s)))return!1;const f=qC(s+o);if(!f[0])return!1;const a={type:"link",title:null,url:y+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[a,{type:"text",value:f[1]}]:a}function PC(n,r,s,o){return!Qg(o,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function FC(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 qC(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 p=Gm(n,"(");let y=Gm(n,")");for(;o!==-1&&p>y;)n+=s.slice(0,o+1),s=s.slice(o+1),o=s.indexOf(")"),y++;return[n,s]}function Qg(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||er(s)||ja(s))&&(!r||s!==47)}Zg.peek=ZC;function VC(){this.buffer()}function GC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function $C(){this.buffer()}function YC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function KC(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 WC(n){this.exit(n)}function XC(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 QC(n){this.exit(n)}function ZC(){return"["}function Zg(n,r,s,o){const p=s.createTracker(o);let y=p.move("[^");const f=s.enter("footnoteReference"),a=s.enter("reference");return y+=p.move(s.safe(s.associationId(n),{after:"]",before:y})),a(),f(),y+=p.move("]"),y}function JC(){return{enter:{gfmFootnoteCallString:VC,gfmFootnoteCall:GC,gfmFootnoteDefinitionLabelString:$C,gfmFootnoteDefinition:YC},exit:{gfmFootnoteCallString:KC,gfmFootnoteCall:WC,gfmFootnoteDefinitionLabelString:XC,gfmFootnoteDefinition:QC}}}function ew(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:Zg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(o,p,y,f){const a=y.createTracker(f);let c=a.move("[^");const h=y.enter("footnoteDefinition"),d=y.enter("label");return c+=a.move(y.safe(y.associationId(o),{before:c,after:"]"})),d(),c+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),c+=a.move((r?`
|
|
65
|
-
`:" ")+y.indentLines(y.containerFlow(o,a.current()),r?Jg:tw))),h(),c}}function tw(n,r,s){return r===0?n:Jg(n,r,s)}function Jg(n,r,s){return(s?"":" ")+n}const nw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];e_.peek=aw;function iw(){return{canContainEols:["delete"],enter:{strikethrough:sw},exit:{strikethrough:lw}}}function rw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:nw}],handlers:{delete:e_}}}function sw(n){this.enter({type:"delete",children:[]},n)}function lw(n){this.exit(n)}function e_(n,r,s,o){const p=s.createTracker(o),y=s.enter("strikethrough");let f=p.move("~~");return f+=s.containerPhrasing(n,{...p.current(),before:f,after:"~"}),f+=p.move("~~"),y(),f}function aw(){return"~"}function ow(n){return n.length}function cw(n,r){const s=r||{},o=(s.align||[]).concat(),p=s.stringLength||ow,y=[],f=[],a=[],c=[];let h=0,d=-1;for(;++d<n.length;){const x=[],v=[];let S=-1;for(n[d].length>h&&(h=n[d].length);++S<n[d].length;){const g=uw(n[d][S]);if(s.alignDelimiters!==!1){const _=p(g);v[S]=_,(c[S]===void 0||_>c[S])&&(c[S]=_)}x.push(g)}f[d]=x,a[d]=v}let u=-1;if(typeof o=="object"&&"length"in o)for(;++u<h;)y[u]=$m(o[u]);else{const x=$m(o);for(;++u<h;)y[u]=x}u=-1;const b=[],w=[];for(;++u<h;){const x=y[u];let v="",S="";x===99?(v=":",S=":"):x===108?v=":":x===114&&(S=":");let g=s.alignDelimiters===!1?1:Math.max(1,c[u]-v.length-S.length);const _=v+"-".repeat(g)+S;s.alignDelimiters!==!1&&(g=v.length+g+S.length,g>c[u]&&(c[u]=g),w[u]=g),b[u]=_}f.splice(1,0,b),a.splice(1,0,w),d=-1;const E=[];for(;++d<f.length;){const x=f[d],v=a[d];u=-1;const S=[];for(;++u<h;){const g=x[u]||"";let _="",A="";if(s.alignDelimiters!==!1){const M=c[u]-(v[u]||0),D=y[u];D===114?_=" ".repeat(M):D===99?M%2?(_=" ".repeat(M/2+.5),A=" ".repeat(M/2-.5)):(_=" ".repeat(M/2),A=_):A=" ".repeat(M)}s.delimiterStart!==!1&&!u&&S.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&g==="")&&(s.delimiterStart!==!1||u)&&S.push(" "),s.alignDelimiters!==!1&&S.push(_),S.push(g),s.alignDelimiters!==!1&&S.push(A),s.padding!==!1&&S.push(" "),(s.delimiterEnd!==!1||u!==h-1)&&S.push("|")}E.push(s.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return E.join(`
|
|
66
|
-
`)}function uw(n){return n==null?"":String(n)}function $m(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 hw(n,r,s,o){const p=s.enter("blockquote"),y=s.createTracker(o);y.move("> "),y.shift(2);const f=s.indentLines(s.containerFlow(n,y.current()),fw);return p(),f}function fw(n,r,s){return">"+(s?"":" ")+n}function dw(n,r){return Ym(n,r.inConstruct,!0)&&!Ym(n,r.notInConstruct,!1)}function Ym(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 Km(n,r,s,o){let p=-1;for(;++p<s.unsafe.length;)if(s.unsafe[p].character===`
|
|
67
|
-
`&&dw(s.stack,s.unsafe[p]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
68
|
-
`}function pw(n,r){const s=String(n);let o=s.indexOf(r),p=o,y=0,f=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===p?++y>f&&(f=y):y=1,p=o+r.length,o=s.indexOf(r,p);return f}function mw(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 gw(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 _w(n,r,s,o){const p=gw(s),y=n.value||"",f=p==="`"?"GraveAccent":"Tilde";if(mw(n,s)){const u=s.enter("codeIndented"),b=s.indentLines(y,vw);return u(),b}const a=s.createTracker(o),c=p.repeat(Math.max(pw(y,p)+1,3)),h=s.enter("codeFenced");let d=a.move(c);if(n.lang){const u=s.enter(`codeFencedLang${f}`);d+=a.move(s.safe(n.lang,{before:d,after:" ",encode:["`"],...a.current()})),u()}if(n.lang&&n.meta){const u=s.enter(`codeFencedMeta${f}`);d+=a.move(" "),d+=a.move(s.safe(n.meta,{before:d,after:`
|
|
69
|
-
`,encode:["`"],...a.current()})),u()}return d+=a.move(`
|
|
70
|
-
`),y&&(d+=a.move(y+`
|
|
71
|
-
`)),d+=a.move(c),h(),d}function vw(n,r,s){return(s?"":" ")+n}function eh(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 yw(n,r,s,o){const p=eh(s),y=p==='"'?"Quote":"Apostrophe",f=s.enter("definition");let a=s.enter("label");const c=s.createTracker(o);let h=c.move("[");return h+=c.move(s.safe(s.associationId(n),{before:h,after:"]",...c.current()})),h+=c.move("]: "),a(),!n.url||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(a=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":`
|
|
72
|
-
`,...c.current()}))),a(),n.title&&(a=s.enter(`title${y}`),h+=c.move(" "+p),h+=c.move(s.safe(n.title,{before:h,after:p,...c.current()})),h+=c.move(p),a()),f(),h}function Sw(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 rl(n){return"&#x"+n.toString(16).toUpperCase()+";"}function Oa(n,r,s){const o=Xr(n),p=Xr(r);return o===void 0?p===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:p===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?p===void 0?{inside:!1,outside:!1}:p===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:p===void 0?{inside:!1,outside:!1}:p===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}t_.peek=bw;function t_(n,r,s,o){const p=Sw(s),y=s.enter("emphasis"),f=s.createTracker(o),a=f.move(p);let c=f.move(s.containerPhrasing(n,{after:p,before:a,...f.current()}));const h=c.charCodeAt(0),d=Oa(o.before.charCodeAt(o.before.length-1),h,p);d.inside&&(c=rl(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=Oa(o.after.charCodeAt(0),u,p);b.inside&&(c=c.slice(0,-1)+rl(u));const w=f.move(p);return y(),s.attentionEncodeSurroundingInfo={after:b.outside,before:d.outside},a+c+w}function bw(n,r,s){return s.options.emphasis||"*"}function Cw(n,r){let s=!1;return Zu(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return s=!0,Du}),!!((!n.depth||n.depth<3)&&Gu(n)&&(r.options.setext||s))}function ww(n,r,s,o){const p=Math.max(Math.min(6,n.depth||1),1),y=s.createTracker(o);if(Cw(n,s)){const d=s.enter("headingSetext"),u=s.enter("phrasing"),b=s.containerPhrasing(n,{...y.current(),before:`
|
|
73
|
-
`,after:`
|
|
74
|
-
`});return u(),d(),b+`
|
|
75
|
-
`+(p===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
76
|
-
`))+1))}const f="#".repeat(p),a=s.enter("headingAtx"),c=s.enter("phrasing");y.move(f+" ");let h=s.containerPhrasing(n,{before:"# ",after:`
|
|
77
|
-
`,...y.current()});return/^[\t ]/.test(h)&&(h=rl(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),c(),a(),h}n_.peek=xw;function n_(n){return n.value||""}function xw(){return"<"}i_.peek=Ew;function i_(n,r,s,o){const p=eh(s),y=p==='"'?"Quote":"Apostrophe",f=s.enter("image");let a=s.enter("label");const c=s.createTracker(o);let h=c.move("![");return h+=c.move(s.safe(n.alt,{before:h,after:"]",...c.current()})),h+=c.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(a=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":")",...c.current()}))),a(),n.title&&(a=s.enter(`title${y}`),h+=c.move(" "+p),h+=c.move(s.safe(n.title,{before:h,after:p,...c.current()})),h+=c.move(p),a()),h+=c.move(")"),f(),h}function Ew(){return"!"}r_.peek=kw;function r_(n,r,s,o){const p=n.referenceType,y=s.enter("imageReference");let f=s.enter("label");const a=s.createTracker(o);let c=a.move("![");const h=s.safe(n.alt,{before:c,after:"]",...a.current()});c+=a.move(h+"]["),f();const d=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=d,y(),p==="full"||!h||h!==u?c+=a.move(u+"]"):p==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function kw(){return"!"}s_.peek=Aw;function s_(n,r,s){let o=n.value||"",p="`",y=-1;for(;new RegExp("(^|[^`])"+p+"([^`]|$)").test(o);)p+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++y<s.unsafe.length;){const f=s.unsafe[y],a=s.compilePattern(f);let c;if(f.atBreak)for(;c=a.exec(o);){let h=c.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(c.index+1)}}return p+o+p}function Aw(){return"`"}function l_(n,r){const s=Gu(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))}a_.peek=Tw;function a_(n,r,s,o){const p=eh(s),y=p==='"'?"Quote":"Apostrophe",f=s.createTracker(o);let a,c;if(l_(n,s)){const d=s.stack;s.stack=[],a=s.enter("autolink");let u=f.move("<");return u+=f.move(s.containerPhrasing(n,{before:u,after:">",...f.current()})),u+=f.move(">"),a(),s.stack=d,u}a=s.enter("link"),c=s.enter("label");let h=f.move("[");return h+=f.move(s.containerPhrasing(n,{before:h,after:"](",...f.current()})),h+=f.move("]("),c(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(c=s.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(s.safe(n.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=s.enter("destinationRaw"),h+=f.move(s.safe(n.url,{before:h,after:n.title?" ":")",...f.current()}))),c(),n.title&&(c=s.enter(`title${y}`),h+=f.move(" "+p),h+=f.move(s.safe(n.title,{before:h,after:p,...f.current()})),h+=f.move(p),c()),h+=f.move(")"),a(),h}function Tw(n,r,s){return l_(n,s)?"<":"["}o_.peek=Dw;function o_(n,r,s,o){const p=n.referenceType,y=s.enter("linkReference");let f=s.enter("label");const a=s.createTracker(o);let c=a.move("[");const h=s.containerPhrasing(n,{before:c,after:"]",...a.current()});c+=a.move(h+"]["),f();const d=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=d,y(),p==="full"||!h||h!==u?c+=a.move(u+"]"):p==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Dw(){return"["}function th(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 Rw(n){const r=th(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 Mw(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 c_(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 Lw(n,r,s,o){const p=s.enter("list"),y=s.bulletCurrent;let f=n.ordered?Mw(s):th(s);const a=n.ordered?f==="."?")":".":Rw(s);let c=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&&(c=!0),c_(s)===f&&d){let u=-1;for(;++u<n.children.length;){const b=n.children[u];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(f=a),s.bulletCurrent=f;const h=s.containerFlow(n,o);return s.bulletLastUsed=f,s.bulletCurrent=y,p(),h}function Ow(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 Bw(n,r,s,o){const p=Ow(s);let y=s.bulletCurrent||th(s);r&&r.type==="list"&&r.ordered&&(y=(typeof r.start=="number"&&r.start>-1?r.start:1)+(s.options.incrementListMarker===!1?0:r.children.indexOf(n))+y);let f=y.length+1;(p==="tab"||p==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const a=s.createTracker(o);a.move(y+" ".repeat(f-y.length)),a.shift(f);const c=s.enter("listItem"),h=s.indentLines(s.containerFlow(n,a.current()),d);return c(),h;function d(u,b,w){return b?(w?"":" ".repeat(f))+u:(w?y:y+" ".repeat(f-y.length))+u}}function Nw(n,r,s,o){const p=s.enter("paragraph"),y=s.enter("phrasing"),f=s.containerPhrasing(n,o);return y(),p(),f}const jw=Ia(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zw(n,r,s,o){return(n.children.some(function(f){return jw(f)})?s.containerPhrasing:s.containerFlow).call(s,n,o)}function Hw(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}u_.peek=Iw;function u_(n,r,s,o){const p=Hw(s),y=s.enter("strong"),f=s.createTracker(o),a=f.move(p+p);let c=f.move(s.containerPhrasing(n,{after:p,before:a,...f.current()}));const h=c.charCodeAt(0),d=Oa(o.before.charCodeAt(o.before.length-1),h,p);d.inside&&(c=rl(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=Oa(o.after.charCodeAt(0),u,p);b.inside&&(c=c.slice(0,-1)+rl(u));const w=f.move(p+p);return y(),s.attentionEncodeSurroundingInfo={after:b.outside,before:d.outside},a+c+w}function Iw(n,r,s){return s.options.strong||"*"}function Uw(n,r,s,o){return s.safe(n.value,o)}function Pw(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 Fw(n,r,s){const o=(c_(s)+(s.options.ruleSpaces?" ":"")).repeat(Pw(s));return s.options.ruleSpaces?o.slice(0,-1):o}const h_={blockquote:hw,break:Km,code:_w,definition:yw,emphasis:t_,hardBreak:Km,heading:ww,html:n_,image:i_,imageReference:r_,inlineCode:s_,link:a_,linkReference:o_,list:Lw,listItem:Bw,paragraph:Nw,root:zw,strong:u_,text:Uw,thematicBreak:Fw};function qw(){return{enter:{table:Vw,tableData:Wm,tableHeader:Wm,tableRow:$w},exit:{codeText:Yw,table:Gw,tableData:yu,tableHeader:yu,tableRow:yu}}}function Vw(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 Gw(n){this.exit(n),this.data.inTable=void 0}function $w(n){this.enter({type:"tableRow",children:[]},n)}function yu(n){this.exit(n)}function Wm(n){this.enter({type:"tableCell",children:[]},n)}function Yw(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,Kw));const s=this.stack[this.stack.length-1];s.type,s.value=r,this.exit(n)}function Kw(n,r){return r==="|"?r:n}function Ww(n){const r=n||{},s=r.tableCellPadding,o=r.tablePipeAlign,p=r.stringLength,y=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
78
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:f,tableCell:c,tableRow:a}};function f(w,E,x,v){return h(d(w,x,v),w.align)}function a(w,E,x,v){const S=u(w,x,v),g=h([S]);return g.slice(0,g.indexOf(`
|
|
79
|
-
`))}function c(w,E,x,v){const S=x.enter("tableCell"),g=x.enter("phrasing"),_=x.containerPhrasing(w,{...v,before:y,after:y});return g(),S(),_}function h(w,E){return cw(w,{align:E,alignDelimiters:o,padding:s,stringLength:p})}function d(w,E,x){const v=w.children;let S=-1;const g=[],_=E.enter("table");for(;++S<v.length;)g[S]=u(v[S],E,x);return _(),g}function u(w,E,x){const v=w.children;let S=-1;const g=[],_=E.enter("tableRow");for(;++S<v.length;)g[S]=c(v[S],w,E,x);return _(),g}function b(w,E,x){let v=h_.inlineCode(w,E,x);return x.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function Xw(){return{exit:{taskListCheckValueChecked:Xm,taskListCheckValueUnchecked:Xm,paragraph:Zw}}}function Qw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Jw}}}function Xm(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function Zw(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 p=r.children;let y=-1,f;for(;++y<p.length;){const a=p[y];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 Jw(n,r,s,o){const p=n.children[0],y=typeof n.checked=="boolean"&&p&&p.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",a=s.createTracker(o);y&&a.move(f);let c=h_.listItem(n,r,s,{...o,...a.current()});return y&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(d){return d+f}}function ex(){return[LC(),JC(),iw(),qw(),Xw()]}function tx(n){return{extensions:[OC(),ew(n),rw(),Ww(n),Qw()]}}const nx={tokenize:ox,partial:!0},f_={tokenize:cx,partial:!0},d_={tokenize:ux,partial:!0},p_={tokenize:hx,partial:!0},ix={tokenize:fx,partial:!0},m_={name:"wwwAutolink",tokenize:lx,previous:__},g_={name:"protocolAutolink",tokenize:ax,previous:v_},ii={name:"emailAutolink",tokenize:sx,previous:y_},Nn={};function rx(){return{text:Nn}}let Ji=48;for(;Ji<123;)Nn[Ji]=ii,Ji++,Ji===58?Ji=65:Ji===91&&(Ji=97);Nn[43]=ii;Nn[45]=ii;Nn[46]=ii;Nn[95]=ii;Nn[72]=[ii,g_];Nn[104]=[ii,g_];Nn[87]=[ii,m_];Nn[119]=[ii,m_];function sx(n,r,s){const o=this;let p,y;return f;function f(u){return!Ou(u)||!y_.call(o,o.previous)||nh(o.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return Ou(u)?(n.consume(u),a):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(ix,d,h)(u):u===45||u===95||It(u)?(y=!0,n.consume(u),c):d(u)}function h(u){return n.consume(u),p=!0,c}function d(u){return y&&p&&qt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(u)):s(u)}}function lx(n,r,s){const o=this;return p;function p(f){return f!==87&&f!==119||!__.call(o,o.previous)||nh(o.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(nx,n.attempt(f_,n.attempt(d_,y),s),s)(f))}function y(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function ax(n,r,s){const o=this;let p="",y=!1;return f;function f(u){return(u===72||u===104)&&v_.call(o,o.previous)&&!nh(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),p+=String.fromCodePoint(u),n.consume(u),a):s(u)}function a(u){if(qt(u)&&p.length<5)return p+=String.fromCodePoint(u),n.consume(u),a;if(u===58){const b=p.toLowerCase();if(b==="http"||b==="https")return n.consume(u),c}return s(u)}function c(u){return u===47?(n.consume(u),y?h:(y=!0,c)):s(u)}function h(u){return u===null||Ra(u)||ot(u)||er(u)||ja(u)?s(u):n.attempt(f_,n.attempt(d_,d),s)(u)}function d(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(u)}}function ox(n,r,s){let o=0;return p;function p(f){return(f===87||f===119)&&o<3?(o++,n.consume(f),p):f===46&&o===3?(n.consume(f),y):s(f)}function y(f){return f===null?s(f):r(f)}}function cx(n,r,s){let o,p,y;return f;function f(h){return h===46||h===95?n.check(p_,c,a)(h):h===null||ot(h)||er(h)||h!==45&&ja(h)?c(h):(y=!0,n.consume(h),f)}function a(h){return h===95?o=!0:(p=o,o=void 0),n.consume(h),f}function c(h){return p||o||!y?s(h):r(h)}}function ux(n,r){let s=0,o=0;return p;function p(f){return f===40?(s++,n.consume(f),p):f===41&&o<s?y(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(p_,r,y)(f):f===null||ot(f)||er(f)?r(f):(n.consume(f),p)}function y(f){return f===41&&o++,n.consume(f),p}}function hx(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),y):a===93?(n.consume(a),p):a===60||a===null||ot(a)||er(a)?r(a):s(a)}function p(a){return a===null||a===40||a===91||ot(a)||er(a)?r(a):o(a)}function y(a){return qt(a)?f(a):s(a)}function f(a){return a===59?(n.consume(a),o):qt(a)?(n.consume(a),f):s(a)}}function fx(n,r,s){return o;function o(y){return n.consume(y),p}function p(y){return It(y)?s(y):r(y)}}function __(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||ot(n)}function v_(n){return!qt(n)}function y_(n){return!(n===47||Ou(n))}function Ou(n){return n===43||n===45||n===46||n===95||It(n)}function nh(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 dx={tokenize:bx,partial:!0};function px(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vx,continuation:{tokenize:yx},exit:Sx}},text:{91:{name:"gfmFootnoteCall",tokenize:_x},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:mx,resolveTo:gx}}}}function mx(n,r,s){const o=this;let p=o.events.length;const y=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let f;for(;p--;){const c=o.events[p][1];if(c.type==="labelImage"){f=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!f||!f._balanced)return s(c);const h=An(o.sliceSerialize({start:f.end,end:o.now()}));return h.codePointAt(0)!==94||!y.includes(h.slice(1))?s(c):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),r(c))}}function gx(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)},p={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};p.end.column++,p.end.offset++,p.end._bufferIndex++;const y={type:"gfmFootnoteCallString",start:Object.assign({},p.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},y.start),end:Object.assign({},y.end)},a=[n[s+1],n[s+2],["enter",o,r],n[s+3],n[s+4],["enter",p,r],["exit",p,r],["enter",y,r],["enter",f,r],["exit",f,r],["exit",y,r],n[n.length-2],n[n.length-1],["exit",o,r]];return n.splice(s,n.length-s+1,...a),n}function _x(n,r,s){const o=this,p=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let y=0,f;return a;function a(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?s(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(u){if(y>999||u===93&&!f||u===null||u===91||ot(u))return s(u);if(u===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return p.includes(An(o.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(u)}return ot(u)||(f=!0),y++,n.consume(u),u===92?d:h}function d(u){return u===91||u===92||u===93?(n.consume(u),y++,h):h(u)}}function vx(n,r,s){const o=this,p=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let y,f=0,a;return c;function c(E){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",d):s(E)}function d(E){if(f>999||E===93&&!a||E===null||E===91||ot(E))return s(E);if(E===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return y=An(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return ot(E)||(a=!0),f++,n.consume(E),E===92?u:d}function u(E){return E===91||E===92||E===93?(n.consume(E),f++,d):d(E)}function b(E){return E===58?(n.enter("definitionMarker"),n.consume(E),n.exit("definitionMarker"),p.includes(y)||p.push(y),Ke(n,w,"gfmFootnoteDefinitionWhitespace")):s(E)}function w(E){return r(E)}}function yx(n,r,s){return n.check(ll,r,n.attempt(dx,r,s))}function Sx(n){n.exit("gfmFootnoteDefinition")}function bx(n,r,s){const o=this;return Ke(n,p,"gfmFootnoteDefinitionIndent",5);function p(y){const f=o.events[o.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(y):s(y)}}function Cx(n){let s=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:y,resolveAll:p};return s==null&&(s=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function p(f,a){let c=-1;for(;++c<f.length;)if(f[c][0]==="enter"&&f[c][1].type==="strikethroughSequenceTemporary"&&f[c][1]._close){let h=c;for(;h--;)if(f[h][0]==="exit"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._open&&f[c][1].end.offset-f[c][1].start.offset===f[h][1].end.offset-f[h][1].start.offset){f[c][1].type="strikethroughSequence",f[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},f[h][1].start),end:Object.assign({},f[c][1].end)},u={type:"strikethroughText",start:Object.assign({},f[h][1].end),end:Object.assign({},f[c][1].start)},b=[["enter",d,a],["enter",f[h][1],a],["exit",f[h][1],a],["enter",u,a]],w=a.parser.constructs.insideSpan.null;w&&hn(b,b.length,0,za(w,f.slice(h+1,c),a)),hn(b,b.length,0,[["exit",u,a],["enter",f[c][1],a],["exit",f[c][1],a],["exit",d,a]]),hn(f,h-1,c-h+3,b),c=h+b.length-2;break}}for(c=-1;++c<f.length;)f[c][1].type==="strikethroughSequenceTemporary"&&(f[c][1].type="data");return f}function y(f,a,c){const h=this.previous,d=this.events;let u=0;return b;function b(E){return h===126&&d[d.length-1][1].type!=="characterEscape"?c(E):(f.enter("strikethroughSequenceTemporary"),w(E))}function w(E){const x=Xr(h);if(E===126)return u>1?c(E):(f.consume(E),u++,w);if(u<2&&!s)return c(E);const v=f.exit("strikethroughSequenceTemporary"),S=Xr(E);return v._open=!S||S===2&&!!x,v._close=!x||x===2&&!!S,a(E)}}}class wx{constructor(){this.map=[]}add(r,s,o){xx(this,r,s,o)}consume(r){if(this.map.sort(function(y,f){return y[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 p=o.pop();for(;p;){for(const y of p)r.push(y);p=o.pop()}this.map.length=0}}function xx(n,r,s,o){let p=0;if(!(s===0&&o.length===0)){for(;p<n.map.length;){if(n.map[p][0]===r){n.map[p][1]+=s,n.map[p][2].push(...o);return}p+=1}n.map.push([r,s,o])}}function Ex(n,r){let s=!1;const o=[];for(;r<n.length;){const p=n[r];if(s){if(p[0]==="enter")p[1].type==="tableContent"&&o.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(p[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const y=o.length-1;o[y]=o[y]==="left"?"center":"right"}}else if(p[1].type==="tableDelimiterRow")break}else p[0]==="enter"&&p[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return o}function kx(){return{flow:{null:{name:"table",tokenize:Ax,resolveAll:Tx}}}}function Ax(n,r,s){const o=this;let p=0,y=0,f;return a;function a(N){let I=o.events.length-1;for(;I>-1;){const Y=o.events[I][1].type;if(Y==="lineEnding"||Y==="linePrefix")I--;else break}const P=I>-1?o.events[I][1].type:null,F=P==="tableHead"||P==="tableRow"?D:c;return F===D&&o.parser.lazy[o.now().line]?s(N):F(N)}function c(N){return n.enter("tableHead"),n.enter("tableRow"),h(N)}function h(N){return N===124||(f=!0,y+=1),d(N)}function d(N){return N===null?s(N):Ne(N)?y>1?(y=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),w):s(N):Ve(N)?Ke(n,d,"whitespace")(N):(y+=1,f&&(f=!1,p+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),f=!0,d):(n.enter("data"),u(N)))}function u(N){return N===null||N===124||ot(N)?(n.exit("data"),d(N)):(n.consume(N),N===92?b:u)}function b(N){return N===92||N===124?(n.consume(N),u):u(N)}function w(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?s(N):(n.enter("tableDelimiterRow"),f=!1,Ve(N)?Ke(n,E,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):E(N))}function E(N){return N===45||N===58?v(N):N===124?(f=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),x):M(N)}function x(N){return Ve(N)?Ke(n,v,"whitespace")(N):v(N)}function v(N){return N===58?(y+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),S):N===45?(y+=1,S(N)):N===null||Ne(N)?A(N):M(N)}function S(N){return N===45?(n.enter("tableDelimiterFiller"),g(N)):M(N)}function g(N){return N===45?(n.consume(N),g):N===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),_):(n.exit("tableDelimiterFiller"),_(N))}function _(N){return Ve(N)?Ke(n,A,"whitespace")(N):A(N)}function A(N){return N===124?E(N):N===null||Ne(N)?!f||p!==y?M(N):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(N)):M(N)}function M(N){return s(N)}function D(N){return n.enter("tableRow"),T(N)}function T(N){return N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),T):N===null||Ne(N)?(n.exit("tableRow"),r(N)):Ve(N)?Ke(n,T,"whitespace")(N):(n.enter("data"),k(N))}function k(N){return N===null||N===124||ot(N)?(n.exit("data"),T(N)):(n.consume(N),N===92?R:k)}function R(N){return N===92||N===124?(n.consume(N),k):k(N)}}function Tx(n,r){let s=-1,o=!0,p=0,y=[0,0,0,0],f=[0,0,0,0],a=!1,c=0,h,d,u;const b=new wx;for(;++s<n.length;){const w=n[s],E=w[1];w[0]==="enter"?E.type==="tableHead"?(a=!1,c!==0&&(Qm(b,r,c,h,d),d=void 0,c=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(s,0,[["enter",h,r]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=!0,u=void 0,y=[0,0,0,0],f=[0,s+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(s,0,[["enter",d,r]])),p=E.type==="tableDelimiterRow"?2:d?3:1):p&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(o=!1,f[2]===0&&(y[1]!==0&&(f[0]=f[1],u=ka(b,r,y,p,void 0,u),y=[0,0,0,0]),f[2]=s)):E.type==="tableCellDivider"&&(o?o=!1:(y[1]!==0&&(f[0]=f[1],u=ka(b,r,y,p,void 0,u)),y=f,f=[y[1],s,0,0])):E.type==="tableHead"?(a=!0,c=s):E.type==="tableRow"||E.type==="tableDelimiterRow"?(c=s,y[1]!==0?(f[0]=f[1],u=ka(b,r,y,p,s,u)):f[1]!==0&&(u=ka(b,r,f,p,s,u)),p=0):p&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&Qm(b,r,c,h,d),b.consume(r.events),s=-1;++s<r.events.length;){const w=r.events[s];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=Ex(r.events,s))}return n}function ka(n,r,s,o,p,y){const f=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";s[0]!==0&&(y.end=Object.assign({},$r(r.events,s[0])),n.add(s[0],0,[["exit",y,r]]));const c=$r(r.events,s[1]);if(y={type:f,start:Object.assign({},c),end:Object.assign({},c)},n.add(s[1],0,[["enter",y,r]]),s[2]!==0){const h=$r(r.events,s[2]),d=$r(r.events,s[3]),u={type:a,start:Object.assign({},h),end:Object.assign({},d)};if(n.add(s[2],0,[["enter",u,r]]),o!==2){const b=r.events[s[2]],w=r.events[s[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",s[3]>s[2]+1){const E=s[2]+1,x=s[3]-s[2]-1;n.add(E,x,[])}}n.add(s[3]+1,0,[["exit",u,r]])}return p!==void 0&&(y.end=Object.assign({},$r(r.events,p)),n.add(p,0,[["exit",y,r]]),y=void 0),y}function Qm(n,r,s,o,p){const y=[],f=$r(r.events,s);p&&(p.end=Object.assign({},f),y.push(["exit",p,r])),o.end=Object.assign({},f),y.push(["exit",o,r]),n.add(s+1,0,y)}function $r(n,r){const s=n[r],o=s[0]==="enter"?"start":"end";return s[1][o]}const Dx={name:"tasklistCheck",tokenize:Mx};function Rx(){return{text:{91:Dx}}}function Mx(n,r,s){const o=this;return p;function p(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?s(c):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),y)}function y(c){return ot(c)?(n.enter("taskListCheckValueUnchecked"),n.consume(c),n.exit("taskListCheckValueUnchecked"),f):c===88||c===120?(n.enter("taskListCheckValueChecked"),n.consume(c),n.exit("taskListCheckValueChecked"),f):s(c)}function f(c){return c===93?(n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):s(c)}function a(c){return Ne(c)?r(c):Ve(c)?n.check({tokenize:Lx},r,s)(c):s(c)}}function Lx(n,r,s){return Ke(n,o,"whitespace");function o(p){return p===null?s(p):r(p)}}function Ox(n){return Dg([rx(),px(),Cx(n),kx(),Rx()])}const Bx={};function S_(n){const r=this,s=n||Bx,o=r.data(),p=o.micromarkExtensions||(o.micromarkExtensions=[]),y=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),f=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);p.push(Ox(s)),y.push(ex()),f.push(tx(s))}const Nx=500,Ce={getAppPreferences(){return Me("/api/settings/preferences")},updateAppPreferences(n){return Me("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return Me("/api/diagnostics/runtime")},getCurrentProject(){return Me("/api/projects/current")},pullCurrentProject(){return Me("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return Me("/api/projects/recent")},connectProject(n){return Me("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Me("/api/tasks")},createTask(n){return Me("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return Me(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(){return Me("/api/projects/harness")},applyHarness(){return Me("/api/projects/harness/apply",{method:"POST"})},getHarnessBootstrapStatus(){return Me("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return Me("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Me(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Me(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return Me(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return Me(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return Me(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return Me(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},dispatchRoleCommand(n,r){return Me(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return Me(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Me(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Me(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Me(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return Me(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return Me(`/api/tasks/${encodeURIComponent(n)}/round`)},getCodexReviewState(n){return Me(`/api/tasks/${encodeURIComponent(n)}/codex-review`)},updateCodexReviewSettings(n,r){return Me(`/api/tasks/${encodeURIComponent(n)}/codex-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestCodexReviewGate(n,r){return Me(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/request`,{method:"POST"})},retryCodexReviewGate(n,r){return Me(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/retry`,{method:"POST"})},skipCodexReviewGate(n,r,s){return Me(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideCodexReviewGate(n,r,s){return Me(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getCodexReviewReport(n,r){return Me(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/report`)},startTranslationSession(n,r){return Me(`/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)),Me(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,r,s){return Me(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return Me(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return Me(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return Me(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},retryTranslation(n,r){return Me(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return Me(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return Me(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getCodexTranslationState(){return Me("/api/translation/codex/state")},browseCodexTranslationSourceFiles(n={}){const r=new URLSearchParams;n.path&&r.set("path",n.path),n.query&&r.set("query",n.query),n.limit!==void 0&&r.set("limit",String(n.limit));const s=r.toString()?`?${r.toString()}`:"";return Me(`/api/translation/codex/source-files${s}`)},createCodexFileTranslation(n){return Me("/api/translation/codex/files",{method:"POST",body:JSON.stringify(n)})},readCodexFileTranslation(n){return Me(`/api/translation/codex/files/${encodeURIComponent(n)}`)},createCodexBootstrap(n){return Me("/api/translation/codex/bootstrap",{method:"POST",body:JSON.stringify(n)})},createCodexMemoryUpdate(n){return Me("/api/translation/codex/memory-update",{method:"POST",body:JSON.stringify(n)})},promoteCodexTranslation(n,r){return Me(`/api/translation/codex/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return Me("/api/gateway/status")},updateGatewaySettings(n){return Me("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return Me("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return Me("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return Me("/api/gateway/binding/reset",{method:"POST"})}};async function Me(n,r={}){var p,y,f;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 a=await o.json().catch(()=>null),c=(p=a==null?void 0:a.error)!=null&&p.hint?`${a.error.message} ${a.error.hint}`:((y=a==null?void 0:a.error)==null?void 0:y.message)??`Request failed: ${o.status}`,h=(f=a==null?void 0:a.error)==null?void 0:f.runtime,d=h?` [backend ${h.version??"unknown"} pid=${h.pid??"unknown"} cwd=${h.cwd??"unknown"}]`:"";throw new Error(`${c}${d}`)}return o.json()}const Ba=`
|
|
80
|
-
|
|
81
|
-
--- Translation ---
|
|
82
|
-
`;function jx({active:n=!0,autoSendEnabled:r,targetLanguage:s,taskSlug:o,role:p,sessionId:y}){const[f,a]=he.useState([]),[c,h]=he.useState([]),[d,u]=he.useState(""),[b,w]=he.useState(!1),[E,x]=he.useState("ready"),[v,S]=he.useState(""),[g,_]=he.useState(Date.now()),[A,M]=he.useState(!1),[D,T]=he.useState(""),[k,R]=he.useState(0),N=he.useRef(n),I=he.useRef(1),P=he.useRef(null);he.useEffect(()=>{N.current=n},[n]),he.useEffect(()=>{a([]),h([]),T(""),x("ready"),S(""),I.current=1;let j=!1,ee;const ae=()=>{j||(ee=window.setTimeout(ge,N.current?200:1e3))},ge=async()=>{if(!j)try{const K=await Ce.pollTranslationSession(y,I.current);if(j)return;W(K.events),I.current=K.nextCursor,x(K.status),N.current&&S(Qx(new Date().toISOString()))}catch(K){j||T(K instanceof Error?K.message:"Translation poll failed.")}finally{ae()}};return Ce.startTranslationSession(o,p).then(K=>{j||(x(K.status),I.current=K.nextCursor,ge())}).catch(K=>{j||T(K instanceof Error?K.message:"Translation start failed.")}),()=>{j=!0,ee!==void 0&&window.clearTimeout(ee),Ce.stopTranslationSession(y).catch(()=>{})}},[y,o,p]),he.useEffect(()=>{if(!n)return;const j=P.current;if(!j)return;const ee=window.requestAnimationFrame(()=>{j.scrollTop=j.scrollHeight});return()=>window.cancelAnimationFrame(ee)},[n,k]);const F=qx(f);he.useEffect(()=>{if(!F)return;_(Date.now());const j=window.setInterval(()=>_(Date.now()),250);return()=>window.clearInterval(j)},[F]);async function Y(j=!1){const ee=d;M(!0),T(""),w(!1);try{const ae=await Ce.translateUserInput(o,p,{text:ee,mode:j?"auto-send":"review-before-send",useContext:!1,send:j});ae.sent?(u(""),w(!1)):(u(b_(ee,ae.englishPreview)),w(!0))}catch(ae){T(ae instanceof Error?ae.message:"Translation failed.")}finally{M(!1)}}function W(j){if(j.length===0)return;for(const ae of j)ae.type==="status"?x(ae.status):ae.type==="error"?T(ae.message):ae.type==="failures"&&h(ae.failures);const ee=j.filter(ae=>ae.type==="entry");ee.length>0&&(a(ae=>{const ge=ee.reduce((q,ce)=>Wx(q,ce.entry),ae),K=Gx(ge);return K.removedIds.size>0&&h(q=>q.filter(ce=>!K.removedIds.has(ce.translationId))),K.entries}),R(ae=>ae+1))}async function G(){const j=b?Jm(d):d;if(j.trim()){M(!0),T("");try{await Ce.sendTranslatedInput(o,p,{englishText:j}),u(""),w(!1)}catch(ee){T(ee instanceof Error?ee.message:"Failed to send English input.")}finally{M(!1)}}}function $(j){j.key!=="Enter"||j.shiftKey||j.nativeEvent.isComposing||(j.preventDefault(),!A&&d.trim()&&(b?G():Y(r)))}async function Q(){a([]),h([]),I.current=1,await Ce.clearTranslationSession(y).catch(j=>T(j.message))}async function H(){M(!0),T("");try{const j=await Ce.ignoreTranslationFailures(y);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to ignore translation failures.")}finally{M(!1)}}async function O(){M(!0),T("");try{const j=await Ce.retryTranslationFailures(y);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to retry translation failures.")}finally{M(!1)}}const z=Vx(f,E,g),V=c.length;return B.jsxs("aside",{className:"translation-panel",children:[B.jsxs("header",{className:"translation-panel-header",children:[B.jsxs("div",{className:"translation-panel-titlebar",children:[B.jsx("h2",{children:"Translation"}),B.jsxs("div",{className:"translation-panel-actions",children:[V>0?B.jsxs(B.Fragment,{children:[B.jsxs("button",{type:"button",disabled:A,onClick:()=>void H(),children:["Ignore ",V]}),B.jsxs("button",{type:"button",disabled:A,onClick:()=>void O(),children:["Retry ",V]})]}):null,B.jsx("button",{type:"button",onClick:()=>void Q(),children:"Clear"})]})]}),B.jsxs("div",{className:"translation-status-row",children:[B.jsxs("p",{children:["Codex · target ",zx(s)," · ",z]}),B.jsx("p",{children:v?`poll ${v}`:"poll -"})]})]}),D?B.jsx("div",{className:"error-banner",children:D}):null,B.jsxs("div",{className:"translation-entry-list",ref:P,children:[f.length===0?B.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,f.map(j=>B.jsx(Px,{entry:j},j.id))]}),B.jsx("div",{className:"translation-composer",children:B.jsxs("div",{className:"translation-composer-row",children:[B.jsx("textarea",{value:d,onChange:j=>{u(j.target.value),(!j.target.value.trim()||b&&!Kx(j.target.value))&&w(!1)},onKeyDown:$,placeholder:"输入中文,先翻译成英文工程指令..."}),B.jsx("div",{className:"translation-composer-actions",children:B.jsx("button",{type:"button",disabled:A||!b||!Jm(d).trim(),onClick:()=>void G(),children:"Send English"})})]})})]})}function zx(n){var r;return((r=pg.find(s=>s.value===n))==null?void 0:r.label)??n}function Hx({open:n,taskSlug:r,targetLanguage:s,onClose:o}){const[p,y]=he.useState(!1),[f,a]=he.useState(""),[c,h]=he.useState(null),[d,u]=he.useState(""),[b,w]=he.useState(""),[E,x]=he.useState(""),[v,S]=he.useState(!1),[g,_]=he.useState(null),[A,M]=he.useState(""),[D,T]=he.useState(""),[k,R]=he.useState(""),[N,I]=he.useState(!1);he.useEffect(()=>{if(!n)return;let $=!1,Q;const H=async()=>{$||(await P(!0),$||(Q=window.setTimeout(H,2e3)))};return H(),()=>{$=!0,Q!==void 0&&window.clearTimeout(Q)}},[n,d]);async function P($=!1){try{const Q=await Ce.getCodexTranslationState();h(Q);const H=d?Q.fileIndex.jobs.some(O=>O.id===d):!1;if((!d||!H)&&Q.fileIndex.jobs[0])F(Q.fileIndex.jobs[0].id);else if(!Q.fileIndex.jobs[0])u(""),w(""),x("");else if($&&d){const O=await Ce.readCodexFileTranslation(d);w(O.output),x(O.report)}}catch(Q){a(Q instanceof Error?Q.message:"Failed to load file translations.")}}async function F($){u($),w(""),x("");try{const Q=await Ce.readCodexFileTranslation($);w(Q.output),x(Q.report)}catch(Q){a(Q instanceof Error?Q.message:"Failed to read translated file.")}}async function Y(){S(!0),await W(A,D)}async function W($="",Q=""){I(!0),a("");try{const H=await Ce.browseCodexTranslationSourceFiles({path:$,query:Q,limit:250});_(H),M(H.currentPath),T(Q)}catch(H){a(H instanceof Error?H.message:"Failed to browse source files.")}finally{I(!1)}}async function G($=k){const Q=$.trim();if(!(!Q||!r)){y(!0),a("");try{const H=await Ce.createCodexFileTranslation({taskSlug:r,sourcePath:Q,targetLanguage:s});S(!1),await P(),await F(H.id)}catch(H){a(H instanceof Error?H.message:"Failed to create file translation.")}finally{y(!1)}}}return n?B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"modal-backdrop file-translation-backdrop",children:B.jsx(Ux,{busy:p,error:f,state:c,selectedJobId:d,output:b,report:E,onClose:()=>{S(!1),o()},onRefresh:()=>void P(),onSelectJob:$=>void F($),onTranslate:()=>void Y()})}),v?B.jsx(Ix,{busy:p||N,state:g,currentPath:A,query:D,selectedPath:k,onBrowse:($,Q)=>void W($,Q),onClose:()=>S(!1),onQueryChange:T,onSelectPath:R,onTranslate:()=>void G()}):null]}):null}function Ix({busy:n,state:r,currentPath:s,query:o,selectedPath:p,onBrowse:y,onClose:f,onQueryChange:a,onSelectPath:c,onTranslate:h}){const d=(r==null?void 0:r.entries)??[],u=d.filter(w=>w.type==="directory"),b=d.filter(w=>w.type==="file");return B.jsx("div",{className:"modal-backdrop translation-file-browser-backdrop",children:B.jsxs("section",{className:"translation-file-browser-modal",role:"dialog","aria-modal":"true","aria-label":"Select Source File",children:[B.jsxs("header",{children:[B.jsxs("div",{children:[B.jsx("h2",{children:"Select Source File"}),B.jsx("p",{children:s||"."})]}),B.jsx("button",{type:"button",onClick:f,children:"Close"})]}),B.jsxs("div",{className:"translation-file-browser-controls",children:[B.jsxs("div",{className:"translation-file-browser-nav",children:[B.jsx("button",{type:"button",disabled:n||!s,onClick:()=>y((r==null?void 0:r.parentPath)??"",""),children:"Up"}),B.jsx("button",{type:"button",disabled:n||!s,onClick:()=>y("",""),children:"Root"})]}),B.jsxs("form",{className:"translation-file-browser-search",onSubmit:w=>{w.preventDefault(),y(s,o)},children:[B.jsx("input",{value:o,onChange:w=>a(w.target.value),placeholder:"Search files"}),B.jsx("button",{type:"submit",disabled:n,children:"Search"}),B.jsx("button",{type:"button",disabled:n||!o,onClick:()=>y(s,""),children:"Clear"})]})]}),B.jsxs("div",{className:"translation-file-browser-layout",children:[B.jsxs("div",{className:"translation-file-browser-list",children:[n&&!r?B.jsx("p",{className:"muted",children:"Loading files..."}):null,!n&&d.length===0?B.jsx("p",{className:"muted",children:"No source files found."}):null,u.length>0?B.jsxs("div",{className:"translation-file-browser-group",children:[B.jsx("h3",{children:"Folders"}),u.map(w=>B.jsx(Zm,{entry:w,selected:p===w.path,onBrowse:y,onSelectPath:c},w.path))]}):null,b.length>0?B.jsxs("div",{className:"translation-file-browser-group",children:[B.jsx("h3",{children:"Files"}),b.map(w=>B.jsx(Zm,{entry:w,selected:p===w.path,onBrowse:y,onSelectPath:c},w.path))]}):null,r!=null&&r.truncated?B.jsx("p",{className:"translation-entry-note",children:"Result limit reached."}):null]}),B.jsxs("aside",{className:"translation-file-browser-selection",children:[B.jsxs("label",{children:[B.jsx("span",{children:"Source path"}),B.jsx("input",{value:p,onChange:w=>c(w.target.value)})]}),B.jsx("button",{type:"button",disabled:n||!p.trim(),onClick:h,children:"Translate File"})]})]})]})})}function Zm({entry:n,selected:r,onBrowse:s,onSelectPath:o}){const p=n.type==="directory";return B.jsxs("button",{className:r?"translation-file-browser-entry is-selected":"translation-file-browser-entry",type:"button",onClick:()=>p?s(n.path,""):o(n.path),onDoubleClick:()=>p?s(n.path,""):void 0,children:[B.jsx("span",{children:p?"DIR":"FILE"}),B.jsx("strong",{children:n.name}),B.jsx("small",{children:n.path})]})}function Ux({busy:n,error:r,state:s,selectedJobId:o,output:p,report:y,onClose:f,onRefresh:a,onSelectJob:c,onTranslate:h}){const d=(s==null?void 0:s.fileIndex.jobs)??[],u=d.find(b=>b.id===o);return B.jsxs("section",{className:"file-translation-modal",role:"dialog","aria-modal":"true","aria-label":"File Translation",children:[B.jsxs("header",{className:"file-translation-header",children:[B.jsxs("div",{children:[B.jsx("h2",{children:"File Translation"}),B.jsx("p",{children:"Codex · 中英互译"})]}),B.jsxs("div",{className:"file-translation-toolbar",children:[B.jsx("button",{type:"button",disabled:n,onClick:h,children:"Translate"}),B.jsx("button",{type:"button",disabled:n,onClick:a,children:"Refresh"}),B.jsx("button",{type:"button",onClick:f,children:"Close"})]})]}),r?B.jsx("div",{className:"error-banner",children:r}):null,s!=null&&s.memoryInitialized?null:B.jsx("p",{className:"translation-entry-note",children:"Translation memory is not initialized. Run Bootstrap from the sidebar before important file translations."}),B.jsxs("div",{className:"file-translation-layout",children:[B.jsxs("div",{className:"file-translation-list",children:[d.length===0?B.jsx("p",{className:"muted",children:"No translated files yet."}):null,d.map(b=>B.jsxs("button",{className:b.id===o?"file-translation-item is-active":"file-translation-item",type:"button",onClick:()=>c(b.id),children:[B.jsx("strong",{children:b.sourcePath}),B.jsxs("span",{children:[b.status," · ",b.targetLanguage]})]},b.id))]}),B.jsx("div",{className:"file-translation-preview",children:u?B.jsxs(B.Fragment,{children:[B.jsxs("header",{children:[B.jsx("strong",{children:u.sourcePath}),B.jsx("span",{children:u.status})]}),B.jsx("div",{className:"translation-markdown",children:B.jsx(Xg,{remarkPlugins:[S_],children:p||y||"Translation output is not available yet."})})]}):B.jsx("p",{className:"muted",children:"Select a translated file to preview it."})})]})]})}function Px({entry:n}){if(n.sourceKind==="conversation-boundary")return B.jsx(Fx,{entry:n});const r=Yx(n),s=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",p=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return B.jsxs("article",{className:p,children:[s?B.jsx("pre",{children:r}):B.jsx("div",{className:"translation-markdown",children:B.jsx(Xg,{remarkPlugins:[S_],children:r})}),n.warning?B.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?B.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function Fx({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,o=Zx(n.occurredAt??n.createdAt);return B.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${o}`,children:[B.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),B.jsx("span",{children:r}),B.jsxs("span",{children:["第 ",s," 轮"]}),B.jsx("time",{children:o}),B.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function qx(n){const r=n.find(ih);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function Vx(n,r,s){const o=n.find(ih);if(o)return`translating ${Xx(Math.max(0,s-$x(o)))}`;const p=n.at(-1);return(p==null?void 0:p.status)==="failed"||r==="failed"?"error":r}function ih(n){return n.status==="queued"||n.status==="translating"}function Gx(n){const r=n.length-Nx;if(r<=0)return{entries:n,removedIds:new Set};const s=new Set;for(const o of n){if(s.size>=r)break;ih(o)||s.add(o.id)}return s.size===0?{entries:n,removedIds:s}:{entries:n.filter(o=>!s.has(o.id)),removedIds:s}}function $x(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function Yx(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.direction==="user-input-to-english"?b_(n.sourceText,n.translatedText):n.translatedText:n.translatedText||n.sourceText}function b_(n,r){return`${n.trimEnd()}${Ba}${r.trimStart()}`}function Kx(n){return n.includes(Ba)}function Jm(n){const r=n.indexOf(Ba);return r===-1?n:n.slice(r+Ba.length)}function Wx(n,r){return n.findIndex(o=>o.id===r.id)===-1?[...n,r]:n.map(o=>o.id===r.id?r:o)}function Xx(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 Qx(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function Zx(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function Jx(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}const e2={role:"codex-reviewer",permissionMode:"default",model:"gpt-5.5",effort:"xhigh"};function t2(n,r){const s=Kr.map(o=>({role:o.name,permissionMode:n.roles[o.name].permissionMode,model:n.roles[o.name].model,effort:n.roles[o.name].effort}));return r.codexReviewerEnabled&&s.push(e2),s}const n2=["architecture-plan","validation-adequacy","final-diff"];function i2({events:n,maxEvents:r=8,showHeader:s=!0}){const o=r===null?n:n.slice(-r);return B.jsxs("section",{className:"event-log",children:[s?B.jsx("h2",{children:"Events"}):null,n.length===0?B.jsx("p",{className:"muted",children:"No terminal events yet."}):B.jsx("ol",{children:o.map((p,y)=>B.jsx("li",{children:p},`${p}-${y}`))})]})}var Su={exports:{}},eg;function r2(){return eg||(eg=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(p){this._terminal=p}dispose(){}fit(){const p=this.proposeDimensions();if(!p||!this._terminal||isNaN(p.cols)||isNaN(p.rows))return;const y=this._terminal._core;this._terminal.rows===p.rows&&this._terminal.cols===p.cols||(y._renderService.clear(),this._terminal.resize(p.cols,p.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const p=this._terminal._core,y=p._renderService.dimensions;if(y.css.cell.width===0||y.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:p.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),u=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),b=h-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(b/y.css.cell.width)),rows:Math.max(1,Math.floor(u/y.css.cell.height))}}}})(),s})()))})(Su)),Su.exports}var s2=r2(),bu={exports:{}},tg;function l2(){return tg||(tg=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={6:(f,a)=>{function c(d){try{const u=new URL(d),b=u.password&&u.username?`${u.protocol}//${u.username}:${u.password}@${u.host}`:u.username?`${u.protocol}//${u.username}@${u.host}`:`${u.protocol}//${u.host}`;return d.toLocaleLowerCase().startsWith(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(d,u,b,w={}){this._terminal=d,this._regex=u,this._handler=b,this._options=w}provideLinks(d,u){const b=h.computeLink(d,this._regex,this._terminal,this._handler);u(this._addCallbacks(b))}_addCallbacks(d){return d.map((u=>(u.leave=this._options.leave,u.hover=(b,w)=>{if(this._options.hover){const{range:E}=u;this._options.hover(b,w,E)}},u)))}};class h{static computeLink(u,b,w,E){const x=new RegExp(b.source,(b.flags||"")+"g"),[v,S]=h._getWindowedLineStrings(u-1,w),g=v.join("");let _;const A=[];for(;_=x.exec(g);){const M=_[0];if(!c(M))continue;const[D,T]=h._mapStrIdx(w,S,0,_.index),[k,R]=h._mapStrIdx(w,D,T,M.length);if(D===-1||T===-1||k===-1||R===-1)continue;const N={start:{x:T+1,y:D+1},end:{x:R,y:k+1}};A.push({range:N,text:M,activate:E})}return A}static _getWindowedLineStrings(u,b){let w,E=u,x=u,v=0,S="";const g=[];if(w=b.buffer.active.getLine(u)){const _=w.translateToString(!0);if(w.isWrapped&&_[0]!==" "){for(v=0;(w=b.buffer.active.getLine(--E))&&v<2048&&(S=w.translateToString(!0),v+=S.length,g.push(S),w.isWrapped&&S.indexOf(" ")===-1););g.reverse()}for(g.push(_),v=0;(w=b.buffer.active.getLine(++x))&&w.isWrapped&&v<2048&&(S=w.translateToString(!0),v+=S.length,g.push(S),S.indexOf(" ")===-1););}return[g,E]}static _mapStrIdx(u,b,w,E){const x=u.buffer.active,v=x.getNullCell();let S=w;for(;E;){const g=x.getLine(b);if(!g)return[-1,-1];for(let _=S;_<g.length;++_){g.getCell(_,v);const A=v.getChars();if(v.getWidth()&&(E-=A.length||1,_===g.length-1&&A==="")){const M=x.getLine(b+1);M&&M.isWrapped&&(M.getCell(0,v),v.getWidth()===2&&(E+=1))}if(E<0)return[b,_]}b++,S=0}return[b,S]}}a.LinkComputer=h}},o={};function p(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f](c,c.exports,p),c.exports}var y={};return(()=>{var f=y;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const a=p(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(d,u){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(d=h,u={}){this._handler=d,this._options=u}activate(d){this._terminal=d;const u=this._options,b=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,b,this._handler,u))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),y})()))})(bu)),bu.exports}var a2=l2(),Cu={exports:{}},ng;function o2(){return ng||(ng=1,(function(n,r){(function(s,o){n.exports=o()})(globalThis,(()=>(()=>{var s={4567:function(f,a,c){var h=this&&this.__decorate||function(g,_,A,M){var D,T=arguments.length,k=T<3?_:M===null?M=Object.getOwnPropertyDescriptor(_,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,_,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(_,A,k):D(_,A))||k);return T>3&&k&&Object.defineProperty(_,A,k),k},d=this&&this.__param||function(g,_){return function(A,M){_(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const u=c(9042),b=c(9924),w=c(844),E=c(4725),x=c(2585),v=c(3656);let S=a.AccessibilityManager=class extends w.Disposable{constructor(g,_,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 b.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(`
|
|
83
|
-
`)))),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,v.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 _=0;_<g;_++)this._handleChar(" ")}_handleChar(g){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==g&&(this._charsToAnnounce+=g):this._charsToAnnounce+=g,g===`
|
|
84
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.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,_){this._liveRegionDebouncer.refresh(g,_,this._terminal.rows)}_renderRows(g,_){const A=this._terminal.buffer,M=A.lines.length.toString();for(let D=g;D<=_;D++){const T=A.lines.get(A.ydisp+D),k=[],R=(T==null?void 0:T.translateToString(!0,void 0,void 0,k))||"",N=(A.ydisp+D+1).toString(),I=this._rowElements[D];I&&(R.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=R,this._rowColumns.set(I,k)),I.setAttribute("aria-posinset",N),I.setAttribute("aria-setsize",M))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(g,_){const A=g.target,M=this._rowElements[_===0?1:this._rowElements.length-2];if(A.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||g.relatedTarget!==M)return;let D,T;if(_===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),_===0){const k=this._createAccessibilityTreeNode();this._rowElements.unshift(k),this._rowContainer.insertAdjacentElement("afterbegin",k)}else{const k=this._createAccessibilityTreeNode();this._rowElements.push(k),this._rowContainer.appendChild(k)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_===0?-1:1),this._rowElements[_===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 _={node:g.anchorNode,offset:g.anchorOffset},A={node:g.focusNode,offset:g.focusOffset};if((_.node.compareDocumentPosition(A.node)&Node.DOCUMENT_POSITION_PRECEDING||_.node===A.node&&_.offset>A.offset)&&([_,A]=[A,_]),_.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(_={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(_.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:N,offset:I})=>{const P=N instanceof Text?N.parentNode:N;let F=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const Y=this._rowColumns.get(P);if(!Y)return console.warn("columns is null. Race condition?"),null;let W=I<Y.length?Y[I]:Y.slice(-1)[0]+1;return W>=this._terminal.cols&&(++F,W=0),{row:F,column:W}},T=D(_),k=D(A);if(T&&k){if(T.row>k.row||T.row===k.row&&T.column>=k.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(k.row-T.row)*this._terminal.cols-T.column+k.column)}}_handleResize(g){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let _=this._rowContainer.children.length;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);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=S=h([d(1,x.IInstantiationService),d(2,E.ICoreBrowserService),d(3,E.IRenderService)],S)},3614:(f,a)=>{function c(b){return b.replace(/\r?\n/g,"\r")}function h(b,w){return w?"\x1B[200~"+b+"\x1B[201~":b}function d(b,w,E,x){b=h(b=c(b),E.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(b,!0),w.value=""}function u(b,w,E){const x=E.getBoundingClientRect(),v=b.clientX-x.left-10,S=b.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${v}px`,w.style.top=`${S}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=c,a.bracketTextForPaste=h,a.copyHandler=function(b,w){b.clipboardData&&b.clipboardData.setData("text/plain",w.selectionText),b.preventDefault()},a.handlePasteEvent=function(b,w,E,x){b.stopPropagation(),b.clipboardData&&d(b.clipboardData.getData("text/plain"),w,E,x)},a.paste=d,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(b,w,E,x,v){u(b,w,E),v&&x.rightClickSelect(b),w.value=x.selectionText,w.select()}},7239:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=c(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(d,u,b){this._css.set(d,u,b)}getCss(d,u){return this._css.get(d,u)}setColor(d,u,b){this._color.set(d,u,b)}getColor(d,u){return this._color.get(d,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,h,d,u){c.addEventListener(h,d,u);let b=!1;return{dispose:()=>{b||(b=!0,c.removeEventListener(h,d,u))}}}},3551:function(f,a,c){var h=this&&this.__decorate||function(S,g,_,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,_):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,_,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,_,T):M(g,_))||T);return D>3&&T&&Object.defineProperty(g,_,T),T},d=this&&this.__param||function(S,g){return function(_,A){g(_,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const u=c(3656),b=c(8460),w=c(844),E=c(2585),x=c(4725);let v=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(S,g,_,A,M){super(),this._element=S,this._mouseService=g,this._renderService=_,this._bufferService=A,this._linkProviderService=M,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new b.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new b.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,u.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(S){this._lastMouseEvent=S;const g=this._positionFromMouseEvent(S,this._element,this._mouseService);if(!g)return;this._isMouseOut=!1;const _=S.composedPath();for(let A=0;A<_.length;A++){const M=_[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(S){if(this._activeLine!==S.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(S,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,S)||(this._clearCurrentLink(),this._askForLink(S,!0))}_askForLink(S,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=S.y);let _=!1;for(const[D,T]of this._linkProviderService.linkProviders.entries())g?(M=this._activeProviderReplies)!=null&&M.get(D)&&(_=this._checkLinkProviderResult(D,S,_)):T.provideLinks(S.y,(k=>{var N,I;if(this._isMouseOut)return;const R=k==null?void 0:k.map((P=>({link:P})));(N=this._activeProviderReplies)==null||N.set(D,R),_=this._checkLinkProviderResult(D,S,_),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(S.y,this._activeProviderReplies)}))}_removeIntersectingLinks(S,g){const _=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],k=T.link.range.start.y<S?0:T.link.range.start.x,R=T.link.range.end.y>S?this._bufferService.cols:T.link.range.end.x;for(let N=k;N<=R;N++){if(_.has(N)){M.splice(D--,1);break}_.add(N)}}}}_checkLinkProviderResult(S,g,_){var D;if(!this._activeProviderReplies)return _;const A=this._activeProviderReplies.get(S);let M=!1;for(let T=0;T<S;T++)this._activeProviderReplies.has(T)&&!this._activeProviderReplies.get(T)||(M=!0);if(!M&&A){const T=A.find((k=>this._linkAtPosition(k.link,g)));T&&(_=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!_)for(let T=0;T<this._activeProviderReplies.size;T++){const k=(D=this._activeProviderReplies.get(T))==null?void 0:D.find((R=>this._linkAtPosition(R.link,g)));if(k){_=!0,this._handleNewLink(k);break}}return _}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(S){if(!this._currentLink)return;const g=this._positionFromMouseEvent(S,this._element,this._mouseService);g&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,g)&&this._currentLink.link.activate(S,this._currentLink.link.text)}_clearCurrentLink(S,g){this._currentLink&&this._lastMouseEvent&&(!S||!g||this._currentLink.link.range.start.y>=S&&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(S){if(!this._lastMouseEvent)return;const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._linkAtPosition(S.link,g)&&(this._currentLink=S,this._currentLink.state={decorations:{underline:S.link.decorations===void 0||S.link.decorations.underline,pointerCursor:S.link.decorations===void 0||S.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,S.link,this._lastMouseEvent),S.link.decorations={},Object.defineProperties(S.link.decorations,{pointerCursor:{get:()=>{var _,A;return(A=(_=this._currentLink)==null?void 0:_.state)==null?void 0:A.decorations.pointerCursor},set:_=>{var A;(A=this._currentLink)!=null&&A.state&&this._currentLink.state.decorations.pointerCursor!==_&&(this._currentLink.state.decorations.pointerCursor=_,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",_))}},underline:{get:()=>{var _,A;return(A=(_=this._currentLink)==null?void 0:_.state)==null?void 0:A.decorations.underline},set:_=>{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)!==_&&(this._currentLink.state.decorations.underline=_,this._currentLink.state.isHovered&&this._fireUnderlineEvent(S.link,_))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((_=>{if(!this._currentLink)return;const A=_.start===0?0:_.start+1+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.ydisp+1+_.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(S,g,_){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&&S.classList.add("xterm-cursor-pointer")),g.hover&&g.hover(_,g.text)}_fireUnderlineEvent(S,g){const _=S.range,A=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(_.start.x-1,_.start.y-A-1,_.end.x,_.end.y-A-1,void 0);(g?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(S,g,_){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&&S.classList.remove("xterm-cursor-pointer")),g.leave&&g.leave(_,g.text)}_linkAtPosition(S,g){const _=S.range.start.y*this._bufferService.cols+S.range.start.x,A=S.range.end.y*this._bufferService.cols+S.range.end.x,M=g.y*this._bufferService.cols+g.x;return _<=M&&M<=A}_positionFromMouseEvent(S,g,_){const A=_.getCoords(S,g,this._bufferService.cols,this._bufferService.rows);if(A)return{x:A[0],y:A[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(S,g,_,A,M){return{x1:S,y1:g,x2:_,y2:A,cols:this._bufferService.cols,fg:M}}};a.Linkifier=v=h([d(1,x.IMouseService),d(2,x.IRenderService),d(3,E.IBufferService),d(4,x.ILinkProviderService)],v)},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,c){var h=this&&this.__decorate||function(x,v,S,g){var _,A=arguments.length,M=A<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,v,S,g);else for(var D=x.length-1;D>=0;D--)(_=x[D])&&(M=(A<3?_(M):A>3?_(v,S,M):_(v,S))||M);return A>3&&M&&Object.defineProperty(v,S,M),M},d=this&&this.__param||function(x,v){return function(S,g){v(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const u=c(511),b=c(2585);let w=a.OscLinkProvider=class{constructor(x,v,S){this._bufferService=x,this._optionsService=v,this._oscLinkService=S}provideLinks(x,v){var R;const S=this._bufferService.buffer.lines.get(x-1);if(!S)return void v(void 0);const g=[],_=this._optionsService.rawOptions.linkHandler,A=new u.CellData,M=S.getTrimmedLength();let D=-1,T=-1,k=!1;for(let N=0;N<M;N++)if(T!==-1||S.hasContent(N)){if(S.loadCell(N,A),A.hasExtendedAttrs()&&A.extended.urlId){if(T===-1){T=N,D=A.extended.urlId;continue}k=A.extended.urlId!==D}else T!==-1&&(k=!0);if(k||T!==-1&&N===M-1){const I=(R=this._oscLinkService.getLinkData(D))==null?void 0:R.uri;if(I){const P={start:{x:T+1,y:x},end:{x:N+(k||N!==M-1?0:1),y:x}};let F=!1;if(!(_!=null&&_.allowNonHttpProtocols))try{const Y=new URL(I);["http:","https:"].includes(Y.protocol)||(F=!0)}catch{F=!0}F||g.push({text:I,range:P,activate:(Y,W)=>_?_.activate(Y,W,P):E(0,W),hover:(Y,W)=>{var G;return(G=_==null?void 0:_.hover)==null?void 0:G.call(_,Y,W,P)},leave:(Y,W)=>{var G;return(G=_==null?void 0:_.leave)==null?void 0:G.call(_,Y,W,P)}})}k=!1,A.hasExtendedAttrs()&&A.extended.urlId?(T=N,D=A.extended.urlId):(T=-1,D=-1)}}v(g)}};function E(x,v){if(confirm(`Do you want to navigate to ${v}?
|
|
85
|
-
|
|
86
|
-
WARNING: This link could potentially be dangerous`)){const S=window.open();if(S){try{S.opener=null}catch{}S.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([d(0,b.IBufferService),d(1,b.IOptionsService),d(2,b.IOscLinkService)],w)},6193:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(c,h){this._renderCallback=c,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,h,d){this._rowCount=d,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,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 c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=c(3614),d=c(3656),u=c(3551),b=c(9042),w=c(3730),E=c(1680),x=c(3107),v=c(5744),S=c(2950),g=c(1296),_=c(428),A=c(4269),M=c(5114),D=c(8934),T=c(3230),k=c(9312),R=c(4725),N=c(6731),I=c(8055),P=c(8969),F=c(8460),Y=c(844),W=c(6114),G=c(8437),$=c(2584),Q=c(7399),H=c(5941),O=c(9074),z=c(2585),V=c(5435),j=c(4567),ee=c(779);class ae extends P.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(K={}){super(K),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Y.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ee.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(((q,ce)=>this.refresh(q,ce)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,Y.toDisposable)((()=>{var q,ce;this._customKeyEventHandler=void 0,(ce=(q=this.element)==null?void 0:q.parentNode)==null||ce.removeChild(this.element)})))}_handleColorEvent(K){if(this._themeService)for(const q of K){let ce,le="";switch(q.index){case 256:ce="foreground",le="10";break;case 257:ce="background",le="11";break;case 258:ce="cursor",le="12";break;default:ce="ansi",le="4;"+q.index}switch(q.type){case 0:const ue=I.color.toColorRGB(ce==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[ce]);this.coreService.triggerDataEvent(`${$.C0.ESC}]${le};${(0,H.toRgbString)(ue)}${$.C1_ESCAPED.ST}`);break;case 1:if(ce==="ansi")this._themeService.modifyColors((te=>te.ansi[q.index]=I.channels.toColor(...q.color)));else{const te=ce;this._themeService.modifyColors((Se=>Se[te]=I.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(K){K?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(K){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var K;return(K=this.textarea)==null?void 0:K.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const K=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(K);if(!q)return;const ce=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,ue=q.getWidth(ce),te=this._renderService.dimensions.css.cell.width*ue,Se=this.buffer.y*this._renderService.dimensions.css.cell.height,we=ce*this._renderService.dimensions.css.cell.width;this.textarea.style.left=we+"px",this.textarea.style.top=Se+"px",this.textarea.style.width=te+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,h.copyHandler)(q,this._selectionService)})));const K=q=>(0,h.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",K)),this.register((0,d.addDisposableDomListener)(this.element,"paste",K)),W.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),W.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,h.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(K=>this._keyUp(K)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(K=>this._keyDown(K)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(K=>this._keyPress(K)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(K=>this._compositionHelper.compositionupdate(K)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(K=>this._inputEvent(K)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(K){var ce;if(!K)throw new Error("Terminal requires a parent element.");if(K.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ce=this.element)==null?void 0:ce.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=K.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"),K.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.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",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",b.promptLabel),W.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,K.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",(le=>this._handleTextAreaFocus(le)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(_.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.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((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(S.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(u.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.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(k.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{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",(le=>this._selectionService.handleMouseDown(le)))),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(j.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.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 K=this,q=this.element;function ce(te){const Se=K._mouseService.getMouseReportCoords(te,K.screenElement);if(!Se)return!1;let we,xe;switch(te.overrideType||te.type){case"mousemove":xe=32,te.buttons===void 0?(we=3,te.button!==void 0&&(we=te.button<3?te.button:3)):we=1&te.buttons?0:4&te.buttons?1:2&te.buttons?2:3;break;case"mouseup":xe=0,we=te.button<3?te.button:3;break;case"mousedown":xe=1,we=te.button<3?te.button:3;break;case"wheel":if(K._customWheelEventHandler&&K._customWheelEventHandler(te)===!1||K.viewport.getLinesScrolled(te)===0)return!1;xe=te.deltaY<0?0:1,we=4;break;default:return!1}return!(xe===void 0||we===void 0||we>4)&&K.coreMouseService.triggerMouseEvent({col:Se.col,row:Se.row,x:Se.x,y:Se.y,button:we,action:xe,ctrl:te.ctrlKey,alt:te.altKey,shift:te.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ue={mouseup:te=>(ce(te),te.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(te)),wheel:te=>(ce(te),this.cancel(te,!0)),mousedrag:te=>{te.buttons&&ce(te)},mousemove:te=>{te.buttons||ce(te)}};this.register(this.coreMouseService.onProtocolChange((te=>{te?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(te)),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&te?le.mousemove||(q.addEventListener("mousemove",ue.mousemove),le.mousemove=ue.mousemove):(q.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&te?le.wheel||(q.addEventListener("wheel",ue.wheel,{passive:!1}),le.wheel=ue.wheel):(q.removeEventListener("wheel",le.wheel),le.wheel=null),2&te?le.mouseup||(le.mouseup=ue.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&te?le.mousedrag||(le.mousedrag=ue.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(q,"mousedown",(te=>{if(te.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(te))return ce(te),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(te)}))),this.register((0,d.addDisposableDomListener)(q,"wheel",(te=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(te)===!1)return!1;if(!this.buffer.hasScrollback){const Se=this.viewport.getLinesScrolled(te);if(Se===0)return;const we=$.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(te.deltaY<0?"A":"B");let xe="";for(let nt=0;nt<Math.abs(Se);nt++)xe+=we;return this.coreService.triggerDataEvent(xe,!0),this.cancel(te,!0)}return this.viewport.handleWheel(te)?this.cancel(te):void 0}}),{passive:!1})),this.register((0,d.addDisposableDomListener)(q,"touchstart",(te=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(te),this.cancel(te)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(q,"touchmove",(te=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(te)?void 0:this.cancel(te)}),{passive:!1}))}refresh(K,q){var ce;(ce=this._renderService)==null||ce.refreshRows(K,q)}updateCursorStyle(K){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(K)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(K,q,ce=0){var le;ce===1?(super.scrollLines(K,q,ce),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(K)}paste(K){(0,h.paste)(K,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(K){this._customKeyEventHandler=K}attachCustomWheelEventHandler(K){this._customWheelEventHandler=K}registerLinkProvider(K){return this._linkProviderService.registerLinkProvider(K)}registerCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(K);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(K){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(K)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(K){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+K)}registerDecoration(K){return this._decorationService.registerDecoration(K)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(K,q,ce){this._selectionService.setSelection(K,q,ce)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var K;(K=this._selectionService)==null||K.clearSelection()}selectAll(){var K;(K=this._selectionService)==null||K.selectAll()}selectLines(K,q){var ce;(ce=this._selectionService)==null||ce.selectLines(K,q)}_keyDown(K){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&K.altKey;if(!q&&!this._compositionHelper.keydown(K))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||K.key!=="Dead"&&K.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ce=(0,Q.evaluateKeyboardEvent)(K,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(K),ce.type===3||ce.type===2){const le=this.rows-1;return this.scrollLines(ce.type===2?-le:le),this.cancel(K,!0)}return ce.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,K)||(ce.cancel&&this.cancel(K,!0),!ce.key||!!(K.key&&!K.ctrlKey&&!K.altKey&&!K.metaKey&&K.key.length===1&&K.key.charCodeAt(0)>=65&&K.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ce.key!==$.C0.ETX&&ce.key!==$.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ce.key,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(ce.key,!0),!this.optionsService.rawOptions.screenReaderMode||K.altKey||K.ctrlKey?this.cancel(K,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(K,q){const ce=K.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||K.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||K.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?ce:ce&&(!q.keyCode||q.keyCode>47)}_keyUp(K){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(K)||this.focus(),this.updateCursorStyle(K),this._keyPressHandled=!1)}_keyPress(K){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(this.cancel(K),K.charCode)q=K.charCode;else if(K.which===null||K.which===void 0)q=K.keyCode;else{if(K.which===0||K.charCode===0)return!1;q=K.which}return!(!q||(K.altKey||K.ctrlKey||K.metaKey)&&!this._isThirdLevelShift(this.browser,K)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:K}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(K){if(K.data&&K.inputType==="insertText"&&(!K.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=K.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(K),!0}return!1}resize(K,q){K!==this.cols||q!==this.rows?super.resize(K,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(K,q){var ce,le;(ce=this._charSizeService)==null||ce.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var K;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q<this.rows;q++)this.buffer.lines.push(this.buffer.getBlankLine(G.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(K=this.viewport)==null||K.reset(),this.refresh(0,this.rows-1)}}reset(){var q,ce;this.options.rows=this.rows,this.options.cols=this.cols;const K=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(ce=this.viewport)==null||ce.reset(),this._customKeyEventHandler=K,this.refresh(0,this.rows-1)}clearTextureAtlas(){var K;(K=this._renderService)==null||K.clearTextureAtlas()}_reportFocus(){var K;(K=this.element)!=null&&K.classList.contains("focus")?this.coreService.triggerDataEvent($.C0.ESC+"[I"):this.coreService.triggerDataEvent($.C0.ESC+"[O")}_reportWindowsOptions(K){if(this._renderService)switch(K){case V.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const q=this._renderService.dimensions.css.canvas.width.toFixed(0),ce=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[4;${ce};${q}t`);break;case V.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const le=this._renderService.dimensions.css.cell.width.toFixed(0),ue=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[6;${ue};${le}t`)}}cancel(K,q){if(this.options.cancelEvents||q)return K.preventDefault(),K.stopPropagation(),!1}}a.Terminal=ae},9924:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(c,h=1e3){this._renderCallback=c,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,h,d){this._rowCount=d,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const b=u-this._lastRefreshMs,w=this._debounceThresholdMS-b;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 c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h)}}},1680:function(f,a,c){var h=this&&this.__decorate||function(S,g,_,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,_):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,_,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,_,T):M(g,_))||T);return D>3&&T&&Object.defineProperty(g,_,T),T},d=this&&this.__param||function(S,g){return function(_,A){g(_,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const u=c(3656),b=c(4725),w=c(8460),E=c(844),x=c(2585);let v=a.Viewport=class extends E.Disposable{constructor(S,g,_,A,M,D,T,k){super(),this._viewportElement=S,this._scrollArea=g,this._bufferService=_,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,u.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(k.colors),this.register(k.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(S){this._viewportElement.style.backgroundColor=S.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(S){if(S)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 S=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==S&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=S),this._refreshAnimationFrame=null}syncScrollArea(S=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(S);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(S)}_handleScroll(S){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 S=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(S*(this._smoothScrollState.target-this._smoothScrollState.origin)),S<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(S,g){const _=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(g<0&&this._viewportElement.scrollTop!==0||g>0&&_<this._lastRecordedBufferHeight)||(S.cancelable&&S.preventDefault(),!1)}handleWheel(S){const g=this._getPixelsScrolled(S);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(S,g))}scrollLines(S){if(S!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const g=S*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:S,suppressScrollEvent:!1})}_getPixelsScrolled(S){if(S.deltaY===0||S.shiftKey)return 0;let g=this._applyScrollModifier(S.deltaY,S);return S.deltaMode===WheelEvent.DOM_DELTA_LINE?g*=this._currentRowHeight:S.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._currentRowHeight*this._bufferService.rows),g}getBufferElements(S,g){var k;let _,A="";const M=[],D=g??this._bufferService.buffer.lines.length,T=this._bufferService.buffer.lines;for(let R=S;R<D;R++){const N=T.get(R);if(!N)continue;const I=(k=T.get(R+1))==null?void 0:k.isWrapped;if(A+=N.translateToString(!I),!I||R===T.length-1){const P=document.createElement("div");P.textContent=A,M.push(P),A.length>0&&(_=P),A=""}}return{bufferElements:M,cursorElement:_}}getLinesScrolled(S){if(S.deltaY===0||S.shiftKey)return 0;let g=this._applyScrollModifier(S.deltaY,S);return S.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):S.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._bufferService.rows),g}_applyScrollModifier(S,g){const _=this._optionsService.rawOptions.fastScrollModifier;return _==="alt"&&g.altKey||_==="ctrl"&&g.ctrlKey||_==="shift"&&g.shiftKey?S*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:S*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(S){this._lastTouchY=S.touches[0].pageY}handleTouchMove(S){const g=this._lastTouchY-S.touches[0].pageY;return this._lastTouchY=S.touches[0].pageY,g!==0&&(this._viewportElement.scrollTop+=g,this._bubbleScroll(S,g))}};a.Viewport=v=h([d(2,x.IBufferService),d(3,x.IOptionsService),d(4,b.ICharSizeService),d(5,b.IRenderService),d(6,b.ICoreBrowserService),d(7,b.IThemeService)],v)},3107:function(f,a,c){var h=this&&this.__decorate||function(x,v,S,g){var _,A=arguments.length,M=A<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,v,S,g);else for(var D=x.length-1;D>=0;D--)(_=x[D])&&(M=(A<3?_(M):A>3?_(v,S,M):_(v,S))||M);return A>3&&M&&Object.defineProperty(v,S,M),M},d=this&&this.__param||function(x,v){return function(S,g){v(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const u=c(4725),b=c(844),w=c(2585);let E=a.BufferDecorationRenderer=class extends b.Disposable{constructor(x,v,S,g,_){super(),this._screenElement=x,this._bufferService=v,this._coreBrowserService=S,this._decorationService=g,this._renderService=_,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,b.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 v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((g=x==null?void 0:x.options)==null?void 0:g.layer)==="top"),v.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const S=x.options.x??0;return S&&S>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(x,v),v}_refreshStyle(x){const v=x.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let S=this._decorationElements.get(x);S||(S=this._createElement(x),x.element=S,this._decorationElements.set(x,S),this._container.appendChild(S),x.onDispose((()=>{this._decorationElements.delete(x),S.remove()}))),S.style.top=v*this._renderService.dimensions.css.cell.height+"px",S.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(S)}}_refreshXPosition(x,v=x.element){if(!v)return;const S=x.options.x??0;(x.options.anchor||"left")==="right"?v.style.right=S?S*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=S?S*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var v;(v=this._decorationElements.get(x))==null||v.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=E=h([d(1,w.IBufferService),d(2,u.ICoreBrowserService),d(3,w.IDecorationService),d(4,u.IRenderService)],E)},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(c){if(c.options.overviewRulerOptions){for(const h of this._zones)if(h.color===c.options.overviewRulerOptions.color&&h.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,c.marker.line))return;if(this._lineAdjacentToZone(h,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(h,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,h){return h>=c.startBufferLine&&h<=c.endBufferLine}_lineAdjacentToZone(c,h,d){return h>=c.startBufferLine-this._linePadding[d||"full"]&&h<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,h){c.startBufferLine=Math.min(c.startBufferLine,h),c.endBufferLine=Math.max(c.endBufferLine,h)}}},5744:function(f,a,c){var h=this&&this.__decorate||function(_,A,M,D){var T,k=arguments.length,R=k<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,A,M,D);else for(var N=_.length-1;N>=0;N--)(T=_[N])&&(R=(k<3?T(R):k>3?T(A,M,R):T(A,M))||R);return k>3&&R&&Object.defineProperty(A,M,R),R},d=this&&this.__param||function(_,A){return function(M,D){A(M,D,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const u=c(5871),b=c(4725),w=c(844),E=c(2585),x={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},S={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(_,A,M,D,T,k,R){var I;super(),this._viewportElement=_,this._screenElement=A,this._bufferService=M,this._decorationService=D,this._renderService=T,this._optionsService=k,this._coreBrowserService=R,this._colorZoneStore=new u.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(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const N=this._canvas.getContext("2d");if(!N)throw new Error("Ctx cannot be null");this._ctx=N,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var P;(P=this._canvas)==null||P.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const _=Math.floor(this._canvas.width/3),A=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=_,v.center=A,v.right=_,this._refreshDrawHeightConstants(),S.full=0,S.left=0,S.center=v.left,S.right=v.left+v.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const _=this._canvas.height/this._bufferService.buffer.lines.length,A=Math.round(Math.max(Math.min(_,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 _=this._colorZoneStore.zones;for(const A of _)A.position!=="full"&&this._renderColorZone(A);for(const A of _)A.position==="full"&&this._renderColorZone(A);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(_){this._ctx.fillStyle=_.color,this._ctx.fillRect(S[_.position||"full"],Math.round((this._canvas.height-1)*(_.startBufferLine/this._bufferService.buffers.active.lines.length)-x[_.position||"full"]/2),v[_.position||"full"],Math.round((this._canvas.height-1)*((_.endBufferLine-_.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[_.position||"full"]))}_queueRefresh(_,A){this._shouldUpdateDimensions=_||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,E.IBufferService),d(3,E.IDecorationService),d(4,b.IRenderService),d(5,E.IOptionsService),d(6,b.ICoreBrowserService)],g)},2950:function(f,a,c){var h=this&&this.__decorate||function(x,v,S,g){var _,A=arguments.length,M=A<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,v,S,g);else for(var D=x.length-1;D>=0;D--)(_=x[D])&&(M=(A<3?_(M):A>3?_(v,S,M):_(v,S))||M);return A>3&&M&&Object.defineProperty(v,S,M),M},d=this&&this.__param||function(x,v){return function(S,g){v(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const u=c(4725),b=c(2585),w=c(2584);let E=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,v,S,g,_,A){this._textarea=x,this._compositionView=v,this._bufferService=S,this._optionsService=g,this._coreService=_,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 v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let S;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,S=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),S.length>0&&this._coreService.triggerDataEvent(S,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,S=v.replace(x,"");this._dataAlreadySent=S,v.length>x.length?this._coreService.triggerDataEvent(S,!0):v.length<x.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):v.length===x.length&&v!==x&&this._coreService.triggerDataEvent(v,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const v=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),S=this._renderService.dimensions.css.cell.height,g=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,_=v*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=_+"px",this._compositionView.style.top=g+"px",this._compositionView.style.height=S+"px",this._compositionView.style.lineHeight=S+"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=_+"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=E=h([d(2,b.IBufferService),d(3,b.IOptionsService),d(4,b.ICoreService),d(5,u.IRenderService)],E)},9806:(f,a)=>{function c(h,d,u){const b=u.getBoundingClientRect(),w=h.getComputedStyle(u),E=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[d.clientX-b.left-E,d.clientY-b.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(h,d,u,b,w,E,x,v,S){if(!E)return;const g=c(h,d,u);return g?(g[0]=Math.ceil((g[0]+(S?x/2:0))/x),g[1]=Math.ceil(g[1]/v),g[0]=Math.min(Math.max(g[0],1),b+(S?1:0)),g[1]=Math.min(Math.max(g[1],1),w),g):void 0}},9504:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=c(2584);function d(v,S,g,_){const A=v-u(v,g),M=S-u(S,g),D=Math.abs(A-M)-(function(T,k,R){let N=0;const I=T-u(T,R),P=k-u(k,R);for(let F=0;F<Math.abs(I-P);F++){const Y=b(T,k)==="A"?-1:1,W=R.buffer.lines.get(I+Y*F);W!=null&&W.isWrapped&&N++}return N})(v,S,g);return x(D,E(b(v,S),_))}function u(v,S){let g=0,_=S.buffer.lines.get(v),A=_==null?void 0:_.isWrapped;for(;A&&v>=0&&v<S.rows;)g++,_=S.buffer.lines.get(--v),A=_==null?void 0:_.isWrapped;return g}function b(v,S){return v>S?"A":"B"}function w(v,S,g,_,A,M){let D=v,T=S,k="";for(;D!==g||T!==_;)D+=A?1:-1,A&&D>M.cols-1?(k+=M.buffer.translateBufferLineToString(T,!1,v,D),D=0,v=0,T++):!A&&D<0&&(k+=M.buffer.translateBufferLineToString(T,!1,0,v+1),D=M.cols-1,v=D,T--);return k+M.buffer.translateBufferLineToString(T,!1,v,D)}function E(v,S){const g=S?"O":"[";return h.C0.ESC+g+v}function x(v,S){v=Math.floor(v);let g="";for(let _=0;_<v;_++)g+=S;return g}a.moveToCellSequence=function(v,S,g,_){const A=g.buffer.x,M=g.buffer.y;if(!g.buffer.hasScrollback)return(function(k,R,N,I,P,F){return d(R,I,P,F).length===0?"":x(w(k,R,k,R-u(R,P),!1,P).length,E("D",F))})(A,M,0,S,g,_)+d(M,S,g,_)+(function(k,R,N,I,P,F){let Y;Y=d(R,I,P,F).length>0?I-u(I,P):R;const W=I,G=(function($,Q,H,O,z,V){let j;return j=d(H,O,z,V).length>0?O-u(O,z):Q,$<H&&j<=O||$>=H&&j<O?"C":"D"})(k,R,N,I,P,F);return x(w(k,Y,N,W,G==="C",P).length,E(G,F))})(A,M,v,S,g,_);let D;if(M===S)return D=A>v?"D":"C",x(Math.abs(A-v),E(D,_));D=M>S?"D":"C";const T=Math.abs(M-S);return x((function(k,R){return R.cols-k})(M>S?v:A,g)+(T-1)*g.cols+1+((M>S?A:v)-1),E(D,_))}},1296:function(f,a,c){var h=this&&this.__decorate||function(F,Y,W,G){var $,Q=arguments.length,H=Q<3?Y:G===null?G=Object.getOwnPropertyDescriptor(Y,W):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(F,Y,W,G);else for(var O=F.length-1;O>=0;O--)($=F[O])&&(H=(Q<3?$(H):Q>3?$(Y,W,H):$(Y,W))||H);return Q>3&&H&&Object.defineProperty(Y,W,H),H},d=this&&this.__param||function(F,Y){return function(W,G){Y(W,G,F)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const u=c(3787),b=c(2550),w=c(2223),E=c(6171),x=c(6052),v=c(4725),S=c(8055),g=c(8460),_=c(844),A=c(2585),M="xterm-dom-renderer-owner-",D="xterm-rows",T="xterm-fg-",k="xterm-bg-",R="xterm-focus",N="xterm-selection";let I=1,P=a.DomRenderer=class extends _.Disposable{constructor(F,Y,W,G,$,Q,H,O,z,V,j,ee,ae){super(),this._terminal=F,this._document=Y,this._element=W,this._screenElement=G,this._viewportElement=$,this._helperContainer=Q,this._linkifier2=H,this._charSizeService=z,this._optionsService=V,this._bufferService=j,this._coreBrowserService=ee,this._themeService=ae,this._terminalClass=I++,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(N),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ge=>this._injectCss(ge)))),this._injectCss(this._themeService.colors),this._rowFactory=O.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(M+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ge=>this._handleLinkHover(ge)))),this.register(this._linkifier2.onHideLinkUnderline((ge=>this._handleLinkLeave(ge)))),this.register((0,_.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 b.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),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 W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.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(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Y=`${this._terminalSelector} .${D} { color: ${F.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: ${S.color.multiplyOpacity(F.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 W=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,$=`blink_block_${this._terminalClass}`;Y+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,Y+=`@keyframes ${G} { 50% { box-shadow: none; }}`,Y+=`@keyframes ${$} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,Y+=`${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Y+=`${this._terminalSelector} .${N} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${N} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[Q,H]of F.ansi.entries())Y+=`${this._terminalSelector} .${T}${Q} { color: ${H.css}; }${this._terminalSelector} .${T}${Q}.xterm-dim { color: ${S.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${k}${Q} { background-color: ${H.css}; }`;Y+=`${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { color: ${S.color.opaque(F.background).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${S.color.multiplyOpacity(S.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${k}${w.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=Y}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,Y){for(let W=this._rowElements.length;W<=Y;W++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>Y;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,Y){this._refreshRowElements(F,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(F,Y,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,Y,W),this.renderRows(0,this._bufferService.rows-1),!F||!Y)return;this._selectionRenderModel.update(this._terminal,F,Y,W);const G=this._selectionRenderModel.viewportStartRow,$=this._selectionRenderModel.viewportEndRow,Q=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(Q>=this._bufferService.rows||H<0)return;const O=this._document.createDocumentFragment();if(W){const z=F[0]>Y[0];O.appendChild(this._createSelectionElement(Q,z?Y[0]:F[0],z?F[0]:Y[0],H-Q+1))}else{const z=G===Q?F[0]:0,V=Q===$?Y[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(Q,z,V));const j=H-Q-1;if(O.appendChild(this._createSelectionElement(Q+1,0,this._bufferService.cols,j)),Q!==H){const ee=$===H?Y[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(H,0,ee))}}this._selectionContainer.appendChild(O)}_createSelectionElement(F,Y,W,G=1){const $=this._document.createElement("div"),Q=Y*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(W-Y);return Q+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-Q),$.style.height=G*this.dimensions.css.cell.height+"px",$.style.top=F*this.dimensions.css.cell.height+"px",$.style.left=`${Q}px`,$.style.width=`${H}px`,$}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const F of this._rowElements)F.replaceChildren()}renderRows(F,Y){const W=this._bufferService.buffer,G=W.ybase+W.y,$=Math.min(W.x,this._bufferService.cols-1),Q=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=F;z<=Y;z++){const V=z+W.ydisp,j=this._rowElements[z],ee=W.lines.get(V);if(!j||!ee)break;j.replaceChildren(...this._rowFactory.createRow(ee,V,V===G,H,O,$,Q,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${M}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,Y,W,G,$,Q){W<0&&(F=0),G<0&&(Y=0);const H=this._bufferService.rows-1;W=Math.max(Math.min(W,H),0),G=Math.max(Math.min(G,H),0),$=Math.min($,this._bufferService.cols);const O=this._bufferService.buffer,z=O.ybase+O.y,V=Math.min(O.x,$-1),j=this._optionsService.rawOptions.cursorBlink,ee=this._optionsService.rawOptions.cursorStyle,ae=this._optionsService.rawOptions.cursorInactiveStyle;for(let ge=W;ge<=G;++ge){const K=ge+O.ydisp,q=this._rowElements[ge],ce=O.lines.get(K);if(!q||!ce)break;q.replaceChildren(...this._rowFactory.createRow(ce,K,K===z,ee,ae,V,j,this.dimensions.css.cell.width,this._widthCache,Q?ge===W?F:0:-1,Q?(ge===G?Y:$)-1:-1))}}};a.DomRenderer=P=h([d(7,A.IInstantiationService),d(8,v.ICharSizeService),d(9,A.IOptionsService),d(10,A.IBufferService),d(11,v.ICoreBrowserService),d(12,v.IThemeService)],P)},3787:function(f,a,c){var h=this&&this.__decorate||function(D,T,k,R){var N,I=arguments.length,P=I<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,k):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(D,T,k,R);else for(var F=D.length-1;F>=0;F--)(N=D[F])&&(P=(I<3?N(P):I>3?N(T,k,P):N(T,k))||P);return I>3&&P&&Object.defineProperty(T,k,P),P},d=this&&this.__param||function(D,T){return function(k,R){T(k,R,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const u=c(2223),b=c(643),w=c(511),E=c(2585),x=c(8055),v=c(4725),S=c(4269),g=c(6171),_=c(3734);let A=a.DomRendererRowFactory=class{constructor(D,T,k,R,N,I,P){this._document=D,this._characterJoinerService=T,this._optionsService=k,this._coreBrowserService=R,this._coreService=N,this._decorationService=I,this._themeService=P,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,T,k){this._selectionStart=D,this._selectionEnd=T,this._columnSelectMode=k}createRow(D,T,k,R,N,I,P,F,Y,W,G){const $=[],Q=this._characterJoinerService.getJoinedCharacters(T),H=this._themeService.colors;let O,z=D.getNoBgTrimmedLength();k&&z<I+1&&(z=I+1);let V=0,j="",ee=0,ae=0,ge=0,K=!1,q=0,ce=!1,le=0;const ue=[],te=W!==-1&&G!==-1;for(let Se=0;Se<z;Se++){D.loadCell(Se,this._workCell);let we=this._workCell.getWidth();if(we===0)continue;let xe=!1,nt=Se,Le=this._workCell;if(Q.length>0&&Se===Q[0][0]){xe=!0;const Te=Q.shift();Le=new S.JoinedCellData(this._workCell,D.translateToString(!0,Te[0],Te[1]),Te[1]-Te[0]),nt=Te[1]-1,we=Le.getWidth()}const Vt=this._isCellInSelection(Se,T),Pt=k&&Se===I,jt=te&&Se>=W&&Se<=G;let Tt=!1;this._decorationService.forEachDecorationAtCell(Se,T,void 0,(Te=>{Tt=!0}));let Gt=Le.getChars()||b.WHITESPACE_CELL_CHAR;if(Gt===" "&&(Le.isUnderline()||Le.isOverline())&&(Gt=" "),le=we*F-Y.get(Gt,Le.isBold(),Le.isItalic()),O){if(V&&(Vt&&ce||!Vt&&!ce&&Le.bg===ee)&&(Vt&&ce&&H.selectionForeground||Le.fg===ae)&&Le.extended.ext===ge&&jt===K&&le===q&&!Pt&&!xe&&!Tt){Le.isInvisible()?j+=b.WHITESPACE_CELL_CHAR:j+=Gt,V++;continue}V&&(O.textContent=j),O=this._document.createElement("span"),V=0,j=""}else O=this._document.createElement("span");if(ee=Le.bg,ae=Le.fg,ge=Le.extended.ext,K=jt,q=le,ce=Vt,xe&&I>=Se&&I<=nt&&(I=Se),!this._coreService.isCursorHidden&&Pt&&this._coreService.isCursorInitialized){if(ue.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&ue.push("xterm-cursor-blink"),ue.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":ue.push("xterm-cursor-outline");break;case"block":ue.push("xterm-cursor-block");break;case"bar":ue.push("xterm-cursor-bar");break;case"underline":ue.push("xterm-cursor-underline")}}if(Le.isBold()&&ue.push("xterm-bold"),Le.isItalic()&&ue.push("xterm-italic"),Le.isDim()&&ue.push("xterm-dim"),j=Le.isInvisible()?b.WHITESPACE_CELL_CHAR:Le.getChars()||b.WHITESPACE_CELL_CHAR,Le.isUnderline()&&(ue.push(`xterm-underline-${Le.extended.underlineStyle}`),j===" "&&(j=" "),!Le.isUnderlineColorDefault()))if(Le.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${_.AttributeData.toColorRGB(Le.getUnderlineColor()).join(",")})`;else{let Te=Le.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Le.isBold()&&Te<8&&(Te+=8),O.style.textDecorationColor=H.ansi[Te].css}Le.isOverline()&&(ue.push("xterm-overline"),j===" "&&(j=" ")),Le.isStrikethrough()&&ue.push("xterm-strikethrough"),jt&&(O.style.textDecoration="underline");let yt=Le.getFgColor(),lt=Le.getFgColorMode(),kt=Le.getBgColor(),fe=Le.getBgColorMode();const ve=!!Le.isInverse();if(ve){const Te=yt;yt=kt,kt=Te;const mt=lt;lt=fe,fe=mt}let ke,Oe,Be,me=!1;switch(this._decorationService.forEachDecorationAtCell(Se,T,void 0,(Te=>{Te.options.layer!=="top"&&me||(Te.backgroundColorRGB&&(fe=50331648,kt=Te.backgroundColorRGB.rgba>>8&16777215,ke=Te.backgroundColorRGB),Te.foregroundColorRGB&&(lt=50331648,yt=Te.foregroundColorRGB.rgba>>8&16777215,Oe=Te.foregroundColorRGB),me=Te.options.layer==="top")})),!me&&Vt&&(ke=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,kt=ke.rgba>>8&16777215,fe=50331648,me=!0,H.selectionForeground&&(lt=50331648,yt=H.selectionForeground.rgba>>8&16777215,Oe=H.selectionForeground)),me&&ue.push("xterm-decoration-top"),fe){case 16777216:case 33554432:Be=H.ansi[kt],ue.push(`xterm-bg-${kt}`);break;case 50331648:Be=x.channels.toColor(kt>>16,kt>>8&255,255&kt),this._addStyle(O,`background-color:#${M((kt>>>0).toString(16),"0",6)}`);break;default:ve?(Be=H.foreground,ue.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):Be=H.background}switch(ke||Le.isDim()&&(ke=x.color.multiplyOpacity(Be,.5)),lt){case 16777216:case 33554432:Le.isBold()&&yt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(yt+=8),this._applyMinimumContrast(O,Be,H.ansi[yt],Le,ke,void 0)||ue.push(`xterm-fg-${yt}`);break;case 50331648:const Te=x.channels.toColor(yt>>16&255,yt>>8&255,255&yt);this._applyMinimumContrast(O,Be,Te,Le,ke,Oe)||this._addStyle(O,`color:#${M(yt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,Be,H.foreground,Le,ke,Oe)||ve&&ue.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ue.length&&(O.className=ue.join(" "),ue.length=0),Pt||xe||Tt?O.textContent=j:V++,le!==this.defaultSpacing&&(O.style.letterSpacing=`${le}px`),$.push(O),Se=nt}return O&&V&&(O.textContent=j),$}_applyMinimumContrast(D,T,k,R,N,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,g.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const P=this._getContrastCache(R);let F;if(N||I||(F=P.getColor(T.rgba,k.rgba)),F===void 0){const Y=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);F=x.color.ensureContrastRatio(N||T,I||k,Y),P.setColor((N||T).rgba,(I||k).rgba,F??null)}return!!F&&(this._addStyle(D,`color:${F.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 k=this._selectionStart,R=this._selectionEnd;return!(!k||!R)&&(this._columnSelectMode?k[0]<=R[0]?D>=k[0]&&T>=k[1]&&D<R[0]&&T<=R[1]:D<k[0]&&T>=k[1]&&D>=R[0]&&T<=R[1]:T>k[1]&&T<R[1]||k[1]===R[1]&&T===k[1]&&D>=k[0]&&D<R[0]||k[1]<R[1]&&T===R[1]&&D<R[0]||k[1]<R[1]&&T===k[1]&&D>=k[0])}};function M(D,T,k){for(;D.length<k;)D=T+D;return D}a.DomRendererRowFactory=A=h([d(1,v.ICharacterJoinerService),d(2,E.IOptionsService),d(3,v.ICoreBrowserService),d(4,E.ICoreService),d(5,E.IDecorationService),d(6,v.IThemeService)],A)},2550:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(c,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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=c.createElement("span");d.classList.add("xterm-char-measure-element");const u=c.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const b=c.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontStyle="italic";const w=c.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[d,u,b,w],this._container.appendChild(d),this._container.appendChild(u),this._container.appendChild(b),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(c,h,d,u){c===this._font&&h===this._fontSize&&d===this._weight&&u===this._weightBold||(this._font=c,this._fontSize=h,this._weight=d,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(c,h,d){let u=0;if(!h&&!d&&c.length===1&&(u=c.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const E=this._measure(c,0);return E>0&&(this._flat[u]=E),E}let b=c;h&&(b+="B"),d&&(b+="I");let w=this._holey.get(b);if(w===void 0){let E=0;h&&(E|=1),d&&(E|=2),w=this._measure(c,E),w>0&&this._holey.set(b,w)}return w}_measure(c,h){const d=this._measureElements[h];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(f,a)=>{function c(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=c,a.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},a.isEmoji=h,a.allowRescaling=function(d,u,b,w){return u===1&&b>Math.ceil(1.5*w)&&d!==void 0&&d>255&&!h(d)&&!c(d)&&!(function(E){return 57344<=E&&E<=63743})(d)},a.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(u){return 9472<=u&&u<=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,u,b=0){return(d-(2*Math.round(u)-b))%(2*Math.round(u))}},6052:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{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,u,b,w=!1){if(this.selectionStart=u,this.selectionEnd=b,!u||!b||u[0]===b[0]&&u[1]===b[1])return void this.clear();const E=d.buffers.active.ydisp,x=u[1]-E,v=b[1]-E,S=Math.max(x,0),g=Math.min(v,d.rows-1);S>=d.rows||g<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=v,this.viewportCappedStartRow=S,this.viewportCappedEndRow=g,this.startCol=u[0],this.endCol=b[0])}isCellSelected(d,u,b){return!!this.hasSelection&&(b-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&b>=this.viewportCappedStartRow&&u<this.endCol&&b<=this.viewportCappedEndRow:u<this.startCol&&b>=this.viewportCappedStartRow&&u>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportStartRow&&u>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,h=this.selectionEnd;return!(!c||!h)&&(c[1]>h[1]||c[1]===h[1]&&c[0]>h[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(f,a,c){var h=this&&this.__decorate||function(g,_,A,M){var D,T=arguments.length,k=T<3?_:M===null?M=Object.getOwnPropertyDescriptor(_,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,_,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(_,A,k):D(_,A))||k);return T>3&&k&&Object.defineProperty(_,A,k),k},d=this&&this.__param||function(g,_){return function(A,M){_(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const u=c(2585),b=c(8460),w=c(844);let E=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(g,_,A){super(),this._optionsService=A,this.width=0,this.height=0,this._onCharSizeChange=this.register(new b.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new S(this._optionsService))}catch{this._measureStrategy=this.register(new v(g,_,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=E=h([d(2,u.IOptionsService)],E);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(_,A){_!==void 0&&_>0&&A!==void 0&&A>0&&(this._result.width=_,this._result.height=A)}}class v extends x{constructor(_,A,M){super(),this._document=_,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 S extends x{constructor(_){super(),this._optionsService=_,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 _=this._ctx.measureText("W");return this._validateAndSet(_.width,_.fontBoundingBoxAscent+_.fontBoundingBoxDescent),this._result}}},4269:function(f,a,c){var h=this&&this.__decorate||function(S,g,_,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,_):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,_,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,_,T):M(g,_))||T);return D>3&&T&&Object.defineProperty(g,_,T),T},d=this&&this.__param||function(S,g){return function(_,A){g(_,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(3734),b=c(643),w=c(511),E=c(2585);class x extends u.AttributeData{constructor(g,_,A){super(),this.content=0,this.combinedData="",this.fg=g.fg,this.bg=g.bg,this.combinedData=_,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 v=a.CharacterJoinerService=class C_{constructor(g){this._bufferService=g,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(g){const _={id:this._nextCharacterJoinerId++,handler:g};return this._characterJoiners.push(_),_.id}deregister(g){for(let _=0;_<this._characterJoiners.length;_++)if(this._characterJoiners[_].id===g)return this._characterJoiners.splice(_,1),!0;return!1}getJoinedCharacters(g){if(this._characterJoiners.length===0)return[];const _=this._bufferService.buffer.lines.get(g);if(!_||_.length===0)return[];const A=[],M=_.translateToString(!0);let D=0,T=0,k=0,R=_.getFg(0),N=_.getBg(0);for(let I=0;I<_.getTrimmedLength();I++)if(_.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==N){if(I-D>1){const P=this._getJoinedRanges(M,k,T,_,D);for(let F=0;F<P.length;F++)A.push(P[F])}D=I,k=T,R=this._workCell.fg,N=this._workCell.bg}T+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-D>1){const I=this._getJoinedRanges(M,k,T,_,D);for(let P=0;P<I.length;P++)A.push(I[P])}return A}_getJoinedRanges(g,_,A,M,D){const T=g.substring(_,A);let k=[];try{k=this._characterJoiners[0].handler(T)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const N=this._characterJoiners[R].handler(T);for(let I=0;I<N.length;I++)C_._mergeRanges(k,N[I])}catch(N){console.error(N)}return this._stringRangesToCellRanges(k,M,D),k}_stringRangesToCellRanges(g,_,A){let M=0,D=!1,T=0,k=g[M];if(k){for(let R=A;R<this._bufferService.cols;R++){const N=_.getWidth(R),I=_.getString(R).length||b.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!D&&k[0]<=T&&(k[0]=R,D=!0),k[1]<=T){if(k[1]=R,k=g[++M],!k)break;k[0]<=T?(k[0]=R,D=!0):D=!1}T+=I}}k&&(k[1]=this._bufferService.cols)}}static _mergeRanges(g,_){let A=!1;for(let M=0;M<g.length;M++){const D=g[M];if(A){if(_[1]<=D[0])return g[M-1][1]=_[1],g;if(_[1]<=D[1])return g[M-1][1]=Math.max(_[1],D[1]),g.splice(M,1),g;g.splice(M,1),M--}else{if(_[1]<=D[0])return g.splice(M,0,_),g;if(_[1]<=D[1])return D[0]=Math.min(_[0],D[0]),g;_[0]<D[1]&&(D[0]=Math.min(_[0],D[0]),A=!0)}}return A?g[g.length-1][1]=_[1]:g.push(_),g}};a.CharacterJoinerService=v=h([d(0,E.IBufferService)],v)},5114:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=c(844),d=c(8460),u=c(3656);class b extends h.Disposable{constructor(x,v,S){super(),this._textarea=x,this._window=v,this.mainDocument=S,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=b;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,u.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,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=c(844);class d extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(b){return this.linkProviders.push(b),{dispose:()=>{const w=this.linkProviders.indexOf(b);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=d},8934:function(f,a,c){var h=this&&this.__decorate||function(E,x,v,S){var g,_=arguments.length,A=_<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,v):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(E,x,v,S);else for(var M=E.length-1;M>=0;M--)(g=E[M])&&(A=(_<3?g(A):_>3?g(x,v,A):g(x,v))||A);return _>3&&A&&Object.defineProperty(x,v,A),A},d=this&&this.__param||function(E,x){return function(v,S){x(v,S,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const u=c(4725),b=c(9806);let w=a.MouseService=class{constructor(E,x){this._renderService=E,this._charSizeService=x}getCoords(E,x,v,S,g){return(0,b.getCoords)(window,E,x,v,S,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,g)}getMouseReportCoords(E,x){const v=(0,b.getCoordsRelativeToElement)(window,E,x);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};a.MouseService=w=h([d(0,u.IRenderService),d(1,u.ICharSizeService)],w)},3230:function(f,a,c){var h=this&&this.__decorate||function(g,_,A,M){var D,T=arguments.length,k=T<3?_:M===null?M=Object.getOwnPropertyDescriptor(_,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,_,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(_,A,k):D(_,A))||k);return T>3&&k&&Object.defineProperty(_,A,k),k},d=this&&this.__param||function(g,_){return function(A,M){_(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const u=c(6193),b=c(4725),w=c(8460),E=c(844),x=c(7226),v=c(2585);let S=a.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,_,A,M,D,T,k,R){super(),this._rowCount=g,this._charSizeService=M,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new E.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new 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 u.RenderDebouncer(((N,I)=>this._renderRows(N,I)),k),this.register(this._renderDebouncer),this.register(k.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var N;return(N=this._renderer.value)==null?void 0:N.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(k.window,_),this.register(k.onWindowChange((N=>this._registerIntersectionObserver(N,_))))}_registerIntersectionObserver(g,_){if("IntersectionObserver"in g){const A=new g.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});A.observe(_),this._observerDisposable.value=(0,E.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,_,A=!1){this._isPaused?this._needsFullRefresh=!0:(A||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(g,_,this._rowCount))}_renderRows(g,_){this._renderer.value&&(g=Math.min(g,this._rowCount-1),_=Math.min(_,this._rowCount-1),this._renderer.value.renderRows(g,_),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:_}),this._onRender.fire({start:g,end:_}),this._isNextRenderRedrawOnly=!0)}resize(g,_){this._rowCount=_,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((_=>this.refreshRows(_.start,_.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,_;this._renderer.value&&((_=(g=this._renderer.value).clearTextureAtlas)==null||_.call(g),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(g,_){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var A;return(A=this._renderer.value)==null?void 0:A.handleResize(g,_)})):this._renderer.value.handleResize(g,_),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,_,A){var M;this._selectionState.start=g,this._selectionState.end=_,this._selectionState.columnSelectMode=A,(M=this._renderer.value)==null||M.handleSelectionChanged(g,_,A)}handleCursorMove(){var g;(g=this._renderer.value)==null||g.handleCursorMove()}clear(){var g;(g=this._renderer.value)==null||g.clear()}};a.RenderService=S=h([d(2,v.IOptionsService),d(3,b.ICharSizeService),d(4,v.IDecorationService),d(5,v.IBufferService),d(6,b.ICoreBrowserService),d(7,b.IThemeService)],S)},9312:function(f,a,c){var h=this&&this.__decorate||function(k,R,N,I){var P,F=arguments.length,Y=F<3?R:I===null?I=Object.getOwnPropertyDescriptor(R,N):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(k,R,N,I);else for(var W=k.length-1;W>=0;W--)(P=k[W])&&(Y=(F<3?P(Y):F>3?P(R,N,Y):P(R,N))||Y);return F>3&&Y&&Object.defineProperty(R,N,Y),Y},d=this&&this.__param||function(k,R){return function(N,I){R(N,I,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const u=c(9806),b=c(9504),w=c(456),E=c(4725),x=c(8460),v=c(844),S=c(6114),g=c(4841),_=c(511),A=c(2585),M=" ",D=new RegExp(M,"g");let T=a.SelectionService=class extends v.Disposable{constructor(k,R,N,I,P,F,Y,W,G){super(),this._element=k,this._screenElement=R,this._linkifier=N,this._bufferService=I,this._coreService=P,this._mouseService=F,this._optionsService=Y,this._renderService=W,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new _.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=$=>this._handleMouseMove($),this._mouseUpListener=$=>this._handleMouseUp($),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim(($=>this._handleTrim($))),this.register(this._bufferService.buffers.onBufferActivate(($=>this._handleBufferActivate($)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.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 k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!k||!R||k[0]===R[0]&&k[1]===R[1])}get selectionText(){const k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!k||!R)return"";const N=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(k[0]===R[0])return"";const P=k[0]<R[0]?k[0]:R[0],F=k[0]<R[0]?R[0]:k[0];for(let Y=k[1];Y<=R[1];Y++){const W=N.translateBufferLineToString(Y,!0,P,F);I.push(W)}}else{const P=k[1]===R[1]?R[0]:void 0;I.push(N.translateBufferLineToString(k[1],!0,k[0],P));for(let F=k[1]+1;F<=R[1]-1;F++){const Y=N.lines.get(F),W=N.translateBufferLineToString(F,!0);Y!=null&&Y.isWrapped?I[I.length-1]+=W:I.push(W)}if(k[1]!==R[1]){const F=N.lines.get(R[1]),Y=N.translateBufferLineToString(R[1],!0,0,R[0]);F&&F.isWrapped?I[I.length-1]+=Y:I.push(Y)}}return I.map((P=>P.replace(D," "))).join(S.isWindows?`\r
|
|
87
|
-
`:`
|
|
88
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(k){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),S.isLinux&&k&&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(k){const R=this._getMouseBufferCoords(k),N=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(N&&I&&R)&&this._areCoordsInSelection(R,N,I)}isCellInSelection(k,R){const N=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!N||!I)&&this._areCoordsInSelection([k,R],N,I)}_areCoordsInSelection(k,R,N){return k[1]>R[1]&&k[1]<N[1]||R[1]===N[1]&&k[1]===R[1]&&k[0]>=R[0]&&k[0]<N[0]||R[1]<N[1]&&k[1]===N[1]&&k[0]<N[0]||R[1]<N[1]&&k[1]===R[1]&&k[0]>=R[0]}_selectWordAtCursor(k,R){var P,F;const N=(F=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:F.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,g.getRangeLength)(N,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(k);return!!I&&(this._selectWordAt(I,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(k,R){this._model.clearSelection(),k=Math.max(k,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,k],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(k){this._model.handleTrim(k)&&this.refresh()}_getMouseBufferCoords(k){const R=this._mouseService.getCoords(k,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(k){let R=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,k,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=N?0:(R>N&&(R-=N),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(k){return S.isMac?k.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:k.shiftKey}handleMouseDown(k){if(this._mouseDownTimeStamp=k.timeStamp,(k.button!==2||!this.hasSelection)&&k.button===0){if(!this._enabled){if(!this.shouldForceSelection(k))return;k.stopPropagation()}k.preventDefault(),this._dragScrollAmount=0,this._enabled&&k.shiftKey?this._handleIncrementalClick(k):k.detail===1?this._handleSingleClick(k):k.detail===2?this._handleDoubleClick(k):k.detail===3&&this._handleTripleClick(k),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(k){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(k))}_handleSingleClick(k){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(k)?3:0,this._model.selectionStart=this._getMouseBufferCoords(k),!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(k){this._selectWordAtCursor(k,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(k){const R=this._getMouseBufferCoords(k);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(k){return k.altKey&&!(S.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(k){if(k.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(k),!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(k),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const N=this._bufferService.buffer;if(this._model.selectionEnd[1]<N.lines.length){const I=N.lines.get(this._model.selectionEnd[1]);I&&I.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 k=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(k.ydisp+this._bufferService.rows,k.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=k.ydisp),this.refresh()}}_handleMouseUp(k){const R=k.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&k.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const N=this._mouseService.getCoords(k,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(N&&N[0]!==void 0&&N[1]!==void 0){const I=(0,b.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,N=!(!k||!R||k[0]===R[0]&&k[1]===R[1]);N?k&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&k[0]===this._oldSelectionStart[0]&&k[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(k,R,N)):this._oldHasSelection&&this._fireOnSelectionChange(k,R,N)}_fireOnSelectionChange(k,R,N){this._oldSelectionStart=k,this._oldSelectionEnd=R,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(k){this.clearSelection(),this._trimListener.dispose(),this._trimListener=k.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(k,R){let N=R;for(let I=0;R>=I;I++){const P=k.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:P>1&&R!==I&&(N+=P-1)}return N}setSelection(k,R,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[k,R],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(k){this._isClickInSelection(k)||(this._selectWordAtCursor(k,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(k,R,N=!0,I=!0){if(k[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,F=P.lines.get(k[1]);if(!F)return;const Y=P.translateBufferLineToString(k[1],!1);let W=this._convertViewportColToCharacterIndex(F,k[0]),G=W;const $=k[0]-W;let Q=0,H=0,O=0,z=0;if(Y.charAt(W)===" "){for(;W>0&&Y.charAt(W-1)===" ";)W--;for(;G<Y.length&&Y.charAt(G+1)===" ";)G++}else{let ee=k[0],ae=k[0];F.getWidth(ee)===0&&(Q++,ee--),F.getWidth(ae)===2&&(H++,ae++);const ge=F.getString(ae).length;for(ge>1&&(z+=ge-1,G+=ge-1);ee>0&&W>0&&!this._isCharWordSeparator(F.loadCell(ee-1,this._workCell));){F.loadCell(ee-1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===0?(Q++,ee--):K>1&&(O+=K-1,W-=K-1),W--,ee--}for(;ae<F.length&&G+1<Y.length&&!this._isCharWordSeparator(F.loadCell(ae+1,this._workCell));){F.loadCell(ae+1,this._workCell);const K=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,ae++):K>1&&(z+=K-1,G+=K-1),G++,ae++}}G++;let V=W+$-Q+O,j=Math.min(this._bufferService.cols,G-W+Q+H-O-z);if(R||Y.slice(W,G).trim()!==""){if(N&&V===0&&F.getCodePoint(0)!==32){const ee=P.lines.get(k[1]-1);if(ee&&F.isWrapped&&ee.getCodePoint(this._bufferService.cols-1)!==32){const ae=this._getWordAt([this._bufferService.cols-1,k[1]-1],!1,!0,!1);if(ae){const ge=this._bufferService.cols-ae.start;V-=ge,j+=ge}}}if(I&&V+j===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const ee=P.lines.get(k[1]+1);if(ee!=null&&ee.isWrapped&&ee.getCodePoint(0)!==32){const ae=this._getWordAt([0,k[1]+1],!1,!1,!0);ae&&(j+=ae.length)}}return{start:V,length:j}}}_selectWordAt(k,R){const N=this._getWordAt(k,R);if(N){for(;N.start<0;)N.start+=this._bufferService.cols,k[1]--;this._model.selectionStart=[N.start,k[1]],this._model.selectionStartLength=N.length}}_selectToWordAt(k){const R=this._getWordAt(k,!0);if(R){let N=k[1];for(;R.start<0;)R.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,N]}}_isCharWordSeparator(k){return k.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(k.getChars())>=0}_selectLineAt(k){const R=this._bufferService.buffer.getWrappedRangeForLine(k),N={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)(N,this._bufferService.cols)}};a.SelectionService=T=h([d(3,A.IBufferService),d(4,A.ICoreService),d(5,E.IMouseService),d(6,A.IOptionsService),d(7,E.IRenderService),d(8,E.ICoreBrowserService)],T)},4725:(f,a,c)=>{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=c(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,c){var h=this&&this.__decorate||function(T,k,R,N){var I,P=arguments.length,F=P<3?k:N===null?N=Object.getOwnPropertyDescriptor(k,R):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(T,k,R,N);else for(var Y=T.length-1;Y>=0;Y--)(I=T[Y])&&(F=(P<3?I(F):P>3?I(k,R,F):I(k,R))||F);return P>3&&F&&Object.defineProperty(k,R,F),F},d=this&&this.__param||function(T,k){return function(R,N){k(R,N,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const u=c(7239),b=c(8055),w=c(8460),E=c(844),x=c(2585),v=b.css.toColor("#ffffff"),S=b.css.toColor("#000000"),g=b.css.toColor("#ffffff"),_=b.css.toColor("#000000"),A={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[b.css.toColor("#2e3436"),b.css.toColor("#cc0000"),b.css.toColor("#4e9a06"),b.css.toColor("#c4a000"),b.css.toColor("#3465a4"),b.css.toColor("#75507b"),b.css.toColor("#06989a"),b.css.toColor("#d3d7cf"),b.css.toColor("#555753"),b.css.toColor("#ef2929"),b.css.toColor("#8ae234"),b.css.toColor("#fce94f"),b.css.toColor("#729fcf"),b.css.toColor("#ad7fa8"),b.css.toColor("#34e2e2"),b.css.toColor("#eeeeec")],k=[0,95,135,175,215,255];for(let R=0;R<216;R++){const N=k[R/36%6|0],I=k[R/6%6|0],P=k[R%6];T.push({css:b.channels.toCss(N,I,P),rgba:b.channels.toRgba(N,I,P)})}for(let R=0;R<24;R++){const N=8+10*R;T.push({css:b.channels.toCss(N,N,N),rgba:b.channels.toRgba(N,N,N)})}return T})());let M=a.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:S,cursor:g,cursorAccent:_,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:b.color.blend(S,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:b.color.blend(S,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 k=this._colors;if(k.foreground=D(T.foreground,v),k.background=D(T.background,S),k.cursor=D(T.cursor,g),k.cursorAccent=D(T.cursorAccent,_),k.selectionBackgroundTransparent=D(T.selectionBackground,A),k.selectionBackgroundOpaque=b.color.blend(k.background,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundTransparent=D(T.selectionInactiveBackground,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundOpaque=b.color.blend(k.background,k.selectionInactiveBackgroundTransparent),k.selectionForeground=T.selectionForeground?D(T.selectionForeground,b.NULL_COLOR):void 0,k.selectionForeground===b.NULL_COLOR&&(k.selectionForeground=void 0),b.color.isOpaque(k.selectionBackgroundTransparent)&&(k.selectionBackgroundTransparent=b.color.opacity(k.selectionBackgroundTransparent,.3)),b.color.isOpaque(k.selectionInactiveBackgroundTransparent)&&(k.selectionInactiveBackgroundTransparent=b.color.opacity(k.selectionInactiveBackgroundTransparent,.3)),k.ansi=a.DEFAULT_ANSI_COLORS.slice(),k.ansi[0]=D(T.black,a.DEFAULT_ANSI_COLORS[0]),k.ansi[1]=D(T.red,a.DEFAULT_ANSI_COLORS[1]),k.ansi[2]=D(T.green,a.DEFAULT_ANSI_COLORS[2]),k.ansi[3]=D(T.yellow,a.DEFAULT_ANSI_COLORS[3]),k.ansi[4]=D(T.blue,a.DEFAULT_ANSI_COLORS[4]),k.ansi[5]=D(T.magenta,a.DEFAULT_ANSI_COLORS[5]),k.ansi[6]=D(T.cyan,a.DEFAULT_ANSI_COLORS[6]),k.ansi[7]=D(T.white,a.DEFAULT_ANSI_COLORS[7]),k.ansi[8]=D(T.brightBlack,a.DEFAULT_ANSI_COLORS[8]),k.ansi[9]=D(T.brightRed,a.DEFAULT_ANSI_COLORS[9]),k.ansi[10]=D(T.brightGreen,a.DEFAULT_ANSI_COLORS[10]),k.ansi[11]=D(T.brightYellow,a.DEFAULT_ANSI_COLORS[11]),k.ansi[12]=D(T.brightBlue,a.DEFAULT_ANSI_COLORS[12]),k.ansi[13]=D(T.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),k.ansi[14]=D(T.brightCyan,a.DEFAULT_ANSI_COLORS[14]),k.ansi[15]=D(T.brightWhite,a.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const R=Math.min(k.ansi.length-16,T.extendedAnsi.length);for(let N=0;N<R;N++)k.ansi[N+16]=D(T.extendedAnsi[N],a.DEFAULT_ANSI_COLORS[N+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 k=0;k<this._restoreColors.ansi.length;++k)this._colors.ansi[k]=this._restoreColors.ansi[k]}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,k){if(T!==void 0)try{return b.css.toColor(T)}catch{}return k}a.ThemeService=M=h([d(0,x.IOptionsService)],M)},6349:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=c(8460),d=c(844);class u 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 E=new Array(w);for(let x=0;x<Math.min(w,this.length);x++)E[x]=this._array[this._getCyclicIndex(x)];this._array=E,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let E=this._length;E<w;E++)this._array[E]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,E){this._array[this._getCyclicIndex(w)]=E}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,E,...x){if(E){for(let v=w;v<this._length-E;v++)this._array[this._getCyclicIndex(v)]=this._array[this._getCyclicIndex(v+E)];this._length-=E,this.onDeleteEmitter.fire({index:w,amount:E})}for(let v=this._length-1;v>=w;v--)this._array[this._getCyclicIndex(v+x.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;v<x.length;v++)this._array[this._getCyclicIndex(w+v)]=x[v];if(x.length&&this.onInsertEmitter.fire({index:w,amount:x.length}),this._length+x.length>this._maxLength){const v=this._length+x.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}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,E,x){if(!(E<=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 S=E-1;S>=0;S--)this.set(w+S+x,this.get(w+S));const v=w+E+x-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v<E;v++)this.set(w+v+x,this.get(w+v))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}a.CircularList=u},1439:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(h,d=5){if(typeof h!="object")return h;const u=Array.isArray(h)?[]:{};for(const b in h)u[b]=d<=1?h[b]:h[b]&&c(h[b],d-1);return u}},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 c=0,h=0,d=0,u=0;var b,w,E,x,v;function S(_){const A=_.toString(16);return A.length<2?"0"+A:A}function g(_,A){return _<A?(A+.05)/(_+.05):(_+.05)/(A+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(_){_.toCss=function(A,M,D,T){return T!==void 0?`#${S(A)}${S(M)}${S(D)}${S(T)}`:`#${S(A)}${S(M)}${S(D)}`},_.toRgba=function(A,M,D,T=255){return(A<<24|M<<16|D<<8|T)>>>0},_.toColor=function(A,M,D,T){return{css:_.toCss(A,M,D,T),rgba:_.toRgba(A,M,D,T)}}})(b||(a.channels=b={})),(function(_){function A(M,D){return u=Math.round(255*D),[c,h,d]=v.toChannels(M.rgba),{css:b.toCss(c,h,d,u),rgba:b.toRgba(c,h,d,u)}}_.blend=function(M,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};const T=D.rgba>>24&255,k=D.rgba>>16&255,R=D.rgba>>8&255,N=M.rgba>>24&255,I=M.rgba>>16&255,P=M.rgba>>8&255;return c=N+Math.round((T-N)*u),h=I+Math.round((k-I)*u),d=P+Math.round((R-P)*u),{css:b.toCss(c,h,d),rgba:b.toRgba(c,h,d)}},_.isOpaque=function(M){return(255&M.rgba)==255},_.ensureContrastRatio=function(M,D,T){const k=v.ensureContrastRatio(M.rgba,D.rgba,T);if(k)return b.toColor(k>>24&255,k>>16&255,k>>8&255)},_.opaque=function(M){const D=(255|M.rgba)>>>0;return[c,h,d]=v.toChannels(D),{css:b.toCss(c,h,d),rgba:D}},_.opacity=A,_.multiplyOpacity=function(M,D){return u=255&M.rgba,A(M,u*D/255)},_.toColorRGB=function(M){return[M.rgba>>24&255,M.rgba>>16&255,M.rgba>>8&255]}})(w||(a.color=w={})),(function(_){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{}_.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return c=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),b.toColor(c,h,d);case 5:return c=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),u=parseInt(D.slice(4,5).repeat(2),16),b.toColor(c,h,d,u);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 c=parseInt(T[1]),h=parseInt(T[2]),d=parseInt(T[3]),u=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),b.toColor(c,h,d,u);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),[c,h,d,u]=A.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(c,h,d,u),css:D}}})(E||(a.css=E={})),(function(_){function A(M,D,T){const k=M/255,R=D/255,N=T/255;return .2126*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}_.relativeLuminance=function(M){return A(M>>16&255,M>>8&255,255&M)},_.relativeLuminance2=A})(x||(a.rgb=x={})),(function(_){function A(D,T,k){const R=D>>24&255,N=D>>16&255,I=D>>8&255;let P=T>>24&255,F=T>>16&255,Y=T>>8&255,W=g(x.relativeLuminance2(P,F,Y),x.relativeLuminance2(R,N,I));for(;W<k&&(P>0||F>0||Y>0);)P-=Math.max(0,Math.ceil(.1*P)),F-=Math.max(0,Math.ceil(.1*F)),Y-=Math.max(0,Math.ceil(.1*Y)),W=g(x.relativeLuminance2(P,F,Y),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|Y<<8|255)>>>0}function M(D,T,k){const R=D>>24&255,N=D>>16&255,I=D>>8&255;let P=T>>24&255,F=T>>16&255,Y=T>>8&255,W=g(x.relativeLuminance2(P,F,Y),x.relativeLuminance2(R,N,I));for(;W<k&&(P<255||F<255||Y<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),F=Math.min(255,F+Math.ceil(.1*(255-F))),Y=Math.min(255,Y+Math.ceil(.1*(255-Y))),W=g(x.relativeLuminance2(P,F,Y),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|Y<<8|255)>>>0}_.blend=function(D,T){if(u=(255&T)/255,u===1)return T;const k=T>>24&255,R=T>>16&255,N=T>>8&255,I=D>>24&255,P=D>>16&255,F=D>>8&255;return c=I+Math.round((k-I)*u),h=P+Math.round((R-P)*u),d=F+Math.round((N-F)*u),b.toRgba(c,h,d)},_.ensureContrastRatio=function(D,T,k){const R=x.relativeLuminance(D>>8),N=x.relativeLuminance(T>>8);if(g(R,N)<k){if(N<R){const F=A(D,T,k),Y=g(R,x.relativeLuminance(F>>8));if(Y<k){const W=M(D,T,k);return Y>g(R,x.relativeLuminance(W>>8))?F:W}return F}const I=M(D,T,k),P=g(R,x.relativeLuminance(I>>8));if(P<k){const F=A(D,T,k);return P>g(R,x.relativeLuminance(F>>8))?I:F}return I}},_.reduceLuminance=A,_.increaseLuminance=M,_.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(v||(a.rgba=v={})),a.toPaddedHex=S,a.contrastRatio=g},8969:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=c(844),d=c(2585),u=c(4348),b=c(7866),w=c(744),E=c(7302),x=c(6975),v=c(8460),S=c(1753),g=c(1480),_=c(7994),A=c(9282),M=c(5435),D=c(5981),T=c(2660);let k=!1;class R extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var P;(P=this._onScrollApi)==null||P.fire(I.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(I){for(const P in I)this.optionsService.options[P]=I[P]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new E.OptionsService(I)),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(b.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(S.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(_.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,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.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((P=>{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((P=>{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(((P,F)=>this._inputHandler.parse(P,F)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,P){this._writeBuffer.write(I,P)}writeSync(I,P){this._logService.logLevel<=d.LogLevelEnum.WARN&&!k&&(this._logService.warn("writeSync is unreliable and will be removed soon."),k=!0),this._writeBuffer.writeSync(I,P)}input(I,P=!0){this.coreService.triggerDataEvent(I,P)}resize(I,P){isNaN(I)||isNaN(P)||(I=Math.max(I,w.MINIMUM_COLS),P=Math.max(P,w.MINIMUM_ROWS),this._bufferService.resize(I,P))}scroll(I,P=!1){this._bufferService.scroll(I,P)}scrollLines(I,P,F){this._bufferService.scrollLines(I,P,F)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const P=I-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(I,P){return this._inputHandler.registerEscHandler(I,P)}registerDcsHandler(I,P){return this._inputHandler.registerDcsHandler(I,P)}registerCsiHandler(I,P){return this._inputHandler.registerCsiHandler(I,P)}registerOscHandler(I,P){return this._inputHandler.registerOscHandler(I,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?I=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(A.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,A.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const P of I)P.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=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===c)return void this._listeners.splice(h,1)}}})),this._event}fire(c,h){const d=[];for(let u=0;u<this._listeners.length;u++)d.push(this._listeners[u]);for(let u=0;u<d.length;u++)d[u].call(void 0,c,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,h){return c((d=>h.fire(d)))},a.runAndSubscribe=function(c,h){return h(void 0),c((d=>h(d)))}},5435:function(f,a,c){var h=this&&this.__decorate||function(Q,H,O,z){var V,j=arguments.length,ee=j<3?H:z===null?z=Object.getOwnPropertyDescriptor(H,O):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(Q,H,O,z);else for(var ae=Q.length-1;ae>=0;ae--)(V=Q[ae])&&(ee=(j<3?V(ee):j>3?V(H,O,ee):V(H,O))||ee);return j>3&&ee&&Object.defineProperty(H,O,ee),ee},d=this&&this.__param||function(Q,H){return function(O,z){H(O,z,Q)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const u=c(2584),b=c(7116),w=c(2015),E=c(844),x=c(482),v=c(8437),S=c(8460),g=c(643),_=c(511),A=c(3734),M=c(2585),D=c(1480),T=c(6242),k=c(6351),R=c(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function P(Q,H){if(Q>24)return H.setWinLines||!1;switch(Q){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}var F;(function(Q){Q[Q.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Q[Q.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(a.WindowsOptionsReportType=F={}));let Y=0;class W extends E.Disposable{getAttrData(){return this._curAttrData}constructor(H,O,z,V,j,ee,ae,ge,K=new w.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=O,this._coreService=z,this._logService=V,this._optionsService=j,this._oscLinkService=ee,this._coreMouseService=ae,this._unicodeService=ge,this._parser=K,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new _.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new S.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new S.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new S.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new S.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new S.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new S.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new S.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new S.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new S.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new S.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new S.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new S.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new S.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 G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,ce)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:ce.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,ce,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:ce,data:le})})),this._parser.setDcsHandlerFallback(((q,ce,le)=>{ce==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:ce,payload:le})})),this._parser.setPrintHandler(((q,ce,le)=>this.print(q,ce,le))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(u.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(u.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(u.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(u.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(u.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(u.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(u.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(u.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(u.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new T.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new T.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new T.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new T.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new T.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new T.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new T.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new T.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new T.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new T.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new T.OscHandler((q=>this.restoreCursorColor(q)))),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 q in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new k.DcsHandler(((q,ce)=>this.requestStatusString(q,ce))))}_preserveStack(H,O,z,V){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=z,this._parseStack.position=V}_logSlowResolvingAsync(H){this._logService.logLevel<=M.LogLevelEnum.WARN&&Promise.race([H,new Promise(((O,z)=>setTimeout((()=>z("#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(H,O){let z,V=this._activeBuffer.x,j=this._activeBuffer.y,ee=0;const ae=this._parseStack.paused;if(ae){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(z),z;V=this._parseStack.cursorStartX,j=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>I&&(ee=this._parseStack.position+I)}if(this._logService.logLevel<=M.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,(q=>String.fromCharCode(q))).join("")}"`),typeof H=="string"?H.split("").map((q=>q.charCodeAt(0))):H),this._parseBuffer.length<H.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(H.length,I))),ae||this._dirtyRowTracker.clearRange(),H.length>I)for(let q=ee;q<H.length;q+=I){const ce=q+I<H.length?q+I:H.length,le=typeof H=="string"?this._stringDecoder.decode(H.substring(q,ce),this._parseBuffer):this._utf8Decoder.decode(H.subarray(q,ce),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,le))return this._preserveStack(V,j,le,q),this._logSlowResolvingAsync(z),z}else if(!ae){const q=typeof H=="string"?this._stringDecoder.decode(H,this._parseBuffer):this._utf8Decoder.decode(H,this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,q))return this._preserveStack(V,j,q,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===V&&this._activeBuffer.y===j||this._onCursorMove.fire();const ge=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),K=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);K<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(K,this._bufferService.rows-1),Math.min(ge,this._bufferService.rows-1))}print(H,O,z){let V,j;const ee=this._charsetService.charset,ae=this._optionsService.rawOptions.screenReaderMode,ge=this._bufferService.cols,K=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,ce=this._curAttrData;let le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-O>0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ce);let ue=this._parser.precedingJoinState;for(let te=O;te<z;++te){if(V=H[te],V<127&&ee){const nt=ee[String.fromCharCode(V)];nt&&(V=nt.charCodeAt(0))}const Se=this._unicodeService.charProperties(V,ue);j=D.UnicodeService.extractWidth(Se);const we=D.UnicodeService.extractShouldJoin(Se),xe=we?D.UnicodeService.extractWidth(ue):0;if(ue=Se,ae&&this._onA11yChar.fire((0,x.stringFromCodePoint)(V)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+j-xe>ge){if(K){const nt=le;let Le=this._activeBuffer.x-xe;for(this._activeBuffer.x=xe,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),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),xe>0&&le instanceof v.BufferLine&&le.copyCellsFrom(nt,Le,0,xe,!1);Le<ge;)nt.setCellFromCodepoint(Le++,0,1,ce)}else if(this._activeBuffer.x=ge-1,j===2)continue}if(we&&this._activeBuffer.x){const nt=le.getWidth(this._activeBuffer.x-1)?1:2;le.addCodepointToCell(this._activeBuffer.x-nt,V,j);for(let Le=j-xe;--Le>=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}else if(q&&(le.insertCells(this._activeBuffer.x,j-xe,this._activeBuffer.getNullCell(ce)),le.getWidth(ge-1)===2&&le.setCellFromCodepoint(ge-1,g.NULL_CELL_CODE,g.NULL_CELL_WIDTH,ce)),le.setCellFromCodepoint(this._activeBuffer.x++,V,j,ce),j>0)for(;--j;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}this._parser.precedingJoinState=ue,this._activeBuffer.x<ge&&z-O>0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,ce),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,O){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,O):this._parser.registerCsiHandler(H,(z=>!P(z.params[0],this._optionsService.rawOptions.windowOptions)||O(z)))}registerDcsHandler(H,O){return this._parser.registerDcsHandler(H,new k.DcsHandler(O))}registerEscHandler(H,O){return this._parser.registerEscHandler(H,O)}registerOscHandler(H,O){return this._parser.registerOscHandler(H,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 H;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&&((H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&H.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 H=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-H),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(H=this._bufferService.cols-1){this._activeBuffer.x=Math.min(H,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(H,O){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=H,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+O)}cursorUp(H){const O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,H.params[0]||1)):this._moveCursor(0,H.params[0]||1),!0}cursorForward(H){return this._moveCursor(H.params[0]||1,0),!0}cursorBackward(H){return this._moveCursor(-(H.params[0]||1),0),!0}cursorNextLine(H){return this.cursorDown(H),this._activeBuffer.x=0,!0}cursorPrecedingLine(H){return this.cursorUp(H),this._activeBuffer.x=0,!0}cursorCharAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(H){return this._setCursor(H.length>=2?(H.params[1]||1)-1:0,(H.params[0]||1)-1),!0}charPosAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(H){return this._moveCursor(H.params[0]||1,0),!0}linePosAbsolute(H){return this._setCursor(this._activeBuffer.x,(H.params[0]||1)-1),!0}vPositionRelative(H){return this._moveCursor(0,H.params[0]||1),!0}hVPosition(H){return this.cursorPosition(H),!0}tabClear(H){const O=H.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=H.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=H.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const O=H.params[0];return O===1&&(this._curAttrData.bg|=536870912),O!==2&&O!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,O,z,V=!1,j=!1){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);ee.replaceCells(O,z,this._activeBuffer.getNullCell(this._eraseAttrData()),j),V&&(ee.isWrapped=!1)}_resetBufferLine(H,O=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),z.isWrapped=!1)}eraseInDisplay(H,O=!1){let z;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);z<this._bufferService.rows;z++)this._resetBufferLine(z,O);this._dirtyRowTracker.markDirty(z);break;case 1:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,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(H,O=!1){switch(this._restrictCursor(this._bufferService.cols),H.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(H){this._restrictCursor();let O=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y,V=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-V+1;for(;O--;)this._activeBuffer.lines.splice(j-1,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(H){this._restrictCursor();let O=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=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(z,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(H){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(H){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(H){let O=H.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(H){let O=H.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(v.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);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(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);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(H){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(H.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(H){const O=this._parser.precedingJoinState;if(!O)return!0;const z=H.params[0]||1,V=D.UnicodeService.extractWidth(O),j=this._activeBuffer.x-V,ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(j),ae=new Uint32Array(ee.length*z);let ge=0;for(let q=0;q<ee.length;){const ce=ee.codePointAt(q)||0;ae[ge++]=ce,q+=ce>65535?2:1}let K=ge;for(let q=1;q<z;++q)ae.copyWithin(K,0,ge),K+=ge;return this.print(ae,0,K),!0}sendDeviceAttributesPrimary(H){return H.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(H){return H.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let O=0;O<H.length;O++)switch(H.params[O]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(H){for(let O=0;O<H.length;O++)switch(H.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),this._charsetService.setgCharset(1,b.DEFAULT_CHARSET),this._charsetService.setgCharset(2,b.DEFAULT_CHARSET),this._charsetService.setgCharset(3,b.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(H){for(let O=0;O<H.length;O++)switch(H.params[O]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(H){for(let O=0;O<H.length;O++)switch(H.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(),H.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(H,O){const z=this._coreService.decPrivateModes,{activeProtocol:V,activeEncoding:j}=this._coreMouseService,ee=this._coreService,{buffers:ae,cols:ge}=this._bufferService,{active:K,alt:q}=ae,ce=this._optionsService.rawOptions,le=we=>we?1:2,ue=H.params[0];return te=ue,Se=O?ue===2?4:ue===4?le(ee.modes.insertMode):ue===12?3:ue===20?le(ce.convertEol):0:ue===1?le(z.applicationCursorKeys):ue===3?ce.windowOptions.setWinLines?ge===80?2:ge===132?1:0:0:ue===6?le(z.origin):ue===7?le(z.wraparound):ue===8?3:ue===9?le(V==="X10"):ue===12?le(ce.cursorBlink):ue===25?le(!ee.isCursorHidden):ue===45?le(z.reverseWraparound):ue===66?le(z.applicationKeypad):ue===67?4:ue===1e3?le(V==="VT200"):ue===1002?le(V==="DRAG"):ue===1003?le(V==="ANY"):ue===1004?le(z.sendFocus):ue===1005?4:ue===1006?le(j==="SGR"):ue===1015?4:ue===1016?le(j==="SGR_PIXELS"):ue===1048?1:ue===47||ue===1047||ue===1049?le(K===q):ue===2004?le(z.bracketedPasteMode):0,ee.triggerDataEvent(`${u.C0.ESC}[${O?"":"?"}${te};${Se}$y`),!0;var te,Se}_updateAttrColor(H,O,z,V,j){return O===2?(H|=50331648,H&=-16777216,H|=A.AttributeData.fromColorRGB([z,V,j])):O===5&&(H&=-50331904,H|=33554432|255&z),H}_extractColor(H,O,z){const V=[0,0,-1,0,0,0];let j=0,ee=0;do{if(V[ee+j]=H.params[O+ee],H.hasSubParams(O+ee)){const ae=H.getSubParams(O+ee);let ge=0;do V[1]===5&&(j=1),V[ee+ge+1+j]=ae[ge];while(++ge<ae.length&&ge+ee+1+j<V.length);break}if(V[1]===5&&ee+j>=2||V[1]===2&&ee+j>=5)break;V[1]&&(j=1)}while(++ee+O<H.length&&ee+j<V.length);for(let ae=2;ae<V.length;++ae)V[ae]===-1&&(V[ae]=0);switch(V[0]){case 38:z.fg=this._updateAttrColor(z.fg,V[1],V[3],V[4],V[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,V[1],V[3],V[4],V[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,V[1],V[3],V[4],V[5])}return ee}_processUnderline(H,O){O.extended=O.extended.clone(),(!~H||H>5)&&(H=1),O.extended.underlineStyle=H,O.fg|=268435456,H===0&&(O.fg&=-268435457),O.updateExtended()}_processSGR0(H){H.fg=v.DEFAULT_ATTR_DATA.fg,H.bg=v.DEFAULT_ATTR_DATA.bg,H.extended=H.extended.clone(),H.extended.underlineStyle=0,H.extended.underlineColor&=-67108864,H.updateExtended()}charAttributes(H){if(H.length===1&&H.params[0]===0)return this._processSGR0(this._curAttrData),!0;const O=H.length;let z;const V=this._curAttrData;for(let j=0;j<O;j++)z=H.params[j],z>=30&&z<=37?(V.fg&=-50331904,V.fg|=16777216|z-30):z>=40&&z<=47?(V.bg&=-50331904,V.bg|=16777216|z-40):z>=90&&z<=97?(V.fg&=-50331904,V.fg|=16777224|z-90):z>=100&&z<=107?(V.bg&=-50331904,V.bg|=16777224|z-100):z===0?this._processSGR0(V):z===1?V.fg|=134217728:z===3?V.bg|=67108864:z===4?(V.fg|=268435456,this._processUnderline(H.hasSubParams(j)?H.getSubParams(j)[0]:1,V)):z===5?V.fg|=536870912:z===7?V.fg|=67108864:z===8?V.fg|=1073741824:z===9?V.fg|=2147483648:z===2?V.bg|=134217728:z===21?this._processUnderline(2,V):z===22?(V.fg&=-134217729,V.bg&=-134217729):z===23?V.bg&=-67108865:z===24?(V.fg&=-268435457,this._processUnderline(0,V)):z===25?V.fg&=-536870913:z===27?V.fg&=-67108865:z===28?V.fg&=-1073741825:z===29?V.fg&=2147483647:z===39?(V.fg&=-67108864,V.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):z===49?(V.bg&=-67108864,V.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?j+=this._extractColor(H,j,V):z===53?V.bg|=1073741824:z===55?V.bg&=-1073741825:z===59?(V.extended=V.extended.clone(),V.extended.underlineColor=-1,V.updateExtended()):z===100?(V.fg&=-67108864,V.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,V.bg&=-67108864,V.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const O=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${O};${z}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const O=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${O};${z}R`)}return!0}softReset(H){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.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(H){const O=H.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 z=O%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(H){const O=H.params[0]||1;let z;return(H.length<2||(z=H.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=z-1,this._setCursor(0,0)),!0}windowOptions(H){if(!P(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;const O=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.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(H){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(H){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(H){return this._windowTitle=H,this._onTitleChange.fire(H),!0}setIconName(H){return this._iconName=H,!0}setOrReportIndexedColor(H){const O=[],z=H.split(";");for(;z.length>1;){const V=z.shift(),j=z.shift();if(/^\d+$/.exec(V)){const ee=parseInt(V);if($(ee))if(j==="?")O.push({type:0,index:ee});else{const ae=(0,R.parseColor)(j);ae&&O.push({type:1,index:ee,color:ae})}}}return O.length&&this._onColor.fire(O),!0}setHyperlink(H){const O=H.split(";");return!(O.length<2)&&(O[1]?this._createHyperlink(O[0],O[1]):!O[0]&&this._finishHyperlink())}_createHyperlink(H,O){this._getCurrentLinkId()&&this._finishHyperlink();const z=H.split(":");let V;const j=z.findIndex((ee=>ee.startsWith("id=")));return j!==-1&&(V=z[j].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(H,O){const z=H.split(";");for(let V=0;V<z.length&&!(O>=this._specialColors.length);++V,++O)if(z[V]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const j=(0,R.parseColor)(z[V]);j&&this._onColor.fire([{type:1,index:this._specialColors[O],color:j}])}return!0}setOrReportFgColor(H){return this._setOrReportSpecialColor(H,0)}setOrReportBgColor(H){return this._setOrReportSpecialColor(H,1)}setOrReportCursorColor(H){return this._setOrReportSpecialColor(H,2)}restoreIndexedColor(H){if(!H)return this._onColor.fire([{type:2}]),!0;const O=[],z=H.split(";");for(let V=0;V<z.length;++V)if(/^\d+$/.exec(z[V])){const j=parseInt(z[V]);$(j)&&O.push({type:2,index:j})}return O.length&&this._onColor.fire(O),!0}restoreFgColor(H){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(H){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(H){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,b.DEFAULT_CHARSET),!0}selectCharset(H){return H.length!==2?(this.selectDefaultCharset(),!0):(H[0]==="/"||this._charsetService.setgCharset(N[H[0]],b.CHARSETS[H[1]]||b.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 H=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,H,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=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){const H=new _.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let O=0;O<this._bufferService.rows;++O){const z=this._activeBuffer.ybase+this._activeBuffer.y+O,V=this._activeBuffer.lines.get(z);V&&(V.fill(H),V.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(H,O){const z=this._bufferService.buffer,V=this._optionsService.rawOptions;return(j=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${j}${u.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${z.scrollTop+1};${z.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[V.cursorStyle]-(V.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,O){this._dirtyRowTracker.markRangeDirty(H,O)}}a.InputHandler=W;let G=class{constructor(Q){this._bufferService=Q,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Q){Q<this.start?this.start=Q:Q>this.end&&(this.end=Q)}markRangeDirty(Q,H){Q>H&&(Y=Q,Q=H,H=Y),Q<this.start&&(this.start=Q),H>this.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function $(Q){return 0<=Q&&Q<256}G=h([d(0,M.IBufferService)],G)},844:(f,a)=>{function c(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=c,a.getDisposeArrayDisposable=function(h){return{dispose:()=>c(h)}}},1505:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,u,b){this._data[d]||(this._data[d]={}),this._data[d][u]=b}get(d,u){return this._data[d]?this._data[d][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(h,d,u,b,w){this._data.get(h,d)||this._data.set(h,d,new c),this._data.get(h,d).set(u,b,w)}get(h,d,u,b){var w;return(w=this._data.get(h,d))==null?void 0:w.get(u,b)}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 c=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const d=c.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(c)},6106:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(c=this._search(this._getKey(h)),this._array.splice(c,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const d=this._getKey(h);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===h)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===d);return!1}*getKeyIterator(h){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===h)}forEachByKey(h,d){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do d(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let d=0,u=this._array.length-1;for(;u>=d;){let b=d+u>>1;const w=this._getKey(this._array[b]);if(w>h)u=b-1;else{if(!(w<h)){for(;b>0&&this._getKey(this._array[b-1])===h;)b--;return b}d=b+1}}return d}}},7226:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=c(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 E=0,x=0,v=w.timeRemaining(),S=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),x=Math.max(E,x),S=w.timeRemaining(),1.5*x>S)return v-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-E))}ms`),void this._start();v=S}this.clear()}}class u extends d{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const E=Date.now()+w;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},9282:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=c(643);a.updateWindowsModeWrappedState=function(d){const u=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),b=u==null?void 0:u.get(d.cols-1),w=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);w&&b&&(w.isWrapped=b[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&b[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 c{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new c;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}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=c;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,b=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=b}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=c(6349),d=c(7226),u=c(3734),b=c(8437),w=c(4634),E=c(511),x=c(643),v=c(4863),S=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(g,_,A){this._hasScrollback=g,this._optionsService=_,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=b.DEFAULT_ATTR_DATA.clone(),this.savedCharset=S.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=E.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 u.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 u.ExtendedAttrs),this._whitespaceCell}getBlankLine(g,_){return new b.BufferLine(this._bufferService.cols,this.getNullCell(g),_)}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 _=g+this._optionsService.rawOptions.scrollback;return _>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:_}fillViewportRows(g){if(this.lines.length===0){g===void 0&&(g=b.DEFAULT_ATTR_DATA);let _=this._rows;for(;_--;)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,_){const A=this.getNullCell(b.DEFAULT_ATTR_DATA);let M=0;const D=this._getCorrectBufferLength(_);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols<g)for(let k=0;k<this.lines.length;k++)M+=+this.lines.get(k).resize(g,A);let T=0;if(this._rows<_)for(let k=this._rows;k<_;k++)this.lines.length<_+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new b.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 b.BufferLine(g,A)));else for(let k=this._rows;k>_;k--)this.lines.length>_+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D<this.lines.maxLength){const k=this.lines.length-D;k>0&&(this.lines.trimStart(k),this.ybase=Math.max(this.ybase-k,0),this.ydisp=Math.max(this.ydisp-k,0),this.savedY=Math.max(this.savedY-k,0)),this.lines.maxLength=D}this.x=Math.min(this.x,g-1),this.y=Math.min(this.y,_-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,g-1),this.scrollTop=0}if(this.scrollBottom=_-1,this._isReflowEnabled&&(this._reflow(g,_),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=_,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 _=0;for(;this._memoryCleanupPosition<this.lines.length;)if(_+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),_>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,_){this._cols!==g&&(g>this._cols?this._reflowLarger(g,_):this._reflowSmaller(g,_))}_reflowLarger(g,_){const A=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(b.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,_,M.countRemoved)}}_reflowLargerAdjustViewport(g,_,A){const M=this.getNullCell(b.DEFAULT_ATTR_DATA);let D=A;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<_&&this.lines.push(new b.BufferLine(g,M))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(g,_){const A=this.getNullCell(b.DEFAULT_ATTR_DATA),M=[];let D=0;for(let T=this.lines.length-1;T>=0;T--){let k=this.lines.get(T);if(!k||!k.isWrapped&&k.getTrimmedLength()<=g)continue;const R=[k];for(;k.isWrapped&&T>0;)k=this.lines.get(--T),R.unshift(k);const N=this.ybase+this.y;if(N>=T&&N<T+R.length)continue;const I=R[R.length-1].getTrimmedLength(),P=(0,w.reflowSmallerGetNewLineLengths)(R,this._cols,g),F=P.length-R.length;let Y;Y=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+F):Math.max(0,this.lines.length-this.lines.maxLength+F);const W=[];for(let z=0;z<F;z++){const V=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);W.push(V)}W.length>0&&(M.push({start:T+R.length+D,newLines:W}),D+=W.length),R.push(...W);let G=P.length-1,$=P[G];$===0&&(G--,$=P[G]);let Q=R.length-F-1,H=I;for(;Q>=0;){const z=Math.min(H,$);if(R[G]===void 0)break;if(R[G].copyCellsFrom(R[Q],H-z,$-z,z,!0),$-=z,$===0&&(G--,$=P[G]),H-=z,H===0){Q--;const V=Math.max(Q,0);H=(0,w.getWrappedLineTrimmedLength)(R,V,this._cols)}}for(let z=0;z<R.length;z++)P[z]<g&&R[z].setCell(P[z],A);let O=F-Y;for(;O-- >0;)this.ybase===0?this.y<_-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+D)-_&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+F,this.ybase+_-1)}if(M.length>0){const T=[],k=[];for(let G=0;G<this.lines.length;G++)k.push(this.lines.get(G));const R=this.lines.length;let N=R-1,I=0,P=M[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+D);let F=0;for(let G=Math.min(this.lines.maxLength-1,R+D-1);G>=0;G--)if(P&&P.start>N+F){for(let $=P.newLines.length-1;$>=0;$--)this.lines.set(G--,P.newLines[$]);G++,T.push({index:N+1,amount:P.newLines.length}),F+=P.newLines.length,P=M[++I]}else this.lines.set(G,k[N--]);let Y=0;for(let G=T.length-1;G>=0;G--)T[G].index+=Y,this.lines.onInsertEmitter.fire(T[G]),Y+=T[G].amount;const W=Math.max(0,R+D-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(g,_,A=0,M){const D=this.lines.get(g);return D?D.translateToString(_,A,M):""}getWrappedRangeForLine(g){let _=g,A=g;for(;_>0&&this.lines.get(_).isWrapped;)_--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:_,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 _=0;_<this.markers.length;_++)this.markers[_].line===g&&(this.markers[_].dispose(),this.markers.splice(_--,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 _=new v.Marker(g);return this.markers.push(_),_.register(this.lines.onTrim((A=>{_.line-=A,_.line<0&&_.dispose()}))),_.register(this.lines.onInsert((A=>{_.line>=A.index&&(_.line+=A.amount)}))),_.register(this.lines.onDelete((A=>{_.line>=A.index&&_.line<A.index+A.amount&&_.dispose(),_.line>A.index&&(_.line-=A.amount)}))),_.register(_.onDispose((()=>this._removeMarker(_)))),_}_removeMarker(g){this._isClearing||this.markers.splice(this.markers.indexOf(g),1)}}},8437:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=c(3734),d=c(511),u=c(643),b=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class E{constructor(v,S,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const _=S||d.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let A=0;A<v;++A)this.setCell(A,_);this.length=v}get(v){const S=this._data[3*v+0],g=2097151&S;return[this._data[3*v+1],2097152&S?this._combined[v]:g?(0,b.stringFromCodePoint)(g):"",S>>22,2097152&S?this._combined[v].charCodeAt(this._combined[v].length-1):g]}set(v,S){this._data[3*v+1]=S[u.CHAR_DATA_ATTR_INDEX],S[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=S[1],this._data[3*v+0]=2097152|v|S[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=S[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const S=this._data[3*v+0];return 2097152&S?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&S}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const S=this._data[3*v+0];return 2097152&S?this._combined[v]:2097151&S?(0,b.stringFromCodePoint)(2097151&S):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,S){return w=3*v,S.content=this._data[w+0],S.fg=this._data[w+1],S.bg=this._data[w+2],2097152&S.content&&(S.combinedData=this._combined[v]),268435456&S.bg&&(S.extended=this._extendedAttrs[v]),S}setCell(v,S){2097152&S.content&&(this._combined[v]=S.combinedData),268435456&S.bg&&(this._extendedAttrs[v]=S.extended),this._data[3*v+0]=S.content,this._data[3*v+1]=S.fg,this._data[3*v+2]=S.bg}setCellFromCodepoint(v,S,g,_){268435456&_.bg&&(this._extendedAttrs[v]=_.extended),this._data[3*v+0]=S|g<<22,this._data[3*v+1]=_.fg,this._data[3*v+2]=_.bg}addCodepointToCell(v,S,g){let _=this._data[3*v+0];2097152&_?this._combined[v]+=(0,b.stringFromCodePoint)(S):2097151&_?(this._combined[v]=(0,b.stringFromCodePoint)(2097151&_)+(0,b.stringFromCodePoint)(S),_&=-2097152,_|=2097152):_=S|4194304,g&&(_&=-12582913,_|=g<<22),this._data[3*v+0]=_}insertCells(v,S,g){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,g),S<this.length-v){const _=new d.CellData;for(let A=this.length-v-S-1;A>=0;--A)this.setCell(v+S+A,this.loadCell(v+A,_));for(let A=0;A<S;++A)this.setCell(v+A,g)}else for(let _=v;_<this.length;++_)this.setCell(_,g);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,g)}deleteCells(v,S,g){if(v%=this.length,S<this.length-v){const _=new d.CellData;for(let A=0;A<this.length-v-S;++A)this.setCell(v+A,this.loadCell(v+S+A,_));for(let A=this.length-S;A<this.length;++A)this.setCell(A,g)}else for(let _=v;_<this.length;++_)this.setCell(_,g);v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,g),this.getWidth(v)!==0||this.hasContent(v)||this.setCellFromCodepoint(v,0,1,g)}replaceCells(v,S,g,_=!1){if(_)for(v&&this.getWidth(v-1)===2&&!this.isProtected(v-1)&&this.setCellFromCodepoint(v-1,0,1,g),S<this.length&&this.getWidth(S-1)===2&&!this.isProtected(S)&&this.setCellFromCodepoint(S,0,1,g);v<S&&v<this.length;)this.isProtected(v)||this.setCell(v,g),v++;else for(v&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,g),S<this.length&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S,0,1,g);v<S&&v<this.length;)this.setCell(v++,g)}resize(v,S){if(v===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const g=3*v;if(v>this.length){if(this._data.buffer.byteLength>=4*g)this._data=new Uint32Array(this._data.buffer,0,g);else{const _=new Uint32Array(g);_.set(this._data),this._data=_}for(let _=this.length;_<v;++_)this.setCell(_,S)}else{this._data=this._data.subarray(0,g);const _=Object.keys(this._combined);for(let M=0;M<_.length;M++){const D=parseInt(_[M],10);D>=v&&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>=v&&delete this._extendedAttrs[D]}}return this.length=v,4*g*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const v=new Uint32Array(this._data.length);return v.set(this._data),this._data=v,1}return 0}fill(v,S=!1){if(S)for(let g=0;g<this.length;++g)this.isProtected(g)||this.setCell(g,v);else{this._combined={},this._extendedAttrs={};for(let g=0;g<this.length;++g)this.setCell(g,v)}}copyFrom(v){this.length!==v.length?this._data=new Uint32Array(v._data):this._data.set(v._data),this.length=v.length,this._combined={};for(const S in v._combined)this._combined[S]=v._combined[S];this._extendedAttrs={};for(const S in v._extendedAttrs)this._extendedAttrs[S]=v._extendedAttrs[S];this.isWrapped=v.isWrapped}clone(){const v=new E(0);v._data=new Uint32Array(this._data),v.length=this.length;for(const S in this._combined)v._combined[S]=this._combined[S];for(const S in this._extendedAttrs)v._extendedAttrs[S]=this._extendedAttrs[S];return v.isWrapped=this.isWrapped,v}getTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,S,g,_,A){const M=v._data;if(A)for(let T=_-1;T>=0;T--){for(let k=0;k<3;k++)this._data[3*(g+T)+k]=M[3*(S+T)+k];268435456&M[3*(S+T)+2]&&(this._extendedAttrs[g+T]=v._extendedAttrs[S+T])}else for(let T=0;T<_;T++){for(let k=0;k<3;k++)this._data[3*(g+T)+k]=M[3*(S+T)+k];268435456&M[3*(S+T)+2]&&(this._extendedAttrs[g+T]=v._extendedAttrs[S+T])}const D=Object.keys(v._combined);for(let T=0;T<D.length;T++){const k=parseInt(D[T],10);k>=S&&(this._combined[k-S+g]=v._combined[k])}}translateToString(v,S,g,_){S=S??0,g=g??this.length,v&&(g=Math.min(g,this.getTrimmedLength())),_&&(_.length=0);let A="";for(;S<g;){const M=this._data[3*S+0],D=2097151&M,T=2097152&M?this._combined[S]:D?(0,b.stringFromCodePoint)(D):u.WHITESPACE_CELL_CHAR;if(A+=T,_)for(let k=0;k<T.length;++k)_.push(S);S+=M>>22||1}return _&&_.push(S),A}}a.BufferLine=E},4841:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(c,h){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return h*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(f,a)=>{function c(h,d,u){if(d===h.length-1)return h[d].getTrimmedLength();const b=!h[d].hasContent(u-1)&&h[d].getWidth(u-1)===1,w=h[d+1].getWidth(0)===2;return b&&w?u-1:u}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,d,u,b,w){const E=[];for(let x=0;x<h.length-1;x++){let v=x,S=h.get(++v);if(!S.isWrapped)continue;const g=[h.get(x)];for(;v<h.length&&S.isWrapped;)g.push(S),S=h.get(++v);if(b>=x&&b<v){x+=g.length-1;continue}let _=0,A=c(g,_,d),M=1,D=0;for(;M<g.length;){const k=c(g,M,d),R=k-D,N=u-A,I=Math.min(R,N);g[_].copyCellsFrom(g[M],D,A,I,!1),A+=I,A===u&&(_++,A=0),D+=I,D===k&&(M++,D=0),A===0&&_!==0&&g[_-1].getWidth(u-1)===2&&(g[_].copyCellsFrom(g[_-1],u-1,A++,1,!1),g[_-1].setCell(u-1,w))}g[_].replaceCells(A,u,w);let T=0;for(let k=g.length-1;k>0&&(k>_||g[k].getTrimmedLength()===0);k--)T++;T>0&&(E.push(x+g.length-T),E.push(T)),x+=g.length-1}return E},a.reflowLargerCreateNewLayout=function(h,d){const u=[];let b=0,w=d[b],E=0;for(let x=0;x<h.length;x++)if(w===x){const v=d[++b];h.onDeleteEmitter.fire({index:x-E,amount:v}),x+=v-1,E+=v,w=d[++b]}else u.push(x);return{layout:u,countRemoved:E}},a.reflowLargerApplyNewLayout=function(h,d){const u=[];for(let b=0;b<d.length;b++)u.push(h.get(d[b]));for(let b=0;b<u.length;b++)h.set(b,u[b]);h.length=d.length},a.reflowSmallerGetNewLineLengths=function(h,d,u){const b=[],w=h.map(((S,g)=>c(h,g,d))).reduce(((S,g)=>S+g));let E=0,x=0,v=0;for(;v<w;){if(w-v<u){b.push(w-v);break}E+=u;const S=c(h,x,d);E>S&&(E-=S,x++);const g=h[x].getWidth(E-1)===2;g&&E--;const _=g?u-1:u;b.push(_),v+=_}return b},a.getWrappedLineTrimmedLength=c},5295:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=c(8460),d=c(844),u=c(9092);class b extends d.Disposable{constructor(E,x){super(),this._optionsService=E,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 u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(E,x){this._normal.resize(E,x),this._alt.resize(E,x),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}a.BufferSet=b},511:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=c(482),d=c(643),u=c(3734);class b extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const x=new b;return x.setFromCharData(E),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(E){this.fg=E[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(E[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(E[d.CHAR_DATA_CHAR_INDEX].length===2){const v=E[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const S=E[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=S&&S<=57343?this.content=1024*(v-55296)+S-56320+65536|E[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=E[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=E[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=b},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,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=c(8460),d=c(844);class u{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=u._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=u,u._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 c,h,d;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
89
|
-
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""})(c||(a.C0=c={})),(function(u){u.PAD="",u.HOP="",u.BPH="",u.NBH="",u.IND="",u.NEL="
",u.SSA="",u.ESA="",u.HTS="",u.HTJ="",u.VTS="",u.PLD="",u.PLU="",u.RI="",u.SS2="",u.SS3="",u.DCS="",u.PU1="",u.PU2="",u.STS="",u.CCH="",u.MW="",u.SPA="",u.EPA="",u.SOS="",u.SGCI="",u.SCI="",u.CSI="",u.ST="",u.OSC="",u.PM="",u.APC=""})(h||(a.C1=h={})),(function(u){u.ST=`${c.ESC}\\`})(d||(a.C1_ESCAPED=d={}))},7399:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=c(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(u,b,w,E){const x={type:0,cancel:!1,key:void 0},v=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=u.ctrlKey?"\b":h.C0.DEL,u.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(u.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=u.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,u.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(u.metaKey)break;v?(x.key=h.C0.ESC+"[1;"+(v+1)+"D",x.key===h.C0.ESC+"[1;3D"&&(x.key=h.C0.ESC+(w?"b":"[1;5D"))):x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(u.metaKey)break;v?(x.key=h.C0.ESC+"[1;"+(v+1)+"C",x.key===h.C0.ESC+"[1;3C"&&(x.key=h.C0.ESC+(w?"f":"[1;5C"))):x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(u.metaKey)break;v?(x.key=h.C0.ESC+"[1;"+(v+1)+"A",w||x.key!==h.C0.ESC+"[1;3A"||(x.key=h.C0.ESC+"[1;5A")):x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(u.metaKey)break;v?(x.key=h.C0.ESC+"[1;"+(v+1)+"B",w||x.key!==h.C0.ESC+"[1;3B"||(x.key=h.C0.ESC+"[1;5B")):x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(x.key=h.C0.ESC+"[2~");break;case 46:x.key=v?h.C0.ESC+"[3;"+(v+1)+"~":h.C0.ESC+"[3~";break;case 36:x.key=v?h.C0.ESC+"[1;"+(v+1)+"H":b?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=v?h.C0.ESC+"[1;"+(v+1)+"F":b?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=h.C0.ESC+"[5;"+(v+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=h.C0.ESC+"[6;"+(v+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=v?h.C0.ESC+"[1;"+(v+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=v?h.C0.ESC+"[1;"+(v+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=v?h.C0.ESC+"[1;"+(v+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=v?h.C0.ESC+"[1;"+(v+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=v?h.C0.ESC+"[15;"+(v+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=v?h.C0.ESC+"[17;"+(v+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=v?h.C0.ESC+"[18;"+(v+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=v?h.C0.ESC+"[19;"+(v+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=v?h.C0.ESC+"[20;"+(v+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=v?h.C0.ESC+"[21;"+(v+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=v?h.C0.ESC+"[23;"+(v+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=v?h.C0.ESC+"[24;"+(v+1)+"~":h.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(w&&!E||!u.altKey||u.metaKey)!w||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?x.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(x.key=h.C0.US),u.key==="@"&&(x.key=h.C0.NUL)):u.keyCode===65&&(x.type=1);else{const S=d[u.keyCode],g=S==null?void 0:S[u.shiftKey?1:0];if(g)x.key=h.C0.ESC+g;else if(u.keyCode>=65&&u.keyCode<=90){const _=u.ctrlKey?u.keyCode-64:u.keyCode+32;let A=String.fromCharCode(_);u.shiftKey&&(A=A.toUpperCase()),x.key=h.C0.ESC+A}else if(u.keyCode===32)x.key=h.C0.ESC+(u.ctrlKey?h.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let _=u.code.slice(3,4);u.shiftKey||(_=_.toLowerCase()),x.key=h.C0.ESC+_,x.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?x.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?x.key=h.C0.NUL:u.keyCode>=51&&u.keyCode<=55?x.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?x.key=h.C0.DEL:u.keyCode===219?x.key=h.C0.ESC:u.keyCode===220?x.key=h.C0.FS:u.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(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,h=0,d=c.length){let u="";for(let b=h;b<d;++b){let w=c[b];w>65535?(w-=65536,u+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):u+=String.fromCharCode(w)}return u},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,h){const d=c.length;if(!d)return 0;let u=0,b=0;if(this._interim){const w=c.charCodeAt(b++);56320<=w&&w<=57343?h[u++]=1024*(this._interim-55296)+w-56320+65536:(h[u++]=this._interim,h[u++]=w),this._interim=0}for(let w=b;w<d;++w){const E=c.charCodeAt(w);if(55296<=E&&E<=56319){if(++w>=d)return this._interim=E,u;const x=c.charCodeAt(w);56320<=x&&x<=57343?h[u++]=1024*(E-55296)+x-56320+65536:(h[u++]=E,h[u++]=x)}else E!==65279&&(h[u++]=E)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,h){const d=c.length;if(!d)return 0;let u,b,w,E,x=0,v=0,S=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 k=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=k-T;for(;S<R;){if(S>=d)return 0;if(D=c[S++],(192&D)!=128){S--,A=!0;break}this.interim[T++]=D,M<<=6,M|=63&D}A||(k===2?M<128?S--:h[x++]=M:k===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 _=S;for(;_<d;){for(;!(!(_<g)||128&(u=c[_])||128&(b=c[_+1])||128&(w=c[_+2])||128&(E=c[_+3]));)h[x++]=u,h[x++]=b,h[x++]=w,h[x++]=E,_+=4;if(u=c[_++],u<128)h[x++]=u;else if((224&u)==192){if(_>=d)return this.interim[0]=u,x;if(b=c[_++],(192&b)!=128){_--;continue}if(v=(31&u)<<6|63&b,v<128){_--;continue}h[x++]=v}else if((240&u)==224){if(_>=d)return this.interim[0]=u,x;if(b=c[_++],(192&b)!=128){_--;continue}if(_>=d)return this.interim[0]=u,this.interim[1]=b,x;if(w=c[_++],(192&w)!=128){_--;continue}if(v=(15&u)<<12|(63&b)<<6|63&w,v<2048||v>=55296&&v<=57343||v===65279)continue;h[x++]=v}else if((248&u)==240){if(_>=d)return this.interim[0]=u,x;if(b=c[_++],(192&b)!=128){_--;continue}if(_>=d)return this.interim[0]=u,this.interim[1]=b,x;if(w=c[_++],(192&w)!=128){_--;continue}if(_>=d)return this.interim[0]=u,this.interim[1]=b,this.interim[2]=w,x;if(E=c[_++],(192&E)!=128){_--;continue}if(v=(7&u)<<18|(63&b)<<12|(63&w)<<6|63&E,v<65536||v>1114111)continue;h[x++]=v}}return x}}},225:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=c(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]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let b;a.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let w=0;w<d.length;++w)b.fill(0,d[w][0],d[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?b[w]:(function(E,x){let v,S=0,g=x.length-1;if(E<x[0][0]||E>x[g][1])return!1;for(;g>=S;)if(v=S+g>>1,E>x[v][1])S=v+1;else{if(!(E<x[v][0]))return!0;g=v-1}return!1})(w,u)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,E){let x=this.wcwidth(w),v=x===0&&E!==0;if(v){const S=h.UnicodeService.extractWidth(E);S===0?v=!1:S>x&&(x=S)}return h.UnicodeService.createPropertyValue(0,x,v)}}},5981:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=c(8460),d=c(844);class u 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,E){if(E!==void 0&&this._syncCalls>E)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 v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,E){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(E)}_innerWrite(w=0,E=!0){const x=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],S=this._action(v,E);if(S){const _=A=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,A))):this._innerWrite(x,A);return void S.catch((A=>(queueMicrotask((()=>{throw A})),Promise.resolve(!1)))).then(_)}const g=this._callbacks[this._bufferOffset];if(g&&g(),this._bufferOffset++,this._pendingData-=v.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=u},5941:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const c=/^([\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(u,b){const w=u.toString(16),E=w.length<2?"0"+w:w;switch(b){case 4:return w[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}a.parseColor=function(u){if(!u)return;let b=u.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const w=c.exec(b);if(w){const E=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/E*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/E*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/E*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),h.exec(b)&&[3,6,9,12].includes(b.length))){const w=b.length/3,E=[0,0,0];for(let x=0;x<3;++x){const v=parseInt(b.slice(w*x,w*x+w),16);E[x]=w===1?v<<4:w===2?v:w===3?v>>4:v>>8}return E}},a.toRgbString=function(u,b=16){const[w,E,x]=u;return`rgb:${d(w,b)}/${d(E,b)}/${d(x,b)}`}},5770:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=c(482),d=c(8742),u=c(5770),b=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=b,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=b}registerHandler(E,x){this._handlers[E]===void 0&&(this._handlers[E]=[]);const v=this._handlers[E];return v.push(x),{dispose:()=>{const S=v.indexOf(x);S!==-1&&v.splice(S,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(E,x){if(this.reset(),this._ident=E,this._active=this._handlers[E]||b,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(E,x,v){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(E,x,v);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(E,x,v))}unhook(E,x=!0){if(this._active.length){let v=!1,S=this._active.length-1,g=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,v=x,g=this._stack.fallThrough,this._stack.paused=!1),!g&&v===!1){for(;S>=0&&(v=this._active[S].unhook(E),v!==!0);S--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,v;S--}for(;S>=0;S--)if(v=this._active[S].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",E);this._active=b,this._ident=0}};const w=new d.Params;w.addParam(0),a.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=w,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():w,this._data="",this._hitLimit=!1}put(E,x,v){this._hitLimit||(this._data+=(0,h.utf32ToString)(E,x,v),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let x=!1;if(this._hitLimit)x=!1;else if(E&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((v=>(this._params=w,this._data="",this._hitLimit=!1,v)));return this._params=w,this._data="",this._hitLimit=!1,x}}},2015:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=c(844),d=c(8742),u=c(6242),b=c(6351);class w{constructor(S){this.table=new Uint8Array(S)}setDefault(S,g){this.table.fill(S<<4|g)}add(S,g,_,A){this.table[g<<8|S]=_<<4|A}addMany(S,g,_,A){for(let M=0;M<S.length;M++)this.table[g<<8|S[M]]=_<<4|A}}a.TransitionTable=w;const E=160;a.VT500_TRANSITION_TABLE=(function(){const v=new w(4095),S=Array.apply(null,Array(256)).map(((T,k)=>k)),g=(T,k)=>S.slice(T,k),_=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 v.setDefault(1,0),v.addMany(_,0,2,0),M)v.addMany([24,26,153,154],D,3,0),v.addMany(g(128,144),D,3,0),v.addMany(g(144,152),D,3,0),v.add(156,D,0,0),v.add(27,D,11,1),v.add(157,D,4,8),v.addMany([152,158,159],D,0,7),v.add(155,D,11,3),v.add(144,D,11,9);return v.addMany(A,0,3,0),v.addMany(A,1,3,1),v.add(127,1,0,1),v.addMany(A,8,0,8),v.addMany(A,3,3,3),v.add(127,3,0,3),v.addMany(A,4,3,4),v.add(127,4,0,4),v.addMany(A,6,3,6),v.addMany(A,5,3,5),v.add(127,5,0,5),v.addMany(A,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(_,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(g(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(_,7,0,7),v.addMany(A,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(g(64,127),3,7,0),v.addMany(g(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(g(48,60),4,8,4),v.addMany(g(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(g(32,64),6,0,6),v.add(127,6,0,6),v.addMany(g(64,127),6,0,0),v.addMany(g(32,48),3,9,5),v.addMany(g(32,48),5,9,5),v.addMany(g(48,64),5,0,6),v.addMany(g(64,127),5,7,0),v.addMany(g(32,48),4,9,5),v.addMany(g(32,48),1,9,2),v.addMany(g(32,48),2,9,2),v.addMany(g(48,127),2,10,0),v.addMany(g(48,80),1,10,0),v.addMany(g(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(g(96,127),1,10,0),v.add(80,1,11,9),v.addMany(A,9,0,9),v.add(127,9,0,9),v.addMany(g(28,32),9,0,9),v.addMany(g(32,48),9,9,12),v.addMany(g(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(A,11,0,11),v.addMany(g(32,128),11,0,11),v.addMany(g(28,32),11,0,11),v.addMany(A,10,0,10),v.add(127,10,0,10),v.addMany(g(28,32),10,0,10),v.addMany(g(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(g(32,48),10,9,12),v.addMany(A,12,0,12),v.add(127,12,0,12),v.addMany(g(28,32),12,0,12),v.addMany(g(32,48),12,9,12),v.addMany(g(48,64),12,0,11),v.addMany(g(64,127),12,12,13),v.addMany(g(64,127),10,12,13),v.addMany(g(64,127),9,12,13),v.addMany(A,13,13,13),v.addMany(_,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(E,0,2,0),v.add(E,8,5,8),v.add(E,6,0,6),v.add(E,11,0,11),v.add(E,13,13,13),v})();class x extends h.Disposable{constructor(S=a.VT500_TRANSITION_TABLE){super(),this._transitions=S,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,_,A)=>{},this._executeHandlerFb=g=>{},this._csiHandlerFb=(g,_)=>{},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 u.OscParser),this._dcsParser=this.register(new b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(S,g=[64,126]){let _=0;if(S.prefix){if(S.prefix.length>1)throw new Error("only one byte as prefix supported");if(_=S.prefix.charCodeAt(0),_&&60>_||_>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(S.intermediates){if(S.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let M=0;M<S.intermediates.length;++M){const D=S.intermediates.charCodeAt(M);if(32>D||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");_<<=8,_|=D}}if(S.final.length!==1)throw new Error("final must be a single byte");const A=S.final.charCodeAt(0);if(g[0]>A||A>g[1])throw new Error(`final must be in range ${g[0]} .. ${g[1]}`);return _<<=8,_|=A,_}identToString(S){const g=[];for(;S;)g.push(String.fromCharCode(255&S)),S>>=8;return g.reverse().join("")}setPrintHandler(S){this._printHandler=S}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(S,g){const _=this._identifier(S,[48,126]);this._escHandlers[_]===void 0&&(this._escHandlers[_]=[]);const A=this._escHandlers[_];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearEscHandler(S){this._escHandlers[this._identifier(S,[48,126])]&&delete this._escHandlers[this._identifier(S,[48,126])]}setEscHandlerFallback(S){this._escHandlerFb=S}setExecuteHandler(S,g){this._executeHandlers[S.charCodeAt(0)]=g}clearExecuteHandler(S){this._executeHandlers[S.charCodeAt(0)]&&delete this._executeHandlers[S.charCodeAt(0)]}setExecuteHandlerFallback(S){this._executeHandlerFb=S}registerCsiHandler(S,g){const _=this._identifier(S);this._csiHandlers[_]===void 0&&(this._csiHandlers[_]=[]);const A=this._csiHandlers[_];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearCsiHandler(S){this._csiHandlers[this._identifier(S)]&&delete this._csiHandlers[this._identifier(S)]}setCsiHandlerFallback(S){this._csiHandlerFb=S}registerDcsHandler(S,g){return this._dcsParser.registerHandler(this._identifier(S),g)}clearDcsHandler(S){this._dcsParser.clearHandler(this._identifier(S))}setDcsHandlerFallback(S){this._dcsParser.setHandlerFallback(S)}registerOscHandler(S,g){return this._oscParser.registerHandler(S,g)}clearOscHandler(S){this._oscParser.clearHandler(S)}setOscHandlerFallback(S){this._oscParser.setHandlerFallback(S)}setErrorHandler(S){this._errorHandler=S}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(S,g,_,A,M){this._parseStack.state=S,this._parseStack.handlers=g,this._parseStack.handlerPos=_,this._parseStack.transition=A,this._parseStack.chunkPos=M}parse(S,g,_){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(_===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const k=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(_===!1&&R>-1){for(;R>=0&&(A=k[R](this._params),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 4:if(_===!1&&R>-1){for(;R>=0&&(A=k[R](),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 6:if(M=S[this._parseStack.chunkPos],A=this._dcsParser.unhook(M!==24&&M!==26,_),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(M=S[this._parseStack.chunkPos],A=this._oscParser.end(M!==24&&M!==26,_),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 k=T;k<g;++k){switch(M=S[k],D=this._transitions.table[this.currentState<<8|(M<160?M:E)],D>>4){case 2:for(let F=k+1;;++F){if(F>=g||(M=S[F])<32||M>126&&M<E){this._printHandler(S,k,F),k=F-1;break}if(++F>=g||(M=S[F])<32||M>126&&M<E){this._printHandler(S,k,F),k=F-1;break}if(++F>=g||(M=S[F])<32||M>126&&M<E){this._printHandler(S,k,F),k=F-1;break}if(++F>=g||(M=S[F])<32||M>126&&M<E){this._printHandler(S,k,F),k=F-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:k,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 N=R?R.length-1:-1;for(;N>=0&&(A=R[N](this._params),A!==!0);N--)if(A instanceof Promise)return this._preserveStack(3,R,N,D,k),A;N<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(++k<g&&(M=S[k])>47&&M<60);k--;break;case 9:this._collect<<=8,this._collect|=M;break;case 10:const I=this._escHandlers[this._collect<<8|M];let P=I?I.length-1:-1;for(;P>=0&&(A=I[P](),A!==!0);P--)if(A instanceof Promise)return this._preserveStack(4,I,P,D,k),A;P<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 F=k+1;;++F)if(F>=g||(M=S[F])===24||M===26||M===27||M>127&&M<E){this._dcsParser.put(S,k,F),k=F-1;break}break;case 14:if(A=this._dcsParser.unhook(M!==24&&M!==26),A)return this._preserveStack(6,[],0,D,k),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 F=k+1;;F++)if(F>=g||(M=S[F])<32||M>127&&M<E){this._oscParser.put(S,k,F),k=F-1;break}break;case 6:if(A=this._oscParser.end(M!==24&&M!==26),A)return this._preserveStack(5,[],0,D,k),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,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=c(5770),d=c(482),u=[];a.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(b,w){this._handlers[b]===void 0&&(this._handlers[b]=[]);const E=this._handlers[b];return E.push(w),{dispose:()=>{const x=E.indexOf(w);x!==-1&&E.splice(x,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].start();else this._handlerFb(this._id,"START")}_put(b,w,E){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(b,w,E);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(b,w,E))}start(){this.reset(),this._state=1}put(b,w,E){if(this._state!==3){if(this._state===1)for(;w<E;){const x=b[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&&E-w>0&&this._put(b,w,E)}}end(b,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,x=this._active.length-1,v=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,E=w,v=this._stack.fallThrough,this._stack.paused=!1),!v&&E===!1){for(;x>=0&&(E=this._active[x].end(b),E!==!0);x--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,E;x--}for(;x>=0;x--)if(E=this._active[x].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",b);this._active=u,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(b){this._handler=b,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(b,w,E){this._hitLimit||(this._data+=(0,d.utf32ToString)(b,w,E),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(b){let w=!1;if(this._hitLimit)w=!1;else if(b&&(w=this._handler(this._data),w instanceof Promise))return w.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,w}}},8742:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class h{static fromArray(u){const b=new h;if(!u.length)return b;for(let w=Array.isArray(u[0])?1:0;w<u.length;++w){const E=u[w];if(Array.isArray(E))for(let x=0;x<E.length;++x)b.addSubParam(E[x]);else b.addParam(E)}return b}constructor(u=32,b=32){if(this.maxLength=u,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new h(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let b=0;b<this.length;++b){u.push(this.params[b]);const w=this._subParamsIdx[b]>>8,E=255&this._subParamsIdx[b];E-w>0&&u.push(Array.prototype.slice.call(this._subParams,w,E))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>c?c:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>c?c:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const b=this._subParamsIdx[u]>>8,w=255&this._subParamsIdx[u];return w-b>0?this._subParams.subarray(b,w):null}getSubParamsAll(){const u={};for(let b=0;b<this.length;++b){const w=this._subParamsIdx[b]>>8,E=255&this._subParamsIdx[b];E-w>0&&(u[b]=this._subParams.slice(w,E))}return u}addDigit(u){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,E=w[b-1];w[b-1]=~E?Math.min(10*E+u,c):u}}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 c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,h){const d={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(d),h.dispose=()=>this._wrappedAddonDispose(d),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let d=0;d<this._addons.length;d++)if(this._addons[d]===c){h=d;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(h,1)}}},8771:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=c(3785),d=c(511);a.BufferApiView=class{constructor(u,b){this._buffer=u,this.type=b}init(u){return this._buffer=u,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(u){const b=this._buffer.lines.get(u);if(b)return new h.BufferLineApiView(b)}getNullCell(){return new d.CellData}}},3785:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=c(511);a.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,u){if(!(d<0||d>=this._line.length))return u?(this._line.loadCell(d,u),u):this._line.loadCell(d,new h.CellData)}translateToString(d,u,b){return this._line.translateToString(d,u,b)}}},8285:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=c(8771),d=c(8460),u=c(844);class b extends u.Disposable{constructor(E){super(),this._core=E,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=b},7975:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,h){return this._core.registerCsiHandler(c,(d=>h(d.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((d,u)=>h(d,u.toArray())))}addDcsHandler(c,h){return this.registerDcsHandler(c,h)}registerEscHandler(c,h){return this._core.registerEscHandler(c,h)}addEscHandler(c,h){return this.registerEscHandler(c,h)}registerOscHandler(c,h){return this._core.registerOscHandler(c,h)}addOscHandler(c,h){return this.registerOscHandler(c,h)}}},7090:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(f,a,c){var h=this&&this.__decorate||function(v,S,g,_){var A,M=arguments.length,D=M<3?S:_===null?_=Object.getOwnPropertyDescriptor(S,g):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(v,S,g,_);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(D=(M<3?A(D):M>3?A(S,g,D):A(S,g))||D);return M>3&&D&&Object.defineProperty(S,g,D),D},d=this&&this.__param||function(v,S){return function(g,_){S(g,_,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const u=c(8460),b=c(844),w=c(5295),E=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(v,this))}resize(v,S){this.cols=v,this.rows=S,this.buffers.resize(v,S),this._onResize.fire({cols:v,rows:S})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,S=!1){const g=this.buffer;let _;_=this._cachedBlankLine,_&&_.length===this.cols&&_.getFg(0)===v.fg&&_.getBg(0)===v.bg||(_=g.getBlankLine(v,S),this._cachedBlankLine=_),_.isWrapped=S;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(_):g.lines.push(_.clone()):g.lines.splice(M+1,0,_.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,_.clone())}this.isUserScrolling||(g.ydisp=g.ybase),this._onScroll.fire(g.ydisp)}scrollLines(v,S,g){const _=this.buffer;if(v<0){if(_.ydisp===0)return;this.isUserScrolling=!0}else v+_.ydisp>=_.ybase&&(this.isUserScrolling=!1);const A=_.ydisp;_.ydisp=Math.max(Math.min(_.ydisp+v,_.ybase),0),A!==_.ydisp&&(S||this._onScroll.fire(_.ydisp))}};a.BufferService=x=h([d(0,E.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(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,h){this._charsets[c]=h,this.glevel===c&&(this.charset=h)}}},1753:function(f,a,c){var h=this&&this.__decorate||function(_,A,M,D){var T,k=arguments.length,R=k<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(_,A,M,D);else for(var N=_.length-1;N>=0;N--)(T=_[N])&&(R=(k<3?T(R):k>3?T(A,M,R):T(A,M))||R);return k>3&&R&&Object.defineProperty(A,M,R),R},d=this&&this.__param||function(_,A){return function(M,D){A(M,D,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const u=c(2585),b=c(8460),w=c(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:_=>_.button!==4&&_.action===1&&(_.ctrl=!1,_.alt=!1,_.shift=!1,!0)},VT200:{events:19,restrict:_=>_.action!==32},DRAG:{events:23,restrict:_=>_.action!==32||_.button!==3},ANY:{events:31,restrict:_=>!0}};function x(_,A){let M=(_.ctrl?16:0)|(_.shift?4:0)|(_.alt?8:0);return _.button===4?(M|=64,M|=_.action):(M|=3&_.button,4&_.button&&(M|=64),8&_.button&&(M|=128),_.action===32?M|=32:_.action!==0||A||(M|=3)),M}const v=String.fromCharCode,S={DEFAULT:_=>{const A=[x(_,!1)+32,_.col+32,_.row+32];return A[0]>255||A[1]>255||A[2]>255?"":`\x1B[M${v(A[0])}${v(A[1])}${v(A[2])}`},SGR:_=>{const A=_.action===0&&_.button!==4?"m":"M";return`\x1B[<${x(_,!0)};${_.col};${_.row}${A}`},SGR_PIXELS:_=>{const A=_.action===0&&_.button!==4?"m":"M";return`\x1B[<${x(_,!0)};${_.x};${_.y}${A}`}};let g=a.CoreMouseService=class extends w.Disposable{constructor(_,A){super(),this._bufferService=_,this._coreService=A,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new b.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const M of Object.keys(E))this.addProtocol(M,E[M]);for(const M of Object.keys(S))this.addEncoding(M,S[M]);this.reset()}addProtocol(_,A){this._protocols[_]=A}addEncoding(_,A){this._encodings[_]=A}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(_){if(!this._protocols[_])throw new Error(`unknown protocol "${_}"`);this._activeProtocol=_,this._onProtocolChange.fire(this._protocols[_].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(_){if(!this._encodings[_])throw new Error(`unknown encoding "${_}"`);this._activeEncoding=_}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(_){if(_.col<0||_.col>=this._bufferService.cols||_.row<0||_.row>=this._bufferService.rows||_.button===4&&_.action===32||_.button===3&&_.action!==32||_.button!==4&&(_.action===2||_.action===3)||(_.col++,_.row++,_.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,_,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(_))return!1;const A=this._encodings[this._activeEncoding](_);return A&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(A):this._coreService.triggerDataEvent(A,!0)),this._lastEvent=_,!0}explainEvents(_){return{down:!!(1&_),up:!!(2&_),drag:!!(4&_),move:!!(8&_),wheel:!!(16&_)}}_equalEvents(_,A,M){if(M){if(_.x!==A.x||_.y!==A.y)return!1}else if(_.col!==A.col||_.row!==A.row)return!1;return _.button===A.button&&_.action===A.action&&_.ctrl===A.ctrl&&_.alt===A.alt&&_.shift===A.shift}};a.CoreMouseService=g=h([d(0,u.IBufferService),d(1,u.ICoreService)],g)},6975:function(f,a,c){var h=this&&this.__decorate||function(g,_,A,M){var D,T=arguments.length,k=T<3?_:M===null?M=Object.getOwnPropertyDescriptor(_,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,_,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(_,A,k):D(_,A))||k);return T>3&&k&&Object.defineProperty(_,A,k),k},d=this&&this.__param||function(g,_){return function(A,M){_(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const u=c(1439),b=c(8460),w=c(844),E=c(2585),x=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let S=a.CoreService=class extends w.Disposable{constructor(g,_,A){super(),this._bufferService=g,this._logService=_,this._optionsService=A,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new b.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new b.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(v)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(v)}triggerDataEvent(g,_=!1){if(this._optionsService.rawOptions.disableStdin)return;const A=this._bufferService.buffer;_&&this._optionsService.rawOptions.scrollOnUserInput&&A.ybase!==A.ydisp&&this._onRequestScrollToBottom.fire(),_&&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((_=>_.charCodeAt(0))))),this._onBinary.fire(g))}};a.CoreService=S=h([d(0,E.IBufferService),d(1,E.ILogService),d(2,E.IOptionsService)],S)},9074:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=c(8055),d=c(8460),u=c(844),b=c(6106);let w=0,E=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.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,u.toDisposable)((()=>this.reset())))}registerDecoration(g){if(g.marker.isDisposed)return;const _=new v(g);if(_){const A=_.marker.onDispose((()=>_.dispose()));_.onDispose((()=>{_&&(this._decorations.delete(_)&&this._onDecorationRemoved.fire(_),A.dispose())})),this._decorations.insert(_),this._onDecorationRegistered.fire(_)}return _}reset(){for(const g of this._decorations.values())g.dispose();this._decorations.clear()}*getDecorationsAtCell(g,_,A){let M=0,D=0;for(const T of this._decorations.getKeyIterator(_))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,_,A,M){this._decorations.forEachByKey(_,(D=>{w=D.options.x??0,E=w+(D.options.width??1),g>=w&&g<E&&(!A||(D.options.layer??"bottom")===A)&&M(D)}))}}a.DecorationService=x;class v extends u.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,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=c(2585),d=c(8343);class u{constructor(...w){this._entries=new Map;for(const[E,x]of w)this.set(E,x)}set(w,E){const x=this._entries.get(w);return this._entries.set(w,E),x}forEach(w){for(const[E,x]of this._entries.entries())w(E,x)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}a.ServiceCollection=u,a.InstantiationService=class{constructor(){this._services=new u,this._services.set(h.IInstantiationService,this)}setService(b,w){this._services.set(b,w)}getService(b){return this._services.get(b)}createInstance(b,...w){const E=(0,d.getServiceDependencies)(b).sort(((S,g)=>S.index-g.index)),x=[];for(const S of E){const g=this._services.get(S.id);if(!g)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${S.id}.`);x.push(g)}const v=E.length>0?E[0].index:w.length;if(w.length!==v)throw new Error(`[createInstance] First service dependency of ${b.name} at position ${v+1} conflicts with ${w.length} static arguments`);return new b(...w,...x)}}},7866:function(f,a,c){var h=this&&this.__decorate||function(v,S,g,_){var A,M=arguments.length,D=M<3?S:_===null?_=Object.getOwnPropertyDescriptor(S,g):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(v,S,g,_);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(D=(M<3?A(D):M>3?A(S,g,D):A(S,g))||D);return M>3&&D&&Object.defineProperty(S,g,D),D},d=this&&this.__param||function(v,S){return function(g,_){S(g,_,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(844),b=c(2585),w={trace:b.LogLevelEnum.TRACE,debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF};let E,x=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let S=0;S<v.length;S++)typeof v[S]=="function"&&(v[S]=v[S]())}_log(v,S,g){this._evalLazyOptionalParams(g),v.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+S,...g)}trace(v,...S){var g;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.trace.bind(this._optionsService.options.logger))??console.log,v,S)}debug(v,...S){var g;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.debug.bind(this._optionsService.options.logger))??console.log,v,S)}info(v,...S){var g;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.info.bind(this._optionsService.options.logger))??console.info,v,S)}warn(v,...S){var g;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.warn.bind(this._optionsService.options.logger))??console.warn,v,S)}error(v,...S){var g;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.error.bind(this._optionsService.options.logger))??console.error,v,S)}};a.LogService=x=h([d(0,b.IOptionsService)],x),a.setTraceLogger=function(v){E=v},a.traceCall=function(v,S,g){if(typeof g.value!="function")throw new Error("not supported");const _=g.value;g.value=function(...A){if(E.logLevel!==b.LogLevelEnum.TRACE)return _.apply(this,A);E.trace(`GlyphRenderer#${_.name}(${A.map((D=>JSON.stringify(D))).join(", ")})`);const M=_.apply(this,A);return E.trace(`GlyphRenderer#${_.name} return`,M),M}}},7302:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=c(8460),d=c(844),u=c(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:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const b=["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 v={...a.DEFAULT_OPTIONS};for(const S in x)if(S in v)try{const g=x[S];v[S]=this._sanitizeAndValidateOption(S,g)}catch(g){console.error(g)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,v){return this.onOptionChange((S=>{S===x&&v(this.rawOptions[x])}))}onMultipleOptionChange(x,v){return this.onOptionChange((S=>{x.indexOf(S)!==-1&&v()}))}_setupOptions(){const x=S=>{if(!(S in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${S}"`);return this.rawOptions[S]},v=(S,g)=>{if(!(S in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${S}"`);g=this._sanitizeAndValidateOption(S,g),this.rawOptions[S]!==g&&(this.rawOptions[S]=g,this._onOptionChange.fire(S))};for(const S in this.rawOptions){const g={get:x.bind(this,S),set:v.bind(this,S)};Object.defineProperty(this.options,S,g)}}_sanitizeAndValidateOption(x,v){switch(x){case"cursorStyle":if(v||(v=a.DEFAULT_OPTIONS[x]),!(function(S){return S==="block"||S==="underline"||S==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${x}`);break;case"wordSeparator":v||(v=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=b.includes(v)?v:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${x} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${x} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}a.OptionsService=w},2660:function(f,a,c){var h=this&&this.__decorate||function(w,E,x,v){var S,g=arguments.length,_=g<3?E:v===null?v=Object.getOwnPropertyDescriptor(E,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(w,E,x,v);else for(var A=w.length-1;A>=0;A--)(S=w[A])&&(_=(g<3?S(_):g>3?S(E,x,_):S(E,x))||_);return g>3&&_&&Object.defineProperty(E,x,_),_},d=this&&this.__param||function(w,E){return function(x,v){E(x,v,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const u=c(2585);let b=a.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const E=this._bufferService.buffer;if(w.id===void 0){const A=E.addMarker(E.ybase+E.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,v=this._getEntryIdKey(x),S=this._entriesWithId.get(v);if(S)return this.addLineToLink(S.id,E.ybase+E.y),S.id;const g=E.addMarker(E.ybase+E.y),_={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(_,g))),this._entriesWithId.set(_.key,_),this._dataByLinkId.set(_.id,_),_.id}addLineToLink(w,E){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((v=>v.line!==E))){const v=this._bufferService.buffer.addMarker(E);x.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(x,v)))}}getLinkData(w){var E;return(E=this._dataByLinkId.get(w))==null?void 0:E.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,E){const x=w.lines.indexOf(E);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=b=h([d(0,u.IBufferService)],b)},8343:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="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 u=function(b,w,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,v,S){v[c]===v?v[h].push({id:x,index:S}):(v[h]=[{id:x,index:S}],v[c]=v)})(u,b,E)};return u.toString=()=>d,a.serviceRegistry.set(d,u),u}},2585:(f,a,c)=>{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=c(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(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.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,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=c(8460),d=c(225);class u{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,E,x=!1){return(16777215&w)<<3|(3&E)<<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 E=0,x=0;const v=w.length;for(let S=0;S<v;++S){let g=w.charCodeAt(S);if(55296<=g&&g<=56319){if(++S>=v)return E+this.wcwidth(g);const M=w.charCodeAt(S);56320<=M&&M<=57343?g=1024*(g-55296)+M-56320+65536:E+=this.wcwidth(M)}const _=this.charProperties(g,x);let A=u.extractWidth(_);u.extractShouldJoin(_)&&(A-=u.extractWidth(x)),E+=A,x=_}return E}charProperties(w,E){return this._activeProvider.charProperties(w,E)}}a.UnicodeService=u}},o={};function p(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f].call(c.exports,c,c.exports,p),c.exports}var y={};return(()=>{var f=y;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const a=p(9042),c=p(3236),h=p(844),d=p(5741),u=p(8285),b=p(7975),w=p(7090),E=["cols","rows"];class x extends h.Disposable{constructor(S){super(),this._core=this.register(new c.Terminal(S)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const g=A=>this._core.options[A],_=(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:_.bind(this,A)};Object.defineProperty(this._publicOptions,A,M)}}_checkReadonlyOptions(S){if(E.includes(S))throw new Error(`Option "${S}" 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 b.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 u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const S=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:S.applicationCursorKeys,applicationKeypadMode:S.applicationKeypad,bracketedPasteMode:S.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:g,originMode:S.origin,reverseWraparoundMode:S.reverseWraparound,sendFocusMode:S.sendFocus,wraparoundMode:S.wraparound}}get options(){return this._publicOptions}set options(S){for(const g in S)this._publicOptions[g]=S[g]}blur(){this._core.blur()}focus(){this._core.focus()}input(S,g=!0){this._core.input(S,g)}resize(S,g){this._verifyIntegers(S,g),this._core.resize(S,g)}open(S){this._core.open(S)}attachCustomKeyEventHandler(S){this._core.attachCustomKeyEventHandler(S)}attachCustomWheelEventHandler(S){this._core.attachCustomWheelEventHandler(S)}registerLinkProvider(S){return this._core.registerLinkProvider(S)}registerCharacterJoiner(S){return this._checkProposedApi(),this._core.registerCharacterJoiner(S)}deregisterCharacterJoiner(S){this._checkProposedApi(),this._core.deregisterCharacterJoiner(S)}registerMarker(S=0){return this._verifyIntegers(S),this._core.registerMarker(S)}registerDecoration(S){return this._checkProposedApi(),this._verifyPositiveIntegers(S.x??0,S.width??0,S.height??0),this._core.registerDecoration(S)}hasSelection(){return this._core.hasSelection()}select(S,g,_){this._verifyIntegers(S,g,_),this._core.select(S,g,_)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(S,g){this._verifyIntegers(S,g),this._core.selectLines(S,g)}dispose(){super.dispose()}scrollLines(S){this._verifyIntegers(S),this._core.scrollLines(S)}scrollPages(S){this._verifyIntegers(S),this._core.scrollPages(S)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(S){this._verifyIntegers(S),this._core.scrollToLine(S)}clear(){this._core.clear()}write(S,g){this._core.write(S,g)}writeln(S,g){this._core.write(S),this._core.write(`\r
|
|
90
|
-
`,g)}paste(S){this._core.paste(S)}refresh(S,g){this._verifyIntegers(S,g),this._core.refresh(S,g)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(S){this._addonManager.loadAddon(this,S)}static get strings(){return a}_verifyIntegers(...S){for(const g of S)if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...S){for(const g of S)if(g&&(g===1/0||isNaN(g)||g%1!=0||g<0))throw new Error("This API only accepts positive integers")}}f.Terminal=x})(),y})()))})(Cu)),Cu.exports}var c2=o2();class u2{constructor(r,s){Xp(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",p=>{var f,a;const y=JSON.parse(p.data);y.type==="output"?s.onOutput(y.data):y.type==="error"?(f=s.onError)==null||f.call(s,y.message):(a=s.onStatus)==null||a.call(s,y)}),this.socket.addEventListener("error",()=>{var p;(p=s.onError)==null||p.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 w_({sessionId:n,active:r=!0,onEvent:s}){const o=he.useRef(null),p=he.useRef(null),y=he.useRef(null),f=he.useRef(null),a=he.useRef(r),c=he.useRef(s);function h(d={}){const u=o.current,b=p.current,w=y.current,E=f.current;if(!u||!b||!w||!E)return!1;const x=u.getBoundingClientRect();return x.width<h2||x.height<f2||(w.fit(),E.cols<d2||E.rows<p2)?!1:(b.resize(E.cols,E.rows),d.focus&&E.focus(),!0)}return he.useEffect(()=>{c.current=s},[s]),he.useEffect(()=>{a.current=r},[r]),he.useEffect(()=>{if(!o.current)return;const d=new c2.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:m2}),u=new s2.FitAddon;d.loadAddon(u),d.loadAddon(new a2.WebLinksAddon),d.open(o.current),f.current=d,y.current=u;const b=new u2(n,{onOutput(_){d.write(_)},onStatus(_){var A;(A=c.current)==null||A.call(c,_.type)},onError(_){var A;d.writeln(`\r
|
|
91
|
-
[VCM] ${_}`),(A=c.current)==null||A.call(c,_)}});p.current=b;const w=d.onData(_=>{b.sendInput(_)});let E=0,x=0,v=0;const S=()=>{E&&window.cancelAnimationFrame(E),E=window.requestAnimationFrame(()=>{E=0,h({focus:a.current})})},g=new ResizeObserver(()=>{S()});return g.observe(o.current),x=window.requestAnimationFrame(S),v=window.setTimeout(S,120),()=>{E&&window.cancelAnimationFrame(E),x&&window.cancelAnimationFrame(x),v&&window.clearTimeout(v),g.disconnect(),w.dispose(),b.close(),d.dispose(),p.current=null,f.current=null,y.current=null}},[n]),he.useEffect(()=>{if(!r)return;const d=[],u=[];return d.push(window.requestAnimationFrame(()=>{h({focus:!0}),d.push(window.requestAnimationFrame(()=>h({focus:!0})))})),u.push(window.setTimeout(()=>h({focus:!0}),160)),u.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const b of d)window.cancelAnimationFrame(b);for(const b of u)window.clearTimeout(b)}},[r]),he.useEffect(()=>{const d=()=>{a.current&&h()};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),B.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var d;return(d=f.current)==null?void 0:d.focus()}})}const h2=160,f2=80,d2=20,p2=5,m2={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 Yr({status:n}){return B.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function g2({status:n,bootstrapStatus:r,applyResult:s,busy:o=!1,onRefresh:p,onApply:y,onStartBootstrap:f}){const[a,c]=he.useState(!1),h=r==null?void 0:r.session;return he.useEffect(()=>{h||c(!1)},[h]),n?B.jsxs("section",{className:"harness-panel",children:[B.jsxs("div",{className:"harness-stage",children:[B.jsxs("div",{className:"harness-panel-header",children:[B.jsxs("div",{children:[B.jsx("strong",{children:"Fixed install"}),B.jsx("p",{className:"muted",children:n.initialized?n.needsApply?`${n.plannedChanges.length} pending updates`:"Up to date":"Not initialized"})]}),B.jsx("div",{className:"harness-actions",children:n.initialized?B.jsxs(B.Fragment,{children:[B.jsx("button",{type:"button",disabled:o,onClick:()=>void p(),children:"Refresh"}),n.needsApply?B.jsx("button",{type:"button",disabled:o,onClick:()=>void y(),children:"Update"}):null]}):B.jsx("button",{type:"button",disabled:o,onClick:()=>void y(),children:"Initialize"})})]}),n.initialized&&n.needsApply?B.jsxs(B.Fragment,{children:[B.jsx("h3",{className:"harness-file-list-title",children:"Files to update"}),B.jsx("ol",{className:"harness-file-list",children:n.plannedChanges.map(d=>B.jsxs("li",{children:[B.jsx("span",{children:d.path}),B.jsx(Yr,{status:d.action})]},`${d.path}:${d.action}`))})]}):null]}),B.jsxs("div",{className:"harness-stage",children:[B.jsxs("div",{className:"harness-panel-header",children:[B.jsxs("div",{children:[B.jsx("strong",{children:"Bootstrap"}),B.jsx("p",{className:"muted",children:r?_2(r.status):"not loaded"})]}),B.jsx("div",{className:"harness-actions",children:B.jsx("button",{type:"button",disabled:o||!(r!=null&&r.canStart),onClick:()=>{c(!0),f()},children:"Run Bootstrap"})})]}),r?B.jsxs(B.Fragment,{children:[B.jsx("ol",{className:"harness-file-list",children:r.checks.map(d=>B.jsxs("li",{title:d.detail??d.path??"",children:[B.jsx("span",{children:d.path?`${d.label}: ${d.path}`:d.label}),B.jsx(Yr,{status:d.status})]},d.key))}),h?B.jsxs("div",{className:"harness-bootstrap-session",children:[B.jsxs("div",{children:[B.jsx("span",{children:h.command}),B.jsx(Yr,{status:h.status})]}),B.jsx("button",{type:"button",onClick:()=>c(!0),children:"Open Terminal"})]}):null]}):B.jsx("p",{className:"muted",children:"Refresh harness status to load bootstrap checks."})]}),s?B.jsxs("div",{className:"harness-result",children:[B.jsx("p",{children:s.message}),s.changedFiles.length>0?B.jsx("ul",{children:s.changedFiles.map(d=>B.jsxs("li",{children:[B.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))}):null]}):null,n.warnings.length>0?B.jsx("ul",{className:"warnings",children:n.warnings.map(d=>B.jsx("li",{children:d},d))}):null,r!=null&&r.warnings.length?B.jsx("ul",{className:"warnings",children:r.warnings.map(d=>B.jsx("li",{children:d},d))}):null,a&&h?B.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:B.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[B.jsxs("header",{className:"harness-bootstrap-modal-header",children:[B.jsxs("div",{children:[B.jsx("strong",{children:"Harness Bootstrap Terminal"}),B.jsx("p",{className:"muted",children:h.command})]}),B.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[B.jsx(Yr,{status:h.status}),B.jsx("button",{type:"button",onClick:()=>c(!1),children:"Close"})]})]}),B.jsx("div",{className:"harness-bootstrap-terminal",children:B.jsx(w_,{sessionId:h.id,active:a})})]})}):null]}):null}function _2(n){return n.replaceAll("_"," ")}function rh(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function v2(n,r=6){const s=[...n].sort(b2).map((p,y)=>({message:p,sequence:y+1}));return[...r===null?s:s.slice(-r)].sort((p,y)=>y.sequence-p.sequence)}function y2({messages:n,orchestration:r,busy:s,maxMessages:o=6,showControls:p=!0,showHeader:y=!0,onModeChange:f,onMarkAllDone:a}){const[c,h]=he.useState(null),d=rh(n),u=(r==null?void 0:r.mode)??"auto",b=v2(n,o);async function w(E){await C2(E.body),h(E.id),window.setTimeout(()=>h(x=>x===E.id?null:x),1200)}return B.jsxs("section",{className:"message-panel",children:[y?B.jsxs("div",{className:"message-panel-header",children:[B.jsxs("div",{children:[B.jsx("h2",{children:"Messages"}),B.jsxs("p",{className:"muted",children:[d.total," total / ",d.accepted," accepted"]})]}),p&&f?B.jsx("div",{className:"message-controls",children:B.jsxs("label",{className:"message-mode-toggle",children:[B.jsx("input",{type:"checkbox",checked:u==="auto",disabled:s,onChange:E=>f(E.target.checked?"auto":"manual")}),B.jsx("span",{children:"Auto orchestration"})]})}):null,p&&a?B.jsx("button",{type:"button",disabled:s,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?B.jsx("p",{className:"muted",children:"No role messages yet."}):B.jsx("ol",{className:"message-list",children:b.map(({message:E,sequence:x})=>B.jsxs("li",{className:"message-item",children:[B.jsxs("div",{className:"message-item-main",children:[B.jsxs("div",{className:"message-meta",children:[B.jsxs("span",{className:"message-sequence",children:["#",x]}),B.jsx("time",{dateTime:Na(E),children:S2(Na(E))}),B.jsxs("strong",{children:[E.fromRole," ","->"," ",E.toRole]}),B.jsx("span",{children:E.type})]}),B.jsx("p",{children:E.body}),E.failureReason?B.jsx("span",{className:"message-reason",children:E.failureReason}):null,E.bodyPath?B.jsx("span",{className:"message-path",children:E.bodyPath}):null]}),B.jsx("div",{className:"message-actions",children:B.jsx("button",{type:"button",disabled:s,onClick:()=>void w(E),children:c===E.id?"Copied":"Copy"})})]},E.id))})]})}function S2(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 Na(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function b2(n,r){const s=Na(n).localeCompare(Na(r));if(s!==0)return s;const o=n.createdAt.localeCompare(r.createdAt);return o!==0?o:n.id.localeCompare(r.id)}async function C2(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 w2({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:o}){const[p,y]=he.useState(n);he.useEffect(()=>{n&&y(n)},[n]);async function f(a){a.preventDefault(),await o(p)}return B.jsx("form",{className:"repo-connect",onSubmit:f,children:B.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[B.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:p,onChange:a=>y(a.target.value),placeholder:"/path/to/repo"}),r.length>0?B.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&y(a.target.value)},children:[B.jsx("option",{value:"",children:"Recent"}),r.map(a=>B.jsx("option",{value:a,children:a},a))]}):null,B.jsx("button",{type:"submit",disabled:s||!p.trim(),children:"Connect"})]})})}function x2({tasks:n,activeTaskSlug:r,onSelect:s}){return B.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>B.jsxs("button",{className:o.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(o.taskSlug),children:[B.jsx("span",{children:o.title||o.taskSlug}),B.jsx(Yr,{status:o.status})]},o.taskSlug))})}function E2({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:o,messages:p,orchestration:y,events:f,roundState:a,codexReview:c,translationEnabled:h,translationAutoSendEnabled:d,translationTargetLanguage:u,translationOutputMode:b,harnessStatus:w,harnessBootstrapStatus:E,harnessApplyResult:x,gatewayStatus:v,gatewayQrLogin:S,gatewayQrCheck:g,busy:_,onConnect:A,onRefreshConnectedRepository:M,onPullConnectedRepository:D,onRefreshHarness:T,onApplyHarness:k,onStartHarnessBootstrap:R,onRefreshGateway:N,onGatewayEnabledChange:I,onGatewayTranslationChange:P,onStartGatewayQrLogin:F,onResetGatewayBinding:Y,onCodexGateEnabledChange:W,onTranslationEnabledChange:G,onTranslationAutoSendChange:$,onTranslationTargetLanguageChange:Q,onTranslationOutputModeChange:H,onOpenFileTranslation:O,onCreateTranslationBootstrap:z,onUpdateTranslationMemory:V,onCreateTask:j,onSelectTask:ee,themeMode:ae,onThemeModeChange:ge,flowPauseAlerts:K,onFlowPauseAlertsChange:q,permissionRequestMode:ce,onPermissionRequestModeChange:le,launchTemplate:ue,canSaveLaunchTemplate:te,canOneClickStart:Se,onSaveLaunchTemplate:we,onOneClickStart:xe,onTryFlowPauseAlert:nt,onMarkAllMessagesDone:Le,onDeleteMessageHistory:Vt}){const[Pt,jt]=he.useState(""),[Tt,Gt]=he.useState(!0),[yt,lt]=he.useState(!1),[kt,fe]=he.useState(!1),[ve,ke]=he.useState(()=>o?null:"repository-path"),Oe=rh(p),Be=Pt.trim(),me=s.find(De=>De.taskSlug===o)??null;he.useEffect(()=>{ke(De=>o&&De==="repository-path"?null:!o&&De===null?"repository-path":De)},[o]);function Te(De,Je){ke(Je?De:null)}async function mt(De){De.preventDefault(),await j({taskSlug:Be,createWorktree:Tt}),jt(""),Gt(!0)}return B.jsxs("div",{className:"project-dashboard",children:[B.jsx("header",{className:"brand-header",children:B.jsx("strong",{children:"VibeCodingMaster"})}),B.jsx(ni,{title:"Repository Path",open:ve==="repository-path",onOpenChange:De=>Te("repository-path",De),children:B.jsx(w2,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:_,onConnect:A})}),n?B.jsx(ni,{title:"Connected Repository",open:ve==="connected-repository",onOpenChange:De=>{Te("connected-repository",De),De&&M()},children:B.jsx(M2,{activeTask:me,busy:_,project:n,onPull:D})}):null,B.jsx(ni,{title:"Settings",open:ve==="settings",onOpenChange:De=>Te("settings",De),children:B.jsxs("div",{className:"sidebar-settings",children:[B.jsxs("button",{"aria-label":`Theme mode: ${sg(ae)}`,className:"settings-toggle theme-mode-toggle",disabled:_,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>ge(N2(ae)),children:[B.jsx("span",{children:"Theme"}),B.jsx("span",{children:sg(ae)})]}),B.jsxs("button",{"aria-pressed":!(v!=null&&v.enabled)&&K,className:!(v!=null&&v.enabled)&&K?"settings-toggle is-active":"settings-toggle",disabled:_||(v==null?void 0:v.enabled),title:v!=null&&v.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:()=>q(!K),children:[B.jsx("span",{children:"Flow pause alert"}),B.jsx("span",{children:v!=null&&v.enabled?"off":K?"on":"off"})]}),B.jsxs("button",{className:"settings-toggle",disabled:_||(v==null?void 0:v.enabled),title:v!=null&&v.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:nt,children:[B.jsx("span",{children:"Try alert"}),B.jsx("span",{children:"test"})]}),B.jsxs("label",{className:"settings-select-row",children:[B.jsx("span",{children:"Permission requests"}),B.jsxs("select",{value:ce,disabled:_,onChange:De=>le(De.target.value),children:[B.jsx("option",{value:"off",children:"off"}),B.jsx("option",{value:"allowAll",children:"allow all"})]})]}),B.jsxs("button",{className:"settings-toggle",disabled:_||!te,title:"Save the current four role launch settings",type:"button",onClick:we,children:[B.jsx("span",{children:"Save launch template"}),B.jsx("span",{children:te?"ready":"needs 4 sessions"})]}),Se?B.jsxs("button",{className:"settings-toggle is-active",disabled:_,title:k2(ue),type:"button",onClick:xe,children:[B.jsx("span",{children:"One-click start"}),B.jsx("span",{children:x_(ue)})]}):null,o?B.jsxs(B.Fragment,{children:[B.jsxs("button",{type:"button",onClick:()=>lt(!0),children:[B.jsx("span",{children:"Messages"}),B.jsxs("span",{className:"muted",children:[Oe.total," total"]})]}),B.jsxs("button",{type:"button",onClick:()=>fe(!0),children:[B.jsx("span",{children:"Events"}),B.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),B.jsx(ni,{title:"Translation",open:ve==="translation",onOpenChange:De=>Te("translation",De),children:B.jsx(A2,{busy:_,enabled:h,autoSendEnabled:d,targetLanguage:u,outputMode:b,fileTranslationAvailable:!!(n&&o),onAutoSendChange:$,onCreateBootstrap:z,onEnabledChange:G,onUpdateMemory:V,onTargetLanguageChange:Q,onOutputModeChange:H,onOpenFileTranslation:O})}),n&&o?B.jsx(ni,{title:"Codex Review Gates",open:ve==="codex-review-gates",onOpenChange:De=>Te("codex-review-gates",De),children:B.jsx(T2,{busy:_,state:c,onGateEnabledChange:W})}):null,B.jsx(ni,{title:"Gateway",open:ve==="gateway",onOpenChange:De=>{Te("gateway",De),De&&N()},children:B.jsx(R2,{busy:_,qrCheck:g,qrLogin:S,status:v,onEnabledChange:I,onResetBinding:Y,onStartQrLogin:F,onTranslationChange:P})}),n?B.jsx(ni,{title:"VCM Harness",open:ve==="vcm-harness",onOpenChange:De=>Te("vcm-harness",De),children:B.jsx(g2,{status:w,bootstrapStatus:E,applyResult:x,busy:_,onRefresh:T,onApply:k,onStartBootstrap:R})}):null,n?B.jsx(ni,{title:"New Task",open:ve==="new-task",onOpenChange:De=>Te("new-task",De),children:B.jsx("div",{className:"task-create",children:B.jsxs("form",{onSubmit:mt,children:[B.jsx("input",{value:Pt,onChange:De=>jt(De.target.value),placeholder:"task name"}),B.jsxs("label",{className:"task-create-option",children:[B.jsx("input",{type:"checkbox",checked:Tt,onChange:De=>Gt(De.target.checked)}),B.jsx("span",{children:"Create worktree and branch"})]}),Tt?B.jsxs("div",{className:"task-create-preview",children:[B.jsxs("small",{children:["branch: ",Be?`feature/${Be}`:"feature/<task>"]}),B.jsxs("small",{children:["worktree: ",Be?`.claude/worktrees/${Be}`:".claude/worktrees/<task>"]})]}):B.jsx("div",{className:"task-create-preview",children:B.jsx("small",{children:"uses current repository path and current branch"})}),B.jsx("button",{type:"submit",disabled:_||!Be,children:"Create"})]})})}):null,s.length>0?B.jsx(ni,{title:"Tasks",open:ve==="tasks",onOpenChange:De=>Te("tasks",De),children:B.jsx(x2,{tasks:s,activeTaskSlug:o,onSelect:ee})}):null,n&&me?B.jsx(B2,{task:me,roundState:a}):null,yt?B.jsx(z2,{busy:_,messages:p,orchestration:y,onClose:()=>lt(!1),onMarkAllDone:()=>{o&&Le(o)},onDeleteMessageHistory:()=>{o&&Vt(o)}}):null,kt?B.jsx(j2,{events:f,onClose:()=>fe(!1)}):null]})}function x_(n){return[n.autoOrchestration?"auto":"manual"].join(" + ")}function k2(n){const r=Object.entries(n.roles).map(([s,o])=>`${s}: ${o.permissionMode} / ${o.model} / ${o.effort}`).join("; ");return`Launch template: ${x_(n)}; ${r}`}function A2({autoSendEnabled:n,busy:r,enabled:s,fileTranslationAvailable:o,outputMode:p,targetLanguage:y,onAutoSendChange:f,onCreateBootstrap:a,onEnabledChange:c,onUpdateMemory:h,onOutputModeChange:d,onTargetLanguageChange:u,onOpenFileTranslation:b}){return B.jsxs("div",{className:"sidebar-settings",children:[B.jsxs("button",{"aria-pressed":s,className:s?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>c(!s),children:[B.jsx("span",{children:"Conversation translation"}),B.jsx("span",{children:s?"on":"off"})]}),B.jsxs("button",{"aria-pressed":n,className:n?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>f(!n),children:[B.jsx("span",{children:"Auto-send"}),B.jsx("span",{children:n?"on":"off"})]}),B.jsxs("label",{className:"settings-select-row",children:[B.jsx("span",{children:"Language"}),B.jsx("select",{value:y,disabled:r,onChange:w=>u(w.target.value),children:pg.map(w=>B.jsx("option",{value:w.value,children:w.label},w.value))})]}),B.jsxs("label",{className:"settings-select-row",children:[B.jsx("span",{children:"Output"}),B.jsx("select",{value:p,disabled:r,onChange:w=>d(w.target.value),children:c1.map(w=>B.jsx("option",{value:w.value,children:w.label},w.value))})]}),B.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open file translation":"Create or select a task first",type:"button",onClick:b,children:[B.jsx("span",{children:"File translation"}),B.jsx("span",{children:"open"})]}),B.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Run translation bootstrap":"Create or select a task first",type:"button",onClick:a,children:[B.jsx("span",{children:"Bootstrap"}),B.jsx("span",{children:"run"})]}),B.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Compact and update translation memory":"Create or select a task first",type:"button",onClick:h,children:[B.jsx("span",{children:"Update memory"}),B.jsx("span",{children:"run"})]})]})}function T2({busy:n,onGateEnabledChange:r,state:s}){return B.jsx("div",{className:"sidebar-settings",children:n2.map(o=>{const p=s==null?void 0:s.gates[o],y=!!(p!=null&&p.required);return B.jsxs("button",{"aria-pressed":y,className:y?"settings-toggle is-active":"settings-toggle",disabled:n||!s,title:p!=null&&p.status?`status: ${p.status}`:void 0,type:"button",onClick:()=>r(o,!y),children:[B.jsx("span",{children:D2(o)}),B.jsx("span",{children:y?"on":"off"})]},o)})})}function D2(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function R2({busy:n,onEnabledChange:r,onResetBinding:s,onStartQrLogin:o,onTranslationChange:p,qrCheck:y,qrLogin:f,status:a}){const c=!!(a!=null&&a.binding.tokenConfigured),h=!!(a!=null&&a.binding.tokenConfigured);return B.jsxs("div",{className:"gateway-panel",children:[B.jsxs("div",{className:"gateway-actions",children:[B.jsxs("button",{"aria-pressed":!!(a!=null&&a.enabled),className:a!=null&&a.enabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a||!a.enabled&&!c,title:c?"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:[B.jsx("span",{children:"Gateway"}),B.jsx("span",{children:a!=null&&a.enabled?"on":"off"})]}),B.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?p(!a.translationEnabled):void 0,children:[B.jsx("span",{children:"Translation"}),B.jsx("span",{children:a!=null&&a.translationEnabled?"on":"off"})]}),h?B.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:s,children:"Reset Binding"}):B.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),f?B.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,y?B.jsxs("p",{className:"muted",children:["QR status: ",y.status,y.message?` · ${y.message}`:""]}):null]})}function M2({activeTask:n,busy:r,onPull:s,project:o}){const p=!!(n&&!n.worktreePath&&n.cleanupStatus!=="cleaned"),y=p?`Inline task "${n==null?void 0:n.taskSlug}" uses the base repository.`:o.pullDisabledReason,f=!!(o.canPull&&!p);return B.jsxs("div",{className:"project-summary",children:[B.jsxs("dl",{children:[B.jsxs("div",{children:[B.jsx("dt",{children:"Base path"}),B.jsx("dd",{children:o.repoRoot})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Branch"}),B.jsx("dd",{children:L2(o)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Remote"}),B.jsx("dd",{children:o.upstreamBranch??"no upstream"})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Status"}),B.jsx("dd",{children:O2(o)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Commit"}),B.jsx("dd",{children:o.shortHeadCommit??o.headCommit??"unknown"})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Working tree"}),B.jsx("dd",{children:o.isDirty?"uncommitted changes":"clean"})]})]}),B.jsxs("div",{className:"connected-repo-actions",children:[B.jsx("button",{type:"button",disabled:r||!f,title:y??"Pull latest changes with git pull --ff-only",onClick:()=>void s(),children:"Pull"}),B.jsx("span",{className:"muted",children:o.checkedAt?`checked ${Bu(o.checkedAt)}`:"status not refreshed"})]}),y?B.jsx("p",{className:"muted",children:y}):null,o.warnings.length>0?B.jsx("ul",{className:"warnings",children:o.warnings.map(a=>B.jsx("li",{children:a},a))}):null]})}function L2(n){return n.branch||"unknown"}function O2(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 B2({roundState:n,task:r}){var d;const[s,o]=he.useState(()=>Date.now()),p=!!(n!=null&&n.startedAt&&n.status==="running"),y=rg(r.createdAt,s),f=ig(n,(n==null?void 0:n.totalCcActiveMs)??0,s),a=p&&n?ig(n,n.currentRoundCcActiveMs,s):0,c=p&&(n!=null&&n.startedAt)?rg(n.startedAt,s):0,h=((d=r.title)==null?void 0:d.trim())||r.taskSlug;return he.useEffect(()=>{const u=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(u)},[]),B.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[B.jsxs("div",{className:"task-status-dock-title",children:[B.jsx("strong",{title:h,children:h}),B.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),B.jsxs("dl",{className:"task-status-stats",children:[B.jsxs("div",{children:[B.jsx("dt",{children:"Session start"}),B.jsx("dd",{children:Bu(r.createdAt)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Session total"}),B.jsx("dd",{children:Aa(y)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Rounds"}),B.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Role runtime"}),B.jsx("dd",{children:Aa(f)})]})]}),p&&n?B.jsxs("div",{className:"current-round-status",children:[B.jsxs("div",{className:"current-round-title",children:[B.jsx("span",{children:"Current Round"}),B.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),B.jsxs("dl",{className:"task-status-stats",children:[B.jsxs("div",{children:[B.jsx("dt",{children:"Started"}),B.jsx("dd",{children:Bu(n.startedAt)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Total"}),B.jsx("dd",{children:Aa(c)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Role runtime"}),B.jsx("dd",{children:Aa(a)})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Turn count"}),B.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function ig(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 rg(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function Bu(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 Aa(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),o=Math.floor(r%3600/60),p=r%60;return s>0?o>0?`${s}h ${o}m`:`${s}h`:o>0?p>0?`${o}m ${p}s`:`${o}m`:`${p}s`}function N2(n){return n==="system"?"light":n==="light"?"dark":"system"}function sg(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function j2({events:n,onClose:r}){return B.jsx("div",{className:"modal-backdrop",children:B.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[B.jsxs("header",{children:[B.jsxs("div",{children:[B.jsx("h2",{children:"Events"}),B.jsxs("p",{className:"muted",children:[n.length," total"]})]}),B.jsx("button",{type:"button",onClick:r,children:"Close"})]}),B.jsx(i2,{events:n,maxEvents:null,showHeader:!1})]})})}function z2({busy:n,messages:r,orchestration:s,onClose:o,onMarkAllDone:p,onDeleteMessageHistory:y}){const f=rh(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(`
|
|
92
|
-
`))&&p()}function c(){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(`
|
|
93
|
-
`))&&y()}return B.jsx("div",{className:"modal-backdrop",children:B.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[B.jsxs("header",{children:[B.jsxs("div",{children:[B.jsx("h2",{children:"Messages"}),B.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),B.jsxs("div",{className:"modal-actions",children:[B.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),B.jsx("button",{type:"button",disabled:n||f.total===0,onClick:c,children:"Delete All"}),B.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),B.jsx(y2,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function ni({children:n,onOpenChange:r,open:s,title:o}){return B.jsxs("section",{className:"sidebar-section",children:[B.jsxs("button",{"aria-expanded":s,className:"sidebar-section-toggle",type:"button",onClick:()=>{r==null||r(!s)},children:[B.jsx("span",{children:o}),B.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),s?B.jsx("div",{className:"sidebar-section-content",children:n}):null]})}function E_(n,r){return n.find(s=>s.role===r)}function H2({activeRole:n,roles:r=zu,sessions:s,onSelect:o}){return B.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:r.map(p=>{const y=E_(s,p.name),f=(y==null?void 0:y.status)==="running"?y.activityStatus??"idle":(y==null?void 0:y.status)??"not_started";return B.jsxs("button",{className:p.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":p.name===n,onClick:()=>o(p.name),children:[B.jsx("span",{children:p.label}),B.jsx(Yr,{status:f})]},p.name)})})}const I2=[{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"}],U2=[{value:"gpt-5.5",label:"GPT-5.5",description:"Strong Codex reviewer default"},{value:"default",label:"Default",description:"Codex account default"}],k_=[{value:"default",label:"Default",description:"CLI or project default"},{value:"low",label:"Low",description:"Fastest reasoning"},{value:"medium",label:"Medium",description:"Balanced reasoning"},{value:"high",label:"High",description:"Deeper reasoning"},{value:"xhigh",label:"XHigh",description:"Extra high reasoning"}],P2=[...k_,{value:"max",label:"Max",description:"Maximum reasoning"},{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}];function F2({role:n,session:r,permissionMode:s,model:o,effort:p,busy:y=!1,onPermissionModeChange:f,onModelChange:a,onEffortChange:c,onStart:h,onResume:d,onStop:u,onRestart:b}){const w=(r==null?void 0:r.status)==="running",E=!!(r!=null&&r.claudeSessionId&&!w),x=!w&&!(r!=null&&r.claudeSessionId),v=Hu(n),S=v?U2:I2,g=v?k_:P2;return B.jsxs("div",{className:"session-controls",children:[v?null:B.jsxs("label",{className:"session-option-field permission-mode-field",children:[B.jsx("span",{children:"Permission"}),B.jsxs("select",{value:s,onChange:_=>f(_.target.value),children:[B.jsx("option",{value:"default",children:"默认"}),B.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),B.jsxs("label",{className:"session-option-field model-field",children:[B.jsx("span",{children:"Model"}),B.jsx("select",{value:o,onChange:_=>a(_.target.value),children:S.map(_=>B.jsx("option",{value:_.value,children:_.label},_.value))})]}),B.jsxs("label",{className:"session-option-field effort-field",children:[B.jsx("span",{children:"Effort"}),B.jsx("select",{value:p,onChange:_=>c(_.target.value),children:g.map(_=>B.jsx("option",{value:_.value,children:_.label},_.value))})]}),B.jsxs("div",{className:"session-toolbar",children:[B.jsx("button",{type:"button",disabled:y||!x,onClick:h,children:"Start"}),B.jsx("button",{type:"button",disabled:y||!E,onClick:d,children:"Resume"}),B.jsx("button",{type:"button",disabled:y||!r,onClick:b,children:"Restart"}),B.jsx("button",{type:"button",disabled:y||!r,onClick:u,children:"Stop"})]})]})}function q2({role:n,session:r,permissionMode:s,model:o,effort:p,active:y=!0,busy:f,translationEnabled:a,translationAutoSendEnabled:c,translationTargetLanguage:h,onPermissionModeChange:d,onModelChange:u,onEffortChange:b,onStart:w,onResume:E,onStop:x,onRestart:v,onTerminalEvent:S}){const g=Hu(n),_=!g&&a&&(r==null?void 0:r.status)==="running";return B.jsx("section",{className:"session-console",children:B.jsxs("div",{className:_?"session-console-body has-translation":"session-console-body",children:[B.jsxs("div",{className:"terminal-pane",children:[B.jsx(F2,{role:n,session:r,permissionMode:s,model:o,effort:p,busy:f,onPermissionModeChange:d,onModelChange:u,onEffortChange:b,onStart:w,onResume:E,onStop:x,onRestart:v}),(r==null?void 0:r.status)==="running"?B.jsx(w_,{sessionId:r.id,active:y,onEvent:S},r.id):B.jsxs("div",{className:"terminal-empty",children:[B.jsx("strong",{children:n}),B.jsx("span",{children:g?r!=null&&r.claudeSessionId?`Resume this role to reconnect the ${n==="codex-translator"?"Codex Translator":"Codex Reviewer"} terminal.`:`Start this role to open an embedded ${n==="codex-translator"?"Codex Translator":"Codex Reviewer"} terminal.`:r!=null&&r.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]}),_?B.jsx("div",{className:"translation-pane",children:B.jsx(jx,{active:y,autoSendEnabled:c,targetLanguage:h,taskSlug:r.taskSlug,role:n,sessionId:r.id},r.id)}):null]})})}function V2(n,r,s){var y;if(!n||s.mode!=="auto")return null;const o=new Map(n.map(f=>[f.id,f])),p=r.filter(f=>{var a;return f.dispatchingAt?((a=o.get(f.id))==null?void 0:a.dispatchingAt)!==f.dispatchingAt:!1});return p.length===0?null:((y=p.sort(G2)[p.length-1])==null?void 0:y.toRole)??null}function G2(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)}const $2=2e3;function Y2({task:n,activeRole:r,codexReviewerEnabled:s,translationEnabled:o,translationAutoSendEnabled:p,translationTargetLanguage:y,refreshNonce:f=0,onTaskChanged:a,onActiveRoleChange:c,onMessagesChanged:h,onOrchestrationChanged:d,onRoundStateChanged:u,onEventsChanged:b,onLaunchStateChanged:w}){const[E,x]=he.useState(null),[v,S]=he.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"default","codex-translator":"default"}),[g,_]=he.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"gpt-5.5","codex-translator":"gpt-5.5"}),[A,M]=he.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"xhigh","codex-translator":"medium"}),[D,T]=he.useState(!1),[k,R]=he.useState(""),[N,I]=he.useState([]),[P,F]=he.useState(null),Y=he.useRef(null),W=!!(E!=null&&E.sessions.some(ue=>ue.role==="codex-reviewer")),G=!!(E!=null&&E.sessions.some(ue=>ue.role==="codex-translator")),$=s||W,Q=o||G,H=[...Kr,...$?[hg]:[],...Q?[fg]:[]],O=he.useCallback((ue,te)=>{var xe;const Se=((xe=Y.current)==null?void 0:xe.taskSlug)===n.taskSlug?Y.current.messages:null,we=V2(Se,ue,te);Y.current={taskSlug:n.taskSlug,messages:ue},F(te),h==null||h(ue),d==null||d(te),we&&(c(we),ae(`auto switched to ${we} before VCM dispatch`))},[c,h,d,n.taskSlug]),z=he.useCallback((ue,te,Se,we)=>{x(ue),O(te,Se),u==null||u(we)},[O,u]),V=he.useCallback(async()=>{const[ue,te,Se,we]=await Promise.all([Ce.getTaskStatus(n.taskSlug),Ce.listMessages(n.taskSlug),Ce.getOrchestrationState(n.taskSlug),Ce.getSessionRoundState(n.taskSlug)]);z(ue,te,Se,we)},[z,n.taskSlug]);he.useEffect(()=>{V().catch(ue=>R(ue.message))},[V,f]),he.useEffect(()=>{I([]),b==null||b([])},[b,n.taskSlug]),he.useEffect(()=>{E&&!$&&r==="codex-reviewer"&&c("project-manager"),E&&!Q&&r==="codex-translator"&&c("project-manager")},[r,$,Q,c,E]),he.useEffect(()=>{S(ue=>{let te=!1;const Se={...ue};for(const we of(E==null?void 0:E.sessions)??[])Se[we.role]!==we.permissionMode&&(Se[we.role]=we.permissionMode,te=!0);return te?Se:ue})},[E==null?void 0:E.sessions]),he.useEffect(()=>{_(ue=>{let te=!1;const Se={...ue};for(const we of(E==null?void 0:E.sessions)??[]){const xe=we.model??"default";Se[we.role]!==xe&&(Se[we.role]=xe,te=!0)}return te?Se:ue})},[E==null?void 0:E.sessions]),he.useEffect(()=>{M(ue=>{let te=!1;const Se={...ue};for(const we of(E==null?void 0:E.sessions)??[]){const xe=we.effort??"default";Se[we.role]!==xe&&(Se[we.role]=xe,te=!0)}return te?Se:ue})},[E==null?void 0:E.sessions]),he.useEffect(()=>{const ue=(E==null?void 0:E.sessions)??[],te=ue.filter(xe=>!Hu(xe.role)),Se=new Set(te.map(xe=>xe.role)),we={};for(const xe of Kr)we[xe.name]={permissionMode:v[xe.name],model:g[xe.name],effort:A[xe.name]};w==null||w({taskSlug:n.taskSlug,roles:we,autoOrchestration:((P==null?void 0:P.mode)??"auto")==="auto",statusLoaded:!!E,sessionCount:ue.length,hasAnySession:ue.length>0,allRolesHaveSession:Kr.every(xe=>Se.has(xe.name))})},[g,A,w,P==null?void 0:P.mode,v,E,n.taskSlug]),he.useEffect(()=>{const ue=window.setInterval(()=>{Promise.all([Ce.getTaskStatus(n.taskSlug),Ce.listMessages(n.taskSlug),Ce.getOrchestrationState(n.taskSlug),Ce.getSessionRoundState(n.taskSlug)]).then(([te,Se,we,xe])=>{z(te,Se,we,xe)}).catch(te=>R(te.message))},3e3);return()=>window.clearInterval(ue)},[z,n.taskSlug]),he.useEffect(()=>{let ue=!1,te=!1;const Se=window.setInterval(()=>{te||(te=!0,Promise.all([Ce.listMessages(n.taskSlug),Ce.getOrchestrationState(n.taskSlug)]).then(([we,xe])=>{ue||O(we,xe)}).catch(we=>{ue||R(we.message)}).finally(()=>{te=!1}))},$2);return()=>{ue=!0,window.clearInterval(Se)}},[O,n.taskSlug]);async function j(ue){T(!0),R("");try{await ue(),await V(),await a()}catch(te){R(te instanceof Error?te.message:"Action failed.")}finally{T(!1)}}async function ee(){const ue=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(`
|
|
94
|
-
`):[`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(`
|
|
95
|
-
`);if(window.confirm(ue)){T(!0),R("");try{await Ce.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),ae(`closed ${n.taskSlug}`),await a()}catch(Se){R(Se instanceof Error?Se.message:"Close task failed.")}finally{T(!1)}}}function ae(ue){I(te=>{const Se=[...te,`${new Date().toLocaleTimeString()} ${ue}`];return b==null||b(Se),Se})}function ge(ue,te){S(Se=>({...Se,[ue]:te}))}function K(ue,te){_(Se=>({...Se,[ue]:te}))}function q(ue,te){M(Se=>({...Se,[ue]:te}))}async function ce(ue){T(!0),R("");try{const te=await Ce.updateOrchestrationState(n.taskSlug,{mode:ue});F(te),d==null||d(te),ae(`auto orchestration ${ue==="auto"?"enabled":"disabled"}`)}catch(te){R(te instanceof Error?te.message:"Failed to update orchestration mode.")}finally{T(!1)}}const le=((P==null?void 0:P.mode)??"auto")==="auto";return B.jsxs("div",{className:"task-workspace",children:[B.jsxs("header",{className:"workspace-header",children:[B.jsx("div",{className:"workspace-title-line",children:B.jsx("h1",{children:n.title||n.taskSlug})}),B.jsx(H2,{activeRole:r,roles:H,sessions:(E==null?void 0:E.sessions)??[],onSelect:c}),B.jsxs("div",{className:"workspace-header-actions",children:[B.jsxs("button",{"aria-label":`Auto orchestration is ${le?"on":"off"}`,"aria-pressed":le,className:`orchestration-toggle${le?" is-active":""}`,disabled:D,type:"button",onClick:()=>void ce(le?"manual":"auto"),children:[B.jsx("span",{children:"Auto orchestration"}),B.jsx("strong",{children:le?"on":"off"})]}),B.jsx("button",{className:"danger-button",type:"button",disabled:D,onClick:()=>void ee(),children:"Close Task"})]})]}),k?B.jsx("div",{className:"error-banner",children:k}):null,B.jsx("div",{className:"workspace-grid",children:B.jsx("div",{className:"workspace-main",children:B.jsx("div",{className:"role-console-stack",children:H.map(ue=>{const te=ue.name,Se=te===r,we=E_((E==null?void 0:E.sessions)??[],te);return B.jsx("div",{className:Se?"role-console-panel is-active":"role-console-panel","aria-hidden":!Se,children:B.jsx(q2,{role:te,session:we,permissionMode:v[te],model:g[te],effort:A[te],active:Se,busy:D,translationEnabled:o,translationAutoSendEnabled:p,translationTargetLanguage:y,onPermissionModeChange:xe=>ge(te,xe),onModelChange:xe=>K(te,xe),onEffortChange:xe=>q(te,xe),onStart:()=>void j(async()=>{await Ce.startRoleSession(n.taskSlug,te,{cols:100,rows:28,permissionMode:v[te],model:g[te],effort:A[te]}),ae(`started ${te} with ${v[te]} / ${g[te]} / ${A[te]}`)}),onResume:()=>void j(async()=>{await Ce.resumeRoleSession(n.taskSlug,te,{cols:100,rows:28,permissionMode:v[te],model:g[te],effort:A[te]}),ae(`resumed ${te} with ${v[te]} / ${g[te]} / ${A[te]}`)}),onStop:()=>void j(async()=>{await Ce.stopRoleSession(n.taskSlug,te),ae(`stopped ${te}`)}),onRestart:()=>void j(async()=>{await Ce.restartRoleSession(n.taskSlug,te,{cols:100,rows:28,permissionMode:v[te],model:g[te],effort:A[te]}),ae(`restarted ${te} with ${v[te]} / ${g[te]} / ${A[te]}`)}),onTerminalEvent:xe=>ae(`${ue.label}: ${xe}`)})},te)})})})})]})}const K2=120*1e3,lg=1400,W2=3;function X2(){const[n,r]=he.useState(null),[s,o]=he.useState([]),[p,y]=he.useState(null),[f,a]=he.useState(null),[c,h]=he.useState(null),[d,u]=he.useState(null),[b,w]=he.useState(null),[E,x]=he.useState(null),[v,S]=he.useState(!1),[g,_]=he.useState([]),[A,M]=he.useState(null),[D,T]=he.useState(null),[k,R]=he.useState(null),[N,I]=he.useState(null),[P,F]=he.useState(null),[Y,W]=he.useState(null),[G,$]=he.useState("project-manager"),[Q,H]=he.useState("system"),[O,z]=he.useState(!0),[V,j]=he.useState("off"),[ee,ae]=he.useState(!1),[ge,K]=he.useState(!1),[q,ce]=he.useState(a1),[le,ue]=he.useState(o1),[te,Se]=he.useState(!1),[we,xe]=he.useState(()=>u1()),[nt,Le]=he.useState(null),[Vt,Pt]=he.useState(0),[jt,Tt]=he.useState(null),[Gt,yt]=he.useState(!1),[lt,kt]=he.useState(!1),[fe,ve]=he.useState(""),ke=he.useRef({}),Oe=he.useRef(null),Be=he.useRef(""),me=he.useMemo(()=>Jx(g,A),[g,A]),Te=(nt==null?void 0:nt.taskSlug)===(me==null?void 0:me.taskSlug)?nt:null,mt=!!(Te!=null&&Te.statusLoaded&&Te.allRolesHaveSession),De=!!(me&&(Te!=null&&Te.statusLoaded)&&!Te.hasAnySession),Je=he.useCallback(ne=>{H(ne.themeMode),z(ne.flowPauseAlerts),j(ne.permissionRequestMode),ae(ne.translationEnabled),K(ne.translationAutoSendEnabled),ce(ne.translationTargetLanguage),ue(ne.translationOutputMode),xe(ne.launchTemplate)},[]),Pe=he.useCallback(()=>{Oe.current!==null&&(window.clearInterval(Oe.current),Oe.current=null)},[]),wn=he.useCallback((ne={})=>{Pe(),ne.resetAudio&&nE(),Ta(),Oe.current=window.setInterval(()=>{Ta()},lg)},[Pe]),$t=he.useCallback(()=>{Pe(),Tt(null);let ne=1;Ta(),Oe.current=window.setInterval(()=>{ne+=1,Ta(),ne>=W2&&Oe.current!==null&&(window.clearInterval(Oe.current),Oe.current=null)},lg)},[Pe]),es=he.useCallback((ne,be=`manual-${Date.now()}`,St={})=>{Tt({id:be,text:ne}),wn(St)},[wn]),nr=he.useCallback(()=>{Pe(),Tt(null)},[Pe]),jn=he.useCallback(()=>{Pe(),Tt(null),z(!1)},[Pe]),ir=he.useCallback(ne=>{me!=null&&me.taskSlug&&T({taskSlug:me.taskSlug,messages:ne})},[me==null?void 0:me.taskSlug]),zn=he.useCallback(ne=>{me!=null&&me.taskSlug&&R({taskSlug:me.taskSlug,orchestration:ne})},[me==null?void 0:me.taskSlug]),rr=he.useCallback(ne=>{me!=null&&me.taskSlug&&I({taskSlug:me.taskSlug,events:ne})},[me==null?void 0:me.taskSlug]),Ni=he.useCallback(ne=>{if(!(me!=null&&me.taskSlug)||ne.taskSlug!==me.taskSlug||(F({taskSlug:ne.taskSlug,roundState:ne}),ne.status!=="stopped"||!ne.roundId))return;const be=eE(ne);if(ke.current[ne.taskSlug]===be||!O)return;const Yt=ne.activeRole??"role";J2(ne)>=K2?es(`No new turn started after ${Yt} stopped.`,be):$t(),ke.current[ne.taskSlug]=be},[me==null?void 0:me.taskSlug,O,$t,es]),Pa=he.useCallback(ne=>{Le(be=>(be==null?void 0:be.taskSlug)===ne.taskSlug&&be.statusLoaded===ne.statusLoaded&&be.sessionCount===ne.sessionCount&&be.hasAnySession===ne.hasAnySession&&be.allRolesHaveSession===ne.allRolesHaveSession&&be.autoOrchestration===ne.autoOrchestration&&JSON.stringify(be.roles)===JSON.stringify(ne.roles)?be:ne)},[]);async function ri(){const ne=await Ce.listTasks();return _(ne),M(be=>{var St;return be&&ne.some(Yt=>Yt.taskSlug===be)?be:((St=ne[0])==null?void 0:St.taskSlug)??null}),ne}async function si(){const ne=await Ce.getHarnessStatus();return y(ne),ne}async function Tn(){const ne=await Ce.getHarnessBootstrapStatus();return a(ne),ne}async function ts(){const ne=await Ce.getGatewayStatus();return u(ne),ne}async function ol(){const ne=await Ce.getRecentRepositoryPaths();return o(ne),ne}async function sr(ne){const[be,St]=await Promise.all([Ce.listMessages(ne),Ce.getOrchestrationState(ne)]);T({taskSlug:ne,messages:be}),R({taskSlug:ne,orchestration:St})}async function lr(ne){const be=await Ce.getCodexReviewState(ne);return W({taskSlug:ne,state:be}),be}he.useEffect(()=>{Promise.all([Ce.getCurrentProject(),Ce.getRecentRepositoryPaths(),Ce.getAppPreferences(),Ce.getGatewayStatus()]).then(async([ne,be,St,Yt])=>{r(ne),o(be),u(Yt),Je(St),ne&&await Promise.all([ri(),si(),Tn()])}).catch(ne=>ve(ne.message))},[Je]),he.useEffect(()=>{const ne=window.matchMedia("(prefers-color-scheme: dark)"),be=()=>yt(ne.matches);return be(),ne.addEventListener("change",be),()=>ne.removeEventListener("change",be)},[]),he.useEffect(()=>()=>Pe(),[Pe]),he.useEffect(()=>{const ne=Q==="system"?Gt?"dark":"light":Q;document.documentElement.dataset.theme=ne,document.documentElement.dataset.themeMode=Q},[Gt,Q]),he.useEffect(()=>{!(d!=null&&d.enabled)||!O||(jn(),Ce.updateAppPreferences({flowPauseAlerts:!1}).then(ne=>Je(ne)).catch(ne=>ve(ne.message)))},[Je,jn,O,d==null?void 0:d.enabled]),he.useEffect(()=>{if(!(d!=null&&d.enabled)||!n||!me)return;const ne=`${n.repoRoot}:${me.taskSlug}`;if(d.currentProjectId===n.repoRoot&&d.currentTaskSlug===me.taskSlug){Be.current=ne;return}Be.current!==ne&&(Be.current=ne,Ce.updateGatewaySettings({currentProjectId:n.repoRoot,currentTaskSlug:me.taskSlug}).then(be=>u(be)).catch(be=>{Be.current===ne&&(Be.current=""),ve(be.message)}))},[me==null?void 0:me.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]),he.useEffect(()=>{if(!(me!=null&&me.taskSlug)){W(null);return}lr(me.taskSlug).catch(ne=>ve(ne.message))},[me==null?void 0:me.taskSlug]),he.useEffect(()=>{if(!(me!=null&&me.taskSlug))return;const ne=me.taskSlug,be=window.setInterval(()=>{lr(ne).catch(St=>ve(St.message))},3e3);return()=>window.clearInterval(be)},[me==null?void 0:me.taskSlug]);async function Qe(ne){kt(!0),ve("");try{await ne()}catch(be){ve(be instanceof Error?be.message:"Action failed.")}finally{kt(!1)}}const ns=D&&D.taskSlug===(me==null?void 0:me.taskSlug)?D.messages:[],cl=k&&k.taskSlug===(me==null?void 0:me.taskSlug)?k.orchestration:null,ul=N&&N.taskSlug===(me==null?void 0:me.taskSlug)?N.events:[],Dn=P&&P.taskSlug===(me==null?void 0:me.taskSlug)?P.roundState:null,gt=Y&&Y.taskSlug===(me==null?void 0:me.taskSlug)?Y.state:null,Mt=!!(gt&&Object.values(gt.gates).some(ne=>ne.required));return B.jsxs(h1,{sidebar:B.jsx(E2,{project:n,recentRepositoryPaths:s,tasks:g,activeTaskSlug:(me==null?void 0:me.taskSlug)??null,messages:ns,orchestration:cl,events:ul,roundState:Dn,codexReview:gt,translationEnabled:ee,translationAutoSendEnabled:ge,translationTargetLanguage:q,translationOutputMode:le,harnessStatus:p,harnessBootstrapStatus:f,harnessApplyResult:c,gatewayStatus:d,gatewayQrLogin:b,gatewayQrCheck:E,busy:lt,onConnect:ne=>Qe(async()=>{const be=await Ce.connectProject({repoPath:ne});r(be),h(null),await Promise.all([ri(),si(),Tn(),ol()])}),onRefreshConnectedRepository:()=>Qe(async()=>{const ne=await Ce.getCurrentProject();r(ne)}),onPullConnectedRepository:()=>Qe(async()=>{const ne=await Ce.pullCurrentProject();r(ne)}),onRefreshHarness:()=>Qe(async()=>{h(null),await Promise.all([si(),Tn()])}),onApplyHarness:()=>Qe(async()=>{const ne=await Ce.applyHarness();h(ne),await Promise.all([si(),Tn()])}),onStartHarnessBootstrap:()=>Qe(async()=>{const ne=await Ce.startHarnessBootstrap();a(ne.status)}),onRefreshGateway:()=>Qe(async()=>{await ts()}),onGatewayEnabledChange:ne=>{Qe(async()=>{const[be,St]=await Promise.all([Ce.updateGatewaySettings({enabled:ne,...ne&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(me==null?void 0:me.taskSlug)??null}:{}}),ne?Ce.updateAppPreferences({flowPauseAlerts:!1}):Promise.resolve(null)]);St&&Je(St),ne&&jn(),u(be)})},onGatewayTranslationChange:ne=>{Qe(async()=>{const be=await Ce.updateGatewaySettings({translationEnabled:ne});u(be)})},onStartGatewayQrLogin:()=>{Qe(async()=>{const ne=await Ce.startGatewayQrLogin();w(ne),x(null),S(!0),await ts()})},onResetGatewayBinding:()=>{Qe(async()=>{const ne=await Ce.resetGatewayBinding();u(ne),w(null),x(null),S(!1)})},onCodexGateEnabledChange:(ne,be)=>{Qe(async()=>{if(!me)throw new Error("Create or select a task before changing Codex Review Gates.");const St=await Ce.updateCodexReviewSettings(me.taskSlug,{gates:{[ne]:be}});W({taskSlug:me.taskSlug,state:St})})},onTranslationEnabledChange:ne=>{ae(ne),Qe(async()=>{const be=await Ce.updateAppPreferences({translationEnabled:ne});Je(be)})},onTranslationAutoSendChange:ne=>{K(ne),Qe(async()=>{const be=await Ce.updateAppPreferences({translationAutoSendEnabled:ne});Je(be)})},onTranslationTargetLanguageChange:ne=>{ce(ne),Qe(async()=>{const be=await Ce.updateAppPreferences({translationTargetLanguage:ne});Je(be)})},onTranslationOutputModeChange:ne=>{ue(ne),Qe(async()=>{const be=await Ce.updateAppPreferences({translationOutputMode:ne});Je(be)})},onOpenFileTranslation:()=>Se(!0),onCreateTranslationBootstrap:()=>{Qe(async()=>{if(!me)throw new Error("Create or select a task before running Translation Bootstrap.");await Ce.createCodexBootstrap({taskSlug:me.taskSlug,targetLanguage:q})})},onUpdateTranslationMemory:()=>{Qe(async()=>{if(!me)throw new Error("Create or select a task before updating translation memory.");await Ce.createCodexMemoryUpdate({taskSlug:me.taskSlug,targetLanguage:q})})},onCreateTask:ne=>Qe(async()=>{const be=await Ce.createTask(ne);await ri(),M(be.taskSlug),await lr(be.taskSlug)}),onSelectTask:M,themeMode:Q,onThemeModeChange:ne=>{H(ne),Qe(async()=>{const be=await Ce.updateAppPreferences({themeMode:ne});Je(be)})},flowPauseAlerts:O,onFlowPauseAlertsChange:ne=>{if(d!=null&&d.enabled){jn();return}z(ne),ne&&tE(),Qe(async()=>{const be=await Ce.updateAppPreferences({flowPauseAlerts:ne});Je(be)})},permissionRequestMode:V,onPermissionRequestModeChange:ne=>{j(ne),Qe(async()=>{const be=await Ce.updateAppPreferences({permissionRequestMode:ne});Je(be)})},launchTemplate:we,canSaveLaunchTemplate:mt,canOneClickStart:De,onSaveLaunchTemplate:()=>{Qe(async()=>{if(!(Te!=null&&Te.allRolesHaveSession))throw new Error("Start all four role sessions before saving a launch template.");const ne=await Ce.updateAppPreferences({launchTemplate:{version:1,roles:Te.roles,autoOrchestration:Te.autoOrchestration}});Je(ne)})},onOneClickStart:()=>{Qe(async()=>{if(!me)throw new Error("Create or select a task before one-click start.");if((await Ce.getTaskStatus(me.taskSlug)).sessions.length>0)throw new Error("One-click start is only available before any role session has started.");const be=await Ce.updateOrchestrationState(me.taskSlug,{mode:we.autoOrchestration?"auto":"manual"});R({taskSlug:me.taskSlug,orchestration:be});const St=t2(we,{codexReviewerEnabled:Mt});for(const Yt of St)await Ce.startRoleSession(me.taskSlug,Yt.role,{cols:100,rows:28,permissionMode:Yt.permissionMode,model:Yt.model,effort:Yt.effort});$("project-manager"),await sr(me.taskSlug),await ri(),Pt(Yt=>Yt+1)})},onTryFlowPauseAlert:()=>{es("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:ne=>{Qe(async()=>{const be=await Ce.markAllMessagesDone(ne);T({taskSlug:ne,messages:be.messages}),await sr(ne)})},onDeleteMessageHistory:ne=>{Qe(async()=>{const be=await Ce.deleteMessageHistory(ne);T({taskSlug:ne,messages:be.messages}),await sr(ne)})}}),children:[fe?B.jsx("div",{className:"error-banner",children:fe}):null,jt?B.jsx("div",{className:"flow-pause-alert-backdrop",children:B.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:[B.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),B.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),B.jsx("p",{id:"flow-pause-alert-body",children:jt.text}),B.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."}),B.jsx("button",{type:"button",autoFocus:!0,onClick:nr,children:"Confirm"})]})}):null,v&&b?B.jsx(Q2,{busy:lt,qrCheck:E,qrLogin:b,onCheck:()=>{Qe(async()=>{const ne=await Ce.checkGatewayQrLogin();x(ne),(ne.status==="confirmed"||ne.status==="binded_redirect")&&S(!1),await ts()})},onClose:()=>S(!1)}):null,n&&me?B.jsx(Y2,{task:me,activeRole:G,codexReviewerEnabled:Mt,translationEnabled:ee,translationAutoSendEnabled:ge,translationTargetLanguage:q,refreshNonce:Vt,onTaskChanged:async()=>{await ri()},onActiveRoleChange:$,onMessagesChanged:ir,onOrchestrationChanged:zn,onRoundStateChanged:Ni,onEventsChanged:rr,onLaunchStateChanged:Pa}):B.jsxs("section",{className:"empty-workspace",children:[B.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),B.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."})]}),B.jsx(Hx,{open:te,taskSlug:(me==null?void 0:me.taskSlug)??null,targetLanguage:q,onClose:()=>Se(!1)})]})}function Q2({busy:n,onCheck:r,onClose:s,qrCheck:o,qrLogin:p}){const[y,f]=he.useState(""),[a,c]=he.useState("");return he.useEffect(()=>{let h=!1;if(c(""),f(""),p.qrcodeUrl.startsWith("data:image/")){f(p.qrcodeUrl);return}try{const d=Qr(0,"M");d.addData(p.qrcodeUrl),d.make(),h||f(d.createDataURL(8,2))}catch(d){h||c(d instanceof Error?d.message:"Failed to render QR code.")}return()=>{h=!0}},[p.qrcodeUrl]),B.jsx("div",{className:"modal-backdrop",children:B.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[B.jsxs("header",{children:[B.jsxs("div",{children:[B.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),B.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),B.jsx("button",{type:"button",onClick:s,children:"Close"})]}),B.jsxs("div",{className:"gateway-qr-modal-body",children:[B.jsx("div",{className:"gateway-qr-code-frame",children:y?B.jsx("img",{alt:"Weixin Gateway QR login",src:y}):B.jsx("div",{className:"gateway-qr-placeholder",children:a||"Rendering QR code..."})}),B.jsxs("dl",{className:"gateway-qr-meta",children:[B.jsxs("div",{children:[B.jsx("dt",{children:"Status"}),B.jsx("dd",{children:(o==null?void 0:o.status)??p.status})]}),B.jsxs("div",{children:[B.jsx("dt",{children:"Expires"}),B.jsx("dd",{children:Z2(p.expiresAt)})]}),o!=null&&o.message?B.jsxs("div",{children:[B.jsx("dt",{children:"Message"}),B.jsx("dd",{children:o.message})]}):null]})]}),B.jsx("footer",{children:B.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function Z2(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 Oi=null;function J2(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 eE(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}async function tE(){const n=A_();return n?T_(n):!1}async function Ta(){const n=A_();if(!n||!await T_(n))return!1;try{const s=n.createGain(),o=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),og(n,s,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),og(n,s,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function A_(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Oi||Oi.state==="closed")&&(Oi=new n),Oi}catch{return null}}function nE(){Nu(Oi)}function Nu(n){Oi=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function T_(n){if(ag(n))return!0;try{await n.resume();const r=ag(n);return!r&&n===Oi&&Nu(n),r}catch{return n===Oi&&Nu(n),!1}}function ag(n){return n.state==="running"}function og(n,r,s){const o=n.createGain(),p=n.createOscillator(),y=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),p.type="sine",p.frequency.setValueAtTime(s.frequency,s.startAt),y.type="triangle",y.frequency.setValueAtTime(s.frequency*2.01,s.startAt),p.connect(o),y.connect(o),o.connect(r),p.start(s.startAt),y.start(s.startAt),p.stop(f+.02),y.stop(f+.02)}const D_=document.getElementById("root");if(!D_)throw new Error("Missing #root element.");X0.createRoot(D_).render(B.jsx(he.StrictMode,{children:B.jsx(X2,{})}));
|