vibe-coding-master 0.3.32 → 0.4.1
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 +1 -1
- package/dist/backend/api/harness-routes.js +56 -0
- package/dist/backend/api/session-routes.js +5 -0
- package/dist/backend/api/translation-routes.js +4 -0
- package/dist/backend/cli/install-vcm-harness.js +12 -0
- package/dist/backend/server.js +10 -8
- package/dist/backend/services/claude-hook-service.js +42 -2
- package/dist/backend/services/harness-revision.js +32 -0
- package/dist/backend/services/harness-service.js +324 -118
- package/dist/backend/services/session-service.js +385 -13
- package/dist/backend/templates/harness/harness-engineer-agent.js +63 -0
- package/dist/shared/constants.js +11 -1
- package/dist-frontend/assets/index-kJDZAzjD.css +32 -0
- package/dist-frontend/assets/index-uYhgIwNK.js +94 -0
- package/dist-frontend/index.html +2 -2
- package/docs/full-harness-baseline.md +1 -1
- package/docs/product-design.md +1 -1
- package/docs/v0.4-harness-optimization-plan.md +662 -0
- package/docs/{v0.4-custom-workflow-plan.md → v0.5-custom-workflow-plan.md} +15 -11
- package/docs/vcm-cc-best-practices.md +7 -12
- package/package.json +1 -1
- package/dist-frontend/assets/index-BaIbh99h.js +0 -94
- package/dist-frontend/assets/index-BvUHLq4X.css +0 -32
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
var G0=Object.defineProperty;var V0=(n,r,s)=>r in n?G0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var Jp=(n,r,s)=>V0(n,typeof r!="symbol"?r+"":r,s);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const v of d)if(v.type==="childList")for(const f of v.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(d){const v={};return d.integrity&&(v.integrity=d.integrity),d.referrerPolicy&&(v.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?v.credentials="include":d.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function o(d){if(d.ep)return;d.ep=!0;const v=s(d);fetch(d.href,v)}})();function gg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ru={exports:{}},Qs={};/**
|
|
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 em;function $0(){if(em)return Qs;em=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,d,v){var f=null;if(v!==void 0&&(f=""+v),d.key!==void 0&&(f=""+d.key),"key"in d){v={};for(var a in d)a!=="key"&&(v[a]=d[a])}else v=d;return d=v.ref,{$$typeof:n,type:o,key:f,ref:d!==void 0?d:null,props:v}}return Qs.Fragment=r,Qs.jsx=s,Qs.jsxs=s,Qs}var tm;function K0(){return tm||(tm=1,ru.exports=$0()),ru.exports}var O=K0(),su={exports:{}},Ne={};/**
|
|
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 nm;function Y0(){if(nm)return Ne;nm=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),v=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"),m=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),_=Symbol.iterator;function w(z){return z===null||typeof z!="object"?null:(z=_&&z[_]||z["@@iterator"],typeof z=="function"?z:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function S(z,G,j){this.props=z,this.context=G,this.refs=y,this.updater=j||E}S.prototype.isReactComponent={},S.prototype.setState=function(z,G){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,G,"setState")},S.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function g(){}g.prototype=S.prototype;function b(z,G,j){this.props=z,this.context=G,this.refs=y,this.updater=j||E}var A=b.prototype=new g;A.constructor=b,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,G,j){var te=j.ref;return{$$typeof:n,type:z,key:G,ref:te!==void 0?te:null,props:j}}function N(z,G){return R(z.type,G,z.props)}function I(z){return typeof z=="object"&&z!==null&&z.$$typeof===n}function P(z){var G={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(j){return G[j]})}var F=/\/+/g;function K(z,G){return typeof z=="object"&&z!==null&&z.key!=null?P(""+z.key):G.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(G){z.status==="pending"&&(z.status="fulfilled",z.value=G)},function(G){z.status==="pending"&&(z.status="rejected",z.reason=G)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function V(z,G,j,te,he){var me=typeof z;(me==="undefined"||me==="boolean")&&(z=null);var Y=!1;if(z===null)Y=!0;else switch(me){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(z.$$typeof){case n:case r:Y=!0;break;case m:return Y=z._init,V(Y(z._payload),G,j,te,he)}}if(Y)return he=he(z),Y=te===""?"."+K(z,0):te,M(he)?(j="",Y!=null&&(j=Y.replace(F,"$&/")+"/"),V(he,G,j,"",function(Z){return Z})):he!=null&&(I(he)&&(he=N(he,j+(he.key==null||z&&z.key===he.key?"":(""+he.key).replace(F,"$&/")+"/")+Y)),G.push(he)),1;Y=0;var q=te===""?".":te+":";if(M(z))for(var oe=0;oe<z.length;oe++)te=z[oe],me=q+K(te,oe),Y+=V(te,G,j,me,he);else if(oe=w(z),typeof oe=="function")for(z=oe.call(z),oe=0;!(te=z.next()).done;)te=te.value,me=q+K(te,oe++),Y+=V(te,G,j,me,he);else if(me==="object"){if(typeof z.then=="function")return V(W(z),G,j,te,he);throw G=String(z),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Y}function $(z,G,j){if(z==null)return z;var te=[],he=0;return V(z,te,"","",function(me){return G.call(j,me,he++)}),te}function ee(z){if(z._status===-1){var G=z._result;G=G(),G.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=G)}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 G=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(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},B={map:$,forEach:function(z,G,j){$(z,function(){G.apply(this,arguments)},j)},count:function(z){var G=0;return $(z,function(){G++}),G},toArray:function(z){return $(z,function(G){return G})||[]},only:function(z){if(!I(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Ne.Activity=u,Ne.Children=B,Ne.Component=S,Ne.Fragment=s,Ne.Profiler=d,Ne.PureComponent=b,Ne.StrictMode=o,Ne.Suspense=c,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(z){return T.H.useMemoCache(z)}},Ne.cache=function(z){return function(){return z.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(z,G,j){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var te=x({},z.props),he=z.key;if(G!=null)for(me in G.key!==void 0&&(he=""+G.key),G)!k.call(G,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&G.ref===void 0||(te[me]=G[me]);var me=arguments.length-2;if(me===1)te.children=j;else if(1<me){for(var Y=Array(me),q=0;q<me;q++)Y[q]=arguments[q+2];te.children=Y}return R(z.type,he,te)},Ne.createContext=function(z){return z={$$typeof:f,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:v,_context:z},z},Ne.createElement=function(z,G,j){var te,he={},me=null;if(G!=null)for(te in G.key!==void 0&&(me=""+G.key),G)k.call(G,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(he[te]=G[te]);var Y=arguments.length-2;if(Y===1)he.children=j;else if(1<Y){for(var q=Array(Y),oe=0;oe<Y;oe++)q[oe]=arguments[oe+2];he.children=q}if(z&&z.defaultProps)for(te in Y=z.defaultProps,Y)he[te]===void 0&&(he[te]=Y[te]);return R(z,me,he)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(z){return{$$typeof:a,render:z}},Ne.isValidElement=I,Ne.lazy=function(z){return{$$typeof:m,_payload:{_status:-1,_result:z},_init:ee}},Ne.memo=function(z,G){return{$$typeof:h,type:z,compare:G===void 0?null:G}},Ne.startTransition=function(z){var G=T.T,j={};T.T=j;try{var te=z(),he=T.S;he!==null&&he(j,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(D,H)}catch(me){H(me)}finally{G!==null&&j.types!==null&&(G.types=j.types),T.T=G}},Ne.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Ne.use=function(z){return T.H.use(z)},Ne.useActionState=function(z,G,j){return T.H.useActionState(z,G,j)},Ne.useCallback=function(z,G){return T.H.useCallback(z,G)},Ne.useContext=function(z){return T.H.useContext(z)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(z,G){return T.H.useDeferredValue(z,G)},Ne.useEffect=function(z,G){return T.H.useEffect(z,G)},Ne.useEffectEvent=function(z){return T.H.useEffectEvent(z)},Ne.useId=function(){return T.H.useId()},Ne.useImperativeHandle=function(z,G,j){return T.H.useImperativeHandle(z,G,j)},Ne.useInsertionEffect=function(z,G){return T.H.useInsertionEffect(z,G)},Ne.useLayoutEffect=function(z,G){return T.H.useLayoutEffect(z,G)},Ne.useMemo=function(z,G){return T.H.useMemo(z,G)},Ne.useOptimistic=function(z,G){return T.H.useOptimistic(z,G)},Ne.useReducer=function(z,G,j){return T.H.useReducer(z,G,j)},Ne.useRef=function(z){return T.H.useRef(z)},Ne.useState=function(z){return T.H.useState(z)},Ne.useSyncExternalStore=function(z,G,j){return T.H.useSyncExternalStore(z,G,j)},Ne.useTransition=function(){return T.H.useTransition()},Ne.version="19.2.6",Ne}var im;function qu(){return im||(im=1,su.exports=Y0()),su.exports}var ae=qu(),lu={exports:{}},Zs={},au={exports:{}},ou={};/**
|
|
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 rm;function W0(){return rm||(rm=1,(function(n){function r(V,$){var ee=V.length;V.push($);e:for(;0<ee;){var H=ee-1>>>1,B=V[H];if(0<d(B,$))V[H]=$,V[ee]=B,ee=H;else break e}}function s(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var $=V[0],ee=V.pop();if(ee!==$){V[0]=ee;e:for(var H=0,B=V.length,z=B>>>1;H<z;){var G=2*(H+1)-1,j=V[G],te=G+1,he=V[te];if(0>d(j,ee))te<B&&0>d(he,j)?(V[H]=he,V[te]=ee,H=te):(V[H]=j,V[G]=ee,H=G);else if(te<B&&0>d(he,ee))V[H]=he,V[te]=ee,H=te;else break e}}return $}function d(V,$){var ee=V.sortIndex-$.sortIndex;return ee!==0?ee:V.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;n.unstable_now=function(){return v.now()}}else{var f=Date,a=f.now();n.unstable_now=function(){return f.now()-a}}var c=[],h=[],m=1,u=null,_=3,w=!1,E=!1,x=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function A(V){for(var $=s(h);$!==null;){if($.callback===null)o(h);else if($.startTime<=V)o(h),$.sortIndex=$.expirationTime,r(c,$);else break;$=s(h)}}function M(V){if(x=!1,A(V),!E)if(s(c)!==null)E=!0,D||(D=!0,P());else{var $=s(h);$!==null&&W(M,$.startTime-V)}}var D=!1,T=-1,k=5,R=-1;function N(){return y?!0:!(n.unstable_now()-R<k)}function I(){if(y=!1,D){var V=n.unstable_now();R=V;var $=!0;try{e:{E=!1,x&&(x=!1,g(T),T=-1),w=!0;var ee=_;try{t:{for(A(V),u=s(c);u!==null&&!(u.expirationTime>V&&N());){var H=u.callback;if(typeof H=="function"){u.callback=null,_=u.priorityLevel;var B=H(u.expirationTime<=V);if(V=n.unstable_now(),typeof B=="function"){u.callback=B,A(V),$=!0;break t}u===s(c)&&o(c),A(V)}else o(c);u=s(c)}if(u!==null)$=!0;else{var z=s(h);z!==null&&W(M,z.startTime-V),$=!1}}break e}finally{u=null,_=ee,w=!1}$=void 0}}finally{$?P():D=!1}}}var P;if(typeof b=="function")P=function(){b(I)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,K=F.port2;F.port1.onmessage=I,P=function(){K.postMessage(null)}}else P=function(){S(I,0)};function W(V,$){T=S(function(){V(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(V){V.callback=null},n.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<V?Math.floor(1e3/V):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(V){switch(_){case 1:case 2:case 3:var $=3;break;default:$=_}var ee=_;_=$;try{return V()}finally{_=ee}},n.unstable_requestPaint=function(){y=!0},n.unstable_runWithPriority=function(V,$){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var ee=_;_=V;try{return $()}finally{_=ee}},n.unstable_scheduleCallback=function(V,$,ee){var H=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?H+ee:H):ee=H,V){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=ee+B,V={id:m++,callback:$,priorityLevel:V,startTime:ee,expirationTime:B,sortIndex:-1},ee>H?(V.sortIndex=ee,r(h,V),s(c)===null&&V===s(h)&&(x?(g(T),T=-1):x=!0,W(M,ee-H))):(V.sortIndex=B,r(c,V),E||w||(E=!0,D||(D=!0,P()))),V},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(V){var $=_;return function(){var ee=_;_=$;try{return V.apply(this,arguments)}finally{_=ee}}}})(ou)),ou}var sm;function X0(){return sm||(sm=1,au.exports=W0()),au.exports}var cu={exports:{}},qt={};/**
|
|
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 lm;function Q0(){if(lm)return qt;lm=1;var n=qu();function r(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}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},d=Symbol.for("react.portal");function v(c,h,m){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:u==null?null:""+u,children:c,containerInfo:h,implementation:m}}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 qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,qt.createPortal=function(c,h){var m=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 v(c,h,null,m)},qt.flushSync=function(c){var h=f.T,m=o.p;try{if(f.T=null,o.p=2,c)return c()}finally{f.T=h,o.p=m,o.d.f()}},qt.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))},qt.prefetchDNS=function(c){typeof c=="string"&&o.d.D(c)},qt.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var m=h.as,u=a(m,h.crossOrigin),_=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?o.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:u,integrity:_,fetchPriority:w}):m==="script"&&o.d.X(c,{crossOrigin:u,integrity:_,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qt.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=a(h.as,h.crossOrigin);o.d.M(c,{crossOrigin:m,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)},qt.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,u=a(m,h.crossOrigin);o.d.L(c,m,{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})}},qt.preloadModule=function(c,h){if(typeof c=="string")if(h){var m=a(h.as,h.crossOrigin);o.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(c)},qt.requestFormReset=function(c){o.d.r(c)},qt.unstable_batchedUpdates=function(c,h){return c(h)},qt.useFormState=function(c,h,m){return f.H.useFormState(c,h,m)},qt.useFormStatus=function(){return f.H.useHostTransitionStatus()},qt.version="19.2.6",qt}var am;function Z0(){if(am)return cu.exports;am=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(),cu.exports=Q0(),cu.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 om;function J0(){if(om)return Zs;om=1;var n=X0(),r=qu(),s=Z0();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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function v(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(v(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=v(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,l=t;;){var p=i.return;if(p===null)break;var C=p.alternate;if(C===null){if(l=p.return,l!==null){i=l;continue}break}if(p.child===C.child){for(C=p.child;C;){if(C===i)return c(p),e;if(C===l)return c(p),t;C=C.sibling}throw Error(o(188))}if(i.return!==l.return)i=p,l=C;else{for(var L=!1,U=p.child;U;){if(U===i){L=!0,i=p,l=C;break}if(U===l){L=!0,l=p,i=C;break}U=U.sibling}if(!L){for(U=C.child;U;){if(U===i){L=!0,i=C,l=p;break}if(U===l){L=!0,l=C,i=p;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 m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var u=Object.assign,_=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),b=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 K(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 y: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 b: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:K(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return K(e(t))}catch{}}return null}var W=Array.isArray,V=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},H=[],B=-1;function z(e){return{current:e}}function G(e){0>B||(e.current=H[B],H[B]=null,B--)}function j(e,t){B++,H[B]=e.current,e.current=t}var te=z(null),he=z(null),me=z(null),Y=z(null);function q(e,t){switch(j(me,t),j(he,e),j(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Cp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cp(t),e=wp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(te),j(te,e)}function oe(){G(te),G(he),G(me)}function Z(e){e.memoizedState!==null&&j(Y,e);var t=te.current,i=wp(t,e.type);t!==i&&(j(he,e),j(te,i))}function ie(e){he.current===e&&(G(te),G(he)),Y.current===e&&(G(Y),Ks._currentValue=ee)}var de,Ce;function we(e){if(de===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",Ce=-1<i.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+de+e+Ce}var $e=!1;function at(e,t){if(!e||$e)return"";$e=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ce){var le=ce}Reflect.construct(e,[],ge)}else{try{ge.call()}catch(ce){le=ce}e.call(ge.prototype)}}else{try{throw Error()}catch(ce){le=ce}(ge=e())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ce){if(ce&&le&&typeof ce.stack=="string")return[ce.stack,le.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=l.DetermineComponentFrameRoot(),L=C[0],U=C[1];if(L&&U){var X=L.split(`
|
|
44
|
-
`),se=U.split(`
|
|
45
|
-
`);for(p=l=0;l<X.length&&!X[l].includes("DetermineComponentFrameRoot");)l++;for(;p<se.length&&!se[p].includes("DetermineComponentFrameRoot");)p++;if(l===X.length||p===se.length)for(l=X.length-1,p=se.length-1;1<=l&&0<=p&&X[l]!==se[p];)p--;for(;1<=l&&0<=p;l--,p--)if(X[l]!==se[p]){if(l!==1||p!==1)do if(l--,p--,0>p||X[l]!==se[p]){var fe=`
|
|
46
|
-
`+X[l].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),fe}while(1<=l&&0<=p);break}}}finally{$e=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?we(i):""}function Re(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 at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return we("Activity");default:return""}}function Ot(e){try{var t="",i=null;do t+=Re(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var Ct=Object.prototype.hasOwnProperty,jt=n.unstable_scheduleCallback,Kt=n.unstable_cancelCallback,Yt=n.unstable_shouldYield,dt=n.unstable_requestPaint,Je=n.unstable_now,wt=n.unstable_getCurrentPriorityLevel,ue=n.unstable_ImmediatePriority,ye=n.unstable_UserBlockingPriority,xe=n.unstable_NormalPriority,Me=n.unstable_LowPriority,Be=n.unstable_IdlePriority,pt=n.log,je=n.unstable_setDisableYieldValue,ot=null,We=null;function Bt(e){if(typeof pt=="function"&&je(e),We&&typeof We.setStrictMode=="function")try{We.setStrictMode(ot,e)}catch{}}var Ee=Math.clz32?Math.clz32:vn,an=Math.log,Qt=Math.LN2;function vn(e){return e>>>=0,e===0?32:31-(an(e)/Qt|0)|0}var Ki=256,on=262144,Hn=4194304;function yn(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 _e(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var p=0,C=e.suspendedLanes,L=e.pingedLanes;e=e.warmLanes;var U=l&134217727;return U!==0?(l=U&~C,l!==0?p=yn(l):(L&=U,L!==0?p=yn(L):i||(i=U&~e,i!==0&&(p=yn(i))))):(U=l&~C,U!==0?p=yn(U):L!==0?p=yn(L):i||(i=l&~e,i!==0&&(p=yn(i)))),p===0?0:t!==0&&t!==p&&(t&C)===0&&(C=p&-p,i=t&-t,C>=i||C===32&&(i&4194048)!==0)?t:p}function Rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ya(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 pl(){var e=Hn;return Hn<<=1,(Hn&62914560)===0&&(Hn=4194304),e}function zt(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Ft(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ml(e,t,i,l,p,C){var L=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var U=e.entanglements,X=e.expirationTimes,se=e.hiddenUpdates;for(i=L&~i;0<i;){var fe=31-Ee(i),ge=1<<fe;U[fe]=0,X[fe]=-1;var le=se[fe];if(le!==null)for(se[fe]=null,fe=0;fe<le.length;fe++){var ce=le[fe];ce!==null&&(ce.lane&=-536870913)}i&=~ge}l!==0&&as(e,l,0),C!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=C&~(L&~t))}function as(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ee(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function mr(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Ee(i),p=1<<l;p&t|e[l]&t&&(e[l]|=t),i&=~p}}function gl(e,t){var i=t&-t;return i=(i&42)!==0?1:mi(i),(i&(e.suspendedLanes|t))!==0?0:i}function mi(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 os(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function _l(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:$p(e.type))}function vl(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var In=Math.random().toString(36).slice(2),Mt="__reactFiber$"+In,_t="__reactProps$"+In,Mn="__reactContainer$"+In,gi="__reactEvents$"+In,cs="__reactListeners$"+In,Wa="__reactHandles$"+In,gr="__reactResources$"+In,Kn="__reactMarker$"+In;function Yn(e){delete e[Mt],delete e[_t],delete e[gi],delete e[cs],delete e[Wa]}function Ln(e){var t=e[Mt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Mn]||i[Mt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Rp(e);e!==null;){if(i=e[Mt])return i;e=Rp(e)}return t}e=i,i=e.parentNode}return null}function Ue(e){if(e=e[Mt]||e[Mn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Yi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function _i(e){var t=e[gr];return t||(t=e[gr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xt(e){e[Kn]=!0}var yl=new Set,_r={};function Un(e,t){J(e,t),J(e+"Capture",t)}function J(e,t){for(_r[e]=t,e=0;e<t.length;e++)yl.add(t[e])}var Se=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]*$"),vt={},yt={};function Wi(e){return Ct.call(yt,e)?!0:Ct.call(vt,e)?!1:Se.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function On(e,t,i){if(Wi(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 vr(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 Wn(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 Sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function z_(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,C=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return p.call(this)},set:function(L){i=""+L,C.call(this,L)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(L){i=""+L},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xa(e){if(!e._valueTracker){var t=dh(e)?"checked":"value";e._valueTracker=z_(e,t,""+e[t])}}function ph(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=dh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function Sl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var H_=/[\n"\\]/g;function bn(e){return e.replace(H_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qa(e,t,i,l,p,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=""+Sn(t)):e.value!==""+Sn(t)&&(e.value=""+Sn(t)):L!=="submit"&&L!=="reset"||e.removeAttribute("value"),t!=null?Za(e,L,Sn(t)):i!=null?Za(e,L,Sn(i)):l!=null&&e.removeAttribute("value"),p==null&&C!=null&&(e.defaultChecked=!!C),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+Sn(U):e.removeAttribute("name")}function mh(e,t,i,l,p,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)){Xa(e);return}i=i!=null?""+Sn(i):"",t=t!=null?""+Sn(t):i,U||t===e.value||(e.value=t),e.defaultValue=t}l=l??p,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),Xa(e)}function Za(e,t,i){t==="number"&&Sl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function yr(e,t,i,l){if(e=e.options,t){t={};for(var p=0;p<i.length;p++)t["$"+i[p]]=!0;for(i=0;i<e.length;i++)p=t.hasOwnProperty("$"+e[i].value),e[i].selected!==p&&(e[i].selected=p),p&&l&&(e[i].defaultSelected=!0)}else{for(i=""+Sn(i),t=null,p=0;p<e.length;p++){if(e[p].value===i){e[p].selected=!0,l&&(e[p].defaultSelected=!0);return}t!==null||e[p].disabled||(t=e[p])}t!==null&&(t.selected=!0)}}function gh(e,t,i){if(t!=null&&(t=""+Sn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Sn(i):""}function _h(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=Sn(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),Xa(e)}function Sr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var I_=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 vh(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||I_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function yh(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var p in t)l=t[p],t.hasOwnProperty(p)&&i[p]!==l&&vh(e,p,l)}else for(var C in t)t.hasOwnProperty(C)&&vh(e,C,t[C])}function Ja(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 U_=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"]]),P_=/^[\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 bl(e){return P_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var eo=null;function to(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var br=null,Cr=null;function Sh(e){var t=Ue(e);if(t&&(e=t.stateNode)){var i=e[_t]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qa(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="'+bn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var p=l[_t]||null;if(!p)throw Error(o(90));Qa(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&ph(l)}break e;case"textarea":gh(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&yr(e,!!i.multiple,t,!1)}}}var no=!1;function bh(e,t,i){if(no)return e(t,i);no=!0;try{var l=e(t);return l}finally{if(no=!1,(br!==null||Cr!==null)&&(oa(),br&&(t=br,e=Cr,Cr=br=null,Sh(t),e)))for(t=0;t<e.length;t++)Sh(e[t])}}function us(e,t){var i=e.stateNode;if(i===null)return null;var l=i[_t]||null;if(l===null)return null;i=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),io=!1;if(Qn)try{var hs={};Object.defineProperty(hs,"passive",{get:function(){io=!0}}),window.addEventListener("test",hs,hs),window.removeEventListener("test",hs,hs)}catch{io=!1}var vi=null,ro=null,Cl=null;function Ch(){if(Cl)return Cl;var e,t=ro,i=t.length,l,p="value"in vi?vi.value:vi.textContent,C=p.length;for(e=0;e<i&&t[e]===p[e];e++);var L=i-e;for(l=1;l<=L&&t[i-l]===p[C-l];l++);return Cl=p.slice(e,1<l?1-l:void 0)}function wl(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 xl(){return!0}function wh(){return!1}function Zt(e){function t(i,l,p,C,L){this._reactName=i,this._targetInst=p,this.type=l,this.nativeEvent=C,this.target=L,this.currentTarget=null;for(var 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)?xl:wh,this.isPropagationStopped=wh,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=xl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=xl)},persist:function(){},isPersistent:xl}),t}var Xi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},El=Zt(Xi),fs=u({},Xi,{view:0,detail:0}),F_=Zt(fs),so,lo,ds,kl=u({},fs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oo,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!==ds&&(ds&&e.type==="mousemove"?(so=e.screenX-ds.screenX,lo=e.screenY-ds.screenY):lo=so=0,ds=e),so)},movementY:function(e){return"movementY"in e?e.movementY:lo}}),xh=Zt(kl),q_=u({},kl,{dataTransfer:0}),G_=Zt(q_),V_=u({},fs,{relatedTarget:0}),ao=Zt(V_),$_=u({},Xi,{animationName:0,elapsedTime:0,pseudoElement:0}),K_=Zt($_),Y_=u({},Xi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),W_=Zt(Y_),X_=u({},Xi,{data:0}),Eh=Zt(X_),Q_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},J_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ev(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=J_[e])?!!t[e]:!1}function oo(){return ev}var tv=u({},fs,{key:function(e){if(e.key){var t=Q_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Z_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oo,charCode:function(e){return e.type==="keypress"?wl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nv=Zt(tv),iv=u({},kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kh=Zt(iv),rv=u({},fs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oo}),sv=Zt(rv),lv=u({},Xi,{propertyName:0,elapsedTime:0,pseudoElement:0}),av=Zt(lv),ov=u({},kl,{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}),cv=Zt(ov),uv=u({},Xi,{newState:0,oldState:0}),hv=Zt(uv),fv=[9,13,27,32],co=Qn&&"CompositionEvent"in window,ps=null;Qn&&"documentMode"in document&&(ps=document.documentMode);var dv=Qn&&"TextEvent"in window&&!ps,Ah=Qn&&(!co||ps&&8<ps&&11>=ps),Th=" ",Dh=!1;function Rh(e,t){switch(e){case"keyup":return fv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wr=!1;function pv(e,t){switch(e){case"compositionend":return Mh(t);case"keypress":return t.which!==32?null:(Dh=!0,Th);case"textInput":return e=t.data,e===Th&&Dh?null:e;default:return null}}function mv(e,t){if(wr)return e==="compositionend"||!co&&Rh(e,t)?(e=Ch(),Cl=ro=vi=null,wr=!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 Ah&&t.locale!=="ko"?null:t.data;default:return null}}var gv={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 Lh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gv[e.type]:t==="textarea"}function Oh(e,t,i,l){br?Cr?Cr.push(l):Cr=[l]:br=l,t=ma(t,"onChange"),0<t.length&&(i=new El("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var ms=null,gs=null;function _v(e){gp(e,0)}function Al(e){var t=Yi(e);if(ph(t))return e}function Bh(e,t){if(e==="change")return t}var Nh=!1;if(Qn){var uo;if(Qn){var ho="oninput"in document;if(!ho){var jh=document.createElement("div");jh.setAttribute("oninput","return;"),ho=typeof jh.oninput=="function"}uo=ho}else uo=!1;Nh=uo&&(!document.documentMode||9<document.documentMode)}function zh(){ms&&(ms.detachEvent("onpropertychange",Hh),gs=ms=null)}function Hh(e){if(e.propertyName==="value"&&Al(gs)){var t=[];Oh(t,gs,e,to(e)),bh(_v,t)}}function vv(e,t,i){e==="focusin"?(zh(),ms=t,gs=i,ms.attachEvent("onpropertychange",Hh)):e==="focusout"&&zh()}function yv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Al(gs)}function Sv(e,t){if(e==="click")return Al(t)}function bv(e,t){if(e==="input"||e==="change")return Al(t)}function Cv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:Cv;function _s(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var p=i[l];if(!Ct.call(t,p)||!cn(e[p],t[p]))return!1}return!0}function Ih(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uh(e,t){var i=Ih(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=Ih(i)}}function Ph(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ph(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Sl(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Sl(e.document)}return t}function fo(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 wv=Qn&&"documentMode"in document&&11>=document.documentMode,xr=null,po=null,vs=null,mo=!1;function qh(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;mo||xr==null||xr!==Sl(l)||(l=xr,"selectionStart"in l&&fo(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}),vs&&_s(vs,l)||(vs=l,l=ma(po,"onSelect"),0<l.length&&(t=new El("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=xr)))}function Qi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Er={animationend:Qi("Animation","AnimationEnd"),animationiteration:Qi("Animation","AnimationIteration"),animationstart:Qi("Animation","AnimationStart"),transitionrun:Qi("Transition","TransitionRun"),transitionstart:Qi("Transition","TransitionStart"),transitioncancel:Qi("Transition","TransitionCancel"),transitionend:Qi("Transition","TransitionEnd")},go={},Gh={};Qn&&(Gh=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);function Zi(e){if(go[e])return go[e];if(!Er[e])return e;var t=Er[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Gh)return go[e]=t[i];return e}var Vh=Zi("animationend"),$h=Zi("animationiteration"),Kh=Zi("animationstart"),xv=Zi("transitionrun"),Ev=Zi("transitionstart"),kv=Zi("transitioncancel"),Yh=Zi("transitionend"),Wh=new Map,_o="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(" ");_o.push("scrollEnd");function Bn(e,t){Wh.set(e,t),Un(t,[e])}var Tl=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)},Cn=[],kr=0,vo=0;function Dl(){for(var e=kr,t=vo=kr=0;t<e;){var i=Cn[t];Cn[t++]=null;var l=Cn[t];Cn[t++]=null;var p=Cn[t];Cn[t++]=null;var C=Cn[t];if(Cn[t++]=null,l!==null&&p!==null){var L=l.pending;L===null?p.next=p:(p.next=L.next,L.next=p),l.pending=p}C!==0&&Xh(i,p,C)}}function Rl(e,t,i,l){Cn[kr++]=e,Cn[kr++]=t,Cn[kr++]=i,Cn[kr++]=l,vo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function yo(e,t,i,l){return Rl(e,t,i,l),Ml(e)}function Ji(e,t){return Rl(e,null,null,t),Ml(e)}function Xh(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var p=!1,C=e.return;C!==null;)C.childLanes|=i,l=C.alternate,l!==null&&(l.childLanes|=i),C.tag===22&&(e=C.stateNode,e===null||e._visibility&1||(p=!0)),e=C,C=C.return;return e.tag===3?(C=e.stateNode,p&&t!==null&&(p=31-Ee(i),e=C.hiddenUpdates,l=e[p],l===null?e[p]=[t]:l.push(t),t.lane=i|536870912),C):null}function Ml(e){if(50<Us)throw Us=0,Tc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ar={};function Av(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 un(e,t,i,l){return new Av(e,t,i,l)}function So(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,t){var i=e.alternate;return i===null?(i=un(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Qh(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ll(e,t,i,l,p,C){var L=0;if(l=e,typeof e=="function")So(e)&&(L=1);else if(typeof e=="string")L=L0(e,i,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=un(31,i,t,p),e.elementType=R,e.lanes=C,e;case x:return er(i.children,p,C,t);case y:L=8,p|=24;break;case S:return e=un(12,i,t,p|2),e.elementType=S,e.lanes=C,e;case M:return e=un(13,i,t,p),e.elementType=M,e.lanes=C,e;case D:return e=un(19,i,t,p),e.elementType=D,e.lanes=C,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case b: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=un(L,i,t,p),t.elementType=e,t.type=l,t.lanes=C,t}function er(e,t,i,l){return e=un(7,e,l,t),e.lanes=i,e}function bo(e,t,i){return e=un(6,e,null,t),e.lanes=i,e}function Zh(e){var t=un(18,null,null,0);return t.stateNode=e,t}function Co(e,t,i){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Jh=new WeakMap;function wn(e,t){if(typeof e=="object"&&e!==null){var i=Jh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Ot(t)},Jh.set(e,t),t)}return{value:e,source:t,stack:Ot(t)}}var Tr=[],Dr=0,Ol=null,ys=0,xn=[],En=0,yi=null,Pn=1,Fn="";function Jn(e,t){Tr[Dr++]=ys,Tr[Dr++]=Ol,Ol=e,ys=t}function ef(e,t,i){xn[En++]=Pn,xn[En++]=Fn,xn[En++]=yi,yi=e;var l=Pn;e=Fn;var p=32-Ee(l)-1;l&=~(1<<p),i+=1;var C=32-Ee(t)+p;if(30<C){var L=p-p%5;C=(l&(1<<L)-1).toString(32),l>>=L,p-=L,Pn=1<<32-Ee(t)+p|i<<p|l,Fn=C+e}else Pn=1<<C|i<<p|l,Fn=e}function wo(e){e.return!==null&&(Jn(e,1),ef(e,1,0))}function xo(e){for(;e===Ol;)Ol=Tr[--Dr],Tr[Dr]=null,ys=Tr[--Dr],Tr[Dr]=null;for(;e===yi;)yi=xn[--En],xn[En]=null,Fn=xn[--En],xn[En]=null,Pn=xn[--En],xn[En]=null}function tf(e,t){xn[En++]=Pn,xn[En++]=Fn,xn[En++]=yi,Pn=t.id,Fn=t.overflow,yi=e}var Ht=null,ut=null,Ke=!1,Si=null,kn=!1,Eo=Error(o(519));function bi(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ss(wn(t,e)),Eo}function nf(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[Mt]=e,t[_t]=l,i){case"dialog":Fe("cancel",t),Fe("close",t);break;case"iframe":case"object":case"embed":Fe("load",t);break;case"video":case"audio":for(i=0;i<Fs.length;i++)Fe(Fs[i],t);break;case"source":Fe("error",t);break;case"img":case"image":case"link":Fe("error",t),Fe("load",t);break;case"details":Fe("toggle",t);break;case"input":Fe("invalid",t),mh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Fe("invalid",t);break;case"textarea":Fe("invalid",t),_h(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||Sp(t.textContent,i)?(l.popover!=null&&(Fe("beforetoggle",t),Fe("toggle",t)),l.onScroll!=null&&Fe("scroll",t),l.onScrollEnd!=null&&Fe("scrollend",t),l.onClick!=null&&(t.onclick=Xn),t=!0):t=!1,t||bi(e,!0)}function rf(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:kn=!1;return;case 27:case 3:kn=!0;return;default:Ht=Ht.return}}function Rr(e){if(e!==Ht)return!1;if(!Ke)return rf(e),Ke=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||qc(e.type,e.memoizedProps)),i=!i),i&&ut&&bi(e),rf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ut=Dp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ut=Dp(e)}else t===27?(t=ut,Ni(e.type)?(e=Yc,Yc=null,ut=e):ut=t):ut=Ht?Tn(e.stateNode.nextSibling):null;return!0}function tr(){ut=Ht=null,Ke=!1}function ko(){var e=Si;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),Si=null),e}function Ss(e){Si===null?Si=[e]:Si.push(e)}var Ao=z(null),nr=null,ei=null;function Ci(e,t,i){j(Ao,t._currentValue),t._currentValue=i}function ti(e){e._currentValue=Ao.current,G(Ao)}function To(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 Do(e,t,i,l){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var C=p.dependencies;if(C!==null){var L=p.child;C=C.firstContext;e:for(;C!==null;){var U=C;C=p;for(var X=0;X<t.length;X++)if(U.context===t[X]){C.lanes|=i,U=C.alternate,U!==null&&(U.lanes|=i),To(C.return,i,e),l||(L=null);break e}C=U.next}}else if(p.tag===18){if(L=p.return,L===null)throw Error(o(341));L.lanes|=i,C=L.alternate,C!==null&&(C.lanes|=i),To(L,i,e),L=null}else L=p.child;if(L!==null)L.return=p;else for(L=p;L!==null;){if(L===e){L=null;break}if(p=L.sibling,p!==null){p.return=L.return,L=p;break}L=L.return}p=L}}function Mr(e,t,i,l){e=null;for(var p=t,C=!1;p!==null;){if(!C){if((p.flags&524288)!==0)C=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var L=p.alternate;if(L===null)throw Error(o(387));if(L=L.memoizedProps,L!==null){var U=p.type;cn(p.pendingProps.value,L.value)||(e!==null?e.push(U):e=[U])}}else if(p===Y.current){if(L=p.alternate,L===null)throw Error(o(387));L.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(Ks):e=[Ks])}p=p.return}e!==null&&Do(t,e,i,l),t.flags|=262144}function Bl(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ir(e){nr=e,ei=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return sf(nr,e)}function Nl(e,t){return nr===null&&ir(e),sf(e,t)}function sf(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ei===null){if(e===null)throw Error(o(308));ei=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ei=ei.next=t;return i}var Tv=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()})}},Dv=n.unstable_scheduleCallback,Rv=n.unstable_NormalPriority,Et={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ro(){return{controller:new Tv,data:new Map,refCount:0}}function bs(e){e.refCount--,e.refCount===0&&Dv(Rv,function(){e.controller.abort()})}var Cs=null,Mo=0,Lr=0,Or=null;function Mv(e,t){if(Cs===null){var i=Cs=[];Mo=0,Lr=Bc(),Or={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Mo++,t.then(lf,lf),t}function lf(){if(--Mo===0&&Cs!==null){Or!==null&&(Or.status="fulfilled");var e=Cs;Cs=null,Lr=0,Or=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Lv(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var p=0;p<i.length;p++)(0,i[p])(t)},function(p){for(l.status="rejected",l.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),l}var af=V.S;V.S=function(e,t){Gd=Je(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Mv(e,t),af!==null&&af(e,t)};var rr=z(null);function Lo(){var e=rr.current;return e!==null?e:st.pooledCache}function jl(e,t){t===null?j(rr,rr.current):j(rr,t.pool)}function of(){var e=Lo();return e===null?null:{parent:Et._currentValue,pool:e}}var Br=Error(o(460)),Oo=Error(o(474)),zl=Error(o(542)),Hl={then:function(){}};function cf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function uf(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Xn,Xn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ff(e),e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=st,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var p=t;p.status="fulfilled",p.value=l}},function(l){if(t.status==="pending"){var p=t;p.status="rejected",p.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ff(e),e}throw lr=t,Br}}function sr(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(lr=i,Br):i}}var lr=null;function hf(){if(lr===null)throw Error(o(459));var e=lr;return lr=null,e}function ff(e){if(e===Br||e===zl)throw Error(o(483))}var Nr=null,ws=0;function Il(e){var t=ws;return ws+=1,Nr===null&&(Nr=[]),uf(Nr,e,t)}function xs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ul(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function df(e){function t(ne,Q){if(e){var re=ne.deletions;re===null?(ne.deletions=[Q],ne.flags|=16):re.push(Q)}}function i(ne,Q){if(!e)return null;for(;Q!==null;)t(ne,Q),Q=Q.sibling;return null}function l(ne){for(var Q=new Map;ne!==null;)ne.key!==null?Q.set(ne.key,ne):Q.set(ne.index,ne),ne=ne.sibling;return Q}function p(ne,Q){return ne=Zn(ne,Q),ne.index=0,ne.sibling=null,ne}function C(ne,Q,re){return ne.index=re,e?(re=ne.alternate,re!==null?(re=re.index,re<Q?(ne.flags|=67108866,Q):re):(ne.flags|=67108866,Q)):(ne.flags|=1048576,Q)}function L(ne){return e&&ne.alternate===null&&(ne.flags|=67108866),ne}function U(ne,Q,re,pe){return Q===null||Q.tag!==6?(Q=bo(re,ne.mode,pe),Q.return=ne,Q):(Q=p(Q,re),Q.return=ne,Q)}function X(ne,Q,re,pe){var De=re.type;return De===x?fe(ne,Q,re.props.children,pe,re.key):Q!==null&&(Q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===k&&sr(De)===Q.type)?(Q=p(Q,re.props),xs(Q,re),Q.return=ne,Q):(Q=Ll(re.type,re.key,re.props,null,ne.mode,pe),xs(Q,re),Q.return=ne,Q)}function se(ne,Q,re,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==re.containerInfo||Q.stateNode.implementation!==re.implementation?(Q=Co(re,ne.mode,pe),Q.return=ne,Q):(Q=p(Q,re.children||[]),Q.return=ne,Q)}function fe(ne,Q,re,pe,De){return Q===null||Q.tag!==7?(Q=er(re,ne.mode,pe,De),Q.return=ne,Q):(Q=p(Q,re),Q.return=ne,Q)}function ge(ne,Q,re){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=bo(""+Q,ne.mode,re),Q.return=ne,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case w:return re=Ll(Q.type,Q.key,Q.props,null,ne.mode,re),xs(re,Q),re.return=ne,re;case E:return Q=Co(Q,ne.mode,re),Q.return=ne,Q;case k:return Q=sr(Q),ge(ne,Q,re)}if(W(Q)||P(Q))return Q=er(Q,ne.mode,re,null),Q.return=ne,Q;if(typeof Q.then=="function")return ge(ne,Il(Q),re);if(Q.$$typeof===b)return ge(ne,Nl(ne,Q),re);Ul(ne,Q)}return null}function le(ne,Q,re,pe){var De=Q!==null?Q.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return De!==null?null:U(ne,Q,""+re,pe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case w:return re.key===De?X(ne,Q,re,pe):null;case E:return re.key===De?se(ne,Q,re,pe):null;case k:return re=sr(re),le(ne,Q,re,pe)}if(W(re)||P(re))return De!==null?null:fe(ne,Q,re,pe,null);if(typeof re.then=="function")return le(ne,Q,Il(re),pe);if(re.$$typeof===b)return le(ne,Q,Nl(ne,re),pe);Ul(ne,re)}return null}function ce(ne,Q,re,pe,De){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ne=ne.get(re)||null,U(Q,ne,""+pe,De);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case w:return ne=ne.get(pe.key===null?re:pe.key)||null,X(Q,ne,pe,De);case E:return ne=ne.get(pe.key===null?re:pe.key)||null,se(Q,ne,pe,De);case k:return pe=sr(pe),ce(ne,Q,re,pe,De)}if(W(pe)||P(pe))return ne=ne.get(re)||null,fe(Q,ne,pe,De,null);if(typeof pe.then=="function")return ce(ne,Q,re,Il(pe),De);if(pe.$$typeof===b)return ce(ne,Q,re,Nl(Q,pe),De);Ul(Q,pe)}return null}function ke(ne,Q,re,pe){for(var De=null,Xe=null,Te=Q,He=Q=0,Ve=null;Te!==null&&He<re.length;He++){Te.index>He?(Ve=Te,Te=null):Ve=Te.sibling;var Qe=le(ne,Te,re[He],pe);if(Qe===null){Te===null&&(Te=Ve);break}e&&Te&&Qe.alternate===null&&t(ne,Te),Q=C(Qe,Q,He),Xe===null?De=Qe:Xe.sibling=Qe,Xe=Qe,Te=Ve}if(He===re.length)return i(ne,Te),Ke&&Jn(ne,He),De;if(Te===null){for(;He<re.length;He++)Te=ge(ne,re[He],pe),Te!==null&&(Q=C(Te,Q,He),Xe===null?De=Te:Xe.sibling=Te,Xe=Te);return Ke&&Jn(ne,He),De}for(Te=l(Te);He<re.length;He++)Ve=ce(Te,ne,He,re[He],pe),Ve!==null&&(e&&Ve.alternate!==null&&Te.delete(Ve.key===null?He:Ve.key),Q=C(Ve,Q,He),Xe===null?De=Ve:Xe.sibling=Ve,Xe=Ve);return e&&Te.forEach(function(Ui){return t(ne,Ui)}),Ke&&Jn(ne,He),De}function Oe(ne,Q,re,pe){if(re==null)throw Error(o(151));for(var De=null,Xe=null,Te=Q,He=Q=0,Ve=null,Qe=re.next();Te!==null&&!Qe.done;He++,Qe=re.next()){Te.index>He?(Ve=Te,Te=null):Ve=Te.sibling;var Ui=le(ne,Te,Qe.value,pe);if(Ui===null){Te===null&&(Te=Ve);break}e&&Te&&Ui.alternate===null&&t(ne,Te),Q=C(Ui,Q,He),Xe===null?De=Ui:Xe.sibling=Ui,Xe=Ui,Te=Ve}if(Qe.done)return i(ne,Te),Ke&&Jn(ne,He),De;if(Te===null){for(;!Qe.done;He++,Qe=re.next())Qe=ge(ne,Qe.value,pe),Qe!==null&&(Q=C(Qe,Q,He),Xe===null?De=Qe:Xe.sibling=Qe,Xe=Qe);return Ke&&Jn(ne,He),De}for(Te=l(Te);!Qe.done;He++,Qe=re.next())Qe=ce(Te,ne,He,Qe.value,pe),Qe!==null&&(e&&Qe.alternate!==null&&Te.delete(Qe.key===null?He:Qe.key),Q=C(Qe,Q,He),Xe===null?De=Qe:Xe.sibling=Qe,Xe=Qe);return e&&Te.forEach(function(q0){return t(ne,q0)}),Ke&&Jn(ne,He),De}function rt(ne,Q,re,pe){if(typeof re=="object"&&re!==null&&re.type===x&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case w:e:{for(var De=re.key;Q!==null;){if(Q.key===De){if(De=re.type,De===x){if(Q.tag===7){i(ne,Q.sibling),pe=p(Q,re.props.children),pe.return=ne,ne=pe;break e}}else if(Q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===k&&sr(De)===Q.type){i(ne,Q.sibling),pe=p(Q,re.props),xs(pe,re),pe.return=ne,ne=pe;break e}i(ne,Q);break}else t(ne,Q);Q=Q.sibling}re.type===x?(pe=er(re.props.children,ne.mode,pe,re.key),pe.return=ne,ne=pe):(pe=Ll(re.type,re.key,re.props,null,ne.mode,pe),xs(pe,re),pe.return=ne,ne=pe)}return L(ne);case E:e:{for(De=re.key;Q!==null;){if(Q.key===De)if(Q.tag===4&&Q.stateNode.containerInfo===re.containerInfo&&Q.stateNode.implementation===re.implementation){i(ne,Q.sibling),pe=p(Q,re.children||[]),pe.return=ne,ne=pe;break e}else{i(ne,Q);break}else t(ne,Q);Q=Q.sibling}pe=Co(re,ne.mode,pe),pe.return=ne,ne=pe}return L(ne);case k:return re=sr(re),rt(ne,Q,re,pe)}if(W(re))return ke(ne,Q,re,pe);if(P(re)){if(De=P(re),typeof De!="function")throw Error(o(150));return re=De.call(re),Oe(ne,Q,re,pe)}if(typeof re.then=="function")return rt(ne,Q,Il(re),pe);if(re.$$typeof===b)return rt(ne,Q,Nl(ne,re),pe);Ul(ne,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,Q!==null&&Q.tag===6?(i(ne,Q.sibling),pe=p(Q,re),pe.return=ne,ne=pe):(i(ne,Q),pe=bo(re,ne.mode,pe),pe.return=ne,ne=pe),L(ne)):i(ne,Q)}return function(ne,Q,re,pe){try{ws=0;var De=rt(ne,Q,re,pe);return Nr=null,De}catch(Te){if(Te===Br||Te===zl)throw Te;var Xe=un(29,Te,null,ne.mode);return Xe.lanes=pe,Xe.return=ne,Xe}finally{}}}var ar=df(!0),pf=df(!1),wi=!1;function Bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function No(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 xi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ei(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var p=l.pending;return p===null?t.next=t:(t.next=p.next,p.next=t),l.pending=t,t=Ml(e),Xh(e,null,i),t}return Rl(e,l,t,i),Ml(e)}function Es(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,mr(e,i)}}function jo(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var p=null,C=null;if(i=i.firstBaseUpdate,i!==null){do{var L={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};C===null?p=C=L:C=C.next=L,i=i.next}while(i!==null);C===null?p=C=t:C=C.next=t}else p=C=t;i={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:C,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var zo=!1;function ks(){if(zo){var e=Or;if(e!==null)throw e}}function As(e,t,i,l){zo=!1;var p=e.updateQueue;wi=!1;var C=p.firstBaseUpdate,L=p.lastBaseUpdate,U=p.shared.pending;if(U!==null){p.shared.pending=null;var X=U,se=X.next;X.next=null,L===null?C=se:L.next=se,L=X;var fe=e.alternate;fe!==null&&(fe=fe.updateQueue,U=fe.lastBaseUpdate,U!==L&&(U===null?fe.firstBaseUpdate=se:U.next=se,fe.lastBaseUpdate=X))}if(C!==null){var ge=p.baseState;L=0,fe=se=X=null,U=C;do{var le=U.lane&-536870913,ce=le!==U.lane;if(ce?(Ge&le)===le:(l&le)===le){le!==0&&le===Lr&&(zo=!0),fe!==null&&(fe=fe.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var ke=e,Oe=U;le=t;var rt=i;switch(Oe.tag){case 1:if(ke=Oe.payload,typeof ke=="function"){ge=ke.call(rt,ge,le);break e}ge=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Oe.payload,le=typeof ke=="function"?ke.call(rt,ge,le):ke,le==null)break e;ge=u({},ge,le);break e;case 2:wi=!0}}le=U.callback,le!==null&&(e.flags|=64,ce&&(e.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:U.tag,payload:U.payload,callback:U.callback,next:null},fe===null?(se=fe=ce,X=ge):fe=fe.next=ce,L|=le;if(U=U.next,U===null){if(U=p.shared.pending,U===null)break;ce=U,U=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);fe===null&&(X=ge),p.baseState=X,p.firstBaseUpdate=se,p.lastBaseUpdate=fe,C===null&&(p.shared.lanes=0),Ri|=L,e.lanes=L,e.memoizedState=ge}}function mf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function gf(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)mf(i[e],t)}var jr=z(null),Pl=z(0);function _f(e,t){e=ui,j(Pl,e),j(jr,t),ui=e|t.baseLanes}function Ho(){j(Pl,ui),j(jr,jr.current)}function Io(){ui=Pl.current,G(jr),G(Pl)}var hn=z(null),An=null;function ki(e){var t=e.alternate;j(St,St.current&1),j(hn,e),An===null&&(t===null||jr.current!==null||t.memoizedState!==null)&&(An=e)}function Uo(e){j(St,St.current),j(hn,e),An===null&&(An=e)}function vf(e){e.tag===22?(j(St,St.current),j(hn,e),An===null&&(An=e)):Ai()}function Ai(){j(St,St.current),j(hn,hn.current)}function fn(e){G(hn),An===e&&(An=null),G(St)}var St=z(0);function Fl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||$c(i)||Kc(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 ni=0,ze=null,nt=null,kt=null,ql=!1,zr=!1,or=!1,Gl=0,Ts=0,Hr=null,Ov=0;function mt(){throw Error(o(321))}function Po(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!cn(e[i],t[i]))return!1;return!0}function Fo(e,t,i,l,p,C){return ni=C,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?td:ic,or=!1,C=i(l,p),or=!1,zr&&(C=Sf(t,i,l,p)),yf(e),C}function yf(e){V.H=Ms;var t=nt!==null&&nt.next!==null;if(ni=0,kt=nt=ze=null,ql=!1,Ts=0,Hr=null,t)throw Error(o(300));e===null||At||(e=e.dependencies,e!==null&&Bl(e)&&(At=!0))}function Sf(e,t,i,l){ze=e;var p=0;do{if(zr&&(Hr=null),Ts=0,zr=!1,25<=p)throw Error(o(301));if(p+=1,kt=nt=null,e.updateQueue!=null){var C=e.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}V.H=nd,C=t(i,l)}while(zr);return C}function Bv(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?Ds(t):t,e=e.useState()[0],(nt!==null?nt.memoizedState:null)!==e&&(ze.flags|=1024),t}function qo(){var e=Gl!==0;return Gl=0,e}function Go(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Vo(e){if(ql){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ql=!1}ni=0,kt=nt=ze=null,zr=!1,Ts=Gl=0,Hr=null}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?ze.memoizedState=kt=e:kt=kt.next=e,kt}function bt(){if(nt===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=nt.next;var t=kt===null?ze.memoizedState:kt.next;if(t!==null)kt=t,nt=e;else{if(e===null)throw ze.alternate===null?Error(o(467)):Error(o(310));nt=e,e={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},kt===null?ze.memoizedState=kt=e:kt=kt.next=e}return kt}function Vl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ds(e){var t=Ts;return Ts+=1,Hr===null&&(Hr=[]),e=uf(Hr,e,t),t=ze,(kt===null?t.memoizedState:kt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?td:ic),e}function $l(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ds(e);if(e.$$typeof===b)return It(e)}throw Error(o(438,String(e)))}function $o(e){var t=null,i=ze.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(p){return p.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Vl(),ze.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 ii(e,t){return typeof t=="function"?t(e):t}function Kl(e){var t=bt();return Ko(t,nt,e)}function Ko(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var p=e.baseQueue,C=l.pending;if(C!==null){if(p!==null){var L=p.next;p.next=C.next,C.next=L}t.baseQueue=p=C,l.pending=null}if(C=e.baseState,p===null)e.memoizedState=C;else{t=p.next;var U=L=null,X=null,se=t,fe=!1;do{var ge=se.lane&-536870913;if(ge!==se.lane?(Ge&ge)===ge:(ni&ge)===ge){var le=se.revertLane;if(le===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),ge===Lr&&(fe=!0);else if((ni&le)===le){se=se.next,le===Lr&&(fe=!0);continue}else ge={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(U=X=ge,L=C):X=X.next=ge,ze.lanes|=le,Ri|=le;ge=se.action,or&&i(C,ge),C=se.hasEagerState?se.eagerState:i(C,ge)}else le={lane:ge,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(U=X=le,L=C):X=X.next=le,ze.lanes|=ge,Ri|=ge;se=se.next}while(se!==null&&se!==t);if(X===null?L=C:X.next=U,!cn(C,e.memoizedState)&&(At=!0,fe&&(i=Or,i!==null)))throw i;e.memoizedState=C,e.baseState=L,e.baseQueue=X,l.lastRenderedState=C}return p===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Yo(e){var t=bt(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,p=i.pending,C=t.memoizedState;if(p!==null){i.pending=null;var L=p=p.next;do C=e(C,L.action),L=L.next;while(L!==p);cn(C,t.memoizedState)||(At=!0),t.memoizedState=C,t.baseQueue===null&&(t.baseState=C),i.lastRenderedState=C}return[C,l]}function bf(e,t,i){var l=ze,p=bt(),C=Ke;if(C){if(i===void 0)throw Error(o(407));i=i()}else i=t();var L=!cn((nt||p).memoizedState,i);if(L&&(p.memoizedState=i,At=!0),p=p.queue,Qo(xf.bind(null,l,p,e),[e]),p.getSnapshot!==t||L||kt!==null&&kt.memoizedState.tag&1){if(l.flags|=2048,Ir(9,{destroy:void 0},wf.bind(null,l,p,i,t),null),st===null)throw Error(o(349));C||(ni&127)!==0||Cf(l,t,i)}return i}function Cf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=ze.updateQueue,t===null?(t=Vl(),ze.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function wf(e,t,i,l){t.value=i,t.getSnapshot=l,Ef(t)&&kf(e)}function xf(e,t,i){return i(function(){Ef(t)&&kf(e)})}function Ef(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!cn(e,i)}catch{return!0}}function kf(e){var t=Ji(e,2);t!==null&&rn(t,e,2)}function Wo(e){var t=Wt();if(typeof e=="function"){var i=e;if(e=i(),or){Bt(!0);try{i()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:e},t}function Af(e,t,i,l){return e.baseState=i,Ko(e,nt,typeof l=="function"?l:ii)}function Nv(e,t,i,l,p){if(Xl(e))throw Error(o(485));if(e=t.action,e!==null){var C={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){C.listeners.push(L)}};V.T!==null?i(!0):C.isTransition=!1,l(C),i=t.pending,i===null?(C.next=t.pending=C,Tf(t,C)):(C.next=i.next,t.pending=i.next=C)}}function Tf(e,t){var i=t.action,l=t.payload,p=e.state;if(t.isTransition){var C=V.T,L={};V.T=L;try{var U=i(p,l),X=V.S;X!==null&&X(L,U),Df(e,t,U)}catch(se){Xo(e,t,se)}finally{C!==null&&L.types!==null&&(C.types=L.types),V.T=C}}else try{C=i(p,l),Df(e,t,C)}catch(se){Xo(e,t,se)}}function Df(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Rf(e,t,l)},function(l){return Xo(e,t,l)}):Rf(e,t,i)}function Rf(e,t,i){t.status="fulfilled",t.value=i,Mf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Tf(e,i)))}function Xo(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,Mf(t),t=t.next;while(t!==l)}e.action=null}function Mf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lf(e,t){return t}function Of(e,t){if(Ke){var i=st.formState;if(i!==null){e:{var l=ze;if(Ke){if(ut){t:{for(var p=ut,C=kn;p.nodeType!==8;){if(!C){p=null;break t}if(p=Tn(p.nextSibling),p===null){p=null;break t}}C=p.data,p=C==="F!"||C==="F"?p:null}if(p){ut=Tn(p.nextSibling),l=p.data==="F!";break e}}bi(l)}l=!1}l&&(t=i[0])}}return i=Wt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lf,lastRenderedState:t},i.queue=l,i=Zf.bind(null,ze,l),l.dispatch=i,l=Wo(!1),C=nc.bind(null,ze,!1,l.queue),l=Wt(),p={state:t,dispatch:null,action:e,pending:null},l.queue=p,i=Nv.bind(null,ze,p,C,i),p.dispatch=i,l.memoizedState=e,[t,i,!1]}function Bf(e){var t=bt();return Nf(t,nt,e)}function Nf(e,t,i){if(t=Ko(e,t,Lf)[0],e=Kl(ii)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ds(t)}catch(L){throw L===Br?zl:L}else l=t;t=bt();var p=t.queue,C=p.dispatch;return i!==t.memoizedState&&(ze.flags|=2048,Ir(9,{destroy:void 0},jv.bind(null,p,i),null)),[l,C,e]}function jv(e,t){e.action=t}function jf(e){var t=bt(),i=nt;if(i!==null)return Nf(t,i,e);bt(),t=t.memoizedState,i=bt();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Ir(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=ze.updateQueue,t===null&&(t=Vl(),ze.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 zf(){return bt().memoizedState}function Yl(e,t,i,l){var p=Wt();ze.flags|=e,p.memoizedState=Ir(1|t,{destroy:void 0},i,l===void 0?null:l)}function Wl(e,t,i,l){var p=bt();l=l===void 0?null:l;var C=p.memoizedState.inst;nt!==null&&l!==null&&Po(l,nt.memoizedState.deps)?p.memoizedState=Ir(t,C,i,l):(ze.flags|=e,p.memoizedState=Ir(1|t,C,i,l))}function Hf(e,t){Yl(8390656,8,e,t)}function Qo(e,t){Wl(2048,8,e,t)}function zv(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=Vl(),ze.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function If(e){var t=bt().memoizedState;return zv({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Uf(e,t){return Wl(4,2,e,t)}function Pf(e,t){return Wl(4,4,e,t)}function Ff(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 qf(e,t,i){i=i!=null?i.concat([e]):null,Wl(4,4,Ff.bind(null,t,e),i)}function Zo(){}function Gf(e,t){var i=bt();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&Po(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function Vf(e,t){var i=bt();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&Po(t,l[1]))return l[0];if(l=e(),or){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[l,t],l}function Jo(e,t,i){return i===void 0||(ni&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=$d(),ze.lanes|=e,Ri|=e,i)}function $f(e,t,i,l){return cn(i,t)?i:jr.current!==null?(e=Jo(e,i,l),cn(e,t)||(At=!0),e):(ni&42)===0||(ni&1073741824)!==0&&(Ge&261930)===0?(At=!0,e.memoizedState=i):(e=$d(),ze.lanes|=e,Ri|=e,t)}function Kf(e,t,i,l,p){var C=$.p;$.p=C!==0&&8>C?C:8;var L=V.T,U={};V.T=U,nc(e,!1,t,i);try{var X=p(),se=V.S;if(se!==null&&se(U,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var fe=Lv(X,l);Rs(e,t,fe,mn(e))}else Rs(e,t,l,mn(e))}catch(ge){Rs(e,t,{then:function(){},status:"rejected",reason:ge},mn())}finally{$.p=C,L!==null&&U.types!==null&&(L.types=U.types),V.T=L}}function Hv(){}function ec(e,t,i,l){if(e.tag!==5)throw Error(o(476));var p=Yf(e).queue;Kf(e,p,t,ee,i===null?Hv:function(){return Wf(e),i(l)})}function Yf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:ee},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wf(e){var t=Yf(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},mn())}function tc(){return It(Ks)}function Xf(){return bt().memoizedState}function Qf(){return bt().memoizedState}function Iv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=mn();e=xi(i);var l=Ei(t,e,i);l!==null&&(rn(l,t,i),Es(l,t,i)),t={cache:Ro()},e.payload=t;return}t=t.return}}function Uv(e,t,i){var l=mn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Xl(e)?Jf(t,i):(i=yo(e,t,i,l),i!==null&&(rn(i,e,l),ed(i,t,l)))}function Zf(e,t,i){var l=mn();Rs(e,t,i,l)}function Rs(e,t,i,l){var p={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Xl(e))Jf(t,p);else{var C=e.alternate;if(e.lanes===0&&(C===null||C.lanes===0)&&(C=t.lastRenderedReducer,C!==null))try{var L=t.lastRenderedState,U=C(L,i);if(p.hasEagerState=!0,p.eagerState=U,cn(U,L))return Rl(e,t,p,0),st===null&&Dl(),!1}catch{}finally{}if(i=yo(e,t,p,l),i!==null)return rn(i,e,l),ed(i,t,l),!0}return!1}function nc(e,t,i,l){if(l={lane:2,revertLane:Bc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Xl(e)){if(t)throw Error(o(479))}else t=yo(e,i,l,2),t!==null&&rn(t,e,2)}function Xl(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Jf(e,t){zr=ql=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function ed(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,mr(e,i)}}var Ms={readContext:It,use:$l,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};Ms.useEffectEvent=mt;var td={readContext:It,use:$l,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Hf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Yl(4194308,4,Ff.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Yl(4194308,4,e,t)},useInsertionEffect:function(e,t){Yl(4,2,e,t)},useMemo:function(e,t){var i=Wt();t=t===void 0?null:t;var l=e();if(or){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=Wt();if(i!==void 0){var p=i(t);if(or){Bt(!0);try{i(t)}finally{Bt(!1)}}}else p=t;return l.memoizedState=l.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},l.queue=e,e=e.dispatch=Uv.bind(null,ze,e),[l.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,i=Zf.bind(null,ze,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Zo,useDeferredValue:function(e,t){var i=Wt();return Jo(i,e,t)},useTransition:function(){var e=Wo(!1);return e=Kf.bind(null,ze,e.queue,!0,!1),Wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=ze,p=Wt();if(Ke){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),st===null)throw Error(o(349));(Ge&127)!==0||Cf(l,t,i)}p.memoizedState=i;var C={value:i,getSnapshot:t};return p.queue=C,Hf(xf.bind(null,l,C,e),[e]),l.flags|=2048,Ir(9,{destroy:void 0},wf.bind(null,l,C,i,t),null),i},useId:function(){var e=Wt(),t=st.identifierPrefix;if(Ke){var i=Fn,l=Pn;i=(l&~(1<<32-Ee(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Gl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Ov++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Of,useActionState:Of,useOptimistic:function(e){var t=Wt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=nc.bind(null,ze,!0,i),i.dispatch=t,[e,t]},useMemoCache:$o,useCacheRefresh:function(){return Wt().memoizedState=Iv.bind(null,ze)},useEffectEvent:function(e){var t=Wt(),i={impl:e};return t.memoizedState=i,function(){if((Ze&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},ic={readContext:It,use:$l,useCallback:Gf,useContext:It,useEffect:Qo,useImperativeHandle:qf,useInsertionEffect:Uf,useLayoutEffect:Pf,useMemo:Vf,useReducer:Kl,useRef:zf,useState:function(){return Kl(ii)},useDebugValue:Zo,useDeferredValue:function(e,t){var i=bt();return $f(i,nt.memoizedState,e,t)},useTransition:function(){var e=Kl(ii)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Ds(e),t]},useSyncExternalStore:bf,useId:Xf,useHostTransitionStatus:tc,useFormState:Bf,useActionState:Bf,useOptimistic:function(e,t){var i=bt();return Af(i,nt,e,t)},useMemoCache:$o,useCacheRefresh:Qf};ic.useEffectEvent=If;var nd={readContext:It,use:$l,useCallback:Gf,useContext:It,useEffect:Qo,useImperativeHandle:qf,useInsertionEffect:Uf,useLayoutEffect:Pf,useMemo:Vf,useReducer:Yo,useRef:zf,useState:function(){return Yo(ii)},useDebugValue:Zo,useDeferredValue:function(e,t){var i=bt();return nt===null?Jo(i,e,t):$f(i,nt.memoizedState,e,t)},useTransition:function(){var e=Yo(ii)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Ds(e),t]},useSyncExternalStore:bf,useId:Xf,useHostTransitionStatus:tc,useFormState:jf,useActionState:jf,useOptimistic:function(e,t){var i=bt();return nt!==null?Af(i,nt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:$o,useCacheRefresh:Qf};nd.useEffectEvent=If;function rc(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 sc={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=mn(),p=xi(l);p.payload=t,i!=null&&(p.callback=i),t=Ei(e,p,l),t!==null&&(rn(t,e,l),Es(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=mn(),p=xi(l);p.tag=1,p.payload=t,i!=null&&(p.callback=i),t=Ei(e,p,l),t!==null&&(rn(t,e,l),Es(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=mn(),l=xi(i);l.tag=2,t!=null&&(l.callback=t),t=Ei(e,l,i),t!==null&&(rn(t,e,i),Es(t,e,i))}};function id(e,t,i,l,p,C,L){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,C,L):t.prototype&&t.prototype.isPureReactComponent?!_s(i,l)||!_s(p,C):!0}function rd(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&&sc.enqueueReplaceState(t,t.state,null)}function cr(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 p in e)i[p]===void 0&&(i[p]=e[p])}return i}function sd(e){Tl(e)}function ld(e){console.error(e)}function ad(e){Tl(e)}function Ql(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function od(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function lc(e,t,i){return i=xi(i),i.tag=3,i.payload={element:null},i.callback=function(){Ql(e,t)},i}function cd(e){return e=xi(e),e.tag=3,e}function ud(e,t,i,l){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var C=l.value;e.payload=function(){return p(C)},e.callback=function(){od(t,i,l)}}var L=i.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(e.callback=function(){od(t,i,l),typeof p!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var U=l.stack;this.componentDidCatch(l.value,{componentStack:U!==null?U:""})})}function Pv(e,t,i,l,p){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&Mr(t,i,p,!0),i=hn.current,i!==null){switch(i.tag){case 31:case 13:return An===null?ca():i.alternate===null&>===0&&(gt=3),i.flags&=-257,i.flags|=65536,i.lanes=p,l===Hl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Mc(e,l,p)),!1;case 22:return i.flags|=65536,l===Hl?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)),Mc(e,l,p)),!1}throw Error(o(435,i.tag))}return Mc(e,l,p),ca(),!1}if(Ke)return t=hn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=p,l!==Eo&&(e=Error(o(422),{cause:l}),Ss(wn(e,i)))):(l!==Eo&&(t=Error(o(423),{cause:l}),Ss(wn(t,i))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,l=wn(l,i),p=lc(e.stateNode,l,p),jo(e,p),gt!==4&&(gt=2)),!1;var C=Error(o(520),{cause:l});if(C=wn(C,i),Is===null?Is=[C]:Is.push(C),gt!==4&&(gt=2),t===null)return!0;l=wn(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=p&-p,i.lanes|=e,e=lc(i.stateNode,l,e),jo(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"&&(Mi===null||!Mi.has(C))))return i.flags|=65536,p&=-p,i.lanes|=p,p=cd(p),ud(p,e,i,l),jo(i,p),!1}i=i.return}while(i!==null);return!1}var ac=Error(o(461)),At=!1;function Ut(e,t,i,l){t.child=e===null?pf(t,null,i,l):ar(t,e.child,i,l)}function hd(e,t,i,l,p){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 ir(t),l=Fo(e,t,i,L,C,p),U=qo(),e!==null&&!At?(Go(e,t,p),ri(e,t,p)):(Ke&&U&&wo(t),t.flags|=1,Ut(e,t,l,p),t.child)}function fd(e,t,i,l,p){if(e===null){var C=i.type;return typeof C=="function"&&!So(C)&&C.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=C,dd(e,t,C,l,p)):(e=Ll(i.type,null,l,t,t.mode,p),e.ref=t.ref,e.return=t,t.child=e)}if(C=e.child,!mc(e,p)){var L=C.memoizedProps;if(i=i.compare,i=i!==null?i:_s,i(L,l)&&e.ref===t.ref)return ri(e,t,p)}return t.flags|=1,e=Zn(C,l),e.ref=t.ref,e.return=t,t.child=e}function dd(e,t,i,l,p){if(e!==null){var C=e.memoizedProps;if(_s(C,l)&&e.ref===t.ref)if(At=!1,t.pendingProps=l=C,mc(e,p))(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,ri(e,t,p)}return oc(e,t,i,l,p)}function pd(e,t,i,l){var p=l.children,C=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(C=C!==null?C.baseLanes|i:i,e!==null){for(l=t.child=e.child,p=0;l!==null;)p=p|l.lanes|l.childLanes,l=l.sibling;l=p&~C}else l=0,t.child=null;return md(e,t,C,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&jl(t,C!==null?C.cachePool:null),C!==null?_f(t,C):Ho(),vf(t);else return l=t.lanes=536870912,md(e,t,C!==null?C.baseLanes|i:i,i,l)}else C!==null?(jl(t,C.cachePool),_f(t,C),Ai(),t.memoizedState=null):(e!==null&&jl(t,null),Ho(),Ai());return Ut(e,t,p,i),t.child}function Ls(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function md(e,t,i,l,p){var C=Lo();return C=C===null?null:{parent:Et._currentValue,pool:C},t.memoizedState={baseLanes:i,cachePool:C},e!==null&&jl(t,null),Ho(),vf(t),e!==null&&Mr(e,t,l,!0),t.childLanes=p,null}function Zl(e,t){return t=ea({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gd(e,t,i){return ar(t,e.child,null,i),e=Zl(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function Fv(e,t,i){var l=t.pendingProps,p=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ke){if(l.mode==="hidden")return e=Zl(t,l),t.lanes=536870912,Ls(null,e);if(Uo(t),(e=ut)?(e=Tp(e,kn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi!==null?{id:Pn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},i=Zh(e),i.return=t,t.child=i,Ht=t,ut=null)):e=null,e===null)throw bi(t);return t.lanes=536870912,null}return Zl(t,l)}var C=e.memoizedState;if(C!==null){var L=C.dehydrated;if(Uo(t),p)if(t.flags&256)t.flags&=-257,t=gd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(At||Mr(e,t,i,!1),p=(i&e.childLanes)!==0,At||p){if(l=st,l!==null&&(L=gl(l,i),L!==0&&L!==C.retryLane))throw C.retryLane=L,Ji(e,L),rn(l,e,L),ac;ca(),t=gd(e,t,i)}else e=C.treeContext,ut=Tn(L.nextSibling),Ht=t,Ke=!0,Si=null,kn=!1,e!==null&&tf(t,e),t=Zl(t,l),t.flags|=4096;return t}return e=Zn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Jl(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 oc(e,t,i,l,p){return ir(t),i=Fo(e,t,i,l,void 0,p),l=qo(),e!==null&&!At?(Go(e,t,p),ri(e,t,p)):(Ke&&l&&wo(t),t.flags|=1,Ut(e,t,i,p),t.child)}function _d(e,t,i,l,p,C){return ir(t),t.updateQueue=null,i=Sf(t,l,i,p),yf(e),l=qo(),e!==null&&!At?(Go(e,t,C),ri(e,t,C)):(Ke&&l&&wo(t),t.flags|=1,Ut(e,t,i,C),t.child)}function vd(e,t,i,l,p){if(ir(t),t.stateNode===null){var C=Ar,L=i.contextType;typeof L=="object"&&L!==null&&(C=It(L)),C=new i(l,C),t.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=sc,t.stateNode=C,C._reactInternals=t,C=t.stateNode,C.props=l,C.state=t.memoizedState,C.refs={},Bo(t),L=i.contextType,C.context=typeof L=="object"&&L!==null?It(L):Ar,C.state=t.memoizedState,L=i.getDerivedStateFromProps,typeof L=="function"&&(rc(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&&sc.enqueueReplaceState(C,C.state,null),As(t,l,C,p),ks(),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=cr(i,U);C.props=X;var se=C.context,fe=i.contextType;L=Ar,typeof fe=="object"&&fe!==null&&(L=It(fe));var ge=i.getDerivedStateFromProps;fe=typeof ge=="function"||typeof C.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,fe||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(U||se!==L)&&rd(t,C,l,L),wi=!1;var le=t.memoizedState;C.state=le,As(t,l,C,p),ks(),se=t.memoizedState,U||le!==se||wi?(typeof ge=="function"&&(rc(t,i,ge,l),se=t.memoizedState),(X=wi||id(t,i,X,l,le,se,L))?(fe||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(t.flags|=4194308)):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=se),C.props=l,C.state=se,C.context=L,l=X):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{C=t.stateNode,No(e,t),L=t.memoizedProps,fe=cr(i,L),C.props=fe,ge=t.pendingProps,le=C.context,se=i.contextType,X=Ar,typeof se=="object"&&se!==null&&(X=It(se)),U=i.getDerivedStateFromProps,(se=typeof U=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(L!==ge||le!==X)&&rd(t,C,l,X),wi=!1,le=t.memoizedState,C.state=le,As(t,l,C,p),ks();var ce=t.memoizedState;L!==ge||le!==ce||wi||e!==null&&e.dependencies!==null&&Bl(e.dependencies)?(typeof U=="function"&&(rc(t,i,U,l),ce=t.memoizedState),(fe=wi||id(t,i,fe,l,le,ce,X)||e!==null&&e.dependencies!==null&&Bl(e.dependencies))?(se||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(l,ce,X),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(l,ce,X)),typeof C.componentDidUpdate=="function"&&(t.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ce),C.props=l,C.state=ce,C.context=X,l=fe):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),l=!1)}return C=l,Jl(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=ar(t,e.child,null,p),t.child=ar(t,null,i,p)):Ut(e,t,i,p),t.memoizedState=C.state,e=t.child):e=ri(e,t,p),e}function yd(e,t,i,l){return tr(),t.flags|=256,Ut(e,t,i,l),t.child}var cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uc(e){return{baseLanes:e,cachePool:of()}}function hc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=pn),e}function Sd(e,t,i){var l=t.pendingProps,p=!1,C=(t.flags&128)!==0,L;if((L=C)||(L=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),L&&(p=!0,t.flags&=-129),L=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ke){if(p?ki(t):Ai(),(e=ut)?(e=Tp(e,kn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi!==null?{id:Pn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},i=Zh(e),i.return=t,t.child=i,Ht=t,ut=null)):e=null,e===null)throw bi(t);return Kc(e)?t.lanes=32:t.lanes=536870912,null}var U=l.children;return l=l.fallback,p?(Ai(),p=t.mode,U=ea({mode:"hidden",children:U},p),l=er(l,p,i,null),U.return=t,l.return=t,U.sibling=l,t.child=U,l=t.child,l.memoizedState=uc(i),l.childLanes=hc(e,L,i),t.memoizedState=cc,Ls(null,l)):(ki(t),fc(t,U))}var X=e.memoizedState;if(X!==null&&(U=X.dehydrated,U!==null)){if(C)t.flags&256?(ki(t),t.flags&=-257,t=dc(e,t,i)):t.memoizedState!==null?(Ai(),t.child=e.child,t.flags|=128,t=null):(Ai(),U=l.fallback,p=t.mode,l=ea({mode:"visible",children:l.children},p),U=er(U,p,i,null),U.flags|=2,l.return=t,U.return=t,l.sibling=U,t.child=l,ar(t,e.child,null,i),l=t.child,l.memoizedState=uc(i),l.childLanes=hc(e,L,i),t.memoizedState=cc,t=Ls(null,l));else if(ki(t),Kc(U)){if(L=U.nextSibling&&U.nextSibling.dataset,L)var se=L.dgst;L=se,l=Error(o(419)),l.stack="",l.digest=L,Ss({value:l,source:null,stack:null}),t=dc(e,t,i)}else if(At||Mr(e,t,i,!1),L=(i&e.childLanes)!==0,At||L){if(L=st,L!==null&&(l=gl(L,i),l!==0&&l!==X.retryLane))throw X.retryLane=l,Ji(e,l),rn(L,e,l),ac;$c(U)||ca(),t=dc(e,t,i)}else $c(U)?(t.flags|=192,t.child=e.child,t=null):(e=X.treeContext,ut=Tn(U.nextSibling),Ht=t,Ke=!0,Si=null,kn=!1,e!==null&&tf(t,e),t=fc(t,l.children),t.flags|=4096);return t}return p?(Ai(),U=l.fallback,p=t.mode,X=e.child,se=X.sibling,l=Zn(X,{mode:"hidden",children:l.children}),l.subtreeFlags=X.subtreeFlags&65011712,se!==null?U=Zn(se,U):(U=er(U,p,i,null),U.flags|=2),U.return=t,l.return=t,l.sibling=U,t.child=l,Ls(null,l),l=t.child,U=e.child.memoizedState,U===null?U=uc(i):(p=U.cachePool,p!==null?(X=Et._currentValue,p=p.parent!==X?{parent:X,pool:X}:p):p=of(),U={baseLanes:U.baseLanes|i,cachePool:p}),l.memoizedState=U,l.childLanes=hc(e,L,i),t.memoizedState=cc,Ls(e.child,l)):(ki(t),i=e.child,e=i.sibling,i=Zn(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 fc(e,t){return t=ea({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ea(e,t){return e=un(22,e,null,t),e.lanes=0,e}function dc(e,t,i){return ar(t,e.child,null,i),e=fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bd(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),To(e.return,t,i)}function pc(e,t,i,l,p,C){var L=e.memoizedState;L===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:p,treeForkCount:C}:(L.isBackwards=t,L.rendering=null,L.renderingStartTime=0,L.last=l,L.tail=i,L.tailMode=p,L.treeForkCount=C)}function Cd(e,t,i){var l=t.pendingProps,p=l.revealOrder,C=l.tail;l=l.children;var L=St.current,U=(L&2)!==0;if(U?(L=L&1|2,t.flags|=128):L&=1,j(St,L),Ut(e,t,l,i),l=Ke?ys:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bd(e,i,t);else if(e.tag===19)bd(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(p){case"forwards":for(i=t.child,p=null;i!==null;)e=i.alternate,e!==null&&Fl(e)===null&&(p=i),i=i.sibling;i=p,i===null?(p=t.child,t.child=null):(p=i.sibling,i.sibling=null),pc(t,!1,p,i,C,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=t.child,t.child=null;p!==null;){if(e=p.alternate,e!==null&&Fl(e)===null){t.child=p;break}e=p.sibling,p.sibling=i,i=p,p=e}pc(t,!0,i,null,C,l);break;case"together":pc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ri(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ri|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Mr(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=Zn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Zn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function mc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bl(e)))}function qv(e,t,i){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),Ci(t,Et,e.memoizedState.cache),tr();break;case 27:case 5:Z(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:Ci(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Uo(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ki(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Sd(e,t,i):(ki(t),e=ri(e,t,i),e!==null?e.sibling:null);ki(t);break;case 19:var p=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(Mr(e,t,i,!1),l=(i&t.childLanes)!==0),p){if(l)return Cd(e,t,i);t.flags|=128}if(p=t.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),j(St,St.current),l)break;return null;case 22:return t.lanes=0,pd(e,t,i,t.pendingProps);case 24:Ci(t,Et,e.memoizedState.cache)}return ri(e,t,i)}function wd(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!mc(e,i)&&(t.flags&128)===0)return At=!1,qv(e,t,i);At=(e.flags&131072)!==0}else At=!1,Ke&&(t.flags&1048576)!==0&&ef(t,ys,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=sr(t.elementType),t.type=e,typeof e=="function")So(e)?(l=cr(e,l),t.tag=1,t=vd(null,t,e,l,i)):(t.tag=0,t=oc(null,t,e,l,i));else{if(e!=null){var p=e.$$typeof;if(p===A){t.tag=11,t=hd(null,t,e,l,i);break e}else if(p===T){t.tag=14,t=fd(null,t,e,l,i);break e}}throw t=K(e)||e,Error(o(306,t,""))}}return t;case 0:return oc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,p=cr(l,t.pendingProps),vd(e,t,l,p,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var C=t.memoizedState;p=C.element,No(e,t),As(t,l,null,i);var L=t.memoizedState;if(l=L.cache,Ci(t,Et,l),l!==C.cache&&Do(t,[Et],i,!0),ks(),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=yd(e,t,l,i);break e}else if(l!==p){p=wn(Error(o(424)),t),Ss(p),t=yd(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=Tn(e.firstChild),Ht=t,Ke=!0,Si=null,kn=!0,i=pf(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(tr(),l===p){t=ri(e,t,i);break e}Ut(e,t,l,i)}t=t.child}return t;case 26:return Jl(e,t),e===null?(i=Bp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ke||(i=t.type,e=t.pendingProps,l=ga(me.current).createElement(i),l[Mt]=t,l[_t]=e,Pt(l,i,e),xt(l),t.stateNode=l):t.memoizedState=Bp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),e===null&&Ke&&(l=t.stateNode=Mp(t.type,t.pendingProps,me.current),Ht=t,kn=!0,p=ut,Ni(t.type)?(Yc=p,ut=Tn(l.firstChild)):ut=p),Ut(e,t,t.pendingProps.children,i),Jl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ke&&((p=l=ut)&&(l=y0(l,t.type,t.pendingProps,kn),l!==null?(t.stateNode=l,Ht=t,ut=Tn(l.firstChild),kn=!1,p=!0):p=!1),p||bi(t)),Z(t),p=t.type,C=t.pendingProps,L=e!==null?e.memoizedProps:null,l=C.children,qc(p,C)?l=null:L!==null&&qc(p,L)&&(t.flags|=32),t.memoizedState!==null&&(p=Fo(e,t,Bv,null,null,i),Ks._currentValue=p),Jl(e,t),Ut(e,t,l,i),t.child;case 6:return e===null&&Ke&&((e=i=ut)&&(i=S0(i,t.pendingProps,kn),i!==null?(t.stateNode=i,Ht=t,ut=null,e=!0):e=!1),e||bi(t)),null;case 13:return Sd(e,t,i);case 4:return q(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ar(t,null,l,i):Ut(e,t,l,i),t.child;case 11:return hd(e,t,t.type,t.pendingProps,i);case 7:return Ut(e,t,t.pendingProps,i),t.child;case 8:return Ut(e,t,t.pendingProps.children,i),t.child;case 12:return Ut(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,Ci(t,t.type,l.value),Ut(e,t,l.children,i),t.child;case 9:return p=t.type._context,l=t.pendingProps.children,ir(t),p=It(p),l=l(p),t.flags|=1,Ut(e,t,l,i),t.child;case 14:return fd(e,t,t.type,t.pendingProps,i);case 15:return dd(e,t,t.type,t.pendingProps,i);case 19:return Cd(e,t,i);case 31:return Fv(e,t,i);case 22:return pd(e,t,i,t.pendingProps);case 24:return ir(t),l=It(Et),e===null?(p=Lo(),p===null&&(p=st,C=Ro(),p.pooledCache=C,C.refCount++,C!==null&&(p.pooledCacheLanes|=i),p=C),t.memoizedState={parent:l,cache:p},Bo(t),Ci(t,Et,p)):((e.lanes&i)!==0&&(No(e,t),As(t,null,null,i),ks()),p=e.memoizedState,C=t.memoizedState,p.parent!==l?(p={parent:l,cache:l},t.memoizedState=p,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=p),Ci(t,Et,l)):(l=C.cache,Ci(t,Et,l),l!==p.cache&&Do(t,[Et],i,!0))),Ut(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function si(e){e.flags|=4}function gc(e,t,i,l,p){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(Xd())e.flags|=8192;else throw lr=Hl,Oo}else e.flags&=-16777217}function xd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ip(t))if(Xd())e.flags|=8192;else throw lr=Hl,Oo}function ta(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pl():536870912,e.lanes|=t,qr|=t)}function Os(e,t){if(!Ke)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags,l|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function Gv(e,t,i){var l=t.pendingProps;switch(xo(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),ti(Et),oe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Rr(t)?si(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ko())),ht(t),null;case 26:var p=t.type,C=t.memoizedState;return e===null?(si(t),C!==null?(ht(t),xd(t,C)):(ht(t),gc(t,p,null,l,i))):C?C!==e.memoizedState?(si(t),ht(t),xd(t,C)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&si(t),ht(t),gc(t,p,e,l,i)),null;case 27:if(ie(t),i=me.current,p=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&si(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ht(t),null}e=te.current,Rr(t)?nf(t):(e=Mp(p,l,i),t.stateNode=e,si(t))}return ht(t),null;case 5:if(ie(t),p=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&si(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ht(t),null}if(C=te.current,Rr(t))nf(t);else{var L=ga(me.current);switch(C){case 1:C=L.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:C=L.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":C=L.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":C=L.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":C=L.createElement("div"),C.innerHTML="<script><\/script>",C=C.removeChild(C.firstChild);break;case"select":C=typeof l.is=="string"?L.createElement("select",{is:l.is}):L.createElement("select"),l.multiple?C.multiple=!0:l.size&&(C.size=l.size);break;default:C=typeof l.is=="string"?L.createElement(p,{is:l.is}):L.createElement(p)}}C[Mt]=t,C[_t]=l;e:for(L=t.child;L!==null;){if(L.tag===5||L.tag===6)C.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===t)break e;for(;L.sibling===null;){if(L.return===null||L.return===t)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}t.stateNode=C;e:switch(Pt(C,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&si(t)}}return ht(t),gc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&si(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=me.current,Rr(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,p=Ht,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||Sp(e.nodeValue,i)),e||bi(t,!0)}else e=ga(e).createTextNode(l),e[Mt]=t,t.stateNode=e}return ht(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=Rr(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[Mt]=t}else tr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else i=ko(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(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(p=Rr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!p)throw Error(o(318));if(p=t.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[Mt]=t}else tr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),p=!1}else p=ko(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),C=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(C=l.memoizedState.cachePool.pool),C!==p&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),ta(t,t.updateQueue),ht(t),null);case 4:return oe(),e===null&&Hc(t.stateNode.containerInfo),ht(t),null;case 10:return ti(t.type),ht(t),null;case 19:if(G(St),l=t.memoizedState,l===null)return ht(t),null;if(p=(t.flags&128)!==0,C=l.rendering,C===null)if(p)Os(l,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(C=Fl(e),C!==null){for(t.flags|=128,Os(l,!1),e=C.updateQueue,t.updateQueue=e,ta(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Qh(i,e),i=i.sibling;return j(St,St.current&1|2),Ke&&Jn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Je()>la&&(t.flags|=128,p=!0,Os(l,!1),t.lanes=4194304)}else{if(!p)if(e=Fl(C),e!==null){if(t.flags|=128,p=!0,e=e.updateQueue,t.updateQueue=e,ta(t,e),Os(l,!0),l.tail===null&&l.tailMode==="hidden"&&!C.alternate&&!Ke)return ht(t),null}else 2*Je()-l.renderingStartTime>la&&i!==536870912&&(t.flags|=128,p=!0,Os(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=Je(),e.sibling=null,i=St.current,j(St,p?i&1|2:i&1),Ke&&Jn(t,l.treeForkCount),e):(ht(t),null);case 22:case 23:return fn(t),Io(),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&&ta(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&&G(rr),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),ti(Et),ht(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Vv(e,t){switch(xo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ti(Et),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ie(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(o(340));tr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));tr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(St),null;case 4:return oe(),null;case 10:return ti(t.type),null;case 22:case 23:return fn(t),Io(),e!==null&&G(rr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ti(Et),null;case 25:return null;default:return null}}function Ed(e,t){switch(xo(t),t.tag){case 3:ti(Et),oe();break;case 26:case 27:case 5:ie(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:G(St);break;case 10:ti(t.type);break;case 22:case 23:fn(t),Io(),e!==null&&G(rr);break;case 24:ti(Et)}}function Bs(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var p=l.next;i=p;do{if((i.tag&e)===e){l=void 0;var C=i.create,L=i.inst;l=C(),L.destroy=l}i=i.next}while(i!==p)}}catch(U){tt(t,t.return,U)}}function Ti(e,t,i){try{var l=t.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var C=p.next;l=C;do{if((l.tag&e)===e){var L=l.inst,U=L.destroy;if(U!==void 0){L.destroy=void 0,p=t;var X=i,se=U;try{se()}catch(fe){tt(p,X,fe)}}}l=l.next}while(l!==C)}}catch(fe){tt(t,t.return,fe)}}function kd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{gf(t,i)}catch(l){tt(e,e.return,l)}}}function Ad(e,t,i){i.props=cr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){tt(e,t,l)}}function Ns(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(p){tt(e,t,p)}}function qn(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(p){tt(e,t,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){tt(e,t,p)}else i.current=null}function Td(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(p){tt(e,e.return,p)}}function _c(e,t,i){try{var l=e.stateNode;d0(l,e.type,i,t),l[_t]=t}catch(p){tt(e,e.return,p)}}function Dd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ni(e.type)||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dd(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&&Ni(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 yc(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=Xn));else if(l!==4&&(l===27&&Ni(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(yc(e,t,i),e=e.sibling;e!==null;)yc(e,t,i),e=e.sibling}function na(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&&Ni(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(na(e,t,i),e=e.sibling;e!==null;)na(e,t,i),e=e.sibling}function Rd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,p=t.attributes;p.length;)t.removeAttributeNode(p[0]);Pt(t,l,i),t[Mt]=e,t[_t]=i}catch(C){tt(e,e.return,C)}}var li=!1,Tt=!1,Sc=!1,Md=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function $v(e,t){if(e=e.containerInfo,Pc=wa,e=Fh(e),fo(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var p=l.anchorOffset,C=l.focusNode;l=l.focusOffset;try{i.nodeType,C.nodeType}catch{i=null;break e}var L=0,U=-1,X=-1,se=0,fe=0,ge=e,le=null;t:for(;;){for(var ce;ge!==i||p!==0&&ge.nodeType!==3||(U=L+p),ge!==C||l!==0&&ge.nodeType!==3||(X=L+l),ge.nodeType===3&&(L+=ge.nodeValue.length),(ce=ge.firstChild)!==null;)le=ge,ge=ce;for(;;){if(ge===e)break t;if(le===i&&++se===p&&(U=L),le===C&&++fe===l&&(X=L),(ce=ge.nextSibling)!==null)break;ge=le,le=ge.parentNode}ge=ce}i=U===-1||X===-1?null:{start:U,end:X}}else i=null}i=i||{start:0,end:0}}else i=null;for(Fc={focusedElem:e,selectionRange:i},wa=!1,Nt=t;Nt!==null;)if(t=Nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Nt=e;else for(;Nt!==null;){switch(t=Nt,C=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)p=e[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&C!==null){e=void 0,i=t,p=C.memoizedProps,C=C.memoizedState,l=i.stateNode;try{var ke=cr(i.type,p);e=l.getSnapshotBeforeUpdate(ke,C),l.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){tt(i,i.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Vc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Vc(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,Nt=e;break}Nt=t.return}}function Ld(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:oi(e,i),l&4&&Bs(5,i);break;case 1:if(oi(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(L){tt(i,i.return,L)}else{var p=cr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(p,t,e.__reactInternalSnapshotBeforeUpdate)}catch(L){tt(i,i.return,L)}}l&64&&kd(i),l&512&&Ns(i,i.return);break;case 3:if(oi(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{gf(e,t)}catch(L){tt(i,i.return,L)}}break;case 27:t===null&&l&4&&Rd(i);case 26:case 5:oi(e,i),t===null&&l&4&&Td(i),l&512&&Ns(i,i.return);break;case 12:oi(e,i);break;case 31:oi(e,i),l&4&&Nd(e,i);break;case 13:oi(e,i),l&4&&jd(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=t0.bind(null,i),b0(e,i))));break;case 22:if(l=i.memoizedState!==null||li,!l){t=t!==null&&t.memoizedState!==null||Tt,p=li;var C=Tt;li=l,(Tt=t)&&!C?ci(e,i,(i.subtreeFlags&8772)!==0):oi(e,i),li=p,Tt=C}break;case 30:break;default:oi(e,i)}}function Od(e){var t=e.alternate;t!==null&&(e.alternate=null,Od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yn(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,Jt=!1;function ai(e,t,i){for(i=i.child;i!==null;)Bd(e,t,i),i=i.sibling}function Bd(e,t,i){if(We&&typeof We.onCommitFiberUnmount=="function")try{We.onCommitFiberUnmount(ot,i)}catch{}switch(i.tag){case 26:Tt||qn(i,t),ai(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Tt||qn(i,t);var l=ft,p=Jt;Ni(i.type)&&(ft=i.stateNode,Jt=!1),ai(e,t,i),Gs(i.stateNode),ft=l,Jt=p;break;case 5:Tt||qn(i,t);case 6:if(l=ft,p=Jt,ft=null,ai(e,t,i),ft=l,Jt=p,ft!==null)if(Jt)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&&(Jt?(e=ft,kp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Qr(e)):kp(ft,i.stateNode));break;case 4:l=ft,p=Jt,ft=i.stateNode.containerInfo,Jt=!0,ai(e,t,i),ft=l,Jt=p;break;case 0:case 11:case 14:case 15:Ti(2,i,t),Tt||Ti(4,i,t),ai(e,t,i);break;case 1:Tt||(qn(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Ad(i,t,l)),ai(e,t,i);break;case 21:ai(e,t,i);break;case 22:Tt=(l=Tt)||i.memoizedState!==null,ai(e,t,i),Tt=l;break;default:ai(e,t,i)}}function Nd(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 jd(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 Kv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Md),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Md),t;default:throw Error(o(435,e.tag))}}function ia(e,t){var i=Kv(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var p=n0.bind(null,e,l);l.then(p,p)}})}function en(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var p=i[l],C=e,L=t,U=L;e:for(;U!==null;){switch(U.tag){case 27:if(Ni(U.type)){ft=U.stateNode,Jt=!1;break e}break;case 5:ft=U.stateNode,Jt=!1;break e;case 3:case 4:ft=U.stateNode.containerInfo,Jt=!0;break e}U=U.return}if(ft===null)throw Error(o(160));Bd(C,L,p),ft=null,Jt=!1,C=p.alternate,C!==null&&(C.return=null),p.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)zd(t,e),t=t.sibling}var Nn=null;function zd(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:en(t,e),tn(e),l&4&&(Ti(3,e,e.return),Bs(3,e),Ti(5,e,e.return));break;case 1:en(t,e),tn(e),l&512&&(Tt||i===null||qn(i,i.return)),l&64&&li&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var p=Nn;if(en(t,e),tn(e),l&512&&(Tt||i===null||qn(i,i.return)),l&4){var C=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,p=p.ownerDocument||p;t:switch(l){case"title":C=p.getElementsByTagName("title")[0],(!C||C[Kn]||C[Mt]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=p.createElement(l),p.head.insertBefore(C,p.querySelector("head > title"))),Pt(C,l,i),C[Mt]=e,xt(C),l=C;break e;case"link":var L=zp("link","href",p).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=p.createElement(l),Pt(C,l,i),p.head.appendChild(C);break;case"meta":if(L=zp("meta","content",p).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=p.createElement(l),Pt(C,l,i),p.head.appendChild(C);break;default:throw Error(o(468,l))}C[Mt]=e,xt(C),l=C}e.stateNode=l}else Hp(p,e.type,e.stateNode);else e.stateNode=jp(p,l,e.memoizedProps);else C!==l?(C===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):C.count--,l===null?Hp(p,e.type,e.stateNode):jp(p,l,e.memoizedProps)):l===null&&e.stateNode!==null&&_c(e,e.memoizedProps,i.memoizedProps)}break;case 27:en(t,e),tn(e),l&512&&(Tt||i===null||qn(i,i.return)),i!==null&&l&4&&_c(e,e.memoizedProps,i.memoizedProps);break;case 5:if(en(t,e),tn(e),l&512&&(Tt||i===null||qn(i,i.return)),e.flags&32){p=e.stateNode;try{Sr(p,"")}catch(ke){tt(e,e.return,ke)}}l&4&&e.stateNode!=null&&(p=e.memoizedProps,_c(e,p,i!==null?i.memoizedProps:p)),l&1024&&(Sc=!0);break;case 6:if(en(t,e),tn(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(ke){tt(e,e.return,ke)}}break;case 3:if(ya=null,p=Nn,Nn=_a(t.containerInfo),en(t,e),Nn=p,tn(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Qr(t.containerInfo)}catch(ke){tt(e,e.return,ke)}Sc&&(Sc=!1,Hd(e));break;case 4:l=Nn,Nn=_a(e.stateNode.containerInfo),en(t,e),tn(e),Nn=l;break;case 12:en(t,e),tn(e);break;case 31:en(t,e),tn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ia(e,l)));break;case 13:en(t,e),tn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(sa=Je()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ia(e,l)));break;case 22:p=e.memoizedState!==null;var X=i!==null&&i.memoizedState!==null,se=li,fe=Tt;if(li=se||p,Tt=fe||X,en(t,e),Tt=fe,li=se,tn(e),l&8192)e:for(t=e.stateNode,t._visibility=p?t._visibility&-2:t._visibility|1,p&&(i===null||X||li||Tt||ur(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){X=i=t;try{if(C=X.stateNode,p)L=C.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{U=X.stateNode;var ge=X.memoizedProps.style,le=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;U.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(ke){tt(X,X.return,ke)}}}else if(t.tag===6){if(i===null){X=t;try{X.stateNode.nodeValue=p?"":X.memoizedProps}catch(ke){tt(X,X.return,ke)}}}else if(t.tag===18){if(i===null){X=t;try{var ce=X.stateNode;p?Ap(ce,!0):Ap(X.stateNode,!1)}catch(ke){tt(X,X.return,ke)}}}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,ia(e,i))));break;case 19:en(t,e),tn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ia(e,l)));break;case 30:break;case 21:break;default:en(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(Dd(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var p=i.stateNode,C=vc(e);na(e,C,p);break;case 5:var L=i.stateNode;i.flags&32&&(Sr(L,""),i.flags&=-33);var U=vc(e);na(e,U,L);break;case 3:case 4:var X=i.stateNode.containerInfo,se=vc(e);yc(e,se,X);break;default:throw Error(o(161))}}catch(fe){tt(e,e.return,fe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Hd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function oi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ld(e,t.alternate,t),t=t.sibling}function ur(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ti(4,t,t.return),ur(t);break;case 1:qn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Ad(t,t.return,i),ur(t);break;case 27:Gs(t.stateNode);case 26:case 5:qn(t,t.return),ur(t);break;case 22:t.memoizedState===null&&ur(t);break;case 30:ur(t);break;default:ur(t)}e=e.sibling}}function ci(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,p=e,C=t,L=C.flags;switch(C.tag){case 0:case 11:case 15:ci(p,C,i),Bs(4,C);break;case 1:if(ci(p,C,i),l=C,p=l.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(se){tt(l,l.return,se)}if(l=C,p=l.updateQueue,p!==null){var U=l.stateNode;try{var X=p.shared.hiddenCallbacks;if(X!==null)for(p.shared.hiddenCallbacks=null,p=0;p<X.length;p++)mf(X[p],U)}catch(se){tt(l,l.return,se)}}i&&L&64&&kd(C),Ns(C,C.return);break;case 27:Rd(C);case 26:case 5:ci(p,C,i),i&&l===null&&L&4&&Td(C),Ns(C,C.return);break;case 12:ci(p,C,i);break;case 31:ci(p,C,i),i&&L&4&&Nd(p,C);break;case 13:ci(p,C,i),i&&L&4&&jd(p,C);break;case 22:C.memoizedState===null&&ci(p,C,i),Ns(C,C.return);break;case 30:break;default:ci(p,C,i)}t=t.sibling}}function bc(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&&bs(i))}function Cc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&bs(e))}function jn(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Id(e,t,i,l),t=t.sibling}function Id(e,t,i,l){var p=t.flags;switch(t.tag){case 0:case 11:case 15:jn(e,t,i,l),p&2048&&Bs(9,t);break;case 1:jn(e,t,i,l);break;case 3:jn(e,t,i,l),p&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&bs(e)));break;case 12:if(p&2048){jn(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 jn(e,t,i,l);break;case 31:jn(e,t,i,l);break;case 13:jn(e,t,i,l);break;case 23:break;case 22:C=t.stateNode,L=t.alternate,t.memoizedState!==null?C._visibility&2?jn(e,t,i,l):js(e,t):C._visibility&2?jn(e,t,i,l):(C._visibility|=2,Ur(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),p&2048&&bc(L,t);break;case 24:jn(e,t,i,l),p&2048&&Cc(t.alternate,t);break;default:jn(e,t,i,l)}}function Ur(e,t,i,l,p){for(p=p&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var C=e,L=t,U=i,X=l,se=L.flags;switch(L.tag){case 0:case 11:case 15:Ur(C,L,U,X,p),Bs(8,L);break;case 23:break;case 22:var fe=L.stateNode;L.memoizedState!==null?fe._visibility&2?Ur(C,L,U,X,p):js(C,L):(fe._visibility|=2,Ur(C,L,U,X,p)),p&&se&2048&&bc(L.alternate,L);break;case 24:Ur(C,L,U,X,p),p&&se&2048&&Cc(L.alternate,L);break;default:Ur(C,L,U,X,p)}t=t.sibling}}function js(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,p=l.flags;switch(l.tag){case 22:js(i,l),p&2048&&bc(l.alternate,l);break;case 24:js(i,l),p&2048&&Cc(l.alternate,l);break;default:js(i,l)}t=t.sibling}}var zs=8192;function Pr(e,t,i){if(e.subtreeFlags&zs)for(e=e.child;e!==null;)Ud(e,t,i),e=e.sibling}function Ud(e,t,i){switch(e.tag){case 26:Pr(e,t,i),e.flags&zs&&e.memoizedState!==null&&O0(i,Nn,e.memoizedState,e.memoizedProps);break;case 5:Pr(e,t,i);break;case 3:case 4:var l=Nn;Nn=_a(e.stateNode.containerInfo),Pr(e,t,i),Nn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=zs,zs=16777216,Pr(e,t,i),zs=l):Pr(e,t,i));break;default:Pr(e,t,i)}}function Pd(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 Hs(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];Nt=l,qd(l,e)}Pd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fd(e),e=e.sibling}function Fd(e){switch(e.tag){case 0:case 11:case 15:Hs(e),e.flags&2048&&Ti(9,e,e.return);break;case 3:Hs(e);break;case 12:Hs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ra(e)):Hs(e);break;default:Hs(e)}}function ra(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];Nt=l,qd(l,e)}Pd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ti(8,t,t.return),ra(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ra(t));break;default:ra(t)}e=e.sibling}}function qd(e,t){for(;Nt!==null;){var i=Nt;switch(i.tag){case 0:case 11:case 15:Ti(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:bs(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Nt=l;else e:for(i=e;Nt!==null;){l=Nt;var p=l.sibling,C=l.return;if(Od(l),l===i){Nt=null;break e}if(p!==null){p.return=C,Nt=p;break e}Nt=C}}}var Yv={getCacheForType:function(e){var t=It(Et),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return It(Et).controller.signal}},Wv=typeof WeakMap=="function"?WeakMap:Map,Ze=0,st=null,Pe=null,Ge=0,et=0,dn=null,Di=!1,Fr=!1,wc=!1,ui=0,gt=0,Ri=0,hr=0,xc=0,pn=0,qr=0,Is=null,nn=null,Ec=!1,sa=0,Gd=0,la=1/0,aa=null,Mi=null,Lt=0,Li=null,Gr=null,hi=0,kc=0,Ac=null,Vd=null,Us=0,Tc=null;function mn(){return(Ze&2)!==0&&Ge!==0?Ge&-Ge:V.T!==null?Bc():_l()}function $d(){if(pn===0)if((Ge&536870912)===0||Ke){var e=on;on<<=1,(on&3932160)===0&&(on=262144),pn=e}else pn=536870912;return e=hn.current,e!==null&&(e.flags|=32),pn}function rn(e,t,i){(e===st&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(Vr(e,0),Oi(e,Ge,pn,!1)),Ft(e,i),((Ze&2)===0||e!==st)&&(e===st&&((Ze&2)===0&&(hr|=i),gt===4&&Oi(e,Ge,pn,!1)),Gn(e))}function Kd(e,t,i){if((Ze&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Rt(e,t),p=l?Zv(e,t):Rc(e,t,!0),C=l;do{if(p===0){Fr&&!l&&Oi(e,t,0,!1);break}else{if(i=e.current.alternate,C&&!Xv(i)){p=Rc(e,t,!1),C=!1;continue}if(p===2){if(C=t,e.errorRecoveryDisabledLanes&C)var L=0;else L=e.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){t=L;e:{var U=e;p=Is;var X=U.current.memoizedState.isDehydrated;if(X&&(Vr(U,L).flags|=256),L=Rc(U,L,!1),L!==2){if(wc&&!X){U.errorRecoveryDisabledLanes|=C,hr|=C,p=4;break e}C=nn,nn=p,C!==null&&(nn===null?nn=C:nn.push.apply(nn,C))}p=L}if(C=!1,p!==2)continue}}if(p===1){Vr(e,0),Oi(e,t,0,!0);break}e:{switch(l=e,C=p,C){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Oi(l,t,pn,!Di);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(p=sa+300-Je(),10<p)){if(Oi(l,t,pn,!Di),_e(l,0,!0)!==0)break e;hi=t,l.timeoutHandle=xp(Yd.bind(null,l,i,nn,aa,Ec,t,pn,hr,qr,Di,C,"Throttled",-0,0),p);break e}Yd(l,i,nn,aa,Ec,t,pn,hr,qr,Di,C,null,-0,0)}}break}while(!0);Gn(e)}function Yd(e,t,i,l,p,C,L,U,X,se,fe,ge,le,ce){if(e.timeoutHandle=-1,ge=t.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},Ud(t,C,ge);var ke=(C&62914560)===C?sa-Je():(C&4194048)===C?Gd-Je():0;if(ke=B0(ge,ke),ke!==null){hi=C,e.cancelPendingCommit=ke(np.bind(null,e,t,C,i,l,p,L,U,X,fe,ge,null,le,ce)),Oi(e,C,L,!se);return}}np(e,t,C,i,l,p,L,U,X)}function Xv(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var p=i[l],C=p.getSnapshot;p=p.value;try{if(!cn(C(),p))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Oi(e,t,i,l){t&=~xc,t&=~hr,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var p=t;0<p;){var C=31-Ee(p),L=1<<C;l[C]=-1,p&=~L}i!==0&&as(e,i,t)}function oa(){return(Ze&6)===0?(Ps(0),!1):!0}function Dc(){if(Pe!==null){if(et===0)var e=Pe.return;else e=Pe,ei=nr=null,Vo(e),Nr=null,ws=0,e=Pe;for(;e!==null;)Ed(e.alternate,e),e=e.return;Pe=null}}function Vr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,g0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),hi=0,Dc(),st=e,Pe=i=Zn(e.current,null),Ge=t,et=0,dn=null,Di=!1,Fr=Rt(e,t),wc=!1,qr=pn=xc=hr=Ri=gt=0,nn=Is=null,Ec=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var p=31-Ee(l),C=1<<p;t|=e[p],l&=~C}return ui=t,Dl(),i}function Wd(e,t){ze=null,V.H=Ms,t===Br||t===zl?(t=hf(),et=3):t===Oo?(t=hf(),et=4):et=t===ac?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Pe===null&&(gt=1,Ql(e,wn(t,e.current)))}function Xd(){var e=hn.current;return e===null?!0:(Ge&4194048)===Ge?An===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===An:!1}function Qd(){var e=V.H;return V.H=Ms,e===null?Ms:e}function Zd(){var e=V.A;return V.A=Yv,e}function ca(){gt=4,Di||(Ge&4194048)!==Ge&&hn.current!==null||(Fr=!0),(Ri&134217727)===0&&(hr&134217727)===0||st===null||Oi(st,Ge,pn,!1)}function Rc(e,t,i){var l=Ze;Ze|=2;var p=Qd(),C=Zd();(st!==e||Ge!==t)&&(aa=null,Vr(e,t)),t=!1;var L=gt;e:do try{if(et!==0&&Pe!==null){var U=Pe,X=dn;switch(et){case 8:Dc(),L=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var se=et;if(et=0,dn=null,$r(e,U,X,se),i&&Fr){L=0;break e}break;default:se=et,et=0,dn=null,$r(e,U,X,se)}}Qv(),L=gt;break}catch(fe){Wd(e,fe)}while(!0);return t&&e.shellSuspendCounter++,ei=nr=null,Ze=l,V.H=p,V.A=C,Pe===null&&(st=null,Ge=0,Dl()),L}function Qv(){for(;Pe!==null;)Jd(Pe)}function Zv(e,t){var i=Ze;Ze|=2;var l=Qd(),p=Zd();st!==e||Ge!==t?(aa=null,la=Je()+500,Vr(e,t)):Fr=Rt(e,t);e:do try{if(et!==0&&Pe!==null){t=Pe;var C=dn;t:switch(et){case 1:et=0,dn=null,$r(e,t,C,1);break;case 2:case 9:if(cf(C)){et=0,dn=null,ep(t);break}t=function(){et!==2&&et!==9||st!==e||(et=7),Gn(e)},C.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:cf(C)?(et=0,dn=null,ep(t)):(et=0,dn=null,$r(e,t,C,7));break;case 5:var L=null;switch(Pe.tag){case 26:L=Pe.memoizedState;case 5:case 27:var U=Pe;if(L?Ip(L):U.stateNode.complete){et=0,dn=null;var X=U.sibling;if(X!==null)Pe=X;else{var se=U.return;se!==null?(Pe=se,ua(se)):Pe=null}break t}}et=0,dn=null,$r(e,t,C,5);break;case 6:et=0,dn=null,$r(e,t,C,6);break;case 8:Dc(),gt=6;break e;default:throw Error(o(462))}}Jv();break}catch(fe){Wd(e,fe)}while(!0);return ei=nr=null,V.H=l,V.A=p,Ze=i,Pe!==null?0:(st=null,Ge=0,Dl(),gt)}function Jv(){for(;Pe!==null&&!Yt();)Jd(Pe)}function Jd(e){var t=wd(e.alternate,e,ui);e.memoizedProps=e.pendingProps,t===null?ua(e):Pe=t}function ep(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=_d(i,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=_d(i,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Vo(t);default:Ed(i,t),t=Pe=Qh(t,ui),t=wd(i,t,ui)}e.memoizedProps=e.pendingProps,t===null?ua(e):Pe=t}function $r(e,t,i,l){ei=nr=null,Vo(t),Nr=null,ws=0;var p=t.return;try{if(Pv(e,p,t,i,Ge)){gt=1,Ql(e,wn(i,e.current)),Pe=null;return}}catch(C){if(p!==null)throw Pe=p,C;gt=1,Ql(e,wn(i,e.current)),Pe=null;return}t.flags&32768?(Ke||l===1?e=!0:Fr||(Ge&536870912)!==0?e=!1:(Di=e=!0,(l===2||l===9||l===3||l===6)&&(l=hn.current,l!==null&&l.tag===13&&(l.flags|=16384))),tp(t,e)):ua(t)}function ua(e){var t=e;do{if((t.flags&32768)!==0){tp(t,Di);return}e=t.return;var i=Gv(t.alternate,t,ui);if(i!==null){Pe=i;return}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);gt===0&&(gt=5)}function tp(e,t){do{var i=Vv(e.alternate,e);if(i!==null){i.flags&=32767,Pe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Pe=e;return}Pe=e=i}while(e!==null);gt=6,Pe=null}function np(e,t,i,l,p,C,L,U,X){e.cancelPendingCommit=null;do ha();while(Lt!==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|=vo,ml(e,i,C,L,U,X),e===st&&(Pe=st=null,Ge=0),Gr=t,Li=e,hi=i,kc=C,Ac=p,Vd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,i0(xe,function(){return ap(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=V.T,V.T=null,p=$.p,$.p=2,L=Ze,Ze|=4;try{$v(e,t,i)}finally{Ze=L,$.p=p,V.T=l}}Lt=1,ip(),rp(),sp()}}function ip(){if(Lt===1){Lt=0;var e=Li,t=Gr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null;var l=$.p;$.p=2;var p=Ze;Ze|=4;try{zd(t,e);var C=Fc,L=Fh(e.containerInfo),U=C.focusedElem,X=C.selectionRange;if(L!==U&&U&&U.ownerDocument&&Ph(U.ownerDocument.documentElement,U)){if(X!==null&&fo(U)){var se=X.start,fe=X.end;if(fe===void 0&&(fe=se),"selectionStart"in U)U.selectionStart=se,U.selectionEnd=Math.min(fe,U.value.length);else{var ge=U.ownerDocument||document,le=ge&&ge.defaultView||window;if(le.getSelection){var ce=le.getSelection(),ke=U.textContent.length,Oe=Math.min(X.start,ke),rt=X.end===void 0?Oe:Math.min(X.end,ke);!ce.extend&&Oe>rt&&(L=rt,rt=Oe,Oe=L);var ne=Uh(U,Oe),Q=Uh(U,rt);if(ne&&Q&&(ce.rangeCount!==1||ce.anchorNode!==ne.node||ce.anchorOffset!==ne.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var re=ge.createRange();re.setStart(ne.node,ne.offset),ce.removeAllRanges(),Oe>rt?(ce.addRange(re),ce.extend(Q.node,Q.offset)):(re.setEnd(Q.node,Q.offset),ce.addRange(re))}}}}for(ge=[],ce=U;ce=ce.parentNode;)ce.nodeType===1&&ge.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<ge.length;U++){var pe=ge[U];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}wa=!!Pc,Fc=Pc=null}finally{Ze=p,$.p=l,V.T=i}}e.current=t,Lt=2}}function rp(){if(Lt===2){Lt=0;var e=Li,t=Gr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=V.T,V.T=null;var l=$.p;$.p=2;var p=Ze;Ze|=4;try{Ld(e,t.alternate,t)}finally{Ze=p,$.p=l,V.T=i}}Lt=3}}function sp(){if(Lt===4||Lt===3){Lt=0,dt();var e=Li,t=Gr,i=hi,l=Vd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Lt=5:(Lt=0,Gr=Li=null,lp(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(Mi=null),os(i),t=t.stateNode,We&&typeof We.onCommitFiberRoot=="function")try{We.onCommitFiberRoot(ot,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=V.T,p=$.p,$.p=2,V.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{V.T=t,$.p=p}}(hi&3)!==0&&ha(),Gn(e),p=e.pendingLanes,(i&261930)!==0&&(p&42)!==0?e===Tc?Us++:(Us=0,Tc=e):Us=0,Ps(0)}}function lp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,bs(t)))}function ha(){return ip(),rp(),sp(),ap()}function ap(){if(Lt!==5)return!1;var e=Li,t=kc;kc=0;var i=os(hi),l=V.T,p=$.p;try{$.p=32>i?32:i,V.T=null,i=Ac,Ac=null;var C=Li,L=hi;if(Lt=0,Gr=Li=null,hi=0,(Ze&6)!==0)throw Error(o(331));var U=Ze;if(Ze|=4,Fd(C.current),Id(C,C.current,L,i),Ze=U,Ps(0,!1),We&&typeof We.onPostCommitFiberRoot=="function")try{We.onPostCommitFiberRoot(ot,C)}catch{}return!0}finally{$.p=p,V.T=l,lp(e,t)}}function op(e,t,i){t=wn(i,t),t=lc(e.stateNode,t,2),e=Ei(e,t,2),e!==null&&(Ft(e,2),Gn(e))}function tt(e,t,i){if(e.tag===3)op(e,e,i);else for(;t!==null;){if(t.tag===3){op(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Mi===null||!Mi.has(l))){e=wn(i,e),i=cd(2),l=Ei(t,i,2),l!==null&&(ud(i,l,t,e),Ft(l,2),Gn(l));break}}t=t.return}}function Mc(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new Wv;var p=new Set;l.set(t,p)}else p=l.get(t),p===void 0&&(p=new Set,l.set(t,p));p.has(i)||(wc=!0,p.add(i),e=e0.bind(null,e,t,i),t.then(e,e))}function e0(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,st===e&&(Ge&i)===i&&(gt===4||gt===3&&(Ge&62914560)===Ge&&300>Je()-sa?(Ze&2)===0&&Vr(e,0):xc|=i,qr===Ge&&(qr=0)),Gn(e)}function cp(e,t){t===0&&(t=pl()),e=Ji(e,t),e!==null&&(Ft(e,t),Gn(e))}function t0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),cp(e,i)}function n0(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,p=e.memoizedState;p!==null&&(i=p.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),cp(e,i)}function i0(e,t){return jt(e,t)}var fa=null,Kr=null,Lc=!1,da=!1,Oc=!1,Bi=0;function Gn(e){e!==Kr&&e.next===null&&(Kr===null?fa=Kr=e:Kr=Kr.next=e),da=!0,Lc||(Lc=!0,s0())}function Ps(e,t){if(!Oc&&da){Oc=!0;do for(var i=!1,l=fa;l!==null;){if(e!==0){var p=l.pendingLanes;if(p===0)var C=0;else{var L=l.suspendedLanes,U=l.pingedLanes;C=(1<<31-Ee(42|e)+1)-1,C&=p&~(L&~U),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(i=!0,dp(l,C))}else C=Ge,C=_e(l,l===st?C:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(C&3)===0||Rt(l,C)||(i=!0,dp(l,C));l=l.next}while(i);Oc=!1}}function r0(){up()}function up(){da=Lc=!1;var e=0;Bi!==0&&m0()&&(e=Bi);for(var t=Je(),i=null,l=fa;l!==null;){var p=l.next,C=hp(l,t);C===0?(l.next=null,i===null?fa=p:i.next=p,p===null&&(Kr=i)):(i=l,(e!==0||(C&3)!==0)&&(da=!0)),l=p}Lt!==0&&Lt!==5||Ps(e),Bi!==0&&(Bi=0)}function hp(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,p=e.expirationTimes,C=e.pendingLanes&-62914561;0<C;){var L=31-Ee(C),U=1<<L,X=p[L];X===-1?((U&i)===0||(U&l)!==0)&&(p[L]=Ya(U,t)):X<=t&&(e.expiredLanes|=U),C&=~U}if(t=st,i=Ge,i=_e(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&&Kt(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Rt(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Kt(l),os(i)){case 2:case 8:i=ye;break;case 32:i=xe;break;case 268435456:i=Be;break;default:i=xe}return l=fp.bind(null,e),i=jt(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Kt(l),e.callbackPriority=2,e.callbackNode=null,2}function fp(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ha()&&e.callbackNode!==i)return null;var l=Ge;return l=_e(e,e===st?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Kd(e,l,t),hp(e,Je()),e.callbackNode!=null&&e.callbackNode===i?fp.bind(null,e):null)}function dp(e,t){if(ha())return null;Kd(e,t,!0)}function s0(){_0(function(){(Ze&6)!==0?jt(ue,r0):up()})}function Bc(){if(Bi===0){var e=Lr;e===0&&(e=Ki,Ki<<=1,(Ki&261888)===0&&(Ki=256)),Bi=e}return Bi}function pp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:bl(""+e)}function mp(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 l0(e,t,i,l,p){if(t==="submit"&&i&&i.stateNode===p){var C=pp((p[_t]||null).action),L=l.submitter;L&&(t=(t=L[_t]||null)?pp(t.formAction):L.getAttribute("formAction"),t!==null&&(C=t,L=null));var U=new El("action","action",null,l,p);e.push({event:U,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Bi!==0){var X=L?mp(p,L):new FormData(p);ec(i,{pending:!0,data:X,method:p.method,action:C},null,X)}}else typeof C=="function"&&(U.preventDefault(),X=L?mp(p,L):new FormData(p),ec(i,{pending:!0,data:X,method:p.method,action:C},C,X))},currentTarget:p}]})}}for(var Nc=0;Nc<_o.length;Nc++){var jc=_o[Nc],a0=jc.toLowerCase(),o0=jc[0].toUpperCase()+jc.slice(1);Bn(a0,"on"+o0)}Bn(Vh,"onAnimationEnd"),Bn($h,"onAnimationIteration"),Bn(Kh,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(xv,"onTransitionRun"),Bn(Ev,"onTransitionStart"),Bn(kv,"onTransitionCancel"),Bn(Yh,"onTransitionEnd"),J("onMouseEnter",["mouseout","mouseover"]),J("onMouseLeave",["mouseout","mouseover"]),J("onPointerEnter",["pointerout","pointerover"]),J("onPointerLeave",["pointerout","pointerover"]),Un("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Un("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Un("onBeforeInput",["compositionend","keypress","textInput","paste"]),Un("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Un("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Un("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fs="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(" "),c0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fs));function gp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],p=l.event;l=l.listeners;e:{var C=void 0;if(t)for(var L=l.length-1;0<=L;L--){var U=l[L],X=U.instance,se=U.currentTarget;if(U=U.listener,X!==C&&p.isPropagationStopped())break e;C=U,p.currentTarget=se;try{C(p)}catch(fe){Tl(fe)}p.currentTarget=null,C=X}else for(L=0;L<l.length;L++){if(U=l[L],X=U.instance,se=U.currentTarget,U=U.listener,X!==C&&p.isPropagationStopped())break e;C=U,p.currentTarget=se;try{C(p)}catch(fe){Tl(fe)}p.currentTarget=null,C=X}}}}function Fe(e,t){var i=t[gi];i===void 0&&(i=t[gi]=new Set);var l=e+"__bubble";i.has(l)||(_p(t,e,2,!1),i.add(l))}function zc(e,t,i){var l=0;t&&(l|=4),_p(i,e,l,t)}var pa="_reactListening"+Math.random().toString(36).slice(2);function Hc(e){if(!e[pa]){e[pa]=!0,yl.forEach(function(i){i!=="selectionchange"&&(c0.has(i)||zc(i,!1,e),zc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pa]||(t[pa]=!0,zc("selectionchange",!1,t))}}function _p(e,t,i,l){switch($p(t)){case 2:var p=z0;break;case 8:p=H0;break;default:p=Jc}i=p.bind(null,t,i,e),p=void 0,!io||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(p=!0),l?p!==void 0?e.addEventListener(t,i,{capture:!0,passive:p}):e.addEventListener(t,i,!0):p!==void 0?e.addEventListener(t,i,{passive:p}):e.addEventListener(t,i,!1)}function Ic(e,t,i,l,p){var C=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var L=l.tag;if(L===3||L===4){var U=l.stateNode.containerInfo;if(U===p)break;if(L===4)for(L=l.return;L!==null;){var X=L.tag;if((X===3||X===4)&&L.stateNode.containerInfo===p)return;L=L.return}for(;U!==null;){if(L=Ln(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}bh(function(){var se=C,fe=to(i),ge=[];e:{var le=Wh.get(e);if(le!==void 0){var ce=El,ke=e;switch(e){case"keypress":if(wl(i)===0)break e;case"keydown":case"keyup":ce=nv;break;case"focusin":ke="focus",ce=ao;break;case"focusout":ke="blur",ce=ao;break;case"beforeblur":case"afterblur":ce=ao;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":ce=xh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=G_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=sv;break;case Vh:case $h:case Kh:ce=K_;break;case Yh:ce=av;break;case"scroll":case"scrollend":ce=F_;break;case"wheel":ce=cv;break;case"copy":case"cut":case"paste":ce=W_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=kh;break;case"toggle":case"beforetoggle":ce=hv}var Oe=(t&4)!==0,rt=!Oe&&(e==="scroll"||e==="scrollend"),ne=Oe?le!==null?le+"Capture":null:le;Oe=[];for(var Q=se,re;Q!==null;){var pe=Q;if(re=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||re===null||ne===null||(pe=us(Q,ne),pe!=null&&Oe.push(qs(Q,pe,re))),rt)break;Q=Q.return}0<Oe.length&&(le=new ce(le,ke,null,i,fe),ge.push({event:le,listeners:Oe}))}}if((t&7)===0){e:{if(le=e==="mouseover"||e==="pointerover",ce=e==="mouseout"||e==="pointerout",le&&i!==eo&&(ke=i.relatedTarget||i.fromElement)&&(Ln(ke)||ke[Mn]))break e;if((ce||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(ke=i.relatedTarget||i.toElement,ce=se,ke=ke?Ln(ke):null,ke!==null&&(rt=v(ke),Oe=ke.tag,ke!==rt||Oe!==5&&Oe!==27&&Oe!==6)&&(ke=null)):(ce=null,ke=se),ce!==ke)){if(Oe=xh,pe="onMouseLeave",ne="onMouseEnter",Q="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=kh,pe="onPointerLeave",ne="onPointerEnter",Q="pointer"),rt=ce==null?le:Yi(ce),re=ke==null?le:Yi(ke),le=new Oe(pe,Q+"leave",ce,i,fe),le.target=rt,le.relatedTarget=re,pe=null,Ln(fe)===se&&(Oe=new Oe(ne,Q+"enter",ke,i,fe),Oe.target=re,Oe.relatedTarget=rt,pe=Oe),rt=pe,ce&&ke)t:{for(Oe=u0,ne=ce,Q=ke,re=0,pe=ne;pe;pe=Oe(pe))re++;pe=0;for(var De=Q;De;De=Oe(De))pe++;for(;0<re-pe;)ne=Oe(ne),re--;for(;0<pe-re;)Q=Oe(Q),pe--;for(;re--;){if(ne===Q||Q!==null&&ne===Q.alternate){Oe=ne;break t}ne=Oe(ne),Q=Oe(Q)}Oe=null}else Oe=null;ce!==null&&vp(ge,le,ce,Oe,!1),ke!==null&&rt!==null&&vp(ge,rt,ke,Oe,!0)}}e:{if(le=se?Yi(se):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var Xe=Bh;else if(Lh(le))if(Nh)Xe=bv;else{Xe=yv;var Te=vv}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?se&&Ja(se.elementType)&&(Xe=Bh):Xe=Sv;if(Xe&&(Xe=Xe(e,se))){Oh(ge,Xe,i,fe);break e}Te&&Te(e,le,se),e==="focusout"&&se&&le.type==="number"&&se.memoizedProps.value!=null&&Za(le,"number",le.value)}switch(Te=se?Yi(se):window,e){case"focusin":(Lh(Te)||Te.contentEditable==="true")&&(xr=Te,po=se,vs=null);break;case"focusout":vs=po=xr=null;break;case"mousedown":mo=!0;break;case"contextmenu":case"mouseup":case"dragend":mo=!1,qh(ge,i,fe);break;case"selectionchange":if(wv)break;case"keydown":case"keyup":qh(ge,i,fe)}var He;if(co)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else wr?Rh(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(Ah&&i.locale!=="ko"&&(wr||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&wr&&(He=Ch()):(vi=fe,ro="value"in vi?vi.value:vi.textContent,wr=!0)),Te=ma(se,Ve),0<Te.length&&(Ve=new Eh(Ve,e,null,i,fe),ge.push({event:Ve,listeners:Te}),He?Ve.data=He:(He=Mh(i),He!==null&&(Ve.data=He)))),(He=dv?pv(e,i):mv(e,i))&&(Ve=ma(se,"onBeforeInput"),0<Ve.length&&(Te=new Eh("onBeforeInput","beforeinput",null,i,fe),ge.push({event:Te,listeners:Ve}),Te.data=He)),l0(ge,e,se,i,fe)}gp(ge,t)})}function qs(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ma(e,t){for(var i=t+"Capture",l=[];e!==null;){var p=e,C=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||C===null||(p=us(e,i),p!=null&&l.unshift(qs(e,p,C)),p=us(e,t),p!=null&&l.push(qs(e,p,C))),e.tag===3)return l;e=e.return}return[]}function u0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function vp(e,t,i,l,p){for(var C=t._reactName,L=[];i!==null&&i!==l;){var U=i,X=U.alternate,se=U.stateNode;if(U=U.tag,X!==null&&X===l)break;U!==5&&U!==26&&U!==27||se===null||(X=se,p?(se=us(i,C),se!=null&&L.unshift(qs(i,se,X))):p||(se=us(i,C),se!=null&&L.push(qs(i,se,X)))),i=i.return}L.length!==0&&e.push({event:t,listeners:L})}var h0=/\r\n?/g,f0=/\u0000|\uFFFD/g;function yp(e){return(typeof e=="string"?e:""+e).replace(h0,`
|
|
49
|
-
`).replace(f0,"")}function Sp(e,t){return t=yp(t),yp(e)===t}function it(e,t,i,l,p,C){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Sr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Sr(e,""+l);break;case"className":vr(e,"class",l);break;case"tabIndex":vr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":vr(e,i,l);break;case"style":yh(e,l,C);break;case"data":if(t!=="object"){vr(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=bl(""+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"&&it(e,t,"name",p.name,p,null),it(e,t,"formEncType",p.formEncType,p,null),it(e,t,"formMethod",p.formMethod,p,null),it(e,t,"formTarget",p.formTarget,p,null)):(it(e,t,"encType",p.encType,p,null),it(e,t,"method",p.method,p,null),it(e,t,"target",p.target,p,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=bl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=Xn);break;case"onScroll":l!=null&&Fe("scroll",e);break;case"onScrollEnd":l!=null&&Fe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=bl(""+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":Fe("beforetoggle",e),Fe("toggle",e),On(e,"popover",l);break;case"xlinkActuate":Wn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Wn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Wn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Wn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Wn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Wn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":On(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=U_.get(i)||i,On(e,i,l))}}function Uc(e,t,i,l,p,C){switch(i){case"style":yh(e,l,C);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?Sr(e,l):(typeof l=="number"||typeof l=="bigint")&&Sr(e,""+l);break;case"onScroll":l!=null&&Fe("scroll",e);break;case"onScrollEnd":l!=null&&Fe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_r.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),t=i.slice(2,p?i.length-7:void 0),C=e[_t]||null,C=C!=null?C[i]:null,typeof C=="function"&&e.removeEventListener(t,C,p),typeof l=="function")){typeof C!="function"&&C!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,p);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):On(e,i,l)}}}function Pt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",e),Fe("load",e);var l=!1,p=!1,C;for(C in i)if(i.hasOwnProperty(C)){var L=i[C];if(L!=null)switch(C){case"src":l=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,C,L,i,null)}}p&&it(e,t,"srcSet",i.srcSet,i,null),l&&it(e,t,"src",i.src,i,null);return;case"input":Fe("invalid",e);var U=C=L=p=null,X=null,se=null;for(l in i)if(i.hasOwnProperty(l)){var fe=i[l];if(fe!=null)switch(l){case"name":p=fe;break;case"type":L=fe;break;case"checked":X=fe;break;case"defaultChecked":se=fe;break;case"value":C=fe;break;case"defaultValue":U=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:it(e,t,l,fe,i,null)}}mh(e,C,U,X,se,L,p,!1);return;case"select":Fe("invalid",e),l=L=C=null;for(p in i)if(i.hasOwnProperty(p)&&(U=i[p],U!=null))switch(p){case"value":C=U;break;case"defaultValue":L=U;break;case"multiple":l=U;default:it(e,t,p,U,i,null)}t=C,i=L,e.multiple=!!l,t!=null?yr(e,!!l,t,!1):i!=null&&yr(e,!!l,i,!0);return;case"textarea":Fe("invalid",e),C=p=l=null;for(L in i)if(i.hasOwnProperty(L)&&(U=i[L],U!=null))switch(L){case"value":l=U;break;case"defaultValue":p=U;break;case"children":C=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:it(e,t,L,U,i,null)}_h(e,l,p,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:it(e,t,X,l,i,null)}return;case"dialog":Fe("beforetoggle",e),Fe("toggle",e),Fe("cancel",e),Fe("close",e);break;case"iframe":case"object":Fe("load",e);break;case"video":case"audio":for(l=0;l<Fs.length;l++)Fe(Fs[l],e);break;case"image":Fe("error",e),Fe("load",e);break;case"details":Fe("toggle",e);break;case"embed":case"source":case"link":Fe("error",e),Fe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in i)if(i.hasOwnProperty(se)&&(l=i[se],l!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,se,l,i,null)}return;default:if(Ja(t)){for(fe in i)i.hasOwnProperty(fe)&&(l=i[fe],l!==void 0&&Uc(e,t,fe,l,i,void 0));return}}for(U in i)i.hasOwnProperty(U)&&(l=i[U],l!=null&&it(e,t,U,l,i,null))}function d0(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,C=null,L=null,U=null,X=null,se=null,fe=null;for(ce in i){var ge=i[ce];if(i.hasOwnProperty(ce)&&ge!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":X=ge;default:l.hasOwnProperty(ce)||it(e,t,ce,null,l,ge)}}for(var le in l){var ce=l[le];if(ge=i[le],l.hasOwnProperty(le)&&(ce!=null||ge!=null))switch(le){case"type":C=ce;break;case"name":p=ce;break;case"checked":se=ce;break;case"defaultChecked":fe=ce;break;case"value":L=ce;break;case"defaultValue":U=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(o(137,t));break;default:ce!==ge&&it(e,t,le,ce,l,ge)}}Qa(e,L,U,X,se,fe,C,p);return;case"select":ce=L=U=le=null;for(C in i)if(X=i[C],i.hasOwnProperty(C)&&X!=null)switch(C){case"value":break;case"multiple":ce=X;default:l.hasOwnProperty(C)||it(e,t,C,null,l,X)}for(p in l)if(C=l[p],X=i[p],l.hasOwnProperty(p)&&(C!=null||X!=null))switch(p){case"value":le=C;break;case"defaultValue":U=C;break;case"multiple":L=C;default:C!==X&&it(e,t,p,C,l,X)}t=U,i=L,l=ce,le!=null?yr(e,!!i,le,!1):!!l!=!!i&&(t!=null?yr(e,!!i,t,!0):yr(e,!!i,i?[]:"",!1));return;case"textarea":ce=le=null;for(U in i)if(p=i[U],i.hasOwnProperty(U)&&p!=null&&!l.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:it(e,t,U,null,l,p)}for(L in l)if(p=l[L],C=i[L],l.hasOwnProperty(L)&&(p!=null||C!=null))switch(L){case"value":le=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:p!==C&&it(e,t,L,p,l,C)}gh(e,le,ce);return;case"option":for(var ke in i)if(le=i[ke],i.hasOwnProperty(ke)&&le!=null&&!l.hasOwnProperty(ke))switch(ke){case"selected":e.selected=!1;break;default:it(e,t,ke,null,l,le)}for(X in l)if(le=l[X],ce=i[X],l.hasOwnProperty(X)&&le!==ce&&(le!=null||ce!=null))switch(X){case"selected":e.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:it(e,t,X,le,l,ce)}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 Oe in i)le=i[Oe],i.hasOwnProperty(Oe)&&le!=null&&!l.hasOwnProperty(Oe)&&it(e,t,Oe,null,l,le);for(se in l)if(le=l[se],ce=i[se],l.hasOwnProperty(se)&&le!==ce&&(le!=null||ce!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:it(e,t,se,le,l,ce)}return;default:if(Ja(t)){for(var rt in i)le=i[rt],i.hasOwnProperty(rt)&&le!==void 0&&!l.hasOwnProperty(rt)&&Uc(e,t,rt,void 0,l,le);for(fe in l)le=l[fe],ce=i[fe],!l.hasOwnProperty(fe)||le===ce||le===void 0&&ce===void 0||Uc(e,t,fe,le,l,ce);return}}for(var ne in i)le=i[ne],i.hasOwnProperty(ne)&&le!=null&&!l.hasOwnProperty(ne)&&it(e,t,ne,null,l,le);for(ge in l)le=l[ge],ce=i[ge],!l.hasOwnProperty(ge)||le===ce||le==null&&ce==null||it(e,t,ge,le,l,ce)}function bp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function p0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var p=i[l],C=p.transferSize,L=p.initiatorType,U=p.duration;if(C&&U&&bp(L)){for(L=0,U=p.responseEnd,l+=1;l<i.length;l++){var X=i[l],se=X.startTime;if(se>U)break;var fe=X.transferSize,ge=X.initiatorType;fe&&bp(ge)&&(X=X.responseEnd,L+=fe*(X<U?1:(U-se)/(X-se)))}if(--l,t+=8*(C+L)/(p.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Pc=null,Fc=null;function ga(e){return e.nodeType===9?e:e.ownerDocument}function Cp(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 wp(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 qc(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 Gc=null;function m0(){var e=window.event;return e&&e.type==="popstate"?e===Gc?!1:(Gc=e,!0):(Gc=null,!1)}var xp=typeof setTimeout=="function"?setTimeout:void 0,g0=typeof clearTimeout=="function"?clearTimeout:void 0,Ep=typeof Promise=="function"?Promise:void 0,_0=typeof queueMicrotask=="function"?queueMicrotask:typeof Ep<"u"?function(e){return Ep.resolve(null).then(e).catch(v0)}:xp;function v0(e){setTimeout(function(){throw e})}function Ni(e){return e==="head"}function kp(e,t){var i=t,l=0;do{var p=i.nextSibling;if(e.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(p),Qr(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Gs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Gs(i);for(var C=i.firstChild;C;){var L=C.nextSibling,U=C.nodeName;C[Kn]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&C.rel.toLowerCase()==="stylesheet"||i.removeChild(C),C=L}}else i==="body"&&Gs(e.ownerDocument.body);i=p}while(i);Qr(t)}function Ap(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 Vc(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":Vc(i),Yn(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function y0(e,t,i,l){for(;e.nodeType===1;){var p=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Kn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(C=e.getAttribute("rel"),C==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(C!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(C=e.getAttribute("src"),(C!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&C&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var C=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===C)return e}else return e;if(e=Tn(e.nextSibling),e===null)break}return null}function S0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Tn(e.nextSibling),e===null))return null;return e}function Tp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Tn(e.nextSibling),e===null))return null;return e}function $c(e){return e.data==="$?"||e.data==="$~"}function Kc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function b0(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 Tn(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 Yc=null;function Dp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Tn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Rp(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 Mp(e,t,i){switch(t=ga(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 Gs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yn(e)}var Dn=new Map,Lp=new Set;function _a(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fi=$.d;$.d={f:C0,r:w0,D:x0,C:E0,L:k0,m:A0,X:D0,S:T0,M:R0};function C0(){var e=fi.f(),t=oa();return e||t}function w0(e){var t=Ue(e);t!==null&&t.tag===5&&t.type==="form"?Wf(t):fi.r(e)}var Yr=typeof document>"u"?null:document;function Op(e,t,i){var l=Yr;if(l&&typeof t=="string"&&t){var p=bn(t);p='link[rel="'+e+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),Lp.has(p)||(Lp.add(p),e={rel:e,crossOrigin:i,href:t},l.querySelector(p)===null&&(t=l.createElement("link"),Pt(t,"link",e),xt(t),l.head.appendChild(t)))}}function x0(e){fi.D(e),Op("dns-prefetch",e,null)}function E0(e,t){fi.C(e,t),Op("preconnect",e,t)}function k0(e,t,i){fi.L(e,t,i);var l=Yr;if(l&&e&&t){var p='link[rel="preload"][as="'+bn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+bn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+bn(i.imageSizes)+'"]')):p+='[href="'+bn(e)+'"]';var C=p;switch(t){case"style":C=Wr(e);break;case"script":C=Xr(e)}Dn.has(C)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Dn.set(C,e),l.querySelector(p)!==null||t==="style"&&l.querySelector(Vs(C))||t==="script"&&l.querySelector($s(C))||(t=l.createElement("link"),Pt(t,"link",e),xt(t),l.head.appendChild(t)))}}function A0(e,t){fi.m(e,t);var i=Yr;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",p='link[rel="modulepreload"][as="'+bn(l)+'"][href="'+bn(e)+'"]',C=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=Xr(e)}if(!Dn.has(C)&&(e=u({rel:"modulepreload",href:e},t),Dn.set(C,e),i.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($s(C)))return}l=i.createElement("link"),Pt(l,"link",e),xt(l),i.head.appendChild(l)}}}function T0(e,t,i){fi.S(e,t,i);var l=Yr;if(l&&e){var p=_i(l).hoistableStyles,C=Wr(e);t=t||"default";var L=p.get(C);if(!L){var U={loading:0,preload:null};if(L=l.querySelector(Vs(C)))U.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Dn.get(C))&&Wc(e,i);var X=L=l.createElement("link");xt(X),Pt(X,"link",e),X._p=new Promise(function(se,fe){X.onload=se,X.onerror=fe}),X.addEventListener("load",function(){U.loading|=1}),X.addEventListener("error",function(){U.loading|=2}),U.loading|=4,va(L,t,l)}L={type:"stylesheet",instance:L,count:1,state:U},p.set(C,L)}}}function D0(e,t){fi.X(e,t);var i=Yr;if(i&&e){var l=_i(i).hoistableScripts,p=Xr(e),C=l.get(p);C||(C=i.querySelector($s(p)),C||(e=u({src:e,async:!0},t),(t=Dn.get(p))&&Xc(e,t),C=i.createElement("script"),xt(C),Pt(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(p,C))}}function R0(e,t){fi.M(e,t);var i=Yr;if(i&&e){var l=_i(i).hoistableScripts,p=Xr(e),C=l.get(p);C||(C=i.querySelector($s(p)),C||(e=u({src:e,async:!0,type:"module"},t),(t=Dn.get(p))&&Xc(e,t),C=i.createElement("script"),xt(C),Pt(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(p,C))}}function Bp(e,t,i,l){var p=(p=me.current)?_a(p):null;if(!p)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Wr(i.href),i=_i(p).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Wr(i.href);var C=_i(p).hoistableStyles,L=C.get(e);if(L||(p=p.ownerDocument||p,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(e,L),(C=p.querySelector(Vs(e)))&&!C._p&&(L.instance=C,L.state.loading=5),Dn.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},Dn.set(e,i),C||M0(p,e,i,L.state))),t&&l===null)throw Error(o(528,""));return L}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xr(i),i=_i(p).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Wr(e){return'href="'+bn(e)+'"'}function Vs(e){return'link[rel="stylesheet"]['+e+"]"}function Np(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function M0(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}),Pt(t,"link",i),xt(t),e.head.appendChild(t))}function Xr(e){return'[src="'+bn(e)+'"]'}function $s(e){return"script[async]"+e}function jp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+bn(i.href)+'"]');if(l)return t.instance=l,xt(l),l;var p=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),xt(l),Pt(l,"style",p),va(l,i.precedence,e),t.instance=l;case"stylesheet":p=Wr(i.href);var C=e.querySelector(Vs(p));if(C)return t.state.loading|=4,t.instance=C,xt(C),C;l=Np(i),(p=Dn.get(p))&&Wc(l,p),C=(e.ownerDocument||e).createElement("link"),xt(C);var L=C;return L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),Pt(C,"link",l),t.state.loading|=4,va(C,i.precedence,e),t.instance=C;case"script":return C=Xr(i.src),(p=e.querySelector($s(C)))?(t.instance=p,xt(p),p):(l=i,(p=Dn.get(C))&&(l=u({},i),Xc(l,p)),e=e.ownerDocument||e,p=e.createElement("script"),xt(p),Pt(p,"link",l),e.head.appendChild(p),t.instance=p);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,va(l,i.precedence,e));return t.instance}function va(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,C=p,L=0;L<l.length;L++){var U=l[L];if(U.dataset.precedence===t)C=U;else if(C!==p)break}C?C.parentNode.insertBefore(e,C.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ya=null;function zp(e,t,i){if(ya===null){var l=new Map,p=ya=new Map;p.set(i,l)}else p=ya,l=p.get(i),l||(l=new Map,p.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),p=0;p<i.length;p++){var C=i[p];if(!(C[Kn]||C[Mt]||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 Hp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function L0(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 Ip(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function O0(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var p=Wr(l.href),C=t.querySelector(Vs(p));if(C){t=C._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Sa.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=C,xt(C);return}C=t.ownerDocument||t,l=Np(l),(p=Dn.get(p))&&Wc(l,p),C=C.createElement("link"),xt(C);var L=C;L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),Pt(C,"link",l),i.instance=C}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Sa.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Qc=0;function B0(e,t){return e.stylesheets&&e.count===0&&Ca(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Ca(e,e.stylesheets),e.unsuspend){var C=e.unsuspend;e.unsuspend=null,C()}},6e4+t);0<e.imgBytes&&Qc===0&&(Qc=62500*p0());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ca(e,e.stylesheets),e.unsuspend)){var C=e.unsuspend;e.unsuspend=null,C()}},(e.imgBytes>Qc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function Sa(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ca(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ba=null;function Ca(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ba=new Map,t.forEach(N0,e),ba=null,Sa.call(e))}function N0(e,t){if(!(t.state.loading&4)){var i=ba.get(e);if(i)var l=i.get(null);else{i=new Map,ba.set(e,i);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<p.length;C++){var L=p[C];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(i.set(L.dataset.precedence,L),l=L)}l&&i.set(null,l)}p=t.instance,L=p.getAttribute("data-precedence"),C=i.get(L)||l,C===l&&i.set(null,p),i.set(L,p),this.count++,l=Sa.bind(this),p.addEventListener("load",l),p.addEventListener("error",l),C?C.parentNode.insertBefore(p,C.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),t.state.loading|=4}}var Ks={$$typeof:b,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function j0(e,t,i,l,p,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=zt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zt(0),this.hiddenUpdates=zt(null),this.identifierPrefix=l,this.onUncaughtError=p,this.onCaughtError=C,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Up(e,t,i,l,p,C,L,U,X,se,fe,ge){return e=new j0(e,t,i,L,X,se,fe,ge,U),t=1,C===!0&&(t|=24),C=un(3,null,null,t),e.current=C,C.stateNode=e,t=Ro(),t.refCount++,e.pooledCache=t,t.refCount++,C.memoizedState={element:l,isDehydrated:i,cache:t},Bo(C),e}function Pp(e){return e?(e=Ar,e):Ar}function Fp(e,t,i,l,p,C){p=Pp(p),l.context===null?l.context=p:l.pendingContext=p,l=xi(t),l.payload={element:i},C=C===void 0?null:C,C!==null&&(l.callback=C),i=Ei(e,l,t),i!==null&&(rn(i,e,t),Es(i,e,t))}function qp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Zc(e,t){qp(e,t),(e=e.alternate)&&qp(e,t)}function Gp(e){if(e.tag===13||e.tag===31){var t=Ji(e,67108864);t!==null&&rn(t,e,67108864),Zc(e,67108864)}}function Vp(e){if(e.tag===13||e.tag===31){var t=mn();t=mi(t);var i=Ji(e,t);i!==null&&rn(i,e,t),Zc(e,t)}}var wa=!0;function z0(e,t,i,l){var p=V.T;V.T=null;var C=$.p;try{$.p=2,Jc(e,t,i,l)}finally{$.p=C,V.T=p}}function H0(e,t,i,l){var p=V.T;V.T=null;var C=$.p;try{$.p=8,Jc(e,t,i,l)}finally{$.p=C,V.T=p}}function Jc(e,t,i,l){if(wa){var p=eu(l);if(p===null)Ic(e,t,l,xa,i),Kp(e,l);else if(U0(p,e,t,i,l))l.stopPropagation();else if(Kp(e,l),t&4&&-1<I0.indexOf(e)){for(;p!==null;){var C=Ue(p);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var L=yn(C.pendingLanes);if(L!==0){var U=C;for(U.pendingLanes|=2,U.entangledLanes|=2;L;){var X=1<<31-Ee(L);U.entanglements[1]|=X,L&=~X}Gn(C),(Ze&6)===0&&(la=Je()+500,Ps(0))}}break;case 31:case 13:U=Ji(C,2),U!==null&&rn(U,C,2),oa(),Zc(C,2)}if(C=eu(l),C===null&&Ic(e,t,l,xa,i),C===p)break;p=C}p!==null&&l.stopPropagation()}else Ic(e,t,l,null,i)}}function eu(e){return e=to(e),tu(e)}var xa=null;function tu(e){if(xa=null,e=Ln(e),e!==null){var t=v(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 xa=e,null}function $p(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(wt()){case ue:return 2;case ye:return 8;case xe:case Me:return 32;case Be:return 268435456;default:return 32}default:return 32}}var nu=!1,ji=null,zi=null,Hi=null,Ys=new Map,Ws=new Map,Ii=[],I0="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 Kp(e,t){switch(e){case"focusin":case"focusout":ji=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":Hi=null;break;case"pointerover":case"pointerout":Ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ws.delete(t.pointerId)}}function Xs(e,t,i,l,p,C){return e===null||e.nativeEvent!==C?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:C,targetContainers:[p]},t!==null&&(t=Ue(t),t!==null&&Gp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,p!==null&&t.indexOf(p)===-1&&t.push(p),e)}function U0(e,t,i,l,p){switch(t){case"focusin":return ji=Xs(ji,e,t,i,l,p),!0;case"dragenter":return zi=Xs(zi,e,t,i,l,p),!0;case"mouseover":return Hi=Xs(Hi,e,t,i,l,p),!0;case"pointerover":var C=p.pointerId;return Ys.set(C,Xs(Ys.get(C)||null,e,t,i,l,p)),!0;case"gotpointercapture":return C=p.pointerId,Ws.set(C,Xs(Ws.get(C)||null,e,t,i,l,p)),!0}return!1}function Yp(e){var t=Ln(e.target);if(t!==null){var i=v(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,vl(e.priority,function(){Vp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,vl(e.priority,function(){Vp(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 Ea(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=eu(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);eo=l,i.target.dispatchEvent(l),eo=null}else return t=Ue(i),t!==null&&Gp(t),e.blockedOn=i,!1;t.shift()}return!0}function Wp(e,t,i){Ea(e)&&i.delete(t)}function P0(){nu=!1,ji!==null&&Ea(ji)&&(ji=null),zi!==null&&Ea(zi)&&(zi=null),Hi!==null&&Ea(Hi)&&(Hi=null),Ys.forEach(Wp),Ws.forEach(Wp)}function ka(e,t){e.blockedOn===t&&(e.blockedOn=null,nu||(nu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,P0)))}var Aa=null;function Xp(e){Aa!==e&&(Aa=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Aa===e&&(Aa=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],p=e[t+2];if(typeof l!="function"){if(tu(l||i)===null)continue;break}var C=Ue(i);C!==null&&(e.splice(t,3),t-=3,ec(C,{pending:!0,data:p,method:i.method,action:l},l,p))}}))}function Qr(e){function t(X){return ka(X,e)}ji!==null&&ka(ji,e),zi!==null&&ka(zi,e),Hi!==null&&ka(Hi,e),Ys.forEach(t),Ws.forEach(t);for(var i=0;i<Ii.length;i++){var l=Ii[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ii.length&&(i=Ii[0],i.blockedOn===null);)Yp(i),i.blockedOn===null&&Ii.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var p=i[l],C=i[l+1],L=p[_t]||null;if(typeof C=="function")L||Xp(i);else if(L){var U=null;if(C&&C.hasAttribute("formAction")){if(p=C,L=C[_t]||null)U=L.formAction;else if(tu(p)!==null)continue}else U=L.action;typeof U=="function"?i[l+1]=U:(i.splice(l,3),l-=3),Xp(i)}}}function Qp(){function e(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(L){return p=L})},focusReset:"manual",scroll:"manual"})}function t(){p!==null&&(p(),p=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var C=navigation.currentEntry;C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,p=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),p!==null&&(p(),p=null)}}}function iu(e){this._internalRoot=e}Ta.prototype.render=iu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=mn();Fp(i,l,e,t,null,null)},Ta.prototype.unmount=iu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fp(e.current,2,null,e,null,null),oa(),t[Mn]=null}};function Ta(e){this._internalRoot=e}Ta.prototype.unstable_scheduleHydration=function(e){if(e){var t=_l();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ii.length&&t!==0&&t<Ii[i].priority;i++);Ii.splice(i,0,e),i===0&&Yp(e)}};var Zp=r.version;if(Zp!=="19.2.6")throw Error(o(527,Zp,"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?m(e):null,e=e===null?null:e.stateNode,e};var F0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Da=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Da.isDisabled&&Da.supportsFiber)try{ot=Da.inject(F0),We=Da}catch{}}return Zs.createRoot=function(e,t){if(!d(e))throw Error(o(299));var i=!1,l="",p=sd,C=ld,L=ad;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(p=t.onUncaughtError),t.onCaughtError!==void 0&&(C=t.onCaughtError),t.onRecoverableError!==void 0&&(L=t.onRecoverableError)),t=Up(e,1,!1,null,null,i,l,null,p,C,L,Qp),e[Mn]=t.current,Hc(e),new iu(t)},Zs.hydrateRoot=function(e,t,i){if(!d(e))throw Error(o(299));var l=!1,p="",C=sd,L=ld,U=ad,X=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(C=i.onUncaughtError),i.onCaughtError!==void 0&&(L=i.onCaughtError),i.onRecoverableError!==void 0&&(U=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),t=Up(e,1,!0,t,i??null,l,p,X,C,L,U,Qp),t.context=Pp(null),i=t.current,l=mn(),l=mi(l),p=xi(l),p.callback=null,Ei(i,p,l),i=l,t.current.lanes=i,Ft(t,i),Gn(t),e[Mn]=t.current,Hc(e),new Ta(t)},Zs.version="19.2.6",Zs}var cm;function e1(){if(cm)return lu.exports;cm=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(),lu.exports=J0(),lu.exports}var t1=e1();const rs=function(n,r){let d=n;const v=il[r];let f=null,a=0,c=null;const h=[],m={},u=function(T,k){a=d*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),_(0,0),_(a-7,0),_(0,a-7),x(),E(),S(T,k),d>=7&&y(T),c==null&&(c=A(d,v,h)),g(c,k)},_=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=Fi.getLostPoint(m);(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=Fi.getPatternPosition(d);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}},y=function(T){const k=Fi.getBCHTypeNumber(d);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=v<<3|k,N=Fi.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=Fi.getMaskFunction(k);for(let K=a-1;K>0;K-=2)for(K==6&&(K-=1);;){for(let W=0;W<2;W+=1)if(f[N][K-W]==null){let V=!1;P<T.length&&(V=(T[P]>>>I&1)==1),F(N,K-W)&&(V=!V),f[N][K-W]=V,I-=1,I==-1&&(P+=1,I=7)}if(N+=R,N<0||a<=N){N-=R,R=-R;break}}},b=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 ee=k[$].dataCount,H=k[$].totalCount-ee;N=Math.max(N,ee),I=Math.max(I,H),P[$]=new Array(ee);for(let j=0;j<P[$].length;j+=1)P[$][j]=255&T.getBuffer()[j+R];R+=ee;const B=Fi.getErrorCorrectPolynomial(H),G=ol(P[$],B.getLength()-1).mod(B);F[$]=new Array(B.getLength()-1);for(let j=0;j<F[$].length;j+=1){const te=j+G.getLength()-F[$].length;F[$][j]=te>=0?G.getAt(te):0}}let K=0;for(let $=0;$<k.length;$+=1)K+=k[$].totalCount;const W=new Array(K);let V=0;for(let $=0;$<N;$+=1)for(let ee=0;ee<k.length;ee+=1)$<P[ee].length&&(W[V]=P[ee][$],V+=1);for(let $=0;$<I;$+=1)for(let ee=0;ee<k.length;ee+=1)$<F[ee].length&&(W[V]=F[ee][$],V+=1);return W},A=function(T,k,R){const N=um.getRSBlocks(T,k),I=hm();for(let F=0;F<R.length;F+=1){const K=R[F];I.put(K.getMode(),4),I.put(K.getLength(),Fi.getLengthInBits(K.getMode(),T)),K.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 b(I,N)};m.addData=function(T,k){k=k||"Byte";let R=null;switch(k){case"Numeric":R=n1(T);break;case"Alphanumeric":R=i1(T);break;case"Byte":R=r1(T);break;case"Kanji":R=s1(T);break;default:throw"mode:"+k}h.push(R),c=null},m.isDark=function(T,k){if(T<0||a<=T||k<0||a<=k)throw T+","+k;return f[T][k]},m.getModuleCount=function(){return a},m.make=function(){if(d<1){let T=1;for(;T<40;T++){const k=um.getRSBlocks(T,v),R=hm();for(let I=0;I<h.length;I++){const P=h[I];R.put(P.getMode(),4),R.put(P.getLength(),Fi.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}d=T}u(!1,w())},m.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<m.getModuleCount();N+=1){R+="<tr>";for(let I=0;I<m.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+=m.isDark(N,I)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return R+="</tbody>",R+="</table>",R},m.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=m.getModuleCount()*T+k*2;let F,K,W,V,$="",ee;for(ee="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<m.getModuleCount();W+=1)for(V=W*T+k,F=0;F<m.getModuleCount();F+=1)m.isDark(W,F)&&(K=F*T+k,$+="M"+K+","+V+ee);return $+='" stroke="transparent" fill="black"/>',$+="</svg>",$},m.createDataURL=function(T,k){T=T||2,k=typeof k>"u"?T*4:k;const R=m.getModuleCount()*T+k*2,N=k,I=R-k;return c1(R,R,function(P,F){if(N<=P&&P<I&&N<=F&&F<I){const K=Math.floor((P-N)/T),W=Math.floor((F-N)/T);return m.isDark(W,K)?0:1}else return 1})},m.createImgTag=function(T,k,R){T=T||2,k=typeof k>"u"?T*4:k;const N=m.getModuleCount()*T+k*2;let I="";return I+="<img",I+=' src="',I+=m.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=m.getModuleCount()*1+T*2,N=T,I=R-T;let P,F,K,W,V;const $={"██":"█","█ ":"▀"," █":"▄"," ":" "},ee={"██":"▀","█ ":"▀"," █":" "," ":" "};let H="";for(P=0;P<R;P+=2){for(K=Math.floor((P-N)/1),W=Math.floor((P+1-N)/1),F=0;F<R;F+=1)V="█",N<=F&&F<I&&N<=P&&P<I&&m.isDark(K,Math.floor((F-N)/1))&&(V=" "),N<=F&&F<I&&N<=P+1&&P+1<I&&m.isDark(W,Math.floor((F-N)/1))?V+=" ":V+="█",H+=T<1&&P+1>=I?ee[V]:$[V];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 m.createASCII=function(T,k){if(T=T||1,T<2)return D(k);T-=1,k=typeof k>"u"?T*2:k;const R=m.getModuleCount()*T+k*2,N=k,I=R-k;let P,F,K,W;const V=Array(T+1).join("██"),$=Array(T+1).join(" ");let ee="",H="";for(P=0;P<R;P+=1){for(K=Math.floor((P-N)/T),H="",F=0;F<R;F+=1)W=1,N<=F&&F<I&&N<=P&&P<I&&m.isDark(K,Math.floor((F-N)/T))&&(W=0),H+=W?V:$;for(K=0;K<T;K+=1)ee+=H+`
|
|
51
|
-
`}return ee.substring(0,ee.length-1)},m.renderTo2dContext=function(T,k){k=k||2;const R=m.getModuleCount();for(let N=0;N<R;N++)for(let I=0;I<R;I++)T.fillStyle=m.isDark(N,I)?"black":"white",T.fillRect(I*k,N*k,k,k)},m};rs.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};rs.createStringToBytes=function(n,r){const s=(function(){const d=a1(n),v=function(){const c=d.read();if(c==-1)throw"eof";return c};let f=0;const a={};for(;;){const c=d.read();if(c==-1)break;const h=v(),m=v(),u=v(),_=String.fromCharCode(c<<8|h),w=m<<8|u;a[_]=w,f+=1}if(f!=r)throw f+" != "+r;return a})(),o=63;return function(d){const v=[];for(let f=0;f<d.length;f+=1){const a=d.charCodeAt(f);if(a<128)v.push(a);else{const c=s[d.charAt(f)];typeof c=="number"?(c&255)==c?v.push(c):(v.push(c>>>8),v.push(c&255)):v.push(o)}}return v}};const Gt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},il={L:1,M:0,Q:3,H:2},Pi={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Fi=(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,d={},v=function(f){let a=0;for(;f!=0;)a+=1,f>>>=1;return a};return d.getBCHTypeInfo=function(f){let a=f<<10;for(;v(a)-v(r)>=0;)a^=r<<v(a)-v(r);return(f<<10|a)^o},d.getBCHTypeNumber=function(f){let a=f<<12;for(;v(a)-v(s)>=0;)a^=s<<v(a)-v(s);return f<<12|a},d.getPatternPosition=function(f){return n[f-1]},d.getMaskFunction=function(f){switch(f){case Pi.PATTERN000:return function(a,c){return(a+c)%2==0};case Pi.PATTERN001:return function(a,c){return a%2==0};case Pi.PATTERN010:return function(a,c){return c%3==0};case Pi.PATTERN011:return function(a,c){return(a+c)%3==0};case Pi.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case Pi.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case Pi.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case Pi.PATTERN111:return function(a,c){return(a*c%3+(a+c)%2)%2==0};default:throw"bad maskPattern:"+f}},d.getErrorCorrectPolynomial=function(f){let a=ol([1],0);for(let c=0;c<f;c+=1)a=a.multiply(ol([1,Gi.gexp(c)],0));return a},d.getLengthInBits=function(f,a){if(1<=a&&a<10)switch(f){case Gt.MODE_NUMBER:return 10;case Gt.MODE_ALPHA_NUM:return 9;case Gt.MODE_8BIT_BYTE:return 8;case Gt.MODE_KANJI:return 8;default:throw"mode:"+f}else if(a<27)switch(f){case Gt.MODE_NUMBER:return 12;case Gt.MODE_ALPHA_NUM:return 11;case Gt.MODE_8BIT_BYTE:return 16;case Gt.MODE_KANJI:return 10;default:throw"mode:"+f}else if(a<41)switch(f){case Gt.MODE_NUMBER:return 14;case Gt.MODE_ALPHA_NUM:return 13;case Gt.MODE_8BIT_BYTE:return 16;case Gt.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+a},d.getLostPoint=function(f){const a=f.getModuleCount();let c=0;for(let u=0;u<a;u+=1)for(let _=0;_<a;_+=1){let w=0;const E=f.isDark(u,_);for(let x=-1;x<=1;x+=1)if(!(u+x<0||a<=u+x))for(let y=-1;y<=1;y+=1)_+y<0||a<=_+y||x==0&&y==0||E==f.isDark(u+x,_+y)&&(w+=1);w>5&&(c+=3+w-5)}for(let u=0;u<a-1;u+=1)for(let _=0;_<a-1;_+=1){let w=0;f.isDark(u,_)&&(w+=1),f.isDark(u+1,_)&&(w+=1),f.isDark(u,_+1)&&(w+=1),f.isDark(u+1,_+1)&&(w+=1),(w==0||w==4)&&(c+=3)}for(let u=0;u<a;u+=1)for(let _=0;_<a-6;_+=1)f.isDark(u,_)&&!f.isDark(u,_+1)&&f.isDark(u,_+2)&&f.isDark(u,_+3)&&f.isDark(u,_+4)&&!f.isDark(u,_+5)&&f.isDark(u,_+6)&&(c+=40);for(let u=0;u<a;u+=1)for(let _=0;_<a-6;_+=1)f.isDark(_,u)&&!f.isDark(_+1,u)&&f.isDark(_+2,u)&&f.isDark(_+3,u)&&f.isDark(_+4,u)&&!f.isDark(_+5,u)&&f.isDark(_+6,u)&&(c+=40);let h=0;for(let u=0;u<a;u+=1)for(let _=0;_<a;_+=1)f.isDark(_,u)&&(h+=1);const m=Math.abs(100*h/a/a-50)/5;return c+=m*10,c},d})(),Gi=(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})(),ol=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let d=0;for(;d<n.length&&n[d]==0;)d+=1;const v=new Array(n.length-d+r);for(let f=0;f<n.length-d;f+=1)v[f]=n[f+d];return v})(),o={};return o.getAt=function(d){return s[d]},o.getLength=function(){return s.length},o.multiply=function(d){const v=new Array(o.getLength()+d.getLength()-1);for(let f=0;f<o.getLength();f+=1)for(let a=0;a<d.getLength();a+=1)v[f+a]^=Gi.gexp(Gi.glog(o.getAt(f))+Gi.glog(d.getAt(a)));return ol(v,0)},o.mod=function(d){if(o.getLength()-d.getLength()<0)return o;const v=Gi.glog(o.getAt(0))-Gi.glog(d.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<d.getLength();a+=1)f[a]^=Gi.gexp(Gi.glog(d.getAt(a))+v);return ol(f,0).mod(d)},o},um=(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(d,v){const f={};return f.totalCount=d,f.dataCount=v,f},s={},o=function(d,v){switch(v){case il.L:return n[(d-1)*4+0];case il.M:return n[(d-1)*4+1];case il.Q:return n[(d-1)*4+2];case il.H:return n[(d-1)*4+3];default:return}};return s.getRSBlocks=function(d,v){const f=o(d,v);if(typeof f>"u")throw"bad rs block @ typeNumber:"+d+"/errorCorrectionLevel:"+v;const a=f.length/3,c=[];for(let h=0;h<a;h+=1){const m=f[h*3+0],u=f[h*3+1],_=f[h*3+2];for(let w=0;w<m;w+=1)c.push(r(u,_))}return c},s})(),hm=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(o){const d=Math.floor(o/8);return(n[d]>>>7-o%8&1)==1},s.put=function(o,d){for(let v=0;v<d;v+=1)s.putBit((o>>>d-v-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(o){const d=Math.floor(r/8);n.length<=d&&n.push(0),o&&(n[d]|=128>>>r%8),r+=1},s},n1=function(n){const r=Gt.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(d(a.substring(c,c+3)),10),c+=3;c<a.length&&(a.length-c==1?f.put(d(a.substring(c,c+1)),4):a.length-c==2&&f.put(d(a.substring(c,c+2)),7))};const d=function(f){let a=0;for(let c=0;c<f.length;c+=1)a=a*10+v(f.charAt(c));return a},v=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return o},i1=function(n){const r=Gt.MODE_ALPHA_NUM,s=n,o={};o.getMode=function(){return r},o.getLength=function(v){return s.length},o.write=function(v){const f=s;let a=0;for(;a+1<f.length;)v.put(d(f.charAt(a))*45+d(f.charAt(a+1)),11),a+=2;a<f.length&&v.put(d(f.charAt(a)),6)};const d=function(v){if("0"<=v&&v<="9")return v.charCodeAt(0)-48;if("A"<=v&&v<="Z")return v.charCodeAt(0)-65+10;switch(v){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 :"+v}};return o},r1=function(n){const r=Gt.MODE_8BIT_BYTE,s=rs.stringToBytes(n),o={};return o.getMode=function(){return r},o.getLength=function(d){return s.length},o.write=function(d){for(let v=0;v<s.length;v+=1)d.put(s[v],8)},o},s1=function(n){const r=Gt.MODE_KANJI,s=rs.stringToBytes;(function(v,f){const a=s(v);if(a.length!=2||(a[0]<<8|a[1])!=f)throw"sjis not supported."})("友",38726);const o=s(n),d={};return d.getMode=function(){return r},d.getLength=function(v){return~~(o.length/2)},d.write=function(v){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),v.put(c,13),a+=2}if(a<f.length)throw"illegal char at "+(a+1)},d},_g=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,d){o=o||0,d=d||s.length;for(let v=0;v<d;v+=1)r.writeByte(s[v+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},l1=function(){let n=0,r=0,s=0,o="";const d={},v=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 d.writeByte=function(a){for(n=n<<8|a&255,r+=8,s+=1;r>=6;)v(n>>>r-6),r-=6},d.flush=function(){if(r>0&&(v(n<<6-r),n=0,r=0),s%3!=0){const a=3-s%3;for(let c=0;c<a;c+=1)o+="="}},d.toString=function(){return o},d},a1=function(n){const r=n;let s=0,o=0,d=0;const v={};v.read=function(){for(;d<8;){if(s>=r.length){if(d==0)return-1;throw"unexpected end of file./"+d}const c=r.charAt(s);if(s+=1,c=="=")return d=0,-1;if(c.match(/^\s$/))continue;o=o<<6|f(c.charCodeAt(0)),d+=6}const a=o>>>d-8&255;return d-=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 v},o1=function(n,r){const s=n,o=r,d=new Array(n*r),v={};v.setPixel=function(h,m,u){d[m*s+h]=u},v.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 m=2,u=a(m);h.writeByte(m);let _=0;for(;u.length-_>255;)h.writeByte(255),h.writeBytes(u,_,255),_+=255;h.writeByte(u.length-_),h.writeBytes(u,_,u.length-_),h.writeByte(0),h.writeString(";")};const f=function(h){const m=h;let u=0,_=0;const w={};return w.write=function(E,x){if(E>>>x)throw"length over";for(;u+x>=8;)m.writeByte(255&(E<<u|_)),x-=8-u,E>>>=8-u,_=0,u=0;_=E<<u|_,u=u+x},w.flush=function(){u>0&&m.writeByte(_)},w},a=function(h){const m=1<<h,u=(1<<h)+1;let _=h+1;const w=c();for(let g=0;g<m;g+=1)w.add(String.fromCharCode(g));w.add(String.fromCharCode(m)),w.add(String.fromCharCode(u));const E=_g(),x=f(E);x.write(m,_);let y=0,S=String.fromCharCode(d[y]);for(y+=1;y<d.length;){const g=String.fromCharCode(d[y]);y+=1,w.contains(S+g)?S=S+g:(x.write(w.indexOf(S),_),w.size()<4095&&(w.size()==1<<_&&(_+=1),w.add(S+g)),S=g)}return x.write(w.indexOf(S),_),x.write(u,_),x.flush(),E.toByteArray()},c=function(){const h={};let m=0;const u={};return u.add=function(_){if(u.contains(_))throw"dup key:"+_;h[_]=m,m+=1},u.size=function(){return m},u.indexOf=function(_){return h[_]},u.contains=function(_){return typeof h[_]<"u"},u};return v},c1=function(n,r,s){const o=o1(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 d=_g();o.write(d);const v=l1(),f=d.toByteArray();for(let a=0;a<f.length;a+=1)v.writeByte(f[a]);return v.flush(),"data:image/gif;base64,"+v};rs.stringToBytes;const ns=[{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}],vg={name:"gate-reviewer",label:"Gate Reviewer",commandAgent:"gate-reviewer",dispatchable:!1},Gu=[...ns,vg],u1={name:"translator",label:"Translator",commandAgent:"translator",dispatchable:!1},yg=[u1],Vu=[...Gu,...yg],h1=ns.map(n=>n.name),Sg=Gu.map(n=>n.name);yg.map(n=>n.name);Vu.map(n=>n.name);Vu.filter(n=>n.dispatchable).map(n=>n.name);function f1(n){return Sg.includes(n)}const d1="zh-CN",p1="pm-final-only",bg=[{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"}],m1=[{value:"pm-final-only",label:"PM final reply"},{value:"final-only",label:"Each role final reply"},{value:"all",label:"All replies"}];function g1(){const n={};for(const r of Sg)n[r]={permissionMode:"default",model:"default",effort:"default"};return{version:1,roles:n,autoOrchestration:!0}}function _1({sidebar:n,children:r}){const[s,o]=ae.useState(!1);return O.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[O.jsxs("aside",{className:"app-sidebar",children:[O.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>o(d=>!d)}),O.jsx("div",{className:"sidebar-content",children:n})]}),O.jsx("main",{className:"app-main",children:r})]})}const v1=[{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"}],y1=[{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"}],S1=[...y1,{value:"max",label:"Max",description:"Maximum reasoning"},{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}];function Cg({role:n,session:r,permissionMode:s,model:o,effort:d,busy:v=!1,onPermissionModeChange:f,onModelChange:a,onEffortChange:c,onStart:h,onResume:m,onStop:u,onRestart:_}){const w=(r==null?void 0:r.status)==="running",E=!!(r!=null&&r.claudeSessionId&&!w),x=!w&&!(r!=null&&r.claudeSessionId);return O.jsxs("div",{className:"session-controls",children:[O.jsxs("label",{className:"session-option-field permission-mode-field",children:[O.jsx("span",{children:"Permission"}),O.jsxs("select",{value:s,onChange:y=>f(y.target.value),children:[O.jsx("option",{value:"default",children:"默认"}),O.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),O.jsxs("label",{className:"session-option-field model-field",children:[O.jsx("span",{children:"Model"}),O.jsx("select",{value:o,onChange:y=>a(y.target.value),children:v1.map(y=>O.jsx("option",{value:y.value,children:y.label},y.value))})]}),O.jsxs("label",{className:"session-option-field effort-field",children:[O.jsx("span",{children:"Effort"}),O.jsx("select",{value:d,onChange:y=>c(y.target.value),children:S1.map(y=>O.jsx("option",{value:y.value,children:y.label},y.value))})]}),O.jsxs("div",{className:"session-toolbar",children:[O.jsx("button",{type:"button",disabled:v||!x,onClick:h,children:"Start"}),O.jsx("button",{type:"button",disabled:v||!E,onClick:m,children:"Resume"}),O.jsx("button",{type:"button",disabled:v||!r,onClick:_,children:"Restart"}),O.jsx("button",{type:"button",disabled:v||!r,onClick:u,children:"Stop"})]})]})}var uu={exports:{}},fm;function b1(){return fm||(fm=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(d){this._terminal=d}dispose(){}fit(){const d=this.proposeDimensions();if(!d||!this._terminal||isNaN(d.cols)||isNaN(d.rows))return;const v=this._terminal._core;this._terminal.rows===d.rows&&this._terminal.cols===d.cols||(v._renderService.clear(),this._terminal.resize(d.cols,d.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const d=this._terminal._core,v=d._renderService.dimensions;if(v.css.cell.width===0||v.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:d.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),u=c-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),_=h-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(_/v.css.cell.width)),rows:Math.max(1,Math.floor(u/v.css.cell.height))}}}})(),s})()))})(uu)),uu.exports}var C1=b1(),hu={exports:{}},dm;function w1(){return dm||(dm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={6:(f,a)=>{function c(m){try{const u=new URL(m),_=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 m.toLocaleLowerCase().startsWith(_.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(m,u,_,w={}){this._terminal=m,this._regex=u,this._handler=_,this._options=w}provideLinks(m,u){const _=h.computeLink(m,this._regex,this._terminal,this._handler);u(this._addCallbacks(_))}_addCallbacks(m){return m.map((u=>(u.leave=this._options.leave,u.hover=(_,w)=>{if(this._options.hover){const{range:E}=u;this._options.hover(_,w,E)}},u)))}};class h{static computeLink(u,_,w,E){const x=new RegExp(_.source,(_.flags||"")+"g"),[y,S]=h._getWindowedLineStrings(u-1,w),g=y.join("");let b;const A=[];for(;b=x.exec(g);){const M=b[0];if(!c(M))continue;const[D,T]=h._mapStrIdx(w,S,0,b.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,_){let w,E=u,x=u,y=0,S="";const g=[];if(w=_.buffer.active.getLine(u)){const b=w.translateToString(!0);if(w.isWrapped&&b[0]!==" "){for(y=0;(w=_.buffer.active.getLine(--E))&&y<2048&&(S=w.translateToString(!0),y+=S.length,g.push(S),w.isWrapped&&S.indexOf(" ")===-1););g.reverse()}for(g.push(b),y=0;(w=_.buffer.active.getLine(++x))&&w.isWrapped&&y<2048&&(S=w.translateToString(!0),y+=S.length,g.push(S),S.indexOf(" ")===-1););}return[g,E]}static _mapStrIdx(u,_,w,E){const x=u.buffer.active,y=x.getNullCell();let S=w;for(;E;){const g=x.getLine(_);if(!g)return[-1,-1];for(let b=S;b<g.length;++b){g.getCell(b,y);const A=y.getChars();if(y.getWidth()&&(E-=A.length||1,b===g.length-1&&A==="")){const M=x.getLine(_+1);M&&M.isWrapped&&(M.getCell(0,y),y.getWidth()===2&&(E+=1))}if(E<0)return[_,b]}_++,S=0}return[_,S]}}a.LinkComputer=h}},o={};function d(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f](c,c.exports,d),c.exports}var v={};return(()=>{var f=v;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const a=d(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(m,u){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(m=h,u={}){this._handler=m,this._options=u}activate(m){this._terminal=m;const u=this._options,_=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,_,this._handler,u))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),v})()))})(hu)),hu.exports}var x1=w1(),fu={exports:{}},pm;function E1(){return pm||(pm=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,b,A,M){var D,T=arguments.length,k=T<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,b,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(b,A,k):D(b,A))||k);return T>3&&k&&Object.defineProperty(b,A,k),k},m=this&&this.__param||function(g,b){return function(A,M){b(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const u=c(9042),_=c(9924),w=c(844),E=c(4725),x=c(2585),y=c(3656);let S=a.AccessibilityManager=class extends w.Disposable{constructor(g,b,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 _.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
52
|
-
`)))),this.register(this._terminal.onA11yTab((D=>this._handleTab(D)))),this.register(this._terminal.onKey((D=>this._handleKey(D.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,y.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(g){for(let b=0;b<g;b++)this._handleChar(" ")}_handleChar(g){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==g&&(this._charsToAnnounce+=g):this._charsToAnnounce+=g,g===`
|
|
53
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=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,b){this._liveRegionDebouncer.refresh(g,b,this._terminal.rows)}_renderRows(g,b){const A=this._terminal.buffer,M=A.lines.length.toString();for(let D=g;D<=b;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,b){const A=g.target,M=this._rowElements[b===0?1:this._rowElements.length-2];if(A.getAttribute("aria-posinset")===(b===0?"1":`${this._terminal.buffer.lines.length}`)||g.relatedTarget!==M)return;let D,T;if(b===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),b===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(b===0?-1:1),this._rowElements[b===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 b={node:g.anchorNode,offset:g.anchorOffset},A={node:g.focusNode,offset:g.focusOffset};if((b.node.compareDocumentPosition(A.node)&Node.DOCUMENT_POSITION_PRECEDING||b.node===A.node&&b.offset>A.offset)&&([b,A]=[A,b]),b.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(b={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(b.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 K=this._rowColumns.get(P);if(!K)return console.warn("columns is null. Race condition?"),null;let W=I<K.length?K[I]:K.slice(-1)[0]+1;return W>=this._terminal.cols&&(++F,W=0),{row:F,column:W}},T=D(b),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 b=this._rowContainer.children.length;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);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([m(1,x.IInstantiationService),m(2,E.ICoreBrowserService),m(3,E.IRenderService)],S)},3614:(f,a)=>{function c(_){return _.replace(/\r?\n/g,"\r")}function h(_,w){return w?"\x1B[200~"+_+"\x1B[201~":_}function m(_,w,E,x){_=h(_=c(_),E.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(_,!0),w.value=""}function u(_,w,E){const x=E.getBoundingClientRect(),y=_.clientX-x.left-10,S=_.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${y}px`,w.style.top=`${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(_,w){_.clipboardData&&_.clipboardData.setData("text/plain",w.selectionText),_.preventDefault()},a.handlePasteEvent=function(_,w,E,x){_.stopPropagation(),_.clipboardData&&m(_.clipboardData.getData("text/plain"),w,E,x)},a.paste=m,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(_,w,E,x,y){u(_,w,E),y&&x.rightClickSelect(_),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(m,u,_){this._css.set(m,u,_)}getCss(m,u){return this._css.get(m,u)}setColor(m,u,_){this._color.set(m,u,_)}getColor(m,u){return this._color.get(m,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,m,u){c.addEventListener(h,m,u);let _=!1;return{dispose:()=>{_||(_=!0,c.removeEventListener(h,m,u))}}}},3551:function(f,a,c){var h=this&&this.__decorate||function(S,g,b,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,b):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,b,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,b,T):M(g,b))||T);return D>3&&T&&Object.defineProperty(g,b,T),T},m=this&&this.__param||function(S,g){return function(b,A){g(b,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const u=c(3656),_=c(8460),w=c(844),E=c(2585),x=c(4725);let y=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(S,g,b,A,M){super(),this._element=S,this._mouseService=g,this._renderService=b,this._bufferService=A,this._linkProviderService=M,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.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 b=S.composedPath();for(let A=0;A<b.length;A++){const M=b[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 b=!1;for(const[D,T]of this._linkProviderService.linkProviders.entries())g?(M=this._activeProviderReplies)!=null&&M.get(D)&&(b=this._checkLinkProviderResult(D,S,b)):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),b=this._checkLinkProviderResult(D,S,b),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(S.y,this._activeProviderReplies)}))}_removeIntersectingLinks(S,g){const b=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(b.has(N)){M.splice(D--,1);break}b.add(N)}}}}_checkLinkProviderResult(S,g,b){var D;if(!this._activeProviderReplies)return b;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&&(b=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!b)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){b=!0,this._handleNewLink(k);break}}return b}_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 b,A;return(A=(b=this._currentLink)==null?void 0:b.state)==null?void 0:A.decorations.pointerCursor},set:b=>{var A;(A=this._currentLink)!=null&&A.state&&this._currentLink.state.decorations.pointerCursor!==b&&(this._currentLink.state.decorations.pointerCursor=b,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",b))}},underline:{get:()=>{var b,A;return(A=(b=this._currentLink)==null?void 0:b.state)==null?void 0:A.decorations.underline},set:b=>{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)!==b&&(this._currentLink.state.decorations.underline=b,this._currentLink.state.isHovered&&this._fireUnderlineEvent(S.link,b))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((b=>{if(!this._currentLink)return;const A=b.start===0?0:b.start+1+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.ydisp+1+b.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,b){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(b,g.text)}_fireUnderlineEvent(S,g){const b=S.range,A=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(b.start.x-1,b.start.y-A-1,b.end.x,b.end.y-A-1,void 0);(g?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(S,g,b){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(b,g.text)}_linkAtPosition(S,g){const b=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 b<=M&&M<=A}_positionFromMouseEvent(S,g,b){const A=b.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,b,A,M){return{x1:S,y1:g,x2:b,y2:A,cols:this._bufferService.cols,fg:M}}};a.Linkifier=y=h([m(1,x.IMouseService),m(2,x.IRenderService),m(3,E.IBufferService),m(4,x.ILinkProviderService)],y)},9042:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(f,a,c){var h=this&&this.__decorate||function(x,y,S,g){var b,A=arguments.length,M=A<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,S,g);else for(var D=x.length-1;D>=0;D--)(b=x[D])&&(M=(A<3?b(M):A>3?b(y,S,M):b(y,S))||M);return A>3&&M&&Object.defineProperty(y,S,M),M},m=this&&this.__param||function(x,y){return function(S,g){y(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const u=c(511),_=c(2585);let w=a.OscLinkProvider=class{constructor(x,y,S){this._bufferService=x,this._optionsService=y,this._oscLinkService=S}provideLinks(x,y){var R;const S=this._bufferService.buffer.lines.get(x-1);if(!S)return void y(void 0);const g=[],b=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(!(b!=null&&b.allowNonHttpProtocols))try{const K=new URL(I);["http:","https:"].includes(K.protocol)||(F=!0)}catch{F=!0}F||g.push({text:I,range:P,activate:(K,W)=>b?b.activate(K,W,P):E(0,W),hover:(K,W)=>{var V;return(V=b==null?void 0:b.hover)==null?void 0:V.call(b,K,W,P)},leave:(K,W)=>{var V;return(V=b==null?void 0:b.leave)==null?void 0:V.call(b,K,W,P)}})}k=!1,A.hasExtendedAttrs()&&A.extended.urlId?(T=N,D=A.extended.urlId):(T=-1,D=-1)}}y(g)}};function E(x,y){if(confirm(`Do you want to navigate to ${y}?
|
|
54
|
-
|
|
55
|
-
WARNING: This link could potentially be dangerous`)){const S=window.open();if(S){try{S.opener=null}catch{}S.location.href=y}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([m(0,_.IBufferService),m(1,_.IOptionsService),m(2,_.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,m){this._rowCount=m,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),m=c(3656),u=c(3551),_=c(9042),w=c(3730),E=c(1680),x=c(3107),y=c(5744),S=c(2950),g=c(1296),b=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),K=c(844),W=c(6114),V=c(8437),$=c(2584),ee=c(7399),H=c(5941),B=c(9074),z=c(2585),G=c(5435),j=c(4567),te=c(779);class he 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(Y={}){super(Y),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new K.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(B.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(te.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,oe)=>this.refresh(q,oe)))),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,K.toDisposable)((()=>{var q,oe;this._customKeyEventHandler=void 0,(oe=(q=this.element)==null?void 0:q.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(Y){if(this._themeService)for(const q of Y){let oe,Z="";switch(q.index){case 256:oe="foreground",Z="10";break;case 257:oe="background",Z="11";break;case 258:oe="cursor",Z="12";break;default:oe="ansi",Z="4;"+q.index}switch(q.type){case 0:const ie=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${$.C0.ESC}]${Z};${(0,H.toRgbString)(ie)}${$.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((de=>de.ansi[q.index]=I.channels.toColor(...q.color)));else{const de=oe;this._themeService.modifyColors((Ce=>Ce[de]=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(Y){Y?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Y;return(Y=this.textarea)==null?void 0:Y.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 Y=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(Y);if(!q)return;const oe=Math.min(this.buffer.x,this.cols-1),Z=this._renderService.dimensions.css.cell.height,ie=q.getWidth(oe),de=this._renderService.dimensions.css.cell.width*ie,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,we=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=we+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=de+"px",this.textarea.style.height=Z+"px",this.textarea.style.lineHeight=Z+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,h.copyHandler)(q,this._selectionService)})));const Y=q=>(0,h.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,m.addDisposableDomListener)(this.element,"paste",Y)),W.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),W.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,h.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(Y=>this._keyUp(Y)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(Y=>this._keyDown(Y)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(Y=>this._keyPress(Y)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(Y=>this._compositionHelper.compositionupdate(Y)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(Y=>this._inputEvent(Y)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Y){var oe;if(!Y)throw new Error("Terminal requires a parent element.");if(Y.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Y.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"),Y.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,m.addDisposableDomListener)(this.screenElement,"mousemove",(Z=>this.updateCursorStyle(Z)))),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",_.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,Y.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",(Z=>this._handleTextAreaFocus(Z)))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(b.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((Z=>this._onRender.fire(Z)))),this.onResize((Z=>this._renderService.resize(Z.cols,Z.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((Z=>this.scrollLines(Z.amount,Z.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((Z=>this.scrollLines(Z.amount,Z.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Z=>this._renderService.handleSelectionChanged(Z.start,Z.end,Z.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Z=>{this.textarea.value=Z,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Z=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(Z=>this._selectionService.handleMouseDown(Z)))),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",(Z=>this._handleScreenReaderModeOptionChange(Z)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(y.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Z=>{!this._overviewRulerRenderer&&Z&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(y.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(g.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Y=this,q=this.element;function oe(de){const Ce=Y._mouseService.getMouseReportCoords(de,Y.screenElement);if(!Ce)return!1;let we,$e;switch(de.overrideType||de.type){case"mousemove":$e=32,de.buttons===void 0?(we=3,de.button!==void 0&&(we=de.button<3?de.button:3)):we=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":$e=0,we=de.button<3?de.button:3;break;case"mousedown":$e=1,we=de.button<3?de.button:3;break;case"wheel":if(Y._customWheelEventHandler&&Y._customWheelEventHandler(de)===!1||Y.viewport.getLinesScrolled(de)===0)return!1;$e=de.deltaY<0?0:1,we=4;break;default:return!1}return!($e===void 0||we===void 0||we>4)&&Y.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:we,action:$e,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const Z={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ie={mouseup:de=>(oe(de),de.buttons||(this._document.removeEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.removeEventListener("mousemove",Z.mousedrag)),this.cancel(de)),wheel:de=>(oe(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&oe(de)},mousemove:de=>{de.buttons||oe(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&de?Z.mousemove||(q.addEventListener("mousemove",ie.mousemove),Z.mousemove=ie.mousemove):(q.removeEventListener("mousemove",Z.mousemove),Z.mousemove=null),16&de?Z.wheel||(q.addEventListener("wheel",ie.wheel,{passive:!1}),Z.wheel=ie.wheel):(q.removeEventListener("wheel",Z.wheel),Z.wheel=null),2&de?Z.mouseup||(Z.mouseup=ie.mouseup):(this._document.removeEventListener("mouseup",Z.mouseup),Z.mouseup=null),4&de?Z.mousedrag||(Z.mousedrag=ie.mousedrag):(this._document.removeEventListener("mousemove",Z.mousedrag),Z.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(q,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return oe(de),Z.mouseup&&this._document.addEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.addEventListener("mousemove",Z.mousedrag),this.cancel(de)}))),this.register((0,m.addDisposableDomListener)(q,"wheel",(de=>{if(!Z.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(de);if(Ce===0)return;const we=$.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let $e="";for(let at=0;at<Math.abs(Ce);at++)$e+=we;return this.coreService.triggerDataEvent($e,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)(q,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,m.addDisposableDomListener)(q,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(Y,q){var oe;(oe=this._renderService)==null||oe.refreshRows(Y,q)}updateCursorStyle(Y){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(Y)?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(Y,q,oe=0){var Z;oe===1?(super.scrollLines(Y,q,oe),this.refresh(0,this.rows-1)):(Z=this.viewport)==null||Z.scrollLines(Y)}paste(Y){(0,h.paste)(Y,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Y){this._customKeyEventHandler=Y}attachCustomWheelEventHandler(Y){this._customWheelEventHandler=Y}registerLinkProvider(Y){return this._linkProviderService.registerLinkProvider(Y)}registerCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Y)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Y){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Y)}registerDecoration(Y){return this._decorationService.registerDecoration(Y)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Y,q,oe){this._selectionService.setSelection(Y,q,oe)}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 Y;(Y=this._selectionService)==null||Y.clearSelection()}selectAll(){var Y;(Y=this._selectionService)==null||Y.selectAll()}selectLines(Y,q){var oe;(oe=this._selectionService)==null||oe.selectLines(Y,q)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!q&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,ee.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),oe.type===3||oe.type===2){const Z=this.rows-1;return this.scrollLines(oe.type===2?-Z:Z),this.cancel(Y,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(oe.cancel&&this.cancel(Y,!0),!oe.key||!!(Y.key&&!Y.ctrlKey&&!Y.altKey&&!Y.metaKey&&Y.key.length===1&&Y.key.charCodeAt(0)>=65&&Y.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==$.C0.ETX&&oe.key!==$.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,q){const oe=Y.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||Y.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||Y.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?oe:oe&&(!q.keyCode||q.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)q=Y.charCode;else if(Y.which===null||Y.which===void 0)q=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;q=Y.which}return!(!q||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Y){if(Y.data&&Y.inputType==="insertText"&&(!Y.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=Y.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(Y),!0}return!1}resize(Y,q){Y!==this.cols||q!==this.rows?super.resize(Y,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,q){var oe,Z;(oe=this._charSizeService)==null||oe.measure(),(Z=this.viewport)==null||Z.syncScrollArea(!0)}clear(){var Y;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(V.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Y=this.viewport)==null||Y.reset(),this.refresh(0,this.rows-1)}}reset(){var q,oe;this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(oe=this.viewport)==null||oe.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Y;(Y=this._renderService)==null||Y.clearTextureAtlas()}_reportFocus(){var Y;(Y=this.element)!=null&&Y.classList.contains("focus")?this.coreService.triggerDataEvent($.C0.ESC+"[I"):this.coreService.triggerDataEvent($.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){case G.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const q=this._renderService.dimensions.css.canvas.width.toFixed(0),oe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[4;${oe};${q}t`);break;case G.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Z=this._renderService.dimensions.css.cell.width.toFixed(0),ie=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[6;${ie};${Z}t`)}}cancel(Y,q){if(this.options.cancelEvents||q)return Y.preventDefault(),Y.stopPropagation(),!1}}a.Terminal=he},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,m){this._rowCount=m,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 _=u-this._lastRefreshMs,w=this._debounceThresholdMS-_;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,b,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,b):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,b,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,b,T):M(g,b))||T);return D>3&&T&&Object.defineProperty(g,b,T),T},m=this&&this.__param||function(S,g){return function(b,A){g(b,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const u=c(3656),_=c(4725),w=c(8460),E=c(844),x=c(2585);let y=a.Viewport=class extends E.Disposable{constructor(S,g,b,A,M,D,T,k){super(),this._viewportElement=S,this._scrollArea=g,this._bufferService=b,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 b=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(g<0&&this._viewportElement.scrollTop!==0||g>0&&b<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 b,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&&(b=P),A=""}}return{bufferElements:M,cursorElement:b}}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 b=this._optionsService.rawOptions.fastScrollModifier;return b==="alt"&&g.altKey||b==="ctrl"&&g.ctrlKey||b==="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=y=h([m(2,x.IBufferService),m(3,x.IOptionsService),m(4,_.ICharSizeService),m(5,_.IRenderService),m(6,_.ICoreBrowserService),m(7,_.IThemeService)],y)},3107:function(f,a,c){var h=this&&this.__decorate||function(x,y,S,g){var b,A=arguments.length,M=A<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,S,g);else for(var D=x.length-1;D>=0;D--)(b=x[D])&&(M=(A<3?b(M):A>3?b(y,S,M):b(y,S))||M);return A>3&&M&&Object.defineProperty(y,S,M),M},m=this&&this.__param||function(x,y){return function(S,g){y(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const u=c(4725),_=c(844),w=c(2585);let E=a.BufferDecorationRenderer=class extends _.Disposable{constructor(x,y,S,g,b){super(),this._screenElement=x,this._bufferService=y,this._coreBrowserService=S,this._decorationService=g,this._renderService=b,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,_.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var g;const y=this._coreBrowserService.mainDocument.createElement("div");y.classList.add("xterm-decoration"),y.classList.toggle("xterm-decoration-top-layer",((g=x==null?void 0:x.options)==null?void 0:g.layer)==="top"),y.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,y.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",y.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",y.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const S=x.options.x??0;return S&&S>this._bufferService.cols&&(y.style.display="none"),this._refreshXPosition(x,y),y}_refreshStyle(x){const y=x.marker.line-this._bufferService.buffers.active.ydisp;if(y<0||y>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let 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=y*this._renderService.dimensions.css.cell.height+"px",S.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(S)}}_refreshXPosition(x,y=x.element){if(!y)return;const S=x.options.x??0;(x.options.anchor||"left")==="right"?y.style.right=S?S*this._renderService.dimensions.css.cell.width+"px":"":y.style.left=S?S*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var y;(y=this._decorationElements.get(x))==null||y.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=E=h([m(1,w.IBufferService),m(2,u.ICoreBrowserService),m(3,w.IDecorationService),m(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,m){return h>=c.startBufferLine-this._linePadding[m||"full"]&&h<=c.endBufferLine+this._linePadding[m||"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(b,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(b,A,M,D);else for(var N=b.length-1;N>=0;N--)(T=b[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},m=this&&this.__param||function(b,A){return function(M,D){A(M,D,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const u=c(5871),_=c(4725),w=c(844),E=c(2585),x={full:0,left:0,center:0,right:0},y={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(b,A,M,D,T,k,R){var I;super(),this._viewportElement=b,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 b=Math.floor(this._canvas.width/3),A=Math.ceil(this._canvas.width/3);y.full=this._canvas.width,y.left=b,y.center=A,y.right=b,this._refreshDrawHeightConstants(),S.full=0,S.left=0,S.center=y.left,S.right=y.left+y.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const b=this._canvas.height/this._bufferService.buffer.lines.length,A=Math.round(Math.max(Math.min(b,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 b=this._colorZoneStore.zones;for(const A of b)A.position!=="full"&&this._renderColorZone(A);for(const A of b)A.position==="full"&&this._renderColorZone(A);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(b){this._ctx.fillStyle=b.color,this._ctx.fillRect(S[b.position||"full"],Math.round((this._canvas.height-1)*(b.startBufferLine/this._bufferService.buffers.active.lines.length)-x[b.position||"full"]/2),y[b.position||"full"],Math.round((this._canvas.height-1)*((b.endBufferLine-b.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[b.position||"full"]))}_queueRefresh(b,A){this._shouldUpdateDimensions=b||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([m(2,E.IBufferService),m(3,E.IDecorationService),m(4,_.IRenderService),m(5,E.IOptionsService),m(6,_.ICoreBrowserService)],g)},2950:function(f,a,c){var h=this&&this.__decorate||function(x,y,S,g){var b,A=arguments.length,M=A<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,y,S,g);else for(var D=x.length-1;D>=0;D--)(b=x[D])&&(M=(A<3?b(M):A>3?b(y,S,M):b(y,S))||M);return A>3&&M&&Object.defineProperty(y,S,M),M},m=this&&this.__param||function(x,y){return function(S,g){y(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const u=c(4725),_=c(2585),w=c(2584);let E=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,y,S,g,b,A){this._textarea=x,this._compositionView=y,this._bufferService=S,this._optionsService=g,this._coreService=b,this._renderService=A,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const y={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let S;this._isSendingComposition=!1,y.start+=this._dataAlreadySent.length,S=this._isComposing?this._textarea.value.substring(y.start,y.end):this._textarea.value.substring(y.start),S.length>0&&this._coreService.triggerDataEvent(S,!0)}}),0)}else{this._isSendingComposition=!1;const y=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(y,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const y=this._textarea.value,S=y.replace(x,"");this._dataAlreadySent=S,y.length>x.length?this._coreService.triggerDataEvent(S,!0):y.length<x.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):y.length===x.length&&y!==x&&this._coreService.triggerDataEvent(y,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const y=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),S=this._renderService.dimensions.css.cell.height,g=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,b=y*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=b+"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=b+"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([m(2,_.IBufferService),m(3,_.IOptionsService),m(4,_.ICoreService),m(5,u.IRenderService)],E)},9806:(f,a)=>{function c(h,m,u){const _=u.getBoundingClientRect(),w=h.getComputedStyle(u),E=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[m.clientX-_.left-E,m.clientY-_.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(h,m,u,_,w,E,x,y,S){if(!E)return;const g=c(h,m,u);return g?(g[0]=Math.ceil((g[0]+(S?x/2:0))/x),g[1]=Math.ceil(g[1]/y),g[0]=Math.min(Math.max(g[0],1),_+(S?1:0)),g[1]=Math.min(Math.max(g[1],1),w),g):void 0}},9504:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=c(2584);function m(y,S,g,b){const A=y-u(y,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 K=_(T,k)==="A"?-1:1,W=R.buffer.lines.get(I+K*F);W!=null&&W.isWrapped&&N++}return N})(y,S,g);return x(D,E(_(y,S),b))}function u(y,S){let g=0,b=S.buffer.lines.get(y),A=b==null?void 0:b.isWrapped;for(;A&&y>=0&&y<S.rows;)g++,b=S.buffer.lines.get(--y),A=b==null?void 0:b.isWrapped;return g}function _(y,S){return y>S?"A":"B"}function w(y,S,g,b,A,M){let D=y,T=S,k="";for(;D!==g||T!==b;)D+=A?1:-1,A&&D>M.cols-1?(k+=M.buffer.translateBufferLineToString(T,!1,y,D),D=0,y=0,T++):!A&&D<0&&(k+=M.buffer.translateBufferLineToString(T,!1,0,y+1),D=M.cols-1,y=D,T--);return k+M.buffer.translateBufferLineToString(T,!1,y,D)}function E(y,S){const g=S?"O":"[";return h.C0.ESC+g+y}function x(y,S){y=Math.floor(y);let g="";for(let b=0;b<y;b++)g+=S;return g}a.moveToCellSequence=function(y,S,g,b){const A=g.buffer.x,M=g.buffer.y;if(!g.buffer.hasScrollback)return(function(k,R,N,I,P,F){return m(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,b)+m(M,S,g,b)+(function(k,R,N,I,P,F){let K;K=m(R,I,P,F).length>0?I-u(I,P):R;const W=I,V=(function($,ee,H,B,z,G){let j;return j=m(H,B,z,G).length>0?B-u(B,z):ee,$<H&&j<=B||$>=H&&j<B?"C":"D"})(k,R,N,I,P,F);return x(w(k,K,N,W,V==="C",P).length,E(V,F))})(A,M,y,S,g,b);let D;if(M===S)return D=A>y?"D":"C",x(Math.abs(A-y),E(D,b));D=M>S?"D":"C";const T=Math.abs(M-S);return x((function(k,R){return R.cols-k})(M>S?y:A,g)+(T-1)*g.cols+1+((M>S?A:y)-1),E(D,b))}},1296:function(f,a,c){var h=this&&this.__decorate||function(F,K,W,V){var $,ee=arguments.length,H=ee<3?K:V===null?V=Object.getOwnPropertyDescriptor(K,W):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(F,K,W,V);else for(var B=F.length-1;B>=0;B--)($=F[B])&&(H=(ee<3?$(H):ee>3?$(K,W,H):$(K,W))||H);return ee>3&&H&&Object.defineProperty(K,W,H),H},m=this&&this.__param||function(F,K){return function(W,V){K(W,V,F)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const u=c(3787),_=c(2550),w=c(2223),E=c(6171),x=c(6052),y=c(4725),S=c(8055),g=c(8460),b=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 b.Disposable{constructor(F,K,W,V,$,ee,H,B,z,G,j,te,he){super(),this._terminal=F,this._document=K,this._element=W,this._screenElement=V,this._viewportElement=$,this._helperContainer=ee,this._linkifier2=H,this._charSizeService=z,this._optionsService=G,this._bufferService=j,this._coreBrowserService=te,this._themeService=he,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((me=>this._injectCss(me)))),this._injectCss(this._themeService.colors),this._rowFactory=B.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((me=>this._handleLinkHover(me)))),this.register(this._linkifier2.onHideLinkUnderline((me=>this._handleLinkLeave(me)))),this.register((0,b.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 _.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 K=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=K,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 K=`${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}`;K+=`${this._terminalSelector} .${D} .xterm-dim { color: ${S.color.multiplyOpacity(F.foreground,.5).css};}`,K+=`${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}`,V=`blink_bar_${this._terminalClass}`,$=`blink_block_${this._terminalClass}`;K+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,K+=`@keyframes ${V} { 50% { box-shadow: none; }}`,K+=`@keyframes ${$} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,K+=`${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: ${V} 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);}`,K+=`${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[ee,H]of F.ansi.entries())K+=`${this._terminalSelector} .${T}${ee} { color: ${H.css}; }${this._terminalSelector} .${T}${ee}.xterm-dim { color: ${S.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${k}${ee} { background-color: ${H.css}; }`;K+=`${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=K}_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,K){for(let W=this._rowElements.length;W<=K;W++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>K;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,K){this._refreshRowElements(F,K),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,K,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,K,W),this.renderRows(0,this._bufferService.rows-1),!F||!K)return;this._selectionRenderModel.update(this._terminal,F,K,W);const V=this._selectionRenderModel.viewportStartRow,$=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||H<0)return;const B=this._document.createDocumentFragment();if(W){const z=F[0]>K[0];B.appendChild(this._createSelectionElement(ee,z?K[0]:F[0],z?F[0]:K[0],H-ee+1))}else{const z=V===ee?F[0]:0,G=ee===$?K[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(ee,z,G));const j=H-ee-1;if(B.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,j)),ee!==H){const te=$===H?K[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(H,0,te))}}this._selectionContainer.appendChild(B)}_createSelectionElement(F,K,W,V=1){const $=this._document.createElement("div"),ee=K*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(W-K);return ee+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-ee),$.style.height=V*this.dimensions.css.cell.height+"px",$.style.top=F*this.dimensions.css.cell.height+"px",$.style.left=`${ee}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,K){const W=this._bufferService.buffer,V=W.ybase+W.y,$=Math.min(W.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=F;z<=K;z++){const G=z+W.ydisp,j=this._rowElements[z],te=W.lines.get(G);if(!j||!te)break;j.replaceChildren(...this._rowFactory.createRow(te,G,G===V,H,B,$,ee,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,K,W,V,$,ee){W<0&&(F=0),V<0&&(K=0);const H=this._bufferService.rows-1;W=Math.max(Math.min(W,H),0),V=Math.max(Math.min(V,H),0),$=Math.min($,this._bufferService.cols);const B=this._bufferService.buffer,z=B.ybase+B.y,G=Math.min(B.x,$-1),j=this._optionsService.rawOptions.cursorBlink,te=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let me=W;me<=V;++me){const Y=me+B.ydisp,q=this._rowElements[me],oe=B.lines.get(Y);if(!q||!oe)break;q.replaceChildren(...this._rowFactory.createRow(oe,Y,Y===z,te,he,G,j,this.dimensions.css.cell.width,this._widthCache,ee?me===W?F:0:-1,ee?(me===V?K:$)-1:-1))}}};a.DomRenderer=P=h([m(7,A.IInstantiationService),m(8,y.ICharSizeService),m(9,A.IOptionsService),m(10,A.IBufferService),m(11,y.ICoreBrowserService),m(12,y.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},m=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),_=c(643),w=c(511),E=c(2585),x=c(8055),y=c(4725),S=c(4269),g=c(6171),b=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,K,W,V){const $=[],ee=this._characterJoinerService.getJoinedCharacters(T),H=this._themeService.colors;let B,z=D.getNoBgTrimmedLength();k&&z<I+1&&(z=I+1);let G=0,j="",te=0,he=0,me=0,Y=!1,q=0,oe=!1,Z=0;const ie=[],de=W!==-1&&V!==-1;for(let Ce=0;Ce<z;Ce++){D.loadCell(Ce,this._workCell);let we=this._workCell.getWidth();if(we===0)continue;let $e=!1,at=Ce,Re=this._workCell;if(ee.length>0&&Ce===ee[0][0]){$e=!0;const je=ee.shift();Re=new S.JoinedCellData(this._workCell,D.translateToString(!0,je[0],je[1]),je[1]-je[0]),at=je[1]-1,we=Re.getWidth()}const Ot=this._isCellInSelection(Ce,T),Ct=k&&Ce===I,jt=de&&Ce>=W&&Ce<=V;let Kt=!1;this._decorationService.forEachDecorationAtCell(Ce,T,void 0,(je=>{Kt=!0}));let Yt=Re.getChars()||_.WHITESPACE_CELL_CHAR;if(Yt===" "&&(Re.isUnderline()||Re.isOverline())&&(Yt=" "),Z=we*F-K.get(Yt,Re.isBold(),Re.isItalic()),B){if(G&&(Ot&&oe||!Ot&&!oe&&Re.bg===te)&&(Ot&&oe&&H.selectionForeground||Re.fg===he)&&Re.extended.ext===me&&jt===Y&&Z===q&&!Ct&&!$e&&!Kt){Re.isInvisible()?j+=_.WHITESPACE_CELL_CHAR:j+=Yt,G++;continue}G&&(B.textContent=j),B=this._document.createElement("span"),G=0,j=""}else B=this._document.createElement("span");if(te=Re.bg,he=Re.fg,me=Re.extended.ext,Y=jt,q=Z,oe=Ot,$e&&I>=Ce&&I<=at&&(I=Ce),!this._coreService.isCursorHidden&&Ct&&this._coreService.isCursorInitialized){if(ie.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&ie.push("xterm-cursor-blink"),ie.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":ie.push("xterm-cursor-outline");break;case"block":ie.push("xterm-cursor-block");break;case"bar":ie.push("xterm-cursor-bar");break;case"underline":ie.push("xterm-cursor-underline")}}if(Re.isBold()&&ie.push("xterm-bold"),Re.isItalic()&&ie.push("xterm-italic"),Re.isDim()&&ie.push("xterm-dim"),j=Re.isInvisible()?_.WHITESPACE_CELL_CHAR:Re.getChars()||_.WHITESPACE_CELL_CHAR,Re.isUnderline()&&(ie.push(`xterm-underline-${Re.extended.underlineStyle}`),j===" "&&(j=" "),!Re.isUnderlineColorDefault()))if(Re.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${b.AttributeData.toColorRGB(Re.getUnderlineColor()).join(",")})`;else{let je=Re.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Re.isBold()&&je<8&&(je+=8),B.style.textDecorationColor=H.ansi[je].css}Re.isOverline()&&(ie.push("xterm-overline"),j===" "&&(j=" ")),Re.isStrikethrough()&&ie.push("xterm-strikethrough"),jt&&(B.style.textDecoration="underline");let dt=Re.getFgColor(),Je=Re.getFgColorMode(),wt=Re.getBgColor(),ue=Re.getBgColorMode();const ye=!!Re.isInverse();if(ye){const je=dt;dt=wt,wt=je;const ot=Je;Je=ue,ue=ot}let xe,Me,Be,pt=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,T,void 0,(je=>{je.options.layer!=="top"&&pt||(je.backgroundColorRGB&&(ue=50331648,wt=je.backgroundColorRGB.rgba>>8&16777215,xe=je.backgroundColorRGB),je.foregroundColorRGB&&(Je=50331648,dt=je.foregroundColorRGB.rgba>>8&16777215,Me=je.foregroundColorRGB),pt=je.options.layer==="top")})),!pt&&Ot&&(xe=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,wt=xe.rgba>>8&16777215,ue=50331648,pt=!0,H.selectionForeground&&(Je=50331648,dt=H.selectionForeground.rgba>>8&16777215,Me=H.selectionForeground)),pt&&ie.push("xterm-decoration-top"),ue){case 16777216:case 33554432:Be=H.ansi[wt],ie.push(`xterm-bg-${wt}`);break;case 50331648:Be=x.channels.toColor(wt>>16,wt>>8&255,255&wt),this._addStyle(B,`background-color:#${M((wt>>>0).toString(16),"0",6)}`);break;default:ye?(Be=H.foreground,ie.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):Be=H.background}switch(xe||Re.isDim()&&(xe=x.color.multiplyOpacity(Be,.5)),Je){case 16777216:case 33554432:Re.isBold()&&dt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(dt+=8),this._applyMinimumContrast(B,Be,H.ansi[dt],Re,xe,void 0)||ie.push(`xterm-fg-${dt}`);break;case 50331648:const je=x.channels.toColor(dt>>16&255,dt>>8&255,255&dt);this._applyMinimumContrast(B,Be,je,Re,xe,Me)||this._addStyle(B,`color:#${M(dt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Be,H.foreground,Re,xe,Me)||ye&&ie.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ie.length&&(B.className=ie.join(" "),ie.length=0),Ct||$e||Kt?B.textContent=j:G++,Z!==this.defaultSpacing&&(B.style.letterSpacing=`${Z}px`),$.push(B),Ce=at}return B&&G&&(B.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 K=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);F=x.color.ensureContrastRatio(N||T,I||k,K),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([m(1,y.ICharacterJoinerService),m(2,E.IOptionsService),m(3,y.ICoreBrowserService),m(4,E.ICoreService),m(5,E.IDecorationService),m(6,y.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 m=c.createElement("span");m.classList.add("xterm-char-measure-element");const u=c.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.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=[m,u,_,w],this._container.appendChild(m),this._container.appendChild(u),this._container.appendChild(_),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,m,u){c===this._font&&h===this._fontSize&&m===this._weight&&u===this._weightBold||(this._font=c,this._fontSize=h,this._weight=m,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(c,h,m){let u=0;if(!h&&!m&&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 _=c;h&&(_+="B"),m&&(_+="I");let w=this._holey.get(_);if(w===void 0){let E=0;h&&(E|=1),m&&(E|=2),w=this._measure(c,E),w>0&&this._holey.set(_,w)}return w}_measure(c,h){const m=this._measureElements[h];return m.textContent=c.repeat(32),m.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(m){return 57508<=m&&m<=57558}function h(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=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(m){if(!m)throw new Error("value must not be falsy");return m},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},a.isEmoji=h,a.allowRescaling=function(m,u,_,w){return u===1&&_>Math.ceil(1.5*w)&&m!==void 0&&m>255&&!h(m)&&!c(m)&&!(function(E){return 57344<=E&&E<=63743})(m)},a.treatGlyphAsBackgroundColor=function(m){return c(m)||(function(u){return 9472<=u&&u<=9631})(m)},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(m,u,_=0){return(m-(2*Math.round(u)-_))%(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(m,u,_,w=!1){if(this.selectionStart=u,this.selectionEnd=_,!u||!_||u[0]===_[0]&&u[1]===_[1])return void this.clear();const E=m.buffers.active.ydisp,x=u[1]-E,y=_[1]-E,S=Math.max(x,0),g=Math.min(y,m.rows-1);S>=m.rows||g<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=y,this.viewportCappedStartRow=S,this.viewportCappedEndRow=g,this.startCol=u[0],this.endCol=_[0])}isCellSelected(m,u,_){return!!this.hasSelection&&(_-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&_>=this.viewportCappedStartRow&&u<this.endCol&&_<=this.viewportCappedEndRow:u<this.startCol&&_>=this.viewportCappedStartRow&&u>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===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,b,A,M){var D,T=arguments.length,k=T<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,b,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(b,A,k):D(b,A))||k);return T>3&&k&&Object.defineProperty(b,A,k),k},m=this&&this.__param||function(g,b){return function(A,M){b(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const u=c(2585),_=c(8460),w=c(844);let E=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(g,b,A){super(),this._optionsService=A,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new S(this._optionsService))}catch{this._measureStrategy=this.register(new y(g,b,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([m(2,u.IOptionsService)],E);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(b,A){b!==void 0&&b>0&&A!==void 0&&A>0&&(this._result.width=b,this._result.height=A)}}class y extends x{constructor(b,A,M){super(),this._document=b,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(b){super(),this._optionsService=b,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 b=this._ctx.measureText("W");return this._validateAndSet(b.width,b.fontBoundingBoxAscent+b.fontBoundingBoxDescent),this._result}}},4269:function(f,a,c){var h=this&&this.__decorate||function(S,g,b,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,b):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,b,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,b,T):M(g,b))||T);return D>3&&T&&Object.defineProperty(g,b,T),T},m=this&&this.__param||function(S,g){return function(b,A){g(b,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(3734),_=c(643),w=c(511),E=c(2585);class x extends u.AttributeData{constructor(g,b,A){super(),this.content=0,this.combinedData="",this.fg=g.fg,this.bg=g.bg,this.combinedData=b,this._width=A}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(g){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let y=a.CharacterJoinerService=class wg{constructor(g){this._bufferService=g,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(g){const b={id:this._nextCharacterJoinerId++,handler:g};return this._characterJoiners.push(b),b.id}deregister(g){for(let b=0;b<this._characterJoiners.length;b++)if(this._characterJoiners[b].id===g)return this._characterJoiners.splice(b,1),!0;return!1}getJoinedCharacters(g){if(this._characterJoiners.length===0)return[];const b=this._bufferService.buffer.lines.get(g);if(!b||b.length===0)return[];const A=[],M=b.translateToString(!0);let D=0,T=0,k=0,R=b.getFg(0),N=b.getBg(0);for(let I=0;I<b.getTrimmedLength();I++)if(b.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,b,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||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-D>1){const I=this._getJoinedRanges(M,k,T,b,D);for(let P=0;P<I.length;P++)A.push(I[P])}return A}_getJoinedRanges(g,b,A,M,D){const T=g.substring(b,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++)wg._mergeRanges(k,N[I])}catch(N){console.error(N)}return this._stringRangesToCellRanges(k,M,D),k}_stringRangesToCellRanges(g,b,A){let M=0,D=!1,T=0,k=g[M];if(k){for(let R=A;R<this._bufferService.cols;R++){const N=b.getWidth(R),I=b.getString(R).length||_.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,b){let A=!1;for(let M=0;M<g.length;M++){const D=g[M];if(A){if(b[1]<=D[0])return g[M-1][1]=b[1],g;if(b[1]<=D[1])return g[M-1][1]=Math.max(b[1],D[1]),g.splice(M,1),g;g.splice(M,1),M--}else{if(b[1]<=D[0])return g.splice(M,0,b),g;if(b[1]<=D[1])return D[0]=Math.min(b[0],D[0]),g;b[0]<D[1]&&(D[0]=Math.min(b[0],D[0]),A=!0)}}return A?g[g.length-1][1]=b[1]:g.push(b),g}};a.CharacterJoinerService=y=h([m(0,E.IBufferService)],y)},5114:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=c(844),m=c(8460),u=c(3656);class _ extends h.Disposable{constructor(x,y,S){super(),this._textarea=x,this._window=y,this.mainDocument=S,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((g=>this._screenDprMonitor.setWindow(g)))),this.register((0,m.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=_;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new m.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 m extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const w=this.linkProviders.indexOf(_);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=m},8934:function(f,a,c){var h=this&&this.__decorate||function(E,x,y,S){var g,b=arguments.length,A=b<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(E,x,y,S);else for(var M=E.length-1;M>=0;M--)(g=E[M])&&(A=(b<3?g(A):b>3?g(x,y,A):g(x,y))||A);return b>3&&A&&Object.defineProperty(x,y,A),A},m=this&&this.__param||function(E,x){return function(y,S){x(y,S,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const u=c(4725),_=c(9806);let w=a.MouseService=class{constructor(E,x){this._renderService=E,this._charSizeService=x}getCoords(E,x,y,S,g){return(0,_.getCoords)(window,E,x,y,S,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,g)}getMouseReportCoords(E,x){const y=(0,_.getCoordsRelativeToElement)(window,E,x);if(this._charSizeService.hasValidSize)return y[0]=Math.min(Math.max(y[0],0),this._renderService.dimensions.css.canvas.width-1),y[1]=Math.min(Math.max(y[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(y[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(y[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(y[0]),y:Math.floor(y[1])}}};a.MouseService=w=h([m(0,u.IRenderService),m(1,u.ICharSizeService)],w)},3230:function(f,a,c){var h=this&&this.__decorate||function(g,b,A,M){var D,T=arguments.length,k=T<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,b,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(b,A,k):D(b,A))||k);return T>3&&k&&Object.defineProperty(b,A,k),k},m=this&&this.__param||function(g,b){return function(A,M){b(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const u=c(6193),_=c(4725),w=c(8460),E=c(844),x=c(7226),y=c(2585);let S=a.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,b,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,b),this.register(k.onWindowChange((N=>this._registerIntersectionObserver(N,b))))}_registerIntersectionObserver(g,b){if("IntersectionObserver"in g){const A=new g.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});A.observe(b),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,b,A=!1){this._isPaused?this._needsFullRefresh=!0:(A||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(g,b,this._rowCount))}_renderRows(g,b){this._renderer.value&&(g=Math.min(g,this._rowCount-1),b=Math.min(b,this._rowCount-1),this._renderer.value.renderRows(g,b),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:b}),this._onRender.fire({start:g,end:b}),this._isNextRenderRedrawOnly=!0)}resize(g,b){this._rowCount=b,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((b=>this.refreshRows(b.start,b.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,b;this._renderer.value&&((b=(g=this._renderer.value).clearTextureAtlas)==null||b.call(g),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(g,b){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var A;return(A=this._renderer.value)==null?void 0:A.handleResize(g,b)})):this._renderer.value.handleResize(g,b),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,b,A){var M;this._selectionState.start=g,this._selectionState.end=b,this._selectionState.columnSelectMode=A,(M=this._renderer.value)==null||M.handleSelectionChanged(g,b,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([m(2,y.IOptionsService),m(3,_.ICharSizeService),m(4,y.IDecorationService),m(5,y.IBufferService),m(6,_.ICoreBrowserService),m(7,_.IThemeService)],S)},9312:function(f,a,c){var h=this&&this.__decorate||function(k,R,N,I){var P,F=arguments.length,K=F<3?R:I===null?I=Object.getOwnPropertyDescriptor(R,N):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(k,R,N,I);else for(var W=k.length-1;W>=0;W--)(P=k[W])&&(K=(F<3?P(K):F>3?P(R,N,K):P(R,N))||K);return F>3&&K&&Object.defineProperty(R,N,K),K},m=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),_=c(9504),w=c(456),E=c(4725),x=c(8460),y=c(844),S=c(6114),g=c(4841),b=c(511),A=c(2585),M=" ",D=new RegExp(M,"g");let T=a.SelectionService=class extends y.Disposable{constructor(k,R,N,I,P,F,K,W,V){super(),this._element=k,this._screenElement=R,this._linkifier=N,this._bufferService=I,this._coreService=P,this._mouseService=F,this._optionsService=K,this._renderService=W,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new b.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,y.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const 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 K=k[1];K<=R[1];K++){const W=N.translateBufferLineToString(K,!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 K=N.lines.get(F),W=N.translateBufferLineToString(F,!0);K!=null&&K.isWrapped?I[I.length-1]+=W:I.push(W)}if(k[1]!==R[1]){const F=N.lines.get(R[1]),K=N.translateBufferLineToString(R[1],!0,0,R[0]);F&&F.isWrapped?I[I.length-1]+=K:I.push(K)}}return I.map((P=>P.replace(D," "))).join(S.isWindows?`\r
|
|
56
|
-
`:`
|
|
57
|
-
`)}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,_.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 K=P.translateBufferLineToString(k[1],!1);let W=this._convertViewportColToCharacterIndex(F,k[0]),V=W;const $=k[0]-W;let ee=0,H=0,B=0,z=0;if(K.charAt(W)===" "){for(;W>0&&K.charAt(W-1)===" ";)W--;for(;V<K.length&&K.charAt(V+1)===" ";)V++}else{let te=k[0],he=k[0];F.getWidth(te)===0&&(ee++,te--),F.getWidth(he)===2&&(H++,he++);const me=F.getString(he).length;for(me>1&&(z+=me-1,V+=me-1);te>0&&W>0&&!this._isCharWordSeparator(F.loadCell(te-1,this._workCell));){F.loadCell(te-1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,te--):Y>1&&(B+=Y-1,W-=Y-1),W--,te--}for(;he<F.length&&V+1<K.length&&!this._isCharWordSeparator(F.loadCell(he+1,this._workCell));){F.loadCell(he+1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,he++):Y>1&&(z+=Y-1,V+=Y-1),V++,he++}}V++;let G=W+$-ee+B,j=Math.min(this._bufferService.cols,V-W+ee+H-B-z);if(R||K.slice(W,V).trim()!==""){if(N&&G===0&&F.getCodePoint(0)!==32){const te=P.lines.get(k[1]-1);if(te&&F.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,k[1]-1],!1,!0,!1);if(he){const me=this._bufferService.cols-he.start;G-=me,j+=me}}}if(I&&G+j===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const te=P.lines.get(k[1]+1);if(te!=null&&te.isWrapped&&te.getCodePoint(0)!==32){const he=this._getWordAt([0,k[1]+1],!1,!1,!0);he&&(j+=he.length)}}return{start:G,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([m(3,A.IBufferService),m(4,A.ICoreService),m(5,E.IMouseService),m(6,A.IOptionsService),m(7,E.IRenderService),m(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 K=T.length-1;K>=0;K--)(I=T[K])&&(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},m=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),_=c(8055),w=c(8460),E=c(844),x=c(2585),y=_.css.toColor("#ffffff"),S=_.css.toColor("#000000"),g=_.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=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.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:_.channels.toCss(N,I,P),rgba:_.channels.toRgba(N,I,P)})}for(let R=0;R<24;R++){const N=8+10*R;T.push({css:_.channels.toCss(N,N,N),rgba:_.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:y,background:S,cursor:g,cursorAccent:b,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:_.color.blend(S,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:_.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,y),k.background=D(T.background,S),k.cursor=D(T.cursor,g),k.cursorAccent=D(T.cursorAccent,b),k.selectionBackgroundTransparent=D(T.selectionBackground,A),k.selectionBackgroundOpaque=_.color.blend(k.background,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundTransparent=D(T.selectionInactiveBackground,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundOpaque=_.color.blend(k.background,k.selectionInactiveBackgroundTransparent),k.selectionForeground=T.selectionForeground?D(T.selectionForeground,_.NULL_COLOR):void 0,k.selectionForeground===_.NULL_COLOR&&(k.selectionForeground=void 0),_.color.isOpaque(k.selectionBackgroundTransparent)&&(k.selectionBackgroundTransparent=_.color.opacity(k.selectionBackgroundTransparent,.3)),_.color.isOpaque(k.selectionInactiveBackgroundTransparent)&&(k.selectionInactiveBackgroundTransparent=_.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 _.css.toColor(T)}catch{}return k}a.ThemeService=M=h([m(0,x.IOptionsService)],M)},6349:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=c(8460),m=c(844);class u extends m.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 y=w;y<this._length-E;y++)this._array[this._getCyclicIndex(y)]=this._array[this._getCyclicIndex(y+E)];this._length-=E,this.onDeleteEmitter.fire({index:w,amount:E})}for(let y=this._length-1;y>=w;y--)this._array[this._getCyclicIndex(y+x.length)]=this._array[this._getCyclicIndex(y)];for(let y=0;y<x.length;y++)this._array[this._getCyclicIndex(w+y)]=x[y];if(x.length&&this.onInsertEmitter.fire({index:w,amount:x.length}),this._length+x.length>this._maxLength){const y=this._length+x.length-this._maxLength;this._startIndex+=y,this._length=this._maxLength,this.onTrimEmitter.fire(y)}else this._length+=x.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,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 y=w+E+x-this._length;if(y>0)for(this._length+=y;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let y=0;y<E;y++)this.set(w+y+x,this.get(w+y))}}_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,m=5){if(typeof h!="object")return h;const u=Array.isArray(h)?[]:{};for(const _ in h)u[_]=m<=1?h[_]:h[_]&&c(h[_],m-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,m=0,u=0;var _,w,E,x,y;function S(b){const A=b.toString(16);return A.length<2?"0"+A:A}function g(b,A){return b<A?(A+.05)/(b+.05):(b+.05)/(A+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(b){b.toCss=function(A,M,D,T){return T!==void 0?`#${S(A)}${S(M)}${S(D)}${S(T)}`:`#${S(A)}${S(M)}${S(D)}`},b.toRgba=function(A,M,D,T=255){return(A<<24|M<<16|D<<8|T)>>>0},b.toColor=function(A,M,D,T){return{css:b.toCss(A,M,D,T),rgba:b.toRgba(A,M,D,T)}}})(_||(a.channels=_={})),(function(b){function A(M,D){return u=Math.round(255*D),[c,h,m]=y.toChannels(M.rgba),{css:_.toCss(c,h,m,u),rgba:_.toRgba(c,h,m,u)}}b.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),m=P+Math.round((R-P)*u),{css:_.toCss(c,h,m),rgba:_.toRgba(c,h,m)}},b.isOpaque=function(M){return(255&M.rgba)==255},b.ensureContrastRatio=function(M,D,T){const k=y.ensureContrastRatio(M.rgba,D.rgba,T);if(k)return _.toColor(k>>24&255,k>>16&255,k>>8&255)},b.opaque=function(M){const D=(255|M.rgba)>>>0;return[c,h,m]=y.toChannels(D),{css:_.toCss(c,h,m),rgba:D}},b.opacity=A,b.multiplyOpacity=function(M,D){return u=255&M.rgba,A(M,u*D/255)},b.toColorRGB=function(M){return[M.rgba>>24&255,M.rgba>>16&255,M.rgba>>8&255]}})(w||(a.color=w={})),(function(b){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{}b.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),m=parseInt(D.slice(3,4).repeat(2),16),_.toColor(c,h,m);case 5:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),_.toColor(c,h,m,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]),m=parseInt(T[3]),u=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),_.toColor(c,h,m,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,m,u]=A.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,h,m,u),css:D}}})(E||(a.css=E={})),(function(b){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))}b.relativeLuminance=function(M){return A(M>>16&255,M>>8&255,255&M)},b.relativeLuminance2=A})(x||(a.rgb=x={})),(function(b){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,K=T>>8&255,W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));for(;W<k&&(P>0||F>0||K>0);)P-=Math.max(0,Math.ceil(.1*P)),F-=Math.max(0,Math.ceil(.1*F)),K-=Math.max(0,Math.ceil(.1*K)),W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|K<<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,K=T>>8&255,W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));for(;W<k&&(P<255||F<255||K<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),F=Math.min(255,F+Math.ceil(.1*(255-F))),K=Math.min(255,K+Math.ceil(.1*(255-K))),W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|K<<8|255)>>>0}b.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),m=F+Math.round((N-F)*u),_.toRgba(c,h,m)},b.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),K=g(R,x.relativeLuminance(F>>8));if(K<k){const W=M(D,T,k);return K>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}},b.reduceLuminance=A,b.increaseLuminance=M,b.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(y||(a.rgba=y={})),a.toPaddedHex=S,a.contrastRatio=g},8969:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=c(844),m=c(2585),u=c(4348),_=c(7866),w=c(744),E=c(7302),x=c(6975),y=c(8460),S=c(1753),g=c(1480),b=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 y.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 y.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new y.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new y.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new y.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new y.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new E.OptionsService(I)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(S.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(g.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(b.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new M.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,y.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,y.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,y.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,y.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((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,y.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,P){this._writeBuffer.write(I,P)}writeSync(I,P){this._logService.logLevel<=m.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 m=[];for(let u=0;u<this._listeners.length;u++)m.push(this._listeners[u]);for(let u=0;u<m.length;u++)m[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((m=>h.fire(m)))},a.runAndSubscribe=function(c,h){return h(void 0),c((m=>h(m)))}},5435:function(f,a,c){var h=this&&this.__decorate||function(ee,H,B,z){var G,j=arguments.length,te=j<3?H:z===null?z=Object.getOwnPropertyDescriptor(H,B):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(ee,H,B,z);else for(var he=ee.length-1;he>=0;he--)(G=ee[he])&&(te=(j<3?G(te):j>3?G(H,B,te):G(H,B))||te);return j>3&&te&&Object.defineProperty(H,B,te),te},m=this&&this.__param||function(ee,H){return function(B,z){H(B,z,ee)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const u=c(2584),_=c(7116),w=c(2015),E=c(844),x=c(482),y=c(8437),S=c(8460),g=c(643),b=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(ee,H){if(ee>24)return H.setWinLines||!1;switch(ee){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(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(a.WindowsOptionsReportType=F={}));let K=0;class W extends E.Disposable{getAttrData(){return this._curAttrData}constructor(H,B,z,G,j,te,he,me,Y=new w.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=B,this._coreService=z,this._logService=G,this._optionsService=j,this._oscLinkService=te,this._coreMouseService=he,this._unicodeService=me,this._parser=Y,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new b.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new 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 V(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:oe.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,oe,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:oe,data:Z})})),this._parser.setDcsHandlerFallback(((q,oe,Z)=>{oe==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:oe,payload:Z})})),this._parser.setPrintHandler(((q,oe,Z)=>this.print(q,oe,Z))),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 _.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,oe)=>this.requestStatusString(q,oe))))}_preserveStack(H,B,z,G){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=z,this._parseStack.position=G}_logSlowResolvingAsync(H){this._logService.logLevel<=M.LogLevelEnum.WARN&&Promise.race([H,new Promise(((B,z)=>setTimeout((()=>z("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(H,B){let z,G=this._activeBuffer.x,j=this._activeBuffer.y,te=0;const he=this._parseStack.paused;if(he){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(z),z;G=this._parseStack.cursorStartX,j=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>I&&(te=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))),he||this._dirtyRowTracker.clearRange(),H.length>I)for(let q=te;q<H.length;q+=I){const oe=q+I<H.length?q+I:H.length,Z=typeof H=="string"?this._stringDecoder.decode(H.substring(q,oe),this._parseBuffer):this._utf8Decoder.decode(H.subarray(q,oe),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,Z))return this._preserveStack(G,j,Z,q),this._logSlowResolvingAsync(z),z}else if(!he){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(G,j,q,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===G&&this._activeBuffer.y===j||this._onCursorMove.fire();const me=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Y=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Y<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Y,this._bufferService.rows-1),Math.min(me,this._bufferService.rows-1))}print(H,B,z){let G,j;const te=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,me=this._bufferService.cols,Y=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,oe=this._curAttrData;let Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-B>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let ie=this._parser.precedingJoinState;for(let de=B;de<z;++de){if(G=H[de],G<127&&te){const at=te[String.fromCharCode(G)];at&&(G=at.charCodeAt(0))}const Ce=this._unicodeService.charProperties(G,ie);j=D.UnicodeService.extractWidth(Ce);const we=D.UnicodeService.extractShouldJoin(Ce),$e=we?D.UnicodeService.extractWidth(ie):0;if(ie=Ce,he&&this._onA11yChar.fire((0,x.stringFromCodePoint)(G)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+j-$e>me){if(Y){const at=Z;let Re=this._activeBuffer.x-$e;for(this._activeBuffer.x=$e,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),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),$e>0&&Z instanceof y.BufferLine&&Z.copyCellsFrom(at,Re,0,$e,!1);Re<me;)at.setCellFromCodepoint(Re++,0,1,oe)}else if(this._activeBuffer.x=me-1,j===2)continue}if(we&&this._activeBuffer.x){const at=Z.getWidth(this._activeBuffer.x-1)?1:2;Z.addCodepointToCell(this._activeBuffer.x-at,G,j);for(let Re=j-$e;--Re>=0;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(q&&(Z.insertCells(this._activeBuffer.x,j-$e,this._activeBuffer.getNullCell(oe)),Z.getWidth(me-1)===2&&Z.setCellFromCodepoint(me-1,g.NULL_CELL_CODE,g.NULL_CELL_WIDTH,oe)),Z.setCellFromCodepoint(this._activeBuffer.x++,G,j,oe),j>0)for(;--j;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=ie,this._activeBuffer.x<me&&z-B>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,B){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,B):this._parser.registerCsiHandler(H,(z=>!P(z.params[0],this._optionsService.rawOptions.windowOptions)||B(z)))}registerDcsHandler(H,B){return this._parser.registerDcsHandler(H,new k.DcsHandler(B))}registerEscHandler(H,B){return this._parser.registerEscHandler(H,B)}registerOscHandler(H,B){return this._parser.registerOscHandler(H,new T.OscHandler(B))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var 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 B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const 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,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=H,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+B)}cursorUp(H){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,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 B=H.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=H.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=H.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const B=H.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,B,z,G=!1,j=!1){const te=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);te.replaceCells(B,z,this._activeBuffer.getNullCell(this._eraseAttrData()),j),G&&(te.isWrapped=!1)}_resetBufferLine(H,B=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),z.isWrapped=!1)}eraseInDisplay(H,B=!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,B);z<this._bufferService.rows;z++)this._resetBufferLine(z,B);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,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,B);this._dirtyRowTracker.markDirty(0);break;case 3:const G=this._activeBuffer.lines.length-this._bufferService.rows;G>0&&(this._activeBuffer.lines.trimStart(G),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-G,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-G,0),this._onScroll.fire(0))}return!0}eraseInLine(H,B=!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,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(H){this._restrictCursor();let B=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,G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-G+1;for(;B--;)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 B=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 G;for(G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-G;B--;)this._activeBuffer.lines.splice(z,1),this._activeBuffer.lines.splice(G,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 B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.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 B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(H){let B=H.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(H){let B=H.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(y.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 B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),G.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 B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),G.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 B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),G.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 B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(H){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.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 B=this._parser.precedingJoinState;if(!B)return!0;const z=H.params[0]||1,G=D.UnicodeService.extractWidth(B),j=this._activeBuffer.x-G,te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(j),he=new Uint32Array(te.length*z);let me=0;for(let q=0;q<te.length;){const oe=te.codePointAt(q)||0;he[me++]=oe,q+=oe>65535?2:1}let Y=me;for(let q=1;q<z;++q)he.copyWithin(Y,0,me),Y+=me;return this.print(he,0,Y),!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 B=0;B<H.length;B++)switch(H.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.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 B=0;B<H.length;B++)switch(H.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),H.params[B]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(H,B){const z=this._coreService.decPrivateModes,{activeProtocol:G,activeEncoding:j}=this._coreMouseService,te=this._coreService,{buffers:he,cols:me}=this._bufferService,{active:Y,alt:q}=he,oe=this._optionsService.rawOptions,Z=we=>we?1:2,ie=H.params[0];return de=ie,Ce=B?ie===2?4:ie===4?Z(te.modes.insertMode):ie===12?3:ie===20?Z(oe.convertEol):0:ie===1?Z(z.applicationCursorKeys):ie===3?oe.windowOptions.setWinLines?me===80?2:me===132?1:0:0:ie===6?Z(z.origin):ie===7?Z(z.wraparound):ie===8?3:ie===9?Z(G==="X10"):ie===12?Z(oe.cursorBlink):ie===25?Z(!te.isCursorHidden):ie===45?Z(z.reverseWraparound):ie===66?Z(z.applicationKeypad):ie===67?4:ie===1e3?Z(G==="VT200"):ie===1002?Z(G==="DRAG"):ie===1003?Z(G==="ANY"):ie===1004?Z(z.sendFocus):ie===1005?4:ie===1006?Z(j==="SGR"):ie===1015?4:ie===1016?Z(j==="SGR_PIXELS"):ie===1048?1:ie===47||ie===1047||ie===1049?Z(Y===q):ie===2004?Z(z.bracketedPasteMode):0,te.triggerDataEvent(`${u.C0.ESC}[${B?"":"?"}${de};${Ce}$y`),!0;var de,Ce}_updateAttrColor(H,B,z,G,j){return B===2?(H|=50331648,H&=-16777216,H|=A.AttributeData.fromColorRGB([z,G,j])):B===5&&(H&=-50331904,H|=33554432|255&z),H}_extractColor(H,B,z){const G=[0,0,-1,0,0,0];let j=0,te=0;do{if(G[te+j]=H.params[B+te],H.hasSubParams(B+te)){const he=H.getSubParams(B+te);let me=0;do G[1]===5&&(j=1),G[te+me+1+j]=he[me];while(++me<he.length&&me+te+1+j<G.length);break}if(G[1]===5&&te+j>=2||G[1]===2&&te+j>=5)break;G[1]&&(j=1)}while(++te+B<H.length&&te+j<G.length);for(let he=2;he<G.length;++he)G[he]===-1&&(G[he]=0);switch(G[0]){case 38:z.fg=this._updateAttrColor(z.fg,G[1],G[3],G[4],G[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,G[1],G[3],G[4],G[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,G[1],G[3],G[4],G[5])}return te}_processUnderline(H,B){B.extended=B.extended.clone(),(!~H||H>5)&&(H=1),B.extended.underlineStyle=H,B.fg|=268435456,H===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(H){H.fg=y.DEFAULT_ATTR_DATA.fg,H.bg=y.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 B=H.length;let z;const G=this._curAttrData;for(let j=0;j<B;j++)z=H.params[j],z>=30&&z<=37?(G.fg&=-50331904,G.fg|=16777216|z-30):z>=40&&z<=47?(G.bg&=-50331904,G.bg|=16777216|z-40):z>=90&&z<=97?(G.fg&=-50331904,G.fg|=16777224|z-90):z>=100&&z<=107?(G.bg&=-50331904,G.bg|=16777224|z-100):z===0?this._processSGR0(G):z===1?G.fg|=134217728:z===3?G.bg|=67108864:z===4?(G.fg|=268435456,this._processUnderline(H.hasSubParams(j)?H.getSubParams(j)[0]:1,G)):z===5?G.fg|=536870912:z===7?G.fg|=67108864:z===8?G.fg|=1073741824:z===9?G.fg|=2147483648:z===2?G.bg|=134217728:z===21?this._processUnderline(2,G):z===22?(G.fg&=-134217729,G.bg&=-134217729):z===23?G.bg&=-67108865:z===24?(G.fg&=-268435457,this._processUnderline(0,G)):z===25?G.fg&=-536870913:z===27?G.fg&=-67108865:z===28?G.fg&=-1073741825:z===29?G.fg&=2147483647:z===39?(G.fg&=-67108864,G.fg|=16777215&y.DEFAULT_ATTR_DATA.fg):z===49?(G.bg&=-67108864,G.bg|=16777215&y.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?j+=this._extractColor(H,j,G):z===53?G.bg|=1073741824:z===55?G.bg&=-1073741825:z===59?(G.extended=G.extended.clone(),G.extended.underlineColor=-1,G.updateExtended()):z===100?(G.fg&=-67108864,G.fg|=16777215&y.DEFAULT_ATTR_DATA.fg,G.bg&=-67108864,G.bg|=16777215&y.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 B=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${B};${z}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const B=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${B};${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=y.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(H){const B=H.params[0]||1;switch(B){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const z=B%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(H){const B=H.params[0]||1;let z;return(H.length<2||(z=H.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>B&&(this._activeBuffer.scrollTop=B-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 B=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:B!==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:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(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 B=[],z=H.split(";");for(;z.length>1;){const G=z.shift(),j=z.shift();if(/^\d+$/.exec(G)){const te=parseInt(G);if($(te))if(j==="?")B.push({type:0,index:te});else{const he=(0,R.parseColor)(j);he&&B.push({type:1,index:te,color:he})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(H){const B=H.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(H,B){this._getCurrentLinkId()&&this._finishHyperlink();const z=H.split(":");let G;const j=z.findIndex((te=>te.startsWith("id=")));return j!==-1&&(G=z[j].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:G,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(H,B){const z=H.split(";");for(let G=0;G<z.length&&!(B>=this._specialColors.length);++G,++B)if(z[G]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const j=(0,R.parseColor)(z[G]);j&&this._onColor.fire([{type:1,index:this._specialColors[B],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 B=[],z=H.split(";");for(let G=0;G<z.length;++G)if(/^\d+$/.exec(z[G])){const j=parseInt(z[G]);$(j)&&B.push({type:2,index:j})}return B.length&&this._onColor.fire(B),!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,_.DEFAULT_CHARSET),!0}selectCharset(H){return H.length!==2?(this.selectDefaultCharset(),!0):(H[0]==="/"||this._charsetService.setgCharset(N[H[0]],_.CHARSETS[H[1]]||_.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=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){const H=new b.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const z=this._activeBuffer.ybase+this._activeBuffer.y+B,G=this._activeBuffer.lines.get(z);G&&(G.fill(H),G.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(H,B){const z=this._bufferService.buffer,G=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}[G.cursorStyle]-(G.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,B){this._dirtyRowTracker.markRangeDirty(H,B)}}a.InputHandler=W;let V=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){ee<this.start?this.start=ee:ee>this.end&&(this.end=ee)}markRangeDirty(ee,H){ee>H&&(K=ee,ee=H,H=K),ee<this.start&&(this.start=ee),H>this.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function $(ee){return 0<=ee&&ee<256}V=h([m(0,M.IBufferService)],V)},844:(f,a)=>{function c(h){for(const m of h)m.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 m=this._disposables.indexOf(h);m!==-1&&this._disposables.splice(m,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var m;this._isDisposed||h===this._value||((m=this._value)==null||m.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(m,u,_){this._data[m]||(this._data[m]={}),this._data[m][u]=_}get(m,u){return this._data[m]?this._data[m][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(h,m,u,_,w){this._data.get(h,m)||this._data.set(h,m,new c),this._data.get(h,m).set(u,_,w)}get(h,m,u,_){var w;return(w=this._data.get(h,m))==null?void 0:w.get(u,_)}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 m=c.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[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 m=this._getKey(h);if(m===void 0||(c=this._search(m),c===-1)||this._getKey(this._array[c])!==m)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])===m);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,m){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do m(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let m=0,u=this._array.length-1;for(;u>=m;){let _=m+u>>1;const w=this._getKey(this._array[_]);if(w>h)u=_-1;else{if(!(w<h)){for(;_>0&&this._getKey(this._array[_-1])===h;)_--;return _}m=_+1}}return m}}},7226:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=c(6114);class m{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,y=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 y-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(y-E))}ms`),void this._start();y=S}this.clear()}}class u extends m{_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 m{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}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(m){const u=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),_=u==null?void 0:u.get(m.cols-1),w=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);w&&_&&(w.isWrapped=_[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&_[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,_=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=_}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),m=c(7226),u=c(3734),_=c(8437),w=c(4634),E=c(511),x=c(643),y=c(4863),S=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(g,b,A){this._hasScrollback=g,this._optionsService=b,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=_.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 m.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,b){return new _.BufferLine(this._bufferService.cols,this.getNullCell(g),b)}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 b=g+this._optionsService.rawOptions.scrollback;return b>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:b}fillViewportRows(g){if(this.lines.length===0){g===void 0&&(g=_.DEFAULT_ATTR_DATA);let b=this._rows;for(;b--;)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,b){const A=this.getNullCell(_.DEFAULT_ATTR_DATA);let M=0;const D=this._getCorrectBufferLength(b);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<b)for(let k=this._rows;k<b;k++)this.lines.length<b+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new _.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 _.BufferLine(g,A)));else for(let k=this._rows;k>b;k--)this.lines.length>b+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,b-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,g-1),this.scrollTop=0}if(this.scrollBottom=b-1,this._isReflowEnabled&&(this._reflow(g,b),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=b,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 b=0;for(;this._memoryCleanupPosition<this.lines.length;)if(b+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),b>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,b){this._cols!==g&&(g>this._cols?this._reflowLarger(g,b):this._reflowSmaller(g,b))}_reflowLarger(g,b){const A=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(_.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,b,M.countRemoved)}}_reflowLargerAdjustViewport(g,b,A){const M=this.getNullCell(_.DEFAULT_ATTR_DATA);let D=A;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<b&&this.lines.push(new _.BufferLine(g,M))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(g,b){const A=this.getNullCell(_.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 K;K=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 G=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);W.push(G)}W.length>0&&(M.push({start:T+R.length+D,newLines:W}),D+=W.length),R.push(...W);let V=P.length-1,$=P[V];$===0&&(V--,$=P[V]);let ee=R.length-F-1,H=I;for(;ee>=0;){const z=Math.min(H,$);if(R[V]===void 0)break;if(R[V].copyCellsFrom(R[ee],H-z,$-z,z,!0),$-=z,$===0&&(V--,$=P[V]),H-=z,H===0){ee--;const G=Math.max(ee,0);H=(0,w.getWrappedLineTrimmedLength)(R,G,this._cols)}}for(let z=0;z<R.length;z++)P[z]<g&&R[z].setCell(P[z],A);let B=F-K;for(;B-- >0;)this.ybase===0?this.y<b-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+D)-b&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+F,this.ybase+b-1)}if(M.length>0){const T=[],k=[];for(let V=0;V<this.lines.length;V++)k.push(this.lines.get(V));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 V=Math.min(this.lines.maxLength-1,R+D-1);V>=0;V--)if(P&&P.start>N+F){for(let $=P.newLines.length-1;$>=0;$--)this.lines.set(V--,P.newLines[$]);V++,T.push({index:N+1,amount:P.newLines.length}),F+=P.newLines.length,P=M[++I]}else this.lines.set(V,k[N--]);let K=0;for(let V=T.length-1;V>=0;V--)T[V].index+=K,this.lines.onInsertEmitter.fire(T[V]),K+=T[V].amount;const W=Math.max(0,R+D-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(g,b,A=0,M){const D=this.lines.get(g);return D?D.translateToString(b,A,M):""}getWrappedRangeForLine(g){let b=g,A=g;for(;b>0&&this.lines.get(b).isWrapped;)b--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:b,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 b=0;b<this.markers.length;b++)this.markers[b].line===g&&(this.markers[b].dispose(),this.markers.splice(b--,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 b=new y.Marker(g);return this.markers.push(b),b.register(this.lines.onTrim((A=>{b.line-=A,b.line<0&&b.dispose()}))),b.register(this.lines.onInsert((A=>{b.line>=A.index&&(b.line+=A.amount)}))),b.register(this.lines.onDelete((A=>{b.line>=A.index&&b.line<A.index+A.amount&&b.dispose(),b.line>A.index&&(b.line-=A.amount)}))),b.register(b.onDispose((()=>this._removeMarker(b)))),b}_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),m=c(511),u=c(643),_=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class E{constructor(y,S,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*y);const b=S||m.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let A=0;A<y;++A)this.setCell(A,b);this.length=y}get(y){const S=this._data[3*y+0],g=2097151&S;return[this._data[3*y+1],2097152&S?this._combined[y]:g?(0,_.stringFromCodePoint)(g):"",S>>22,2097152&S?this._combined[y].charCodeAt(this._combined[y].length-1):g]}set(y,S){this._data[3*y+1]=S[u.CHAR_DATA_ATTR_INDEX],S[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[y]=S[1],this._data[3*y+0]=2097152|y|S[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*y+0]=S[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(y){return this._data[3*y+0]>>22}hasWidth(y){return 12582912&this._data[3*y+0]}getFg(y){return this._data[3*y+1]}getBg(y){return this._data[3*y+2]}hasContent(y){return 4194303&this._data[3*y+0]}getCodePoint(y){const S=this._data[3*y+0];return 2097152&S?this._combined[y].charCodeAt(this._combined[y].length-1):2097151&S}isCombined(y){return 2097152&this._data[3*y+0]}getString(y){const S=this._data[3*y+0];return 2097152&S?this._combined[y]:2097151&S?(0,_.stringFromCodePoint)(2097151&S):""}isProtected(y){return 536870912&this._data[3*y+2]}loadCell(y,S){return w=3*y,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[y]),268435456&S.bg&&(S.extended=this._extendedAttrs[y]),S}setCell(y,S){2097152&S.content&&(this._combined[y]=S.combinedData),268435456&S.bg&&(this._extendedAttrs[y]=S.extended),this._data[3*y+0]=S.content,this._data[3*y+1]=S.fg,this._data[3*y+2]=S.bg}setCellFromCodepoint(y,S,g,b){268435456&b.bg&&(this._extendedAttrs[y]=b.extended),this._data[3*y+0]=S|g<<22,this._data[3*y+1]=b.fg,this._data[3*y+2]=b.bg}addCodepointToCell(y,S,g){let b=this._data[3*y+0];2097152&b?this._combined[y]+=(0,_.stringFromCodePoint)(S):2097151&b?(this._combined[y]=(0,_.stringFromCodePoint)(2097151&b)+(0,_.stringFromCodePoint)(S),b&=-2097152,b|=2097152):b=S|4194304,g&&(b&=-12582913,b|=g<<22),this._data[3*y+0]=b}insertCells(y,S,g){if((y%=this.length)&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),S<this.length-y){const b=new m.CellData;for(let A=this.length-y-S-1;A>=0;--A)this.setCell(y+S+A,this.loadCell(y+A,b));for(let A=0;A<S;++A)this.setCell(y+A,g)}else for(let b=y;b<this.length;++b)this.setCell(b,g);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,g)}deleteCells(y,S,g){if(y%=this.length,S<this.length-y){const b=new m.CellData;for(let A=0;A<this.length-y-S;++A)this.setCell(y+A,this.loadCell(y+S+A,b));for(let A=this.length-S;A<this.length;++A)this.setCell(A,g)}else for(let b=y;b<this.length;++b)this.setCell(b,g);y&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),this.getWidth(y)!==0||this.hasContent(y)||this.setCellFromCodepoint(y,0,1,g)}replaceCells(y,S,g,b=!1){if(b)for(y&&this.getWidth(y-1)===2&&!this.isProtected(y-1)&&this.setCellFromCodepoint(y-1,0,1,g),S<this.length&&this.getWidth(S-1)===2&&!this.isProtected(S)&&this.setCellFromCodepoint(S,0,1,g);y<S&&y<this.length;)this.isProtected(y)||this.setCell(y,g),y++;else for(y&&this.getWidth(y-1)===2&&this.setCellFromCodepoint(y-1,0,1,g),S<this.length&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S,0,1,g);y<S&&y<this.length;)this.setCell(y++,g)}resize(y,S){if(y===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const g=3*y;if(y>this.length){if(this._data.buffer.byteLength>=4*g)this._data=new Uint32Array(this._data.buffer,0,g);else{const b=new Uint32Array(g);b.set(this._data),this._data=b}for(let b=this.length;b<y;++b)this.setCell(b,S)}else{this._data=this._data.subarray(0,g);const b=Object.keys(this._combined);for(let M=0;M<b.length;M++){const D=parseInt(b[M],10);D>=y&&delete this._combined[D]}const A=Object.keys(this._extendedAttrs);for(let M=0;M<A.length;M++){const D=parseInt(A[M],10);D>=y&&delete this._extendedAttrs[D]}}return this.length=y,4*g*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const y=new Uint32Array(this._data.length);return y.set(this._data),this._data=y,1}return 0}fill(y,S=!1){if(S)for(let g=0;g<this.length;++g)this.isProtected(g)||this.setCell(g,y);else{this._combined={},this._extendedAttrs={};for(let g=0;g<this.length;++g)this.setCell(g,y)}}copyFrom(y){this.length!==y.length?this._data=new Uint32Array(y._data):this._data.set(y._data),this.length=y.length,this._combined={};for(const S in y._combined)this._combined[S]=y._combined[S];this._extendedAttrs={};for(const S in y._extendedAttrs)this._extendedAttrs[S]=y._extendedAttrs[S];this.isWrapped=y.isWrapped}clone(){const y=new E(0);y._data=new Uint32Array(this._data),y.length=this.length;for(const S in this._combined)y._combined[S]=this._combined[S];for(const S in this._extendedAttrs)y._extendedAttrs[S]=this._extendedAttrs[S];return y.isWrapped=this.isWrapped,y}getTrimmedLength(){for(let y=this.length-1;y>=0;--y)if(4194303&this._data[3*y+0])return y+(this._data[3*y+0]>>22);return 0}getNoBgTrimmedLength(){for(let y=this.length-1;y>=0;--y)if(4194303&this._data[3*y+0]||50331648&this._data[3*y+2])return y+(this._data[3*y+0]>>22);return 0}copyCellsFrom(y,S,g,b,A){const M=y._data;if(A)for(let T=b-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]=y._extendedAttrs[S+T])}else for(let T=0;T<b;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]=y._extendedAttrs[S+T])}const D=Object.keys(y._combined);for(let T=0;T<D.length;T++){const k=parseInt(D[T],10);k>=S&&(this._combined[k-S+g]=y._combined[k])}}translateToString(y,S,g,b){S=S??0,g=g??this.length,y&&(g=Math.min(g,this.getTrimmedLength())),b&&(b.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,_.stringFromCodePoint)(D):u.WHITESPACE_CELL_CHAR;if(A+=T,b)for(let k=0;k<T.length;++k)b.push(S);S+=M>>22||1}return b&&b.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,m,u){if(m===h.length-1)return h[m].getTrimmedLength();const _=!h[m].hasContent(u-1)&&h[m].getWidth(u-1)===1,w=h[m+1].getWidth(0)===2;return _&&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,m,u,_,w){const E=[];for(let x=0;x<h.length-1;x++){let y=x,S=h.get(++y);if(!S.isWrapped)continue;const g=[h.get(x)];for(;y<h.length&&S.isWrapped;)g.push(S),S=h.get(++y);if(_>=x&&_<y){x+=g.length-1;continue}let b=0,A=c(g,b,m),M=1,D=0;for(;M<g.length;){const k=c(g,M,m),R=k-D,N=u-A,I=Math.min(R,N);g[b].copyCellsFrom(g[M],D,A,I,!1),A+=I,A===u&&(b++,A=0),D+=I,D===k&&(M++,D=0),A===0&&b!==0&&g[b-1].getWidth(u-1)===2&&(g[b].copyCellsFrom(g[b-1],u-1,A++,1,!1),g[b-1].setCell(u-1,w))}g[b].replaceCells(A,u,w);let T=0;for(let k=g.length-1;k>0&&(k>b||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,m){const u=[];let _=0,w=m[_],E=0;for(let x=0;x<h.length;x++)if(w===x){const y=m[++_];h.onDeleteEmitter.fire({index:x-E,amount:y}),x+=y-1,E+=y,w=m[++_]}else u.push(x);return{layout:u,countRemoved:E}},a.reflowLargerApplyNewLayout=function(h,m){const u=[];for(let _=0;_<m.length;_++)u.push(h.get(m[_]));for(let _=0;_<u.length;_++)h.set(_,u[_]);h.length=m.length},a.reflowSmallerGetNewLineLengths=function(h,m,u){const _=[],w=h.map(((S,g)=>c(h,g,m))).reduce(((S,g)=>S+g));let E=0,x=0,y=0;for(;y<w;){if(w-y<u){_.push(w-y);break}E+=u;const S=c(h,x,m);E>S&&(E-=S,x++);const g=h[x].getWidth(E-1)===2;g&&E--;const b=g?u-1:u;_.push(b),y+=b}return _},a.getWrappedLineTrimmedLength=c},5295:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=c(8460),m=c(844),u=c(9092);class _ extends m.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=_},511:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=c(482),m=c(643),u=c(3734);class _ 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 _;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[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const y=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=y&&y<=56319){const S=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=S&&S<=57343?this.content=1024*(y-55296)+S-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},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),m=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,m.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,m;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=`
|
|
58
|
-
`,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}\\`})(m||(a.C1_ESCAPED=m={}))},7399:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=c(2584),m={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,_,w,E){const x={type:0,cancel:!1,key:void 0},y=(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=_?h.C0.ESC+"OA":h.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=_?h.C0.ESC+"OD":h.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=_?h.C0.ESC+"OC":h.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=_?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;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"D",x.key===h.C0.ESC+"[1;3D"&&(x.key=h.C0.ESC+(w?"b":"[1;5D"))):x.key=_?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(u.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"C",x.key===h.C0.ESC+"[1;3C"&&(x.key=h.C0.ESC+(w?"f":"[1;5C"))):x.key=_?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(u.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"A",w||x.key!==h.C0.ESC+"[1;3A"||(x.key=h.C0.ESC+"[1;5A")):x.key=_?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(u.metaKey)break;y?(x.key=h.C0.ESC+"[1;"+(y+1)+"B",w||x.key!==h.C0.ESC+"[1;3B"||(x.key=h.C0.ESC+"[1;5B")):x.key=_?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=y?h.C0.ESC+"[3;"+(y+1)+"~":h.C0.ESC+"[3~";break;case 36:x.key=y?h.C0.ESC+"[1;"+(y+1)+"H":_?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=y?h.C0.ESC+"[1;"+(y+1)+"F":_?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=h.C0.ESC+"[5;"+(y+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=h.C0.ESC+"[6;"+(y+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=y?h.C0.ESC+"[1;"+(y+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=y?h.C0.ESC+"[1;"+(y+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=y?h.C0.ESC+"[1;"+(y+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=y?h.C0.ESC+"[1;"+(y+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=y?h.C0.ESC+"[15;"+(y+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=y?h.C0.ESC+"[17;"+(y+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=y?h.C0.ESC+"[18;"+(y+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=y?h.C0.ESC+"[19;"+(y+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=y?h.C0.ESC+"[20;"+(y+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=y?h.C0.ESC+"[21;"+(y+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=y?h.C0.ESC+"[23;"+(y+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=y?h.C0.ESC+"[24;"+(y+1)+"~":h.C0.ESC+"[24~";break;default:if(!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=m[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 b=u.ctrlKey?u.keyCode-64:u.keyCode+32;let A=String.fromCharCode(b);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 b=u.code.slice(3,4);u.shiftKey||(b=b.toLowerCase()),x.key=h.C0.ESC+b,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,m=c.length){let u="";for(let _=h;_<m;++_){let w=c[_];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 m=c.length;if(!m)return 0;let u=0,_=0;if(this._interim){const w=c.charCodeAt(_++);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=_;w<m;++w){const E=c.charCodeAt(w);if(55296<=E&&E<=56319){if(++w>=m)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 m=c.length;if(!m)return 0;let u,_,w,E,x=0,y=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>=m)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=m-4;let b=S;for(;b<m;){for(;!(!(b<g)||128&(u=c[b])||128&(_=c[b+1])||128&(w=c[b+2])||128&(E=c[b+3]));)h[x++]=u,h[x++]=_,h[x++]=w,h[x++]=E,b+=4;if(u=c[b++],u<128)h[x++]=u;else if((224&u)==192){if(b>=m)return this.interim[0]=u,x;if(_=c[b++],(192&_)!=128){b--;continue}if(y=(31&u)<<6|63&_,y<128){b--;continue}h[x++]=y}else if((240&u)==224){if(b>=m)return this.interim[0]=u,x;if(_=c[b++],(192&_)!=128){b--;continue}if(b>=m)return this.interim[0]=u,this.interim[1]=_,x;if(w=c[b++],(192&w)!=128){b--;continue}if(y=(15&u)<<12|(63&_)<<6|63&w,y<2048||y>=55296&&y<=57343||y===65279)continue;h[x++]=y}else if((248&u)==240){if(b>=m)return this.interim[0]=u,x;if(_=c[b++],(192&_)!=128){b--;continue}if(b>=m)return this.interim[0]=u,this.interim[1]=_,x;if(w=c[b++],(192&w)!=128){b--;continue}if(b>=m)return this.interim[0]=u,this.interim[1]=_,this.interim[2]=w,x;if(E=c[b++],(192&E)!=128){b--;continue}if(y=(7&u)<<18|(63&_)<<12|(63&w)<<6|63&E,y<65536||y>1114111)continue;h[x++]=y}}return x}}},225:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=c(1480),m=[[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 _;a.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let w=0;w<m.length;++w)_.fill(0,m[w][0],m[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?_[w]:(function(E,x){let y,S=0,g=x.length-1;if(E<x[0][0]||E>x[g][1])return!1;for(;g>=S;)if(y=S+g>>1,E>x[y][1])S=y+1;else{if(!(E<x[y][0]))return!0;g=y-1}return!1})(w,u)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,E){let x=this.wcwidth(w),y=x===0&&E!==0;if(y){const S=h.UnicodeService.extractWidth(E);S===0?y=!1:S>x&&(x=S)}return h.UnicodeService.createPropertyValue(0,x,y)}}},5981:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=c(8460),m=c(844);class u extends m.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 y=this._callbacks.shift();y&&y()}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 y=this._writeBuffer[this._bufferOffset],S=this._action(y,E);if(S){const b=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(b)}const g=this._callbacks[this._bufferOffset];if(g&&g(),this._bufferOffset++,this._pendingData-=y.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=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 m(u,_){const w=u.toString(16),E=w.length<2?"0"+w:w;switch(_){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 _=u.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const w=c.exec(_);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(_.indexOf("#")===0&&(_=_.slice(1),h.exec(_)&&[3,6,9,12].includes(_.length))){const w=_.length/3,E=[0,0,0];for(let x=0;x<3;++x){const y=parseInt(_.slice(w*x,w*x+w),16);E[x]=w===1?y<<4:w===2?y:w===3?y>>4:y>>8}return E}},a.toRgbString=function(u,_=16){const[w,E,x]=u;return`rgb:${m(w,_)}/${m(E,_)}/${m(x,_)}`}},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),m=c(8742),u=c(5770),_=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(E,x){this._handlers[E]===void 0&&(this._handlers[E]=[]);const y=this._handlers[E];return y.push(x),{dispose:()=>{const S=y.indexOf(x);S!==-1&&y.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=_,this._ident=0}hook(E,x){if(this.reset(),this._ident=E,this._active=this._handlers[E]||_,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(E,x,y){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(E,x,y);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(E,x,y))}unhook(E,x=!0){if(this._active.length){let y=!1,S=this._active.length-1,g=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,y=x,g=this._stack.fallThrough,this._stack.paused=!1),!g&&y===!1){for(;S>=0&&(y=this._active[S].unhook(E),y!==!0);S--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,y;S--}for(;S>=0;S--)if(y=this._active[S].unhook(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,y}else this._handlerFb(this._ident,"UNHOOK",E);this._active=_,this._ident=0}};const w=new m.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,y){this._hitLimit||(this._data+=(0,h.utf32ToString)(E,x,y),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((y=>(this._params=w,this._data="",this._hitLimit=!1,y)));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),m=c(8742),u=c(6242),_=c(6351);class w{constructor(S){this.table=new Uint8Array(S)}setDefault(S,g){this.table.fill(S<<4|g)}add(S,g,b,A){this.table[g<<8|S]=b<<4|A}addMany(S,g,b,A){for(let M=0;M<S.length;M++)this.table[g<<8|S[M]]=b<<4|A}}a.TransitionTable=w;const E=160;a.VT500_TRANSITION_TABLE=(function(){const y=new w(4095),S=Array.apply(null,Array(256)).map(((T,k)=>k)),g=(T,k)=>S.slice(T,k),b=g(32,127),A=g(0,24);A.push(25),A.push.apply(A,g(28,32));const M=g(0,14);let D;for(D in y.setDefault(1,0),y.addMany(b,0,2,0),M)y.addMany([24,26,153,154],D,3,0),y.addMany(g(128,144),D,3,0),y.addMany(g(144,152),D,3,0),y.add(156,D,0,0),y.add(27,D,11,1),y.add(157,D,4,8),y.addMany([152,158,159],D,0,7),y.add(155,D,11,3),y.add(144,D,11,9);return y.addMany(A,0,3,0),y.addMany(A,1,3,1),y.add(127,1,0,1),y.addMany(A,8,0,8),y.addMany(A,3,3,3),y.add(127,3,0,3),y.addMany(A,4,3,4),y.add(127,4,0,4),y.addMany(A,6,3,6),y.addMany(A,5,3,5),y.add(127,5,0,5),y.addMany(A,2,3,2),y.add(127,2,0,2),y.add(93,1,4,8),y.addMany(b,8,5,8),y.add(127,8,5,8),y.addMany([156,27,24,26,7],8,6,0),y.addMany(g(28,32),8,0,8),y.addMany([88,94,95],1,0,7),y.addMany(b,7,0,7),y.addMany(A,7,0,7),y.add(156,7,0,0),y.add(127,7,0,7),y.add(91,1,11,3),y.addMany(g(64,127),3,7,0),y.addMany(g(48,60),3,8,4),y.addMany([60,61,62,63],3,9,4),y.addMany(g(48,60),4,8,4),y.addMany(g(64,127),4,7,0),y.addMany([60,61,62,63],4,0,6),y.addMany(g(32,64),6,0,6),y.add(127,6,0,6),y.addMany(g(64,127),6,0,0),y.addMany(g(32,48),3,9,5),y.addMany(g(32,48),5,9,5),y.addMany(g(48,64),5,0,6),y.addMany(g(64,127),5,7,0),y.addMany(g(32,48),4,9,5),y.addMany(g(32,48),1,9,2),y.addMany(g(32,48),2,9,2),y.addMany(g(48,127),2,10,0),y.addMany(g(48,80),1,10,0),y.addMany(g(81,88),1,10,0),y.addMany([89,90,92],1,10,0),y.addMany(g(96,127),1,10,0),y.add(80,1,11,9),y.addMany(A,9,0,9),y.add(127,9,0,9),y.addMany(g(28,32),9,0,9),y.addMany(g(32,48),9,9,12),y.addMany(g(48,60),9,8,10),y.addMany([60,61,62,63],9,9,10),y.addMany(A,11,0,11),y.addMany(g(32,128),11,0,11),y.addMany(g(28,32),11,0,11),y.addMany(A,10,0,10),y.add(127,10,0,10),y.addMany(g(28,32),10,0,10),y.addMany(g(48,60),10,8,10),y.addMany([60,61,62,63],10,0,11),y.addMany(g(32,48),10,9,12),y.addMany(A,12,0,12),y.add(127,12,0,12),y.addMany(g(28,32),12,0,12),y.addMany(g(32,48),12,9,12),y.addMany(g(48,64),12,0,11),y.addMany(g(64,127),12,12,13),y.addMany(g(64,127),10,12,13),y.addMany(g(64,127),9,12,13),y.addMany(A,13,13,13),y.addMany(b,13,13,13),y.add(127,13,0,13),y.addMany([27,156,24,26],13,14,0),y.add(E,0,2,0),y.add(E,8,5,8),y.add(E,6,0,6),y.add(E,11,0,11),y.add(E,13,13,13),y})();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 m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(g,b,A)=>{},this._executeHandlerFb=g=>{},this._csiHandlerFb=(g,b)=>{},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 _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(S,g=[64,126]){let b=0;if(S.prefix){if(S.prefix.length>1)throw new Error("only one byte as prefix supported");if(b=S.prefix.charCodeAt(0),b&&60>b||b>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");b<<=8,b|=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 b<<=8,b|=A,b}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 b=this._identifier(S,[48,126]);this._escHandlers[b]===void 0&&(this._escHandlers[b]=[]);const A=this._escHandlers[b];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 b=this._identifier(S);this._csiHandlers[b]===void 0&&(this._csiHandlers[b]=[]);const A=this._csiHandlers[b];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,b,A,M){this._parseStack.state=S,this._parseStack.handlers=g,this._parseStack.handlerPos=b,this._parseStack.transition=A,this._parseStack.chunkPos=M}parse(S,g,b){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(b===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(b===!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(b===!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,b),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,b),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),m=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(_,w){this._handlers[_]===void 0&&(this._handlers[_]=[]);const E=this._handlers[_];return E.push(w),{dispose:()=>{const x=E.indexOf(w);x!==-1&&E.splice(x,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].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 _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,w,E){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(_,w,E);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(_,w,E))}start(){this.reset(),this._state=1}put(_,w,E){if(this._state!==3){if(this._state===1)for(;w<E;){const x=_[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(_,w,E)}}end(_,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,y=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,E=w,y=this._stack.fallThrough,this._stack.paused=!1),!y&&E===!1){for(;x>=0&&(E=this._active[x].end(_),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",_);this._active=u,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,w,E){this._hitLimit||(this._data+=(0,m.utf32ToString)(_,w,E),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let w=!1;if(this._hitLimit)w=!1;else if(_&&(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 _=new h;if(!u.length)return _;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)_.addSubParam(E[x]);else _.addParam(E)}return _}constructor(u=32,_=32){if(this.maxLength=u,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(_),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 _=0;_<this.length;++_){u.push(this.params[_]);const w=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];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 _=this._subParamsIdx[u]>>8,w=255&this._subParamsIdx[u];return w-_>0?this._subParams.subarray(_,w):null}getSubParamsAll(){const u={};for(let _=0;_<this.length;++_){const w=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-w>0&&(u[_]=this._subParams.slice(w,E))}return u}addDigit(u){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,E=w[_-1];w[_-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 m={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(m),h.dispose=()=>this._wrappedAddonDispose(m),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===c){h=m;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),m=c(511);a.BufferApiView=class{constructor(u,_){this._buffer=u,this.type=_}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 _=this._buffer.lines.get(u);if(_)return new h.BufferLineApiView(_)}getNullCell(){return new m.CellData}}},3785:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=c(511);a.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,u){if(!(m<0||m>=this._line.length))return u?(this._line.loadCell(m,u),u):this._line.loadCell(m,new h.CellData)}translateToString(m,u,_){return this._line.translateToString(m,u,_)}}},8285:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=c(8771),m=c(8460),u=c(844);class _ extends u.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new m.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=_},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,(m=>h(m.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((m,u)=>h(m,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(y,S,g,b){var A,M=arguments.length,D=M<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,S,g,b);else for(var T=y.length-1;T>=0;T--)(A=y[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},m=this&&this.__param||function(y,S){return function(g,b){S(g,b,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const u=c(8460),_=c(844),w=c(5295),E=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(y){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(y.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(y.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(y,this))}resize(y,S){this.cols=y,this.rows=S,this.buffers.resize(y,S),this._onResize.fire({cols:y,rows:S})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(y,S=!1){const g=this.buffer;let b;b=this._cachedBlankLine,b&&b.length===this.cols&&b.getFg(0)===y.fg&&b.getBg(0)===y.bg||(b=g.getBlankLine(y,S),this._cachedBlankLine=b),b.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(b):g.lines.push(b.clone()):g.lines.splice(M+1,0,b.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,b.clone())}this.isUserScrolling||(g.ydisp=g.ybase),this._onScroll.fire(g.ydisp)}scrollLines(y,S,g){const b=this.buffer;if(y<0){if(b.ydisp===0)return;this.isUserScrolling=!0}else y+b.ydisp>=b.ybase&&(this.isUserScrolling=!1);const A=b.ydisp;b.ydisp=Math.max(Math.min(b.ydisp+y,b.ybase),0),A!==b.ydisp&&(S||this._onScroll.fire(b.ydisp))}};a.BufferService=x=h([m(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(b,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(b,A,M,D);else for(var N=b.length-1;N>=0;N--)(T=b[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},m=this&&this.__param||function(b,A){return function(M,D){A(M,D,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const u=c(2585),_=c(8460),w=c(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:b=>b.button!==4&&b.action===1&&(b.ctrl=!1,b.alt=!1,b.shift=!1,!0)},VT200:{events:19,restrict:b=>b.action!==32},DRAG:{events:23,restrict:b=>b.action!==32||b.button!==3},ANY:{events:31,restrict:b=>!0}};function x(b,A){let M=(b.ctrl?16:0)|(b.shift?4:0)|(b.alt?8:0);return b.button===4?(M|=64,M|=b.action):(M|=3&b.button,4&b.button&&(M|=64),8&b.button&&(M|=128),b.action===32?M|=32:b.action!==0||A||(M|=3)),M}const y=String.fromCharCode,S={DEFAULT:b=>{const A=[x(b,!1)+32,b.col+32,b.row+32];return A[0]>255||A[1]>255||A[2]>255?"":`\x1B[M${y(A[0])}${y(A[1])}${y(A[2])}`},SGR:b=>{const A=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${x(b,!0)};${b.col};${b.row}${A}`},SGR_PIXELS:b=>{const A=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${x(b,!0)};${b.x};${b.y}${A}`}};let g=a.CoreMouseService=class extends w.Disposable{constructor(b,A){super(),this._bufferService=b,this._coreService=A,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.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(b,A){this._protocols[b]=A}addEncoding(b,A){this._encodings[b]=A}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(b){if(!this._protocols[b])throw new Error(`unknown protocol "${b}"`);this._activeProtocol=b,this._onProtocolChange.fire(this._protocols[b].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(b){if(!this._encodings[b])throw new Error(`unknown encoding "${b}"`);this._activeEncoding=b}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(b){if(b.col<0||b.col>=this._bufferService.cols||b.row<0||b.row>=this._bufferService.rows||b.button===4&&b.action===32||b.button===3&&b.action!==32||b.button!==4&&(b.action===2||b.action===3)||(b.col++,b.row++,b.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,b,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(b))return!1;const A=this._encodings[this._activeEncoding](b);return A&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(A):this._coreService.triggerDataEvent(A,!0)),this._lastEvent=b,!0}explainEvents(b){return{down:!!(1&b),up:!!(2&b),drag:!!(4&b),move:!!(8&b),wheel:!!(16&b)}}_equalEvents(b,A,M){if(M){if(b.x!==A.x||b.y!==A.y)return!1}else if(b.col!==A.col||b.row!==A.row)return!1;return b.button===A.button&&b.action===A.action&&b.ctrl===A.ctrl&&b.alt===A.alt&&b.shift===A.shift}};a.CoreMouseService=g=h([m(0,u.IBufferService),m(1,u.ICoreService)],g)},6975:function(f,a,c){var h=this&&this.__decorate||function(g,b,A,M){var D,T=arguments.length,k=T<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,b,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(b,A,k):D(b,A))||k);return T>3&&k&&Object.defineProperty(b,A,k),k},m=this&&this.__param||function(g,b){return function(A,M){b(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const u=c(1439),_=c(8460),w=c(844),E=c(2585),x=Object.freeze({insertMode:!1}),y=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,b,A){super(),this._bufferService=g,this._logService=b,this._optionsService=A,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(y)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(y)}triggerDataEvent(g,b=!1){if(this._optionsService.rawOptions.disableStdin)return;const A=this._bufferService.buffer;b&&this._optionsService.rawOptions.scrollOnUserInput&&A.ybase!==A.ydisp&&this._onRequestScrollToBottom.fire(),b&&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((b=>b.charCodeAt(0))))),this._onBinary.fire(g))}};a.CoreService=S=h([m(0,E.IBufferService),m(1,E.ILogService),m(2,E.IOptionsService)],S)},9074:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=c(8055),m=c(8460),u=c(844),_=c(6106);let w=0,E=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList((g=>g==null?void 0:g.marker.line)),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(g){if(g.marker.isDisposed)return;const b=new y(g);if(b){const A=b.marker.onDispose((()=>b.dispose()));b.onDispose((()=>{b&&(this._decorations.delete(b)&&this._onDecorationRemoved.fire(b),A.dispose())})),this._decorations.insert(b),this._onDecorationRegistered.fire(b)}return b}reset(){for(const g of this._decorations.values())g.dispose();this._decorations.clear()}*getDecorationsAtCell(g,b,A){let M=0,D=0;for(const T of this._decorations.getKeyIterator(b))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,b,A,M){this._decorations.forEachByKey(b,(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 y 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 m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.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),m=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(_,w){this._services.set(_,w)}getService(_){return this._services.get(_)}createInstance(_,...w){const E=(0,m.getServiceDependencies)(_).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] ${_.name} depends on UNKNOWN service ${S.id}.`);x.push(g)}const y=E.length>0?E[0].index:w.length;if(w.length!==y)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${y+1} conflicts with ${w.length} static arguments`);return new _(...w,...x)}}},7866:function(f,a,c){var h=this&&this.__decorate||function(y,S,g,b){var A,M=arguments.length,D=M<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,S,g,b);else for(var T=y.length-1;T>=0;T--)(A=y[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},m=this&&this.__param||function(y,S){return function(g,b){S(g,b,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(844),_=c(2585),w={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let E,x=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(y){super(),this._optionsService=y,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(y){for(let S=0;S<y.length;S++)typeof y[S]=="function"&&(y[S]=y[S]())}_log(y,S,g){this._evalLazyOptionalParams(g),y.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+S,...g)}trace(y,...S){var g;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.trace.bind(this._optionsService.options.logger))??console.log,y,S)}debug(y,...S){var g;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.debug.bind(this._optionsService.options.logger))??console.log,y,S)}info(y,...S){var g;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.info.bind(this._optionsService.options.logger))??console.info,y,S)}warn(y,...S){var g;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.warn.bind(this._optionsService.options.logger))??console.warn,y,S)}error(y,...S){var g;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.error.bind(this._optionsService.options.logger))??console.error,y,S)}};a.LogService=x=h([m(0,_.IOptionsService)],x),a.setTraceLogger=function(y){E=y},a.traceCall=function(y,S,g){if(typeof g.value!="function")throw new Error("not supported");const b=g.value;g.value=function(...A){if(E.logLevel!==_.LogLevelEnum.TRACE)return b.apply(this,A);E.trace(`GlyphRenderer#${b.name}(${A.map((D=>JSON.stringify(D))).join(", ")})`);const M=b.apply(this,A);return E.trace(`GlyphRenderer#${b.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),m=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 _=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends m.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const y={...a.DEFAULT_OPTIONS};for(const S in x)if(S in y)try{const g=x[S];y[S]=this._sanitizeAndValidateOption(S,g)}catch(g){console.error(g)}this.rawOptions=y,this.options={...y},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,y){return this.onOptionChange((S=>{S===x&&y(this.rawOptions[x])}))}onMultipleOptionChange(x,y){return this.onOptionChange((S=>{x.indexOf(S)!==-1&&y()}))}_setupOptions(){const x=S=>{if(!(S in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${S}"`);return this.rawOptions[S]},y=(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:y.bind(this,S)};Object.defineProperty(this.options,S,g)}}_sanitizeAndValidateOption(x,y){switch(x){case"cursorStyle":if(y||(y=a.DEFAULT_OPTIONS[x]),!(function(S){return S==="block"||S==="underline"||S==="bar"})(y))throw new Error(`"${y}" is not a valid value for ${x}`);break;case"wordSeparator":y||(y=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof y=="number"&&1<=y&&y<=1e3)break;y=_.includes(y)?y:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":y=Math.floor(y);case"lineHeight":case"tabStopWidth":if(y<1)throw new Error(`${x} cannot be less than 1, value: ${y}`);break;case"minimumContrastRatio":y=Math.max(1,Math.min(21,Math.round(10*y)/10));break;case"scrollback":if((y=Math.min(y,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${y}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(y<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${y}`);break;case"rows":case"cols":if(!y&&y!==0)throw new Error(`${x} must be numeric, value: ${y}`);break;case"windowsPty":y=y??{}}return y}}a.OptionsService=w},2660:function(f,a,c){var h=this&&this.__decorate||function(w,E,x,y){var S,g=arguments.length,b=g<3?E:y===null?y=Object.getOwnPropertyDescriptor(E,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(w,E,x,y);else for(var A=w.length-1;A>=0;A--)(S=w[A])&&(b=(g<3?S(b):g>3?S(E,x,b):S(E,x))||b);return g>3&&b&&Object.defineProperty(E,x,b),b},m=this&&this.__param||function(w,E){return function(x,y){E(x,y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const u=c(2585);let _=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,y=this._getEntryIdKey(x),S=this._entriesWithId.get(y);if(S)return this.addLineToLink(S.id,E.ybase+E.y),S.id;const g=E.addMarker(E.ybase+E.y),b={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(b,g))),this._entriesWithId.set(b.key,b),this._dataByLinkId.set(b.id,b),b.id}addLineToLink(w,E){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((y=>y.line!==E))){const y=this._bufferService.buffer.addMarker(E);x.lines.push(y),y.onDispose((()=>this._removeMarkerFromLink(x,y)))}}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=_=h([m(0,u.IBufferService)],_)},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(m){return m[h]||[]},a.createDecorator=function(m){if(a.serviceRegistry.has(m))return a.serviceRegistry.get(m);const u=function(_,w,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,y,S){y[c]===y?y[h].push({id:x,index:S}):(y[h]=[{id:x,index:S}],y[c]=y)})(u,_,E)};return u.toString=()=>m,a.serviceRegistry.set(m,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 m;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"})(m||(a.LogLevelEnum=m={})),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),m=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 m.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 y=w.length;for(let S=0;S<y;++S){let g=w.charCodeAt(S);if(55296<=g&&g<=56319){if(++S>=y)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 b=this.charProperties(g,x);let A=u.extractWidth(b);u.extractShouldJoin(b)&&(A-=u.extractWidth(x)),E+=A,x=b}return E}charProperties(w,E){return this._activeProvider.charProperties(w,E)}}a.UnicodeService=u}},o={};function d(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,d),c.exports}var v={};return(()=>{var f=v;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const a=d(9042),c=d(3236),h=d(844),m=d(5741),u=d(8285),_=d(7975),w=d(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 m.AddonManager),this._publicOptions={...this._core.options};const g=A=>this._core.options[A],b=(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:b.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 _.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,b){this._verifyIntegers(S,g,b),this._core.select(S,g,b)}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
|
|
59
|
-
`,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})(),v})()))})(fu)),fu.exports}var k1=E1();class A1{constructor(r,s){Jp(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",d=>{var f,a;const v=JSON.parse(d.data);v.type==="output"?s.onOutput(v.data):v.type==="error"?(f=s.onError)==null||f.call(s,v.message):(a=s.onStatus)==null||a.call(s,v)}),this.socket.addEventListener("error",()=>{var d;(d=s.onError)==null||d.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 $u({sessionId:n,active:r=!0,onEvent:s}){const o=ae.useRef(null),d=ae.useRef(null),v=ae.useRef(null),f=ae.useRef(null),a=ae.useRef(r),c=ae.useRef(s);function h(m={}){const u=o.current,_=d.current,w=v.current,E=f.current;if(!u||!_||!w||!E)return!1;const x=u.getBoundingClientRect();return x.width<mm||x.height<gm||(w.fit(),E.cols<_m||E.rows<vm)?!1:(_.resize(E.cols,E.rows),m.focus&&E.focus(),!0)}return ae.useEffect(()=>{c.current=s},[s]),ae.useEffect(()=>{a.current=r},[r]),ae.useEffect(()=>{if(!o.current)return;const m=new k1.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:T1}),u=new C1.FitAddon;m.loadAddon(u),m.loadAddon(new x1.WebLinksAddon),m.open(o.current),f.current=m,v.current=u;const _=o.current.getBoundingClientRect();_.width>=mm&&_.height>=gm&&u.fit();const w=new A1(n,{onOutput(A){m.write(A)},onStatus(A){var M;(M=c.current)==null||M.call(c,A.type)},onError(A){var M;m.writeln(`\r
|
|
60
|
-
[VCM] ${A}`),(M=c.current)==null||M.call(c,A)}});d.current=w,m.cols>=_m&&m.rows>=vm&&w.resize(m.cols,m.rows);const E=m.onData(A=>{w.sendInput(A)});let x=0,y=0,S=0;const g=()=>{x&&window.cancelAnimationFrame(x),x=window.requestAnimationFrame(()=>{x=0,h({focus:a.current})})},b=new ResizeObserver(()=>{g()});return b.observe(o.current),y=window.requestAnimationFrame(g),S=window.setTimeout(g,120),()=>{x&&window.cancelAnimationFrame(x),y&&window.cancelAnimationFrame(y),S&&window.clearTimeout(S),b.disconnect(),E.dispose(),w.close(),m.dispose(),d.current=null,f.current=null,v.current=null}},[n]),ae.useEffect(()=>{if(!r)return;const m=[],u=[];return m.push(window.requestAnimationFrame(()=>{h({focus:!0}),m.push(window.requestAnimationFrame(()=>h({focus:!0})))})),u.push(window.setTimeout(()=>h({focus:!0}),160)),u.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const _ of m)window.cancelAnimationFrame(_);for(const _ of u)window.clearTimeout(_)}},[r]),ae.useEffect(()=>{const m=()=>{a.current&&h()};return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]),O.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var m;return(m=f.current)==null?void 0:m.focus()}})}const mm=160,gm=80,_m=20,vm=5,T1={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 D1({busy:n,effort:r,model:s,open:o,permissionMode:d,session:v,onClose:f,onEffortChange:a,onModelChange:c,onPermissionModeChange:h,onResume:m,onRestart:u,onStart:_,onStop:w}){return o?O.jsx("div",{className:"modal-backdrop translator-session-backdrop",children:O.jsxs("section",{className:"translator-session-modal",role:"dialog","aria-modal":"true","aria-label":"Translator Session",children:[O.jsxs("header",{className:"translator-session-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Translator Session"}),O.jsx("p",{children:R1(v)})]}),O.jsx("button",{type:"button",onClick:f,children:"Close"})]}),O.jsx(Cg,{role:"translator",session:v??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:h,onModelChange:c,onEffortChange:a,onStart:_,onResume:m,onRestart:u,onStop:w}),O.jsx("div",{className:"translator-session-terminal",children:(v==null?void 0:v.status)==="running"?O.jsx($u,{sessionId:v.id,active:o},v.id):O.jsxs("div",{className:"terminal-empty",children:[O.jsx("strong",{children:"translator"}),O.jsx("span",{children:v!=null&&v.claudeSessionId?"Resume this project translator session.":"Start the project translator session."})]})})]})}):null}function R1(n){if(!n)return"not started";const r=n.status==="running"?` · ${n.activityStatus??"idle"}`:"";return`${n.status}${r}`}function M1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const L1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,O1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,B1={};function ym(n,r){return(B1.jsx?O1:L1).test(n)}const N1=/[ \t\n\f\r]/g;function j1(n){return typeof n=="object"?n.type==="text"?Sm(n.value):!1:Sm(n)}function Sm(n){return n.replace(N1,"")===""}class hl{constructor(r,s,o){this.normal=s,this.property=r,o&&(this.space=o)}}hl.prototype.normal={};hl.prototype.property={};hl.prototype.space=void 0;function xg(n,r){const s={},o={};for(const d of n)Object.assign(s,d.property),Object.assign(o,d.normal);return new hl(s,o,r)}function Ru(n){return n.toLowerCase()}class ln{constructor(r,s){this.attribute=s,this.property=r}}ln.prototype.attribute="";ln.prototype.booleanish=!1;ln.prototype.boolean=!1;ln.prototype.commaOrSpaceSeparated=!1;ln.prototype.commaSeparated=!1;ln.prototype.defined=!1;ln.prototype.mustUseProperty=!1;ln.prototype.number=!1;ln.prototype.overloadedBoolean=!1;ln.prototype.property="";ln.prototype.spaceSeparated=!1;ln.prototype.space=void 0;let z1=0;const Ie=pr(),Dt=pr(),Mu=pr(),ve=pr(),ct=pr(),ts=pr(),gn=pr();function pr(){return 2**++z1}const Lu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Dt,commaOrSpaceSeparated:gn,commaSeparated:ts,number:ve,overloadedBoolean:Mu,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),du=Object.keys(Lu);class Ku extends ln{constructor(r,s,o,d){let v=-1;if(super(r,s),bm(this,"space",d),typeof o=="number")for(;++v<du.length;){const f=du[v];bm(this,du[v],(o&Lu[f])===Lu[f])}}}Ku.prototype.defined=!0;function bm(n,r,s){s&&(n[r]=s)}function ss(n){const r={},s={};for(const[o,d]of Object.entries(n.properties)){const v=new Ku(o,n.transform(n.attributes||{},o),d,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(v.mustUseProperty=!0),r[o]=v,s[Ru(o)]=o,s[Ru(v.attribute)]=o}return new hl(r,s,n.space)}const Eg=ss({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:ct,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:ve,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:ct,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:Dt,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(n,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function kg(n,r){return r in n?n[r]:r}function Ag(n,r){return kg(n,r.toLowerCase())}const H1=ss({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ts,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:ct,autoFocus:Ie,autoPlay:Ie,blocking:ct,capture:null,charSet:null,checked:Ie,cite:null,className:ct,cols:ve,colSpan:null,content:null,contentEditable:Dt,controls:Ie,controlsList:ct,coords:ve|ts,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Mu,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:ct,height:ve,hidden:Mu,high:ve,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ie,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:ve,pattern:null,ping:ct,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:ct,required:Ie,reversed:Ie,rows:ve,rowSpan:ve,sandbox:ct,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Dt,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:Ag}),I1=ss({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:gn,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,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:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,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:ts,g2:ts,glyphName:ts,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,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:ve,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:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,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:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kg}),Tg=ss({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()}}),Dg=ss({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ag}),Rg=ss({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),U1={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"},P1=/[A-Z]/g,Cm=/-[a-z]/g,F1=/^data[-\w.:]+$/i;function q1(n,r){const s=Ru(r);let o=r,d=ln;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&F1.test(r)){if(r.charAt(4)==="-"){const v=r.slice(5).replace(Cm,V1);o="data"+v.charAt(0).toUpperCase()+v.slice(1)}else{const v=r.slice(4);if(!Cm.test(v)){let f=v.replace(P1,G1);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}d=Ku}return new d(o,r)}function G1(n){return"-"+n.toLowerCase()}function V1(n){return n.charAt(1).toUpperCase()}const $1=xg([Eg,H1,Tg,Dg,Rg],"html"),Yu=xg([Eg,I1,Tg,Dg,Rg],"svg");function K1(n){return n.join(" ").trim()}var Zr={},pu,wm;function Y1(){if(wm)return pu;wm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,d=/^:\s*/,v=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
61
|
-
`,h="/",m="*",u="",_="comment",w="declaration";function E(y,S){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];S=S||{};var g=1,b=1;function A(K){var W=K.match(r);W&&(g+=W.length);var V=K.lastIndexOf(c);b=~V?K.length-V:b+K.length}function M(){var K={line:g,column:b};return function(W){return W.position=new D(K),R(),W}}function D(K){this.start=K,this.end={line:g,column:b},this.source=S.source}D.prototype.content=y;function T(K){var W=new Error(S.source+":"+g+":"+b+": "+K);if(W.reason=K,W.filename=S.source,W.line=g,W.column=b,W.source=y,!S.silent)throw W}function k(K){var W=K.exec(y);if(W){var V=W[0];return A(V),y=y.slice(V.length),W}}function R(){k(s)}function N(K){var W;for(K=K||[];W=I();)W!==!1&&K.push(W);return K}function I(){var K=M();if(!(h!=y.charAt(0)||m!=y.charAt(1))){for(var W=2;u!=y.charAt(W)&&(m!=y.charAt(W)||h!=y.charAt(W+1));)++W;if(W+=2,u===y.charAt(W-1))return T("End of comment missing");var V=y.slice(2,W-2);return b+=2,A(V),y=y.slice(W),b+=2,K({type:_,comment:V})}}function P(){var K=M(),W=k(o);if(W){if(I(),!k(d))return T("property missing ':'");var V=k(v),$=K({type:w,property:x(W[0].replace(n,u)),value:V?x(V[0].replace(n,u)):u});return k(f),$}}function F(){var K=[];N(K);for(var W;W=P();)W!==!1&&(K.push(W),N(K));return K}return R(),F()}function x(y){return y?y.replace(a,u):u}return pu=E,pu}var xm;function W1(){if(xm)return Zr;xm=1;var n=Zr&&Zr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default=s;const r=n(Y1());function s(o,d){let v=null;if(!o||typeof o!="string")return v;const f=(0,r.default)(o),a=typeof d=="function";return f.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:m}=c;a?d(h,m,c):m&&(v=v||{},v[h]=m)}),v}return Zr}var Js={},Em;function X1(){if(Em)return Js;Em=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,d=/^-(ms)-/,v=function(h){return!h||s.test(h)||n.test(h)},f=function(h,m){return m.toUpperCase()},a=function(h,m){return"".concat(m,"-")},c=function(h,m){return m===void 0&&(m={}),v(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(d,a):h=h.replace(o,a),h.replace(r,f))};return Js.camelCase=c,Js}var el,km;function Q1(){if(km)return el;km=1;var n=el&&el.__importDefault||function(d){return d&&d.__esModule?d:{default:d}},r=n(W1()),s=X1();function o(d,v){var f={};return!d||typeof d!="string"||(0,r.default)(d,function(a,c){a&&c&&(f[(0,s.camelCase)(a,v)]=c)}),f}return o.default=o,el=o,el}var Z1=Q1();const J1=gg(Z1),Mg=Lg("end"),Wu=Lg("start");function Lg(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 ey(n){const r=Wu(n),s=Mg(n);if(r&&s)return{start:r,end:s}}function rl(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Am(n.position):"start"in n||"end"in n?Am(n):"line"in n||"column"in n?Ou(n):""}function Ou(n){return Tm(n&&n.line)+":"+Tm(n&&n.column)}function Am(n){return Ou(n&&n.start)+"-"+Ou(n&&n.end)}function Tm(n){return n&&typeof n=="number"?n:1}class $t extends Error{constructor(r,s,o){super(),typeof s=="string"&&(o=s,s=void 0);let d="",v={},f=!1;if(s&&("line"in s&&"column"in s?v={place:s}:"start"in s&&"end"in s?v={place:s}:"type"in s?v={ancestors:[s],place:s.position}:v={...s}),typeof r=="string"?d=r:!v.cause&&r&&(f=!0,d=r.message,v.cause=r),!v.ruleId&&!v.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?v.ruleId=o:(v.source=o.slice(0,c),v.ruleId=o.slice(c+1))}if(!v.place&&v.ancestors&&v.ancestors){const c=v.ancestors[v.ancestors.length-1];c&&(v.place=c.position)}const a=v.place&&"start"in v.place?v.place.start:v.place;this.ancestors=v.ancestors||void 0,this.cause=v.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=d,this.line=a?a.line:void 0,this.name=rl(v.place)||"1:1",this.place=v.place||void 0,this.reason=this.message,this.ruleId=v.ruleId||void 0,this.source=v.source||void 0,this.stack=f&&v.cause&&typeof v.cause.stack=="string"?v.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;const Xu={}.hasOwnProperty,ty=new Map,ny=/[A-Z]/g,iy=new Set(["table","tbody","thead","tfoot","tr"]),ry=new Set(["td","th"]),Og="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sy(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=dy(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=fy(s,r.jsx,r.jsxs)}const d={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"?Yu:$1,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},v=Bg(d,n,void 0);return v&&typeof v!="string"?v:d.create(n,d.Fragment,{children:v||void 0},void 0)}function Bg(n,r,s){if(r.type==="element")return ly(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return ay(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return cy(n,r,s);if(r.type==="mdxjsEsm")return oy(n,r);if(r.type==="root")return uy(n,r,s);if(r.type==="text")return hy(n,r)}function ly(n,r,s){const o=n.schema;let d=o;r.tagName.toLowerCase()==="svg"&&o.space==="html"&&(d=Yu,n.schema=d),n.ancestors.push(r);const v=jg(n,r.tagName,!1),f=py(n,r);let a=Zu(n,r);return iy.has(r.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!j1(c):!0})),Ng(n,f,v,r),Qu(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function ay(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)}cl(n,r.position)}function oy(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);cl(n,r.position)}function cy(n,r,s){const o=n.schema;let d=o;r.name==="svg"&&o.space==="html"&&(d=Yu,n.schema=d),n.ancestors.push(r);const v=r.name===null?n.Fragment:jg(n,r.name,!0),f=my(n,r),a=Zu(n,r);return Ng(n,f,v,r),Qu(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function uy(n,r,s){const o={};return Qu(o,Zu(n,r)),n.create(r,n.Fragment,o,s)}function hy(n,r){return r.value}function Ng(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 fy(n,r,s){return o;function o(d,v,f,a){const h=Array.isArray(f.children)?s:r;return a?h(v,f,a):h(v,f)}}function dy(n,r){return s;function s(o,d,v,f){const a=Array.isArray(v.children),c=Wu(o);return r(d,v,f,a,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function py(n,r){const s={};let o,d;for(d in r.properties)if(d!=="children"&&Xu.call(r.properties,d)){const v=gy(n,d,r.properties[d]);if(v){const[f,a]=v;n.tableCellAlignToStyle&&f==="align"&&typeof a=="string"&&ry.has(r.tagName)?o=a:s[f]=a}}if(o){const v=s.style||(s.style={});v[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return s}function my(n,r){const s={};for(const o of r.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const v=o.data.estree.body[0];v.type;const f=v.expression;f.type;const a=f.properties[0];a.type,Object.assign(s,n.evaluater.evaluateExpression(a.argument))}else cl(n,r.position);else{const d=o.name;let v;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,v=n.evaluater.evaluateExpression(a.expression)}else cl(n,r.position);else v=o.value===null?!0:o.value;s[d]=v}return s}function Zu(n,r){const s=[];let o=-1;const d=n.passKeys?new Map:ty;for(;++o<r.children.length;){const v=r.children[o];let f;if(n.passKeys){const c=v.type==="element"?v.tagName:v.type==="mdxJsxFlowElement"||v.type==="mdxJsxTextElement"?v.name:void 0;if(c){const h=d.get(c)||0;f=c+"-"+h,d.set(c,h+1)}}const a=Bg(n,v,f);a!==void 0&&s.push(a)}return s}function gy(n,r,s){const o=q1(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=o.commaSeparated?M1(s):K1(s)),o.property==="style"){let d=typeof s=="object"?s:_y(n,String(s));return n.stylePropertyNameCase==="css"&&(d=vy(d)),["style",d]}return[n.elementAttributeNameCase==="react"&&o.space?U1[o.property]||o.property:o.attribute,s]}}function _y(n,r){try{return J1(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const o=s,d=new $t("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=n.filePath||void 0,d.url=Og+"#cannot-parse-style-attribute",d}}function jg(n,r,s){let o;if(!s)o={type:"Literal",value:r};else if(r.includes(".")){const d=r.split(".");let v=-1,f;for(;++v<d.length;){const a=ym(d[v])?{type:"Identifier",name:d[v]}:{type:"Literal",value:d[v]};f=f?{type:"MemberExpression",object:f,property:a,computed:!!(v&&a.type==="Literal"),optional:!1}:a}o=f}else o=ym(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(o.type==="Literal"){const d=o.value;return Xu.call(n.components,d)?n.components[d]:d}if(n.evaluater)return n.evaluater.evaluateExpression(o);cl(n)}function cl(n,r){const s=new $t("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=Og+"#cannot-handle-mdx-estrees-without-createevaluater",s}function vy(n){const r={};let s;for(s in n)Xu.call(n,s)&&(r[yy(s)]=n[s]);return r}function yy(n){let r=n.replace(ny,Sy);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function Sy(n){return"-"+n.toLowerCase()}const mu={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"]},by={};function Ju(n,r){const s=by,o=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,d=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return zg(n,o,d)}function zg(n,r,s){if(Cy(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 Dm(n.children,r,s)}return Array.isArray(n)?Dm(n,r,s):""}function Dm(n,r,s){const o=[];let d=-1;for(;++d<n.length;)o[d]=zg(n[d],r,s);return o.join("")}function Cy(n){return!!(n&&typeof n=="object")}const Rm=document.createElement("i");function eh(n){const r="&"+n+";";Rm.innerHTML=r;const s=Rm.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function _n(n,r,s,o){const d=n.length;let v=0,f;if(r<0?r=-r>d?0:d+r:r=r>d?d: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);v<o.length;)f=o.slice(v,v+1e4),f.unshift(r,0),n.splice(...f),v+=1e4,r+=1e4}function Rn(n,r){return n.length>0?(_n(n,n.length,0,r),n):r}const Mm={}.hasOwnProperty;function Hg(n){const r={};let s=-1;for(;++s<n.length;)wy(r,n[s]);return r}function wy(n,r){let s;for(s in r){const d=(Mm.call(n,s)?n[s]:void 0)||(n[s]={}),v=r[s];let f;if(v)for(f in v){Mm.call(d,f)||(d[f]=[]);const a=v[f];xy(d[f],Array.isArray(a)?a:a?[a]:[])}}}function xy(n,r){let s=-1;const o=[];for(;++s<r.length;)(r[s].add==="after"?n:o).push(r[s]);_n(n,0,0,o)}function Ig(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 zn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xt=$i(/[A-Za-z]/),Vt=$i(/[\dA-Za-z]/),Ey=$i(/[#-'*+\--9=?A-Z^-~]/);function za(n){return n!==null&&(n<32||n===127)}const Bu=$i(/\d/),ky=$i(/[\dA-Fa-f]/),Ay=$i(/[!-/:-@[-`{-~]/);function Le(n){return n!==null&&n<-2}function lt(n){return n!==null&&(n<0||n===32)}function qe(n){return n===-2||n===-1||n===32}const qa=$i(new RegExp("\\p{P}|\\p{S}","u")),dr=$i(/\s/);function $i(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function ls(n){const r=[];let s=-1,o=0,d=0;for(;++s<n.length;){const v=n.charCodeAt(s);let f="";if(v===37&&Vt(n.charCodeAt(s+1))&&Vt(n.charCodeAt(s+2)))d=2;else if(v<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(v))||(f=String.fromCharCode(v));else if(v>55295&&v<57344){const a=n.charCodeAt(s+1);v<56320&&a>56319&&a<57344?(f=String.fromCharCode(v,a),d=1):f="�"}else f=String.fromCharCode(v);f&&(r.push(n.slice(o,s),encodeURIComponent(f)),o=s+d+1,f=""),d&&(s+=d,d=0)}return r.join("")+n.slice(o)}function Ye(n,r,s,o){const d=o?o-1:Number.POSITIVE_INFINITY;let v=0;return f;function f(c){return qe(c)?(n.enter(s),a(c)):r(c)}function a(c){return qe(c)&&v++<d?(n.consume(c),a):(n.exit(s),r(c))}}const Ty={tokenize:Dy};function Dy(n){const r=n.attempt(this.parser.constructs.contentInitial,o,d);let s;return r;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Ye(n,r,"linePrefix")}function d(a){return n.enter("paragraph"),v(a)}function v(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 Le(a)?(n.consume(a),n.exit("chunkText"),v):(n.consume(a),f)}}const Ry={tokenize:My},Lm={tokenize:Ly};function My(n){const r=this,s=[];let o=0,d,v,f;return a;function a(b){if(o<s.length){const A=s[o];return r.containerState=A[1],n.attempt(A[0].continuation,c,h)(b)}return h(b)}function c(b){if(o++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,d&&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 _n(r.events,M+1,0,r.events.slice(A)),r.events.length=T,h(b)}return a(b)}function h(b){if(o===s.length){if(!d)return _(b);if(d.currentConstruct&&d.currentConstruct.concrete)return E(b);r.interrupt=!!(d.currentConstruct&&!d._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(Lm,m,u)(b)}function m(b){return d&&g(),S(o),_(b)}function u(b){return r.parser.lazy[r.now().line]=o!==s.length,f=r.now().offset,E(b)}function _(b){return r.containerState={},n.attempt(Lm,w,E)(b)}function w(b){return o++,s.push([r.currentConstruct,r.containerState]),_(b)}function E(b){if(b===null){d&&g(),S(0),n.consume(b);return}return d=d||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:d,contentType:"flow",previous:v}),x(b)}function x(b){if(b===null){y(n.exit("chunkFlow"),!0),S(0),n.consume(b);return}return Le(b)?(n.consume(b),y(n.exit("chunkFlow")),o=0,r.interrupt=void 0,a):(n.consume(b),x)}function y(b,A){const M=r.sliceStream(b);if(A&&M.push(null),b.previous=v,v&&(v.next=b),v=b,d.defineSkip(b.start),d.write(M),r.parser.lazy[b.start.line]){let D=d.events.length;for(;D--;)if(d.events[D][1].start.offset<f&&(!d.events[D][1].end||d.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++;_n(r.events,k+1,0,r.events.slice(T)),r.events.length=D}}function S(b){let A=s.length;for(;A-- >b;){const M=s[A];r.containerState=M[1],M[0].exit.call(r,n)}s.length=b}function g(){d.write([null]),v=void 0,d=void 0,r.containerState._closeFlow=void 0}}function Ly(n,r,s){return Ye(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function is(n){if(n===null||lt(n)||dr(n))return 1;if(qa(n))return 2}function Ga(n,r,s){const o=[];let d=-1;for(;++d<n.length;){const v=n[d].resolveAll;v&&!o.includes(v)&&(r=v(r,s),o.push(v))}return r}const Nu={name:"attention",resolveAll:Oy,tokenize:By};function Oy(n,r){let s=-1,o,d,v,f,a,c,h,m;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},_={...n[s][1].start};Om(u,-c),Om(_,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:_},v={type:c>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[s][1].start}},d={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=Rn(h,[["enter",n[o][1],r],["exit",n[o][1],r]])),h=Rn(h,[["enter",d,r],["enter",f,r],["exit",f,r],["enter",v,r]]),h=Rn(h,Ga(r.parser.constructs.insideSpan.null,n.slice(o+1,s),r)),h=Rn(h,[["exit",v,r],["enter",a,r],["exit",a,r],["exit",d,r]]),n[s][1].end.offset-n[s][1].start.offset?(m=2,h=Rn(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):m=0,_n(n,o-1,s-o+3,h),s=o+h.length-m-2;break}}for(s=-1;++s<n.length;)n[s][1].type==="attentionSequence"&&(n[s][1].type="data");return n}function By(n,r){const s=this.parser.constructs.attentionMarkers.null,o=this.previous,d=is(o);let v;return f;function f(c){return v=c,n.enter("attentionSequence"),a(c)}function a(c){if(c===v)return n.consume(c),a;const h=n.exit("attentionSequence"),m=is(c),u=!m||m===2&&d||s.includes(c),_=!d||d===2&&m||s.includes(o);return h._open=!!(v===42?u:u&&(d||!_)),h._close=!!(v===42?_:_&&(m||!u)),r(c)}}function Om(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const Ny={name:"autolink",tokenize:jy};function jy(n,r,s){let o=0;return d;function d(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),v}function v(w){return Xt(w)?(n.consume(w),f):w===64?s(w):h(w)}function f(w){return w===43||w===45||w===46||Vt(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||Vt(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||za(w)?s(w):(n.consume(w),c)}function h(w){return w===64?(n.consume(w),m):Ey(w)?(n.consume(w),h):s(w)}function m(w){return Vt(w)?u(w):s(w)}function u(w){return w===46?(n.consume(w),o=0,m):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),r):_(w)}function _(w){if((w===45||Vt(w))&&o++<63){const E=w===45?_:u;return n.consume(w),E}return s(w)}}const fl={partial:!0,tokenize:zy};function zy(n,r,s){return o;function o(v){return qe(v)?Ye(n,d,"linePrefix")(v):d(v)}function d(v){return v===null||Le(v)?r(v):s(v)}}const Ug={continuation:{tokenize:Iy},exit:Uy,name:"blockQuote",tokenize:Hy};function Hy(n,r,s){const o=this;return d;function d(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"),v}return s(f)}function v(f){return qe(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function Iy(n,r,s){const o=this;return d;function d(f){return qe(f)?Ye(n,v,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):v(f)}function v(f){return n.attempt(Ug,r,s)(f)}}function Uy(n){n.exit("blockQuote")}const Pg={name:"characterEscape",tokenize:Py};function Py(n,r,s){return o;function o(v){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(v),n.exit("escapeMarker"),d}function d(v){return Ay(v)?(n.enter("characterEscapeValue"),n.consume(v),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(v)}}const Fg={name:"characterReference",tokenize:Fy};function Fy(n,r,s){const o=this;let d=0,v,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"),v=31,f=Vt,m(u))}function h(u){return u===88||u===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(u),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),v=6,f=ky,m):(n.enter("characterReferenceValue"),v=7,f=Bu,m(u))}function m(u){if(u===59&&d){const _=n.exit("characterReferenceValue");return f===Vt&&!eh(o.sliceSerialize(_))?s(u):(n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(u)&&d++<v?(n.consume(u),m):s(u)}}const Bm={partial:!0,tokenize:Gy},Nm={concrete:!0,name:"codeFenced",tokenize:qy};function qy(n,r,s){const o=this,d={partial:!0,tokenize:M};let v=0,f=0,a;return c;function c(D){return h(D)}function h(D){const T=o.events[o.events.length-1];return v=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),m(D)}function m(D){return D===a?(f++,n.consume(D),m):f<3?s(D):(n.exit("codeFencedFenceSequence"),qe(D)?Ye(n,u,"whitespace")(D):u(D))}function u(D){return D===null||Le(D)?(n.exit("codeFencedFence"),o.interrupt?r(D):n.check(Bm,x,A)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(D)):qe(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ye(n,w,"whitespace")(D)):D===96&&D===a?s(D):(n.consume(D),_)}function w(D){return D===null||Le(D)?u(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||Le(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(d,A,y)(D)}function y(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),S}function S(D){return v>0&&qe(D)?Ye(n,g,"linePrefix",v+1)(D):g(D)}function g(D){return D===null||Le(D)?n.check(Bm,x,A)(D):(n.enter("codeFlowValue"),b(D))}function b(D){return D===null||Le(D)?(n.exit("codeFlowValue"),g(D)):(n.consume(D),b)}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"),qe(W)?Ye(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"),qe(W)?Ye(D,K,"whitespace")(W):K(W)):k(W)}function K(W){return W===null||Le(W)?(D.exit("codeFencedFence"),T(W)):k(W)}}}function Gy(n,r,s){const o=this;return d;function d(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),v)}function v(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}const gu={name:"codeIndented",tokenize:$y},Vy={partial:!0,tokenize:Ky};function $y(n,r,s){const o=this;return d;function d(h){return n.enter("codeIndented"),Ye(n,v,"linePrefix",5)(h)}function v(h){const m=o.events[o.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?c(h):Le(h)?n.attempt(Vy,f,c)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Le(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),a)}function c(h){return n.exit("codeIndented"),r(h)}}function Ky(n,r,s){const o=this;return d;function d(f){return o.parser.lazy[o.now().line]?s(f):Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),d):Ye(n,v,"linePrefix",5)(f)}function v(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):Le(f)?d(f):s(f)}}const Yy={name:"codeText",previous:Xy,resolve:Wy,tokenize:Qy};function Wy(n){let r=n.length-4,s=3,o,d;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;)d===void 0?o!==r&&n[o][1].type!=="lineEnding"&&(d=o):(o===r||n[o][1].type==="lineEnding")&&(n[d][1].type="codeTextData",o!==d+2&&(n[d][1].end=n[o-1][1].end,n.splice(d+2,o-d-2),r-=o-d-2,o=d+2),d=void 0);return n}function Xy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Qy(n,r,s){let o=0,d,v;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?(v=n.enter("codeTextSequence"),d=0,m(u)):Le(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||Le(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function m(u){return u===96?(n.consume(u),d++,m):d===o?(n.exit("codeTextSequence"),n.exit("codeText"),r(u)):(v.type="codeTextData",h(u))}}class Zy{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 d=s||0;this.setCursor(Math.trunc(r));const v=this.right.splice(this.right.length-d,Number.POSITIVE_INFINITY);return o&&tl(this.left,o),v.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),tl(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),tl(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);tl(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);tl(this.left,s.reverse())}}}function tl(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 qg(n){const r={};let s=-1,o,d,v,f,a,c,h;const m=new Zy(n);for(;++s<m.length;){for(;s in r;)s=r[s];if(o=m.get(s),s&&o[1].type==="chunkFlow"&&m.get(s-1)[1].type==="listItemPrefix"&&(c=o[1]._tokenizer.events,v=0,v<c.length&&c[v][1].type==="lineEndingBlank"&&(v+=2),v<c.length&&c[v][1].type==="content"))for(;++v<c.length&&c[v][1].type!=="content";)c[v][1].type==="chunkText"&&(c[v][1]._isInFirstContentOfListItem=!0,v++);if(o[0]==="enter")o[1].contentType&&(Object.assign(r,Jy(m,s)),s=r[s],h=!0);else if(o[1]._container){for(v=s,d=void 0;v--;)if(f=m.get(v),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(d&&(m.get(d)[1].type="lineEndingBlank"),f[1].type="lineEnding",d=v);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;d&&(o[1].end={...m.get(d)[1].start},a=m.slice(d,s),a.unshift(o),m.splice(d,s-d+1,a))}}return _n(n,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function Jy(n,r){const s=n.get(r)[1],o=n.get(r)[2];let d=r-1;const v=[];let f=s._tokenizer;f||(f=o.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const a=f.events,c=[],h={};let m,u,_=-1,w=s,E=0,x=0;const y=[x];for(;w;){for(;n.get(++d)[1]!==w;);v.push(d),w._tokenizer||(m=o.sliceStream(w),w.next||m.push(null),u&&f.defineSkip(w.start),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(m),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),u=w,w=w.next}for(w=s;++_<a.length;)a[_][0]==="exit"&&a[_-1][0]==="enter"&&a[_][1].type===a[_-1][1].type&&a[_][1].start.line!==a[_][1].end.line&&(x=_+1,y.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(f.events=[],w?(w._tokenizer=void 0,w.previous=void 0):y.pop(),_=y.length;_--;){const S=a.slice(y[_],y[_+1]),g=v.pop();c.push([g,g+S.length-1]),n.splice(g,2,S)}for(c.reverse(),_=-1;++_<c.length;)h[E+c[_][0]]=E+c[_][1],E+=c[_][1]-c[_][0]-1;return h}const eS={resolve:nS,tokenize:iS},tS={partial:!0,tokenize:rS};function nS(n){return qg(n),n}function iS(n,r){let s;return o;function o(a){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),d(a)}function d(a){return a===null?v(a):Le(a)?n.check(tS,f,v)(a):(n.consume(a),d)}function v(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,d}}function rS(n,r,s){const o=this;return d;function d(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Ye(n,v,"linePrefix")}function v(f){if(f===null||Le(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 Gg(n,r,s,o,d,v,f,a,c){const h=c||Number.POSITIVE_INFINITY;let m=0;return u;function u(S){return S===60?(n.enter(o),n.enter(d),n.enter(v),n.consume(S),n.exit(v),_):S===null||S===32||S===41||za(S)?s(S):(n.enter(o),n.enter(f),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(S))}function _(S){return S===62?(n.enter(v),n.consume(S),n.exit(v),n.exit(d),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),_(S)):S===null||S===60||Le(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!m&&(S===null||S===41||lt(S))?(n.exit("chunkString"),n.exit(a),n.exit(f),n.exit(o),r(S)):m<h&&S===40?(n.consume(S),m++,x):S===41?(n.consume(S),m--,x):S===null||S===32||S===40||za(S)?s(S):(n.consume(S),S===92?y:x)}function y(S){return S===40||S===41||S===92?(n.consume(S),x):x(S)}}function Vg(n,r,s,o,d,v){const f=this;let a=0,c;return h;function h(w){return n.enter(o),n.enter(d),n.consume(w),n.exit(d),n.enter(v),m}function m(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(v),n.enter(d),n.consume(w),n.exit(d),n.exit(o),r):Le(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),m):(n.enter("chunkString",{contentType:"string"}),u(w))}function u(w){return w===null||w===91||w===93||Le(w)||a++>999?(n.exit("chunkString"),m(w)):(n.consume(w),c||(c=!qe(w)),w===92?_:u)}function _(w){return w===91||w===92||w===93?(n.consume(w),a++,u):u(w)}}function $g(n,r,s,o,d,v){let f;return a;function a(_){return _===34||_===39||_===40?(n.enter(o),n.enter(d),n.consume(_),n.exit(d),f=_===40?41:_,c):s(_)}function c(_){return _===f?(n.enter(d),n.consume(_),n.exit(d),n.exit(o),r):(n.enter(v),h(_))}function h(_){return _===f?(n.exit(v),c(f)):_===null?s(_):Le(_)?(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),Ye(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===f||_===null||Le(_)?(n.exit("chunkString"),h(_)):(n.consume(_),_===92?u:m)}function u(_){return _===f||_===92?(n.consume(_),m):m(_)}}function sl(n,r){let s;return o;function o(d){return Le(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),s=!0,o):qe(d)?Ye(n,o,s?"linePrefix":"lineSuffix")(d):r(d)}}const sS={name:"definition",tokenize:aS},lS={partial:!0,tokenize:oS};function aS(n,r,s){const o=this;let d;return v;function v(w){return n.enter("definition"),f(w)}function f(w){return Vg.call(o,n,a,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return d=zn(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 lt(w)?sl(n,h)(w):h(w)}function h(w){return Gg(n,m,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return n.attempt(lS,u,u)(w)}function u(w){return qe(w)?Ye(n,_,"whitespace")(w):_(w)}function _(w){return w===null||Le(w)?(n.exit("definition"),o.parser.defined.push(d),r(w)):s(w)}}function oS(n,r,s){return o;function o(a){return lt(a)?sl(n,d)(a):s(a)}function d(a){return $g(n,v,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function v(a){return qe(a)?Ye(n,f,"whitespace")(a):f(a)}function f(a){return a===null||Le(a)?r(a):s(a)}}const cS={name:"hardBreakEscape",tokenize:uS};function uS(n,r,s){return o;function o(v){return n.enter("hardBreakEscape"),n.consume(v),d}function d(v){return Le(v)?(n.exit("hardBreakEscape"),r(v)):s(v)}}const hS={name:"headingAtx",resolve:fS,tokenize:dS};function fS(n,r){let s=n.length-2,o=3,d,v;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&&(d={type:"atxHeadingText",start:n[o][1].start,end:n[s][1].end},v={type:"chunkText",start:n[o][1].start,end:n[s][1].end,contentType:"text"},_n(n,o,s-o+1,[["enter",d,r],["enter",v,r],["exit",v,r],["exit",d,r]])),n}function dS(n,r,s){let o=0;return d;function d(m){return n.enter("atxHeading"),v(m)}function v(m){return n.enter("atxHeadingSequence"),f(m)}function f(m){return m===35&&o++<6?(n.consume(m),f):m===null||lt(m)?(n.exit("atxHeadingSequence"),a(m)):s(m)}function a(m){return m===35?(n.enter("atxHeadingSequence"),c(m)):m===null||Le(m)?(n.exit("atxHeading"),r(m)):qe(m)?Ye(n,a,"whitespace")(m):(n.enter("atxHeadingText"),h(m))}function c(m){return m===35?(n.consume(m),c):(n.exit("atxHeadingSequence"),a(m))}function h(m){return m===null||m===35||lt(m)?(n.exit("atxHeadingText"),a(m)):(n.consume(m),h)}}const pS=["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"],jm=["pre","script","style","textarea"],mS={concrete:!0,name:"htmlFlow",resolveTo:vS,tokenize:yS},gS={partial:!0,tokenize:bS},_S={partial:!0,tokenize:SS};function vS(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 yS(n,r,s){const o=this;let d,v,f,a,c;return h;function h(j){return m(j)}function m(j){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(j),u}function u(j){return j===33?(n.consume(j),_):j===47?(n.consume(j),v=!0,x):j===63?(n.consume(j),d=3,o.interrupt?r:B):Xt(j)?(n.consume(j),f=String.fromCharCode(j),y):s(j)}function _(j){return j===45?(n.consume(j),d=2,w):j===91?(n.consume(j),d=5,a=0,E):Xt(j)?(n.consume(j),d=4,o.interrupt?r:B):s(j)}function w(j){return j===45?(n.consume(j),o.interrupt?r:B):s(j)}function E(j){const te="CDATA[";return j===te.charCodeAt(a++)?(n.consume(j),a===te.length?o.interrupt?r:P:E):s(j)}function x(j){return Xt(j)?(n.consume(j),f=String.fromCharCode(j),y):s(j)}function y(j){if(j===null||j===47||j===62||lt(j)){const te=j===47,he=f.toLowerCase();return!te&&!v&&jm.includes(he)?(d=1,o.interrupt?r(j):P(j)):pS.includes(f.toLowerCase())?(d=6,te?(n.consume(j),S):o.interrupt?r(j):P(j)):(d=7,o.interrupt&&!o.parser.lazy[o.now().line]?s(j):v?g(j):b(j))}return j===45||Vt(j)?(n.consume(j),f+=String.fromCharCode(j),y):s(j)}function S(j){return j===62?(n.consume(j),o.interrupt?r:P):s(j)}function g(j){return qe(j)?(n.consume(j),g):N(j)}function b(j){return j===47?(n.consume(j),N):j===58||j===95||Xt(j)?(n.consume(j),A):qe(j)?(n.consume(j),b):N(j)}function A(j){return j===45||j===46||j===58||j===95||Vt(j)?(n.consume(j),A):M(j)}function M(j){return j===61?(n.consume(j),D):qe(j)?(n.consume(j),M):b(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):qe(j)?(n.consume(j),D):k(j)}function T(j){return j===c?(n.consume(j),c=null,R):j===null||Le(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||lt(j)?M(j):(n.consume(j),k)}function R(j){return j===47||j===62||qe(j)?b(j):s(j)}function N(j){return j===62?(n.consume(j),I):s(j)}function I(j){return j===null||Le(j)?P(j):qe(j)?(n.consume(j),I):s(j)}function P(j){return j===45&&d===2?(n.consume(j),V):j===60&&d===1?(n.consume(j),$):j===62&&d===4?(n.consume(j),z):j===63&&d===3?(n.consume(j),B):j===93&&d===5?(n.consume(j),H):Le(j)&&(d===6||d===7)?(n.exit("htmlFlowData"),n.check(gS,G,F)(j)):j===null||Le(j)?(n.exit("htmlFlowData"),F(j)):(n.consume(j),P)}function F(j){return n.check(_S,K,G)(j)}function K(j){return n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),W}function W(j){return j===null||Le(j)?F(j):(n.enter("htmlFlowData"),P(j))}function V(j){return j===45?(n.consume(j),B):P(j)}function $(j){return j===47?(n.consume(j),f="",ee):P(j)}function ee(j){if(j===62){const te=f.toLowerCase();return jm.includes(te)?(n.consume(j),z):P(j)}return Xt(j)&&f.length<8?(n.consume(j),f+=String.fromCharCode(j),ee):P(j)}function H(j){return j===93?(n.consume(j),B):P(j)}function B(j){return j===62?(n.consume(j),z):j===45&&d===2?(n.consume(j),B):P(j)}function z(j){return j===null||Le(j)?(n.exit("htmlFlowData"),G(j)):(n.consume(j),z)}function G(j){return n.exit("htmlFlow"),r(j)}}function SS(n,r,s){const o=this;return d;function d(f){return Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),v):s(f)}function v(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}function bS(n,r,s){return o;function o(d){return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),n.attempt(fl,r,s)}}const CS={name:"htmlText",tokenize:wS};function wS(n,r,s){const o=this;let d,v,f;return a;function a(B){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(B),c}function c(B){return B===33?(n.consume(B),h):B===47?(n.consume(B),M):B===63?(n.consume(B),b):Xt(B)?(n.consume(B),k):s(B)}function h(B){return B===45?(n.consume(B),m):B===91?(n.consume(B),v=0,E):Xt(B)?(n.consume(B),g):s(B)}function m(B){return B===45?(n.consume(B),w):s(B)}function u(B){return B===null?s(B):B===45?(n.consume(B),_):Le(B)?(f=u,$(B)):(n.consume(B),u)}function _(B){return B===45?(n.consume(B),w):u(B)}function w(B){return B===62?V(B):B===45?_(B):u(B)}function E(B){const z="CDATA[";return B===z.charCodeAt(v++)?(n.consume(B),v===z.length?x:E):s(B)}function x(B){return B===null?s(B):B===93?(n.consume(B),y):Le(B)?(f=x,$(B)):(n.consume(B),x)}function y(B){return B===93?(n.consume(B),S):x(B)}function S(B){return B===62?V(B):B===93?(n.consume(B),S):x(B)}function g(B){return B===null||B===62?V(B):Le(B)?(f=g,$(B)):(n.consume(B),g)}function b(B){return B===null?s(B):B===63?(n.consume(B),A):Le(B)?(f=b,$(B)):(n.consume(B),b)}function A(B){return B===62?V(B):b(B)}function M(B){return Xt(B)?(n.consume(B),D):s(B)}function D(B){return B===45||Vt(B)?(n.consume(B),D):T(B)}function T(B){return Le(B)?(f=T,$(B)):qe(B)?(n.consume(B),T):V(B)}function k(B){return B===45||Vt(B)?(n.consume(B),k):B===47||B===62||lt(B)?R(B):s(B)}function R(B){return B===47?(n.consume(B),V):B===58||B===95||Xt(B)?(n.consume(B),N):Le(B)?(f=R,$(B)):qe(B)?(n.consume(B),R):V(B)}function N(B){return B===45||B===46||B===58||B===95||Vt(B)?(n.consume(B),N):I(B)}function I(B){return B===61?(n.consume(B),P):Le(B)?(f=I,$(B)):qe(B)?(n.consume(B),I):R(B)}function P(B){return B===null||B===60||B===61||B===62||B===96?s(B):B===34||B===39?(n.consume(B),d=B,F):Le(B)?(f=P,$(B)):qe(B)?(n.consume(B),P):(n.consume(B),K)}function F(B){return B===d?(n.consume(B),d=void 0,W):B===null?s(B):Le(B)?(f=F,$(B)):(n.consume(B),F)}function K(B){return B===null||B===34||B===39||B===60||B===61||B===96?s(B):B===47||B===62||lt(B)?R(B):(n.consume(B),K)}function W(B){return B===47||B===62||lt(B)?R(B):s(B)}function V(B){return B===62?(n.consume(B),n.exit("htmlTextData"),n.exit("htmlText"),r):s(B)}function $(B){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(B),n.exit("lineEnding"),ee}function ee(B){return qe(B)?Ye(n,H,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):H(B)}function H(B){return n.enter("htmlTextData"),f(B)}}const th={name:"labelEnd",resolveAll:AS,resolveTo:TS,tokenize:DS},xS={tokenize:RS},ES={tokenize:MS},kS={tokenize:LS};function AS(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 d=o.type==="labelImage"?4:2;o.type="data",r+=d}}return n.length!==s.length&&_n(n,0,n.length,s),n}function TS(n,r){let s=n.length,o=0,d,v,f,a;for(;s--;)if(d=n[s][1],v){if(d.type==="link"||d.type==="labelLink"&&d._inactive)break;n[s][0]==="enter"&&d.type==="labelLink"&&(d._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(d.type==="labelImage"||d.type==="labelLink")&&!d._balanced&&(v=s,d.type!=="labelLink")){o=2;break}}else d.type==="labelEnd"&&(f=s);const c={type:n[v][1].type==="labelLink"?"link":"image",start:{...n[v][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[v][1].start},end:{...n[f][1].end}},m={type:"labelText",start:{...n[v+o+2][1].end},end:{...n[f-2][1].start}};return a=[["enter",c,r],["enter",h,r]],a=Rn(a,n.slice(v+1,v+o+3)),a=Rn(a,[["enter",m,r]]),a=Rn(a,Ga(r.parser.constructs.insideSpan.null,n.slice(v+o+4,f-3),r)),a=Rn(a,[["exit",m,r],n[f-2],n[f-1],["exit",h,r]]),a=Rn(a,n.slice(f+1)),a=Rn(a,[["exit",c,r]]),_n(n,v,n.length,a),n}function DS(n,r,s){const o=this;let d=o.events.length,v,f;for(;d--;)if((o.events[d][1].type==="labelImage"||o.events[d][1].type==="labelLink")&&!o.events[d][1]._balanced){v=o.events[d][1];break}return a;function a(_){return v?v._inactive?u(_):(f=o.parser.defined.includes(zn(o.sliceSerialize({start:v.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(_),n.exit("labelMarker"),n.exit("labelEnd"),c):s(_)}function c(_){return _===40?n.attempt(xS,m,f?m:u)(_):_===91?n.attempt(ES,m,f?h:u)(_):f?m(_):u(_)}function h(_){return n.attempt(kS,m,u)(_)}function m(_){return r(_)}function u(_){return v._balanced=!0,s(_)}}function RS(n,r,s){return o;function o(u){return n.enter("resource"),n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),d}function d(u){return lt(u)?sl(n,v)(u):v(u)}function v(u){return u===41?m(u):Gg(n,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return lt(u)?sl(n,c)(u):m(u)}function a(u){return s(u)}function c(u){return u===34||u===39||u===40?$g(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):m(u)}function h(u){return lt(u)?sl(n,m)(u):m(u)}function m(u){return u===41?(n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),n.exit("resource"),r):s(u)}}function MS(n,r,s){const o=this;return d;function d(a){return Vg.call(o,n,v,f,"reference","referenceMarker","referenceString")(a)}function v(a){return o.parser.defined.includes(zn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?r(a):s(a)}function f(a){return s(a)}}function LS(n,r,s){return o;function o(v){return n.enter("reference"),n.enter("referenceMarker"),n.consume(v),n.exit("referenceMarker"),d}function d(v){return v===93?(n.enter("referenceMarker"),n.consume(v),n.exit("referenceMarker"),n.exit("reference"),r):s(v)}}const OS={name:"labelStartImage",resolveAll:th.resolveAll,tokenize:BS};function BS(n,r,s){const o=this;return d;function d(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),v}function v(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 NS={name:"labelStartLink",resolveAll:th.resolveAll,tokenize:jS};function jS(n,r,s){const o=this;return d;function d(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),v}function v(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(f):r(f)}}const _u={name:"lineEnding",tokenize:zS};function zS(n,r){return s;function s(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ye(n,r,"linePrefix")}}const ja={name:"thematicBreak",tokenize:HS};function HS(n,r,s){let o=0,d;return v;function v(h){return n.enter("thematicBreak"),f(h)}function f(h){return d=h,a(h)}function a(h){return h===d?(n.enter("thematicBreakSequence"),c(h)):o>=3&&(h===null||Le(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===d?(n.consume(h),o++,c):(n.exit("thematicBreakSequence"),qe(h)?Ye(n,a,"whitespace")(h):a(h))}}const sn={continuation:{tokenize:FS},exit:GS,name:"list",tokenize:PS},IS={partial:!0,tokenize:VS},US={partial:!0,tokenize:qS};function PS(n,r,s){const o=this,d=o.events[o.events.length-1];let v=d&&d[1].type==="linePrefix"?d[2].sliceSerialize(d[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:Bu(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(ja,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 Bu(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(fl,o.interrupt?s:m,n.attempt(IS,_,u))}function m(w){return o.containerState.initialBlankLine=!0,v++,_(w)}function u(w){return qe(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),_):s(w)}function _(w){return o.containerState.size=v+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(w)}}function FS(n,r,s){const o=this;return o.containerState._closeFlow=void 0,n.check(fl,d,v);function d(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ye(n,r,"listItemIndent",o.containerState.size+1)(a)}function v(a){return o.containerState.furtherBlankLines||!qe(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(US,r,f)(a))}function f(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ye(n,n.attempt(sn,r,s),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function qS(n,r,s){const o=this;return Ye(n,d,"listItemIndent",o.containerState.size+1);function d(v){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(v):s(v)}}function GS(n){n.exit(this.containerState.type)}function VS(n,r,s){const o=this;return Ye(n,d,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function d(v){const f=o.events[o.events.length-1];return!qe(v)&&f&&f[1].type==="listItemPrefixWhitespace"?r(v):s(v)}}const zm={name:"setextUnderline",resolveTo:$S,tokenize:KS};function $S(n,r){let s=n.length,o,d,v;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){o=s;break}n[s][1].type==="paragraph"&&(d=s)}else n[s][1].type==="content"&&n.splice(s,1),!v&&n[s][1].type==="definition"&&(v=s);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[d][1].type="setextHeadingText",v?(n.splice(d,0,["enter",f,r]),n.splice(v+1,0,["exit",n[o][1],r]),n[o][1].end={...n[v][1].end}):n[o][1]=f,n.push(["exit",f,r]),n}function KS(n,r,s){const o=this;let d;return v;function v(h){let m=o.events.length,u;for(;m--;)if(o.events[m][1].type!=="lineEnding"&&o.events[m][1].type!=="linePrefix"&&o.events[m][1].type!=="content"){u=o.events[m][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(n.enter("setextHeadingLine"),d=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===d?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),qe(h)?Ye(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||Le(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const YS={tokenize:WS};function WS(n){const r=this,s=n.attempt(fl,o,n.attempt(this.parser.constructs.flowInitial,d,Ye(n,n.attempt(this.parser.constructs.flow,d,n.attempt(eS,d)),"linePrefix")));return s;function o(v){if(v===null){n.consume(v);return}return n.enter("lineEndingBlank"),n.consume(v),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function d(v){if(v===null){n.consume(v);return}return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const XS={resolveAll:Yg()},QS=Kg("string"),ZS=Kg("text");function Kg(n){return{resolveAll:Yg(n==="text"?JS:void 0),tokenize:r};function r(s){const o=this,d=this.parser.constructs[n],v=s.attempt(d,f,a);return f;function f(m){return h(m)?v(m):a(m)}function a(m){if(m===null){s.consume(m);return}return s.enter("data"),s.consume(m),c}function c(m){return h(m)?(s.exit("data"),v(m)):(s.consume(m),c)}function h(m){if(m===null)return!0;const u=d[m];let _=-1;if(u)for(;++_<u.length;){const w=u[_];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function Yg(n){return r;function r(s,o){let d=-1,v;for(;++d<=s.length;)v===void 0?s[d]&&s[d][1].type==="data"&&(v=d,d++):(!s[d]||s[d][1].type!=="data")&&(d!==v+2&&(s[v][1].end=s[d-1][1].end,s.splice(v+2,d-v-2),d=v+2),v=void 0);return n?n(s,o):s}}function JS(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],d=r.sliceStream(o);let v=d.length,f=-1,a=0,c;for(;v--;){const h=d[v];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){v++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(a=0),a){const h={type:s===n.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:v?f:o.start._bufferIndex+f,_index:o.start._index+v,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 eb={42:sn,43:sn,45:sn,48:sn,49:sn,50:sn,51:sn,52:sn,53:sn,54:sn,55:sn,56:sn,57:sn,62:Ug},tb={91:sS},nb={[-2]:gu,[-1]:gu,32:gu},ib={35:hS,42:ja,45:[zm,ja],60:mS,61:zm,95:ja,96:Nm,126:Nm},rb={38:Fg,92:Pg},sb={[-5]:_u,[-4]:_u,[-3]:_u,33:OS,38:Fg,42:Nu,60:[Ny,CS],91:NS,92:[cS,Pg],93:th,95:Nu,96:Yy},lb={null:[Nu,XS]},ab={null:[42,95]},ob={null:[]},cb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ab,contentInitial:tb,disable:ob,document:eb,flow:ib,flowInitial:nb,insideSpan:lb,string:rb,text:sb},Symbol.toStringTag,{value:"Module"}));function ub(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 d={},v=[];let f=[],a=[];const c={attempt:T(M),check:T(D),consume:g,enter:b,exit:A,interrupt:T(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:E,parser:n,previous:null,sliceSerialize:_,sliceStream:w,write:u};let m=r.tokenize.call(h,c);return r.resolveAll&&v.push(r),h;function u(I){return f=Rn(f,I),y(),f[f.length-1]!==null?[]:(k(r,0),h.events=Ga(v,h.events,h),h.events)}function _(I,P){return fb(w(I),P)}function w(I){return hb(f,I)}function E(){const{_bufferIndex:I,_index:P,line:F,column:K,offset:W}=o;return{_bufferIndex:I,_index:P,line:F,column:K,offset:W}}function x(I){d[I.line]=I.column,N()}function y(){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){m=m(I)}function g(I){Le(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 b(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(K,W,V){let $,ee,H,B;return Array.isArray(K)?G(K):"tokenize"in K?G([K]):z(K);function z(me){return Y;function Y(q){const oe=q!==null&&me[q],Z=q!==null&&me.null,ie=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return G(ie)(q)}}function G(me){return $=me,ee=0,me.length===0?V:j(me[ee])}function j(me){return Y;function Y(q){return B=R(),H=me,me.partial||(h.currentConstruct=me),me.name&&h.parser.constructs.disable.null.includes(me.name)?he():me.tokenize.call(P?Object.assign(Object.create(h),P):h,c,te,he)(q)}}function te(me){return I(H,B),W}function he(me){return B.restore(),++ee<$.length?j($[ee]):V}}}function k(I,P){I.resolveAll&&!v.includes(I)&&v.push(I),I.resolve&&_n(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,K=h.events.length,W=Array.from(a);return{from:K,restore:V};function V(){o=I,h.previous=P,h.currentConstruct=F,h.events.length=K,a=W,N()}}function N(){o.line in d&&o.column<2&&(o.column=d[o.line],o.offset+=d[o.line]-1)}}function hb(n,r){const s=r.start._index,o=r.start._bufferIndex,d=r.end._index,v=r.end._bufferIndex;let f;if(s===d)f=[n[s].slice(o,v)];else{if(f=n.slice(s,d),o>-1){const a=f[0];typeof a=="string"?f[0]=a.slice(o):f.shift()}v>0&&f.push(n[d].slice(0,v))}return f}function fb(n,r){let s=-1;const o=[];let d;for(;++s<n.length;){const v=n[s];let f;if(typeof v=="string")f=v;else switch(v){case-5:{f="\r";break}case-4:{f=`
|
|
62
|
-
`;break}case-3:{f=`\r
|
|
63
|
-
`;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&d)continue;f=" ";break}default:f=String.fromCharCode(v)}d=v===-2,o.push(f)}return o.join("")}function db(n){const o={constructs:Hg([cb,...(n||{}).extensions||[]]),content:d(Ty),defined:[],document:d(Ry),flow:d(YS),lazy:{},string:d(QS),text:d(ZS)};return o;function d(v){return f;function f(a){return ub(o,v,a)}}}function pb(n){for(;!qg(n););return n}const Hm=/[\0\t\n\r]/g;function mb(){let n=1,r="",s=!0,o;return d;function d(v,f,a){const c=[];let h,m,u,_,w;for(v=r+(typeof v=="string"?v.toString():new TextDecoder(f||void 0).decode(v)),u=0,r="",s&&(v.charCodeAt(0)===65279&&u++,s=void 0);u<v.length;){if(Hm.lastIndex=u,h=Hm.exec(v),_=h&&h.index!==void 0?h.index:v.length,w=v.charCodeAt(_),!h){r=v.slice(u);break}if(w===10&&u===_&&o)c.push(-3),o=void 0;else switch(o&&(c.push(-5),o=void 0),u<_&&(c.push(v.slice(u,_)),n+=_-u),w){case 0:{c.push(65533),n++;break}case 9:{for(m=Math.ceil(n/4)*4,c.push(-2);n++<m;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:o=!0,n=1}u=_+1}return a&&(o&&c.push(-5),r&&c.push(r),c.push(null)),c}}const gb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _b(n){return n.replace(gb,vb)}function vb(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const d=s.charCodeAt(1),v=d===120||d===88;return Ig(s.slice(v?2:1),v?16:10)}return eh(s)||n}const Wg={}.hasOwnProperty;function yb(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),Sb(s)(pb(db(s).document().write(mb()(n,r,!0))))}function Sb(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:v(Ct),autolinkProtocol:R,autolinkEmail:R,atxHeading:v($e),blockQuote:v(Z),characterEscape:R,characterReference:R,codeFenced:v(ie),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:v(ie,f),codeText:v(de,f),codeTextData:R,data:R,codeFlowValue:R,definition:v(Ce),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:v(we),hardBreakEscape:v(at),hardBreakTrailing:v(at),htmlFlow:v(Re,f),htmlFlowData:R,htmlText:v(Re,f),htmlTextData:R,image:v(Ot),label:f,link:v(Ct),listItem:v(Kt),listItemValue:_,listOrdered:v(jt,u),listUnordered:v(jt),paragraph:v(Yt),reference:j,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:v($e),strong:v(dt),thematicBreak:v(wt)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:oe,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:me,characterReference:Y,codeFenced:c(y),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:b,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(F),htmlFlowData:N,htmlText:c(K),htmlTextData:N,image:c($),label:H,labelText:ee,lineEnding:I,link:c(V),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:te,resourceDestinationString:B,resourceTitleString:z,resource:G,setextHeading:c(k),setextHeadingLineSequence:T,setextHeadingText:D,strong:c(),thematicBreak:c()}};Xg(r,(n||{}).mdastExtensions||[]);const s={};return o;function o(ue){let ye={type:"root",children:[]};const xe={stack:[ye],tokenStack:[],config:r,enter:a,exit:h,buffer:f,resume:m,data:s},Me=[];let Be=-1;for(;++Be<ue.length;)if(ue[Be][1].type==="listOrdered"||ue[Be][1].type==="listUnordered")if(ue[Be][0]==="enter")Me.push(Be);else{const pt=Me.pop();Be=d(ue,pt,Be)}for(Be=-1;++Be<ue.length;){const pt=r[ue[Be][0]];Wg.call(pt,ue[Be][1].type)&&pt[ue[Be][1].type].call(Object.assign({sliceSerialize:ue[Be][2].sliceSerialize},xe),ue[Be][1])}if(xe.tokenStack.length>0){const pt=xe.tokenStack[xe.tokenStack.length-1];(pt[1]||Im).call(xe,void 0,pt[0])}for(ye.position={start:qi(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:qi(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<r.transforms.length;)ye=r.transforms[Be](ye)||ye;return ye}function d(ue,ye,xe){let Me=ye-1,Be=-1,pt=!1,je,ot,We,Bt;for(;++Me<=xe;){const Ee=ue[Me];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ee[0]==="enter"?Be++:Be--,Bt=void 0;break}case"lineEndingBlank":{Ee[0]==="enter"&&(je&&!Bt&&!Be&&!We&&(We=Me),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Be&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||Be===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if(je){let an=Me;for(ot=void 0;an--;){const Qt=ue[an];if(Qt[1].type==="lineEnding"||Qt[1].type==="lineEndingBlank"){if(Qt[0]==="exit")continue;ot&&(ue[ot][1].type="lineEndingBlank",pt=!0),Qt[1].type="lineEnding",ot=an}else if(!(Qt[1].type==="linePrefix"||Qt[1].type==="blockQuotePrefix"||Qt[1].type==="blockQuotePrefixWhitespace"||Qt[1].type==="blockQuoteMarker"||Qt[1].type==="listItemIndent"))break}We&&(!ot||We<ot)&&(je._spread=!0),je.end=Object.assign({},ot?ue[ot][1].start:Ee[1].end),ue.splice(ot||Me,0,["exit",je,Ee[2]]),Me++,xe++}if(Ee[1].type==="listItemPrefix"){const an={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};je=an,ue.splice(Me,0,["enter",an,Ee[2]]),Me++,xe++,We=void 0,Bt=!0}}}return ue[ye][1]._spread=pt,xe}function v(ue,ye){return xe;function xe(Me){a.call(this,ue(Me),Me),ye&&ye.call(this,Me)}}function f(){this.stack.push({type:"fragment",children:[]})}function a(ue,ye,xe){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([ye,xe||void 0]),ue.position={start:qi(ye.start),end:void 0}}function c(ue){return ye;function ye(xe){ue&&ue.call(this,xe),h.call(this,xe)}}function h(ue,ye){const xe=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==ue.type&&(ye?ye.call(this,ue,Me[0]):(Me[1]||Im).call(this,ue,Me[0]));else throw new Error("Cannot close `"+ue.type+"` ("+rl({start:ue.start,end:ue.end})+"): it’s not open");xe.position.end=qi(ue.end)}function m(){return Ju(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function _(ue){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=ue}function E(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=ue}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue.replace(/(\r?\n|\r)$/g,"")}function g(ue){const ye=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ye,xe.identifier=zn(this.sliceSerialize(ue)).toLowerCase()}function b(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ue}function A(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ue}function M(ue){const ye=this.stack[this.stack.length-1];if(!ye.depth){const xe=this.sliceSerialize(ue).length;ye.depth=xe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function T(ue){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function R(ue){const xe=this.stack[this.stack.length-1].children;let Me=xe[xe.length-1];(!Me||Me.type!=="text")&&(Me=Je(),Me.position={start:qi(ue.start),end:void 0},xe.push(Me)),this.stack.push(Me)}function N(ue){const ye=this.stack.pop();ye.value+=this.sliceSerialize(ue),ye.position.end=qi(ue.end)}function I(ue){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ye.children[ye.children.length-1];xe.position.end=qi(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(ye.type)&&(R.call(this,ue),N.call(this,ue))}function P(){this.data.atHardBreak=!0}function F(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue}function K(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue}function W(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue}function V(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ye,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function $(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ye,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function ee(ue){const ye=this.sliceSerialize(ue),xe=this.stack[this.stack.length-2];xe.label=_b(ye),xe.identifier=zn(ye).toLowerCase()}function H(){const ue=this.stack[this.stack.length-1],ye=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Me=ue.children;xe.children=Me}else xe.alt=ye}function B(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ue}function z(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ue}function G(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function te(ue){const ye=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ye,xe.identifier=zn(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function he(ue){this.data.characterReferenceType=ue.type}function me(ue){const ye=this.sliceSerialize(ue),xe=this.data.characterReferenceType;let Me;xe?(Me=Ig(ye,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=eh(ye);const Be=this.stack[this.stack.length-1];Be.value+=Me}function Y(ue){const ye=this.stack.pop();ye.position.end=qi(ue.end)}function q(ue){N.call(this,ue);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(ue)}function oe(ue){N.call(this,ue);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(ue)}function Z(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function Re(){return{type:"html",value:""}}function Ot(){return{type:"image",title:null,url:"",alt:null}}function Ct(){return{type:"link",title:null,url:"",children:[]}}function jt(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function Kt(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Yt(){return{type:"paragraph",children:[]}}function dt(){return{type:"strong",children:[]}}function Je(){return{type:"text",value:""}}function wt(){return{type:"thematicBreak"}}}function qi(n){return{line:n.line,column:n.column,offset:n.offset}}function Xg(n,r){let s=-1;for(;++s<r.length;){const o=r[s];Array.isArray(o)?Xg(n,o):bb(n,o)}}function bb(n,r){let s;for(s in r)if(Wg.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 Im(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+rl({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+rl({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+rl({start:r.start,end:r.end})+") is still open")}function Cb(n){const r=this;r.parser=s;function s(o){return yb(o,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function wb(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 xb(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
|
|
64
|
-
`}]}function Eb(n,r){const s=r.value?r.value+`
|
|
65
|
-
`:"",o={},d=r.lang?r.lang.split(/\s+/):[];d.length>0&&(o.className=["language-"+d[0]]);let v={type:"element",tagName:"code",properties:o,children:[{type:"text",value:s}]};return r.meta&&(v.data={meta:r.meta}),n.patch(r,v),v=n.applyData(r,v),v={type:"element",tagName:"pre",properties:{},children:[v]},n.patch(r,v),v}function kb(n,r){const s={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Ab(n,r){const s={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Tb(n,r){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(r.identifier).toUpperCase(),d=ls(o.toLowerCase()),v=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=v+1,a+=1,n.footnoteCounts.set(o,a);const c={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+d,id:s+"fnref-"+d+(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 Db(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 Rb(n,r){if(n.options.allowDangerousHtml){const s={type:"raw",value:r.value};return n.patch(r,s),n.applyData(r,s)}}function Qg(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 d=n.all(r),v=d[0];v&&v.type==="text"?v.value="["+v.value:d.unshift({type:"text",value:"["});const f=d[d.length-1];return f&&f.type==="text"?f.value+=o:d.push({type:"text",value:o}),d}function Mb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return Qg(n,r);const d={src:ls(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(d.title=o.title);const v={type:"element",tagName:"img",properties:d,children:[]};return n.patch(r,v),n.applyData(r,v)}function Lb(n,r){const s={src:ls(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 Ob(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 Bb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return Qg(n,r);const d={href:ls(o.url||"")};o.title!==null&&o.title!==void 0&&(d.title=o.title);const v={type:"element",tagName:"a",properties:d,children:n.all(r)};return n.patch(r,v),n.applyData(r,v)}function Nb(n,r){const s={href:ls(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 jb(n,r,s){const o=n.all(r),d=s?zb(s):Zg(r),v={},f=[];if(typeof r.checked=="boolean"){const m=o[0];let u;m&&m.type==="element"&&m.tagName==="p"?u=m:(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:[]}),v.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const m=o[a];(d||a!==0||m.type!=="element"||m.tagName!=="p")&&f.push({type:"text",value:`
|
|
66
|
-
`}),m.type==="element"&&m.tagName==="p"&&!d?f.push(...m.children):f.push(m)}const c=o[o.length-1];c&&(d||c.type!=="element"||c.tagName!=="p")&&f.push({type:"text",value:`
|
|
67
|
-
`});const h={type:"element",tagName:"li",properties:v,children:f};return n.patch(r,h),n.applyData(r,h)}function zb(n){let r=!1;if(n.type==="list"){r=n.spread||!1;const s=n.children;let o=-1;for(;!r&&++o<s.length;)r=Zg(s[o])}return r}function Zg(n){const r=n.spread;return r??n.children.length>1}function Hb(n,r){const s={},o=n.all(r);let d=-1;for(typeof r.start=="number"&&r.start!==1&&(s.start=r.start);++d<o.length;){const f=o[d];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 v={type:"element",tagName:r.ordered?"ol":"ul",properties:s,children:n.wrap(o,!0)};return n.patch(r,v),n.applyData(r,v)}function Ib(n,r){const s={type:"element",tagName:"p",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Ub(n,r){const s={type:"root",children:n.wrap(n.all(r))};return n.patch(r,s),n.applyData(r,s)}function Pb(n,r){const s={type:"element",tagName:"strong",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Fb(n,r){const s=n.all(r),o=s.shift(),d=[];if(o){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(r.children[0],f),d.push(f)}if(s.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(s,!0)},a=Wu(r.children[1]),c=Mg(r.children[r.children.length-1]);a&&c&&(f.position={start:a,end:c}),d.push(f)}const v={type:"element",tagName:"table",properties:{},children:n.wrap(d,!0)};return n.patch(r,v),n.applyData(r,v)}function qb(n,r,s){const o=s?s.children:void 0,v=(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],_={},w=f?f[c]:void 0;w&&(_.align=w);let E={type:"element",tagName:v,properties:_,children:[]};u&&(E.children=n.all(u),n.patch(u,E),E=n.applyData(u,E)),h.push(E)}const m={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(r,m),n.applyData(r,m)}function Gb(n,r){const s={type:"element",tagName:"td",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}const Um=9,Pm=32;function Vb(n){const r=String(n),s=/\r?\n|\r/g;let o=s.exec(r),d=0;const v=[];for(;o;)v.push(Fm(r.slice(d,o.index),d>0,!0),o[0]),d=o.index+o[0].length,o=s.exec(r);return v.push(Fm(r.slice(d),d>0,!1)),v.join("")}function Fm(n,r,s){let o=0,d=n.length;if(r){let v=n.codePointAt(o);for(;v===Um||v===Pm;)o++,v=n.codePointAt(o)}if(s){let v=n.codePointAt(d-1);for(;v===Um||v===Pm;)d--,v=n.codePointAt(d-1)}return d>o?n.slice(o,d):""}function $b(n,r){const s={type:"text",value:Vb(String(r.value))};return n.patch(r,s),n.applyData(r,s)}function Kb(n,r){const s={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,s),n.applyData(r,s)}const Yb={blockquote:wb,break:xb,code:Eb,delete:kb,emphasis:Ab,footnoteReference:Tb,heading:Db,html:Rb,imageReference:Mb,image:Lb,inlineCode:Ob,linkReference:Bb,link:Nb,listItem:jb,list:Hb,paragraph:Ib,root:Ub,strong:Pb,table:Fb,tableCell:Gb,tableRow:qb,text:$b,thematicBreak:Kb,toml:Ra,yaml:Ra,definition:Ra,footnoteDefinition:Ra};function Ra(){}const Jg=-1,Va=0,ll=1,Ha=2,nh=3,ih=4,rh=5,sh=6,e_=7,t_=8,Wb=typeof self=="object"?self:globalThis,qm=(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 Wb[n](r)},Xb=(n,r)=>{const s=(d,v)=>(n.set(v,d),d),o=d=>{if(n.has(d))return n.get(d);const[v,f]=r[d];switch(v){case Va:case Jg:return s(f,d);case ll:{const a=s([],d);for(const c of f)a.push(o(c));return a}case Ha:{const a=s({},d);for(const[c,h]of f)a[o(c)]=o(h);return a}case nh:return s(new Date(f),d);case ih:{const{source:a,flags:c}=f;return s(new RegExp(a,c),d)}case rh:{const a=s(new Map,d);for(const[c,h]of f)a.set(o(c),o(h));return a}case sh:{const a=s(new Set,d);for(const c of f)a.add(o(c));return a}case e_:{const{name:a,message:c}=f;return s(qm(a,c),d)}case t_:return s(BigInt(f),d);case"BigInt":return s(Object(BigInt(f)),d);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(qm(v,f),d)};return o},Gm=n=>Xb(new Map,n)(0),Jr="",{toString:Qb}={},{keys:Zb}=Object,nl=n=>{const r=typeof n;if(r!=="object"||!n)return[Va,r];const s=Qb.call(n).slice(8,-1);switch(s){case"Array":return[ll,Jr];case"Object":return[Ha,Jr];case"Date":return[nh,Jr];case"RegExp":return[ih,Jr];case"Map":return[rh,Jr];case"Set":return[sh,Jr];case"DataView":return[ll,s]}return s.includes("Array")?[ll,s]:s.includes("Error")?[e_,s]:[Ha,s]},Ma=([n,r])=>n===Va&&(r==="function"||r==="symbol"),Jb=(n,r,s,o)=>{const d=(f,a)=>{const c=o.push(f)-1;return s.set(a,c),c},v=f=>{if(s.has(f))return s.get(f);let[a,c]=nl(f);switch(a){case Va:{let m=f;switch(c){case"bigint":a=t_,m=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);m=null;break;case"undefined":return d([Jg],f)}return d([a,m],f)}case ll:{if(c){let _=f;return c==="DataView"?_=new Uint8Array(f.buffer):c==="ArrayBuffer"&&(_=new Uint8Array(f)),d([c,[..._]],f)}const m=[],u=d([a,m],f);for(const _ of f)m.push(v(_));return u}case Ha:{if(c)switch(c){case"BigInt":return d([c,f.toString()],f);case"Boolean":case"Number":case"String":return d([c,f.valueOf()],f)}if(r&&"toJSON"in f)return v(f.toJSON());const m=[],u=d([a,m],f);for(const _ of Zb(f))(n||!Ma(nl(f[_])))&&m.push([v(_),v(f[_])]);return u}case nh:return d([a,f.toISOString()],f);case ih:{const{source:m,flags:u}=f;return d([a,{source:m,flags:u}],f)}case rh:{const m=[],u=d([a,m],f);for(const[_,w]of f)(n||!(Ma(nl(_))||Ma(nl(w))))&&m.push([v(_),v(w)]);return u}case sh:{const m=[],u=d([a,m],f);for(const _ of f)(n||!Ma(nl(_)))&&m.push(v(_));return u}}const{message:h}=f;return d([a,{name:c,message:h}],f)};return v},Vm=(n,{json:r,lossy:s}={})=>{const o=[];return Jb(!(r||s),!!r,new Map,o)(n),o},Ia=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?Gm(Vm(n,r)):structuredClone(n):(n,r)=>Gm(Vm(n,r));function eC(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 tC(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function nC(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",s=n.options.footnoteBackContent||eC,o=n.options.footnoteBackLabel||tC,d=n.options.footnoteLabel||"Footnotes",v=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 m=n.all(h),u=String(h.identifier).toUpperCase(),_=ls(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-"+_+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(c,w),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=m[m.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...E)}else m.push(...E);const S={type:"element",tagName:"li",properties:{id:r+"fn-"+_},children:n.wrap(m,!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:v,properties:{...Ia(f),id:"footnote-label"},children:[{type:"text",value:d}]},{type:"text",value:`
|
|
68
|
-
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
|
|
69
|
-
`}]}}const $a=(function(n){if(n==null)return lC;if(typeof n=="function")return Ka(n);if(typeof n=="object")return Array.isArray(n)?iC(n):rC(n);if(typeof n=="string")return sC(n);throw new Error("Expected function, string, or object as test")});function iC(n){const r=[];let s=-1;for(;++s<n.length;)r[s]=$a(n[s]);return Ka(o);function o(...d){let v=-1;for(;++v<r.length;)if(r[v].apply(this,d))return!0;return!1}}function rC(n){const r=n;return Ka(s);function s(o){const d=o;let v;for(v in n)if(d[v]!==r[v])return!1;return!0}}function sC(n){return Ka(r);function r(s){return s&&s.type===n}}function Ka(n){return r;function r(s,o,d){return!!(aC(s)&&n.call(this,s,typeof o=="number"?o:void 0,d||void 0))}}function lC(){return!0}function aC(n){return n!==null&&typeof n=="object"&&"type"in n}const n_=[],oC=!0,ju=!1,cC="skip";function i_(n,r,s,o){let d;typeof r=="function"&&typeof s!="function"?(o=s,s=r):d=r;const v=$a(d),f=o?-1:1;a(n,void 0,[])();function a(c,h,m){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(_,"name",{value:"node ("+(c.type+(w?"<"+w+">":""))+")"})}return _;function _(){let w=n_,E,x,y;if((!r||v(c,h,m[m.length-1]||void 0))&&(w=uC(s(c,m)),w[0]===ju))return w;if("children"in c&&c.children){const S=c;if(S.children&&w[0]!==cC)for(x=(o?S.children.length:-1)+f,y=m.concat(S);x>-1&&x<S.children.length;){const g=S.children[x];if(E=a(g,x,y)(),E[0]===ju)return E;x=typeof E[1]=="number"?E[1]:x+f}}return w}}}function uC(n){return Array.isArray(n)?n:typeof n=="number"?[oC,n]:n==null?n_:[n]}function lh(n,r,s,o){let d,v,f;typeof r=="function"&&typeof s!="function"?(v=void 0,f=r,d=s):(v=r,f=s,d=o),i_(n,v,a,d);function a(c,h){const m=h[h.length-1],u=m?m.children.indexOf(c):void 0;return f(c,u,m)}}const zu={}.hasOwnProperty,hC={};function fC(n,r){const s=r||hC,o=new Map,d=new Map,v=new Map,f={...Yb,...s.handlers},a={all:h,applyData:pC,definitionById:o,footnoteById:d,footnoteCounts:v,footnoteOrder:[],handlers:f,one:c,options:s,patch:dC,wrap:gC};return lh(n,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const u=m.type==="definition"?o:d,_=String(m.identifier).toUpperCase();u.has(_)||u.set(_,m)}}),a;function c(m,u){const _=m.type,w=a.handlers[_];if(zu.call(a.handlers,_)&&w)return w(a,m,u);if(a.options.passThrough&&a.options.passThrough.includes(_)){if("children"in m){const{children:x,...y}=m,S=Ia(y);return S.children=a.all(m),S}return Ia(m)}return(a.options.unknownHandler||mC)(a,m,u)}function h(m){const u=[];if("children"in m){const _=m.children;let w=-1;for(;++w<_.length;){const E=a.one(_[w],m);if(E){if(w&&_[w-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=$m(E.value)),!Array.isArray(E)&&E.type==="element")){const x=E.children[0];x&&x.type==="text"&&(x.value=$m(x.value))}Array.isArray(E)?u.push(...E):u.push(E)}}}return u}}function dC(n,r){n.position&&(r.position=ey(n))}function pC(n,r){let s=r;if(n&&n.data){const o=n.data.hName,d=n.data.hChildren,v=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"&&v&&Object.assign(s.properties,Ia(v)),"children"in s&&s.children&&d!==null&&d!==void 0&&(s.children=d)}return s}function mC(n,r){const s=r.data||{},o="value"in r&&!(zu.call(s,"hProperties")||zu.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 gC(n,r){const s=[];let o=-1;for(r&&s.push({type:"text",value:`
|
|
70
|
-
`});++o<n.length;)o&&s.push({type:"text",value:`
|
|
71
|
-
`}),s.push(n[o]);return r&&n.length>0&&s.push({type:"text",value:`
|
|
72
|
-
`}),s}function $m(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function Km(n,r){const s=fC(n,r),o=s.one(n,void 0),d=nC(s),v=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return d&&v.children.push({type:"text",value:`
|
|
73
|
-
`},d),v}function _C(n,r){return n&&"run"in n?async function(s,o){const d=Km(s,{file:o,...r});await n.run(d,o)}:function(s,o){return Km(s,{file:o,...n||r})}}function Ym(n){if(n)throw n}var vu,Wm;function vC(){if(Wm)return vu;Wm=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,d=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},v=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var m=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!u)return!1;var _;for(_ in h);return typeof _>"u"||n.call(h,_)},f=function(h,m){s&&m.name==="__proto__"?s(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},a=function(h,m){if(m==="__proto__")if(n.call(h,m)){if(o)return o(h,m).value}else return;return h[m]};return vu=function c(){var h,m,u,_,w,E,x=arguments[0],y=1,S=arguments.length,g=!1;for(typeof x=="boolean"&&(g=x,x=arguments[1]||{},y=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});y<S;++y)if(h=arguments[y],h!=null)for(m in h)u=a(x,m),_=a(h,m),x!==_&&(g&&_&&(v(_)||(w=d(_)))?(w?(w=!1,E=u&&d(u)?u:[]):E=u&&v(u)?u:{},f(x,{name:m,newValue:c(g,E,_)})):typeof _<"u"&&f(x,{name:m,newValue:_}));return x},vu}var yC=vC();const yu=gg(yC);function Hu(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 SC(){const n=[],r={run:s,use:o};return r;function s(...d){let v=-1;const f=d.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);a(null,...d);function a(c,...h){const m=n[++v];let u=-1;if(c){f(c);return}for(;++u<d.length;)(h[u]===null||h[u]===void 0)&&(h[u]=d[u]);d=h,m?bC(m,a)(...h):f(null,...h)}}function o(d){if(typeof d!="function")throw new TypeError("Expected `middelware` to be a function, not "+d);return n.push(d),r}}function bC(n,r){let s;return o;function o(...f){const a=n.length>f.length;let c;a&&f.push(d);try{c=n.apply(this,f)}catch(h){const m=h;if(a&&s)throw m;return d(m)}a||(c&&c.then&&typeof c.then=="function"?c.then(v,d):c instanceof Error?d(c):v(c))}function d(f,...a){s||(s=!0,r(f,...a))}function v(f){d(null,f)}}const Vn={basename:CC,dirname:wC,extname:xC,join:EC,sep:"/"};function CC(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');dl(n);let s=0,o=-1,d=n.length,v;if(r===void 0||r.length===0||r.length>n.length){for(;d--;)if(n.codePointAt(d)===47){if(v){s=d+1;break}}else o<0&&(v=!0,o=d+1);return o<0?"":n.slice(s,o)}if(r===n)return"";let f=-1,a=r.length-1;for(;d--;)if(n.codePointAt(d)===47){if(v){s=d+1;break}}else f<0&&(v=!0,f=d+1),a>-1&&(n.codePointAt(d)===r.codePointAt(a--)?a<0&&(o=d):(a=-1,o=f));return s===o?o=f:o<0&&(o=n.length),n.slice(s,o)}function wC(n){if(dl(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 xC(n){dl(n);let r=n.length,s=-1,o=0,d=-1,v=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?d<0?d=r:v!==1&&(v=1):d>-1&&(v=-1)}return d<0||s<0||v===0||v===1&&d===s-1&&d===o+1?"":n.slice(d,s)}function EC(...n){let r=-1,s;for(;++r<n.length;)dl(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":kC(s)}function kC(n){dl(n);const r=n.codePointAt(0)===47;let s=AC(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function AC(n,r){let s="",o=0,d=-1,v=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(!(d===f-1||v===1))if(d!==f-1&&v===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("/")),d=f,v=0;continue}}else if(s.length>0){s="",o=0,d=f,v=0;continue}}r&&(s=s.length>0?s+"/..":"..",o=2)}else s.length>0?s+="/"+n.slice(d+1,f):s=n.slice(d+1,f),o=f-d-1;d=f,v=0}else a===46&&v>-1?v++:v=-1}return s}function dl(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const TC={cwd:DC};function DC(){return"/"}function Iu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function RC(n){if(typeof n=="string")n=new URL(n);else if(!Iu(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 MC(n)}function MC(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 d=new TypeError("File URL path must not include encoded / characters");throw d.code="ERR_INVALID_FILE_URL_PATH",d}}return decodeURIComponent(r)}const Su=["history","path","basename","stem","extname","dirname"];class r_{constructor(r){let s;r?Iu(r)?s={path:r}:typeof r=="string"||LC(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":TC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Su.length;){const v=Su[o];v in s&&s[v]!==void 0&&s[v]!==null&&(this[v]=v==="history"?[...s[v]]:s[v])}let d;for(d in s)Su.includes(d)||(this[d]=s[d])}get basename(){return typeof this.path=="string"?Vn.basename(this.path):void 0}set basename(r){Cu(r,"basename"),bu(r,"basename"),this.path=Vn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Vn.dirname(this.path):void 0}set dirname(r){Xm(this.basename,"dirname"),this.path=Vn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Vn.extname(this.path):void 0}set extname(r){if(bu(r,"extname"),Xm(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=Vn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Iu(r)&&(r=RC(r)),Cu(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Vn.basename(this.path,this.extname):void 0}set stem(r){Cu(r,"stem"),bu(r,"stem"),this.path=Vn.join(this.dirname||"",r+(this.extname||""))}fail(r,s,o){const d=this.message(r,s,o);throw d.fatal=!0,d}info(r,s,o){const d=this.message(r,s,o);return d.fatal=void 0,d}message(r,s,o){const d=new $t(r,s,o);return this.path&&(d.name=this.path+":"+d.name,d.file=this.path),d.fatal=!1,this.messages.push(d),d}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function bu(n,r){if(n&&n.includes(Vn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Vn.sep+"`")}function Cu(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function Xm(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function LC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const OC=(function(n){const o=this.constructor.prototype,d=o[n],v=function(){return d.apply(v,arguments)};return Object.setPrototypeOf(v,o),v}),BC={}.hasOwnProperty;class ah extends OC{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=SC()}copy(){const r=new ah;let s=-1;for(;++s<this.attachers.length;){const o=this.attachers[s];r.use(...o)}return r.data(yu(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(Eu("data",this.frozen),this.namespace[r]=s,this):BC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(Eu("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 d=s.call(r,...o);typeof d=="function"&&this.transformers.use(d)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=La(r),o=this.parser||this.Parser;return wu("parse",o),o(String(s),s)}process(r,s){const o=this;return this.freeze(),wu("process",this.parser||this.Parser),xu("process",this.compiler||this.Compiler),s?d(void 0,s):new Promise(d);function d(v,f){const a=La(r),c=o.parse(a);o.run(c,a,function(m,u,_){if(m||!u||!_)return h(m);const w=u,E=o.stringify(w,_);zC(E)?_.value=E:_.result=E,h(m,_)});function h(m,u){m||!u?f(m):v?v(u):s(void 0,u)}}}processSync(r){let s=!1,o;return this.freeze(),wu("processSync",this.parser||this.Parser),xu("processSync",this.compiler||this.Compiler),this.process(r,d),Zm("processSync","process",s),o;function d(v,f){s=!0,Ym(v),o=f}}run(r,s,o){Qm(r),this.freeze();const d=this.transformers;return!o&&typeof s=="function"&&(o=s,s=void 0),o?v(void 0,o):new Promise(v);function v(f,a){const c=La(s);d.run(r,c,h);function h(m,u,_){const w=u||r;m?a(m):f?f(w):o(void 0,w,_)}}}runSync(r,s){let o=!1,d;return this.run(r,s,v),Zm("runSync","run",o),d;function v(f,a){Ym(f),d=a,o=!0}}stringify(r,s){this.freeze();const o=La(s),d=this.compiler||this.Compiler;return xu("stringify",d),Qm(r),d(r,o)}use(r,...s){const o=this.attachers,d=this.namespace;if(Eu("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 v(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...u]=h;c(m,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&&(d.settings=yu(!0,d.settings,h.settings))}function a(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const u=h[m];v(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,m){let u=-1,_=-1;for(;++u<o.length;)if(o[u][0]===h){_=u;break}if(_===-1)o.push([h,...m]);else if(m.length>0){let[w,...E]=m;const x=o[_][1];Hu(x)&&Hu(w)&&(w=yu(!0,x,w)),o[_]=[h,w,...E]}}}}const NC=new ah().freeze();function wu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function xu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Eu(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 Qm(n){if(!Hu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Zm(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function La(n){return jC(n)?n:new r_(n)}function jC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function zC(n){return typeof n=="string"||HC(n)}function HC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const IC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Jm=[],eg={allowDangerousHtml:!0},UC=/^(https?|ircs?|mailto|xmpp)$/i,PC=[{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 s_(n){const r=FC(n),s=qC(n);return GC(r.runSync(r.parse(s),s),n)}function FC(n){const r=n.rehypePlugins||Jm,s=n.remarkPlugins||Jm,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...eg}:eg;return NC().use(Cb).use(s).use(_C,o).use(r)}function qC(n){const r=n.children||"",s=new r_;return typeof r=="string"&&(s.value=r),s}function GC(n,r){const s=r.allowedElements,o=r.allowElement,d=r.components,v=r.disallowedElements,f=r.skipHtml,a=r.unwrapDisallowed,c=r.urlTransform||VC;for(const m of PC)Object.hasOwn(r,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+IC+m.id,void 0);return lh(n,h),sy(n,{Fragment:O.Fragment,components:d,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function h(m,u,_){if(m.type==="raw"&&_&&typeof u=="number")return f?_.children.splice(u,1):_.children[u]={type:"text",value:m.value},u;if(m.type==="element"){let w;for(w in mu)if(Object.hasOwn(mu,w)&&Object.hasOwn(m.properties,w)){const E=m.properties[w],x=mu[w];(x===null||x.includes(m.tagName))&&(m.properties[w]=c(String(E||""),w,m))}}if(m.type==="element"){let w=s?!s.includes(m.tagName):v?v.includes(m.tagName):!1;if(!w&&o&&typeof u=="number"&&(w=!o(m,u,_)),w&&_&&typeof u=="number")return a&&m.children?_.children.splice(u,1,...m.children):_.children.splice(u,1),u}}}function VC(n){const r=n.indexOf(":"),s=n.indexOf("?"),o=n.indexOf("#"),d=n.indexOf("/");return r===-1||d!==-1&&r>d||s!==-1&&r>s||o!==-1&&r>o||UC.test(n.slice(0,r))?n:""}function tg(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let o=0,d=s.indexOf(r);for(;d!==-1;)o++,d=s.indexOf(r,d+r.length);return o}function $C(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function KC(n,r,s){const d=$a((s||{}).ignore||[]),v=YC(r);let f=-1;for(;++f<v.length;)i_(n,"text",a);function a(h,m){let u=-1,_;for(;++u<m.length;){const w=m[u],E=_?_.children:void 0;if(d(w,E?E.indexOf(w):void 0,_))return;_=w}if(_)return c(h,m)}function c(h,m){const u=m[m.length-1],_=v[f][0],w=v[f][1];let E=0;const y=u.children.indexOf(h);let S=!1,g=[];_.lastIndex=0;let b=_.exec(h.value);for(;b;){const A=b.index,M={index:b.index,input:b.input,stack:[...m,h]};let D=w(...b,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?_.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+b[0].length,S=!0),!_.global)break;b=_.exec(h.value)}return S?(E<h.value.length&&g.push({type:"text",value:h.value.slice(E)}),u.children.splice(y,1,...g)):g=[h],y+g.length}}function YC(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 d=s[o];r.push([WC(d[0]),XC(d[1])])}return r}function WC(n){return typeof n=="string"?new RegExp($C(n),"g"):n}function XC(n){return typeof n=="function"?n:function(){return n}}const ku="phrasing",Au=["autolink","link","image","label"];function QC(){return{transforms:[rw],enter:{literalAutolink:JC,literalAutolinkEmail:Tu,literalAutolinkHttp:Tu,literalAutolinkWww:Tu},exit:{literalAutolink:iw,literalAutolinkEmail:nw,literalAutolinkHttp:ew,literalAutolinkWww:tw}}}function ZC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ku,notInConstruct:Au},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ku,notInConstruct:Au},{character:":",before:"[ps]",after:"\\/",inConstruct:ku,notInConstruct:Au}]}}function JC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function Tu(n){this.config.enter.autolinkProtocol.call(this,n)}function ew(n){this.config.exit.autolinkProtocol.call(this,n)}function tw(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 nw(n){this.config.exit.autolinkEmail.call(this,n)}function iw(n){this.exit(n)}function rw(n){KC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lw]],{ignore:["link","linkReference"]})}function sw(n,r,s,o,d){let v="";if(!l_(d)||(/^w/i.test(r)&&(s=r+s,r="",v="http://"),!aw(s)))return!1;const f=ow(s+o);if(!f[0])return!1;const a={type:"link",title:null,url:v+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[a,{type:"text",value:f[1]}]:a}function lw(n,r,s,o){return!l_(o,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function aw(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 ow(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 d=tg(n,"(");let v=tg(n,")");for(;o!==-1&&d>v;)n+=s.slice(0,o+1),s=s.slice(o+1),o=s.indexOf(")"),v++;return[n,s]}function l_(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||dr(s)||qa(s))&&(!r||s!==47)}a_.peek=_w;function cw(){this.buffer()}function uw(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function hw(){this.buffer()}function fw(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function dw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=zn(this.sliceSerialize(n)).toLowerCase(),s.label=r}function pw(n){this.exit(n)}function mw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=zn(this.sliceSerialize(n)).toLowerCase(),s.label=r}function gw(n){this.exit(n)}function _w(){return"["}function a_(n,r,s,o){const d=s.createTracker(o);let v=d.move("[^");const f=s.enter("footnoteReference"),a=s.enter("reference");return v+=d.move(s.safe(s.associationId(n),{after:"]",before:v})),a(),f(),v+=d.move("]"),v}function vw(){return{enter:{gfmFootnoteCallString:cw,gfmFootnoteCall:uw,gfmFootnoteDefinitionLabelString:hw,gfmFootnoteDefinition:fw},exit:{gfmFootnoteCallString:dw,gfmFootnoteCall:pw,gfmFootnoteDefinitionLabelString:mw,gfmFootnoteDefinition:gw}}}function yw(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:a_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(o,d,v,f){const a=v.createTracker(f);let c=a.move("[^");const h=v.enter("footnoteDefinition"),m=v.enter("label");return c+=a.move(v.safe(v.associationId(o),{before:c,after:"]"})),m(),c+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),c+=a.move((r?`
|
|
74
|
-
`:" ")+v.indentLines(v.containerFlow(o,a.current()),r?o_:Sw))),h(),c}}function Sw(n,r,s){return r===0?n:o_(n,r,s)}function o_(n,r,s){return(s?"":" ")+n}const bw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];c_.peek=kw;function Cw(){return{canContainEols:["delete"],enter:{strikethrough:xw},exit:{strikethrough:Ew}}}function ww(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bw}],handlers:{delete:c_}}}function xw(n){this.enter({type:"delete",children:[]},n)}function Ew(n){this.exit(n)}function c_(n,r,s,o){const d=s.createTracker(o),v=s.enter("strikethrough");let f=d.move("~~");return f+=s.containerPhrasing(n,{...d.current(),before:f,after:"~"}),f+=d.move("~~"),v(),f}function kw(){return"~"}function Aw(n){return n.length}function Tw(n,r){const s=r||{},o=(s.align||[]).concat(),d=s.stringLength||Aw,v=[],f=[],a=[],c=[];let h=0,m=-1;for(;++m<n.length;){const x=[],y=[];let S=-1;for(n[m].length>h&&(h=n[m].length);++S<n[m].length;){const g=Dw(n[m][S]);if(s.alignDelimiters!==!1){const b=d(g);y[S]=b,(c[S]===void 0||b>c[S])&&(c[S]=b)}x.push(g)}f[m]=x,a[m]=y}let u=-1;if(typeof o=="object"&&"length"in o)for(;++u<h;)v[u]=ng(o[u]);else{const x=ng(o);for(;++u<h;)v[u]=x}u=-1;const _=[],w=[];for(;++u<h;){const x=v[u];let y="",S="";x===99?(y=":",S=":"):x===108?y=":":x===114&&(S=":");let g=s.alignDelimiters===!1?1:Math.max(1,c[u]-y.length-S.length);const b=y+"-".repeat(g)+S;s.alignDelimiters!==!1&&(g=y.length+g+S.length,g>c[u]&&(c[u]=g),w[u]=g),_[u]=b}f.splice(1,0,_),a.splice(1,0,w),m=-1;const E=[];for(;++m<f.length;){const x=f[m],y=a[m];u=-1;const S=[];for(;++u<h;){const g=x[u]||"";let b="",A="";if(s.alignDelimiters!==!1){const M=c[u]-(y[u]||0),D=v[u];D===114?b=" ".repeat(M):D===99?M%2?(b=" ".repeat(M/2+.5),A=" ".repeat(M/2-.5)):(b=" ".repeat(M/2),A=b):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(b),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(`
|
|
75
|
-
`)}function Dw(n){return n==null?"":String(n)}function ng(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 Rw(n,r,s,o){const d=s.enter("blockquote"),v=s.createTracker(o);v.move("> "),v.shift(2);const f=s.indentLines(s.containerFlow(n,v.current()),Mw);return d(),f}function Mw(n,r,s){return">"+(s?"":" ")+n}function Lw(n,r){return ig(n,r.inConstruct,!0)&&!ig(n,r.notInConstruct,!1)}function ig(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 rg(n,r,s,o){let d=-1;for(;++d<s.unsafe.length;)if(s.unsafe[d].character===`
|
|
76
|
-
`&&Lw(s.stack,s.unsafe[d]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
77
|
-
`}function Ow(n,r){const s=String(n);let o=s.indexOf(r),d=o,v=0,f=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===d?++v>f&&(f=v):v=1,d=o+r.length,o=s.indexOf(r,d);return f}function Bw(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 Nw(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 jw(n,r,s,o){const d=Nw(s),v=n.value||"",f=d==="`"?"GraveAccent":"Tilde";if(Bw(n,s)){const u=s.enter("codeIndented"),_=s.indentLines(v,zw);return u(),_}const a=s.createTracker(o),c=d.repeat(Math.max(Ow(v,d)+1,3)),h=s.enter("codeFenced");let m=a.move(c);if(n.lang){const u=s.enter(`codeFencedLang${f}`);m+=a.move(s.safe(n.lang,{before:m,after:" ",encode:["`"],...a.current()})),u()}if(n.lang&&n.meta){const u=s.enter(`codeFencedMeta${f}`);m+=a.move(" "),m+=a.move(s.safe(n.meta,{before:m,after:`
|
|
78
|
-
`,encode:["`"],...a.current()})),u()}return m+=a.move(`
|
|
79
|
-
`),v&&(m+=a.move(v+`
|
|
80
|
-
`)),m+=a.move(c),h(),m}function zw(n,r,s){return(s?"":" ")+n}function oh(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 Hw(n,r,s,o){const d=oh(s),v=d==='"'?"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?" ":`
|
|
81
|
-
`,...c.current()}))),a(),n.title&&(a=s.enter(`title${v}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),a()),f(),h}function Iw(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 ul(n){return"&#x"+n.toString(16).toUpperCase()+";"}function Ua(n,r,s){const o=is(n),d=is(r);return o===void 0?d===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:d===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?d===void 0?{inside:!1,outside:!1}:d===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:d===void 0?{inside:!1,outside:!1}:d===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}u_.peek=Uw;function u_(n,r,s,o){const d=Iw(s),v=s.enter("emphasis"),f=s.createTracker(o),a=f.move(d);let c=f.move(s.containerPhrasing(n,{after:d,before:a,...f.current()}));const h=c.charCodeAt(0),m=Ua(o.before.charCodeAt(o.before.length-1),h,d);m.inside&&(c=ul(h)+c.slice(1));const u=c.charCodeAt(c.length-1),_=Ua(o.after.charCodeAt(0),u,d);_.inside&&(c=c.slice(0,-1)+ul(u));const w=f.move(d);return v(),s.attentionEncodeSurroundingInfo={after:_.outside,before:m.outside},a+c+w}function Uw(n,r,s){return s.options.emphasis||"*"}function Pw(n,r){let s=!1;return lh(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return s=!0,ju}),!!((!n.depth||n.depth<3)&&Ju(n)&&(r.options.setext||s))}function Fw(n,r,s,o){const d=Math.max(Math.min(6,n.depth||1),1),v=s.createTracker(o);if(Pw(n,s)){const m=s.enter("headingSetext"),u=s.enter("phrasing"),_=s.containerPhrasing(n,{...v.current(),before:`
|
|
82
|
-
`,after:`
|
|
83
|
-
`});return u(),m(),_+`
|
|
84
|
-
`+(d===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
|
|
85
|
-
`))+1))}const f="#".repeat(d),a=s.enter("headingAtx"),c=s.enter("phrasing");v.move(f+" ");let h=s.containerPhrasing(n,{before:"# ",after:`
|
|
86
|
-
`,...v.current()});return/^[\t ]/.test(h)&&(h=ul(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),c(),a(),h}h_.peek=qw;function h_(n){return n.value||""}function qw(){return"<"}f_.peek=Gw;function f_(n,r,s,o){const d=oh(s),v=d==='"'?"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${v}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),a()),h+=c.move(")"),f(),h}function Gw(){return"!"}d_.peek=Vw;function d_(n,r,s,o){const d=n.referenceType,v=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 m=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=m,v(),d==="full"||!h||h!==u?c+=a.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Vw(){return"!"}p_.peek=$w;function p_(n,r,s){let o=n.value||"",d="`",v=-1;for(;new RegExp("(^|[^`])"+d+"([^`]|$)").test(o);)d+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++v<s.unsafe.length;){const f=s.unsafe[v],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 d+o+d}function $w(){return"`"}function m_(n,r){const s=Ju(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))}g_.peek=Kw;function g_(n,r,s,o){const d=oh(s),v=d==='"'?"Quote":"Apostrophe",f=s.createTracker(o);let a,c;if(m_(n,s)){const m=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=m,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${v}`),h+=f.move(" "+d),h+=f.move(s.safe(n.title,{before:h,after:d,...f.current()})),h+=f.move(d),c()),h+=f.move(")"),a(),h}function Kw(n,r,s){return m_(n,s)?"<":"["}__.peek=Yw;function __(n,r,s,o){const d=n.referenceType,v=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 m=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=m,v(),d==="full"||!h||h!==u?c+=a.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Yw(){return"["}function ch(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 Ww(n){const r=ch(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 Xw(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 v_(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 Qw(n,r,s,o){const d=s.enter("list"),v=s.bulletCurrent;let f=n.ordered?Xw(s):ch(s);const a=n.ordered?f==="."?")":".":Ww(s);let c=r&&s.bulletLastUsed?f===s.bulletLastUsed:!1;if(!n.ordered){const m=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&m&&(!m.children||!m.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),v_(s)===f&&m){let u=-1;for(;++u<n.children.length;){const _=n.children[u];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.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=v,d(),h}function Zw(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 Jw(n,r,s,o){const d=Zw(s);let v=s.bulletCurrent||ch(s);r&&r.type==="list"&&r.ordered&&(v=(typeof r.start=="number"&&r.start>-1?r.start:1)+(s.options.incrementListMarker===!1?0:r.children.indexOf(n))+v);let f=v.length+1;(d==="tab"||d==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const a=s.createTracker(o);a.move(v+" ".repeat(f-v.length)),a.shift(f);const c=s.enter("listItem"),h=s.indentLines(s.containerFlow(n,a.current()),m);return c(),h;function m(u,_,w){return _?(w?"":" ".repeat(f))+u:(w?v:v+" ".repeat(f-v.length))+u}}function ex(n,r,s,o){const d=s.enter("paragraph"),v=s.enter("phrasing"),f=s.containerPhrasing(n,o);return v(),d(),f}const tx=$a(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function nx(n,r,s,o){return(n.children.some(function(f){return tx(f)})?s.containerPhrasing:s.containerFlow).call(s,n,o)}function ix(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}y_.peek=rx;function y_(n,r,s,o){const d=ix(s),v=s.enter("strong"),f=s.createTracker(o),a=f.move(d+d);let c=f.move(s.containerPhrasing(n,{after:d,before:a,...f.current()}));const h=c.charCodeAt(0),m=Ua(o.before.charCodeAt(o.before.length-1),h,d);m.inside&&(c=ul(h)+c.slice(1));const u=c.charCodeAt(c.length-1),_=Ua(o.after.charCodeAt(0),u,d);_.inside&&(c=c.slice(0,-1)+ul(u));const w=f.move(d+d);return v(),s.attentionEncodeSurroundingInfo={after:_.outside,before:m.outside},a+c+w}function rx(n,r,s){return s.options.strong||"*"}function sx(n,r,s,o){return s.safe(n.value,o)}function lx(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 ax(n,r,s){const o=(v_(s)+(s.options.ruleSpaces?" ":"")).repeat(lx(s));return s.options.ruleSpaces?o.slice(0,-1):o}const S_={blockquote:Rw,break:rg,code:jw,definition:Hw,emphasis:u_,hardBreak:rg,heading:Fw,html:h_,image:f_,imageReference:d_,inlineCode:p_,link:g_,linkReference:__,list:Qw,listItem:Jw,paragraph:ex,root:nx,strong:y_,text:sx,thematicBreak:ax};function ox(){return{enter:{table:cx,tableData:sg,tableHeader:sg,tableRow:hx},exit:{codeText:fx,table:ux,tableData:Du,tableHeader:Du,tableRow:Du}}}function cx(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 ux(n){this.exit(n),this.data.inTable=void 0}function hx(n){this.enter({type:"tableRow",children:[]},n)}function Du(n){this.exit(n)}function sg(n){this.enter({type:"tableCell",children:[]},n)}function fx(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,dx));const s=this.stack[this.stack.length-1];s.type,s.value=r,this.exit(n)}function dx(n,r){return r==="|"?r:n}function px(n){const r=n||{},s=r.tableCellPadding,o=r.tablePipeAlign,d=r.stringLength,v=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
87
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:f,tableCell:c,tableRow:a}};function f(w,E,x,y){return h(m(w,x,y),w.align)}function a(w,E,x,y){const S=u(w,x,y),g=h([S]);return g.slice(0,g.indexOf(`
|
|
88
|
-
`))}function c(w,E,x,y){const S=x.enter("tableCell"),g=x.enter("phrasing"),b=x.containerPhrasing(w,{...y,before:v,after:v});return g(),S(),b}function h(w,E){return Tw(w,{align:E,alignDelimiters:o,padding:s,stringLength:d})}function m(w,E,x){const y=w.children;let S=-1;const g=[],b=E.enter("table");for(;++S<y.length;)g[S]=u(y[S],E,x);return b(),g}function u(w,E,x){const y=w.children;let S=-1;const g=[],b=E.enter("tableRow");for(;++S<y.length;)g[S]=c(y[S],w,E,x);return b(),g}function _(w,E,x){let y=S_.inlineCode(w,E,x);return x.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function mx(){return{exit:{taskListCheckValueChecked:lg,taskListCheckValueUnchecked:lg,paragraph:_x}}}function gx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vx}}}function lg(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function _x(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 d=r.children;let v=-1,f;for(;++v<d.length;){const a=d[v];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 vx(n,r,s,o){const d=n.children[0],v=typeof n.checked=="boolean"&&d&&d.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",a=s.createTracker(o);v&&a.move(f);let c=S_.listItem(n,r,s,{...o,...a.current()});return v&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(m){return m+f}}function yx(){return[QC(),vw(),Cw(),ox(),mx()]}function Sx(n){return{extensions:[ZC(),yw(n),ww(),px(n),gx()]}}const bx={tokenize:Ax,partial:!0},b_={tokenize:Tx,partial:!0},C_={tokenize:Dx,partial:!0},w_={tokenize:Rx,partial:!0},Cx={tokenize:Mx,partial:!0},x_={name:"wwwAutolink",tokenize:Ex,previous:k_},E_={name:"protocolAutolink",tokenize:kx,previous:A_},pi={name:"emailAutolink",tokenize:xx,previous:T_},$n={};function wx(){return{text:$n}}let fr=48;for(;fr<123;)$n[fr]=pi,fr++,fr===58?fr=65:fr===91&&(fr=97);$n[43]=pi;$n[45]=pi;$n[46]=pi;$n[95]=pi;$n[72]=[pi,E_];$n[104]=[pi,E_];$n[87]=[pi,x_];$n[119]=[pi,x_];function xx(n,r,s){const o=this;let d,v;return f;function f(u){return!Uu(u)||!T_.call(o,o.previous)||uh(o.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return Uu(u)?(n.consume(u),a):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(Cx,m,h)(u):u===45||u===95||Vt(u)?(v=!0,n.consume(u),c):m(u)}function h(u){return n.consume(u),d=!0,c}function m(u){return v&&d&&Xt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(u)):s(u)}}function Ex(n,r,s){const o=this;return d;function d(f){return f!==87&&f!==119||!k_.call(o,o.previous)||uh(o.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(bx,n.attempt(b_,n.attempt(C_,v),s),s)(f))}function v(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function kx(n,r,s){const o=this;let d="",v=!1;return f;function f(u){return(u===72||u===104)&&A_.call(o,o.previous)&&!uh(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),d+=String.fromCodePoint(u),n.consume(u),a):s(u)}function a(u){if(Xt(u)&&d.length<5)return d+=String.fromCodePoint(u),n.consume(u),a;if(u===58){const _=d.toLowerCase();if(_==="http"||_==="https")return n.consume(u),c}return s(u)}function c(u){return u===47?(n.consume(u),v?h:(v=!0,c)):s(u)}function h(u){return u===null||za(u)||lt(u)||dr(u)||qa(u)?s(u):n.attempt(b_,n.attempt(C_,m),s)(u)}function m(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(u)}}function Ax(n,r,s){let o=0;return d;function d(f){return(f===87||f===119)&&o<3?(o++,n.consume(f),d):f===46&&o===3?(n.consume(f),v):s(f)}function v(f){return f===null?s(f):r(f)}}function Tx(n,r,s){let o,d,v;return f;function f(h){return h===46||h===95?n.check(w_,c,a)(h):h===null||lt(h)||dr(h)||h!==45&&qa(h)?c(h):(v=!0,n.consume(h),f)}function a(h){return h===95?o=!0:(d=o,o=void 0),n.consume(h),f}function c(h){return d||o||!v?s(h):r(h)}}function Dx(n,r){let s=0,o=0;return d;function d(f){return f===40?(s++,n.consume(f),d):f===41&&o<s?v(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(w_,r,v)(f):f===null||lt(f)||dr(f)?r(f):(n.consume(f),d)}function v(f){return f===41&&o++,n.consume(f),d}}function Rx(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),v):a===93?(n.consume(a),d):a===60||a===null||lt(a)||dr(a)?r(a):s(a)}function d(a){return a===null||a===40||a===91||lt(a)||dr(a)?r(a):o(a)}function v(a){return Xt(a)?f(a):s(a)}function f(a){return a===59?(n.consume(a),o):Xt(a)?(n.consume(a),f):s(a)}}function Mx(n,r,s){return o;function o(v){return n.consume(v),d}function d(v){return Vt(v)?s(v):r(v)}}function k_(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||lt(n)}function A_(n){return!Xt(n)}function T_(n){return!(n===47||Uu(n))}function Uu(n){return n===43||n===45||n===46||n===95||Vt(n)}function uh(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 Lx={tokenize:Ux,partial:!0};function Ox(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zx,continuation:{tokenize:Hx},exit:Ix}},text:{91:{name:"gfmFootnoteCall",tokenize:jx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Bx,resolveTo:Nx}}}}function Bx(n,r,s){const o=this;let d=o.events.length;const v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let f;for(;d--;){const c=o.events[d][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=zn(o.sliceSerialize({start:f.end,end:o.now()}));return h.codePointAt(0)!==94||!v.includes(h.slice(1))?s(c):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),r(c))}}function Nx(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)},d={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};d.end.column++,d.end.offset++,d.end._bufferIndex++;const v={type:"gfmFootnoteCallString",start:Object.assign({},d.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},v.start),end:Object.assign({},v.end)},a=[n[s+1],n[s+2],["enter",o,r],n[s+3],n[s+4],["enter",d,r],["exit",d,r],["enter",v,r],["enter",f,r],["exit",f,r],["exit",v,r],n[n.length-2],n[n.length-1],["exit",o,r]];return n.splice(s,n.length-s+1,...a),n}function jx(n,r,s){const o=this,d=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let v=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(v>999||u===93&&!f||u===null||u===91||lt(u))return s(u);if(u===93){n.exit("chunkString");const _=n.exit("gfmFootnoteCallString");return d.includes(zn(o.sliceSerialize(_)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(u)}return lt(u)||(f=!0),v++,n.consume(u),u===92?m:h}function m(u){return u===91||u===92||u===93?(n.consume(u),v++,h):h(u)}}function zx(n,r,s){const o=this,d=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let v,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",m):s(E)}function m(E){if(f>999||E===93&&!a||E===null||E===91||lt(E))return s(E);if(E===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return v=zn(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),_}return lt(E)||(a=!0),f++,n.consume(E),E===92?u:m}function u(E){return E===91||E===92||E===93?(n.consume(E),f++,m):m(E)}function _(E){return E===58?(n.enter("definitionMarker"),n.consume(E),n.exit("definitionMarker"),d.includes(v)||d.push(v),Ye(n,w,"gfmFootnoteDefinitionWhitespace")):s(E)}function w(E){return r(E)}}function Hx(n,r,s){return n.check(fl,r,n.attempt(Lx,r,s))}function Ix(n){n.exit("gfmFootnoteDefinition")}function Ux(n,r,s){const o=this;return Ye(n,d,"gfmFootnoteDefinitionIndent",5);function d(v){const f=o.events[o.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(v):s(v)}}function Px(n){let s=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:v,resolveAll:d};return s==null&&(s=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function d(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 m={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)},_=[["enter",m,a],["enter",f[h][1],a],["exit",f[h][1],a],["enter",u,a]],w=a.parser.constructs.insideSpan.null;w&&_n(_,_.length,0,Ga(w,f.slice(h+1,c),a)),_n(_,_.length,0,[["exit",u,a],["enter",f[c][1],a],["exit",f[c][1],a],["exit",m,a]]),_n(f,h-1,c-h+3,_),c=h+_.length-2;break}}for(c=-1;++c<f.length;)f[c][1].type==="strikethroughSequenceTemporary"&&(f[c][1].type="data");return f}function v(f,a,c){const h=this.previous,m=this.events;let u=0;return _;function _(E){return h===126&&m[m.length-1][1].type!=="characterEscape"?c(E):(f.enter("strikethroughSequenceTemporary"),w(E))}function w(E){const x=is(h);if(E===126)return u>1?c(E):(f.consume(E),u++,w);if(u<2&&!s)return c(E);const y=f.exit("strikethroughSequenceTemporary"),S=is(E);return y._open=!S||S===2&&!!x,y._close=!x||x===2&&!!S,a(E)}}}class Fx{constructor(){this.map=[]}add(r,s,o){qx(this,r,s,o)}consume(r){if(this.map.sort(function(v,f){return v[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 d=o.pop();for(;d;){for(const v of d)r.push(v);d=o.pop()}this.map.length=0}}function qx(n,r,s,o){let d=0;if(!(s===0&&o.length===0)){for(;d<n.map.length;){if(n.map[d][0]===r){n.map[d][1]+=s,n.map[d][2].push(...o);return}d+=1}n.map.push([r,s,o])}}function Gx(n,r){let s=!1;const o=[];for(;r<n.length;){const d=n[r];if(s){if(d[0]==="enter")d[1].type==="tableContent"&&o.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(d[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const v=o.length-1;o[v]=o[v]==="left"?"center":"right"}}else if(d[1].type==="tableDelimiterRow")break}else d[0]==="enter"&&d[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return o}function Vx(){return{flow:{null:{name:"table",tokenize:$x,resolveAll:Kx}}}}function $x(n,r,s){const o=this;let d=0,v=0,f;return a;function a(N){let I=o.events.length-1;for(;I>-1;){const K=o.events[I][1].type;if(K==="lineEnding"||K==="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,v+=1),m(N)}function m(N){return N===null?s(N):Le(N)?v>1?(v=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),w):s(N):qe(N)?Ye(n,m,"whitespace")(N):(v+=1,f&&(f=!1,d+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),f=!0,m):(n.enter("data"),u(N)))}function u(N){return N===null||N===124||lt(N)?(n.exit("data"),m(N)):(n.consume(N),N===92?_:u)}function _(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,qe(N)?Ye(n,E,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):E(N))}function E(N){return N===45||N===58?y(N):N===124?(f=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),x):M(N)}function x(N){return qe(N)?Ye(n,y,"whitespace")(N):y(N)}function y(N){return N===58?(v+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),S):N===45?(v+=1,S(N)):N===null||Le(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"),b):(n.exit("tableDelimiterFiller"),b(N))}function b(N){return qe(N)?Ye(n,A,"whitespace")(N):A(N)}function A(N){return N===124?E(N):N===null||Le(N)?!f||d!==v?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||Le(N)?(n.exit("tableRow"),r(N)):qe(N)?Ye(n,T,"whitespace")(N):(n.enter("data"),k(N))}function k(N){return N===null||N===124||lt(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 Kx(n,r){let s=-1,o=!0,d=0,v=[0,0,0,0],f=[0,0,0,0],a=!1,c=0,h,m,u;const _=new Fx;for(;++s<n.length;){const w=n[s],E=w[1];w[0]==="enter"?E.type==="tableHead"?(a=!1,c!==0&&(ag(_,r,c,h,m),m=void 0,c=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(s,0,[["enter",h,r]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=!0,u=void 0,v=[0,0,0,0],f=[0,s+1,0,0],a&&(a=!1,m={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(s,0,[["enter",m,r]])),d=E.type==="tableDelimiterRow"?2:m?3:1):d&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(o=!1,f[2]===0&&(v[1]!==0&&(f[0]=f[1],u=Oa(_,r,v,d,void 0,u),v=[0,0,0,0]),f[2]=s)):E.type==="tableCellDivider"&&(o?o=!1:(v[1]!==0&&(f[0]=f[1],u=Oa(_,r,v,d,void 0,u)),v=f,f=[v[1],s,0,0])):E.type==="tableHead"?(a=!0,c=s):E.type==="tableRow"||E.type==="tableDelimiterRow"?(c=s,v[1]!==0?(f[0]=f[1],u=Oa(_,r,v,d,s,u)):f[1]!==0&&(u=Oa(_,r,f,d,s,u)),d=0):d&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&ag(_,r,c,h,m),_.consume(r.events),s=-1;++s<r.events.length;){const w=r.events[s];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=Gx(r.events,s))}return n}function Oa(n,r,s,o,d,v){const f=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";s[0]!==0&&(v.end=Object.assign({},es(r.events,s[0])),n.add(s[0],0,[["exit",v,r]]));const c=es(r.events,s[1]);if(v={type:f,start:Object.assign({},c),end:Object.assign({},c)},n.add(s[1],0,[["enter",v,r]]),s[2]!==0){const h=es(r.events,s[2]),m=es(r.events,s[3]),u={type:a,start:Object.assign({},h),end:Object.assign({},m)};if(n.add(s[2],0,[["enter",u,r]]),o!==2){const _=r.events[s[2]],w=r.events[s[3]];if(_[1].end=Object.assign({},w[1].end),_[1].type="chunkText",_[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 d!==void 0&&(v.end=Object.assign({},es(r.events,d)),n.add(d,0,[["exit",v,r]]),v=void 0),v}function ag(n,r,s,o,d){const v=[],f=es(r.events,s);d&&(d.end=Object.assign({},f),v.push(["exit",d,r])),o.end=Object.assign({},f),v.push(["exit",o,r]),n.add(s+1,0,v)}function es(n,r){const s=n[r],o=s[0]==="enter"?"start":"end";return s[1][o]}const Yx={name:"tasklistCheck",tokenize:Xx};function Wx(){return{text:{91:Yx}}}function Xx(n,r,s){const o=this;return d;function d(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?s(c):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),v)}function v(c){return lt(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 Le(c)?r(c):qe(c)?n.check({tokenize:Qx},r,s)(c):s(c)}}function Qx(n,r,s){return Ye(n,o,"whitespace");function o(d){return d===null?s(d):r(d)}}function Zx(n){return Hg([wx(),Ox(),Px(n),Vx(),Wx()])}const Jx={};function D_(n){const r=this,s=n||Jx,o=r.data(),d=o.micromarkExtensions||(o.micromarkExtensions=[]),v=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),f=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);d.push(Zx(s)),v.push(yx()),f.push(Sx(s))}const e2=500,be={getAppPreferences(){return Ae("/api/settings/preferences")},updateAppPreferences(n){return Ae("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return Ae("/api/diagnostics/runtime")},getCurrentProject(){return Ae("/api/projects/current")},pullCurrentProject(){return Ae("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return Ae("/api/projects/recent")},connectProject(n){return Ae("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Ae("/api/tasks")},createTask(n){return Ae("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(){return Ae("/api/projects/harness")},applyHarness(){return Ae("/api/projects/harness/apply",{method:"POST"})},commitAndRebaseHarnessTask(n,r){return Ae(`/api/projects/harness/tasks/${encodeURIComponent(n)}/commit-and-rebase`,{method:"POST",body:JSON.stringify(r)})},getHarnessBootstrapStatus(){return Ae("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return Ae("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},dispatchRoleCommand(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/round`)},getGateReviewState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/gate-review`)},updateGateReviewSettings(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/gate-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestGateReviewGate(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/request`,{method:"POST"})},retryGateReviewGate(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/retry`,{method:"POST"})},skipGateReviewGate(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideGateReviewGate(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getGateReviewReport(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/report`)},startTranslationSession(n,r){return Ae(`/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)),Ae(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},retryTranslation(n,r){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getTranslationState(){return Ae("/api/translation/state")},getTranslatorSession(){return Ae("/api/translation/session")},ensureTranslatorSession(n={}){return Ae("/api/translation/session/ensure",{method:"POST",body:JSON.stringify(n)})},startTranslatorSession(n={}){return Ae("/api/translation/session/start",{method:"POST",body:JSON.stringify(n)})},resumeTranslatorSession(n={}){return Ae("/api/translation/session/resume",{method:"POST",body:JSON.stringify(n)})},restartTranslatorSession(n={}){return Ae("/api/translation/session/restart",{method:"POST",body:JSON.stringify(n)})},stopTranslatorSession(){return Ae("/api/translation/session/stop",{method:"POST"})},browseTranslationSourceFiles(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 Ae(`/api/translation/source-files${s}`)},createFileTranslation(n){return Ae("/api/translation/files",{method:"POST",body:JSON.stringify(n)})},readFileTranslation(n){return Ae(`/api/translation/files/${encodeURIComponent(n)}`)},createTranslationBootstrap(n){return Ae("/api/translation/bootstrap",{method:"POST",body:JSON.stringify(n)})},createTranslationMemoryUpdate(n){return Ae("/api/translation/memory-update",{method:"POST",body:JSON.stringify(n)})},promoteTranslation(n,r){return Ae(`/api/translation/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return Ae("/api/gateway/status")},updateGatewaySettings(n){return Ae("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return Ae("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return Ae("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return Ae("/api/gateway/binding/reset",{method:"POST"})}};async function Ae(n,r={}){var d,v,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=(d=a==null?void 0:a.error)!=null&&d.hint?`${a.error.message} ${a.error.hint}`:((v=a==null?void 0:a.error)==null?void 0:v.message)??`Request failed: ${o.status}`,h=(f=a==null?void 0:a.error)==null?void 0:f.runtime,m=h?` [backend ${h.version??"unknown"} pid=${h.pid??"unknown"} cwd=${h.cwd??"unknown"}]`:"";throw new Error(`${c}${m}`)}return o.json()}const Pa=`
|
|
89
|
-
|
|
90
|
-
--- Translation ---
|
|
91
|
-
`;function t2({active:n=!0,autoSendEnabled:r,targetLanguage:s,taskSlug:o,role:d,sessionId:v}){const[f,a]=ae.useState([]),[c,h]=ae.useState([]),[m,u]=ae.useState(""),[_,w]=ae.useState(!1),[E,x]=ae.useState("ready"),[y,S]=ae.useState(""),[g,b]=ae.useState(Date.now()),[A,M]=ae.useState(!1),[D,T]=ae.useState(""),[k,R]=ae.useState(0),N=ae.useRef(n),I=ae.useRef(1),P=ae.useRef(null);ae.useEffect(()=>{N.current=n},[n]),ae.useEffect(()=>{a([]),h([]),T(""),x("ready"),S(""),I.current=1;let j=!1,te;const he=()=>{j||(te=window.setTimeout(me,N.current?200:1e3))},me=async()=>{if(!j)try{const Y=await be.pollTranslationSession(v,I.current);if(j)return;W(Y.events),I.current=Y.nextCursor,x(Y.status),N.current&&S(g2(new Date().toISOString()))}catch(Y){j||T(Y instanceof Error?Y.message:"Translation poll failed.")}finally{he()}};return be.startTranslationSession(o,d).then(Y=>{j||(x(Y.status),I.current=Y.nextCursor,me())}).catch(Y=>{j||T(Y instanceof Error?Y.message:"Translation start failed.")}),()=>{j=!0,te!==void 0&&window.clearTimeout(te),be.stopTranslationSession(v).catch(()=>{})}},[v,o,d]),ae.useEffect(()=>{if(!n)return;const j=P.current;if(!j)return;const te=window.requestAnimationFrame(()=>{j.scrollTop=j.scrollHeight});return()=>window.cancelAnimationFrame(te)},[n,k]);const F=o2(f);ae.useEffect(()=>{if(!F)return;b(Date.now());const j=window.setInterval(()=>b(Date.now()),250);return()=>window.clearInterval(j)},[F]);async function K(j=!1){const te=m;M(!0),T(""),w(!1);try{const he=await be.translateUserInput(o,d,{text:te,mode:j?"auto-send":"review-before-send",useContext:!1,send:j});he.sent?(u(""),w(!1)):(u(R_(te,he.englishPreview)),w(!0))}catch(he){T(he instanceof Error?he.message:"Translation failed.")}finally{M(!1)}}function W(j){if(j.length===0)return;for(const he of j)he.type==="status"?x(he.status):he.type==="error"?T(he.message):he.type==="failures"&&h(he.failures);const te=j.filter(he=>he.type==="entry");te.length>0&&(a(he=>{const me=te.reduce((q,oe)=>p2(q,oe.entry),he),Y=u2(me);return Y.removedIds.size>0&&h(q=>q.filter(oe=>!Y.removedIds.has(oe.translationId))),Y.entries}),R(he=>he+1))}async function V(){const j=_?cg(m):m;if(j.trim()){M(!0),T("");try{await be.sendTranslatedInput(o,d,{englishText:j}),u(""),w(!1)}catch(te){T(te instanceof Error?te.message:"Failed to send English input.")}finally{M(!1)}}}function $(j){j.key!=="Enter"||j.shiftKey||j.nativeEvent.isComposing||(j.preventDefault(),!A&&m.trim()&&(_?V():K(r)))}async function ee(){a([]),h([]),I.current=1,await be.clearTranslationSession(v).catch(j=>T(j.message))}async function H(){M(!0),T("");try{const j=await be.ignoreTranslationFailures(v);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to ignore translation failures.")}finally{M(!1)}}async function B(){M(!0),T("");try{const j=await be.retryTranslationFailures(v);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to retry translation failures.")}finally{M(!1)}}const z=c2(f,E,g),G=c.length;return O.jsxs("aside",{className:"translation-panel",children:[O.jsxs("header",{className:"translation-panel-header",children:[O.jsxs("div",{className:"translation-panel-titlebar",children:[O.jsx("h2",{children:"Translation"}),O.jsxs("div",{className:"translation-panel-actions",children:[G>0?O.jsxs(O.Fragment,{children:[O.jsxs("button",{type:"button",disabled:A,onClick:()=>void H(),children:["Ignore ",G]}),O.jsxs("button",{type:"button",disabled:A,onClick:()=>void B(),children:["Retry ",G]})]}):null,O.jsx("button",{type:"button",onClick:()=>void ee(),children:"Clear"})]})]}),O.jsxs("div",{className:"translation-status-row",children:[O.jsxs("p",{children:["Claude Code · target ",n2(s)," · ",z]}),O.jsx("p",{children:y?`poll ${y}`:"poll -"})]})]}),D?O.jsx("div",{className:"error-banner",children:D}):null,O.jsxs("div",{className:"translation-entry-list",ref:P,children:[f.length===0?O.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,f.map(j=>O.jsx(l2,{entry:j},j.id))]}),O.jsx("div",{className:"translation-composer",children:O.jsxs("div",{className:"translation-composer-row",children:[O.jsx("textarea",{value:m,onChange:j=>{u(j.target.value),(!j.target.value.trim()||_&&!d2(j.target.value))&&w(!1)},onKeyDown:$,placeholder:"输入中文,先翻译成英文工程指令..."}),O.jsx("div",{className:"translation-composer-actions",children:O.jsx("button",{type:"button",disabled:A||!_||!cg(m).trim(),onClick:()=>void V(),children:"Send English"})})]})})]})}function n2(n){var r;return((r=bg.find(s=>s.value===n))==null?void 0:r.label)??n}function i2({open:n,targetLanguage:r,onClose:s}){const[o,d]=ae.useState(!1),[v,f]=ae.useState(""),[a,c]=ae.useState(null),[h,m]=ae.useState(""),[u,_]=ae.useState(""),[w,E]=ae.useState(""),[x,y]=ae.useState(!1),[S,g]=ae.useState(null),[b,A]=ae.useState(""),[M,D]=ae.useState(""),[T,k]=ae.useState(""),[R,N]=ae.useState(!1);ae.useEffect(()=>{if(!n)return;let V=!1,$;const ee=async()=>{V||(await I(!0),V||($=window.setTimeout(ee,2e3)))};return ee(),()=>{V=!0,$!==void 0&&window.clearTimeout($)}},[n,h]);async function I(V=!1){try{const $=await be.getTranslationState();c($);const ee=h?$.fileIndex.jobs.some(H=>H.id===h):!1;if((!h||!ee)&&$.fileIndex.jobs[0])P($.fileIndex.jobs[0].id);else if(!$.fileIndex.jobs[0])m(""),_(""),E("");else if(V&&h){const H=await be.readFileTranslation(h);_(H.output),E(H.report)}}catch($){f($ instanceof Error?$.message:"Failed to load file translations.")}}async function P(V){m(V),_(""),E("");try{const $=await be.readFileTranslation(V);_($.output),E($.report)}catch($){f($ instanceof Error?$.message:"Failed to read translated file.")}}async function F(){y(!0),await K(b,M)}async function K(V="",$=""){N(!0),f("");try{const ee=await be.browseTranslationSourceFiles({path:V,query:$,limit:250});g(ee),A(ee.currentPath),D($)}catch(ee){f(ee instanceof Error?ee.message:"Failed to browse source files.")}finally{N(!1)}}async function W(V=T){const $=V.trim();if($){d(!0),f("");try{const ee=await be.createFileTranslation({sourcePath:$,targetLanguage:r});y(!1),await I(),await P(ee.id)}catch(ee){f(ee instanceof Error?ee.message:"Failed to create file translation.")}finally{d(!1)}}}return n?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"modal-backdrop file-translation-backdrop",children:O.jsx(s2,{busy:o,error:v,state:a,selectedJobId:h,output:u,report:w,onClose:()=>{y(!1),s()},onRefresh:()=>void I(),onSelectJob:V=>void P(V),onTranslate:()=>void F()})}),x?O.jsx(r2,{busy:o||R,state:S,currentPath:b,query:M,selectedPath:T,onBrowse:(V,$)=>void K(V,$),onClose:()=>y(!1),onQueryChange:D,onSelectPath:k,onTranslate:()=>void W()}):null]}):null}function r2({busy:n,state:r,currentPath:s,query:o,selectedPath:d,onBrowse:v,onClose:f,onQueryChange:a,onSelectPath:c,onTranslate:h}){const m=(r==null?void 0:r.entries)??[],u=m.filter(w=>w.type==="directory"),_=m.filter(w=>w.type==="file");return O.jsx("div",{className:"modal-backdrop translation-file-browser-backdrop",children:O.jsxs("section",{className:"translation-file-browser-modal",role:"dialog","aria-modal":"true","aria-label":"Select Source File",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Select Source File"}),O.jsx("p",{children:s||"."})]}),O.jsx("button",{type:"button",onClick:f,children:"Close"})]}),O.jsxs("div",{className:"translation-file-browser-controls",children:[O.jsxs("div",{className:"translation-file-browser-nav",children:[O.jsx("button",{type:"button",disabled:n||!s,onClick:()=>v((r==null?void 0:r.parentPath)??"",""),children:"Up"}),O.jsx("button",{type:"button",disabled:n||!s,onClick:()=>v("",""),children:"Root"})]}),O.jsxs("form",{className:"translation-file-browser-search",onSubmit:w=>{w.preventDefault(),v(s,o)},children:[O.jsx("input",{value:o,onChange:w=>a(w.target.value),placeholder:"Search files"}),O.jsx("button",{type:"submit",disabled:n,children:"Search"}),O.jsx("button",{type:"button",disabled:n||!o,onClick:()=>v(s,""),children:"Clear"})]})]}),O.jsxs("div",{className:"translation-file-browser-layout",children:[O.jsxs("div",{className:"translation-file-browser-list",children:[n&&!r?O.jsx("p",{className:"muted",children:"Loading files..."}):null,!n&&m.length===0?O.jsx("p",{className:"muted",children:"No source files found."}):null,u.length>0?O.jsxs("div",{className:"translation-file-browser-group",children:[O.jsx("h3",{children:"Folders"}),u.map(w=>O.jsx(og,{entry:w,selected:d===w.path,onBrowse:v,onSelectPath:c},w.path))]}):null,_.length>0?O.jsxs("div",{className:"translation-file-browser-group",children:[O.jsx("h3",{children:"Files"}),_.map(w=>O.jsx(og,{entry:w,selected:d===w.path,onBrowse:v,onSelectPath:c},w.path))]}):null,r!=null&&r.truncated?O.jsx("p",{className:"translation-entry-note",children:"Result limit reached."}):null]}),O.jsxs("aside",{className:"translation-file-browser-selection",children:[O.jsxs("label",{children:[O.jsx("span",{children:"Source path"}),O.jsx("input",{value:d,onChange:w=>c(w.target.value)})]}),O.jsx("button",{type:"button",disabled:n||!d.trim(),onClick:h,children:"Translate File"})]})]})]})})}function og({entry:n,selected:r,onBrowse:s,onSelectPath:o}){const d=n.type==="directory";return O.jsxs("button",{className:r?"translation-file-browser-entry is-selected":"translation-file-browser-entry",type:"button",onClick:()=>d?s(n.path,""):o(n.path),onDoubleClick:()=>d?s(n.path,""):void 0,children:[O.jsx("span",{children:d?"DIR":"FILE"}),O.jsx("strong",{children:n.name}),O.jsx("small",{children:n.path})]})}function s2({busy:n,error:r,state:s,selectedJobId:o,output:d,report:v,onClose:f,onRefresh:a,onSelectJob:c,onTranslate:h}){const m=(s==null?void 0:s.fileIndex.jobs)??[],u=m.find(_=>_.id===o);return O.jsxs("section",{className:"file-translation-modal",role:"dialog","aria-modal":"true","aria-label":"File Translation",children:[O.jsxs("header",{className:"file-translation-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"File Translation"}),O.jsx("p",{children:"Claude Code · 中英互译"})]}),O.jsxs("div",{className:"file-translation-toolbar",children:[O.jsx("button",{type:"button",disabled:n,onClick:h,children:"Translate"}),O.jsx("button",{type:"button",disabled:n,onClick:a,children:"Refresh"}),O.jsx("button",{type:"button",onClick:f,children:"Close"})]})]}),r?O.jsx("div",{className:"error-banner",children:r}):null,s!=null&&s.memoryInitialized?null:O.jsx("p",{className:"translation-entry-note",children:"Translation memory is not initialized. Run Bootstrap from the sidebar before important file translations."}),O.jsxs("div",{className:"file-translation-layout",children:[O.jsxs("div",{className:"file-translation-list",children:[m.length===0?O.jsx("p",{className:"muted",children:"No translated files yet."}):null,m.map(_=>O.jsxs("button",{className:_.id===o?"file-translation-item is-active":"file-translation-item",type:"button",onClick:()=>c(_.id),children:[O.jsx("strong",{children:_.sourcePath}),O.jsxs("span",{children:[_.status," · ",_.targetLanguage]})]},_.id))]}),O.jsx("div",{className:"file-translation-preview",children:u?O.jsxs(O.Fragment,{children:[O.jsxs("header",{children:[O.jsx("strong",{children:u.sourcePath}),O.jsx("span",{children:u.status})]}),O.jsx("div",{className:"translation-markdown",children:O.jsx(s_,{remarkPlugins:[D_],children:d||v||"Translation output is not available yet."})})]}):O.jsx("p",{className:"muted",children:"Select a translated file to preview it."})})]})]})}function l2({entry:n}){if(n.sourceKind==="conversation-boundary")return O.jsx(a2,{entry:n});const r=f2(n),s=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",d=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return O.jsxs("article",{className:d,children:[s?O.jsx("pre",{children:r}):O.jsx("div",{className:"translation-markdown",children:O.jsx(s_,{remarkPlugins:[D_],children:r})}),n.warning?O.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?O.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function a2({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,o=_2(n.occurredAt??n.createdAt);return O.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${o}`,children:[O.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),O.jsx("span",{children:r}),O.jsxs("span",{children:["第 ",s," 轮"]}),O.jsx("time",{children:o}),O.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function o2(n){const r=n.find(hh);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function c2(n,r,s){const o=n.find(hh);if(o)return`translating ${m2(Math.max(0,s-h2(o)))}`;const d=n.at(-1);return(d==null?void 0:d.status)==="failed"||r==="failed"?"error":r}function hh(n){return n.status==="queued"||n.status==="translating"}function u2(n){const r=n.length-e2;if(r<=0)return{entries:n,removedIds:new Set};const s=new Set;for(const o of n){if(s.size>=r)break;hh(o)||s.add(o.id)}return s.size===0?{entries:n,removedIds:s}:{entries:n.filter(o=>!s.has(o.id)),removedIds:s}}function h2(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function f2(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.direction==="user-input-to-english"?R_(n.sourceText,n.translatedText):n.translatedText:n.translatedText||n.sourceText}function R_(n,r){return`${n.trimEnd()}${Pa}${r.trimStart()}`}function d2(n){return n.includes(Pa)}function cg(n){const r=n.indexOf(Pa);return r===-1?n:n.slice(r+Pa.length)}function p2(n,r){return n.findIndex(o=>o.id===r.id)===-1?[...n,r]:n.map(o=>o.id===r.id?r:o)}function m2(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 g2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function _2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function v2(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}function y2(n,r){const s=ns.map(o=>({role:o.name,permissionMode:n.roles[o.name].permissionMode,model:n.roles[o.name].model,effort:n.roles[o.name].effort}));if(r.gateReviewerEnabled){const o=n.roles["gate-reviewer"];s.push({role:"gate-reviewer",permissionMode:o.permissionMode,model:o.model,effort:o.effort})}return s}const S2=["architecture-plan","validation-adequacy","final-diff"];function b2({events:n,maxEvents:r=8,showHeader:s=!0}){const o=r===null?n:n.slice(-r);return O.jsxs("section",{className:"event-log",children:[s?O.jsx("h2",{children:"Events"}):null,n.length===0?O.jsx("p",{className:"muted",children:"No terminal events yet."}):O.jsx("ol",{children:o.map((d,v)=>O.jsx("li",{children:d},`${d}-${v}`))})]})}function al({status:n}){return O.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function C2({status:n,bootstrapStatus:r,applyResult:s,taskSyncResult:o,canCommitAndRebaseTask:d=!1,busy:v=!1,onRefresh:f,onApply:a,onCommitAndRebaseTask:c,onStartBootstrap:h}){const[m,u]=ae.useState(!1),_=r==null?void 0:r.session;return ae.useEffect(()=>{_||u(!1)},[_]),n?O.jsxs("section",{className:"harness-panel",children:[O.jsxs("div",{className:"harness-stage",children:[O.jsxs("div",{className:"harness-panel-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Fixed install"}),O.jsx("p",{className:"muted",children:n.initialized?n.needsApply?`${n.plannedChanges.length} pending updates`:"Up to date":"Not initialized"})]}),O.jsx("div",{className:"harness-actions",children:n.initialized?O.jsxs(O.Fragment,{children:[O.jsx("button",{type:"button",disabled:v,onClick:()=>void f(),children:"Refresh"}),n.needsApply?O.jsx("button",{type:"button",disabled:v,onClick:()=>void a(),children:"Update"}):null]}):O.jsx("button",{type:"button",disabled:v,onClick:()=>void a(),children:"Initialize"})})]}),n.initialized&&n.needsApply?O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"harness-file-list-title",children:"Files to update"}),O.jsx("ol",{className:"harness-file-list",children:n.plannedChanges.map(w=>O.jsxs("li",{children:[O.jsx("span",{children:w.path}),O.jsx(al,{status:w.action})]},`${w.path}:${w.action}`))})]}):null]}),O.jsxs("div",{className:"harness-stage",children:[O.jsxs("div",{className:"harness-panel-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Bootstrap"}),O.jsx("p",{className:"muted",children:r?w2(r.status):"not loaded"})]}),O.jsx("div",{className:"harness-actions",children:O.jsx("button",{type:"button",disabled:v||!(r!=null&&r.canStart),onClick:()=>{u(!0),h()},children:"Run Bootstrap"})})]}),_?O.jsxs("div",{className:"harness-bootstrap-session",children:[O.jsxs("div",{children:[O.jsx("span",{children:_.command}),O.jsx(al,{status:_.status})]}),O.jsx("button",{type:"button",onClick:()=>u(!0),children:"Open Terminal"})]}):null]}),s!=null&&s.changedFiles.length&&d&&!o?O.jsx("div",{className:"harness-result",children:O.jsx("button",{type:"button",disabled:v,onClick:()=>void c(),children:"Commit & rebase task"})}):null,o?O.jsx("div",{className:"harness-result",children:O.jsx("p",{className:"muted",children:o.message})}):null,n.warnings.length>0?O.jsx("ul",{className:"warnings",children:n.warnings.map(w=>O.jsx("li",{children:w},w))}):null,r!=null&&r.warnings.length?O.jsx("ul",{className:"warnings",children:r.warnings.map(w=>O.jsx("li",{children:w},w))}):null,m&&_?O.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:O.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[O.jsxs("header",{className:"harness-bootstrap-modal-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Harness Bootstrap Terminal"}),O.jsx("p",{className:"muted",children:_.command})]}),O.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[O.jsx(al,{status:_.status}),O.jsx("button",{type:"button",onClick:()=>u(!1),children:"Close"})]})]}),O.jsx("div",{className:"harness-bootstrap-terminal",children:O.jsx($u,{sessionId:_.id,active:m})})]})}):null]}):null}function w2(n){return n.replaceAll("_"," ")}function fh(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function x2(n,r=6){const s=[...n].sort(A2).map((d,v)=>({message:d,sequence:v+1}));return[...r===null?s:s.slice(-r)].sort((d,v)=>v.sequence-d.sequence)}function E2({messages:n,orchestration:r,busy:s,maxMessages:o=6,showControls:d=!0,showHeader:v=!0,onModeChange:f,onMarkAllDone:a}){const[c,h]=ae.useState(null),m=fh(n),u=(r==null?void 0:r.mode)??"auto",_=x2(n,o);async function w(E){await T2(E.body),h(E.id),window.setTimeout(()=>h(x=>x===E.id?null:x),1200)}return O.jsxs("section",{className:"message-panel",children:[v?O.jsxs("div",{className:"message-panel-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Messages"}),O.jsxs("p",{className:"muted",children:[m.total," total / ",m.accepted," accepted"]})]}),d&&f?O.jsx("div",{className:"message-controls",children:O.jsxs("label",{className:"message-mode-toggle",children:[O.jsx("input",{type:"checkbox",checked:u==="auto",disabled:s,onChange:E=>f(E.target.checked?"auto":"manual")}),O.jsx("span",{children:"Auto orchestration"})]})}):null,d&&a?O.jsx("button",{type:"button",disabled:s,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?O.jsx("p",{className:"muted",children:"No role messages yet."}):O.jsx("ol",{className:"message-list",children:_.map(({message:E,sequence:x})=>O.jsxs("li",{className:"message-item",children:[O.jsxs("div",{className:"message-item-main",children:[O.jsxs("div",{className:"message-meta",children:[O.jsxs("span",{className:"message-sequence",children:["#",x]}),O.jsx("time",{dateTime:Fa(E),children:k2(Fa(E))}),O.jsxs("strong",{children:[E.fromRole," ","->"," ",E.toRole]}),O.jsx("span",{children:E.type})]}),O.jsx("p",{children:E.body}),E.failureReason?O.jsx("span",{className:"message-reason",children:E.failureReason}):null,E.bodyPath?O.jsx("span",{className:"message-path",children:E.bodyPath}):null]}),O.jsx("div",{className:"message-actions",children:O.jsx("button",{type:"button",disabled:s,onClick:()=>void w(E),children:c===E.id?"Copied":"Copy"})})]},E.id))})]})}function k2(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 Fa(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function A2(n,r){const s=Fa(n).localeCompare(Fa(r));if(s!==0)return s;const o=n.createdAt.localeCompare(r.createdAt);return o!==0?o:n.id.localeCompare(r.id)}async function T2(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 D2({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:o}){const[d,v]=ae.useState(n);ae.useEffect(()=>{n&&v(n)},[n]);async function f(a){a.preventDefault(),await o(d)}return O.jsx("form",{className:"repo-connect",onSubmit:f,children:O.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[O.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:d,onChange:a=>v(a.target.value),placeholder:"/path/to/repo"}),r.length>0?O.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&v(a.target.value)},children:[O.jsx("option",{value:"",children:"Recent"}),r.map(a=>O.jsx("option",{value:a,children:a},a))]}):null,O.jsx("button",{type:"submit",disabled:s||!d.trim(),children:"Connect"})]})})}function R2({tasks:n,activeTaskSlug:r,onSelect:s}){return O.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>O.jsxs("button",{className:o.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(o.taskSlug),children:[O.jsx("span",{children:o.title||o.taskSlug}),O.jsx(al,{status:o.status})]},o.taskSlug))})}function M2({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:o,messages:d,orchestration:v,events:f,roundState:a,gateReview:c,translationEnabled:h,translationAutoSendEnabled:m,translationTargetLanguage:u,translationOutputMode:_,translatorSession:w,harnessStatus:E,harnessBootstrapStatus:x,harnessApplyResult:y,harnessTaskSyncResult:S,gatewayStatus:g,gatewayQrLogin:b,gatewayQrCheck:A,busy:M,onConnect:D,onRefreshConnectedRepository:T,onPullConnectedRepository:k,onRefreshHarness:R,onApplyHarness:N,onCommitAndRebaseHarnessTask:I,onStartHarnessBootstrap:P,onRefreshGateway:F,onGatewayEnabledChange:K,onGatewayTranslationChange:W,onStartGatewayQrLogin:V,onResetGatewayBinding:$,onGateReviewGateEnabledChange:ee,onTranslationEnabledChange:H,onTranslationAutoSendChange:B,onTranslationTargetLanguageChange:z,onTranslationOutputModeChange:G,onOpenFileTranslation:j,onOpenTranslatorSession:te,onCreateTranslationBootstrap:he,onUpdateTranslationMemory:me,onCreateTask:Y,onSelectTask:q,themeMode:oe,onThemeModeChange:Z,flowPauseAlerts:ie,onFlowPauseAlertsChange:de,permissionRequestMode:Ce,onPermissionRequestModeChange:we,launchTemplate:$e,canSaveLaunchTemplate:at,canOneClickStart:Re,onSaveLaunchTemplate:Ot,onOneClickStart:Ct,onTryFlowPauseAlert:jt,onMarkAllMessagesDone:Kt,onDeleteMessageHistory:Yt}){const[dt,Je]=ae.useState(""),[wt,ue]=ae.useState(!1),[ye,xe]=ae.useState(!1),[Me,Be]=ae.useState(()=>o?null:"repository-path"),pt=fh(d),je=dt.trim(),ot=s.find(Ee=>Ee.taskSlug===o)??null;ae.useEffect(()=>{Be(Ee=>o&&Ee==="repository-path"?null:!o&&Ee===null?"repository-path":Ee)},[o]);function We(Ee,an){Be(an?Ee:null)}async function Bt(Ee){Ee.preventDefault(),await Y({taskSlug:je}),Je("")}return O.jsxs("div",{className:"project-dashboard",children:[O.jsx("header",{className:"brand-header",children:O.jsx("strong",{children:"VibeCodingMaster"})}),O.jsx(di,{title:"Repository Path",open:Me==="repository-path",onOpenChange:Ee=>We("repository-path",Ee),children:O.jsx(D2,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:M,onConnect:D})}),n?O.jsx(di,{title:"Connected Repository",open:Me==="connected-repository",onOpenChange:Ee=>{We("connected-repository",Ee),Ee&&T()},children:O.jsx(H2,{busy:M,project:n,onPull:k})}):null,O.jsx(di,{title:"Settings",open:Me==="settings",onOpenChange:Ee=>We("settings",Ee),children:O.jsxs("div",{className:"sidebar-settings",children:[O.jsxs("button",{"aria-label":`Theme mode: ${hg(oe)}`,className:"settings-toggle theme-mode-toggle",disabled:M,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>Z(q2(oe)),children:[O.jsx("span",{children:"Theme"}),O.jsx("span",{children:hg(oe)})]}),O.jsxs("button",{"aria-pressed":!(g!=null&&g.enabled)&&ie,className:!(g!=null&&g.enabled)&&ie?"settings-toggle is-active":"settings-toggle",disabled:M||(g==null?void 0:g.enabled),title:g!=null&&g.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:()=>de(!ie),children:[O.jsx("span",{children:"Flow pause alert"}),O.jsx("span",{children:g!=null&&g.enabled?"off":ie?"on":"off"})]}),O.jsxs("button",{className:"settings-toggle",disabled:M||(g==null?void 0:g.enabled),title:g!=null&&g.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:jt,children:[O.jsx("span",{children:"Try alert"}),O.jsx("span",{children:"test"})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Permission requests"}),O.jsxs("select",{value:Ce,disabled:M,onChange:Ee=>we(Ee.target.value),children:[O.jsx("option",{value:"off",children:"off"}),O.jsx("option",{value:"allowAll",children:"allow all"})]})]}),O.jsxs("button",{className:"settings-toggle",disabled:M||!at,title:"Save the current core role launch settings and optional Gate Reviewer settings",type:"button",onClick:Ot,children:[O.jsx("span",{children:"Save launch template"}),O.jsx("span",{children:at?"ready":"needs core sessions"})]}),Re?O.jsxs("button",{className:"settings-toggle is-active",disabled:M,title:L2($e),type:"button",onClick:Ct,children:[O.jsx("span",{children:"One-click start"}),O.jsx("span",{children:M_($e)})]}):null,o?O.jsxs(O.Fragment,{children:[O.jsxs("button",{type:"button",onClick:()=>ue(!0),children:[O.jsx("span",{children:"Messages"}),O.jsxs("span",{className:"muted",children:[pt.total," total"]})]}),O.jsxs("button",{type:"button",onClick:()=>xe(!0),children:[O.jsx("span",{children:"Events"}),O.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),O.jsx(di,{title:"Translation",open:Me==="translation",onOpenChange:Ee=>We("translation",Ee),children:O.jsx(O2,{busy:M,enabled:h,autoSendEnabled:m,targetLanguage:u,outputMode:_,fileTranslationAvailable:!!n,translatorSession:w,onAutoSendChange:B,onCreateBootstrap:he,onEnabledChange:H,onUpdateMemory:me,onTargetLanguageChange:z,onOutputModeChange:G,onOpenFileTranslation:j,onOpenTranslatorSession:te})}),n&&o?O.jsx(di,{title:"Gate Review Gates",open:Me==="gate-review-gates",onOpenChange:Ee=>We("gate-review-gates",Ee),children:O.jsx(N2,{busy:M,state:c,onGateEnabledChange:ee})}):null,O.jsx(di,{title:"Gateway",open:Me==="gateway",onOpenChange:Ee=>{We("gateway",Ee),Ee&&F()},children:O.jsx(z2,{busy:M,qrCheck:A,qrLogin:b,status:g,onEnabledChange:K,onResetBinding:$,onStartQrLogin:V,onTranslationChange:W})}),n?O.jsx(di,{title:"VCM Harness",open:Me==="vcm-harness",onOpenChange:Ee=>We("vcm-harness",Ee),children:O.jsx(C2,{status:E,bootstrapStatus:x,applyResult:y,taskSyncResult:S,canCommitAndRebaseTask:!!(y!=null&&y.changedFiles.length&&ot),busy:M,onRefresh:R,onApply:N,onCommitAndRebaseTask:I,onStartBootstrap:P})}):null,n?O.jsx(di,{title:"New Task",open:Me==="new-task",onOpenChange:Ee=>We("new-task",Ee),children:O.jsx("div",{className:"task-create",children:O.jsxs("form",{onSubmit:Bt,children:[O.jsx("input",{value:dt,onChange:Ee=>Je(Ee.target.value),placeholder:"task name"}),O.jsxs("div",{className:"task-create-preview",children:[O.jsxs("small",{children:["branch: ",je?`feature/${je}`:"feature/<task>"]}),O.jsxs("small",{children:["worktree: ",je?`.claude/worktrees/${je}`:".claude/worktrees/<task>"]})]}),O.jsx("button",{type:"submit",disabled:M||!je,children:"Create"})]})})}):null,s.length>0?O.jsx(di,{title:"Tasks",open:Me==="tasks",onOpenChange:Ee=>We("tasks",Ee),children:O.jsx(R2,{tasks:s,activeTaskSlug:o,onSelect:q})}):null,n&&ot?O.jsx(P2,{task:ot,roundState:a}):null,wt?O.jsx(V2,{busy:M,messages:d,orchestration:v,onClose:()=>ue(!1),onMarkAllDone:()=>{o&&Kt(o)},onDeleteMessageHistory:()=>{o&&Yt(o)}}):null,ye?O.jsx(G2,{events:f,onClose:()=>xe(!1)}):null]})}function M_(n){return[n.autoOrchestration?"auto":"manual"].join(" + ")}function L2(n){const r=Object.entries(n.roles).map(([s,o])=>`${s}: ${o.permissionMode} / ${o.model} / ${o.effort}`).join("; ");return`Launch template: ${M_(n)}; ${r}`}function O2({autoSendEnabled:n,busy:r,enabled:s,fileTranslationAvailable:o,outputMode:d,targetLanguage:v,translatorSession:f,onAutoSendChange:a,onCreateBootstrap:c,onEnabledChange:h,onUpdateMemory:m,onOutputModeChange:u,onTargetLanguageChange:_,onOpenFileTranslation:w,onOpenTranslatorSession:E}){return O.jsxs("div",{className:"sidebar-settings",children:[O.jsxs("button",{"aria-pressed":s,className:s?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>h(!s),children:[O.jsx("span",{children:"Conversation translation"}),O.jsx("span",{children:s?"on":"off"})]}),O.jsxs("button",{"aria-pressed":n,className:n?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>a(!n),children:[O.jsx("span",{children:"Auto-send"}),O.jsx("span",{children:n?"on":"off"})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Language"}),O.jsx("select",{value:v,disabled:r,onChange:x=>_(x.target.value),children:bg.map(x=>O.jsx("option",{value:x.value,children:x.label},x.value))})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Reply scope"}),O.jsx("select",{value:d,disabled:r,onChange:x=>u(x.target.value),children:m1.map(x=>O.jsx("option",{value:x.value,children:x.label},x.value))})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open file translation":"Connect a repository first",type:"button",onClick:w,children:[O.jsx("span",{children:"File translation"}),O.jsx("span",{children:"open"})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Run translation bootstrap":"Connect a repository first",type:"button",onClick:c,children:[O.jsx("span",{children:"Bootstrap"}),O.jsx("span",{children:"run"})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Compact and update translation memory":"Connect a repository first",type:"button",onClick:m,children:[O.jsx("span",{children:"Update memory"}),O.jsx("span",{children:"run"})]}),O.jsxs("div",{className:"settings-status-row",children:[O.jsx("span",{children:"Session status"}),O.jsx("strong",{children:B2(f)})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open Translator session":"Connect a repository first",type:"button",onClick:E,children:[O.jsx("span",{children:"Open Session"}),O.jsx("span",{children:"open"})]})]})}function B2(n){return n?n.status==="running"?n.activityStatus??"idle":n.status:"not started"}function N2({busy:n,onGateEnabledChange:r,state:s}){return O.jsx("div",{className:"sidebar-settings",children:S2.map(o=>{const d=s==null?void 0:s.gates[o],v=!!(d!=null&&d.required);return O.jsxs("button",{"aria-pressed":v,className:v?"settings-toggle is-active":"settings-toggle",disabled:n||!s,title:d!=null&&d.status?`status: ${d.status}`:void 0,type:"button",onClick:()=>r(o,!v),children:[O.jsx("span",{children:j2(o)}),O.jsx("span",{children:v?"on":"off"})]},o)})})}function j2(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function z2({busy:n,onEnabledChange:r,onResetBinding:s,onStartQrLogin:o,onTranslationChange:d,qrCheck:v,qrLogin:f,status:a}){const c=!!(a!=null&&a.binding.tokenConfigured),h=!!(a!=null&&a.binding.tokenConfigured);return O.jsxs("div",{className:"gateway-panel",children:[O.jsxs("div",{className:"gateway-actions",children:[O.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:[O.jsx("span",{children:"Gateway"}),O.jsx("span",{children:a!=null&&a.enabled?"on":"off"})]}),O.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?d(!a.translationEnabled):void 0,children:[O.jsx("span",{children:"Translation"}),O.jsx("span",{children:a!=null&&a.translationEnabled?"on":"off"})]}),h?O.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:s,children:"Reset Binding"}):O.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),f?O.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,v?O.jsxs("p",{className:"muted",children:["QR status: ",v.status,v.message?` · ${v.message}`:""]}):null]})}function H2({busy:n,onPull:r,project:s}){const o=s.pullDisabledReason,d=!!s.canPull;return O.jsxs("div",{className:"project-summary",children:[O.jsxs("dl",{children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Base path"}),O.jsx("dd",{children:s.repoRoot})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Branch"}),O.jsx("dd",{children:I2(s)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Remote"}),O.jsx("dd",{children:s.upstreamBranch??"no upstream"})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Status"}),O.jsx("dd",{children:U2(s)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Commit"}),O.jsx("dd",{children:s.shortHeadCommit??s.headCommit??"unknown"})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Working tree"}),O.jsx("dd",{children:s.isDirty?"uncommitted changes":"clean"})]})]}),O.jsxs("div",{className:"connected-repo-actions",children:[O.jsx("button",{type:"button",disabled:n||!d,title:o??"Pull latest changes with git pull --ff-only",onClick:()=>void r(),children:"Pull"}),O.jsx("span",{className:"muted",children:s.checkedAt?`checked ${Pu(s.checkedAt)}`:"status not refreshed"})]}),o?O.jsx("p",{className:"muted",children:o}):null,s.warnings.length>0?O.jsx("ul",{className:"warnings",children:s.warnings.map(v=>O.jsx("li",{children:v},v))}):null]})}function I2(n){return n.branch||"unknown"}function U2(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 P2({roundState:n,task:r}){var m;const[s,o]=ae.useState(()=>Date.now()),d=!!(n!=null&&n.startedAt),v=L_(r.createdAt,s),f=ug(n,(n==null?void 0:n.totalCcActiveMs)??0,s),a=d&&n?ug(n,n.currentRoundCcActiveMs,s):0,c=d&&n?F2(n,s):0,h=((m=r.title)==null?void 0:m.trim())||r.taskSlug;return ae.useEffect(()=>{const u=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(u)},[]),O.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[O.jsxs("div",{className:"task-status-dock-title",children:[O.jsx("strong",{title:h,children:h}),O.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),O.jsxs("dl",{className:"task-status-stats",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Session start"}),O.jsx("dd",{children:Pu(r.createdAt)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Session total"}),O.jsx("dd",{children:Ba(v)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Rounds"}),O.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Role runtime"}),O.jsx("dd",{children:Ba(f)})]})]}),d&&n?O.jsxs("div",{className:"current-round-status",children:[O.jsxs("div",{className:"current-round-title",children:[O.jsx("span",{children:n.status==="running"?"Current Round":"Last Round"}),O.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),O.jsxs("dl",{className:"task-status-stats",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Started"}),O.jsx("dd",{children:Pu(n.startedAt)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Total"}),O.jsx("dd",{children:Ba(c)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Role runtime"}),O.jsx("dd",{children:Ba(a)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Turn count"}),O.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function ug(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 F2(n,r){const s=n.status==="running"?r:Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return L_(n.startedAt??"",Number.isFinite(s)?s:r)}function L_(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function Pu(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 Ba(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),o=Math.floor(r%3600/60),d=r%60;return s>0?o>0?`${s}h ${o}m`:`${s}h`:o>0?d>0?`${o}m ${d}s`:`${o}m`:`${d}s`}function q2(n){return n==="system"?"light":n==="light"?"dark":"system"}function hg(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function G2({events:n,onClose:r}){return O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Events"}),O.jsxs("p",{className:"muted",children:[n.length," total"]})]}),O.jsx("button",{type:"button",onClick:r,children:"Close"})]}),O.jsx(b2,{events:n,maxEvents:null,showHeader:!1})]})})}function V2({busy:n,messages:r,orchestration:s,onClose:o,onMarkAllDone:d,onDeleteMessageHistory:v}){const f=fh(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
|
-
`))&&d()}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
|
-
`))&&v()}return O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Messages"}),O.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),O.jsxs("div",{className:"modal-actions",children:[O.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),O.jsx("button",{type:"button",disabled:n||f.total===0,onClick:c,children:"Delete All"}),O.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),O.jsx(E2,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function di({children:n,onOpenChange:r,open:s,title:o}){return O.jsxs("section",{className:"sidebar-section",children:[O.jsxs("button",{"aria-expanded":s,className:"sidebar-section-toggle",type:"button",onClick:()=>{r==null||r(!s)},children:[O.jsx("span",{children:o}),O.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),s?O.jsx("div",{className:"sidebar-section-content",children:n}):null]})}function O_(n,r){return n.find(s=>s.role===r)}function $2({activeRole:n,roles:r=Vu,sessions:s,onSelect:o}){return O.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:r.map(d=>{const v=O_(s,d.name),f=(v==null?void 0:v.status)==="running"?v.activityStatus??"idle":(v==null?void 0:v.status)??"not_started";return O.jsxs("button",{className:d.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":d.name===n,onClick:()=>o(d.name),children:[O.jsx("span",{children:d.label}),O.jsx(al,{status:f})]},d.name)})})}function K2({role:n,session:r,permissionMode:s,model:o,effort:d,active:v=!0,busy:f,translationEnabled:a,translationAutoSendEnabled:c,translationTargetLanguage:h,onPermissionModeChange:m,onModelChange:u,onEffortChange:_,onStart:w,onResume:E,onStop:x,onRestart:y,onTerminalEvent:S}){const g=f1(n)&&a&&(r==null?void 0:r.status)==="running";return O.jsx("section",{className:"session-console",children:O.jsxs("div",{className:g?"session-console-body has-translation":"session-console-body",children:[O.jsxs("div",{className:"terminal-pane",children:[O.jsx(Cg,{role:n,session:r,permissionMode:s,model:o,effort:d,busy:f,onPermissionModeChange:m,onModelChange:u,onEffortChange:_,onStart:w,onResume:E,onStop:x,onRestart:y}),(r==null?void 0:r.status)==="running"?O.jsx($u,{sessionId:r.id,active:v,onEvent:S},r.id):O.jsxs("div",{className:"terminal-empty",children:[O.jsx("strong",{children:n}),O.jsx("span",{children:r!=null&&r.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]}),g?O.jsx("div",{className:"translation-pane",children:O.jsx(t2,{active:v,autoSendEnabled:c,targetLanguage:h,taskSlug:r.taskSlug,role:n,sessionId:r.id},r.id)}):null]})})}function Y2(n,r,s){var v;if(!n||s.mode!=="auto")return null;const o=new Map(n.map(f=>[f.id,f])),d=r.filter(f=>{var a;return f.dispatchingAt?((a=o.get(f.id))==null?void 0:a.dispatchingAt)!==f.dispatchingAt:!1});return d.length===0?null:((v=d.sort(W2)[d.length-1])==null?void 0:v.toRole)??null}function W2(n,r){const s=n.dispatchingAt??n.deliveredAt??n.acceptedAt??"",o=r.dispatchingAt??r.deliveredAt??r.acceptedAt??"";return s!==o?s.localeCompare(o):n.createdAt.localeCompare(r.createdAt)}const X2=2e3;function Q2({task:n,activeRole:r,gateReviewerEnabled:s,translationEnabled:o,translationAutoSendEnabled:d,translationTargetLanguage:v,refreshNonce:f=0,onTaskChanged:a,onActiveRoleChange:c,onMessagesChanged:h,onOrchestrationChanged:m,onRoundStateChanged:u,onEventsChanged:_,onLaunchStateChanged:w}){const[E,x]=ae.useState(null),[y,S]=ae.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"default"}),[g,b]=ae.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"default"}),[A,M]=ae.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"medium"}),[D,T]=ae.useState(!1),[k,R]=ae.useState(""),[N,I]=ae.useState([]),[P,F]=ae.useState(null),K=ae.useRef(null),W=ae.useRef(""),V=!!(E!=null&&E.sessions.some(Z=>Z.role==="gate-reviewer")),$=s||V,ee=[...ns,...$?[vg]:[]],H=ae.useCallback((Z,ie)=>{var we;const de=((we=K.current)==null?void 0:we.taskSlug)===n.taskSlug?K.current.messages:null,Ce=Y2(de,Z,ie);K.current={taskSlug:n.taskSlug,messages:Z},F(ie),h==null||h(Z),m==null||m(ie),Ce&&(c(Ce),te(`auto switched to ${Ce} before VCM dispatch`))},[c,h,m,n.taskSlug]),B=ae.useCallback((Z,ie,de,Ce)=>{x(Z),H(ie,de),u==null||u(Ce)},[H,u]),z=ae.useCallback(async()=>{const[Z,ie,de,Ce]=await Promise.all([be.getTaskStatus(n.taskSlug),be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug),be.getSessionRoundState(n.taskSlug)]);B(Z,ie,de,Ce)},[B,n.taskSlug]);ae.useEffect(()=>{z().catch(Z=>R(Z.message))},[z,f]),ae.useEffect(()=>{I([]),_==null||_([])},[_,n.taskSlug]),ae.useEffect(()=>{E&&!$&&r==="gate-reviewer"&&c("project-manager"),E&&r==="translator"&&c("project-manager")},[r,$,c,E]),ae.useEffect(()=>{const Z=E==null?void 0:E.task;if(!Z||Z.taskSlug!==n.taskSlug)return;const ie=fg(Z);if(ie===fg(n)){W.current="";return}W.current!==ie&&(W.current=ie,a().catch(de=>{W.current="",R(de.message)}))},[a,E==null?void 0:E.task,n]),ae.useEffect(()=>{S(Z=>{let ie=!1;const de={...Z};for(const Ce of(E==null?void 0:E.sessions)??[])de[Ce.role]!==Ce.permissionMode&&(de[Ce.role]=Ce.permissionMode,ie=!0);return ie?de:Z})},[E==null?void 0:E.sessions]),ae.useEffect(()=>{b(Z=>{let ie=!1;const de={...Z};for(const Ce of(E==null?void 0:E.sessions)??[]){const we=Ce.model??"default";de[Ce.role]!==we&&(de[Ce.role]=we,ie=!0)}return ie?de:Z})},[E==null?void 0:E.sessions]),ae.useEffect(()=>{M(Z=>{let ie=!1;const de={...Z};for(const Ce of(E==null?void 0:E.sessions)??[]){const we=Ce.effort??"default";de[Ce.role]!==we&&(de[Ce.role]=we,ie=!0)}return ie?de:Z})},[E==null?void 0:E.sessions]),ae.useEffect(()=>{const ie=((E==null?void 0:E.sessions)??[]).filter(we=>Z2(we.role)),de=new Set(ie.map(we=>we.role)),Ce={};for(const we of Gu)Ce[we.name]={permissionMode:y[we.name],model:g[we.name],effort:A[we.name]};w==null||w({taskSlug:n.taskSlug,roles:Ce,autoOrchestration:((P==null?void 0:P.mode)??"auto")==="auto",statusLoaded:!!E,sessionCount:ie.length,hasAnySession:ie.length>0,allRolesHaveSession:ns.every(we=>de.has(we.name))})},[g,A,w,P==null?void 0:P.mode,y,E,n.taskSlug]),ae.useEffect(()=>{const Z=window.setInterval(()=>{Promise.all([be.getTaskStatus(n.taskSlug),be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug),be.getSessionRoundState(n.taskSlug)]).then(([ie,de,Ce,we])=>{B(ie,de,Ce,we)}).catch(ie=>R(ie.message))},3e3);return()=>window.clearInterval(Z)},[B,n.taskSlug]),ae.useEffect(()=>{let Z=!1,ie=!1;const de=window.setInterval(()=>{ie||(ie=!0,Promise.all([be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug)]).then(([Ce,we])=>{Z||H(Ce,we)}).catch(Ce=>{Z||R(Ce.message)}).finally(()=>{ie=!1}))},X2);return()=>{Z=!0,window.clearInterval(de)}},[H,n.taskSlug]);async function G(Z){T(!0),R("");try{await Z(),await z(),await a()}catch(ie){R(ie instanceof Error?ie.message:"Action failed.")}finally{T(!1)}}async function j(){const Z=[`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
|
-
`);if(window.confirm(Z)){T(!0),R("");try{await be.cleanupTask(n.taskSlug,{force:!0,forceDeleteBranch:!0}),te(`closed ${n.taskSlug}`),await a()}catch(de){R(de instanceof Error?de.message:"Close task failed.")}finally{T(!1)}}}function te(Z){I(ie=>{const de=[...ie,`${new Date().toLocaleTimeString()} ${Z}`];return _==null||_(de),de})}function he(Z,ie){S(de=>({...de,[Z]:ie}))}function me(Z,ie){b(de=>({...de,[Z]:ie}))}function Y(Z,ie){M(de=>({...de,[Z]:ie}))}async function q(Z){T(!0),R("");try{const ie=await be.updateOrchestrationState(n.taskSlug,{mode:Z});F(ie),m==null||m(ie),te(`auto orchestration ${Z==="auto"?"enabled":"disabled"}`)}catch(ie){R(ie instanceof Error?ie.message:"Failed to update orchestration mode.")}finally{T(!1)}}const oe=((P==null?void 0:P.mode)??"auto")==="auto";return O.jsxs("div",{className:"task-workspace",children:[O.jsxs("header",{className:"workspace-header",children:[O.jsx("div",{className:"workspace-title-line",children:O.jsx("h1",{children:n.title||n.taskSlug})}),O.jsx($2,{activeRole:r,roles:ee,sessions:(E==null?void 0:E.sessions)??[],onSelect:c}),O.jsxs("div",{className:"workspace-header-actions",children:[O.jsxs("button",{"aria-label":`Auto orchestration is ${oe?"on":"off"}`,"aria-pressed":oe,className:`orchestration-toggle${oe?" is-active":""}`,disabled:D,type:"button",onClick:()=>void q(oe?"manual":"auto"),children:[O.jsx("span",{children:"Auto orchestration"}),O.jsx("strong",{children:oe?"on":"off"})]}),O.jsx("button",{className:"danger-button",type:"button",disabled:D,onClick:()=>void j(),children:"Close Task"})]})]}),k?O.jsx("div",{className:"error-banner",children:k}):null,O.jsx("div",{className:"workspace-grid",children:O.jsx("div",{className:"workspace-main",children:O.jsx("div",{className:"role-console-stack",children:ee.map(Z=>{const ie=Z.name,de=ie===r,Ce=O_((E==null?void 0:E.sessions)??[],ie);return O.jsx("div",{className:de?"role-console-panel is-active":"role-console-panel","aria-hidden":!de,children:O.jsx(K2,{role:ie,session:Ce,permissionMode:y[ie],model:g[ie],effort:A[ie],active:de,busy:D,translationEnabled:o,translationAutoSendEnabled:d,translationTargetLanguage:v,onPermissionModeChange:we=>he(ie,we),onModelChange:we=>me(ie,we),onEffortChange:we=>Y(ie,we),onStart:()=>void G(async()=>{await be.startRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:y[ie],model:g[ie],effort:A[ie]}),te(`started ${ie} with ${y[ie]} / ${g[ie]} / ${A[ie]}`)}),onResume:()=>void G(async()=>{await be.resumeRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:y[ie],model:g[ie],effort:A[ie]}),te(`resumed ${ie} with ${y[ie]} / ${g[ie]} / ${A[ie]}`)}),onStop:()=>void G(async()=>{await be.stopRoleSession(n.taskSlug,ie),te(`stopped ${ie}`)}),onRestart:()=>void G(async()=>{await be.restartRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:y[ie],model:g[ie],effort:A[ie]}),te(`restarted ${ie} with ${y[ie]} / ${g[ie]} / ${A[ie]}`)}),onTerminalEvent:we=>te(`${Z.label}: ${we}`)})},ie)})})})})]})}function Z2(n){return ns.some(r=>r.name===n)}function fg(n){return[n.status,n.updatedAt,n.cleanupStatus??"",n.cleanedAt??""].join(":")}const J2=120*1e3,dg=1400,eE=3;function tE(){const[n,r]=ae.useState(null),[s,o]=ae.useState([]),[d,v]=ae.useState(null),[f,a]=ae.useState(null),[c,h]=ae.useState(null),[m,u]=ae.useState(null),[_,w]=ae.useState(null),[E,x]=ae.useState(null),[y,S]=ae.useState(null),[g,b]=ae.useState(!1),[A,M]=ae.useState([]),[D,T]=ae.useState(null),[k,R]=ae.useState(null),[N,I]=ae.useState(null),[P,F]=ae.useState(null),[K,W]=ae.useState(null),[V,$]=ae.useState(null),[ee,H]=ae.useState("project-manager"),[B,z]=ae.useState("system"),[G,j]=ae.useState(!0),[te,he]=ae.useState("off"),[me,Y]=ae.useState(!1),[q,oe]=ae.useState(!1),[Z,ie]=ae.useState(d1),[de,Ce]=ae.useState(p1),[we,$e]=ae.useState(!1),[at,Re]=ae.useState(!1),[Ot,Ct]=ae.useState(null),[jt,Kt]=ae.useState("default"),[Yt,dt]=ae.useState("default"),[Je,wt]=ae.useState("medium"),[ue,ye]=ae.useState(()=>g1()),[xe,Me]=ae.useState(null),[Be,pt]=ae.useState(0),[je,ot]=ae.useState(null),[We,Bt]=ae.useState(!1),[Ee,an]=ae.useState(!1),[Qt,vn]=ae.useState(""),Ki=ae.useRef({}),on=ae.useRef(null),Hn=ae.useRef(""),yn=ae.useRef(""),_e=ae.useMemo(()=>v2(A,D),[A,D]),Rt=(xe==null?void 0:xe.taskSlug)===(_e==null?void 0:_e.taskSlug)?xe:null,Ya=!!(Rt!=null&&Rt.statusLoaded&&Rt.allRolesHaveSession),pl=!!(_e&&(Rt!=null&&Rt.statusLoaded)&&!Rt.hasAnySession),zt=ae.useCallback(J=>{z(J.themeMode),j(J.flowPauseAlerts),he(J.permissionRequestMode),Y(J.translationEnabled),oe(J.translationAutoSendEnabled),ie(J.translationTargetLanguage),Ce(J.translationOutputMode),ye(J.launchTemplate)},[]),Ft=ae.useCallback(()=>{on.current!==null&&(window.clearInterval(on.current),on.current=null)},[]),ml=ae.useCallback((J={})=>{Ft(),J.resetAudio&&aE(),Na(),on.current=window.setInterval(()=>{Na()},dg)},[Ft]),as=ae.useCallback(()=>{Ft(),ot(null);let J=1;Na(),on.current=window.setInterval(()=>{J+=1,Na(),J>=eE&&on.current!==null&&(window.clearInterval(on.current),on.current=null)},dg)},[Ft]),mr=ae.useCallback((J,Se=`manual-${Date.now()}`,vt={})=>{ot({id:Se,text:J}),ml(vt)},[ml]),gl=ae.useCallback(()=>{Ft(),ot(null)},[Ft]),mi=ae.useCallback(()=>{Ft(),ot(null),j(!1)},[Ft]),os=ae.useCallback(J=>{_e!=null&&_e.taskSlug&&R({taskSlug:_e.taskSlug,messages:J})},[_e==null?void 0:_e.taskSlug]),_l=ae.useCallback(J=>{_e!=null&&_e.taskSlug&&I({taskSlug:_e.taskSlug,orchestration:J})},[_e==null?void 0:_e.taskSlug]),vl=ae.useCallback(J=>{_e!=null&&_e.taskSlug&&F({taskSlug:_e.taskSlug,events:J})},[_e==null?void 0:_e.taskSlug]),In=ae.useCallback(J=>{if(!(_e!=null&&_e.taskSlug)||J.taskSlug!==_e.taskSlug||(W({taskSlug:J.taskSlug,roundState:J}),J.status!=="stopped"||!J.roundId))return;const Se=sE(J);if(Ki.current[J.taskSlug]===Se||(Ki.current[J.taskSlug]=Se,!G))return;const yt=J.activeRole??"role";rE(J)>=J2?mr(`No new turn started after ${yt} stopped.`,Se):as()},[_e==null?void 0:_e.taskSlug,G,as,mr]),Mt=ae.useCallback(J=>{Me(Se=>(Se==null?void 0:Se.taskSlug)===J.taskSlug&&Se.statusLoaded===J.statusLoaded&&Se.sessionCount===J.sessionCount&&Se.hasAnySession===J.hasAnySession&&Se.allRolesHaveSession===J.allRolesHaveSession&&Se.autoOrchestration===J.autoOrchestration&&JSON.stringify(Se.roles)===JSON.stringify(J.roles)?Se:J)},[]);async function _t(){const J=await be.listTasks();return M(J),T(Se=>{var vt;return Se&&J.some(yt=>yt.taskSlug===Se)?Se:((vt=J[0])==null?void 0:vt.taskSlug)??null}),J}async function Mn(){const J=await be.getHarnessStatus();return v(J),J}async function gi(){const J=await be.getHarnessBootstrapStatus();return a(J),J}async function cs(){const J=await be.getGatewayStatus();return w(J),J}async function Wa(){const J=await be.getRecentRepositoryPaths();return o(J),J}async function gr(J){const[Se,vt]=await Promise.all([be.listMessages(J),be.getOrchestrationState(J)]);R({taskSlug:J,messages:Se}),I({taskSlug:J,orchestration:vt})}async function Kn(J){const Se=await be.getGateReviewState(J);return $({taskSlug:J,state:Se}),Se}function Yn(J){J&&(Kt(J.permissionMode),J.model&&dt(J.model),J.effort&&wt(J.effort))}async function Ln(J={}){const Se=await be.getTranslatorSession();return Ct(Se),J.syncLaunchOptions&&Yn(Se),Se}ae.useEffect(()=>{Promise.all([be.getCurrentProject(),be.getRecentRepositoryPaths(),be.getAppPreferences(),be.getGatewayStatus()]).then(async([J,Se,vt,yt])=>{r(J),o(Se),w(yt),zt(vt),J&&await Promise.all([_t(),Mn(),gi()])}).catch(J=>vn(J.message))},[zt]),ae.useEffect(()=>{const J=window.matchMedia("(prefers-color-scheme: dark)"),Se=()=>Bt(J.matches);return Se(),J.addEventListener("change",Se),()=>J.removeEventListener("change",Se)},[]),ae.useEffect(()=>()=>Ft(),[Ft]),ae.useEffect(()=>{const J=B==="system"?We?"dark":"light":B;document.documentElement.dataset.theme=J,document.documentElement.dataset.themeMode=B},[We,B]),ae.useEffect(()=>{!(_!=null&&_.enabled)||!G||(mi(),be.updateAppPreferences({flowPauseAlerts:!1}).then(J=>zt(J)).catch(J=>vn(J.message)))},[zt,mi,G,_==null?void 0:_.enabled]),ae.useEffect(()=>{if(!(_!=null&&_.enabled)||!n||!_e)return;const J=`${n.repoRoot}:${_e.taskSlug}`;if(_.currentProjectId===n.repoRoot&&_.currentTaskSlug===_e.taskSlug){Hn.current=J;return}Hn.current!==J&&(Hn.current=J,be.updateGatewaySettings({currentProjectId:n.repoRoot,currentTaskSlug:_e.taskSlug}).then(Se=>w(Se)).catch(Se=>{Hn.current===J&&(Hn.current=""),vn(Se.message)}))},[_e==null?void 0:_e.taskSlug,_==null?void 0:_.currentProjectId,_==null?void 0:_.currentTaskSlug,_==null?void 0:_.enabled,n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!(_e!=null&&_e.taskSlug)){$(null);return}Kn(_e.taskSlug).catch(J=>vn(J.message))},[_e==null?void 0:_e.taskSlug]),ae.useEffect(()=>{yn.current="",Ct(null),Kt("default"),dt("default"),wt("medium")},[n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!n)return;Ln({syncLaunchOptions:!0}).catch(Se=>vn(Se.message));const J=window.setInterval(()=>{Ln().catch(Se=>vn(Se.message))},3e3);return()=>window.clearInterval(J)},[n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!n||!me)return;const J=n.repoRoot;yn.current===J&&(Ot==null?void 0:Ot.status)==="running"||(yn.current=J,be.ensureTranslatorSession().then(Se=>{Ct(Se),Yn(Se)}).catch(Se=>{yn.current="",vn(Se.message)}))},[n==null?void 0:n.repoRoot,me]),ae.useEffect(()=>{if(!(_e!=null&&_e.taskSlug))return;const J=_e.taskSlug,Se=window.setInterval(()=>{Kn(J).catch(vt=>vn(vt.message))},3e3);return()=>window.clearInterval(Se)},[_e==null?void 0:_e.taskSlug]);async function Ue(J){an(!0),vn("");try{await J()}catch(Se){vn(Se instanceof Error?Se.message:"Action failed.")}finally{an(!1)}}const Yi=k&&k.taskSlug===(_e==null?void 0:_e.taskSlug)?k.messages:[],_i=N&&N.taskSlug===(_e==null?void 0:_e.taskSlug)?N.orchestration:null,xt=P&&P.taskSlug===(_e==null?void 0:_e.taskSlug)?P.events:[],yl=K&&K.taskSlug===(_e==null?void 0:_e.taskSlug)?K.roundState:null,_r=V&&V.taskSlug===(_e==null?void 0:_e.taskSlug)?V.state:null,Un=!!(_r&&Object.values(_r.gates).some(J=>J.required));return O.jsxs(_1,{sidebar:O.jsx(M2,{project:n,recentRepositoryPaths:s,tasks:A,activeTaskSlug:(_e==null?void 0:_e.taskSlug)??null,messages:Yi,orchestration:_i,events:xt,roundState:yl,gateReview:_r,translationEnabled:me,translationAutoSendEnabled:q,translationTargetLanguage:Z,translationOutputMode:de,translatorSession:Ot,harnessStatus:d,harnessBootstrapStatus:f,harnessApplyResult:c,harnessTaskSyncResult:m,gatewayStatus:_,gatewayQrLogin:E,gatewayQrCheck:y,busy:Ee,onConnect:J=>Ue(async()=>{const Se=await be.connectProject({repoPath:J});r(Se),h(null),u(null),await Promise.all([_t(),Mn(),gi(),Wa()])}),onRefreshConnectedRepository:()=>Ue(async()=>{const J=await be.getCurrentProject();r(J)}),onPullConnectedRepository:()=>Ue(async()=>{const J=await be.pullCurrentProject();r(J)}),onRefreshHarness:()=>Ue(async()=>{h(null),u(null),await Promise.all([Mn(),gi()])}),onApplyHarness:()=>Ue(async()=>{u(null);const J=await be.applyHarness();h(J),await Promise.all([Mn(),gi()])}),onCommitAndRebaseHarnessTask:()=>Ue(async()=>{if(!_e)throw new Error("Select a task before using Commit & rebase task.");if(!(c!=null&&c.changedFiles.length))throw new Error("Apply a harness update before using Commit & rebase task.");const J=await be.commitAndRebaseHarnessTask(_e.taskSlug,{changedFiles:c.changedFiles});u(J);const Se=await be.getCurrentProject();r(Se),await _t()}),onStartHarnessBootstrap:()=>Ue(async()=>{const J=await be.startHarnessBootstrap();a(J.status)}),onRefreshGateway:()=>Ue(async()=>{await cs()}),onGatewayEnabledChange:J=>{Ue(async()=>{const[Se,vt]=await Promise.all([be.updateGatewaySettings({enabled:J,...J&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(_e==null?void 0:_e.taskSlug)??null}:{}}),J?be.updateAppPreferences({flowPauseAlerts:!1}):Promise.resolve(null)]);vt&&zt(vt),J&&mi(),w(Se)})},onGatewayTranslationChange:J=>{Ue(async()=>{const Se=await be.updateGatewaySettings({translationEnabled:J});w(Se)})},onStartGatewayQrLogin:()=>{Ue(async()=>{const J=await be.startGatewayQrLogin();x(J),S(null),b(!0),await cs()})},onResetGatewayBinding:()=>{Ue(async()=>{const J=await be.resetGatewayBinding();w(J),x(null),S(null),b(!1)})},onGateReviewGateEnabledChange:(J,Se)=>{Ue(async()=>{if(!_e)throw new Error("Create or select a task before changing Gate Review Gates.");const vt=await be.updateGateReviewSettings(_e.taskSlug,{gates:{[J]:Se}});$({taskSlug:_e.taskSlug,state:vt})})},onTranslationEnabledChange:J=>{Y(J),Ue(async()=>{const Se=await be.updateAppPreferences({translationEnabled:J});zt(Se)})},onTranslationAutoSendChange:J=>{oe(J),Ue(async()=>{const Se=await be.updateAppPreferences({translationAutoSendEnabled:J});zt(Se)})},onTranslationTargetLanguageChange:J=>{ie(J),Ue(async()=>{const Se=await be.updateAppPreferences({translationTargetLanguage:J});zt(Se)})},onTranslationOutputModeChange:J=>{Ce(J),Ue(async()=>{const Se=await be.updateAppPreferences({translationOutputMode:J});zt(Se)})},onOpenFileTranslation:()=>$e(!0),onOpenTranslatorSession:()=>Re(!0),onCreateTranslationBootstrap:()=>{Ue(async()=>{if(!n)throw new Error("Connect a repository before running Translation Bootstrap.");await be.createTranslationBootstrap({targetLanguage:Z}),await Ln()})},onUpdateTranslationMemory:()=>{Ue(async()=>{if(!n)throw new Error("Connect a repository before updating translation memory.");await be.createTranslationMemoryUpdate({targetLanguage:Z}),await Ln()})},onCreateTask:J=>Ue(async()=>{const Se=await be.createTask(J);await _t(),T(Se.taskSlug),await Kn(Se.taskSlug)}),onSelectTask:T,themeMode:B,onThemeModeChange:J=>{z(J),Ue(async()=>{const Se=await be.updateAppPreferences({themeMode:J});zt(Se)})},flowPauseAlerts:G,onFlowPauseAlertsChange:J=>{if(_!=null&&_.enabled){mi();return}j(J),J&&lE(),Ue(async()=>{const Se=await be.updateAppPreferences({flowPauseAlerts:J});zt(Se)})},permissionRequestMode:te,onPermissionRequestModeChange:J=>{he(J),Ue(async()=>{const Se=await be.updateAppPreferences({permissionRequestMode:J});zt(Se)})},launchTemplate:ue,canSaveLaunchTemplate:Ya,canOneClickStart:pl,onSaveLaunchTemplate:()=>{Ue(async()=>{if(!(Rt!=null&&Rt.allRolesHaveSession))throw new Error("Start all core role sessions before saving a launch template.");const J=await be.updateAppPreferences({launchTemplate:{version:1,roles:Rt.roles,autoOrchestration:Rt.autoOrchestration}});zt(J)})},onOneClickStart:()=>{Ue(async()=>{if(!_e)throw new Error("Create or select a task before one-click start.");const J=await be.getTaskStatus(_e.taskSlug);if(J.sessions.some(yt=>h1.some(Wi=>Wi===yt.role)))throw new Error("One-click start is only available before any role session has started.");const Se=await be.updateOrchestrationState(_e.taskSlug,{mode:ue.autoOrchestration?"auto":"manual"});I({taskSlug:_e.taskSlug,orchestration:Se});const vt=y2(ue,{gateReviewerEnabled:Un});for(const yt of vt){const Wi={cols:100,rows:28,permissionMode:yt.permissionMode,model:yt.model,effort:yt.effort},On=J.sessions.find(vr=>vr.role===yt.role);if((On==null?void 0:On.status)==="running"){yt.role==="gate-reviewer"&&await be.resumeRoleSession(_e.taskSlug,yt.role,Wi);continue}On!=null&&On.claudeSessionId?await be.resumeRoleSession(_e.taskSlug,yt.role,Wi):await be.startRoleSession(_e.taskSlug,yt.role,Wi)}H("project-manager"),await gr(_e.taskSlug),await _t(),pt(yt=>yt+1)})},onTryFlowPauseAlert:()=>{mr("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:J=>{Ue(async()=>{const Se=await be.markAllMessagesDone(J);R({taskSlug:J,messages:Se.messages}),await gr(J)})},onDeleteMessageHistory:J=>{Ue(async()=>{const Se=await be.deleteMessageHistory(J);R({taskSlug:J,messages:Se.messages}),await gr(J)})}}),children:[Qt?O.jsx("div",{className:"error-banner",children:Qt}):null,je?O.jsx("div",{className:"flow-pause-alert-backdrop",children:O.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:[O.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),O.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),O.jsx("p",{id:"flow-pause-alert-body",children:je.text}),O.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."}),O.jsx("button",{type:"button",autoFocus:!0,onClick:gl,children:"Confirm"})]})}):null,g&&E?O.jsx(nE,{busy:Ee,qrCheck:y,qrLogin:E,onCheck:()=>{Ue(async()=>{const J=await be.checkGatewayQrLogin();S(J),(J.status==="confirmed"||J.status==="binded_redirect")&&b(!1),await cs()})},onClose:()=>b(!1)}):null,n&&_e?O.jsx(Q2,{task:_e,activeRole:ee,gateReviewerEnabled:Un,translationEnabled:me,translationAutoSendEnabled:q,translationTargetLanguage:Z,refreshNonce:Be,onTaskChanged:async()=>{await _t()},onActiveRoleChange:H,onMessagesChanged:os,onOrchestrationChanged:_l,onRoundStateChanged:In,onEventsChanged:vl,onLaunchStateChanged:Mt}):O.jsxs("section",{className:"empty-workspace",children:[O.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),O.jsx("p",{children:n?"Tasks create local role commands and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, and handoff artifacts."})]}),O.jsx(i2,{open:we,targetLanguage:Z,onClose:()=>$e(!1)}),O.jsx(D1,{open:at,busy:Ee,session:Ot,permissionMode:jt,model:Yt,effort:Je,onClose:()=>Re(!1),onPermissionModeChange:Kt,onModelChange:dt,onEffortChange:wt,onStart:()=>{Ue(async()=>{const J=await be.startTranslatorSession({cols:100,rows:28,permissionMode:jt,model:Yt,effort:Je});Ct(J),Yn(J)})},onResume:()=>{Ue(async()=>{const J=await be.resumeTranslatorSession({cols:100,rows:28,permissionMode:jt,model:Yt,effort:Je});Ct(J),Yn(J)})},onRestart:()=>{Ue(async()=>{const J=await be.restartTranslatorSession({cols:100,rows:28,permissionMode:jt,model:Yt,effort:Je});Ct(J),Yn(J)})},onStop:()=>{Ue(async()=>{const J=await be.stopTranslatorSession();Ct(J)})}})]})}function nE({busy:n,onCheck:r,onClose:s,qrCheck:o,qrLogin:d}){const[v,f]=ae.useState(""),[a,c]=ae.useState("");return ae.useEffect(()=>{let h=!1;if(c(""),f(""),d.qrcodeUrl.startsWith("data:image/")){f(d.qrcodeUrl);return}try{const m=rs(0,"M");m.addData(d.qrcodeUrl),m.make(),h||f(m.createDataURL(8,2))}catch(m){h||c(m instanceof Error?m.message:"Failed to render QR code.")}return()=>{h=!0}},[d.qrcodeUrl]),O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),O.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),O.jsx("button",{type:"button",onClick:s,children:"Close"})]}),O.jsxs("div",{className:"gateway-qr-modal-body",children:[O.jsx("div",{className:"gateway-qr-code-frame",children:v?O.jsx("img",{alt:"Weixin Gateway QR login",src:v}):O.jsx("div",{className:"gateway-qr-placeholder",children:a||"Rendering QR code..."})}),O.jsxs("dl",{className:"gateway-qr-meta",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Status"}),O.jsx("dd",{children:(o==null?void 0:o.status)??d.status})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Expires"}),O.jsx("dd",{children:iE(d.expiresAt)})]}),o!=null&&o.message?O.jsxs("div",{children:[O.jsx("dt",{children:"Message"}),O.jsx("dd",{children:o.message})]}):null]})]}),O.jsx("footer",{children:O.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function iE(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 Vi=null;function rE(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 sE(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}async function lE(){const n=B_();return n?N_(n):!1}async function Na(){const n=B_();if(!n||!await N_(n))return!1;try{const s=n.createGain(),o=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),mg(n,s,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),mg(n,s,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function B_(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Vi||Vi.state==="closed")&&(Vi=new n),Vi}catch{return null}}function aE(){Fu(Vi)}function Fu(n){Vi=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function N_(n){if(pg(n))return!0;try{await n.resume();const r=pg(n);return!r&&n===Vi&&Fu(n),r}catch{return n===Vi&&Fu(n),!1}}function pg(n){return n.state==="running"}function mg(n,r,s){const o=n.createGain(),d=n.createOscillator(),v=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),d.type="sine",d.frequency.setValueAtTime(s.frequency,s.startAt),v.type="triangle",v.frequency.setValueAtTime(s.frequency*2.01,s.startAt),d.connect(o),v.connect(o),o.connect(r),d.start(s.startAt),v.start(s.startAt),d.stop(f+.02),v.stop(f+.02)}const j_=document.getElementById("root");if(!j_)throw new Error("Missing #root element.");t1.createRoot(j_).render(O.jsx(ae.StrictMode,{children:O.jsx(tE,{})}));
|