@runmedev/renderers 3.15.12 → 3.16.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/dist/components/closeCellButton.d.ts.map +1 -1
- package/dist/components/console/actionButton.d.ts.map +1 -1
- package/dist/components/console/gistCell.d.ts.map +1 -1
- package/dist/components/console/index.d.ts +2 -67
- package/dist/components/console/index.d.ts.map +1 -1
- package/dist/components/console/open.d.ts.map +1 -1
- package/dist/components/console/runme.d.ts +49 -0
- package/dist/components/console/runme.d.ts.map +1 -0
- package/dist/components/console/view.d.ts +68 -0
- package/dist/components/console/view.d.ts.map +1 -0
- package/dist/components/console/vscode.css.d.ts.map +1 -1
- package/dist/components/dropdownlist.d.ts.map +1 -1
- package/dist/components/env/store.d.ts +3 -3
- package/dist/components/env/store.d.ts.map +1 -1
- package/dist/components/envViewer.d.ts +2 -2
- package/dist/components/envViewer.d.ts.map +1 -1
- package/dist/components/icons/arrowLeft.d.ts.map +1 -1
- package/dist/components/icons/arrowUp.d.ts.map +1 -1
- package/dist/components/icons/artifactRegistry.d.ts.map +1 -1
- package/dist/components/icons/branch.d.ts.map +1 -1
- package/dist/components/icons/cloudLogs.d.ts.map +1 -1
- package/dist/components/icons/cloudRunIcon.d.ts.map +1 -1
- package/dist/components/icons/cluster.d.ts.map +1 -1
- package/dist/components/icons/copy.d.ts.map +1 -1
- package/dist/components/icons/docker.d.ts.map +1 -1
- package/dist/components/icons/eks.d.ts.map +1 -1
- package/dist/components/icons/error.d.ts.map +1 -1
- package/dist/components/icons/filter.d.ts.map +1 -1
- package/dist/components/icons/gcloud.d.ts.map +1 -1
- package/dist/components/icons/gkeIcon.d.ts.map +1 -1
- package/dist/components/icons/index.d.ts.map +1 -1
- package/dist/components/icons/info.d.ts.map +1 -1
- package/dist/components/icons/pass.d.ts.map +1 -1
- package/dist/components/icons/stop.d.ts.map +1 -1
- package/dist/components/icons/suspend.d.ts.map +1 -1
- package/dist/components/icons/sync.d.ts.map +1 -1
- package/dist/components/icons/trash.d.ts.map +1 -1
- package/dist/components/icons/warning.d.ts.map +1 -1
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/fitAddon.d.ts +1 -1
- package/dist/fitAddon.d.ts.map +1 -1
- package/dist/index.cjs +199 -140
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +10874 -8467
- package/dist/messaging.d.ts +1 -1
- package/dist/messaging.d.ts.map +1 -1
- package/dist/streams.d.ts +77 -0
- package/dist/streams.d.ts.map +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var li=function(e,t){return li=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(r[a]=s[a])},li(e,t)};function tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");li(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Oa(e,t,r,s){function a(m){return m instanceof r?m:new r(function(v){v(m)})}return new(r||(r=Promise))(function(m,v){function i(f){try{u(s.next(f))}catch(h){v(h)}}function c(f){try{u(s.throw(f))}catch(h){v(h)}}function u(f){f.done?m(f.value):a(f.value).then(i,c)}u((s=s.apply(e,t||[])).next())})}function xn(e,t){var r={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},s,a,m,v=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return v.next=i(0),v.throw=i(1),v.return=i(2),typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function i(u){return function(f){return c([u,f])}}function c(u){if(s)throw new TypeError("Generator is already executing.");for(;v&&(v=0,u[0]&&(r=0)),r;)try{if(s=1,a&&(m=u[0]&2?a.return:u[0]?a.throw||((m=a.return)&&m.call(a),0):a.next)&&!(m=m.call(a,u[1])).done)return m;switch(a=0,m&&(u=[u[0]&2,m.value]),u[0]){case 0:case 1:m=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(m=r.trys,!(m=m.length>0&&m[m.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!m||u[1]>m[0]&&u[1]<m[3])){r.label=u[1];break}if(u[0]===6&&r.label<m[1]){r.label=m[1],m=u;break}if(m&&r.label<m[2]){r.label=m[2],r.ops.push(u);break}m[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(f){u=[6,f],a=0}finally{s=m=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function St(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],s=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ge(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s=r.call(e),a,m=[],v;try{for(;(t===void 0||t-- >0)&&!(a=s.next()).done;)m.push(a.value)}catch(i){v={error:i}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(v)throw v.error}}return m}function qe(e,t,r){if(r||arguments.length===2)for(var s=0,a=t.length,m;s<a;s++)(m||!(s in t))&&(m||(m=Array.prototype.slice.call(t,0,s)),m[s]=t[s]);return e.concat(m||Array.prototype.slice.call(t))}function mt(e){return this instanceof mt?(this.v=e,this):new mt(e)}function Na(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=r.apply(e,t||[]),a,m=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",v),a[Symbol.asyncIterator]=function(){return this},a;function v(S){return function(E){return Promise.resolve(E).then(S,h)}}function i(S,E){s[S]&&(a[S]=function(g){return new Promise(function(n,l){m.push([S,g,n,l])>1||c(S,g)})},E&&(a[S]=E(a[S])))}function c(S,E){try{u(s[S](E))}catch(g){_(m[0][3],g)}}function u(S){S.value instanceof mt?Promise.resolve(S.value.v).then(f,h):_(m[0][2],S)}function f(S){c("next",S)}function h(S){c("throw",S)}function _(S,E){S(E),m.shift(),m.length&&c(m[0][0],m[0][1])}}function Ma(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof St=="function"?St(e):e[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(m){r[m]=e[m]&&function(v){return new Promise(function(i,c){v=e[m](v),a(i,c,v.done,v.value)})}}function a(m,v,i,c){Promise.resolve(c).then(function(u){m({value:u,done:i})},v)}}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const fr=globalThis,Ai=fr.ShadowRoot&&(fr.ShadyCSS===void 0||fr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ri=Symbol(),hs=new WeakMap;let Ln=class{constructor(t,r,s){if(this._$cssResult$=!0,s!==Ri)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o;const r=this.t;if(Ai&&t===void 0){const s=r!==void 0&&r.length===1;s&&(t=hs.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&hs.set(r,t))}return t}toString(){return this.cssText}};const Ot=e=>new Ln(typeof e=="string"?e:e+"",void 0,Ri),Me=(e,...t)=>{const r=e.length===1?e[0]:t.reduce(((s,a,m)=>s+(v=>{if(v._$cssResult$===!0)return v.cssText;if(typeof v=="number")return v;throw Error("Value passed to 'css' function must be a 'css' function result: "+v+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[m+1]),e[0]);return new Ln(r,e,Ri)},Fa=(e,t)=>{if(Ai)e.adoptedStyleSheets=t.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(const r of t){const s=document.createElement("style"),a=fr.litNonce;a!==void 0&&s.setAttribute("nonce",a),s.textContent=r.cssText,e.appendChild(s)}},us=Ai?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const s of t.cssRules)r+=s.cssText;return Ot(r)})(e):e;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:Pa,defineProperty:Ua,getOwnPropertyDescriptor:Va,getOwnPropertyNames:Ha,getOwnPropertySymbols:$a,getPrototypeOf:Wa}=Object,Je=globalThis,fs=Je.trustedTypes,Ga=fs?fs.emptyScript:"",Kr=Je.reactiveElementPolyfillSupport,Mt=(e,t)=>e,Sr={toAttribute(e,t){switch(t){case Boolean:e=e?Ga:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},xi=(e,t)=>!Pa(e,t),gs={attribute:!0,type:String,converter:Sr,reflect:!1,useDefault:!1,hasChanged:xi};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Je.litPropertyMetadata??(Je.litPropertyMetadata=new WeakMap);let _t=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=gs){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const s=Symbol(),a=this.getPropertyDescriptor(t,s,r);a!==void 0&&Ua(this.prototype,t,a)}}static getPropertyDescriptor(t,r,s){const{get:a,set:m}=Va(this.prototype,t)??{get(){return this[r]},set(v){this[r]=v}};return{get:a,set(v){const i=a==null?void 0:a.call(this);m==null||m.call(this,v),this.requestUpdate(t,i,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??gs}static _$Ei(){if(this.hasOwnProperty(Mt("elementProperties")))return;const t=Wa(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Mt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Mt("properties"))){const r=this.properties,s=[...Ha(r),...$a(r)];for(const a of s)this.createProperty(a,r[a])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[s,a]of r)this.elementProperties.set(s,a)}this._$Eh=new Map;for(const[r,s]of this.elementProperties){const a=this._$Eu(r,s);a!==void 0&&this._$Eh.set(a,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const a of s)r.unshift(us(a))}else t!==void 0&&r.push(us(t));return r}static _$Eu(t,r){const s=r.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((r=>this.enableUpdating=r)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((r=>r(this)))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const s of r.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Fa(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((r=>{var s;return(s=r.hostConnected)==null?void 0:s.call(r)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((r=>{var s;return(s=r.hostDisconnected)==null?void 0:s.call(r)}))}attributeChangedCallback(t,r,s){this._$AK(t,s)}_$ET(t,r){var m;const s=this.constructor.elementProperties.get(t),a=this.constructor._$Eu(t,s);if(a!==void 0&&s.reflect===!0){const v=(((m=s.converter)==null?void 0:m.toAttribute)!==void 0?s.converter:Sr).toAttribute(r,s.type);this._$Em=t,v==null?this.removeAttribute(a):this.setAttribute(a,v),this._$Em=null}}_$AK(t,r){var m,v;const s=this.constructor,a=s._$Eh.get(t);if(a!==void 0&&this._$Em!==a){const i=s.getPropertyOptions(a),c=typeof i.converter=="function"?{fromAttribute:i.converter}:((m=i.converter)==null?void 0:m.fromAttribute)!==void 0?i.converter:Sr;this._$Em=a;const u=c.fromAttribute(r,i.type);this[a]=u??((v=this._$Ej)==null?void 0:v.get(a))??u,this._$Em=null}}requestUpdate(t,r,s){var a;if(t!==void 0){const m=this.constructor,v=this[t];if(s??(s=m.getPropertyOptions(t)),!((s.hasChanged??xi)(v,r)||s.useDefault&&s.reflect&&v===((a=this._$Ej)==null?void 0:a.get(t))&&!this.hasAttribute(m._$Eu(t,s))))return;this.C(t,r,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:s,reflect:a,wrapped:m},v){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,v??r??this[t]),m!==!0||v!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(r=void 0),this._$AL.set(t,r)),a===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[m,v]of this._$Ep)this[m]=v;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[m,v]of a){const{wrapped:i}=v,c=this[m];i!==!0||this._$AL.has(m)||c===void 0||this.C(m,void 0,v,c)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(s=this._$EO)==null||s.forEach((a=>{var m;return(m=a.hostUpdate)==null?void 0:m.call(a)})),this.update(r)):this._$EM()}catch(a){throw t=!1,this._$EM(),a}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach((s=>{var a;return(a=s.hostUpdated)==null?void 0:a.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((r=>this._$ET(r,this[r])))),this._$EM()}updated(t){}firstUpdated(t){}};_t.elementStyles=[],_t.shadowRootOptions={mode:"open"},_t[Mt("elementProperties")]=new Map,_t[Mt("finalized")]=new Map,Kr==null||Kr({ReactiveElement:_t}),(Je.reactiveElementVersions??(Je.reactiveElementVersions=[])).push("2.1.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const Ft=globalThis,yr=Ft.trustedTypes,ps=yr?yr.createPolicy("lit-html",{createHTML:e=>e}):void 0,Tn="$lit$",Xe=`lit$${Math.random().toFixed(9).slice(2)}$`,Dn="?"+Xe,Ka=`<${Dn}>`,ht=document,Vt=()=>ht.createComment(""),Ht=e=>e===null||typeof e!="object"&&typeof e!="function",Li=Array.isArray,Za=e=>Li(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",Zr=`[
|
|
14
|
+
\f\r]`,Tt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_s=/-->/g,vs=/>/g,it=RegExp(`>|${Zr}(?:([^\\s"'>=/]+)(${Zr}*=${Zr}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ms=/'/g,bs=/"/g,On=/^(?:script|style|textarea|title)$/i,za=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),j=za(1),yt=Symbol.for("lit-noChange"),ge=Symbol.for("lit-nothing"),Ss=new WeakMap,ot=ht.createTreeWalker(ht,129);function Nn(e,t){if(!Li(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return ps!==void 0?ps.createHTML(t):t}const Ya=(e,t)=>{const r=e.length-1,s=[];let a,m=t===2?"<svg>":t===3?"<math>":"",v=Tt;for(let i=0;i<r;i++){const c=e[i];let u,f,h=-1,_=0;for(;_<c.length&&(v.lastIndex=_,f=v.exec(c),f!==null);)_=v.lastIndex,v===Tt?f[1]==="!--"?v=_s:f[1]!==void 0?v=vs:f[2]!==void 0?(On.test(f[2])&&(a=RegExp("</"+f[2],"g")),v=it):f[3]!==void 0&&(v=it):v===it?f[0]===">"?(v=a??Tt,h=-1):f[1]===void 0?h=-2:(h=v.lastIndex-f[2].length,u=f[1],v=f[3]===void 0?it:f[3]==='"'?bs:ms):v===bs||v===ms?v=it:v===_s||v===vs?v=Tt:(v=it,a=void 0);const S=v===it&&e[i+1].startsWith("/>")?" ":"";m+=v===Tt?c+Ka:h>=0?(s.push(u),c.slice(0,h)+Tn+c.slice(h)+Xe+S):c+Xe+(h===-2?i:S)}return[Nn(e,m+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class $t{constructor({strings:t,_$litType$:r},s){let a;this.parts=[];let m=0,v=0;const i=t.length-1,c=this.parts,[u,f]=Ya(t,r);if(this.el=$t.createElement(u,s),ot.currentNode=this.el.content,r===2||r===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(a=ot.nextNode())!==null&&c.length<i;){if(a.nodeType===1){if(a.hasAttributes())for(const h of a.getAttributeNames())if(h.endsWith(Tn)){const _=f[v++],S=a.getAttribute(h).split(Xe),E=/([.?@])?(.*)/.exec(_);c.push({type:1,index:m,name:E[2],strings:S,ctor:E[1]==="."?Xa:E[1]==="?"?Ja:E[1]==="@"?qa:xr}),a.removeAttribute(h)}else h.startsWith(Xe)&&(c.push({type:6,index:m}),a.removeAttribute(h));if(On.test(a.tagName)){const h=a.textContent.split(Xe),_=h.length-1;if(_>0){a.textContent=yr?yr.emptyScript:"";for(let S=0;S<_;S++)a.append(h[S],Vt()),ot.nextNode(),c.push({type:2,index:++m});a.append(h[_],Vt())}}}else if(a.nodeType===8)if(a.data===Dn)c.push({type:2,index:m});else{let h=-1;for(;(h=a.data.indexOf(Xe,h+1))!==-1;)c.push({type:7,index:m}),h+=Xe.length-1}m++}}static createElement(t,r){const s=ht.createElement("template");return s.innerHTML=t,s}}function Ct(e,t,r=e,s){var v,i;if(t===yt)return t;let a=s!==void 0?(v=r._$Co)==null?void 0:v[s]:r._$Cl;const m=Ht(t)?void 0:t._$litDirective$;return(a==null?void 0:a.constructor)!==m&&((i=a==null?void 0:a._$AO)==null||i.call(a,!1),m===void 0?a=void 0:(a=new m(e),a._$AT(e,r,s)),s!==void 0?(r._$Co??(r._$Co=[]))[s]=a:r._$Cl=a),a!==void 0&&(t=Ct(e,a._$AS(e,t.values),a,s)),t}class ja{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:s}=this._$AD,a=((t==null?void 0:t.creationScope)??ht).importNode(r,!0);ot.currentNode=a;let m=ot.nextNode(),v=0,i=0,c=s[0];for(;c!==void 0;){if(v===c.index){let u;c.type===2?u=new qt(m,m.nextSibling,this,t):c.type===1?u=new c.ctor(m,c.name,c.strings,this,t):c.type===6&&(u=new Qa(m,this,t)),this._$AV.push(u),c=s[++i]}v!==(c==null?void 0:c.index)&&(m=ot.nextNode(),v++)}return ot.currentNode=ht,a}p(t){let r=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,r),r+=s.strings.length-2):s._$AI(t[r])),r++}}class qt{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,r,s,a){this.type=2,this._$AH=ge,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=s,this.options=a,this._$Cv=(a==null?void 0:a.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Ct(this,t,r),Ht(t)?t===ge||t==null||t===""?(this._$AH!==ge&&this._$AR(),this._$AH=ge):t!==this._$AH&&t!==yt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Za(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==ge&&Ht(this._$AH)?this._$AA.nextSibling.data=t:this.T(ht.createTextNode(t)),this._$AH=t}$(t){var m;const{values:r,_$litType$:s}=t,a=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=$t.createElement(Nn(s.h,s.h[0]),this.options)),s);if(((m=this._$AH)==null?void 0:m._$AD)===a)this._$AH.p(r);else{const v=new ja(a,this),i=v.u(this.options);v.p(r),this.T(i),this._$AH=v}}_$AC(t){let r=Ss.get(t.strings);return r===void 0&&Ss.set(t.strings,r=new $t(t)),r}k(t){Li(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let s,a=0;for(const m of t)a===r.length?r.push(s=new qt(this.O(Vt()),this.O(Vt()),this,this.options)):s=r[a],s._$AI(m),a++;a<r.length&&(this._$AR(s&&s._$AB.nextSibling,a),r.length=a)}_$AR(t=this._$AA.nextSibling,r){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,r);t!==this._$AB;){const a=t.nextSibling;t.remove(),t=a}}setConnected(t){var r;this._$AM===void 0&&(this._$Cv=t,(r=this._$AP)==null||r.call(this,t))}}class xr{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,s,a,m){this.type=1,this._$AH=ge,this._$AN=void 0,this.element=t,this.name=r,this._$AM=a,this.options=m,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=ge}_$AI(t,r=this,s,a){const m=this.strings;let v=!1;if(m===void 0)t=Ct(this,t,r,0),v=!Ht(t)||t!==this._$AH&&t!==yt,v&&(this._$AH=t);else{const i=t;let c,u;for(t=m[0],c=0;c<m.length-1;c++)u=Ct(this,i[s+c],r,c),u===yt&&(u=this._$AH[c]),v||(v=!Ht(u)||u!==this._$AH[c]),u===ge?t=ge:t!==ge&&(t+=(u??"")+m[c+1]),this._$AH[c]=u}v&&!a&&this.j(t)}j(t){t===ge?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Xa extends xr{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ge?void 0:t}}class Ja extends xr{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==ge)}}class qa extends xr{constructor(t,r,s,a,m){super(t,r,s,a,m),this.type=5}_$AI(t,r=this){if((t=Ct(this,t,r,0)??ge)===yt)return;const s=this._$AH,a=t===ge&&s!==ge||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,m=t!==ge&&(s===ge||a);a&&this.element.removeEventListener(this.name,this,s),m&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}}class Qa{constructor(t,r,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Ct(this,t)}}const zr=Ft.litHtmlPolyfillSupport;zr==null||zr($t,qt),(Ft.litHtmlVersions??(Ft.litHtmlVersions=[])).push("3.3.1");const ec=(e,t,r)=>{const s=(r==null?void 0:r.renderBefore)??t;let a=s._$litPart$;if(a===void 0){const m=(r==null?void 0:r.renderBefore)??null;s._$litPart$=a=new qt(t.insertBefore(Vt(),m),m,void 0,r??{})}return a._$AI(e),a};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const
|
|
19
|
+
*/const lt=globalThis;class Ee extends _t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ec(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return yt}}var Rn;Ee._$litElement$=!0,Ee.finalized=!0,(Rn=lt.litElementHydrateSupport)==null||Rn.call(lt,{LitElement:Ee});const Yr=lt.litElementPolyfillSupport;Yr==null||Yr({LitElement:Ee});(lt.litElementVersions??(lt.litElementVersions=[])).push("4.2.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const Le=e=>(t,r)=>{r!==void 0?r.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const tc={attribute:!0,type:String,converter:Sr,reflect:!1,hasChanged:xi},rc=(e=tc,t,r)=>{const{kind:s,metadata:a}=r;let m=globalThis.litPropertyMetadata.get(a);if(m===void 0&&globalThis.litPropertyMetadata.set(a,m=new Map),s==="setter"&&((e=Object.create(e)).wrapped=!0),m.set(r.name,e),s==="accessor"){const{name:v}=r;return{set(i){const c=t.get.call(this);t.set.call(this,i),this.requestUpdate(v,c,e)},init(i){return i!==void 0&&this.C(v,void 0,e,i),i}}}if(s==="setter"){const{name:v}=r;return function(i){const c=this[v];t.call(this,i),this.requestUpdate(v,c,e)}}throw Error("Unsupported decorator location: "+s)};function G(e){return(t,r)=>typeof r=="object"?rc(e,t,r):((s,a,m)=>{const v=a.hasOwnProperty(m);return a.constructor.createProperty(m,s),v?Object.getOwnPropertyDescriptor(a,m):void 0})(e,t,r)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function
|
|
31
|
+
*/function ic(e){return G({...e,state:!0,attribute:!1})}var sc=Object.getOwnPropertyDescriptor,nc=(e,t,r,s)=>{for(var a=s>1?void 0:s?sc(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=v(a)||a);return a};let di=class extends Ee{onClose(e){e.defaultPrevented&&e.preventDefault();const t=new CustomEvent("closed");this.dispatchEvent(t)}render(){return j`
|
|
32
32
|
<div class="close-button tooltip">
|
|
33
33
|
<span class="tooltiptext">Close</span>
|
|
34
34
|
<vscode-button
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<span class="icon icon-close"></span>
|
|
41
41
|
</vscode-button>
|
|
42
42
|
</div>
|
|
43
|
-
`}};
|
|
43
|
+
`}};di.styles=Me`
|
|
44
44
|
:host {
|
|
45
45
|
--button-icon-hover-background: var(--vscode-toolbar-hoverBackground);
|
|
46
46
|
--tooltip-background: #343434;
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
margin-left: -5px;
|
|
99
99
|
border-width: 5px;
|
|
100
100
|
border-style: solid;
|
|
101
|
-
border-color: transparent transparent var(--tooltip-background)
|
|
101
|
+
border-color: transparent transparent var(--tooltip-background)
|
|
102
|
+
transparent;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
.tooltip .tooltiptext {
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
.tooltip:not(:hover) .tooltiptext {
|
|
113
114
|
transition-delay: 0s;
|
|
114
115
|
}
|
|
115
|
-
`;
|
|
116
|
+
`;di=nc([Le("close-cell-button")],di);const Mn=j`
|
|
116
117
|
<svg
|
|
117
118
|
class="icon"
|
|
118
119
|
width="16"
|
|
@@ -126,13 +127,17 @@
|
|
|
126
127
|
clip-rule="evenodd"
|
|
127
128
|
d="M4 4l1-1h5.414L14 6.586V14l-1 1H5l-1-1V4zm9 3l-3-3H5v10h8V7z"
|
|
128
129
|
/>
|
|
129
|
-
<path
|
|
130
|
+
<path
|
|
131
|
+
fill-rule="evenodd"
|
|
132
|
+
clip-rule="evenodd"
|
|
133
|
+
d="M3 1L2 2v10l1 1V2h6.414l-1-1H3z"
|
|
134
|
+
/>
|
|
130
135
|
</svg>
|
|
131
|
-
`;var
|
|
136
|
+
`;var oc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,Fn=(e,t,r,s)=>{for(var a=s>1?void 0:s?ac(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&oc(t,r,a),a};let Cr=class extends Ee{constructor(){super(...arguments),this.copyText="Copy"}onCopy(e){e.defaultPrevented&&e.preventDefault();const t=new CustomEvent("onCopy");this.dispatchEvent(t)}render(){return j`
|
|
132
137
|
<vscode-button appearance="secondary" @click=${this.onCopy}>
|
|
133
|
-
${
|
|
138
|
+
${Mn} ${this.copyText}
|
|
134
139
|
</vscode-button>
|
|
135
|
-
`}}
|
|
140
|
+
`}};Cr.styles=Me`
|
|
136
141
|
vscode-button {
|
|
137
142
|
color: var(--vscode-button-foreground);
|
|
138
143
|
background-color: var(--vscode-button-background);
|
|
@@ -149,38 +154,25 @@
|
|
|
149
154
|
margin: 0 5px 0 -5px;
|
|
150
155
|
padding: 0;
|
|
151
156
|
}
|
|
152
|
-
`;as([J({type:String})],$t.prototype,"copyText",2);$t=as([ve("copy-button")],$t);/**
|
|
157
|
+
`;Fn([G({type:String})],Cr.prototype,"copyText",2);Cr=Fn([Le("copy-button")],Cr);var gr={exports:{}},cc=gr.exports,ys;function lc(){return ys||(ys=1,(function(e,t){(function(r,s){e.exports=s()})(cc,(()=>(()=>{var r={930:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const u=c(485);i.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(f,h,_){this._css.set(f,h,_)}getCss(f,h){return this._css.get(f,h)}setColor(f,h,_){this._color.set(f,h,_)}getColor(f,h){return this._color.get(f,h)}clear(){this._color.clear(),this._css.clear()}}},997:function(v,i,c){var u=this&&this.__decorate||function(w,b,k,R){var L,T=arguments.length,A=T<3?b:R===null?R=Object.getOwnPropertyDescriptor(b,k):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,b,k,R);else for(var F=w.length-1;F>=0;F--)(L=w[F])&&(A=(T<3?L(A):T>3?L(b,k,A):L(b,k))||A);return T>3&&A&&Object.defineProperty(b,k,A),A},f=this&&this.__param||function(w,b){return function(k,R){b(k,R,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const h=c(930),_=c(160),S=c(345),E=c(859),g=c(97),n=_.css.toColor("#ffffff"),l=_.css.toColor("#000000"),o=_.css.toColor("#ffffff"),d=_.css.toColor("#000000"),p={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[_.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")],b=[0,95,135,175,215,255];for(let k=0;k<216;k++){const R=b[k/36%6|0],L=b[k/6%6|0],T=b[k%6];w.push({css:_.channels.toCss(R,L,T),rgba:_.channels.toRgba(R,L,T)})}for(let k=0;k<24;k++){const R=8+10*k;w.push({css:_.channels.toCss(R,R,R),rgba:_.channels.toRgba(R,R,R)})}return w})());let C=i.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:n,background:l,cursor:o,cursorAccent:d,selectionForeground:void 0,selectionBackgroundTransparent:p,selectionBackgroundOpaque:_.color.blend(l,p),selectionInactiveBackgroundTransparent:p,selectionInactiveBackgroundOpaque:_.color.blend(l,p),ansi:i.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(w={}){const b=this._colors;if(b.foreground=y(w.foreground,n),b.background=y(w.background,l),b.cursor=y(w.cursor,o),b.cursorAccent=y(w.cursorAccent,d),b.selectionBackgroundTransparent=y(w.selectionBackground,p),b.selectionBackgroundOpaque=_.color.blend(b.background,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundTransparent=y(w.selectionInactiveBackground,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundOpaque=_.color.blend(b.background,b.selectionInactiveBackgroundTransparent),b.selectionForeground=w.selectionForeground?y(w.selectionForeground,_.NULL_COLOR):void 0,b.selectionForeground===_.NULL_COLOR&&(b.selectionForeground=void 0),_.color.isOpaque(b.selectionBackgroundTransparent)&&(b.selectionBackgroundTransparent=_.color.opacity(b.selectionBackgroundTransparent,.3)),_.color.isOpaque(b.selectionInactiveBackgroundTransparent)&&(b.selectionInactiveBackgroundTransparent=_.color.opacity(b.selectionInactiveBackgroundTransparent,.3)),b.ansi=i.DEFAULT_ANSI_COLORS.slice(),b.ansi[0]=y(w.black,i.DEFAULT_ANSI_COLORS[0]),b.ansi[1]=y(w.red,i.DEFAULT_ANSI_COLORS[1]),b.ansi[2]=y(w.green,i.DEFAULT_ANSI_COLORS[2]),b.ansi[3]=y(w.yellow,i.DEFAULT_ANSI_COLORS[3]),b.ansi[4]=y(w.blue,i.DEFAULT_ANSI_COLORS[4]),b.ansi[5]=y(w.magenta,i.DEFAULT_ANSI_COLORS[5]),b.ansi[6]=y(w.cyan,i.DEFAULT_ANSI_COLORS[6]),b.ansi[7]=y(w.white,i.DEFAULT_ANSI_COLORS[7]),b.ansi[8]=y(w.brightBlack,i.DEFAULT_ANSI_COLORS[8]),b.ansi[9]=y(w.brightRed,i.DEFAULT_ANSI_COLORS[9]),b.ansi[10]=y(w.brightGreen,i.DEFAULT_ANSI_COLORS[10]),b.ansi[11]=y(w.brightYellow,i.DEFAULT_ANSI_COLORS[11]),b.ansi[12]=y(w.brightBlue,i.DEFAULT_ANSI_COLORS[12]),b.ansi[13]=y(w.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),b.ansi[14]=y(w.brightCyan,i.DEFAULT_ANSI_COLORS[14]),b.ansi[15]=y(w.brightWhite,i.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const k=Math.min(b.ansi.length-16,w.extendedAnsi.length);for(let R=0;R<k;R++)b.ansi[R+16]=y(w.extendedAnsi[R],i.DEFAULT_ANSI_COLORS[R+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[w]=this._restoreColors.ansi[w]}else for(let b=0;b<this._restoreColors.ansi.length;++b)this._colors.ansi[b]=this._restoreColors.ansi[b]}modifyColors(w){w(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function y(w,b){if(w!==void 0)try{return _.css.toColor(w)}catch{}return b}i.ThemeService=C=u([f(0,g.IOptionsService)],C)},160:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let c=0,u=0,f=0,h=0;var _,S,E,g,n;function l(d){const p=d.toString(16);return p.length<2?"0"+p:p}function o(d,p){return d<p?(p+.05)/(d+.05):(d+.05)/(p+.05)}i.NULL_COLOR={css:"#00000000",rgba:0},(function(d){d.toCss=function(p,C,y,w){return w!==void 0?`#${l(p)}${l(C)}${l(y)}${l(w)}`:`#${l(p)}${l(C)}${l(y)}`},d.toRgba=function(p,C,y,w=255){return(p<<24|C<<16|y<<8|w)>>>0},d.toColor=function(p,C,y,w){return{css:d.toCss(p,C,y,w),rgba:d.toRgba(p,C,y,w)}}})(_||(i.channels=_={})),(function(d){function p(C,y){return h=Math.round(255*y),[c,u,f]=n.toChannels(C.rgba),{css:_.toCss(c,u,f,h),rgba:_.toRgba(c,u,f,h)}}d.blend=function(C,y){if(h=(255&y.rgba)/255,h===1)return{css:y.css,rgba:y.rgba};const w=y.rgba>>24&255,b=y.rgba>>16&255,k=y.rgba>>8&255,R=C.rgba>>24&255,L=C.rgba>>16&255,T=C.rgba>>8&255;return c=R+Math.round((w-R)*h),u=L+Math.round((b-L)*h),f=T+Math.round((k-T)*h),{css:_.toCss(c,u,f),rgba:_.toRgba(c,u,f)}},d.isOpaque=function(C){return(255&C.rgba)==255},d.ensureContrastRatio=function(C,y,w){const b=n.ensureContrastRatio(C.rgba,y.rgba,w);if(b)return _.toColor(b>>24&255,b>>16&255,b>>8&255)},d.opaque=function(C){const y=(255|C.rgba)>>>0;return[c,u,f]=n.toChannels(y),{css:_.toCss(c,u,f),rgba:y}},d.opacity=p,d.multiplyOpacity=function(C,y){return h=255&C.rgba,p(C,h*y/255)},d.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(S||(i.color=S={})),(function(d){let p,C;try{const y=document.createElement("canvas");y.width=1,y.height=1;const w=y.getContext("2d",{willReadFrequently:!0});w&&(p=w,p.globalCompositeOperation="copy",C=p.createLinearGradient(0,0,1,1))}catch{}d.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return c=parseInt(y.slice(1,2).repeat(2),16),u=parseInt(y.slice(2,3).repeat(2),16),f=parseInt(y.slice(3,4).repeat(2),16),_.toColor(c,u,f);case 5:return c=parseInt(y.slice(1,2).repeat(2),16),u=parseInt(y.slice(2,3).repeat(2),16),f=parseInt(y.slice(3,4).repeat(2),16),h=parseInt(y.slice(4,5).repeat(2),16),_.toColor(c,u,f,h);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const w=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return c=parseInt(w[1]),u=parseInt(w[2]),f=parseInt(w[3]),h=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),_.toColor(c,u,f,h);if(!p||!C)throw new Error("css.toColor: Unsupported css format");if(p.fillStyle=C,p.fillStyle=y,typeof p.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(p.fillRect(0,0,1,1),[c,u,f,h]=p.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,u,f,h),css:y}}})(E||(i.css=E={})),(function(d){function p(C,y,w){const b=C/255,k=y/255,R=w/255;return .2126*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.7152*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.0722*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))}d.relativeLuminance=function(C){return p(C>>16&255,C>>8&255,255&C)},d.relativeLuminance2=p})(g||(i.rgb=g={})),(function(d){function p(y,w,b){const k=y>>24&255,R=y>>16&255,L=y>>8&255;let T=w>>24&255,A=w>>16&255,F=w>>8&255,U=o(g.relativeLuminance2(T,A,F),g.relativeLuminance2(k,R,L));for(;U<b&&(T>0||A>0||F>0);)T-=Math.max(0,Math.ceil(.1*T)),A-=Math.max(0,Math.ceil(.1*A)),F-=Math.max(0,Math.ceil(.1*F)),U=o(g.relativeLuminance2(T,A,F),g.relativeLuminance2(k,R,L));return(T<<24|A<<16|F<<8|255)>>>0}function C(y,w,b){const k=y>>24&255,R=y>>16&255,L=y>>8&255;let T=w>>24&255,A=w>>16&255,F=w>>8&255,U=o(g.relativeLuminance2(T,A,F),g.relativeLuminance2(k,R,L));for(;U<b&&(T<255||A<255||F<255);)T=Math.min(255,T+Math.ceil(.1*(255-T))),A=Math.min(255,A+Math.ceil(.1*(255-A))),F=Math.min(255,F+Math.ceil(.1*(255-F))),U=o(g.relativeLuminance2(T,A,F),g.relativeLuminance2(k,R,L));return(T<<24|A<<16|F<<8|255)>>>0}d.blend=function(y,w){if(h=(255&w)/255,h===1)return w;const b=w>>24&255,k=w>>16&255,R=w>>8&255,L=y>>24&255,T=y>>16&255,A=y>>8&255;return c=L+Math.round((b-L)*h),u=T+Math.round((k-T)*h),f=A+Math.round((R-A)*h),_.toRgba(c,u,f)},d.ensureContrastRatio=function(y,w,b){const k=g.relativeLuminance(y>>8),R=g.relativeLuminance(w>>8);if(o(k,R)<b){if(R<k){const A=p(y,w,b),F=o(k,g.relativeLuminance(A>>8));if(F<b){const U=C(y,w,b);return F>o(k,g.relativeLuminance(U>>8))?A:U}return A}const L=C(y,w,b),T=o(k,g.relativeLuminance(L>>8));if(T<b){const A=p(y,w,b);return T>o(k,g.relativeLuminance(A>>8))?L:A}return L}},d.reduceLuminance=p,d.increaseLuminance=C,d.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}})(n||(i.rgba=n={})),i.toPaddedHex=l,i.contrastRatio=o},345:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.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 u=0;u<this._listeners.length;u++)if(this._listeners[u]===c)return void this._listeners.splice(u,1)}}})),this._event}fire(c,u){const f=[];for(let h=0;h<this._listeners.length;h++)f.push(this._listeners[h]);for(let h=0;h<f.length;h++)f[h].call(void 0,c,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(c,u){return c((f=>u.fire(f)))},i.runAndSubscribe=function(c,u){return u(void 0),c((f=>u(f)))}},859:(v,i)=>{function c(u){for(const f of u)f.dispose();u.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const f=this._disposables.indexOf(u);f!==-1&&this._disposables.splice(f,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var f;this._isDisposed||u===this._value||((f=this._value)==null||f.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},i.toDisposable=function(u){return{dispose:u}},i.disposeArray=c,i.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},485:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(f,h,_){this._data[f]||(this._data[f]={}),this._data[f][h]=_}get(f,h){return this._data[f]?this._data[f][h]:void 0}clear(){this._data={}}}i.TwoKeyMap=c,i.FourKeyMap=class{constructor(){this._data=new c}set(u,f,h,_,S){this._data.get(u,f)||this._data.set(u,f,new c),this._data.get(u,f).set(h,_,S)}get(u,f,h,_){var S;return(S=this._data.get(u,f))==null?void 0:S.get(h,_)}clear(){this._data.clear()}}},726:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const c="di$target",u="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(f){return f[u]||[]},i.createDecorator=function(f){if(i.serviceRegistry.has(f))return i.serviceRegistry.get(f);const h=function(_,S,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,n,l){n[c]===n?n[u].push({id:g,index:l}):(n[u]=[{id:g,index:l}],n[c]=n)})(h,_,E)};return h.toString=()=>f,i.serviceRegistry.set(f,h),h}},97:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const u=c(726);var f;i.IBufferService=(0,u.createDecorator)("BufferService"),i.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),i.ICoreService=(0,u.createDecorator)("CoreService"),i.ICharsetService=(0,u.createDecorator)("CharsetService"),i.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(f||(i.LogLevelEnum=f={})),i.ILogService=(0,u.createDecorator)("LogService"),i.IOptionsService=(0,u.createDecorator)("OptionsService"),i.IOscLinkService=(0,u.createDecorator)("OscLinkService"),i.IUnicodeService=(0,u.createDecorator)("UnicodeService"),i.IDecorationService=(0,u.createDecorator)("DecorationService")}},s={};function a(v){var i=s[v];if(i!==void 0)return i.exports;var c=s[v]={exports:{}};return r[v].call(c.exports,c,c.exports,a),c.exports}var m={};return(()=>{var v=m;Object.defineProperty(v,"__esModule",{value:!0}),v.HTMLSerializeHandler=v.SerializeAddon=void 0;const i=a(997);function c(g,n,l){return Math.max(n,Math.min(g,l))}class u{constructor(n){this._buffer=n}serialize(n,l){const o=this._buffer.getNullCell(),d=this._buffer.getNullCell();let p=o;const C=n.start.y,y=n.end.y,w=n.start.x,b=n.end.x;this._beforeSerialize(y-C,C,y);for(let k=C;k<=y;k++){const R=this._buffer.getLine(k);if(R){const L=k===n.start.y?w:0,T=k===n.end.y?b:R.length;for(let A=L;A<T;A++){const F=R.getCell(A,p===o?d:o);F?(this._nextCell(F,p,k,A),p=F):console.warn(`Can't get cell at row=${k}, col=${A}`)}}this._rowEnd(k,k===y)}return this._afterSerialize(),this._serializeString(l)}_nextCell(n,l,o,d){}_rowEnd(n,l){}_beforeSerialize(n,l,o){}_afterSerialize(){}_serializeString(n){return""}}function f(g,n){return g.getFgColorMode()===n.getFgColorMode()&&g.getFgColor()===n.getFgColor()}function h(g,n){return g.getBgColorMode()===n.getBgColorMode()&&g.getBgColor()===n.getBgColor()}function _(g,n){return g.isInverse()===n.isInverse()&&g.isBold()===n.isBold()&&g.isUnderline()===n.isUnderline()&&g.isOverline()===n.isOverline()&&g.isBlink()===n.isBlink()&&g.isInvisible()===n.isInvisible()&&g.isItalic()===n.isItalic()&&g.isDim()===n.isDim()&&g.isStrikethrough()===n.isStrikethrough()}class S extends u{constructor(n,l){super(n),this._terminal=l,this._rowIndex=0,this._allRows=new Array,this._allRowSeparators=new Array,this._currentRow="",this._nullCellCount=0,this._cursorStyle=this._buffer.getNullCell(),this._cursorStyleRow=0,this._cursorStyleCol=0,this._backgroundCell=this._buffer.getNullCell(),this._firstRow=0,this._lastCursorRow=0,this._lastCursorCol=0,this._lastContentCursorRow=0,this._lastContentCursorCol=0,this._thisRowLastChar=this._buffer.getNullCell(),this._thisRowLastSecondChar=this._buffer.getNullCell(),this._nextRowFirstChar=this._buffer.getNullCell()}_beforeSerialize(n,l,o){this._allRows=new Array(n),this._lastContentCursorRow=l,this._lastCursorRow=l,this._firstRow=l}_rowEnd(n,l){var d;this._nullCellCount>0&&!h(this._cursorStyle,this._backgroundCell)&&(this._currentRow+=`\x1B[${this._nullCellCount}X`);let o="";if(!l){n-this._firstRow>=this._terminal.rows&&((d=this._buffer.getLine(this._cursorStyleRow))==null||d.getCell(this._cursorStyleCol,this._backgroundCell));const p=this._buffer.getLine(n),C=this._buffer.getLine(n+1);if(C.isWrapped){o="";const y=p.getCell(p.length-1,this._thisRowLastChar),w=p.getCell(p.length-2,this._thisRowLastSecondChar),b=C.getCell(0,this._nextRowFirstChar),k=b.getWidth()>1;let R=!1;(b.getChars()&&k?this._nullCellCount<=1:this._nullCellCount<=0)&&((y.getChars()||y.getWidth()===0)&&h(y,b)&&(R=!0),k&&(w.getChars()||w.getWidth()===0)&&h(y,b)&&h(w,b)&&(R=!0)),R||(o="-".repeat(this._nullCellCount+1),o+="\x1B[1D\x1B[1X",this._nullCellCount>0&&(o+="\x1B[A",o+=`\x1B[${p.length-this._nullCellCount}C`,o+=`\x1B[${this._nullCellCount}X`,o+=`\x1B[${p.length-this._nullCellCount}D`,o+="\x1B[B"),this._lastContentCursorRow=n+1,this._lastContentCursorCol=0,this._lastCursorRow=n+1,this._lastCursorCol=0)}else o=`\r
|
|
158
|
+
`,this._lastCursorRow=n+1,this._lastCursorCol=0}this._allRows[this._rowIndex]=this._currentRow,this._allRowSeparators[this._rowIndex++]=o,this._currentRow="",this._nullCellCount=0}_diffStyle(n,l){const o=[],d=!f(n,l),p=!h(n,l),C=!_(n,l);if(d||p||C)if(n.isAttributeDefault())l.isAttributeDefault()||o.push(0);else{if(d){const y=n.getFgColor();n.isFgRGB()?o.push(38,2,y>>>16&255,y>>>8&255,255&y):n.isFgPalette()?y>=16?o.push(38,5,y):o.push(8&y?90+(7&y):30+(7&y)):o.push(39)}if(p){const y=n.getBgColor();n.isBgRGB()?o.push(48,2,y>>>16&255,y>>>8&255,255&y):n.isBgPalette()?y>=16?o.push(48,5,y):o.push(8&y?100+(7&y):40+(7&y)):o.push(49)}C&&(n.isInverse()!==l.isInverse()&&o.push(n.isInverse()?7:27),n.isBold()!==l.isBold()&&o.push(n.isBold()?1:22),n.isUnderline()!==l.isUnderline()&&o.push(n.isUnderline()?4:24),n.isOverline()!==l.isOverline()&&o.push(n.isOverline()?53:55),n.isBlink()!==l.isBlink()&&o.push(n.isBlink()?5:25),n.isInvisible()!==l.isInvisible()&&o.push(n.isInvisible()?8:28),n.isItalic()!==l.isItalic()&&o.push(n.isItalic()?3:23),n.isDim()!==l.isDim()&&o.push(n.isDim()?2:22),n.isStrikethrough()!==l.isStrikethrough()&&o.push(n.isStrikethrough()?9:29))}return o}_nextCell(n,l,o,d){if(n.getWidth()===0)return;const p=n.getChars()==="",C=this._diffStyle(n,this._cursorStyle);if(p?!h(this._cursorStyle,n):C.length>0){this._nullCellCount>0&&(h(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._lastContentCursorRow=this._lastCursorRow=o,this._lastContentCursorCol=this._lastCursorCol=d,this._currentRow+=`\x1B[${C.join(";")}m`;const y=this._buffer.getLine(o);y!==void 0&&(y.getCell(d,this._cursorStyle),this._cursorStyleRow=o,this._cursorStyleCol=d)}p?this._nullCellCount+=n.getWidth():(this._nullCellCount>0&&(h(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._currentRow+=n.getChars(),this._lastContentCursorRow=this._lastCursorRow=o,this._lastContentCursorCol=this._lastCursorCol=d+n.getWidth())}_serializeString(n){let l=this._allRows.length;this._buffer.length-this._firstRow<=this._terminal.rows&&(l=this._lastContentCursorRow+1-this._firstRow,this._lastCursorCol=this._lastContentCursorCol,this._lastCursorRow=this._lastContentCursorRow);let o="";for(let y=0;y<l;y++)o+=this._allRows[y],y+1<l&&(o+=this._allRowSeparators[y]);if(!n){const y=this._buffer.baseY+this._buffer.cursorY,w=this._buffer.cursorX,b=k=>{k>0?o+=`\x1B[${k}C`:k<0&&(o+=`\x1B[${-k}D`)};(y!==this._lastCursorRow||w!==this._lastCursorCol)&&((d=y-this._lastCursorRow)>0?o+=`\x1B[${d}B`:d<0&&(o+=`\x1B[${-d}A`),b(w-this._lastCursorCol))}var d;const p=this._terminal._core._inputHandler._curAttrData,C=this._diffStyle(p,this._cursorStyle);return C.length>0&&(o+=`\x1B[${C.join(";")}m`),o}}v.SerializeAddon=class{activate(g){this._terminal=g}_serializeBufferByScrollback(g,n,l){const o=n.length,d=l===void 0?o:c(l+g.rows,0,o);return this._serializeBufferByRange(g,n,{start:o-d,end:o-1},!1)}_serializeBufferByRange(g,n,l,o){return new S(n,g).serialize({start:{x:0,y:typeof l.start=="number"?l.start:l.start.line},end:{x:g.cols,y:typeof l.end=="number"?l.end:l.end.line}},o)}_serializeBufferAsHTML(g,n){var p;const l=g.buffer.active,o=new E(l,g,n);if(!n.onlySelection){const C=l.length,y=n.scrollback,w=y===void 0?C:c(y+g.rows,0,C);return o.serialize({start:{x:0,y:C-w},end:{x:g.cols,y:C-1}})}const d=(p=this._terminal)==null?void 0:p.getSelectionPosition();return d!==void 0?o.serialize({start:{x:d.start.x,y:d.start.y},end:{x:d.end.x,y:d.end.y}}):""}_serializeModes(g){let n="";const l=g.modes;if(l.applicationCursorKeysMode&&(n+="\x1B[?1h"),l.applicationKeypadMode&&(n+="\x1B[?66h"),l.bracketedPasteMode&&(n+="\x1B[?2004h"),l.insertMode&&(n+="\x1B[4h"),l.originMode&&(n+="\x1B[?6h"),l.reverseWraparoundMode&&(n+="\x1B[?45h"),l.sendFocusMode&&(n+="\x1B[?1004h"),l.wraparoundMode===!1&&(n+="\x1B[?7l"),l.mouseTrackingMode!=="none")switch(l.mouseTrackingMode){case"x10":n+="\x1B[?9h";break;case"vt200":n+="\x1B[?1000h";break;case"drag":n+="\x1B[?1002h";break;case"any":n+="\x1B[?1003h"}return n}serialize(g){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");let n=g!=null&&g.range?this._serializeBufferByRange(this._terminal,this._terminal.buffer.normal,g.range,!0):this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.normal,g==null?void 0:g.scrollback);return g!=null&&g.excludeAltBuffer||this._terminal.buffer.active.type!=="alternate"||(n+=`\x1B[?1049h\x1B[H${this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.alternate,void 0)}`),g!=null&&g.excludeModes||(n+=this._serializeModes(this._terminal)),n}serializeAsHTML(g){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");return this._serializeBufferAsHTML(this._terminal,g||{})}dispose(){}};class E extends u{constructor(n,l,o){super(n),this._terminal=l,this._options=o,this._currentRow="",this._htmlContent="",l._core._themeService?this._ansiColors=l._core._themeService.colors.ansi:this._ansiColors=i.DEFAULT_ANSI_COLORS}_padStart(n,l,o){return l>>=0,o=o??" ",n.length>l?n:((l-=n.length)>o.length&&(o+=o.repeat(l/o.length)),o.slice(0,l)+n)}_beforeSerialize(n,l,o){var y,w;this._htmlContent+="<html><body><!--StartFragment--><pre>";let d="#000000",p="#ffffff";this._options.includeGlobalBackground&&(d=((y=this._terminal.options.theme)==null?void 0:y.foreground)??"#ffffff",p=((w=this._terminal.options.theme)==null?void 0:w.background)??"#000000");const C=[];C.push("color: "+d+";"),C.push("background-color: "+p+";"),C.push("font-family: "+this._terminal.options.fontFamily+";"),C.push("font-size: "+this._terminal.options.fontSize+"px;"),this._htmlContent+="<div style='"+C.join(" ")+"'>"}_afterSerialize(){this._htmlContent+="</div>",this._htmlContent+="</pre><!--EndFragment--></body></html>"}_rowEnd(n,l){this._htmlContent+="<div><span>"+this._currentRow+"</span></div>",this._currentRow=""}_getHexColor(n,l){const o=l?n.getFgColor():n.getBgColor();return(l?n.isFgRGB():n.isBgRGB())?"#"+[o>>16&255,o>>8&255,255&o].map((d=>this._padStart(d.toString(16),2,"0"))).join(""):(l?n.isFgPalette():n.isBgPalette())?this._ansiColors[o].css:void 0}_diffStyle(n,l){const o=[],d=!f(n,l),p=!h(n,l),C=!_(n,l);if(d||p||C){const y=this._getHexColor(n,!0);y&&o.push("color: "+y+";");const w=this._getHexColor(n,!1);return w&&o.push("background-color: "+w+";"),n.isInverse()&&o.push("color: #000000; background-color: #BFBFBF;"),n.isBold()&&o.push("font-weight: bold;"),n.isUnderline()&&n.isOverline()?o.push("text-decoration: overline underline;"):n.isUnderline()?o.push("text-decoration: underline;"):n.isOverline()&&o.push("text-decoration: overline;"),n.isBlink()&&o.push("text-decoration: blink;"),n.isInvisible()&&o.push("visibility: hidden;"),n.isItalic()&&o.push("font-style: italic;"),n.isDim()&&o.push("opacity: 0.5;"),n.isStrikethrough()&&o.push("text-decoration: line-through;"),o}}_nextCell(n,l,o,d){if(n.getWidth()===0)return;const p=n.getChars()==="",C=this._diffStyle(n,l);C&&(this._currentRow+=C.length===0?"</span><span>":"</span><span style='"+C.join(" ")+"'>"),this._currentRow+=p?" ":n.getChars()}_serializeString(){return this._htmlContent}}v.HTMLSerializeHandler=E})(),m})()))})(gr)),gr.exports}var dc=lc(),pr={exports:{}},hc=pr.exports,Cs;function uc(){return Cs||(Cs=1,(function(e,t){(function(r,s){e.exports=s()})(hc,(()=>(()=>{var r={433:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV11=void 0;const u=c(938),f=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],h=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],_=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],S=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let E;function g(n,l){let o,d=0,p=l.length-1;if(n<l[0][0]||n>l[p][1])return!1;for(;p>=d;)if(o=d+p>>1,n>l[o][1])d=o+1;else{if(!(n<l[o][0]))return!0;p=o-1}return!1}i.UnicodeV11=class{constructor(){if(this.version="11",!E){E=new Uint8Array(65536),E.fill(1),E[0]=0,E.fill(0,1,32),E.fill(0,127,160);for(let n=0;n<f.length;++n)E.fill(0,f[n][0],f[n][1]+1);for(let n=0;n<_.length;++n)E.fill(2,_[n][0],_[n][1]+1)}}wcwidth(n){return n<32?0:n<127?1:n<65536?E[n]:g(n,h)?0:g(n,S)?2:1}charProperties(n,l){let o=this.wcwidth(n),d=o===0&&l!==0;if(d){const p=u.UnicodeService.extractWidth(l);p===0?d=!1:p>o&&(o=p)}return u.UnicodeService.createPropertyValue(0,o,d)}}},345:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.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 u=0;u<this._listeners.length;u++)if(this._listeners[u]===c)return void this._listeners.splice(u,1)}}})),this._event}fire(c,u){const f=[];for(let h=0;h<this._listeners.length;h++)f.push(this._listeners[h]);for(let h=0;h<f.length;h++)f[h].call(void 0,c,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(c,u){return c((f=>u.fire(f)))},i.runAndSubscribe=function(c,u){return u(void 0),c((f=>u(f)))}},490:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const u=c(938),f=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let _;i.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 S=0;S<f.length;++S)_.fill(0,f[S][0],f[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?_[S]:(function(E,g){let n,l=0,o=g.length-1;if(E<g[0][0]||E>g[o][1])return!1;for(;o>=l;)if(n=l+o>>1,E>g[n][1])l=n+1;else{if(!(E<g[n][0]))return!0;o=n-1}return!1})(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,E){let g=this.wcwidth(S),n=g===0&&E!==0;if(n){const l=u.UnicodeService.extractWidth(E);l===0?n=!1:l>g&&(g=l)}return u.UnicodeService.createPropertyValue(0,g,n)}}},938:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const u=c(345),f=c(490);class h{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,E,g=!1){return(16777215&S)<<3|(3&E)<<1|(g?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const S=new f.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let E=0,g=0;const n=S.length;for(let l=0;l<n;++l){let o=S.charCodeAt(l);if(55296<=o&&o<=56319){if(++l>=n)return E+this.wcwidth(o);const C=S.charCodeAt(l);56320<=C&&C<=57343?o=1024*(o-55296)+C-56320+65536:E+=this.wcwidth(C)}const d=this.charProperties(o,g);let p=h.extractWidth(d);h.extractShouldJoin(d)&&(p-=h.extractWidth(g)),E+=p,g=d}return E}charProperties(S,E){return this._activeProvider.charProperties(S,E)}}i.UnicodeService=h}},s={};function a(v){var i=s[v];if(i!==void 0)return i.exports;var c=s[v]={exports:{}};return r[v](c,c.exports,a),c.exports}var m={};return(()=>{var v=m;Object.defineProperty(v,"__esModule",{value:!0}),v.Unicode11Addon=void 0;const i=a(433);v.Unicode11Addon=class{activate(c){c.unicode.register(new i.UnicodeV11)}dispose(){}}})(),m})()))})(pr)),pr.exports}var fc=uc(),jr={exports:{}},ws;function gc(){return ws||(ws=1,(function(e,t){(function(r,s){e.exports=s()})(self,(()=>(()=>{var r={6:(v,i)=>{function c(f){try{const h=new URL(f),_=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return f.toLocaleLowerCase().startsWith(_.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.LinkComputer=i.WebLinkProvider=void 0,i.WebLinkProvider=class{constructor(f,h,_,S={}){this._terminal=f,this._regex=h,this._handler=_,this._options=S}provideLinks(f,h){const _=u.computeLink(f,this._regex,this._terminal,this._handler);h(this._addCallbacks(_))}_addCallbacks(f){return f.map((h=>(h.leave=this._options.leave,h.hover=(_,S)=>{if(this._options.hover){const{range:E}=h;this._options.hover(_,S,E)}},h)))}};class u{static computeLink(h,_,S,E){const g=new RegExp(_.source,(_.flags||"")+"g"),[n,l]=u._getWindowedLineStrings(h-1,S),o=n.join("");let d;const p=[];for(;d=g.exec(o);){const C=d[0];if(!c(C))continue;const[y,w]=u._mapStrIdx(S,l,0,d.index),[b,k]=u._mapStrIdx(S,y,w,C.length);if(y===-1||w===-1||b===-1||k===-1)continue;const R={start:{x:w+1,y:y+1},end:{x:k,y:b+1}};p.push({range:R,text:C,activate:E})}return p}static _getWindowedLineStrings(h,_){let S,E=h,g=h,n=0,l="";const o=[];if(S=_.buffer.active.getLine(h)){const d=S.translateToString(!0);if(S.isWrapped&&d[0]!==" "){for(n=0;(S=_.buffer.active.getLine(--E))&&n<2048&&(l=S.translateToString(!0),n+=l.length,o.push(l),S.isWrapped&&l.indexOf(" ")===-1););o.reverse()}for(o.push(d),n=0;(S=_.buffer.active.getLine(++g))&&S.isWrapped&&n<2048&&(l=S.translateToString(!0),n+=l.length,o.push(l),l.indexOf(" ")===-1););}return[o,E]}static _mapStrIdx(h,_,S,E){const g=h.buffer.active,n=g.getNullCell();let l=S;for(;E;){const o=g.getLine(_);if(!o)return[-1,-1];for(let d=l;d<o.length;++d){o.getCell(d,n);const p=n.getChars();if(n.getWidth()&&(E-=p.length||1,d===o.length-1&&p==="")){const C=g.getLine(_+1);C&&C.isWrapped&&(C.getCell(0,n),n.getWidth()===2&&(E+=1))}if(E<0)return[_,d]}_++,l=0}return[_,l]}}i.LinkComputer=u}},s={};function a(v){var i=s[v];if(i!==void 0)return i.exports;var c=s[v]={exports:{}};return r[v](c,c.exports,a),c.exports}var m={};return(()=>{var v=m;Object.defineProperty(v,"__esModule",{value:!0}),v.WebLinksAddon=void 0;const i=a(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(f,h){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}v.WebLinksAddon=class{constructor(f=u,h={}){this._handler=f,this._options=h}activate(f){this._terminal=f;const h=this._options,_=h.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new i.WebLinkProvider(this._terminal,_,this._handler,h))}dispose(){var f;(f=this._linkProvider)==null||f.dispose()}}})(),m})()))})(jr)),jr.exports}var pc=gc(),Xr={exports:{}},Es;function _c(){return Es||(Es=1,(function(e,t){(function(r,s){e.exports=s()})(globalThis,(()=>(()=>{var r={4567:function(v,i,c){var u=this&&this.__decorate||function(o,d,p,C){var y,w=arguments.length,b=w<3?d:C===null?C=Object.getOwnPropertyDescriptor(d,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,d,p,C);else for(var k=o.length-1;k>=0;k--)(y=o[k])&&(b=(w<3?y(b):w>3?y(d,p,b):y(d,p))||b);return w>3&&b&&Object.defineProperty(d,p,b),b},f=this&&this.__param||function(o,d){return function(p,C){d(p,C,o)}};Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const h=c(9042),_=c(9924),S=c(844),E=c(4725),g=c(2585),n=c(3656);let l=i.AccessibilityManager=class extends S.Disposable{constructor(o,d,p,C){super(),this._terminal=o,this._coreBrowserService=p,this._renderService=C,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 y=0;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);if(this._topBoundaryFocusListener=y=>this._handleBoundaryFocus(y,0),this._bottomBoundaryFocusListener=y=>this._handleBoundaryFocus(y,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((y=>this._handleResize(y.rows)))),this.register(this._terminal.onRender((y=>this._refreshRows(y.start,y.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((y=>this._handleChar(y)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
159
|
+
`)))),this.register(this._terminal.onA11yTab((y=>this._handleTab(y)))),this.register(this._terminal.onKey((y=>this._handleKey(y.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,n.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,S.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let d=0;d<o;d++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
160
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,d){this._liveRegionDebouncer.refresh(o,d,this._terminal.rows)}_renderRows(o,d){const p=this._terminal.buffer,C=p.lines.length.toString();for(let y=o;y<=d;y++){const w=p.lines.get(p.ydisp+y),b=[],k=(w==null?void 0:w.translateToString(!0,void 0,void 0,b))||"",R=(p.ydisp+y+1).toString(),L=this._rowElements[y];L&&(k.length===0?(L.innerText=" ",this._rowColumns.set(L,[0,1])):(L.textContent=k,this._rowColumns.set(L,b)),L.setAttribute("aria-posinset",R),L.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,d){const p=o.target,C=this._rowElements[d===0?1:this._rowElements.length-2];if(p.getAttribute("aria-posinset")===(d===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==C)return;let y,w;if(d===0?(y=p,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(y=this._rowElements.shift(),w=p,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),d===0){const b=this._createAccessibilityTreeNode();this._rowElements.unshift(b),this._rowContainer.insertAdjacentElement("afterbegin",b)}else{const b=this._createAccessibilityTreeNode();this._rowElements.push(b),this._rowContainer.appendChild(b)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(d===0?-1:1),this._rowElements[d===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var k;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let d={node:o.anchorNode,offset:o.anchorOffset},p={node:o.focusNode,offset:o.focusOffset};if((d.node.compareDocumentPosition(p.node)&Node.DOCUMENT_POSITION_PRECEDING||d.node===p.node&&d.offset>p.offset)&&([d,p]=[p,d]),d.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(d={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(d.node))return;const C=this._rowElements.slice(-1)[0];if(p.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(p={node:C,offset:((k=C.textContent)==null?void 0:k.length)??0}),!this._rowContainer.contains(p.node))return;const y=({node:R,offset:L})=>{const T=R instanceof Text?R.parentNode:R;let A=parseInt(T==null?void 0:T.getAttribute("aria-posinset"),10)-1;if(isNaN(A))return console.warn("row is invalid. Race condition?"),null;const F=this._rowColumns.get(T);if(!F)return console.warn("columns is null. Race condition?"),null;let U=L<F.length?F[L]:F.slice(-1)[0]+1;return U>=this._terminal.cols&&(++A,U=0),{row:A,column:U}},w=y(d),b=y(p);if(w&&b){if(w.row>b.row||w.row===b.row&&w.column>=b.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(b.row-w.row)*this._terminal.cols-w.column+b.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let d=this._rowContainer.children.length;d<this._terminal.rows;d++)this._rowElements[d]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[d]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_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 o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};i.AccessibilityManager=l=u([f(1,g.IInstantiationService),f(2,E.ICoreBrowserService),f(3,E.IRenderService)],l)},3614:(v,i)=>{function c(_){return _.replace(/\r?\n/g,"\r")}function u(_,S){return S?"\x1B[200~"+_+"\x1B[201~":_}function f(_,S,E,g){_=u(_=c(_),E.decPrivateModes.bracketedPasteMode&&g.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(_,!0),S.value=""}function h(_,S,E){const g=E.getBoundingClientRect(),n=_.clientX-g.left-10,l=_.clientY-g.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${n}px`,S.style.top=`${l}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=c,i.bracketTextForPaste=u,i.copyHandler=function(_,S){_.clipboardData&&_.clipboardData.setData("text/plain",S.selectionText),_.preventDefault()},i.handlePasteEvent=function(_,S,E,g){_.stopPropagation(),_.clipboardData&&f(_.clipboardData.getData("text/plain"),S,E,g)},i.paste=f,i.moveTextAreaUnderMouseCursor=h,i.rightClickHandler=function(_,S,E,g,n){h(_,S,E),n&&g.rightClickSelect(_),S.value=g.selectionText,S.select()}},7239:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const u=c(1505);i.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(f,h,_){this._css.set(f,h,_)}getCss(f,h){return this._css.get(f,h)}setColor(f,h,_){this._color.set(f,h,_)}getColor(f,h){return this._color.get(f,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(c,u,f,h){c.addEventListener(u,f,h);let _=!1;return{dispose:()=>{_||(_=!0,c.removeEventListener(u,f,h))}}}},3551:function(v,i,c){var u=this&&this.__decorate||function(l,o,d,p){var C,y=arguments.length,w=y<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,d):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(l,o,d,p);else for(var b=l.length-1;b>=0;b--)(C=l[b])&&(w=(y<3?C(w):y>3?C(o,d,w):C(o,d))||w);return y>3&&w&&Object.defineProperty(o,d,w),w},f=this&&this.__param||function(l,o){return function(d,p){o(d,p,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier=void 0;const h=c(3656),_=c(8460),S=c(844),E=c(2585),g=c(4725);let n=i.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(l,o,d,p,C){super(),this._element=l,this._mouseService=o,this._renderService=d,this._bufferService=p,this._linkProviderService=C,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,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)((()=>{var y;this._lastMouseEvent=void 0,(y=this._activeProviderReplies)==null||y.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(l){this._lastMouseEvent=l;const o=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const d=l.composedPath();for(let p=0;p<d.length;p++){const C=d[p];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,o){var p,C;this._activeProviderReplies&&o||((p=this._activeProviderReplies)==null||p.forEach((y=>{y==null||y.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=l.y);let d=!1;for(const[y,w]of this._linkProviderService.linkProviders.entries())o?(C=this._activeProviderReplies)!=null&&C.get(y)&&(d=this._checkLinkProviderResult(y,l,d)):w.provideLinks(l.y,(b=>{var R,L;if(this._isMouseOut)return;const k=b==null?void 0:b.map((T=>({link:T})));(R=this._activeProviderReplies)==null||R.set(y,k),d=this._checkLinkProviderResult(y,l,d),((L=this._activeProviderReplies)==null?void 0:L.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)}))}_removeIntersectingLinks(l,o){const d=new Set;for(let p=0;p<o.size;p++){const C=o.get(p);if(C)for(let y=0;y<C.length;y++){const w=C[y],b=w.link.range.start.y<l?0:w.link.range.start.x,k=w.link.range.end.y>l?this._bufferService.cols:w.link.range.end.x;for(let R=b;R<=k;R++){if(d.has(R)){C.splice(y--,1);break}d.add(R)}}}}_checkLinkProviderResult(l,o,d){var y;if(!this._activeProviderReplies)return d;const p=this._activeProviderReplies.get(l);let C=!1;for(let w=0;w<l;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(C=!0);if(!C&&p){const w=p.find((b=>this._linkAtPosition(b.link,o)));w&&(d=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!d)for(let w=0;w<this._activeProviderReplies.size;w++){const b=(y=this._activeProviderReplies.get(w))==null?void 0:y.find((k=>this._linkAtPosition(k.link,o)));if(b){d=!0,this._handleNewLink(b);break}}return d}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._currentLink)return;const o=this._positionFromMouseEvent(l,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,o){this._currentLink&&this._lastMouseEvent&&(!l||!o||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(l.link,o)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var d,p;return(p=(d=this._currentLink)==null?void 0:d.state)==null?void 0:p.decorations.pointerCursor},set:d=>{var p;(p=this._currentLink)!=null&&p.state&&this._currentLink.state.decorations.pointerCursor!==d&&(this._currentLink.state.decorations.pointerCursor=d,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",d))}},underline:{get:()=>{var d,p;return(p=(d=this._currentLink)==null?void 0:d.state)==null?void 0:p.decorations.underline},set:d=>{var p,C,y;(p=this._currentLink)!=null&&p.state&&((y=(C=this._currentLink)==null?void 0:C.state)==null?void 0:y.decorations.underline)!==d&&(this._currentLink.state.decorations.underline=d,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,d))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((d=>{if(!this._currentLink)return;const p=d.start===0?0:d.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+d.end;if(this._currentLink.link.range.start.y>=p&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(p,C),this._lastMouseEvent)){const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._askForLink(y,!1)}}))))}_linkHover(l,o,d){var p;(p=this._currentLink)!=null&&p.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&l.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(d,o.text)}_fireUnderlineEvent(l,o){const d=l.range,p=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(d.start.x-1,d.start.y-p-1,d.end.x,d.end.y-p-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(l,o,d){var p;(p=this._currentLink)!=null&&p.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&l.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(d,o.text)}_linkAtPosition(l,o){const d=l.range.start.y*this._bufferService.cols+l.range.start.x,p=l.range.end.y*this._bufferService.cols+l.range.end.x,C=o.y*this._bufferService.cols+o.x;return d<=C&&C<=p}_positionFromMouseEvent(l,o,d){const p=d.getCoords(l,o,this._bufferService.cols,this._bufferService.rows);if(p)return{x:p[0],y:p[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,o,d,p,C){return{x1:l,y1:o,x2:d,y2:p,cols:this._bufferService.cols,fg:C}}};i.Linkifier=n=u([f(1,g.IMouseService),f(2,g.IRenderService),f(3,E.IBufferService),f(4,g.ILinkProviderService)],n)},9042:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(v,i,c){var u=this&&this.__decorate||function(g,n,l,o){var d,p=arguments.length,C=p<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,n,l,o);else for(var y=g.length-1;y>=0;y--)(d=g[y])&&(C=(p<3?d(C):p>3?d(n,l,C):d(n,l))||C);return p>3&&C&&Object.defineProperty(n,l,C),C},f=this&&this.__param||function(g,n){return function(l,o){n(l,o,g)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const h=c(511),_=c(2585);let S=i.OscLinkProvider=class{constructor(g,n,l){this._bufferService=g,this._optionsService=n,this._oscLinkService=l}provideLinks(g,n){var k;const l=this._bufferService.buffer.lines.get(g-1);if(!l)return void n(void 0);const o=[],d=this._optionsService.rawOptions.linkHandler,p=new h.CellData,C=l.getTrimmedLength();let y=-1,w=-1,b=!1;for(let R=0;R<C;R++)if(w!==-1||l.hasContent(R)){if(l.loadCell(R,p),p.hasExtendedAttrs()&&p.extended.urlId){if(w===-1){w=R,y=p.extended.urlId;continue}b=p.extended.urlId!==y}else w!==-1&&(b=!0);if(b||w!==-1&&R===C-1){const L=(k=this._oscLinkService.getLinkData(y))==null?void 0:k.uri;if(L){const T={start:{x:w+1,y:g},end:{x:R+(b||R!==C-1?0:1),y:g}};let A=!1;if(!(d!=null&&d.allowNonHttpProtocols))try{const F=new URL(L);["http:","https:"].includes(F.protocol)||(A=!0)}catch{A=!0}A||o.push({text:L,range:T,activate:(F,U)=>d?d.activate(F,U,T):E(0,U),hover:(F,U)=>{var $;return($=d==null?void 0:d.hover)==null?void 0:$.call(d,F,U,T)},leave:(F,U)=>{var $;return($=d==null?void 0:d.leave)==null?void 0:$.call(d,F,U,T)}})}b=!1,p.hasExtendedAttrs()&&p.extended.urlId?(w=R,y=p.extended.urlId):(w=-1,y=-1)}}n(o)}};function E(g,n){if(confirm(`Do you want to navigate to ${n}?
|
|
161
|
+
|
|
162
|
+
WARNING: This link could potentially be dangerous`)){const l=window.open();if(l){try{l.opener=null}catch{}l.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}}i.OscLinkProvider=S=u([f(0,_.IBufferService),f(1,_.IOptionsService),f(2,_.IOscLinkService)],S)},6193:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0,i.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,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,u,f){this._rowCount=f,c=c!==void 0?c:0,u=u!==void 0?u: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,u):u,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),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;const u=c(3614),f=c(3656),h=c(3551),_=c(9042),S=c(3730),E=c(1680),g=c(3107),n=c(5744),l=c(2950),o=c(1296),d=c(428),p=c(4269),C=c(5114),y=c(8934),w=c(3230),b=c(9312),k=c(4725),R=c(6731),L=c(8055),T=c(8969),A=c(8460),F=c(844),U=c(6114),$=c(8437),Y=c(2584),W=c(7399),I=c(5941),x=c(9074),D=c(2585),O=c(5435),V=c(4567),K=c(779);class X extends T.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(N={}){super(N),this.browser=U,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new F.MutableDisposable),this._onCursorMove=this.register(new A.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new A.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new A.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new A.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new A.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new A.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new A.EventEmitter),this._onBlur=this.register(new A.EventEmitter),this._onA11yCharEmitter=this.register(new A.EventEmitter),this._onA11yTabEmitter=this.register(new A.EventEmitter),this._onWillOpen=this.register(new A.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(x.DecorationService),this._instantiationService.setService(D.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(K.LinkProviderService),this._instantiationService.setService(k.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((B,H)=>this.refresh(B,H)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((B=>this._reportWindowsOptions(B)))),this.register(this._inputHandler.onColor((B=>this._handleColorEvent(B)))),this.register((0,A.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,A.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,A.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,A.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((B=>this._afterResize(B.cols,B.rows)))),this.register((0,F.toDisposable)((()=>{var B,H;this._customKeyEventHandler=void 0,(H=(B=this.element)==null?void 0:B.parentNode)==null||H.removeChild(this.element)})))}_handleColorEvent(N){if(this._themeService)for(const B of N){let H,P="";switch(B.index){case 256:H="foreground",P="10";break;case 257:H="background",P="11";break;case 258:H="cursor",P="12";break;default:H="ansi",P="4;"+B.index}switch(B.type){case 0:const z=L.color.toColorRGB(H==="ansi"?this._themeService.colors.ansi[B.index]:this._themeService.colors[H]);this.coreService.triggerDataEvent(`${Y.C0.ESC}]${P};${(0,I.toRgbString)(z)}${Y.C1_ESCAPED.ST}`);break;case 1:if(H==="ansi")this._themeService.modifyColors((Z=>Z.ansi[B.index]=L.channels.toColor(...B.color)));else{const Z=H;this._themeService.modifyColors((ee=>ee[Z]=L.channels.toColor(...B.color)))}break;case 2:this._themeService.restoreColor(B.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(N){N?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(N){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var N;return(N=this.textarea)==null?void 0:N.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Y.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 N=this.buffer.ybase+this.buffer.y,B=this.buffer.lines.get(N);if(!B)return;const H=Math.min(this.buffer.x,this.cols-1),P=this._renderService.dimensions.css.cell.height,z=B.getWidth(H),Z=this._renderService.dimensions.css.cell.width*z,ee=this.buffer.y*this._renderService.dimensions.css.cell.height,he=H*this._renderService.dimensions.css.cell.width;this.textarea.style.left=he+"px",this.textarea.style.top=ee+"px",this.textarea.style.width=Z+"px",this.textarea.style.height=P+"px",this.textarea.style.lineHeight=P+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,f.addDisposableDomListener)(this.element,"copy",(B=>{this.hasSelection()&&(0,u.copyHandler)(B,this._selectionService)})));const N=B=>(0,u.handlePasteEvent)(B,this.textarea,this.coreService,this.optionsService);this.register((0,f.addDisposableDomListener)(this.textarea,"paste",N)),this.register((0,f.addDisposableDomListener)(this.element,"paste",N)),U.isFirefox?this.register((0,f.addDisposableDomListener)(this.element,"mousedown",(B=>{B.button===2&&(0,u.rightClickHandler)(B,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,f.addDisposableDomListener)(this.element,"contextmenu",(B=>{(0,u.rightClickHandler)(B,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),U.isLinux&&this.register((0,f.addDisposableDomListener)(this.element,"auxclick",(B=>{B.button===1&&(0,u.moveTextAreaUnderMouseCursor)(B,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,f.addDisposableDomListener)(this.textarea,"keyup",(N=>this._keyUp(N)),!0)),this.register((0,f.addDisposableDomListener)(this.textarea,"keydown",(N=>this._keyDown(N)),!0)),this.register((0,f.addDisposableDomListener)(this.textarea,"keypress",(N=>this._keyPress(N)),!0)),this.register((0,f.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,f.addDisposableDomListener)(this.textarea,"compositionupdate",(N=>this._compositionHelper.compositionupdate(N)))),this.register((0,f.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,f.addDisposableDomListener)(this.textarea,"input",(N=>this._inputEvent(N)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(N){var H;if(!N)throw new Error("Terminal requires a parent element.");if(N.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((H=this.element)==null?void 0:H.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=N.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"),N.appendChild(this.element);const B=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),B.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,f.addDisposableDomListener)(this.screenElement,"mousemove",(P=>this.updateCursorStyle(P)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),B.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_.promptLabel),U.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(C.CoreBrowserService,this.textarea,N.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(k.ICoreBrowserService,this._coreBrowserService),this.register((0,f.addDisposableDomListener)(this.textarea,"focus",(P=>this._handleTextAreaFocus(P)))),this.register((0,f.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(d.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(R.ThemeService),this._instantiationService.setService(k.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(p.CharacterJoinerService),this._instantiationService.setService(k.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(k.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((P=>this._onRender.fire(P)))),this.onResize((P=>this._renderService.resize(P.cols,P.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(l.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(y.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(B);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((P=>this.scrollLines(P.amount,P.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(b.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((P=>this.scrollLines(P.amount,P.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((P=>this._renderService.handleSelectionChanged(P.start,P.end,P.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((P=>{this.textarea.value=P,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((P=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(g.BufferDecorationRenderer,this.screenElement)),this.register((0,f.addDisposableDomListener)(this.element,"mousedown",(P=>this._selectionService.handleMouseDown(P)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(P=>this._handleScreenReaderModeOptionChange(P)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(n.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(P=>{!this._overviewRulerRenderer&&P&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(n.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const N=this,B=this.element;function H(Z){const ee=N._mouseService.getMouseReportCoords(Z,N.screenElement);if(!ee)return!1;let he,ue;switch(Z.overrideType||Z.type){case"mousemove":ue=32,Z.buttons===void 0?(he=3,Z.button!==void 0&&(he=Z.button<3?Z.button:3)):he=1&Z.buttons?0:4&Z.buttons?1:2&Z.buttons?2:3;break;case"mouseup":ue=0,he=Z.button<3?Z.button:3;break;case"mousedown":ue=1,he=Z.button<3?Z.button:3;break;case"wheel":if(N._customWheelEventHandler&&N._customWheelEventHandler(Z)===!1||N.viewport.getLinesScrolled(Z)===0)return!1;ue=Z.deltaY<0?0:1,he=4;break;default:return!1}return!(ue===void 0||he===void 0||he>4)&&N.coreMouseService.triggerMouseEvent({col:ee.col,row:ee.row,x:ee.x,y:ee.y,button:he,action:ue,ctrl:Z.ctrlKey,alt:Z.altKey,shift:Z.shiftKey})}const P={mouseup:null,wheel:null,mousedrag:null,mousemove:null},z={mouseup:Z=>(H(Z),Z.buttons||(this._document.removeEventListener("mouseup",P.mouseup),P.mousedrag&&this._document.removeEventListener("mousemove",P.mousedrag)),this.cancel(Z)),wheel:Z=>(H(Z),this.cancel(Z,!0)),mousedrag:Z=>{Z.buttons&&H(Z)},mousemove:Z=>{Z.buttons||H(Z)}};this.register(this.coreMouseService.onProtocolChange((Z=>{Z?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Z)),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&Z?P.mousemove||(B.addEventListener("mousemove",z.mousemove),P.mousemove=z.mousemove):(B.removeEventListener("mousemove",P.mousemove),P.mousemove=null),16&Z?P.wheel||(B.addEventListener("wheel",z.wheel,{passive:!1}),P.wheel=z.wheel):(B.removeEventListener("wheel",P.wheel),P.wheel=null),2&Z?P.mouseup||(P.mouseup=z.mouseup):(this._document.removeEventListener("mouseup",P.mouseup),P.mouseup=null),4&Z?P.mousedrag||(P.mousedrag=z.mousedrag):(this._document.removeEventListener("mousemove",P.mousedrag),P.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,f.addDisposableDomListener)(B,"mousedown",(Z=>{if(Z.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Z))return H(Z),P.mouseup&&this._document.addEventListener("mouseup",P.mouseup),P.mousedrag&&this._document.addEventListener("mousemove",P.mousedrag),this.cancel(Z)}))),this.register((0,f.addDisposableDomListener)(B,"wheel",(Z=>{if(!P.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Z)===!1)return!1;if(!this.buffer.hasScrollback){const ee=this.viewport.getLinesScrolled(Z);if(ee===0)return;const he=Y.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Z.deltaY<0?"A":"B");let ue="";for(let Ie=0;Ie<Math.abs(ee);Ie++)ue+=he;return this.coreService.triggerDataEvent(ue,!0),this.cancel(Z,!0)}return this.viewport.handleWheel(Z)?this.cancel(Z):void 0}}),{passive:!1})),this.register((0,f.addDisposableDomListener)(B,"touchstart",(Z=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Z),this.cancel(Z)}),{passive:!0})),this.register((0,f.addDisposableDomListener)(B,"touchmove",(Z=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Z)?void 0:this.cancel(Z)}),{passive:!1}))}refresh(N,B){var H;(H=this._renderService)==null||H.refreshRows(N,B)}updateCursorStyle(N){var B;(B=this._selectionService)!=null&&B.shouldColumnSelect(N)?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(N,B,H=0){var P;H===1?(super.scrollLines(N,B,H),this.refresh(0,this.rows-1)):(P=this.viewport)==null||P.scrollLines(N)}paste(N){(0,u.paste)(N,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(N){this._customKeyEventHandler=N}attachCustomWheelEventHandler(N){this._customWheelEventHandler=N}registerLinkProvider(N){return this._linkProviderService.registerLinkProvider(N)}registerCharacterJoiner(N){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const B=this._characterJoinerService.register(N);return this.refresh(0,this.rows-1),B}deregisterCharacterJoiner(N){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(N)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(N){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+N)}registerDecoration(N){return this._decorationService.registerDecoration(N)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(N,B,H){this._selectionService.setSelection(N,B,H)}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 N;(N=this._selectionService)==null||N.clearSelection()}selectAll(){var N;(N=this._selectionService)==null||N.selectAll()}selectLines(N,B){var H;(H=this._selectionService)==null||H.selectLines(N,B)}_keyDown(N){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1)return!1;const B=this.browser.isMac&&this.options.macOptionIsMeta&&N.altKey;if(!B&&!this._compositionHelper.keydown(N))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;B||N.key!=="Dead"&&N.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const H=(0,W.evaluateKeyboardEvent)(N,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(N),H.type===3||H.type===2){const P=this.rows-1;return this.scrollLines(H.type===2?-P:P),this.cancel(N,!0)}return H.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,N)||(H.cancel&&this.cancel(N,!0),!H.key||!!(N.key&&!N.ctrlKey&&!N.altKey&&!N.metaKey&&N.key.length===1&&N.key.charCodeAt(0)>=65&&N.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(H.key!==Y.C0.ETX&&H.key!==Y.C0.CR||(this.textarea.value=""),this._onKey.fire({key:H.key,domEvent:N}),this._showCursor(),this.coreService.triggerDataEvent(H.key,!0),!this.optionsService.rawOptions.screenReaderMode||N.altKey||N.ctrlKey?this.cancel(N,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(N,B){const H=N.isMac&&!this.options.macOptionIsMeta&&B.altKey&&!B.ctrlKey&&!B.metaKey||N.isWindows&&B.altKey&&B.ctrlKey&&!B.metaKey||N.isWindows&&B.getModifierState("AltGraph");return B.type==="keypress"?H:H&&(!B.keyCode||B.keyCode>47)}_keyUp(N){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1||((function(B){return B.keyCode===16||B.keyCode===17||B.keyCode===18})(N)||this.focus(),this.updateCursorStyle(N),this._keyPressHandled=!1)}_keyPress(N){let B;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1)return!1;if(this.cancel(N),N.charCode)B=N.charCode;else if(N.which===null||N.which===void 0)B=N.keyCode;else{if(N.which===0||N.charCode===0)return!1;B=N.which}return!(!B||(N.altKey||N.ctrlKey||N.metaKey)&&!this._isThirdLevelShift(this.browser,N)||(B=String.fromCharCode(B),this._onKey.fire({key:B,domEvent:N}),this._showCursor(),this.coreService.triggerDataEvent(B,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(N){if(N.data&&N.inputType==="insertText"&&(!N.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const B=N.data;return this.coreService.triggerDataEvent(B,!0),this.cancel(N),!0}return!1}resize(N,B){N!==this.cols||B!==this.rows?super.resize(N,B):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(N,B){var H,P;(H=this._charSizeService)==null||H.measure(),(P=this.viewport)==null||P.syncScrollArea(!0)}clear(){var N;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 B=1;B<this.rows;B++)this.buffer.lines.push(this.buffer.getBlankLine($.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(N=this.viewport)==null||N.reset(),this.refresh(0,this.rows-1)}}reset(){var B,H;this.options.rows=this.rows,this.options.cols=this.cols;const N=this._customKeyEventHandler;this._setup(),super.reset(),(B=this._selectionService)==null||B.reset(),this._decorationService.reset(),(H=this.viewport)==null||H.reset(),this._customKeyEventHandler=N,this.refresh(0,this.rows-1)}clearTextureAtlas(){var N;(N=this._renderService)==null||N.clearTextureAtlas()}_reportFocus(){var N;(N=this.element)!=null&&N.classList.contains("focus")?this.coreService.triggerDataEvent(Y.C0.ESC+"[I"):this.coreService.triggerDataEvent(Y.C0.ESC+"[O")}_reportWindowsOptions(N){if(this._renderService)switch(N){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const B=this._renderService.dimensions.css.canvas.width.toFixed(0),H=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[4;${H};${B}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const P=this._renderService.dimensions.css.cell.width.toFixed(0),z=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Y.C0.ESC}[6;${z};${P}t`)}}cancel(N,B){if(this.options.cancelEvents||B)return N.preventDefault(),N.stopPropagation(),!1}}i.Terminal=X},9924:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TimeBasedDebouncer=void 0,i.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,f){this._rowCount=f,c=c!==void 0?c:0,u=u!==void 0?u: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,u):u;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const _=h-this._lastRefreshMs,S=this._debounceThresholdMS-_;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(v,i,c){var u=this&&this.__decorate||function(l,o,d,p){var C,y=arguments.length,w=y<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,d):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(l,o,d,p);else for(var b=l.length-1;b>=0;b--)(C=l[b])&&(w=(y<3?C(w):y>3?C(o,d,w):C(o,d))||w);return y>3&&w&&Object.defineProperty(o,d,w),w},f=this&&this.__param||function(l,o){return function(d,p){o(d,p,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;const h=c(3656),_=c(4725),S=c(8460),E=c(844),g=c(2585);let n=i.Viewport=class extends E.Disposable{constructor(l,o,d,p,C,y,w,b){super(),this._viewportElement=l,this._scrollArea=o,this._bufferService=d,this._optionsService=p,this._charSizeService=C,this._renderService=y,this._coreBrowserService=w,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((k=>this._activeBuffer=k.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((k=>this._renderDimensions=k))),this._handleThemeChange(b.colors),this.register(b.onChangeColors((k=>this._handleThemeChange(k)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(l){this._viewportElement.style.backgroundColor=l.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(l){if(l)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 o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const l=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==l&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=l),this._refreshAnimationFrame=null}syncScrollArea(l=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(l);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(l)}_handleScroll(l){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const l=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(l*(this._smoothScrollState.target-this._smoothScrollState.origin)),l<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(l,o){const d=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&d<this._lastRecordedBufferHeight)||(l.cancelable&&l.preventDefault(),!1)}handleWheel(l){const o=this._getPixelsScrolled(l);return o!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(l,o))}scrollLines(l){if(l!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=l*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!1})}_getPixelsScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let o=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(l,o){var b;let d,p="";const C=[],y=o??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let k=l;k<y;k++){const R=w.get(k);if(!R)continue;const L=(b=w.get(k+1))==null?void 0:b.isWrapped;if(p+=R.translateToString(!L),!L||k===w.length-1){const T=document.createElement("div");T.textContent=p,C.push(T),p.length>0&&(d=T),p=""}}return{bufferElements:C,cursorElement:d}}getLinesScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let o=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(l,o){const d=this._optionsService.rawOptions.fastScrollModifier;return d==="alt"&&o.altKey||d==="ctrl"&&o.ctrlKey||d==="shift"&&o.shiftKey?l*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:l*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(l){this._lastTouchY=l.touches[0].pageY}handleTouchMove(l){const o=this._lastTouchY-l.touches[0].pageY;return this._lastTouchY=l.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(l,o))}};i.Viewport=n=u([f(2,g.IBufferService),f(3,g.IOptionsService),f(4,_.ICharSizeService),f(5,_.IRenderService),f(6,_.ICoreBrowserService),f(7,_.IThemeService)],n)},3107:function(v,i,c){var u=this&&this.__decorate||function(g,n,l,o){var d,p=arguments.length,C=p<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,n,l,o);else for(var y=g.length-1;y>=0;y--)(d=g[y])&&(C=(p<3?d(C):p>3?d(n,l,C):d(n,l))||C);return p>3&&C&&Object.defineProperty(n,l,C),C},f=this&&this.__param||function(g,n){return function(l,o){n(l,o,g)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferDecorationRenderer=void 0;const h=c(4725),_=c(844),S=c(2585);let E=i.BufferDecorationRenderer=class extends _.Disposable{constructor(g,n,l,o,d){super(),this._screenElement=g,this._bufferService=n,this._coreBrowserService=l,this._decorationService=o,this._renderService=d,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((p=>this._removeDecoration(p)))),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 g of this._decorationService.decorations)this._renderDecoration(g);this._dimensionsChanged=!1}_renderDecoration(g){this._refreshStyle(g),this._dimensionsChanged&&this._refreshXPosition(g)}_createElement(g){var o;const n=this._coreBrowserService.mainDocument.createElement("div");n.classList.add("xterm-decoration"),n.classList.toggle("xterm-decoration-top-layer",((o=g==null?void 0:g.options)==null?void 0:o.layer)==="top"),n.style.width=`${Math.round((g.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=(g.options.height||1)*this._renderService.dimensions.css.cell.height+"px",n.style.top=(g.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const l=g.options.x??0;return l&&l>this._bufferService.cols&&(n.style.display="none"),this._refreshXPosition(g,n),n}_refreshStyle(g){const n=g.marker.line-this._bufferService.buffers.active.ydisp;if(n<0||n>=this._bufferService.rows)g.element&&(g.element.style.display="none",g.onRenderEmitter.fire(g.element));else{let l=this._decorationElements.get(g);l||(l=this._createElement(g),g.element=l,this._decorationElements.set(g,l),this._container.appendChild(l),g.onDispose((()=>{this._decorationElements.delete(g),l.remove()}))),l.style.top=n*this._renderService.dimensions.css.cell.height+"px",l.style.display=this._altBufferIsActive?"none":"block",g.onRenderEmitter.fire(l)}}_refreshXPosition(g,n=g.element){if(!n)return;const l=g.options.x??0;(g.options.anchor||"left")==="right"?n.style.right=l?l*this._renderService.dimensions.css.cell.width+"px":"":n.style.left=l?l*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(g){var n;(n=this._decorationElements.get(g))==null||n.remove(),this._decorationElements.delete(g),g.dispose()}};i.BufferDecorationRenderer=E=u([f(1,S.IBufferService),f(2,h.ICoreBrowserService),f(3,S.IDecorationService),f(4,h.IRenderService)],E)},5871:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorZoneStore=void 0,i.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 u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,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,u){return u>=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,f){return u>=c.startBufferLine-this._linePadding[f||"full"]&&u<=c.endBufferLine+this._linePadding[f||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(v,i,c){var u=this&&this.__decorate||function(d,p,C,y){var w,b=arguments.length,k=b<3?p:y===null?y=Object.getOwnPropertyDescriptor(p,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,p,C,y);else for(var R=d.length-1;R>=0;R--)(w=d[R])&&(k=(b<3?w(k):b>3?w(p,C,k):w(p,C))||k);return b>3&&k&&Object.defineProperty(p,C,k),k},f=this&&this.__param||function(d,p){return function(C,y){p(C,y,d)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OverviewRulerRenderer=void 0;const h=c(5871),_=c(4725),S=c(844),E=c(2585),g={full:0,left:0,center:0,right:0},n={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0};let o=i.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(d,p,C,y,w,b,k){var L;super(),this._viewportElement=d,this._screenElement=p,this._bufferService=C,this._decorationService=y,this._renderService=w,this._optionsService=b,this._coreBrowserService=k,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(L=this._viewportElement.parentElement)==null||L.insertBefore(this._canvas,this._viewportElement);const R=this._canvas.getContext("2d");if(!R)throw new Error("Ctx cannot be null");this._ctx=R,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)((()=>{var T;(T=this._canvas)==null||T.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 d=Math.floor(this._canvas.width/3),p=Math.ceil(this._canvas.width/3);n.full=this._canvas.width,n.left=d,n.center=p,n.right=d,this._refreshDrawHeightConstants(),l.full=0,l.left=0,l.center=n.left,l.right=n.left+n.center}_refreshDrawHeightConstants(){g.full=Math.round(2*this._coreBrowserService.dpr);const d=this._canvas.height/this._bufferService.buffer.lines.length,p=Math.round(Math.max(Math.min(d,12),6)*this._coreBrowserService.dpr);g.left=p,g.center=p,g.right=p}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.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 p of this._decorationService.decorations)this._colorZoneStore.addDecoration(p);this._ctx.lineWidth=1;const d=this._colorZoneStore.zones;for(const p of d)p.position!=="full"&&this._renderColorZone(p);for(const p of d)p.position==="full"&&this._renderColorZone(p);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(d){this._ctx.fillStyle=d.color,this._ctx.fillRect(l[d.position||"full"],Math.round((this._canvas.height-1)*(d.startBufferLine/this._bufferService.buffers.active.lines.length)-g[d.position||"full"]/2),n[d.position||"full"],Math.round((this._canvas.height-1)*((d.endBufferLine-d.startBufferLine)/this._bufferService.buffers.active.lines.length)+g[d.position||"full"]))}_queueRefresh(d,p){this._shouldUpdateDimensions=d||this._shouldUpdateDimensions,this._shouldUpdateAnchor=p||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};i.OverviewRulerRenderer=o=u([f(2,E.IBufferService),f(3,E.IDecorationService),f(4,_.IRenderService),f(5,E.IOptionsService),f(6,_.ICoreBrowserService)],o)},2950:function(v,i,c){var u=this&&this.__decorate||function(g,n,l,o){var d,p=arguments.length,C=p<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,n,l,o);else for(var y=g.length-1;y>=0;y--)(d=g[y])&&(C=(p<3?d(C):p>3?d(n,l,C):d(n,l))||C);return p>3&&C&&Object.defineProperty(n,l,C),C},f=this&&this.__param||function(g,n){return function(l,o){n(l,o,g)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;const h=c(4725),_=c(2585),S=c(2584);let E=i.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(g,n,l,o,d,p){this._textarea=g,this._compositionView=n,this._bufferService=l,this._optionsService=o,this._coreService=d,this._renderService=p,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(g){this._compositionView.textContent=g.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(g){if(this._isComposing||this._isSendingComposition){if(g.keyCode===229||g.keyCode===16||g.keyCode===17||g.keyCode===18)return!1;this._finalizeComposition(!1)}return g.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(g){if(this._compositionView.classList.remove("active"),this._isComposing=!1,g){const n={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let l;this._isSendingComposition=!1,n.start+=this._dataAlreadySent.length,l=this._isComposing?this._textarea.value.substring(n.start,n.end):this._textarea.value.substring(n.start),l.length>0&&this._coreService.triggerDataEvent(l,!0)}}),0)}else{this._isSendingComposition=!1;const n=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(n,!0)}}_handleAnyTextareaChanges(){const g=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const n=this._textarea.value,l=n.replace(g,"");this._dataAlreadySent=l,n.length>g.length?this._coreService.triggerDataEvent(l,!0):n.length<g.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):n.length===g.length&&n!==g&&this._coreService.triggerDataEvent(n,!0)}}),0)}updateCompositionElements(g){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const n=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),l=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,d=n*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=d+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=l+"px",this._compositionView.style.lineHeight=l+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const p=this._compositionView.getBoundingClientRect();this._textarea.style.left=d+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(p.width,1)+"px",this._textarea.style.height=Math.max(p.height,1)+"px",this._textarea.style.lineHeight=p.height+"px"}g||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};i.CompositionHelper=E=u([f(2,_.IBufferService),f(3,_.IOptionsService),f(4,_.ICoreService),f(5,h.IRenderService)],E)},9806:(v,i)=>{function c(u,f,h){const _=h.getBoundingClientRect(),S=u.getComputedStyle(h),E=parseInt(S.getPropertyValue("padding-left")),g=parseInt(S.getPropertyValue("padding-top"));return[f.clientX-_.left-E,f.clientY-_.top-g]}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=c,i.getCoords=function(u,f,h,_,S,E,g,n,l){if(!E)return;const o=c(u,f,h);return o?(o[0]=Math.ceil((o[0]+(l?g/2:0))/g),o[1]=Math.ceil(o[1]/n),o[0]=Math.min(Math.max(o[0],1),_+(l?1:0)),o[1]=Math.min(Math.max(o[1],1),S),o):void 0}},9504:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;const u=c(2584);function f(n,l,o,d){const p=n-h(n,o),C=l-h(l,o),y=Math.abs(p-C)-(function(w,b,k){let R=0;const L=w-h(w,k),T=b-h(b,k);for(let A=0;A<Math.abs(L-T);A++){const F=_(w,b)==="A"?-1:1,U=k.buffer.lines.get(L+F*A);U!=null&&U.isWrapped&&R++}return R})(n,l,o);return g(y,E(_(n,l),d))}function h(n,l){let o=0,d=l.buffer.lines.get(n),p=d==null?void 0:d.isWrapped;for(;p&&n>=0&&n<l.rows;)o++,d=l.buffer.lines.get(--n),p=d==null?void 0:d.isWrapped;return o}function _(n,l){return n>l?"A":"B"}function S(n,l,o,d,p,C){let y=n,w=l,b="";for(;y!==o||w!==d;)y+=p?1:-1,p&&y>C.cols-1?(b+=C.buffer.translateBufferLineToString(w,!1,n,y),y=0,n=0,w++):!p&&y<0&&(b+=C.buffer.translateBufferLineToString(w,!1,0,n+1),y=C.cols-1,n=y,w--);return b+C.buffer.translateBufferLineToString(w,!1,n,y)}function E(n,l){const o=l?"O":"[";return u.C0.ESC+o+n}function g(n,l){n=Math.floor(n);let o="";for(let d=0;d<n;d++)o+=l;return o}i.moveToCellSequence=function(n,l,o,d){const p=o.buffer.x,C=o.buffer.y;if(!o.buffer.hasScrollback)return(function(b,k,R,L,T,A){return f(k,L,T,A).length===0?"":g(S(b,k,b,k-h(k,T),!1,T).length,E("D",A))})(p,C,0,l,o,d)+f(C,l,o,d)+(function(b,k,R,L,T,A){let F;F=f(k,L,T,A).length>0?L-h(L,T):k;const U=L,$=(function(Y,W,I,x,D,O){let V;return V=f(I,x,D,O).length>0?x-h(x,D):W,Y<I&&V<=x||Y>=I&&V<x?"C":"D"})(b,k,R,L,T,A);return g(S(b,F,R,U,$==="C",T).length,E($,A))})(p,C,n,l,o,d);let y;if(C===l)return y=p>n?"D":"C",g(Math.abs(p-n),E(y,d));y=C>l?"D":"C";const w=Math.abs(C-l);return g((function(b,k){return k.cols-b})(C>l?n:p,o)+(w-1)*o.cols+1+((C>l?p:n)-1),E(y,d))}},1296:function(v,i,c){var u=this&&this.__decorate||function(A,F,U,$){var Y,W=arguments.length,I=W<3?F:$===null?$=Object.getOwnPropertyDescriptor(F,U):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(A,F,U,$);else for(var x=A.length-1;x>=0;x--)(Y=A[x])&&(I=(W<3?Y(I):W>3?Y(F,U,I):Y(F,U))||I);return W>3&&I&&Object.defineProperty(F,U,I),I},f=this&&this.__param||function(A,F){return function(U,$){F(U,$,A)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRenderer=void 0;const h=c(3787),_=c(2550),S=c(2223),E=c(6171),g=c(6052),n=c(4725),l=c(8055),o=c(8460),d=c(844),p=c(2585),C="xterm-dom-renderer-owner-",y="xterm-rows",w="xterm-fg-",b="xterm-bg-",k="xterm-focus",R="xterm-selection";let L=1,T=i.DomRenderer=class extends d.Disposable{constructor(A,F,U,$,Y,W,I,x,D,O,V,K,X){super(),this._terminal=A,this._document=F,this._element=U,this._screenElement=$,this._viewportElement=Y,this._helperContainer=W,this._linkifier2=I,this._charSizeService=D,this._optionsService=O,this._bufferService=V,this._coreBrowserService=K,this._themeService=X,this._terminalClass=L++,this._rowElements=[],this._selectionRenderModel=(0,g.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(y),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(R),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((J=>this._injectCss(J)))),this._injectCss(this._themeService.colors),this._rowFactory=x.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((J=>this._handleLinkHover(J)))),this.register(this._linkifier2.onHideLinkUnderline((J=>this._handleLinkLeave(J)))),this.register((0,d.toDisposable)((()=>{this._element.classList.remove(C+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 A=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*A,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*A),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/A),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/A),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 U of this._rowElements)U.style.width=`${this.dimensions.css.canvas.width}px`,U.style.height=`${this.dimensions.css.cell.height}px`,U.style.lineHeight=`${this.dimensions.css.cell.height}px`,U.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const F=`${this._terminalSelector} .${y} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=F,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(A){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let F=`${this._terminalSelector} .${y} { color: ${A.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;F+=`${this._terminalSelector} .${y} .xterm-dim { color: ${l.color.multiplyOpacity(A.foreground,.5).css};}`,F+=`${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 U=`blink_underline_${this._terminalClass}`,$=`blink_bar_${this._terminalClass}`,Y=`blink_block_${this._terminalClass}`;F+=`@keyframes ${U} { 50% { border-bottom-style: hidden; }}`,F+=`@keyframes ${$} { 50% { box-shadow: none; }}`,F+=`@keyframes ${Y} { 0% { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css}; } 50% { background-color: inherit; color: ${A.cursor.css}; }}`,F+=`${this._terminalSelector} .${y}.${k} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${y}.${k} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${y}.${k} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css};}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${A.cursor.css} !important; color: ${A.cursorAccent.css} !important;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${A.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${A.cursor.css} inset;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${A.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,F+=`${this._terminalSelector} .${R} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${R} div { position: absolute; background-color: ${A.selectionBackgroundOpaque.css};}${this._terminalSelector} .${R} div { position: absolute; background-color: ${A.selectionInactiveBackgroundOpaque.css};}`;for(const[W,I]of A.ansi.entries())F+=`${this._terminalSelector} .${w}${W} { color: ${I.css}; }${this._terminalSelector} .${w}${W}.xterm-dim { color: ${l.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${b}${W} { background-color: ${I.css}; }`;F+=`${this._terminalSelector} .${w}${S.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(A.background).css}; }${this._terminalSelector} .${w}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(A.background),.5).css}; }${this._terminalSelector} .${b}${S.INVERTED_DEFAULT_COLOR} { background-color: ${A.foreground.css}; }`,this._themeStyleElement.textContent=F}_setDefaultSpacing(){const A=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${A}px`,this._rowFactory.defaultSpacing=A}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(A,F){for(let U=this._rowElements.length;U<=F;U++){const $=this._document.createElement("div");this._rowContainer.appendChild($),this._rowElements.push($)}for(;this._rowElements.length>F;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(A,F){this._refreshRowElements(A,F),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(k),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(k),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(A,F,U){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(A,F,U),this.renderRows(0,this._bufferService.rows-1),!A||!F)return;this._selectionRenderModel.update(this._terminal,A,F,U);const $=this._selectionRenderModel.viewportStartRow,Y=this._selectionRenderModel.viewportEndRow,W=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(W>=this._bufferService.rows||I<0)return;const x=this._document.createDocumentFragment();if(U){const D=A[0]>F[0];x.appendChild(this._createSelectionElement(W,D?F[0]:A[0],D?A[0]:F[0],I-W+1))}else{const D=$===W?A[0]:0,O=W===Y?F[0]:this._bufferService.cols;x.appendChild(this._createSelectionElement(W,D,O));const V=I-W-1;if(x.appendChild(this._createSelectionElement(W+1,0,this._bufferService.cols,V)),W!==I){const K=Y===I?F[0]:this._bufferService.cols;x.appendChild(this._createSelectionElement(I,0,K))}}this._selectionContainer.appendChild(x)}_createSelectionElement(A,F,U,$=1){const Y=this._document.createElement("div"),W=F*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(U-F);return W+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-W),Y.style.height=$*this.dimensions.css.cell.height+"px",Y.style.top=A*this.dimensions.css.cell.height+"px",Y.style.left=`${W}px`,Y.style.width=`${I}px`,Y}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 A of this._rowElements)A.replaceChildren()}renderRows(A,F){const U=this._bufferService.buffer,$=U.ybase+U.y,Y=Math.min(U.x,this._bufferService.cols-1),W=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,x=this._optionsService.rawOptions.cursorInactiveStyle;for(let D=A;D<=F;D++){const O=D+U.ydisp,V=this._rowElements[D],K=U.lines.get(O);if(!V||!K)break;V.replaceChildren(...this._rowFactory.createRow(K,O,O===$,I,x,Y,W,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!0)}_handleLinkLeave(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!1)}_setCellUnderline(A,F,U,$,Y,W){U<0&&(A=0),$<0&&(F=0);const I=this._bufferService.rows-1;U=Math.max(Math.min(U,I),0),$=Math.max(Math.min($,I),0),Y=Math.min(Y,this._bufferService.cols);const x=this._bufferService.buffer,D=x.ybase+x.y,O=Math.min(x.x,Y-1),V=this._optionsService.rawOptions.cursorBlink,K=this._optionsService.rawOptions.cursorStyle,X=this._optionsService.rawOptions.cursorInactiveStyle;for(let J=U;J<=$;++J){const N=J+x.ydisp,B=this._rowElements[J],H=x.lines.get(N);if(!B||!H)break;B.replaceChildren(...this._rowFactory.createRow(H,N,N===D,K,X,O,V,this.dimensions.css.cell.width,this._widthCache,W?J===U?A:0:-1,W?(J===$?F:Y)-1:-1))}}};i.DomRenderer=T=u([f(7,p.IInstantiationService),f(8,n.ICharSizeService),f(9,p.IOptionsService),f(10,p.IBufferService),f(11,n.ICoreBrowserService),f(12,n.IThemeService)],T)},3787:function(v,i,c){var u=this&&this.__decorate||function(y,w,b,k){var R,L=arguments.length,T=L<3?w:k===null?k=Object.getOwnPropertyDescriptor(w,b):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(y,w,b,k);else for(var A=y.length-1;A>=0;A--)(R=y[A])&&(T=(L<3?R(T):L>3?R(w,b,T):R(w,b))||T);return L>3&&T&&Object.defineProperty(w,b,T),T},f=this&&this.__param||function(y,w){return function(b,k){w(b,k,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=void 0;const h=c(2223),_=c(643),S=c(511),E=c(2585),g=c(8055),n=c(4725),l=c(4269),o=c(6171),d=c(3734);let p=i.DomRendererRowFactory=class{constructor(y,w,b,k,R,L,T){this._document=y,this._characterJoinerService=w,this._optionsService=b,this._coreBrowserService=k,this._coreService=R,this._decorationService=L,this._themeService=T,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(y,w,b){this._selectionStart=y,this._selectionEnd=w,this._columnSelectMode=b}createRow(y,w,b,k,R,L,T,A,F,U,$){const Y=[],W=this._characterJoinerService.getJoinedCharacters(w),I=this._themeService.colors;let x,D=y.getNoBgTrimmedLength();b&&D<L+1&&(D=L+1);let O=0,V="",K=0,X=0,J=0,N=!1,B=0,H=!1,P=0;const z=[],Z=U!==-1&&$!==-1;for(let ee=0;ee<D;ee++){y.loadCell(ee,this._workCell);let he=this._workCell.getWidth();if(he===0)continue;let ue=!1,Ie=ee,q=this._workCell;if(W.length>0&&ee===W[0][0]){ue=!0;const ce=W.shift();q=new l.JoinedCellData(this._workCell,y.translateToString(!0,ce[0],ce[1]),ce[1]-ce[0]),Ie=ce[1]-1,he=q.getWidth()}const At=this._isCellInSelection(ee,w),Hr=b&&ee===L,$r=Z&&ee>=U&&ee<=$;let Wr=!1;this._decorationService.forEachDecorationAtCell(ee,w,void 0,(ce=>{Wr=!0}));let nr=q.getChars()||_.WHITESPACE_CELL_CHAR;if(nr===" "&&(q.isUnderline()||q.isOverline())&&(nr=" "),P=he*A-F.get(nr,q.isBold(),q.isItalic()),x){if(O&&(At&&H||!At&&!H&&q.bg===K)&&(At&&H&&I.selectionForeground||q.fg===X)&&q.extended.ext===J&&$r===N&&P===B&&!Hr&&!ue&&!Wr){q.isInvisible()?V+=_.WHITESPACE_CELL_CHAR:V+=nr,O++;continue}O&&(x.textContent=V),x=this._document.createElement("span"),O=0,V=""}else x=this._document.createElement("span");if(K=q.bg,X=q.fg,J=q.extended.ext,N=$r,B=P,H=At,ue&&L>=ee&&L<=Ie&&(L=ee),!this._coreService.isCursorHidden&&Hr&&this._coreService.isCursorInitialized){if(z.push("xterm-cursor"),this._coreBrowserService.isFocused)T&&z.push("xterm-cursor-blink"),z.push(k==="bar"?"xterm-cursor-bar":k==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(R)switch(R){case"outline":z.push("xterm-cursor-outline");break;case"block":z.push("xterm-cursor-block");break;case"bar":z.push("xterm-cursor-bar");break;case"underline":z.push("xterm-cursor-underline")}}if(q.isBold()&&z.push("xterm-bold"),q.isItalic()&&z.push("xterm-italic"),q.isDim()&&z.push("xterm-dim"),V=q.isInvisible()?_.WHITESPACE_CELL_CHAR:q.getChars()||_.WHITESPACE_CELL_CHAR,q.isUnderline()&&(z.push(`xterm-underline-${q.extended.underlineStyle}`),V===" "&&(V=" "),!q.isUnderlineColorDefault()))if(q.isUnderlineColorRGB())x.style.textDecorationColor=`rgb(${d.AttributeData.toColorRGB(q.getUnderlineColor()).join(",")})`;else{let ce=q.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&q.isBold()&&ce<8&&(ce+=8),x.style.textDecorationColor=I.ansi[ce].css}q.isOverline()&&(z.push("xterm-overline"),V===" "&&(V=" ")),q.isStrikethrough()&&z.push("xterm-strikethrough"),$r&&(x.style.textDecoration="underline");let Te=q.getFgColor(),Rt=q.getFgColorMode(),Fe=q.getBgColor(),xt=q.getBgColorMode();const Gr=!!q.isInverse();if(Gr){const ce=Te;Te=Fe,Fe=ce;const Da=Rt;Rt=xt,xt=Da}let Ze,or,ze,Lt=!1;switch(this._decorationService.forEachDecorationAtCell(ee,w,void 0,(ce=>{ce.options.layer!=="top"&&Lt||(ce.backgroundColorRGB&&(xt=50331648,Fe=ce.backgroundColorRGB.rgba>>8&16777215,Ze=ce.backgroundColorRGB),ce.foregroundColorRGB&&(Rt=50331648,Te=ce.foregroundColorRGB.rgba>>8&16777215,or=ce.foregroundColorRGB),Lt=ce.options.layer==="top")})),!Lt&&At&&(Ze=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,Fe=Ze.rgba>>8&16777215,xt=50331648,Lt=!0,I.selectionForeground&&(Rt=50331648,Te=I.selectionForeground.rgba>>8&16777215,or=I.selectionForeground)),Lt&&z.push("xterm-decoration-top"),xt){case 16777216:case 33554432:ze=I.ansi[Fe],z.push(`xterm-bg-${Fe}`);break;case 50331648:ze=g.channels.toColor(Fe>>16,Fe>>8&255,255&Fe),this._addStyle(x,`background-color:#${C((Fe>>>0).toString(16),"0",6)}`);break;default:Gr?(ze=I.foreground,z.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):ze=I.background}switch(Ze||q.isDim()&&(Ze=g.color.multiplyOpacity(ze,.5)),Rt){case 16777216:case 33554432:q.isBold()&&Te<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Te+=8),this._applyMinimumContrast(x,ze,I.ansi[Te],q,Ze,void 0)||z.push(`xterm-fg-${Te}`);break;case 50331648:const ce=g.channels.toColor(Te>>16&255,Te>>8&255,255&Te);this._applyMinimumContrast(x,ze,ce,q,Ze,or)||this._addStyle(x,`color:#${C(Te.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(x,ze,I.foreground,q,Ze,or)||Gr&&z.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}z.length&&(x.className=z.join(" "),z.length=0),Hr||ue||Wr?x.textContent=V:O++,P!==this.defaultSpacing&&(x.style.letterSpacing=`${P}px`),Y.push(x),ee=Ie}return x&&O&&(x.textContent=V),Y}_applyMinimumContrast(y,w,b,k,R,L){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(k.getCode()))return!1;const T=this._getContrastCache(k);let A;if(R||L||(A=T.getColor(w.rgba,b.rgba)),A===void 0){const F=this._optionsService.rawOptions.minimumContrastRatio/(k.isDim()?2:1);A=g.color.ensureContrastRatio(R||w,L||b,F),T.setColor((R||w).rgba,(L||b).rgba,A??null)}return!!A&&(this._addStyle(y,`color:${A.css}`),!0)}_getContrastCache(y){return y.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(y,w){y.setAttribute("style",`${y.getAttribute("style")||""}${w};`)}_isCellInSelection(y,w){const b=this._selectionStart,k=this._selectionEnd;return!(!b||!k)&&(this._columnSelectMode?b[0]<=k[0]?y>=b[0]&&w>=b[1]&&y<k[0]&&w<=k[1]:y<b[0]&&w>=b[1]&&y>=k[0]&&w<=k[1]:w>b[1]&&w<k[1]||b[1]===k[1]&&w===b[1]&&y>=b[0]&&y<k[0]||b[1]<k[1]&&w===k[1]&&y<k[0]||b[1]<k[1]&&w===b[1]&&y>=b[0])}};function C(y,w,b){for(;y.length<b;)y=w+y;return y}i.DomRendererRowFactory=p=u([f(1,n.ICharacterJoinerService),f(2,E.IOptionsService),f(3,n.ICoreBrowserService),f(4,E.ICoreService),f(5,E.IDecorationService),f(6,n.IThemeService)],p)},2550:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WidthCache=void 0,i.WidthCache=class{constructor(c,u){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 f=c.createElement("span");f.classList.add("xterm-char-measure-element");const h=c.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontStyle="italic";const S=c.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[f,h,_,S],this._container.appendChild(f),this._container.appendChild(h),this._container.appendChild(_),this._container.appendChild(S),u.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,u,f,h){c===this._font&&u===this._fontSize&&f===this._weight&&h===this._weightBold||(this._font=c,this._fontSize=u,this._weight=f,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${f}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${f}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(c,u,f){let h=0;if(!u&&!f&&c.length===1&&(h=c.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const E=this._measure(c,0);return E>0&&(this._flat[h]=E),E}let _=c;u&&(_+="B"),f&&(_+="I");let S=this._holey.get(_);if(S===void 0){let E=0;u&&(E|=1),f&&(E|=2),S=this._measure(c,E),S>0&&this._holey.set(_,S)}return S}_measure(c,u){const f=this._measureElements[u];return f.textContent=c.repeat(32),f.offsetWidth/32}}},2223:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(v,i)=>{function c(f){return 57508<=f&&f<=57558}function u(f){return f>=128512&&f<=128591||f>=127744&&f<=128511||f>=128640&&f<=128767||f>=9728&&f<=9983||f>=9984&&f<=10175||f>=65024&&f<=65039||f>=129280&&f<=129535||f>=127462&&f<=127487}Object.defineProperty(i,"__esModule",{value:!0}),i.computeNextVariantOffset=i.createRenderDimensions=i.treatGlyphAsBackgroundColor=i.allowRescaling=i.isEmoji=i.isRestrictedPowerlineGlyph=i.isPowerlineGlyph=i.throwIfFalsy=void 0,i.throwIfFalsy=function(f){if(!f)throw new Error("value must not be falsy");return f},i.isPowerlineGlyph=c,i.isRestrictedPowerlineGlyph=function(f){return 57520<=f&&f<=57527},i.isEmoji=u,i.allowRescaling=function(f,h,_,S){return h===1&&_>Math.ceil(1.5*S)&&f!==void 0&&f>255&&!u(f)&&!c(f)&&!(function(E){return 57344<=E&&E<=63743})(f)},i.treatGlyphAsBackgroundColor=function(f){return c(f)||(function(h){return 9472<=h&&h<=9631})(f)},i.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}}}},i.computeNextVariantOffset=function(f,h,_=0){return(f-(2*Math.round(h)-_))%(2*Math.round(h))}},6052:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.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(f,h,_,S=!1){if(this.selectionStart=h,this.selectionEnd=_,!h||!_||h[0]===_[0]&&h[1]===_[1])return void this.clear();const E=f.buffers.active.ydisp,g=h[1]-E,n=_[1]-E,l=Math.max(g,0),o=Math.min(n,f.rows-1);l>=f.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=g,this.viewportEndRow=n,this.viewportCappedStartRow=l,this.viewportCappedEndRow=o,this.startCol=h[0],this.endCol=_[0])}isCellSelected(f,h,_){return!!this.hasSelection&&(_-=f.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&_>=this.viewportCappedStartRow&&h<this.endCol&&_<=this.viewportCappedEndRow:h<this.startCol&&_>=this.viewportCappedStartRow&&h>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&h>=this.startCol)}}i.createSelectionRenderModel=function(){return new c}},456:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionModel=void 0,i.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,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[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(v,i,c){var u=this&&this.__decorate||function(o,d,p,C){var y,w=arguments.length,b=w<3?d:C===null?C=Object.getOwnPropertyDescriptor(d,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,d,p,C);else for(var k=o.length-1;k>=0;k--)(y=o[k])&&(b=(w<3?y(b):w>3?y(d,p,b):y(d,p))||b);return w>3&&b&&Object.defineProperty(d,p,b),b},f=this&&this.__param||function(o,d){return function(p,C){d(p,C,o)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;const h=c(2585),_=c(8460),S=c(844);let E=i.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,d,p){super(),this._optionsService=p,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new l(this._optionsService))}catch{this._measureStrategy=this.register(new n(o,d,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};i.CharSizeService=E=u([f(2,h.IOptionsService)],E);class g extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(d,p){d!==void 0&&d>0&&p!==void 0&&p>0&&(this._result.width=d,this._result.height=p)}}class n extends g{constructor(d,p,C){super(),this._document=d,this._parentElement=p,this._optionsService=C,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 l extends g{constructor(d){super(),this._optionsService=d,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const p=this._ctx.measureText("W");if(!("width"in p&&"fontBoundingBoxAscent"in p&&"fontBoundingBoxDescent"in p))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const d=this._ctx.measureText("W");return this._validateAndSet(d.width,d.fontBoundingBoxAscent+d.fontBoundingBoxDescent),this._result}}},4269:function(v,i,c){var u=this&&this.__decorate||function(l,o,d,p){var C,y=arguments.length,w=y<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,d):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(l,o,d,p);else for(var b=l.length-1;b>=0;b--)(C=l[b])&&(w=(y<3?C(w):y>3?C(o,d,w):C(o,d))||w);return y>3&&w&&Object.defineProperty(o,d,w),w},f=this&&this.__param||function(l,o){return function(d,p){o(d,p,l)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;const h=c(3734),_=c(643),S=c(511),E=c(2585);class g extends h.AttributeData{constructor(o,d,p){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=d,this._width=p}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.JoinedCellData=g;let n=i.CharacterJoinerService=class Pn{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(o){const d={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(d),d.id}deregister(o){for(let d=0;d<this._characterJoiners.length;d++)if(this._characterJoiners[d].id===o)return this._characterJoiners.splice(d,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const d=this._bufferService.buffer.lines.get(o);if(!d||d.length===0)return[];const p=[],C=d.translateToString(!0);let y=0,w=0,b=0,k=d.getFg(0),R=d.getBg(0);for(let L=0;L<d.getTrimmedLength();L++)if(d.loadCell(L,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==k||this._workCell.bg!==R){if(L-y>1){const T=this._getJoinedRanges(C,b,w,d,y);for(let A=0;A<T.length;A++)p.push(T[A])}y=L,b=w,k=this._workCell.fg,R=this._workCell.bg}w+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-y>1){const L=this._getJoinedRanges(C,b,w,d,y);for(let T=0;T<L.length;T++)p.push(L[T])}return p}_getJoinedRanges(o,d,p,C,y){const w=o.substring(d,p);let b=[];try{b=this._characterJoiners[0].handler(w)}catch(k){console.error(k)}for(let k=1;k<this._characterJoiners.length;k++)try{const R=this._characterJoiners[k].handler(w);for(let L=0;L<R.length;L++)Pn._mergeRanges(b,R[L])}catch(R){console.error(R)}return this._stringRangesToCellRanges(b,C,y),b}_stringRangesToCellRanges(o,d,p){let C=0,y=!1,w=0,b=o[C];if(b){for(let k=p;k<this._bufferService.cols;k++){const R=d.getWidth(k),L=d.getString(k).length||_.WHITESPACE_CELL_CHAR.length;if(R!==0){if(!y&&b[0]<=w&&(b[0]=k,y=!0),b[1]<=w){if(b[1]=k,b=o[++C],!b)break;b[0]<=w?(b[0]=k,y=!0):y=!1}w+=L}}b&&(b[1]=this._bufferService.cols)}}static _mergeRanges(o,d){let p=!1;for(let C=0;C<o.length;C++){const y=o[C];if(p){if(d[1]<=y[0])return o[C-1][1]=d[1],o;if(d[1]<=y[1])return o[C-1][1]=Math.max(d[1],y[1]),o.splice(C,1),o;o.splice(C,1),C--}else{if(d[1]<=y[0])return o.splice(C,0,d),o;if(d[1]<=y[1])return y[0]=Math.min(d[0],y[0]),o;d[0]<y[1]&&(y[0]=Math.min(d[0],y[0]),p=!0)}}return p?o[o.length-1][1]=d[1]:o.push(d),o}};i.CharacterJoinerService=n=u([f(0,E.IBufferService)],n)},5114:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;const u=c(844),f=c(8460),h=c(3656);class _ extends u.Disposable{constructor(g,n,l){super(),this._textarea=g,this._window=n,this.mainDocument=l,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new f.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new f.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,f.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(g){this._window!==g&&(this._window=g,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}}i.CoreBrowserService=_;class S extends u.Disposable{constructor(g){super(),this._parentWindow=g,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new f.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(g){this._parentWindow=g,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)==null||g.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LinkProviderService=void 0;const u=c(844);class f extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const S=this.linkProviders.indexOf(_);S!==-1&&this.linkProviders.splice(S,1)}}}}i.LinkProviderService=f},8934:function(v,i,c){var u=this&&this.__decorate||function(E,g,n,l){var o,d=arguments.length,p=d<3?g:l===null?l=Object.getOwnPropertyDescriptor(g,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(E,g,n,l);else for(var C=E.length-1;C>=0;C--)(o=E[C])&&(p=(d<3?o(p):d>3?o(g,n,p):o(g,n))||p);return d>3&&p&&Object.defineProperty(g,n,p),p},f=this&&this.__param||function(E,g){return function(n,l){g(n,l,E)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;const h=c(4725),_=c(9806);let S=i.MouseService=class{constructor(E,g){this._renderService=E,this._charSizeService=g}getCoords(E,g,n,l,o){return(0,_.getCoords)(window,E,g,n,l,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(E,g){const n=(0,_.getCoordsRelativeToElement)(window,E,g);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};i.MouseService=S=u([f(0,h.IRenderService),f(1,h.ICharSizeService)],S)},3230:function(v,i,c){var u=this&&this.__decorate||function(o,d,p,C){var y,w=arguments.length,b=w<3?d:C===null?C=Object.getOwnPropertyDescriptor(d,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,d,p,C);else for(var k=o.length-1;k>=0;k--)(y=o[k])&&(b=(w<3?y(b):w>3?y(d,p,b):y(d,p))||b);return w>3&&b&&Object.defineProperty(d,p,b),b},f=this&&this.__param||function(o,d){return function(p,C){d(p,C,o)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;const h=c(6193),_=c(4725),S=c(8460),E=c(844),g=c(7226),n=c(2585);let l=i.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,d,p,C,y,w,b,k){super(),this._rowCount=o,this._charSizeService=C,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new g.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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((R,L)=>this._renderRows(R,L)),b),this.register(this._renderDebouncer),this.register(b.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var R;return(R=this._renderer.value)==null?void 0:R.clear()}))),this.register(p.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(y.onDecorationRegistered((()=>this._fullRefresh()))),this.register(y.onDecorationRemoved((()=>this._fullRefresh()))),this.register(p.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(p.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(k.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(b.window,d),this.register(b.onWindowChange((R=>this._registerIntersectionObserver(R,d))))}_registerIntersectionObserver(o,d){if("IntersectionObserver"in o){const p=new o.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});p.observe(d),this._observerDisposable.value=(0,E.toDisposable)((()=>p.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,d,p=!1){this._isPaused?this._needsFullRefresh=!0:(p||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,d,this._rowCount))}_renderRows(o,d){this._renderer.value&&(o=Math.min(o,this._rowCount-1),d=Math.min(d,this._rowCount-1),this._renderer.value.renderRows(o,d),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:d}),this._onRender.fire({start:o,end:d}),this._isNextRenderRedrawOnly=!0)}resize(o,d){this._rowCount=d,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((d=>this.refreshRows(d.start,d.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,d;this._renderer.value&&((d=(o=this._renderer.value).clearTextureAtlas)==null||d.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,d){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var p;return(p=this._renderer.value)==null?void 0:p.handleResize(o,d)})):this._renderer.value.handleResize(o,d),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,d,p){var C;this._selectionState.start=o,this._selectionState.end=d,this._selectionState.columnSelectMode=p,(C=this._renderer.value)==null||C.handleSelectionChanged(o,d,p)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};i.RenderService=l=u([f(2,n.IOptionsService),f(3,_.ICharSizeService),f(4,n.IDecorationService),f(5,n.IBufferService),f(6,_.ICoreBrowserService),f(7,_.IThemeService)],l)},9312:function(v,i,c){var u=this&&this.__decorate||function(b,k,R,L){var T,A=arguments.length,F=A<3?k:L===null?L=Object.getOwnPropertyDescriptor(k,R):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(b,k,R,L);else for(var U=b.length-1;U>=0;U--)(T=b[U])&&(F=(A<3?T(F):A>3?T(k,R,F):T(k,R))||F);return A>3&&F&&Object.defineProperty(k,R,F),F},f=this&&this.__param||function(b,k){return function(R,L){k(R,L,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;const h=c(9806),_=c(9504),S=c(456),E=c(4725),g=c(8460),n=c(844),l=c(6114),o=c(4841),d=c(511),p=c(2585),C=" ",y=new RegExp(C,"g");let w=i.SelectionService=class extends n.Disposable{constructor(b,k,R,L,T,A,F,U,$){super(),this._element=b,this._screenElement=k,this._linkifier=R,this._bufferService=L,this._coreService=T,this._mouseService=A,this._optionsService=F,this._renderService=U,this._coreBrowserService=$,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new d.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new g.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new g.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Y=>this._handleMouseMove(Y),this._mouseUpListener=Y=>this._handleMouseUp(Y),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Y=>this._handleTrim(Y))),this.register(this._bufferService.buffers.onBufferActivate((Y=>this._handleBufferActivate(Y)))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,n.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const b=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!(!b||!k||b[0]===k[0]&&b[1]===k[1])}get selectionText(){const b=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;if(!b||!k)return"";const R=this._bufferService.buffer,L=[];if(this._activeSelectionMode===3){if(b[0]===k[0])return"";const T=b[0]<k[0]?b[0]:k[0],A=b[0]<k[0]?k[0]:b[0];for(let F=b[1];F<=k[1];F++){const U=R.translateBufferLineToString(F,!0,T,A);L.push(U)}}else{const T=b[1]===k[1]?k[0]:void 0;L.push(R.translateBufferLineToString(b[1],!0,b[0],T));for(let A=b[1]+1;A<=k[1]-1;A++){const F=R.lines.get(A),U=R.translateBufferLineToString(A,!0);F!=null&&F.isWrapped?L[L.length-1]+=U:L.push(U)}if(b[1]!==k[1]){const A=R.lines.get(k[1]),F=R.translateBufferLineToString(k[1],!0,0,k[0]);A&&A.isWrapped?L[L.length-1]+=F:L.push(F)}}return L.map((T=>T.replace(y," "))).join(l.isWindows?`\r
|
|
163
|
+
`:`
|
|
164
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(b){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),l.isLinux&&b&&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(b){const k=this._getMouseBufferCoords(b),R=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!!(R&&L&&k)&&this._areCoordsInSelection(k,R,L)}isCellInSelection(b,k){const R=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!R||!L)&&this._areCoordsInSelection([b,k],R,L)}_areCoordsInSelection(b,k,R){return b[1]>k[1]&&b[1]<R[1]||k[1]===R[1]&&b[1]===k[1]&&b[0]>=k[0]&&b[0]<R[0]||k[1]<R[1]&&b[1]===R[1]&&b[0]<R[0]||k[1]<R[1]&&b[1]===k[1]&&b[0]>=k[0]}_selectWordAtCursor(b,k){var T,A;const R=(A=(T=this._linkifier.currentLink)==null?void 0:T.link)==null?void 0:A.range;if(R)return this._model.selectionStart=[R.start.x-1,R.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(R,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const L=this._getMouseBufferCoords(b);return!!L&&(this._selectWordAt(L,k),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(b,k){this._model.clearSelection(),b=Math.max(b,0),k=Math.min(k,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,b],this._model.selectionEnd=[this._bufferService.cols,k],this.refresh(),this._onSelectionChange.fire()}_handleTrim(b){this._model.handleTrim(b)&&this.refresh()}_getMouseBufferCoords(b){const k=this._mouseService.getCoords(b,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(k)return k[0]--,k[1]--,k[1]+=this._bufferService.buffer.ydisp,k}_getMouseEventScrollAmount(b){let k=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,b,this._screenElement)[1];const R=this._renderService.dimensions.css.canvas.height;return k>=0&&k<=R?0:(k>R&&(k-=R),k=Math.min(Math.max(k,-50),50),k/=50,k/Math.abs(k)+Math.round(14*k))}shouldForceSelection(b){return l.isMac?b.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:b.shiftKey}handleMouseDown(b){if(this._mouseDownTimeStamp=b.timeStamp,(b.button!==2||!this.hasSelection)&&b.button===0){if(!this._enabled){if(!this.shouldForceSelection(b))return;b.stopPropagation()}b.preventDefault(),this._dragScrollAmount=0,this._enabled&&b.shiftKey?this._handleIncrementalClick(b):b.detail===1?this._handleSingleClick(b):b.detail===2?this._handleDoubleClick(b):b.detail===3&&this._handleTripleClick(b),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(b){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(b))}_handleSingleClick(b){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(b)?3:0,this._model.selectionStart=this._getMouseBufferCoords(b),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const k=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);k&&k.length!==this._model.selectionStart[0]&&k.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(b){this._selectWordAtCursor(b,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(b){const k=this._getMouseBufferCoords(b);k&&(this._activeSelectionMode=2,this._selectLineAt(k[1]))}shouldColumnSelect(b){return b.altKey&&!(l.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(b){if(b.stopImmediatePropagation(),!this._model.selectionStart)return;const k=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(b),!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(b),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const R=this._bufferService.buffer;if(this._model.selectionEnd[1]<R.lines.length){const L=R.lines.get(this._model.selectionEnd[1]);L&&L.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}k&&k[0]===this._model.selectionEnd[0]&&k[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 b=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(b.ydisp+this._bufferService.rows,b.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=b.ydisp),this.refresh()}}_handleMouseUp(b){const k=b.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&k<500&&b.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const R=this._mouseService.getCoords(b,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(R&&R[0]!==void 0&&R[1]!==void 0){const L=(0,_.moveToCellSequence)(R[0]-1,R[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(L,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const b=this._model.finalSelectionStart,k=this._model.finalSelectionEnd,R=!(!b||!k||b[0]===k[0]&&b[1]===k[1]);R?b&&k&&(this._oldSelectionStart&&this._oldSelectionEnd&&b[0]===this._oldSelectionStart[0]&&b[1]===this._oldSelectionStart[1]&&k[0]===this._oldSelectionEnd[0]&&k[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(b,k,R)):this._oldHasSelection&&this._fireOnSelectionChange(b,k,R)}_fireOnSelectionChange(b,k,R){this._oldSelectionStart=b,this._oldSelectionEnd=k,this._oldHasSelection=R,this._onSelectionChange.fire()}_handleBufferActivate(b){this.clearSelection(),this._trimListener.dispose(),this._trimListener=b.activeBuffer.lines.onTrim((k=>this._handleTrim(k)))}_convertViewportColToCharacterIndex(b,k){let R=k;for(let L=0;k>=L;L++){const T=b.loadCell(L,this._workCell).getChars().length;this._workCell.getWidth()===0?R--:T>1&&k!==L&&(R+=T-1)}return R}setSelection(b,k,R){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[b,k],this._model.selectionStartLength=R,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(b){this._isClickInSelection(b)||(this._selectWordAtCursor(b,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(b,k,R=!0,L=!0){if(b[0]>=this._bufferService.cols)return;const T=this._bufferService.buffer,A=T.lines.get(b[1]);if(!A)return;const F=T.translateBufferLineToString(b[1],!1);let U=this._convertViewportColToCharacterIndex(A,b[0]),$=U;const Y=b[0]-U;let W=0,I=0,x=0,D=0;if(F.charAt(U)===" "){for(;U>0&&F.charAt(U-1)===" ";)U--;for(;$<F.length&&F.charAt($+1)===" ";)$++}else{let K=b[0],X=b[0];A.getWidth(K)===0&&(W++,K--),A.getWidth(X)===2&&(I++,X++);const J=A.getString(X).length;for(J>1&&(D+=J-1,$+=J-1);K>0&&U>0&&!this._isCharWordSeparator(A.loadCell(K-1,this._workCell));){A.loadCell(K-1,this._workCell);const N=this._workCell.getChars().length;this._workCell.getWidth()===0?(W++,K--):N>1&&(x+=N-1,U-=N-1),U--,K--}for(;X<A.length&&$+1<F.length&&!this._isCharWordSeparator(A.loadCell(X+1,this._workCell));){A.loadCell(X+1,this._workCell);const N=this._workCell.getChars().length;this._workCell.getWidth()===2?(I++,X++):N>1&&(D+=N-1,$+=N-1),$++,X++}}$++;let O=U+Y-W+x,V=Math.min(this._bufferService.cols,$-U+W+I-x-D);if(k||F.slice(U,$).trim()!==""){if(R&&O===0&&A.getCodePoint(0)!==32){const K=T.lines.get(b[1]-1);if(K&&A.isWrapped&&K.getCodePoint(this._bufferService.cols-1)!==32){const X=this._getWordAt([this._bufferService.cols-1,b[1]-1],!1,!0,!1);if(X){const J=this._bufferService.cols-X.start;O-=J,V+=J}}}if(L&&O+V===this._bufferService.cols&&A.getCodePoint(this._bufferService.cols-1)!==32){const K=T.lines.get(b[1]+1);if(K!=null&&K.isWrapped&&K.getCodePoint(0)!==32){const X=this._getWordAt([0,b[1]+1],!1,!1,!0);X&&(V+=X.length)}}return{start:O,length:V}}}_selectWordAt(b,k){const R=this._getWordAt(b,k);if(R){for(;R.start<0;)R.start+=this._bufferService.cols,b[1]--;this._model.selectionStart=[R.start,b[1]],this._model.selectionStartLength=R.length}}_selectToWordAt(b){const k=this._getWordAt(b,!0);if(k){let R=b[1];for(;k.start<0;)k.start+=this._bufferService.cols,R--;if(!this._model.areSelectionValuesReversed())for(;k.start+k.length>this._bufferService.cols;)k.length-=this._bufferService.cols,R++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?k.start:k.start+k.length,R]}}_isCharWordSeparator(b){return b.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(b.getChars())>=0}_selectLineAt(b){const k=this._bufferService.buffer.getWrappedRangeForLine(b),R={start:{x:0,y:k.first},end:{x:this._bufferService.cols-1,y:k.last}};this._model.selectionStart=[0,k.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(R,this._bufferService.cols)}};i.SelectionService=w=u([f(3,p.IBufferService),f(4,p.ICoreService),f(5,E.IMouseService),f(6,p.IOptionsService),f(7,E.IRenderService),f(8,E.ICoreBrowserService)],w)},4725:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ILinkProviderService=i.IThemeService=i.ICharacterJoinerService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;const u=c(8343);i.ICharSizeService=(0,u.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),i.IMouseService=(0,u.createDecorator)("MouseService"),i.IRenderService=(0,u.createDecorator)("RenderService"),i.ISelectionService=(0,u.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,u.createDecorator)("ThemeService"),i.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(v,i,c){var u=this&&this.__decorate||function(w,b,k,R){var L,T=arguments.length,A=T<3?b:R===null?R=Object.getOwnPropertyDescriptor(b,k):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(w,b,k,R);else for(var F=w.length-1;F>=0;F--)(L=w[F])&&(A=(T<3?L(A):T>3?L(b,k,A):L(b,k))||A);return T>3&&A&&Object.defineProperty(b,k,A),A},f=this&&this.__param||function(w,b){return function(k,R){b(k,R,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const h=c(7239),_=c(8055),S=c(8460),E=c(844),g=c(2585),n=_.css.toColor("#ffffff"),l=_.css.toColor("#000000"),o=_.css.toColor("#ffffff"),d=_.css.toColor("#000000"),p={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[_.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")],b=[0,95,135,175,215,255];for(let k=0;k<216;k++){const R=b[k/36%6|0],L=b[k/6%6|0],T=b[k%6];w.push({css:_.channels.toCss(R,L,T),rgba:_.channels.toRgba(R,L,T)})}for(let k=0;k<24;k++){const R=8+10*k;w.push({css:_.channels.toCss(R,R,R),rgba:_.channels.toRgba(R,R,R)})}return w})());let C=i.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:n,background:l,cursor:o,cursorAccent:d,selectionForeground:void 0,selectionBackgroundTransparent:p,selectionBackgroundOpaque:_.color.blend(l,p),selectionInactiveBackgroundTransparent:p,selectionInactiveBackgroundOpaque:_.color.blend(l,p),ansi:i.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(w={}){const b=this._colors;if(b.foreground=y(w.foreground,n),b.background=y(w.background,l),b.cursor=y(w.cursor,o),b.cursorAccent=y(w.cursorAccent,d),b.selectionBackgroundTransparent=y(w.selectionBackground,p),b.selectionBackgroundOpaque=_.color.blend(b.background,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundTransparent=y(w.selectionInactiveBackground,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundOpaque=_.color.blend(b.background,b.selectionInactiveBackgroundTransparent),b.selectionForeground=w.selectionForeground?y(w.selectionForeground,_.NULL_COLOR):void 0,b.selectionForeground===_.NULL_COLOR&&(b.selectionForeground=void 0),_.color.isOpaque(b.selectionBackgroundTransparent)&&(b.selectionBackgroundTransparent=_.color.opacity(b.selectionBackgroundTransparent,.3)),_.color.isOpaque(b.selectionInactiveBackgroundTransparent)&&(b.selectionInactiveBackgroundTransparent=_.color.opacity(b.selectionInactiveBackgroundTransparent,.3)),b.ansi=i.DEFAULT_ANSI_COLORS.slice(),b.ansi[0]=y(w.black,i.DEFAULT_ANSI_COLORS[0]),b.ansi[1]=y(w.red,i.DEFAULT_ANSI_COLORS[1]),b.ansi[2]=y(w.green,i.DEFAULT_ANSI_COLORS[2]),b.ansi[3]=y(w.yellow,i.DEFAULT_ANSI_COLORS[3]),b.ansi[4]=y(w.blue,i.DEFAULT_ANSI_COLORS[4]),b.ansi[5]=y(w.magenta,i.DEFAULT_ANSI_COLORS[5]),b.ansi[6]=y(w.cyan,i.DEFAULT_ANSI_COLORS[6]),b.ansi[7]=y(w.white,i.DEFAULT_ANSI_COLORS[7]),b.ansi[8]=y(w.brightBlack,i.DEFAULT_ANSI_COLORS[8]),b.ansi[9]=y(w.brightRed,i.DEFAULT_ANSI_COLORS[9]),b.ansi[10]=y(w.brightGreen,i.DEFAULT_ANSI_COLORS[10]),b.ansi[11]=y(w.brightYellow,i.DEFAULT_ANSI_COLORS[11]),b.ansi[12]=y(w.brightBlue,i.DEFAULT_ANSI_COLORS[12]),b.ansi[13]=y(w.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),b.ansi[14]=y(w.brightCyan,i.DEFAULT_ANSI_COLORS[14]),b.ansi[15]=y(w.brightWhite,i.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const k=Math.min(b.ansi.length-16,w.extendedAnsi.length);for(let R=0;R<k;R++)b.ansi[R+16]=y(w.extendedAnsi[R],i.DEFAULT_ANSI_COLORS[R+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[w]=this._restoreColors.ansi[w]}else for(let b=0;b<this._restoreColors.ansi.length;++b)this._colors.ansi[b]=this._restoreColors.ansi[b]}modifyColors(w){w(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function y(w,b){if(w!==void 0)try{return _.css.toColor(w)}catch{}return b}i.ThemeService=C=u([f(0,g.IOptionsService)],C)},6349:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;const u=c(8460),f=c(844);class h extends f.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.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(S){if(this._maxLength===S)return;const E=new Array(S);for(let g=0;g<Math.min(S,this.length);g++)E[g]=this._array[this._getCyclicIndex(g)];this._array=E,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let E=this._length;E<S;E++)this._array[E]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,E){this._array[this._getCyclicIndex(S)]=E}push(S){this._array[this._getCyclicIndex(this._length)]=S,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(S,E,...g){if(E){for(let n=S;n<this._length-E;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+E)];this._length-=E,this.onDeleteEmitter.fire({index:S,amount:E})}for(let n=this._length-1;n>=S;n--)this._array[this._getCyclicIndex(n+g.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<g.length;n++)this._array[this._getCyclicIndex(S+n)]=g[n];if(g.length&&this.onInsertEmitter.fire({index:S,amount:g.length}),this._length+g.length>this._maxLength){const n=this._length+g.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=g.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,E,g){if(!(E<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(let l=E-1;l>=0;l--)this.set(S+l+g,this.get(S+l));const n=S+E+g-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<E;n++)this.set(S+n+g,this.get(S+n))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}i.CircularList=h},1439:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function c(u,f=5){if(typeof u!="object")return u;const h=Array.isArray(u)?[]:{};for(const _ in u)h[_]=f<=1?u[_]:u[_]&&c(u[_],f-1);return h}},8055:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let c=0,u=0,f=0,h=0;var _,S,E,g,n;function l(d){const p=d.toString(16);return p.length<2?"0"+p:p}function o(d,p){return d<p?(p+.05)/(d+.05):(d+.05)/(p+.05)}i.NULL_COLOR={css:"#00000000",rgba:0},(function(d){d.toCss=function(p,C,y,w){return w!==void 0?`#${l(p)}${l(C)}${l(y)}${l(w)}`:`#${l(p)}${l(C)}${l(y)}`},d.toRgba=function(p,C,y,w=255){return(p<<24|C<<16|y<<8|w)>>>0},d.toColor=function(p,C,y,w){return{css:d.toCss(p,C,y,w),rgba:d.toRgba(p,C,y,w)}}})(_||(i.channels=_={})),(function(d){function p(C,y){return h=Math.round(255*y),[c,u,f]=n.toChannels(C.rgba),{css:_.toCss(c,u,f,h),rgba:_.toRgba(c,u,f,h)}}d.blend=function(C,y){if(h=(255&y.rgba)/255,h===1)return{css:y.css,rgba:y.rgba};const w=y.rgba>>24&255,b=y.rgba>>16&255,k=y.rgba>>8&255,R=C.rgba>>24&255,L=C.rgba>>16&255,T=C.rgba>>8&255;return c=R+Math.round((w-R)*h),u=L+Math.round((b-L)*h),f=T+Math.round((k-T)*h),{css:_.toCss(c,u,f),rgba:_.toRgba(c,u,f)}},d.isOpaque=function(C){return(255&C.rgba)==255},d.ensureContrastRatio=function(C,y,w){const b=n.ensureContrastRatio(C.rgba,y.rgba,w);if(b)return _.toColor(b>>24&255,b>>16&255,b>>8&255)},d.opaque=function(C){const y=(255|C.rgba)>>>0;return[c,u,f]=n.toChannels(y),{css:_.toCss(c,u,f),rgba:y}},d.opacity=p,d.multiplyOpacity=function(C,y){return h=255&C.rgba,p(C,h*y/255)},d.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(S||(i.color=S={})),(function(d){let p,C;try{const y=document.createElement("canvas");y.width=1,y.height=1;const w=y.getContext("2d",{willReadFrequently:!0});w&&(p=w,p.globalCompositeOperation="copy",C=p.createLinearGradient(0,0,1,1))}catch{}d.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return c=parseInt(y.slice(1,2).repeat(2),16),u=parseInt(y.slice(2,3).repeat(2),16),f=parseInt(y.slice(3,4).repeat(2),16),_.toColor(c,u,f);case 5:return c=parseInt(y.slice(1,2).repeat(2),16),u=parseInt(y.slice(2,3).repeat(2),16),f=parseInt(y.slice(3,4).repeat(2),16),h=parseInt(y.slice(4,5).repeat(2),16),_.toColor(c,u,f,h);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const w=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return c=parseInt(w[1]),u=parseInt(w[2]),f=parseInt(w[3]),h=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),_.toColor(c,u,f,h);if(!p||!C)throw new Error("css.toColor: Unsupported css format");if(p.fillStyle=C,p.fillStyle=y,typeof p.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(p.fillRect(0,0,1,1),[c,u,f,h]=p.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,u,f,h),css:y}}})(E||(i.css=E={})),(function(d){function p(C,y,w){const b=C/255,k=y/255,R=w/255;return .2126*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.7152*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.0722*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))}d.relativeLuminance=function(C){return p(C>>16&255,C>>8&255,255&C)},d.relativeLuminance2=p})(g||(i.rgb=g={})),(function(d){function p(y,w,b){const k=y>>24&255,R=y>>16&255,L=y>>8&255;let T=w>>24&255,A=w>>16&255,F=w>>8&255,U=o(g.relativeLuminance2(T,A,F),g.relativeLuminance2(k,R,L));for(;U<b&&(T>0||A>0||F>0);)T-=Math.max(0,Math.ceil(.1*T)),A-=Math.max(0,Math.ceil(.1*A)),F-=Math.max(0,Math.ceil(.1*F)),U=o(g.relativeLuminance2(T,A,F),g.relativeLuminance2(k,R,L));return(T<<24|A<<16|F<<8|255)>>>0}function C(y,w,b){const k=y>>24&255,R=y>>16&255,L=y>>8&255;let T=w>>24&255,A=w>>16&255,F=w>>8&255,U=o(g.relativeLuminance2(T,A,F),g.relativeLuminance2(k,R,L));for(;U<b&&(T<255||A<255||F<255);)T=Math.min(255,T+Math.ceil(.1*(255-T))),A=Math.min(255,A+Math.ceil(.1*(255-A))),F=Math.min(255,F+Math.ceil(.1*(255-F))),U=o(g.relativeLuminance2(T,A,F),g.relativeLuminance2(k,R,L));return(T<<24|A<<16|F<<8|255)>>>0}d.blend=function(y,w){if(h=(255&w)/255,h===1)return w;const b=w>>24&255,k=w>>16&255,R=w>>8&255,L=y>>24&255,T=y>>16&255,A=y>>8&255;return c=L+Math.round((b-L)*h),u=T+Math.round((k-T)*h),f=A+Math.round((R-A)*h),_.toRgba(c,u,f)},d.ensureContrastRatio=function(y,w,b){const k=g.relativeLuminance(y>>8),R=g.relativeLuminance(w>>8);if(o(k,R)<b){if(R<k){const A=p(y,w,b),F=o(k,g.relativeLuminance(A>>8));if(F<b){const U=C(y,w,b);return F>o(k,g.relativeLuminance(U>>8))?A:U}return A}const L=C(y,w,b),T=o(k,g.relativeLuminance(L>>8));if(T<b){const A=p(y,w,b);return T>o(k,g.relativeLuminance(A>>8))?L:A}return L}},d.reduceLuminance=p,d.increaseLuminance=C,d.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}})(n||(i.rgba=n={})),i.toPaddedHex=l,i.contrastRatio=o},8969:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;const u=c(844),f=c(2585),h=c(4348),_=c(7866),S=c(744),E=c(7302),g=c(6975),n=c(8460),l=c(1753),o=c(1480),d=c(7994),p=c(9282),C=c(5435),y=c(5981),w=c(2660);let b=!1;class k extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new n.EventEmitter),this._onScroll.event((L=>{var T;(T=this._onScrollApi)==null||T.fire(L.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(L){for(const T in L)this.optionsService.options[T]=L[T]}constructor(L){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new n.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new n.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new n.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new n.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new n.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new E.OptionsService(L)),this._instantiationService.setService(f.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(f.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(f.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(g.CoreService)),this._instantiationService.setService(f.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(l.CoreMouseService)),this._instantiationService.setService(f.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(f.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(d.CharsetService),this._instantiationService.setService(f.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(f.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,n.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,n.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,n.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,n.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((T=>{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((T=>{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 y.WriteBuffer(((T,A)=>this._inputHandler.parse(T,A)))),this.register((0,n.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(L,T){this._writeBuffer.write(L,T)}writeSync(L,T){this._logService.logLevel<=f.LogLevelEnum.WARN&&!b&&(this._logService.warn("writeSync is unreliable and will be removed soon."),b=!0),this._writeBuffer.writeSync(L,T)}input(L,T=!0){this.coreService.triggerDataEvent(L,T)}resize(L,T){isNaN(L)||isNaN(T)||(L=Math.max(L,S.MINIMUM_COLS),T=Math.max(T,S.MINIMUM_ROWS),this._bufferService.resize(L,T))}scroll(L,T=!1){this._bufferService.scroll(L,T)}scrollLines(L,T,A){this._bufferService.scrollLines(L,T,A)}scrollPages(L){this.scrollLines(L*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(L){const T=L-this._bufferService.buffer.ydisp;T!==0&&this.scrollLines(T)}registerEscHandler(L,T){return this._inputHandler.registerEscHandler(L,T)}registerDcsHandler(L,T){return this._inputHandler.registerDcsHandler(L,T)}registerCsiHandler(L,T){return this._inputHandler.registerCsiHandler(L,T)}registerOscHandler(L,T){return this._inputHandler.registerOscHandler(L,T)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let L=!1;const T=this.optionsService.rawOptions.windowsPty;T&&T.buildNumber!==void 0&&T.buildNumber!==void 0?L=T.backend==="conpty"&&T.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(L=!0),L?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const L=[];L.push(this.onLineFeed(p.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},(()=>((0,p.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const T of L)T.dispose()}))}}}i.CoreTerminal=k},8460:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.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 u=0;u<this._listeners.length;u++)if(this._listeners[u]===c)return void this._listeners.splice(u,1)}}})),this._event}fire(c,u){const f=[];for(let h=0;h<this._listeners.length;h++)f.push(this._listeners[h]);for(let h=0;h<f.length;h++)f[h].call(void 0,c,u)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(c,u){return c((f=>u.fire(f)))},i.runAndSubscribe=function(c,u){return u(void 0),c((f=>u(f)))}},5435:function(v,i,c){var u=this&&this.__decorate||function(W,I,x,D){var O,V=arguments.length,K=V<3?I:D===null?D=Object.getOwnPropertyDescriptor(I,x):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(W,I,x,D);else for(var X=W.length-1;X>=0;X--)(O=W[X])&&(K=(V<3?O(K):V>3?O(I,x,K):O(I,x))||K);return V>3&&K&&Object.defineProperty(I,x,K),K},f=this&&this.__param||function(W,I){return function(x,D){I(x,D,W)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;const h=c(2584),_=c(7116),S=c(2015),E=c(844),g=c(482),n=c(8437),l=c(8460),o=c(643),d=c(511),p=c(3734),C=c(2585),y=c(1480),w=c(6242),b=c(6351),k=c(5941),R={"(":0,")":1,"*":2,"+":3,"-":1,".":2},L=131072;function T(W,I){if(W>24)return I.setWinLines||!1;switch(W){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var A;(function(W){W[W.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",W[W.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(A||(i.WindowsOptionsReportType=A={}));let F=0;class U extends E.Disposable{getAttrData(){return this._curAttrData}constructor(I,x,D,O,V,K,X,J,N=new S.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=x,this._coreService=D,this._logService=O,this._optionsService=V,this._oscLinkService=K,this._coreMouseService=X,this._unicodeService=J,this._parser=N,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new g.StringToUtf32,this._utf8Decoder=new g.Utf8ToUtf32,this._workCell=new d.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new l.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new l.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new l.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new l.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new l.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new l.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new l.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new l.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new l.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new l.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new l.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new $(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._parser.setCsiHandlerFallback(((B,H)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(B),params:H.toArray()})})),this._parser.setEscHandlerFallback((B=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(B)})})),this._parser.setExecuteHandlerFallback((B=>{this._logService.debug("Unknown EXECUTE code: ",{code:B})})),this._parser.setOscHandlerFallback(((B,H,P)=>{this._logService.debug("Unknown OSC code: ",{identifier:B,action:H,data:P})})),this._parser.setDcsHandlerFallback(((B,H,P)=>{H==="HOOK"&&(P=P.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(B),action:H,payload:P})})),this._parser.setPrintHandler(((B,H,P)=>this.print(B,H,P))),this._parser.registerCsiHandler({final:"@"},(B=>this.insertChars(B))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(B=>this.scrollLeft(B))),this._parser.registerCsiHandler({final:"A"},(B=>this.cursorUp(B))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(B=>this.scrollRight(B))),this._parser.registerCsiHandler({final:"B"},(B=>this.cursorDown(B))),this._parser.registerCsiHandler({final:"C"},(B=>this.cursorForward(B))),this._parser.registerCsiHandler({final:"D"},(B=>this.cursorBackward(B))),this._parser.registerCsiHandler({final:"E"},(B=>this.cursorNextLine(B))),this._parser.registerCsiHandler({final:"F"},(B=>this.cursorPrecedingLine(B))),this._parser.registerCsiHandler({final:"G"},(B=>this.cursorCharAbsolute(B))),this._parser.registerCsiHandler({final:"H"},(B=>this.cursorPosition(B))),this._parser.registerCsiHandler({final:"I"},(B=>this.cursorForwardTab(B))),this._parser.registerCsiHandler({final:"J"},(B=>this.eraseInDisplay(B,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(B=>this.eraseInDisplay(B,!0))),this._parser.registerCsiHandler({final:"K"},(B=>this.eraseInLine(B,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(B=>this.eraseInLine(B,!0))),this._parser.registerCsiHandler({final:"L"},(B=>this.insertLines(B))),this._parser.registerCsiHandler({final:"M"},(B=>this.deleteLines(B))),this._parser.registerCsiHandler({final:"P"},(B=>this.deleteChars(B))),this._parser.registerCsiHandler({final:"S"},(B=>this.scrollUp(B))),this._parser.registerCsiHandler({final:"T"},(B=>this.scrollDown(B))),this._parser.registerCsiHandler({final:"X"},(B=>this.eraseChars(B))),this._parser.registerCsiHandler({final:"Z"},(B=>this.cursorBackwardTab(B))),this._parser.registerCsiHandler({final:"`"},(B=>this.charPosAbsolute(B))),this._parser.registerCsiHandler({final:"a"},(B=>this.hPositionRelative(B))),this._parser.registerCsiHandler({final:"b"},(B=>this.repeatPrecedingCharacter(B))),this._parser.registerCsiHandler({final:"c"},(B=>this.sendDeviceAttributesPrimary(B))),this._parser.registerCsiHandler({prefix:">",final:"c"},(B=>this.sendDeviceAttributesSecondary(B))),this._parser.registerCsiHandler({final:"d"},(B=>this.linePosAbsolute(B))),this._parser.registerCsiHandler({final:"e"},(B=>this.vPositionRelative(B))),this._parser.registerCsiHandler({final:"f"},(B=>this.hVPosition(B))),this._parser.registerCsiHandler({final:"g"},(B=>this.tabClear(B))),this._parser.registerCsiHandler({final:"h"},(B=>this.setMode(B))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(B=>this.setModePrivate(B))),this._parser.registerCsiHandler({final:"l"},(B=>this.resetMode(B))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(B=>this.resetModePrivate(B))),this._parser.registerCsiHandler({final:"m"},(B=>this.charAttributes(B))),this._parser.registerCsiHandler({final:"n"},(B=>this.deviceStatus(B))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(B=>this.deviceStatusPrivate(B))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(B=>this.softReset(B))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(B=>this.setCursorStyle(B))),this._parser.registerCsiHandler({final:"r"},(B=>this.setScrollRegion(B))),this._parser.registerCsiHandler({final:"s"},(B=>this.saveCursor(B))),this._parser.registerCsiHandler({final:"t"},(B=>this.windowOptions(B))),this._parser.registerCsiHandler({final:"u"},(B=>this.restoreCursor(B))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(B=>this.insertColumns(B))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(B=>this.deleteColumns(B))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(B=>this.selectProtected(B))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(B=>this.requestMode(B,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(B=>this.requestMode(B,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((B=>(this.setTitle(B),this.setIconName(B),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((B=>this.setIconName(B)))),this._parser.registerOscHandler(2,new w.OscHandler((B=>this.setTitle(B)))),this._parser.registerOscHandler(4,new w.OscHandler((B=>this.setOrReportIndexedColor(B)))),this._parser.registerOscHandler(8,new w.OscHandler((B=>this.setHyperlink(B)))),this._parser.registerOscHandler(10,new w.OscHandler((B=>this.setOrReportFgColor(B)))),this._parser.registerOscHandler(11,new w.OscHandler((B=>this.setOrReportBgColor(B)))),this._parser.registerOscHandler(12,new w.OscHandler((B=>this.setOrReportCursorColor(B)))),this._parser.registerOscHandler(104,new w.OscHandler((B=>this.restoreIndexedColor(B)))),this._parser.registerOscHandler(110,new w.OscHandler((B=>this.restoreFgColor(B)))),this._parser.registerOscHandler(111,new w.OscHandler((B=>this.restoreBgColor(B)))),this._parser.registerOscHandler(112,new w.OscHandler((B=>this.restoreCursorColor(B)))),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 B in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:B},(()=>this.selectCharset("("+B))),this._parser.registerEscHandler({intermediates:")",final:B},(()=>this.selectCharset(")"+B))),this._parser.registerEscHandler({intermediates:"*",final:B},(()=>this.selectCharset("*"+B))),this._parser.registerEscHandler({intermediates:"+",final:B},(()=>this.selectCharset("+"+B))),this._parser.registerEscHandler({intermediates:"-",final:B},(()=>this.selectCharset("-"+B))),this._parser.registerEscHandler({intermediates:".",final:B},(()=>this.selectCharset("."+B))),this._parser.registerEscHandler({intermediates:"/",final:B},(()=>this.selectCharset("/"+B)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((B=>(this._logService.error("Parsing error: ",B),B))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new b.DcsHandler(((B,H)=>this.requestStatusString(B,H))))}_preserveStack(I,x,D,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=x,this._parseStack.decodedLength=D,this._parseStack.position=O}_logSlowResolvingAsync(I){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([I,new Promise(((x,D)=>setTimeout((()=>D("#SLOW_TIMEOUT")),5e3)))]).catch((x=>{if(x!=="#SLOW_TIMEOUT")throw x;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(I,x){let D,O=this._activeBuffer.x,V=this._activeBuffer.y,K=0;const X=this._parseStack.paused;if(X){if(D=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,x))return this._logSlowResolvingAsync(D),D;O=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>L&&(K=this._parseStack.position+L)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,(B=>String.fromCharCode(B))).join("")}"`),typeof I=="string"?I.split("").map((B=>B.charCodeAt(0))):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<L&&(this._parseBuffer=new Uint32Array(Math.min(I.length,L))),X||this._dirtyRowTracker.clearRange(),I.length>L)for(let B=K;B<I.length;B+=L){const H=B+L<I.length?B+L:I.length,P=typeof I=="string"?this._stringDecoder.decode(I.substring(B,H),this._parseBuffer):this._utf8Decoder.decode(I.subarray(B,H),this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,P))return this._preserveStack(O,V,P,B),this._logSlowResolvingAsync(D),D}else if(!X){const B=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,B))return this._preserveStack(O,V,B,0),this._logSlowResolvingAsync(D),D}this._activeBuffer.x===O&&this._activeBuffer.y===V||this._onCursorMove.fire();const J=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),N=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);N<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(N,this._bufferService.rows-1),Math.min(J,this._bufferService.rows-1))}print(I,x,D){let O,V;const K=this._charsetService.charset,X=this._optionsService.rawOptions.screenReaderMode,J=this._bufferService.cols,N=this._coreService.decPrivateModes.wraparound,B=this._coreService.modes.insertMode,H=this._curAttrData;let P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&D-x>0&&P.getWidth(this._activeBuffer.x-1)===2&&P.setCellFromCodepoint(this._activeBuffer.x-1,0,1,H);let z=this._parser.precedingJoinState;for(let Z=x;Z<D;++Z){if(O=I[Z],O<127&&K){const Ie=K[String.fromCharCode(O)];Ie&&(O=Ie.charCodeAt(0))}const ee=this._unicodeService.charProperties(O,z);V=y.UnicodeService.extractWidth(ee);const he=y.UnicodeService.extractShouldJoin(ee),ue=he?y.UnicodeService.extractWidth(z):0;if(z=ee,X&&this._onA11yChar.fire((0,g.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-ue>J){if(N){const Ie=P;let q=this._activeBuffer.x-ue;for(this._activeBuffer.x=ue,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ue>0&&P instanceof n.BufferLine&&P.copyCellsFrom(Ie,q,0,ue,!1);q<J;)Ie.setCellFromCodepoint(q++,0,1,H)}else if(this._activeBuffer.x=J-1,V===2)continue}if(he&&this._activeBuffer.x){const Ie=P.getWidth(this._activeBuffer.x-1)?1:2;P.addCodepointToCell(this._activeBuffer.x-Ie,O,V);for(let q=V-ue;--q>=0;)P.setCellFromCodepoint(this._activeBuffer.x++,0,0,H)}else if(B&&(P.insertCells(this._activeBuffer.x,V-ue,this._activeBuffer.getNullCell(H)),P.getWidth(J-1)===2&&P.setCellFromCodepoint(J-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,H)),P.setCellFromCodepoint(this._activeBuffer.x++,O,V,H),V>0)for(;--V;)P.setCellFromCodepoint(this._activeBuffer.x++,0,0,H)}this._parser.precedingJoinState=z,this._activeBuffer.x<J&&D-x>0&&P.getWidth(this._activeBuffer.x)===0&&!P.hasContent(this._activeBuffer.x)&&P.setCellFromCodepoint(this._activeBuffer.x,0,1,H),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,x){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,x):this._parser.registerCsiHandler(I,(D=>!T(D.params[0],this._optionsService.rawOptions.windowOptions)||x(D)))}registerDcsHandler(I,x){return this._parser.registerDcsHandler(I,new b.DcsHandler(x))}registerEscHandler(I,x){return this._parser.registerEscHandler(I,x)}registerOscHandler(I,x){return this._parser.registerOscHandler(I,new w.OscHandler(x))}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 I;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&&((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&I.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);x.hasWidth(this._activeBuffer.x)&&!x.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,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(I,x){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+x):(this._activeBuffer.x=I,this._activeBuffer.y=x),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,x){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+x)}cursorUp(I){const x=this._activeBuffer.y-this._activeBuffer.scrollTop;return x>=0?this._moveCursor(0,-Math.min(x,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const x=this._activeBuffer.scrollBottom-this._activeBuffer.y;return x>=0?this._moveCursor(0,Math.min(x,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const x=I.params[0];return x===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:x===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let x=I.params[0]||1;for(;x--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let x=I.params[0]||1;for(;x--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const x=I.params[0];return x===1&&(this._curAttrData.bg|=536870912),x!==2&&x!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,x,D,O=!1,V=!1){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);K.replaceCells(x,D,this._activeBuffer.getNullCell(this._eraseAttrData()),V),O&&(K.isWrapped=!1)}_resetBufferLine(I,x=!1){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);D&&(D.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),x),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),D.isWrapped=!1)}eraseInDisplay(I,x=!1){let D;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(D=this._activeBuffer.y,this._dirtyRowTracker.markDirty(D),this._eraseInBufferLine(D++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,x);D<this._bufferService.rows;D++)this._resetBufferLine(D,x);this._dirtyRowTracker.markDirty(D);break;case 1:for(D=this._activeBuffer.y,this._dirtyRowTracker.markDirty(D),this._eraseInBufferLine(D,0,this._activeBuffer.x+1,!0,x),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(D+1).isWrapped=!1);D--;)this._resetBufferLine(D,x);this._dirtyRowTracker.markDirty(0);break;case 2:for(D=this._bufferService.rows,this._dirtyRowTracker.markDirty(D-1);D--;)this._resetBufferLine(D,x);this._dirtyRowTracker.markDirty(0);break;case 3:const O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(I,x=!1){switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,x);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,x);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,x)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(I){this._restrictCursor();let x=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;x--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let x=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=this._activeBuffer.ybase+this._activeBuffer.y;let O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;x--;)this._activeBuffer.lines.splice(D,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(I){this._restrictCursor();const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let x=I.params[0]||1;for(;x--;)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(I){let x=I.params[0]||1;for(;x--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(n.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=I.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.deleteCells(0,x,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=I.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.insertCells(0,x,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=I.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.insertCells(this._activeBuffer.x,x,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=I.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.deleteCells(this._activeBuffer.x,x,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(I){this._restrictCursor();const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return x&&(x.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){const x=this._parser.precedingJoinState;if(!x)return!0;const D=I.params[0]||1,O=y.UnicodeService.extractWidth(x),V=this._activeBuffer.x-O,K=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),X=new Uint32Array(K.length*D);let J=0;for(let B=0;B<K.length;){const H=K.codePointAt(B)||0;X[J++]=H,B+=H>65535?2:1}let N=J;for(let B=1;B<D;++B)X.copyWithin(N,0,J),N+=J;return this.print(X,0,N),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let x=0;x<I.length;x++)switch(I.params[x]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let x=0;x<I.length;x++)switch(I.params[x]){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(I){for(let x=0;x<I.length;x++)switch(I.params[x]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let x=0;x<I.length;x++)switch(I.params[x]){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(),I.params[x]===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(I,x){const D=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:V}=this._coreMouseService,K=this._coreService,{buffers:X,cols:J}=this._bufferService,{active:N,alt:B}=X,H=this._optionsService.rawOptions,P=he=>he?1:2,z=I.params[0];return Z=z,ee=x?z===2?4:z===4?P(K.modes.insertMode):z===12?3:z===20?P(H.convertEol):0:z===1?P(D.applicationCursorKeys):z===3?H.windowOptions.setWinLines?J===80?2:J===132?1:0:0:z===6?P(D.origin):z===7?P(D.wraparound):z===8?3:z===9?P(O==="X10"):z===12?P(H.cursorBlink):z===25?P(!K.isCursorHidden):z===45?P(D.reverseWraparound):z===66?P(D.applicationKeypad):z===67?4:z===1e3?P(O==="VT200"):z===1002?P(O==="DRAG"):z===1003?P(O==="ANY"):z===1004?P(D.sendFocus):z===1005?4:z===1006?P(V==="SGR"):z===1015?4:z===1016?P(V==="SGR_PIXELS"):z===1048?1:z===47||z===1047||z===1049?P(N===B):z===2004?P(D.bracketedPasteMode):0,K.triggerDataEvent(`${h.C0.ESC}[${x?"":"?"}${Z};${ee}$y`),!0;var Z,ee}_updateAttrColor(I,x,D,O,V){return x===2?(I|=50331648,I&=-16777216,I|=p.AttributeData.fromColorRGB([D,O,V])):x===5&&(I&=-50331904,I|=33554432|255&D),I}_extractColor(I,x,D){const O=[0,0,-1,0,0,0];let V=0,K=0;do{if(O[K+V]=I.params[x+K],I.hasSubParams(x+K)){const X=I.getSubParams(x+K);let J=0;do O[1]===5&&(V=1),O[K+J+1+V]=X[J];while(++J<X.length&&J+K+1+V<O.length);break}if(O[1]===5&&K+V>=2||O[1]===2&&K+V>=5)break;O[1]&&(V=1)}while(++K+x<I.length&&K+V<O.length);for(let X=2;X<O.length;++X)O[X]===-1&&(O[X]=0);switch(O[0]){case 38:D.fg=this._updateAttrColor(D.fg,O[1],O[3],O[4],O[5]);break;case 48:D.bg=this._updateAttrColor(D.bg,O[1],O[3],O[4],O[5]);break;case 58:D.extended=D.extended.clone(),D.extended.underlineColor=this._updateAttrColor(D.extended.underlineColor,O[1],O[3],O[4],O[5])}return K}_processUnderline(I,x){x.extended=x.extended.clone(),(!~I||I>5)&&(I=1),x.extended.underlineStyle=I,x.fg|=268435456,I===0&&(x.fg&=-268435457),x.updateExtended()}_processSGR0(I){I.fg=n.DEFAULT_ATTR_DATA.fg,I.bg=n.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const x=I.length;let D;const O=this._curAttrData;for(let V=0;V<x;V++)D=I.params[V],D>=30&&D<=37?(O.fg&=-50331904,O.fg|=16777216|D-30):D>=40&&D<=47?(O.bg&=-50331904,O.bg|=16777216|D-40):D>=90&&D<=97?(O.fg&=-50331904,O.fg|=16777224|D-90):D>=100&&D<=107?(O.bg&=-50331904,O.bg|=16777224|D-100):D===0?this._processSGR0(O):D===1?O.fg|=134217728:D===3?O.bg|=67108864:D===4?(O.fg|=268435456,this._processUnderline(I.hasSubParams(V)?I.getSubParams(V)[0]:1,O)):D===5?O.fg|=536870912:D===7?O.fg|=67108864:D===8?O.fg|=1073741824:D===9?O.fg|=2147483648:D===2?O.bg|=134217728:D===21?this._processUnderline(2,O):D===22?(O.fg&=-134217729,O.bg&=-134217729):D===23?O.bg&=-67108865:D===24?(O.fg&=-268435457,this._processUnderline(0,O)):D===25?O.fg&=-536870913:D===27?O.fg&=-67108865:D===28?O.fg&=-1073741825:D===29?O.fg&=2147483647:D===39?(O.fg&=-67108864,O.fg|=16777215&n.DEFAULT_ATTR_DATA.fg):D===49?(O.bg&=-67108864,O.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):D===38||D===48||D===58?V+=this._extractColor(I,V,O):D===53?O.bg|=1073741824:D===55?O.bg&=-1073741825:D===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):D===100?(O.fg&=-67108864,O.fg|=16777215&n.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",D);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const x=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${x};${D}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const x=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${x};${D}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(I){const x=I.params[0]||1;switch(x){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 D=x%2==1;return this._optionsService.options.cursorBlink=D,!0}setScrollRegion(I){const x=I.params[0]||1;let D;return(I.length<2||(D=I.params[1])>this._bufferService.rows||D===0)&&(D=this._bufferService.rows),D>x&&(this._activeBuffer.scrollTop=x-1,this._activeBuffer.scrollBottom=D-1,this._setCursor(0,0)),!0}windowOptions(I){if(!T(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const x=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:x!==2&&this._onRequestWindowsOptionsReport.fire(A.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(A.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:x!==0&&x!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),x!==0&&x!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:x!==0&&x!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),x!==0&&x!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){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(I){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(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const x=[],D=I.split(";");for(;D.length>1;){const O=D.shift(),V=D.shift();if(/^\d+$/.exec(O)){const K=parseInt(O);if(Y(K))if(V==="?")x.push({type:0,index:K});else{const X=(0,k.parseColor)(V);X&&x.push({type:1,index:K,color:X})}}}return x.length&&this._onColor.fire(x),!0}setHyperlink(I){const x=I.split(";");return!(x.length<2)&&(x[1]?this._createHyperlink(x[0],x[1]):!x[0]&&this._finishHyperlink())}_createHyperlink(I,x){this._getCurrentLinkId()&&this._finishHyperlink();const D=I.split(":");let O;const V=D.findIndex((K=>K.startsWith("id=")));return V!==-1&&(O=D[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,uri:x}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(I,x){const D=I.split(";");for(let O=0;O<D.length&&!(x>=this._specialColors.length);++O,++x)if(D[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[x]}]);else{const V=(0,k.parseColor)(D[O]);V&&this._onColor.fire([{type:1,index:this._specialColors[x],color:V}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const x=[],D=I.split(";");for(let O=0;O<D.length;++O)if(/^\d+$/.exec(D[O])){const V=parseInt(D[O]);Y(V)&&x.push({type:2,index:V})}return x.length&&this._onColor.fire(x),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){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(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(R[I[0]],_.CHARSETS[I[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 I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new d.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let x=0;x<this._bufferService.rows;++x){const D=this._activeBuffer.ybase+this._activeBuffer.y+x,O=this._activeBuffer.lines.get(D);O&&(O.fill(I),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,x){const D=this._bufferService.buffer,O=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${V}${h.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${D.scrollTop+1};${D.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,x){this._dirtyRowTracker.markRangeDirty(I,x)}}i.InputHandler=U;let $=class{constructor(W){this._bufferService=W,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(W){W<this.start?this.start=W:W>this.end&&(this.end=W)}markRangeDirty(W,I){W>I&&(F=W,W=I,I=F),W<this.start&&(this.start=W),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Y(W){return 0<=W&&W<256}$=u([f(0,C.IBufferService)],$)},844:(v,i)=>{function c(u){for(const f of u)f.dispose();u.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const f=this._disposables.indexOf(u);f!==-1&&this._disposables.splice(f,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var f;this._isDisposed||u===this._value||((f=this._value)==null||f.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},i.toDisposable=function(u){return{dispose:u}},i.disposeArray=c,i.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(f,h,_){this._data[f]||(this._data[f]={}),this._data[f][h]=_}get(f,h){return this._data[f]?this._data[f][h]:void 0}clear(){this._data={}}}i.TwoKeyMap=c,i.FourKeyMap=class{constructor(){this._data=new c}set(u,f,h,_,S){this._data.get(u,f)||this._data.set(u,f,new c),this._data.get(u,f).set(h,_,S)}get(u,f,h,_){var S;return(S=this._data.get(u,f))==null?void 0:S.get(h,_)}clear(){this._data.clear()}}},6114:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof process<"u"&&"title"in process;const c=i.isNode?"node":navigator.userAgent,u=i.isNode?"node":navigator.platform;i.isFirefox=c.includes("Firefox"),i.isLegacyEdge=c.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(c),i.getSafariVersion=function(){if(!i.isSafari)return 0;const f=c.match(/Version\/(\d+)/);return f===null||f.length<2?0:parseInt(f[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),i.isIpad=u==="iPad",i.isIphone=u==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),i.isLinux=u.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(c)},6106:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SortedList=void 0;let c=0;i.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const f=this._getKey(u);if(f===void 0||(c=this._search(f),c===-1)||this._getKey(this._array[c])!==f)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===f);return!1}*getKeyIterator(u){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===u)}forEachByKey(u,f){if(this._array.length!==0&&(c=this._search(u),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===u))do f(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===u)}values(){return[...this._array].values()}_search(u){let f=0,h=this._array.length-1;for(;h>=f;){let _=f+h>>1;const S=this._getKey(this._array[_]);if(S>u)h=_-1;else{if(!(S<u)){for(;_>0&&this._getKey(this._array[_-1])===u;)_--;return _}f=_+1}}return f}}},7226:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const u=c(6114);class f{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),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(S){this._idleCallback=void 0;let E=0,g=0,n=S.timeRemaining(),l=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),g=Math.max(E,g),l=S.timeRemaining(),1.5*g>l)return n-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-E))}ms`),void this._start();n=l}this.clear()}}class h extends f{_requestCallback(S){return setTimeout((()=>S(this._createDeadline(16))))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const E=Date.now()+S;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}i.PriorityTaskQueue=h,i.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends f{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:h,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;const u=c(643);i.updateWindowsModeWrappedState=function(f){const h=f.buffer.lines.get(f.buffer.ybase+f.buffer.y-1),_=h==null?void 0:h.get(f.cols-1),S=f.buffer.lines.get(f.buffer.ybase+f.buffer.y);S&&_&&(S.isWrapped=_[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&_[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new c;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}i.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,_=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=_}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=u},9092:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;const u=c(6349),f=c(7226),h=c(3734),_=c(8437),S=c(4634),E=c(511),g=c(643),n=c(4863),l=c(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(o,d,p){this._hasScrollback=o,this._optionsService=d,this._bufferService=p,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=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new f.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,d){return new _.BufferLine(this._bufferService.cols,this.getNullCell(o),d)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const d=o+this._optionsService.rawOptions.scrollback;return d>i.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:d}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=_.DEFAULT_ATTR_DATA);let d=this._rows;for(;d--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,d){const p=this.getNullCell(_.DEFAULT_ATTR_DATA);let C=0;const y=this._getCorrectBufferLength(d);if(y>this.lines.maxLength&&(this.lines.maxLength=y),this.lines.length>0){if(this._cols<o)for(let b=0;b<this.lines.length;b++)C+=+this.lines.get(b).resize(o,p);let w=0;if(this._rows<d)for(let b=this._rows;b<d;b++)this.lines.length<d+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(o,p)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(o,p)));else for(let b=this._rows;b>d;b--)this.lines.length>d+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(y<this.lines.maxLength){const b=this.lines.length-y;b>0&&(this.lines.trimStart(b),this.ybase=Math.max(this.ybase-b,0),this.ydisp=Math.max(this.ydisp-b,0),this.savedY=Math.max(this.savedY-b,0)),this.lines.maxLength=y}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,d-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=d-1,this._isReflowEnabled&&(this._reflow(o,d),this._cols>o))for(let w=0;w<this.lines.length;w++)C+=+this.lines.get(w).resize(o,p);this._cols=o,this._rows=d,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let d=0;for(;this._memoryCleanupPosition<this.lines.length;)if(d+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),d>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,d){this._cols!==o&&(o>this._cols?this._reflowLarger(o,d):this._reflowSmaller(o,d))}_reflowLarger(o,d){const p=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(p.length>0){const C=(0,S.reflowLargerCreateNewLayout)(this.lines,p);(0,S.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(o,d,C.countRemoved)}}_reflowLargerAdjustViewport(o,d,p){const C=this.getNullCell(_.DEFAULT_ATTR_DATA);let y=p;for(;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<d&&this.lines.push(new _.BufferLine(o,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-p,0)}_reflowSmaller(o,d){const p=this.getNullCell(_.DEFAULT_ATTR_DATA),C=[];let y=0;for(let w=this.lines.length-1;w>=0;w--){let b=this.lines.get(w);if(!b||!b.isWrapped&&b.getTrimmedLength()<=o)continue;const k=[b];for(;b.isWrapped&&w>0;)b=this.lines.get(--w),k.unshift(b);const R=this.ybase+this.y;if(R>=w&&R<w+k.length)continue;const L=k[k.length-1].getTrimmedLength(),T=(0,S.reflowSmallerGetNewLineLengths)(k,this._cols,o),A=T.length-k.length;let F;F=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+A):Math.max(0,this.lines.length-this.lines.maxLength+A);const U=[];for(let D=0;D<A;D++){const O=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);U.push(O)}U.length>0&&(C.push({start:w+k.length+y,newLines:U}),y+=U.length),k.push(...U);let $=T.length-1,Y=T[$];Y===0&&($--,Y=T[$]);let W=k.length-A-1,I=L;for(;W>=0;){const D=Math.min(I,Y);if(k[$]===void 0)break;if(k[$].copyCellsFrom(k[W],I-D,Y-D,D,!0),Y-=D,Y===0&&($--,Y=T[$]),I-=D,I===0){W--;const O=Math.max(W,0);I=(0,S.getWrappedLineTrimmedLength)(k,O,this._cols)}}for(let D=0;D<k.length;D++)T[D]<o&&k[D].setCell(T[D],p);let x=A-F;for(;x-- >0;)this.ybase===0?this.y<d-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+y)-d&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+A,this.ybase+d-1)}if(C.length>0){const w=[],b=[];for(let $=0;$<this.lines.length;$++)b.push(this.lines.get($));const k=this.lines.length;let R=k-1,L=0,T=C[L];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);let A=0;for(let $=Math.min(this.lines.maxLength-1,k+y-1);$>=0;$--)if(T&&T.start>R+A){for(let Y=T.newLines.length-1;Y>=0;Y--)this.lines.set($--,T.newLines[Y]);$++,w.push({index:R+1,amount:T.newLines.length}),A+=T.newLines.length,T=C[++L]}else this.lines.set($,b[R--]);let F=0;for(let $=w.length-1;$>=0;$--)w[$].index+=F,this.lines.onInsertEmitter.fire(w[$]),F+=w[$].amount;const U=Math.max(0,k+y-this.lines.maxLength);U>0&&this.lines.onTrimEmitter.fire(U)}}translateBufferLineToString(o,d,p=0,C){const y=this.lines.get(o);return y?y.translateToString(d,p,C):""}getWrappedRangeForLine(o){let d=o,p=o;for(;d>0&&this.lines.get(d).isWrapped;)d--;for(;p+1<this.lines.length&&this.lines.get(p+1).isWrapped;)p++;return{first:d,last:p}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let d=0;d<this.markers.length;d++)this.markers[d].line===o&&(this.markers[d].dispose(),this.markers.splice(d--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const d=new n.Marker(o);return this.markers.push(d),d.register(this.lines.onTrim((p=>{d.line-=p,d.line<0&&d.dispose()}))),d.register(this.lines.onInsert((p=>{d.line>=p.index&&(d.line+=p.amount)}))),d.register(this.lines.onDelete((p=>{d.line>=p.index&&d.line<p.index+p.amount&&d.dispose(),d.line>p.index&&(d.line-=p.amount)}))),d.register(d.onDispose((()=>this._removeMarker(d)))),d}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;const u=c(3734),f=c(511),h=c(643),_=c(482);i.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let S=0;class E{constructor(n,l,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*n);const d=l||f.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let p=0;p<n;++p)this.setCell(p,d);this.length=n}get(n){const l=this._data[3*n+0],o=2097151&l;return[this._data[3*n+1],2097152&l?this._combined[n]:o?(0,_.stringFromCodePoint)(o):"",l>>22,2097152&l?this._combined[n].charCodeAt(this._combined[n].length-1):o]}set(n,l){this._data[3*n+1]=l[h.CHAR_DATA_ATTR_INDEX],l[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[n]=l[1],this._data[3*n+0]=2097152|n|l[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*n+0]=l[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|l[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(n){return this._data[3*n+0]>>22}hasWidth(n){return 12582912&this._data[3*n+0]}getFg(n){return this._data[3*n+1]}getBg(n){return this._data[3*n+2]}hasContent(n){return 4194303&this._data[3*n+0]}getCodePoint(n){const l=this._data[3*n+0];return 2097152&l?this._combined[n].charCodeAt(this._combined[n].length-1):2097151&l}isCombined(n){return 2097152&this._data[3*n+0]}getString(n){const l=this._data[3*n+0];return 2097152&l?this._combined[n]:2097151&l?(0,_.stringFromCodePoint)(2097151&l):""}isProtected(n){return 536870912&this._data[3*n+2]}loadCell(n,l){return S=3*n,l.content=this._data[S+0],l.fg=this._data[S+1],l.bg=this._data[S+2],2097152&l.content&&(l.combinedData=this._combined[n]),268435456&l.bg&&(l.extended=this._extendedAttrs[n]),l}setCell(n,l){2097152&l.content&&(this._combined[n]=l.combinedData),268435456&l.bg&&(this._extendedAttrs[n]=l.extended),this._data[3*n+0]=l.content,this._data[3*n+1]=l.fg,this._data[3*n+2]=l.bg}setCellFromCodepoint(n,l,o,d){268435456&d.bg&&(this._extendedAttrs[n]=d.extended),this._data[3*n+0]=l|o<<22,this._data[3*n+1]=d.fg,this._data[3*n+2]=d.bg}addCodepointToCell(n,l,o){let d=this._data[3*n+0];2097152&d?this._combined[n]+=(0,_.stringFromCodePoint)(l):2097151&d?(this._combined[n]=(0,_.stringFromCodePoint)(2097151&d)+(0,_.stringFromCodePoint)(l),d&=-2097152,d|=2097152):d=l|4194304,o&&(d&=-12582913,d|=o<<22),this._data[3*n+0]=d}insertCells(n,l,o){if((n%=this.length)&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n-1,0,1,o),l<this.length-n){const d=new f.CellData;for(let p=this.length-n-l-1;p>=0;--p)this.setCell(n+l+p,this.loadCell(n+p,d));for(let p=0;p<l;++p)this.setCell(n+p,o)}else for(let d=n;d<this.length;++d)this.setCell(d,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(n,l,o){if(n%=this.length,l<this.length-n){const d=new f.CellData;for(let p=0;p<this.length-n-l;++p)this.setCell(n+p,this.loadCell(n+l+p,d));for(let p=this.length-l;p<this.length;++p)this.setCell(p,o)}else for(let d=n;d<this.length;++d)this.setCell(d,o);n&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n-1,0,1,o),this.getWidth(n)!==0||this.hasContent(n)||this.setCellFromCodepoint(n,0,1,o)}replaceCells(n,l,o,d=!1){if(d)for(n&&this.getWidth(n-1)===2&&!this.isProtected(n-1)&&this.setCellFromCodepoint(n-1,0,1,o),l<this.length&&this.getWidth(l-1)===2&&!this.isProtected(l)&&this.setCellFromCodepoint(l,0,1,o);n<l&&n<this.length;)this.isProtected(n)||this.setCell(n,o),n++;else for(n&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n-1,0,1,o),l<this.length&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l,0,1,o);n<l&&n<this.length;)this.setCell(n++,o)}resize(n,l){if(n===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*n;if(n>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const d=new Uint32Array(o);d.set(this._data),this._data=d}for(let d=this.length;d<n;++d)this.setCell(d,l)}else{this._data=this._data.subarray(0,o);const d=Object.keys(this._combined);for(let C=0;C<d.length;C++){const y=parseInt(d[C],10);y>=n&&delete this._combined[y]}const p=Object.keys(this._extendedAttrs);for(let C=0;C<p.length;C++){const y=parseInt(p[C],10);y>=n&&delete this._extendedAttrs[y]}}return this.length=n,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const n=new Uint32Array(this._data.length);return n.set(this._data),this._data=n,1}return 0}fill(n,l=!1){if(l)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,n);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,n)}}copyFrom(n){this.length!==n.length?this._data=new Uint32Array(n._data):this._data.set(n._data),this.length=n.length,this._combined={};for(const l in n._combined)this._combined[l]=n._combined[l];this._extendedAttrs={};for(const l in n._extendedAttrs)this._extendedAttrs[l]=n._extendedAttrs[l];this.isWrapped=n.isWrapped}clone(){const n=new E(0);n._data=new Uint32Array(this._data),n.length=this.length;for(const l in this._combined)n._combined[l]=this._combined[l];for(const l in this._extendedAttrs)n._extendedAttrs[l]=this._extendedAttrs[l];return n.isWrapped=this.isWrapped,n}getTrimmedLength(){for(let n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0])return n+(this._data[3*n+0]>>22);return 0}getNoBgTrimmedLength(){for(let n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0]||50331648&this._data[3*n+2])return n+(this._data[3*n+0]>>22);return 0}copyCellsFrom(n,l,o,d,p){const C=n._data;if(p)for(let w=d-1;w>=0;w--){for(let b=0;b<3;b++)this._data[3*(o+w)+b]=C[3*(l+w)+b];268435456&C[3*(l+w)+2]&&(this._extendedAttrs[o+w]=n._extendedAttrs[l+w])}else for(let w=0;w<d;w++){for(let b=0;b<3;b++)this._data[3*(o+w)+b]=C[3*(l+w)+b];268435456&C[3*(l+w)+2]&&(this._extendedAttrs[o+w]=n._extendedAttrs[l+w])}const y=Object.keys(n._combined);for(let w=0;w<y.length;w++){const b=parseInt(y[w],10);b>=l&&(this._combined[b-l+o]=n._combined[b])}}translateToString(n,l,o,d){l=l??0,o=o??this.length,n&&(o=Math.min(o,this.getTrimmedLength())),d&&(d.length=0);let p="";for(;l<o;){const C=this._data[3*l+0],y=2097151&C,w=2097152&C?this._combined[l]:y?(0,_.stringFromCodePoint)(y):h.WHITESPACE_CELL_CHAR;if(p+=w,d)for(let b=0;b<w.length;++b)d.push(l);l+=C>>22||1}return d&&d.push(l),p}}i.BufferLine=E},4841:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(c,u){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 u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(v,i)=>{function c(u,f,h){if(f===u.length-1)return u[f].getTrimmedLength();const _=!u[f].hasContent(h-1)&&u[f].getWidth(h-1)===1,S=u[f+1].getWidth(0)===2;return _&&S?h-1:h}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(u,f,h,_,S){const E=[];for(let g=0;g<u.length-1;g++){let n=g,l=u.get(++n);if(!l.isWrapped)continue;const o=[u.get(g)];for(;n<u.length&&l.isWrapped;)o.push(l),l=u.get(++n);if(_>=g&&_<n){g+=o.length-1;continue}let d=0,p=c(o,d,f),C=1,y=0;for(;C<o.length;){const b=c(o,C,f),k=b-y,R=h-p,L=Math.min(k,R);o[d].copyCellsFrom(o[C],y,p,L,!1),p+=L,p===h&&(d++,p=0),y+=L,y===b&&(C++,y=0),p===0&&d!==0&&o[d-1].getWidth(h-1)===2&&(o[d].copyCellsFrom(o[d-1],h-1,p++,1,!1),o[d-1].setCell(h-1,S))}o[d].replaceCells(p,h,S);let w=0;for(let b=o.length-1;b>0&&(b>d||o[b].getTrimmedLength()===0);b--)w++;w>0&&(E.push(g+o.length-w),E.push(w)),g+=o.length-1}return E},i.reflowLargerCreateNewLayout=function(u,f){const h=[];let _=0,S=f[_],E=0;for(let g=0;g<u.length;g++)if(S===g){const n=f[++_];u.onDeleteEmitter.fire({index:g-E,amount:n}),g+=n-1,E+=n,S=f[++_]}else h.push(g);return{layout:h,countRemoved:E}},i.reflowLargerApplyNewLayout=function(u,f){const h=[];for(let _=0;_<f.length;_++)h.push(u.get(f[_]));for(let _=0;_<h.length;_++)u.set(_,h[_]);u.length=f.length},i.reflowSmallerGetNewLineLengths=function(u,f,h){const _=[],S=u.map(((l,o)=>c(u,o,f))).reduce(((l,o)=>l+o));let E=0,g=0,n=0;for(;n<S;){if(S-n<h){_.push(S-n);break}E+=h;const l=c(u,g,f);E>l&&(E-=l,g++);const o=u[g].getWidth(E-1)===2;o&&E--;const d=o?h-1:h;_.push(d),n+=d}return _},i.getWrappedLineTrimmedLength=c},5295:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;const u=c(8460),f=c(844),h=c(9092);class _ extends f.Disposable{constructor(E,g){super(),this._optionsService=E,this._bufferService=g,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(E,g){this._normal.resize(E,g),this._alt.resize(E,g),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}i.BufferSet=_},511:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const u=c(482),f=c(643),h=c(3734);class _ extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const g=new _;return g.setFromCharData(E),g}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[f.CHAR_DATA_ATTR_INDEX],this.bg=0;let g=!1;if(E[f.CHAR_DATA_CHAR_INDEX].length>2)g=!0;else if(E[f.CHAR_DATA_CHAR_INDEX].length===2){const n=E[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){const l=E[f.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=l&&l<=57343?this.content=1024*(n-55296)+l-56320+65536|E[f.CHAR_DATA_WIDTH_INDEX]<<22:g=!0}else g=!0}else this.content=E[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[f.CHAR_DATA_WIDTH_INDEX]<<22;g&&(this.combinedData=E[f.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[f.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=_},643:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},4863:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;const u=c(8460),f=c(844);class h{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,f.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}i.Marker=h,h._nextId=1},7116:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.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:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(v,i)=>{var c,u,f;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
165
|
+
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(c||(i.C0=c={})),(function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""})(u||(i.C1=u={})),(function(h){h.ST=`${c.ESC}\\`})(f||(i.C1_ESCAPED=f={}))},7399:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;const u=c(2584),f={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:["'",'"']};i.evaluateKeyboardEvent=function(h,_,S,E){const g={type:0,cancel:!1,key:void 0},n=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?g.key=_?u.C0.ESC+"OA":u.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?g.key=_?u.C0.ESC+"OD":u.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?g.key=_?u.C0.ESC+"OC":u.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(g.key=_?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:g.key=h.ctrlKey?"\b":u.C0.DEL,h.altKey&&(g.key=u.C0.ESC+g.key);break;case 9:if(h.shiftKey){g.key=u.C0.ESC+"[Z";break}g.key=u.C0.HT,g.cancel=!0;break;case 13:g.key=h.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,g.cancel=!0;break;case 27:g.key=u.C0.ESC,h.altKey&&(g.key=u.C0.ESC+u.C0.ESC),g.cancel=!0;break;case 37:if(h.metaKey)break;n?(g.key=u.C0.ESC+"[1;"+(n+1)+"D",g.key===u.C0.ESC+"[1;3D"&&(g.key=u.C0.ESC+(S?"b":"[1;5D"))):g.key=_?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(h.metaKey)break;n?(g.key=u.C0.ESC+"[1;"+(n+1)+"C",g.key===u.C0.ESC+"[1;3C"&&(g.key=u.C0.ESC+(S?"f":"[1;5C"))):g.key=_?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(h.metaKey)break;n?(g.key=u.C0.ESC+"[1;"+(n+1)+"A",S||g.key!==u.C0.ESC+"[1;3A"||(g.key=u.C0.ESC+"[1;5A")):g.key=_?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(h.metaKey)break;n?(g.key=u.C0.ESC+"[1;"+(n+1)+"B",S||g.key!==u.C0.ESC+"[1;3B"||(g.key=u.C0.ESC+"[1;5B")):g.key=_?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(g.key=u.C0.ESC+"[2~");break;case 46:g.key=n?u.C0.ESC+"[3;"+(n+1)+"~":u.C0.ESC+"[3~";break;case 36:g.key=n?u.C0.ESC+"[1;"+(n+1)+"H":_?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:g.key=n?u.C0.ESC+"[1;"+(n+1)+"F":_?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:h.shiftKey?g.type=2:h.ctrlKey?g.key=u.C0.ESC+"[5;"+(n+1)+"~":g.key=u.C0.ESC+"[5~";break;case 34:h.shiftKey?g.type=3:h.ctrlKey?g.key=u.C0.ESC+"[6;"+(n+1)+"~":g.key=u.C0.ESC+"[6~";break;case 112:g.key=n?u.C0.ESC+"[1;"+(n+1)+"P":u.C0.ESC+"OP";break;case 113:g.key=n?u.C0.ESC+"[1;"+(n+1)+"Q":u.C0.ESC+"OQ";break;case 114:g.key=n?u.C0.ESC+"[1;"+(n+1)+"R":u.C0.ESC+"OR";break;case 115:g.key=n?u.C0.ESC+"[1;"+(n+1)+"S":u.C0.ESC+"OS";break;case 116:g.key=n?u.C0.ESC+"[15;"+(n+1)+"~":u.C0.ESC+"[15~";break;case 117:g.key=n?u.C0.ESC+"[17;"+(n+1)+"~":u.C0.ESC+"[17~";break;case 118:g.key=n?u.C0.ESC+"[18;"+(n+1)+"~":u.C0.ESC+"[18~";break;case 119:g.key=n?u.C0.ESC+"[19;"+(n+1)+"~":u.C0.ESC+"[19~";break;case 120:g.key=n?u.C0.ESC+"[20;"+(n+1)+"~":u.C0.ESC+"[20~";break;case 121:g.key=n?u.C0.ESC+"[21;"+(n+1)+"~":u.C0.ESC+"[21~";break;case 122:g.key=n?u.C0.ESC+"[23;"+(n+1)+"~":u.C0.ESC+"[23~";break;case 123:g.key=n?u.C0.ESC+"[24;"+(n+1)+"~":u.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(S&&!E||!h.altKey||h.metaKey)!S||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?g.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(g.key=u.C0.US),h.key==="@"&&(g.key=u.C0.NUL)):h.keyCode===65&&(g.type=1);else{const l=f[h.keyCode],o=l==null?void 0:l[h.shiftKey?1:0];if(o)g.key=u.C0.ESC+o;else if(h.keyCode>=65&&h.keyCode<=90){const d=h.ctrlKey?h.keyCode-64:h.keyCode+32;let p=String.fromCharCode(d);h.shiftKey&&(p=p.toUpperCase()),g.key=u.C0.ESC+p}else if(h.keyCode===32)g.key=u.C0.ESC+(h.ctrlKey?u.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let d=h.code.slice(3,4);h.shiftKey||(d=d.toLowerCase()),g.key=u.C0.ESC+d,g.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?g.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?g.key=u.C0.NUL:h.keyCode>=51&&h.keyCode<=55?g.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?g.key=u.C0.DEL:h.keyCode===219?g.key=u.C0.ESC:h.keyCode===220?g.key=u.C0.FS:h.keyCode===221&&(g.key=u.C0.GS)}return g}},482:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},i.utf32ToString=function(c,u=0,f=c.length){let h="";for(let _=u;_<f;++_){let S=c[_];S>65535?(S-=65536,h+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):h+=String.fromCharCode(S)}return h},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const f=c.length;if(!f)return 0;let h=0,_=0;if(this._interim){const S=c.charCodeAt(_++);56320<=S&&S<=57343?u[h++]=1024*(this._interim-55296)+S-56320+65536:(u[h++]=this._interim,u[h++]=S),this._interim=0}for(let S=_;S<f;++S){const E=c.charCodeAt(S);if(55296<=E&&E<=56319){if(++S>=f)return this._interim=E,h;const g=c.charCodeAt(S);56320<=g&&g<=57343?u[h++]=1024*(E-55296)+g-56320+65536:(u[h++]=E,u[h++]=g)}else E!==65279&&(u[h++]=E)}return h}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const f=c.length;if(!f)return 0;let h,_,S,E,g=0,n=0,l=0;if(this.interim[0]){let p=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let y,w=0;for(;(y=63&this.interim[++w])&&w<4;)C<<=6,C|=y;const b=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,k=b-w;for(;l<k;){if(l>=f)return 0;if(y=c[l++],(192&y)!=128){l--,p=!0;break}this.interim[w++]=y,C<<=6,C|=63&y}p||(b===2?C<128?l--:u[g++]=C:b===3?C<2048||C>=55296&&C<=57343||C===65279||(u[g++]=C):C<65536||C>1114111||(u[g++]=C)),this.interim.fill(0)}const o=f-4;let d=l;for(;d<f;){for(;!(!(d<o)||128&(h=c[d])||128&(_=c[d+1])||128&(S=c[d+2])||128&(E=c[d+3]));)u[g++]=h,u[g++]=_,u[g++]=S,u[g++]=E,d+=4;if(h=c[d++],h<128)u[g++]=h;else if((224&h)==192){if(d>=f)return this.interim[0]=h,g;if(_=c[d++],(192&_)!=128){d--;continue}if(n=(31&h)<<6|63&_,n<128){d--;continue}u[g++]=n}else if((240&h)==224){if(d>=f)return this.interim[0]=h,g;if(_=c[d++],(192&_)!=128){d--;continue}if(d>=f)return this.interim[0]=h,this.interim[1]=_,g;if(S=c[d++],(192&S)!=128){d--;continue}if(n=(15&h)<<12|(63&_)<<6|63&S,n<2048||n>=55296&&n<=57343||n===65279)continue;u[g++]=n}else if((248&h)==240){if(d>=f)return this.interim[0]=h,g;if(_=c[d++],(192&_)!=128){d--;continue}if(d>=f)return this.interim[0]=h,this.interim[1]=_,g;if(S=c[d++],(192&S)!=128){d--;continue}if(d>=f)return this.interim[0]=h,this.interim[1]=_,this.interim[2]=S,g;if(E=c[d++],(192&E)!=128){d--;continue}if(n=(7&h)<<18|(63&_)<<12|(63&S)<<6|63&E,n<65536||n>1114111)continue;u[g++]=n}}return g}}},225:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const u=c(1480),f=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let _;i.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 S=0;S<f.length;++S)_.fill(0,f[S][0],f[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?_[S]:(function(E,g){let n,l=0,o=g.length-1;if(E<g[0][0]||E>g[o][1])return!1;for(;o>=l;)if(n=l+o>>1,E>g[n][1])l=n+1;else{if(!(E<g[n][0]))return!0;o=n-1}return!1})(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,E){let g=this.wcwidth(S),n=g===0&&E!==0;if(n){const l=u.UnicodeService.extractWidth(E);l===0?n=!1:l>g&&(g=l)}return u.UnicodeService.createPropertyValue(0,g,n)}}},5981:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;const u=c(8460),f=c(844);class h extends f.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);const n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,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+=S.length,this._writeBuffer.push(S),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(E)}_innerWrite(S=0,E=!0){const g=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const n=this._writeBuffer[this._bufferOffset],l=this._action(n,E);if(l){const d=p=>Date.now()-g>=12?setTimeout((()=>this._innerWrite(0,p))):this._innerWrite(g,p);return void l.catch((p=>(queueMicrotask((()=>{throw p})),Promise.resolve(!1)))).then(d)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=n.length,Date.now()-g>=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()}}i.WriteBuffer=h},5941:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.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})$/,u=/^[\da-f]+$/;function f(h,_){const S=h.toString(16),E=S.length<2?"0"+S:S;switch(_){case 4:return S[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}i.parseColor=function(h){if(!h)return;let _=h.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const S=c.exec(_);if(S){const E=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/E*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/E*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/E*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),u.exec(_)&&[3,6,9,12].includes(_.length))){const S=_.length/3,E=[0,0,0];for(let g=0;g<3;++g){const n=parseInt(_.slice(S*g,S*g+S),16);E[g]=S===1?n<<4:S===2?n:S===3?n>>4:n>>8}return E}},i.toRgbString=function(h,_=16){const[S,E,g]=h;return`rgb:${f(S,_)}/${f(E,_)}/${f(g,_)}`}},5770:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;const u=c(482),f=c(8742),h=c(5770),_=[];i.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,g){this._handlers[E]===void 0&&(this._handlers[E]=[]);const n=this._handlers[E];return n.push(g),{dispose:()=>{const l=n.indexOf(g);l!==-1&&n.splice(l,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,g){if(this.reset(),this._ident=E,this._active=this._handlers[E]||_,this._active.length)for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(g);else this._handlerFb(this._ident,"HOOK",g)}put(E,g,n){if(this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].put(E,g,n);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(E,g,n))}unhook(E,g=!0){if(this._active.length){let n=!1,l=this._active.length-1,o=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,n=g,o=this._stack.fallThrough,this._stack.paused=!1),!o&&n===!1){for(;l>=0&&(n=this._active[l].unhook(E),n!==!0);l--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,n;l--}for(;l>=0;l--)if(n=this._active[l].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,n}else this._handlerFb(this._ident,"UNHOOK",E);this._active=_,this._ident=0}};const S=new f.Params;S.addParam(0),i.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=S,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():S,this._data="",this._hitLimit=!1}put(E,g,n){this._hitLimit||(this._data+=(0,u.utf32ToString)(E,g,n),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let g=!1;if(this._hitLimit)g=!1;else if(E&&(g=this._handler(this._data,this._params),g instanceof Promise))return g.then((n=>(this._params=S,this._data="",this._hitLimit=!1,n)));return this._params=S,this._data="",this._hitLimit=!1,g}}},2015:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;const u=c(844),f=c(8742),h=c(6242),_=c(6351);class S{constructor(l){this.table=new Uint8Array(l)}setDefault(l,o){this.table.fill(l<<4|o)}add(l,o,d,p){this.table[o<<8|l]=d<<4|p}addMany(l,o,d,p){for(let C=0;C<l.length;C++)this.table[o<<8|l[C]]=d<<4|p}}i.TransitionTable=S;const E=160;i.VT500_TRANSITION_TABLE=(function(){const n=new S(4095),l=Array.apply(null,Array(256)).map(((w,b)=>b)),o=(w,b)=>l.slice(w,b),d=o(32,127),p=o(0,24);p.push(25),p.push.apply(p,o(28,32));const C=o(0,14);let y;for(y in n.setDefault(1,0),n.addMany(d,0,2,0),C)n.addMany([24,26,153,154],y,3,0),n.addMany(o(128,144),y,3,0),n.addMany(o(144,152),y,3,0),n.add(156,y,0,0),n.add(27,y,11,1),n.add(157,y,4,8),n.addMany([152,158,159],y,0,7),n.add(155,y,11,3),n.add(144,y,11,9);return n.addMany(p,0,3,0),n.addMany(p,1,3,1),n.add(127,1,0,1),n.addMany(p,8,0,8),n.addMany(p,3,3,3),n.add(127,3,0,3),n.addMany(p,4,3,4),n.add(127,4,0,4),n.addMany(p,6,3,6),n.addMany(p,5,3,5),n.add(127,5,0,5),n.addMany(p,2,3,2),n.add(127,2,0,2),n.add(93,1,4,8),n.addMany(d,8,5,8),n.add(127,8,5,8),n.addMany([156,27,24,26,7],8,6,0),n.addMany(o(28,32),8,0,8),n.addMany([88,94,95],1,0,7),n.addMany(d,7,0,7),n.addMany(p,7,0,7),n.add(156,7,0,0),n.add(127,7,0,7),n.add(91,1,11,3),n.addMany(o(64,127),3,7,0),n.addMany(o(48,60),3,8,4),n.addMany([60,61,62,63],3,9,4),n.addMany(o(48,60),4,8,4),n.addMany(o(64,127),4,7,0),n.addMany([60,61,62,63],4,0,6),n.addMany(o(32,64),6,0,6),n.add(127,6,0,6),n.addMany(o(64,127),6,0,0),n.addMany(o(32,48),3,9,5),n.addMany(o(32,48),5,9,5),n.addMany(o(48,64),5,0,6),n.addMany(o(64,127),5,7,0),n.addMany(o(32,48),4,9,5),n.addMany(o(32,48),1,9,2),n.addMany(o(32,48),2,9,2),n.addMany(o(48,127),2,10,0),n.addMany(o(48,80),1,10,0),n.addMany(o(81,88),1,10,0),n.addMany([89,90,92],1,10,0),n.addMany(o(96,127),1,10,0),n.add(80,1,11,9),n.addMany(p,9,0,9),n.add(127,9,0,9),n.addMany(o(28,32),9,0,9),n.addMany(o(32,48),9,9,12),n.addMany(o(48,60),9,8,10),n.addMany([60,61,62,63],9,9,10),n.addMany(p,11,0,11),n.addMany(o(32,128),11,0,11),n.addMany(o(28,32),11,0,11),n.addMany(p,10,0,10),n.add(127,10,0,10),n.addMany(o(28,32),10,0,10),n.addMany(o(48,60),10,8,10),n.addMany([60,61,62,63],10,0,11),n.addMany(o(32,48),10,9,12),n.addMany(p,12,0,12),n.add(127,12,0,12),n.addMany(o(28,32),12,0,12),n.addMany(o(32,48),12,9,12),n.addMany(o(48,64),12,0,11),n.addMany(o(64,127),12,12,13),n.addMany(o(64,127),10,12,13),n.addMany(o(64,127),9,12,13),n.addMany(p,13,13,13),n.addMany(d,13,13,13),n.add(127,13,0,13),n.addMany([27,156,24,26],13,14,0),n.add(E,0,2,0),n.add(E,8,5,8),n.add(E,6,0,6),n.add(E,11,0,11),n.add(E,13,13,13),n})();class g extends u.Disposable{constructor(l=i.VT500_TRANSITION_TABLE){super(),this._transitions=l,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new f.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,d,p)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,d)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(l,o=[64,126]){let d=0;if(l.prefix){if(l.prefix.length>1)throw new Error("only one byte as prefix supported");if(d=l.prefix.charCodeAt(0),d&&60>d||d>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(l.intermediates){if(l.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<l.intermediates.length;++C){const y=l.intermediates.charCodeAt(C);if(32>y||y>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");d<<=8,d|=y}}if(l.final.length!==1)throw new Error("final must be a single byte");const p=l.final.charCodeAt(0);if(o[0]>p||p>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return d<<=8,d|=p,d}identToString(l){const o=[];for(;l;)o.push(String.fromCharCode(255&l)),l>>=8;return o.reverse().join("")}setPrintHandler(l){this._printHandler=l}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(l,o){const d=this._identifier(l,[48,126]);this._escHandlers[d]===void 0&&(this._escHandlers[d]=[]);const p=this._escHandlers[d];return p.push(o),{dispose:()=>{const C=p.indexOf(o);C!==-1&&p.splice(C,1)}}}clearEscHandler(l){this._escHandlers[this._identifier(l,[48,126])]&&delete this._escHandlers[this._identifier(l,[48,126])]}setEscHandlerFallback(l){this._escHandlerFb=l}setExecuteHandler(l,o){this._executeHandlers[l.charCodeAt(0)]=o}clearExecuteHandler(l){this._executeHandlers[l.charCodeAt(0)]&&delete this._executeHandlers[l.charCodeAt(0)]}setExecuteHandlerFallback(l){this._executeHandlerFb=l}registerCsiHandler(l,o){const d=this._identifier(l);this._csiHandlers[d]===void 0&&(this._csiHandlers[d]=[]);const p=this._csiHandlers[d];return p.push(o),{dispose:()=>{const C=p.indexOf(o);C!==-1&&p.splice(C,1)}}}clearCsiHandler(l){this._csiHandlers[this._identifier(l)]&&delete this._csiHandlers[this._identifier(l)]}setCsiHandlerFallback(l){this._csiHandlerFb=l}registerDcsHandler(l,o){return this._dcsParser.registerHandler(this._identifier(l),o)}clearDcsHandler(l){this._dcsParser.clearHandler(this._identifier(l))}setDcsHandlerFallback(l){this._dcsParser.setHandlerFallback(l)}registerOscHandler(l,o){return this._oscParser.registerHandler(l,o)}clearOscHandler(l){this._oscParser.clearHandler(l)}setOscHandlerFallback(l){this._oscParser.setHandlerFallback(l)}setErrorHandler(l){this._errorHandler=l}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(l,o,d,p,C){this._parseStack.state=l,this._parseStack.handlers=o,this._parseStack.handlerPos=d,this._parseStack.transition=p,this._parseStack.chunkPos=C}parse(l,o,d){let p,C=0,y=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(d===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const b=this._parseStack.handlers;let k=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(d===!1&&k>-1){for(;k>=0&&(p=b[k](this._params),p!==!0);k--)if(p instanceof Promise)return this._parseStack.handlerPos=k,p}this._parseStack.handlers=[];break;case 4:if(d===!1&&k>-1){for(;k>=0&&(p=b[k](),p!==!0);k--)if(p instanceof Promise)return this._parseStack.handlerPos=k,p}this._parseStack.handlers=[];break;case 6:if(C=l[this._parseStack.chunkPos],p=this._dcsParser.unhook(C!==24&&C!==26,d),p)return p;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=l[this._parseStack.chunkPos],p=this._oscParser.end(C!==24&&C!==26,d),p)return p;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let b=w;b<o;++b){switch(C=l[b],y=this._transitions.table[this.currentState<<8|(C<160?C:E)],y>>4){case 2:for(let A=b+1;;++A){if(A>=o||(C=l[A])<32||C>126&&C<E){this._printHandler(l,b,A),b=A-1;break}if(++A>=o||(C=l[A])<32||C>126&&C<E){this._printHandler(l,b,A),b=A-1;break}if(++A>=o||(C=l[A])<32||C>126&&C<E){this._printHandler(l,b,A),b=A-1;break}if(++A>=o||(C=l[A])<32||C>126&&C<E){this._printHandler(l,b,A),b=A-1;break}}break;case 3:this._executeHandlers[C]?this._executeHandlers[C]():this._executeHandlerFb(C),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:b,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const k=this._csiHandlers[this._collect<<8|C];let R=k?k.length-1:-1;for(;R>=0&&(p=k[R](this._params),p!==!0);R--)if(p instanceof Promise)return this._preserveStack(3,k,R,y,b),p;R<0&&this._csiHandlerFb(this._collect<<8|C,this._params),this.precedingJoinState=0;break;case 8:do switch(C){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(C-48)}while(++b<o&&(C=l[b])>47&&C<60);b--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const L=this._escHandlers[this._collect<<8|C];let T=L?L.length-1:-1;for(;T>=0&&(p=L[T](),p!==!0);T--)if(p instanceof Promise)return this._preserveStack(4,L,T,y,b),p;T<0&&this._escHandlerFb(this._collect<<8|C),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|C,this._params);break;case 13:for(let A=b+1;;++A)if(A>=o||(C=l[A])===24||C===26||C===27||C>127&&C<E){this._dcsParser.put(l,b,A),b=A-1;break}break;case 14:if(p=this._dcsParser.unhook(C!==24&&C!==26),p)return this._preserveStack(6,[],0,y,b),p;C===27&&(y|=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 A=b+1;;A++)if(A>=o||(C=l[A])<32||C>127&&C<E){this._oscParser.put(l,b,A),b=A-1;break}break;case 6:if(p=this._oscParser.end(C!==24&&C!==26),p)return this._preserveStack(5,[],0,y,b),p;C===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&y}}}i.EscapeSequenceParser=g},6242:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;const u=c(5770),f=c(482),h=[];i.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(_,S){this._handlers[_]===void 0&&(this._handlers[_]=[]);const E=this._handlers[_];return E.push(S),{dispose:()=>{const g=E.indexOf(S);g!==-1&&E.splice(g,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}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=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,S,E){if(this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].put(_,S,E);else this._handlerFb(this._id,"PUT",(0,f.utf32ToString)(_,S,E))}start(){this.reset(),this._state=1}put(_,S,E){if(this._state!==3){if(this._state===1)for(;S<E;){const g=_[S++];if(g===59){this._state=2,this._start();break}if(g<48||57<g)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+g-48}this._state===2&&E-S>0&&this._put(_,S,E)}}end(_,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,g=this._active.length-1,n=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,E=S,n=this._stack.fallThrough,this._stack.paused=!1),!n&&E===!1){for(;g>=0&&(E=this._active[g].end(_),E!==!0);g--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,E;g--}for(;g>=0;g--)if(E=this._active[g].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",_);this._active=h,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,S,E){this._hitLimit||(this._data+=(0,f.utf32ToString)(_,S,E),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let S=!1;if(this._hitLimit)S=!1;else if(_&&(S=this._handler(this._data),S instanceof Promise))return S.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,S}}},8742:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;const c=2147483647;class u{static fromArray(h){const _=new u;if(!h.length)return _;for(let S=Array.isArray(h[0])?1:0;S<h.length;++S){const E=h[S];if(Array.isArray(E))for(let g=0;g<E.length;++g)_.addSubParam(E[g]);else _.addParam(E)}return _}constructor(h=32,_=32){if(this.maxLength=h,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new u(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let _=0;_<this.length;++_){h.push(this.params[_]);const S=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-S>0&&h.push(Array.prototype.slice.call(this._subParams,S,E))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>c?c:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>c?c:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const _=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-_>0?this._subParams.subarray(_,S):null}getSubParamsAll(){const h={};for(let _=0;_<this.length;++_){const S=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-S>0&&(h[_]=this._subParams.slice(S,E))}return h}addDigit(h){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,E=S[_-1];S[_-1]=~E?Math.min(10*E+h,c):h}}i.Params=u},5741:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0,i.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const f={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(f),u.dispose=()=>this._wrappedAddonDispose(f),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let f=0;f<this._addons.length;f++)if(this._addons[f]===c){u=f;break}if(u===-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(u,1)}}},8771:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;const u=c(3785),f=c(511);i.BufferApiView=class{constructor(h,_){this._buffer=h,this.type=_}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const _=this._buffer.lines.get(h);if(_)return new u.BufferLineApiView(_)}getNullCell(){return new f.CellData}}},3785:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;const u=c(511);i.BufferLineApiView=class{constructor(f){this._line=f}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(f,h){if(!(f<0||f>=this._line.length))return h?(this._line.loadCell(f,h),h):this._line.loadCell(f,new u.CellData)}translateToString(f,h,_){return this._line.translateToString(f,h,_)}}},8285:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;const u=c(8771),f=c(8460),h=c(844);class _ extends h.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new f.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.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)}}i.BufferNamespaceApi=_},7975:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(f=>u(f.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((f,h)=>u(f,h.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0,i.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(v,i,c){var u=this&&this.__decorate||function(n,l,o,d){var p,C=arguments.length,y=C<3?l:d===null?d=Object.getOwnPropertyDescriptor(l,o):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(n,l,o,d);else for(var w=n.length-1;w>=0;w--)(p=n[w])&&(y=(C<3?p(y):C>3?p(l,o,y):p(l,o))||y);return C>3&&y&&Object.defineProperty(l,o,y),y},f=this&&this.__param||function(n,l){return function(o,d){l(o,d,n)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;const h=c(8460),_=c(844),S=c(5295),E=c(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let g=i.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(n){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(n.rawOptions.cols||0,i.MINIMUM_COLS),this.rows=Math.max(n.rawOptions.rows||0,i.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(n,this))}resize(n,l){this.cols=n,this.rows=l,this.buffers.resize(n,l),this._onResize.fire({cols:n,rows:l})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(n,l=!1){const o=this.buffer;let d;d=this._cachedBlankLine,d&&d.length===this.cols&&d.getFg(0)===n.fg&&d.getBg(0)===n.bg||(d=o.getBlankLine(n,l),this._cachedBlankLine=d),d.isWrapped=l;const p=o.ybase+o.scrollTop,C=o.ybase+o.scrollBottom;if(o.scrollTop===0){const y=o.lines.isFull;C===o.lines.length-1?y?o.lines.recycle().copyFrom(d):o.lines.push(d.clone()):o.lines.splice(C+1,0,d.clone()),y?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const y=C-p+1;o.lines.shiftElements(p+1,y-1,-1),o.lines.set(C,d.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(n,l,o){const d=this.buffer;if(n<0){if(d.ydisp===0)return;this.isUserScrolling=!0}else n+d.ydisp>=d.ybase&&(this.isUserScrolling=!1);const p=d.ydisp;d.ydisp=Math.max(Math.min(d.ydisp+n,d.ybase),0),p!==d.ydisp&&(l||this._onScroll.fire(d.ydisp))}};i.BufferService=g=u([f(0,E.IOptionsService)],g)},7994:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0,i.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,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(v,i,c){var u=this&&this.__decorate||function(d,p,C,y){var w,b=arguments.length,k=b<3?p:y===null?y=Object.getOwnPropertyDescriptor(p,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(d,p,C,y);else for(var R=d.length-1;R>=0;R--)(w=d[R])&&(k=(b<3?w(k):b>3?w(p,C,k):w(p,C))||k);return b>3&&k&&Object.defineProperty(p,C,k),k},f=this&&this.__param||function(d,p){return function(C,y){p(C,y,d)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;const h=c(2585),_=c(8460),S=c(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:d=>d.button!==4&&d.action===1&&(d.ctrl=!1,d.alt=!1,d.shift=!1,!0)},VT200:{events:19,restrict:d=>d.action!==32},DRAG:{events:23,restrict:d=>d.action!==32||d.button!==3},ANY:{events:31,restrict:d=>!0}};function g(d,p){let C=(d.ctrl?16:0)|(d.shift?4:0)|(d.alt?8:0);return d.button===4?(C|=64,C|=d.action):(C|=3&d.button,4&d.button&&(C|=64),8&d.button&&(C|=128),d.action===32?C|=32:d.action!==0||p||(C|=3)),C}const n=String.fromCharCode,l={DEFAULT:d=>{const p=[g(d,!1)+32,d.col+32,d.row+32];return p[0]>255||p[1]>255||p[2]>255?"":`\x1B[M${n(p[0])}${n(p[1])}${n(p[2])}`},SGR:d=>{const p=d.action===0&&d.button!==4?"m":"M";return`\x1B[<${g(d,!0)};${d.col};${d.row}${p}`},SGR_PIXELS:d=>{const p=d.action===0&&d.button!==4?"m":"M";return`\x1B[<${g(d,!0)};${d.x};${d.y}${p}`}};let o=i.CoreMouseService=class extends S.Disposable{constructor(d,p){super(),this._bufferService=d,this._coreService=p,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(E))this.addProtocol(C,E[C]);for(const C of Object.keys(l))this.addEncoding(C,l[C]);this.reset()}addProtocol(d,p){this._protocols[d]=p}addEncoding(d,p){this._encodings[d]=p}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(d){if(!this._protocols[d])throw new Error(`unknown protocol "${d}"`);this._activeProtocol=d,this._onProtocolChange.fire(this._protocols[d].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(d){if(!this._encodings[d])throw new Error(`unknown encoding "${d}"`);this._activeEncoding=d}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(d){if(d.col<0||d.col>=this._bufferService.cols||d.row<0||d.row>=this._bufferService.rows||d.button===4&&d.action===32||d.button===3&&d.action!==32||d.button!==4&&(d.action===2||d.action===3)||(d.col++,d.row++,d.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,d,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(d))return!1;const p=this._encodings[this._activeEncoding](d);return p&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(p):this._coreService.triggerDataEvent(p,!0)),this._lastEvent=d,!0}explainEvents(d){return{down:!!(1&d),up:!!(2&d),drag:!!(4&d),move:!!(8&d),wheel:!!(16&d)}}_equalEvents(d,p,C){if(C){if(d.x!==p.x||d.y!==p.y)return!1}else if(d.col!==p.col||d.row!==p.row)return!1;return d.button===p.button&&d.action===p.action&&d.ctrl===p.ctrl&&d.alt===p.alt&&d.shift===p.shift}};i.CoreMouseService=o=u([f(0,h.IBufferService),f(1,h.ICoreService)],o)},6975:function(v,i,c){var u=this&&this.__decorate||function(o,d,p,C){var y,w=arguments.length,b=w<3?d:C===null?C=Object.getOwnPropertyDescriptor(d,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(o,d,p,C);else for(var k=o.length-1;k>=0;k--)(y=o[k])&&(b=(w<3?y(b):w>3?y(d,p,b):y(d,p))||b);return w>3&&b&&Object.defineProperty(d,p,b),b},f=this&&this.__param||function(o,d){return function(p,C){d(p,C,o)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;const h=c(1439),_=c(8460),S=c(844),E=c(2585),g=Object.freeze({insertMode:!1}),n=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let l=i.CoreService=class extends S.Disposable{constructor(o,d,p){super(),this._bufferService=o,this._logService=d,this._optionsService=p,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,h.clone)(g),this.decPrivateModes=(0,h.clone)(n)}reset(){this.modes=(0,h.clone)(g),this.decPrivateModes=(0,h.clone)(n)}triggerDataEvent(o,d=!1){if(this._optionsService.rawOptions.disableStdin)return;const p=this._bufferService.buffer;d&&this._optionsService.rawOptions.scrollOnUserInput&&p.ybase!==p.ydisp&&this._onRequestScrollToBottom.fire(),d&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((d=>d.charCodeAt(0))))),this._onBinary.fire(o))}};i.CoreService=l=u([f(0,E.IBufferService),f(1,E.ILogService),f(2,E.IOptionsService)],l)},9074:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;const u=c(8055),f=c(8460),h=c(844),_=c(6106);let S=0,E=0;class g extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new f.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new f.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const d=new n(o);if(d){const p=d.marker.onDispose((()=>d.dispose()));d.onDispose((()=>{d&&(this._decorations.delete(d)&&this._onDecorationRemoved.fire(d),p.dispose())})),this._decorations.insert(d),this._onDecorationRegistered.fire(d)}return d}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,d,p){let C=0,y=0;for(const w of this._decorations.getKeyIterator(d))C=w.options.x??0,y=C+(w.options.width??1),o>=C&&o<y&&(!p||(w.options.layer??"bottom")===p)&&(yield w)}forEachDecorationAtCell(o,d,p,C){this._decorations.forEachByKey(d,(y=>{S=y.options.x??0,E=S+(y.options.width??1),o>=S&&o<E&&(!p||(y.options.layer??"bottom")===p)&&C(y)}))}}i.DecorationService=g;class n extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=u.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=u.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new f.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.InstantiationService=i.ServiceCollection=void 0;const u=c(2585),f=c(8343);class h{constructor(...S){this._entries=new Map;for(const[E,g]of S)this.set(E,g)}set(S,E){const g=this._entries.get(S);return this._entries.set(S,E),g}forEach(S){for(const[E,g]of this._entries.entries())S(E,g)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}i.ServiceCollection=h,i.InstantiationService=class{constructor(){this._services=new h,this._services.set(u.IInstantiationService,this)}setService(_,S){this._services.set(_,S)}getService(_){return this._services.get(_)}createInstance(_,...S){const E=(0,f.getServiceDependencies)(_).sort(((l,o)=>l.index-o.index)),g=[];for(const l of E){const o=this._services.get(l.id);if(!o)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${l.id}.`);g.push(o)}const n=E.length>0?E[0].index:S.length;if(S.length!==n)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${n+1} conflicts with ${S.length} static arguments`);return new _(...S,...g)}}},7866:function(v,i,c){var u=this&&this.__decorate||function(n,l,o,d){var p,C=arguments.length,y=C<3?l:d===null?d=Object.getOwnPropertyDescriptor(l,o):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(n,l,o,d);else for(var w=n.length-1;w>=0;w--)(p=n[w])&&(y=(C<3?p(y):C>3?p(l,o,y):p(l,o))||y);return C>3&&y&&Object.defineProperty(l,o,y),y},f=this&&this.__param||function(n,l){return function(o,d){l(o,d,n)}};Object.defineProperty(i,"__esModule",{value:!0}),i.traceCall=i.setTraceLogger=i.LogService=void 0;const h=c(844),_=c(2585),S={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let E,g=i.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(n){super(),this._optionsService=n,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(n){for(let l=0;l<n.length;l++)typeof n[l]=="function"&&(n[l]=n[l]())}_log(n,l,o){this._evalLazyOptionalParams(o),n.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+l,...o)}trace(n,...l){var o;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,n,l)}debug(n,...l){var o;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,n,l)}info(n,...l){var o;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,n,l)}warn(n,...l){var o;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,n,l)}error(n,...l){var o;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,n,l)}};i.LogService=g=u([f(0,_.IOptionsService)],g),i.setTraceLogger=function(n){E=n},i.traceCall=function(n,l,o){if(typeof o.value!="function")throw new Error("not supported");const d=o.value;o.value=function(...p){if(E.logLevel!==_.LogLevelEnum.TRACE)return d.apply(this,p);E.trace(`GlyphRenderer#${d.name}(${p.map((y=>JSON.stringify(y))).join(", ")})`);const C=d.apply(this,p);return E.trace(`GlyphRenderer#${d.name} return`,C),C}}},7302:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OptionsService=i.DEFAULT_OPTIONS=void 0;const u=c(8460),f=c(844),h=c(6114);i.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const _=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends f.Disposable{constructor(g){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const n={...i.DEFAULT_OPTIONS};for(const l in g)if(l in n)try{const o=g[l];n[l]=this._sanitizeAndValidateOption(l,o)}catch(o){console.error(o)}this.rawOptions=n,this.options={...n},this._setupOptions(),this.register((0,f.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(g,n){return this.onOptionChange((l=>{l===g&&n(this.rawOptions[g])}))}onMultipleOptionChange(g,n){return this.onOptionChange((l=>{g.indexOf(l)!==-1&&n()}))}_setupOptions(){const g=l=>{if(!(l in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);return this.rawOptions[l]},n=(l,o)=>{if(!(l in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);o=this._sanitizeAndValidateOption(l,o),this.rawOptions[l]!==o&&(this.rawOptions[l]=o,this._onOptionChange.fire(l))};for(const l in this.rawOptions){const o={get:g.bind(this,l),set:n.bind(this,l)};Object.defineProperty(this.options,l,o)}}_sanitizeAndValidateOption(g,n){switch(g){case"cursorStyle":if(n||(n=i.DEFAULT_OPTIONS[g]),!(function(l){return l==="block"||l==="underline"||l==="bar"})(n))throw new Error(`"${n}" is not a valid value for ${g}`);break;case"wordSeparator":n||(n=i.DEFAULT_OPTIONS[g]);break;case"fontWeight":case"fontWeightBold":if(typeof n=="number"&&1<=n&&n<=1e3)break;n=_.includes(n)?n:i.DEFAULT_OPTIONS[g];break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(`${g} cannot be less than 1, value: ${n}`);break;case"minimumContrastRatio":n=Math.max(1,Math.min(21,Math.round(10*n)/10));break;case"scrollback":if((n=Math.min(n,4294967295))<0)throw new Error(`${g} cannot be less than 0, value: ${n}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(`${g} cannot be less than or equal to 0, value: ${n}`);break;case"rows":case"cols":if(!n&&n!==0)throw new Error(`${g} must be numeric, value: ${n}`);break;case"windowsPty":n=n??{}}return n}}i.OptionsService=S},2660:function(v,i,c){var u=this&&this.__decorate||function(S,E,g,n){var l,o=arguments.length,d=o<3?E:n===null?n=Object.getOwnPropertyDescriptor(E,g):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(S,E,g,n);else for(var p=S.length-1;p>=0;p--)(l=S[p])&&(d=(o<3?l(d):o>3?l(E,g,d):l(E,g))||d);return o>3&&d&&Object.defineProperty(E,g,d),d},f=this&&this.__param||function(S,E){return function(g,n){E(g,n,S)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;const h=c(2585);let _=i.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const E=this._bufferService.buffer;if(S.id===void 0){const p=E.addMarker(E.ybase+E.y),C={data:S,id:this._nextId++,lines:[p]};return p.onDispose((()=>this._removeMarkerFromLink(C,p))),this._dataByLinkId.set(C.id,C),C.id}const g=S,n=this._getEntryIdKey(g),l=this._entriesWithId.get(n);if(l)return this.addLineToLink(l.id,E.ybase+E.y),l.id;const o=E.addMarker(E.ybase+E.y),d={id:this._nextId++,key:this._getEntryIdKey(g),data:g,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(d,o))),this._entriesWithId.set(d.key,d),this._dataByLinkId.set(d.id,d),d.id}addLineToLink(S,E){const g=this._dataByLinkId.get(S);if(g&&g.lines.every((n=>n.line!==E))){const n=this._bufferService.buffer.addMarker(E);g.lines.push(n),n.onDispose((()=>this._removeMarkerFromLink(g,n)))}}getLinkData(S){var E;return(E=this._dataByLinkId.get(S))==null?void 0:E.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,E){const g=S.lines.indexOf(E);g!==-1&&(S.lines.splice(g,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};i.OscLinkService=_=u([f(0,h.IBufferService)],_)},8343:(v,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const c="di$target",u="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(f){return f[u]||[]},i.createDecorator=function(f){if(i.serviceRegistry.has(f))return i.serviceRegistry.get(f);const h=function(_,S,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,n,l){n[c]===n?n[u].push({id:g,index:l}):(n[u]=[{id:g,index:l}],n[c]=n)})(h,_,E)};return h.toString=()=>f,i.serviceRegistry.set(f,h),h}},2585:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const u=c(8343);var f;i.IBufferService=(0,u.createDecorator)("BufferService"),i.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),i.ICoreService=(0,u.createDecorator)("CoreService"),i.ICharsetService=(0,u.createDecorator)("CharsetService"),i.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(f||(i.LogLevelEnum=f={})),i.ILogService=(0,u.createDecorator)("LogService"),i.IOptionsService=(0,u.createDecorator)("OptionsService"),i.IOscLinkService=(0,u.createDecorator)("OscLinkService"),i.IUnicodeService=(0,u.createDecorator)("UnicodeService"),i.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(v,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const u=c(8460),f=c(225);class h{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,E,g=!1){return(16777215&S)<<3|(3&E)<<1|(g?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const S=new f.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let E=0,g=0;const n=S.length;for(let l=0;l<n;++l){let o=S.charCodeAt(l);if(55296<=o&&o<=56319){if(++l>=n)return E+this.wcwidth(o);const C=S.charCodeAt(l);56320<=C&&C<=57343?o=1024*(o-55296)+C-56320+65536:E+=this.wcwidth(C)}const d=this.charProperties(o,g);let p=h.extractWidth(d);h.extractShouldJoin(d)&&(p-=h.extractWidth(g)),E+=p,g=d}return E}charProperties(S,E){return this._activeProvider.charProperties(S,E)}}i.UnicodeService=h}},s={};function a(v){var i=s[v];if(i!==void 0)return i.exports;var c=s[v]={exports:{}};return r[v].call(c.exports,c,c.exports,a),c.exports}var m={};return(()=>{var v=m;Object.defineProperty(v,"__esModule",{value:!0}),v.Terminal=void 0;const i=a(9042),c=a(3236),u=a(844),f=a(5741),h=a(8285),_=a(7975),S=a(7090),E=["cols","rows"];class g extends u.Disposable{constructor(l){super(),this._core=this.register(new c.Terminal(l)),this._addonManager=this.register(new f.AddonManager),this._publicOptions={...this._core.options};const o=p=>this._core.options[p],d=(p,C)=>{this._checkReadonlyOptions(p),this._core.options[p]=C};for(const p in this._core.options){const C={get:o.bind(this,p),set:d.bind(this,p)};Object.defineProperty(this._publicOptions,p,C)}}_checkReadonlyOptions(l){if(E.includes(l))throw new Error(`Option "${l}" 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 S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const l=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:l.applicationCursorKeys,applicationKeypadMode:l.applicationKeypad,bracketedPasteMode:l.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:l.origin,reverseWraparoundMode:l.reverseWraparound,sendFocusMode:l.sendFocus,wraparoundMode:l.wraparound}}get options(){return this._publicOptions}set options(l){for(const o in l)this._publicOptions[o]=l[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(l,o=!0){this._core.input(l,o)}resize(l,o){this._verifyIntegers(l,o),this._core.resize(l,o)}open(l){this._core.open(l)}attachCustomKeyEventHandler(l){this._core.attachCustomKeyEventHandler(l)}attachCustomWheelEventHandler(l){this._core.attachCustomWheelEventHandler(l)}registerLinkProvider(l){return this._core.registerLinkProvider(l)}registerCharacterJoiner(l){return this._checkProposedApi(),this._core.registerCharacterJoiner(l)}deregisterCharacterJoiner(l){this._checkProposedApi(),this._core.deregisterCharacterJoiner(l)}registerMarker(l=0){return this._verifyIntegers(l),this._core.registerMarker(l)}registerDecoration(l){return this._checkProposedApi(),this._verifyPositiveIntegers(l.x??0,l.width??0,l.height??0),this._core.registerDecoration(l)}hasSelection(){return this._core.hasSelection()}select(l,o,d){this._verifyIntegers(l,o,d),this._core.select(l,o,d)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(l,o){this._verifyIntegers(l,o),this._core.selectLines(l,o)}dispose(){super.dispose()}scrollLines(l){this._verifyIntegers(l),this._core.scrollLines(l)}scrollPages(l){this._verifyIntegers(l),this._core.scrollPages(l)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(l){this._verifyIntegers(l),this._core.scrollToLine(l)}clear(){this._core.clear()}write(l,o){this._core.write(l,o)}writeln(l,o){this._core.write(l),this._core.write(`\r
|
|
166
|
+
`,o)}paste(l){this._core.paste(l)}refresh(l,o){this._verifyIntegers(l,o),this._core.refresh(l,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(l){this._addonManager.loadAddon(this,l)}static get strings(){return i}_verifyIntegers(...l){for(const o of l)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...l){for(const o of l)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}v.Terminal=g})(),m})()))})(Xr)),Xr.exports}var vc=_c();/**
|
|
153
167
|
* @license
|
|
154
168
|
* Copyright 2021 Google LLC
|
|
155
169
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
156
|
-
*/function
|
|
157
|
-
|
|
158
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=l.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,a){this._liveRegionDebouncer.refresh(o,a,this._terminal.rows)}_renderRows(o,a){const u=this._terminal.buffer,S=u.lines.length.toString();for(let m=o;m<=a;m++){const y=u.lines.get(u.ydisp+m),p=[],k=(y==null?void 0:y.translateToString(!0,void 0,void 0,p))||"",x=(u.ydisp+m+1).toString(),L=this._rowElements[m];L&&(k.length===0?(L.innerText=" ",this._rowColumns.set(L,[0,1])):(L.textContent=k,this._rowColumns.set(L,p)),L.setAttribute("aria-posinset",x),L.setAttribute("aria-setsize",S))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,a){const u=o.target,S=this._rowElements[a===0?1:this._rowElements.length-2];if(u.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==S)return;let m,y;if(a===0?(m=u,y=this._rowElements.pop(),this._rowContainer.removeChild(y)):(m=this._rowElements.shift(),y=u,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),y.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var k;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let a={node:o.anchorNode,offset:o.anchorOffset},u={node:o.focusNode,offset:o.focusOffset};if((a.node.compareDocumentPosition(u.node)&Node.DOCUMENT_POSITION_PRECEDING||a.node===u.node&&a.offset>u.offset)&&([a,u]=[u,a]),a.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(a={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(a.node))return;const S=this._rowElements.slice(-1)[0];if(u.node.compareDocumentPosition(S)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(u={node:S,offset:((k=S.textContent)==null?void 0:k.length)??0}),!this._rowContainer.contains(u.node))return;const m=({node:x,offset:L})=>{const T=x instanceof Text?x.parentNode:x;let R=parseInt(T==null?void 0:T.getAttribute("aria-posinset"),10)-1;if(isNaN(R))return console.warn("row is invalid. Race condition?"),null;const M=this._rowColumns.get(T);if(!M)return console.warn("columns is null. Race condition?"),null;let F=L<M.length?M[L]:M.slice(-1)[0]+1;return F>=this._terminal.cols&&(++R,F=0),{row:R,column:F}},y=m(a),p=m(u);if(y&&p){if(y.row>p.row||y.row===p.row&&y.column>=p.column)throw new Error("invalid range");this._terminal.select(y.column,y.row,(p.row-y.row)*this._terminal.cols-y.column+p.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_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 o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};i.AccessibilityManager=n=d([v(1,f.IInstantiationService),v(2,w.ICoreBrowserService),v(3,w.IRenderService)],n)},3614:(C,i)=>{function c(_){return _.replace(/\r?\n/g,"\r")}function d(_,b){return b?"\x1B[200~"+_+"\x1B[201~":_}function v(_,b,w,f){_=d(_=c(_),w.decPrivateModes.bracketedPasteMode&&f.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(_,!0),b.value=""}function l(_,b,w){const f=w.getBoundingClientRect(),s=_.clientX-f.left-10,n=_.clientY-f.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${s}px`,b.style.top=`${n}px`,b.style.zIndex="1000",b.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=c,i.bracketTextForPaste=d,i.copyHandler=function(_,b){_.clipboardData&&_.clipboardData.setData("text/plain",b.selectionText),_.preventDefault()},i.handlePasteEvent=function(_,b,w,f){_.stopPropagation(),_.clipboardData&&v(_.clipboardData.getData("text/plain"),b,w,f)},i.paste=v,i.moveTextAreaUnderMouseCursor=l,i.rightClickHandler=function(_,b,w,f,s){l(_,b,w),s&&f.rightClickSelect(_),b.value=f.selectionText,b.select()}},7239:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const d=c(1505);i.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(v,l,_){this._css.set(v,l,_)}getCss(v,l){return this._css.get(v,l)}setColor(v,l,_){this._color.set(v,l,_)}getColor(v,l){return this._color.get(v,l)}clear(){this._color.clear(),this._css.clear()}}},3656:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(c,d,v,l){c.addEventListener(d,v,l);let _=!1;return{dispose:()=>{_||(_=!0,c.removeEventListener(d,v,l))}}}},3551:function(C,i,c){var d=this&&this.__decorate||function(n,o,a,u){var S,m=arguments.length,y=m<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(n,o,a,u);else for(var p=n.length-1;p>=0;p--)(S=n[p])&&(y=(m<3?S(y):m>3?S(o,a,y):S(o,a))||y);return m>3&&y&&Object.defineProperty(o,a,y),y},v=this&&this.__param||function(n,o){return function(a,u){o(a,u,n)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier=void 0;const l=c(3656),_=c(8460),b=c(844),w=c(2585),f=c(4725);let s=i.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(n,o,a,u,S){super(),this._element=n,this._mouseService=o,this._renderService=a,this._bufferService=u,this._linkProviderService=S,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,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.toDisposable)((()=>{var m;this._lastMouseEvent=void 0,(m=this._activeProviderReplies)==null||m.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,l.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,l.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(n){this._lastMouseEvent=n;const o=this._positionFromMouseEvent(n,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const a=n.composedPath();for(let u=0;u<a.length;u++){const S=a[u];if(S.classList.contains("xterm"))break;if(S.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(n){if(this._activeLine!==n.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(n,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,n)||(this._clearCurrentLink(),this._askForLink(n,!0))}_askForLink(n,o){var u,S;this._activeProviderReplies&&o||((u=this._activeProviderReplies)==null||u.forEach((m=>{m==null||m.forEach((y=>{y.link.dispose&&y.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=n.y);let a=!1;for(const[m,y]of this._linkProviderService.linkProviders.entries())o?(S=this._activeProviderReplies)!=null&&S.get(m)&&(a=this._checkLinkProviderResult(m,n,a)):y.provideLinks(n.y,(p=>{var x,L;if(this._isMouseOut)return;const k=p==null?void 0:p.map((T=>({link:T})));(x=this._activeProviderReplies)==null||x.set(m,k),a=this._checkLinkProviderResult(m,n,a),((L=this._activeProviderReplies)==null?void 0:L.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(n.y,this._activeProviderReplies)}))}_removeIntersectingLinks(n,o){const a=new Set;for(let u=0;u<o.size;u++){const S=o.get(u);if(S)for(let m=0;m<S.length;m++){const y=S[m],p=y.link.range.start.y<n?0:y.link.range.start.x,k=y.link.range.end.y>n?this._bufferService.cols:y.link.range.end.x;for(let x=p;x<=k;x++){if(a.has(x)){S.splice(m--,1);break}a.add(x)}}}}_checkLinkProviderResult(n,o,a){var m;if(!this._activeProviderReplies)return a;const u=this._activeProviderReplies.get(n);let S=!1;for(let y=0;y<n;y++)this._activeProviderReplies.has(y)&&!this._activeProviderReplies.get(y)||(S=!0);if(!S&&u){const y=u.find((p=>this._linkAtPosition(p.link,o)));y&&(a=!0,this._handleNewLink(y))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!a)for(let y=0;y<this._activeProviderReplies.size;y++){const p=(m=this._activeProviderReplies.get(y))==null?void 0:m.find((k=>this._linkAtPosition(k.link,o)));if(p){a=!0,this._handleNewLink(p);break}}return a}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(n){if(!this._currentLink)return;const o=this._positionFromMouseEvent(n,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(n,this._currentLink.link.text)}_clearCurrentLink(n,o){this._currentLink&&this._lastMouseEvent&&(!n||!o||this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,b.disposeArray)(this._linkCacheDisposables))}_handleNewLink(n){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(n.link,o)&&(this._currentLink=n,this._currentLink.state={decorations:{underline:n.link.decorations===void 0||n.link.decorations.underline,pointerCursor:n.link.decorations===void 0||n.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,n.link,this._lastMouseEvent),n.link.decorations={},Object.defineProperties(n.link.decorations,{pointerCursor:{get:()=>{var a,u;return(u=(a=this._currentLink)==null?void 0:a.state)==null?void 0:u.decorations.pointerCursor},set:a=>{var u;(u=this._currentLink)!=null&&u.state&&this._currentLink.state.decorations.pointerCursor!==a&&(this._currentLink.state.decorations.pointerCursor=a,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",a))}},underline:{get:()=>{var a,u;return(u=(a=this._currentLink)==null?void 0:a.state)==null?void 0:u.decorations.underline},set:a=>{var u,S,m;(u=this._currentLink)!=null&&u.state&&((m=(S=this._currentLink)==null?void 0:S.state)==null?void 0:m.decorations.underline)!==a&&(this._currentLink.state.decorations.underline=a,this._currentLink.state.isHovered&&this._fireUnderlineEvent(n.link,a))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((a=>{if(!this._currentLink)return;const u=a.start===0?0:a.start+1+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.ydisp+1+a.end;if(this._currentLink.link.range.start.y>=u&&this._currentLink.link.range.end.y<=S&&(this._clearCurrentLink(u,S),this._lastMouseEvent)){const m=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);m&&this._askForLink(m,!1)}}))))}_linkHover(n,o,a){var u;(u=this._currentLink)!=null&&u.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&n.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(a,o.text)}_fireUnderlineEvent(n,o){const a=n.range,u=this._bufferService.buffer.ydisp,S=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-u-1,a.end.x,a.end.y-u-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(S)}_linkLeave(n,o,a){var u;(u=this._currentLink)!=null&&u.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&n.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(a,o.text)}_linkAtPosition(n,o){const a=n.range.start.y*this._bufferService.cols+n.range.start.x,u=n.range.end.y*this._bufferService.cols+n.range.end.x,S=o.y*this._bufferService.cols+o.x;return a<=S&&S<=u}_positionFromMouseEvent(n,o,a){const u=a.getCoords(n,o,this._bufferService.cols,this._bufferService.rows);if(u)return{x:u[0],y:u[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(n,o,a,u,S){return{x1:n,y1:o,x2:a,y2:u,cols:this._bufferService.cols,fg:S}}};i.Linkifier=s=d([v(1,f.IMouseService),v(2,f.IRenderService),v(3,w.IBufferService),v(4,f.ILinkProviderService)],s)},9042:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(C,i,c){var d=this&&this.__decorate||function(f,s,n,o){var a,u=arguments.length,S=u<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(f,s,n,o);else for(var m=f.length-1;m>=0;m--)(a=f[m])&&(S=(u<3?a(S):u>3?a(s,n,S):a(s,n))||S);return u>3&&S&&Object.defineProperty(s,n,S),S},v=this&&this.__param||function(f,s){return function(n,o){s(n,o,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const l=c(511),_=c(2585);let b=i.OscLinkProvider=class{constructor(f,s,n){this._bufferService=f,this._optionsService=s,this._oscLinkService=n}provideLinks(f,s){var k;const n=this._bufferService.buffer.lines.get(f-1);if(!n)return void s(void 0);const o=[],a=this._optionsService.rawOptions.linkHandler,u=new l.CellData,S=n.getTrimmedLength();let m=-1,y=-1,p=!1;for(let x=0;x<S;x++)if(y!==-1||n.hasContent(x)){if(n.loadCell(x,u),u.hasExtendedAttrs()&&u.extended.urlId){if(y===-1){y=x,m=u.extended.urlId;continue}p=u.extended.urlId!==m}else y!==-1&&(p=!0);if(p||y!==-1&&x===S-1){const L=(k=this._oscLinkService.getLinkData(m))==null?void 0:k.uri;if(L){const T={start:{x:y+1,y:f},end:{x:x+(p||x!==S-1?0:1),y:f}};let R=!1;if(!(a!=null&&a.allowNonHttpProtocols))try{const M=new URL(L);["http:","https:"].includes(M.protocol)||(R=!0)}catch{R=!0}R||o.push({text:L,range:T,activate:(M,F)=>a?a.activate(M,F,T):w(0,F),hover:(M,F)=>{var V;return(V=a==null?void 0:a.hover)==null?void 0:V.call(a,M,F,T)},leave:(M,F)=>{var V;return(V=a==null?void 0:a.leave)==null?void 0:V.call(a,M,F,T)}})}p=!1,u.hasExtendedAttrs()&&u.extended.urlId?(y=x,m=u.extended.urlId):(y=-1,m=-1)}}s(o)}};function w(f,s){if(confirm(`Do you want to navigate to ${s}?
|
|
159
|
-
|
|
160
|
-
WARNING: This link could potentially be dangerous`)){const n=window.open();if(n){try{n.opener=null}catch{}n.location.href=s}else console.warn("Opening link blocked as opener could not be cleared")}}i.OscLinkProvider=b=d([v(0,_.IBufferService),v(1,_.IOptionsService),v(2,_.IOscLinkService)],b)},6193:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.RenderDebouncer=void 0,i.RenderDebouncer=class{constructor(c,d){this._renderCallback=c,this._coreBrowserService=d,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,d,v){this._rowCount=v,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Terminal=void 0;const d=c(3614),v=c(3656),l=c(3551),_=c(9042),b=c(3730),w=c(1680),f=c(3107),s=c(5744),n=c(2950),o=c(1296),a=c(428),u=c(4269),S=c(5114),m=c(8934),y=c(3230),p=c(9312),k=c(4725),x=c(6731),L=c(8055),T=c(8969),R=c(8460),M=c(844),F=c(6114),V=c(8437),z=c(2584),W=c(7399),B=c(5941),A=c(9074),D=c(2585),O=c(5435),U=c(4567),j=c(779);class X extends T.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(N={}){super(N),this.browser=F,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new M.MutableDisposable),this._onCursorMove=this.register(new R.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new R.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new R.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new R.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new R.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new R.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new R.EventEmitter),this._onBlur=this.register(new R.EventEmitter),this._onA11yCharEmitter=this.register(new R.EventEmitter),this._onA11yTabEmitter=this.register(new R.EventEmitter),this._onWillOpen=this.register(new R.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(A.DecorationService),this._instantiationService.setService(D.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(j.LinkProviderService),this._instantiationService.setService(k.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(b.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((I,$)=>this.refresh(I,$)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((I=>this._reportWindowsOptions(I)))),this.register(this._inputHandler.onColor((I=>this._handleColorEvent(I)))),this.register((0,R.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,R.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,R.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,R.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((I=>this._afterResize(I.cols,I.rows)))),this.register((0,M.toDisposable)((()=>{var I,$;this._customKeyEventHandler=void 0,($=(I=this.element)==null?void 0:I.parentNode)==null||$.removeChild(this.element)})))}_handleColorEvent(N){if(this._themeService)for(const I of N){let $,P="";switch(I.index){case 256:$="foreground",P="10";break;case 257:$="background",P="11";break;case 258:$="cursor",P="12";break;default:$="ansi",P="4;"+I.index}switch(I.type){case 0:const K=L.color.toColorRGB($==="ansi"?this._themeService.colors.ansi[I.index]:this._themeService.colors[$]);this.coreService.triggerDataEvent(`${z.C0.ESC}]${P};${(0,B.toRgbString)(K)}${z.C1_ESCAPED.ST}`);break;case 1:if($==="ansi")this._themeService.modifyColors((G=>G.ansi[I.index]=L.channels.toColor(...I.color)));else{const G=$;this._themeService.modifyColors((ee=>ee[G]=L.channels.toColor(...I.color)))}break;case 2:this._themeService.restoreColor(I.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(N){N?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(U.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(N){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var N;return(N=this.textarea)==null?void 0:N.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(z.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 N=this.buffer.ybase+this.buffer.y,I=this.buffer.lines.get(N);if(!I)return;const $=Math.min(this.buffer.x,this.cols-1),P=this._renderService.dimensions.css.cell.height,K=I.getWidth($),G=this._renderService.dimensions.css.cell.width*K,ee=this.buffer.y*this._renderService.dimensions.css.cell.height,oe=$*this._renderService.dimensions.css.cell.width;this.textarea.style.left=oe+"px",this.textarea.style.top=ee+"px",this.textarea.style.width=G+"px",this.textarea.style.height=P+"px",this.textarea.style.lineHeight=P+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(I=>{this.hasSelection()&&(0,d.copyHandler)(I,this._selectionService)})));const N=I=>(0,d.handlePasteEvent)(I,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",N)),this.register((0,v.addDisposableDomListener)(this.element,"paste",N)),F.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(I=>{I.button===2&&(0,d.rightClickHandler)(I,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(I=>{(0,d.rightClickHandler)(I,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),F.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(I=>{I.button===1&&(0,d.moveTextAreaUnderMouseCursor)(I,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(N=>this._keyUp(N)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(N=>this._keyDown(N)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(N=>this._keyPress(N)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(N=>this._compositionHelper.compositionupdate(N)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(N=>this._inputEvent(N)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(N){var $;if(!N)throw new Error("Terminal requires a parent element.");if(N.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),(($=this.element)==null?void 0:$.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=N.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"),N.appendChild(this.element);const I=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),I.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,v.addDisposableDomListener)(this.screenElement,"mousemove",(P=>this.updateCursorStyle(P)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),I.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_.promptLabel),F.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(S.CoreBrowserService,this.textarea,N.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(k.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(P=>this._handleTextAreaFocus(P)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(a.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(x.ThemeService),this._instantiationService.setService(k.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(u.CharacterJoinerService),this._instantiationService.setService(k.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(y.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(k.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((P=>this._onRender.fire(P)))),this.onResize((P=>this._renderService.resize(P.cols,P.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(n.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(m.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(l.Linkifier,this.screenElement)),this.element.appendChild(I);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((P=>this.scrollLines(P.amount,P.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(p.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((P=>this.scrollLines(P.amount,P.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((P=>this._renderService.handleSelectionChanged(P.start,P.end,P.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((P=>{this.textarea.value=P,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((P=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(f.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(P=>this._selectionService.handleMouseDown(P)))),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(U.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(P=>this._handleScreenReaderModeOptionChange(P)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(s.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(P=>{!this._overviewRulerRenderer&&P&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(s.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const N=this,I=this.element;function $(G){const ee=N._mouseService.getMouseReportCoords(G,N.screenElement);if(!ee)return!1;let oe,ne;switch(G.overrideType||G.type){case"mousemove":ne=32,G.buttons===void 0?(oe=3,G.button!==void 0&&(oe=G.button<3?G.button:3)):oe=1&G.buttons?0:4&G.buttons?1:2&G.buttons?2:3;break;case"mouseup":ne=0,oe=G.button<3?G.button:3;break;case"mousedown":ne=1,oe=G.button<3?G.button:3;break;case"wheel":if(N._customWheelEventHandler&&N._customWheelEventHandler(G)===!1||N.viewport.getLinesScrolled(G)===0)return!1;ne=G.deltaY<0?0:1,oe=4;break;default:return!1}return!(ne===void 0||oe===void 0||oe>4)&&N.coreMouseService.triggerMouseEvent({col:ee.col,row:ee.row,x:ee.x,y:ee.y,button:oe,action:ne,ctrl:G.ctrlKey,alt:G.altKey,shift:G.shiftKey})}const P={mouseup:null,wheel:null,mousedrag:null,mousemove:null},K={mouseup:G=>($(G),G.buttons||(this._document.removeEventListener("mouseup",P.mouseup),P.mousedrag&&this._document.removeEventListener("mousemove",P.mousedrag)),this.cancel(G)),wheel:G=>($(G),this.cancel(G,!0)),mousedrag:G=>{G.buttons&&$(G)},mousemove:G=>{G.buttons||$(G)}};this.register(this.coreMouseService.onProtocolChange((G=>{G?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(G)),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&G?P.mousemove||(I.addEventListener("mousemove",K.mousemove),P.mousemove=K.mousemove):(I.removeEventListener("mousemove",P.mousemove),P.mousemove=null),16&G?P.wheel||(I.addEventListener("wheel",K.wheel,{passive:!1}),P.wheel=K.wheel):(I.removeEventListener("wheel",P.wheel),P.wheel=null),2&G?P.mouseup||(P.mouseup=K.mouseup):(this._document.removeEventListener("mouseup",P.mouseup),P.mouseup=null),4&G?P.mousedrag||(P.mousedrag=K.mousedrag):(this._document.removeEventListener("mousemove",P.mousedrag),P.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(I,"mousedown",(G=>{if(G.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(G))return $(G),P.mouseup&&this._document.addEventListener("mouseup",P.mouseup),P.mousedrag&&this._document.addEventListener("mousemove",P.mousedrag),this.cancel(G)}))),this.register((0,v.addDisposableDomListener)(I,"wheel",(G=>{if(!P.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(G)===!1)return!1;if(!this.buffer.hasScrollback){const ee=this.viewport.getLinesScrolled(G);if(ee===0)return;const oe=z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(G.deltaY<0?"A":"B");let ne="";for(let fe=0;fe<Math.abs(ee);fe++)ne+=oe;return this.coreService.triggerDataEvent(ne,!0),this.cancel(G,!0)}return this.viewport.handleWheel(G)?this.cancel(G):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(I,"touchstart",(G=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(G),this.cancel(G)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(I,"touchmove",(G=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(G)?void 0:this.cancel(G)}),{passive:!1}))}refresh(N,I){var $;($=this._renderService)==null||$.refreshRows(N,I)}updateCursorStyle(N){var I;(I=this._selectionService)!=null&&I.shouldColumnSelect(N)?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(N,I,$=0){var P;$===1?(super.scrollLines(N,I,$),this.refresh(0,this.rows-1)):(P=this.viewport)==null||P.scrollLines(N)}paste(N){(0,d.paste)(N,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(N){this._customKeyEventHandler=N}attachCustomWheelEventHandler(N){this._customWheelEventHandler=N}registerLinkProvider(N){return this._linkProviderService.registerLinkProvider(N)}registerCharacterJoiner(N){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const I=this._characterJoinerService.register(N);return this.refresh(0,this.rows-1),I}deregisterCharacterJoiner(N){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(N)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(N){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+N)}registerDecoration(N){return this._decorationService.registerDecoration(N)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(N,I,$){this._selectionService.setSelection(N,I,$)}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 N;(N=this._selectionService)==null||N.clearSelection()}selectAll(){var N;(N=this._selectionService)==null||N.selectAll()}selectLines(N,I){var $;($=this._selectionService)==null||$.selectLines(N,I)}_keyDown(N){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1)return!1;const I=this.browser.isMac&&this.options.macOptionIsMeta&&N.altKey;if(!I&&!this._compositionHelper.keydown(N))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;I||N.key!=="Dead"&&N.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const $=(0,W.evaluateKeyboardEvent)(N,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(N),$.type===3||$.type===2){const P=this.rows-1;return this.scrollLines($.type===2?-P:P),this.cancel(N,!0)}return $.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,N)||($.cancel&&this.cancel(N,!0),!$.key||!!(N.key&&!N.ctrlKey&&!N.altKey&&!N.metaKey&&N.key.length===1&&N.key.charCodeAt(0)>=65&&N.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):($.key!==z.C0.ETX&&$.key!==z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:$.key,domEvent:N}),this._showCursor(),this.coreService.triggerDataEvent($.key,!0),!this.optionsService.rawOptions.screenReaderMode||N.altKey||N.ctrlKey?this.cancel(N,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(N,I){const $=N.isMac&&!this.options.macOptionIsMeta&&I.altKey&&!I.ctrlKey&&!I.metaKey||N.isWindows&&I.altKey&&I.ctrlKey&&!I.metaKey||N.isWindows&&I.getModifierState("AltGraph");return I.type==="keypress"?$:$&&(!I.keyCode||I.keyCode>47)}_keyUp(N){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1||((function(I){return I.keyCode===16||I.keyCode===17||I.keyCode===18})(N)||this.focus(),this.updateCursorStyle(N),this._keyPressHandled=!1)}_keyPress(N){let I;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1)return!1;if(this.cancel(N),N.charCode)I=N.charCode;else if(N.which===null||N.which===void 0)I=N.keyCode;else{if(N.which===0||N.charCode===0)return!1;I=N.which}return!(!I||(N.altKey||N.ctrlKey||N.metaKey)&&!this._isThirdLevelShift(this.browser,N)||(I=String.fromCharCode(I),this._onKey.fire({key:I,domEvent:N}),this._showCursor(),this.coreService.triggerDataEvent(I,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(N){if(N.data&&N.inputType==="insertText"&&(!N.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const I=N.data;return this.coreService.triggerDataEvent(I,!0),this.cancel(N),!0}return!1}resize(N,I){N!==this.cols||I!==this.rows?super.resize(N,I):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(N,I){var $,P;($=this._charSizeService)==null||$.measure(),(P=this.viewport)==null||P.syncScrollArea(!0)}clear(){var N;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 I=1;I<this.rows;I++)this.buffer.lines.push(this.buffer.getBlankLine(V.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(N=this.viewport)==null||N.reset(),this.refresh(0,this.rows-1)}}reset(){var I,$;this.options.rows=this.rows,this.options.cols=this.cols;const N=this._customKeyEventHandler;this._setup(),super.reset(),(I=this._selectionService)==null||I.reset(),this._decorationService.reset(),($=this.viewport)==null||$.reset(),this._customKeyEventHandler=N,this.refresh(0,this.rows-1)}clearTextureAtlas(){var N;(N=this._renderService)==null||N.clearTextureAtlas()}_reportFocus(){var N;(N=this.element)!=null&&N.classList.contains("focus")?this.coreService.triggerDataEvent(z.C0.ESC+"[I"):this.coreService.triggerDataEvent(z.C0.ESC+"[O")}_reportWindowsOptions(N){if(this._renderService)switch(N){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const I=this._renderService.dimensions.css.canvas.width.toFixed(0),$=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${z.C0.ESC}[4;${$};${I}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const P=this._renderService.dimensions.css.cell.width.toFixed(0),K=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${z.C0.ESC}[6;${K};${P}t`)}}cancel(N,I){if(this.options.cancelEvents||I)return N.preventDefault(),N.stopPropagation(),!1}}i.Terminal=X},9924:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TimeBasedDebouncer=void 0,i.TimeBasedDebouncer=class{constructor(c,d=1e3){this._renderCallback=c,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,d,v){this._rowCount=v,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d;const l=Date.now();if(l-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=l,this._innerRefresh();else if(!this._additionalRefreshRequested){const _=l-this._lastRefreshMs,b=this._debounceThresholdMS-_;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d)}}},1680:function(C,i,c){var d=this&&this.__decorate||function(n,o,a,u){var S,m=arguments.length,y=m<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(n,o,a,u);else for(var p=n.length-1;p>=0;p--)(S=n[p])&&(y=(m<3?S(y):m>3?S(o,a,y):S(o,a))||y);return m>3&&y&&Object.defineProperty(o,a,y),y},v=this&&this.__param||function(n,o){return function(a,u){o(a,u,n)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Viewport=void 0;const l=c(3656),_=c(4725),b=c(8460),w=c(844),f=c(2585);let s=i.Viewport=class extends w.Disposable{constructor(n,o,a,u,S,m,y,p){super(),this._viewportElement=n,this._scrollArea=o,this._bufferService=a,this._optionsService=u,this._charSizeService=S,this._renderService=m,this._coreBrowserService=y,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 b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,l.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((k=>this._activeBuffer=k.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((k=>this._renderDimensions=k))),this._handleThemeChange(p.colors),this.register(p.onChangeColors((k=>this._handleThemeChange(k)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(n){this._viewportElement.style.backgroundColor=n.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(n){if(n)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 o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const n=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==n&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=n),this._refreshAnimationFrame=null}syncScrollArea(n=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(n);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(n)}_handleScroll(n){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const n=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(n*(this._smoothScrollState.target-this._smoothScrollState.origin)),n<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(n,o){const a=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&a<this._lastRecordedBufferHeight)||(n.cancelable&&n.preventDefault(),!1)}handleWheel(n){const o=this._getPixelsScrolled(n);return o!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(n,o))}scrollLines(n){if(n!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=n*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:n,suppressScrollEvent:!1})}_getPixelsScrolled(n){if(n.deltaY===0||n.shiftKey)return 0;let o=this._applyScrollModifier(n.deltaY,n);return n.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:n.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(n,o){var p;let a,u="";const S=[],m=o??this._bufferService.buffer.lines.length,y=this._bufferService.buffer.lines;for(let k=n;k<m;k++){const x=y.get(k);if(!x)continue;const L=(p=y.get(k+1))==null?void 0:p.isWrapped;if(u+=x.translateToString(!L),!L||k===y.length-1){const T=document.createElement("div");T.textContent=u,S.push(T),u.length>0&&(a=T),u=""}}return{bufferElements:S,cursorElement:a}}getLinesScrolled(n){if(n.deltaY===0||n.shiftKey)return 0;let o=this._applyScrollModifier(n.deltaY,n);return n.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):n.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(n,o){const a=this._optionsService.rawOptions.fastScrollModifier;return a==="alt"&&o.altKey||a==="ctrl"&&o.ctrlKey||a==="shift"&&o.shiftKey?n*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:n*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(n){this._lastTouchY=n.touches[0].pageY}handleTouchMove(n){const o=this._lastTouchY-n.touches[0].pageY;return this._lastTouchY=n.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(n,o))}};i.Viewport=s=d([v(2,f.IBufferService),v(3,f.IOptionsService),v(4,_.ICharSizeService),v(5,_.IRenderService),v(6,_.ICoreBrowserService),v(7,_.IThemeService)],s)},3107:function(C,i,c){var d=this&&this.__decorate||function(f,s,n,o){var a,u=arguments.length,S=u<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(f,s,n,o);else for(var m=f.length-1;m>=0;m--)(a=f[m])&&(S=(u<3?a(S):u>3?a(s,n,S):a(s,n))||S);return u>3&&S&&Object.defineProperty(s,n,S),S},v=this&&this.__param||function(f,s){return function(n,o){s(n,o,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferDecorationRenderer=void 0;const l=c(4725),_=c(844),b=c(2585);let w=i.BufferDecorationRenderer=class extends _.Disposable{constructor(f,s,n,o,a){super(),this._screenElement=f,this._bufferService=s,this._coreBrowserService=n,this._decorationService=o,this._renderService=a,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((u=>this._removeDecoration(u)))),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 f of this._decorationService.decorations)this._renderDecoration(f);this._dimensionsChanged=!1}_renderDecoration(f){this._refreshStyle(f),this._dimensionsChanged&&this._refreshXPosition(f)}_createElement(f){var o;const s=this._coreBrowserService.mainDocument.createElement("div");s.classList.add("xterm-decoration"),s.classList.toggle("xterm-decoration-top-layer",((o=f==null?void 0:f.options)==null?void 0:o.layer)==="top"),s.style.width=`${Math.round((f.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,s.style.height=(f.options.height||1)*this._renderService.dimensions.css.cell.height+"px",s.style.top=(f.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",s.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const n=f.options.x??0;return n&&n>this._bufferService.cols&&(s.style.display="none"),this._refreshXPosition(f,s),s}_refreshStyle(f){const s=f.marker.line-this._bufferService.buffers.active.ydisp;if(s<0||s>=this._bufferService.rows)f.element&&(f.element.style.display="none",f.onRenderEmitter.fire(f.element));else{let n=this._decorationElements.get(f);n||(n=this._createElement(f),f.element=n,this._decorationElements.set(f,n),this._container.appendChild(n),f.onDispose((()=>{this._decorationElements.delete(f),n.remove()}))),n.style.top=s*this._renderService.dimensions.css.cell.height+"px",n.style.display=this._altBufferIsActive?"none":"block",f.onRenderEmitter.fire(n)}}_refreshXPosition(f,s=f.element){if(!s)return;const n=f.options.x??0;(f.options.anchor||"left")==="right"?s.style.right=n?n*this._renderService.dimensions.css.cell.width+"px":"":s.style.left=n?n*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(f){var s;(s=this._decorationElements.get(f))==null||s.remove(),this._decorationElements.delete(f),f.dispose()}};i.BufferDecorationRenderer=w=d([v(1,b.IBufferService),v(2,l.ICoreBrowserService),v(3,b.IDecorationService),v(4,l.IRenderService)],w)},5871:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorZoneStore=void 0,i.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 d of this._zones)if(d.color===c.options.overviewRulerOptions.color&&d.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,c.marker.line))return;if(this._lineAdjacentToZone(d,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(d,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,d){return d>=c.startBufferLine&&d<=c.endBufferLine}_lineAdjacentToZone(c,d,v){return d>=c.startBufferLine-this._linePadding[v||"full"]&&d<=c.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(c,d){c.startBufferLine=Math.min(c.startBufferLine,d),c.endBufferLine=Math.max(c.endBufferLine,d)}}},5744:function(C,i,c){var d=this&&this.__decorate||function(a,u,S,m){var y,p=arguments.length,k=p<3?u:m===null?m=Object.getOwnPropertyDescriptor(u,S):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,u,S,m);else for(var x=a.length-1;x>=0;x--)(y=a[x])&&(k=(p<3?y(k):p>3?y(u,S,k):y(u,S))||k);return p>3&&k&&Object.defineProperty(u,S,k),k},v=this&&this.__param||function(a,u){return function(S,m){u(S,m,a)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OverviewRulerRenderer=void 0;const l=c(5871),_=c(4725),b=c(844),w=c(2585),f={full:0,left:0,center:0,right:0},s={full:0,left:0,center:0,right:0},n={full:0,left:0,center:0,right:0};let o=i.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(a,u,S,m,y,p,k){var L;super(),this._viewportElement=a,this._screenElement=u,this._bufferService=S,this._decorationService=m,this._renderService=y,this._optionsService=p,this._coreBrowserService=k,this._colorZoneStore=new l.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(),(L=this._viewportElement.parentElement)==null||L.insertBefore(this._canvas,this._viewportElement);const x=this._canvas.getContext("2d");if(!x)throw new Error("Ctx cannot be null");this._ctx=x,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,b.toDisposable)((()=>{var T;(T=this._canvas)==null||T.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 a=Math.floor(this._canvas.width/3),u=Math.ceil(this._canvas.width/3);s.full=this._canvas.width,s.left=a,s.center=u,s.right=a,this._refreshDrawHeightConstants(),n.full=0,n.left=0,n.center=s.left,n.right=s.left+s.center}_refreshDrawHeightConstants(){f.full=Math.round(2*this._coreBrowserService.dpr);const a=this._canvas.height/this._bufferService.buffer.lines.length,u=Math.round(Math.max(Math.min(a,12),6)*this._coreBrowserService.dpr);f.left=u,f.center=u,f.right=u}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*f.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 u of this._decorationService.decorations)this._colorZoneStore.addDecoration(u);this._ctx.lineWidth=1;const a=this._colorZoneStore.zones;for(const u of a)u.position!=="full"&&this._renderColorZone(u);for(const u of a)u.position==="full"&&this._renderColorZone(u);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(a){this._ctx.fillStyle=a.color,this._ctx.fillRect(n[a.position||"full"],Math.round((this._canvas.height-1)*(a.startBufferLine/this._bufferService.buffers.active.lines.length)-f[a.position||"full"]/2),s[a.position||"full"],Math.round((this._canvas.height-1)*((a.endBufferLine-a.startBufferLine)/this._bufferService.buffers.active.lines.length)+f[a.position||"full"]))}_queueRefresh(a,u){this._shouldUpdateDimensions=a||this._shouldUpdateDimensions,this._shouldUpdateAnchor=u||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};i.OverviewRulerRenderer=o=d([v(2,w.IBufferService),v(3,w.IDecorationService),v(4,_.IRenderService),v(5,w.IOptionsService),v(6,_.ICoreBrowserService)],o)},2950:function(C,i,c){var d=this&&this.__decorate||function(f,s,n,o){var a,u=arguments.length,S=u<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(f,s,n,o);else for(var m=f.length-1;m>=0;m--)(a=f[m])&&(S=(u<3?a(S):u>3?a(s,n,S):a(s,n))||S);return u>3&&S&&Object.defineProperty(s,n,S),S},v=this&&this.__param||function(f,s){return function(n,o){s(n,o,f)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CompositionHelper=void 0;const l=c(4725),_=c(2585),b=c(2584);let w=i.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(f,s,n,o,a,u){this._textarea=f,this._compositionView=s,this._bufferService=n,this._optionsService=o,this._coreService=a,this._renderService=u,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(f){this._compositionView.textContent=f.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(f){if(this._isComposing||this._isSendingComposition){if(f.keyCode===229||f.keyCode===16||f.keyCode===17||f.keyCode===18)return!1;this._finalizeComposition(!1)}return f.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(f){if(this._compositionView.classList.remove("active"),this._isComposing=!1,f){const s={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let n;this._isSendingComposition=!1,s.start+=this._dataAlreadySent.length,n=this._isComposing?this._textarea.value.substring(s.start,s.end):this._textarea.value.substring(s.start),n.length>0&&this._coreService.triggerDataEvent(n,!0)}}),0)}else{this._isSendingComposition=!1;const s=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(s,!0)}}_handleAnyTextareaChanges(){const f=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const s=this._textarea.value,n=s.replace(f,"");this._dataAlreadySent=n,s.length>f.length?this._coreService.triggerDataEvent(n,!0):s.length<f.length?this._coreService.triggerDataEvent(`${b.C0.DEL}`,!0):s.length===f.length&&s!==f&&this._coreService.triggerDataEvent(s,!0)}}),0)}updateCompositionElements(f){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const s=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),n=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,a=s*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=a+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=n+"px",this._compositionView.style.lineHeight=n+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const u=this._compositionView.getBoundingClientRect();this._textarea.style.left=a+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(u.width,1)+"px",this._textarea.style.height=Math.max(u.height,1)+"px",this._textarea.style.lineHeight=u.height+"px"}f||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};i.CompositionHelper=w=d([v(2,_.IBufferService),v(3,_.IOptionsService),v(4,_.ICoreService),v(5,l.IRenderService)],w)},9806:(C,i)=>{function c(d,v,l){const _=l.getBoundingClientRect(),b=d.getComputedStyle(l),w=parseInt(b.getPropertyValue("padding-left")),f=parseInt(b.getPropertyValue("padding-top"));return[v.clientX-_.left-w,v.clientY-_.top-f]}Object.defineProperty(i,"__esModule",{value:!0}),i.getCoords=i.getCoordsRelativeToElement=void 0,i.getCoordsRelativeToElement=c,i.getCoords=function(d,v,l,_,b,w,f,s,n){if(!w)return;const o=c(d,v,l);return o?(o[0]=Math.ceil((o[0]+(n?f/2:0))/f),o[1]=Math.ceil(o[1]/s),o[0]=Math.min(Math.max(o[0],1),_+(n?1:0)),o[1]=Math.min(Math.max(o[1],1),b),o):void 0}},9504:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.moveToCellSequence=void 0;const d=c(2584);function v(s,n,o,a){const u=s-l(s,o),S=n-l(n,o),m=Math.abs(u-S)-(function(y,p,k){let x=0;const L=y-l(y,k),T=p-l(p,k);for(let R=0;R<Math.abs(L-T);R++){const M=_(y,p)==="A"?-1:1,F=k.buffer.lines.get(L+M*R);F!=null&&F.isWrapped&&x++}return x})(s,n,o);return f(m,w(_(s,n),a))}function l(s,n){let o=0,a=n.buffer.lines.get(s),u=a==null?void 0:a.isWrapped;for(;u&&s>=0&&s<n.rows;)o++,a=n.buffer.lines.get(--s),u=a==null?void 0:a.isWrapped;return o}function _(s,n){return s>n?"A":"B"}function b(s,n,o,a,u,S){let m=s,y=n,p="";for(;m!==o||y!==a;)m+=u?1:-1,u&&m>S.cols-1?(p+=S.buffer.translateBufferLineToString(y,!1,s,m),m=0,s=0,y++):!u&&m<0&&(p+=S.buffer.translateBufferLineToString(y,!1,0,s+1),m=S.cols-1,s=m,y--);return p+S.buffer.translateBufferLineToString(y,!1,s,m)}function w(s,n){const o=n?"O":"[";return d.C0.ESC+o+s}function f(s,n){s=Math.floor(s);let o="";for(let a=0;a<s;a++)o+=n;return o}i.moveToCellSequence=function(s,n,o,a){const u=o.buffer.x,S=o.buffer.y;if(!o.buffer.hasScrollback)return(function(p,k,x,L,T,R){return v(k,L,T,R).length===0?"":f(b(p,k,p,k-l(k,T),!1,T).length,w("D",R))})(u,S,0,n,o,a)+v(S,n,o,a)+(function(p,k,x,L,T,R){let M;M=v(k,L,T,R).length>0?L-l(L,T):k;const F=L,V=(function(z,W,B,A,D,O){let U;return U=v(B,A,D,O).length>0?A-l(A,D):W,z<B&&U<=A||z>=B&&U<A?"C":"D"})(p,k,x,L,T,R);return f(b(p,M,x,F,V==="C",T).length,w(V,R))})(u,S,s,n,o,a);let m;if(S===n)return m=u>s?"D":"C",f(Math.abs(u-s),w(m,a));m=S>n?"D":"C";const y=Math.abs(S-n);return f((function(p,k){return k.cols-p})(S>n?s:u,o)+(y-1)*o.cols+1+((S>n?u:s)-1),w(m,a))}},1296:function(C,i,c){var d=this&&this.__decorate||function(R,M,F,V){var z,W=arguments.length,B=W<3?M:V===null?V=Object.getOwnPropertyDescriptor(M,F):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(R,M,F,V);else for(var A=R.length-1;A>=0;A--)(z=R[A])&&(B=(W<3?z(B):W>3?z(M,F,B):z(M,F))||B);return W>3&&B&&Object.defineProperty(M,F,B),B},v=this&&this.__param||function(R,M){return function(F,V){M(F,V,R)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRenderer=void 0;const l=c(3787),_=c(2550),b=c(2223),w=c(6171),f=c(6052),s=c(4725),n=c(8055),o=c(8460),a=c(844),u=c(2585),S="xterm-dom-renderer-owner-",m="xterm-rows",y="xterm-fg-",p="xterm-bg-",k="xterm-focus",x="xterm-selection";let L=1,T=i.DomRenderer=class extends a.Disposable{constructor(R,M,F,V,z,W,B,A,D,O,U,j,X){super(),this._terminal=R,this._document=M,this._element=F,this._screenElement=V,this._viewportElement=z,this._helperContainer=W,this._linkifier2=B,this._charSizeService=D,this._optionsService=O,this._bufferService=U,this._coreBrowserService=j,this._themeService=X,this._terminalClass=L++,this._rowElements=[],this._selectionRenderModel=(0,f.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(m),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(x),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Y=>this._injectCss(Y)))),this._injectCss(this._themeService.colors),this._rowFactory=A.createInstance(l.DomRendererRowFactory,document),this._element.classList.add(S+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((Y=>this._handleLinkHover(Y)))),this.register(this._linkifier2.onHideLinkUnderline((Y=>this._handleLinkLeave(Y)))),this.register((0,a.toDisposable)((()=>{this._element.classList.remove(S+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 R=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*R,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*R),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/R),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/R),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 F of this._rowElements)F.style.width=`${this.dimensions.css.canvas.width}px`,F.style.height=`${this.dimensions.css.cell.height}px`,F.style.lineHeight=`${this.dimensions.css.cell.height}px`,F.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const M=`${this._terminalSelector} .${m} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=M,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(R){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let M=`${this._terminalSelector} .${m} { color: ${R.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;M+=`${this._terminalSelector} .${m} .xterm-dim { color: ${n.color.multiplyOpacity(R.foreground,.5).css};}`,M+=`${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 F=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,z=`blink_block_${this._terminalClass}`;M+=`@keyframes ${F} { 50% { border-bottom-style: hidden; }}`,M+=`@keyframes ${V} { 50% { box-shadow: none; }}`,M+=`@keyframes ${z} { 0% { background-color: ${R.cursor.css}; color: ${R.cursorAccent.css}; } 50% { background-color: inherit; color: ${R.cursor.css}; }}`,M+=`${this._terminalSelector} .${m}.${k} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${F} 1s step-end infinite;}${this._terminalSelector} .${m}.${k} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${m}.${k} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${z} 1s step-end infinite;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-block { background-color: ${R.cursor.css}; color: ${R.cursorAccent.css};}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${R.cursor.css} !important; color: ${R.cursorAccent.css} !important;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${R.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${R.cursor.css} inset;}${this._terminalSelector} .${m} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${R.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,M+=`${this._terminalSelector} .${x} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${x} div { position: absolute; background-color: ${R.selectionBackgroundOpaque.css};}${this._terminalSelector} .${x} div { position: absolute; background-color: ${R.selectionInactiveBackgroundOpaque.css};}`;for(const[W,B]of R.ansi.entries())M+=`${this._terminalSelector} .${y}${W} { color: ${B.css}; }${this._terminalSelector} .${y}${W}.xterm-dim { color: ${n.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${p}${W} { background-color: ${B.css}; }`;M+=`${this._terminalSelector} .${y}${b.INVERTED_DEFAULT_COLOR} { color: ${n.color.opaque(R.background).css}; }${this._terminalSelector} .${y}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${n.color.multiplyOpacity(n.color.opaque(R.background),.5).css}; }${this._terminalSelector} .${p}${b.INVERTED_DEFAULT_COLOR} { background-color: ${R.foreground.css}; }`,this._themeStyleElement.textContent=M}_setDefaultSpacing(){const R=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${R}px`,this._rowFactory.defaultSpacing=R}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(R,M){for(let F=this._rowElements.length;F<=M;F++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>M;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(R,M){this._refreshRowElements(R,M),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(k),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(k),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(R,M,F){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(R,M,F),this.renderRows(0,this._bufferService.rows-1),!R||!M)return;this._selectionRenderModel.update(this._terminal,R,M,F);const V=this._selectionRenderModel.viewportStartRow,z=this._selectionRenderModel.viewportEndRow,W=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(W>=this._bufferService.rows||B<0)return;const A=this._document.createDocumentFragment();if(F){const D=R[0]>M[0];A.appendChild(this._createSelectionElement(W,D?M[0]:R[0],D?R[0]:M[0],B-W+1))}else{const D=V===W?R[0]:0,O=W===z?M[0]:this._bufferService.cols;A.appendChild(this._createSelectionElement(W,D,O));const U=B-W-1;if(A.appendChild(this._createSelectionElement(W+1,0,this._bufferService.cols,U)),W!==B){const j=z===B?M[0]:this._bufferService.cols;A.appendChild(this._createSelectionElement(B,0,j))}}this._selectionContainer.appendChild(A)}_createSelectionElement(R,M,F,V=1){const z=this._document.createElement("div"),W=M*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(F-M);return W+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-W),z.style.height=V*this.dimensions.css.cell.height+"px",z.style.top=R*this.dimensions.css.cell.height+"px",z.style.left=`${W}px`,z.style.width=`${B}px`,z}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 R of this._rowElements)R.replaceChildren()}renderRows(R,M){const F=this._bufferService.buffer,V=F.ybase+F.y,z=Math.min(F.x,this._bufferService.cols-1),W=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,A=this._optionsService.rawOptions.cursorInactiveStyle;for(let D=R;D<=M;D++){const O=D+F.ydisp,U=this._rowElements[D],j=F.lines.get(O);if(!U||!j)break;U.replaceChildren(...this._rowFactory.createRow(j,O,O===V,B,A,z,W,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${S}${this._terminalClass}`}_handleLinkHover(R){this._setCellUnderline(R.x1,R.x2,R.y1,R.y2,R.cols,!0)}_handleLinkLeave(R){this._setCellUnderline(R.x1,R.x2,R.y1,R.y2,R.cols,!1)}_setCellUnderline(R,M,F,V,z,W){F<0&&(R=0),V<0&&(M=0);const B=this._bufferService.rows-1;F=Math.max(Math.min(F,B),0),V=Math.max(Math.min(V,B),0),z=Math.min(z,this._bufferService.cols);const A=this._bufferService.buffer,D=A.ybase+A.y,O=Math.min(A.x,z-1),U=this._optionsService.rawOptions.cursorBlink,j=this._optionsService.rawOptions.cursorStyle,X=this._optionsService.rawOptions.cursorInactiveStyle;for(let Y=F;Y<=V;++Y){const N=Y+A.ydisp,I=this._rowElements[Y],$=A.lines.get(N);if(!I||!$)break;I.replaceChildren(...this._rowFactory.createRow($,N,N===D,j,X,O,U,this.dimensions.css.cell.width,this._widthCache,W?Y===F?R:0:-1,W?(Y===V?M:z)-1:-1))}}};i.DomRenderer=T=d([v(7,u.IInstantiationService),v(8,s.ICharSizeService),v(9,u.IOptionsService),v(10,u.IBufferService),v(11,s.ICoreBrowserService),v(12,s.IThemeService)],T)},3787:function(C,i,c){var d=this&&this.__decorate||function(m,y,p,k){var x,L=arguments.length,T=L<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,p):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,y,p,k);else for(var R=m.length-1;R>=0;R--)(x=m[R])&&(T=(L<3?x(T):L>3?x(y,p,T):x(y,p))||T);return L>3&&T&&Object.defineProperty(y,p,T),T},v=this&&this.__param||function(m,y){return function(p,k){y(p,k,m)}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomRendererRowFactory=void 0;const l=c(2223),_=c(643),b=c(511),w=c(2585),f=c(8055),s=c(4725),n=c(4269),o=c(6171),a=c(3734);let u=i.DomRendererRowFactory=class{constructor(m,y,p,k,x,L,T){this._document=m,this._characterJoinerService=y,this._optionsService=p,this._coreBrowserService=k,this._coreService=x,this._decorationService=L,this._themeService=T,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(m,y,p){this._selectionStart=m,this._selectionEnd=y,this._columnSelectMode=p}createRow(m,y,p,k,x,L,T,R,M,F,V){const z=[],W=this._characterJoinerService.getJoinedCharacters(y),B=this._themeService.colors;let A,D=m.getNoBgTrimmedLength();p&&D<L+1&&(D=L+1);let O=0,U="",j=0,X=0,Y=0,N=!1,I=0,$=!1,P=0;const K=[],G=F!==-1&&V!==-1;for(let ee=0;ee<D;ee++){m.loadCell(ee,this._workCell);let oe=this._workCell.getWidth();if(oe===0)continue;let ne=!1,fe=ee,q=this._workCell;if(W.length>0&&ee===W[0][0]){ne=!0;const ie=W.shift();q=new n.JoinedCellData(this._workCell,m.translateToString(!0,ie[0],ie[1]),ie[1]-ie[0]),fe=ie[1]-1,oe=q.getWidth()}const et=this._isCellInSelection(ee,y),qt=p&&ee===L,Qt=G&&ee>=F&&ee<=V;let er=!1;this._decorationService.forEachDecorationAtCell(ee,y,void 0,(ie=>{er=!0}));let It=q.getChars()||_.WHITESPACE_CELL_CHAR;if(It===" "&&(q.isUnderline()||q.isOverline())&&(It=" "),P=oe*R-M.get(It,q.isBold(),q.isItalic()),A){if(O&&(et&&$||!et&&!$&&q.bg===j)&&(et&&$&&B.selectionForeground||q.fg===X)&&q.extended.ext===Y&&Qt===N&&P===I&&!qt&&!ne&&!er){q.isInvisible()?U+=_.WHITESPACE_CELL_CHAR:U+=It,O++;continue}O&&(A.textContent=U),A=this._document.createElement("span"),O=0,U=""}else A=this._document.createElement("span");if(j=q.bg,X=q.fg,Y=q.extended.ext,N=Qt,I=P,$=et,ne&&L>=ee&&L<=fe&&(L=ee),!this._coreService.isCursorHidden&&qt&&this._coreService.isCursorInitialized){if(K.push("xterm-cursor"),this._coreBrowserService.isFocused)T&&K.push("xterm-cursor-blink"),K.push(k==="bar"?"xterm-cursor-bar":k==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(x)switch(x){case"outline":K.push("xterm-cursor-outline");break;case"block":K.push("xterm-cursor-block");break;case"bar":K.push("xterm-cursor-bar");break;case"underline":K.push("xterm-cursor-underline")}}if(q.isBold()&&K.push("xterm-bold"),q.isItalic()&&K.push("xterm-italic"),q.isDim()&&K.push("xterm-dim"),U=q.isInvisible()?_.WHITESPACE_CELL_CHAR:q.getChars()||_.WHITESPACE_CELL_CHAR,q.isUnderline()&&(K.push(`xterm-underline-${q.extended.underlineStyle}`),U===" "&&(U=" "),!q.isUnderlineColorDefault()))if(q.isUnderlineColorRGB())A.style.textDecorationColor=`rgb(${a.AttributeData.toColorRGB(q.getUnderlineColor()).join(",")})`;else{let ie=q.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&q.isBold()&&ie<8&&(ie+=8),A.style.textDecorationColor=B.ansi[ie].css}q.isOverline()&&(K.push("xterm-overline"),U===" "&&(U=" ")),q.isStrikethrough()&&K.push("xterm-strikethrough"),Qt&&(A.style.textDecoration="underline");let ge=q.getFgColor(),tt=q.getFgColorMode(),Se=q.getBgColor(),rt=q.getBgColorMode();const tr=!!q.isInverse();if(tr){const ie=ge;ge=Se,Se=ie;const uo=tt;tt=rt,rt=uo}let Be,Rt,Ie,it=!1;switch(this._decorationService.forEachDecorationAtCell(ee,y,void 0,(ie=>{ie.options.layer!=="top"&&it||(ie.backgroundColorRGB&&(rt=50331648,Se=ie.backgroundColorRGB.rgba>>8&16777215,Be=ie.backgroundColorRGB),ie.foregroundColorRGB&&(tt=50331648,ge=ie.foregroundColorRGB.rgba>>8&16777215,Rt=ie.foregroundColorRGB),it=ie.options.layer==="top")})),!it&&et&&(Be=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,Se=Be.rgba>>8&16777215,rt=50331648,it=!0,B.selectionForeground&&(tt=50331648,ge=B.selectionForeground.rgba>>8&16777215,Rt=B.selectionForeground)),it&&K.push("xterm-decoration-top"),rt){case 16777216:case 33554432:Ie=B.ansi[Se],K.push(`xterm-bg-${Se}`);break;case 50331648:Ie=f.channels.toColor(Se>>16,Se>>8&255,255&Se),this._addStyle(A,`background-color:#${S((Se>>>0).toString(16),"0",6)}`);break;default:tr?(Ie=B.foreground,K.push(`xterm-bg-${l.INVERTED_DEFAULT_COLOR}`)):Ie=B.background}switch(Be||q.isDim()&&(Be=f.color.multiplyOpacity(Ie,.5)),tt){case 16777216:case 33554432:q.isBold()&&ge<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ge+=8),this._applyMinimumContrast(A,Ie,B.ansi[ge],q,Be,void 0)||K.push(`xterm-fg-${ge}`);break;case 50331648:const ie=f.channels.toColor(ge>>16&255,ge>>8&255,255&ge);this._applyMinimumContrast(A,Ie,ie,q,Be,Rt)||this._addStyle(A,`color:#${S(ge.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(A,Ie,B.foreground,q,Be,Rt)||tr&&K.push(`xterm-fg-${l.INVERTED_DEFAULT_COLOR}`)}K.length&&(A.className=K.join(" "),K.length=0),qt||ne||er?A.textContent=U:O++,P!==this.defaultSpacing&&(A.style.letterSpacing=`${P}px`),z.push(A),ee=fe}return A&&O&&(A.textContent=U),z}_applyMinimumContrast(m,y,p,k,x,L){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(k.getCode()))return!1;const T=this._getContrastCache(k);let R;if(x||L||(R=T.getColor(y.rgba,p.rgba)),R===void 0){const M=this._optionsService.rawOptions.minimumContrastRatio/(k.isDim()?2:1);R=f.color.ensureContrastRatio(x||y,L||p,M),T.setColor((x||y).rgba,(L||p).rgba,R??null)}return!!R&&(this._addStyle(m,`color:${R.css}`),!0)}_getContrastCache(m){return m.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(m,y){m.setAttribute("style",`${m.getAttribute("style")||""}${y};`)}_isCellInSelection(m,y){const p=this._selectionStart,k=this._selectionEnd;return!(!p||!k)&&(this._columnSelectMode?p[0]<=k[0]?m>=p[0]&&y>=p[1]&&m<k[0]&&y<=k[1]:m<p[0]&&y>=p[1]&&m>=k[0]&&y<=k[1]:y>p[1]&&y<k[1]||p[1]===k[1]&&y===p[1]&&m>=p[0]&&m<k[0]||p[1]<k[1]&&y===k[1]&&m<k[0]||p[1]<k[1]&&y===p[1]&&m>=p[0])}};function S(m,y,p){for(;m.length<p;)m=y+m;return m}i.DomRendererRowFactory=u=d([v(1,s.ICharacterJoinerService),v(2,w.IOptionsService),v(3,s.ICoreBrowserService),v(4,w.ICoreService),v(5,w.IDecorationService),v(6,s.IThemeService)],u)},2550:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WidthCache=void 0,i.WidthCache=class{constructor(c,d){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 v=c.createElement("span");v.classList.add("xterm-char-measure-element");const l=c.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontWeight="bold";const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontStyle="italic";const b=c.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[v,l,_,b],this._container.appendChild(v),this._container.appendChild(l),this._container.appendChild(_),this._container.appendChild(b),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,d,v,l){c===this._font&&d===this._fontSize&&v===this._weight&&l===this._weightBold||(this._font=c,this._fontSize=d,this._weight=v,this._weightBold=l,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${l}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${l}`,this.clear())}get(c,d,v){let l=0;if(!d&&!v&&c.length===1&&(l=c.charCodeAt(0))<256){if(this._flat[l]!==-9999)return this._flat[l];const w=this._measure(c,0);return w>0&&(this._flat[l]=w),w}let _=c;d&&(_+="B"),v&&(_+="I");let b=this._holey.get(_);if(b===void 0){let w=0;d&&(w|=1),v&&(w|=2),b=this._measure(c,w),b>0&&this._holey.set(_,b)}return b}_measure(c,d){const v=this._measureElements[d];return v.textContent=c.repeat(32),v.offsetWidth/32}}},2223:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.TEXT_BASELINE=i.DIM_OPACITY=i.INVERTED_DEFAULT_COLOR=void 0;const d=c(6114);i.INVERTED_DEFAULT_COLOR=257,i.DIM_OPACITY=.5,i.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(C,i)=>{function c(v){return 57508<=v&&v<=57558}function d(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(i,"__esModule",{value:!0}),i.computeNextVariantOffset=i.createRenderDimensions=i.treatGlyphAsBackgroundColor=i.allowRescaling=i.isEmoji=i.isRestrictedPowerlineGlyph=i.isPowerlineGlyph=i.throwIfFalsy=void 0,i.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},i.isPowerlineGlyph=c,i.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},i.isEmoji=d,i.allowRescaling=function(v,l,_,b){return l===1&&_>Math.ceil(1.5*b)&&v!==void 0&&v>255&&!d(v)&&!c(v)&&!(function(w){return 57344<=w&&w<=63743})(v)},i.treatGlyphAsBackgroundColor=function(v){return c(v)||(function(l){return 9472<=l&&l<=9631})(v)},i.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}}}},i.computeNextVariantOffset=function(v,l,_=0){return(v-(2*Math.round(l)-_))%(2*Math.round(l))}},6052:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.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(v,l,_,b=!1){if(this.selectionStart=l,this.selectionEnd=_,!l||!_||l[0]===_[0]&&l[1]===_[1])return void this.clear();const w=v.buffers.active.ydisp,f=l[1]-w,s=_[1]-w,n=Math.max(f,0),o=Math.min(s,v.rows-1);n>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=f,this.viewportEndRow=s,this.viewportCappedStartRow=n,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=_[0])}isCellSelected(v,l,_){return!!this.hasSelection&&(_-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&_>=this.viewportCappedStartRow&&l<this.endCol&&_<=this.viewportCappedEndRow:l<this.startCol&&_>=this.viewportCappedStartRow&&l>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&l>=this.startCol)}}i.createSelectionRenderModel=function(){return new c}},456:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionModel=void 0,i.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,d=this.selectionEnd;return!(!c||!d)&&(c[1]>d[1]||c[1]===d[1]&&c[0]>d[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(C,i,c){var d=this&&this.__decorate||function(o,a,u,S){var m,y=arguments.length,p=y<3?a:S===null?S=Object.getOwnPropertyDescriptor(a,u):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,a,u,S);else for(var k=o.length-1;k>=0;k--)(m=o[k])&&(p=(y<3?m(p):y>3?m(a,u,p):m(a,u))||p);return y>3&&p&&Object.defineProperty(a,u,p),p},v=this&&this.__param||function(o,a){return function(u,S){a(u,S,o)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharSizeService=void 0;const l=c(2585),_=c(8460),b=c(844);let w=i.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,a,u){super(),this._optionsService=u,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new n(this._optionsService))}catch{this._measureStrategy=this.register(new s(o,a,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};i.CharSizeService=w=d([v(2,l.IOptionsService)],w);class f extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(a,u){a!==void 0&&a>0&&u!==void 0&&u>0&&(this._result.width=a,this._result.height=u)}}class s extends f{constructor(a,u,S){super(),this._document=a,this._parentElement=u,this._optionsService=S,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 n extends f{constructor(a){super(),this._optionsService=a,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const u=this._ctx.measureText("W");if(!("width"in u&&"fontBoundingBoxAscent"in u&&"fontBoundingBoxDescent"in u))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const a=this._ctx.measureText("W");return this._validateAndSet(a.width,a.fontBoundingBoxAscent+a.fontBoundingBoxDescent),this._result}}},4269:function(C,i,c){var d=this&&this.__decorate||function(n,o,a,u){var S,m=arguments.length,y=m<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(n,o,a,u);else for(var p=n.length-1;p>=0;p--)(S=n[p])&&(y=(m<3?S(y):m>3?S(o,a,y):S(o,a))||y);return m>3&&y&&Object.defineProperty(o,a,y),y},v=this&&this.__param||function(n,o){return function(a,u){o(a,u,n)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CharacterJoinerService=i.JoinedCellData=void 0;const l=c(3734),_=c(643),b=c(511),w=c(2585);class f extends l.AttributeData{constructor(o,a,u){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=a,this._width=u}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.JoinedCellData=f;let s=i.CharacterJoinerService=class cs{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(o){const a={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(a),a.id}deregister(o){for(let a=0;a<this._characterJoiners.length;a++)if(this._characterJoiners[a].id===o)return this._characterJoiners.splice(a,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const a=this._bufferService.buffer.lines.get(o);if(!a||a.length===0)return[];const u=[],S=a.translateToString(!0);let m=0,y=0,p=0,k=a.getFg(0),x=a.getBg(0);for(let L=0;L<a.getTrimmedLength();L++)if(a.loadCell(L,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==k||this._workCell.bg!==x){if(L-m>1){const T=this._getJoinedRanges(S,p,y,a,m);for(let R=0;R<T.length;R++)u.push(T[R])}m=L,p=y,k=this._workCell.fg,x=this._workCell.bg}y+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-m>1){const L=this._getJoinedRanges(S,p,y,a,m);for(let T=0;T<L.length;T++)u.push(L[T])}return u}_getJoinedRanges(o,a,u,S,m){const y=o.substring(a,u);let p=[];try{p=this._characterJoiners[0].handler(y)}catch(k){console.error(k)}for(let k=1;k<this._characterJoiners.length;k++)try{const x=this._characterJoiners[k].handler(y);for(let L=0;L<x.length;L++)cs._mergeRanges(p,x[L])}catch(x){console.error(x)}return this._stringRangesToCellRanges(p,S,m),p}_stringRangesToCellRanges(o,a,u){let S=0,m=!1,y=0,p=o[S];if(p){for(let k=u;k<this._bufferService.cols;k++){const x=a.getWidth(k),L=a.getString(k).length||_.WHITESPACE_CELL_CHAR.length;if(x!==0){if(!m&&p[0]<=y&&(p[0]=k,m=!0),p[1]<=y){if(p[1]=k,p=o[++S],!p)break;p[0]<=y?(p[0]=k,m=!0):m=!1}y+=L}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(o,a){let u=!1;for(let S=0;S<o.length;S++){const m=o[S];if(u){if(a[1]<=m[0])return o[S-1][1]=a[1],o;if(a[1]<=m[1])return o[S-1][1]=Math.max(a[1],m[1]),o.splice(S,1),o;o.splice(S,1),S--}else{if(a[1]<=m[0])return o.splice(S,0,a),o;if(a[1]<=m[1])return m[0]=Math.min(a[0],m[0]),o;a[0]<m[1]&&(m[0]=Math.min(a[0],m[0]),u=!0)}}return u?o[o.length-1][1]=a[1]:o.push(a),o}};i.CharacterJoinerService=s=d([v(0,w.IBufferService)],s)},5114:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreBrowserService=void 0;const d=c(844),v=c(8460),l=c(3656);class _ extends d.Disposable{constructor(f,s,n){super(),this._textarea=f,this._window=s,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new b(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,v.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(f){this._window!==f&&(this._window=f,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}}i.CoreBrowserService=_;class b extends d.Disposable{constructor(f){super(),this._parentWindow=f,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(f){this._parentWindow=f,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,l.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var f;this._outerListener&&((f=this._resolutionMediaMatchList)==null||f.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:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.LinkProviderService=void 0;const d=c(844);class v extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const b=this.linkProviders.indexOf(_);b!==-1&&this.linkProviders.splice(b,1)}}}}i.LinkProviderService=v},8934:function(C,i,c){var d=this&&this.__decorate||function(w,f,s,n){var o,a=arguments.length,u=a<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(w,f,s,n);else for(var S=w.length-1;S>=0;S--)(o=w[S])&&(u=(a<3?o(u):a>3?o(f,s,u):o(f,s))||u);return a>3&&u&&Object.defineProperty(f,s,u),u},v=this&&this.__param||function(w,f){return function(s,n){f(s,n,w)}};Object.defineProperty(i,"__esModule",{value:!0}),i.MouseService=void 0;const l=c(4725),_=c(9806);let b=i.MouseService=class{constructor(w,f){this._renderService=w,this._charSizeService=f}getCoords(w,f,s,n,o){return(0,_.getCoords)(window,w,f,s,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(w,f){const s=(0,_.getCoordsRelativeToElement)(window,w,f);if(this._charSizeService.hasValidSize)return s[0]=Math.min(Math.max(s[0],0),this._renderService.dimensions.css.canvas.width-1),s[1]=Math.min(Math.max(s[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(s[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(s[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(s[0]),y:Math.floor(s[1])}}};i.MouseService=b=d([v(0,l.IRenderService),v(1,l.ICharSizeService)],b)},3230:function(C,i,c){var d=this&&this.__decorate||function(o,a,u,S){var m,y=arguments.length,p=y<3?a:S===null?S=Object.getOwnPropertyDescriptor(a,u):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,a,u,S);else for(var k=o.length-1;k>=0;k--)(m=o[k])&&(p=(y<3?m(p):y>3?m(a,u,p):m(a,u))||p);return y>3&&p&&Object.defineProperty(a,u,p),p},v=this&&this.__param||function(o,a){return function(u,S){a(u,S,o)}};Object.defineProperty(i,"__esModule",{value:!0}),i.RenderService=void 0;const l=c(6193),_=c(4725),b=c(8460),w=c(844),f=c(7226),s=c(2585);let n=i.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,a,u,S,m,y,p,k){super(),this._rowCount=o,this._charSizeService=S,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new f.DebouncedIdleTask,this._observerDisposable=this.register(new w.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 b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new l.RenderDebouncer(((x,L)=>this._renderRows(x,L)),p),this.register(this._renderDebouncer),this.register(p.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(y.onResize((()=>this._fullRefresh()))),this.register(y.buffers.onBufferActivate((()=>{var x;return(x=this._renderer.value)==null?void 0:x.clear()}))),this.register(u.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(m.onDecorationRegistered((()=>this._fullRefresh()))),this.register(m.onDecorationRemoved((()=>this._fullRefresh()))),this.register(u.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(y.cols,y.rows),this._fullRefresh()}))),this.register(u.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(y.buffer.y,y.buffer.y,!0)))),this.register(k.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(p.window,a),this.register(p.onWindowChange((x=>this._registerIntersectionObserver(x,a))))}_registerIntersectionObserver(o,a){if("IntersectionObserver"in o){const u=new o.IntersectionObserver((S=>this._handleIntersectionChange(S[S.length-1])),{threshold:0});u.observe(a),this._observerDisposable.value=(0,w.toDisposable)((()=>u.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,a,u=!1){this._isPaused?this._needsFullRefresh=!0:(u||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,a,this._rowCount))}_renderRows(o,a){this._renderer.value&&(o=Math.min(o,this._rowCount-1),a=Math.min(a,this._rowCount-1),this._renderer.value.renderRows(o,a),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:a}),this._onRender.fire({start:o,end:a}),this._isNextRenderRedrawOnly=!0)}resize(o,a){this._rowCount=a,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((a=>this.refreshRows(a.start,a.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,a;this._renderer.value&&((a=(o=this._renderer.value).clearTextureAtlas)==null||a.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,a){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var u;return(u=this._renderer.value)==null?void 0:u.handleResize(o,a)})):this._renderer.value.handleResize(o,a),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,a,u){var S;this._selectionState.start=o,this._selectionState.end=a,this._selectionState.columnSelectMode=u,(S=this._renderer.value)==null||S.handleSelectionChanged(o,a,u)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};i.RenderService=n=d([v(2,s.IOptionsService),v(3,_.ICharSizeService),v(4,s.IDecorationService),v(5,s.IBufferService),v(6,_.ICoreBrowserService),v(7,_.IThemeService)],n)},9312:function(C,i,c){var d=this&&this.__decorate||function(p,k,x,L){var T,R=arguments.length,M=R<3?k:L===null?L=Object.getOwnPropertyDescriptor(k,x):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(p,k,x,L);else for(var F=p.length-1;F>=0;F--)(T=p[F])&&(M=(R<3?T(M):R>3?T(k,x,M):T(k,x))||M);return R>3&&M&&Object.defineProperty(k,x,M),M},v=this&&this.__param||function(p,k){return function(x,L){k(x,L,p)}};Object.defineProperty(i,"__esModule",{value:!0}),i.SelectionService=void 0;const l=c(9806),_=c(9504),b=c(456),w=c(4725),f=c(8460),s=c(844),n=c(6114),o=c(4841),a=c(511),u=c(2585),S=" ",m=new RegExp(S,"g");let y=i.SelectionService=class extends s.Disposable{constructor(p,k,x,L,T,R,M,F,V){super(),this._element=p,this._screenElement=k,this._linkifier=x,this._bufferService=L,this._coreService=T,this._mouseService=R,this._optionsService=M,this._renderService=F,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new a.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new f.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new f.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new f.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new f.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=z=>this._handleMouseMove(z),this._mouseUpListener=z=>this._handleMouseUp(z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((z=>this._handleTrim(z))),this.register(this._bufferService.buffers.onBufferActivate((z=>this._handleBufferActivate(z)))),this.enable(),this._model=new b.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,s.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 p=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!(!p||!k||p[0]===k[0]&&p[1]===k[1])}get selectionText(){const p=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;if(!p||!k)return"";const x=this._bufferService.buffer,L=[];if(this._activeSelectionMode===3){if(p[0]===k[0])return"";const T=p[0]<k[0]?p[0]:k[0],R=p[0]<k[0]?k[0]:p[0];for(let M=p[1];M<=k[1];M++){const F=x.translateBufferLineToString(M,!0,T,R);L.push(F)}}else{const T=p[1]===k[1]?k[0]:void 0;L.push(x.translateBufferLineToString(p[1],!0,p[0],T));for(let R=p[1]+1;R<=k[1]-1;R++){const M=x.lines.get(R),F=x.translateBufferLineToString(R,!0);M!=null&&M.isWrapped?L[L.length-1]+=F:L.push(F)}if(p[1]!==k[1]){const R=x.lines.get(k[1]),M=x.translateBufferLineToString(k[1],!0,0,k[0]);R&&R.isWrapped?L[L.length-1]+=M:L.push(M)}}return L.map((T=>T.replace(m," "))).join(n.isWindows?`\r
|
|
161
|
-
`:`
|
|
162
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(p){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),n.isLinux&&p&&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(p){const k=this._getMouseBufferCoords(p),x=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!!(x&&L&&k)&&this._areCoordsInSelection(k,x,L)}isCellInSelection(p,k){const x=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!x||!L)&&this._areCoordsInSelection([p,k],x,L)}_areCoordsInSelection(p,k,x){return p[1]>k[1]&&p[1]<x[1]||k[1]===x[1]&&p[1]===k[1]&&p[0]>=k[0]&&p[0]<x[0]||k[1]<x[1]&&p[1]===x[1]&&p[0]<x[0]||k[1]<x[1]&&p[1]===k[1]&&p[0]>=k[0]}_selectWordAtCursor(p,k){var T,R;const x=(R=(T=this._linkifier.currentLink)==null?void 0:T.link)==null?void 0:R.range;if(x)return this._model.selectionStart=[x.start.x-1,x.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(x,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const L=this._getMouseBufferCoords(p);return!!L&&(this._selectWordAt(L,k),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(p,k){this._model.clearSelection(),p=Math.max(p,0),k=Math.min(k,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,p],this._model.selectionEnd=[this._bufferService.cols,k],this.refresh(),this._onSelectionChange.fire()}_handleTrim(p){this._model.handleTrim(p)&&this.refresh()}_getMouseBufferCoords(p){const k=this._mouseService.getCoords(p,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(k)return k[0]--,k[1]--,k[1]+=this._bufferService.buffer.ydisp,k}_getMouseEventScrollAmount(p){let k=(0,l.getCoordsRelativeToElement)(this._coreBrowserService.window,p,this._screenElement)[1];const x=this._renderService.dimensions.css.canvas.height;return k>=0&&k<=x?0:(k>x&&(k-=x),k=Math.min(Math.max(k,-50),50),k/=50,k/Math.abs(k)+Math.round(14*k))}shouldForceSelection(p){return n.isMac?p.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:p.shiftKey}handleMouseDown(p){if(this._mouseDownTimeStamp=p.timeStamp,(p.button!==2||!this.hasSelection)&&p.button===0){if(!this._enabled){if(!this.shouldForceSelection(p))return;p.stopPropagation()}p.preventDefault(),this._dragScrollAmount=0,this._enabled&&p.shiftKey?this._handleIncrementalClick(p):p.detail===1?this._handleSingleClick(p):p.detail===2?this._handleDoubleClick(p):p.detail===3&&this._handleTripleClick(p),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(p){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(p))}_handleSingleClick(p){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(p)?3:0,this._model.selectionStart=this._getMouseBufferCoords(p),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const k=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);k&&k.length!==this._model.selectionStart[0]&&k.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(p){this._selectWordAtCursor(p,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(p){const k=this._getMouseBufferCoords(p);k&&(this._activeSelectionMode=2,this._selectLineAt(k[1]))}shouldColumnSelect(p){return p.altKey&&!(n.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(p){if(p.stopImmediatePropagation(),!this._model.selectionStart)return;const k=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(p),!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(p),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const x=this._bufferService.buffer;if(this._model.selectionEnd[1]<x.lines.length){const L=x.lines.get(this._model.selectionEnd[1]);L&&L.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}k&&k[0]===this._model.selectionEnd[0]&&k[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 p=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(p.ydisp+this._bufferService.rows,p.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=p.ydisp),this.refresh()}}_handleMouseUp(p){const k=p.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&k<500&&p.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const x=this._mouseService.getCoords(p,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(x&&x[0]!==void 0&&x[1]!==void 0){const L=(0,_.moveToCellSequence)(x[0]-1,x[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(L,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const p=this._model.finalSelectionStart,k=this._model.finalSelectionEnd,x=!(!p||!k||p[0]===k[0]&&p[1]===k[1]);x?p&&k&&(this._oldSelectionStart&&this._oldSelectionEnd&&p[0]===this._oldSelectionStart[0]&&p[1]===this._oldSelectionStart[1]&&k[0]===this._oldSelectionEnd[0]&&k[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(p,k,x)):this._oldHasSelection&&this._fireOnSelectionChange(p,k,x)}_fireOnSelectionChange(p,k,x){this._oldSelectionStart=p,this._oldSelectionEnd=k,this._oldHasSelection=x,this._onSelectionChange.fire()}_handleBufferActivate(p){this.clearSelection(),this._trimListener.dispose(),this._trimListener=p.activeBuffer.lines.onTrim((k=>this._handleTrim(k)))}_convertViewportColToCharacterIndex(p,k){let x=k;for(let L=0;k>=L;L++){const T=p.loadCell(L,this._workCell).getChars().length;this._workCell.getWidth()===0?x--:T>1&&k!==L&&(x+=T-1)}return x}setSelection(p,k,x){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[p,k],this._model.selectionStartLength=x,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(p){this._isClickInSelection(p)||(this._selectWordAtCursor(p,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(p,k,x=!0,L=!0){if(p[0]>=this._bufferService.cols)return;const T=this._bufferService.buffer,R=T.lines.get(p[1]);if(!R)return;const M=T.translateBufferLineToString(p[1],!1);let F=this._convertViewportColToCharacterIndex(R,p[0]),V=F;const z=p[0]-F;let W=0,B=0,A=0,D=0;if(M.charAt(F)===" "){for(;F>0&&M.charAt(F-1)===" ";)F--;for(;V<M.length&&M.charAt(V+1)===" ";)V++}else{let j=p[0],X=p[0];R.getWidth(j)===0&&(W++,j--),R.getWidth(X)===2&&(B++,X++);const Y=R.getString(X).length;for(Y>1&&(D+=Y-1,V+=Y-1);j>0&&F>0&&!this._isCharWordSeparator(R.loadCell(j-1,this._workCell));){R.loadCell(j-1,this._workCell);const N=this._workCell.getChars().length;this._workCell.getWidth()===0?(W++,j--):N>1&&(A+=N-1,F-=N-1),F--,j--}for(;X<R.length&&V+1<M.length&&!this._isCharWordSeparator(R.loadCell(X+1,this._workCell));){R.loadCell(X+1,this._workCell);const N=this._workCell.getChars().length;this._workCell.getWidth()===2?(B++,X++):N>1&&(D+=N-1,V+=N-1),V++,X++}}V++;let O=F+z-W+A,U=Math.min(this._bufferService.cols,V-F+W+B-A-D);if(k||M.slice(F,V).trim()!==""){if(x&&O===0&&R.getCodePoint(0)!==32){const j=T.lines.get(p[1]-1);if(j&&R.isWrapped&&j.getCodePoint(this._bufferService.cols-1)!==32){const X=this._getWordAt([this._bufferService.cols-1,p[1]-1],!1,!0,!1);if(X){const Y=this._bufferService.cols-X.start;O-=Y,U+=Y}}}if(L&&O+U===this._bufferService.cols&&R.getCodePoint(this._bufferService.cols-1)!==32){const j=T.lines.get(p[1]+1);if(j!=null&&j.isWrapped&&j.getCodePoint(0)!==32){const X=this._getWordAt([0,p[1]+1],!1,!1,!0);X&&(U+=X.length)}}return{start:O,length:U}}}_selectWordAt(p,k){const x=this._getWordAt(p,k);if(x){for(;x.start<0;)x.start+=this._bufferService.cols,p[1]--;this._model.selectionStart=[x.start,p[1]],this._model.selectionStartLength=x.length}}_selectToWordAt(p){const k=this._getWordAt(p,!0);if(k){let x=p[1];for(;k.start<0;)k.start+=this._bufferService.cols,x--;if(!this._model.areSelectionValuesReversed())for(;k.start+k.length>this._bufferService.cols;)k.length-=this._bufferService.cols,x++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?k.start:k.start+k.length,x]}}_isCharWordSeparator(p){return p.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(p.getChars())>=0}_selectLineAt(p){const k=this._bufferService.buffer.getWrappedRangeForLine(p),x={start:{x:0,y:k.first},end:{x:this._bufferService.cols-1,y:k.last}};this._model.selectionStart=[0,k.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(x,this._bufferService.cols)}};i.SelectionService=y=d([v(3,u.IBufferService),v(4,u.ICoreService),v(5,w.IMouseService),v(6,u.IOptionsService),v(7,w.IRenderService),v(8,w.ICoreBrowserService)],y)},4725:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ILinkProviderService=i.IThemeService=i.ICharacterJoinerService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;const d=c(8343);i.ICharSizeService=(0,d.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),i.IMouseService=(0,d.createDecorator)("MouseService"),i.IRenderService=(0,d.createDecorator)("RenderService"),i.ISelectionService=(0,d.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,d.createDecorator)("ThemeService"),i.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(C,i,c){var d=this&&this.__decorate||function(y,p,k,x){var L,T=arguments.length,R=T<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,k):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,p,k,x);else for(var M=y.length-1;M>=0;M--)(L=y[M])&&(R=(T<3?L(R):T>3?L(p,k,R):L(p,k))||R);return T>3&&R&&Object.defineProperty(p,k,R),R},v=this&&this.__param||function(y,p){return function(k,x){p(k,x,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const l=c(7239),_=c(8055),b=c(8460),w=c(844),f=c(2585),s=_.css.toColor("#ffffff"),n=_.css.toColor("#000000"),o=_.css.toColor("#ffffff"),a=_.css.toColor("#000000"),u={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const y=[_.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")],p=[0,95,135,175,215,255];for(let k=0;k<216;k++){const x=p[k/36%6|0],L=p[k/6%6|0],T=p[k%6];y.push({css:_.channels.toCss(x,L,T),rgba:_.channels.toRgba(x,L,T)})}for(let k=0;k<24;k++){const x=8+10*k;y.push({css:_.channels.toCss(x,x,x),rgba:_.channels.toRgba(x,x,x)})}return y})());let S=i.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(y){super(),this._optionsService=y,this._contrastCache=new l.ColorContrastCache,this._halfContrastCache=new l.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:s,background:n,cursor:o,cursorAccent:a,selectionForeground:void 0,selectionBackgroundTransparent:u,selectionBackgroundOpaque:_.color.blend(n,u),selectionInactiveBackgroundTransparent:u,selectionInactiveBackgroundOpaque:_.color.blend(n,u),ansi:i.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(y={}){const p=this._colors;if(p.foreground=m(y.foreground,s),p.background=m(y.background,n),p.cursor=m(y.cursor,o),p.cursorAccent=m(y.cursorAccent,a),p.selectionBackgroundTransparent=m(y.selectionBackground,u),p.selectionBackgroundOpaque=_.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=m(y.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=_.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=y.selectionForeground?m(y.selectionForeground,_.NULL_COLOR):void 0,p.selectionForeground===_.NULL_COLOR&&(p.selectionForeground=void 0),_.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=_.color.opacity(p.selectionBackgroundTransparent,.3)),_.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=_.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=i.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=m(y.black,i.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=m(y.red,i.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=m(y.green,i.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=m(y.yellow,i.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=m(y.blue,i.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=m(y.magenta,i.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=m(y.cyan,i.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=m(y.white,i.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=m(y.brightBlack,i.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=m(y.brightRed,i.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=m(y.brightGreen,i.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=m(y.brightYellow,i.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=m(y.brightBlue,i.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=m(y.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=m(y.brightCyan,i.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=m(y.brightWhite,i.DEFAULT_ANSI_COLORS[15]),y.extendedAnsi){const k=Math.min(p.ansi.length-16,y.extendedAnsi.length);for(let x=0;x<k;x++)p.ansi[x+16]=m(y.extendedAnsi[x],i.DEFAULT_ANSI_COLORS[x+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(y){this._restoreColor(y),this._onChangeColors.fire(this.colors)}_restoreColor(y){if(y!==void 0)switch(y){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[y]=this._restoreColors.ansi[y]}else for(let p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}modifyColors(y){y(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 m(y,p){if(y!==void 0)try{return _.css.toColor(y)}catch{}return p}i.ThemeService=S=d([v(0,f.IOptionsService)],S)},6349:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;const d=c(8460),v=c(844);class l extends v.Disposable{constructor(b){super(),this._maxLength=b,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(b){if(this._maxLength===b)return;const w=new Array(b);for(let f=0;f<Math.min(b,this.length);f++)w[f]=this._array[this._getCyclicIndex(f)];this._array=w,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let w=this._length;w<b;w++)this._array[w]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,w){this._array[this._getCyclicIndex(b)]=w}push(b){this._array[this._getCyclicIndex(this._length)]=b,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(b,w,...f){if(w){for(let s=b;s<this._length-w;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+w)];this._length-=w,this.onDeleteEmitter.fire({index:b,amount:w})}for(let s=this._length-1;s>=b;s--)this._array[this._getCyclicIndex(s+f.length)]=this._array[this._getCyclicIndex(s)];for(let s=0;s<f.length;s++)this._array[this._getCyclicIndex(b+s)]=f[s];if(f.length&&this.onInsertEmitter.fire({index:b,amount:f.length}),this._length+f.length>this._maxLength){const s=this._length+f.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=f.length}trimStart(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,w,f){if(!(w<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+f<0)throw new Error("Cannot shift elements in list beyond index 0");if(f>0){for(let n=w-1;n>=0;n--)this.set(b+n+f,this.get(b+n));const s=b+w+f-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let s=0;s<w;s++)this.set(b+s+f,this.get(b+s))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}i.CircularList=l},1439:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function c(d,v=5){if(typeof d!="object")return d;const l=Array.isArray(d)?[]:{};for(const _ in d)l[_]=v<=1?d[_]:d[_]&&c(d[_],v-1);return l}},8055:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let c=0,d=0,v=0,l=0;var _,b,w,f,s;function n(a){const u=a.toString(16);return u.length<2?"0"+u:u}function o(a,u){return a<u?(u+.05)/(a+.05):(a+.05)/(u+.05)}i.NULL_COLOR={css:"#00000000",rgba:0},(function(a){a.toCss=function(u,S,m,y){return y!==void 0?`#${n(u)}${n(S)}${n(m)}${n(y)}`:`#${n(u)}${n(S)}${n(m)}`},a.toRgba=function(u,S,m,y=255){return(u<<24|S<<16|m<<8|y)>>>0},a.toColor=function(u,S,m,y){return{css:a.toCss(u,S,m,y),rgba:a.toRgba(u,S,m,y)}}})(_||(i.channels=_={})),(function(a){function u(S,m){return l=Math.round(255*m),[c,d,v]=s.toChannels(S.rgba),{css:_.toCss(c,d,v,l),rgba:_.toRgba(c,d,v,l)}}a.blend=function(S,m){if(l=(255&m.rgba)/255,l===1)return{css:m.css,rgba:m.rgba};const y=m.rgba>>24&255,p=m.rgba>>16&255,k=m.rgba>>8&255,x=S.rgba>>24&255,L=S.rgba>>16&255,T=S.rgba>>8&255;return c=x+Math.round((y-x)*l),d=L+Math.round((p-L)*l),v=T+Math.round((k-T)*l),{css:_.toCss(c,d,v),rgba:_.toRgba(c,d,v)}},a.isOpaque=function(S){return(255&S.rgba)==255},a.ensureContrastRatio=function(S,m,y){const p=s.ensureContrastRatio(S.rgba,m.rgba,y);if(p)return _.toColor(p>>24&255,p>>16&255,p>>8&255)},a.opaque=function(S){const m=(255|S.rgba)>>>0;return[c,d,v]=s.toChannels(m),{css:_.toCss(c,d,v),rgba:m}},a.opacity=u,a.multiplyOpacity=function(S,m){return l=255&S.rgba,u(S,l*m/255)},a.toColorRGB=function(S){return[S.rgba>>24&255,S.rgba>>16&255,S.rgba>>8&255]}})(b||(i.color=b={})),(function(a){let u,S;try{const m=document.createElement("canvas");m.width=1,m.height=1;const y=m.getContext("2d",{willReadFrequently:!0});y&&(u=y,u.globalCompositeOperation="copy",S=u.createLinearGradient(0,0,1,1))}catch{}a.toColor=function(m){if(m.match(/#[\da-f]{3,8}/i))switch(m.length){case 4:return c=parseInt(m.slice(1,2).repeat(2),16),d=parseInt(m.slice(2,3).repeat(2),16),v=parseInt(m.slice(3,4).repeat(2),16),_.toColor(c,d,v);case 5:return c=parseInt(m.slice(1,2).repeat(2),16),d=parseInt(m.slice(2,3).repeat(2),16),v=parseInt(m.slice(3,4).repeat(2),16),l=parseInt(m.slice(4,5).repeat(2),16),_.toColor(c,d,v,l);case 7:return{css:m,rgba:(parseInt(m.slice(1),16)<<8|255)>>>0};case 9:return{css:m,rgba:parseInt(m.slice(1),16)>>>0}}const y=m.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return c=parseInt(y[1]),d=parseInt(y[2]),v=parseInt(y[3]),l=Math.round(255*(y[5]===void 0?1:parseFloat(y[5]))),_.toColor(c,d,v,l);if(!u||!S)throw new Error("css.toColor: Unsupported css format");if(u.fillStyle=S,u.fillStyle=m,typeof u.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(u.fillRect(0,0,1,1),[c,d,v,l]=u.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,d,v,l),css:m}}})(w||(i.css=w={})),(function(a){function u(S,m,y){const p=S/255,k=m/255,x=y/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.0722*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))}a.relativeLuminance=function(S){return u(S>>16&255,S>>8&255,255&S)},a.relativeLuminance2=u})(f||(i.rgb=f={})),(function(a){function u(m,y,p){const k=m>>24&255,x=m>>16&255,L=m>>8&255;let T=y>>24&255,R=y>>16&255,M=y>>8&255,F=o(f.relativeLuminance2(T,R,M),f.relativeLuminance2(k,x,L));for(;F<p&&(T>0||R>0||M>0);)T-=Math.max(0,Math.ceil(.1*T)),R-=Math.max(0,Math.ceil(.1*R)),M-=Math.max(0,Math.ceil(.1*M)),F=o(f.relativeLuminance2(T,R,M),f.relativeLuminance2(k,x,L));return(T<<24|R<<16|M<<8|255)>>>0}function S(m,y,p){const k=m>>24&255,x=m>>16&255,L=m>>8&255;let T=y>>24&255,R=y>>16&255,M=y>>8&255,F=o(f.relativeLuminance2(T,R,M),f.relativeLuminance2(k,x,L));for(;F<p&&(T<255||R<255||M<255);)T=Math.min(255,T+Math.ceil(.1*(255-T))),R=Math.min(255,R+Math.ceil(.1*(255-R))),M=Math.min(255,M+Math.ceil(.1*(255-M))),F=o(f.relativeLuminance2(T,R,M),f.relativeLuminance2(k,x,L));return(T<<24|R<<16|M<<8|255)>>>0}a.blend=function(m,y){if(l=(255&y)/255,l===1)return y;const p=y>>24&255,k=y>>16&255,x=y>>8&255,L=m>>24&255,T=m>>16&255,R=m>>8&255;return c=L+Math.round((p-L)*l),d=T+Math.round((k-T)*l),v=R+Math.round((x-R)*l),_.toRgba(c,d,v)},a.ensureContrastRatio=function(m,y,p){const k=f.relativeLuminance(m>>8),x=f.relativeLuminance(y>>8);if(o(k,x)<p){if(x<k){const R=u(m,y,p),M=o(k,f.relativeLuminance(R>>8));if(M<p){const F=S(m,y,p);return M>o(k,f.relativeLuminance(F>>8))?R:F}return R}const L=S(m,y,p),T=o(k,f.relativeLuminance(L>>8));if(T<p){const R=u(m,y,p);return T>o(k,f.relativeLuminance(R>>8))?L:R}return L}},a.reduceLuminance=u,a.increaseLuminance=S,a.toChannels=function(m){return[m>>24&255,m>>16&255,m>>8&255,255&m]}})(s||(i.rgba=s={})),i.toPaddedHex=n,i.contrastRatio=o},8969:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;const d=c(844),v=c(2585),l=c(4348),_=c(7866),b=c(744),w=c(7302),f=c(6975),s=c(8460),n=c(1753),o=c(1480),a=c(7994),u=c(9282),S=c(5435),m=c(5981),y=c(2660);let p=!1;class k extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new s.EventEmitter),this._onScroll.event((L=>{var T;(T=this._onScrollApi)==null||T.fire(L.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(L){for(const T in L)this.optionsService.options[T]=L[T]}constructor(L){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new s.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new s.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new s.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new s.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new s.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new s.EventEmitter),this._instantiationService=new l.InstantiationService,this.optionsService=this.register(new w.OptionsService(L)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(f.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(n.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(a.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(y.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new S.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,s.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,s.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,s.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,s.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((T=>{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((T=>{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 m.WriteBuffer(((T,R)=>this._inputHandler.parse(T,R)))),this.register((0,s.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(L,T){this._writeBuffer.write(L,T)}writeSync(L,T){this._logService.logLevel<=v.LogLevelEnum.WARN&&!p&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p=!0),this._writeBuffer.writeSync(L,T)}input(L,T=!0){this.coreService.triggerDataEvent(L,T)}resize(L,T){isNaN(L)||isNaN(T)||(L=Math.max(L,b.MINIMUM_COLS),T=Math.max(T,b.MINIMUM_ROWS),this._bufferService.resize(L,T))}scroll(L,T=!1){this._bufferService.scroll(L,T)}scrollLines(L,T,R){this._bufferService.scrollLines(L,T,R)}scrollPages(L){this.scrollLines(L*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(L){const T=L-this._bufferService.buffer.ydisp;T!==0&&this.scrollLines(T)}registerEscHandler(L,T){return this._inputHandler.registerEscHandler(L,T)}registerDcsHandler(L,T){return this._inputHandler.registerDcsHandler(L,T)}registerCsiHandler(L,T){return this._inputHandler.registerCsiHandler(L,T)}registerOscHandler(L,T){return this._inputHandler.registerOscHandler(L,T)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let L=!1;const T=this.optionsService.rawOptions.windowsPty;T&&T.buildNumber!==void 0&&T.buildNumber!==void 0?L=T.backend==="conpty"&&T.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(L=!0),L?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const L=[];L.push(this.onLineFeed(u.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},(()=>((0,u.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const T of L)T.dispose()}))}}}i.CoreTerminal=k},8460:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.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 d=0;d<this._listeners.length;d++)if(this._listeners[d]===c)return void this._listeners.splice(d,1)}}})),this._event}fire(c,d){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,c,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(c,d){return c((v=>d.fire(v)))},i.runAndSubscribe=function(c,d){return d(void 0),c((v=>d(v)))}},5435:function(C,i,c){var d=this&&this.__decorate||function(W,B,A,D){var O,U=arguments.length,j=U<3?B:D===null?D=Object.getOwnPropertyDescriptor(B,A):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(W,B,A,D);else for(var X=W.length-1;X>=0;X--)(O=W[X])&&(j=(U<3?O(j):U>3?O(B,A,j):O(B,A))||j);return U>3&&j&&Object.defineProperty(B,A,j),j},v=this&&this.__param||function(W,B){return function(A,D){B(A,D,W)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;const l=c(2584),_=c(7116),b=c(2015),w=c(844),f=c(482),s=c(8437),n=c(8460),o=c(643),a=c(511),u=c(3734),S=c(2585),m=c(1480),y=c(6242),p=c(6351),k=c(5941),x={"(":0,")":1,"*":2,"+":3,"-":1,".":2},L=131072;function T(W,B){if(W>24)return B.setWinLines||!1;switch(W){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var R;(function(W){W[W.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",W[W.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(R||(i.WindowsOptionsReportType=R={}));let M=0;class F extends w.Disposable{getAttrData(){return this._curAttrData}constructor(B,A,D,O,U,j,X,Y,N=new b.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=A,this._coreService=D,this._logService=O,this._optionsService=U,this._oscLinkService=j,this._coreMouseService=X,this._unicodeService=Y,this._parser=N,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new f.StringToUtf32,this._utf8Decoder=new f.Utf8ToUtf32,this._workCell=new a.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=s.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=s.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new n.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new n.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new n.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new n.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new n.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new n.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new n.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new n.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new n.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new n.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new n.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new n.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new n.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((I=>this._activeBuffer=I.activeBuffer))),this._parser.setCsiHandlerFallback(((I,$)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(I),params:$.toArray()})})),this._parser.setEscHandlerFallback((I=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(I)})})),this._parser.setExecuteHandlerFallback((I=>{this._logService.debug("Unknown EXECUTE code: ",{code:I})})),this._parser.setOscHandlerFallback(((I,$,P)=>{this._logService.debug("Unknown OSC code: ",{identifier:I,action:$,data:P})})),this._parser.setDcsHandlerFallback(((I,$,P)=>{$==="HOOK"&&(P=P.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(I),action:$,payload:P})})),this._parser.setPrintHandler(((I,$,P)=>this.print(I,$,P))),this._parser.registerCsiHandler({final:"@"},(I=>this.insertChars(I))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(I=>this.scrollLeft(I))),this._parser.registerCsiHandler({final:"A"},(I=>this.cursorUp(I))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(I=>this.scrollRight(I))),this._parser.registerCsiHandler({final:"B"},(I=>this.cursorDown(I))),this._parser.registerCsiHandler({final:"C"},(I=>this.cursorForward(I))),this._parser.registerCsiHandler({final:"D"},(I=>this.cursorBackward(I))),this._parser.registerCsiHandler({final:"E"},(I=>this.cursorNextLine(I))),this._parser.registerCsiHandler({final:"F"},(I=>this.cursorPrecedingLine(I))),this._parser.registerCsiHandler({final:"G"},(I=>this.cursorCharAbsolute(I))),this._parser.registerCsiHandler({final:"H"},(I=>this.cursorPosition(I))),this._parser.registerCsiHandler({final:"I"},(I=>this.cursorForwardTab(I))),this._parser.registerCsiHandler({final:"J"},(I=>this.eraseInDisplay(I,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(I=>this.eraseInDisplay(I,!0))),this._parser.registerCsiHandler({final:"K"},(I=>this.eraseInLine(I,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(I=>this.eraseInLine(I,!0))),this._parser.registerCsiHandler({final:"L"},(I=>this.insertLines(I))),this._parser.registerCsiHandler({final:"M"},(I=>this.deleteLines(I))),this._parser.registerCsiHandler({final:"P"},(I=>this.deleteChars(I))),this._parser.registerCsiHandler({final:"S"},(I=>this.scrollUp(I))),this._parser.registerCsiHandler({final:"T"},(I=>this.scrollDown(I))),this._parser.registerCsiHandler({final:"X"},(I=>this.eraseChars(I))),this._parser.registerCsiHandler({final:"Z"},(I=>this.cursorBackwardTab(I))),this._parser.registerCsiHandler({final:"`"},(I=>this.charPosAbsolute(I))),this._parser.registerCsiHandler({final:"a"},(I=>this.hPositionRelative(I))),this._parser.registerCsiHandler({final:"b"},(I=>this.repeatPrecedingCharacter(I))),this._parser.registerCsiHandler({final:"c"},(I=>this.sendDeviceAttributesPrimary(I))),this._parser.registerCsiHandler({prefix:">",final:"c"},(I=>this.sendDeviceAttributesSecondary(I))),this._parser.registerCsiHandler({final:"d"},(I=>this.linePosAbsolute(I))),this._parser.registerCsiHandler({final:"e"},(I=>this.vPositionRelative(I))),this._parser.registerCsiHandler({final:"f"},(I=>this.hVPosition(I))),this._parser.registerCsiHandler({final:"g"},(I=>this.tabClear(I))),this._parser.registerCsiHandler({final:"h"},(I=>this.setMode(I))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(I=>this.setModePrivate(I))),this._parser.registerCsiHandler({final:"l"},(I=>this.resetMode(I))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(I=>this.resetModePrivate(I))),this._parser.registerCsiHandler({final:"m"},(I=>this.charAttributes(I))),this._parser.registerCsiHandler({final:"n"},(I=>this.deviceStatus(I))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(I=>this.deviceStatusPrivate(I))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(I=>this.softReset(I))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(I=>this.setCursorStyle(I))),this._parser.registerCsiHandler({final:"r"},(I=>this.setScrollRegion(I))),this._parser.registerCsiHandler({final:"s"},(I=>this.saveCursor(I))),this._parser.registerCsiHandler({final:"t"},(I=>this.windowOptions(I))),this._parser.registerCsiHandler({final:"u"},(I=>this.restoreCursor(I))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(I=>this.insertColumns(I))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(I=>this.deleteColumns(I))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(I=>this.selectProtected(I))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(I=>this.requestMode(I,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(I=>this.requestMode(I,!1))),this._parser.setExecuteHandler(l.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(l.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(l.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(l.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(l.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(l.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(l.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(l.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(l.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new y.OscHandler((I=>(this.setTitle(I),this.setIconName(I),!0)))),this._parser.registerOscHandler(1,new y.OscHandler((I=>this.setIconName(I)))),this._parser.registerOscHandler(2,new y.OscHandler((I=>this.setTitle(I)))),this._parser.registerOscHandler(4,new y.OscHandler((I=>this.setOrReportIndexedColor(I)))),this._parser.registerOscHandler(8,new y.OscHandler((I=>this.setHyperlink(I)))),this._parser.registerOscHandler(10,new y.OscHandler((I=>this.setOrReportFgColor(I)))),this._parser.registerOscHandler(11,new y.OscHandler((I=>this.setOrReportBgColor(I)))),this._parser.registerOscHandler(12,new y.OscHandler((I=>this.setOrReportCursorColor(I)))),this._parser.registerOscHandler(104,new y.OscHandler((I=>this.restoreIndexedColor(I)))),this._parser.registerOscHandler(110,new y.OscHandler((I=>this.restoreFgColor(I)))),this._parser.registerOscHandler(111,new y.OscHandler((I=>this.restoreBgColor(I)))),this._parser.registerOscHandler(112,new y.OscHandler((I=>this.restoreCursorColor(I)))),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 I in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:I},(()=>this.selectCharset("("+I))),this._parser.registerEscHandler({intermediates:")",final:I},(()=>this.selectCharset(")"+I))),this._parser.registerEscHandler({intermediates:"*",final:I},(()=>this.selectCharset("*"+I))),this._parser.registerEscHandler({intermediates:"+",final:I},(()=>this.selectCharset("+"+I))),this._parser.registerEscHandler({intermediates:"-",final:I},(()=>this.selectCharset("-"+I))),this._parser.registerEscHandler({intermediates:".",final:I},(()=>this.selectCharset("."+I))),this._parser.registerEscHandler({intermediates:"/",final:I},(()=>this.selectCharset("/"+I)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((I=>(this._logService.error("Parsing error: ",I),I))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((I,$)=>this.requestStatusString(I,$))))}_preserveStack(B,A,D,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=A,this._parseStack.decodedLength=D,this._parseStack.position=O}_logSlowResolvingAsync(B){this._logService.logLevel<=S.LogLevelEnum.WARN&&Promise.race([B,new Promise(((A,D)=>setTimeout((()=>D("#SLOW_TIMEOUT")),5e3)))]).catch((A=>{if(A!=="#SLOW_TIMEOUT")throw A;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(B,A){let D,O=this._activeBuffer.x,U=this._activeBuffer.y,j=0;const X=this._parseStack.paused;if(X){if(D=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,A))return this._logSlowResolvingAsync(D),D;O=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>L&&(j=this._parseStack.position+L)}if(this._logService.logLevel<=S.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,(I=>String.fromCharCode(I))).join("")}"`),typeof B=="string"?B.split("").map((I=>I.charCodeAt(0))):B),this._parseBuffer.length<B.length&&this._parseBuffer.length<L&&(this._parseBuffer=new Uint32Array(Math.min(B.length,L))),X||this._dirtyRowTracker.clearRange(),B.length>L)for(let I=j;I<B.length;I+=L){const $=I+L<B.length?I+L:B.length,P=typeof B=="string"?this._stringDecoder.decode(B.substring(I,$),this._parseBuffer):this._utf8Decoder.decode(B.subarray(I,$),this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,P))return this._preserveStack(O,U,P,I),this._logSlowResolvingAsync(D),D}else if(!X){const I=typeof B=="string"?this._stringDecoder.decode(B,this._parseBuffer):this._utf8Decoder.decode(B,this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,I))return this._preserveStack(O,U,I,0),this._logSlowResolvingAsync(D),D}this._activeBuffer.x===O&&this._activeBuffer.y===U||this._onCursorMove.fire();const Y=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),N=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);N<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(N,this._bufferService.rows-1),Math.min(Y,this._bufferService.rows-1))}print(B,A,D){let O,U;const j=this._charsetService.charset,X=this._optionsService.rawOptions.screenReaderMode,Y=this._bufferService.cols,N=this._coreService.decPrivateModes.wraparound,I=this._coreService.modes.insertMode,$=this._curAttrData;let P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&D-A>0&&P.getWidth(this._activeBuffer.x-1)===2&&P.setCellFromCodepoint(this._activeBuffer.x-1,0,1,$);let K=this._parser.precedingJoinState;for(let G=A;G<D;++G){if(O=B[G],O<127&&j){const fe=j[String.fromCharCode(O)];fe&&(O=fe.charCodeAt(0))}const ee=this._unicodeService.charProperties(O,K);U=m.UnicodeService.extractWidth(ee);const oe=m.UnicodeService.extractShouldJoin(ee),ne=oe?m.UnicodeService.extractWidth(K):0;if(K=ee,X&&this._onA11yChar.fire((0,f.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+U-ne>Y){if(N){const fe=P;let q=this._activeBuffer.x-ne;for(this._activeBuffer.x=ne,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),P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ne>0&&P instanceof s.BufferLine&&P.copyCellsFrom(fe,q,0,ne,!1);q<Y;)fe.setCellFromCodepoint(q++,0,1,$)}else if(this._activeBuffer.x=Y-1,U===2)continue}if(oe&&this._activeBuffer.x){const fe=P.getWidth(this._activeBuffer.x-1)?1:2;P.addCodepointToCell(this._activeBuffer.x-fe,O,U);for(let q=U-ne;--q>=0;)P.setCellFromCodepoint(this._activeBuffer.x++,0,0,$)}else if(I&&(P.insertCells(this._activeBuffer.x,U-ne,this._activeBuffer.getNullCell($)),P.getWidth(Y-1)===2&&P.setCellFromCodepoint(Y-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,$)),P.setCellFromCodepoint(this._activeBuffer.x++,O,U,$),U>0)for(;--U;)P.setCellFromCodepoint(this._activeBuffer.x++,0,0,$)}this._parser.precedingJoinState=K,this._activeBuffer.x<Y&&D-A>0&&P.getWidth(this._activeBuffer.x)===0&&!P.hasContent(this._activeBuffer.x)&&P.setCellFromCodepoint(this._activeBuffer.x,0,1,$),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,A){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,A):this._parser.registerCsiHandler(B,(D=>!T(D.params[0],this._optionsService.rawOptions.windowOptions)||A(D)))}registerDcsHandler(B,A){return this._parser.registerDcsHandler(B,new p.DcsHandler(A))}registerEscHandler(B,A){return this._parser.registerEscHandler(B,A)}registerOscHandler(B,A){return this._parser.registerOscHandler(B,new y.OscHandler(A))}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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);A.hasWidth(this._activeBuffer.x)&&!A.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,A){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+A):(this._activeBuffer.x=B,this._activeBuffer.y=A),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,A){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+A)}cursorUp(B){const A=this._activeBuffer.y-this._activeBuffer.scrollTop;return A>=0?this._moveCursor(0,-Math.min(A,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const A=this._activeBuffer.scrollBottom-this._activeBuffer.y;return A>=0?this._moveCursor(0,Math.min(A,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const A=B.params[0];return A===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:A===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let A=B.params[0]||1;for(;A--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let A=B.params[0]||1;for(;A--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const A=B.params[0];return A===1&&(this._curAttrData.bg|=536870912),A!==2&&A!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,A,D,O=!1,U=!1){const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);j.replaceCells(A,D,this._activeBuffer.getNullCell(this._eraseAttrData()),U),O&&(j.isWrapped=!1)}_resetBufferLine(B,A=!1){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);D&&(D.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),A),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),D.isWrapped=!1)}eraseInDisplay(B,A=!1){let D;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(D=this._activeBuffer.y,this._dirtyRowTracker.markDirty(D),this._eraseInBufferLine(D++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,A);D<this._bufferService.rows;D++)this._resetBufferLine(D,A);this._dirtyRowTracker.markDirty(D);break;case 1:for(D=this._activeBuffer.y,this._dirtyRowTracker.markDirty(D),this._eraseInBufferLine(D,0,this._activeBuffer.x+1,!0,A),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(D+1).isWrapped=!1);D--;)this._resetBufferLine(D,A);this._dirtyRowTracker.markDirty(0);break;case 2:for(D=this._bufferService.rows,this._dirtyRowTracker.markDirty(D-1);D--;)this._resetBufferLine(D,A);this._dirtyRowTracker.markDirty(0);break;case 3:const O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(B,A=!1){switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,A);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,A);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,A)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(B){this._restrictCursor();let A=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,U=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;A--;)this._activeBuffer.lines.splice(U-1,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(B){this._restrictCursor();let A=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=this._activeBuffer.ybase+this._activeBuffer.y;let O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;A--;)this._activeBuffer.lines.splice(D,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(B){this._restrictCursor();const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return A&&(A.insertCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(B){this._restrictCursor();const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return A&&(A.deleteCells(this._activeBuffer.x,B.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(B){let A=B.params[0]||1;for(;A--;)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(B){let A=B.params[0]||1;for(;A--;)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(s.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=B.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.deleteCells(0,A,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=B.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.insertCells(0,A,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=B.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.insertCells(this._activeBuffer.x,A,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(B){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=B.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);O.deleteCells(this._activeBuffer.x,A,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(B){this._restrictCursor();const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return A&&(A.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(B.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(B){const A=this._parser.precedingJoinState;if(!A)return!0;const D=B.params[0]||1,O=m.UnicodeService.extractWidth(A),U=this._activeBuffer.x-O,j=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(U),X=new Uint32Array(j.length*D);let Y=0;for(let I=0;I<j.length;){const $=j.codePointAt(I)||0;X[Y++]=$,I+=$>65535?2:1}let N=Y;for(let I=1;I<D;++I)X.copyWithin(N,0,Y),N+=Y;return this.print(X,0,N),!0}sendDeviceAttributesPrimary(B){return B.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(l.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(l.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(l.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(l.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(l.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let A=0;A<B.length;A++)switch(B.params[A]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(B){for(let A=0;A<B.length;A++)switch(B.params[A]){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(B){for(let A=0;A<B.length;A++)switch(B.params[A]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(B){for(let A=0;A<B.length;A++)switch(B.params[A]){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(),B.params[A]===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(B,A){const D=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:U}=this._coreMouseService,j=this._coreService,{buffers:X,cols:Y}=this._bufferService,{active:N,alt:I}=X,$=this._optionsService.rawOptions,P=oe=>oe?1:2,K=B.params[0];return G=K,ee=A?K===2?4:K===4?P(j.modes.insertMode):K===12?3:K===20?P($.convertEol):0:K===1?P(D.applicationCursorKeys):K===3?$.windowOptions.setWinLines?Y===80?2:Y===132?1:0:0:K===6?P(D.origin):K===7?P(D.wraparound):K===8?3:K===9?P(O==="X10"):K===12?P($.cursorBlink):K===25?P(!j.isCursorHidden):K===45?P(D.reverseWraparound):K===66?P(D.applicationKeypad):K===67?4:K===1e3?P(O==="VT200"):K===1002?P(O==="DRAG"):K===1003?P(O==="ANY"):K===1004?P(D.sendFocus):K===1005?4:K===1006?P(U==="SGR"):K===1015?4:K===1016?P(U==="SGR_PIXELS"):K===1048?1:K===47||K===1047||K===1049?P(N===I):K===2004?P(D.bracketedPasteMode):0,j.triggerDataEvent(`${l.C0.ESC}[${A?"":"?"}${G};${ee}$y`),!0;var G,ee}_updateAttrColor(B,A,D,O,U){return A===2?(B|=50331648,B&=-16777216,B|=u.AttributeData.fromColorRGB([D,O,U])):A===5&&(B&=-50331904,B|=33554432|255&D),B}_extractColor(B,A,D){const O=[0,0,-1,0,0,0];let U=0,j=0;do{if(O[j+U]=B.params[A+j],B.hasSubParams(A+j)){const X=B.getSubParams(A+j);let Y=0;do O[1]===5&&(U=1),O[j+Y+1+U]=X[Y];while(++Y<X.length&&Y+j+1+U<O.length);break}if(O[1]===5&&j+U>=2||O[1]===2&&j+U>=5)break;O[1]&&(U=1)}while(++j+A<B.length&&j+U<O.length);for(let X=2;X<O.length;++X)O[X]===-1&&(O[X]=0);switch(O[0]){case 38:D.fg=this._updateAttrColor(D.fg,O[1],O[3],O[4],O[5]);break;case 48:D.bg=this._updateAttrColor(D.bg,O[1],O[3],O[4],O[5]);break;case 58:D.extended=D.extended.clone(),D.extended.underlineColor=this._updateAttrColor(D.extended.underlineColor,O[1],O[3],O[4],O[5])}return j}_processUnderline(B,A){A.extended=A.extended.clone(),(!~B||B>5)&&(B=1),A.extended.underlineStyle=B,A.fg|=268435456,B===0&&(A.fg&=-268435457),A.updateExtended()}_processSGR0(B){B.fg=s.DEFAULT_ATTR_DATA.fg,B.bg=s.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const A=B.length;let D;const O=this._curAttrData;for(let U=0;U<A;U++)D=B.params[U],D>=30&&D<=37?(O.fg&=-50331904,O.fg|=16777216|D-30):D>=40&&D<=47?(O.bg&=-50331904,O.bg|=16777216|D-40):D>=90&&D<=97?(O.fg&=-50331904,O.fg|=16777224|D-90):D>=100&&D<=107?(O.bg&=-50331904,O.bg|=16777224|D-100):D===0?this._processSGR0(O):D===1?O.fg|=134217728:D===3?O.bg|=67108864:D===4?(O.fg|=268435456,this._processUnderline(B.hasSubParams(U)?B.getSubParams(U)[0]:1,O)):D===5?O.fg|=536870912:D===7?O.fg|=67108864:D===8?O.fg|=1073741824:D===9?O.fg|=2147483648:D===2?O.bg|=134217728:D===21?this._processUnderline(2,O):D===22?(O.fg&=-134217729,O.bg&=-134217729):D===23?O.bg&=-67108865:D===24?(O.fg&=-268435457,this._processUnderline(0,O)):D===25?O.fg&=-536870913:D===27?O.fg&=-67108865:D===28?O.fg&=-1073741825:D===29?O.fg&=2147483647:D===39?(O.fg&=-67108864,O.fg|=16777215&s.DEFAULT_ATTR_DATA.fg):D===49?(O.bg&=-67108864,O.bg|=16777215&s.DEFAULT_ATTR_DATA.bg):D===38||D===48||D===58?U+=this._extractColor(B,U,O):D===53?O.bg|=1073741824:D===55?O.bg&=-1073741825:D===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):D===100?(O.fg&=-67108864,O.fg|=16777215&s.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&s.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",D);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${l.C0.ESC}[0n`);break;case 6:const A=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[${A};${D}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const A=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[?${A};${D}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=s.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(B){const A=B.params[0]||1;switch(A){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 D=A%2==1;return this._optionsService.options.cursorBlink=D,!0}setScrollRegion(B){const A=B.params[0]||1;let D;return(B.length<2||(D=B.params[1])>this._bufferService.rows||D===0)&&(D=this._bufferService.rows),D>A&&(this._activeBuffer.scrollTop=A-1,this._activeBuffer.scrollBottom=D-1,this._setCursor(0,0)),!0}windowOptions(B){if(!T(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const A=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:A!==2&&this._onRequestWindowsOptionsReport.fire(R.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(R.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${l.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:A!==0&&A!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),A!==0&&A!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:A!==0&&A!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),A!==0&&A!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const A=[],D=B.split(";");for(;D.length>1;){const O=D.shift(),U=D.shift();if(/^\d+$/.exec(O)){const j=parseInt(O);if(z(j))if(U==="?")A.push({type:0,index:j});else{const X=(0,k.parseColor)(U);X&&A.push({type:1,index:j,color:X})}}}return A.length&&this._onColor.fire(A),!0}setHyperlink(B){const A=B.split(";");return!(A.length<2)&&(A[1]?this._createHyperlink(A[0],A[1]):!A[0]&&this._finishHyperlink())}_createHyperlink(B,A){this._getCurrentLinkId()&&this._finishHyperlink();const D=B.split(":");let O;const U=D.findIndex((j=>j.startsWith("id=")));return U!==-1&&(O=D[U].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,uri:A}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(B,A){const D=B.split(";");for(let O=0;O<D.length&&!(A>=this._specialColors.length);++O,++A)if(D[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[A]}]);else{const U=(0,k.parseColor)(D[O]);U&&this._onColor.fire([{type:1,index:this._specialColors[A],color:U}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const A=[],D=B.split(";");for(let O=0;O<D.length;++O)if(/^\d+$/.exec(D[O])){const U=parseInt(D[O]);z(U)&&A.push({type:2,index:U})}return A.length&&this._onColor.fire(A),!0}restoreFgColor(B){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(B){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(B){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(B){return B.length!==2?(this.selectDefaultCharset(),!0):(B[0]==="/"||this._charsetService.setgCharset(x[B[0]],_.CHARSETS[B[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 B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,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=s.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=s.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new a.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let A=0;A<this._bufferService.rows;++A){const D=this._activeBuffer.ybase+this._activeBuffer.y+A,O=this._activeBuffer.lines.get(D);O&&(O.fill(B),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(B,A){const D=this._bufferService.buffer,O=this._optionsService.rawOptions;return(U=>(this._coreService.triggerDataEvent(`${l.C0.ESC}${U}${l.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${D.scrollTop+1};${D.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,A){this._dirtyRowTracker.markRangeDirty(B,A)}}i.InputHandler=F;let V=class{constructor(W){this._bufferService=W,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(W){W<this.start?this.start=W:W>this.end&&(this.end=W)}markRangeDirty(W,B){W>B&&(M=W,W=B,B=M),W<this.start&&(this.start=W),B>this.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function z(W){return 0<=W&&W<256}V=d([v(0,S.IBufferService)],V)},844:(C,i)=>{function c(d){for(const v of d)v.dispose();d.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const v=this._disposables.indexOf(d);v!==-1&&this._disposables.splice(v,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var v;this._isDisposed||d===this._value||((v=this._value)==null||v.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},i.toDisposable=function(d){return{dispose:d}},i.disposeArray=c,i.getDisposeArrayDisposable=function(d){return{dispose:()=>c(d)}}},1505:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(v,l,_){this._data[v]||(this._data[v]={}),this._data[v][l]=_}get(v,l){return this._data[v]?this._data[v][l]:void 0}clear(){this._data={}}}i.TwoKeyMap=c,i.FourKeyMap=class{constructor(){this._data=new c}set(d,v,l,_,b){this._data.get(d,v)||this._data.set(d,v,new c),this._data.get(d,v).set(l,_,b)}get(d,v,l,_){var b;return(b=this._data.get(d,v))==null?void 0:b.get(l,_)}clear(){this._data.clear()}}},6114:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof process<"u"&&"title"in process;const c=i.isNode?"node":navigator.userAgent,d=i.isNode?"node":navigator.platform;i.isFirefox=c.includes("Firefox"),i.isLegacyEdge=c.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(c),i.getSafariVersion=function(){if(!i.isSafari)return 0;const v=c.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),i.isIpad=d==="iPad",i.isIphone=d==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),i.isLinux=d.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(c)},6106:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SortedList=void 0;let c=0;i.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(c=this._search(this._getKey(d)),this._array.splice(c,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const v=this._getKey(d);if(v===void 0||(c=this._search(v),c===-1)||this._getKey(this._array[c])!==v)return!1;do if(this._array[c]===d)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===v);return!1}*getKeyIterator(d){if(this._array.length!==0&&(c=this._search(d),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===d))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===d)}forEachByKey(d,v){if(this._array.length!==0&&(c=this._search(d),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===d))do v(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===d)}values(){return[...this._array].values()}_search(d){let v=0,l=this._array.length-1;for(;l>=v;){let _=v+l>>1;const b=this._getKey(this._array[_]);if(b>d)l=_-1;else{if(!(b<d)){for(;_>0&&this._getKey(this._array[_-1])===d;)_--;return _}v=_+1}}return v}}},7226:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;const d=c(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),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(b){this._idleCallback=void 0;let w=0,f=0,s=b.timeRemaining(),n=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),f=Math.max(w,f),n=b.timeRemaining(),1.5*f>n)return s-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-w))}ms`),void this._start();s=n}this.clear()}}class l extends v{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const w=Date.now()+b;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}i.PriorityTaskQueue=l,i.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:l,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;const d=c(643);i.updateWindowsModeWrappedState=function(v){const l=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),_=l==null?void 0:l.get(v.cols-1),b=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);b&&_&&(b.isWrapped=_[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&_[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new c;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}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}}i.AttributeData=c;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,_=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=_}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=d},9092:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;const d=c(6349),v=c(7226),l=c(3734),_=c(8437),b=c(4634),w=c(511),f=c(643),s=c(4863),n=c(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(o,a,u){this._hasScrollback=o,this._optionsService=a,this._bufferService=u,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=n.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,f.WHITESPACE_CELL_CHAR,f.WHITESPACE_CELL_WIDTH,f.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new l.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new l.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,a){return new _.BufferLine(this._bufferService.cols,this.getNullCell(o),a)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const a=o+this._optionsService.rawOptions.scrollback;return a>i.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:a}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=_.DEFAULT_ATTR_DATA);let a=this._rows;for(;a--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,a){const u=this.getNullCell(_.DEFAULT_ATTR_DATA);let S=0;const m=this._getCorrectBufferLength(a);if(m>this.lines.maxLength&&(this.lines.maxLength=m),this.lines.length>0){if(this._cols<o)for(let p=0;p<this.lines.length;p++)S+=+this.lines.get(p).resize(o,u);let y=0;if(this._rows<a)for(let p=this._rows;p<a;p++)this.lines.length<a+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(o,u)):this.ybase>0&&this.lines.length<=this.ybase+this.y+y+1?(this.ybase--,y++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(o,u)));else for(let p=this._rows;p>a;p--)this.lines.length>a+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(m<this.lines.maxLength){const p=this.lines.length-m;p>0&&(this.lines.trimStart(p),this.ybase=Math.max(this.ybase-p,0),this.ydisp=Math.max(this.ydisp-p,0),this.savedY=Math.max(this.savedY-p,0)),this.lines.maxLength=m}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,a-1),y&&(this.y+=y),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=a-1,this._isReflowEnabled&&(this._reflow(o,a),this._cols>o))for(let y=0;y<this.lines.length;y++)S+=+this.lines.get(y).resize(o,u);this._cols=o,this._rows=a,this._memoryCleanupQueue.clear(),S>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let a=0;for(;this._memoryCleanupPosition<this.lines.length;)if(a+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),a>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,a){this._cols!==o&&(o>this._cols?this._reflowLarger(o,a):this._reflowSmaller(o,a))}_reflowLarger(o,a){const u=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(u.length>0){const S=(0,b.reflowLargerCreateNewLayout)(this.lines,u);(0,b.reflowLargerApplyNewLayout)(this.lines,S.layout),this._reflowLargerAdjustViewport(o,a,S.countRemoved)}}_reflowLargerAdjustViewport(o,a,u){const S=this.getNullCell(_.DEFAULT_ATTR_DATA);let m=u;for(;m-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<a&&this.lines.push(new _.BufferLine(o,S))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-u,0)}_reflowSmaller(o,a){const u=this.getNullCell(_.DEFAULT_ATTR_DATA),S=[];let m=0;for(let y=this.lines.length-1;y>=0;y--){let p=this.lines.get(y);if(!p||!p.isWrapped&&p.getTrimmedLength()<=o)continue;const k=[p];for(;p.isWrapped&&y>0;)p=this.lines.get(--y),k.unshift(p);const x=this.ybase+this.y;if(x>=y&&x<y+k.length)continue;const L=k[k.length-1].getTrimmedLength(),T=(0,b.reflowSmallerGetNewLineLengths)(k,this._cols,o),R=T.length-k.length;let M;M=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+R):Math.max(0,this.lines.length-this.lines.maxLength+R);const F=[];for(let D=0;D<R;D++){const O=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);F.push(O)}F.length>0&&(S.push({start:y+k.length+m,newLines:F}),m+=F.length),k.push(...F);let V=T.length-1,z=T[V];z===0&&(V--,z=T[V]);let W=k.length-R-1,B=L;for(;W>=0;){const D=Math.min(B,z);if(k[V]===void 0)break;if(k[V].copyCellsFrom(k[W],B-D,z-D,D,!0),z-=D,z===0&&(V--,z=T[V]),B-=D,B===0){W--;const O=Math.max(W,0);B=(0,b.getWrappedLineTrimmedLength)(k,O,this._cols)}}for(let D=0;D<k.length;D++)T[D]<o&&k[D].setCell(T[D],u);let A=R-M;for(;A-- >0;)this.ybase===0?this.y<a-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+m)-a&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+R,this.ybase+a-1)}if(S.length>0){const y=[],p=[];for(let V=0;V<this.lines.length;V++)p.push(this.lines.get(V));const k=this.lines.length;let x=k-1,L=0,T=S[L];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+m);let R=0;for(let V=Math.min(this.lines.maxLength-1,k+m-1);V>=0;V--)if(T&&T.start>x+R){for(let z=T.newLines.length-1;z>=0;z--)this.lines.set(V--,T.newLines[z]);V++,y.push({index:x+1,amount:T.newLines.length}),R+=T.newLines.length,T=S[++L]}else this.lines.set(V,p[x--]);let M=0;for(let V=y.length-1;V>=0;V--)y[V].index+=M,this.lines.onInsertEmitter.fire(y[V]),M+=y[V].amount;const F=Math.max(0,k+m-this.lines.maxLength);F>0&&this.lines.onTrimEmitter.fire(F)}}translateBufferLineToString(o,a,u=0,S){const m=this.lines.get(o);return m?m.translateToString(a,u,S):""}getWrappedRangeForLine(o){let a=o,u=o;for(;a>0&&this.lines.get(a).isWrapped;)a--;for(;u+1<this.lines.length&&this.lines.get(u+1).isWrapped;)u++;return{first:a,last:u}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].line===o&&(this.markers[a].dispose(),this.markers.splice(a--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const a=new s.Marker(o);return this.markers.push(a),a.register(this.lines.onTrim((u=>{a.line-=u,a.line<0&&a.dispose()}))),a.register(this.lines.onInsert((u=>{a.line>=u.index&&(a.line+=u.amount)}))),a.register(this.lines.onDelete((u=>{a.line>=u.index&&a.line<u.index+u.amount&&a.dispose(),a.line>u.index&&(a.line-=u.amount)}))),a.register(a.onDispose((()=>this._removeMarker(a)))),a}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;const d=c(3734),v=c(511),l=c(643),_=c(482);i.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let b=0;class w{constructor(s,n,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*s);const a=n||v.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]);for(let u=0;u<s;++u)this.setCell(u,a);this.length=s}get(s){const n=this._data[3*s+0],o=2097151&n;return[this._data[3*s+1],2097152&n?this._combined[s]:o?(0,_.stringFromCodePoint)(o):"",n>>22,2097152&n?this._combined[s].charCodeAt(this._combined[s].length-1):o]}set(s,n){this._data[3*s+1]=n[l.CHAR_DATA_ATTR_INDEX],n[l.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[s]=n[1],this._data[3*s+0]=2097152|s|n[l.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*s+0]=n[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|n[l.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(s){return this._data[3*s+0]>>22}hasWidth(s){return 12582912&this._data[3*s+0]}getFg(s){return this._data[3*s+1]}getBg(s){return this._data[3*s+2]}hasContent(s){return 4194303&this._data[3*s+0]}getCodePoint(s){const n=this._data[3*s+0];return 2097152&n?this._combined[s].charCodeAt(this._combined[s].length-1):2097151&n}isCombined(s){return 2097152&this._data[3*s+0]}getString(s){const n=this._data[3*s+0];return 2097152&n?this._combined[s]:2097151&n?(0,_.stringFromCodePoint)(2097151&n):""}isProtected(s){return 536870912&this._data[3*s+2]}loadCell(s,n){return b=3*s,n.content=this._data[b+0],n.fg=this._data[b+1],n.bg=this._data[b+2],2097152&n.content&&(n.combinedData=this._combined[s]),268435456&n.bg&&(n.extended=this._extendedAttrs[s]),n}setCell(s,n){2097152&n.content&&(this._combined[s]=n.combinedData),268435456&n.bg&&(this._extendedAttrs[s]=n.extended),this._data[3*s+0]=n.content,this._data[3*s+1]=n.fg,this._data[3*s+2]=n.bg}setCellFromCodepoint(s,n,o,a){268435456&a.bg&&(this._extendedAttrs[s]=a.extended),this._data[3*s+0]=n|o<<22,this._data[3*s+1]=a.fg,this._data[3*s+2]=a.bg}addCodepointToCell(s,n,o){let a=this._data[3*s+0];2097152&a?this._combined[s]+=(0,_.stringFromCodePoint)(n):2097151&a?(this._combined[s]=(0,_.stringFromCodePoint)(2097151&a)+(0,_.stringFromCodePoint)(n),a&=-2097152,a|=2097152):a=n|4194304,o&&(a&=-12582913,a|=o<<22),this._data[3*s+0]=a}insertCells(s,n,o){if((s%=this.length)&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,o),n<this.length-s){const a=new v.CellData;for(let u=this.length-s-n-1;u>=0;--u)this.setCell(s+n+u,this.loadCell(s+u,a));for(let u=0;u<n;++u)this.setCell(s+u,o)}else for(let a=s;a<this.length;++a)this.setCell(a,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(s,n,o){if(s%=this.length,n<this.length-s){const a=new v.CellData;for(let u=0;u<this.length-s-n;++u)this.setCell(s+u,this.loadCell(s+n+u,a));for(let u=this.length-n;u<this.length;++u)this.setCell(u,o)}else for(let a=s;a<this.length;++a)this.setCell(a,o);s&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,o),this.getWidth(s)!==0||this.hasContent(s)||this.setCellFromCodepoint(s,0,1,o)}replaceCells(s,n,o,a=!1){if(a)for(s&&this.getWidth(s-1)===2&&!this.isProtected(s-1)&&this.setCellFromCodepoint(s-1,0,1,o),n<this.length&&this.getWidth(n-1)===2&&!this.isProtected(n)&&this.setCellFromCodepoint(n,0,1,o);s<n&&s<this.length;)this.isProtected(s)||this.setCell(s,o),s++;else for(s&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s-1,0,1,o),n<this.length&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n,0,1,o);s<n&&s<this.length;)this.setCell(s++,o)}resize(s,n){if(s===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*s;if(s>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const a=new Uint32Array(o);a.set(this._data),this._data=a}for(let a=this.length;a<s;++a)this.setCell(a,n)}else{this._data=this._data.subarray(0,o);const a=Object.keys(this._combined);for(let S=0;S<a.length;S++){const m=parseInt(a[S],10);m>=s&&delete this._combined[m]}const u=Object.keys(this._extendedAttrs);for(let S=0;S<u.length;S++){const m=parseInt(u[S],10);m>=s&&delete this._extendedAttrs[m]}}return this.length=s,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const s=new Uint32Array(this._data.length);return s.set(this._data),this._data=s,1}return 0}fill(s,n=!1){if(n)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,s);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,s)}}copyFrom(s){this.length!==s.length?this._data=new Uint32Array(s._data):this._data.set(s._data),this.length=s.length,this._combined={};for(const n in s._combined)this._combined[n]=s._combined[n];this._extendedAttrs={};for(const n in s._extendedAttrs)this._extendedAttrs[n]=s._extendedAttrs[n];this.isWrapped=s.isWrapped}clone(){const s=new w(0);s._data=new Uint32Array(this._data),s.length=this.length;for(const n in this._combined)s._combined[n]=this._combined[n];for(const n in this._extendedAttrs)s._extendedAttrs[n]=this._extendedAttrs[n];return s.isWrapped=this.isWrapped,s}getTrimmedLength(){for(let s=this.length-1;s>=0;--s)if(4194303&this._data[3*s+0])return s+(this._data[3*s+0]>>22);return 0}getNoBgTrimmedLength(){for(let s=this.length-1;s>=0;--s)if(4194303&this._data[3*s+0]||50331648&this._data[3*s+2])return s+(this._data[3*s+0]>>22);return 0}copyCellsFrom(s,n,o,a,u){const S=s._data;if(u)for(let y=a-1;y>=0;y--){for(let p=0;p<3;p++)this._data[3*(o+y)+p]=S[3*(n+y)+p];268435456&S[3*(n+y)+2]&&(this._extendedAttrs[o+y]=s._extendedAttrs[n+y])}else for(let y=0;y<a;y++){for(let p=0;p<3;p++)this._data[3*(o+y)+p]=S[3*(n+y)+p];268435456&S[3*(n+y)+2]&&(this._extendedAttrs[o+y]=s._extendedAttrs[n+y])}const m=Object.keys(s._combined);for(let y=0;y<m.length;y++){const p=parseInt(m[y],10);p>=n&&(this._combined[p-n+o]=s._combined[p])}}translateToString(s,n,o,a){n=n??0,o=o??this.length,s&&(o=Math.min(o,this.getTrimmedLength())),a&&(a.length=0);let u="";for(;n<o;){const S=this._data[3*n+0],m=2097151&S,y=2097152&S?this._combined[n]:m?(0,_.stringFromCodePoint)(m):l.WHITESPACE_CELL_CHAR;if(u+=y,a)for(let p=0;p<y.length;++p)a.push(n);n+=S>>22||1}return a&&a.push(n),u}}i.BufferLine=w},4841:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(c,d){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 d*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(C,i)=>{function c(d,v,l){if(v===d.length-1)return d[v].getTrimmedLength();const _=!d[v].hasContent(l-1)&&d[v].getWidth(l-1)===1,b=d[v+1].getWidth(0)===2;return _&&b?l-1:l}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(d,v,l,_,b){const w=[];for(let f=0;f<d.length-1;f++){let s=f,n=d.get(++s);if(!n.isWrapped)continue;const o=[d.get(f)];for(;s<d.length&&n.isWrapped;)o.push(n),n=d.get(++s);if(_>=f&&_<s){f+=o.length-1;continue}let a=0,u=c(o,a,v),S=1,m=0;for(;S<o.length;){const p=c(o,S,v),k=p-m,x=l-u,L=Math.min(k,x);o[a].copyCellsFrom(o[S],m,u,L,!1),u+=L,u===l&&(a++,u=0),m+=L,m===p&&(S++,m=0),u===0&&a!==0&&o[a-1].getWidth(l-1)===2&&(o[a].copyCellsFrom(o[a-1],l-1,u++,1,!1),o[a-1].setCell(l-1,b))}o[a].replaceCells(u,l,b);let y=0;for(let p=o.length-1;p>0&&(p>a||o[p].getTrimmedLength()===0);p--)y++;y>0&&(w.push(f+o.length-y),w.push(y)),f+=o.length-1}return w},i.reflowLargerCreateNewLayout=function(d,v){const l=[];let _=0,b=v[_],w=0;for(let f=0;f<d.length;f++)if(b===f){const s=v[++_];d.onDeleteEmitter.fire({index:f-w,amount:s}),f+=s-1,w+=s,b=v[++_]}else l.push(f);return{layout:l,countRemoved:w}},i.reflowLargerApplyNewLayout=function(d,v){const l=[];for(let _=0;_<v.length;_++)l.push(d.get(v[_]));for(let _=0;_<l.length;_++)d.set(_,l[_]);d.length=v.length},i.reflowSmallerGetNewLineLengths=function(d,v,l){const _=[],b=d.map(((n,o)=>c(d,o,v))).reduce(((n,o)=>n+o));let w=0,f=0,s=0;for(;s<b;){if(b-s<l){_.push(b-s);break}w+=l;const n=c(d,f,v);w>n&&(w-=n,f++);const o=d[f].getWidth(w-1)===2;o&&w--;const a=o?l-1:l;_.push(a),s+=a}return _},i.getWrappedLineTrimmedLength=c},5295:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;const d=c(8460),v=c(844),l=c(9092);class _ extends v.Disposable{constructor(w,f){super(),this._optionsService=w,this._bufferService=f,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new l.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new l.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(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),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(w,f){this._normal.resize(w,f),this._alt.resize(w,f),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}i.BufferSet=_},511:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;const d=c(482),v=c(643),l=c(3734);class _ extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const f=new _;return f.setFromCharData(w),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(w[v.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(w[v.CHAR_DATA_CHAR_INDEX].length===2){const s=w[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=s&&s<=56319){const n=w[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=n&&n<=57343?this.content=1024*(s-55296)+n-56320+65536|w[v.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=w[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[v.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=w[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=_},643:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},4863:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;const d=c(8460),v=c(844);class l{get id(){return this._id}constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=l._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(b){return this._disposables.push(b),b}}i.Marker=l,l._nextId=1},7116:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.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:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(C,i)=>{var c,d,v;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,(function(l){l.NUL="\0",l.SOH="",l.STX="",l.ETX="",l.EOT="",l.ENQ="",l.ACK="",l.BEL="\x07",l.BS="\b",l.HT=" ",l.LF=`
|
|
163
|
-
`,l.VT="\v",l.FF="\f",l.CR="\r",l.SO="",l.SI="",l.DLE="",l.DC1="",l.DC2="",l.DC3="",l.DC4="",l.NAK="",l.SYN="",l.ETB="",l.CAN="",l.EM="",l.SUB="",l.ESC="\x1B",l.FS="",l.GS="",l.RS="",l.US="",l.SP=" ",l.DEL=""})(c||(i.C0=c={})),(function(l){l.PAD="",l.HOP="",l.BPH="",l.NBH="",l.IND="",l.NEL="
",l.SSA="",l.ESA="",l.HTS="",l.HTJ="",l.VTS="",l.PLD="",l.PLU="",l.RI="",l.SS2="",l.SS3="",l.DCS="",l.PU1="",l.PU2="",l.STS="",l.CCH="",l.MW="",l.SPA="",l.EPA="",l.SOS="",l.SGCI="",l.SCI="",l.CSI="",l.ST="",l.OSC="",l.PM="",l.APC=""})(d||(i.C1=d={})),(function(l){l.ST=`${c.ESC}\\`})(v||(i.C1_ESCAPED=v={}))},7399:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;const d=c(2584),v={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:["'",'"']};i.evaluateKeyboardEvent=function(l,_,b,w){const f={type:0,cancel:!1,key:void 0},s=(l.shiftKey?1:0)|(l.altKey?2:0)|(l.ctrlKey?4:0)|(l.metaKey?8:0);switch(l.keyCode){case 0:l.key==="UIKeyInputUpArrow"?f.key=_?d.C0.ESC+"OA":d.C0.ESC+"[A":l.key==="UIKeyInputLeftArrow"?f.key=_?d.C0.ESC+"OD":d.C0.ESC+"[D":l.key==="UIKeyInputRightArrow"?f.key=_?d.C0.ESC+"OC":d.C0.ESC+"[C":l.key==="UIKeyInputDownArrow"&&(f.key=_?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:f.key=l.ctrlKey?"\b":d.C0.DEL,l.altKey&&(f.key=d.C0.ESC+f.key);break;case 9:if(l.shiftKey){f.key=d.C0.ESC+"[Z";break}f.key=d.C0.HT,f.cancel=!0;break;case 13:f.key=l.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,f.cancel=!0;break;case 27:f.key=d.C0.ESC,l.altKey&&(f.key=d.C0.ESC+d.C0.ESC),f.cancel=!0;break;case 37:if(l.metaKey)break;s?(f.key=d.C0.ESC+"[1;"+(s+1)+"D",f.key===d.C0.ESC+"[1;3D"&&(f.key=d.C0.ESC+(b?"b":"[1;5D"))):f.key=_?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(l.metaKey)break;s?(f.key=d.C0.ESC+"[1;"+(s+1)+"C",f.key===d.C0.ESC+"[1;3C"&&(f.key=d.C0.ESC+(b?"f":"[1;5C"))):f.key=_?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(l.metaKey)break;s?(f.key=d.C0.ESC+"[1;"+(s+1)+"A",b||f.key!==d.C0.ESC+"[1;3A"||(f.key=d.C0.ESC+"[1;5A")):f.key=_?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(l.metaKey)break;s?(f.key=d.C0.ESC+"[1;"+(s+1)+"B",b||f.key!==d.C0.ESC+"[1;3B"||(f.key=d.C0.ESC+"[1;5B")):f.key=_?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:l.shiftKey||l.ctrlKey||(f.key=d.C0.ESC+"[2~");break;case 46:f.key=s?d.C0.ESC+"[3;"+(s+1)+"~":d.C0.ESC+"[3~";break;case 36:f.key=s?d.C0.ESC+"[1;"+(s+1)+"H":_?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:f.key=s?d.C0.ESC+"[1;"+(s+1)+"F":_?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:l.shiftKey?f.type=2:l.ctrlKey?f.key=d.C0.ESC+"[5;"+(s+1)+"~":f.key=d.C0.ESC+"[5~";break;case 34:l.shiftKey?f.type=3:l.ctrlKey?f.key=d.C0.ESC+"[6;"+(s+1)+"~":f.key=d.C0.ESC+"[6~";break;case 112:f.key=s?d.C0.ESC+"[1;"+(s+1)+"P":d.C0.ESC+"OP";break;case 113:f.key=s?d.C0.ESC+"[1;"+(s+1)+"Q":d.C0.ESC+"OQ";break;case 114:f.key=s?d.C0.ESC+"[1;"+(s+1)+"R":d.C0.ESC+"OR";break;case 115:f.key=s?d.C0.ESC+"[1;"+(s+1)+"S":d.C0.ESC+"OS";break;case 116:f.key=s?d.C0.ESC+"[15;"+(s+1)+"~":d.C0.ESC+"[15~";break;case 117:f.key=s?d.C0.ESC+"[17;"+(s+1)+"~":d.C0.ESC+"[17~";break;case 118:f.key=s?d.C0.ESC+"[18;"+(s+1)+"~":d.C0.ESC+"[18~";break;case 119:f.key=s?d.C0.ESC+"[19;"+(s+1)+"~":d.C0.ESC+"[19~";break;case 120:f.key=s?d.C0.ESC+"[20;"+(s+1)+"~":d.C0.ESC+"[20~";break;case 121:f.key=s?d.C0.ESC+"[21;"+(s+1)+"~":d.C0.ESC+"[21~";break;case 122:f.key=s?d.C0.ESC+"[23;"+(s+1)+"~":d.C0.ESC+"[23~";break;case 123:f.key=s?d.C0.ESC+"[24;"+(s+1)+"~":d.C0.ESC+"[24~";break;default:if(!l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)if(b&&!w||!l.altKey||l.metaKey)!b||l.altKey||l.ctrlKey||l.shiftKey||!l.metaKey?l.key&&!l.ctrlKey&&!l.altKey&&!l.metaKey&&l.keyCode>=48&&l.key.length===1?f.key=l.key:l.key&&l.ctrlKey&&(l.key==="_"&&(f.key=d.C0.US),l.key==="@"&&(f.key=d.C0.NUL)):l.keyCode===65&&(f.type=1);else{const n=v[l.keyCode],o=n==null?void 0:n[l.shiftKey?1:0];if(o)f.key=d.C0.ESC+o;else if(l.keyCode>=65&&l.keyCode<=90){const a=l.ctrlKey?l.keyCode-64:l.keyCode+32;let u=String.fromCharCode(a);l.shiftKey&&(u=u.toUpperCase()),f.key=d.C0.ESC+u}else if(l.keyCode===32)f.key=d.C0.ESC+(l.ctrlKey?d.C0.NUL:" ");else if(l.key==="Dead"&&l.code.startsWith("Key")){let a=l.code.slice(3,4);l.shiftKey||(a=a.toLowerCase()),f.key=d.C0.ESC+a,f.cancel=!0}}else l.keyCode>=65&&l.keyCode<=90?f.key=String.fromCharCode(l.keyCode-64):l.keyCode===32?f.key=d.C0.NUL:l.keyCode>=51&&l.keyCode<=55?f.key=String.fromCharCode(l.keyCode-51+27):l.keyCode===56?f.key=d.C0.DEL:l.keyCode===219?f.key=d.C0.ESC:l.keyCode===220?f.key=d.C0.FS:l.keyCode===221&&(f.key=d.C0.GS)}return f}},482:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},i.utf32ToString=function(c,d=0,v=c.length){let l="";for(let _=d;_<v;++_){let b=c[_];b>65535?(b-=65536,l+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):l+=String.fromCharCode(b)}return l},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,d){const v=c.length;if(!v)return 0;let l=0,_=0;if(this._interim){const b=c.charCodeAt(_++);56320<=b&&b<=57343?d[l++]=1024*(this._interim-55296)+b-56320+65536:(d[l++]=this._interim,d[l++]=b),this._interim=0}for(let b=_;b<v;++b){const w=c.charCodeAt(b);if(55296<=w&&w<=56319){if(++b>=v)return this._interim=w,l;const f=c.charCodeAt(b);56320<=f&&f<=57343?d[l++]=1024*(w-55296)+f-56320+65536:(d[l++]=w,d[l++]=f)}else w!==65279&&(d[l++]=w)}return l}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,d){const v=c.length;if(!v)return 0;let l,_,b,w,f=0,s=0,n=0;if(this.interim[0]){let u=!1,S=this.interim[0];S&=(224&S)==192?31:(240&S)==224?15:7;let m,y=0;for(;(m=63&this.interim[++y])&&y<4;)S<<=6,S|=m;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,k=p-y;for(;n<k;){if(n>=v)return 0;if(m=c[n++],(192&m)!=128){n--,u=!0;break}this.interim[y++]=m,S<<=6,S|=63&m}u||(p===2?S<128?n--:d[f++]=S:p===3?S<2048||S>=55296&&S<=57343||S===65279||(d[f++]=S):S<65536||S>1114111||(d[f++]=S)),this.interim.fill(0)}const o=v-4;let a=n;for(;a<v;){for(;!(!(a<o)||128&(l=c[a])||128&(_=c[a+1])||128&(b=c[a+2])||128&(w=c[a+3]));)d[f++]=l,d[f++]=_,d[f++]=b,d[f++]=w,a+=4;if(l=c[a++],l<128)d[f++]=l;else if((224&l)==192){if(a>=v)return this.interim[0]=l,f;if(_=c[a++],(192&_)!=128){a--;continue}if(s=(31&l)<<6|63&_,s<128){a--;continue}d[f++]=s}else if((240&l)==224){if(a>=v)return this.interim[0]=l,f;if(_=c[a++],(192&_)!=128){a--;continue}if(a>=v)return this.interim[0]=l,this.interim[1]=_,f;if(b=c[a++],(192&b)!=128){a--;continue}if(s=(15&l)<<12|(63&_)<<6|63&b,s<2048||s>=55296&&s<=57343||s===65279)continue;d[f++]=s}else if((248&l)==240){if(a>=v)return this.interim[0]=l,f;if(_=c[a++],(192&_)!=128){a--;continue}if(a>=v)return this.interim[0]=l,this.interim[1]=_,f;if(b=c[a++],(192&b)!=128){a--;continue}if(a>=v)return this.interim[0]=l,this.interim[1]=_,this.interim[2]=b,f;if(w=c[a++],(192&w)!=128){a--;continue}if(s=(7&l)<<18|(63&_)<<12|(63&b)<<6|63&w,s<65536||s>1114111)continue;d[f++]=s}}return f}}},225:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const d=c(1480),v=[[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]],l=[[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 _;i.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 b=0;b<v.length;++b)_.fill(0,v[b][0],v[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?_[b]:(function(w,f){let s,n=0,o=f.length-1;if(w<f[0][0]||w>f[o][1])return!1;for(;o>=n;)if(s=n+o>>1,w>f[s][1])n=s+1;else{if(!(w<f[s][0]))return!0;o=s-1}return!1})(b,l)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,w){let f=this.wcwidth(b),s=f===0&&w!==0;if(s){const n=d.UnicodeService.extractWidth(w);n===0?s=!1:n>f&&(f=n)}return d.UnicodeService.createPropertyValue(0,f,s)}}},5981:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;const d=c(8460),v=c(844);class l extends v.Disposable{constructor(b){super(),this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(b,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let f;for(this._isSyncWriting=!0;f=this._writeBuffer.shift();){this._action(f);const s=this._callbacks.shift();s&&s()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(b,w){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+=b.length,this._writeBuffer.push(b),this._callbacks.push(w),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(w)}_innerWrite(b=0,w=!0){const f=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const s=this._writeBuffer[this._bufferOffset],n=this._action(s,w);if(n){const a=u=>Date.now()-f>=12?setTimeout((()=>this._innerWrite(0,u))):this._innerWrite(f,u);return void n.catch((u=>(queueMicrotask((()=>{throw u})),Promise.resolve(!1)))).then(a)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=s.length,Date.now()-f>=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()}}i.WriteBuffer=l},5941:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.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})$/,d=/^[\da-f]+$/;function v(l,_){const b=l.toString(16),w=b.length<2?"0"+b:b;switch(_){case 4:return b[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}i.parseColor=function(l){if(!l)return;let _=l.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const b=c.exec(_);if(b){const w=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/w*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/w*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/w*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),d.exec(_)&&[3,6,9,12].includes(_.length))){const b=_.length/3,w=[0,0,0];for(let f=0;f<3;++f){const s=parseInt(_.slice(b*f,b*f+b),16);w[f]=b===1?s<<4:b===2?s:b===3?s>>4:s>>8}return w}},i.toRgbString=function(l,_=16){const[b,w,f]=l;return`rgb:${v(b,_)}/${v(w,_)}/${v(f,_)}`}},5770:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;const d=c(482),v=c(8742),l=c(5770),_=[];i.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(w,f){this._handlers[w]===void 0&&(this._handlers[w]=[]);const s=this._handlers[w];return s.push(f),{dispose:()=>{const n=s.indexOf(f);n!==-1&&s.splice(n,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0}hook(w,f){if(this.reset(),this._ident=w,this._active=this._handlers[w]||_,this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].hook(f);else this._handlerFb(this._ident,"HOOK",f)}put(w,f,s){if(this._active.length)for(let n=this._active.length-1;n>=0;n--)this._active[n].put(w,f,s);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(w,f,s))}unhook(w,f=!0){if(this._active.length){let s=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,s=f,o=this._stack.fallThrough,this._stack.paused=!1),!o&&s===!1){for(;n>=0&&(s=this._active[n].unhook(w),s!==!0);n--)if(s instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,s;n--}for(;n>=0;n--)if(s=this._active[n].unhook(!1),s instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,s}else this._handlerFb(this._ident,"UNHOOK",w);this._active=_,this._ident=0}};const b=new v.Params;b.addParam(0),i.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=b,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():b,this._data="",this._hitLimit=!1}put(w,f,s){this._hitLimit||(this._data+=(0,d.utf32ToString)(w,f,s),this._data.length>l.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let f=!1;if(this._hitLimit)f=!1;else if(w&&(f=this._handler(this._data,this._params),f instanceof Promise))return f.then((s=>(this._params=b,this._data="",this._hitLimit=!1,s)));return this._params=b,this._data="",this._hitLimit=!1,f}}},2015:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;const d=c(844),v=c(8742),l=c(6242),_=c(6351);class b{constructor(n){this.table=new Uint8Array(n)}setDefault(n,o){this.table.fill(n<<4|o)}add(n,o,a,u){this.table[o<<8|n]=a<<4|u}addMany(n,o,a,u){for(let S=0;S<n.length;S++)this.table[o<<8|n[S]]=a<<4|u}}i.TransitionTable=b;const w=160;i.VT500_TRANSITION_TABLE=(function(){const s=new b(4095),n=Array.apply(null,Array(256)).map(((y,p)=>p)),o=(y,p)=>n.slice(y,p),a=o(32,127),u=o(0,24);u.push(25),u.push.apply(u,o(28,32));const S=o(0,14);let m;for(m in s.setDefault(1,0),s.addMany(a,0,2,0),S)s.addMany([24,26,153,154],m,3,0),s.addMany(o(128,144),m,3,0),s.addMany(o(144,152),m,3,0),s.add(156,m,0,0),s.add(27,m,11,1),s.add(157,m,4,8),s.addMany([152,158,159],m,0,7),s.add(155,m,11,3),s.add(144,m,11,9);return s.addMany(u,0,3,0),s.addMany(u,1,3,1),s.add(127,1,0,1),s.addMany(u,8,0,8),s.addMany(u,3,3,3),s.add(127,3,0,3),s.addMany(u,4,3,4),s.add(127,4,0,4),s.addMany(u,6,3,6),s.addMany(u,5,3,5),s.add(127,5,0,5),s.addMany(u,2,3,2),s.add(127,2,0,2),s.add(93,1,4,8),s.addMany(a,8,5,8),s.add(127,8,5,8),s.addMany([156,27,24,26,7],8,6,0),s.addMany(o(28,32),8,0,8),s.addMany([88,94,95],1,0,7),s.addMany(a,7,0,7),s.addMany(u,7,0,7),s.add(156,7,0,0),s.add(127,7,0,7),s.add(91,1,11,3),s.addMany(o(64,127),3,7,0),s.addMany(o(48,60),3,8,4),s.addMany([60,61,62,63],3,9,4),s.addMany(o(48,60),4,8,4),s.addMany(o(64,127),4,7,0),s.addMany([60,61,62,63],4,0,6),s.addMany(o(32,64),6,0,6),s.add(127,6,0,6),s.addMany(o(64,127),6,0,0),s.addMany(o(32,48),3,9,5),s.addMany(o(32,48),5,9,5),s.addMany(o(48,64),5,0,6),s.addMany(o(64,127),5,7,0),s.addMany(o(32,48),4,9,5),s.addMany(o(32,48),1,9,2),s.addMany(o(32,48),2,9,2),s.addMany(o(48,127),2,10,0),s.addMany(o(48,80),1,10,0),s.addMany(o(81,88),1,10,0),s.addMany([89,90,92],1,10,0),s.addMany(o(96,127),1,10,0),s.add(80,1,11,9),s.addMany(u,9,0,9),s.add(127,9,0,9),s.addMany(o(28,32),9,0,9),s.addMany(o(32,48),9,9,12),s.addMany(o(48,60),9,8,10),s.addMany([60,61,62,63],9,9,10),s.addMany(u,11,0,11),s.addMany(o(32,128),11,0,11),s.addMany(o(28,32),11,0,11),s.addMany(u,10,0,10),s.add(127,10,0,10),s.addMany(o(28,32),10,0,10),s.addMany(o(48,60),10,8,10),s.addMany([60,61,62,63],10,0,11),s.addMany(o(32,48),10,9,12),s.addMany(u,12,0,12),s.add(127,12,0,12),s.addMany(o(28,32),12,0,12),s.addMany(o(32,48),12,9,12),s.addMany(o(48,64),12,0,11),s.addMany(o(64,127),12,12,13),s.addMany(o(64,127),10,12,13),s.addMany(o(64,127),9,12,13),s.addMany(u,13,13,13),s.addMany(a,13,13,13),s.add(127,13,0,13),s.addMany([27,156,24,26],13,14,0),s.add(w,0,2,0),s.add(w,8,5,8),s.add(w,6,0,6),s.add(w,11,0,11),s.add(w,13,13,13),s})();class f extends d.Disposable{constructor(n=i.VT500_TRANSITION_TABLE){super(),this._transitions=n,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,a,u)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,a)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new l.OscParser),this._dcsParser=this.register(new _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(n,o=[64,126]){let a=0;if(n.prefix){if(n.prefix.length>1)throw new Error("only one byte as prefix supported");if(a=n.prefix.charCodeAt(0),a&&60>a||a>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(n.intermediates){if(n.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let S=0;S<n.intermediates.length;++S){const m=n.intermediates.charCodeAt(S);if(32>m||m>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");a<<=8,a|=m}}if(n.final.length!==1)throw new Error("final must be a single byte");const u=n.final.charCodeAt(0);if(o[0]>u||u>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return a<<=8,a|=u,a}identToString(n){const o=[];for(;n;)o.push(String.fromCharCode(255&n)),n>>=8;return o.reverse().join("")}setPrintHandler(n){this._printHandler=n}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(n,o){const a=this._identifier(n,[48,126]);this._escHandlers[a]===void 0&&(this._escHandlers[a]=[]);const u=this._escHandlers[a];return u.push(o),{dispose:()=>{const S=u.indexOf(o);S!==-1&&u.splice(S,1)}}}clearEscHandler(n){this._escHandlers[this._identifier(n,[48,126])]&&delete this._escHandlers[this._identifier(n,[48,126])]}setEscHandlerFallback(n){this._escHandlerFb=n}setExecuteHandler(n,o){this._executeHandlers[n.charCodeAt(0)]=o}clearExecuteHandler(n){this._executeHandlers[n.charCodeAt(0)]&&delete this._executeHandlers[n.charCodeAt(0)]}setExecuteHandlerFallback(n){this._executeHandlerFb=n}registerCsiHandler(n,o){const a=this._identifier(n);this._csiHandlers[a]===void 0&&(this._csiHandlers[a]=[]);const u=this._csiHandlers[a];return u.push(o),{dispose:()=>{const S=u.indexOf(o);S!==-1&&u.splice(S,1)}}}clearCsiHandler(n){this._csiHandlers[this._identifier(n)]&&delete this._csiHandlers[this._identifier(n)]}setCsiHandlerFallback(n){this._csiHandlerFb=n}registerDcsHandler(n,o){return this._dcsParser.registerHandler(this._identifier(n),o)}clearDcsHandler(n){this._dcsParser.clearHandler(this._identifier(n))}setDcsHandlerFallback(n){this._dcsParser.setHandlerFallback(n)}registerOscHandler(n,o){return this._oscParser.registerHandler(n,o)}clearOscHandler(n){this._oscParser.clearHandler(n)}setOscHandlerFallback(n){this._oscParser.setHandlerFallback(n)}setErrorHandler(n){this._errorHandler=n}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(n,o,a,u,S){this._parseStack.state=n,this._parseStack.handlers=o,this._parseStack.handlerPos=a,this._parseStack.transition=u,this._parseStack.chunkPos=S}parse(n,o,a){let u,S=0,m=0,y=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,y=this._parseStack.chunkPos+1;else{if(a===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const p=this._parseStack.handlers;let k=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(a===!1&&k>-1){for(;k>=0&&(u=p[k](this._params),u!==!0);k--)if(u instanceof Promise)return this._parseStack.handlerPos=k,u}this._parseStack.handlers=[];break;case 4:if(a===!1&&k>-1){for(;k>=0&&(u=p[k](),u!==!0);k--)if(u instanceof Promise)return this._parseStack.handlerPos=k,u}this._parseStack.handlers=[];break;case 6:if(S=n[this._parseStack.chunkPos],u=this._dcsParser.unhook(S!==24&&S!==26,a),u)return u;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(S=n[this._parseStack.chunkPos],u=this._oscParser.end(S!==24&&S!==26,a),u)return u;S===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,y=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let p=y;p<o;++p){switch(S=n[p],m=this._transitions.table[this.currentState<<8|(S<160?S:w)],m>>4){case 2:for(let R=p+1;;++R){if(R>=o||(S=n[R])<32||S>126&&S<w){this._printHandler(n,p,R),p=R-1;break}if(++R>=o||(S=n[R])<32||S>126&&S<w){this._printHandler(n,p,R),p=R-1;break}if(++R>=o||(S=n[R])<32||S>126&&S<w){this._printHandler(n,p,R),p=R-1;break}if(++R>=o||(S=n[R])<32||S>126&&S<w){this._printHandler(n,p,R),p=R-1;break}}break;case 3:this._executeHandlers[S]?this._executeHandlers[S]():this._executeHandlerFb(S),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:S,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const k=this._csiHandlers[this._collect<<8|S];let x=k?k.length-1:-1;for(;x>=0&&(u=k[x](this._params),u!==!0);x--)if(u instanceof Promise)return this._preserveStack(3,k,x,m,p),u;x<0&&this._csiHandlerFb(this._collect<<8|S,this._params),this.precedingJoinState=0;break;case 8:do switch(S){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(S-48)}while(++p<o&&(S=n[p])>47&&S<60);p--;break;case 9:this._collect<<=8,this._collect|=S;break;case 10:const L=this._escHandlers[this._collect<<8|S];let T=L?L.length-1:-1;for(;T>=0&&(u=L[T](),u!==!0);T--)if(u instanceof Promise)return this._preserveStack(4,L,T,m,p),u;T<0&&this._escHandlerFb(this._collect<<8|S),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|S,this._params);break;case 13:for(let R=p+1;;++R)if(R>=o||(S=n[R])===24||S===26||S===27||S>127&&S<w){this._dcsParser.put(n,p,R),p=R-1;break}break;case 14:if(u=this._dcsParser.unhook(S!==24&&S!==26),u)return this._preserveStack(6,[],0,m,p),u;S===27&&(m|=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 R=p+1;;R++)if(R>=o||(S=n[R])<32||S>127&&S<w){this._oscParser.put(n,p,R),p=R-1;break}break;case 6:if(u=this._oscParser.end(S!==24&&S!==26),u)return this._preserveStack(5,[],0,m,p),u;S===27&&(m|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&m}}}i.EscapeSequenceParser=f},6242:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;const d=c(5770),v=c(482),l=[];i.OscParser=class{constructor(){this._state=0,this._active=l,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(_,b){this._handlers[_]===void 0&&(this._handlers[_]=[]);const w=this._handlers[_];return w.push(b),{dispose:()=>{const f=w.indexOf(b);f!==-1&&w.splice(f,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=l}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=l,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||l,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,b,w){if(this._active.length)for(let f=this._active.length-1;f>=0;f--)this._active[f].put(_,b,w);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(_,b,w))}start(){this.reset(),this._state=1}put(_,b,w){if(this._state!==3){if(this._state===1)for(;b<w;){const f=_[b++];if(f===59){this._state=2,this._start();break}if(f<48||57<f)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+f-48}this._state===2&&w-b>0&&this._put(_,b,w)}}end(_,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,f=this._active.length-1,s=!1;if(this._stack.paused&&(f=this._stack.loopPosition-1,w=b,s=this._stack.fallThrough,this._stack.paused=!1),!s&&w===!1){for(;f>=0&&(w=this._active[f].end(_),w!==!0);f--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!1,w;f--}for(;f>=0;f--)if(w=this._active[f].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",_);this._active=l,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,b,w){this._hitLimit||(this._data+=(0,v.utf32ToString)(_,b,w),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let b=!1;if(this._hitLimit)b=!1;else if(_&&(b=this._handler(this._data),b instanceof Promise))return b.then((w=>(this._data="",this._hitLimit=!1,w)));return this._data="",this._hitLimit=!1,b}}},8742:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;const c=2147483647;class d{static fromArray(l){const _=new d;if(!l.length)return _;for(let b=Array.isArray(l[0])?1:0;b<l.length;++b){const w=l[b];if(Array.isArray(w))for(let f=0;f<w.length;++f)_.addSubParam(w[f]);else _.addParam(w)}return _}constructor(l=32,_=32){if(this.maxLength=l,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(l),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(l),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const l=new d(this.maxLength,this.maxSubParamsLength);return l.params.set(this.params),l.length=this.length,l._subParams.set(this._subParams),l._subParamsLength=this._subParamsLength,l._subParamsIdx.set(this._subParamsIdx),l._rejectDigits=this._rejectDigits,l._rejectSubDigits=this._rejectSubDigits,l._digitIsSub=this._digitIsSub,l}toArray(){const l=[];for(let _=0;_<this.length;++_){l.push(this.params[_]);const b=this._subParamsIdx[_]>>8,w=255&this._subParamsIdx[_];w-b>0&&l.push(Array.prototype.slice.call(this._subParams,b,w))}return l}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(l){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=l>c?c:l}}addSubParam(l){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=l>c?c:l,this._subParamsIdx[this.length-1]++}}hasSubParams(l){return(255&this._subParamsIdx[l])-(this._subParamsIdx[l]>>8)>0}getSubParams(l){const _=this._subParamsIdx[l]>>8,b=255&this._subParamsIdx[l];return b-_>0?this._subParams.subarray(_,b):null}getSubParamsAll(){const l={};for(let _=0;_<this.length;++_){const b=this._subParamsIdx[_]>>8,w=255&this._subParamsIdx[_];w-b>0&&(l[_]=this._subParams.slice(b,w))}return l}addDigit(l){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,w=b[_-1];b[_-1]=~w?Math.min(10*w+l,c):l}}i.Params=d},5741:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0,i.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,d){const v={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(v),d.dispose=()=>this._wrappedAddonDispose(v),d.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let d=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===c){d=v;break}if(d===-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(d,1)}}},8771:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;const d=c(3785),v=c(511);i.BufferApiView=class{constructor(l,_){this._buffer=l,this.type=_}init(l){return this._buffer=l,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(l){const _=this._buffer.lines.get(l);if(_)return new d.BufferLineApiView(_)}getNullCell(){return new v.CellData}}},3785:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;const d=c(511);i.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,l){if(!(v<0||v>=this._line.length))return l?(this._line.loadCell(v,l),l):this._line.loadCell(v,new d.CellData)}translateToString(v,l,_){return this._line.translateToString(v,l,_)}}},8285:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;const d=c(8771),v=c(8460),l=c(844);class _ extends l.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}i.BufferNamespaceApi=_},7975:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,d){return this._core.registerCsiHandler(c,(v=>d(v.toArray())))}addCsiHandler(c,d){return this.registerCsiHandler(c,d)}registerDcsHandler(c,d){return this._core.registerDcsHandler(c,((v,l)=>d(v,l.toArray())))}addDcsHandler(c,d){return this.registerDcsHandler(c,d)}registerEscHandler(c,d){return this._core.registerEscHandler(c,d)}addEscHandler(c,d){return this.registerEscHandler(c,d)}registerOscHandler(c,d){return this._core.registerOscHandler(c,d)}addOscHandler(c,d){return this.registerOscHandler(c,d)}}},7090:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0,i.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(C,i,c){var d=this&&this.__decorate||function(s,n,o,a){var u,S=arguments.length,m=S<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(s,n,o,a);else for(var y=s.length-1;y>=0;y--)(u=s[y])&&(m=(S<3?u(m):S>3?u(n,o,m):u(n,o))||m);return S>3&&m&&Object.defineProperty(n,o,m),m},v=this&&this.__param||function(s,n){return function(o,a){n(o,a,s)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;const l=c(8460),_=c(844),b=c(5295),w=c(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let f=i.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(s){super(),this.isUserScrolling=!1,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(s.rawOptions.cols||0,i.MINIMUM_COLS),this.rows=Math.max(s.rawOptions.rows||0,i.MINIMUM_ROWS),this.buffers=this.register(new b.BufferSet(s,this))}resize(s,n){this.cols=s,this.rows=n,this.buffers.resize(s,n),this._onResize.fire({cols:s,rows:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(s,n=!1){const o=this.buffer;let a;a=this._cachedBlankLine,a&&a.length===this.cols&&a.getFg(0)===s.fg&&a.getBg(0)===s.bg||(a=o.getBlankLine(s,n),this._cachedBlankLine=a),a.isWrapped=n;const u=o.ybase+o.scrollTop,S=o.ybase+o.scrollBottom;if(o.scrollTop===0){const m=o.lines.isFull;S===o.lines.length-1?m?o.lines.recycle().copyFrom(a):o.lines.push(a.clone()):o.lines.splice(S+1,0,a.clone()),m?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const m=S-u+1;o.lines.shiftElements(u+1,m-1,-1),o.lines.set(S,a.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(s,n,o){const a=this.buffer;if(s<0){if(a.ydisp===0)return;this.isUserScrolling=!0}else s+a.ydisp>=a.ybase&&(this.isUserScrolling=!1);const u=a.ydisp;a.ydisp=Math.max(Math.min(a.ydisp+s,a.ybase),0),u!==a.ydisp&&(n||this._onScroll.fire(a.ydisp))}};i.BufferService=f=d([v(0,w.IOptionsService)],f)},7994:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0,i.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,d){this._charsets[c]=d,this.glevel===c&&(this.charset=d)}}},1753:function(C,i,c){var d=this&&this.__decorate||function(a,u,S,m){var y,p=arguments.length,k=p<3?u:m===null?m=Object.getOwnPropertyDescriptor(u,S):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(a,u,S,m);else for(var x=a.length-1;x>=0;x--)(y=a[x])&&(k=(p<3?y(k):p>3?y(u,S,k):y(u,S))||k);return p>3&&k&&Object.defineProperty(u,S,k),k},v=this&&this.__param||function(a,u){return function(S,m){u(S,m,a)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;const l=c(2585),_=c(8460),b=c(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:a=>a.button!==4&&a.action===1&&(a.ctrl=!1,a.alt=!1,a.shift=!1,!0)},VT200:{events:19,restrict:a=>a.action!==32},DRAG:{events:23,restrict:a=>a.action!==32||a.button!==3},ANY:{events:31,restrict:a=>!0}};function f(a,u){let S=(a.ctrl?16:0)|(a.shift?4:0)|(a.alt?8:0);return a.button===4?(S|=64,S|=a.action):(S|=3&a.button,4&a.button&&(S|=64),8&a.button&&(S|=128),a.action===32?S|=32:a.action!==0||u||(S|=3)),S}const s=String.fromCharCode,n={DEFAULT:a=>{const u=[f(a,!1)+32,a.col+32,a.row+32];return u[0]>255||u[1]>255||u[2]>255?"":`\x1B[M${s(u[0])}${s(u[1])}${s(u[2])}`},SGR:a=>{const u=a.action===0&&a.button!==4?"m":"M";return`\x1B[<${f(a,!0)};${a.col};${a.row}${u}`},SGR_PIXELS:a=>{const u=a.action===0&&a.button!==4?"m":"M";return`\x1B[<${f(a,!0)};${a.x};${a.y}${u}`}};let o=i.CoreMouseService=class extends b.Disposable{constructor(a,u){super(),this._bufferService=a,this._coreService=u,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const S of Object.keys(w))this.addProtocol(S,w[S]);for(const S of Object.keys(n))this.addEncoding(S,n[S]);this.reset()}addProtocol(a,u){this._protocols[a]=u}addEncoding(a,u){this._encodings[a]=u}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(a){if(!this._protocols[a])throw new Error(`unknown protocol "${a}"`);this._activeProtocol=a,this._onProtocolChange.fire(this._protocols[a].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(a){if(!this._encodings[a])throw new Error(`unknown encoding "${a}"`);this._activeEncoding=a}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(a){if(a.col<0||a.col>=this._bufferService.cols||a.row<0||a.row>=this._bufferService.rows||a.button===4&&a.action===32||a.button===3&&a.action!==32||a.button!==4&&(a.action===2||a.action===3)||(a.col++,a.row++,a.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,a,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(a))return!1;const u=this._encodings[this._activeEncoding](a);return u&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(u):this._coreService.triggerDataEvent(u,!0)),this._lastEvent=a,!0}explainEvents(a){return{down:!!(1&a),up:!!(2&a),drag:!!(4&a),move:!!(8&a),wheel:!!(16&a)}}_equalEvents(a,u,S){if(S){if(a.x!==u.x||a.y!==u.y)return!1}else if(a.col!==u.col||a.row!==u.row)return!1;return a.button===u.button&&a.action===u.action&&a.ctrl===u.ctrl&&a.alt===u.alt&&a.shift===u.shift}};i.CoreMouseService=o=d([v(0,l.IBufferService),v(1,l.ICoreService)],o)},6975:function(C,i,c){var d=this&&this.__decorate||function(o,a,u,S){var m,y=arguments.length,p=y<3?a:S===null?S=Object.getOwnPropertyDescriptor(a,u):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,a,u,S);else for(var k=o.length-1;k>=0;k--)(m=o[k])&&(p=(y<3?m(p):y>3?m(a,u,p):m(a,u))||p);return y>3&&p&&Object.defineProperty(a,u,p),p},v=this&&this.__param||function(o,a){return function(u,S){a(u,S,o)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;const l=c(1439),_=c(8460),b=c(844),w=c(2585),f=Object.freeze({insertMode:!1}),s=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let n=i.CoreService=class extends b.Disposable{constructor(o,a,u){super(),this._bufferService=o,this._logService=a,this._optionsService=u,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,l.clone)(f),this.decPrivateModes=(0,l.clone)(s)}reset(){this.modes=(0,l.clone)(f),this.decPrivateModes=(0,l.clone)(s)}triggerDataEvent(o,a=!1){if(this._optionsService.rawOptions.disableStdin)return;const u=this._bufferService.buffer;a&&this._optionsService.rawOptions.scrollOnUserInput&&u.ybase!==u.ydisp&&this._onRequestScrollToBottom.fire(),a&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((S=>S.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((a=>a.charCodeAt(0))))),this._onBinary.fire(o))}};i.CoreService=n=d([v(0,w.IBufferService),v(1,w.ILogService),v(2,w.IOptionsService)],n)},9074:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;const d=c(8055),v=c(8460),l=c(844),_=c(6106);let b=0,w=0;class f extends l.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,l.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const a=new s(o);if(a){const u=a.marker.onDispose((()=>a.dispose()));a.onDispose((()=>{a&&(this._decorations.delete(a)&&this._onDecorationRemoved.fire(a),u.dispose())})),this._decorations.insert(a),this._onDecorationRegistered.fire(a)}return a}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,a,u){let S=0,m=0;for(const y of this._decorations.getKeyIterator(a))S=y.options.x??0,m=S+(y.options.width??1),o>=S&&o<m&&(!u||(y.options.layer??"bottom")===u)&&(yield y)}forEachDecorationAtCell(o,a,u,S){this._decorations.forEachByKey(a,(m=>{b=m.options.x??0,w=b+(m.options.width??1),o>=b&&o<w&&(!u||(m.options.layer??"bottom")===u)&&S(m)}))}}i.DecorationService=f;class s extends l.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.InstantiationService=i.ServiceCollection=void 0;const d=c(2585),v=c(8343);class l{constructor(...b){this._entries=new Map;for(const[w,f]of b)this.set(w,f)}set(b,w){const f=this._entries.get(b);return this._entries.set(b,w),f}forEach(b){for(const[w,f]of this._entries.entries())b(w,f)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}i.ServiceCollection=l,i.InstantiationService=class{constructor(){this._services=new l,this._services.set(d.IInstantiationService,this)}setService(_,b){this._services.set(_,b)}getService(_){return this._services.get(_)}createInstance(_,...b){const w=(0,v.getServiceDependencies)(_).sort(((n,o)=>n.index-o.index)),f=[];for(const n of w){const o=this._services.get(n.id);if(!o)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${n.id}.`);f.push(o)}const s=w.length>0?w[0].index:b.length;if(b.length!==s)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${s+1} conflicts with ${b.length} static arguments`);return new _(...b,...f)}}},7866:function(C,i,c){var d=this&&this.__decorate||function(s,n,o,a){var u,S=arguments.length,m=S<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(s,n,o,a);else for(var y=s.length-1;y>=0;y--)(u=s[y])&&(m=(S<3?u(m):S>3?u(n,o,m):u(n,o))||m);return S>3&&m&&Object.defineProperty(n,o,m),m},v=this&&this.__param||function(s,n){return function(o,a){n(o,a,s)}};Object.defineProperty(i,"__esModule",{value:!0}),i.traceCall=i.setTraceLogger=i.LogService=void 0;const l=c(844),_=c(2585),b={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let w,f=i.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(s){super(),this._optionsService=s,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),w=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(s){for(let n=0;n<s.length;n++)typeof s[n]=="function"&&(s[n]=s[n]())}_log(s,n,o){this._evalLazyOptionalParams(o),s.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+n,...o)}trace(s,...n){var o;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,s,n)}debug(s,...n){var o;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,s,n)}info(s,...n){var o;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,s,n)}warn(s,...n){var o;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,s,n)}error(s,...n){var o;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,s,n)}};i.LogService=f=d([v(0,_.IOptionsService)],f),i.setTraceLogger=function(s){w=s},i.traceCall=function(s,n,o){if(typeof o.value!="function")throw new Error("not supported");const a=o.value;o.value=function(...u){if(w.logLevel!==_.LogLevelEnum.TRACE)return a.apply(this,u);w.trace(`GlyphRenderer#${a.name}(${u.map((m=>JSON.stringify(m))).join(", ")})`);const S=a.apply(this,u);return w.trace(`GlyphRenderer#${a.name} return`,S),S}}},7302:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OptionsService=i.DEFAULT_OPTIONS=void 0;const d=c(8460),v=c(844),l=c(6114);i.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:l.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 b extends v.Disposable{constructor(f){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const s={...i.DEFAULT_OPTIONS};for(const n in f)if(n in s)try{const o=f[n];s[n]=this._sanitizeAndValidateOption(n,o)}catch(o){console.error(o)}this.rawOptions=s,this.options={...s},this._setupOptions(),this.register((0,v.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(f,s){return this.onOptionChange((n=>{n===f&&s(this.rawOptions[f])}))}onMultipleOptionChange(f,s){return this.onOptionChange((n=>{f.indexOf(n)!==-1&&s()}))}_setupOptions(){const f=n=>{if(!(n in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${n}"`);return this.rawOptions[n]},s=(n,o)=>{if(!(n in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${n}"`);o=this._sanitizeAndValidateOption(n,o),this.rawOptions[n]!==o&&(this.rawOptions[n]=o,this._onOptionChange.fire(n))};for(const n in this.rawOptions){const o={get:f.bind(this,n),set:s.bind(this,n)};Object.defineProperty(this.options,n,o)}}_sanitizeAndValidateOption(f,s){switch(f){case"cursorStyle":if(s||(s=i.DEFAULT_OPTIONS[f]),!(function(n){return n==="block"||n==="underline"||n==="bar"})(s))throw new Error(`"${s}" is not a valid value for ${f}`);break;case"wordSeparator":s||(s=i.DEFAULT_OPTIONS[f]);break;case"fontWeight":case"fontWeightBold":if(typeof s=="number"&&1<=s&&s<=1e3)break;s=_.includes(s)?s:i.DEFAULT_OPTIONS[f];break;case"cursorWidth":s=Math.floor(s);case"lineHeight":case"tabStopWidth":if(s<1)throw new Error(`${f} cannot be less than 1, value: ${s}`);break;case"minimumContrastRatio":s=Math.max(1,Math.min(21,Math.round(10*s)/10));break;case"scrollback":if((s=Math.min(s,4294967295))<0)throw new Error(`${f} cannot be less than 0, value: ${s}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(s<=0)throw new Error(`${f} cannot be less than or equal to 0, value: ${s}`);break;case"rows":case"cols":if(!s&&s!==0)throw new Error(`${f} must be numeric, value: ${s}`);break;case"windowsPty":s=s??{}}return s}}i.OptionsService=b},2660:function(C,i,c){var d=this&&this.__decorate||function(b,w,f,s){var n,o=arguments.length,a=o<3?w:s===null?s=Object.getOwnPropertyDescriptor(w,f):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(b,w,f,s);else for(var u=b.length-1;u>=0;u--)(n=b[u])&&(a=(o<3?n(a):o>3?n(w,f,a):n(w,f))||a);return o>3&&a&&Object.defineProperty(w,f,a),a},v=this&&this.__param||function(b,w){return function(f,s){w(f,s,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;const l=c(2585);let _=i.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const w=this._bufferService.buffer;if(b.id===void 0){const u=w.addMarker(w.ybase+w.y),S={data:b,id:this._nextId++,lines:[u]};return u.onDispose((()=>this._removeMarkerFromLink(S,u))),this._dataByLinkId.set(S.id,S),S.id}const f=b,s=this._getEntryIdKey(f),n=this._entriesWithId.get(s);if(n)return this.addLineToLink(n.id,w.ybase+w.y),n.id;const o=w.addMarker(w.ybase+w.y),a={id:this._nextId++,key:this._getEntryIdKey(f),data:f,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(a,o))),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(b,w){const f=this._dataByLinkId.get(b);if(f&&f.lines.every((s=>s.line!==w))){const s=this._bufferService.buffer.addMarker(w);f.lines.push(s),s.onDispose((()=>this._removeMarkerFromLink(f,s)))}}getLinkData(b){var w;return(w=this._dataByLinkId.get(b))==null?void 0:w.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,w){const f=b.lines.indexOf(w);f!==-1&&(b.lines.splice(f,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};i.OscLinkService=_=d([v(0,l.IBufferService)],_)},8343:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const c="di$target",d="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(v){return v[d]||[]},i.createDecorator=function(v){if(i.serviceRegistry.has(v))return i.serviceRegistry.get(v);const l=function(_,b,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,s,n){s[c]===s?s[d].push({id:f,index:n}):(s[d]=[{id:f,index:n}],s[c]=s)})(l,_,w)};return l.toString=()=>v,i.serviceRegistry.set(v,l),l}},2585:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const d=c(8343);var v;i.IBufferService=(0,d.createDecorator)("BufferService"),i.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),i.ICoreService=(0,d.createDecorator)("CoreService"),i.ICharsetService=(0,d.createDecorator)("CharsetService"),i.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(v||(i.LogLevelEnum=v={})),i.ILogService=(0,d.createDecorator)("LogService"),i.IOptionsService=(0,d.createDecorator)("OptionsService"),i.IOscLinkService=(0,d.createDecorator)("OscLinkService"),i.IUnicodeService=(0,d.createDecorator)("UnicodeService"),i.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const d=c(8460),v=c(225);class l{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,w,f=!1){return(16777215&b)<<3|(3&w)<<1|(f?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const b=new v.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let w=0,f=0;const s=b.length;for(let n=0;n<s;++n){let o=b.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=s)return w+this.wcwidth(o);const S=b.charCodeAt(n);56320<=S&&S<=57343?o=1024*(o-55296)+S-56320+65536:w+=this.wcwidth(S)}const a=this.charProperties(o,f);let u=l.extractWidth(a);l.extractShouldJoin(a)&&(u-=l.extractWidth(f)),w+=u,f=a}return w}charProperties(b,w){return this._activeProvider.charProperties(b,w)}}i.UnicodeService=l}},h={};function g(C){var i=h[C];if(i!==void 0)return i.exports;var c=h[C]={exports:{}};return r[C].call(c.exports,c,c.exports,g),c.exports}var E={};return(()=>{var C=E;Object.defineProperty(C,"__esModule",{value:!0}),C.Terminal=void 0;const i=g(9042),c=g(3236),d=g(844),v=g(5741),l=g(8285),_=g(7975),b=g(7090),w=["cols","rows"];class f extends d.Disposable{constructor(n){super(),this._core=this.register(new c.Terminal(n)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const o=u=>this._core.options[u],a=(u,S)=>{this._checkReadonlyOptions(u),this._core.options[u]=S};for(const u in this._core.options){const S={get:o.bind(this,u),set:a.bind(this,u)};Object.defineProperty(this._publicOptions,u,S)}}_checkReadonlyOptions(n){if(w.includes(n))throw new Error(`Option "${n}" 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 b.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 l.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const n=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:n.applicationCursorKeys,applicationKeypadMode:n.applicationKeypad,bracketedPasteMode:n.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:n.origin,reverseWraparoundMode:n.reverseWraparound,sendFocusMode:n.sendFocus,wraparoundMode:n.wraparound}}get options(){return this._publicOptions}set options(n){for(const o in n)this._publicOptions[o]=n[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(n,o=!0){this._core.input(n,o)}resize(n,o){this._verifyIntegers(n,o),this._core.resize(n,o)}open(n){this._core.open(n)}attachCustomKeyEventHandler(n){this._core.attachCustomKeyEventHandler(n)}attachCustomWheelEventHandler(n){this._core.attachCustomWheelEventHandler(n)}registerLinkProvider(n){return this._core.registerLinkProvider(n)}registerCharacterJoiner(n){return this._checkProposedApi(),this._core.registerCharacterJoiner(n)}deregisterCharacterJoiner(n){this._checkProposedApi(),this._core.deregisterCharacterJoiner(n)}registerMarker(n=0){return this._verifyIntegers(n),this._core.registerMarker(n)}registerDecoration(n){return this._checkProposedApi(),this._verifyPositiveIntegers(n.x??0,n.width??0,n.height??0),this._core.registerDecoration(n)}hasSelection(){return this._core.hasSelection()}select(n,o,a){this._verifyIntegers(n,o,a),this._core.select(n,o,a)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(n,o){this._verifyIntegers(n,o),this._core.selectLines(n,o)}dispose(){super.dispose()}scrollLines(n){this._verifyIntegers(n),this._core.scrollLines(n)}scrollPages(n){this._verifyIntegers(n),this._core.scrollPages(n)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(n){this._verifyIntegers(n),this._core.scrollToLine(n)}clear(){this._core.clear()}write(n,o){this._core.write(n,o)}writeln(n,o){this._core.write(n),this._core.write(`\r
|
|
164
|
-
`,o)}paste(n){this._core.paste(n)}refresh(n,o){this._verifyIntegers(n,o),this._core.refresh(n,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(n){this._addonManager.loadAddon(this,n)}static get strings(){return i}_verifyIntegers(...n){for(const o of n)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...n){for(const o of n)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}C.Terminal=f})(),E})()))})(nr)),nr.exports}var Go=jo(),Dt={exports:{}},Ko=Dt.exports,ai;function zo(){return ai||(ai=1,(function(e,t){(function(r,h){e.exports=h()})(Ko,(()=>(()=>{var r={930:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const d=c(485);i.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(v,l,_){this._css.set(v,l,_)}getCss(v,l){return this._css.get(v,l)}setColor(v,l,_){this._color.set(v,l,_)}getColor(v,l){return this._color.get(v,l)}clear(){this._color.clear(),this._css.clear()}}},997:function(C,i,c){var d=this&&this.__decorate||function(y,p,k,x){var L,T=arguments.length,R=T<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,k):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,p,k,x);else for(var M=y.length-1;M>=0;M--)(L=y[M])&&(R=(T<3?L(R):T>3?L(p,k,R):L(p,k))||R);return T>3&&R&&Object.defineProperty(p,k,R),R},v=this&&this.__param||function(y,p){return function(k,x){p(k,x,y)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;const l=c(930),_=c(160),b=c(345),w=c(859),f=c(97),s=_.css.toColor("#ffffff"),n=_.css.toColor("#000000"),o=_.css.toColor("#ffffff"),a=_.css.toColor("#000000"),u={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const y=[_.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")],p=[0,95,135,175,215,255];for(let k=0;k<216;k++){const x=p[k/36%6|0],L=p[k/6%6|0],T=p[k%6];y.push({css:_.channels.toCss(x,L,T),rgba:_.channels.toRgba(x,L,T)})}for(let k=0;k<24;k++){const x=8+10*k;y.push({css:_.channels.toCss(x,x,x),rgba:_.channels.toRgba(x,x,x)})}return y})());let S=i.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(y){super(),this._optionsService=y,this._contrastCache=new l.ColorContrastCache,this._halfContrastCache=new l.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:s,background:n,cursor:o,cursorAccent:a,selectionForeground:void 0,selectionBackgroundTransparent:u,selectionBackgroundOpaque:_.color.blend(n,u),selectionInactiveBackgroundTransparent:u,selectionInactiveBackgroundOpaque:_.color.blend(n,u),ansi:i.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(y={}){const p=this._colors;if(p.foreground=m(y.foreground,s),p.background=m(y.background,n),p.cursor=m(y.cursor,o),p.cursorAccent=m(y.cursorAccent,a),p.selectionBackgroundTransparent=m(y.selectionBackground,u),p.selectionBackgroundOpaque=_.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=m(y.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=_.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=y.selectionForeground?m(y.selectionForeground,_.NULL_COLOR):void 0,p.selectionForeground===_.NULL_COLOR&&(p.selectionForeground=void 0),_.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=_.color.opacity(p.selectionBackgroundTransparent,.3)),_.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=_.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=i.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=m(y.black,i.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=m(y.red,i.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=m(y.green,i.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=m(y.yellow,i.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=m(y.blue,i.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=m(y.magenta,i.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=m(y.cyan,i.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=m(y.white,i.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=m(y.brightBlack,i.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=m(y.brightRed,i.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=m(y.brightGreen,i.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=m(y.brightYellow,i.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=m(y.brightBlue,i.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=m(y.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=m(y.brightCyan,i.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=m(y.brightWhite,i.DEFAULT_ANSI_COLORS[15]),y.extendedAnsi){const k=Math.min(p.ansi.length-16,y.extendedAnsi.length);for(let x=0;x<k;x++)p.ansi[x+16]=m(y.extendedAnsi[x],i.DEFAULT_ANSI_COLORS[x+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(y){this._restoreColor(y),this._onChangeColors.fire(this.colors)}_restoreColor(y){if(y!==void 0)switch(y){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[y]=this._restoreColors.ansi[y]}else for(let p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}modifyColors(y){y(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 m(y,p){if(y!==void 0)try{return _.css.toColor(y)}catch{}return p}i.ThemeService=S=d([v(0,f.IOptionsService)],S)},160:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let c=0,d=0,v=0,l=0;var _,b,w,f,s;function n(a){const u=a.toString(16);return u.length<2?"0"+u:u}function o(a,u){return a<u?(u+.05)/(a+.05):(a+.05)/(u+.05)}i.NULL_COLOR={css:"#00000000",rgba:0},(function(a){a.toCss=function(u,S,m,y){return y!==void 0?`#${n(u)}${n(S)}${n(m)}${n(y)}`:`#${n(u)}${n(S)}${n(m)}`},a.toRgba=function(u,S,m,y=255){return(u<<24|S<<16|m<<8|y)>>>0},a.toColor=function(u,S,m,y){return{css:a.toCss(u,S,m,y),rgba:a.toRgba(u,S,m,y)}}})(_||(i.channels=_={})),(function(a){function u(S,m){return l=Math.round(255*m),[c,d,v]=s.toChannels(S.rgba),{css:_.toCss(c,d,v,l),rgba:_.toRgba(c,d,v,l)}}a.blend=function(S,m){if(l=(255&m.rgba)/255,l===1)return{css:m.css,rgba:m.rgba};const y=m.rgba>>24&255,p=m.rgba>>16&255,k=m.rgba>>8&255,x=S.rgba>>24&255,L=S.rgba>>16&255,T=S.rgba>>8&255;return c=x+Math.round((y-x)*l),d=L+Math.round((p-L)*l),v=T+Math.round((k-T)*l),{css:_.toCss(c,d,v),rgba:_.toRgba(c,d,v)}},a.isOpaque=function(S){return(255&S.rgba)==255},a.ensureContrastRatio=function(S,m,y){const p=s.ensureContrastRatio(S.rgba,m.rgba,y);if(p)return _.toColor(p>>24&255,p>>16&255,p>>8&255)},a.opaque=function(S){const m=(255|S.rgba)>>>0;return[c,d,v]=s.toChannels(m),{css:_.toCss(c,d,v),rgba:m}},a.opacity=u,a.multiplyOpacity=function(S,m){return l=255&S.rgba,u(S,l*m/255)},a.toColorRGB=function(S){return[S.rgba>>24&255,S.rgba>>16&255,S.rgba>>8&255]}})(b||(i.color=b={})),(function(a){let u,S;try{const m=document.createElement("canvas");m.width=1,m.height=1;const y=m.getContext("2d",{willReadFrequently:!0});y&&(u=y,u.globalCompositeOperation="copy",S=u.createLinearGradient(0,0,1,1))}catch{}a.toColor=function(m){if(m.match(/#[\da-f]{3,8}/i))switch(m.length){case 4:return c=parseInt(m.slice(1,2).repeat(2),16),d=parseInt(m.slice(2,3).repeat(2),16),v=parseInt(m.slice(3,4).repeat(2),16),_.toColor(c,d,v);case 5:return c=parseInt(m.slice(1,2).repeat(2),16),d=parseInt(m.slice(2,3).repeat(2),16),v=parseInt(m.slice(3,4).repeat(2),16),l=parseInt(m.slice(4,5).repeat(2),16),_.toColor(c,d,v,l);case 7:return{css:m,rgba:(parseInt(m.slice(1),16)<<8|255)>>>0};case 9:return{css:m,rgba:parseInt(m.slice(1),16)>>>0}}const y=m.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return c=parseInt(y[1]),d=parseInt(y[2]),v=parseInt(y[3]),l=Math.round(255*(y[5]===void 0?1:parseFloat(y[5]))),_.toColor(c,d,v,l);if(!u||!S)throw new Error("css.toColor: Unsupported css format");if(u.fillStyle=S,u.fillStyle=m,typeof u.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(u.fillRect(0,0,1,1),[c,d,v,l]=u.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,d,v,l),css:m}}})(w||(i.css=w={})),(function(a){function u(S,m,y){const p=S/255,k=m/255,x=y/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.0722*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))}a.relativeLuminance=function(S){return u(S>>16&255,S>>8&255,255&S)},a.relativeLuminance2=u})(f||(i.rgb=f={})),(function(a){function u(m,y,p){const k=m>>24&255,x=m>>16&255,L=m>>8&255;let T=y>>24&255,R=y>>16&255,M=y>>8&255,F=o(f.relativeLuminance2(T,R,M),f.relativeLuminance2(k,x,L));for(;F<p&&(T>0||R>0||M>0);)T-=Math.max(0,Math.ceil(.1*T)),R-=Math.max(0,Math.ceil(.1*R)),M-=Math.max(0,Math.ceil(.1*M)),F=o(f.relativeLuminance2(T,R,M),f.relativeLuminance2(k,x,L));return(T<<24|R<<16|M<<8|255)>>>0}function S(m,y,p){const k=m>>24&255,x=m>>16&255,L=m>>8&255;let T=y>>24&255,R=y>>16&255,M=y>>8&255,F=o(f.relativeLuminance2(T,R,M),f.relativeLuminance2(k,x,L));for(;F<p&&(T<255||R<255||M<255);)T=Math.min(255,T+Math.ceil(.1*(255-T))),R=Math.min(255,R+Math.ceil(.1*(255-R))),M=Math.min(255,M+Math.ceil(.1*(255-M))),F=o(f.relativeLuminance2(T,R,M),f.relativeLuminance2(k,x,L));return(T<<24|R<<16|M<<8|255)>>>0}a.blend=function(m,y){if(l=(255&y)/255,l===1)return y;const p=y>>24&255,k=y>>16&255,x=y>>8&255,L=m>>24&255,T=m>>16&255,R=m>>8&255;return c=L+Math.round((p-L)*l),d=T+Math.round((k-T)*l),v=R+Math.round((x-R)*l),_.toRgba(c,d,v)},a.ensureContrastRatio=function(m,y,p){const k=f.relativeLuminance(m>>8),x=f.relativeLuminance(y>>8);if(o(k,x)<p){if(x<k){const R=u(m,y,p),M=o(k,f.relativeLuminance(R>>8));if(M<p){const F=S(m,y,p);return M>o(k,f.relativeLuminance(F>>8))?R:F}return R}const L=S(m,y,p),T=o(k,f.relativeLuminance(L>>8));if(T<p){const R=u(m,y,p);return T>o(k,f.relativeLuminance(R>>8))?L:R}return L}},a.reduceLuminance=u,a.increaseLuminance=S,a.toChannels=function(m){return[m>>24&255,m>>16&255,m>>8&255,255&m]}})(s||(i.rgba=s={})),i.toPaddedHex=n,i.contrastRatio=o},345:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.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 d=0;d<this._listeners.length;d++)if(this._listeners[d]===c)return void this._listeners.splice(d,1)}}})),this._event}fire(c,d){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,c,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(c,d){return c((v=>d.fire(v)))},i.runAndSubscribe=function(c,d){return d(void 0),c((v=>d(v)))}},859:(C,i)=>{function c(d){for(const v of d)v.dispose();d.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const v=this._disposables.indexOf(d);v!==-1&&this._disposables.splice(v,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var v;this._isDisposed||d===this._value||((v=this._value)==null||v.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},i.toDisposable=function(d){return{dispose:d}},i.disposeArray=c,i.getDisposeArrayDisposable=function(d){return{dispose:()=>c(d)}}},485:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(v,l,_){this._data[v]||(this._data[v]={}),this._data[v][l]=_}get(v,l){return this._data[v]?this._data[v][l]:void 0}clear(){this._data={}}}i.TwoKeyMap=c,i.FourKeyMap=class{constructor(){this._data=new c}set(d,v,l,_,b){this._data.get(d,v)||this._data.set(d,v,new c),this._data.get(d,v).set(l,_,b)}get(d,v,l,_){var b;return(b=this._data.get(d,v))==null?void 0:b.get(l,_)}clear(){this._data.clear()}}},726:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;const c="di$target",d="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(v){return v[d]||[]},i.createDecorator=function(v){if(i.serviceRegistry.has(v))return i.serviceRegistry.get(v);const l=function(_,b,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,s,n){s[c]===s?s[d].push({id:f,index:n}):(s[d]=[{id:f,index:n}],s[c]=s)})(l,_,w)};return l.toString=()=>v,i.serviceRegistry.set(v,l),l}},97:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;const d=c(726);var v;i.IBufferService=(0,d.createDecorator)("BufferService"),i.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),i.ICoreService=(0,d.createDecorator)("CoreService"),i.ICharsetService=(0,d.createDecorator)("CharsetService"),i.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(v||(i.LogLevelEnum=v={})),i.ILogService=(0,d.createDecorator)("LogService"),i.IOptionsService=(0,d.createDecorator)("OptionsService"),i.IOscLinkService=(0,d.createDecorator)("OscLinkService"),i.IUnicodeService=(0,d.createDecorator)("UnicodeService"),i.IDecorationService=(0,d.createDecorator)("DecorationService")}},h={};function g(C){var i=h[C];if(i!==void 0)return i.exports;var c=h[C]={exports:{}};return r[C].call(c.exports,c,c.exports,g),c.exports}var E={};return(()=>{var C=E;Object.defineProperty(C,"__esModule",{value:!0}),C.HTMLSerializeHandler=C.SerializeAddon=void 0;const i=g(997);function c(f,s,n){return Math.max(s,Math.min(f,n))}class d{constructor(s){this._buffer=s}serialize(s,n){const o=this._buffer.getNullCell(),a=this._buffer.getNullCell();let u=o;const S=s.start.y,m=s.end.y,y=s.start.x,p=s.end.x;this._beforeSerialize(m-S,S,m);for(let k=S;k<=m;k++){const x=this._buffer.getLine(k);if(x){const L=k===s.start.y?y:0,T=k===s.end.y?p:x.length;for(let R=L;R<T;R++){const M=x.getCell(R,u===o?a:o);M?(this._nextCell(M,u,k,R),u=M):console.warn(`Can't get cell at row=${k}, col=${R}`)}}this._rowEnd(k,k===m)}return this._afterSerialize(),this._serializeString(n)}_nextCell(s,n,o,a){}_rowEnd(s,n){}_beforeSerialize(s,n,o){}_afterSerialize(){}_serializeString(s){return""}}function v(f,s){return f.getFgColorMode()===s.getFgColorMode()&&f.getFgColor()===s.getFgColor()}function l(f,s){return f.getBgColorMode()===s.getBgColorMode()&&f.getBgColor()===s.getBgColor()}function _(f,s){return f.isInverse()===s.isInverse()&&f.isBold()===s.isBold()&&f.isUnderline()===s.isUnderline()&&f.isOverline()===s.isOverline()&&f.isBlink()===s.isBlink()&&f.isInvisible()===s.isInvisible()&&f.isItalic()===s.isItalic()&&f.isDim()===s.isDim()&&f.isStrikethrough()===s.isStrikethrough()}class b extends d{constructor(s,n){super(s),this._terminal=n,this._rowIndex=0,this._allRows=new Array,this._allRowSeparators=new Array,this._currentRow="",this._nullCellCount=0,this._cursorStyle=this._buffer.getNullCell(),this._cursorStyleRow=0,this._cursorStyleCol=0,this._backgroundCell=this._buffer.getNullCell(),this._firstRow=0,this._lastCursorRow=0,this._lastCursorCol=0,this._lastContentCursorRow=0,this._lastContentCursorCol=0,this._thisRowLastChar=this._buffer.getNullCell(),this._thisRowLastSecondChar=this._buffer.getNullCell(),this._nextRowFirstChar=this._buffer.getNullCell()}_beforeSerialize(s,n,o){this._allRows=new Array(s),this._lastContentCursorRow=n,this._lastCursorRow=n,this._firstRow=n}_rowEnd(s,n){var a;this._nullCellCount>0&&!l(this._cursorStyle,this._backgroundCell)&&(this._currentRow+=`\x1B[${this._nullCellCount}X`);let o="";if(!n){s-this._firstRow>=this._terminal.rows&&((a=this._buffer.getLine(this._cursorStyleRow))==null||a.getCell(this._cursorStyleCol,this._backgroundCell));const u=this._buffer.getLine(s),S=this._buffer.getLine(s+1);if(S.isWrapped){o="";const m=u.getCell(u.length-1,this._thisRowLastChar),y=u.getCell(u.length-2,this._thisRowLastSecondChar),p=S.getCell(0,this._nextRowFirstChar),k=p.getWidth()>1;let x=!1;(p.getChars()&&k?this._nullCellCount<=1:this._nullCellCount<=0)&&((m.getChars()||m.getWidth()===0)&&l(m,p)&&(x=!0),k&&(y.getChars()||y.getWidth()===0)&&l(m,p)&&l(y,p)&&(x=!0)),x||(o="-".repeat(this._nullCellCount+1),o+="\x1B[1D\x1B[1X",this._nullCellCount>0&&(o+="\x1B[A",o+=`\x1B[${u.length-this._nullCellCount}C`,o+=`\x1B[${this._nullCellCount}X`,o+=`\x1B[${u.length-this._nullCellCount}D`,o+="\x1B[B"),this._lastContentCursorRow=s+1,this._lastContentCursorCol=0,this._lastCursorRow=s+1,this._lastCursorCol=0)}else o=`\r
|
|
165
|
-
`,this._lastCursorRow=s+1,this._lastCursorCol=0}this._allRows[this._rowIndex]=this._currentRow,this._allRowSeparators[this._rowIndex++]=o,this._currentRow="",this._nullCellCount=0}_diffStyle(s,n){const o=[],a=!v(s,n),u=!l(s,n),S=!_(s,n);if(a||u||S)if(s.isAttributeDefault())n.isAttributeDefault()||o.push(0);else{if(a){const m=s.getFgColor();s.isFgRGB()?o.push(38,2,m>>>16&255,m>>>8&255,255&m):s.isFgPalette()?m>=16?o.push(38,5,m):o.push(8&m?90+(7&m):30+(7&m)):o.push(39)}if(u){const m=s.getBgColor();s.isBgRGB()?o.push(48,2,m>>>16&255,m>>>8&255,255&m):s.isBgPalette()?m>=16?o.push(48,5,m):o.push(8&m?100+(7&m):40+(7&m)):o.push(49)}S&&(s.isInverse()!==n.isInverse()&&o.push(s.isInverse()?7:27),s.isBold()!==n.isBold()&&o.push(s.isBold()?1:22),s.isUnderline()!==n.isUnderline()&&o.push(s.isUnderline()?4:24),s.isOverline()!==n.isOverline()&&o.push(s.isOverline()?53:55),s.isBlink()!==n.isBlink()&&o.push(s.isBlink()?5:25),s.isInvisible()!==n.isInvisible()&&o.push(s.isInvisible()?8:28),s.isItalic()!==n.isItalic()&&o.push(s.isItalic()?3:23),s.isDim()!==n.isDim()&&o.push(s.isDim()?2:22),s.isStrikethrough()!==n.isStrikethrough()&&o.push(s.isStrikethrough()?9:29))}return o}_nextCell(s,n,o,a){if(s.getWidth()===0)return;const u=s.getChars()==="",S=this._diffStyle(s,this._cursorStyle);if(u?!l(this._cursorStyle,s):S.length>0){this._nullCellCount>0&&(l(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._lastContentCursorRow=this._lastCursorRow=o,this._lastContentCursorCol=this._lastCursorCol=a,this._currentRow+=`\x1B[${S.join(";")}m`;const m=this._buffer.getLine(o);m!==void 0&&(m.getCell(a,this._cursorStyle),this._cursorStyleRow=o,this._cursorStyleCol=a)}u?this._nullCellCount+=s.getWidth():(this._nullCellCount>0&&(l(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._currentRow+=s.getChars(),this._lastContentCursorRow=this._lastCursorRow=o,this._lastContentCursorCol=this._lastCursorCol=a+s.getWidth())}_serializeString(s){let n=this._allRows.length;this._buffer.length-this._firstRow<=this._terminal.rows&&(n=this._lastContentCursorRow+1-this._firstRow,this._lastCursorCol=this._lastContentCursorCol,this._lastCursorRow=this._lastContentCursorRow);let o="";for(let m=0;m<n;m++)o+=this._allRows[m],m+1<n&&(o+=this._allRowSeparators[m]);if(!s){const m=this._buffer.baseY+this._buffer.cursorY,y=this._buffer.cursorX,p=k=>{k>0?o+=`\x1B[${k}C`:k<0&&(o+=`\x1B[${-k}D`)};(m!==this._lastCursorRow||y!==this._lastCursorCol)&&((a=m-this._lastCursorRow)>0?o+=`\x1B[${a}B`:a<0&&(o+=`\x1B[${-a}A`),p(y-this._lastCursorCol))}var a;const u=this._terminal._core._inputHandler._curAttrData,S=this._diffStyle(u,this._cursorStyle);return S.length>0&&(o+=`\x1B[${S.join(";")}m`),o}}C.SerializeAddon=class{activate(f){this._terminal=f}_serializeBufferByScrollback(f,s,n){const o=s.length,a=n===void 0?o:c(n+f.rows,0,o);return this._serializeBufferByRange(f,s,{start:o-a,end:o-1},!1)}_serializeBufferByRange(f,s,n,o){return new b(s,f).serialize({start:{x:0,y:typeof n.start=="number"?n.start:n.start.line},end:{x:f.cols,y:typeof n.end=="number"?n.end:n.end.line}},o)}_serializeBufferAsHTML(f,s){var u;const n=f.buffer.active,o=new w(n,f,s);if(!s.onlySelection){const S=n.length,m=s.scrollback,y=m===void 0?S:c(m+f.rows,0,S);return o.serialize({start:{x:0,y:S-y},end:{x:f.cols,y:S-1}})}const a=(u=this._terminal)==null?void 0:u.getSelectionPosition();return a!==void 0?o.serialize({start:{x:a.start.x,y:a.start.y},end:{x:a.end.x,y:a.end.y}}):""}_serializeModes(f){let s="";const n=f.modes;if(n.applicationCursorKeysMode&&(s+="\x1B[?1h"),n.applicationKeypadMode&&(s+="\x1B[?66h"),n.bracketedPasteMode&&(s+="\x1B[?2004h"),n.insertMode&&(s+="\x1B[4h"),n.originMode&&(s+="\x1B[?6h"),n.reverseWraparoundMode&&(s+="\x1B[?45h"),n.sendFocusMode&&(s+="\x1B[?1004h"),n.wraparoundMode===!1&&(s+="\x1B[?7l"),n.mouseTrackingMode!=="none")switch(n.mouseTrackingMode){case"x10":s+="\x1B[?9h";break;case"vt200":s+="\x1B[?1000h";break;case"drag":s+="\x1B[?1002h";break;case"any":s+="\x1B[?1003h"}return s}serialize(f){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");let s=f!=null&&f.range?this._serializeBufferByRange(this._terminal,this._terminal.buffer.normal,f.range,!0):this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.normal,f==null?void 0:f.scrollback);return f!=null&&f.excludeAltBuffer||this._terminal.buffer.active.type!=="alternate"||(s+=`\x1B[?1049h\x1B[H${this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.alternate,void 0)}`),f!=null&&f.excludeModes||(s+=this._serializeModes(this._terminal)),s}serializeAsHTML(f){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");return this._serializeBufferAsHTML(this._terminal,f||{})}dispose(){}};class w extends d{constructor(s,n,o){super(s),this._terminal=n,this._options=o,this._currentRow="",this._htmlContent="",n._core._themeService?this._ansiColors=n._core._themeService.colors.ansi:this._ansiColors=i.DEFAULT_ANSI_COLORS}_padStart(s,n,o){return n>>=0,o=o??" ",s.length>n?s:((n-=s.length)>o.length&&(o+=o.repeat(n/o.length)),o.slice(0,n)+s)}_beforeSerialize(s,n,o){var m,y;this._htmlContent+="<html><body><!--StartFragment--><pre>";let a="#000000",u="#ffffff";this._options.includeGlobalBackground&&(a=((m=this._terminal.options.theme)==null?void 0:m.foreground)??"#ffffff",u=((y=this._terminal.options.theme)==null?void 0:y.background)??"#000000");const S=[];S.push("color: "+a+";"),S.push("background-color: "+u+";"),S.push("font-family: "+this._terminal.options.fontFamily+";"),S.push("font-size: "+this._terminal.options.fontSize+"px;"),this._htmlContent+="<div style='"+S.join(" ")+"'>"}_afterSerialize(){this._htmlContent+="</div>",this._htmlContent+="</pre><!--EndFragment--></body></html>"}_rowEnd(s,n){this._htmlContent+="<div><span>"+this._currentRow+"</span></div>",this._currentRow=""}_getHexColor(s,n){const o=n?s.getFgColor():s.getBgColor();return(n?s.isFgRGB():s.isBgRGB())?"#"+[o>>16&255,o>>8&255,255&o].map((a=>this._padStart(a.toString(16),2,"0"))).join(""):(n?s.isFgPalette():s.isBgPalette())?this._ansiColors[o].css:void 0}_diffStyle(s,n){const o=[],a=!v(s,n),u=!l(s,n),S=!_(s,n);if(a||u||S){const m=this._getHexColor(s,!0);m&&o.push("color: "+m+";");const y=this._getHexColor(s,!1);return y&&o.push("background-color: "+y+";"),s.isInverse()&&o.push("color: #000000; background-color: #BFBFBF;"),s.isBold()&&o.push("font-weight: bold;"),s.isUnderline()&&s.isOverline()?o.push("text-decoration: overline underline;"):s.isUnderline()?o.push("text-decoration: underline;"):s.isOverline()&&o.push("text-decoration: overline;"),s.isBlink()&&o.push("text-decoration: blink;"),s.isInvisible()&&o.push("visibility: hidden;"),s.isItalic()&&o.push("font-style: italic;"),s.isDim()&&o.push("opacity: 0.5;"),s.isStrikethrough()&&o.push("text-decoration: line-through;"),o}}_nextCell(s,n,o,a){if(s.getWidth()===0)return;const u=s.getChars()==="",S=this._diffStyle(s,n);S&&(this._currentRow+=S.length===0?"</span><span>":"</span><span style='"+S.join(" ")+"'>"),this._currentRow+=u?" ":s.getChars()}_serializeString(){return this._htmlContent}}C.HTMLSerializeHandler=w})(),E})()))})(Dt)),Dt.exports}var Zo=zo(),Ot={exports:{}},Xo=Ot.exports,ci;function Yo(){return ci||(ci=1,(function(e,t){(function(r,h){e.exports=h()})(Xo,(()=>(()=>{var r={433:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV11=void 0;const d=c(938),v=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],l=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],_=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],b=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let w;function f(s,n){let o,a=0,u=n.length-1;if(s<n[0][0]||s>n[u][1])return!1;for(;u>=a;)if(o=a+u>>1,s>n[o][1])a=o+1;else{if(!(s<n[o][0]))return!0;u=o-1}return!1}i.UnicodeV11=class{constructor(){if(this.version="11",!w){w=new Uint8Array(65536),w.fill(1),w[0]=0,w.fill(0,1,32),w.fill(0,127,160);for(let s=0;s<v.length;++s)w.fill(0,v[s][0],v[s][1]+1);for(let s=0;s<_.length;++s)w.fill(2,_[s][0],_[s][1]+1)}}wcwidth(s){return s<32?0:s<127?1:s<65536?w[s]:f(s,l)?0:f(s,b)?2:1}charProperties(s,n){let o=this.wcwidth(s),a=o===0&&n!==0;if(a){const u=d.UnicodeService.extractWidth(n);u===0?a=!1:u>o&&(o=u)}return d.UnicodeService.createPropertyValue(0,o,a)}}},345:(C,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.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 d=0;d<this._listeners.length;d++)if(this._listeners[d]===c)return void this._listeners.splice(d,1)}}})),this._event}fire(c,d){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,c,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(c,d){return c((v=>d.fire(v)))},i.runAndSubscribe=function(c,d){return d(void 0),c((v=>d(v)))}},490:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;const d=c(938),v=[[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]],l=[[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 _;i.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 b=0;b<v.length;++b)_.fill(0,v[b][0],v[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?_[b]:(function(w,f){let s,n=0,o=f.length-1;if(w<f[0][0]||w>f[o][1])return!1;for(;o>=n;)if(s=n+o>>1,w>f[s][1])n=s+1;else{if(!(w<f[s][0]))return!0;o=s-1}return!1})(b,l)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,w){let f=this.wcwidth(b),s=f===0&&w!==0;if(s){const n=d.UnicodeService.extractWidth(w);n===0?s=!1:n>f&&(f=n)}return d.UnicodeService.createPropertyValue(0,f,s)}}},938:(C,i,c)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;const d=c(345),v=c(490);class l{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,w,f=!1){return(16777215&b)<<3|(3&w)<<1|(f?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const b=new v.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let w=0,f=0;const s=b.length;for(let n=0;n<s;++n){let o=b.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=s)return w+this.wcwidth(o);const S=b.charCodeAt(n);56320<=S&&S<=57343?o=1024*(o-55296)+S-56320+65536:w+=this.wcwidth(S)}const a=this.charProperties(o,f);let u=l.extractWidth(a);l.extractShouldJoin(a)&&(u-=l.extractWidth(f)),w+=u,f=a}return w}charProperties(b,w){return this._activeProvider.charProperties(b,w)}}i.UnicodeService=l}},h={};function g(C){var i=h[C];if(i!==void 0)return i.exports;var c=h[C]={exports:{}};return r[C](c,c.exports,g),c.exports}var E={};return(()=>{var C=E;Object.defineProperty(C,"__esModule",{value:!0}),C.Unicode11Addon=void 0;const i=g(433);C.Unicode11Addon=class{activate(c){c.unicode.register(new i.UnicodeV11)}dispose(){}}})(),E})()))})(Ot)),Ot.exports}var Jo=Yo(),ar={exports:{}},li;function qo(){return li||(li=1,(function(e,t){(function(r,h){e.exports=h()})(self,(()=>(()=>{var r={6:(C,i)=>{function c(v){try{const l=new URL(v),_=l.password&&l.username?`${l.protocol}//${l.username}:${l.password}@${l.host}`:l.username?`${l.protocol}//${l.username}@${l.host}`:`${l.protocol}//${l.host}`;return v.toLocaleLowerCase().startsWith(_.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(i,"__esModule",{value:!0}),i.LinkComputer=i.WebLinkProvider=void 0,i.WebLinkProvider=class{constructor(v,l,_,b={}){this._terminal=v,this._regex=l,this._handler=_,this._options=b}provideLinks(v,l){const _=d.computeLink(v,this._regex,this._terminal,this._handler);l(this._addCallbacks(_))}_addCallbacks(v){return v.map((l=>(l.leave=this._options.leave,l.hover=(_,b)=>{if(this._options.hover){const{range:w}=l;this._options.hover(_,b,w)}},l)))}};class d{static computeLink(l,_,b,w){const f=new RegExp(_.source,(_.flags||"")+"g"),[s,n]=d._getWindowedLineStrings(l-1,b),o=s.join("");let a;const u=[];for(;a=f.exec(o);){const S=a[0];if(!c(S))continue;const[m,y]=d._mapStrIdx(b,n,0,a.index),[p,k]=d._mapStrIdx(b,m,y,S.length);if(m===-1||y===-1||p===-1||k===-1)continue;const x={start:{x:y+1,y:m+1},end:{x:k,y:p+1}};u.push({range:x,text:S,activate:w})}return u}static _getWindowedLineStrings(l,_){let b,w=l,f=l,s=0,n="";const o=[];if(b=_.buffer.active.getLine(l)){const a=b.translateToString(!0);if(b.isWrapped&&a[0]!==" "){for(s=0;(b=_.buffer.active.getLine(--w))&&s<2048&&(n=b.translateToString(!0),s+=n.length,o.push(n),b.isWrapped&&n.indexOf(" ")===-1););o.reverse()}for(o.push(a),s=0;(b=_.buffer.active.getLine(++f))&&b.isWrapped&&s<2048&&(n=b.translateToString(!0),s+=n.length,o.push(n),n.indexOf(" ")===-1););}return[o,w]}static _mapStrIdx(l,_,b,w){const f=l.buffer.active,s=f.getNullCell();let n=b;for(;w;){const o=f.getLine(_);if(!o)return[-1,-1];for(let a=n;a<o.length;++a){o.getCell(a,s);const u=s.getChars();if(s.getWidth()&&(w-=u.length||1,a===o.length-1&&u==="")){const S=f.getLine(_+1);S&&S.isWrapped&&(S.getCell(0,s),s.getWidth()===2&&(w+=1))}if(w<0)return[_,a]}_++,n=0}return[_,n]}}i.LinkComputer=d}},h={};function g(C){var i=h[C];if(i!==void 0)return i.exports;var c=h[C]={exports:{}};return r[C](c,c.exports,g),c.exports}var E={};return(()=>{var C=E;Object.defineProperty(C,"__esModule",{value:!0}),C.WebLinksAddon=void 0;const i=g(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(v,l){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}C.WebLinksAddon=class{constructor(v=d,l={}){this._handler=v,this._options=l}activate(v){this._terminal=v;const l=this._options,_=l.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new i.WebLinkProvider(this._terminal,_,this._handler,l))}dispose(){var v;(v=this._linkProvider)==null||v.dispose()}}})(),E})()))})(ar)),ar.exports}var Qo=qo();function ue(e){return typeof e=="function"}function ls(e){var t=function(h){Error.call(h),h.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var cr=ls(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
166
|
-
`+r.map(function(h,g){return g+1+") "+h.toString()}).join(`
|
|
167
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function Vt(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var kt=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,h,g,E;if(!this.closed){this.closed=!0;var C=this._parentage;if(C)if(this._parentage=null,Array.isArray(C))try{for(var i=Ge(C),c=i.next();!c.done;c=i.next()){var d=c.value;d.remove(this)}}catch(f){t={error:f}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}else C.remove(this);var v=this.initialTeardown;if(ue(v))try{v()}catch(f){E=f instanceof cr?f.errors:[f]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var _=Ge(l),b=_.next();!b.done;b=_.next()){var w=b.value;try{di(w)}catch(f){E=E??[],f instanceof cr?E=ut(ut([],ht(E)),ht(f.errors)):E.push(f)}}}catch(f){h={error:f}}finally{try{b&&!b.done&&(g=_.return)&&g.call(_)}finally{if(h)throw h.error}}}if(E)throw new cr(E)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)di(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Vt(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Vt(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),ds=kt.EMPTY;function hs(e){return e instanceof kt||e&&"closed"in e&&ue(e.remove)&&ue(e.add)&&ue(e.unsubscribe)}function di(e){ue(e)?e():e.unsubscribe()}var en={Promise:void 0},tn={setTimeout:function(e,t){for(var r=[],h=2;h<arguments.length;h++)r[h-2]=arguments[h];return setTimeout.apply(void 0,ut([e,t],ht(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function us(e){tn.setTimeout(function(){throw e})}function hi(){}function Nt(e){e()}var Lr=(function(e){De(t,e);function t(r){var h=e.call(this)||this;return h.isStopped=!1,r?(h.destination=r,hs(r)&&r.add(h)):h.destination=on,h}return t.create=function(r,h,g){return new vt(r,h,g)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(kt),rn=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(h){xt(h)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(h){xt(h)}else xt(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){xt(r)}},e})(),vt=(function(e){De(t,e);function t(r,h,g){var E=e.call(this)||this,C;return ue(r)||!r?C={next:r??void 0,error:h??void 0,complete:g??void 0}:C=r,E.destination=new rn(C),E}return t})(Lr);function xt(e){us(e)}function sn(e){throw e}var on={closed:!0,next:hi,error:sn,complete:hi},Tr=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function fs(e){return e}function nn(e){return e.length===0?fs:e.length===1?e[0]:function(r){return e.reduce(function(h,g){return g(h)},r)}}var Ee=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,h){var g=this,E=cn(t)?t:new vt(t,r,h);return Nt(function(){var C=g,i=C.operator,c=C.source;E.add(i?i.call(E,c):c?g._subscribe(E):g._trySubscribe(E))}),E},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var h=this;return r=ui(r),new r(function(g,E){var C=new vt({next:function(i){try{t(i)}catch(c){E(c),C.unsubscribe()}},error:E,complete:g});h.subscribe(C)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[Tr]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return nn(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=ui(t),new t(function(h,g){var E;r.subscribe(function(C){return E=C},function(C){return g(C)},function(){return h(E)})})},e.create=function(t){return new e(t)},e})();function ui(e){var t;return(t=e??en.Promise)!==null&&t!==void 0?t:Promise}function an(e){return e&&ue(e.next)&&ue(e.error)&&ue(e.complete)}function cn(e){return e&&e instanceof Lr||an(e)&&hs(e)}function ln(e){return ue(e==null?void 0:e.lift)}function Bt(e){return function(t){if(ln(t))return t.lift(function(r){try{return e(r,this)}catch(h){this.error(h)}});throw new TypeError("Unable to lift unknown Observable type")}}function Zt(e,t,r,h,g){return new dn(e,t,r,h,g)}var dn=(function(e){De(t,e);function t(r,h,g,E,C,i){var c=e.call(this,r)||this;return c.onFinalize=C,c.shouldUnsubscribe=i,c._next=h?function(d){try{h(d)}catch(v){r.error(v)}}:e.prototype._next,c._error=E?function(d){try{E(d)}catch(v){r.error(v)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=g?function(){try{g()}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var h=this.closed;e.prototype.unsubscribe.call(this),!h&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(Lr),hn=ls(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),_s=(function(e){De(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var h=new fi(this,this);return h.operator=r,h},t.prototype._throwIfClosed=function(){if(this.closed)throw new hn},t.prototype.next=function(r){var h=this;Nt(function(){var g,E;if(h._throwIfClosed(),!h.isStopped){h.currentObservers||(h.currentObservers=Array.from(h.observers));try{for(var C=Ge(h.currentObservers),i=C.next();!i.done;i=C.next()){var c=i.value;c.next(r)}}catch(d){g={error:d}}finally{try{i&&!i.done&&(E=C.return)&&E.call(C)}finally{if(g)throw g.error}}}})},t.prototype.error=function(r){var h=this;Nt(function(){if(h._throwIfClosed(),!h.isStopped){h.hasError=h.isStopped=!0,h.thrownError=r;for(var g=h.observers;g.length;)g.shift().error(r)}})},t.prototype.complete=function(){var r=this;Nt(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var h=r.observers;h.length;)h.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var h=this,g=this,E=g.hasError,C=g.isStopped,i=g.observers;return E||C?ds:(this.currentObservers=null,i.push(r),new kt(function(){h.currentObservers=null,Vt(i,r)}))},t.prototype._checkFinalizedStatuses=function(r){var h=this,g=h.hasError,E=h.thrownError,C=h.isStopped;g?r.error(E):C&&r.complete()},t.prototype.asObservable=function(){var r=new Ee;return r.source=this,r},t.create=function(r,h){return new fi(r,h)},t})(Ee),fi=(function(e){De(t,e);function t(r,h){var g=e.call(this)||this;return g.destination=r,g.source=h,g}return t.prototype.next=function(r){var h,g;(g=(h=this.destination)===null||h===void 0?void 0:h.next)===null||g===void 0||g.call(h,r)},t.prototype.error=function(r){var h,g;(g=(h=this.destination)===null||h===void 0?void 0:h.error)===null||g===void 0||g.call(h,r)},t.prototype.complete=function(){var r,h;(h=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||h===void 0||h.call(r)},t.prototype._subscribe=function(r){var h,g;return(g=(h=this.source)===null||h===void 0?void 0:h.subscribe(r))!==null&&g!==void 0?g:ds},t})(_s),un={now:function(){return Date.now()}},fn=(function(e){De(t,e);function t(r,h){return e.call(this)||this}return t.prototype.schedule=function(r,h){return this},t})(kt),_i={setInterval:function(e,t){for(var r=[],h=2;h<arguments.length;h++)r[h-2]=arguments[h];return setInterval.apply(void 0,ut([e,t],ht(r)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},_n=(function(e){De(t,e);function t(r,h){var g=e.call(this,r,h)||this;return g.scheduler=r,g.work=h,g.pending=!1,g}return t.prototype.schedule=function(r,h){var g;if(h===void 0&&(h=0),this.closed)return this;this.state=r;var E=this.id,C=this.scheduler;return E!=null&&(this.id=this.recycleAsyncId(C,E,h)),this.pending=!0,this.delay=h,this.id=(g=this.id)!==null&&g!==void 0?g:this.requestAsyncId(C,this.id,h),this},t.prototype.requestAsyncId=function(r,h,g){return g===void 0&&(g=0),_i.setInterval(r.flush.bind(r,this),g)},t.prototype.recycleAsyncId=function(r,h,g){if(g===void 0&&(g=0),g!=null&&this.delay===g&&this.pending===!1)return h;h!=null&&_i.clearInterval(h)},t.prototype.execute=function(r,h){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var g=this._execute(r,h);if(g)return g;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,h){var g=!1,E;try{this.work(r)}catch(C){g=!0,E=C||new Error("Scheduled action threw falsy error")}if(g)return this.unsubscribe(),E},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,h=r.id,g=r.scheduler,E=g.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Vt(E,this),h!=null&&(this.id=this.recycleAsyncId(g,h,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(fn),gi=(function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,h){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(h,r)},e.now=un.now,e})(),gn=(function(e){De(t,e);function t(r,h){h===void 0&&(h=gi.now);var g=e.call(this,r,h)||this;return g.actions=[],g._active=!1,g}return t.prototype.flush=function(r){var h=this.actions;if(this._active){h.push(r);return}var g;this._active=!0;do if(g=r.execute(r.state,r.delay))break;while(r=h.shift());if(this._active=!1,g){for(;r=h.shift();)r.unsubscribe();throw g}},t})(gi),vn=new gn(_n),pn=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function mn(e){return ue(e==null?void 0:e.then)}function bn(e){return ue(e[Tr])}function Sn(e){return Symbol.asyncIterator&&ue(e==null?void 0:e[Symbol.asyncIterator])}function yn(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Cn(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var wn=Cn();function En(e){return ue(e==null?void 0:e[wn])}function kn(e){return po(this,arguments,function(){var r,h,g,E;return es(this,function(C){switch(C.label){case 0:r=e.getReader(),C.label=1;case 1:C.trys.push([1,,9,10]),C.label=2;case 2:return[4,We(r.read())];case 3:return h=C.sent(),g=h.value,E=h.done,E?[4,We(void 0)]:[3,5];case 4:return[2,C.sent()];case 5:return[4,We(g)];case 6:return[4,C.sent()];case 7:return C.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Bn(e){return ue(e==null?void 0:e.getReader)}function gs(e){if(e instanceof Ee)return e;if(e!=null){if(bn(e))return In(e);if(pn(e))return Rn(e);if(mn(e))return xn(e);if(Sn(e))return vs(e);if(En(e))return An(e);if(Bn(e))return Ln(e)}throw yn(e)}function In(e){return new Ee(function(t){var r=e[Tr]();if(ue(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Rn(e){return new Ee(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function xn(e){return new Ee(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,us)})}function An(e){return new Ee(function(t){var r,h;try{for(var g=Ge(e),E=g.next();!E.done;E=g.next()){var C=E.value;if(t.next(C),t.closed)return}}catch(i){r={error:i}}finally{try{E&&!E.done&&(h=g.return)&&h.call(g)}finally{if(r)throw r.error}}t.complete()})}function vs(e){return new Ee(function(t){Tn(e,t).catch(function(r){return t.error(r)})})}function Ln(e){return vs(kn(e))}function Tn(e,t){var r,h,g,E;return vo(this,void 0,void 0,function(){var C,i;return es(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=mo(e),c.label=1;case 1:return[4,r.next()];case 2:if(h=c.sent(),!!h.done)return[3,4];if(C=h.value,t.next(C),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),g={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),h&&!h.done&&(E=r.return)?[4,E.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(g)throw g.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Dn(e,t){return Bt(function(r,h){var g=0;r.subscribe(Zt(h,function(E){h.next(e.call(t,E,g++))}))})}function ps(e,t){return Bt(function(r,h){var g=0;r.subscribe(Zt(h,function(E){return e.call(t,E,g++)&&h.next(E)}))})}function ms(e,t){return t===void 0&&(t=vn),Bt(function(r,h){var g=null,E=null,C=null,i=function(){if(g){g.unsubscribe(),g=null;var d=E;E=null,h.next(d)}};function c(){var d=C+e,v=t.now();if(v<d){g=this.schedule(void 0,d-v),h.add(g);return}i()}r.subscribe(Zt(h,function(d){E=d,C=t.now(),g||(g=t.schedule(c,e),h.add(g))},function(){i(),h.complete()},void 0,function(){E=g=null}))})}function bs(e,t){return t===void 0&&(t=fs),e=e??On,Bt(function(r,h){var g,E=!0;r.subscribe(Zt(h,function(C){var i=t(C);(E||!e(g,i))&&(E=!1,g=i,h.next(C))}))})}function On(e,t){return e===t}function Nn(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new _s}:t,h=e.resetOnError,g=h===void 0?!0:h,E=e.resetOnComplete,C=E===void 0?!0:E,i=e.resetOnRefCountZero,c=i===void 0?!0:i;return function(d){var v,l,_,b=0,w=!1,f=!1,s=function(){l==null||l.unsubscribe(),l=void 0},n=function(){s(),v=_=void 0,w=f=!1},o=function(){var a=v;n(),a==null||a.unsubscribe()};return Bt(function(a,u){b++,!f&&!w&&s();var S=_=_??r();u.add(function(){b--,b===0&&!f&&!w&&(l=lr(o,c))}),S.subscribe(u),!v&&b>0&&(v=new vt({next:function(m){return S.next(m)},error:function(m){f=!0,s(),l=lr(n,g,m),S.error(m)},complete:function(){w=!0,s(),l=lr(n,C),S.complete()}}),gs(a).subscribe(v))})(d)}}function lr(e,t){for(var r=[],h=2;h<arguments.length;h++)r[h-2]=arguments[h];if(t===!0){e();return}if(t!==!1){var g=new vt({next:function(){g.unsubscribe(),e()}});return gs(t.apply(void 0,ut([],ht(r)))).subscribe(g)}}/**
|
|
170
|
+
*/function fe(e,t,r){return e?t(e):r==null?void 0:r(e)}function ne(e){return typeof e=="function"}function Un(e){var t=function(s){Error.call(s),s.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Jr=Un(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
171
|
+
`+r.map(function(s,a){return a+1+") "+s.toString()}).join(`
|
|
172
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function wr(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Qt=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,s,a,m;if(!this.closed){this.closed=!0;var v=this._parentage;if(v)if(this._parentage=null,Array.isArray(v))try{for(var i=St(v),c=i.next();!c.done;c=i.next()){var u=c.value;u.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}else v.remove(this);var f=this.initialTeardown;if(ne(f))try{f()}catch(g){m=g instanceof Jr?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var _=St(h),S=_.next();!S.done;S=_.next()){var E=S.value;try{ks(E)}catch(g){m=m??[],g instanceof Jr?m=qe(qe([],Ge(m)),Ge(g.errors)):m.push(g)}}}catch(g){s={error:g}}finally{try{S&&!S.done&&(a=_.return)&&a.call(_)}finally{if(s)throw s.error}}}if(m)throw new Jr(m)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)ks(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&wr(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&wr(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Vn=Qt.EMPTY;function Hn(e){return e instanceof Qt||e&&"closed"in e&&ne(e.remove)&&ne(e.add)&&ne(e.unsubscribe)}function ks(e){ne(e)?e():e.unsubscribe()}var mc={Promise:void 0},bc={setTimeout:function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];return setTimeout.apply(void 0,qe([e,t],Ge(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function $n(e){bc.setTimeout(function(){throw e})}function Wt(){}function _r(e){e()}var Ti=(function(e){tt(t,e);function t(r){var s=e.call(this)||this;return s.isStopped=!1,r?(s.destination=r,Hn(r)&&r.add(s)):s.destination=Cc,s}return t.create=function(r,s,a){return new Gt(r,s,a)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Qt),Sc=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(s){ar(s)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(s){ar(s)}else ar(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){ar(r)}},e})(),Gt=(function(e){tt(t,e);function t(r,s,a){var m=e.call(this)||this,v;return ne(r)||!r?v={next:r??void 0,error:s??void 0,complete:a??void 0}:v=r,m.destination=new Sc(v),m}return t})(Ti);function ar(e){$n(e)}function yc(e){throw e}var Cc={closed:!0,next:Wt,error:yc,complete:Wt},Di=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function er(e){return e}function wc(e){return e.length===0?er:e.length===1?e[0]:function(r){return e.reduce(function(s,a){return a(s)},r)}}var _e=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,s){var a=this,m=kc(t)?t:new Gt(t,r,s);return _r(function(){var v=a,i=v.operator,c=v.source;m.add(i?i.call(m,c):c?a._subscribe(m):a._trySubscribe(m))}),m},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var s=this;return r=Is(r),new r(function(a,m){var v=new Gt({next:function(i){try{t(i)}catch(c){m(c),v.unsubscribe()}},error:m,complete:a});s.subscribe(v)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[Di]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return wc(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Is(t),new t(function(s,a){var m;r.subscribe(function(v){return m=v},function(v){return a(v)},function(){return s(m)})})},e.create=function(t){return new e(t)},e})();function Is(e){var t;return(t=e??mc.Promise)!==null&&t!==void 0?t:Promise}function Ec(e){return e&&ne(e.next)&&ne(e.error)&&ne(e.complete)}function kc(e){return e&&e instanceof Ti||Ec(e)&&Hn(e)}function Ic(e){return ne(e==null?void 0:e.lift)}function ve(e){return function(t){if(Ic(t))return t.lift(function(r){try{return e(r,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function le(e,t,r,s,a){return new Bc(e,t,r,s,a)}var Bc=(function(e){tt(t,e);function t(r,s,a,m,v,i){var c=e.call(this,r)||this;return c.onFinalize=v,c.shouldUnsubscribe=i,c._next=s?function(u){try{s(u)}catch(f){r.error(f)}}:e.prototype._next,c._error=m?function(u){try{m(u)}catch(f){r.error(f)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=a?function(){try{a()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var s=this.closed;e.prototype.unsubscribe.call(this),!s&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(Ti),Ac=Un(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),De=(function(e){tt(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var s=new Bs(this,this);return s.operator=r,s},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ac},t.prototype.next=function(r){var s=this;_r(function(){var a,m;if(s._throwIfClosed(),!s.isStopped){s.currentObservers||(s.currentObservers=Array.from(s.observers));try{for(var v=St(s.currentObservers),i=v.next();!i.done;i=v.next()){var c=i.value;c.next(r)}}catch(u){a={error:u}}finally{try{i&&!i.done&&(m=v.return)&&m.call(v)}finally{if(a)throw a.error}}}})},t.prototype.error=function(r){var s=this;_r(function(){if(s._throwIfClosed(),!s.isStopped){s.hasError=s.isStopped=!0,s.thrownError=r;for(var a=s.observers;a.length;)a.shift().error(r)}})},t.prototype.complete=function(){var r=this;_r(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var s=r.observers;s.length;)s.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var s=this,a=this,m=a.hasError,v=a.isStopped,i=a.observers;return m||v?Vn:(this.currentObservers=null,i.push(r),new Qt(function(){s.currentObservers=null,wr(i,r)}))},t.prototype._checkFinalizedStatuses=function(r){var s=this,a=s.hasError,m=s.thrownError,v=s.isStopped;a?r.error(m):v&&r.complete()},t.prototype.asObservable=function(){var r=new _e;return r.source=this,r},t.create=function(r,s){return new Bs(r,s)},t})(_e),Bs=(function(e){tt(t,e);function t(r,s){var a=e.call(this)||this;return a.destination=r,a.source=s,a}return t.prototype.next=function(r){var s,a;(a=(s=this.destination)===null||s===void 0?void 0:s.next)===null||a===void 0||a.call(s,r)},t.prototype.error=function(r){var s,a;(a=(s=this.destination)===null||s===void 0?void 0:s.error)===null||a===void 0||a.call(s,r)},t.prototype.complete=function(){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||s===void 0||s.call(r)},t.prototype._subscribe=function(r){var s,a;return(a=(s=this.source)===null||s===void 0?void 0:s.subscribe(r))!==null&&a!==void 0?a:Vn},t})(De),Rc={now:function(){return Date.now()}},xc=(function(e){tt(t,e);function t(r,s){return e.call(this)||this}return t.prototype.schedule=function(r,s){return this},t})(Qt),As={setInterval:function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];return setInterval.apply(void 0,qe([e,t],Ge(r)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},Lc=(function(e){tt(t,e);function t(r,s){var a=e.call(this,r,s)||this;return a.scheduler=r,a.work=s,a.pending=!1,a}return t.prototype.schedule=function(r,s){var a;if(s===void 0&&(s=0),this.closed)return this;this.state=r;var m=this.id,v=this.scheduler;return m!=null&&(this.id=this.recycleAsyncId(v,m,s)),this.pending=!0,this.delay=s,this.id=(a=this.id)!==null&&a!==void 0?a:this.requestAsyncId(v,this.id,s),this},t.prototype.requestAsyncId=function(r,s,a){return a===void 0&&(a=0),As.setInterval(r.flush.bind(r,this),a)},t.prototype.recycleAsyncId=function(r,s,a){if(a===void 0&&(a=0),a!=null&&this.delay===a&&this.pending===!1)return s;s!=null&&As.clearInterval(s)},t.prototype.execute=function(r,s){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var a=this._execute(r,s);if(a)return a;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,s){var a=!1,m;try{this.work(r)}catch(v){a=!0,m=v||new Error("Scheduled action threw falsy error")}if(a)return this.unsubscribe(),m},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,s=r.id,a=r.scheduler,m=a.actions;this.work=this.state=this.scheduler=null,this.pending=!1,wr(m,this),s!=null&&(this.id=this.recycleAsyncId(a,s,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(xc),Rs=(function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,s){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(s,r)},e.now=Rc.now,e})(),Tc=(function(e){tt(t,e);function t(r,s){s===void 0&&(s=Rs.now);var a=e.call(this,r,s)||this;return a.actions=[],a._active=!1,a}return t.prototype.flush=function(r){var s=this.actions;if(this._active){s.push(r);return}var a;this._active=!0;do if(a=r.execute(r.state,r.delay))break;while(r=s.shift());if(this._active=!1,a){for(;r=s.shift();)r.unsubscribe();throw a}},t})(Rs),tr=new Tc(Lc),Dc=tr,Wn=new _e(function(e){return e.complete()});function Gn(e){return e&&ne(e.schedule)}function Oi(e){return e[e.length-1]}function Oc(e){return ne(Oi(e))?e.pop():void 0}function Kn(e){return Gn(Oi(e))?e.pop():void 0}function Nc(e,t){return typeof Oi(e)=="number"?e.pop():t}var Ni=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Zn(e){return ne(e==null?void 0:e.then)}function zn(e){return ne(e[Di])}function Yn(e){return Symbol.asyncIterator&&ne(e==null?void 0:e[Symbol.asyncIterator])}function jn(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Mc(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Xn=Mc();function Jn(e){return ne(e==null?void 0:e[Xn])}function qn(e){return Na(this,arguments,function(){var r,s,a,m;return xn(this,function(v){switch(v.label){case 0:r=e.getReader(),v.label=1;case 1:v.trys.push([1,,9,10]),v.label=2;case 2:return[4,mt(r.read())];case 3:return s=v.sent(),a=s.value,m=s.done,m?[4,mt(void 0)]:[3,5];case 4:return[2,v.sent()];case 5:return[4,mt(a)];case 6:return[4,v.sent()];case 7:return v.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Qn(e){return ne(e==null?void 0:e.getReader)}function Se(e){if(e instanceof _e)return e;if(e!=null){if(zn(e))return Fc(e);if(Ni(e))return Pc(e);if(Zn(e))return Uc(e);if(Yn(e))return eo(e);if(Jn(e))return Vc(e);if(Qn(e))return Hc(e)}throw jn(e)}function Fc(e){return new _e(function(t){var r=e[Di]();if(ne(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Pc(e){return new _e(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function Uc(e){return new _e(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,$n)})}function Vc(e){return new _e(function(t){var r,s;try{for(var a=St(e),m=a.next();!m.done;m=a.next()){var v=m.value;if(t.next(v),t.closed)return}}catch(i){r={error:i}}finally{try{m&&!m.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}t.complete()})}function eo(e){return new _e(function(t){$c(e,t).catch(function(r){return t.error(r)})})}function Hc(e){return eo(qn(e))}function $c(e,t){var r,s,a,m;return Oa(this,void 0,void 0,function(){var v,i;return xn(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=Ma(e),c.label=1;case 1:return[4,r.next()];case 2:if(s=c.sent(),!!s.done)return[3,4];if(v=s.value,t.next(v),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),a={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),s&&!s.done&&(m=r.return)?[4,m.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function dt(e,t,r,s,a){s===void 0&&(s=0),a===void 0&&(a=!1);var m=t.schedule(function(){r(),a?e.add(this.schedule(null,s)):this.unsubscribe()},s);if(e.add(m),!a)return m}function to(e,t){return t===void 0&&(t=0),ve(function(r,s){r.subscribe(le(s,function(a){return dt(s,e,function(){return s.next(a)},t)},function(){return dt(s,e,function(){return s.complete()},t)},function(a){return dt(s,e,function(){return s.error(a)},t)}))})}function ro(e,t){return t===void 0&&(t=0),ve(function(r,s){s.add(e.schedule(function(){return r.subscribe(s)},t))})}function Wc(e,t){return Se(e).pipe(ro(t),to(t))}function Gc(e,t){return Se(e).pipe(ro(t),to(t))}function Kc(e,t){return new _e(function(r){var s=0;return t.schedule(function(){s===e.length?r.complete():(r.next(e[s++]),r.closed||this.schedule())})})}function Zc(e,t){return new _e(function(r){var s;return dt(r,t,function(){s=e[Xn](),dt(r,t,function(){var a,m,v;try{a=s.next(),m=a.value,v=a.done}catch(i){r.error(i);return}v?r.complete():r.next(m)},0,!0)}),function(){return ne(s==null?void 0:s.return)&&s.return()}})}function io(e,t){if(!e)throw new Error("Iterable cannot be null");return new _e(function(r){dt(r,t,function(){var s=e[Symbol.asyncIterator]();dt(r,t,function(){s.next().then(function(a){a.done?r.complete():r.next(a.value)})},0,!0)})})}function zc(e,t){return io(qn(e),t)}function Yc(e,t){if(e!=null){if(zn(e))return Wc(e,t);if(Ni(e))return Kc(e,t);if(Zn(e))return Gc(e,t);if(Yn(e))return io(e,t);if(Jn(e))return Zc(e,t);if(Qn(e))return zc(e,t)}throw jn(e)}function so(e,t){return t?Yc(e,t):Se(e)}function jc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kn(e);return so(e,r)}function Xc(e){return e instanceof Date&&!isNaN(e)}function Re(e,t){return ve(function(r,s){var a=0;r.subscribe(le(s,function(m){s.next(e.call(t,m,a++))}))})}var Jc=Array.isArray;function qc(e,t){return Jc(t)?e.apply(void 0,qe([],Ge(t))):e(t)}function Qc(e){return Re(function(t){return qc(e,t)})}function el(e,t,r,s,a,m,v,i){var c=[],u=0,f=0,h=!1,_=function(){h&&!c.length&&!u&&t.complete()},S=function(g){return u<s?E(g):c.push(g)},E=function(g){u++;var n=!1;Se(r(g,f++)).subscribe(le(t,function(l){t.next(l)},function(){n=!0},void 0,function(){if(n)try{u--;for(var l=function(){var o=c.shift();v||E(o)};c.length&&u<s;)l();_()}catch(o){t.error(o)}}))};return e.subscribe(le(t,S,function(){h=!0,_()})),function(){}}function at(e,t,r){return r===void 0&&(r=1/0),ne(t)?at(function(s,a){return Re(function(m,v){return t(s,m,a,v)})(Se(e(s,a)))},r):(typeof t=="number"&&(r=t),ve(function(s,a){return el(s,a,e,r)}))}function tl(e){return e===void 0&&(e=1/0),at(er,e)}function rl(e){return new _e(function(t){Se(e()).subscribe(t)})}var il={connector:function(){return new De},resetOnDisconnect:!0};function st(e,t){t===void 0&&(t=il);var r=null,s=t.connector,a=t.resetOnDisconnect,m=a===void 0?!0:a,v=s(),i=new _e(function(c){return v.subscribe(c)});return i.connect=function(){return(!r||r.closed)&&(r=rl(function(){return e}).subscribe(v),m&&r.add(function(){return v=s()})),r},i}var sl=["addListener","removeListener"],nl=["addEventListener","removeEventListener"],ol=["on","off"];function hi(e,t,r,s){if(ne(r)&&(s=r,r=void 0),s)return hi(e,t,r).pipe(Qc(s));var a=Ge(ll(e)?nl.map(function(i){return function(c){return e[i](t,c,r)}}):al(e)?sl.map(xs(e,t)):cl(e)?ol.map(xs(e,t)):[],2),m=a[0],v=a[1];if(!m&&Ni(e))return at(function(i){return hi(i,t,r)})(Se(e));if(!m)throw new TypeError("Invalid event target");return new _e(function(i){var c=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return i.next(1<u.length?u:u[0])};return m(c),function(){return v(c)}})}function xs(e,t){return function(r){return function(s){return e[r](t,s)}}}function al(e){return ne(e.addListener)&&ne(e.removeListener)}function cl(e){return ne(e.on)&&ne(e.off)}function ll(e){return ne(e.addEventListener)&&ne(e.removeEventListener)}function Pt(e,t,r){e===void 0&&(e=0),r===void 0&&(r=Dc);var s=-1;return t!=null&&(Gn(t)?r=t:s=t),new _e(function(a){var m=Xc(e)?+e-r.now():e;m<0&&(m=0);var v=0;return r.schedule(function(){a.closed||(a.next(v++),0<=s?this.schedule(void 0,s):a.complete())},m)})}function dl(e,t){return t===void 0&&(t=tr),Pt(e,e,t)}function hl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kn(e),s=Nc(e,1/0),a=e;return a.length?a.length===1?Se(a[0]):tl(s)(so(a,r)):Wn}var ul=Array.isArray;function fl(e){return e.length===1&&ul(e[0])?e[0]:e}function Pe(e,t){return ve(function(r,s){var a=0;r.subscribe(le(s,function(m){return e.call(t,m,a++)&&s.next(m)}))})}function gl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=fl(e),e.length===1?Se(e[0]):new _e(pl(e))}function pl(e){return function(t){for(var r=[],s=function(m){r.push(Se(e[m]).subscribe(le(t,function(v){if(r){for(var i=0;i<r.length;i++)i!==m&&r[i].unsubscribe();r=null}t.next(v)})))},a=0;r&&!t.closed&&a<e.length;a++)s(a)}}function _l(e){return ve(function(t,r){var s=null,a=null,m=function(){a==null||a.unsubscribe();var v=s;s=[],v&&r.next(v),Se(e()).subscribe(a=le(r,m,Wt))};m(),t.subscribe(le(r,function(v){return s==null?void 0:s.push(v)},function(){s&&r.next(s),r.complete()},void 0,function(){return s=a=null}))})}function no(e){return ve(function(t,r){var s=null,a=!1,m;s=t.subscribe(le(r,void 0,void 0,function(v){m=Se(e(v,no(e)(t))),s?(s.unsubscribe(),s=null,m.subscribe(r)):a=!0})),a&&(s.unsubscribe(),s=null,m.subscribe(r))})}function vl(e,t,r,s,a){return function(m,v){var i=r,c=t,u=0;m.subscribe(le(v,function(f){var h=u++;c=i?e(c,f,h):(i=!0,f),v.next(c)},a))}}function oo(e,t){return t===void 0&&(t=tr),ve(function(r,s){var a=null,m=null,v=null,i=function(){if(a){a.unsubscribe(),a=null;var u=m;m=null,s.next(u)}};function c(){var u=v+e,f=t.now();if(f<u){a=this.schedule(void 0,u-f),s.add(a);return}i()}r.subscribe(le(s,function(u){m=u,v=t.now(),a||(a=t.schedule(c,e),s.add(a))},function(){i(),s.complete()},void 0,function(){m=a=null}))})}function Ls(e){return e<=0?function(){return Wn}:ve(function(t,r){var s=0;t.subscribe(le(r,function(a){++s<=e&&(r.next(a),e<=s&&r.complete())}))})}function ao(e,t){return t===void 0&&(t=er),e=e??ml,ve(function(r,s){var a,m=!0;r.subscribe(le(s,function(v){var i=t(v);(m||!e(a,i))&&(m=!1,a=i,s.next(v))}))})}function ml(e,t){return e===t}function bl(e){return ve(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}function Sl(e,t){return ve(vl(e,t,arguments.length>=2,!0))}function co(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new De}:t,s=e.resetOnError,a=s===void 0?!0:s,m=e.resetOnComplete,v=m===void 0?!0:m,i=e.resetOnRefCountZero,c=i===void 0?!0:i;return function(u){var f,h,_,S=0,E=!1,g=!1,n=function(){h==null||h.unsubscribe(),h=void 0},l=function(){n(),f=_=void 0,E=g=!1},o=function(){var d=f;l(),d==null||d.unsubscribe()};return ve(function(d,p){S++,!g&&!E&&n();var C=_=_??r();p.add(function(){S--,S===0&&!g&&!E&&(h=qr(o,c))}),C.subscribe(p),!f&&S>0&&(f=new Gt({next:function(y){return C.next(y)},error:function(y){g=!0,n(),h=qr(l,a,y),C.error(y)},complete:function(){E=!0,n(),h=qr(l,v),C.complete()}}),Se(d).subscribe(f))})(u)}}function qr(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(t===!0){e();return}if(t!==!1){var a=new Gt({next:function(){a.unsubscribe(),e()}});return Se(t.apply(void 0,qe([],Ge(r)))).subscribe(a)}}function yl(e){return ve(function(t,r){var s=!1,a=le(r,function(){a==null||a.unsubscribe(),s=!0},Wt);Se(e).subscribe(a),t.subscribe(le(r,function(m){return s&&r.next(m)}))})}function Ts(e,t){return ve(function(r,s){var a=null,m=0,v=!1,i=function(){return v&&!a&&s.complete()};r.subscribe(le(s,function(c){a==null||a.unsubscribe();var u=0,f=m++;Se(e(c,f)).subscribe(a=le(s,function(h){return s.next(t?t(c,h,f,u++):h)},function(){a=null,i()}))},function(){v=!0,i()}))})}function cr(e,t){return t===void 0&&(t=!1),ve(function(r,s){var a=0;r.subscribe(le(s,function(m){var v=e(m,a++);(v||t)&&s.next(m),!v&&s.complete()}))})}function Cl(e,t,r){var s=ne(e)||t||r?{next:e,error:t,complete:r}:e;return s?ve(function(a,m){var v;(v=s.subscribe)===null||v===void 0||v.call(s);var i=!0;a.subscribe(le(m,function(c){var u;(u=s.next)===null||u===void 0||u.call(s,c),m.next(c)},function(){var c;i=!1,(c=s.complete)===null||c===void 0||c.call(s),m.complete()},function(c){var u;i=!1,(u=s.error)===null||u===void 0||u.call(s,c),m.error(c)},function(){var c,u;i&&((c=s.unsubscribe)===null||c===void 0||c.call(s)),(u=s.finalize)===null||u===void 0||u.call(s)}))}):er}function wl(e,t){return ve(function(r,s){var a=t??{},m=a.leading,v=m===void 0?!0:m,i=a.trailing,c=i===void 0?!1:i,u=!1,f=null,h=null,_=!1,S=function(){h==null||h.unsubscribe(),h=null,c&&(n(),_&&s.complete())},E=function(){h=null,_&&s.complete()},g=function(l){return h=Se(e(l)).subscribe(le(s,S,E))},n=function(){if(u){u=!1;var l=f;f=null,s.next(l),!_&&g(l)}};r.subscribe(le(s,function(l){u=!0,f=l,!(h&&!h.closed)&&(v?n():g(l))},function(){_=!0,!(c&&u&&h&&!h.closed)&&s.complete()}))})}function Ds(e,t,r){t===void 0&&(t=tr);var s=Pt(e,t);return wl(function(){return s},r)}function Qr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Oc(e);return ve(function(s,a){for(var m=e.length,v=new Array(m),i=e.map(function(){return!1}),c=!1,u=function(h){Se(e[h]).subscribe(le(a,function(_){v[h]=_,!c&&!i[h]&&(i[h]=!0,(c=i.every(er))&&(i=null))},Wt))},f=0;f<m;f++)u(f);s.subscribe(le(a,function(h){if(c){var _=qe([h],Ge(v));a.next(r?r.apply(void 0,qe([],Ge(_))):_)}}))})}/**
|
|
168
173
|
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
|
|
169
174
|
* @license MIT
|
|
170
|
-
*/const
|
|
171
|
-
class="icon"
|
|
172
|
-
width="16"
|
|
173
|
-
height="16"
|
|
174
|
-
viewBox="0 0 16 16"
|
|
175
|
-
fill="currentColor"
|
|
176
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
177
|
-
>
|
|
178
|
-
<path
|
|
179
|
-
fill-rule="evenodd"
|
|
180
|
-
clip-rule="evenodd"
|
|
181
|
-
d="M11.9564 6H12.0063C12.8003 6 13.5617 6.31607 14.1231 6.87868C14.6845 7.44129 14.9999 8.20435 14.9999 9C14.9999 9.79565 14.6845 10.5587 14.1231 11.1213C13.5617 11.6839 12.8003 12 12.0063 12H10.0106V11H12.0063C12.5356 11 13.0432 10.7893 13.4175 10.4142C13.7918 10.0391 14.002 9.53044 14.002 9C14.002 8.46957 13.7918 7.96086 13.4175 7.58579C13.0432 7.21072 12.5356 7 12.0063 7H11.0923L10.9686 6.143C10.8937 5.60541 10.6455 5.10711 10.2617 4.72407C9.87792 4.34103 9.37968 4.09427 8.84295 4.02143C8.30621 3.94859 7.76044 4.05365 7.28883 4.3206C6.81723 4.58754 6.44567 5.00173 6.23082 5.5L5.89754 6.262L5.08929 6.073C4.90378 6.02699 4.71361 6.0025 4.52251 6C3.8609 6 3.22639 6.2634 2.75856 6.73224C2.29073 7.20108 2.02791 7.83696 2.02791 8.5C2.02791 9.16304 2.29073 9.79893 2.75856 10.2678C3.22639 10.7366 3.8609 11 4.52251 11H7.01712V12H4.52251C4.02742 12.0043 3.53708 11.903 3.08401 11.7029C2.63095 11.5028 2.22551 11.2084 1.8946 10.8394C1.56369 10.4703 1.31487 10.0349 1.16465 9.56211C1.01442 9.08932 0.966218 8.58992 1.02324 8.09704C1.08026 7.60416 1.24121 7.12906 1.49539 6.70326C1.74958 6.27745 2.0912 5.91068 2.4976 5.62727C2.904 5.34385 3.36588 5.15027 3.85261 5.05937C4.33935 4.96847 4.8398 4.98232 5.32079 5.1C5.62405 4.40501 6.14506 3.82799 6.8049 3.45635C7.46474 3.08472 8.22745 2.9387 8.97752 3.04044C9.72759 3.14217 10.4241 3.4861 10.9617 4.02014C11.4992 4.55418 11.8484 5.24923 11.9564 6ZM10.2928 9.85348L8.97879 8.53944L8.97879 13.9749H7.98492L7.98493 8.57568L6.7071 9.85347L5.99999 9.14636L8.14643 6.99998H8.85354L10.9999 9.14637L10.2928 9.85348Z"
|
|
182
|
-
/>
|
|
183
|
-
</svg>`,Wn=Z`
|
|
175
|
+
*/const El=2,kl=1;class Il{constructor(){}activate(t){this._terminal=t}dispose(){}fit(t){const r=this.proposeDimensions();if(t!==void 0&&r&&(r.rows=t),!r||!this._terminal||isNaN(r.cols)||isNaN(r.rows))return;const s=this._terminal._core;return(this._terminal.rows!==r.rows||this._terminal.cols!==r.cols)&&(s._renderService.clear(),this._terminal.resize(r.cols,r.rows)),r}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const t=this.getCore(),r=t._renderService.dimensions;if(r.css.cell.width===0||r.css.cell.height===0)return;const s=this._terminal.options.scrollback===0?0:t.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),m=parseInt(a.getPropertyValue("height")),v=Math.max(0,parseInt(a.getPropertyValue("width"))),i=window.getComputedStyle(this._terminal.element),c={top:parseInt(i.getPropertyValue("padding-top")),bottom:parseInt(i.getPropertyValue("padding-bottom")),right:parseInt(i.getPropertyValue("padding-right")),left:parseInt(i.getPropertyValue("padding-left"))},u=c.top+c.bottom,f=c.right+c.left,h=m-u,_=v-f-s,{width:S,height:E}=this.getCellSize();return{cols:Math.max(El,Math.floor(_/S)),rows:Math.max(kl,Math.floor(h/E))}}getCellSize(){const{value:t}=this.getCore()._renderService._renderer;return{width:t._charSizeService.width+Math.round(t._optionsService.rawOptions.letterSpacing),height:Math.floor(t._charSizeService.height*t._optionsService.rawOptions.lineHeight)}}getCore(){return this._terminal._core}}let ui;async function Ce(e,t,r){var a;const s={type:t,output:r};return await((a=e.postMessage)==null?void 0:a.call(e,s))}function Bl(e,t){var r;return((r=e.onDidReceiveMessage)==null?void 0:r.call(e,t))??{dispose:()=>{}}}function Ae(){if(!ui)throw new Error("Renderer context not defined");return ui}function lo(e){ui=e}var Q=(e=>(e.infoMessage="common:infoMessage",e.errorMessage="common:errorMessage",e.closeCellOutput="common:closeCellOutput",e.displayPrompt="common:displayPrompt",e.onPrompt="common:onPrompt",e.setState="common:setState",e.getState="common:getState",e.onGetState="common:onGetState",e.onCategoryChange="common:onCategoryChange",e.platformApiRequest="common:platformApiRequest",e.platformApiResponse="common:platformApiResponse",e.optionsMessage="common:optionsMessage",e.optionsModal="common:optionsModal",e.openExternalLink="common:openExternalLink",e.onOptionsMessage="common:onOptionsMessage",e.copyTextToClipboard="common:copyTextToClipboard",e.onCopyTextToClipboard="common:onCopyTextToClipboard",e.onProgramClose="common:onProgramClose",e.denoUpdate="deno:deploymentUpdate",e.denoPromote="deno:promoteDeployment",e.vercelProd="vercel:promotePreview",e.mutateAnnotations="annotations:mutate",e.terminalStdout="terminal:stdout",e.terminalStderr="terminal:stderr",e.terminalStdin="terminal:stdin",e.terminalResize="terminal:resize",e.terminalFocus="terminal:focus",e.terminalOpen="terminal:open",e.openLink="terminal:openLink",e.activeThemeChanged="theme:changed",e.githubWorkflowDispatch="github:workflowDispatch",e.githubWorkflowDeploy="github:workflowDeploy",e.githubWorkflowStatusUpdate="github:workflowStatusUpdate",e.tangleEvent="tangle:event",e.gcpResourceStatusChanged="gcp:resourceStatusChanged",e.gcpClusterCheckStatus="gcp:clusterCheckStatus",e.gcpClusterDetails="gcp:clusterDetails",e.gcpClusterDetailsNewCell="gcp:clusterDetailsNewCell",e.gcpClusterDetailsResponse="gcp:clusterDetailsResponse",e.gcpVMInstanceAction="gcp:gceVMInstanceAction",e.awsEC2Instances="aws:ec2Instances",e.awsEC2InstanceAction="aws:ec2InstanceAction",e.awsEKSClusterAction="aws:eksClusterAction",e.onAuthorModeChange="common:onAuthorModeChange",e.gistCell="gist:cell",e.gcpCloudRunAction="gcp:cloudRunAction",e.gcpLoadServices="gcp:loadServices",e.gcpServicesLoaded="gcp:servicesLoaded",e.daggerSyncState="dagger:syncState",e.daggerCliAction="dagger:cliAction",e.featuresUpdateAction="features:updateAction",e.featuresRequest="features:request",e.featuresResponse="features:response",e))(Q||{}),ho=(e=>(e.vercel="stateful.runme/vercel-stdout",e.deno="stateful.runme/deno-stdout",e.outputItems="stateful.runme/output-items",e.annotations="stateful.runme/annotations",e.terminal="stateful.runme/terminal",e.error="stateful.runme/error",e.github="stateful.runme/github-stdout",e.stdout="application/vnd.code.notebook.stdout",e.gcp="stateful.runme/gcp",e.aws="stateful.runme/aws",e.daggerCall="stateful.runme/dagger",e.daggerShell="stateful.runme/dagger",e))(ho||{}),uo=(e=>(e.RunmeCloud="runme.cloud",e.RunmeChat="runme.chat",e.RunmeSearch="runme.search",e.NotebookEnvStore="runme.notebook.envStore",e))(uo||{});function Al({}){}function Rl(e){return e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0})}function xl(e){const r=new Date().getTime()-e.getTime(),s=Math.floor(r/1e3)*-1,a=new Intl.RelativeTimeFormat("en",{numeric:"auto"});return Math.abs(s)<60?a.format(Math.round(s),"second"):Math.abs(s)<3600?a.format(Math.round(s/60),"minute"):Math.abs(s)<86400?a.format(Math.round(s/3600),"hour"):a.format(Math.round(s/86400),"day")}const Ll=j`
|
|
184
176
|
<svg
|
|
185
177
|
class="icon"
|
|
186
178
|
width="16"
|
|
@@ -195,17 +187,31 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
195
187
|
d="M13.353 1.146L14.853 2.646L15 3V14.5L14.5 15H1.5L1 14.5V1.5L1.5 1H13L13.353 1.146ZM2 2V14H14V3.208L12.793 2H11V6H4V2H2ZM8 2V5H10V2H8Z"
|
|
196
188
|
/>
|
|
197
189
|
</svg>
|
|
198
|
-
|
|
190
|
+
`,Tl=j`<svg
|
|
191
|
+
class="icon"
|
|
192
|
+
width="16"
|
|
193
|
+
height="16"
|
|
194
|
+
viewBox="0 0 16 16"
|
|
195
|
+
fill="currentColor"
|
|
196
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
197
|
+
>
|
|
198
|
+
<path
|
|
199
|
+
fill-rule="evenodd"
|
|
200
|
+
clip-rule="evenodd"
|
|
201
|
+
d="M11.9564 6H12.0063C12.8003 6 13.5617 6.31607 14.1231 6.87868C14.6845 7.44129 14.9999 8.20435 14.9999 9C14.9999 9.79565 14.6845 10.5587 14.1231 11.1213C13.5617 11.6839 12.8003 12 12.0063 12H10.0106V11H12.0063C12.5356 11 13.0432 10.7893 13.4175 10.4142C13.7918 10.0391 14.002 9.53044 14.002 9C14.002 8.46957 13.7918 7.96086 13.4175 7.58579C13.0432 7.21072 12.5356 7 12.0063 7H11.0923L10.9686 6.143C10.8937 5.60541 10.6455 5.10711 10.2617 4.72407C9.87792 4.34103 9.37968 4.09427 8.84295 4.02143C8.30621 3.94859 7.76044 4.05365 7.28883 4.3206C6.81723 4.58754 6.44567 5.00173 6.23082 5.5L5.89754 6.262L5.08929 6.073C4.90378 6.02699 4.71361 6.0025 4.52251 6C3.8609 6 3.22639 6.2634 2.75856 6.73224C2.29073 7.20108 2.02791 7.83696 2.02791 8.5C2.02791 9.16304 2.29073 9.79893 2.75856 10.2678C3.22639 10.7366 3.8609 11 4.52251 11H7.01712V12H4.52251C4.02742 12.0043 3.53708 11.903 3.08401 11.7029C2.63095 11.5028 2.22551 11.2084 1.8946 10.8394C1.56369 10.4703 1.31487 10.0349 1.16465 9.56211C1.01442 9.08932 0.966218 8.58992 1.02324 8.09704C1.08026 7.60416 1.24121 7.12906 1.49539 6.70326C1.74958 6.27745 2.0912 5.91068 2.4976 5.62727C2.904 5.34385 3.36588 5.15027 3.85261 5.05937C4.33935 4.96847 4.8398 4.98232 5.32079 5.1C5.62405 4.40501 6.14506 3.82799 6.8049 3.45635C7.46474 3.08472 8.22745 2.9387 8.97752 3.04044C9.72759 3.14217 10.4241 3.4861 10.9617 4.02014C11.4992 4.55418 11.8484 5.24923 11.9564 6ZM10.2928 9.85348L8.97879 8.53944L8.97879 13.9749H7.98492L7.98493 8.57568L6.7071 9.85347L5.99999 9.14636L8.14643 6.99998H8.85354L10.9999 9.14637L10.2928 9.85348Z"
|
|
202
|
+
/>
|
|
203
|
+
</svg>`;var Dl=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,ft=(e,t,r,s)=>{for(var a=s>1?void 0:s?Ol(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&Dl(t,r,a),a};let Ke=class extends Ee{constructor(){super(...arguments),this.text="Copy",this.loadingText="Saving...",this.loading=!1,this.disabled=!1}onClick(e){e.defaultPrevented&&e.preventDefault();const t=new CustomEvent(this.disabled?"onClickDisabled":"onClick");this.dispatchEvent(t)}render(){const e=this.text.toLocaleLowerCase();return j`
|
|
199
204
|
<vscode-button
|
|
200
205
|
?disabled=${this.loading}
|
|
201
206
|
class=${e}
|
|
202
207
|
appearance="secondary"
|
|
203
208
|
@click=${this.onClick}
|
|
204
209
|
>
|
|
205
|
-
${
|
|
206
|
-
${
|
|
210
|
+
${fe(this.shareIcon,()=>Tl)}
|
|
211
|
+
${fe(this.saveIcon,()=>Ll)}
|
|
212
|
+
${fe(this.loading,()=>j`${this.loadingText}`,()=>j`${this.text}`)}
|
|
207
213
|
</vscode-button>
|
|
208
|
-
`}};
|
|
214
|
+
`}};Ke.styles=Me`
|
|
209
215
|
vscode-button {
|
|
210
216
|
color: var(--vscode-button-foreground);
|
|
211
217
|
background-color: var(--vscode-button-background);
|
|
@@ -225,7 +231,7 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
225
231
|
margin: 0 5px 0 -5px;
|
|
226
232
|
padding: 0;
|
|
227
233
|
}
|
|
228
|
-
`;
|
|
234
|
+
`;ft([G({type:String})],Ke.prototype,"text",2);ft([G({type:String})],Ke.prototype,"loadingText",2);ft([G({type:Boolean,reflect:!0})],Ke.prototype,"loading",2);ft([G({type:Boolean,reflect:!0})],Ke.prototype,"disabled",2);ft([G({type:Boolean,reflect:!0})],Ke.prototype,"shareIcon",2);ft([G({type:Boolean,reflect:!0})],Ke.prototype,"saveIcon",2);Ke=ft([Le("action-button")],Ke);const Os=j`
|
|
229
235
|
<svg
|
|
230
236
|
height="16"
|
|
231
237
|
aria-hidden="true"
|
|
@@ -240,15 +246,19 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
240
246
|
d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"
|
|
241
247
|
></path>
|
|
242
248
|
</svg>
|
|
243
|
-
`;var
|
|
249
|
+
`;var Nl=Object.defineProperty,Ml=Object.getOwnPropertyDescriptor,Mi=(e,t,r,s)=>{for(var a=s>1?void 0:s?Ml(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&Nl(t,r,a),a};let Kt=class extends Ee{constructor(){super(...arguments),this.text="Preview & Gist",this.disabled=!1}onGistClick(e){e.defaultPrevented&&e.preventDefault();const t=new CustomEvent("onGist");this.dispatchEvent(t)}render(){const e=this.text.toLocaleLowerCase();return fe(this.disabled,()=>j`
|
|
244
250
|
<vscode-button class=${e} disabled appearance="secondary">
|
|
245
|
-
${
|
|
251
|
+
${Os} ${this.text}
|
|
246
252
|
</vscode-button>
|
|
247
|
-
`,()=>
|
|
248
|
-
<vscode-button
|
|
249
|
-
|
|
253
|
+
`,()=>j`
|
|
254
|
+
<vscode-button
|
|
255
|
+
class=${e}
|
|
256
|
+
appearance="secondary"
|
|
257
|
+
@click=${this.onGistClick}
|
|
258
|
+
>
|
|
259
|
+
${Os} ${this.text}
|
|
250
260
|
</vscode-button>
|
|
251
|
-
`)}};
|
|
261
|
+
`)}};Kt.styles=Me`
|
|
252
262
|
vscode-button {
|
|
253
263
|
color: var(--vscode-button-foreground);
|
|
254
264
|
background-color: var(--vscode-button-background);
|
|
@@ -268,7 +278,7 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
268
278
|
margin: 0 5px 0 -5px;
|
|
269
279
|
padding: 0;
|
|
270
280
|
}
|
|
271
|
-
`;
|
|
281
|
+
`;Mi([G({type:String})],Kt.prototype,"text",2);Mi([G({type:Boolean,reflect:!0})],Kt.prototype,"disabled",2);Kt=Mi([Le("gist-cell")],Kt);const fo=j`
|
|
272
282
|
<svg
|
|
273
283
|
width="16"
|
|
274
284
|
height="16"
|
|
@@ -284,11 +294,15 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
284
294
|
fill="currentColor"
|
|
285
295
|
/>
|
|
286
296
|
</svg>
|
|
287
|
-
`;var
|
|
288
|
-
<vscode-button
|
|
289
|
-
|
|
297
|
+
`;var Fl=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,Fi=(e,t,r,s)=>{for(var a=s>1?void 0:s?Pl(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&Fl(t,r,a),a};let Zt=class extends Ee{constructor(){super(...arguments),this.openText="Open",this.disabled=!1}onOpenClick(e){e.defaultPrevented&&e.preventDefault();const t=new CustomEvent("onOpen");this.dispatchEvent(t)}render(){const e=this.openText.toLocaleLowerCase();return fe(this.disabled,()=>{},()=>j`
|
|
298
|
+
<vscode-button
|
|
299
|
+
class=${e}
|
|
300
|
+
appearance="secondary"
|
|
301
|
+
@click=${this.onOpenClick}
|
|
302
|
+
>
|
|
303
|
+
${fo} ${this.openText}
|
|
290
304
|
</vscode-button>
|
|
291
|
-
`)}};
|
|
305
|
+
`)}};Zt.styles=Me`
|
|
292
306
|
vscode-button {
|
|
293
307
|
color: var(--vscode-button-foreground);
|
|
294
308
|
background-color: var(--vscode-button-background);
|
|
@@ -305,7 +319,7 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
305
319
|
margin: 0 5px 0 -5px;
|
|
306
320
|
padding: 0;
|
|
307
321
|
}
|
|
308
|
-
`;
|
|
322
|
+
`;Fi([G({type:String})],Zt.prototype,"openText",2);Fi([G({type:Boolean,reflect:!0})],Zt.prototype,"disabled",2);Zt=Fi([Le("open-cell")],Zt);var Ul=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,Pi=(e,t,r,s)=>{for(var a=s>1?void 0:s?Vl(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&Ul(t,r,a),a};let Er=class extends Ee{constructor(){super(...arguments),this.loading=!1,this.signedIn=!1}handleClick(e){e.defaultPrevented&&e.preventDefault(),this.dispatchEvent(new CustomEvent("onClick"))}render(){let e=this.signedIn?"Save":"Save to Cloud";return j`
|
|
309
323
|
<action-button
|
|
310
324
|
?loading=${this.loading}
|
|
311
325
|
text="${e}"
|
|
@@ -313,7 +327,7 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
313
327
|
@onClick="${this.handleClick}"
|
|
314
328
|
>
|
|
315
329
|
</action-button>
|
|
316
|
-
`}};
|
|
330
|
+
`}};Pi([G({type:Boolean,reflect:!0})],Er.prototype,"loading",2);Pi([G({type:Boolean,reflect:!0})],Er.prototype,"signedIn",2);Er=Pi([Le("save-button")],Er);var Hl=Object.defineProperty,$l=Object.getOwnPropertyDescriptor,go=(e,t,r,s)=>{for(var a=s>1?void 0:s?$l(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&Hl(t,r,a),a};let fi=class extends Ee{constructor(){super(...arguments),this.loading=!1}handleClick(e){e.defaultPrevented&&e.preventDefault(),this.dispatchEvent(new CustomEvent("onClick"))}render(){return j`
|
|
317
331
|
<action-button
|
|
318
332
|
?loading=${this.loading}
|
|
319
333
|
text="Share"
|
|
@@ -321,11 +335,11 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
321
335
|
@onClick="${this.handleClick}"
|
|
322
336
|
>
|
|
323
337
|
</action-button>
|
|
324
|
-
`}};
|
|
338
|
+
`}};go([G({type:Boolean,reflect:!0})],fi.prototype,"loading",2);fi=go([Le("share-button")],fi);const Wl=Me`
|
|
325
339
|
:host {
|
|
326
340
|
--vscode-font-weight: normal;
|
|
327
341
|
--vscode-font-size: 13px;
|
|
328
|
-
--vscode-editor-font-family:
|
|
342
|
+
--vscode-editor-font-family: 'Operator Mono Lig', 'Cascadia Code';
|
|
329
343
|
--vscode-editor-font-weight: normal;
|
|
330
344
|
--vscode-editor-font-size: 15px;
|
|
331
345
|
--vscode-foreground: #cccccc;
|
|
@@ -514,7 +528,12 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
514
528
|
--vscode-editorGutter-background: #1f1f1f;
|
|
515
529
|
--vscode-editorUnnecessaryCode-opacity: rgba(0, 0, 0, 0.67);
|
|
516
530
|
--vscode-editorGhostText-foreground: rgba(255, 255, 255, 0.34);
|
|
517
|
-
--vscode-editorOverviewRuler-rangeHighlightForeground: rgba(
|
|
531
|
+
--vscode-editorOverviewRuler-rangeHighlightForeground: rgba(
|
|
532
|
+
0,
|
|
533
|
+
122,
|
|
534
|
+
204,
|
|
535
|
+
0.6
|
|
536
|
+
);
|
|
518
537
|
--vscode-editorOverviewRuler-errorForeground: rgba(255, 18, 18, 0.7);
|
|
519
538
|
--vscode-editorOverviewRuler-warningForeground: #ffe45e;
|
|
520
539
|
--vscode-editorOverviewRuler-infoForeground: #5eadf2;
|
|
@@ -617,7 +636,12 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
617
636
|
--vscode-peekViewResult-matchHighlightBackground: #bb800966;
|
|
618
637
|
--vscode-peekViewEditor-matchHighlightBackground: #bb800966;
|
|
619
638
|
--vscode-editorMarkerNavigationError-background: #f85149;
|
|
620
|
-
--vscode-editorMarkerNavigationError-headerBackground: rgba(
|
|
639
|
+
--vscode-editorMarkerNavigationError-headerBackground: rgba(
|
|
640
|
+
254,
|
|
641
|
+
74,
|
|
642
|
+
73,
|
|
643
|
+
0.1
|
|
644
|
+
);
|
|
621
645
|
--vscode-editorMarkerNavigationWarning-background: #ffe45e;
|
|
622
646
|
--vscode-editorMarkerNavigationWarning-headerBackground: rgba(
|
|
623
647
|
255,
|
|
@@ -626,7 +650,12 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
626
650
|
0.1
|
|
627
651
|
);
|
|
628
652
|
--vscode-editorMarkerNavigationInfo-background: #5eadf2;
|
|
629
|
-
--vscode-editorMarkerNavigationInfo-headerBackground: rgba(
|
|
653
|
+
--vscode-editorMarkerNavigationInfo-headerBackground: rgba(
|
|
654
|
+
94,
|
|
655
|
+
173,
|
|
656
|
+
242,
|
|
657
|
+
0.1
|
|
658
|
+
);
|
|
630
659
|
--vscode-editorMarkerNavigation-background: #1f1f1f;
|
|
631
660
|
--vscode-tab-activeBackground: #222222;
|
|
632
661
|
--vscode-tab-unfocusedActiveBackground: #1f1f1f;
|
|
@@ -828,7 +857,12 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
828
857
|
--vscode-notebook-selectedCellBorder: rgba(243, 239, 245, 0.13);
|
|
829
858
|
--vscode-notebook-focusedCellBorder: #263354;
|
|
830
859
|
--vscode-notebook-inactiveFocusedCellBorder: rgba(243, 239, 245, 0.13);
|
|
831
|
-
--vscode-notebook-cellStatusBarItemHoverBackground: rgba(
|
|
860
|
+
--vscode-notebook-cellStatusBarItemHoverBackground: rgba(
|
|
861
|
+
255,
|
|
862
|
+
255,
|
|
863
|
+
255,
|
|
864
|
+
0.15
|
|
865
|
+
);
|
|
832
866
|
--vscode-notebook-cellInsertionIndicator: #263354;
|
|
833
867
|
--vscode-notebookScrollbarSlider-background: rgba(121, 121, 121, 0.4);
|
|
834
868
|
--vscode-notebookScrollbarSlider-hoverBackground: rgba(100, 100, 100, 0.7);
|
|
@@ -897,18 +931,23 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
897
931
|
94,
|
|
898
932
|
0.8
|
|
899
933
|
);
|
|
900
|
-
--vscode-gitDecoration-stageDeletedResourceForeground: rgba(
|
|
934
|
+
--vscode-gitDecoration-stageDeletedResourceForeground: rgba(
|
|
935
|
+
254,
|
|
936
|
+
74,
|
|
937
|
+
73,
|
|
938
|
+
0.8
|
|
939
|
+
);
|
|
901
940
|
--vscode-gitDecoration-conflictingResourceForeground: #e4676b;
|
|
902
941
|
--vscode-gitDecoration-submoduleResourceForeground: rgba(94, 173, 242, 0.8);
|
|
903
942
|
--vscode-testExplorer-errorDecorationBackground: #5a1d1d;
|
|
904
943
|
--vscode-widget-border: #303031;
|
|
905
944
|
--vscode-activityBarBadge-background: #007acc;
|
|
906
945
|
}
|
|
907
|
-
`,
|
|
946
|
+
`,Gl=Me`
|
|
908
947
|
:host {
|
|
909
948
|
--vscode-font-weight: normal;
|
|
910
949
|
--vscode-font-size: 13px;
|
|
911
|
-
--vscode-editor-font-family:
|
|
950
|
+
--vscode-editor-font-family: 'Operator Mono Lig', 'Cascadia Code';
|
|
912
951
|
--vscode-editor-font-weight: normal;
|
|
913
952
|
--vscode-editor-font-size: 15px;
|
|
914
953
|
--vscode-foreground: #3b3b3b;
|
|
@@ -1447,51 +1486,53 @@ WARNING: This link could potentially be dangerous`)){const n=window.open();if(n)
|
|
|
1447
1486
|
--vscode-widget-border: #e5e5e5;
|
|
1448
1487
|
--vscode-activityBarBadge-background: #005fb8;
|
|
1449
1488
|
}
|
|
1450
|
-
`;var
|
|
1489
|
+
`;var Kl=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,po=e=>{throw TypeError(e)},de=(e,t,r,s)=>{for(var a=s>1?void 0:s?Zl(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&Kl(t,r,a),a},zl=(e,t,r)=>t.has(e)||po("Cannot "+r),Yl=(e,t,r)=>t.has(e)?po("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),re=(e,t,r)=>(zl(e,t,"access private method"),r),te,Lr,_o,vo,vr,Ye,gi,mo,bo,pi,So,_i,yo,Co,wo,Eo,ko,Io,Bo,Ao,Ro=(e=>(e.OpenLink="Open",e.CopyToClipboard="Copy to clipboard",e.Cancel="Cancel",e))(Ro||{});const bt=(...e)=>`--vscode-${e.join("-")}`,vt=e=>bt("terminal",e),jl=e=>`ansi${e.charAt(0).toUpperCase()+e.slice(1)}`,Xl=["terminal:","theme:",Q.platformApiRequest,Q.platformApiResponse,Q.onOptionsMessage,Q.optionsMessage,Q.onCopyTextToClipboard,Q.onProgramClose,Q.featuresResponse,Q.featuresUpdateAction],Jl=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ql="console-view";exports.ConsoleView=class extends Ee{constructor(){super(),Yl(this,te),this.copyText="Copy",this.disposables=[],this.rows=10,this.isShareReady=!1,this.buttons=!0,this.takeFocus=!0,this.theme="dark",this.isLoading=!1,this.isCreatingEscalation=!1,this.isUpdatedReady=!1,this.isAutoSaveEnabled=!1,this.isPlatformAuthEnabled=!1,this.isDaggerOutput=!1,this.windowSize={height:window.innerHeight,width:window.innerWidth}}applyThemeStyles(){if(this.shadowRoot){if(this.themeStyleSheet){const t=this.shadowRoot.adoptedStyleSheets.indexOf(this.themeStyleSheet);t!==-1&&(this.shadowRoot.adoptedStyleSheets=this.shadowRoot.adoptedStyleSheets.filter((r,s)=>s!==t)),this.themeStyleSheet=void 0}this.theme==="dark"?(this.themeStyleSheet=new CSSStyleSheet,this.themeStyleSheet.replaceSync(Wl.cssText),this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.themeStyleSheet]):this.theme==="light"&&(this.themeStyleSheet=new CSSStyleSheet,this.themeStyleSheet.replaceSync(Gl.cssText),this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.themeStyleSheet])}}connectedCallback(){var f;if(super.connectedCallback(),this.applyThemeStyles(),!this.id)throw new Error("No id provided to terminal!");this.rows=this.initialRows??this.rows;const{rows:t,cursorBlink:r,fontSize:s,cursorStyle:a,cursorWidth:m,fontFamily:v,smoothScrollDuration:i,scrollback:c}=this;this.terminal=new vc.Terminal({rows:t,fontSize:s,fontFamily:v,scrollback:c,cursorWidth:m,cursorBlink:r,cursorStyle:a,smoothScrollDuration:i,disableStdin:!1,convertEol:!0,allowProposedApi:!0,drawBoldTextInBrightColors:!1}),this.initialContent&&((f=this.terminal)==null||f.write(this.initialContent)),this.fitAddon=new Il,this.fitAddon.activate(this.terminal),this.serializer=new dc.SerializeAddon,this.terminal.loadAddon(this.serializer),this.terminal.loadAddon(new fc.Unicode11Addon),this.terminal.loadAddon(new pc.WebLinksAddon(re(this,te,ko).bind(this))),this.terminal.attachCustomKeyEventHandler(h=>{var _;if(h.shiftKey&&h.ctrlKey&&h.code==="KeyC"){const S=(_=this==null?void 0:this.terminal)==null?void 0:_.getSelection();if(S)return navigator.clipboard.writeText(S),!1}return!0}),this.terminal.unicode.activeVersion="11",this.terminal.options.drawBoldTextInBrightColors;const u=Ae();this.disposables.push(Bl(u,async h=>{var _;if(Xl.some(S=>h.type.startsWith(S)))switch(h.type){case Q.activeThemeChanged:re(this,te,vr).call(this);break;case Q.terminalStdout:case Q.terminalStderr:{const{"runme.dev/id":S,data:E}=h.output;if(S!==this.id)return;this.isShareReady=!1,this.terminal.write(E),this.requestUpdate()}break;case Q.platformApiResponse:{if(h.output.id!==this.id)return;if(this.isLoading=!1,h.output.hasErrors)return Ce(u,Q.errorMessage,h.output.data);if(h.output.data.hasOwnProperty("displayShare")&&h.output.data.displayShare===!1)return;const S=((_=h.output.data)==null?void 0:_.data)||{};if(S.createExtensionCellOutput||S.createCellExecution){const E=S.createCellExecution||S.createExtensionCellOutput||{},{exitCode:g,id:n,htmlUrl:l,isSlackReady:o}=E;return this.platformId=n,this.shareUrl=l||"",this.exitCode=g,this.isSlackReady=!!o,this.isShareReady=!0,Ce(u,Q.tangleEvent,{webviewId:uo.RunmeCloud,data:{cellId:n}})}if(S.updateCellOutput){const{updateCellOutput:{exitCode:E,isSlackReady:g}}=S;this.isUpdatedReady=!0,this.exitCode=E,this.isSlackReady=!!g,re(this,te,So).call(this)}S.createEscalation&&(this.escalationUrl=S.createEscalation.escalationUrl)}break;case Q.onOptionsMessage:{if(h.output.id!==this.id)return;const S=h.output.option;switch(this.isLoading=!1,S){case"Open":return Ce(u,Q.openExternalLink,{link:this.shareUrl,telemetryEvent:"app.openLink"});case"Copy to clipboard":return Ce(u,Q.copyTextToClipboard,{id:this.id,text:this.shareUrl})}}break;case Q.onCopyTextToClipboard:return h.output.id!==this.id?void 0:Ce(u,Q.infoMessage,"Link copied!");case Q.onProgramClose:{const{"runme.dev/id":S,code:E}=h.output;if(S!==this.id)return;this.exitCode=E;return}}}),this.terminal.onData(h=>Ce(u,Q.terminalStdin,{"runme.dev/id":this.id,input:h}))),Ce(u,Q.featuresRequest,{})}disconnectedCallback(){super.disconnectedCallback(),this.dispose()}updated(t){super.updated(t),t.has("theme")&&(this.applyThemeStyles(),re(this,te,vr).call(this))}firstUpdated(t){var v;super.firstUpdated(t);const r=re(this,te,vo).call(this);this.takeFocus&&window.addEventListener("focus",()=>{re(this,te,pi).call(this)}),window.addEventListener("click",()=>{re(this,te,pi).call(this,!1)}),this.terminal.open(r),this.takeFocus&&this.terminal.focus(),re(this,te,Lr).call(this),re(this,te,vr).call(this);const s=re(this,te,_o).call(this),a=new _e(i=>{window.addEventListener("resize",()=>i.next(re(this,te,gi).call(this,!0))),r.addEventListener("mouseup",()=>i.next(re(this,te,gi).call(this,!1)))}).pipe(co());re(this,te,mo).call(this,a),re(this,te,bo).call(this,a),r.appendChild(s);const m=Ae();m.postMessage&&Ce(m,Q.terminalOpen,{"runme.dev/id":this.id,terminalDimensions:xo((v=this.fitAddon)==null?void 0:v.proposeDimensions())}),this.lastLine&&this.terminal.scrollToLine(this.lastLine)}render(){const a=j`
|
|
1451
1490
|
<close-cell-button
|
|
1452
|
-
@closed="${()=>
|
|
1491
|
+
@closed="${()=>Al({id:this.id,outputType:ho.terminal})}"
|
|
1453
1492
|
></close-cell-button>
|
|
1454
1493
|
<div class="button-group">
|
|
1455
1494
|
<copy-button
|
|
1456
1495
|
copyText="${this.copyText}"
|
|
1457
|
-
@onCopy="${async()=>re(this,te,
|
|
1496
|
+
@onCopy="${async()=>re(this,te,Ao).call(this)}"
|
|
1458
1497
|
></copy-button>
|
|
1459
|
-
${
|
|
1460
|
-
|
|
1498
|
+
${fe(!0,()=>j`<gist-cell
|
|
1499
|
+
@onGist="${re(this,te,wo)}"
|
|
1500
|
+
></gist-cell>`,()=>{})}
|
|
1501
|
+
${fe(this.shouldRenderSaveButton(),()=>j`<save-button
|
|
1461
1502
|
?loading=${this.isLoading}
|
|
1462
1503
|
?signedIn=${!1}
|
|
1463
|
-
@onClick="${re(this,te,
|
|
1504
|
+
@onClick="${re(this,te,_i)}"
|
|
1464
1505
|
>
|
|
1465
1506
|
</save-button>`,()=>{})}
|
|
1466
|
-
${
|
|
1507
|
+
${fe(this.shouldRenderShareButton(),()=>j`<share-button
|
|
1467
1508
|
?loading=${this.isLoading}
|
|
1468
|
-
@onClick="${re(this,te,
|
|
1509
|
+
@onClick="${re(this,te,_i)}"
|
|
1469
1510
|
>
|
|
1470
1511
|
</share-button>`,()=>{})}
|
|
1471
|
-
${
|
|
1512
|
+
${fe(!1,()=>j`<action-button
|
|
1472
1513
|
?loading=${this.isCreatingEscalation}
|
|
1473
1514
|
?saveIcon="${!0}"
|
|
1474
1515
|
text="Escalate"
|
|
1475
|
-
@onClick="${re(this,te,
|
|
1476
|
-
@onClickDisabled=${re(this,te,
|
|
1516
|
+
@onClick="${re(this,te,yo)}"
|
|
1517
|
+
@onClickDisabled=${re(this,te,Bo)}
|
|
1477
1518
|
>
|
|
1478
1519
|
</action-button>`,()=>{})}
|
|
1479
|
-
${
|
|
1520
|
+
${fe(!1,()=>j`<action-button
|
|
1480
1521
|
?saveIcon="${!0}"
|
|
1481
1522
|
text="Open Escalation"
|
|
1482
|
-
@onClick="${re(this,te,
|
|
1523
|
+
@onClick="${re(this,te,Co)}"
|
|
1483
1524
|
>
|
|
1484
1525
|
</action-button>`,()=>{})}
|
|
1485
|
-
${
|
|
1526
|
+
${fe(this.platformId&&!this.isLoading,()=>j`<open-cell
|
|
1486
1527
|
?disabled=${!this.isPlatformAuthEnabled}
|
|
1487
|
-
@onOpen="${re(this,te,
|
|
1528
|
+
@onOpen="${re(this,te,Io)}"
|
|
1488
1529
|
></open-cell>`,()=>{})}
|
|
1489
1530
|
</div>
|
|
1490
|
-
`;return
|
|
1531
|
+
`;return j`<section>
|
|
1491
1532
|
<div id="terminal"></div>
|
|
1492
|
-
${
|
|
1493
|
-
</section>`}dispose(){this.disposables.forEach(({dispose:t})=>t())}shouldRenderSaveButton(){return!1}shouldRenderShareButton(){return!1}};te=new WeakSet;
|
|
1494
|
-
Open Dashboard to configure it`)};
|
|
1533
|
+
${fe(this.buttons,()=>a)}
|
|
1534
|
+
</section>`}dispose(){this.disposables.forEach(({dispose:t})=>t())}shouldRenderSaveButton(){return!1}shouldRenderShareButton(){return!1}};te=new WeakSet;Lr=function(e){var t;return e!==void 0&&(this.rows=e),(t=this.fitAddon)==null?void 0:t.fit(this.rows)};_o=function(){const e=document.createElement("div");e.setAttribute("class","xterm-drag-handle");let t;const r=m=>{var v;t={initialClientY:m.clientY,initialRows:this.rows},m.preventDefault(),(v=this.terminal)==null||v.focus()},s=()=>{t!==void 0&&(t=void 0)},a=m=>{var u;if(t===void 0||!this.fitAddon)return;const i=(m.clientY-t.initialClientY)/this.fitAddon.getCellSize().height,c=Math.round(t.initialRows+i);c!==this.rows&&(re(this,te,Lr).call(this,c),(u=this.terminal)==null||u.focus())};return e.addEventListener("mousedown",r),window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),this.disposables.push({dispose:()=>{e.removeEventListener("mousedown",r),window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a)}}),e};vo=function(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("#terminal")};vr=function(){const e=re(this,te,Ye).call(this,vt("foreground")),t={foreground:e,cursor:re(this,te,Ye).call(this,bt("terminalCursor","foreground"))||e,cursorAccent:re(this,te,Ye).call(this,bt("terminalCursor","background")),selectionForeground:re(this,te,Ye).call(this,vt("selectionForeground")),selectionBackground:re(this,te,Ye).call(this,vt("selectionBackground")),selectionInactiveBackground:re(this,te,Ye).call(this,vt("inactiveSelectionBackground")),...Object.fromEntries(Jl.map(r=>[r,re(this,te,Ye).call(this,vt(jl(r)))]))};this.terminal.options.theme=t};Ye=function(e){var r;const t=(r=this.shadowRoot)==null?void 0:r.querySelector("#terminal");return getComputedStyle(t).getPropertyValue(e)??void 0};gi=function(e){if(!this.fitAddon)return;const{innerWidth:t,innerHeight:r}=window;if(e&&Math.abs(this.windowSize.width-t)<=Number.EPSILON&&Math.abs(this.windowSize.height-r)<=Number.EPSILON)return;this.windowSize.width=t;const s=re(this,te,Lr).call(this);if(s)return xo(s)};mo=async function(e){const r=e.pipe(Pe(s=>!!s),ao(),oo(100)).subscribe(async s=>{const a=Ae();a.postMessage&&await Ce(a,Q.terminalResize,{"runme.dev/id":this.id,terminalDimensions:s})});this.disposables.push({dispose:()=>r.unsubscribe()})};bo=async function(e){const r=e.pipe(Re(s=>s==null?void 0:s.rows),Pe(s=>!!s),ao(),oo(100)).subscribe(async s=>{const a=Ae();a.postMessage&&a.postMessage({type:Q.mutateAnnotations,output:{annotations:{"runme.dev/id":this.id,terminalRows:s}}})});this.disposables.push({dispose:()=>r.unsubscribe()})};pi=async function(e=!0){var r;e&&((r=this.terminal)==null||r.focus());const t=Ae();t.postMessage&&await Ce(t,Q.terminalFocus,{"runme.dev/id":this.id})};So=async function(){const e=Ae();if(!(!e.postMessage||!this.shareUrl))return Ce(e,Q.optionsMessage,{title:'Please share link with caution. Anyone with the link has access. Click "Open" to toggle visibility.',options:Object.values(Ro),id:this.id,telemetryEvent:"app.share"})};_i=async function(){return re(this,te,Eo).call(this,!0)};yo=async function(){this.isCreatingEscalation=!0};Co=async function(){const e=Ae();if(this.escalationUrl)return Ce(e,Q.openLink,this.escalationUrl)};wo=function(){const e=Ae();if(e.postMessage)return Ce(e,Q.gistCell,{cellId:this.id,telemetryEvent:"app.cellGist"})};Eo=async function(e){Ae().postMessage};ko=function(e,t){Ce(Ae(),Q.openLink,t)};Io=function(){Ce(Ae(),Q.openLink,this.shareUrl)};Bo=function(){Ce(Ae(),Q.errorMessage,`There is no Slack integration configured yet.
|
|
1535
|
+
Open Dashboard to configure it`)};Ao=function(){var r;const e=Ae();if(!e.postMessage)return;const t=Ql(((r=this.serializer)==null?void 0:r.serialize({excludeModes:!0,excludeAltBuffer:!0}))??"");return navigator.clipboard.writeText(t).then(()=>{this.copyText="Copied!",this.requestUpdate()}).catch(s=>Ce(e,Q.infoMessage,`Failed to copy to clipboard: ${s.message}!`))};exports.ConsoleView.styles=Me`
|
|
1495
1536
|
.xterm {
|
|
1496
1537
|
cursor: text;
|
|
1497
1538
|
position: relative;
|
|
@@ -1547,7 +1588,7 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
1547
1588
|
}
|
|
1548
1589
|
|
|
1549
1590
|
.xterm .xterm-viewport {
|
|
1550
|
-
background-color: var(${
|
|
1591
|
+
background-color: var(${Ot(vt("background"))}) !important;
|
|
1551
1592
|
border: solid 1px var(--vscode-terminal-border);
|
|
1552
1593
|
/* On OS X this is required in order for the scroll bar to appear fully opaque */
|
|
1553
1594
|
overflow-y: scroll;
|
|
@@ -1579,15 +1620,21 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
1579
1620
|
}
|
|
1580
1621
|
|
|
1581
1622
|
.xterm:hover .xterm-viewport::-webkit-scrollbar-thumb {
|
|
1582
|
-
background-color: var(
|
|
1623
|
+
background-color: var(
|
|
1624
|
+
${Ot(bt("scrollbarSlider","background"))}
|
|
1625
|
+
);
|
|
1583
1626
|
}
|
|
1584
1627
|
|
|
1585
1628
|
.xterm:hover .xterm-viewport::-webkit-scrollbar-thumb:hover {
|
|
1586
|
-
background-color: var(
|
|
1629
|
+
background-color: var(
|
|
1630
|
+
${Ot(bt("scrollbarSlider","hoverBackground"))}
|
|
1631
|
+
);
|
|
1587
1632
|
}
|
|
1588
1633
|
|
|
1589
1634
|
.xterm:hover .xterm-viewport::-webkit-scrollbar-thumb:active {
|
|
1590
|
-
background-color: var(
|
|
1635
|
+
background-color: var(
|
|
1636
|
+
${Ot(bt("scrollbarSlider","activeBackground"))}
|
|
1637
|
+
);
|
|
1591
1638
|
}
|
|
1592
1639
|
|
|
1593
1640
|
.xterm .xterm-scroll-area {
|
|
@@ -1725,22 +1772,24 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
1725
1772
|
.xterm-bg-7 {
|
|
1726
1773
|
background-color: var(--vscode-editor-selectionBackground) !important;
|
|
1727
1774
|
}
|
|
1728
|
-
`;se([J({type:String})],exports.ConsoleView.prototype,"id",2);se([J({type:Boolean,converter:e=>e!=="false"})],exports.ConsoleView.prototype,"buttons",2);se([J({type:Boolean,converter:e=>e!=="false"})],exports.ConsoleView.prototype,"takeFocus",2);se([J({type:String})],exports.ConsoleView.prototype,"theme",2);se([J({type:String})],exports.ConsoleView.prototype,"fontFamily",2);se([J({type:Number})],exports.ConsoleView.prototype,"fontSize",2);se([J({type:String})],exports.ConsoleView.prototype,"cursorStyle",2);se([J({type:Boolean})],exports.ConsoleView.prototype,"cursorBlink",2);se([J({type:Number})],exports.ConsoleView.prototype,"cursorWidth",2);se([J({type:Number})],exports.ConsoleView.prototype,"smoothScrollDuration",2);se([J({type:Number})],exports.ConsoleView.prototype,"scrollback",2);se([J({type:String})],exports.ConsoleView.prototype,"initialContent",2);se([J({type:Number})],exports.ConsoleView.prototype,"initialRows",2);se([J({type:Number})],exports.ConsoleView.prototype,"lastLine",2);se([J({type:Boolean})],exports.ConsoleView.prototype,"isLoading",2);se([J({type:Boolean})],exports.ConsoleView.prototype,"isCreatingEscalation",2);se([J()],exports.ConsoleView.prototype,"shareUrl",2);se([J()],exports.ConsoleView.prototype,"escalationUrl",2);se([J({type:Boolean})],exports.ConsoleView.prototype,"isUpdatedReady",2);se([J({type:Boolean})],exports.ConsoleView.prototype,"isAutoSaveEnabled",2);se([J({type:Boolean})],exports.ConsoleView.prototype,"isPlatformAuthEnabled",2);se([J({type:Boolean})],exports.ConsoleView.prototype,"isDaggerOutput",2);exports.ConsoleView=se([ve(la)],exports.ConsoleView);function Ps(e){if(!e)return;const{rows:t,cols:r}=e;return{columns:r,rows:t}}function da(e){return e.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"")}var ha=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,Yt=(e,t,r,h)=>{for(var g=h>1?void 0:h?ua(t,r):t,E=e.length-1,C;E>=0;E--)(C=e[E])&&(g=(h?C(t,r,g):C(g))||g);return h&&g&&ha(t,r,g),g};let Ze=class extends he{constructor(){super(...arguments),this.columns=[],this.rows=[],this.renderer=(t,r)=>Z`${t[r]}`,this.displayable=()=>!0,this.hasErrors=()=>!1}get heading(){var t,r;return(t=this.columns)!=null&&t.length?Z`
|
|
1775
|
+
`;de([G({type:String})],exports.ConsoleView.prototype,"id",2);de([G({type:Boolean,converter:e=>e!=="false"})],exports.ConsoleView.prototype,"buttons",2);de([G({type:Boolean,converter:e=>e!=="false"})],exports.ConsoleView.prototype,"takeFocus",2);de([G({type:String})],exports.ConsoleView.prototype,"theme",2);de([G({type:String})],exports.ConsoleView.prototype,"fontFamily",2);de([G({type:Number})],exports.ConsoleView.prototype,"fontSize",2);de([G({type:String})],exports.ConsoleView.prototype,"cursorStyle",2);de([G({type:Boolean})],exports.ConsoleView.prototype,"cursorBlink",2);de([G({type:Number})],exports.ConsoleView.prototype,"cursorWidth",2);de([G({type:Number})],exports.ConsoleView.prototype,"smoothScrollDuration",2);de([G({type:Number})],exports.ConsoleView.prototype,"scrollback",2);de([G({type:String})],exports.ConsoleView.prototype,"initialContent",2);de([G({type:Number})],exports.ConsoleView.prototype,"initialRows",2);de([G({type:Number})],exports.ConsoleView.prototype,"lastLine",2);de([G({type:Boolean})],exports.ConsoleView.prototype,"isLoading",2);de([G({type:Boolean})],exports.ConsoleView.prototype,"isCreatingEscalation",2);de([G()],exports.ConsoleView.prototype,"shareUrl",2);de([G()],exports.ConsoleView.prototype,"escalationUrl",2);de([G({type:Boolean})],exports.ConsoleView.prototype,"isUpdatedReady",2);de([G({type:Boolean})],exports.ConsoleView.prototype,"isAutoSaveEnabled",2);de([G({type:Boolean})],exports.ConsoleView.prototype,"isPlatformAuthEnabled",2);de([G({type:Boolean})],exports.ConsoleView.prototype,"isDaggerOutput",2);exports.ConsoleView=de([Le(ql)],exports.ConsoleView);function xo(e){if(!e)return;const{rows:t,cols:r}=e;return{columns:r,rows:t}}function Ql(e){return e.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"")}function zt(e){let t=!1;const r=[];for(let s=0;s<e.length;s++){let a=e.charAt(s);switch(a){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r.push(a),t=!1;break;default:t&&(t=!1,a=a.toUpperCase()),r.push(a);break}}return r.join("")}const ed=new Set(["constructor","toString","toJSON","valueOf"]);function Yt(e){return ed.has(e)?e+"$":e}function td(){let e=0,t=0;for(let s=0;s<28;s+=7){let a=this.buf[this.pos++];if(e|=(a&127)<<s,(a&128)==0)return this.assertBounds(),[e,t]}let r=this.buf[this.pos++];if(e|=(r&15)<<28,t=(r&112)>>4,(r&128)==0)return this.assertBounds(),[e,t];for(let s=3;s<=31;s+=7){let a=this.buf[this.pos++];if(t|=(a&127)<<s,(a&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function ei(e,t,r){for(let m=0;m<28;m=m+7){const v=e>>>m,i=!(!(v>>>7)&&t==0),c=(i?v|128:v)&255;if(r.push(c),!i)return}const s=e>>>28&15|(t&7)<<4,a=t>>3!=0;if(r.push((a?s|128:s)&255),!!a){for(let m=3;m<31;m=m+7){const v=t>>>m,i=!!(v>>>7),c=(i?v|128:v)&255;if(r.push(c),!i)return}r.push(t>>>31&1)}}const mr=4294967296;function Ns(e){const t=e[0]==="-";t&&(e=e.slice(1));const r=1e6;let s=0,a=0;function m(v,i){const c=Number(e.slice(v,i));a*=r,s=s*r+c,s>=mr&&(a=a+(s/mr|0),s=s%mr)}return m(-24,-18),m(-18,-12),m(-12,-6),m(-6),t?To(s,a):Ui(s,a)}function rd(e,t){let r=Ui(e,t);const s=r.hi&2147483648;s&&(r=To(r.lo,r.hi));const a=Lo(r.lo,r.hi);return s?"-"+a:a}function Lo(e,t){if({lo:e,hi:t}=id(e,t),t<=2097151)return String(mr*t+e);const r=e&16777215,s=(e>>>24|t<<8)&16777215,a=t>>16&65535;let m=r+s*6777216+a*6710656,v=s+a*8147497,i=a*2;const c=1e7;return m>=c&&(v+=Math.floor(m/c),m%=c),v>=c&&(i+=Math.floor(v/c),v%=c),i.toString()+Ms(v)+Ms(m)}function id(e,t){return{lo:e>>>0,hi:t>>>0}}function Ui(e,t){return{lo:e|0,hi:t|0}}function To(e,t){return t=~t,e?e=~e+1:t+=1,Ui(e,t)}const Ms=e=>{const t=String(e);return"0000000".slice(t.length)+t};function vi(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let r=0;r<9;r++)t.push(e&127|128),e=e>>7;t.push(1)}}function sd(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let r=5;(e&128)!==0&&r<10;r++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}const ae=nd();function nd(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(!!globalThis.Deno||typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const r=BigInt("-9223372036854775808"),s=BigInt("9223372036854775807"),a=BigInt("0"),m=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(v){const i=typeof v=="bigint"?v:BigInt(v);if(i>s||i<r)throw new Error(`invalid int64: ${v}`);return i},uParse(v){const i=typeof v=="bigint"?v:BigInt(v);if(i>m||i<a)throw new Error(`invalid uint64: ${v}`);return i},enc(v){return e.setBigInt64(0,this.parse(v),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(v){return e.setBigInt64(0,this.uParse(v),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(v,i){return e.setInt32(0,v,!0),e.setInt32(4,i,!0),e.getBigInt64(0,!0)},uDec(v,i){return e.setInt32(0,v,!0),e.setInt32(4,i,!0),e.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse(r){return typeof r!="string"&&(r=r.toString()),Fs(r),r},uParse(r){return typeof r!="string"&&(r=r.toString()),Ps(r),r},enc(r){return typeof r!="string"&&(r=r.toString()),Fs(r),Ns(r)},uEnc(r){return typeof r!="string"&&(r=r.toString()),Ps(r),Ns(r)},dec(r,s){return rd(r,s)},uDec(r,s){return Lo(r,s)}}}function Fs(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function Ps(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}var M;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(M||(M={}));function ut(e,t){switch(e){case M.STRING:return"";case M.BOOL:return!1;case M.DOUBLE:case M.FLOAT:return 0;case M.INT64:case M.UINT64:case M.SFIXED64:case M.FIXED64:case M.SINT64:return t?"0":ae.zero;case M.BYTES:return new Uint8Array(0);default:return 0}}function od(e,t){switch(e){case M.BOOL:return t===!1;case M.STRING:return t==="";case M.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return t==0}}const Do=2,We=Symbol.for("reflect unsafe local");function Oo(e,t){const r=e[t.localName].case;return r===void 0?r:t.fields.find(s=>s.localName===r)}function ad(e,t){const r=t.localName;if(t.oneof)return e[t.oneof.localName].case===r;if(t.presence!=Do)return e[r]!==void 0&&Object.prototype.hasOwnProperty.call(e,r);switch(t.fieldKind){case"list":return e[r].length>0;case"map":return Object.keys(e[r]).length>0;case"scalar":return!od(t.scalar,e[r]);case"enum":return e[r]!==t.enum.values[0].number}throw new Error("message field with implicit presence")}function jt(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0}function No(e,t){if(t.oneof){const r=e[t.oneof.localName];return r.case===t.localName?r.value:void 0}return e[t.localName]}function Mo(e,t,r){t.oneof?e[t.oneof.localName]={case:t.localName,value:r}:e[t.localName]=r}function cd(e,t){const r=t.localName;if(t.oneof){const s=t.oneof.localName;e[s].case===r&&(e[s]={case:void 0})}else if(t.presence!=Do)delete e[r];else switch(t.fieldKind){case"map":e[r]={};break;case"list":e[r]=[];break;case"enum":e[r]=t.enum.values[0].number;break;case"scalar":e[r]=ut(t.scalar,t.longAsString);break}}function Vi(e){for(const t of e.field)jt(t,"jsonName")||(t.jsonName=zt(t.name));e.nestedType.forEach(Vi)}function ld(e,t){const r=e.values.find(s=>s.name===t);if(!r)throw new Error(`cannot parse ${e} default value: ${t}`);return r.number}function dd(e,t){switch(e){case M.STRING:return t;case M.BYTES:{const r=hd(t);if(r===!1)throw new Error(`cannot parse ${M[e]} default value: ${t}`);return r}case M.INT64:case M.SFIXED64:case M.SINT64:return ae.parse(t);case M.UINT64:case M.FIXED64:return ae.uParse(t);case M.DOUBLE:case M.FLOAT:switch(t){case"inf":return Number.POSITIVE_INFINITY;case"-inf":return Number.NEGATIVE_INFINITY;case"nan":return Number.NaN;default:return parseFloat(t)}case M.BOOL:return t==="true";case M.INT32:case M.UINT32:case M.SINT32:case M.FIXED32:case M.SFIXED32:return parseInt(t,10)}}function hd(e){const t=[],r={tail:e,c:"",next(){return this.tail.length==0?!1:(this.c=this.tail[0],this.tail=this.tail.substring(1),!0)},take(s){if(this.tail.length>=s){const a=this.tail.substring(0,s);return this.tail=this.tail.substring(s),a}return!1}};for(;r.next();)switch(r.c){case"\\":if(r.next())switch(r.c){case"\\":t.push(r.c.charCodeAt(0));break;case"b":t.push(8);break;case"f":t.push(12);break;case"n":t.push(10);break;case"r":t.push(13);break;case"t":t.push(9);break;case"v":t.push(11);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":{const s=r.c,a=r.take(2);if(a===!1)return!1;const m=parseInt(s+a,8);if(Number.isNaN(m))return!1;t.push(m);break}case"x":{const s=r.c,a=r.take(2);if(a===!1)return!1;const m=parseInt(s+a,16);if(Number.isNaN(m))return!1;t.push(m);break}case"u":{const s=r.c,a=r.take(4);if(a===!1)return!1;const m=parseInt(s+a,16);if(Number.isNaN(m))return!1;const v=new Uint8Array(4);new DataView(v.buffer).setInt32(0,m,!0),t.push(v[0],v[1],v[2],v[3]);break}case"U":{const s=r.c,a=r.take(8);if(a===!1)return!1;const m=ae.uEnc(s+a),v=new Uint8Array(8),i=new DataView(v.buffer);i.setInt32(0,m.lo,!0),i.setInt32(4,m.hi,!0),t.push(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7]);break}}break;default:t.push(r.c.charCodeAt(0))}return new Uint8Array(t)}function*mi(e){switch(e.kind){case"file":for(const t of e.messages)yield t,yield*mi(t);yield*e.enums,yield*e.services,yield*e.extensions;break;case"message":for(const t of e.nestedMessages)yield t,yield*mi(t);yield*e.nestedEnums,yield*e.nestedExtensions;break}}function Fo(...e){const t=ud();if(!e.length)return t;if("$typeName"in e[0]&&e[0].$typeName=="google.protobuf.FileDescriptorSet"){for(const r of e[0].file)$s(r,t);return t}if("$typeName"in e[0]){let m=function(v){const i=[];for(const c of v.dependency){if(t.getFile(c)!=null||a.has(c))continue;const u=s(c);if(!u)throw new Error(`Unable to resolve ${c}, imported by ${v.name}`);"kind"in u?t.addFile(u,!1,!0):(a.add(u.name),i.push(u))}return i.concat(...i.map(m))};const r=e[0],s=e[1],a=new Set;for(const v of[r,...m(r)].reverse())$s(v,t)}else for(const r of e)for(const s of r.files)t.addFile(s);return t}function ud(){const e=new Map,t=new Map,r=new Map;return{kind:"registry",types:e,extendees:t,[Symbol.iterator](){return e.values()},get files(){return r.values()},addFile(s,a,m){if(r.set(s.proto.name,s),!a)for(const v of mi(s))this.add(v);if(m)for(const v of s.dependencies)this.addFile(v,a,m)},add(s){if(s.kind=="extension"){let a=t.get(s.extendee.typeName);a||t.set(s.extendee.typeName,a=new Map),a.set(s.number,s)}e.set(s.typeName,s)},get(s){return e.get(s)},getFile(s){return r.get(s)},getMessage(s){const a=e.get(s);return(a==null?void 0:a.kind)=="message"?a:void 0},getEnum(s){const a=e.get(s);return(a==null?void 0:a.kind)=="enum"?a:void 0},getExtension(s){const a=e.get(s);return(a==null?void 0:a.kind)=="extension"?a:void 0},getExtensionFor(s,a){var m;return(m=t.get(s.typeName))===null||m===void 0?void 0:m.get(a)},getService(s){const a=e.get(s);return(a==null?void 0:a.kind)=="service"?a:void 0}}}const fd=998,gd=999,pd=9,Xt=10,Ut=11,_d=12,Us=14,Hi=3,vd=2,Vs=1,md=0,ti=1,Hs=2,bd=3,Sd=1,yd=2,Cd=1,Po={998:{fieldPresence:1,enumType:2,repeatedFieldEncoding:2,utf8Validation:3,messageEncoding:1,jsonFormat:2,enforceNamingStyle:2,defaultSymbolVisibility:1},999:{fieldPresence:2,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:2,defaultSymbolVisibility:1},1e3:{fieldPresence:1,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:2,defaultSymbolVisibility:1},1001:{fieldPresence:1,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:1,defaultSymbolVisibility:2}};function $s(e,t){var r,s;const a={kind:"file",proto:e,deprecated:(s=(r=e.options)===null||r===void 0?void 0:r.deprecated)!==null&&s!==void 0?s:!1,edition:Id(e),name:e.name.replace(/\.proto$/,""),dependencies:Bd(e,t),enums:[],messages:[],extensions:[],services:[],toString(){return`file ${e.name}`}},m=new Map,v={get(i){return m.get(i)},add(i){var c;Ne(((c=i.proto.options)===null||c===void 0?void 0:c.mapEntry)===!0),m.set(i.typeName,i)}};for(const i of e.enumType)Uo(i,a,void 0,t);for(const i of e.messageType)Vo(i,a,void 0,t,v);for(const i of e.service)wd(i,a,t);bi(a,t);for(const i of m.values())Si(i,t,v);for(const i of a.messages)Si(i,t,v),bi(i,t);t.addFile(a,!0)}function bi(e,t){switch(e.kind){case"file":for(const r of e.proto.extension){const s=yi(r,e,t);e.extensions.push(s),t.add(s)}break;case"message":for(const r of e.proto.extension){const s=yi(r,e,t);e.nestedExtensions.push(s),t.add(s)}for(const r of e.nestedMessages)bi(r,t);break}}function Si(e,t,r){const s=e.proto.oneofDecl.map(m=>kd(m,e)),a=new Set;for(const m of e.proto.field){const v=xd(m,s),i=yi(m,e,t,v,r);e.fields.push(i),e.field[i.localName]=i,v===void 0?e.members.push(i):(v.fields.push(i),a.has(v)||(a.add(v),e.members.push(v)))}for(const m of s.filter(v=>a.has(v)))e.oneofs.push(m);for(const m of e.nestedMessages)Si(m,t,r)}function Uo(e,t,r,s){var a,m,v,i,c;const u=Ad(e.name,e.value),f={kind:"enum",proto:e,deprecated:(m=(a=e.options)===null||a===void 0?void 0:a.deprecated)!==null&&m!==void 0?m:!1,file:t,parent:r,open:!0,name:e.name,typeName:Tr(e,r,t),value:{},values:[],sharedPrefix:u,toString(){return`enum ${this.typeName}`}};f.open=Od(f),s.add(f);for(const h of e.value){const _=h.name;f.values.push(f.value[h.number]={kind:"enum_value",proto:h,deprecated:(i=(v=h.options)===null||v===void 0?void 0:v.deprecated)!==null&&i!==void 0?i:!1,parent:f,name:_,localName:Yt(u==null?_:_.substring(u.length)),number:h.number,toString(){return`enum value ${f.typeName}.${_}`}})}((c=r==null?void 0:r.nestedEnums)!==null&&c!==void 0?c:t.enums).push(f)}function Vo(e,t,r,s,a){var m,v,i,c;const u={kind:"message",proto:e,deprecated:(v=(m=e.options)===null||m===void 0?void 0:m.deprecated)!==null&&v!==void 0?v:!1,file:t,parent:r,name:e.name,typeName:Tr(e,r,t),fields:[],field:{},oneofs:[],members:[],nestedEnums:[],nestedMessages:[],nestedExtensions:[],toString(){return`message ${this.typeName}`}};((i=e.options)===null||i===void 0?void 0:i.mapEntry)===!0?a.add(u):(((c=r==null?void 0:r.nestedMessages)!==null&&c!==void 0?c:t.messages).push(u),s.add(u));for(const f of e.enumType)Uo(f,t,u,s);for(const f of e.nestedType)Vo(f,t,u,s,a)}function wd(e,t,r){var s,a;const m={kind:"service",proto:e,deprecated:(a=(s=e.options)===null||s===void 0?void 0:s.deprecated)!==null&&a!==void 0?a:!1,file:t,name:e.name,typeName:Tr(e,void 0,t),methods:[],method:{},toString(){return`service ${this.typeName}`}};t.services.push(m),r.add(m);for(const v of e.method){const i=Ed(v,m,r);m.methods.push(i),m.method[i.localName]=i}}function Ed(e,t,r){var s,a,m,v;let i;e.clientStreaming&&e.serverStreaming?i="bidi_streaming":e.clientStreaming?i="client_streaming":e.serverStreaming?i="server_streaming":i="unary";const c=r.getMessage(He(e.inputType)),u=r.getMessage(He(e.outputType));Ne(c,`invalid MethodDescriptorProto: input_type ${e.inputType} not found`),Ne(u,`invalid MethodDescriptorProto: output_type ${e.inputType} not found`);const f=e.name;return{kind:"rpc",proto:e,deprecated:(a=(s=e.options)===null||s===void 0?void 0:s.deprecated)!==null&&a!==void 0?a:!1,parent:t,name:f,localName:Yt(f.length?Yt(f[0].toLowerCase()+f.substring(1)):f),methodKind:i,input:c,output:u,idempotency:(v=(m=e.options)===null||m===void 0?void 0:m.idempotencyLevel)!==null&&v!==void 0?v:md,toString(){return`rpc ${t.typeName}.${f}`}}}function kd(e,t){return{kind:"oneof",proto:e,deprecated:!1,parent:t,fields:[],name:e.name,localName:Yt(zt(e.name)),toString(){return`oneof ${t.typeName}.${this.name}`}}}function yi(e,t,r,s,a){var m,v,i;const c=a===void 0,u={kind:"field",proto:e,deprecated:(v=(m=e.options)===null||m===void 0?void 0:m.deprecated)!==null&&v!==void 0?v:!1,name:e.name,number:e.number,scalar:void 0,message:void 0,enum:void 0,presence:Ld(e,s,c,t),listKind:void 0,mapKind:void 0,mapKey:void 0,delimitedEncoding:void 0,packed:void 0,longAsString:!1,getDefaultValue:void 0};if(c){const S=t.kind=="file"?t:t.file,E=t.kind=="file"?void 0:t,g=Tr(e,E,S);u.kind="extension",u.file=S,u.parent=E,u.oneof=void 0,u.typeName=g,u.jsonName=`[${g}]`,u.toString=()=>`extension ${g}`;const n=r.getMessage(He(e.extendee));Ne(n,`invalid FieldDescriptorProto: extendee ${e.extendee} not found`),u.extendee=n}else{const S=t;Ne(S.kind=="message"),u.parent=S,u.oneof=s,u.localName=s?zt(e.name):Yt(zt(e.name)),u.jsonName=e.jsonName,u.toString=()=>`field ${S.typeName}.${e.name}`}const f=e.label,h=e.type,_=(i=e.options)===null||i===void 0?void 0:i.jstype;if(f===Hi){const S=h==Ut?a==null?void 0:a.get(He(e.typeName)):void 0;if(S){u.fieldKind="map";const{key:E,value:g}=Dd(S);return u.mapKey=E.scalar,u.mapKind=g.fieldKind,u.message=g.message,u.delimitedEncoding=!1,u.enum=g.enum,u.scalar=g.scalar,u}switch(u.fieldKind="list",h){case Ut:case Xt:u.listKind="message",u.message=r.getMessage(He(e.typeName)),Ne(u.message),u.delimitedEncoding=Ws(e,t);break;case Us:u.listKind="enum",u.enum=r.getEnum(He(e.typeName)),Ne(u.enum);break;default:u.listKind="scalar",u.scalar=h,u.longAsString=_==Vs;break}return u.packed=Td(e,t),u}switch(h){case Ut:case Xt:u.fieldKind="message",u.message=r.getMessage(He(e.typeName)),Ne(u.message,`invalid FieldDescriptorProto: type_name ${e.typeName} not found`),u.delimitedEncoding=Ws(e,t),u.getDefaultValue=()=>{};break;case Us:{const S=r.getEnum(He(e.typeName));Ne(S!==void 0,`invalid FieldDescriptorProto: type_name ${e.typeName} not found`),u.fieldKind="enum",u.enum=r.getEnum(He(e.typeName)),u.getDefaultValue=()=>jt(e,"defaultValue")?ld(S,e.defaultValue):void 0;break}default:{u.fieldKind="scalar",u.scalar=h,u.longAsString=_==Vs,u.getDefaultValue=()=>jt(e,"defaultValue")?dd(h,e.defaultValue):void 0;break}}return u}function Id(e){switch(e.syntax){case"":case"proto2":return fd;case"proto3":return gd;case"editions":if(e.edition in Po)return e.edition;throw new Error(`${e.name}: unsupported edition`);default:throw new Error(`${e.name}: unsupported syntax "${e.syntax}"`)}}function Bd(e,t){return e.dependency.map(r=>{const s=t.getFile(r);if(!s)throw new Error(`Cannot find ${r}, imported by ${e.name}`);return s})}function Ad(e,t){const r=Rd(e)+"_";for(const s of t){if(!s.name.toLowerCase().startsWith(r))return;const a=s.name.substring(r.length);if(a.length==0||/^\d/.test(a))return}return r}function Rd(e){return(e.substring(0,1)+e.substring(1).replace(/[A-Z]/g,t=>"_"+t)).toLowerCase()}function Tr(e,t,r){let s;return t?s=`${t.typeName}.${e.name}`:r.proto.package.length>0?s=`${r.proto.package}.${e.name}`:s=`${e.name}`,s}function He(e){return e.startsWith(".")?e.substring(1):e}function xd(e,t){if(!jt(e,"oneofIndex")||e.proto3Optional)return;const r=t[e.oneofIndex];return Ne(r,`invalid FieldDescriptorProto: oneof #${e.oneofIndex} for field #${e.number} not found`),r}function Ld(e,t,r,s){if(e.label==vd)return bd;if(e.label==Hi)return Hs;if(t||e.proto3Optional||r)return ti;const a=wt("fieldPresence",{proto:e,parent:s});return a==Hs&&(e.type==Ut||e.type==Xt)?ti:a}function Td(e,t){if(e.label!=Hi)return!1;switch(e.type){case pd:case _d:case Xt:case Ut:return!1}const r=e.options;return r&&jt(r,"packed")?r.packed:Sd==wt("repeatedFieldEncoding",{proto:e,parent:t})}function Dd(e){const t=e.fields.find(s=>s.number===1),r=e.fields.find(s=>s.number===2);return Ne(t&&t.fieldKind=="scalar"&&t.scalar!=M.BYTES&&t.scalar!=M.FLOAT&&t.scalar!=M.DOUBLE&&r&&r.fieldKind!="list"&&r.fieldKind!="map"),{key:t,value:r}}function Od(e){var t;return Cd==wt("enumType",{proto:e.proto,parent:(t=e.parent)!==null&&t!==void 0?t:e.file})}function Ws(e,t){return e.type==Xt?!0:yd==wt("messageEncoding",{proto:e,parent:t})}function wt(e,t){var r,s;const a=(r=t.proto.options)===null||r===void 0?void 0:r.features;if(a){const m=a[e];if(m!=0)return m}if("kind"in t){if(t.kind=="message")return wt(e,(s=t.parent)!==null&&s!==void 0?s:t.file);const m=Po[t.edition];if(!m)throw new Error(`feature default for edition ${t.edition} not found`);return m[e]}return wt(e,t.parent)}function Ne(e,t){if(!e)throw new Error(t)}function Nd(e){const t=Md(e);return t.messageType.forEach(Vi),Fo(t,()=>{}).getFile(t.name)}function Md(e){return Object.assign(Object.create({syntax:"",edition:0}),Object.assign(Object.assign({$typeName:"google.protobuf.FileDescriptorProto",dependency:[],publicDependency:[],weakDependency:[],optionDependency:[],service:[],extension:[]},e),{messageType:e.messageType.map(Ho),enumType:e.enumType.map($o)}))}function Ho(e){var t,r,s,a,m,v,i,c;return Object.assign(Object.create({visibility:0}),{$typeName:"google.protobuf.DescriptorProto",name:e.name,field:(r=(t=e.field)===null||t===void 0?void 0:t.map(Fd))!==null&&r!==void 0?r:[],extension:[],nestedType:(a=(s=e.nestedType)===null||s===void 0?void 0:s.map(Ho))!==null&&a!==void 0?a:[],enumType:(v=(m=e.enumType)===null||m===void 0?void 0:m.map($o))!==null&&v!==void 0?v:[],extensionRange:(c=(i=e.extensionRange)===null||i===void 0?void 0:i.map(f=>Object.assign({$typeName:"google.protobuf.DescriptorProto.ExtensionRange"},f)))!==null&&c!==void 0?c:[],oneofDecl:[],reservedRange:[],reservedName:[]})}function Fd(e){return Object.assign(Object.create({label:1,typeName:"",extendee:"",defaultValue:"",oneofIndex:0,jsonName:"",proto3Optional:!1}),Object.assign(Object.assign({$typeName:"google.protobuf.FieldDescriptorProto"},e),{options:e.options?Pd(e.options):void 0}))}function Pd(e){var t,r,s;return Object.assign(Object.create({ctype:0,packed:!1,jstype:0,lazy:!1,unverifiedLazy:!1,deprecated:!1,weak:!1,debugRedact:!1,retention:0}),Object.assign(Object.assign({$typeName:"google.protobuf.FieldOptions"},e),{targets:(t=e.targets)!==null&&t!==void 0?t:[],editionDefaults:(s=(r=e.editionDefaults)===null||r===void 0?void 0:r.map(m=>Object.assign({$typeName:"google.protobuf.FieldOptions.EditionDefault"},m)))!==null&&s!==void 0?s:[],uninterpretedOption:[]}))}function $o(e){return Object.assign(Object.create({visibility:0}),{$typeName:"google.protobuf.EnumDescriptorProto",name:e.name,reservedName:[],reservedRange:[],value:e.value.map(r=>Object.assign({$typeName:"google.protobuf.EnumValueDescriptorProto"},r))})}function Wo(e){const t=Vd();let r=e.length*3/4;e[e.length-2]=="="?r-=2:e[e.length-1]=="="&&(r-=1);let s=new Uint8Array(r),a=0,m=0,v,i=0;for(let c=0;c<e.length;c++){if(v=t[e.charCodeAt(c)],v===void 0)switch(e[c]){case"=":m=0;case`
|
|
1776
|
+
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string")}switch(m){case 0:i=v,m=1;break;case 1:s[a++]=i<<2|(v&48)>>4,i=v,m=2;break;case 2:s[a++]=(i&15)<<4|(v&60)>>2,i=v,m=3;break;case 3:s[a++]=(i&3)<<6|v,m=0;break}}if(m==1)throw Error("invalid base64 string");return s.subarray(0,a)}function Ud(e,t="std"){const r=Go(t),s=t=="std";let a="",m=0,v,i=0;for(let c=0;c<e.length;c++)switch(v=e[c],m){case 0:a+=r[v>>2],i=(v&3)<<4,m=1;break;case 1:a+=r[i|v>>4],i=(v&15)<<2,m=2;break;case 2:a+=r[i|v>>6],a+=r[v&63],m=0;break}return m&&(a+=r[i],s&&(a+="=",m==1&&(a+="="))),a}let lr,Gs,gt;function Go(e){return lr||(lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Gs=lr.slice(0,-2).concat("-","_")),e=="url"?Gs:lr}function Vd(){if(!gt){gt=[];const e=Go("std");for(let t=0;t<e.length;t++)gt[e[t].charCodeAt(0)]=t;gt[45]=e.indexOf("+"),gt[95]=e.indexOf("/")}return gt}function $i(e,t){return e!==null&&typeof e=="object"&&"$typeName"in e&&typeof e.$typeName=="string"?t===void 0?!0:t.typeName===e.$typeName:!1}const Hd=["FieldValueInvalidError","FieldListRangeError","ForeignFieldError"];class Be extends Error{constructor(t,r,s="FieldValueInvalidError"){super(r),this.name=s,this.field=()=>t}}function $d(e){return e instanceof Error&&Hd.includes(e.name)&&"field"in e&&typeof e.field=="function"}function Qe(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Wi(e,t){var r,s,a,m;if(Qe(e)&&We in e&&"add"in e&&"field"in e&&typeof e.field=="function"){if(t!==void 0){const v=t,i=e.field();return v.listKind==i.listKind&&v.scalar===i.scalar&&((r=v.message)===null||r===void 0?void 0:r.typeName)===((s=i.message)===null||s===void 0?void 0:s.typeName)&&((a=v.enum)===null||a===void 0?void 0:a.typeName)===((m=i.enum)===null||m===void 0?void 0:m.typeName)}return!0}return!1}function Gi(e,t){var r,s,a,m;if(Qe(e)&&We in e&&"has"in e&&"field"in e&&typeof e.field=="function"){if(t!==void 0){const v=t,i=e.field();return v.mapKey===i.mapKey&&v.mapKind==i.mapKind&&v.scalar===i.scalar&&((r=v.message)===null||r===void 0?void 0:r.typeName)===((s=i.message)===null||s===void 0?void 0:s.typeName)&&((a=v.enum)===null||a===void 0?void 0:a.typeName)===((m=i.enum)===null||m===void 0?void 0:m.typeName)}return!0}return!1}function Ki(e,t){return Qe(e)&&We in e&&"desc"in e&&Qe(e.desc)&&e.desc.kind==="message"&&(t===void 0||e.desc.typeName==t.typeName)}const ri=Symbol.for("@bufbuild/protobuf/text-encoding");function Zi(){if(globalThis[ri]==null){const e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[ri]={encodeUtf8(r){return e.encode(r)},decodeUtf8(r){return t.decode(r)},checkUtf8(r){try{return encodeURIComponent(r),!0}catch{return!1}}}}return globalThis[ri]}var pe;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(pe||(pe={}));const Ko=34028234663852886e22,Zo=-34028234663852886e22,zo=4294967295,Yo=2147483647,jo=-2147483648;class Xo{constructor(t=Zi().encodeUtf8){this.encodeUtf8=t,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let t=0;for(let a=0;a<this.chunks.length;a++)t+=this.chunks[a].length;let r=new Uint8Array(t),s=0;for(let a=0;a<this.chunks.length;a++)r.set(this.chunks[a],s),s+=this.chunks[a].length;return this.chunks=[],r}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),r=this.stack.pop();if(!r)throw new Error("invalid state, fork stack empty");return this.chunks=r.chunks,this.buf=r.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,r){return this.uint32((t<<3|r)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(Ks(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return ii(t),vi(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let r=this.encodeUtf8(t);return this.uint32(r.byteLength),this.raw(r)}float(t){Wd(t);let r=new Uint8Array(4);return new DataView(r.buffer).setFloat32(0,t,!0),this.raw(r)}double(t){let r=new Uint8Array(8);return new DataView(r.buffer).setFloat64(0,t,!0),this.raw(r)}fixed32(t){Ks(t);let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t,!0),this.raw(r)}sfixed32(t){ii(t);let r=new Uint8Array(4);return new DataView(r.buffer).setInt32(0,t,!0),this.raw(r)}sint32(t){return ii(t),t=(t<<1^t>>31)>>>0,vi(t,this.buf),this}sfixed64(t){let r=new Uint8Array(8),s=new DataView(r.buffer),a=ae.enc(t);return s.setInt32(0,a.lo,!0),s.setInt32(4,a.hi,!0),this.raw(r)}fixed64(t){let r=new Uint8Array(8),s=new DataView(r.buffer),a=ae.uEnc(t);return s.setInt32(0,a.lo,!0),s.setInt32(4,a.hi,!0),this.raw(r)}int64(t){let r=ae.enc(t);return ei(r.lo,r.hi,this.buf),this}sint64(t){const r=ae.enc(t),s=r.hi>>31,a=r.lo<<1^s,m=(r.hi<<1|r.lo>>>31)^s;return ei(a,m,this.buf),this}uint64(t){const r=ae.uEnc(t);return ei(r.lo,r.hi,this.buf),this}}class zi{constructor(t,r=Zi().decodeUtf8){this.decodeUtf8=r,this.varint64=td,this.uint32=sd,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength)}tag(){let t=this.uint32(),r=t>>>3,s=t&7;if(r<=0||s<0||s>5)throw new Error("illegal tag: field no "+r+" wire type "+s);return[r,s]}skip(t,r){let s=this.pos;switch(t){case pe.Varint:for(;this.buf[this.pos++]&128;);break;case pe.Bit64:this.pos+=4;case pe.Bit32:this.pos+=4;break;case pe.LengthDelimited:let a=this.uint32();this.pos+=a;break;case pe.StartGroup:for(;;){const[m,v]=this.tag();if(v===pe.EndGroup){if(r!==void 0&&m!==r)throw new Error("invalid end group tag");break}this.skip(v,m)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(s,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return ae.dec(...this.varint64())}uint64(){return ae.uDec(...this.varint64())}sint64(){let[t,r]=this.varint64(),s=-(t&1);return t=(t>>>1|(r&1)<<31)^s,r=r>>>1^s,ae.dec(t,r)}bool(){let[t,r]=this.varint64();return t!==0||r!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ae.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ae.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),r=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(r,r+t)}string(){return this.decodeUtf8(this.bytes())}}function ii(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>Yo||e<jo)throw new Error("invalid int32: "+e)}function Ks(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>zo||e<0)throw new Error("invalid uint32: "+e)}function Wd(e){if(typeof e=="string"){const t=e;if(e=Number(e),Number.isNaN(e)&&t!=="NaN")throw new Error("invalid float32: "+t)}else if(typeof e!="number")throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>Ko||e<Zo))throw new Error("invalid float32: "+e)}function nt(e,t){const r=e.fieldKind=="list"?Wi(t,e):e.fieldKind=="map"?Gi(t,e):Yi(e,t);if(r===!0)return;let s;switch(e.fieldKind){case"list":s=`expected ${Qo(e)}, got ${be(t)}`;break;case"map":s=`expected ${ea(e)}, got ${be(t)}`;break;default:s=kr(e,t,r)}return new Be(e,s)}function Zs(e,t,r){const s=Yi(e,r);if(s!==!0)return new Be(e,`list item #${t+1}: ${kr(e,r,s)}`)}function Gd(e,t,r){const s=Jo(t,e.mapKey);if(s!==!0)return new Be(e,`invalid map key: ${kr({scalar:e.mapKey},t,s)}`);const a=Yi(e,r);if(a!==!0)return new Be(e,`map entry ${be(t)}: ${kr(e,r,a)}`)}function Yi(e,t){return e.scalar!==void 0?Jo(t,e.scalar):e.enum!==void 0?e.enum.open?Number.isInteger(t):e.enum.values.some(r=>r.number===t):Ki(t,e.message)}function Jo(e,t){switch(t){case M.DOUBLE:return typeof e=="number";case M.FLOAT:return typeof e!="number"?!1:Number.isNaN(e)||!Number.isFinite(e)?!0:e>Ko||e<Zo?`${e.toFixed()} out of range`:!0;case M.INT32:case M.SFIXED32:case M.SINT32:return typeof e!="number"||!Number.isInteger(e)?!1:e>Yo||e<jo?`${e.toFixed()} out of range`:!0;case M.FIXED32:case M.UINT32:return typeof e!="number"||!Number.isInteger(e)?!1:e>zo||e<0?`${e.toFixed()} out of range`:!0;case M.BOOL:return typeof e=="boolean";case M.STRING:return typeof e!="string"?!1:Zi().checkUtf8(e)||"invalid UTF8";case M.BYTES:return e instanceof Uint8Array;case M.INT64:case M.SFIXED64:case M.SINT64:if(typeof e=="bigint"||typeof e=="number"||typeof e=="string"&&e.length>0)try{return ae.parse(e),!0}catch{return`${e} out of range`}return!1;case M.FIXED64:case M.UINT64:if(typeof e=="bigint"||typeof e=="number"||typeof e=="string"&&e.length>0)try{return ae.uParse(e),!0}catch{return`${e} out of range`}return!1}}function kr(e,t,r){return r=typeof r=="string"?`: ${r}`:`, got ${be(t)}`,e.scalar!==void 0?`expected ${Kd(e.scalar)}`+r:e.enum!==void 0?`expected ${e.enum.toString()}`+r:`expected ${qo(e.message)}`+r}function be(e){switch(typeof e){case"object":return e===null?"null":e instanceof Uint8Array?`Uint8Array(${e.length})`:Array.isArray(e)?`Array(${e.length})`:Wi(e)?Qo(e.field()):Gi(e)?ea(e.field()):Ki(e)?qo(e.desc):$i(e)?`message ${e.$typeName}`:"object";case"string":return e.length>30?"string":`"${e.split('"').join('\\"')}"`;case"boolean":return String(e);case"number":return String(e);case"bigint":return String(e)+"n";default:return typeof e}}function qo(e){return`ReflectMessage (${e.typeName})`}function Qo(e){switch(e.listKind){case"message":return`ReflectList (${e.message.toString()})`;case"enum":return`ReflectList (${e.enum.toString()})`;case"scalar":return`ReflectList (${M[e.scalar]})`}}function ea(e){switch(e.mapKind){case"message":return`ReflectMap (${M[e.mapKey]}, ${e.message.toString()})`;case"enum":return`ReflectMap (${M[e.mapKey]}, ${e.enum.toString()})`;case"scalar":return`ReflectMap (${M[e.mapKey]}, ${M[e.scalar]})`}}function Kd(e){switch(e){case M.STRING:return"string";case M.BOOL:return"boolean";case M.INT64:case M.SINT64:case M.SFIXED64:return"bigint (int64)";case M.UINT64:case M.FIXED64:return"bigint (uint64)";case M.BYTES:return"Uint8Array";case M.DOUBLE:return"number (float64)";case M.FLOAT:return"number (float32)";case M.FIXED32:case M.UINT32:return"number (uint32)";case M.INT32:case M.SFIXED32:case M.SINT32:return"number (int32)"}}function Zd(e){return ta(e.$typeName)}function rr(e){const t=e.fields[0];return ta(e.typeName)&&t!==void 0&&t.fieldKind=="scalar"&&t.name=="value"&&t.number==1}function ta(e){return e.startsWith("google.protobuf.")&&["DoubleValue","FloatValue","Int64Value","UInt64Value","Int32Value","UInt32Value","BoolValue","StringValue","BytesValue"].includes(e.substring(16))}const zd=999,Yd=998,br=2;function me(e,t){if($i(t,e))return t;const r=Qd(e);return t!==void 0&&jd(e,r,t),r}function jd(e,t,r){for(const s of e.members){let a=r[s.localName];if(a==null)continue;let m;if(s.kind=="oneof"){const v=Oo(r,s);if(!v)continue;m=v,a=No(r,v)}else m=s;switch(m.fieldKind){case"message":a=ji(m,a);break;case"scalar":a=ra(m,a);break;case"list":a=Jd(m,a);break;case"map":a=Xd(m,a);break}Mo(t,m,a)}return t}function ra(e,t){return e.scalar==M.BYTES?Xi(t):t}function Xd(e,t){if(Qe(t)){if(e.scalar==M.BYTES)return zs(t,Xi);if(e.mapKind=="message")return zs(t,r=>ji(e,r))}return t}function Jd(e,t){if(Array.isArray(t)){if(e.scalar==M.BYTES)return t.map(Xi);if(e.listKind=="message")return t.map(r=>ji(e,r))}return t}function ji(e,t){if(e.fieldKind=="message"&&!e.oneof&&rr(e.message))return ra(e.message.fields[0],t);if(Qe(t)){if(e.message.typeName=="google.protobuf.Struct"&&e.parent.typeName!=="google.protobuf.Value")return t;if(!$i(t,e.message))return me(e.message,t)}return t}function Xi(e){return Array.isArray(e)?new Uint8Array(e):e}function zs(e,t){const r={};for(const s of Object.entries(e))r[s[0]]=t(s[1]);return r}const qd=Symbol(),Ys=new WeakMap;function Qd(e){let t;if(eh(e)){const r=Ys.get(e);let s,a;if(r)({prototype:s,members:a}=r);else{s={},a=new Set;for(const m of e.members)m.kind!="oneof"&&(m.fieldKind!="scalar"&&m.fieldKind!="enum"||m.presence!=br&&(a.add(m),s[m.localName]=si(m)));Ys.set(e,{prototype:s,members:a})}t=Object.create(s),t.$typeName=e.typeName;for(const m of e.members)a.has(m)||m.kind=="field"&&(m.fieldKind=="message"||(m.fieldKind=="scalar"||m.fieldKind=="enum")&&m.presence!=br)||(t[m.localName]=si(m))}else{t={$typeName:e.typeName};for(const r of e.members)(r.kind=="oneof"||r.presence==br)&&(t[r.localName]=si(r))}return t}function eh(e){switch(e.file.edition){case zd:return!1;case Yd:return!0;default:return e.fields.some(t=>t.presence!=br&&t.fieldKind!="message"&&!t.oneof)}}function si(e){if(e.kind=="oneof")return{case:void 0};if(e.fieldKind=="list")return[];if(e.fieldKind=="map")return{};if(e.fieldKind=="message")return qd;const t=e.getDefaultValue();return t!==void 0?e.fieldKind=="scalar"&&e.longAsString?t.toString():t:e.fieldKind=="scalar"?ut(e.scalar,e.longAsString):e.enum.values[0].number}function Oe(e,t,r=!0){return new ia(e,t,r)}class ia{get sortedFields(){var t;return(t=this._sortedFields)!==null&&t!==void 0?t:this._sortedFields=this.desc.fields.concat().sort((r,s)=>r.number-s.number)}constructor(t,r,s=!0){this.lists=new Map,this.maps=new Map,this.check=s,this.desc=t,this.message=this[We]=r??me(t),this.fields=t.fields,this.oneofs=t.oneofs,this.members=t.members}findNumber(t){return this._fieldsByNumber||(this._fieldsByNumber=new Map(this.desc.fields.map(r=>[r.number,r]))),this._fieldsByNumber.get(t)}oneofCase(t){return Dt(this.message,t),Oo(this.message,t)}isSet(t){return Dt(this.message,t),ad(this.message,t)}clear(t){Dt(this.message,t),cd(this.message,t)}get(t){Dt(this.message,t);const r=No(this.message,t);switch(t.fieldKind){case"list":let s=this.lists.get(t);return(!s||s[We]!==r)&&this.lists.set(t,s=new th(t,r,this.check)),s;case"map":let a=this.maps.get(t);return(!a||a[We]!==r)&&this.maps.set(t,a=new rh(t,r,this.check)),a;case"message":return qi(t,r,this.check);case"scalar":return r===void 0?ut(t.scalar,!1):Qi(t,r);case"enum":return r??t.enum.values[0].number}}set(t,r){if(Dt(this.message,t),this.check){const a=nt(t,r);if(a)throw a}let s;t.fieldKind=="message"?s=Ji(t,r):Gi(r)||Wi(r)?s=r[We]:s=es(t,r),Mo(this.message,t,s)}getUnknown(){return this.message.$unknown}setUnknown(t){this.message.$unknown=t}}function Dt(e,t){if(t.parent.typeName!==e.$typeName)throw new Be(t,`cannot use ${t.toString()} with message ${e.$typeName}`,"ForeignFieldError")}class th{field(){return this._field}get size(){return this._arr.length}constructor(t,r,s){this._field=t,this._arr=this[We]=r,this.check=s}get(t){const r=this._arr[t];return r===void 0?void 0:ni(this._field,r,this.check)}set(t,r){if(t<0||t>=this._arr.length)throw new Be(this._field,`list item #${t+1}: out of range`);if(this.check){const s=Zs(this._field,t,r);if(s)throw s}this._arr[t]=js(this._field,r)}add(t){if(this.check){const r=Zs(this._field,this._arr.length,t);if(r)throw r}this._arr.push(js(this._field,t))}clear(){this._arr.splice(0,this._arr.length)}[Symbol.iterator](){return this.values()}keys(){return this._arr.keys()}*values(){for(const t of this._arr)yield ni(this._field,t,this.check)}*entries(){for(let t=0;t<this._arr.length;t++)yield[t,ni(this._field,this._arr[t],this.check)]}}class rh{constructor(t,r,s=!0){this.obj=this[We]=r??{},this.check=s,this._field=t}field(){return this._field}set(t,r){if(this.check){const s=Gd(this._field,t,r);if(s)throw s}return this.obj[dr(t)]=ih(this._field,r),this}delete(t){const r=dr(t),s=Object.prototype.hasOwnProperty.call(this.obj,r);return s&&delete this.obj[r],s}clear(){for(const t of Object.keys(this.obj))delete this.obj[t]}get(t){let r=this.obj[dr(t)];return r!==void 0&&(r=oi(this._field,r,this.check)),r}has(t){return Object.prototype.hasOwnProperty.call(this.obj,dr(t))}*keys(){for(const t of Object.keys(this.obj))yield Xs(t,this._field.mapKey)}*entries(){for(const t of Object.entries(this.obj))yield[Xs(t[0],this._field.mapKey),oi(this._field,t[1],this.check)]}[Symbol.iterator](){return this.entries()}get size(){return Object.keys(this.obj).length}*values(){for(const t of Object.values(this.obj))yield oi(this._field,t,this.check)}forEach(t,r){for(const s of this.entries())t.call(r,s[1],s[0],this)}}function Ji(e,t){return Ki(t)?Zd(t.message)&&!e.oneof&&e.fieldKind=="message"?t.message.value:t.desc.typeName=="google.protobuf.Struct"&&e.parent.typeName!="google.protobuf.Value"?na(t.message):t.message:t}function qi(e,t,r){return t!==void 0&&(rr(e.message)&&!e.oneof&&e.fieldKind=="message"?t={$typeName:e.message.typeName,value:Qi(e.message.fields[0],t)}:e.message.typeName=="google.protobuf.Struct"&&e.parent.typeName!="google.protobuf.Value"&&Qe(t)&&(t=sa(t))),new ia(e.message,t,r)}function js(e,t){return e.listKind=="message"?Ji(e,t):es(e,t)}function ni(e,t,r){return e.listKind=="message"?qi(e,t,r):Qi(e,t)}function ih(e,t){return e.mapKind=="message"?Ji(e,t):es(e,t)}function oi(e,t,r){return e.mapKind=="message"?qi(e,t,r):t}function dr(e){return typeof e=="string"||typeof e=="number"?e:String(e)}function Xs(e,t){switch(t){case M.STRING:return e;case M.INT32:case M.FIXED32:case M.UINT32:case M.SFIXED32:case M.SINT32:{const r=Number.parseInt(e);if(Number.isFinite(r))return r;break}case M.BOOL:switch(e){case"true":return!0;case"false":return!1}break;case M.UINT64:case M.FIXED64:try{return ae.uParse(e)}catch{}break;default:try{return ae.parse(e)}catch{}break}return e}function Qi(e,t){switch(e.scalar){case M.INT64:case M.SFIXED64:case M.SINT64:"longAsString"in e&&e.longAsString&&typeof t=="string"&&(t=ae.parse(t));break;case M.FIXED64:case M.UINT64:"longAsString"in e&&e.longAsString&&typeof t=="string"&&(t=ae.uParse(t));break}return t}function es(e,t){switch(e.scalar){case M.INT64:case M.SFIXED64:case M.SINT64:"longAsString"in e&&e.longAsString?t=String(t):(typeof t=="string"||typeof t=="number")&&(t=ae.parse(t));break;case M.FIXED64:case M.UINT64:"longAsString"in e&&e.longAsString?t=String(t):(typeof t=="string"||typeof t=="number")&&(t=ae.uParse(t));break}return t}function sa(e){const t={$typeName:"google.protobuf.Struct",fields:{}};if(Qe(e))for(const[r,s]of Object.entries(e))t.fields[r]=aa(s);return t}function na(e){const t={};for(const[r,s]of Object.entries(e.fields))t[r]=oa(s);return t}function oa(e){switch(e.kind.case){case"structValue":return na(e.kind.value);case"listValue":return e.kind.value.values.map(oa);case"nullValue":case void 0:return null;default:return e.kind.value}}function aa(e){const t={$typeName:"google.protobuf.Value",kind:{case:void 0}};switch(typeof e){case"number":t.kind={case:"numberValue",value:e};break;case"string":t.kind={case:"stringValue",value:e};break;case"boolean":t.kind={case:"boolValue",value:e};break;case"object":if(e===null)t.kind={case:"nullValue",value:0};else if(Array.isArray(e)){const r={$typeName:"google.protobuf.ListValue",values:[]};if(Array.isArray(e))for(const s of e)r.values.push(aa(s));t.kind={case:"listValue",value:r}}else t.kind={case:"structValue",value:sa(e)};break}return t}const sh=3,Js={writeUnknownFields:!0};function nh(e){return e?Object.assign(Object.assign({},Js),e):Js}function oh(e,t,r){return Ir(new Xo,nh(r),Oe(e,t)).finish()}function Ir(e,t,r){var s;for(const a of r.sortedFields){if(!r.isSet(a)){if(a.presence==sh)throw new Error(`cannot encode ${a} to binary: required field not set`);continue}ca(e,t,r,a)}if(t.writeUnknownFields)for(const{no:a,wireType:m,data:v}of(s=r.getUnknown())!==null&&s!==void 0?s:[])e.tag(a,m).raw(v);return e}function ca(e,t,r,s){var a;switch(s.fieldKind){case"scalar":case"enum":Br(e,r.desc.typeName,s.name,(a=s.scalar)!==null&&a!==void 0?a:M.INT32,s.number,r.get(s));break;case"list":ah(e,t,s,r.get(s));break;case"message":la(e,t,s,r.get(s));break;case"map":for(const[m,v]of r.get(s))ch(e,t,s,m,v);break}}function Br(e,t,r,s,a,m){da(e.tag(a,lh(s)),t,r,s,m)}function la(e,t,r,s){r.delimitedEncoding?Ir(e.tag(r.number,pe.StartGroup),t,s).tag(r.number,pe.EndGroup):Ir(e.tag(r.number,pe.LengthDelimited).fork(),t,s).join()}function ah(e,t,r,s){var a;if(r.listKind=="message"){for(const v of s)la(e,t,r,v);return}const m=(a=r.scalar)!==null&&a!==void 0?a:M.INT32;if(r.packed){if(!s.size)return;e.tag(r.number,pe.LengthDelimited).fork();for(const v of s)da(e,r.parent.typeName,r.name,m,v);e.join();return}for(const v of s)Br(e,r.parent.typeName,r.name,m,r.number,v)}function ch(e,t,r,s,a){var m;switch(e.tag(r.number,pe.LengthDelimited).fork(),Br(e,r.parent.typeName,r.name,r.mapKey,1,s),r.mapKind){case"scalar":case"enum":Br(e,r.parent.typeName,r.name,(m=r.scalar)!==null&&m!==void 0?m:M.INT32,2,a);break;case"message":Ir(e.tag(2,pe.LengthDelimited).fork(),t,a).join();break}e.join()}function da(e,t,r,s,a){try{switch(s){case M.STRING:e.string(a);break;case M.BOOL:e.bool(a);break;case M.DOUBLE:e.double(a);break;case M.FLOAT:e.float(a);break;case M.INT32:e.int32(a);break;case M.INT64:e.int64(a);break;case M.UINT64:e.uint64(a);break;case M.FIXED64:e.fixed64(a);break;case M.BYTES:e.bytes(a);break;case M.FIXED32:e.fixed32(a);break;case M.SFIXED32:e.sfixed32(a);break;case M.SFIXED64:e.sfixed64(a);break;case M.SINT64:e.sint64(a);break;case M.UINT32:e.uint32(a);break;case M.SINT32:e.sint32(a);break}}catch(m){throw m instanceof Error?new Error(`cannot encode field ${t}.${r} to binary: ${m.message}`):m}}function lh(e){switch(e){case M.BYTES:case M.STRING:return pe.LengthDelimited;case M.DOUBLE:case M.FIXED64:case M.SFIXED64:return pe.Bit64;case M.FIXED32:case M.SFIXED32:case M.FLOAT:return pe.Bit32;default:return pe.Varint}}function Ve(e,t,...r){return r.reduce((s,a)=>s.nestedMessages[a],e.messages[t])}function Dr(e,t,...r){if(r.length==0)return e.enums[t];const s=r.pop();return r.reduce((a,m)=>a.nestedMessages[m],e.messages[t]).nestedEnums[s]}function Or(e){const t={};for(const r of e.values)t[r.localName]=r.number,t[r.number]=r.localName;return t}const dh=Nd({name:"google/protobuf/descriptor.proto",package:"google.protobuf",messageType:[{name:"FileDescriptorSet",field:[{name:"file",number:1,type:11,label:3,typeName:".google.protobuf.FileDescriptorProto"}],extensionRange:[{start:536e6,end:536000001}]},{name:"FileDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"package",number:2,type:9,label:1},{name:"dependency",number:3,type:9,label:3},{name:"public_dependency",number:10,type:5,label:3},{name:"weak_dependency",number:11,type:5,label:3},{name:"option_dependency",number:15,type:9,label:3},{name:"message_type",number:4,type:11,label:3,typeName:".google.protobuf.DescriptorProto"},{name:"enum_type",number:5,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto"},{name:"service",number:6,type:11,label:3,typeName:".google.protobuf.ServiceDescriptorProto"},{name:"extension",number:7,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"options",number:8,type:11,label:1,typeName:".google.protobuf.FileOptions"},{name:"source_code_info",number:9,type:11,label:1,typeName:".google.protobuf.SourceCodeInfo"},{name:"syntax",number:12,type:9,label:1},{name:"edition",number:14,type:14,label:1,typeName:".google.protobuf.Edition"}]},{name:"DescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"field",number:2,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"extension",number:6,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"nested_type",number:3,type:11,label:3,typeName:".google.protobuf.DescriptorProto"},{name:"enum_type",number:4,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto"},{name:"extension_range",number:5,type:11,label:3,typeName:".google.protobuf.DescriptorProto.ExtensionRange"},{name:"oneof_decl",number:8,type:11,label:3,typeName:".google.protobuf.OneofDescriptorProto"},{name:"options",number:7,type:11,label:1,typeName:".google.protobuf.MessageOptions"},{name:"reserved_range",number:9,type:11,label:3,typeName:".google.protobuf.DescriptorProto.ReservedRange"},{name:"reserved_name",number:10,type:9,label:3},{name:"visibility",number:11,type:14,label:1,typeName:".google.protobuf.SymbolVisibility"}],nestedType:[{name:"ExtensionRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.ExtensionRangeOptions"}]},{name:"ReservedRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1}]}]},{name:"ExtensionRangeOptions",field:[{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"},{name:"declaration",number:2,type:11,label:3,typeName:".google.protobuf.ExtensionRangeOptions.Declaration",options:{retention:2}},{name:"features",number:50,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"verification",number:3,type:14,label:1,typeName:".google.protobuf.ExtensionRangeOptions.VerificationState",defaultValue:"UNVERIFIED",options:{retention:2}}],nestedType:[{name:"Declaration",field:[{name:"number",number:1,type:5,label:1},{name:"full_name",number:2,type:9,label:1},{name:"type",number:3,type:9,label:1},{name:"reserved",number:5,type:8,label:1},{name:"repeated",number:6,type:8,label:1}]}],enumType:[{name:"VerificationState",value:[{name:"DECLARATION",number:0},{name:"UNVERIFIED",number:1}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"FieldDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"number",number:3,type:5,label:1},{name:"label",number:4,type:14,label:1,typeName:".google.protobuf.FieldDescriptorProto.Label"},{name:"type",number:5,type:14,label:1,typeName:".google.protobuf.FieldDescriptorProto.Type"},{name:"type_name",number:6,type:9,label:1},{name:"extendee",number:2,type:9,label:1},{name:"default_value",number:7,type:9,label:1},{name:"oneof_index",number:9,type:5,label:1},{name:"json_name",number:10,type:9,label:1},{name:"options",number:8,type:11,label:1,typeName:".google.protobuf.FieldOptions"},{name:"proto3_optional",number:17,type:8,label:1}],enumType:[{name:"Type",value:[{name:"TYPE_DOUBLE",number:1},{name:"TYPE_FLOAT",number:2},{name:"TYPE_INT64",number:3},{name:"TYPE_UINT64",number:4},{name:"TYPE_INT32",number:5},{name:"TYPE_FIXED64",number:6},{name:"TYPE_FIXED32",number:7},{name:"TYPE_BOOL",number:8},{name:"TYPE_STRING",number:9},{name:"TYPE_GROUP",number:10},{name:"TYPE_MESSAGE",number:11},{name:"TYPE_BYTES",number:12},{name:"TYPE_UINT32",number:13},{name:"TYPE_ENUM",number:14},{name:"TYPE_SFIXED32",number:15},{name:"TYPE_SFIXED64",number:16},{name:"TYPE_SINT32",number:17},{name:"TYPE_SINT64",number:18}]},{name:"Label",value:[{name:"LABEL_OPTIONAL",number:1},{name:"LABEL_REPEATED",number:3},{name:"LABEL_REQUIRED",number:2}]}]},{name:"OneofDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"options",number:2,type:11,label:1,typeName:".google.protobuf.OneofOptions"}]},{name:"EnumDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"value",number:2,type:11,label:3,typeName:".google.protobuf.EnumValueDescriptorProto"},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.EnumOptions"},{name:"reserved_range",number:4,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto.EnumReservedRange"},{name:"reserved_name",number:5,type:9,label:3},{name:"visibility",number:6,type:14,label:1,typeName:".google.protobuf.SymbolVisibility"}],nestedType:[{name:"EnumReservedRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1}]}]},{name:"EnumValueDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"number",number:2,type:5,label:1},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.EnumValueOptions"}]},{name:"ServiceDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"method",number:2,type:11,label:3,typeName:".google.protobuf.MethodDescriptorProto"},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.ServiceOptions"}]},{name:"MethodDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"input_type",number:2,type:9,label:1},{name:"output_type",number:3,type:9,label:1},{name:"options",number:4,type:11,label:1,typeName:".google.protobuf.MethodOptions"},{name:"client_streaming",number:5,type:8,label:1,defaultValue:"false"},{name:"server_streaming",number:6,type:8,label:1,defaultValue:"false"}]},{name:"FileOptions",field:[{name:"java_package",number:1,type:9,label:1},{name:"java_outer_classname",number:8,type:9,label:1},{name:"java_multiple_files",number:10,type:8,label:1,defaultValue:"false"},{name:"java_generate_equals_and_hash",number:20,type:8,label:1,options:{deprecated:!0}},{name:"java_string_check_utf8",number:27,type:8,label:1,defaultValue:"false"},{name:"optimize_for",number:9,type:14,label:1,typeName:".google.protobuf.FileOptions.OptimizeMode",defaultValue:"SPEED"},{name:"go_package",number:11,type:9,label:1},{name:"cc_generic_services",number:16,type:8,label:1,defaultValue:"false"},{name:"java_generic_services",number:17,type:8,label:1,defaultValue:"false"},{name:"py_generic_services",number:18,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:23,type:8,label:1,defaultValue:"false"},{name:"cc_enable_arenas",number:31,type:8,label:1,defaultValue:"true"},{name:"objc_class_prefix",number:36,type:9,label:1},{name:"csharp_namespace",number:37,type:9,label:1},{name:"swift_prefix",number:39,type:9,label:1},{name:"php_class_prefix",number:40,type:9,label:1},{name:"php_namespace",number:41,type:9,label:1},{name:"php_metadata_namespace",number:44,type:9,label:1},{name:"ruby_package",number:45,type:9,label:1},{name:"features",number:50,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],enumType:[{name:"OptimizeMode",value:[{name:"SPEED",number:1},{name:"CODE_SIZE",number:2},{name:"LITE_RUNTIME",number:3}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"MessageOptions",field:[{name:"message_set_wire_format",number:1,type:8,label:1,defaultValue:"false"},{name:"no_standard_descriptor_accessor",number:2,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"map_entry",number:7,type:8,label:1},{name:"deprecated_legacy_json_field_conflicts",number:11,type:8,label:1,options:{deprecated:!0}},{name:"features",number:12,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"FieldOptions",field:[{name:"ctype",number:1,type:14,label:1,typeName:".google.protobuf.FieldOptions.CType",defaultValue:"STRING"},{name:"packed",number:2,type:8,label:1},{name:"jstype",number:6,type:14,label:1,typeName:".google.protobuf.FieldOptions.JSType",defaultValue:"JS_NORMAL"},{name:"lazy",number:5,type:8,label:1,defaultValue:"false"},{name:"unverified_lazy",number:15,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"weak",number:10,type:8,label:1,defaultValue:"false",options:{deprecated:!0}},{name:"debug_redact",number:16,type:8,label:1,defaultValue:"false"},{name:"retention",number:17,type:14,label:1,typeName:".google.protobuf.FieldOptions.OptionRetention"},{name:"targets",number:19,type:14,label:3,typeName:".google.protobuf.FieldOptions.OptionTargetType"},{name:"edition_defaults",number:20,type:11,label:3,typeName:".google.protobuf.FieldOptions.EditionDefault"},{name:"features",number:21,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"feature_support",number:22,type:11,label:1,typeName:".google.protobuf.FieldOptions.FeatureSupport"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],nestedType:[{name:"EditionDefault",field:[{name:"edition",number:3,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"value",number:2,type:9,label:1}]},{name:"FeatureSupport",field:[{name:"edition_introduced",number:1,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"edition_deprecated",number:2,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"deprecation_warning",number:3,type:9,label:1},{name:"edition_removed",number:4,type:14,label:1,typeName:".google.protobuf.Edition"}]}],enumType:[{name:"CType",value:[{name:"STRING",number:0},{name:"CORD",number:1},{name:"STRING_PIECE",number:2}]},{name:"JSType",value:[{name:"JS_NORMAL",number:0},{name:"JS_STRING",number:1},{name:"JS_NUMBER",number:2}]},{name:"OptionRetention",value:[{name:"RETENTION_UNKNOWN",number:0},{name:"RETENTION_RUNTIME",number:1},{name:"RETENTION_SOURCE",number:2}]},{name:"OptionTargetType",value:[{name:"TARGET_TYPE_UNKNOWN",number:0},{name:"TARGET_TYPE_FILE",number:1},{name:"TARGET_TYPE_EXTENSION_RANGE",number:2},{name:"TARGET_TYPE_MESSAGE",number:3},{name:"TARGET_TYPE_FIELD",number:4},{name:"TARGET_TYPE_ONEOF",number:5},{name:"TARGET_TYPE_ENUM",number:6},{name:"TARGET_TYPE_ENUM_ENTRY",number:7},{name:"TARGET_TYPE_SERVICE",number:8},{name:"TARGET_TYPE_METHOD",number:9}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"OneofOptions",field:[{name:"features",number:1,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"EnumOptions",field:[{name:"allow_alias",number:2,type:8,label:1},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"deprecated_legacy_json_field_conflicts",number:6,type:8,label:1,options:{deprecated:!0}},{name:"features",number:7,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"EnumValueOptions",field:[{name:"deprecated",number:1,type:8,label:1,defaultValue:"false"},{name:"features",number:2,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"debug_redact",number:3,type:8,label:1,defaultValue:"false"},{name:"feature_support",number:4,type:11,label:1,typeName:".google.protobuf.FieldOptions.FeatureSupport"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"ServiceOptions",field:[{name:"features",number:34,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"deprecated",number:33,type:8,label:1,defaultValue:"false"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"MethodOptions",field:[{name:"deprecated",number:33,type:8,label:1,defaultValue:"false"},{name:"idempotency_level",number:34,type:14,label:1,typeName:".google.protobuf.MethodOptions.IdempotencyLevel",defaultValue:"IDEMPOTENCY_UNKNOWN"},{name:"features",number:35,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],enumType:[{name:"IdempotencyLevel",value:[{name:"IDEMPOTENCY_UNKNOWN",number:0},{name:"NO_SIDE_EFFECTS",number:1},{name:"IDEMPOTENT",number:2}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"UninterpretedOption",field:[{name:"name",number:2,type:11,label:3,typeName:".google.protobuf.UninterpretedOption.NamePart"},{name:"identifier_value",number:3,type:9,label:1},{name:"positive_int_value",number:4,type:4,label:1},{name:"negative_int_value",number:5,type:3,label:1},{name:"double_value",number:6,type:1,label:1},{name:"string_value",number:7,type:12,label:1},{name:"aggregate_value",number:8,type:9,label:1}],nestedType:[{name:"NamePart",field:[{name:"name_part",number:1,type:9,label:2},{name:"is_extension",number:2,type:8,label:2}]}]},{name:"FeatureSet",field:[{name:"field_presence",number:1,type:14,label:1,typeName:".google.protobuf.FeatureSet.FieldPresence",options:{retention:1,targets:[4,1],editionDefaults:[{value:"EXPLICIT",edition:900},{value:"IMPLICIT",edition:999},{value:"EXPLICIT",edition:1e3}]}},{name:"enum_type",number:2,type:14,label:1,typeName:".google.protobuf.FeatureSet.EnumType",options:{retention:1,targets:[6,1],editionDefaults:[{value:"CLOSED",edition:900},{value:"OPEN",edition:999}]}},{name:"repeated_field_encoding",number:3,type:14,label:1,typeName:".google.protobuf.FeatureSet.RepeatedFieldEncoding",options:{retention:1,targets:[4,1],editionDefaults:[{value:"EXPANDED",edition:900},{value:"PACKED",edition:999}]}},{name:"utf8_validation",number:4,type:14,label:1,typeName:".google.protobuf.FeatureSet.Utf8Validation",options:{retention:1,targets:[4,1],editionDefaults:[{value:"NONE",edition:900},{value:"VERIFY",edition:999}]}},{name:"message_encoding",number:5,type:14,label:1,typeName:".google.protobuf.FeatureSet.MessageEncoding",options:{retention:1,targets:[4,1],editionDefaults:[{value:"LENGTH_PREFIXED",edition:900}]}},{name:"json_format",number:6,type:14,label:1,typeName:".google.protobuf.FeatureSet.JsonFormat",options:{retention:1,targets:[3,6,1],editionDefaults:[{value:"LEGACY_BEST_EFFORT",edition:900},{value:"ALLOW",edition:999}]}},{name:"enforce_naming_style",number:7,type:14,label:1,typeName:".google.protobuf.FeatureSet.EnforceNamingStyle",options:{retention:2,targets:[1,2,3,4,5,6,7,8,9],editionDefaults:[{value:"STYLE_LEGACY",edition:900},{value:"STYLE2024",edition:1001}]}},{name:"default_symbol_visibility",number:8,type:14,label:1,typeName:".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility",options:{retention:2,targets:[1],editionDefaults:[{value:"EXPORT_ALL",edition:900},{value:"EXPORT_TOP_LEVEL",edition:1001}]}}],nestedType:[{name:"VisibilityFeature",enumType:[{name:"DefaultSymbolVisibility",value:[{name:"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",number:0},{name:"EXPORT_ALL",number:1},{name:"EXPORT_TOP_LEVEL",number:2},{name:"LOCAL_ALL",number:3},{name:"STRICT",number:4}]}]}],enumType:[{name:"FieldPresence",value:[{name:"FIELD_PRESENCE_UNKNOWN",number:0},{name:"EXPLICIT",number:1},{name:"IMPLICIT",number:2},{name:"LEGACY_REQUIRED",number:3}]},{name:"EnumType",value:[{name:"ENUM_TYPE_UNKNOWN",number:0},{name:"OPEN",number:1},{name:"CLOSED",number:2}]},{name:"RepeatedFieldEncoding",value:[{name:"REPEATED_FIELD_ENCODING_UNKNOWN",number:0},{name:"PACKED",number:1},{name:"EXPANDED",number:2}]},{name:"Utf8Validation",value:[{name:"UTF8_VALIDATION_UNKNOWN",number:0},{name:"VERIFY",number:2},{name:"NONE",number:3}]},{name:"MessageEncoding",value:[{name:"MESSAGE_ENCODING_UNKNOWN",number:0},{name:"LENGTH_PREFIXED",number:1},{name:"DELIMITED",number:2}]},{name:"JsonFormat",value:[{name:"JSON_FORMAT_UNKNOWN",number:0},{name:"ALLOW",number:1},{name:"LEGACY_BEST_EFFORT",number:2}]},{name:"EnforceNamingStyle",value:[{name:"ENFORCE_NAMING_STYLE_UNKNOWN",number:0},{name:"STYLE2024",number:1},{name:"STYLE_LEGACY",number:2}]}],extensionRange:[{start:1e3,end:9995},{start:9995,end:1e4},{start:1e4,end:10001}]},{name:"FeatureSetDefaults",field:[{name:"defaults",number:1,type:11,label:3,typeName:".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"},{name:"minimum_edition",number:4,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"maximum_edition",number:5,type:14,label:1,typeName:".google.protobuf.Edition"}],nestedType:[{name:"FeatureSetEditionDefault",field:[{name:"edition",number:3,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"overridable_features",number:4,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"fixed_features",number:5,type:11,label:1,typeName:".google.protobuf.FeatureSet"}]}]},{name:"SourceCodeInfo",field:[{name:"location",number:1,type:11,label:3,typeName:".google.protobuf.SourceCodeInfo.Location"}],nestedType:[{name:"Location",field:[{name:"path",number:1,type:5,label:3,options:{packed:!0}},{name:"span",number:2,type:5,label:3,options:{packed:!0}},{name:"leading_comments",number:3,type:9,label:1},{name:"trailing_comments",number:4,type:9,label:1},{name:"leading_detached_comments",number:6,type:9,label:3}]}],extensionRange:[{start:536e6,end:536000001}]},{name:"GeneratedCodeInfo",field:[{name:"annotation",number:1,type:11,label:3,typeName:".google.protobuf.GeneratedCodeInfo.Annotation"}],nestedType:[{name:"Annotation",field:[{name:"path",number:1,type:5,label:3,options:{packed:!0}},{name:"source_file",number:2,type:9,label:1},{name:"begin",number:3,type:5,label:1},{name:"end",number:4,type:5,label:1},{name:"semantic",number:5,type:14,label:1,typeName:".google.protobuf.GeneratedCodeInfo.Annotation.Semantic"}],enumType:[{name:"Semantic",value:[{name:"NONE",number:0},{name:"SET",number:1},{name:"ALIAS",number:2}]}]}]}],enumType:[{name:"Edition",value:[{name:"EDITION_UNKNOWN",number:0},{name:"EDITION_LEGACY",number:900},{name:"EDITION_PROTO2",number:998},{name:"EDITION_PROTO3",number:999},{name:"EDITION_2023",number:1e3},{name:"EDITION_2024",number:1001},{name:"EDITION_1_TEST_ONLY",number:1},{name:"EDITION_2_TEST_ONLY",number:2},{name:"EDITION_99997_TEST_ONLY",number:99997},{name:"EDITION_99998_TEST_ONLY",number:99998},{name:"EDITION_99999_TEST_ONLY",number:99999},{name:"EDITION_MAX",number:2147483647}]},{name:"SymbolVisibility",value:[{name:"VISIBILITY_UNSET",number:0},{name:"VISIBILITY_LOCAL",number:1},{name:"VISIBILITY_EXPORT",number:2}]}]}),hh=Ve(dh,1);var qs;(function(e){e[e.DECLARATION=0]="DECLARATION",e[e.UNVERIFIED=1]="UNVERIFIED"})(qs||(qs={}));var Qs;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.GROUP=10]="GROUP",e[e.MESSAGE=11]="MESSAGE",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.ENUM=14]="ENUM",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(Qs||(Qs={}));var en;(function(e){e[e.OPTIONAL=1]="OPTIONAL",e[e.REPEATED=3]="REPEATED",e[e.REQUIRED=2]="REQUIRED"})(en||(en={}));var tn;(function(e){e[e.SPEED=1]="SPEED",e[e.CODE_SIZE=2]="CODE_SIZE",e[e.LITE_RUNTIME=3]="LITE_RUNTIME"})(tn||(tn={}));var rn;(function(e){e[e.STRING=0]="STRING",e[e.CORD=1]="CORD",e[e.STRING_PIECE=2]="STRING_PIECE"})(rn||(rn={}));var sn;(function(e){e[e.JS_NORMAL=0]="JS_NORMAL",e[e.JS_STRING=1]="JS_STRING",e[e.JS_NUMBER=2]="JS_NUMBER"})(sn||(sn={}));var nn;(function(e){e[e.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",e[e.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",e[e.RETENTION_SOURCE=2]="RETENTION_SOURCE"})(nn||(nn={}));var on;(function(e){e[e.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",e[e.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",e[e.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",e[e.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",e[e.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",e[e.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",e[e.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",e[e.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",e[e.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",e[e.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"})(on||(on={}));var an;(function(e){e[e.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",e[e.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",e[e.IDEMPOTENT=2]="IDEMPOTENT"})(an||(an={}));var cn;(function(e){e[e.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0]="DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",e[e.EXPORT_ALL=1]="EXPORT_ALL",e[e.EXPORT_TOP_LEVEL=2]="EXPORT_TOP_LEVEL",e[e.LOCAL_ALL=3]="LOCAL_ALL",e[e.STRICT=4]="STRICT"})(cn||(cn={}));var ln;(function(e){e[e.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",e[e.EXPLICIT=1]="EXPLICIT",e[e.IMPLICIT=2]="IMPLICIT",e[e.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"})(ln||(ln={}));var dn;(function(e){e[e.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"})(dn||(dn={}));var hn;(function(e){e[e.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",e[e.PACKED=1]="PACKED",e[e.EXPANDED=2]="EXPANDED"})(hn||(hn={}));var un;(function(e){e[e.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",e[e.VERIFY=2]="VERIFY",e[e.NONE=3]="NONE"})(un||(un={}));var fn;(function(e){e[e.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",e[e.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",e[e.DELIMITED=2]="DELIMITED"})(fn||(fn={}));var gn;(function(e){e[e.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",e[e.ALLOW=1]="ALLOW",e[e.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"})(gn||(gn={}));var pn;(function(e){e[e.ENFORCE_NAMING_STYLE_UNKNOWN=0]="ENFORCE_NAMING_STYLE_UNKNOWN",e[e.STYLE2024=1]="STYLE2024",e[e.STYLE_LEGACY=2]="STYLE_LEGACY"})(pn||(pn={}));var _n;(function(e){e[e.NONE=0]="NONE",e[e.SET=1]="SET",e[e.ALIAS=2]="ALIAS"})(_n||(_n={}));var vn;(function(e){e[e.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",e[e.EDITION_LEGACY=900]="EDITION_LEGACY",e[e.EDITION_PROTO2=998]="EDITION_PROTO2",e[e.EDITION_PROTO3=999]="EDITION_PROTO3",e[e.EDITION_2023=1e3]="EDITION_2023",e[e.EDITION_2024=1001]="EDITION_2024",e[e.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",e[e.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",e[e.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",e[e.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",e[e.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",e[e.EDITION_MAX=2147483647]="EDITION_MAX"})(vn||(vn={}));var mn;(function(e){e[e.VISIBILITY_UNSET=0]="VISIBILITY_UNSET",e[e.VISIBILITY_LOCAL=1]="VISIBILITY_LOCAL",e[e.VISIBILITY_EXPORT=2]="VISIBILITY_EXPORT"})(mn||(mn={}));const bn={readUnknownFields:!0};function uh(e){return e?Object.assign(Object.assign({},bn),e):bn}function ha(e,t,r){const s=Oe(e,void 0,!1);return ua(s,new zi(t),uh(r),!1,t.byteLength),s.message}function ua(e,t,r,s,a){var m;const v=s?t.len:t.pos+a;let i,c;const u=(m=e.getUnknown())!==null&&m!==void 0?m:[];for(;t.pos<v&&([i,c]=t.tag(),!(s&&c==pe.EndGroup));){const f=e.findNumber(i);if(!f){const h=t.skip(c,i);r.readUnknownFields&&u.push({no:i,wireType:c,data:h});continue}fa(e,t,f,c,r)}if(s&&(c!=pe.EndGroup||i!==a))throw new Error("invalid end group tag");u.length>0&&e.setUnknown(u)}function fa(e,t,r,s,a){var m;switch(r.fieldKind){case"scalar":e.set(r,Et(t,r.scalar));break;case"enum":const v=Et(t,M.INT32);if(r.enum.open)e.set(r,v);else if(r.enum.values.some(c=>c.number===v))e.set(r,v);else if(a.readUnknownFields){const c=[];vi(v,c);const u=(m=e.getUnknown())!==null&&m!==void 0?m:[];u.push({no:r.number,wireType:s,data:new Uint8Array(c)}),e.setUnknown(u)}break;case"message":e.set(r,ts(t,a,r,e.get(r)));break;case"list":gh(t,s,e.get(r),a);break;case"map":fh(t,e.get(r),a);break}}function fh(e,t,r){const s=t.field();let a,m;const v=e.uint32(),i=e.pos+v;for(;e.pos<i;){const[c]=e.tag();switch(c){case 1:a=Et(e,s.mapKey);break;case 2:switch(s.mapKind){case"scalar":m=Et(e,s.scalar);break;case"enum":m=e.int32();break;case"message":m=ts(e,r,s);break}break}}if(a===void 0&&(a=ut(s.mapKey,!1)),m===void 0)switch(s.mapKind){case"scalar":m=ut(s.scalar,!1);break;case"enum":m=s.enum.values[0].number;break;case"message":m=Oe(s.message,void 0,!1);break}t.set(a,m)}function gh(e,t,r,s){var a;const m=r.field();if(m.listKind==="message"){r.add(ts(e,s,m));return}const v=(a=m.scalar)!==null&&a!==void 0?a:M.INT32;if(!(t==pe.LengthDelimited&&v!=M.STRING&&v!=M.BYTES)){r.add(Et(e,v));return}const c=e.uint32()+e.pos;for(;e.pos<c;)r.add(Et(e,v))}function ts(e,t,r,s){const a=r.delimitedEncoding,m=s??Oe(r.message,void 0,!1);return ua(m,e,t,a,a?r.number:e.uint32()),m}function Et(e,t){switch(t){case M.STRING:return e.string();case M.BOOL:return e.bool();case M.DOUBLE:return e.double();case M.FLOAT:return e.float();case M.INT32:return e.int32();case M.INT64:return e.int64();case M.UINT64:return e.uint64();case M.FIXED64:return e.fixed64();case M.BYTES:return e.bytes();case M.FIXED32:return e.fixed32();case M.SFIXED32:return e.sfixed32();case M.SFIXED64:return e.sfixed64();case M.SINT64:return e.sint64();case M.UINT32:return e.uint32();case M.SINT32:return e.sint32()}}function rt(e,t){var r;const s=ha(hh,Wo(e));return s.messageType.forEach(Vi),s.dependency=(r=t==null?void 0:t.map(m=>m.proto.name))!==null&&r!==void 0?r:[],Fo(s,m=>t==null?void 0:t.find(v=>v.proto.name===m)).getFile(s.name)}const rs=rt("ChxydW5tZS9ydW5uZXIvdjIvY29uZmlnLnByb3RvEg9ydW5tZS5ydW5uZXIudjIiigMKDVByb2dyYW1Db25maWcSFAoMcHJvZ3JhbV9uYW1lGAEgASgJEhEKCWFyZ3VtZW50cxgCIAMoCRIRCglkaXJlY3RvcnkYAyABKAkSEwoLbGFuZ3VhZ2VfaWQYBCABKAkSEgoKYmFja2dyb3VuZBgFIAEoCBIWCg5maWxlX2V4dGVuc2lvbhgGIAEoCRILCgNlbnYYByADKAkSPgoIY29tbWFuZHMYCCABKAsyKi5ydW5tZS5ydW5uZXIudjIuUHJvZ3JhbUNvbmZpZy5Db21tYW5kTGlzdEgAEhAKBnNjcmlwdBgJIAEoCUgAEhMKC2ludGVyYWN0aXZlGAogASgIEioKBG1vZGUYCyABKA4yHC5ydW5tZS5ydW5uZXIudjIuQ29tbWFuZE1vZGUSEAoIa25vd25faWQYDCABKAkSEgoKa25vd25fbmFtZRgNIAEoCRIOCgZydW5faWQYDiABKAkaHAoLQ29tbWFuZExpc3QSDQoFaXRlbXMYASADKAlCCAoGc291cmNlKowBCgtDb21tYW5kTW9kZRIcChhDT01NQU5EX01PREVfVU5TUEVDSUZJRUQQABIXChNDT01NQU5EX01PREVfSU5MSU5FEAESFQoRQ09NTUFORF9NT0RFX0ZJTEUQAhIZChVDT01NQU5EX01PREVfVEVSTUlOQUwQAxIUChBDT01NQU5EX01PREVfQ0xJEARCSFpGZ2l0aHViLmNvbS9ydW5tZWRldi9ydW5tZS92My9hcGkvZ2VuL3Byb3RvL2dvL3J1bm1lL3J1bm5lci92MjtydW5uZXJ2MmIGcHJvdG8z"),Sn=Ve(rs,0,0),ph=Dr(rs,0),ai=Or(ph),_h=rt("Chlnb29nbGUvcHJvdG9idWYvYW55LnByb3RvEg9nb29nbGUucHJvdG9idWYiJgoDQW55EhAKCHR5cGVfdXJsGAEgASgJEg0KBXZhbHVlGAIgASgMQnYKE2NvbS5nb29nbGUucHJvdG9idWZCCEFueVByb3RvUAFaLGdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL2FueXBiogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM"),vh=Ve(_h,0);function mh(e,t,r){let s=!1;return r||(r=me(vh),s=!0),r.value=oh(e,t),r.typeUrl=yh(t.$typeName),s?r:void 0}function bh(e,t){if(e.typeUrl==="")return!1;const r=typeof t=="string"?t:t.typeName,s=ga(e.typeUrl);return r===s}function Sh(e,t){if(e.typeUrl==="")return;const r=t.kind=="message"?t:t.getMessage(ga(e.typeUrl));if(!(!r||!bh(e,r)))return ha(r,e.value)}function yh(e){return`type.googleapis.com/${e}`}function ga(e){const t=e.lastIndexOf("/"),r=t>=0?e.substring(t+1):e;if(!r.length)throw new Error(`invalid type url: ${e}`);return r}const is=rt("Chxnb29nbGUvcHJvdG9idWYvc3RydWN0LnByb3RvEg9nb29nbGUucHJvdG9idWYihAEKBlN0cnVjdBIzCgZmaWVsZHMYASADKAsyIy5nb29nbGUucHJvdG9idWYuU3RydWN0LkZpZWxkc0VudHJ5GkUKC0ZpZWxkc0VudHJ5EgsKA2tleRgBIAEoCRIlCgV2YWx1ZRgCIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZToCOAEi6gEKBVZhbHVlEjAKCm51bGxfdmFsdWUYASABKA4yGi5nb29nbGUucHJvdG9idWYuTnVsbFZhbHVlSAASFgoMbnVtYmVyX3ZhbHVlGAIgASgBSAASFgoMc3RyaW5nX3ZhbHVlGAMgASgJSAASFAoKYm9vbF92YWx1ZRgEIAEoCEgAEi8KDHN0cnVjdF92YWx1ZRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3RIABIwCgpsaXN0X3ZhbHVlGAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RWYWx1ZUgAQgYKBGtpbmQiMwoJTGlzdFZhbHVlEiYKBnZhbHVlcxgBIAMoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZSobCglOdWxsVmFsdWUSDgoKTlVMTF9WQUxVRRAAQn8KE2NvbS5nb29nbGUucHJvdG9idWZCC1N0cnVjdFByb3RvUAFaL2dvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3N0cnVjdHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM"),Ch=Ve(is,0),pa=Ve(is,1),wh=Ve(is,2);var Ci;(function(e){e[e.NULL_VALUE=0]="NULL_VALUE"})(Ci||(Ci={}));const Eh=rt("Ch5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiIcCgtEb3VibGVWYWx1ZRINCgV2YWx1ZRgBIAEoASIbCgpGbG9hdFZhbHVlEg0KBXZhbHVlGAEgASgCIhsKCkludDY0VmFsdWUSDQoFdmFsdWUYASABKAMiHAoLVUludDY0VmFsdWUSDQoFdmFsdWUYASABKAQiGwoKSW50MzJWYWx1ZRINCgV2YWx1ZRgBIAEoBSIcCgtVSW50MzJWYWx1ZRINCgV2YWx1ZRgBIAEoDSIaCglCb29sVmFsdWUSDQoFdmFsdWUYASABKAgiHAoLU3RyaW5nVmFsdWUSDQoFdmFsdWUYASABKAkiGwoKQnl0ZXNWYWx1ZRINCgV2YWx1ZRgBIAEoDEKDAQoTY29tLmdvb2dsZS5wcm90b2J1ZkINV3JhcHBlcnNQcm90b1ABWjFnb29nbGUuZ29sYW5nLm9yZy9wcm90b2J1Zi90eXBlcy9rbm93bi93cmFwcGVyc3Bi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90bzM"),ir=rt("ChxydW5tZS9ydW5uZXIvdjIvcnVubmVyLnByb3RvEg9ydW5tZS5ydW5uZXIudjIiLwoHUHJvamVjdBIMCgRyb290GAEgASgJEhYKDmVudl9sb2FkX29yZGVyGAIgAygJIo0BCgdTZXNzaW9uEgoKAmlkGAEgASgJEgsKA2VudhgCIAMoCRI4CghtZXRhZGF0YRgDIAMoCzImLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uLk1ldGFkYXRhRW50cnkaLwoNTWV0YWRhdGFFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIrIFChRDcmVhdGVTZXNzaW9uUmVxdWVzdBJFCghtZXRhZGF0YRgBIAMoCzIzLnJ1bm1lLnJ1bm5lci52Mi5DcmVhdGVTZXNzaW9uUmVxdWVzdC5NZXRhZGF0YUVudHJ5EgsKA2VudhgCIAMoCRIuCgdwcm9qZWN0GAMgASgLMhgucnVubWUucnVubmVyLnYyLlByb2plY3RIAIgBARJBCg5lbnZfc3RvcmVfdHlwZRgEIAEoDjIkLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uRW52U3RvcmVUeXBlSAGIAQESPAoGY29uZmlnGAUgASgLMiwucnVubWUucnVubmVyLnYyLkNyZWF0ZVNlc3Npb25SZXF1ZXN0LkNvbmZpZxovCg1NZXRhZGF0YUVudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaxAIKBkNvbmZpZxJBCg5lbnZfc3RvcmVfdHlwZRgBIAEoDjIkLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uRW52U3RvcmVUeXBlSACIAQESYwoRZW52X3N0b3JlX3NlZWRpbmcYAiABKA4yQy5ydW5tZS5ydW5uZXIudjIuQ3JlYXRlU2Vzc2lvblJlcXVlc3QuQ29uZmlnLlNlc3Npb25FbnZTdG9yZVNlZWRpbmdIAYgBASJpChZTZXNzaW9uRW52U3RvcmVTZWVkaW5nEikKJVNFU1NJT05fRU5WX1NUT1JFX1NFRURJTkdfVU5TUEVDSUZJRUQQABIkCiBTRVNTSU9OX0VOVl9TVE9SRV9TRUVESU5HX1NZU1RFTRABQhEKD19lbnZfc3RvcmVfdHlwZUIUChJfZW52X3N0b3JlX3NlZWRpbmdCCgoIX3Byb2plY3RCEQoPX2Vudl9zdG9yZV90eXBlIkIKFUNyZWF0ZVNlc3Npb25SZXNwb25zZRIpCgdzZXNzaW9uGAEgASgLMhgucnVubWUucnVubmVyLnYyLlNlc3Npb24iHwoRR2V0U2Vzc2lvblJlcXVlc3QSCgoCaWQYASABKAkiPwoSR2V0U2Vzc2lvblJlc3BvbnNlEikKB3Nlc3Npb24YASABKAsyGC5ydW5tZS5ydW5uZXIudjIuU2Vzc2lvbiIVChNMaXN0U2Vzc2lvbnNSZXF1ZXN0IkIKFExpc3RTZXNzaW9uc1Jlc3BvbnNlEioKCHNlc3Npb25zGAEgAygLMhgucnVubWUucnVubmVyLnYyLlNlc3Npb24i4wEKFFVwZGF0ZVNlc3Npb25SZXF1ZXN0EgoKAmlkGAEgASgJEkUKCG1ldGFkYXRhGAIgAygLMjMucnVubWUucnVubmVyLnYyLlVwZGF0ZVNlc3Npb25SZXF1ZXN0Lk1ldGFkYXRhRW50cnkSCwoDZW52GAMgAygJEi4KB3Byb2plY3QYBCABKAsyGC5ydW5tZS5ydW5uZXIudjIuUHJvamVjdEgAiAEBGi8KDU1ldGFkYXRhRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4AUIKCghfcHJvamVjdCJCChVVcGRhdGVTZXNzaW9uUmVzcG9uc2USKQoHc2Vzc2lvbhgBIAEoCzIYLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uIiIKFERlbGV0ZVNlc3Npb25SZXF1ZXN0EgoKAmlkGAEgASgJIhcKFURlbGV0ZVNlc3Npb25SZXNwb25zZSI7CgdXaW5zaXplEgwKBHJvd3MYASABKA0SDAoEY29scxgCIAEoDRIJCgF4GAMgASgNEgkKAXkYBCABKA0i5QIKDkV4ZWN1dGVSZXF1ZXN0Ei4KBmNvbmZpZxgBIAEoCzIeLnJ1bm1lLnJ1bm5lci52Mi5Qcm9ncmFtQ29uZmlnEhIKCmlucHV0X2RhdGEYCCABKAwSKgoEc3RvcBgJIAEoDjIcLnJ1bm1lLnJ1bm5lci52Mi5FeGVjdXRlU3RvcBIuCgd3aW5zaXplGAogASgLMhgucnVubWUucnVubmVyLnYyLldpbnNpemVIAIgBARISCgpzZXNzaW9uX2lkGBQgASgJEjoKEHNlc3Npb25fc3RyYXRlZ3kYFSABKA4yIC5ydW5tZS5ydW5uZXIudjIuU2Vzc2lvblN0cmF0ZWd5Ei4KB3Byb2plY3QYFiABKAsyGC5ydW5tZS5ydW5uZXIudjIuUHJvamVjdEgBiAEBEhsKE3N0b3JlX3N0ZG91dF9pbl9lbnYYFyABKAhCCgoIX3dpbnNpemVCCgoIX3Byb2plY3QiqgEKD0V4ZWN1dGVSZXNwb25zZRIvCglleGl0X2NvZGUYASABKAsyHC5nb29nbGUucHJvdG9idWYuVUludDMyVmFsdWUSEwoLc3Rkb3V0X2RhdGEYAiABKAwSEwoLc3RkZXJyX2RhdGEYAyABKAwSKQoDcGlkGAQgASgLMhwuZ29vZ2xlLnByb3RvYnVmLlVJbnQzMlZhbHVlEhEKCW1pbWVfdHlwZRgFIAEoCSIqChlSZXNvbHZlUHJvZ3JhbUNvbW1hbmRMaXN0Eg0KBWxpbmVzGAEgAygJIsAEChVSZXNvbHZlUHJvZ3JhbVJlcXVlc3QSPgoIY29tbWFuZHMYASABKAsyKi5ydW5tZS5ydW5uZXIudjIuUmVzb2x2ZVByb2dyYW1Db21tYW5kTGlzdEgAEhAKBnNjcmlwdBgCIAEoCUgAEjkKBG1vZGUYAyABKA4yKy5ydW5tZS5ydW5uZXIudjIuUmVzb2x2ZVByb2dyYW1SZXF1ZXN0Lk1vZGUSCwoDZW52GAQgAygJEhIKCnNlc3Npb25faWQYBSABKAkSOgoQc2Vzc2lvbl9zdHJhdGVneRgGIAEoDjIgLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uU3RyYXRlZ3kSLgoHcHJvamVjdBgHIAEoCzIYLnJ1bm1lLnJ1bm5lci52Mi5Qcm9qZWN0SAGIAQESEwoLbGFuZ3VhZ2VfaWQYCCABKAkSQwoJcmV0ZW50aW9uGAkgASgOMjAucnVubWUucnVubmVyLnYyLlJlc29sdmVQcm9ncmFtUmVxdWVzdC5SZXRlbnRpb24iRAoETW9kZRIUChBNT0RFX1VOU1BFQ0lGSUVEEAASEwoPTU9ERV9QUk9NUFRfQUxMEAESEQoNTU9ERV9TS0lQX0FMTBACIlcKCVJldGVudGlvbhIZChVSRVRFTlRJT05fVU5TUEVDSUZJRUQQABIXChNSRVRFTlRJT05fRklSU1RfUlVOEAESFgoSUkVURU5USU9OX0xBU1RfUlVOEAJCCAoGc291cmNlQgoKCF9wcm9qZWN0ItoDChZSZXNvbHZlUHJvZ3JhbVJlc3BvbnNlEg4KBnNjcmlwdBgBIAEoCRI8Cghjb21tYW5kcxgCIAEoCzIqLnJ1bm1lLnJ1bm5lci52Mi5SZXNvbHZlUHJvZ3JhbUNvbW1hbmRMaXN0Ej8KBHZhcnMYAyADKAsyMS5ydW5tZS5ydW5uZXIudjIuUmVzb2x2ZVByb2dyYW1SZXNwb25zZS5WYXJSZXN1bHQaiQEKCVZhclJlc3VsdBI+CgZzdGF0dXMYASABKA4yLi5ydW5tZS5ydW5uZXIudjIuUmVzb2x2ZVByb2dyYW1SZXNwb25zZS5TdGF0dXMSDAoEbmFtZRgCIAEoCRIWCg5vcmlnaW5hbF92YWx1ZRgDIAEoCRIWCg5yZXNvbHZlZF92YWx1ZRgEIAEoCSKkAQoGU3RhdHVzEhYKElNUQVRVU19VTlNQRUNJRklFRBAAEhMKD1NUQVRVU19SRVNPTFZFRBABEiIKHlNUQVRVU19VTlJFU09MVkVEX1dJVEhfTUVTU0FHRRACEiYKIlNUQVRVU19VTlJFU09MVkVEX1dJVEhfUExBQ0VIT0xERVIQAxIhCh1TVEFUVVNfVU5SRVNPTFZFRF9XSVRIX1NFQ1JFVBAEIkMKFk1vbml0b3JFbnZTdG9yZVJlcXVlc3QSKQoHc2Vzc2lvbhgBIAEoCzIYLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uIsIECh9Nb25pdG9yRW52U3RvcmVSZXNwb25zZVNuYXBzaG90EkoKBGVudnMYASADKAsyPC5ydW5tZS5ydW5uZXIudjIuTW9uaXRvckVudlN0b3JlUmVzcG9uc2VTbmFwc2hvdC5TbmFwc2hvdEVudhrOAgoLU25hcHNob3RFbnYSRwoGc3RhdHVzGAEgASgOMjcucnVubWUucnVubmVyLnYyLk1vbml0b3JFbnZTdG9yZVJlc3BvbnNlU25hcHNob3QuU3RhdHVzEgwKBG5hbWUYAiABKAkSEwoLZGVzY3JpcHRpb24YAyABKAkSDAoEc3BlYxgEIAEoCRITCgtpc19yZXF1aXJlZBgFIAEoCBIOCgZvcmlnaW4YBiABKAkSFgoOb3JpZ2luYWxfdmFsdWUYByABKAkSFgoOcmVzb2x2ZWRfdmFsdWUYCCABKAkSEwoLY3JlYXRlX3RpbWUYCSABKAkSEwoLdXBkYXRlX3RpbWUYCiABKAkSRgoGZXJyb3JzGAsgAygLMjYucnVubWUucnVubmVyLnYyLk1vbml0b3JFbnZTdG9yZVJlc3BvbnNlU25hcHNob3QuRXJyb3IaJgoFRXJyb3ISDAoEY29kZRgBIAEoDRIPCgdtZXNzYWdlGAIgASgJIloKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABISCg5TVEFUVVNfTElURVJBTBABEhEKDVNUQVRVU19ISURERU4QAhIRCg1TVEFUVVNfTUFTS0VEEAMimwEKF01vbml0b3JFbnZTdG9yZVJlc3BvbnNlEjIKBHR5cGUYASABKA4yJC5ydW5tZS5ydW5uZXIudjIuTW9uaXRvckVudlN0b3JlVHlwZRJECghzbmFwc2hvdBgCIAEoCzIwLnJ1bm1lLnJ1bm5lci52Mi5Nb25pdG9yRW52U3RvcmVSZXNwb25zZVNuYXBzaG90SABCBgoEZGF0YSpdChNTZXNzaW9uRW52U3RvcmVUeXBlEiYKIlNFU1NJT05fRU5WX1NUT1JFX1RZUEVfVU5TUEVDSUZJRUQQABIeChpTRVNTSU9OX0VOVl9TVE9SRV9UWVBFX09XTBABKl4KC0V4ZWN1dGVTdG9wEhwKGEVYRUNVVEVfU1RPUF9VTlNQRUNJRklFRBAAEhoKFkVYRUNVVEVfU1RPUF9JTlRFUlJVUFQQARIVChFFWEVDVVRFX1NUT1BfS0lMTBACKlUKD1Nlc3Npb25TdHJhdGVneRIgChxTRVNTSU9OX1NUUkFURUdZX1VOU1BFQ0lGSUVEEAASIAocU0VTU0lPTl9TVFJBVEVHWV9NT1NUX1JFQ0VOVBABKmIKE01vbml0b3JFbnZTdG9yZVR5cGUSJgoiTU9OSVRPUl9FTlZfU1RPUkVfVFlQRV9VTlNQRUNJRklFRBAAEiMKH01PTklUT1JfRU5WX1NUT1JFX1RZUEVfU05BUFNIT1QQATKQBgoNUnVubmVyU2VydmljZRJgCg1DcmVhdGVTZXNzaW9uEiUucnVubWUucnVubmVyLnYyLkNyZWF0ZVNlc3Npb25SZXF1ZXN0GiYucnVubWUucnVubmVyLnYyLkNyZWF0ZVNlc3Npb25SZXNwb25zZSIAElcKCkdldFNlc3Npb24SIi5ydW5tZS5ydW5uZXIudjIuR2V0U2Vzc2lvblJlcXVlc3QaIy5ydW5tZS5ydW5uZXIudjIuR2V0U2Vzc2lvblJlc3BvbnNlIgASXQoMTGlzdFNlc3Npb25zEiQucnVubWUucnVubmVyLnYyLkxpc3RTZXNzaW9uc1JlcXVlc3QaJS5ydW5tZS5ydW5uZXIudjIuTGlzdFNlc3Npb25zUmVzcG9uc2UiABJgCg1VcGRhdGVTZXNzaW9uEiUucnVubWUucnVubmVyLnYyLlVwZGF0ZVNlc3Npb25SZXF1ZXN0GiYucnVubWUucnVubmVyLnYyLlVwZGF0ZVNlc3Npb25SZXNwb25zZSIAEmAKDURlbGV0ZVNlc3Npb24SJS5ydW5tZS5ydW5uZXIudjIuRGVsZXRlU2Vzc2lvblJlcXVlc3QaJi5ydW5tZS5ydW5uZXIudjIuRGVsZXRlU2Vzc2lvblJlc3BvbnNlIgASaAoPTW9uaXRvckVudlN0b3JlEicucnVubWUucnVubmVyLnYyLk1vbml0b3JFbnZTdG9yZVJlcXVlc3QaKC5ydW5tZS5ydW5uZXIudjIuTW9uaXRvckVudlN0b3JlUmVzcG9uc2UiADABElIKB0V4ZWN1dGUSHy5ydW5tZS5ydW5uZXIudjIuRXhlY3V0ZVJlcXVlc3QaIC5ydW5tZS5ydW5uZXIudjIuRXhlY3V0ZVJlc3BvbnNlIgAoATABEmMKDlJlc29sdmVQcm9ncmFtEiYucnVubWUucnVubmVyLnYyLlJlc29sdmVQcm9ncmFtUmVxdWVzdBonLnJ1bm1lLnJ1bm5lci52Mi5SZXNvbHZlUHJvZ3JhbVJlc3BvbnNlIgBCSFpGZ2l0aHViLmNvbS9ydW5tZWRldi9ydW5tZS92My9hcGkvZ2VuL3Byb3RvL2dvL3J1bm1lL3J1bm5lci92MjtydW5uZXJ2MmIGcHJvdG8z",[Eh,rs]),_a=Ve(ir,12),wi=Ve(ir,13),kh=Dr(ir,19,0),$e=Or(kh),Ih=Dr(ir,2),Bh=Or(Ih);function Ah(e,t){va(t,e);const r=xh(e.$unknown,t),[s,a,m]=Nr(t);for(const v of r)fa(s,new zi(v.data),a,v.wireType,{readUnknownFields:!0});return m()}function Rh(e,t,r){var s;va(t,e);const a=((s=e.$unknown)!==null&&s!==void 0?s:[]).filter(u=>u.no!==t.number),[m,v]=Nr(t,r),i=new Xo;ca(i,{writeUnknownFields:!0},m,v);const c=new zi(i.finish());for(;c.pos<c.len;){const[u,f]=c.tag(),h=c.skip(f,u);a.push({no:u,wireType:f,data:h})}e.$unknown=a}function xh(e,t){if(e===void 0)return[];if(t.fieldKind==="enum"||t.fieldKind==="scalar"){for(let r=e.length-1;r>=0;--r)if(e[r].no==t.number)return[e[r]];return[]}return e.filter(r=>r.no===t.number)}function Nr(e,t){const r=e.typeName,s=Object.assign(Object.assign({},e),{kind:"field",parent:e.extendee,localName:r}),a=Object.assign(Object.assign({},e.extendee),{fields:[s],members:[s],oneofs:[]}),m=me(a,t!==void 0?{[r]:t}:void 0);return[Oe(a,m),s,()=>{const v=m[r];if(v===void 0){const i=e.message;return rr(i)?ut(i.fields[0].scalar,i.fields[0].longAsString):me(i)}return v}]}function va(e,t){if(e.extendee.typeName!=t.$typeName)throw new Error(`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}const Lh=3,Th=2,yn={alwaysEmitImplicit:!1,enumAsInteger:!1,useProtoFieldName:!1};function Dh(e){return e?Object.assign(Object.assign({},yn),e):yn}function Oh(e,t,r){return sr(Oe(e,t),Dh(r))}function sr(e,t){var r;const s=Ph(e,t);if(s!==void 0)return s;const a={};for(const m of e.sortedFields){if(!e.isSet(m)){if(m.presence==Lh)throw new Error(`cannot encode ${m} to JSON: required field not set`);if(!t.alwaysEmitImplicit||m.presence!==Th)continue}const v=Cn(m,e.get(m),t);v!==void 0&&(a[Fh(m,t)]=v)}if(t.registry){const m=new Set;for(const{no:v}of(r=e.getUnknown())!==null&&r!==void 0?r:[])if(!m.has(v)){m.add(v);const i=t.registry.getExtensionFor(e.desc,v);if(!i)continue;const c=Ah(e.message,i),[u,f]=Nr(i,c),h=Cn(f,u.get(f),t);h!==void 0&&(a[i.jsonName]=h)}}return a}function Cn(e,t,r){switch(e.fieldKind){case"scalar":return Mr(e,t);case"message":return sr(t,r);case"enum":return ss(e.enum,t,r.enumAsInteger);case"list":return Mh(t,r);case"map":return Nh(t,r)}}function Nh(e,t){const r=e.field(),s={};switch(r.mapKind){case"scalar":for(const[a,m]of e)s[a]=Mr(r,m);break;case"message":for(const[a,m]of e)s[a]=sr(m,t);break;case"enum":for(const[a,m]of e)s[a]=ss(r.enum,m,t.enumAsInteger);break}return t.alwaysEmitImplicit||e.size>0?s:void 0}function Mh(e,t){const r=e.field(),s=[];switch(r.listKind){case"scalar":for(const a of e)s.push(Mr(r,a));break;case"enum":for(const a of e)s.push(ss(r.enum,a,t.enumAsInteger));break;case"message":for(const a of e)s.push(sr(a,t));break}return t.alwaysEmitImplicit||s.length>0?s:void 0}function ss(e,t,r){var s;if(typeof t!="number")throw new Error(`cannot encode ${e} to JSON: expected number, got ${be(t)}`);if(e.typeName=="google.protobuf.NullValue")return null;if(r)return t;const a=e.value[t];return(s=a==null?void 0:a.name)!==null&&s!==void 0?s:t}function Mr(e,t){var r,s,a,m,v,i;switch(e.scalar){case M.INT32:case M.SFIXED32:case M.SINT32:case M.FIXED32:case M.UINT32:if(typeof t!="number")throw new Error(`cannot encode ${e} to JSON: ${(r=nt(e,t))===null||r===void 0?void 0:r.message}`);return t;case M.FLOAT:case M.DOUBLE:if(typeof t!="number")throw new Error(`cannot encode ${e} to JSON: ${(s=nt(e,t))===null||s===void 0?void 0:s.message}`);return Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case M.STRING:if(typeof t!="string")throw new Error(`cannot encode ${e} to JSON: ${(a=nt(e,t))===null||a===void 0?void 0:a.message}`);return t;case M.BOOL:if(typeof t!="boolean")throw new Error(`cannot encode ${e} to JSON: ${(m=nt(e,t))===null||m===void 0?void 0:m.message}`);return t;case M.UINT64:case M.FIXED64:case M.INT64:case M.SFIXED64:case M.SINT64:if(typeof t!="bigint"&&typeof t!="string")throw new Error(`cannot encode ${e} to JSON: ${(v=nt(e,t))===null||v===void 0?void 0:v.message}`);return t.toString();case M.BYTES:if(t instanceof Uint8Array)return Ud(t);throw new Error(`cannot encode ${e} to JSON: ${(i=nt(e,t))===null||i===void 0?void 0:i.message}`)}}function Fh(e,t){return t.useProtoFieldName?e.name:e.jsonName}function Ph(e,t){if(e.desc.typeName.startsWith("google.protobuf."))switch(e.desc.typeName){case"google.protobuf.Any":return Uh(e.message,t);case"google.protobuf.Timestamp":return $h(e.message);case"google.protobuf.Duration":return Vh(e.message);case"google.protobuf.FieldMask":return Hh(e.message);case"google.protobuf.Struct":return ma(e.message);case"google.protobuf.Value":return ns(e.message);case"google.protobuf.ListValue":return ba(e.message);default:if(rr(e.desc)){const r=e.desc.fields[0];return Mr(r,e.get(r))}return}}function Uh(e,t){if(e.typeUrl==="")return{};const{registry:r}=t;let s,a;if(r&&(s=Sh(e,r),s&&(a=r.getMessage(s.$typeName))),!a||!s)throw new Error(`cannot encode message ${e.$typeName} to JSON: "${e.typeUrl}" is not in the type registry`);let m=sr(Oe(a,s),t);return(a.typeName.startsWith("google.protobuf.")||m===null||Array.isArray(m)||typeof m!="object")&&(m={value:m}),m["@type"]=e.typeUrl,m}function Vh(e){if(Number(e.seconds)>315576e6||Number(e.seconds)<-315576e6)throw new Error(`cannot encode message ${e.$typeName} to JSON: value out of range`);let t=e.seconds.toString();if(e.nanos!==0){let r=Math.abs(e.nanos).toString();r="0".repeat(9-r.length)+r,r.substring(3)==="000000"?r=r.substring(0,3):r.substring(6)==="000"&&(r=r.substring(0,6)),t+="."+r,e.nanos<0&&Number(e.seconds)==0&&(t="-"+t)}return t+"s"}function Hh(e){return e.paths.map(t=>{if(t.match(/_[0-9]?_/g)||t.match(/[A-Z]/g))throw new Error(`cannot encode message ${e.$typeName} to JSON: lowerCamelCase of path name "`+t+'" is irreversible');return zt(t)}).join(",")}function ma(e){const t={};for(const[r,s]of Object.entries(e.fields))t[r]=ns(s);return t}function ns(e){switch(e.kind.case){case"nullValue":return null;case"numberValue":if(!Number.isFinite(e.kind.value))throw new Error(`${e.$typeName} cannot be NaN or Infinity`);return e.kind.value;case"boolValue":return e.kind.value;case"stringValue":return e.kind.value;case"structValue":return ma(e.kind.value);case"listValue":return ba(e.kind.value);default:throw new Error(`${e.$typeName} must have a value`)}}function ba(e){return e.values.map(ns)}function $h(e){const t=Number(e.seconds)*1e3;if(t<Date.parse("0001-01-01T00:00:00Z")||t>Date.parse("9999-12-31T23:59:59Z"))throw new Error(`cannot encode message ${e.$typeName} to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);if(e.nanos<0)throw new Error(`cannot encode message ${e.$typeName} to JSON: nanos must not be negative`);let r="Z";if(e.nanos>0){const s=(e.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?r="."+s.substring(0,3)+"Z":s.substring(6)==="000"?r="."+s.substring(0,6)+"Z":r="."+s+"Z"}return new Date(t).toISOString().replace(".000Z",r)}const wn={ignoreUnknownFields:!1};function Wh(e){return e?Object.assign(Object.assign({},wn),e):wn}function Gh(e,t,r){const s=Oe(e);try{kt(s,t,Wh(r))}catch(a){throw $d(a)?new Error(`cannot decode ${a.field()} from JSON: ${a.message}`,{cause:a}):a}return s.message}function kt(e,t,r){var s;if(Jh(e,t,r))return;if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode ${e.desc} from JSON: ${be(t)}`);const a=new Map,m=new Map;for(const v of e.desc.fields)m.set(v.name,v).set(v.jsonName,v);for(const[v,i]of Object.entries(t)){const c=m.get(v);if(c){if(c.oneof){if(i===null&&c.fieldKind=="scalar")continue;const u=a.get(c.oneof);if(u!==void 0)throw new Be(c.oneof,`oneof set multiple times by ${u.name} and ${c.name}`);a.set(c.oneof,c)}En(e,c,i,r)}else{let u;if(v.startsWith("[")&&v.endsWith("]")&&(u=(s=r.registry)===null||s===void 0?void 0:s.getExtension(v.substring(1,v.length-1)))&&u.extendee.typeName===e.desc.typeName){const[f,h,_]=Nr(u);En(f,h,i,r),Rh(e.message,u,_())}if(!u&&!r.ignoreUnknownFields)throw new Error(`cannot decode ${e.desc} from JSON: key "${v}" is unknown`)}}}function En(e,t,r,s){switch(t.fieldKind){case"scalar":jh(e,t,r);break;case"enum":Yh(e,t,r,s);break;case"message":zh(e,t,r,s);break;case"list":Zh(e.get(t),r,s);break;case"map":Kh(e.get(t),r,s);break}}function Kh(e,t,r){if(t===null)return;const s=e.field();if(typeof t!="object"||Array.isArray(t))throw new Be(s,"expected object, got "+be(t));for(const[a,m]of Object.entries(t)){if(m===null)throw new Be(s,"map value must not be null");let v;switch(s.mapKind){case"message":const c=Oe(s.message);kt(c,m,r),v=c;break;case"enum":if(v=os(s.enum,m,r.ignoreUnknownFields,!0),v===Fr)return;break;case"scalar":v=Ur(s,m,!0);break}const i=Xh(s.mapKey,a);e.set(i,v)}}function Zh(e,t,r){if(t===null)return;const s=e.field();if(!Array.isArray(t))throw new Be(s,"expected Array, got "+be(t));for(const a of t){if(a===null)throw new Be(s,"list item must not be null");switch(s.listKind){case"message":const m=Oe(s.message);kt(m,a,r),e.add(m);break;case"enum":const v=os(s.enum,a,r.ignoreUnknownFields,!0);v!==Fr&&e.add(v);break;case"scalar":e.add(Ur(s,a,!0));break}}}function zh(e,t,r,s){if(r===null&&t.message.typeName!="google.protobuf.Value"){e.clear(t);return}const a=e.isSet(t)?e.get(t):Oe(t.message);kt(a,r,s),e.set(t,a)}function Yh(e,t,r,s){const a=os(t.enum,r,s.ignoreUnknownFields,!1);a===Pr?e.clear(t):a!==Fr&&e.set(t,a)}function jh(e,t,r){const s=Ur(t,r,!1);s===Pr?e.clear(t):e.set(t,s)}const Fr=Symbol();function os(e,t,r,s){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:s?e.values[0].number:Pr;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":const a=e.values.find(m=>m.name===t);if(a!==void 0)return a.number;if(r)return Fr;break}throw new Error(`cannot decode ${e} from JSON: ${be(t)}`)}const Pr=Symbol();function Ur(e,t,r){if(t===null)return r?ut(e.scalar,!1):Pr;switch(e.scalar){case M.DOUBLE:case M.FLOAT:if(t==="NaN")return NaN;if(t==="Infinity")return Number.POSITIVE_INFINITY;if(t==="-Infinity")return Number.NEGATIVE_INFINITY;if(typeof t=="number"){if(Number.isNaN(t))throw new Be(e,"unexpected NaN number");if(!Number.isFinite(t))throw new Be(e,"unexpected infinite number");break}if(typeof t=="string"){if(t===""||t.trim().length!==t.length)break;const s=Number(t);if(!Number.isFinite(s))break;return s}break;case M.INT32:case M.FIXED32:case M.SFIXED32:case M.SINT32:case M.UINT32:return Sa(t);case M.BYTES:if(typeof t=="string"){if(t==="")return new Uint8Array(0);try{return Wo(t)}catch(s){const a=s instanceof Error?s.message:String(s);throw new Be(e,a)}}break}return t}function Xh(e,t){switch(e){case M.BOOL:switch(t){case"true":return!0;case"false":return!1}return t;case M.INT32:case M.FIXED32:case M.UINT32:case M.SFIXED32:case M.SINT32:return Sa(t);default:return t}}function Sa(e){if(typeof e=="string"){if(e===""||e.trim().length!==e.length)return e;const t=Number(e);return Number.isNaN(t)?e:t}return e}function Jh(e,t,r){if(!e.desc.typeName.startsWith("google.protobuf."))return!1;switch(e.desc.typeName){case"google.protobuf.Any":return qh(e.message,t,r),!0;case"google.protobuf.Timestamp":return Qh(e.message,t),!0;case"google.protobuf.Duration":return eu(e.message,t),!0;case"google.protobuf.FieldMask":return tu(e.message,t),!0;case"google.protobuf.Struct":return ya(e.message,t),!0;case"google.protobuf.Value":return as(e.message,t),!0;case"google.protobuf.ListValue":return Ca(e.message,t),!0;default:if(rr(e.desc)){const s=e.desc.fields[0];return t===null?e.clear(s):e.set(s,Ur(s,t,!0)),!0}return!1}}function qh(e,t,r){var s;if(t===null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.$typeName} from JSON: expected object but got ${be(t)}`);if(Object.keys(t).length==0)return;const a=t["@type"];if(typeof a!="string"||a=="")throw new Error(`cannot decode message ${e.$typeName} from JSON: "@type" is empty`);const m=a.includes("/")?a.substring(a.lastIndexOf("/")+1):a;if(!m.length)throw new Error(`cannot decode message ${e.$typeName} from JSON: "@type" is invalid`);const v=(s=r.registry)===null||s===void 0?void 0:s.getMessage(m);if(!v)throw new Error(`cannot decode message ${e.$typeName} from JSON: ${a} is not in the type registry`);const i=Oe(v);if(m.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(t,"value")){const c=t.value;kt(i,c,r)}else{const c=Object.assign({},t);delete c["@type"],kt(i,c,r)}mh(i.desc,i.message,e)}function Qh(e,t){if(typeof t!="string")throw new Error(`cannot decode message ${e.$typeName} from JSON: ${be(t)}`);const r=t.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:\.([0-9]{1,9}))?(?:Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!r)throw new Error(`cannot decode message ${e.$typeName} from JSON: invalid RFC 3339 string`);const s=Date.parse(r[1]+"-"+r[2]+"-"+r[3]+"T"+r[4]+":"+r[5]+":"+r[6]+(r[8]?r[8]:"Z"));if(Number.isNaN(s))throw new Error(`cannot decode message ${e.$typeName} from JSON: invalid RFC 3339 string`);if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new Error(`cannot decode message ${e.$typeName} from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);e.seconds=ae.parse(s/1e3),e.nanos=0,r[7]&&(e.nanos=parseInt("1"+r[7]+"0".repeat(9-r[7].length))-1e9)}function eu(e,t){if(typeof t!="string")throw new Error(`cannot decode message ${e.$typeName} from JSON: ${be(t)}`);const r=t.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(r===null)throw new Error(`cannot decode message ${e.$typeName} from JSON: ${be(t)}`);const s=Number(r[1]);if(s>315576e6||s<-315576e6)throw new Error(`cannot decode message ${e.$typeName} from JSON: ${be(t)}`);if(e.seconds=ae.parse(s),typeof r[2]!="string")return;const a=r[2]+"0".repeat(9-r[2].length);e.nanos=parseInt(a),(s<0||Object.is(s,-0))&&(e.nanos=-e.nanos)}function tu(e,t){if(typeof t!="string")throw new Error(`cannot decode message ${e.$typeName} from JSON: ${be(t)}`);if(t==="")return;function r(s){if(s.includes("_"))throw new Error(`cannot decode message ${e.$typeName} from JSON: path names must be lowerCamelCase`);const a=s.replace(/[A-Z]/g,m=>"_"+m.toLowerCase());return a[0]==="_"?a.substring(1):a}e.paths=t.split(",").map(r)}function ya(e,t){if(typeof t!="object"||t==null||Array.isArray(t))throw new Error(`cannot decode message ${e.$typeName} from JSON ${be(t)}`);for(const[r,s]of Object.entries(t)){const a=me(pa);as(a,s),e.fields[r]=a}}function as(e,t){switch(typeof t){case"number":e.kind={case:"numberValue",value:t};break;case"string":e.kind={case:"stringValue",value:t};break;case"boolean":e.kind={case:"boolValue",value:t};break;case"object":if(t===null)e.kind={case:"nullValue",value:Ci.NULL_VALUE};else if(Array.isArray(t)){const r=me(wh);Ca(r,t),e.kind={case:"listValue",value:r}}else{const r=me(Ch);ya(r,t),e.kind={case:"structValue",value:r}}break;default:throw new Error(`cannot decode message ${e.$typeName} from JSON ${be(t)}`)}return e}function Ca(e,t){if(!Array.isArray(t))throw new Error(`cannot decode message ${e.$typeName} from JSON ${be(t)}`);for(const r of t){const s=me(pa);as(s,r),e.values.push(s)}}const ru=rt("ChVnb29nbGUvcnBjL2NvZGUucHJvdG8SCmdvb2dsZS5ycGMqtwIKBENvZGUSBgoCT0sQABINCglDQU5DRUxMRUQQARILCgdVTktOT1dOEAISFAoQSU5WQUxJRF9BUkdVTUVOVBADEhUKEURFQURMSU5FX0VYQ0VFREVEEAQSDQoJTk9UX0ZPVU5EEAUSEgoOQUxSRUFEWV9FWElTVFMQBhIVChFQRVJNSVNTSU9OX0RFTklFRBAHEhMKD1VOQVVUSEVOVElDQVRFRBAQEhYKElJFU09VUkNFX0VYSEFVU1RFRBAIEhcKE0ZBSUxFRF9QUkVDT05ESVRJT04QCRILCgdBQk9SVEVEEAoSEAoMT1VUX09GX1JBTkdFEAsSEQoNVU5JTVBMRU1FTlRFRBAMEgwKCElOVEVSTkFMEA0SDwoLVU5BVkFJTEFCTEUQDhINCglEQVRBX0xPU1MQD0JYCg5jb20uZ29vZ2xlLnJwY0IJQ29kZVByb3RvUAFaM2dvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvcnBjL2NvZGU7Y29kZaICA1JQQ2IGcHJvdG8z"),iu=Dr(ru,0),su=Or(iu),nu=rt("ChVnb29nbGUvcnBjL2NvZGUucHJvdG8SCmdvb2dsZS5ycGMqtwIKBENvZGUSBgoCT0sQABINCglDQU5DRUxMRUQQARILCgdVTktOT1dOEAISFAoQSU5WQUxJRF9BUkdVTUVOVBADEhUKEURFQURMSU5FX0VYQ0VFREVEEAQSDQoJTk9UX0ZPVU5EEAUSEgoOQUxSRUFEWV9FWElTVFMQBhIVChFQRVJNSVNTSU9OX0RFTklFRBAHEhMKD1VOQVVUSEVOVElDQVRFRBAQEhYKElJFU09VUkNFX0VYSEFVU1RFRBAIEhcKE0ZBSUxFRF9QUkVDT05ESVRJT04QCRILCgdBQk9SVEVEEAoSEAoMT1VUX09GX1JBTkdFEAsSEQoNVU5JTVBMRU1FTlRFRBAMEgwKCElOVEVSTkFMEA0SDwoLVU5BVkFJTEFCTEUQDhINCglEQVRBX0xPU1MQD0JYCg5jb20uZ29vZ2xlLnJwY0IJQ29kZVByb3RvUAFaM2dvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvcnBjL2NvZGU7Y29kZaICA1JQQ2IGcHJvdG8z"),wa=rt("CiBydW5tZS9zdHJlYW0vdjEvd2Vic29ja2V0cy5wcm90bxIPcnVubWUuc3RyZWFtLnYxIkIKD1dlYnNvY2tldFN0YXR1cxIeCgRjb2RlGAEgASgOMhAuZ29vZ2xlLnJwYy5Db2RlEg8KB21lc3NhZ2UYAiABKAkiGQoEUGluZxIRCgl0aW1lc3RhbXAYASABKAMiGQoEUG9uZxIRCgl0aW1lc3RhbXAYASABKAMiugEKEFdlYnNvY2tldFJlcXVlc3QSOgoPZXhlY3V0ZV9yZXF1ZXN0GAEgASgLMh8ucnVubWUucnVubmVyLnYyLkV4ZWN1dGVSZXF1ZXN0SAASIwoEcGluZxhkIAEoCzIVLnJ1bm1lLnN0cmVhbS52MS5QaW5nEhYKDWF1dGhvcml6YXRpb24YyAEgASgJEhEKCGtub3duX2lkGNIBIAEoCRIPCgZydW5faWQY3AEgASgJQgkKB3BheWxvYWQi2AEKEVdlYnNvY2tldFJlc3BvbnNlEjwKEGV4ZWN1dGVfcmVzcG9uc2UYASABKAsyIC5ydW5tZS5ydW5uZXIudjIuRXhlY3V0ZVJlc3BvbnNlSAASIwoEcG9uZxhkIAEoCzIVLnJ1bm1lLnN0cmVhbS52MS5Qb25nEjEKBnN0YXR1cxjIASABKAsyIC5ydW5tZS5zdHJlYW0udjEuV2Vic29ja2V0U3RhdHVzEhEKCGtub3duX2lkGNIBIAEoCRIPCgZydW5faWQY3AEgASgJQgkKB3BheWxvYWRCSFpGZ2l0aHViLmNvbS9ydW5tZWRldi9ydW5tZS92My9hcGkvZ2VuL3Byb3RvL2dvL3J1bm1lL3N0cmVhbS92MTtzdHJlYW12MWIGcHJvdG8z",[nu,ir]),Ei=Ve(wa,3),ou=Ve(wa,4),ye=[];for(let e=0;e<256;++e)ye.push((e+256).toString(16).slice(1));function au(e,t=0){return(ye[e[t+0]]+ye[e[t+1]]+ye[e[t+2]]+ye[e[t+3]]+"-"+ye[e[t+4]]+ye[e[t+5]]+"-"+ye[e[t+6]]+ye[e[t+7]]+"-"+ye[e[t+8]]+ye[e[t+9]]+"-"+ye[e[t+10]]+ye[e[t+11]]+ye[e[t+12]]+ye[e[t+13]]+ye[e[t+14]]+ye[e[t+15]]).toLowerCase()}let ci;const cu=new Uint8Array(16);function lu(){if(!ci){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ci=crypto.getRandomValues.bind(crypto)}return ci(cu)}const du=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kn={randomUUID:du};function hu(e,t,r){var a;if(kn.randomUUID&&!e)return kn.randomUUID();e=e||{};const s=e.random??((a=e.rng)==null?void 0:a.call(e))??lu();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,au(s)}const uu=5e3,fu=1e3,hr=4e3,In=1e3;class gu{constructor({knownID:t,runID:r,sequence:s,options:a}){this.queue=new De,this.subscriptions=[],this.reconnect=new De,this.client=new _e,this._latencies=new De,this._latenciesConnectable=st(this._latencies.asObservable().pipe(Sl((m,v)=>{if(v.latency<0){const i=m.get(v.streamID);i&&m.set(v.streamID,{...i,readyState:v.readyState})}else m.set(v.streamID,v);return m},new Map))),this._errors=new De,this._errorsConnectable=st(this._errors.asObservable()),this._stdout=new De,this._stderr=new De,this._exitCode=new De,this._pid=new De,this._mimeType=new De,this._stdoutConnectable=st(this._stdout.asObservable()),this._stderrConnectable=st(this._stderr.asObservable()),this._exitCodeConnectable=st(this._exitCode.asObservable()),this._pidConnectable=st(this._pid.asObservable()),this._mimeTypeConnectable=st(this._mimeType.asObservable()),this.knownID=t,this.runID=r,this.sequence=s,this.runnerEndpoint=a.runnerEndpoint,this.interceptors=a.interceptors,this.autoReconnect=a.autoReconnect,this._latenciesConnectable.connect(),this._errorsConnectable.connect(),this._stdoutConnectable.connect(),this._stderrConnectable.connect(),this._exitCodeConnectable.connect(),this._pidConnectable.connect(),this._mimeTypeConnectable.connect(),this.client=this.reconnect.pipe(Ds(In,tr,{leading:!0,trailing:!0}),Ts(m=>this.useSocketClient(m.streamID).pipe(Ts(v=>this.useHeartbeat(v,m))))).pipe(co()),this.subscriptions.push(this.monitor()),this.subscriptions.push(this.process())}get latencies(){return this._latenciesConnectable}get errors(){return this._errorsConnectable}get stdout(){return this._stdoutConnectable}get stderr(){return this._stderrConnectable}get exitCode(){return this._exitCodeConnectable}get pid(){return this._pidConnectable}get mimeType(){return this._mimeTypeConnectable}monitor(){return dl(fu).pipe(Pe(()=>this.autoReconnect),Qr(this.reconnect),Pe(([,r])=>r.heartbeat==="CONTINUOUS"),Qr(this.latencies),Re(([,r])=>Array.from(r.values()).filter(s=>s.readyState===WebSocket.OPEN&&s.latency>=hr)),Pe(r=>r.length>0),Ds(In)).subscribe({next:r=>{console.log(new Date,"Triggering reconnect",r),this.connect()},complete:()=>{console.log("Monitor complete")},error:r=>{console.error("Error in monitor",r)}})}process(){const t=this.client.pipe(Pe(v=>(v==null?void 0:v.readyState)===WebSocket.OPEN),Ls(1)),r=this.queue.pipe(_l(()=>t),Pe(v=>v.length>0),Re(v=>v.sort((i,c)=>{const u=f=>{var h;return!!((h=f.payload.value)!=null&&h.config)};return u(c)?1:u(i)?-1:0}))),s=this.queue.pipe(yl(t));return hl(r.pipe(at(v=>v)),s).pipe(Qr(this.client),cr(([,v])=>v.readyState===WebSocket.OPEN),at(async([v,i])=>{await An({req:v,interceptors:this.interceptors,socket:i,knownID:this.knownID,runID:this.runID})})).subscribe({error:v=>{this._errors.next(v)}})}useSocketClient(t){return new _e(r=>{const s=new URL(this.runnerEndpoint);s.searchParams.set("id",t),s.searchParams.set("runID",this.runID);const a=new WebSocket(s.toString()),m=u=>{if(console.log(new Date,`WebSocket transport ${t} closed`,u),u.code===1005){r.complete();return}if(this.autoReconnect){this.connect();return}},v=u=>{console.log(new Date,`WebSocket transport ${t} error`,u),this.autoReconnect||r.error(u)},i=u=>{var S,E;if(typeof u.data!="string"){console.warn("Unexpected WebSocket message type:",typeof u.data);return}let f;try{f=Bn(u.data),console.log("Received WebsocketResponse:",f)}catch(g){console.error("Failed to parse WebsocketResponse:",g)}const h=f.status;if(h&&h.code!==su.OK){r.error(h);return}if(f.pong)return;const _=f.payload.value;if(_.stdoutData&&_.stdoutData.length>0&&((S=this.callback)==null||S.call(this,{type:Q.terminalStdout,output:{"runme.dev/id":this.knownID,data:_.stdoutData}}),this._stdout.next(_.stdoutData)),_.stderrData&&_.stderrData.length>0&&((E=this.callback)==null||E.call(this,{type:Q.terminalStderr,output:{"runme.dev/id":this.knownID,data:_.stderrData}}),this._stderr.next(_.stderrData)),_.exitCode!==void 0&&(this._exitCode.next(_.exitCode),r.complete()),_.pid!==void 0&&this._pid.next(_.pid),_.mimeType){const n=_.mimeType.split(";")[0];this._mimeType.next(n)}},c=()=>{console.log(new Date,`✅ Connected WebSocket for cell ${this.knownID} (#${this.sequence}) with runID ${this.runID}`),r.next(a)};return a.addEventListener("close",m),a.addEventListener("error",v),a.addEventListener("message",i),a.addEventListener("open",c),()=>{console.log(new Date,`☑️ Cleanly disconnected WebSocket for cell ${this.knownID} (#${this.sequence}) with runID ${this.runID}`),a.removeEventListener("close",m),a.removeEventListener("error",v),a.removeEventListener("message",i),a.removeEventListener("open",c),a.close()}})}setCallback(t){this.callback=t}sendExecuteRequest(t){this.queue.next(me(Ei,{payload:{value:t,case:"executeRequest"}}))}useHeartbeat(t,{streamID:r,heartbeat:s}){return new _e(a=>{const m=hi(t,"message").pipe(cr(()=>t.readyState===WebSocket.OPEN),Re(f=>Bn(f.data)),Re(f=>f.pong),Pe(f=>f!==void 0),Re(f=>({receivedAt:BigInt(Date.now()),pong:f}))),c=(s==="INITIAL"?Pt(0):Pt(0,uu)).pipe(cr(()=>t.readyState===WebSocket.OPEN),Re(()=>{const f={timestamp:BigInt(Date.now())};return me(Ei,{ping:f})}),at(async f=>(await An({req:f,interceptors:this.interceptors,socket:t}),f)),Re(f=>f.ping)).pipe(Pe(f=>(f==null?void 0:f.timestamp)!==void 0),at(f=>gl(m.pipe(Pe(h=>h.pong.timestamp===f.timestamp),Ls(1),Re(h=>{const _=f.timestamp,S=h.receivedAt;return Number(S-_)})),Pt(hr).pipe(Re(()=>{throw new Error(`Pong not received within ${hr}ms for stream ${r}`)}))).pipe(no(h=>(this._latencies.next({streamID:r,latency:hr,readyState:t.readyState,updatedAt:BigInt(Date.now())}),console.log(new Date,"Ping deadline exceeded",h.message),jc(null))))),bl(()=>{this._latencies.next({streamID:r,latency:-1,readyState:t.readyState,updatedAt:BigInt(Date.now())})}),Cl(f=>{f!==null&&this._latencies.next({streamID:r,latency:f,readyState:t.readyState,updatedAt:BigInt(Date.now())})})),u=[];return u.push(c.subscribe({error:f=>{console.error("Unexpected error sending heartbeat",f)}})),a.next(t),()=>{u.forEach(f=>f.unsubscribe())}})}connect(t="CONTINUOUS"){const r=pu(),s=this.latencies.pipe(Re(a=>{const m=a.get(r);return m===void 0?null:m}),cr(a=>(a==null?void 0:a.readyState)===WebSocket.OPEN));return this.reconnect.next({streamID:r,heartbeat:t}),s}close(){this.reconnect.complete(),this.queue.complete(),this._latencies.complete(),this.subscriptions.forEach(t=>t.unsubscribe())}}function Bn(e){const t=JSON.parse(e);return Gh(ou,t)}async function An({req:e,interceptors:t,socket:r,knownID:s,runID:a}){s&&(e.knownId=s),a&&(e.runId=a);const m={stream:!1,message:{},method:{},service:{},requestMethod:"UPGRADE",url:r.url,signal:new AbortController().signal,header:new Headers,contextValues:{}};let v=async u=>({stream:!1,message:{},method:{},service:{},header:u.header});for(const u of t.concat().reverse())v=u(v);const c=(await v(m)).header.get("Authorization");c&&e&&(e.authorization=c),r.send(JSON.stringify(Oh(Ei,e)))}function pu(){return hu().replace(/-/g,"")}var _u=Object.defineProperty,vu=Object.getOwnPropertyDescriptor,Ea=e=>{throw TypeError(e)},se=(e,t,r,s)=>{for(var a=s>1?void 0:s?vu(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&_u(t,r,a),a},cs=(e,t,r)=>t.has(e)||Ea("Cannot "+r),oe=(e,t,r)=>(cs(e,t,"read from private field"),t.get(e)),ur=(e,t,r)=>t.has(e)?Ea("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ar=(e,t,r,s)=>(cs(e,t,"write to private field"),t.set(e,r),r),xe=(e,t,r)=>(cs(e,t,"access private method"),r),we,Ue,ct,ke,ka,ls,Ia,ki,Rr,Ii,Ba,Aa;const mu="runme-console";let ie=class extends Ee{constructor(){super(),ur(this,ke),this.disposables=[],ur(this,we),ur(this,Ue,[]),ur(this,ct,{rows:34,cols:100,x:0,y:0}),this.buttons=!0,this.takeFocus=!0,this.theme="dark",this.isLoading=!1,this.isCreatingEscalation=!1,this.isUpdatedReady=!1,this.isAutoSaveEnabled=!1,this.isPlatformAuthEnabled=!1,this.isDaggerOutput=!1,this.reconnect=!0,this.interceptors=[],xe(this,ke,Aa).call(this)}applyThemeStyles(){this.consoleView&&this.consoleView.applyThemeStyles()}connectedCallback(){if(super.connectedCallback(),!this.id)throw new Error("No id provided to terminal!");xe(this,ke,ka).call(this),xe(this,ke,ki).call(this),xe(this,ke,Ii).call(this)}disconnectedCallback(){super.disconnectedCallback(),xe(this,ke,Rr).call(this),this.disposables.forEach(({dispose:e})=>e())}updated(e){super.updated(e),this.consoleView&&xe(this,ke,ls).call(this),(e.has("knownId")||e.has("runId")||e.has("sequence")||e.has("runnerEndpoint")||e.has("interceptors")||e.has("commands")||e.has("languageId"))&&(xe(this,ke,ki).call(this),xe(this,ke,Ii).call(this))}firstUpdated(e){super.firstUpdated(e)}render(){return j`<div></div>`}dispose(){xe(this,ke,Rr).call(this),this.disposables.forEach(({dispose:e})=>e())}};we=new WeakMap;Ue=new WeakMap;ct=new WeakMap;ke=new WeakSet;ka=function(){this.shadowRoot&&(this.consoleView=document.createElement("console-view"),xe(this,ke,ls).call(this),this.shadowRoot.appendChild(this.consoleView),xe(this,ke,Ia).call(this))};ls=function(){this.consoleView&&(this.consoleView.setAttribute("id",this.id),this.consoleView.setAttribute("buttons",this.buttons.toString()),this.consoleView.setAttribute("takeFocus",this.takeFocus.toString()),this.consoleView.setAttribute("theme",this.theme),this.fontFamily&&this.consoleView.setAttribute("fontFamily",this.fontFamily),this.fontSize!==void 0&&this.consoleView.setAttribute("fontSize",this.fontSize.toString()),this.cursorStyle&&this.consoleView.setAttribute("cursorStyle",this.cursorStyle),this.cursorBlink!==void 0&&this.consoleView.setAttribute("cursorBlink",this.cursorBlink.toString()),this.cursorWidth!==void 0&&this.consoleView.setAttribute("cursorWidth",this.cursorWidth.toString()),this.smoothScrollDuration!==void 0&&this.consoleView.setAttribute("smoothScrollDuration",this.smoothScrollDuration.toString()),this.scrollback!==void 0&&this.consoleView.setAttribute("scrollback",this.scrollback.toString()),this.initialContent&&this.consoleView.setAttribute("initialContent",this.initialContent),this.initialRows!==void 0&&this.consoleView.setAttribute("initialRows",this.initialRows.toString()),this.lastLine!==void 0&&this.consoleView.setAttribute("lastLine",this.lastLine.toString()),this.isLoading!==void 0&&this.consoleView.setAttribute("isLoading",this.isLoading.toString()),this.isCreatingEscalation!==void 0&&this.consoleView.setAttribute("isCreatingEscalation",this.isCreatingEscalation.toString()),this.shareUrl&&this.consoleView.setAttribute("shareUrl",this.shareUrl),this.escalationUrl&&this.consoleView.setAttribute("escalationUrl",this.escalationUrl),this.isUpdatedReady!==void 0&&this.consoleView.setAttribute("isUpdatedReady",this.isUpdatedReady.toString()),this.isAutoSaveEnabled!==void 0&&this.consoleView.setAttribute("isAutoSaveEnabled",this.isAutoSaveEnabled.toString()),this.isPlatformAuthEnabled!==void 0&&this.consoleView.setAttribute("isPlatformAuthEnabled",this.isPlatformAuthEnabled.toString()),this.isDaggerOutput!==void 0&&this.consoleView.setAttribute("isDaggerOutput",this.isDaggerOutput.toString()))};Ia=function(){if(!this.consoleView)return;const e=t=>r=>{this.dispatchEvent(new CustomEvent(t,{detail:r.detail}))};this.consoleView.addEventListener("stdout",e("stdout")),this.consoleView.addEventListener("stderr",e("stderr")),this.consoleView.addEventListener("exitcode",e("exitcode")),this.consoleView.addEventListener("pid",e("pid")),this.consoleView.addEventListener("mimetype",e("mimetype"))};ki=function(){if(oe(this,we))return;const e=this.knownId??this.id;if(!e||!this.runId||!this.runnerEndpoint)return;Ar(this,we,new gu({knownID:e,runID:this.runId,sequence:this.sequence??0,options:{runnerEndpoint:this.runnerEndpoint,interceptors:this.interceptors??[],autoReconnect:this.reconnect}}));const t=oe(this,we).connect().subscribe();oe(this,Ue).push(()=>t.unsubscribe());const r=oe(this,we).stdout.subscribe(i=>{this.dispatchEvent(new CustomEvent("stdout",{detail:i})),this.consoleView&&this.consoleView.terminal&&this.consoleView.terminal.write(i)}),s=oe(this,we).stderr.subscribe(i=>{this.dispatchEvent(new CustomEvent("stderr",{detail:i}))}),a=oe(this,we).exitCode.subscribe(i=>{this.dispatchEvent(new CustomEvent("exitcode",{detail:i})),xe(this,ke,Rr).call(this)}),m=oe(this,we).pid.subscribe(i=>{this.dispatchEvent(new CustomEvent("pid",{detail:i}))}),v=oe(this,we).mimeType.subscribe(i=>{this.dispatchEvent(new CustomEvent("mimetype",{detail:i}))});oe(this,Ue).push(()=>r.unsubscribe()),oe(this,Ue).push(()=>s.unsubscribe()),oe(this,Ue).push(()=>a.unsubscribe()),oe(this,Ue).push(()=>m.unsubscribe()),oe(this,Ue).push(()=>v.unsubscribe())};Rr=function(){var e;oe(this,Ue).forEach(t=>{try{t()}catch{}}),Ar(this,Ue,[]),(e=oe(this,we))==null||e.close(),Ar(this,we,void 0)};Ii=function(){if(!oe(this,we)||!this.commands||!this.runId)return;const e=xe(this,ke,Ba).call(this);e&&oe(this,we).sendExecuteRequest(e)};Ba=function(){var a;const e=this.languageId||"sh",r=new Set(["sh","shell","bash","zsh","fish","ksh","csh","tcsh","dash","powershell","pwsh","cmd","ash","elvish","xonsh"]).has(e),s=me(wi,{sessionStrategy:Bh.MOST_RECENT,storeStdoutInEnv:!0,config:{languageId:e,background:!1,fileExtension:"",env:[`RUNME_ID=${this.knownId??this.id}`,"RUNME_RUNNER=v2","TERM=xterm-256color"],interactive:!0,runId:this.runId,knownId:this.knownId??this.id},winsize:me(_a,oe(this,ct))});return((a=this.commands)==null?void 0:a.length)===0?(s.config.mode=ai.INLINE,s.config.source={case:"commands",value:me(Sn,{items:["zsh -l"]})}):r?(s.config.source={case:"commands",value:me(Sn,{items:this.commands??[]})},s.config.mode=ai.INLINE):(s.config.source={case:"script",value:(this.commands??[]).join(`
|
|
1777
|
+
`)},s.config.mode=ai.FILE,s.config.fileExtension=this.languageId||""),s};Aa=function(){const e=new TextEncoder,t={postMessage:r=>{var s,a;if(r.type===Q.terminalOpen||r.type===Q.terminalResize){const m=Number(r.output.terminalDimensions.columns),v=Number(r.output.terminalDimensions.rows);if(Number.isFinite(m)&&Number.isFinite(v)){if(oe(this,ct).cols===m&&oe(this,ct).rows===v)return;Ar(this,ct,me(_a,{cols:m,rows:v,x:0,y:0}));const i=me(wi,{winsize:oe(this,ct)});(s=oe(this,we))==null||s.sendExecuteRequest(i)}}if(r.type===Q.terminalStdin){const m=e.encode(r.output.input),v=me(wi,{inputData:m});(a=oe(this,we))==null||a.sendExecuteRequest(v)}},onDidReceiveMessage:r=>{var s;(s=oe(this,we))==null||s.setCallback(r)}};try{lo(t)}catch{console.error("Failed to set context bridge")}};se([G({type:String})],ie.prototype,"id",2);se([G({type:Boolean,converter:e=>e!=="false"})],ie.prototype,"buttons",2);se([G({type:Boolean,converter:e=>e!=="false"})],ie.prototype,"takeFocus",2);se([G({type:String})],ie.prototype,"theme",2);se([G({type:String})],ie.prototype,"fontFamily",2);se([G({type:Number})],ie.prototype,"fontSize",2);se([G({type:String})],ie.prototype,"cursorStyle",2);se([G({type:Boolean})],ie.prototype,"cursorBlink",2);se([G({type:Number})],ie.prototype,"cursorWidth",2);se([G({type:Number})],ie.prototype,"smoothScrollDuration",2);se([G({type:Number})],ie.prototype,"scrollback",2);se([G({type:String})],ie.prototype,"initialContent",2);se([G({type:Number})],ie.prototype,"initialRows",2);se([G({type:Number})],ie.prototype,"lastLine",2);se([G({type:Boolean})],ie.prototype,"isLoading",2);se([G({type:Boolean})],ie.prototype,"isCreatingEscalation",2);se([G()],ie.prototype,"shareUrl",2);se([G()],ie.prototype,"escalationUrl",2);se([G({type:Boolean})],ie.prototype,"isUpdatedReady",2);se([G({type:Boolean})],ie.prototype,"isAutoSaveEnabled",2);se([G({type:Boolean})],ie.prototype,"isPlatformAuthEnabled",2);se([G({type:Boolean})],ie.prototype,"isDaggerOutput",2);se([G({type:String})],ie.prototype,"knownId",2);se([G({type:String})],ie.prototype,"runId",2);se([G({type:Number})],ie.prototype,"sequence",2);se([G({type:String})],ie.prototype,"languageId",2);se([G({type:Array,attribute:!1})],ie.prototype,"commands",2);se([G({type:String})],ie.prototype,"runnerEndpoint",2);se([G({type:Boolean,converter:e=>e!=="false"})],ie.prototype,"reconnect",2);se([G({attribute:!1})],ie.prototype,"interceptors",2);ie=se([Le(mu)],ie);var bu=Object.defineProperty,Su=Object.getOwnPropertyDescriptor,Vr=(e,t,r,s)=>{for(var a=s>1?void 0:s?Su(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&bu(t,r,a),a};let It=class extends Ee{constructor(){super(...arguments),this.columns=[],this.rows=[],this.renderer=(t,r)=>j`${t[r]}`,this.displayable=()=>!0,this.hasErrors=()=>!1}get heading(){var t,r;return(t=this.columns)!=null&&t.length?j`
|
|
1729
1778
|
<thead>
|
|
1730
1779
|
<tr>
|
|
1731
|
-
${(r=this.columns)==null?void 0:r.map(
|
|
1780
|
+
${(r=this.columns)==null?void 0:r.map(s=>{if(typeof s=="string")return j`<th>${s}</th>`;if(typeof s=="object"){const{text:a,colspan:m}=s;return j`<th colspan="${m||1}">${a}</th>`}})}
|
|
1732
1781
|
</tr>
|
|
1733
1782
|
</thead>
|
|
1734
|
-
`:
|
|
1783
|
+
`:ge}render(){var t,r,s;return!((t=this.rows)!=null&&t.length)&&!((r=this.columns)!=null&&r.length)?ge:j`<table>
|
|
1735
1784
|
${this.heading}
|
|
1736
1785
|
<tbody>
|
|
1737
|
-
${(
|
|
1738
|
-
class="${
|
|
1786
|
+
${(s=this.rows)==null?void 0:s.map(a=>j`<tr
|
|
1787
|
+
class="${fe(this.hasErrors&&this.hasErrors(a),()=>"row-error",()=>"")}"
|
|
1739
1788
|
>
|
|
1740
|
-
${Object.keys(
|
|
1789
|
+
${Object.keys(a).map(m=>{var v;return fe((v=this.displayable)==null?void 0:v.call(this,a,m),()=>{var i;return j`<td>${((i=this.renderer)==null?void 0:i.call(this,a,m))||a[m]}</td>`},()=>ge)})}
|
|
1741
1790
|
</tr>`)}
|
|
1742
1791
|
</tbody>
|
|
1743
|
-
</table>`}};
|
|
1792
|
+
</table>`}};It.styles=Me`
|
|
1744
1793
|
:host {
|
|
1745
1794
|
width: 100%;
|
|
1746
1795
|
}
|
|
@@ -1881,8 +1930,7 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
1881
1930
|
.flex-center {
|
|
1882
1931
|
align-items: center;
|
|
1883
1932
|
}
|
|
1884
|
-
`;Yt([J({type:Array})],Ze.prototype,"columns",2);Yt([J({type:Array})],Ze.prototype,"rows",2);Yt([J({type:Object})],Ze.prototype,"renderer",2);Ze=Yt([ve("table-view")],Ze);function jt(e){let t=!1;const r=[];for(let h=0;h<e.length;h++){let g=e.charAt(h);switch(g){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r.push(g),t=!1;break;default:t&&(t=!1,g=g.toUpperCase()),r.push(g);break}}return r.join("")}const fa=new Set(["constructor","toString","toJSON","valueOf"]);function bt(e){return fa.has(e)?e+"$":e}function _a(){let e=0,t=0;for(let h=0;h<28;h+=7){let g=this.buf[this.pos++];if(e|=(g&127)<<h,(g&128)==0)return this.assertBounds(),[e,t]}let r=this.buf[this.pos++];if(e|=(r&15)<<28,t=(r&112)>>4,(r&128)==0)return this.assertBounds(),[e,t];for(let h=3;h<=31;h+=7){let g=this.buf[this.pos++];if(t|=(g&127)<<h,(g&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}const Pt=4294967296;function pi(e){const t=e[0]==="-";t&&(e=e.slice(1));const r=1e6;let h=0,g=0;function E(C,i){const c=Number(e.slice(C,i));g*=r,h=h*r+c,h>=Pt&&(g=g+(h/Pt|0),h=h%Pt)}return E(-24,-18),E(-18,-12),E(-12,-6),E(-6),t?Hs(h,g):Mr(h,g)}function ga(e,t){let r=Mr(e,t);const h=r.hi&2147483648;h&&(r=Hs(r.lo,r.hi));const g=Fs(r.lo,r.hi);return h?"-"+g:g}function Fs(e,t){if({lo:e,hi:t}=va(e,t),t<=2097151)return String(Pt*t+e);const r=e&16777215,h=(e>>>24|t<<8)&16777215,g=t>>16&65535;let E=r+h*6777216+g*6710656,C=h+g*8147497,i=g*2;const c=1e7;return E>=c&&(C+=Math.floor(E/c),E%=c),C>=c&&(i+=Math.floor(C/c),C%=c),i.toString()+mi(C)+mi(E)}function va(e,t){return{lo:e>>>0,hi:t>>>0}}function Mr(e,t){return{lo:e|0,hi:t|0}}function Hs(e,t){return t=~t,e?e=~e+1:t+=1,Mr(e,t)}const mi=e=>{const t=String(e);return"0000000".slice(t.length)+t};function pa(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let r=0;r<9;r++)t.push(e&127|128),e=e>>7;t.push(1)}}function ma(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let r=5;(e&128)!==0&&r<10;r++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}const de=ba();function ba(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(!!globalThis.Deno||typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const r=BigInt("-9223372036854775808"),h=BigInt("9223372036854775807"),g=BigInt("0"),E=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(C){const i=typeof C=="bigint"?C:BigInt(C);if(i>h||i<r)throw new Error(`invalid int64: ${C}`);return i},uParse(C){const i=typeof C=="bigint"?C:BigInt(C);if(i>E||i<g)throw new Error(`invalid uint64: ${C}`);return i},enc(C){return e.setBigInt64(0,this.parse(C),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(C){return e.setBigInt64(0,this.uParse(C),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(C,i){return e.setInt32(0,C,!0),e.setInt32(4,i,!0),e.getBigInt64(0,!0)},uDec(C,i){return e.setInt32(0,C,!0),e.setInt32(4,i,!0),e.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse(r){return typeof r!="string"&&(r=r.toString()),bi(r),r},uParse(r){return typeof r!="string"&&(r=r.toString()),Si(r),r},enc(r){return typeof r!="string"&&(r=r.toString()),bi(r),pi(r)},uEnc(r){return typeof r!="string"&&(r=r.toString()),Si(r),pi(r)},dec(r,h){return ga(r,h)},uDec(r,h){return Fs(r,h)}}}function bi(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function Si(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}var H;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(H||(H={}));function St(e,t){switch(e){case H.STRING:return"";case H.BOOL:return!1;case H.DOUBLE:case H.FLOAT:return 0;case H.INT64:case H.UINT64:case H.SFIXED64:case H.FIXED64:case H.SINT64:return t?"0":de.zero;case H.BYTES:return new Uint8Array(0);default:return 0}}function Sa(e,t){switch(e){case H.BOOL:return t===!1;case H.STRING:return t==="";case H.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return t==0}}const Us=2,we=Symbol.for("reflect unsafe local");function ya(e,t){const r=e[t.localName].case;return r===void 0?r:t.fields.find(h=>h.localName===r)}function Ca(e,t){const r=t.localName;if(t.oneof)return e[t.oneof.localName].case===r;if(t.presence!=Us)return e[r]!==void 0&&Object.prototype.hasOwnProperty.call(e,r);switch(t.fieldKind){case"list":return e[r].length>0;case"map":return Object.keys(e[r]).length>0;case"scalar":return!Sa(t.scalar,e[r]);case"enum":return e[r]!==t.enum.values[0].number}throw new Error("message field with implicit presence")}function yt(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0}function wa(e,t){if(t.oneof){const r=e[t.oneof.localName];return r.case===t.localName?r.value:void 0}return e[t.localName]}function Ea(e,t,r){t.oneof?e[t.oneof.localName]={case:t.localName,value:r}:e[t.localName]=r}function ka(e,t){const r=t.localName;if(t.oneof){const h=t.oneof.localName;e[h].case===r&&(e[h]={case:void 0})}else if(t.presence!=Us)delete e[r];else switch(t.fieldKind){case"map":e[r]={};break;case"list":e[r]=[];break;case"enum":e[r]=t.enum.values[0].number;break;case"scalar":e[r]=St(t.scalar,t.longAsString);break}}function Pr(e){for(const t of e.field)yt(t,"jsonName")||(t.jsonName=jt(t.name));e.nestedType.forEach(Pr)}function Ba(e,t){const r=e.values.find(h=>h.name===t);if(!r)throw new Error(`cannot parse ${e} default value: ${t}`);return r.number}function Ia(e,t){switch(e){case H.STRING:return t;case H.BYTES:{const r=Ra(t);if(r===!1)throw new Error(`cannot parse ${H[e]} default value: ${t}`);return r}case H.INT64:case H.SFIXED64:case H.SINT64:return de.parse(t);case H.UINT64:case H.FIXED64:return de.uParse(t);case H.DOUBLE:case H.FLOAT:switch(t){case"inf":return Number.POSITIVE_INFINITY;case"-inf":return Number.NEGATIVE_INFINITY;case"nan":return Number.NaN;default:return parseFloat(t)}case H.BOOL:return t==="true";case H.INT32:case H.UINT32:case H.SINT32:case H.FIXED32:case H.SFIXED32:return parseInt(t,10)}}function Ra(e){const t=[],r={tail:e,c:"",next(){return this.tail.length==0?!1:(this.c=this.tail[0],this.tail=this.tail.substring(1),!0)},take(h){if(this.tail.length>=h){const g=this.tail.substring(0,h);return this.tail=this.tail.substring(h),g}return!1}};for(;r.next();)switch(r.c){case"\\":if(r.next())switch(r.c){case"\\":t.push(r.c.charCodeAt(0));break;case"b":t.push(8);break;case"f":t.push(12);break;case"n":t.push(10);break;case"r":t.push(13);break;case"t":t.push(9);break;case"v":t.push(11);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":{const h=r.c,g=r.take(2);if(g===!1)return!1;const E=parseInt(h+g,8);if(Number.isNaN(E))return!1;t.push(E);break}case"x":{const h=r.c,g=r.take(2);if(g===!1)return!1;const E=parseInt(h+g,16);if(Number.isNaN(E))return!1;t.push(E);break}case"u":{const h=r.c,g=r.take(4);if(g===!1)return!1;const E=parseInt(h+g,16);if(Number.isNaN(E))return!1;const C=new Uint8Array(4);new DataView(C.buffer).setInt32(0,E,!0),t.push(C[0],C[1],C[2],C[3]);break}case"U":{const h=r.c,g=r.take(8);if(g===!1)return!1;const E=de.uEnc(h+g),C=new Uint8Array(8),i=new DataView(C.buffer);i.setInt32(0,E.lo,!0),i.setInt32(4,E.hi,!0),t.push(C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7]);break}}break;default:t.push(r.c.charCodeAt(0))}return new Uint8Array(t)}function*Cr(e){switch(e.kind){case"file":for(const t of e.messages)yield t,yield*Cr(t);yield*e.enums,yield*e.services,yield*e.extensions;break;case"message":for(const t of e.nestedMessages)yield t,yield*Cr(t);yield*e.nestedEnums,yield*e.nestedExtensions;break}}function $s(...e){const t=xa();if(!e.length)return t;if("$typeName"in e[0]&&e[0].$typeName=="google.protobuf.FileDescriptorSet"){for(const r of e[0].file)Ei(r,t);return t}if("$typeName"in e[0]){let E=function(C){const i=[];for(const c of C.dependency){if(t.getFile(c)!=null||g.has(c))continue;const d=h(c);if(!d)throw new Error(`Unable to resolve ${c}, imported by ${C.name}`);"kind"in d?t.addFile(d,!1,!0):(g.add(d.name),i.push(d))}return i.concat(...i.map(E))};const r=e[0],h=e[1],g=new Set;for(const C of[r,...E(r)].reverse())Ei(C,t)}else for(const r of e)for(const h of r.files)t.addFile(h);return t}function xa(){const e=new Map,t=new Map,r=new Map;return{kind:"registry",types:e,extendees:t,[Symbol.iterator](){return e.values()},get files(){return r.values()},addFile(h,g,E){if(r.set(h.proto.name,h),!g)for(const C of Cr(h))this.add(C);if(E)for(const C of h.dependencies)this.addFile(C,g,E)},add(h){if(h.kind=="extension"){let g=t.get(h.extendee.typeName);g||t.set(h.extendee.typeName,g=new Map),g.set(h.number,h)}e.set(h.typeName,h)},get(h){return e.get(h)},getFile(h){return r.get(h)},getMessage(h){const g=e.get(h);return(g==null?void 0:g.kind)=="message"?g:void 0},getEnum(h){const g=e.get(h);return(g==null?void 0:g.kind)=="enum"?g:void 0},getExtension(h){const g=e.get(h);return(g==null?void 0:g.kind)=="extension"?g:void 0},getExtensionFor(h,g){var E;return(E=t.get(h.typeName))===null||E===void 0?void 0:E.get(g)},getService(h){const g=e.get(h);return(g==null?void 0:g.kind)=="service"?g:void 0}}}const Aa=998,La=999,Ta=9,Ct=10,dt=11,Da=12,yi=14,Fr=3,Oa=2,Ci=1,Na=0,dr=1,wi=2,Ma=3,Pa=1,Fa=2,Ha=1,Vs={998:{fieldPresence:1,enumType:2,repeatedFieldEncoding:2,utf8Validation:3,messageEncoding:1,jsonFormat:2,enforceNamingStyle:2,defaultSymbolVisibility:1},999:{fieldPresence:2,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:2,defaultSymbolVisibility:1},1e3:{fieldPresence:1,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:2,defaultSymbolVisibility:1},1001:{fieldPresence:1,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:1,defaultSymbolVisibility:2}};function Ei(e,t){var r,h;const g={kind:"file",proto:e,deprecated:(h=(r=e.options)===null||r===void 0?void 0:r.deprecated)!==null&&h!==void 0?h:!1,edition:Wa(e),name:e.name.replace(/\.proto$/,""),dependencies:ja(e,t),enums:[],messages:[],extensions:[],services:[],toString(){return`file ${e.name}`}},E=new Map,C={get(i){return E.get(i)},add(i){var c;pe(((c=i.proto.options)===null||c===void 0?void 0:c.mapEntry)===!0),E.set(i.typeName,i)}};for(const i of e.enumType)Ws(i,g,void 0,t);for(const i of e.messageType)js(i,g,void 0,t,C);for(const i of e.service)Ua(i,g,t);wr(g,t);for(const i of E.values())Er(i,t,C);for(const i of g.messages)Er(i,t,C),wr(i,t);t.addFile(g,!0)}function wr(e,t){switch(e.kind){case"file":for(const r of e.proto.extension){const h=kr(r,e,t);e.extensions.push(h),t.add(h)}break;case"message":for(const r of e.proto.extension){const h=kr(r,e,t);e.nestedExtensions.push(h),t.add(h)}for(const r of e.nestedMessages)wr(r,t);break}}function Er(e,t,r){const h=e.proto.oneofDecl.map(E=>Va(E,e)),g=new Set;for(const E of e.proto.field){const C=za(E,h),i=kr(E,e,t,C,r);e.fields.push(i),e.field[i.localName]=i,C===void 0?e.members.push(i):(C.fields.push(i),g.has(C)||(g.add(C),e.members.push(C)))}for(const E of h.filter(C=>g.has(C)))e.oneofs.push(E);for(const E of e.nestedMessages)Er(E,t,r)}function Ws(e,t,r,h){var g,E,C,i,c;const d=Ga(e.name,e.value),v={kind:"enum",proto:e,deprecated:(E=(g=e.options)===null||g===void 0?void 0:g.deprecated)!==null&&E!==void 0?E:!1,file:t,parent:r,open:!0,name:e.name,typeName:Jt(e,r,t),value:{},values:[],sharedPrefix:d,toString(){return`enum ${this.typeName}`}};v.open=Ja(v),h.add(v);for(const l of e.value){const _=l.name;v.values.push(v.value[l.number]={kind:"enum_value",proto:l,deprecated:(i=(C=l.options)===null||C===void 0?void 0:C.deprecated)!==null&&i!==void 0?i:!1,parent:v,name:_,localName:bt(d==null?_:_.substring(d.length)),number:l.number,toString(){return`enum value ${v.typeName}.${_}`}})}((c=r==null?void 0:r.nestedEnums)!==null&&c!==void 0?c:t.enums).push(v)}function js(e,t,r,h,g){var E,C,i,c;const d={kind:"message",proto:e,deprecated:(C=(E=e.options)===null||E===void 0?void 0:E.deprecated)!==null&&C!==void 0?C:!1,file:t,parent:r,name:e.name,typeName:Jt(e,r,t),fields:[],field:{},oneofs:[],members:[],nestedEnums:[],nestedMessages:[],nestedExtensions:[],toString(){return`message ${this.typeName}`}};((i=e.options)===null||i===void 0?void 0:i.mapEntry)===!0?g.add(d):(((c=r==null?void 0:r.nestedMessages)!==null&&c!==void 0?c:t.messages).push(d),h.add(d));for(const v of e.enumType)Ws(v,t,d,h);for(const v of e.nestedType)js(v,t,d,h,g)}function Ua(e,t,r){var h,g;const E={kind:"service",proto:e,deprecated:(g=(h=e.options)===null||h===void 0?void 0:h.deprecated)!==null&&g!==void 0?g:!1,file:t,name:e.name,typeName:Jt(e,void 0,t),methods:[],method:{},toString(){return`service ${this.typeName}`}};t.services.push(E),r.add(E);for(const C of e.method){const i=$a(C,E,r);E.methods.push(i),E.method[i.localName]=i}}function $a(e,t,r){var h,g,E,C;let i;e.clientStreaming&&e.serverStreaming?i="bidi_streaming":e.clientStreaming?i="client_streaming":e.serverStreaming?i="server_streaming":i="unary";const c=r.getMessage(ye(e.inputType)),d=r.getMessage(ye(e.outputType));pe(c,`invalid MethodDescriptorProto: input_type ${e.inputType} not found`),pe(d,`invalid MethodDescriptorProto: output_type ${e.inputType} not found`);const v=e.name;return{kind:"rpc",proto:e,deprecated:(g=(h=e.options)===null||h===void 0?void 0:h.deprecated)!==null&&g!==void 0?g:!1,parent:t,name:v,localName:bt(v.length?bt(v[0].toLowerCase()+v.substring(1)):v),methodKind:i,input:c,output:d,idempotency:(C=(E=e.options)===null||E===void 0?void 0:E.idempotencyLevel)!==null&&C!==void 0?C:Na,toString(){return`rpc ${t.typeName}.${v}`}}}function Va(e,t){return{kind:"oneof",proto:e,deprecated:!1,parent:t,fields:[],name:e.name,localName:bt(jt(e.name)),toString(){return`oneof ${t.typeName}.${this.name}`}}}function kr(e,t,r,h,g){var E,C,i;const c=g===void 0,d={kind:"field",proto:e,deprecated:(C=(E=e.options)===null||E===void 0?void 0:E.deprecated)!==null&&C!==void 0?C:!1,name:e.name,number:e.number,scalar:void 0,message:void 0,enum:void 0,presence:Za(e,h,c,t),listKind:void 0,mapKind:void 0,mapKey:void 0,delimitedEncoding:void 0,packed:void 0,longAsString:!1,getDefaultValue:void 0};if(c){const b=t.kind=="file"?t:t.file,w=t.kind=="file"?void 0:t,f=Jt(e,w,b);d.kind="extension",d.file=b,d.parent=w,d.oneof=void 0,d.typeName=f,d.jsonName=`[${f}]`,d.toString=()=>`extension ${f}`;const s=r.getMessage(ye(e.extendee));pe(s,`invalid FieldDescriptorProto: extendee ${e.extendee} not found`),d.extendee=s}else{const b=t;pe(b.kind=="message"),d.parent=b,d.oneof=h,d.localName=h?jt(e.name):bt(jt(e.name)),d.jsonName=e.jsonName,d.toString=()=>`field ${b.typeName}.${e.name}`}const v=e.label,l=e.type,_=(i=e.options)===null||i===void 0?void 0:i.jstype;if(v===Fr){const b=l==dt?g==null?void 0:g.get(ye(e.typeName)):void 0;if(b){d.fieldKind="map";const{key:w,value:f}=Ya(b);return d.mapKey=w.scalar,d.mapKind=f.fieldKind,d.message=f.message,d.delimitedEncoding=!1,d.enum=f.enum,d.scalar=f.scalar,d}switch(d.fieldKind="list",l){case dt:case Ct:d.listKind="message",d.message=r.getMessage(ye(e.typeName)),pe(d.message),d.delimitedEncoding=ki(e,t);break;case yi:d.listKind="enum",d.enum=r.getEnum(ye(e.typeName)),pe(d.enum);break;default:d.listKind="scalar",d.scalar=l,d.longAsString=_==Ci;break}return d.packed=Xa(e,t),d}switch(l){case dt:case Ct:d.fieldKind="message",d.message=r.getMessage(ye(e.typeName)),pe(d.message,`invalid FieldDescriptorProto: type_name ${e.typeName} not found`),d.delimitedEncoding=ki(e,t),d.getDefaultValue=()=>{};break;case yi:{const b=r.getEnum(ye(e.typeName));pe(b!==void 0,`invalid FieldDescriptorProto: type_name ${e.typeName} not found`),d.fieldKind="enum",d.enum=r.getEnum(ye(e.typeName)),d.getDefaultValue=()=>yt(e,"defaultValue")?Ba(b,e.defaultValue):void 0;break}default:{d.fieldKind="scalar",d.scalar=l,d.longAsString=_==Ci,d.getDefaultValue=()=>yt(e,"defaultValue")?Ia(l,e.defaultValue):void 0;break}}return d}function Wa(e){switch(e.syntax){case"":case"proto2":return Aa;case"proto3":return La;case"editions":if(e.edition in Vs)return e.edition;throw new Error(`${e.name}: unsupported edition`);default:throw new Error(`${e.name}: unsupported syntax "${e.syntax}"`)}}function ja(e,t){return e.dependency.map(r=>{const h=t.getFile(r);if(!h)throw new Error(`Cannot find ${r}, imported by ${e.name}`);return h})}function Ga(e,t){const r=Ka(e)+"_";for(const h of t){if(!h.name.toLowerCase().startsWith(r))return;const g=h.name.substring(r.length);if(g.length==0||/^\d/.test(g))return}return r}function Ka(e){return(e.substring(0,1)+e.substring(1).replace(/[A-Z]/g,t=>"_"+t)).toLowerCase()}function Jt(e,t,r){let h;return t?h=`${t.typeName}.${e.name}`:r.proto.package.length>0?h=`${r.proto.package}.${e.name}`:h=`${e.name}`,h}function ye(e){return e.startsWith(".")?e.substring(1):e}function za(e,t){if(!yt(e,"oneofIndex")||e.proto3Optional)return;const r=t[e.oneofIndex];return pe(r,`invalid FieldDescriptorProto: oneof #${e.oneofIndex} for field #${e.number} not found`),r}function Za(e,t,r,h){if(e.label==Oa)return Ma;if(e.label==Fr)return wi;if(t||e.proto3Optional||r)return dr;const g=Xe("fieldPresence",{proto:e,parent:h});return g==wi&&(e.type==dt||e.type==Ct)?dr:g}function Xa(e,t){if(e.label!=Fr)return!1;switch(e.type){case Ta:case Da:case Ct:case dt:return!1}const r=e.options;return r&&yt(r,"packed")?r.packed:Pa==Xe("repeatedFieldEncoding",{proto:e,parent:t})}function Ya(e){const t=e.fields.find(h=>h.number===1),r=e.fields.find(h=>h.number===2);return pe(t&&t.fieldKind=="scalar"&&t.scalar!=H.BYTES&&t.scalar!=H.FLOAT&&t.scalar!=H.DOUBLE&&r&&r.fieldKind!="list"&&r.fieldKind!="map"),{key:t,value:r}}function Ja(e){var t;return Ha==Xe("enumType",{proto:e.proto,parent:(t=e.parent)!==null&&t!==void 0?t:e.file})}function ki(e,t){return e.type==Ct?!0:Fa==Xe("messageEncoding",{proto:e,parent:t})}function Xe(e,t){var r,h;const g=(r=t.proto.options)===null||r===void 0?void 0:r.features;if(g){const E=g[e];if(E!=0)return E}if("kind"in t){if(t.kind=="message")return Xe(e,(h=t.parent)!==null&&h!==void 0?h:t.file);const E=Vs[t.edition];if(!E)throw new Error(`feature default for edition ${t.edition} not found`);return E[e]}return Xe(e,t.parent)}function pe(e,t){if(!e)throw new Error(t)}function qa(e){const t=Qa(e);return t.messageType.forEach(Pr),$s(t,()=>{}).getFile(t.name)}function Qa(e){return Object.assign(Object.create({syntax:"",edition:0}),Object.assign(Object.assign({$typeName:"google.protobuf.FileDescriptorProto",dependency:[],publicDependency:[],weakDependency:[],optionDependency:[],service:[],extension:[]},e),{messageType:e.messageType.map(Gs),enumType:e.enumType.map(Ks)}))}function Gs(e){var t,r,h,g,E,C,i,c;return Object.assign(Object.create({visibility:0}),{$typeName:"google.protobuf.DescriptorProto",name:e.name,field:(r=(t=e.field)===null||t===void 0?void 0:t.map(ec))!==null&&r!==void 0?r:[],extension:[],nestedType:(g=(h=e.nestedType)===null||h===void 0?void 0:h.map(Gs))!==null&&g!==void 0?g:[],enumType:(C=(E=e.enumType)===null||E===void 0?void 0:E.map(Ks))!==null&&C!==void 0?C:[],extensionRange:(c=(i=e.extensionRange)===null||i===void 0?void 0:i.map(v=>Object.assign({$typeName:"google.protobuf.DescriptorProto.ExtensionRange"},v)))!==null&&c!==void 0?c:[],oneofDecl:[],reservedRange:[],reservedName:[]})}function ec(e){return Object.assign(Object.create({label:1,typeName:"",extendee:"",defaultValue:"",oneofIndex:0,jsonName:"",proto3Optional:!1}),Object.assign(Object.assign({$typeName:"google.protobuf.FieldDescriptorProto"},e),{options:e.options?tc(e.options):void 0}))}function tc(e){var t,r,h;return Object.assign(Object.create({ctype:0,packed:!1,jstype:0,lazy:!1,unverifiedLazy:!1,deprecated:!1,weak:!1,debugRedact:!1,retention:0}),Object.assign(Object.assign({$typeName:"google.protobuf.FieldOptions"},e),{targets:(t=e.targets)!==null&&t!==void 0?t:[],editionDefaults:(h=(r=e.editionDefaults)===null||r===void 0?void 0:r.map(E=>Object.assign({$typeName:"google.protobuf.FieldOptions.EditionDefault"},E)))!==null&&h!==void 0?h:[],uninterpretedOption:[]}))}function Ks(e){return Object.assign(Object.create({visibility:0}),{$typeName:"google.protobuf.EnumDescriptorProto",name:e.name,reservedName:[],reservedRange:[],value:e.value.map(r=>Object.assign({$typeName:"google.protobuf.EnumValueDescriptorProto"},r))})}function rc(e){const t=sc();let r=e.length*3/4;e[e.length-2]=="="?r-=2:e[e.length-1]=="="&&(r-=1);let h=new Uint8Array(r),g=0,E=0,C,i=0;for(let c=0;c<e.length;c++){if(C=t[e.charCodeAt(c)],C===void 0)switch(e[c]){case"=":E=0;case`
|
|
1885
|
-
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string")}switch(E){case 0:i=C,E=1;break;case 1:h[g++]=i<<2|(C&48)>>4,i=C,E=2;break;case 2:h[g++]=(i&15)<<4|(C&60)>>2,i=C,E=3;break;case 3:h[g++]=(i&3)<<6|C,E=0;break}}if(E==1)throw Error("invalid base64 string");return h.subarray(0,g)}let At,He;function ic(e){return At||(At="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),At.slice(0,-2).concat("-","_")),At}function sc(){if(!He){He=[];const e=ic();for(let t=0;t<e.length;t++)He[e[t].charCodeAt(0)]=t;He[45]=e.indexOf("+"),He[95]=e.indexOf("/")}return He}function zs(e,t){return e!==null&&typeof e=="object"&&"$typeName"in e&&typeof e.$typeName=="string"?t===void 0?!0:t.typeName===e.$typeName:!1}class Ye extends Error{constructor(t,r,h="FieldValueInvalidError"){super(r),this.name=h,this.field=()=>t}}function Je(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Hr(e,t){var r,h,g,E;if(Je(e)&&we in e&&"add"in e&&"field"in e&&typeof e.field=="function"){if(t!==void 0){const C=t,i=e.field();return C.listKind==i.listKind&&C.scalar===i.scalar&&((r=C.message)===null||r===void 0?void 0:r.typeName)===((h=i.message)===null||h===void 0?void 0:h.typeName)&&((g=C.enum)===null||g===void 0?void 0:g.typeName)===((E=i.enum)===null||E===void 0?void 0:E.typeName)}return!0}return!1}function Ur(e,t){var r,h,g,E;if(Je(e)&&we in e&&"has"in e&&"field"in e&&typeof e.field=="function"){if(t!==void 0){const C=t,i=e.field();return C.mapKey===i.mapKey&&C.mapKind==i.mapKind&&C.scalar===i.scalar&&((r=C.message)===null||r===void 0?void 0:r.typeName)===((h=i.message)===null||h===void 0?void 0:h.typeName)&&((g=C.enum)===null||g===void 0?void 0:g.typeName)===((E=i.enum)===null||E===void 0?void 0:E.typeName)}return!0}return!1}function $r(e,t){return Je(e)&&we in e&&"desc"in e&&Je(e.desc)&&e.desc.kind==="message"&&(t===void 0||e.desc.typeName==t.typeName)}const hr=Symbol.for("@bufbuild/protobuf/text-encoding");function Zs(){if(globalThis[hr]==null){const e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[hr]={encodeUtf8(r){return e.encode(r)},decodeUtf8(r){return t.decode(r)},checkUtf8(r){try{return encodeURIComponent(r),!0}catch{return!1}}}}return globalThis[hr]}var me;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(me||(me={}));const oc=34028234663852886e22,nc=-34028234663852886e22,ac=4294967295,cc=2147483647,lc=-2147483648;class dc{constructor(t,r=Zs().decodeUtf8){this.decodeUtf8=r,this.varint64=_a,this.uint32=ma,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength)}tag(){let t=this.uint32(),r=t>>>3,h=t&7;if(r<=0||h<0||h>5)throw new Error("illegal tag: field no "+r+" wire type "+h);return[r,h]}skip(t,r){let h=this.pos;switch(t){case me.Varint:for(;this.buf[this.pos++]&128;);break;case me.Bit64:this.pos+=4;case me.Bit32:this.pos+=4;break;case me.LengthDelimited:let g=this.uint32();this.pos+=g;break;case me.StartGroup:for(;;){const[E,C]=this.tag();if(C===me.EndGroup){if(r!==void 0&&E!==r)throw new Error("invalid end group tag");break}this.skip(C,E)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(h,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return de.dec(...this.varint64())}uint64(){return de.uDec(...this.varint64())}sint64(){let[t,r]=this.varint64(),h=-(t&1);return t=(t>>>1|(r&1)<<31)^h,r=r>>>1^h,de.dec(t,r)}bool(){let[t,r]=this.varint64();return t!==0||r!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return de.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return de.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),r=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(r,r+t)}string(){return this.decodeUtf8(this.bytes())}}function hc(e,t){const r=e.fieldKind=="list"?Hr(t,e):e.fieldKind=="map"?Ur(t,e):Vr(e,t);if(r===!0)return;let h;switch(e.fieldKind){case"list":h=`expected ${Js(e)}, got ${Kt(t)}`;break;case"map":h=`expected ${qs(e)}, got ${Kt(t)}`;break;default:h=Gt(e,t,r)}return new Ye(e,h)}function Bi(e,t,r){const h=Vr(e,r);if(h!==!0)return new Ye(e,`list item #${t+1}: ${Gt(e,r,h)}`)}function uc(e,t,r){const h=Xs(t,e.mapKey);if(h!==!0)return new Ye(e,`invalid map key: ${Gt({scalar:e.mapKey},t,h)}`);const g=Vr(e,r);if(g!==!0)return new Ye(e,`map entry ${Kt(t)}: ${Gt(e,r,g)}`)}function Vr(e,t){return e.scalar!==void 0?Xs(t,e.scalar):e.enum!==void 0?e.enum.open?Number.isInteger(t):e.enum.values.some(r=>r.number===t):$r(t,e.message)}function Xs(e,t){switch(t){case H.DOUBLE:return typeof e=="number";case H.FLOAT:return typeof e!="number"?!1:Number.isNaN(e)||!Number.isFinite(e)?!0:e>oc||e<nc?`${e.toFixed()} out of range`:!0;case H.INT32:case H.SFIXED32:case H.SINT32:return typeof e!="number"||!Number.isInteger(e)?!1:e>cc||e<lc?`${e.toFixed()} out of range`:!0;case H.FIXED32:case H.UINT32:return typeof e!="number"||!Number.isInteger(e)?!1:e>ac||e<0?`${e.toFixed()} out of range`:!0;case H.BOOL:return typeof e=="boolean";case H.STRING:return typeof e!="string"?!1:Zs().checkUtf8(e)||"invalid UTF8";case H.BYTES:return e instanceof Uint8Array;case H.INT64:case H.SFIXED64:case H.SINT64:if(typeof e=="bigint"||typeof e=="number"||typeof e=="string"&&e.length>0)try{return de.parse(e),!0}catch{return`${e} out of range`}return!1;case H.FIXED64:case H.UINT64:if(typeof e=="bigint"||typeof e=="number"||typeof e=="string"&&e.length>0)try{return de.uParse(e),!0}catch{return`${e} out of range`}return!1}}function Gt(e,t,r){return r=typeof r=="string"?`: ${r}`:`, got ${Kt(t)}`,e.scalar!==void 0?`expected ${fc(e.scalar)}`+r:e.enum!==void 0?`expected ${e.enum.toString()}`+r:`expected ${Ys(e.message)}`+r}function Kt(e){switch(typeof e){case"object":return e===null?"null":e instanceof Uint8Array?`Uint8Array(${e.length})`:Array.isArray(e)?`Array(${e.length})`:Hr(e)?Js(e.field()):Ur(e)?qs(e.field()):$r(e)?Ys(e.desc):zs(e)?`message ${e.$typeName}`:"object";case"string":return e.length>30?"string":`"${e.split('"').join('\\"')}"`;case"boolean":return String(e);case"number":return String(e);case"bigint":return String(e)+"n";default:return typeof e}}function Ys(e){return`ReflectMessage (${e.typeName})`}function Js(e){switch(e.listKind){case"message":return`ReflectList (${e.message.toString()})`;case"enum":return`ReflectList (${e.enum.toString()})`;case"scalar":return`ReflectList (${H[e.scalar]})`}}function qs(e){switch(e.mapKind){case"message":return`ReflectMap (${H[e.mapKey]}, ${e.message.toString()})`;case"enum":return`ReflectMap (${H[e.mapKey]}, ${e.enum.toString()})`;case"scalar":return`ReflectMap (${H[e.mapKey]}, ${H[e.scalar]})`}}function fc(e){switch(e){case H.STRING:return"string";case H.BOOL:return"boolean";case H.INT64:case H.SINT64:case H.SFIXED64:return"bigint (int64)";case H.UINT64:case H.FIXED64:return"bigint (uint64)";case H.BYTES:return"Uint8Array";case H.DOUBLE:return"number (float64)";case H.FLOAT:return"number (float32)";case H.FIXED32:case H.UINT32:return"number (uint32)";case H.INT32:case H.SFIXED32:case H.SINT32:return"number (int32)"}}function _c(e){return Qs(e.$typeName)}function gc(e){const t=e.fields[0];return Qs(e.typeName)&&t!==void 0&&t.fieldKind=="scalar"&&t.name=="value"&&t.number==1}function Qs(e){return e.startsWith("google.protobuf.")&&["DoubleValue","FloatValue","Int64Value","UInt64Value","Int32Value","UInt32Value","BoolValue","StringValue","BytesValue"].includes(e.substring(16))}const vc=999,pc=998,Ft=2;function mc(e,t){return zs(t,e)?t:Sc(e)}const bc=Symbol(),Ii=new WeakMap;function Sc(e){let t;if(yc(e)){const r=Ii.get(e);let h,g;if(r)({prototype:h,members:g}=r);else{h={},g=new Set;for(const E of e.members)E.kind!="oneof"&&(E.fieldKind!="scalar"&&E.fieldKind!="enum"||E.presence!=Ft&&(g.add(E),h[E.localName]=ur(E)));Ii.set(e,{prototype:h,members:g})}t=Object.create(h),t.$typeName=e.typeName;for(const E of e.members)g.has(E)||E.kind=="field"&&(E.fieldKind=="message"||(E.fieldKind=="scalar"||E.fieldKind=="enum")&&E.presence!=Ft)||(t[E.localName]=ur(E))}else{t={$typeName:e.typeName};for(const r of e.members)(r.kind=="oneof"||r.presence==Ft)&&(t[r.localName]=ur(r))}return t}function yc(e){switch(e.file.edition){case vc:return!1;case pc:return!0;default:return e.fields.some(t=>t.presence!=Ft&&t.fieldKind!="message"&&!t.oneof)}}function ur(e){if(e.kind=="oneof")return{case:void 0};if(e.fieldKind=="list")return[];if(e.fieldKind=="map")return{};if(e.fieldKind=="message")return bc;const t=e.getDefaultValue();return t!==void 0?e.fieldKind=="scalar"&&e.longAsString?t.toString():t:e.fieldKind=="scalar"?St(e.scalar,e.longAsString):e.enum.values[0].number}function Wr(e,t,r=!0){return new eo(e,t,r)}class eo{get sortedFields(){var t;return(t=this._sortedFields)!==null&&t!==void 0?t:this._sortedFields=this.desc.fields.concat().sort((r,h)=>r.number-h.number)}constructor(t,r,h=!0){this.lists=new Map,this.maps=new Map,this.check=h,this.desc=t,this.message=this[we]=r??mc(t),this.fields=t.fields,this.oneofs=t.oneofs,this.members=t.members}findNumber(t){return this._fieldsByNumber||(this._fieldsByNumber=new Map(this.desc.fields.map(r=>[r.number,r]))),this._fieldsByNumber.get(t)}oneofCase(t){return ot(this.message,t),ya(this.message,t)}isSet(t){return ot(this.message,t),Ca(this.message,t)}clear(t){ot(this.message,t),ka(this.message,t)}get(t){ot(this.message,t);const r=wa(this.message,t);switch(t.fieldKind){case"list":let h=this.lists.get(t);return(!h||h[we]!==r)&&this.lists.set(t,h=new Cc(t,r,this.check)),h;case"map":let g=this.maps.get(t);return(!g||g[we]!==r)&&this.maps.set(t,g=new wc(t,r,this.check)),g;case"message":return Gr(t,r,this.check);case"scalar":return r===void 0?St(t.scalar,!1):Kr(t,r);case"enum":return r??t.enum.values[0].number}}set(t,r){if(ot(this.message,t),this.check){const g=hc(t,r);if(g)throw g}let h;t.fieldKind=="message"?h=jr(t,r):Ur(r)||Hr(r)?h=r[we]:h=zr(t,r),Ea(this.message,t,h)}getUnknown(){return this.message.$unknown}setUnknown(t){this.message.$unknown=t}}function ot(e,t){if(t.parent.typeName!==e.$typeName)throw new Ye(t,`cannot use ${t.toString()} with message ${e.$typeName}`,"ForeignFieldError")}class Cc{field(){return this._field}get size(){return this._arr.length}constructor(t,r,h){this._field=t,this._arr=this[we]=r,this.check=h}get(t){const r=this._arr[t];return r===void 0?void 0:fr(this._field,r,this.check)}set(t,r){if(t<0||t>=this._arr.length)throw new Ye(this._field,`list item #${t+1}: out of range`);if(this.check){const h=Bi(this._field,t,r);if(h)throw h}this._arr[t]=Ri(this._field,r)}add(t){if(this.check){const r=Bi(this._field,this._arr.length,t);if(r)throw r}this._arr.push(Ri(this._field,t))}clear(){this._arr.splice(0,this._arr.length)}[Symbol.iterator](){return this.values()}keys(){return this._arr.keys()}*values(){for(const t of this._arr)yield fr(this._field,t,this.check)}*entries(){for(let t=0;t<this._arr.length;t++)yield[t,fr(this._field,this._arr[t],this.check)]}}class wc{constructor(t,r,h=!0){this.obj=this[we]=r??{},this.check=h,this._field=t}field(){return this._field}set(t,r){if(this.check){const h=uc(this._field,t,r);if(h)throw h}return this.obj[Lt(t)]=Ec(this._field,r),this}delete(t){const r=Lt(t),h=Object.prototype.hasOwnProperty.call(this.obj,r);return h&&delete this.obj[r],h}clear(){for(const t of Object.keys(this.obj))delete this.obj[t]}get(t){let r=this.obj[Lt(t)];return r!==void 0&&(r=_r(this._field,r,this.check)),r}has(t){return Object.prototype.hasOwnProperty.call(this.obj,Lt(t))}*keys(){for(const t of Object.keys(this.obj))yield xi(t,this._field.mapKey)}*entries(){for(const t of Object.entries(this.obj))yield[xi(t[0],this._field.mapKey),_r(this._field,t[1],this.check)]}[Symbol.iterator](){return this.entries()}get size(){return Object.keys(this.obj).length}*values(){for(const t of Object.values(this.obj))yield _r(this._field,t,this.check)}forEach(t,r){for(const h of this.entries())t.call(r,h[1],h[0],this)}}function jr(e,t){return $r(t)?_c(t.message)&&!e.oneof&&e.fieldKind=="message"?t.message.value:t.desc.typeName=="google.protobuf.Struct"&&e.parent.typeName!="google.protobuf.Value"?ro(t.message):t.message:t}function Gr(e,t,r){return t!==void 0&&(gc(e.message)&&!e.oneof&&e.fieldKind=="message"?t={$typeName:e.message.typeName,value:Kr(e.message.fields[0],t)}:e.message.typeName=="google.protobuf.Struct"&&e.parent.typeName!="google.protobuf.Value"&&Je(t)&&(t=to(t))),new eo(e.message,t,r)}function Ri(e,t){return e.listKind=="message"?jr(e,t):zr(e,t)}function fr(e,t,r){return e.listKind=="message"?Gr(e,t,r):Kr(e,t)}function Ec(e,t){return e.mapKind=="message"?jr(e,t):zr(e,t)}function _r(e,t,r){return e.mapKind=="message"?Gr(e,t,r):t}function Lt(e){return typeof e=="string"||typeof e=="number"?e:String(e)}function xi(e,t){switch(t){case H.STRING:return e;case H.INT32:case H.FIXED32:case H.UINT32:case H.SFIXED32:case H.SINT32:{const r=Number.parseInt(e);if(Number.isFinite(r))return r;break}case H.BOOL:switch(e){case"true":return!0;case"false":return!1}break;case H.UINT64:case H.FIXED64:try{return de.uParse(e)}catch{}break;default:try{return de.parse(e)}catch{}break}return e}function Kr(e,t){switch(e.scalar){case H.INT64:case H.SFIXED64:case H.SINT64:"longAsString"in e&&e.longAsString&&typeof t=="string"&&(t=de.parse(t));break;case H.FIXED64:case H.UINT64:"longAsString"in e&&e.longAsString&&typeof t=="string"&&(t=de.uParse(t));break}return t}function zr(e,t){switch(e.scalar){case H.INT64:case H.SFIXED64:case H.SINT64:"longAsString"in e&&e.longAsString?t=String(t):(typeof t=="string"||typeof t=="number")&&(t=de.parse(t));break;case H.FIXED64:case H.UINT64:"longAsString"in e&&e.longAsString?t=String(t):(typeof t=="string"||typeof t=="number")&&(t=de.uParse(t));break}return t}function to(e){const t={$typeName:"google.protobuf.Struct",fields:{}};if(Je(e))for(const[r,h]of Object.entries(e))t.fields[r]=so(h);return t}function ro(e){const t={};for(const[r,h]of Object.entries(e.fields))t[r]=io(h);return t}function io(e){switch(e.kind.case){case"structValue":return ro(e.kind.value);case"listValue":return e.kind.value.values.map(io);case"nullValue":case void 0:return null;default:return e.kind.value}}function so(e){const t={$typeName:"google.protobuf.Value",kind:{case:void 0}};switch(typeof e){case"number":t.kind={case:"numberValue",value:e};break;case"string":t.kind={case:"stringValue",value:e};break;case"boolean":t.kind={case:"boolValue",value:e};break;case"object":if(e===null)t.kind={case:"nullValue",value:0};else if(Array.isArray(e)){const r={$typeName:"google.protobuf.ListValue",values:[]};if(Array.isArray(e))for(const h of e)r.values.push(so(h));t.kind={case:"listValue",value:r}}else t.kind={case:"structValue",value:to(e)};break}return t}function kc(e,t,...r){return r.reduce((h,g)=>h.nestedMessages[g],e.messages[t])}function Bc(e,t,...r){if(r.length==0)return e.enums[t];const h=r.pop();return r.reduce((g,E)=>g.nestedMessages[E],e.messages[t]).nestedEnums[h]}function Ic(e){const t={};for(const r of e.values)t[r.localName]=r.number,t[r.number]=r.localName;return t}const Rc=qa({name:"google/protobuf/descriptor.proto",package:"google.protobuf",messageType:[{name:"FileDescriptorSet",field:[{name:"file",number:1,type:11,label:3,typeName:".google.protobuf.FileDescriptorProto"}],extensionRange:[{start:536e6,end:536000001}]},{name:"FileDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"package",number:2,type:9,label:1},{name:"dependency",number:3,type:9,label:3},{name:"public_dependency",number:10,type:5,label:3},{name:"weak_dependency",number:11,type:5,label:3},{name:"option_dependency",number:15,type:9,label:3},{name:"message_type",number:4,type:11,label:3,typeName:".google.protobuf.DescriptorProto"},{name:"enum_type",number:5,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto"},{name:"service",number:6,type:11,label:3,typeName:".google.protobuf.ServiceDescriptorProto"},{name:"extension",number:7,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"options",number:8,type:11,label:1,typeName:".google.protobuf.FileOptions"},{name:"source_code_info",number:9,type:11,label:1,typeName:".google.protobuf.SourceCodeInfo"},{name:"syntax",number:12,type:9,label:1},{name:"edition",number:14,type:14,label:1,typeName:".google.protobuf.Edition"}]},{name:"DescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"field",number:2,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"extension",number:6,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"nested_type",number:3,type:11,label:3,typeName:".google.protobuf.DescriptorProto"},{name:"enum_type",number:4,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto"},{name:"extension_range",number:5,type:11,label:3,typeName:".google.protobuf.DescriptorProto.ExtensionRange"},{name:"oneof_decl",number:8,type:11,label:3,typeName:".google.protobuf.OneofDescriptorProto"},{name:"options",number:7,type:11,label:1,typeName:".google.protobuf.MessageOptions"},{name:"reserved_range",number:9,type:11,label:3,typeName:".google.protobuf.DescriptorProto.ReservedRange"},{name:"reserved_name",number:10,type:9,label:3},{name:"visibility",number:11,type:14,label:1,typeName:".google.protobuf.SymbolVisibility"}],nestedType:[{name:"ExtensionRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.ExtensionRangeOptions"}]},{name:"ReservedRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1}]}]},{name:"ExtensionRangeOptions",field:[{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"},{name:"declaration",number:2,type:11,label:3,typeName:".google.protobuf.ExtensionRangeOptions.Declaration",options:{retention:2}},{name:"features",number:50,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"verification",number:3,type:14,label:1,typeName:".google.protobuf.ExtensionRangeOptions.VerificationState",defaultValue:"UNVERIFIED",options:{retention:2}}],nestedType:[{name:"Declaration",field:[{name:"number",number:1,type:5,label:1},{name:"full_name",number:2,type:9,label:1},{name:"type",number:3,type:9,label:1},{name:"reserved",number:5,type:8,label:1},{name:"repeated",number:6,type:8,label:1}]}],enumType:[{name:"VerificationState",value:[{name:"DECLARATION",number:0},{name:"UNVERIFIED",number:1}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"FieldDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"number",number:3,type:5,label:1},{name:"label",number:4,type:14,label:1,typeName:".google.protobuf.FieldDescriptorProto.Label"},{name:"type",number:5,type:14,label:1,typeName:".google.protobuf.FieldDescriptorProto.Type"},{name:"type_name",number:6,type:9,label:1},{name:"extendee",number:2,type:9,label:1},{name:"default_value",number:7,type:9,label:1},{name:"oneof_index",number:9,type:5,label:1},{name:"json_name",number:10,type:9,label:1},{name:"options",number:8,type:11,label:1,typeName:".google.protobuf.FieldOptions"},{name:"proto3_optional",number:17,type:8,label:1}],enumType:[{name:"Type",value:[{name:"TYPE_DOUBLE",number:1},{name:"TYPE_FLOAT",number:2},{name:"TYPE_INT64",number:3},{name:"TYPE_UINT64",number:4},{name:"TYPE_INT32",number:5},{name:"TYPE_FIXED64",number:6},{name:"TYPE_FIXED32",number:7},{name:"TYPE_BOOL",number:8},{name:"TYPE_STRING",number:9},{name:"TYPE_GROUP",number:10},{name:"TYPE_MESSAGE",number:11},{name:"TYPE_BYTES",number:12},{name:"TYPE_UINT32",number:13},{name:"TYPE_ENUM",number:14},{name:"TYPE_SFIXED32",number:15},{name:"TYPE_SFIXED64",number:16},{name:"TYPE_SINT32",number:17},{name:"TYPE_SINT64",number:18}]},{name:"Label",value:[{name:"LABEL_OPTIONAL",number:1},{name:"LABEL_REPEATED",number:3},{name:"LABEL_REQUIRED",number:2}]}]},{name:"OneofDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"options",number:2,type:11,label:1,typeName:".google.protobuf.OneofOptions"}]},{name:"EnumDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"value",number:2,type:11,label:3,typeName:".google.protobuf.EnumValueDescriptorProto"},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.EnumOptions"},{name:"reserved_range",number:4,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto.EnumReservedRange"},{name:"reserved_name",number:5,type:9,label:3},{name:"visibility",number:6,type:14,label:1,typeName:".google.protobuf.SymbolVisibility"}],nestedType:[{name:"EnumReservedRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1}]}]},{name:"EnumValueDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"number",number:2,type:5,label:1},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.EnumValueOptions"}]},{name:"ServiceDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"method",number:2,type:11,label:3,typeName:".google.protobuf.MethodDescriptorProto"},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.ServiceOptions"}]},{name:"MethodDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"input_type",number:2,type:9,label:1},{name:"output_type",number:3,type:9,label:1},{name:"options",number:4,type:11,label:1,typeName:".google.protobuf.MethodOptions"},{name:"client_streaming",number:5,type:8,label:1,defaultValue:"false"},{name:"server_streaming",number:6,type:8,label:1,defaultValue:"false"}]},{name:"FileOptions",field:[{name:"java_package",number:1,type:9,label:1},{name:"java_outer_classname",number:8,type:9,label:1},{name:"java_multiple_files",number:10,type:8,label:1,defaultValue:"false"},{name:"java_generate_equals_and_hash",number:20,type:8,label:1,options:{deprecated:!0}},{name:"java_string_check_utf8",number:27,type:8,label:1,defaultValue:"false"},{name:"optimize_for",number:9,type:14,label:1,typeName:".google.protobuf.FileOptions.OptimizeMode",defaultValue:"SPEED"},{name:"go_package",number:11,type:9,label:1},{name:"cc_generic_services",number:16,type:8,label:1,defaultValue:"false"},{name:"java_generic_services",number:17,type:8,label:1,defaultValue:"false"},{name:"py_generic_services",number:18,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:23,type:8,label:1,defaultValue:"false"},{name:"cc_enable_arenas",number:31,type:8,label:1,defaultValue:"true"},{name:"objc_class_prefix",number:36,type:9,label:1},{name:"csharp_namespace",number:37,type:9,label:1},{name:"swift_prefix",number:39,type:9,label:1},{name:"php_class_prefix",number:40,type:9,label:1},{name:"php_namespace",number:41,type:9,label:1},{name:"php_metadata_namespace",number:44,type:9,label:1},{name:"ruby_package",number:45,type:9,label:1},{name:"features",number:50,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],enumType:[{name:"OptimizeMode",value:[{name:"SPEED",number:1},{name:"CODE_SIZE",number:2},{name:"LITE_RUNTIME",number:3}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"MessageOptions",field:[{name:"message_set_wire_format",number:1,type:8,label:1,defaultValue:"false"},{name:"no_standard_descriptor_accessor",number:2,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"map_entry",number:7,type:8,label:1},{name:"deprecated_legacy_json_field_conflicts",number:11,type:8,label:1,options:{deprecated:!0}},{name:"features",number:12,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"FieldOptions",field:[{name:"ctype",number:1,type:14,label:1,typeName:".google.protobuf.FieldOptions.CType",defaultValue:"STRING"},{name:"packed",number:2,type:8,label:1},{name:"jstype",number:6,type:14,label:1,typeName:".google.protobuf.FieldOptions.JSType",defaultValue:"JS_NORMAL"},{name:"lazy",number:5,type:8,label:1,defaultValue:"false"},{name:"unverified_lazy",number:15,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"weak",number:10,type:8,label:1,defaultValue:"false",options:{deprecated:!0}},{name:"debug_redact",number:16,type:8,label:1,defaultValue:"false"},{name:"retention",number:17,type:14,label:1,typeName:".google.protobuf.FieldOptions.OptionRetention"},{name:"targets",number:19,type:14,label:3,typeName:".google.protobuf.FieldOptions.OptionTargetType"},{name:"edition_defaults",number:20,type:11,label:3,typeName:".google.protobuf.FieldOptions.EditionDefault"},{name:"features",number:21,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"feature_support",number:22,type:11,label:1,typeName:".google.protobuf.FieldOptions.FeatureSupport"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],nestedType:[{name:"EditionDefault",field:[{name:"edition",number:3,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"value",number:2,type:9,label:1}]},{name:"FeatureSupport",field:[{name:"edition_introduced",number:1,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"edition_deprecated",number:2,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"deprecation_warning",number:3,type:9,label:1},{name:"edition_removed",number:4,type:14,label:1,typeName:".google.protobuf.Edition"}]}],enumType:[{name:"CType",value:[{name:"STRING",number:0},{name:"CORD",number:1},{name:"STRING_PIECE",number:2}]},{name:"JSType",value:[{name:"JS_NORMAL",number:0},{name:"JS_STRING",number:1},{name:"JS_NUMBER",number:2}]},{name:"OptionRetention",value:[{name:"RETENTION_UNKNOWN",number:0},{name:"RETENTION_RUNTIME",number:1},{name:"RETENTION_SOURCE",number:2}]},{name:"OptionTargetType",value:[{name:"TARGET_TYPE_UNKNOWN",number:0},{name:"TARGET_TYPE_FILE",number:1},{name:"TARGET_TYPE_EXTENSION_RANGE",number:2},{name:"TARGET_TYPE_MESSAGE",number:3},{name:"TARGET_TYPE_FIELD",number:4},{name:"TARGET_TYPE_ONEOF",number:5},{name:"TARGET_TYPE_ENUM",number:6},{name:"TARGET_TYPE_ENUM_ENTRY",number:7},{name:"TARGET_TYPE_SERVICE",number:8},{name:"TARGET_TYPE_METHOD",number:9}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"OneofOptions",field:[{name:"features",number:1,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"EnumOptions",field:[{name:"allow_alias",number:2,type:8,label:1},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"deprecated_legacy_json_field_conflicts",number:6,type:8,label:1,options:{deprecated:!0}},{name:"features",number:7,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"EnumValueOptions",field:[{name:"deprecated",number:1,type:8,label:1,defaultValue:"false"},{name:"features",number:2,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"debug_redact",number:3,type:8,label:1,defaultValue:"false"},{name:"feature_support",number:4,type:11,label:1,typeName:".google.protobuf.FieldOptions.FeatureSupport"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"ServiceOptions",field:[{name:"features",number:34,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"deprecated",number:33,type:8,label:1,defaultValue:"false"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"MethodOptions",field:[{name:"deprecated",number:33,type:8,label:1,defaultValue:"false"},{name:"idempotency_level",number:34,type:14,label:1,typeName:".google.protobuf.MethodOptions.IdempotencyLevel",defaultValue:"IDEMPOTENCY_UNKNOWN"},{name:"features",number:35,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],enumType:[{name:"IdempotencyLevel",value:[{name:"IDEMPOTENCY_UNKNOWN",number:0},{name:"NO_SIDE_EFFECTS",number:1},{name:"IDEMPOTENT",number:2}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"UninterpretedOption",field:[{name:"name",number:2,type:11,label:3,typeName:".google.protobuf.UninterpretedOption.NamePart"},{name:"identifier_value",number:3,type:9,label:1},{name:"positive_int_value",number:4,type:4,label:1},{name:"negative_int_value",number:5,type:3,label:1},{name:"double_value",number:6,type:1,label:1},{name:"string_value",number:7,type:12,label:1},{name:"aggregate_value",number:8,type:9,label:1}],nestedType:[{name:"NamePart",field:[{name:"name_part",number:1,type:9,label:2},{name:"is_extension",number:2,type:8,label:2}]}]},{name:"FeatureSet",field:[{name:"field_presence",number:1,type:14,label:1,typeName:".google.protobuf.FeatureSet.FieldPresence",options:{retention:1,targets:[4,1],editionDefaults:[{value:"EXPLICIT",edition:900},{value:"IMPLICIT",edition:999},{value:"EXPLICIT",edition:1e3}]}},{name:"enum_type",number:2,type:14,label:1,typeName:".google.protobuf.FeatureSet.EnumType",options:{retention:1,targets:[6,1],editionDefaults:[{value:"CLOSED",edition:900},{value:"OPEN",edition:999}]}},{name:"repeated_field_encoding",number:3,type:14,label:1,typeName:".google.protobuf.FeatureSet.RepeatedFieldEncoding",options:{retention:1,targets:[4,1],editionDefaults:[{value:"EXPANDED",edition:900},{value:"PACKED",edition:999}]}},{name:"utf8_validation",number:4,type:14,label:1,typeName:".google.protobuf.FeatureSet.Utf8Validation",options:{retention:1,targets:[4,1],editionDefaults:[{value:"NONE",edition:900},{value:"VERIFY",edition:999}]}},{name:"message_encoding",number:5,type:14,label:1,typeName:".google.protobuf.FeatureSet.MessageEncoding",options:{retention:1,targets:[4,1],editionDefaults:[{value:"LENGTH_PREFIXED",edition:900}]}},{name:"json_format",number:6,type:14,label:1,typeName:".google.protobuf.FeatureSet.JsonFormat",options:{retention:1,targets:[3,6,1],editionDefaults:[{value:"LEGACY_BEST_EFFORT",edition:900},{value:"ALLOW",edition:999}]}},{name:"enforce_naming_style",number:7,type:14,label:1,typeName:".google.protobuf.FeatureSet.EnforceNamingStyle",options:{retention:2,targets:[1,2,3,4,5,6,7,8,9],editionDefaults:[{value:"STYLE_LEGACY",edition:900},{value:"STYLE2024",edition:1001}]}},{name:"default_symbol_visibility",number:8,type:14,label:1,typeName:".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility",options:{retention:2,targets:[1],editionDefaults:[{value:"EXPORT_ALL",edition:900},{value:"EXPORT_TOP_LEVEL",edition:1001}]}}],nestedType:[{name:"VisibilityFeature",enumType:[{name:"DefaultSymbolVisibility",value:[{name:"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",number:0},{name:"EXPORT_ALL",number:1},{name:"EXPORT_TOP_LEVEL",number:2},{name:"LOCAL_ALL",number:3},{name:"STRICT",number:4}]}]}],enumType:[{name:"FieldPresence",value:[{name:"FIELD_PRESENCE_UNKNOWN",number:0},{name:"EXPLICIT",number:1},{name:"IMPLICIT",number:2},{name:"LEGACY_REQUIRED",number:3}]},{name:"EnumType",value:[{name:"ENUM_TYPE_UNKNOWN",number:0},{name:"OPEN",number:1},{name:"CLOSED",number:2}]},{name:"RepeatedFieldEncoding",value:[{name:"REPEATED_FIELD_ENCODING_UNKNOWN",number:0},{name:"PACKED",number:1},{name:"EXPANDED",number:2}]},{name:"Utf8Validation",value:[{name:"UTF8_VALIDATION_UNKNOWN",number:0},{name:"VERIFY",number:2},{name:"NONE",number:3}]},{name:"MessageEncoding",value:[{name:"MESSAGE_ENCODING_UNKNOWN",number:0},{name:"LENGTH_PREFIXED",number:1},{name:"DELIMITED",number:2}]},{name:"JsonFormat",value:[{name:"JSON_FORMAT_UNKNOWN",number:0},{name:"ALLOW",number:1},{name:"LEGACY_BEST_EFFORT",number:2}]},{name:"EnforceNamingStyle",value:[{name:"ENFORCE_NAMING_STYLE_UNKNOWN",number:0},{name:"STYLE2024",number:1},{name:"STYLE_LEGACY",number:2}]}],extensionRange:[{start:1e3,end:9995},{start:9995,end:1e4},{start:1e4,end:10001}]},{name:"FeatureSetDefaults",field:[{name:"defaults",number:1,type:11,label:3,typeName:".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"},{name:"minimum_edition",number:4,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"maximum_edition",number:5,type:14,label:1,typeName:".google.protobuf.Edition"}],nestedType:[{name:"FeatureSetEditionDefault",field:[{name:"edition",number:3,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"overridable_features",number:4,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"fixed_features",number:5,type:11,label:1,typeName:".google.protobuf.FeatureSet"}]}]},{name:"SourceCodeInfo",field:[{name:"location",number:1,type:11,label:3,typeName:".google.protobuf.SourceCodeInfo.Location"}],nestedType:[{name:"Location",field:[{name:"path",number:1,type:5,label:3,options:{packed:!0}},{name:"span",number:2,type:5,label:3,options:{packed:!0}},{name:"leading_comments",number:3,type:9,label:1},{name:"trailing_comments",number:4,type:9,label:1},{name:"leading_detached_comments",number:6,type:9,label:3}]}],extensionRange:[{start:536e6,end:536000001}]},{name:"GeneratedCodeInfo",field:[{name:"annotation",number:1,type:11,label:3,typeName:".google.protobuf.GeneratedCodeInfo.Annotation"}],nestedType:[{name:"Annotation",field:[{name:"path",number:1,type:5,label:3,options:{packed:!0}},{name:"source_file",number:2,type:9,label:1},{name:"begin",number:3,type:5,label:1},{name:"end",number:4,type:5,label:1},{name:"semantic",number:5,type:14,label:1,typeName:".google.protobuf.GeneratedCodeInfo.Annotation.Semantic"}],enumType:[{name:"Semantic",value:[{name:"NONE",number:0},{name:"SET",number:1},{name:"ALIAS",number:2}]}]}]}],enumType:[{name:"Edition",value:[{name:"EDITION_UNKNOWN",number:0},{name:"EDITION_LEGACY",number:900},{name:"EDITION_PROTO2",number:998},{name:"EDITION_PROTO3",number:999},{name:"EDITION_2023",number:1e3},{name:"EDITION_2024",number:1001},{name:"EDITION_1_TEST_ONLY",number:1},{name:"EDITION_2_TEST_ONLY",number:2},{name:"EDITION_99997_TEST_ONLY",number:99997},{name:"EDITION_99998_TEST_ONLY",number:99998},{name:"EDITION_99999_TEST_ONLY",number:99999},{name:"EDITION_MAX",number:2147483647}]},{name:"SymbolVisibility",value:[{name:"VISIBILITY_UNSET",number:0},{name:"VISIBILITY_LOCAL",number:1},{name:"VISIBILITY_EXPORT",number:2}]}]}),xc=kc(Rc,1);var Ai;(function(e){e[e.DECLARATION=0]="DECLARATION",e[e.UNVERIFIED=1]="UNVERIFIED"})(Ai||(Ai={}));var Li;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.GROUP=10]="GROUP",e[e.MESSAGE=11]="MESSAGE",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.ENUM=14]="ENUM",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(Li||(Li={}));var Ti;(function(e){e[e.OPTIONAL=1]="OPTIONAL",e[e.REPEATED=3]="REPEATED",e[e.REQUIRED=2]="REQUIRED"})(Ti||(Ti={}));var Di;(function(e){e[e.SPEED=1]="SPEED",e[e.CODE_SIZE=2]="CODE_SIZE",e[e.LITE_RUNTIME=3]="LITE_RUNTIME"})(Di||(Di={}));var Oi;(function(e){e[e.STRING=0]="STRING",e[e.CORD=1]="CORD",e[e.STRING_PIECE=2]="STRING_PIECE"})(Oi||(Oi={}));var Ni;(function(e){e[e.JS_NORMAL=0]="JS_NORMAL",e[e.JS_STRING=1]="JS_STRING",e[e.JS_NUMBER=2]="JS_NUMBER"})(Ni||(Ni={}));var Mi;(function(e){e[e.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",e[e.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",e[e.RETENTION_SOURCE=2]="RETENTION_SOURCE"})(Mi||(Mi={}));var Pi;(function(e){e[e.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",e[e.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",e[e.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",e[e.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",e[e.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",e[e.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",e[e.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",e[e.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",e[e.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",e[e.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"})(Pi||(Pi={}));var Fi;(function(e){e[e.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",e[e.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",e[e.IDEMPOTENT=2]="IDEMPOTENT"})(Fi||(Fi={}));var Hi;(function(e){e[e.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0]="DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",e[e.EXPORT_ALL=1]="EXPORT_ALL",e[e.EXPORT_TOP_LEVEL=2]="EXPORT_TOP_LEVEL",e[e.LOCAL_ALL=3]="LOCAL_ALL",e[e.STRICT=4]="STRICT"})(Hi||(Hi={}));var Ui;(function(e){e[e.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",e[e.EXPLICIT=1]="EXPLICIT",e[e.IMPLICIT=2]="IMPLICIT",e[e.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"})(Ui||(Ui={}));var $i;(function(e){e[e.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"})($i||($i={}));var Vi;(function(e){e[e.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",e[e.PACKED=1]="PACKED",e[e.EXPANDED=2]="EXPANDED"})(Vi||(Vi={}));var Wi;(function(e){e[e.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",e[e.VERIFY=2]="VERIFY",e[e.NONE=3]="NONE"})(Wi||(Wi={}));var ji;(function(e){e[e.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",e[e.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",e[e.DELIMITED=2]="DELIMITED"})(ji||(ji={}));var Gi;(function(e){e[e.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",e[e.ALLOW=1]="ALLOW",e[e.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"})(Gi||(Gi={}));var Ki;(function(e){e[e.ENFORCE_NAMING_STYLE_UNKNOWN=0]="ENFORCE_NAMING_STYLE_UNKNOWN",e[e.STYLE2024=1]="STYLE2024",e[e.STYLE_LEGACY=2]="STYLE_LEGACY"})(Ki||(Ki={}));var zi;(function(e){e[e.NONE=0]="NONE",e[e.SET=1]="SET",e[e.ALIAS=2]="ALIAS"})(zi||(zi={}));var Zi;(function(e){e[e.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",e[e.EDITION_LEGACY=900]="EDITION_LEGACY",e[e.EDITION_PROTO2=998]="EDITION_PROTO2",e[e.EDITION_PROTO3=999]="EDITION_PROTO3",e[e.EDITION_2023=1e3]="EDITION_2023",e[e.EDITION_2024=1001]="EDITION_2024",e[e.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",e[e.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",e[e.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",e[e.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",e[e.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",e[e.EDITION_MAX=2147483647]="EDITION_MAX"})(Zi||(Zi={}));var Xi;(function(e){e[e.VISIBILITY_UNSET=0]="VISIBILITY_UNSET",e[e.VISIBILITY_LOCAL=1]="VISIBILITY_LOCAL",e[e.VISIBILITY_EXPORT=2]="VISIBILITY_EXPORT"})(Xi||(Xi={}));const Yi={readUnknownFields:!0};function Ac(e){return e?Object.assign(Object.assign({},Yi),e):Yi}function Lc(e,t,r){const h=Wr(e,void 0,!1);return oo(h,new dc(t),Ac(r),!1,t.byteLength),h.message}function oo(e,t,r,h,g){var E;const C=h?t.len:t.pos+g;let i,c;const d=(E=e.getUnknown())!==null&&E!==void 0?E:[];for(;t.pos<C&&([i,c]=t.tag(),!(h&&c==me.EndGroup));){const v=e.findNumber(i);if(!v){const l=t.skip(c,i);r.readUnknownFields&&d.push({no:i,wireType:c,data:l});continue}Tc(e,t,v,c,r)}if(h&&(c!=me.EndGroup||i!==g))throw new Error("invalid end group tag");d.length>0&&e.setUnknown(d)}function Tc(e,t,r,h,g){var E;switch(r.fieldKind){case"scalar":e.set(r,qe(t,r.scalar));break;case"enum":const C=qe(t,H.INT32);if(r.enum.open)e.set(r,C);else if(r.enum.values.some(c=>c.number===C))e.set(r,C);else if(g.readUnknownFields){const c=[];pa(C,c);const d=(E=e.getUnknown())!==null&&E!==void 0?E:[];d.push({no:r.number,wireType:h,data:new Uint8Array(c)}),e.setUnknown(d)}break;case"message":e.set(r,Zr(t,g,r,e.get(r)));break;case"list":Oc(t,h,e.get(r),g);break;case"map":Dc(t,e.get(r),g);break}}function Dc(e,t,r){const h=t.field();let g,E;const C=e.uint32(),i=e.pos+C;for(;e.pos<i;){const[c]=e.tag();switch(c){case 1:g=qe(e,h.mapKey);break;case 2:switch(h.mapKind){case"scalar":E=qe(e,h.scalar);break;case"enum":E=e.int32();break;case"message":E=Zr(e,r,h);break}break}}if(g===void 0&&(g=St(h.mapKey,!1)),E===void 0)switch(h.mapKind){case"scalar":E=St(h.scalar,!1);break;case"enum":E=h.enum.values[0].number;break;case"message":E=Wr(h.message,void 0,!1);break}t.set(g,E)}function Oc(e,t,r,h){var g;const E=r.field();if(E.listKind==="message"){r.add(Zr(e,h,E));return}const C=(g=E.scalar)!==null&&g!==void 0?g:H.INT32;if(!(t==me.LengthDelimited&&C!=H.STRING&&C!=H.BYTES)){r.add(qe(e,C));return}const c=e.uint32()+e.pos;for(;e.pos<c;)r.add(qe(e,C))}function Zr(e,t,r,h){const g=r.delimitedEncoding,E=h??Wr(r.message,void 0,!1);return oo(E,e,t,g,g?r.number:e.uint32()),E}function qe(e,t){switch(t){case H.STRING:return e.string();case H.BOOL:return e.bool();case H.DOUBLE:return e.double();case H.FLOAT:return e.float();case H.INT32:return e.int32();case H.INT64:return e.int64();case H.UINT64:return e.uint64();case H.FIXED64:return e.fixed64();case H.BYTES:return e.bytes();case H.FIXED32:return e.fixed32();case H.SFIXED32:return e.sfixed32();case H.SFIXED64:return e.sfixed64();case H.SINT64:return e.sint64();case H.UINT32:return e.uint32();case H.SINT32:return e.sint32()}}function no(e,t){var r;const h=Lc(xc,rc(e));return h.messageType.forEach(Pr),h.dependency=(r=t==null?void 0:t.map(E=>E.proto.name))!==null&&r!==void 0?r:[],$s(h,E=>t==null?void 0:t.find(C=>C.proto.name===E)).getFile(h.name)}const Nc=no("ChxydW5tZS9ydW5uZXIvdjIvY29uZmlnLnByb3RvEg9ydW5tZS5ydW5uZXIudjIiigMKDVByb2dyYW1Db25maWcSFAoMcHJvZ3JhbV9uYW1lGAEgASgJEhEKCWFyZ3VtZW50cxgCIAMoCRIRCglkaXJlY3RvcnkYAyABKAkSEwoLbGFuZ3VhZ2VfaWQYBCABKAkSEgoKYmFja2dyb3VuZBgFIAEoCBIWCg5maWxlX2V4dGVuc2lvbhgGIAEoCRILCgNlbnYYByADKAkSPgoIY29tbWFuZHMYCCABKAsyKi5ydW5tZS5ydW5uZXIudjIuUHJvZ3JhbUNvbmZpZy5Db21tYW5kTGlzdEgAEhAKBnNjcmlwdBgJIAEoCUgAEhMKC2ludGVyYWN0aXZlGAogASgIEioKBG1vZGUYCyABKA4yHC5ydW5tZS5ydW5uZXIudjIuQ29tbWFuZE1vZGUSEAoIa25vd25faWQYDCABKAkSEgoKa25vd25fbmFtZRgNIAEoCRIOCgZydW5faWQYDiABKAkaHAoLQ29tbWFuZExpc3QSDQoFaXRlbXMYASADKAlCCAoGc291cmNlKowBCgtDb21tYW5kTW9kZRIcChhDT01NQU5EX01PREVfVU5TUEVDSUZJRUQQABIXChNDT01NQU5EX01PREVfSU5MSU5FEAESFQoRQ09NTUFORF9NT0RFX0ZJTEUQAhIZChVDT01NQU5EX01PREVfVEVSTUlOQUwQAxIUChBDT01NQU5EX01PREVfQ0xJEARCSFpGZ2l0aHViLmNvbS9ydW5tZWRldi9ydW5tZS92My9hcGkvZ2VuL3Byb3RvL2dvL3J1bm1lL3J1bm5lci92MjtydW5uZXJ2MmIGcHJvdG8z"),Mc=no("ChxydW5tZS9ydW5uZXIvdjIvcnVubmVyLnByb3RvEg9ydW5tZS5ydW5uZXIudjIiLwoHUHJvamVjdBIMCgRyb290GAEgASgJEhYKDmVudl9sb2FkX29yZGVyGAIgAygJIo0BCgdTZXNzaW9uEgoKAmlkGAEgASgJEgsKA2VudhgCIAMoCRI4CghtZXRhZGF0YRgDIAMoCzImLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uLk1ldGFkYXRhRW50cnkaLwoNTWV0YWRhdGFFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIrIFChRDcmVhdGVTZXNzaW9uUmVxdWVzdBJFCghtZXRhZGF0YRgBIAMoCzIzLnJ1bm1lLnJ1bm5lci52Mi5DcmVhdGVTZXNzaW9uUmVxdWVzdC5NZXRhZGF0YUVudHJ5EgsKA2VudhgCIAMoCRIuCgdwcm9qZWN0GAMgASgLMhgucnVubWUucnVubmVyLnYyLlByb2plY3RIAIgBARJBCg5lbnZfc3RvcmVfdHlwZRgEIAEoDjIkLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uRW52U3RvcmVUeXBlSAGIAQESPAoGY29uZmlnGAUgASgLMiwucnVubWUucnVubmVyLnYyLkNyZWF0ZVNlc3Npb25SZXF1ZXN0LkNvbmZpZxovCg1NZXRhZGF0YUVudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaxAIKBkNvbmZpZxJBCg5lbnZfc3RvcmVfdHlwZRgBIAEoDjIkLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uRW52U3RvcmVUeXBlSACIAQESYwoRZW52X3N0b3JlX3NlZWRpbmcYAiABKA4yQy5ydW5tZS5ydW5uZXIudjIuQ3JlYXRlU2Vzc2lvblJlcXVlc3QuQ29uZmlnLlNlc3Npb25FbnZTdG9yZVNlZWRpbmdIAYgBASJpChZTZXNzaW9uRW52U3RvcmVTZWVkaW5nEikKJVNFU1NJT05fRU5WX1NUT1JFX1NFRURJTkdfVU5TUEVDSUZJRUQQABIkCiBTRVNTSU9OX0VOVl9TVE9SRV9TRUVESU5HX1NZU1RFTRABQhEKD19lbnZfc3RvcmVfdHlwZUIUChJfZW52X3N0b3JlX3NlZWRpbmdCCgoIX3Byb2plY3RCEQoPX2Vudl9zdG9yZV90eXBlIkIKFUNyZWF0ZVNlc3Npb25SZXNwb25zZRIpCgdzZXNzaW9uGAEgASgLMhgucnVubWUucnVubmVyLnYyLlNlc3Npb24iHwoRR2V0U2Vzc2lvblJlcXVlc3QSCgoCaWQYASABKAkiPwoSR2V0U2Vzc2lvblJlc3BvbnNlEikKB3Nlc3Npb24YASABKAsyGC5ydW5tZS5ydW5uZXIudjIuU2Vzc2lvbiIVChNMaXN0U2Vzc2lvbnNSZXF1ZXN0IkIKFExpc3RTZXNzaW9uc1Jlc3BvbnNlEioKCHNlc3Npb25zGAEgAygLMhgucnVubWUucnVubmVyLnYyLlNlc3Npb24i4wEKFFVwZGF0ZVNlc3Npb25SZXF1ZXN0EgoKAmlkGAEgASgJEkUKCG1ldGFkYXRhGAIgAygLMjMucnVubWUucnVubmVyLnYyLlVwZGF0ZVNlc3Npb25SZXF1ZXN0Lk1ldGFkYXRhRW50cnkSCwoDZW52GAMgAygJEi4KB3Byb2plY3QYBCABKAsyGC5ydW5tZS5ydW5uZXIudjIuUHJvamVjdEgAiAEBGi8KDU1ldGFkYXRhRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4AUIKCghfcHJvamVjdCJCChVVcGRhdGVTZXNzaW9uUmVzcG9uc2USKQoHc2Vzc2lvbhgBIAEoCzIYLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uIiIKFERlbGV0ZVNlc3Npb25SZXF1ZXN0EgoKAmlkGAEgASgJIhcKFURlbGV0ZVNlc3Npb25SZXNwb25zZSI7CgdXaW5zaXplEgwKBHJvd3MYASABKA0SDAoEY29scxgCIAEoDRIJCgF4GAMgASgNEgkKAXkYBCABKA0i5QIKDkV4ZWN1dGVSZXF1ZXN0Ei4KBmNvbmZpZxgBIAEoCzIeLnJ1bm1lLnJ1bm5lci52Mi5Qcm9ncmFtQ29uZmlnEhIKCmlucHV0X2RhdGEYCCABKAwSKgoEc3RvcBgJIAEoDjIcLnJ1bm1lLnJ1bm5lci52Mi5FeGVjdXRlU3RvcBIuCgd3aW5zaXplGAogASgLMhgucnVubWUucnVubmVyLnYyLldpbnNpemVIAIgBARISCgpzZXNzaW9uX2lkGBQgASgJEjoKEHNlc3Npb25fc3RyYXRlZ3kYFSABKA4yIC5ydW5tZS5ydW5uZXIudjIuU2Vzc2lvblN0cmF0ZWd5Ei4KB3Byb2plY3QYFiABKAsyGC5ydW5tZS5ydW5uZXIudjIuUHJvamVjdEgBiAEBEhsKE3N0b3JlX3N0ZG91dF9pbl9lbnYYFyABKAhCCgoIX3dpbnNpemVCCgoIX3Byb2plY3QiqgEKD0V4ZWN1dGVSZXNwb25zZRIvCglleGl0X2NvZGUYASABKAsyHC5nb29nbGUucHJvdG9idWYuVUludDMyVmFsdWUSEwoLc3Rkb3V0X2RhdGEYAiABKAwSEwoLc3RkZXJyX2RhdGEYAyABKAwSKQoDcGlkGAQgASgLMhwuZ29vZ2xlLnByb3RvYnVmLlVJbnQzMlZhbHVlEhEKCW1pbWVfdHlwZRgFIAEoCSIqChlSZXNvbHZlUHJvZ3JhbUNvbW1hbmRMaXN0Eg0KBWxpbmVzGAEgAygJIsAEChVSZXNvbHZlUHJvZ3JhbVJlcXVlc3QSPgoIY29tbWFuZHMYASABKAsyKi5ydW5tZS5ydW5uZXIudjIuUmVzb2x2ZVByb2dyYW1Db21tYW5kTGlzdEgAEhAKBnNjcmlwdBgCIAEoCUgAEjkKBG1vZGUYAyABKA4yKy5ydW5tZS5ydW5uZXIudjIuUmVzb2x2ZVByb2dyYW1SZXF1ZXN0Lk1vZGUSCwoDZW52GAQgAygJEhIKCnNlc3Npb25faWQYBSABKAkSOgoQc2Vzc2lvbl9zdHJhdGVneRgGIAEoDjIgLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uU3RyYXRlZ3kSLgoHcHJvamVjdBgHIAEoCzIYLnJ1bm1lLnJ1bm5lci52Mi5Qcm9qZWN0SAGIAQESEwoLbGFuZ3VhZ2VfaWQYCCABKAkSQwoJcmV0ZW50aW9uGAkgASgOMjAucnVubWUucnVubmVyLnYyLlJlc29sdmVQcm9ncmFtUmVxdWVzdC5SZXRlbnRpb24iRAoETW9kZRIUChBNT0RFX1VOU1BFQ0lGSUVEEAASEwoPTU9ERV9QUk9NUFRfQUxMEAESEQoNTU9ERV9TS0lQX0FMTBACIlcKCVJldGVudGlvbhIZChVSRVRFTlRJT05fVU5TUEVDSUZJRUQQABIXChNSRVRFTlRJT05fRklSU1RfUlVOEAESFgoSUkVURU5USU9OX0xBU1RfUlVOEAJCCAoGc291cmNlQgoKCF9wcm9qZWN0ItoDChZSZXNvbHZlUHJvZ3JhbVJlc3BvbnNlEg4KBnNjcmlwdBgBIAEoCRI8Cghjb21tYW5kcxgCIAEoCzIqLnJ1bm1lLnJ1bm5lci52Mi5SZXNvbHZlUHJvZ3JhbUNvbW1hbmRMaXN0Ej8KBHZhcnMYAyADKAsyMS5ydW5tZS5ydW5uZXIudjIuUmVzb2x2ZVByb2dyYW1SZXNwb25zZS5WYXJSZXN1bHQaiQEKCVZhclJlc3VsdBI+CgZzdGF0dXMYASABKA4yLi5ydW5tZS5ydW5uZXIudjIuUmVzb2x2ZVByb2dyYW1SZXNwb25zZS5TdGF0dXMSDAoEbmFtZRgCIAEoCRIWCg5vcmlnaW5hbF92YWx1ZRgDIAEoCRIWCg5yZXNvbHZlZF92YWx1ZRgEIAEoCSKkAQoGU3RhdHVzEhYKElNUQVRVU19VTlNQRUNJRklFRBAAEhMKD1NUQVRVU19SRVNPTFZFRBABEiIKHlNUQVRVU19VTlJFU09MVkVEX1dJVEhfTUVTU0FHRRACEiYKIlNUQVRVU19VTlJFU09MVkVEX1dJVEhfUExBQ0VIT0xERVIQAxIhCh1TVEFUVVNfVU5SRVNPTFZFRF9XSVRIX1NFQ1JFVBAEIkMKFk1vbml0b3JFbnZTdG9yZVJlcXVlc3QSKQoHc2Vzc2lvbhgBIAEoCzIYLnJ1bm1lLnJ1bm5lci52Mi5TZXNzaW9uIsIECh9Nb25pdG9yRW52U3RvcmVSZXNwb25zZVNuYXBzaG90EkoKBGVudnMYASADKAsyPC5ydW5tZS5ydW5uZXIudjIuTW9uaXRvckVudlN0b3JlUmVzcG9uc2VTbmFwc2hvdC5TbmFwc2hvdEVudhrOAgoLU25hcHNob3RFbnYSRwoGc3RhdHVzGAEgASgOMjcucnVubWUucnVubmVyLnYyLk1vbml0b3JFbnZTdG9yZVJlc3BvbnNlU25hcHNob3QuU3RhdHVzEgwKBG5hbWUYAiABKAkSEwoLZGVzY3JpcHRpb24YAyABKAkSDAoEc3BlYxgEIAEoCRITCgtpc19yZXF1aXJlZBgFIAEoCBIOCgZvcmlnaW4YBiABKAkSFgoOb3JpZ2luYWxfdmFsdWUYByABKAkSFgoOcmVzb2x2ZWRfdmFsdWUYCCABKAkSEwoLY3JlYXRlX3RpbWUYCSABKAkSEwoLdXBkYXRlX3RpbWUYCiABKAkSRgoGZXJyb3JzGAsgAygLMjYucnVubWUucnVubmVyLnYyLk1vbml0b3JFbnZTdG9yZVJlc3BvbnNlU25hcHNob3QuRXJyb3IaJgoFRXJyb3ISDAoEY29kZRgBIAEoDRIPCgdtZXNzYWdlGAIgASgJIloKBlN0YXR1cxIWChJTVEFUVVNfVU5TUEVDSUZJRUQQABISCg5TVEFUVVNfTElURVJBTBABEhEKDVNUQVRVU19ISURERU4QAhIRCg1TVEFUVVNfTUFTS0VEEAMimwEKF01vbml0b3JFbnZTdG9yZVJlc3BvbnNlEjIKBHR5cGUYASABKA4yJC5ydW5tZS5ydW5uZXIudjIuTW9uaXRvckVudlN0b3JlVHlwZRJECghzbmFwc2hvdBgCIAEoCzIwLnJ1bm1lLnJ1bm5lci52Mi5Nb25pdG9yRW52U3RvcmVSZXNwb25zZVNuYXBzaG90SABCBgoEZGF0YSpdChNTZXNzaW9uRW52U3RvcmVUeXBlEiYKIlNFU1NJT05fRU5WX1NUT1JFX1RZUEVfVU5TUEVDSUZJRUQQABIeChpTRVNTSU9OX0VOVl9TVE9SRV9UWVBFX09XTBABKl4KC0V4ZWN1dGVTdG9wEhwKGEVYRUNVVEVfU1RPUF9VTlNQRUNJRklFRBAAEhoKFkVYRUNVVEVfU1RPUF9JTlRFUlJVUFQQARIVChFFWEVDVVRFX1NUT1BfS0lMTBACKlUKD1Nlc3Npb25TdHJhdGVneRIgChxTRVNTSU9OX1NUUkFURUdZX1VOU1BFQ0lGSUVEEAASIAocU0VTU0lPTl9TVFJBVEVHWV9NT1NUX1JFQ0VOVBABKmIKE01vbml0b3JFbnZTdG9yZVR5cGUSJgoiTU9OSVRPUl9FTlZfU1RPUkVfVFlQRV9VTlNQRUNJRklFRBAAEiMKH01PTklUT1JfRU5WX1NUT1JFX1RZUEVfU05BUFNIT1QQATKQBgoNUnVubmVyU2VydmljZRJgCg1DcmVhdGVTZXNzaW9uEiUucnVubWUucnVubmVyLnYyLkNyZWF0ZVNlc3Npb25SZXF1ZXN0GiYucnVubWUucnVubmVyLnYyLkNyZWF0ZVNlc3Npb25SZXNwb25zZSIAElcKCkdldFNlc3Npb24SIi5ydW5tZS5ydW5uZXIudjIuR2V0U2Vzc2lvblJlcXVlc3QaIy5ydW5tZS5ydW5uZXIudjIuR2V0U2Vzc2lvblJlc3BvbnNlIgASXQoMTGlzdFNlc3Npb25zEiQucnVubWUucnVubmVyLnYyLkxpc3RTZXNzaW9uc1JlcXVlc3QaJS5ydW5tZS5ydW5uZXIudjIuTGlzdFNlc3Npb25zUmVzcG9uc2UiABJgCg1VcGRhdGVTZXNzaW9uEiUucnVubWUucnVubmVyLnYyLlVwZGF0ZVNlc3Npb25SZXF1ZXN0GiYucnVubWUucnVubmVyLnYyLlVwZGF0ZVNlc3Npb25SZXNwb25zZSIAEmAKDURlbGV0ZVNlc3Npb24SJS5ydW5tZS5ydW5uZXIudjIuRGVsZXRlU2Vzc2lvblJlcXVlc3QaJi5ydW5tZS5ydW5uZXIudjIuRGVsZXRlU2Vzc2lvblJlc3BvbnNlIgASaAoPTW9uaXRvckVudlN0b3JlEicucnVubWUucnVubmVyLnYyLk1vbml0b3JFbnZTdG9yZVJlcXVlc3QaKC5ydW5tZS5ydW5uZXIudjIuTW9uaXRvckVudlN0b3JlUmVzcG9uc2UiADABElIKB0V4ZWN1dGUSHy5ydW5tZS5ydW5uZXIudjIuRXhlY3V0ZVJlcXVlc3QaIC5ydW5tZS5ydW5uZXIudjIuRXhlY3V0ZVJlc3BvbnNlIgAoATABEmMKDlJlc29sdmVQcm9ncmFtEiYucnVubWUucnVubmVyLnYyLlJlc29sdmVQcm9ncmFtUmVxdWVzdBonLnJ1bm1lLnJ1bm5lci52Mi5SZXNvbHZlUHJvZ3JhbVJlc3BvbnNlIgBCSFpGZ2l0aHViLmNvbS9ydW5tZWRldi9ydW5tZS92My9hcGkvZ2VuL3Byb3RvL2dvL3J1bm1lL3J1bm5lci92MjtydW5uZXJ2MmIGcHJvdG8z",[fo.file_google_protobuf_wrappers,Nc]),Pc=Bc(Mc,19,0),Ce=Ic(Pc),Fc=Z`
|
|
1933
|
+
`;Vr([G({type:Array})],It.prototype,"columns",2);Vr([G({type:Array})],It.prototype,"rows",2);Vr([G({type:Object})],It.prototype,"renderer",2);It=Vr([Le("table-view")],It);const yu=j`
|
|
1886
1934
|
<svg
|
|
1887
1935
|
width="16"
|
|
1888
1936
|
height="16"
|
|
@@ -1893,11 +1941,11 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
1893
1941
|
<path
|
|
1894
1942
|
fill-rule="evenodd"
|
|
1895
1943
|
clip-rule="evenodd"
|
|
1896
|
-
d="
|
|
1944
|
+
d="M14.4318 3.3232L5.96175 13.3232L5.17104 13.2874L1.82104 8.5174L2.63939 7.94268L5.61722 12.1827L13.6687 2.67688L14.4318 3.3232Z"
|
|
1897
1945
|
fill="currentColor"
|
|
1898
1946
|
/>
|
|
1899
1947
|
</svg>
|
|
1900
|
-
`,
|
|
1948
|
+
`,Cu=j`
|
|
1901
1949
|
<svg
|
|
1902
1950
|
width="16"
|
|
1903
1951
|
height="16"
|
|
@@ -1908,18 +1956,18 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
1908
1956
|
<path
|
|
1909
1957
|
fill-rule="evenodd"
|
|
1910
1958
|
clip-rule="evenodd"
|
|
1911
|
-
d="
|
|
1959
|
+
d="M8.00024 2C6.50024 2 5.20024 2.4 4.10024 3.2L4.90024 3.9C5.80024 3.3 6.80024 3 8.00024 3C11.3002 3 14.0002 5.7 14.0002 9H15.0002C15.0002 5.1 11.9002 2 8.00024 2ZM1.00024 3.00005L2.60024 4.50005C1.60024 5.70005 1.00024 7.30005 1.00024 9.00005H2.00024C2.00024 7.50005 2.50024 6.20005 3.40024 5.20005L5.60024 7.20005C5.20024 7.70005 5.00024 8.30005 5.00024 9.00005C5.00024 10.7 6.30024 12 8.00024 12C8.80024 12 9.50024 11.7 10.0002 11.2L13.0002 14L13.7002 13.3L1.70024 2.30005L1.00024 3.00005ZM6.30024 7.90005L9.20024 10.6C8.90024 10.8 8.50024 11 8.00024 11C6.90024 11 6.00024 10.1 6.00024 9.00005C6.00024 8.60005 6.10024 8.20005 6.30024 7.90005ZM11.0002 9.5L10.0002 8.6C9.80024 7.8 9.10024 7.1 8.20024 7L7.20024 6.1C7.50024 6 7.70024 6 8.00024 6C9.70024 6 11.0002 7.3 11.0002 9V9.5Z"
|
|
1912
1960
|
fill="currentColor"
|
|
1913
1961
|
/>
|
|
1914
1962
|
</svg>
|
|
1915
|
-
`;var
|
|
1963
|
+
`;var wu=Object.defineProperty,Eu=Object.getOwnPropertyDescriptor,ds=(e,t,r,s)=>{for(var a=s>1?void 0:s?Eu(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&wu(t,r,a),a};let Jt=class extends Ee{render(){return j`<div class="tooltip">
|
|
1916
1964
|
<div
|
|
1917
|
-
.class="${
|
|
1965
|
+
.class="${fe(this.classList,()=>this.classList,()=>"")}"
|
|
1918
1966
|
>
|
|
1919
1967
|
${this.value}
|
|
1920
1968
|
</div>
|
|
1921
1969
|
<div class="tooltiptext">${this.tooltipText}</div>
|
|
1922
|
-
</div>`}};
|
|
1970
|
+
</div>`}};Jt.styles=Me`
|
|
1923
1971
|
.tooltip .tooltiptext {
|
|
1924
1972
|
background-color: var(--vscode-notifications-background);
|
|
1925
1973
|
box-shadow: 2px 2px 4px -2px var(--vscode-notifications-border);
|
|
@@ -1940,7 +1988,8 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
1940
1988
|
margin-left: -5px;
|
|
1941
1989
|
border-width: 5px;
|
|
1942
1990
|
border-style: solid;
|
|
1943
|
-
border-color: transparent transparent
|
|
1991
|
+
border-color: transparent transparent
|
|
1992
|
+
var(--vscode-notifications-background) transparent;
|
|
1944
1993
|
}
|
|
1945
1994
|
|
|
1946
1995
|
.tooltip .tooltiptext {
|
|
@@ -1967,32 +2016,34 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
1967
2016
|
.optional {
|
|
1968
2017
|
font-weight: 400;
|
|
1969
2018
|
}
|
|
1970
|
-
`;
|
|
2019
|
+
`;ds([G({type:String})],Jt.prototype,"tooltipText",2);ds([G({type:String})],Jt.prototype,"value",2);Jt=ds([Le("tooltip-text")],Jt);var ku=Object.defineProperty,Iu=Object.getOwnPropertyDescriptor,Bt=(e,t,r,s)=>{for(var a=s>1?void 0:s?Iu(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&ku(t,r,a),a};let et=class extends Ee{constructor(){super(...arguments),this.disposables=[],this.displaySecret=!1,this._copied=!1}onCopy(e){e.defaultPrevented&&e.preventDefault();const t=new CustomEvent("onCopy");this.dispatchEvent(t),this._copied=!0,setTimeout(()=>this._copied=!1,1e3)}toggleVisibility(){this.displaySecret=!this.displaySecret}dispose(){this.disposables.forEach(e=>e.dispose())}render(){const e=[void 0,$e.MASKED,$e.LITERAL,$e.UNSPECIFIED].includes(this.status);return j`
|
|
1971
2020
|
<div class="secret-container">
|
|
1972
|
-
${
|
|
2021
|
+
${fe(this.displaySecret,()=>j`<span class="secret-text">${this.value}</span>`,()=>fe(this.maskedValue,()=>j`<span class="secret-text"
|
|
2022
|
+
>${this.maskedValue}</span
|
|
2023
|
+
>`,()=>Array.from({length:20},(t,r)=>r+1).map(()=>"*").join("")))}
|
|
1973
2024
|
<div class="actions">
|
|
1974
|
-
${
|
|
2025
|
+
${fe(e,()=>j``,()=>fe(this.displaySecret,()=>j` <vscode-button
|
|
1975
2026
|
appearance="icon"
|
|
1976
2027
|
class="cursor-pointer"
|
|
1977
2028
|
@click=${this.toggleVisibility}
|
|
1978
2029
|
>
|
|
1979
|
-
${
|
|
1980
|
-
</vscode-button>`,()=>
|
|
2030
|
+
${Cu}
|
|
2031
|
+
</vscode-button>`,()=>j` <vscode-button
|
|
1981
2032
|
appearance="icon"
|
|
1982
2033
|
class="cursor-pointer"
|
|
1983
2034
|
@click=${this.toggleVisibility}
|
|
1984
2035
|
>
|
|
1985
|
-
${
|
|
2036
|
+
${fo}
|
|
1986
2037
|
</vscode-button>`))}
|
|
1987
|
-
${
|
|
2038
|
+
${fe([$e.LITERAL,$e.HIDDEN].includes(this.status),()=>j` <vscode-button
|
|
1988
2039
|
appearance="icon"
|
|
1989
2040
|
class="cursor-pointer"
|
|
1990
2041
|
@click=${this.onCopy}
|
|
1991
|
-
>${
|
|
1992
|
-
>`,()=>
|
|
2042
|
+
>${fe(this._copied,()=>j`${yu}`,()=>j`${Mn}`)}</vscode-button
|
|
2043
|
+
>`,()=>j``)}
|
|
1993
2044
|
</div>
|
|
1994
2045
|
</div>
|
|
1995
|
-
`}};
|
|
2046
|
+
`}};et.styles=Me`
|
|
1996
2047
|
vscode-button {
|
|
1997
2048
|
color: var(--vscode-button-foreground);
|
|
1998
2049
|
background-color: var(--vscode-button-background);
|
|
@@ -2024,8 +2075,14 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
2024
2075
|
.cursor-pointer {
|
|
2025
2076
|
cursor: pointer;
|
|
2026
2077
|
}
|
|
2027
|
-
`;
|
|
2028
|
-
<svg
|
|
2078
|
+
`;Bt([G({type:String})],et.prototype,"value",2);Bt([G({type:Number})],et.prototype,"status",2);Bt([G({type:Boolean})],et.prototype,"displaySecret",2);Bt([G({type:String})],et.prototype,"maskedValue",2);Bt([ic()],et.prototype,"_copied",2);et=Bt([Le("env-viewer")],et);j`
|
|
2079
|
+
<svg
|
|
2080
|
+
width="16"
|
|
2081
|
+
height="16"
|
|
2082
|
+
viewBox="0 0 16 16"
|
|
2083
|
+
fill="none"
|
|
2084
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2085
|
+
>
|
|
2029
2086
|
<path
|
|
2030
2087
|
fill-rule="evenodd"
|
|
2031
2088
|
clip-rule="evenodd"
|
|
@@ -2033,7 +2090,7 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
2033
2090
|
fill="#A1260D"
|
|
2034
2091
|
/>
|
|
2035
2092
|
</svg>
|
|
2036
|
-
`;const
|
|
2093
|
+
`;const Bu=(e,t)=>j`
|
|
2037
2094
|
<svg
|
|
2038
2095
|
width="${t}px"
|
|
2039
2096
|
height="${e}px"
|
|
@@ -2048,30 +2105,32 @@ Open Dashboard to configure it`)};Ns=function(){var r;const e=_e();if(!e.postMes
|
|
|
2048
2105
|
fill="#A1260D"
|
|
2049
2106
|
/>
|
|
2050
2107
|
</svg>
|
|
2051
|
-
`;var
|
|
2108
|
+
`;var Au=Object.defineProperty,Ru=Object.getOwnPropertyDescriptor,Ra=e=>{throw TypeError(e)},xa=(e,t,r,s)=>{for(var a=s>1?void 0:s?Ru(t,r):t,m=e.length-1,v;m>=0;m--)(v=e[m])&&(a=(s?v(t,r,a):v(a))||a);return s&&a&&Au(t,r,a),a},xu=(e,t,r)=>t.has(e)||Ra("Cannot "+r),Lu=(e,t,r)=>t.has(e)?Ra("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pt=(e,t,r)=>(xu(e,t,"access private method"),r),je,La,Ta,Nt;const Tu="__",Du=[{text:"Name"},{text:"Value"},{text:"Description"},{text:"Spec"},{text:"Source"},{text:"Updated"}],Ou=["resolvedValue","errors","status","specClass"];let Bi=class extends Ee{constructor(){super(...arguments),Lu(this,je),this.disposables=[]}dispose(){this.disposables.forEach(({dispose:e})=>e())}render(){var e;return pt(this,je,Ta).call(this),j` <div>
|
|
2052
2109
|
<table-view
|
|
2053
|
-
.columns="${
|
|
2054
|
-
.rows="${(e=this.variables)==null?void 0:e.map(t=>({name:t.name,status:t.status,originalValue:t.originalValue,description:t.description,spec:t.spec,specClass:t.isRequired?"required":"optional",source:t.origin,updatedAt:
|
|
2055
|
-
.displayable="${(t,r)=>!
|
|
2056
|
-
.hasErrors="${t=>{var r;return!(!((r=t.errors)!=null&&r.length)||t.name===
|
|
2057
|
-
.renderer="${(t,r)=>{switch(r){case"originalValue":const
|
|
2058
|
-
.displaySecret="${
|
|
2110
|
+
.columns="${Du}"
|
|
2111
|
+
.rows="${(e=this.variables)==null?void 0:e.map(t=>({name:t.name,status:t.status,originalValue:t.originalValue,description:t.description,spec:t.spec,specClass:t.isRequired?"required":"optional",source:t.origin,updatedAt:Rl(new Date(t.updateTime)),resolvedValue:t.resolvedValue,errors:t.errors}))}"
|
|
2112
|
+
.displayable="${(t,r)=>!Ou.includes(r)}"
|
|
2113
|
+
.hasErrors="${t=>{var r;return!(!((r=t.errors)!=null&&r.length)||t.name===Tu)}}"
|
|
2114
|
+
.renderer="${(t,r)=>{switch(r){case"originalValue":const s=t.status===$e.LITERAL;let a=t.status===$e.MASKED?`${t.resolvedValue} [masked]`:t.resolvedValue;return t.status===$e.UNSPECIFIED?a="[unset]":t.status===$e.HIDDEN&&(a="[hidden]"),a=a.replace(/\n/g," ").replace(/\r/g,""),j`<env-viewer
|
|
2115
|
+
.displaySecret="${s}"
|
|
2059
2116
|
.value="${t.originalValue}"
|
|
2060
|
-
.maskedValue="${
|
|
2117
|
+
.maskedValue="${pt(this,je,Nt).call(this,t,r,()=>a)}"
|
|
2061
2118
|
.status="${t.status}"
|
|
2062
|
-
@onCopy="${async()=>
|
|
2063
|
-
></env-viewer>`;case"updatedAt":return
|
|
2119
|
+
@onCopy="${async()=>pt(this,je,La).call(this,t.originalValue)}"
|
|
2120
|
+
></env-viewer>`;case"updatedAt":return pt(this,je,Nt).call(this,t,r,()=>t[r]?xl(new Date(t[r])):"");case"spec":return pt(this,je,Nt).call(this,t,r,()=>j`<span class="${t.specClass}">${t[r]}</span>`);default:return pt(this,je,Nt).call(this,t,r,()=>t[r])}}}"
|
|
2064
2121
|
></table-view>
|
|
2065
|
-
</div>`}};
|
|
2122
|
+
</div>`}};je=new WeakSet;La=function(e){return navigator.clipboard.writeText(e)};Ta=function(){var e;(e=this.variables)==null||e.sort((t,r)=>t.errors.length>0?-1:r.errors.length>0?1:0)};Nt=function(e,t,r){var a;const s=t==="name"?j`${Bu(10,10)}`:j``;return(a=e.errors)!=null&&a.length?j`<div class="flex">
|
|
2066
2123
|
<tooltip-text
|
|
2067
|
-
.tooltipText="${
|
|
2068
|
-
${e.errors.map(
|
|
2124
|
+
.tooltipText="${j`<div class="flex">
|
|
2125
|
+
${e.errors.map(m=>j`<span>${s}${m.message}</span>`)}
|
|
2069
2126
|
</div>`}"
|
|
2070
|
-
.value="${
|
|
2127
|
+
.value="${j`${s} ${r()}`}"
|
|
2071
2128
|
></tooltip-text>
|
|
2072
|
-
</div>`:t==="spec"?
|
|
2129
|
+
</div>`:t==="spec"?j`<div class="flex">
|
|
2073
2130
|
<tooltip-text
|
|
2074
|
-
.tooltipText="${
|
|
2131
|
+
.tooltipText="${j`<div class="flex">
|
|
2132
|
+
Info: Variable is ${e.specClass}
|
|
2133
|
+
</div>`}"
|
|
2075
2134
|
.value="${r()}"
|
|
2076
2135
|
></tooltip-text>
|
|
2077
|
-
</div>`:
|
|
2136
|
+
</div>`:j`${r()}`};xa([G({type:Array})],Bi.prototype,"variables",2);Bi=xa([Le("env-store")],Bi);exports.ClientMessages=Q;exports.getContext=Ae;exports.setContext=lo;
|