PageSourceSearch

https://app.tasvir.ai/static/js/18562.a64e85da.chunk.js

js tasvir.ai collected 2026-10-05 14:47:14 UTC 53,351 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[18562],{8867:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;t.AbstractMessageBuffer=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8";this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"===typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0===this._chunks.length)return;let t=0,r=0,n=0,s=0;e:for(;r<this._chunks.length;){const e=this._chunks[r];for(n=0;n<e.length;){switch(e[n]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,n++;break e;default:t=0}break;default:t=0}n++}s+=e.byteLength,r++}if(4!==t)return;const o=this._read(s+n),i=new Map,a=this.toString(o,"ascii").split("\r\n");if(a.length<2)return i;for(let c=0;c<a.length-2;c++){const t=a[c],r=t.indexOf(":");if(-1===r)throw new Error("Message header must separate key and value using ':'\n".concat(t));const n=t.substr(0,r),s=t.substr(r+1).trim();i.set(e?n.toLowerCase():n,s)}return i}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const s=n.slice(0,e);t.set(s,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}}},18562:(e,t,r)=>{e.exports=r(48708)},18618:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=r(40418);class s extends n.AbstractMessageBuffer{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8"),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return s.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}s.emptyBuffer=new Uint8Array(0);class o{constructor(e){this.socket=e,this._onData=new n.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,n.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),n.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),n.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),n.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class i{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),n.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),n.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),n.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"===typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error("In a Browser environments only utf-8 text encoding is supported. But got encoding: ".concat(t));this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new s(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error("In a Browser environments only utf-8 text encoding is supported. But got encoding: ".concat(t.charset));return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new o(e),asWritableStream:e=>new i(e)}),console:console,timer:Object.freeze({setTimeout(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];const o=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(o)}},setImmediate(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];const s=setTimeout(e,0,...r);return{dispose:()=>clearTimeout(s)}},setInterval(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];const o=setInterval(e,t,...n);return{dispose:()=>clearInterval(o)}}})});function u(){return c}!function(e){e.install=function(){n.RAL.install(c)}}(u||(u={})),t.default=u},21442:(e,t)=>{var r;
1Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(r||(t.Disposable=r={}))},24214:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const n=r(97113),s=r(71140),o=r(57264),i=r(35257);var a,c;!function(e){e.is=function(e){let t=e;return t&&s.func(t.dispose)&&s.func(t.onClose)&&s.func(t.onError)&&s.func(t.write)}}(a||(t.MessageWriter=a={}));class u{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error("Writer received error. Reason: ".concat(s.string(e.message)?e.message:"unknown"))}}t.AbstractMessageWriter=u,function(e){e.fromOptions=function(e){return void 0===e||"string"===typeof e?{charset:null!==e&&void 0!==e?e:"utf-8",contentTypeEncoder:(0,n.default)().applicationJson.encoder}:{charset:null!==(t=e.charset)&&void 0!==t?t:"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:null!==(r=e.contentTypeEncoder)&&void 0!==r?r:(0,n.default)().applicationJson.encoder};var t,r}}(c||(c={}));t.WriteableStreamMessageWriter=class extends u{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},31196:(e,t)=>{var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n||(t.Touch=n={}));class s{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.None;const r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.None,s=this._map.get(e);if(s)s.value=t,r!==n.None&&this.touch(s,r);else{switch(s={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(s);break;case n.First:this.addItemFirst(s);break;case n.Last:default:this.addItemLast(s)}this._map.set(e,s),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");
1if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}values(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}entries(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}}t.LinkedMap=s;t.LRUCache=class extends s{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.AsNew;return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},34343:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const n=r(95815);var s;!function(e){e.Continue=0,e.Cancelled=1}(s||(s={}));t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=s.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const r=this.buffers.get(t);if(void 0===r)return;const n=new Int32Array(r,0,1);Atomics.store(n,0,s.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class o{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===s.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class i{constructor(e){this.token=new o(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new n.CancellationTokenSource:new i(t)}}},35257:(e,t,r)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const n=r(97113);var s;!function(e){const t={dispose(){}};e.None=function(){return t}}(s||(t.Event=s={}));class o{add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0;this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this._callbacks)return;let r=!1;for(let n=0,s=this._callbacks.length;n<s;n++)if(this._callbacks[n]===e){if(this._contexts[n]===t)return this._callbacks.splice(n,1),void this._contexts.splice(n,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(){if(!this._callbacks)return[];const e=[],t=this._callbacks.slice(0),r=this._contexts.slice(0);for(var s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];for(let c=0,u=t.length;c<u;c++)try{e.push(t[c].apply(r[c],o))}catch(a){(0,n.default)().console.error(a)}return e}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class i{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new o),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=i,i._noop=function(){}},40418:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const n=r(41888);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return n.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});const s=r(31196);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return s.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return s.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return s.Touch}});const o=r(21442);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return o.Disposable}}
1);const i=r(35257);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return i.Emitter}});const a=r(95815);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=r(34343);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const u=r(59910);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const l=r(24214);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const d=r(8867);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const f=r(41408);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return f.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return f.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return f.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return f.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return f.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return f.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return f.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return f.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return f.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return f.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return f.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return f.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return f.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return f.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return f.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return f.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return f.MessageStrategy}});const h=r(97113);t.RAL=h.default},41408:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const n=r(97113),s=r(71140),o=r(41888),i=r(31196),a=r(35257),c=r(95815);var u,l,d,f,h,p,m,g,y,v,b,_,T,w,E,S,R,C,k;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.is=function(e){return"string"===typeof e||"number"===typeof e}}(l||(t.ProgressToken=l={})),function(e){e.type=new o.NotificationType("$/progress")}(d||(d={}));t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return s.func(e)}}(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(h||(t.Trace=h={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(p||(t.TraceValues=p={})),function(e){e.fromString=function(t){if(!s.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(h||(t.Trace=h={})),function(e){e.Text="text",e.JSON="json"}(m||(t.TraceFormat=m={})),function(e){e.fromString=function(t){return s.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m||(t.TraceFormat=m={})),function(e){e.type=new o.NotificationType("$/setTrace")}(g||(t.SetTraceNotification=g={})),function(e){e.type=new o.NotificationType("$/logTrace")}(y||(t.LogTraceNotification=y={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v||(t.ConnectionErrors=v={}));
1class M extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,M.prototype)}}t.ConnectionError=M,function(e){e.is=function(e){const t=e;return t&&s.func(t.cancelUndispatched)}}(b||(t.ConnectionStrategy=b={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&s.func(t.createCancellationTokenSource)&&(void 0===t.dispose||s.func(t.dispose))}}(_||(t.IdCancellationReceiverStrategy=_={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&s.func(t.createCancellationTokenSource)&&(void 0===t.dispose||s.func(t.dispose))}}(T||(t.RequestCancellationReceiverStrategy=T={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return _.is(e)||T.is(e)}}(w||(t.CancellationReceiverStrategy=w={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(u.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&s.func(t.sendCancellation)&&s.func(t.cleanup)}}(E||(t.CancellationSenderStrategy=E={})),function(e){e.Message=Object.freeze({receiver:w.Message,sender:E.Message}),e.is=function(e){const t=e;return t&&w.is(t.receiver)&&E.is(t.sender)}}(S||(t.CancellationStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&s.func(t.handleMessage)}}(R||(t.MessageStrategy=R={})),function(e){e.is=function(e){const t=e;return t&&(S.is(t.cancellationStrategy)||b.is(t.connectionStrategy)||R.is(t.messageStrategy))}}(C||(t.ConnectionOptions=C={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(k||(k={})),t.createMessageConnection=function(e,r,p,b){const T=void 0!==p?p:t.NullLogger;let w=0,E=0,C=0;const P="2.0";let N;const O=new Map;let j;const x=new Map,L=new Map;let q,A,D=new i.LinkedMap,I=new Map,W=new Set,z=new Map,B=h.Off,U=m.Text,F=k.New;const J=new a.Emitter,V=new a.Emitter,$=new a.Emitter,H=new a.Emitter,G=new a.Emitter,K=b&&b.cancellationStrategy?b.cancellationStrategy:S.Message;function Q(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function X(e,t){var r;o.Message.isRequest(t)?e.set(Q(t.id),t):o.Message.isResponse(t)?e.set(null===(r=t.id)?"res-unknown-"+(++C).toString():"res-"+r.toString(),t):e.set("not-"+(++E).toString(),t)}function Y(e){}function Z(){return F===k.Listening}function ee(){return F===k.Closed}function te(){return F===k.Disposed}function re(){F!==k.New&&F!==k.Listening||(F=k.Closed,V.fire(void 0))}function ne(){q||0===D.size||(q=(0,n.default)().timer.setImmediate(()=>{q=void 0,function(){if(0===D.size)return;const e=D.shift();try{const t=null===b||void 0===b?void 0:b.messageStrategy;R.is(t)?t.handleMessage(e,se):se(e)}finally{ne()}}()}))}function se(e){o.Message.isRequest(e)?function(e){if(te())return;function t(t,n,s){const i={jsonrpc:P,id:e.id};t instanceof o.ResponseError?i.error=t.toJson():i.result=void 0===t?null:t,ae(i,n,s),r.write(i).catch(()=>T.error("Sending response failed."))}function n(t,n,s){const o={jsonrpc:P,id:e.id,error:t.toJson()};ae(o,n,s),r.write(o).catch(()=>T.error("Sending response failed."))}function i(t,n,s){void 0===t&&(t=null);const o={jsonrpc:P,id:e.id,result:t};ae(o,n,s),r.write(o).catch(()=>T.error("Sending response failed."))}!function(e){if(B===h.Off||!A)return;if(U===m.Text){let t;B!==h.Verbose&&B!==h.Compact||!e.params||(t="Params: ".concat(ie(e.params),"\n\n")),A.log("Received request '".concat(e.method," - (").concat(e.id,")'."),t)}else ue("receive-request",e)}(e);const a=O.get(e.method);let c,u;a&&(c=a.type,u=a.handler);const l=Date.now();if(u||N){var d;const r=null!==(d=e.id)&&void 0!==d?d:String(Date.now()),a=_.is(K.receiver)?K.receiver.createCancellationTokenSource(r):K.receiver.createCancellationTokenSource(e);null!==e.id&&W.has(e.id)&&a.cancel(),null!==e.id&&z.set(r,a);try{let d;if(u)if(void 0===e.params){if(void 0!==c&&0!==c.numberOfParams)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,"Request ".concat(e.method," defines ").concat(c.numberOfParams," params but received none.")),e.method,l);d=u(a.token)}else if(Array.isArray(e.params)){if(void 0!==c&&c.parameterStructures===o.ParameterStructures.byName)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,"Request ".concat(e.method," defines parameters by name but received parameters by position")),e.method,l);d=u(...e.params,a.token)}else{if(void 0!==c&&c.parameterStructures===o.ParameterStructures.byPosition)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,"Request ".concat(e.method," defines parameters by position but received parameters by name")),e.method,l);d=u(e.params,a.token)}else N&&(d=N(e.method,e.params,a.token));const f=d;d?f.then?f.then(n=>{z.delete(r),t(n,e.method,l)},t=>{z.delete(r),t instanceof o.ResponseError?n(t,e.method,l):t&&s.string(t.message)?n(new o.ResponseError(o.ErrorCodes.InternalError,"Request ".concat(e.method," failed with message: ").concat(t.message)),e.method,l):n(new o.ResponseError(o.ErrorCodes.InternalError,"Request ".concat(e.method," failed unexpectedly without providing any details.")),e.method,l)}):(z.delete(r),t(d,e.method,l)):(z.delete(r),i(d,e.method,l))}catch(f){z.delete(r),f instanceof o.ResponseError?t(f,e.method,l):f&&s.string(f.message)?n(new o.ResponseError(o.ErrorCodes.InternalError,"Request ".concat(e.method," failed with message: ").concat(f.message)),e.method,l):n(new o.ResponseError(o.ErrorCodes.InternalError,"Request ".concat(e.method," failed unexpectedly without providing any details.")),e.method,l)}}else n(new o.ResponseError(o.ErrorCodes.MethodNotFound,"Unhandled method ".concat(e.method)),e.method,l)}(e):o.Message.isNotification(e)?function(e){if(te())return;let t,r;if(e.method===u.type.method){const t=e.params.id;return W.delete(t),void ce(e)}{const n=x.get(e.method);n&&(r=n.handler,t=n.type)}
1if(r||j)try{if(ce(e),r)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==o.ParameterStructures.byName&&T.error("Notification ".concat(e.method," defines ").concat(t.numberOfParams," params but received none.")),r();else if(Array.isArray(e.params)){const n=e.params;e.method===d.type.method&&2===n.length&&l.is(n[0])?r({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===o.ParameterStructures.byName&&T.error("Notification ".concat(e.method," defines parameters by name but received parameters by position")),t.numberOfParams!==e.params.length&&T.error("Notification ".concat(e.method," defines ").concat(t.numberOfParams," params but received ").concat(n.length," arguments"))),r(...n))}else void 0!==t&&t.parameterStructures===o.ParameterStructures.byPosition&&T.error("Notification ".concat(e.method," defines parameters by position but received parameters by name")),r(e.params);else j&&j(e.method,e.params)}catch(n){n.message?T.error("Notification handler '".concat(e.method,"' failed with message: ").concat(n.message)):T.error("Notification handler '".concat(e.method,"' failed unexpectedly."))}else $.fire(e)}(e):o.Message.isResponse(e)?function(e){if(te())return;if(null===e.id)e.error?T.error("Received response message without id: Error is: \n".concat(JSON.stringify(e.error,void 0,4))):T.error("Received response message without id. No further error information provided.");else{const r=e.id,n=I.get(r);if(function(e,t){if(B===h.Off||!A)return;if(U===m.Text){let r;if(B!==h.Verbose&&B!==h.Compact||(e.error&&e.error.data?r="Error data: ".concat(ie(e.error.data),"\n\n"):e.result?r="Result: ".concat(ie(e.result),"\n\n"):void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?" Request failed: ".concat(e.error.message," (").concat(e.error.code,")."):"";A.log("Received response '".concat(t.method," - (").concat(e.id,")' in ").concat(Date.now()-t.timerStart,"ms.").concat(n),r)}else A.log("Received response ".concat(e.id," without active response promise."),r)}else ue("receive-response",e)}(e,n),void 0!==n){I.delete(r);try{if(e.error){const t=e.error;n.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(t){t.message?T.error("Response handler '".concat(n.method,"' failed with message: ").concat(t.message)):T.error("Response handler '".concat(n.method,"' failed unexpectedly."))}}}}(e):function(e){if(!e)return void T.error("Received empty message.");T.error("Received message which is neither a response nor a notification message:\n".concat(JSON.stringify(e,null,4)));const t=e;if(s.string(t.id)||s.number(t.id)){const e=t.id,r=I.get(e);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(re),e.onError(function(e){J.fire([e,void 0,void 0])}),r.onClose(re),r.onError(function(e){J.fire(e)});const oe=e=>{try{if(o.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,n=Q(t),s=D.get(n);if(o.Message.isRequest(s)){const o=null===b||void 0===b?void 0:b.connectionStrategy,i=o&&o.cancelUndispatched?o.cancelUndispatched(s,Y):void 0;if(i&&(void 0!==i.error||void 0!==i.result))return D.delete(n),z.delete(t),i.id=s.id,ae(i,e.method,Date.now()),void r.write(i).catch(()=>T.error("Sending response for canceled message failed."))}const i=z.get(t);if(void 0!==i)return i.cancel(),void ce(e);W.add(t)}X(D,e)}finally{ne()}};function ie(e){if(void 0!==e&&null!==e)switch(B){case h.Verbose:return JSON.stringify(e,null,4);case h.Compact:return JSON.stringify(e);default:return}}function ae(e,t,r){if(B!==h.Off&&A)if(U===m.Text){let n;B!==h.Verbose&&B!==h.Compact||(e.error&&e.error.data?n="Error data: ".concat(ie(e.error.data),"\n\n"):e.result?n="Result: ".concat(ie(e.result),"\n\n"):void 0===e.error&&(n="No result returned.\n\n")),A.log("Sending response '".concat(t," - (").concat(e.id,")'. Processing request took ").concat(Date.now()-r,"ms"),n)}else ue("send-response",e)}function ce(e){if(B!==h.Off&&A&&e.method!==y.type.method)if(U===m.Text){let t;B!==h.Verbose&&B!==h.Compact||(t=e.params?"Params: ".concat(ie(e.params),"\n\n"):"No parameters provided.\n\n"),A.log("Received notification '".concat(e.method,"'."),t)}else ue("receive-notification",e)}function ue(e,t){if(!A||B===h.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};A.log(r)}function le(){if(ee())throw new M(v.Closed,"Connection is closed.");if(te())throw new M(v.Disposed,"Connection is disposed.")}function de(e){return void 0===e?null:e}function fe(e){return null===e?void 0:e}function he(e){return void 0!==e&&null!==e&&!Array.isArray(e)&&"object"===typeof e}function pe(e,t){switch(e){case o.ParameterStructures.auto:return he(t)?fe(t):[de(t)];case o.ParameterStructures.byName:if(!he(t))throw new Error("Received parameters by name but param is not an object literal.");return fe(t);case o.ParameterStructures.byPosition:return[de(t)];default:throw new Error("Unknown parameter structure ".concat(e.toString()))}}function me(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=pe(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e<t.length&&e<n;e++)r.push(de(t[e]));if(t.length<n)for(let e=t.length;e<n;e++)r.push(null)}return r}const ge={sendNotification:function(e){let t,n;le();for(var i=arguments.length,a=new Array(i>1?i-1:0),c=1;c<i;c++)a[c-1]=arguments[c];if(s.string(e)){t=e;const r=a[0];let s=0,i=o.ParameterStructures.auto;o.ParameterStructures.is(r)&&(s=1,i=r);let c=a.length;const u=c-s;switch(u){case 0:n=void 0;break;case 1:n=pe(i,a[s]);break;default:if(i===o.ParameterStructures.byName)throw new Error("Received ".concat(u," parameters for 'by Name' notification parameter structure."));n=a.slice(s,c).map(e=>de(e))}}else{const r=a;t=e.method,n=me(e,r)}const u={jsonrpc:P,method:t,params:n};return function(e){if(B!==h.Off&&A)if(U===m.Text){let t;B!==h.Verbose&&B!==h.Compact||(t=e.params?"Params: ".concat(ie(e.params),"\n\n"):"No parameters provided.\n\n"),A.log("Sending notification '".concat(e.method,"'."),t)}else ue("send-notification",e)}(u),r.write(u).catch(e=>{throw T.error("Sending notification failed."),e})},onNotification:(e,t)=>{let r;return le(),s.func(e)?j=e:t&&(s.string(e)?(r=e,x.set(e,{type:void 0,handler:t})):(r=e.method,x.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==r?x.delete(r):j=void 0}}},onProgress:(e,t,r)=>{if(L.has(t))throw new Error("Progress handler for token ".concat(t," already registered"));return L.set(t,r),{dispose:()=>{L.delete(t)}}},sendProgress:(e,t,r)=>ge.sendNotification(d.type,{token:t,value:r}),onUnhandledProgress:H.event,sendRequest:function(e){let t,n,i;le(),function(){if(!Z())throw new Error("Call listen() first.")}();for(var a=arguments.length,u=new Array(a>1?a-1:0),l=1;l<a;l++)u[l-1]=arguments[l];if(s.string(e)){t=e;const r=u[0],s=u[u.length-1];let a=0,l=o.ParameterStructures.auto;o.ParameterStructures.is(r)&&(a=1,l=r);let d=u.length;c.CancellationToken.is(s)&&(d-=1,i=s);const f=d-a;switch(f){case 0:n=void 0;break;case 1:n=pe(l,u[a]);break;default:if(l===o.ParameterStructures.byName)throw new Error("Received ".concat(f," parameters for 'by Name' request parameter structure."));n=u.slice(a,d).map(e=>de(e))}}else{const r=u;t=e.method,n=me(e,r);const s=e.numberOfParams;i=c.CancellationToken.is(r[s])?r[s]:void 0}const d=w++;let f;i&&(f=i.onCancellationRequested(()=>{const e=K.sender.sendCancellation(ge,d);return void 0===e?(T.log("Received no promise from cancellation strategy when cancelling id ".concat(d)),Promise.resolve()):e.catch(()=>
1{T.log("Sending cancellation messages for id ".concat(d," failed"))})}));const p={jsonrpc:P,id:d,method:t,params:n};return function(e){if(B!==h.Off&&A)if(U===m.Text){let t;B!==h.Verbose&&B!==h.Compact||!e.params||(t="Params: ".concat(ie(e.params),"\n\n")),A.log("Sending request '".concat(e.method," - (").concat(e.id,")'."),t)}else ue("send-request",e)}(p),"function"===typeof K.sender.enableCancellation&&K.sender.enableCancellation(p),new Promise(async(e,n)=>{const s={method:t,timerStart:Date.now(),resolve:t=>{var r;e(t),K.sender.cleanup(d),null===(r=f)||void 0===r||r.dispose()},reject:e=>{var t;n(e),K.sender.cleanup(d),null===(t=f)||void 0===t||t.dispose()}};try{await r.write(p),I.set(d,s)}catch(i){throw T.error("Sending request failed."),s.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,i.message?i.message:"Unknown reason")),i}})},onRequest:(e,t)=>{le();let r=null;return f.is(e)?(r=void 0,N=e):s.string(e)?(r=null,void 0!==t&&(r=e,O.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,O.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==r&&(void 0!==r?O.delete(r):N=void 0)}}},hasPendingResponse:()=>I.size>0,trace:async(e,t,r)=>{let n=!1,o=m.Text;void 0!==r&&(s.boolean(r)?n=r:(n=r.sendNotification||!1,o=r.traceFormat||m.Text)),B=e,U=o,A=B===h.Off?void 0:t,!n||ee()||te()||await ge.sendNotification(g.type,{value:h.toString(e)})},onError:J.event,onClose:V.event,onUnhandledNotification:$.event,onDispose:G.event,end:()=>{r.end()},dispose:()=>{if(te())return;F=k.Disposed,G.fire(void 0);const t=new o.ResponseError(o.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of I.values())e.reject(t);I=new Map,z=new Map,W=new Set,D=new i.LinkedMap,s.func(r.dispose)&&r.dispose(),s.func(e.dispose)&&e.dispose()},listen:()=>{le(),function(){if(Z())throw new M(v.AlreadyListening,"Connection is already listening")}(),F=k.Listening,e.listen(oe)},inspect:()=>{(0,n.default)().console.log("inspect")}};return ge.onNotification(y.type,e=>{if(B===h.Off||!A)return;const t=B===h.Verbose||B===h.Compact;A.log(e.message,t?e.verbose:void 0)}),ge.onNotification(d.type,e=>{const t=L.get(e.token);t?t(e.value):H.fire(e)}),ge}},41888:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const n=r(71140);var s,o;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(s||(t.ErrorCodes=s={}));class i extends Error{constructor(e,t,r){super(t),this.code=n.number(e)?e:s.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,i.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=i;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c;t.RequestType0=class extends c{constructor(e){super(e,0)}};t.RequestType=class extends c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.auto;super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType1=class extends c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.auto;super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType2=class extends c{constructor(e){super(e,2)}};t.RequestType3=class extends c{constructor(e){super(e,3)}};t.RequestType4=class extends c{constructor(e){super(e,4)}};t.RequestType5=class extends c{constructor(e){super(e,5)}};t.RequestType6=class extends c{constructor(e){super(e,6)}};t.RequestType7=class extends c{constructor(e){super(e,7)}};t.RequestType8=class extends c{constructor(e){super(e,8)}};t.RequestType9=class extends c{constructor(e){super(e,9)}};t.NotificationType=class extends c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.auto;super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType0=class extends c{constructor(e){super(e,0)}};t.NotificationType1=class extends c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.auto;super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType2=class extends c{constructor(e){super(e,2)}};t.NotificationType3=class extends c{constructor(e){super(e,3)}};t.NotificationType4=class extends c{constructor(e){super(e,4)}};t.NotificationType5=class extends c{constructor(e){super(e,5)}};t.NotificationType6=class extends c{constructor(e){super(e,6)}};t.NotificationType7=class extends c{constructor(e){super(e,7)}};t.NotificationType8=class extends c{constructor(e){super(e,8)}};t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))},e.isNotification=function(e){const t=e;return t&&n.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(n.string(t.id)||n.number(t.id)||null===t.id)}}(o||(t.Message=o={}))},48708:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);
1s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0;r(18618).default.install();const o=r(40418);s(r(40418),t);class i extends o.AbstractMessageReader{constructor(e){super(),this._onData=new o.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=i;class a extends o.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,r,n){return void 0===r&&(r=o.NullLogger),o.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,o.createMessageConnection)(e,t,r,n)}},57264:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const n=r(97113);t.Semaphore=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,n.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},59910:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const n=r(97113),s=r(71140),o=r(35257),i=r(57264);var a,c;!function(e){e.is=function(e){let t=e;return t&&s.func(t.listen)&&s.func(t.dispose)&&s.func(t.onError)&&s.func(t.onClose)&&s.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class u{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}
1fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error("Reader received error. Reason: ".concat(s.string(e.message)?e.message:"unknown"))}}t.AbstractMessageReader=u,function(e){e.fromOptions=function(e){let t,r;const s=new Map;let o;const i=new Map;if(void 0===e||"string"===typeof e)t=null!==e&&void 0!==e?e:"utf-8";else{var a;if(t=null!==(a=e.charset)&&void 0!==a?a:"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,s.set(r.name,r)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)s.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(o=e.contentTypeDecoder,i.set(o.name,o)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)i.set(t.name,t)}return void 0===o&&(o=(0,n.default)().applicationJson.decoder,i.set(o.name,o)),{charset:t,contentDecoder:r,contentDecoders:s,contentTypeDecoder:o,contentTypeDecoders:i}}}(c||(c={}));t.ReadableStreamMessageReader=class extends u{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error("Header must provide a Content-Length property.\n".concat(JSON.stringify(Object.fromEntries(e)))));const r=parseInt(t);if(isNaN(r))return void this.fireError(new Error("Content-Length value must be a number. Got ".concat(t)));this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,r=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(r)}).catch(e=>{this.fireError(e)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,n.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},71140:(e,t)=>{function r(e){return"string"===typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"===typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"===typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every(e=>r(e))}},95815:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const n=r(97113),s=r(71140),o=r(35257);var i;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const r=t;return r&&(r===e.None||r===e.Cancelled||s.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}}(i||(t.CancellationToken=i={}));const a=Object.freeze(function(e,t){const r=(0,n.default)().timer.setTimeout(e.bind(t),0);
1return{dispose(){r.dispose()}}});class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=i.None}}},97113:(e,t)=>{let r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(n||(n={})),t.default=n}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.