sveld 0.38.2 → 0.38.4

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.
@@ -0,0 +1,13 @@
1
+ import{createRequire as Vp}from"node:module";var Op=Object.create;var{getPrototypeOf:vp,defineProperty:ei,getOwnPropertyNames:Mp}=Object;var ti=Object.prototype.hasOwnProperty;function qp(e){return this[e]}var Bp,Up,jp=(e,t,r)=>{var i=e!=null&&typeof e==="object";if(i){var s=t?Bp??=new WeakMap:Up??=new WeakMap,o=s.get(e);if(o)return o}r=e!=null?Op(vp(e)):{};let u=t||!e||!e.__esModule||!ti.call(e,"default")?ei(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let f of Mp(e))if(!ti.call(u,f))ei(u,f,{get:qp.bind(e,f),enumerable:!0})}if(i)s.set(e,u);return u};var re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var st=Vp(import.meta.url);var mt=re(function(Jc){Object.defineProperty(Jc,"__esModule",{value:!0});Jc.boolean=hd;Jc.string=Nc;Jc.number=dd;Jc.error=Td;Jc.func=gd;Jc.array=Lc;Jc.stringArray=yd;function hd(e){return e===!0||e===!1}function Nc(e){return typeof e==="string"||e instanceof String}function dd(e){return typeof e==="number"||e instanceof Number}function Td(e){return e instanceof Error}function gd(e){return typeof e==="function"}function Lc(e){return Array.isArray(e)}function yd(e){return Lc(e)&&e.every((t)=>Nc(t))}});var Tn=re(function(D){var Pd=D&&D.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Ad=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),bd=D&&D.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")Pd(r,t,i[s])}return Ad(r,t),r}}();Object.defineProperty(D,"__esModule",{value:!0});D.Message=D.NotificationType9=D.NotificationType8=D.NotificationType7=D.NotificationType6=D.NotificationType5=D.NotificationType4=D.NotificationType3=D.NotificationType2=D.NotificationType1=D.NotificationType0=D.NotificationType=D.RequestType9=D.RequestType8=D.RequestType7=D.RequestType6=D.RequestType5=D.RequestType4=D.RequestType3=D.RequestType2=D.RequestType1=D.RequestType=D.RequestType0=D.AbstractMessageSignature=D.ParameterStructures=D.ResponseError=D.ErrorCodes=void 0;var et=bd(mt()),hn;(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=-32000,e.serverErrorEnd=-32000})(hn||(D.ErrorCodes=hn={}));class dn extends Error{code;data;constructor(e,t,r){super(t);this.code=et.number(e)?e:hn.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,dn.prototype)}toJson(){let e={code:this.code,message:this.message};if(this.data!==void 0)e.data=this.data;return e}}D.ResponseError=dn;class fe{kind;static auto=new fe("auto");static byPosition=new fe("byPosition");static byName=new fe("byName");constructor(e){this.kind=e}static is(e){return e===fe.auto||e===fe.byName||e===fe.byPosition}toString(){return this.kind}}D.ParameterStructures=fe;class V{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return fe.auto}}D.AbstractMessageSignature=V;class Oc extends V{_;constructor(e){super(e,0)}}D.RequestType0=Oc;class vc extends V{_parameterStructures;_;constructor(e,t=fe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}D.RequestType=vc;class Mc extends V{_parameterStructures;_;constructor(e,t=fe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}D.RequestType1=Mc;class qc extends V{_;constructor(e){super(e,2)}}D.RequestType2=qc;class Bc extends V{_;constructor(e){super(e,3)}}D.RequestType3=Bc;class Uc extends V{_;constructor(e){super(e,4)}}D.RequestType4=Uc;class jc extends V{_;constructor(e){super(e,5)}}D.RequestType5=jc;class Vc extends V{_;constructor(e){super(e,6)}}D.RequestType6=Vc;class Wc extends V{_;constructor(e){super(e,7)}}D.RequestType7=Wc;class zc extends V{_;constructor(e){super(e,8)}}D.RequestType8=zc;class Hc extends V{_;constructor(e){super(e,9)}}D.RequestType9=Hc;class Gc extends V{_parameterStructures;_;constructor(e,t=fe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}D.NotificationType=Gc;class $c extends V{_;constructor(e){super(e,0)}}D.NotificationType0=$c;class Fc extends V{_parameterStructures;_;constructor(e,t=fe.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}D.NotificationType1=Fc;class Qc extends V{_;constructor(e){super(e,2)}}D.NotificationType2=Qc;class Yc extends V{_;constructor(e){super(e,3)}}D.NotificationType3=Yc;class Xc extends V{_;constructor(e){super(e,4)}}D.NotificationType4=Xc;class Zc extends V{_;constructor(e){super(e,5)}}D.NotificationType5=Zc;class Kc extends V{_;constructor(e){super(e,6)}}D.NotificationType6=Kc;class eu extends V{_;constructor(e){super(e,7)}}D.NotificationType7=eu;class tu extends V{_;constructor(e){super(e,8)}}D.NotificationType8=tu;class ru extends V{_;constructor(e){super(e,9)}}D.NotificationType9=ru;var Rc;(function(e){function t(s){let o=s;return o&&et.string(o.method)&&(et.string(o.id)||et.number(o.id))}e.isRequest=t;function r(s){let o=s;return o&&et.string(o.method)&&s.id===void 0}e.isNotification=r;function i(s){let o=s;return o&&(o.result!==void 0||!!o.error)&&(et.string(o.id)||et.number(o.id)||o.id===null)}e.isResponse=i})(Rc||(D.Message=Rc={}))});var yn=re(function(iu){Object.defineProperty(iu,"__esModule",{value:!0});iu.LRUCache=iu.LinkedMap=iu.Touch=void 0;var ne;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(ne||(iu.Touch=ne={}));class gn{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){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(){return this._head?.value}get last(){return this._tail?.value}before(e){let t=this._map.get(e);return t?t.previous?.value:void 0}after(e){let t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=ne.None){let r=this._map.get(e);if(!r)return;if(t!==ne.None)this.touch(r,t);return r.value}set(e,t,r=ne.None){let i=this._map.get(e);if(i){if(i.value=t,r!==ne.None)this.touch(i,r)}else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case ne.None:this.addItemLast(i);break;case ne.First:this.addItemFirst(i);break;case ne.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(!t)return;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 Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;while(i){if(t)e.bind(t)(i.value,i.key,this);else e(i.value,i.key,this);if(this._state!==r)throw Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;while(t&&r>e)this._map.delete(t.key),t=t.next,r--;if(this._head=t,this._size=r,t)t.previous=void 0;this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(!this._head)throw Error("Invalid list");else e.next=this._head,this._head.previous=e;this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(!this._tail)throw Error("Invalid list");else e.previous=this._tail,this._tail.next=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 Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let{next:t,previous:r}=e;if(!t||!r)throw 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 Error("Invalid list");if(t!==ne.First&&t!==ne.Last)return;if(t===ne.First){if(e===this._head)return;let{next:r,previous:i}=e;if(e===this._tail)i.next=void 0,this._tail=i;else r.previous=i,i.next=r;e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===ne.Last){if(e===this._tail)return;let{next:r,previous:i}=e;if(e===this._head)r.previous=void 0,this._head=r;else r.previous=i,i.next=r;e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}}iu.LinkedMap=gn;class nu extends gn{_limit;_ratio;constructor(e,t=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,t=ne.AsNew){return super.get(e,t)}peek(e){return super.get(e,ne.None)}set(e,t){return super.set(e,t,ne.Last),this.checkTrim(),this}checkTrim(){if(this.size>this._limit)this.trimOld(Math.round(this._limit*this._ratio))}}iu.LRUCache=nu});var uu=re(function(au){Object.defineProperty(au,"__esModule",{value:!0});au.Disposable=void 0;var ou;(function(e){function t(r){return{dispose:r}}e.create=t})(ou||(au.Disposable=ou={}))});var Ue=re(function(pu){Object.defineProperty(pu,"__esModule",{value:!0});var xn;function En(){if(xn===void 0)throw Error("No runtime abstraction layer installed");return xn}(function(e){function t(r){if(r===void 0)throw Error("No runtime abstraction layer provided");xn=r}e.install=t})(En||(En={}));pu.default=En});var ht=re(function(je){var Ld=je&&je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(je,"__esModule",{value:!0});je.Emitter=je.Event=void 0;var Jd=Ld(Ue()),lu;(function(e){let t={dispose(){}};e.None=function(){return t}})(lu||(je.Event=lu={}));class fu{_callbacks;_contexts;add(e,t=null,r){if(!this._callbacks)this._callbacks=[],this._contexts=[];if(this._callbacks.push(e),this._contexts.push(t),Array.isArray(r))r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i<s;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=r.length;s<o;s++)try{t.push(r[s].apply(i[s],e))}catch(u){(0,Jd.default)().console.error(u)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}}class kn{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){if(!this._event)this._event=(e,t,r)=>{if(!this._callbacks)this._callbacks=new fu;if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty())this._options.onFirstListenerAdd(this);this._callbacks.add(e,t);let i={dispose:()=>{if(!this._callbacks)return;if(this._callbacks.remove(e,t),i.dispose=kn._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty())this._options.onLastListenerRemove(this)}};if(Array.isArray(r))r.push(i);return i};return this._event}fire(e){if(this._callbacks)this._callbacks.invoke.call(this._callbacks,e)}dispose(){if(this._callbacks)this._callbacks.dispose(),this._callbacks=void 0}}je.Emitter=kn});var yr=re(function(ue){var Rd=ue&&ue.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Od=ue&&ue.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vd=ue&&ue.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")Rd(r,t,i[s])}return Od(r,t),r}}(),Md=ue&&ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ue,"__esModule",{value:!0});ue.CancellationTokenSource=ue.CancellationToken=void 0;var qd=Md(Ue()),Bd=vd(mt()),dt=ht(),gr;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:dt.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:dt.Event.None});function t(r){let i=r;return i&&(i===e.None||i===e.Cancelled||Bd.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}e.is=t})(gr||(ue.CancellationToken=gr={}));var Ud=Object.freeze(function(e,t){let r=(0,qd.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}});class wn{_isCancelled=!1;_emitter;cancel(){if(!this._isCancelled){if(this._isCancelled=!0,this._emitter)this._emitter.fire(void 0),this.dispose()}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled)return Ud;if(!this._emitter)this._emitter=new dt.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}}class mu{_token;get token(){if(!this._token)this._token=new wn;return this._token}cancel(){if(!this._token)this._token=gr.Cancelled;else this._token.cancel()}dispose(){if(!this._token)this._token=gr.None;else if(this._token instanceof wn)this._token.dispose()}}ue.CancellationTokenSource=mu});var ku=re(function(xu){Object.defineProperty(xu,"__esModule",{value:!0});xu.SharedArrayReceiverStrategy=xu.SharedArraySenderStrategy=void 0;var hu=yr(),jt;(function(e){e.Continue=0,e.Cancelled=1})(jt||(jt={}));class du{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=jt.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,jt.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}}xu.SharedArraySenderStrategy=du;class Tu{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===jt.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class gu{token;constructor(e){this.token=new Tu(e)}cancel(){}dispose(){}}class yu{kind="request";createCancellationTokenSource(e){let t=e.$cancellationData;if(t===void 0)return new hu.CancellationTokenSource;return new gu(t)}}xu.SharedArrayReceiverStrategy=yu});var Dn=re(function(Tt){var Vd=Tt&&Tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.Semaphore=void 0;var Wd=Vd(Ue());class wu{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw 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(){if(this._waiting.length===0||this._active===this._capacity)return;(0,Wd.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error("Too many thunks active");try{let t=e.thunk();if(t instanceof Promise)t.then((r)=>{this._active--,e.resolve(r),this.runNext()},(r)=>{this._active--,e.reject(r),this.runNext()});else this._active--,e.resolve(t),this.runNext()}catch(t){this._active--,e.reject(t),this.runNext()}}}Tt.Semaphore=wu});var Pu=re(function(ie){var zd=ie&&ie.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Hd=ie&&ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Gd=ie&&ie.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")zd(r,t,i[s])}return Hd(r,t),r}}(),$d=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ie,"__esModule",{value:!0});ie.ReadableStreamMessageReader=ie.AbstractMessageReader=ie.MessageReader=void 0;var Sn=$d(Ue()),gt=Gd(mt()),yt=ht(),Su=Dn(),Du;(function(e){function t(r){let i=r;return i&&gt.func(i.listen)&&gt.func(i.dispose)&&gt.func(i.onError)&&gt.func(i.onClose)&&gt.func(i.onPartialMessage)}e.is=t})(Du||(ie.MessageReader=Du={}));class Pn{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new yt.Emitter,this.closeEmitter=new yt.Emitter,this.partialMessageEmitter=new yt.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose(),this.partialMessageEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(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){if(e instanceof Error)return e;else return Error(`Reader received error. Reason: ${gt.string(e.message)?e.message:"unknown"}`)}}ie.AbstractMessageReader=Pn;var _n;(function(e){function t(r){let i,s,o,u=new Map,f,E=new Map;if(r===void 0||typeof r==="string")i=r??"utf-8";else{if(i=r.charset??"utf-8",r.contentDecoder!==void 0)o=r.contentDecoder,u.set(o.name,o);if(r.contentDecoders!==void 0)for(let P of r.contentDecoders)u.set(P.name,P);if(r.contentTypeDecoder!==void 0)f=r.contentTypeDecoder,E.set(f.name,f);if(r.contentTypeDecoders!==void 0)for(let P of r.contentTypeDecoders)E.set(P.name,P)}if(f===void 0)f=(0,Sn.default)().applicationJson.decoder,E.set(f.name,f);return{charset:i,contentDecoder:o,contentDecoders:u,contentTypeDecoder:f,contentTypeDecoders:E}}e.fromOptions=t})(_n||(_n={}));class _u extends Pn{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super();this.readable=e,this.options=_n.fromOptions(t),this.buffer=(0,Sn.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new Su.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;let t=this.readable.onData((r)=>{this.onData(r)});return this.readable.onError((r)=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{this.buffer.append(e);while(!0){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(Error(`Header must provide a Content-Length property.
2
+ ${JSON.stringify(Object.fromEntries(r))}`));return}let s=parseInt(i);if(isNaN(s)){this.fireError(Error(`Content-Length value must be a number. Got ${i}`));return}this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch((r)=>{this.fireError(r)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){if(this.partialMessageTimer)this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0}setPartialMessageTimer(){if(this.clearPartialMessageTimer(),this._partialMessageTimeout<=0)return;this.partialMessageTimer=(0,Sn.default)().timer.setTimeout((e,t)=>{if(this.partialMessageTimer=void 0,e===this.messageToken)this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer()},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout)}}ie.ReadableStreamMessageReader=_u});var Lu=re(function(se){var Fd=se&&se.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),Qd=se&&se.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Yd=se&&se.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")Fd(r,t,i[s])}return Qd(r,t),r}}(),Xd=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(se,"__esModule",{value:!0});se.WriteableStreamMessageWriter=se.AbstractMessageWriter=se.MessageWriter=void 0;var Au=Xd(Ue()),Vt=Yd(mt()),Cu=Dn(),xr=ht(),Zd="Content-Length: ",bu=`\r
3
+ `,Iu;(function(e){function t(r){let i=r;return i&&Vt.func(i.dispose)&&Vt.func(i.onClose)&&Vt.func(i.onError)&&Vt.func(i.write)}e.is=t})(Iu||(se.MessageWriter=Iu={}));class bn{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new xr.Emitter,this.closeEmitter=new xr.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){if(e instanceof Error)return e;else return Error(`Writer received error. Reason: ${Vt.string(e.message)?e.message:"unknown"}`)}}se.AbstractMessageWriter=bn;var An;(function(e){function t(r){if(r===void 0||typeof r==="string")return{charset:r??"utf-8",contentTypeEncoder:(0,Au.default)().applicationJson.encoder};else return{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,Au.default)().applicationJson.encoder}}e.fromOptions=t})(An||(An={}));class Nu extends bn{writable;options;errorCount;writeSemaphore;constructor(e,t){super();this.writable=e,this.options=An.fromOptions(t),this.errorCount=0,this.writeSemaphore=new Cu.Semaphore(1),this.writable.onError((r)=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then((r)=>{if(this.options.contentEncoder!==void 0)return this.options.contentEncoder.encode(r);else return r}).then((r)=>{let i=[];return i.push(Zd,r.byteLength.toString(),bu),i.push(bu),this.doWrite(e,i,r)},(r)=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}se.WriteableStreamMessageWriter=Nu});var vu=re(function(Ru){Object.defineProperty(Ru,"__esModule",{value:!0});Ru.AbstractMessageBuffer=void 0;var Kd=13,eT=10,tT=`\r
4
+ `;class Ju{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,s=0;e:while(r<this._chunks.length){let E=this._chunks[r];i=0;while(i<E.length){switch(E[i]){case Kd:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case eT:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}s+=E.byteLength,r++}if(t!==4)return;let o=this._read(s+i),u=new Map,f=this.toString(o,"ascii").split(tT);if(f.length<2)return u;for(let E=0;E<f.length-2;E++){let P=f[E],N=P.indexOf(":");if(N===-1)throw Error(`Message header must separate key and value using ':'
5
+ ${P}`);let U=P.substr(0,N),M=P.substr(N+1).trim();u.set(e?U.toLowerCase():U,M)}return u}tryReadBody(e){if(this._totalLength<e)return;return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let s=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(s)}if(this._chunks[0].byteLength>e){let s=this._chunks[0],o=this.asNative(s,e);return this._chunks[0]=s.slice(e),this._totalLength-=e,o}let t=this.allocNative(e),r=0,i=0;while(e>0){let s=this._chunks[i];if(s.byteLength>e){let o=s.slice(0,e);t.set(o,r),r+=e,this._chunks[i]=s.slice(e),this._totalLength-=e,e-=e}else t.set(s,r),r+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength}return t}}Ru.AbstractMessageBuffer=Ju});var Uu=re(function(A){var rT=A&&A.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),nT=A&&A.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),iT=A&&A.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")rT(r,t,i[s])}return nT(r,t),r}}(),sT=A&&A.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:!0});A.ConnectionOptions=A.MessageStrategy=A.CancellationStrategy=A.CancellationSenderStrategy=A.CancellationReceiverStrategy=A.RequestCancellationReceiverStrategy=A.IdCancellationReceiverStrategy=A.ConnectionStrategy=A.ConnectionError=A.ConnectionErrors=A.LogTraceNotification=A.SetTraceNotification=A.TraceFormat=A.TraceValues=A.TraceValue=A.Trace=A.NullLogger=A.ProgressType=A.ProgressToken=void 0;A.createMessageConnection=oT;var Mu=sT(Ue()),z=iT(mt()),y=Tn(),Er=yn(),Ae=ht(),Et=yr(),Ht;(function(e){e.type=new y.NotificationType("$/cancelRequest")})(Ht||(Ht={}));var In;(function(e){function t(r){return typeof r==="string"||typeof r==="number"}e.is=t})(In||(A.ProgressToken=In={}));var Wt;(function(e){e.type=new y.NotificationType("$/progress")})(Wt||(Wt={}));class Bu{__;_pr;constructor(){}}A.ProgressType=Bu;var Cn;(function(e){function t(r){return z.func(r)}e.is=t})(Cn||(Cn={}));A.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var O;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(O||(A.Trace=O={}));var Nn;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Nn||(A.TraceValue=Nn={}));A.TraceValues=Nn;(function(e){function t(i){if(!z.string(i))return e.Off;switch(i=i.toLowerCase(),i){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function r(i){switch(i){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=r})(O||(A.Trace=O={}));var me;(function(e){e.Text="text",e.JSON="json"})(me||(A.TraceFormat=me={}));(function(e){function t(r){if(!z.string(r))return e.Text;if(r=r.toLowerCase(),r==="json")return e.JSON;else return e.Text}e.fromString=t})(me||(A.TraceFormat=me={}));var Ln;(function(e){e.type=new y.NotificationType("$/setTrace")})(Ln||(A.SetTraceNotification=Ln={}));var kr;(function(e){e.type=new y.NotificationType("$/logTrace")})(kr||(A.LogTraceNotification=kr={}));var zt;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(zt||(A.ConnectionErrors=zt={}));class xt extends Error{code;constructor(e,t){super(t);this.code=e,Object.setPrototypeOf(this,xt.prototype)}}A.ConnectionError=xt;var Jn;(function(e){function t(r){let i=r;return i&&z.func(i.cancelUndispatched)}e.is=t})(Jn||(A.ConnectionStrategy=Jn={}));var wr;(function(e){function t(r){let i=r;return i&&(i.kind===void 0||i.kind==="id")&&z.func(i.createCancellationTokenSource)&&(i.dispose===void 0||z.func(i.dispose))}e.is=t})(wr||(A.IdCancellationReceiverStrategy=wr={}));var Rn;(function(e){function t(r){let i=r;return i&&i.kind==="request"&&z.func(i.createCancellationTokenSource)&&(i.dispose===void 0||z.func(i.dispose))}e.is=t})(Rn||(A.RequestCancellationReceiverStrategy=Rn={}));var Dr;(function(e){e.Message=Object.freeze({createCancellationTokenSource(r){return new Et.CancellationTokenSource}});function t(r){return wr.is(r)||Rn.is(r)}e.is=t})(Dr||(A.CancellationReceiverStrategy=Dr={}));var Sr;(function(e){e.Message=Object.freeze({sendCancellation(r,i){return r.sendNotification(Ht.type,{id:i})},cleanup(r){}});function t(r){let i=r;return i&&z.func(i.sendCancellation)&&z.func(i.cleanup)}e.is=t})(Sr||(A.CancellationSenderStrategy=Sr={}));var _r;(function(e){e.Message=Object.freeze({receiver:Dr.Message,sender:Sr.Message});function t(r){let i=r;return i&&Dr.is(i.receiver)&&Sr.is(i.sender)}e.is=t})(_r||(A.CancellationStrategy=_r={}));var Pr;(function(e){function t(r){let i=r;return i&&z.func(i.handleMessage)}e.is=t})(Pr||(A.MessageStrategy=Pr={}));var qu;(function(e){function t(r){let i=r;return i&&(_r.is(i.cancellationStrategy)||Jn.is(i.connectionStrategy)||Pr.is(i.messageStrategy)||z.number(i.maxParallelism))}e.is=t})(qu||(A.ConnectionOptions=qu={}));var ke;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(ke||(ke={}));function oT(e,t,r,i){let s=r!==void 0?r:A.NullLogger,o=0,u=0,f=0,E="2.0",P=i?.maxParallelism??-1,N=0,U=void 0,M=new Map,Y=void 0,pe=new Map,Ie=new Map,tt,Te=new Er.LinkedMap,we=new Map,rt=new Set,ve=new Map,v=O.Off,ge=me.Text,H,he=ke.New,De=new Ae.Emitter,$t=new Ae.Emitter,Ce=new Ae.Emitter,J=new Ae.Emitter,le=new Ae.Emitter,ae=i&&i.cancellationStrategy?i.cancellationStrategy:_r.Message;function Ne(p){return}function Le(){return he===ke.Listening}function Gn(){return he===ke.Closed}function nt(){return he===ke.Disposed}function $n(){if(he===ke.New||he===ke.Listening)he=ke.Closed,$t.fire(void 0)}function xp(p){De.fire([p,void 0,void 0])}function Ep(p){De.fire(p)}e.onClose($n),e.onError(xp),t.onClose($n),t.onError(Ep);function Fn(p){if(p===null)throw Error("Can't send requests with id null since the response can't be correlated.");return"req-"+p.toString()}function kp(p){if(p===null)return"res-unknown-"+(++f).toString();else return"res-"+p.toString()}function wp(){return"not-"+(++u).toString()}function Dp(p,g){if(y.Message.isRequest(g))p.set(Fn(g.id),g);else if(y.Message.isResponse(g))if(P===-1)p.set(kp(g.id),g);else Yn(g);else p.set(wp(),g)}function Rr(){if(tt||Te.size===0)return;if(P!==-1&&N>=P)return;tt=(0,Mu.default)().timer.setImmediate(async()=>{if(tt=void 0,Te.size===0)return;if(P!==-1&&N>=P)return;let p=Te.shift(),g;try{N++;let x=i?.messageStrategy;if(Pr.is(x))g=x.handleMessage(p,Qn);else g=Qn(p)}catch(x){s.error(`Processing message queue failed: ${x.toString()}`)}finally{if(g instanceof Promise)g.then(()=>{N--,Rr()}).catch((x)=>{s.error(`Processing message queue failed: ${x.toString()}`)});else N--;Rr()}})}async function Qn(p){if(y.Message.isRequest(p))return _p(p);else if(y.Message.isNotification(p))return Pp(p);else if(y.Message.isResponse(p))return Yn(p);else return Ap(p)}let Sp=(p)=>{try{if(y.Message.isNotification(p)&&p.method===Ht.type.method){let g=p.params.id,x=Fn(g),S=Te.get(x);if(y.Message.isRequest(S)){let W=i?.connectionStrategy,q=W&&W.cancelUndispatched?W.cancelUndispatched(S,Ne):Ne(S);if(q&&(q.error!==void 0||q.result!==void 0)){Te.delete(x),ve.delete(g),q.id=S.id,Or(q,p.method,Date.now()),t.write(q).catch(()=>s.error("Sending response for canceled message failed."));return}}let R=ve.get(g);if(R!==void 0){R.cancel(),vr(p);return}else rt.add(g)}Dp(Te,p)}finally{Rr()}};async function _p(p){if(nt())return Promise.resolve();function g(Z,te,G){let F={jsonrpc:E,id:p.id};if(Z instanceof y.ResponseError)F.error=Z.toJson();else F.result=Z===void 0?null:Z;return Or(F,te,G),t.write(F)}function x(Z,te,G){let F={jsonrpc:E,id:p.id,error:Z.toJson()};return Or(F,te,G),t.write(F)}Cp(p);let S=M.get(p.method),R,W;if(S)R=S.type,W=S.handler;let q=Date.now();if(W||U){let Z=p.id??String(Date.now()),te=wr.is(ae.receiver)?ae.receiver.createCancellationTokenSource(Z):ae.receiver.createCancellationTokenSource(p);if(p.id!==null&&rt.has(p.id))te.cancel();if(p.id!==null)ve.set(Z,te);try{let G;if(W)if(p.params===void 0){if(R!==void 0&&R.numberOfParams!==0)return x(new y.ResponseError(y.ErrorCodes.InvalidParams,`Request ${p.method} defines ${R.numberOfParams} params but received none.`),p.method,q);G=W(te.token)}else if(Array.isArray(p.params)){if(R!==void 0&&R.parameterStructures===y.ParameterStructures.byName)return x(new y.ResponseError(y.ErrorCodes.InvalidParams,`Request ${p.method} defines parameters by name but received parameters by position`),p.method,q);G=W(...p.params,te.token)}else{if(R!==void 0&&R.parameterStructures===y.ParameterStructures.byPosition)return x(new y.ResponseError(y.ErrorCodes.InvalidParams,`Request ${p.method} defines parameters by position but received parameters by name`),p.method,q);G=W(p.params,te.token)}else if(U)G=U(p.method,p.params,te.token);let F=await G;await g(F,p.method,q)}catch(G){if(G instanceof y.ResponseError)await g(G,p.method,q);else if(G&&z.string(G.message))await x(new y.ResponseError(y.ErrorCodes.InternalError,`Request ${p.method} failed with message: ${G.message}`),p.method,q);else await x(new y.ResponseError(y.ErrorCodes.InternalError,`Request ${p.method} failed unexpectedly without providing any details.`),p.method,q)}finally{ve.delete(Z)}}else await x(new y.ResponseError(y.ErrorCodes.MethodNotFound,`Unhandled method ${p.method}`),p.method,q)}function Yn(p){if(nt())return;if(p.id===null)if(p.error)s.error(`Received response message without id: Error is:
6
+ ${JSON.stringify(p.error,void 0,4)}`);else s.error("Received response message without id. No further error information provided.");else{let g=p.id,x=we.get(g);if(Np(p,x),x!==void 0){we.delete(g);try{if(p.error){let S=p.error;x.reject(new y.ResponseError(S.code,S.message,S.data))}else if(p.result!==void 0)x.resolve(p.result);else throw Error("Should never happen.")}catch(S){if(S.message)s.error(`Response handler '${x.method}' failed with message: ${S.message}`);else s.error(`Response handler '${x.method}' failed unexpectedly.`)}}}}async function Pp(p){if(nt())return;let g=void 0,x;if(p.method===Ht.type.method){let S=p.params.id;rt.delete(S),vr(p);return}else{let S=pe.get(p.method);if(S)x=S.handler,g=S.type}if(x||Y)try{if(vr(p),x)if(p.params===void 0){if(g!==void 0){if(g.numberOfParams!==0&&g.parameterStructures!==y.ParameterStructures.byName)s.error(`Notification ${p.method} defines ${g.numberOfParams} params but received none.`)}await x()}else if(Array.isArray(p.params)){let S=p.params;if(p.method===Wt.type.method&&S.length===2&&In.is(S[0]))await x({token:S[0],value:S[1]});else{if(g!==void 0){if(g.parameterStructures===y.ParameterStructures.byName)s.error(`Notification ${p.method} defines parameters by name but received parameters by position`);if(g.numberOfParams!==p.params.length)s.error(`Notification ${p.method} defines ${g.numberOfParams} params but received ${S.length} arguments`)}await x(...S)}}else{if(g!==void 0&&g.parameterStructures===y.ParameterStructures.byPosition)s.error(`Notification ${p.method} defines parameters by position but received parameters by name`);await x(p.params)}else if(Y)await Y(p.method,p.params)}catch(S){if(S.message)s.error(`Notification handler '${p.method}' failed with message: ${S.message}`);else s.error(`Notification handler '${p.method}' failed unexpectedly.`)}else Ce.fire(p)}function Ap(p){if(!p){s.error("Received empty message.");return}s.error(`Received message which is neither a response nor a notification message:
7
+ ${JSON.stringify(p,null,4)}`);let g=p;if(z.string(g.id)||z.number(g.id)){let x=g.id,S=we.get(x);if(S)S.reject(Error("The received response has neither a result nor an error property."))}}function Me(p){if(p===void 0||p===null)return;switch(v){case O.Verbose:return JSON.stringify(p,null,4);case O.Compact:return JSON.stringify(p);default:return}}function bp(p){if(v===O.Off||!H)return;if(ge===me.Text){let g=void 0;if((v===O.Verbose||v===O.Compact)&&p.params)g=`Params: ${Me(p.params)}`;H.log(`Sending request '${p.method} - (${p.id})'.`,g)}else it("send-request",p)}function Ip(p){if(v===O.Off||!H)return;if(ge===me.Text){let g=void 0;if(v===O.Verbose||v===O.Compact)if(p.params)g=`Params: ${Me(p.params)}`;else g="No parameters provided.";H.log(`Sending notification '${p.method}'.`,g)}else it("send-notification",p)}function Or(p,g,x){if(v===O.Off||!H)return;if(ge===me.Text){let S=void 0;if(v===O.Verbose||v===O.Compact){if(p.error&&p.error.data)S=`Error data: ${Me(p.error.data)}`;else if(p.result)S=`Result: ${Me(p.result)}`;else if(p.error===void 0)S="No result returned."}H.log(`Sending response '${g} - (${p.id})'. Processing request took ${Date.now()-x}ms`,S)}else it("send-response",p)}function Cp(p){if(v===O.Off||!H)return;if(ge===me.Text){let g=void 0;if((v===O.Verbose||v===O.Compact)&&p.params)g=`Params: ${Me(p.params)}`;H.log(`Received request '${p.method} - (${p.id})'.`,g)}else it("receive-request",p)}function vr(p){if(v===O.Off||!H||p.method===kr.type.method)return;if(ge===me.Text){let g=void 0;if(v===O.Verbose||v===O.Compact)if(p.params)g=`Params: ${Me(p.params)}`;else g="No parameters provided.";H.log(`Received notification '${p.method}'.`,g)}else it("receive-notification",p)}function Np(p,g){if(v===O.Off||!H)return;if(ge===me.Text){let x=void 0;if(v===O.Verbose||v===O.Compact){if(p.error&&p.error.data)x=`Error data: ${Me(p.error.data)}`;else if(p.result)x=`Result: ${Me(p.result)}`;else if(p.error===void 0)x="No result returned."}if(g){let S=p.error?` Request failed: ${p.error.message} (${p.error.code}).`:"";H.log(`Received response '${g.method} - (${p.id})' in ${Date.now()-g.timerStart}ms.${S}`,x)}else H.log(`Received response ${p.id} without active response promise.`,x)}else it("receive-response",p)}function it(p,g){if(!H||v===O.Off)return;let x={isLSPMessage:!0,type:p,message:g,timestamp:Date.now()};H.log(x)}function Pt(){if(Gn())throw new xt(zt.Closed,"Connection is closed.");if(nt())throw new xt(zt.Disposed,"Connection is disposed.")}function Lp(){if(Le())throw new xt(zt.AlreadyListening,"Connection is already listening")}function Jp(){if(!Le())throw Error("Call listen() first.")}function At(p){if(p===void 0)return null;else return p}function Xn(p){if(p===null)return;else return p}function Zn(p){return p!==void 0&&p!==null&&!Array.isArray(p)&&typeof p==="object"}function Mr(p,g){switch(p){case y.ParameterStructures.auto:if(Zn(g))return Xn(g);else return[At(g)];case y.ParameterStructures.byName:if(!Zn(g))throw Error("Received parameters by name but param is not an object literal.");return Xn(g);case y.ParameterStructures.byPosition:return[At(g)];default:throw Error(`Unknown parameter structure ${p.toString()}`)}}function Kn(p,g){let x,S=p.numberOfParams;switch(S){case 0:x=void 0;break;case 1:x=Mr(p.parameterStructures,g[0]);break;default:x=[];for(let R=0;R<g.length&&R<S;R++)x.push(At(g[R]));if(g.length<S)for(let R=g.length;R<S;R++)x.push(null);break}return x}let We={sendNotification:(p,...g)=>{Pt();let x,S;if(z.string(p)){x=p;let W=g[0],q=0,Z=y.ParameterStructures.auto;if(y.ParameterStructures.is(W))q=1,Z=W;let te=g.length,G=te-q;switch(G){case 0:S=void 0;break;case 1:S=Mr(Z,g[q]);break;default:if(Z===y.ParameterStructures.byName)throw Error(`Received ${G} parameters for 'by Name' notification parameter structure.`);S=g.slice(q,te).map((F)=>At(F));break}}else{let W=g;x=p.method,S=Kn(p,W)}let R={jsonrpc:E,method:x,params:S};return Ip(R),t.write(R).catch((W)=>{throw s.error("Sending notification failed."),W})},onNotification:(p,g)=>{Pt();let x;if(z.func(p))Y=p;else if(g)if(z.string(p))x=p,pe.set(p,{type:void 0,handler:g});else x=p.method,pe.set(p.method,{type:p,handler:g});return{dispose:()=>{if(x!==void 0){if(pe.get(x)?.handler===g)pe.delete(x)}else if(Y===p)Y=void 0}}},onProgress:(p,g,x)=>{if(Ie.has(g))throw Error(`Progress handler for token ${g} already registered`);return Ie.set(g,x),{dispose:()=>{if(Ie.get(g)===x)Ie.delete(g)}}},sendProgress:(p,g,x)=>We.sendNotification(Wt.type,{token:g,value:x}),onUnhandledProgress:J.event,sendRequest:(p,...g)=>{Pt(),Jp();function x(F,ye){let Je=ae.sender.sendCancellation(F,ye);if(Je===void 0)s.log(`Received no promise from cancellation strategy when cancelling id ${ye}`);else Je.catch(()=>{s.log(`Sending cancellation messages for id ${ye} failed.`)})}let S,R,W=void 0;if(z.string(p)){S=p;let F=g[0],ye=g[g.length-1],Je=0,bt=y.ParameterStructures.auto;if(y.ParameterStructures.is(F))Je=1,bt=F;let ze=g.length;if(Et.CancellationToken.is(ye))ze=ze-1,W=ye;let Se=ze-Je;switch(Se){case 0:R=void 0;break;case 1:R=Mr(bt,g[Je]);break;default:if(bt===y.ParameterStructures.byName)throw Error(`Received ${Se} parameters for 'by Name' request parameter structure.`);R=g.slice(Je,ze).map((Rp)=>At(Rp));break}}else{let F=g;S=p.method,R=Kn(p,F);let ye=p.numberOfParams;W=Et.CancellationToken.is(F[ye])?F[ye]:void 0}let q=o++,Z,te=!1;if(W!==void 0)if(W.isCancellationRequested)te=!0;else Z=W.onCancellationRequested(()=>{x(We,q)});let G={jsonrpc:E,id:q,method:S,params:R};if(bp(G),typeof ae.sender.enableCancellation==="function")ae.sender.enableCancellation(G);return new Promise(async(F,ye)=>{let Je=(Se)=>{F(Se),ae.sender.cleanup(q),Z?.dispose()},bt=(Se)=>{ye(Se),ae.sender.cleanup(q),Z?.dispose()},ze={method:S,timerStart:Date.now(),resolve:Je,reject:bt};try{if(we.set(q,ze),await t.write(G),te)x(We,q)}catch(Se){throw we.delete(q),ze.reject(new y.ResponseError(y.ErrorCodes.MessageWriteError,Se.message?Se.message:"Unknown reason")),s.error("Sending request failed."),Se}})},onRequest:(p,g)=>{Pt();let x=null;if(Cn.is(p))x=void 0,U=p;else if(z.string(p)){if(x=null,g!==void 0)x=p,M.set(p,{handler:g,type:void 0})}else if(g!==void 0)x=p.method,M.set(p.method,{type:p,handler:g});return{dispose:()=>{if(x===null)return;if(x!==void 0){if(M.get(x)?.handler===g)M.delete(x)}else if(U===p)U=void 0}}},hasPendingResponse:()=>we.size>0,trace:async(p,g,x)=>{let S=!1,R=me.Text;if(x!==void 0)if(z.boolean(x))S=x;else S=x.sendNotification||!1,R=x.traceFormat||me.Text;if(v=p,ge=R,v===O.Off)H=void 0;else H=g;if(S&&!Gn()&&!nt())await We.sendNotification(Ln.type,{value:O.toString(p)})},onError:De.event,onClose:$t.event,onUnhandledNotification:Ce.event,onDispose:le.event,end:()=>{t.end()},dispose:()=>{if(nt())return;he=ke.Disposed,le.fire(void 0);let p=new y.ResponseError(y.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let g of we.values())g.reject(p);if(we=new Map,ve=new Map,rt=new Set,Te=new Er.LinkedMap,z.func(t.dispose))t.dispose();if(z.func(e.dispose))e.dispose()},listen:()=>{Pt(),Lp(),he=ke.Listening,e.listen(Sp)},inspect:()=>{(0,Mu.default)().console.log("inspect")}};return We.onNotification(kr.type,(p)=>{if(v===O.Off||!H)return;let g=v===O.Verbose||v===O.Compact;H.log(p.message,g?p.verbose:void 0)}),We.onNotification(Wt.type,async(p)=>{let g=Ie.get(p.token);if(g)await g(p.value);else J.fire(p)}),We}});var Cr=re(function(d){var aT=d&&d.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0});d.ProgressType=d.ProgressToken=d.createMessageConnection=d.NullLogger=d.ConnectionOptions=d.ConnectionStrategy=d.AbstractMessageBuffer=d.WriteableStreamMessageWriter=d.AbstractMessageWriter=d.MessageWriter=d.ReadableStreamMessageReader=d.AbstractMessageReader=d.MessageReader=d.SharedArrayReceiverStrategy=d.SharedArraySenderStrategy=d.CancellationToken=d.CancellationTokenSource=d.Emitter=d.Event=d.Disposable=d.LRUCache=d.Touch=d.LinkedMap=d.ParameterStructures=d.NotificationType9=d.NotificationType8=d.NotificationType7=d.NotificationType6=d.NotificationType5=d.NotificationType4=d.NotificationType3=d.NotificationType2=d.NotificationType1=d.NotificationType0=d.NotificationType=d.ErrorCodes=d.ResponseError=d.RequestType9=d.RequestType8=d.RequestType7=d.RequestType6=d.RequestType5=d.RequestType4=d.RequestType3=d.RequestType2=d.RequestType1=d.RequestType0=d.RequestType=d.Message=d.RAL=void 0;d.MessageStrategy=d.CancellationStrategy=d.CancellationSenderStrategy=d.RequestCancellationReceiverStrategy=d.IdCancellationReceiverStrategy=d.CancellationReceiverStrategy=d.ConnectionError=d.ConnectionErrors=d.LogTraceNotification=d.SetTraceNotification=d.TraceFormat=d.TraceValues=d.TraceValue=d.Trace=void 0;var b=Tn();Object.defineProperty(d,"Message",{enumerable:!0,get:function(){return b.Message}});Object.defineProperty(d,"RequestType",{enumerable:!0,get:function(){return b.RequestType}});Object.defineProperty(d,"RequestType0",{enumerable:!0,get:function(){return b.RequestType0}});Object.defineProperty(d,"RequestType1",{enumerable:!0,get:function(){return b.RequestType1}});Object.defineProperty(d,"RequestType2",{enumerable:!0,get:function(){return b.RequestType2}});Object.defineProperty(d,"RequestType3",{enumerable:!0,get:function(){return b.RequestType3}});Object.defineProperty(d,"RequestType4",{enumerable:!0,get:function(){return b.RequestType4}});Object.defineProperty(d,"RequestType5",{enumerable:!0,get:function(){return b.RequestType5}});Object.defineProperty(d,"RequestType6",{enumerable:!0,get:function(){return b.RequestType6}});Object.defineProperty(d,"RequestType7",{enumerable:!0,get:function(){return b.RequestType7}});Object.defineProperty(d,"RequestType8",{enumerable:!0,get:function(){return b.RequestType8}});Object.defineProperty(d,"RequestType9",{enumerable:!0,get:function(){return b.RequestType9}});Object.defineProperty(d,"ResponseError",{enumerable:!0,get:function(){return b.ResponseError}});Object.defineProperty(d,"ErrorCodes",{enumerable:!0,get:function(){return b.ErrorCodes}});Object.defineProperty(d,"NotificationType",{enumerable:!0,get:function(){return b.NotificationType}});Object.defineProperty(d,"NotificationType0",{enumerable:!0,get:function(){return b.NotificationType0}});Object.defineProperty(d,"NotificationType1",{enumerable:!0,get:function(){return b.NotificationType1}});Object.defineProperty(d,"NotificationType2",{enumerable:!0,get:function(){return b.NotificationType2}});Object.defineProperty(d,"NotificationType3",{enumerable:!0,get:function(){return b.NotificationType3}});Object.defineProperty(d,"NotificationType4",{enumerable:!0,get:function(){return b.NotificationType4}});Object.defineProperty(d,"NotificationType5",{enumerable:!0,get:function(){return b.NotificationType5}});Object.defineProperty(d,"NotificationType6",{enumerable:!0,get:function(){return b.NotificationType6}});Object.defineProperty(d,"NotificationType7",{enumerable:!0,get:function(){return b.NotificationType7}});Object.defineProperty(d,"NotificationType8",{enumerable:!0,get:function(){return b.NotificationType8}});Object.defineProperty(d,"NotificationType9",{enumerable:!0,get:function(){return b.NotificationType9}});Object.defineProperty(d,"ParameterStructures",{enumerable:!0,get:function(){return b.ParameterStructures}});var kt=yn();Object.defineProperty(d,"LinkedMap",{enumerable:!0,get:function(){return kt.LinkedMap}});Object.defineProperty(d,"LRUCache",{enumerable:!0,get:function(){return kt.LRUCache}});Object.defineProperty(d,"Touch",{enumerable:!0,get:function(){return kt.Touch}});var ju=uu();Object.defineProperty(d,"Disposable",{enumerable:!0,get:function(){return ju.Disposable}});var Ar=ht();Object.defineProperty(d,"Event",{enumerable:!0,get:function(){return Ar.Event}});Object.defineProperty(d,"Emitter",{enumerable:!0,get:function(){return Ar.Emitter}});var br=yr();Object.defineProperty(d,"CancellationTokenSource",{enumerable:!0,get:function(){return br.CancellationTokenSource}});Object.defineProperty(d,"CancellationToken",{enumerable:!0,get:function(){return br.CancellationToken}});var Ir=ku();Object.defineProperty(d,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return Ir.SharedArraySenderStrategy}});Object.defineProperty(d,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return Ir.SharedArrayReceiverStrategy}});var wt=Pu();Object.defineProperty(d,"MessageReader",{enumerable:!0,get:function(){return wt.MessageReader}});Object.defineProperty(d,"AbstractMessageReader",{enumerable:!0,get:function(){return wt.AbstractMessageReader}});Object.defineProperty(d,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return wt.ReadableStreamMessageReader}});var Dt=Lu();Object.defineProperty(d,"MessageWriter",{enumerable:!0,get:function(){return Dt.MessageWriter}});Object.defineProperty(d,"AbstractMessageWriter",{enumerable:!0,get:function(){return Dt.AbstractMessageWriter}});Object.defineProperty(d,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Dt.WriteableStreamMessageWriter}});var Vu=vu();Object.defineProperty(d,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Vu.AbstractMessageBuffer}});var C=Uu();Object.defineProperty(d,"ConnectionStrategy",{enumerable:!0,get:function(){return C.ConnectionStrategy}});Object.defineProperty(d,"ConnectionOptions",{enumerable:!0,get:function(){return C.ConnectionOptions}});Object.defineProperty(d,"NullLogger",{enumerable:!0,get:function(){return C.NullLogger}});Object.defineProperty(d,"createMessageConnection",{enumerable:!0,get:function(){return C.createMessageConnection}});Object.defineProperty(d,"ProgressToken",{enumerable:!0,get:function(){return C.ProgressToken}});Object.defineProperty(d,"ProgressType",{enumerable:!0,get:function(){return C.ProgressType}});Object.defineProperty(d,"Trace",{enumerable:!0,get:function(){return C.Trace}});Object.defineProperty(d,"TraceValue",{enumerable:!0,get:function(){return C.TraceValue}});Object.defineProperty(d,"TraceFormat",{enumerable:!0,get:function(){return C.TraceFormat}});Object.defineProperty(d,"SetTraceNotification",{enumerable:!0,get:function(){return C.SetTraceNotification}});Object.defineProperty(d,"LogTraceNotification",{enumerable:!0,get:function(){return C.LogTraceNotification}});Object.defineProperty(d,"ConnectionErrors",{enumerable:!0,get:function(){return C.ConnectionErrors}});Object.defineProperty(d,"ConnectionError",{enumerable:!0,get:function(){return C.ConnectionError}});Object.defineProperty(d,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return C.CancellationReceiverStrategy}});Object.defineProperty(d,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return C.IdCancellationReceiverStrategy}});Object.defineProperty(d,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return C.RequestCancellationReceiverStrategy}});Object.defineProperty(d,"CancellationSenderStrategy",{enumerable:!0,get:function(){return C.CancellationSenderStrategy}});Object.defineProperty(d,"CancellationStrategy",{enumerable:!0,get:function(){return C.CancellationStrategy}});Object.defineProperty(d,"MessageStrategy",{enumerable:!0,get:function(){return C.MessageStrategy}});Object.defineProperty(d,"TraceValues",{enumerable:!0,get:function(){return C.TraceValues}});var cT=aT(Ue());d.RAL=cT.default});var $u=re(function(Gu){Object.defineProperty(Gu,"__esModule",{value:!0});var Nr=st("util"),K=Cr();class vn extends K.AbstractMessageBuffer{static emptyBuffer=Buffer.allocUnsafe(0);constructor(e="utf-8"){super(e)}emptyBuffer(){return vn.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){if(e instanceof Buffer)return e.toString(t);else return new Nr.TextDecoder(t).decode(e)}asNative(e,t){if(t===void 0)return e instanceof Buffer?e:Buffer.from(e);else return e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}class Wu{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),K.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),K.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),K.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),K.Disposable.create(()=>this.stream.off("data",e))}}class zu{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),K.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),K.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),K.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((r,i)=>{let s=(o)=>{if(o===void 0||o===null)r();else i(o)};if(typeof e==="string")this.stream.write(e,t,s);else this.stream.write(e,s)})}end(){this.stream.end()}}var Hu=Object.freeze({messageBuffer:Object.freeze({create:(e)=>new vn(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(r){return Promise.reject(r)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{if(e instanceof Buffer)return Promise.resolve(JSON.parse(e.toString(t.charset)));else return Promise.resolve(JSON.parse(new Nr.TextDecoder(t.charset).decode(e)))}catch(r){return Promise.reject(r)}}})}),stream:Object.freeze({asReadableStream:(e)=>new Wu(e),asWritableStream:(e)=>new zu(e)}),console,timer:Object.freeze({setTimeout(e,t,...r){let i=setTimeout(e,t,...r);return{dispose:()=>clearTimeout(i)}},setImmediate(e,...t){let r=setImmediate(e,...t);return{dispose:()=>clearImmediate(r)}},setInterval(e,t,...r){let i=setInterval(e,t,...r);return{dispose:()=>clearInterval(i)}}})});function On(){return Hu}(function(e){function t(){K.RAL.install(Hu)}e.install=t})(On||(On={}));Gu.default=On});var Ku=re(function(L){var Fu=L&&L.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,i,s)}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]}),pT=L&&L.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Mn=L&&L.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var i=[];for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s))i[i.length]=s;return i},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null){for(var i=e(t),s=0;s<i.length;s++)if(i[s]!=="default")Fu(r,t,i[s])}return pT(r,t),r}}(),lT=L&&L.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Fu(t,e,r)},fT=L&&L.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L,"__esModule",{value:!0});L.StreamMessageWriter=L.StreamMessageReader=L.SocketMessageWriter=L.SocketMessageReader=L.PortMessageWriter=L.PortMessageReader=L.IPCMessageWriter=L.IPCMessageReader=void 0;L.generateRandomPipeName=yT;L.createClientPipeTransport=xT;L.createServerPipeTransport=ET;L.createClientSocketTransport=kT;L.createServerSocketTransport=wT;L.createMessageConnection=_T;var Gt=fT($u());Gt.default.install();var mT=Mn(st("path")),hT=Mn(st("os")),dT=Mn(st("fs")),Lr=st("crypto"),Ve=st("net"),B=Cr();lT(Cr(),L);class Qu extends B.AbstractMessageReader{process;constructor(e){super();this.process=e;let t=this.process;t.on("error",(r)=>this.fireError(r)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),B.Disposable.create(()=>this.process.off("message",e))}}L.IPCMessageReader=Qu;class Yu extends B.AbstractMessageWriter{process;errorCount;constructor(e){super();this.process=e,this.errorCount=0;let t=this.process;t.on("error",(r)=>this.fireError(r)),t.on("close",()=>this.fireClose)}write(e){try{if(typeof this.process.send==="function")this.process.send(e,void 0,void 0,(t)=>{if(t)this.errorCount++,this.handleError(t,e);else this.errorCount=0});return Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}L.IPCMessageWriter=Yu;class Xu extends B.AbstractMessageReader{onData;constructor(e){super();this.onData=new B.Emitter,e.on("close",()=>this.fireClose),e.on("error",(t)=>this.fireError(t)),e.on("message",(t)=>{this.onData.fire(t)})}listen(e){return this.onData.event(e)}}L.PortMessageReader=Xu;class Zu extends B.AbstractMessageWriter{port;errorCount;constructor(e){super();this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",(t)=>this.fireError(t))}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(){}}L.PortMessageWriter=Zu;class St extends B.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,Gt.default)().stream.asReadableStream(e),t)}}L.SocketMessageReader=St;class _t extends B.WriteableStreamMessageWriter{socket;constructor(e,t){super((0,Gt.default)().stream.asWritableStream(e),t);this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}L.SocketMessageWriter=_t;class qn extends B.ReadableStreamMessageReader{constructor(e,t){super((0,Gt.default)().stream.asReadableStream(e),t)}}L.StreamMessageReader=qn;class Bn extends B.WriteableStreamMessageWriter{constructor(e,t){super((0,Gt.default)().stream.asWritableStream(e),t)}}L.StreamMessageWriter=Bn;var TT=process.env.XDG_RUNTIME_DIR,gT=new Map([["linux",107],["darwin",103]]);function yT(){if(process.platform==="win32")return`\\\\.\\pipe\\lsp-${Lr.randomBytes(16).toString("hex")}-sock`;let e=32,t=10,r=dT.realpathSync(TT??hT.tmpdir()),i=gT.get(process.platform);if(i!==void 0)e=Math.min(i-r.length-t,e);if(e<16)throw Error(`Unable to generate a random pipe name with ${e} characters.`);let s=Lr.randomBytes(Math.floor(e/2)).toString("hex");return mT.join(r,`lsp-${s}.sock`)}function xT(e,t="utf-8"){let r,i=new Promise((s,o)=>{r=s});return new Promise((s,o)=>{let u=Ve.createServer((f)=>{u.close(),r([new St(f,t),new _t(f,t)])});u.on("error",o),u.listen(e,()=>{u.removeListener("error",o),s({onConnected:()=>i})})})}function ET(e,t="utf-8"){let r=Ve.createConnection(e);return[new St(r,t),new _t(r,t)]}function kT(e,t="utf-8"){let r,i=new Promise((s,o)=>{r=s});return new Promise((s,o)=>{let u=Ve.createServer((f)=>{u.close(),r([new St(f,t),new _t(f,t)])});u.on("error",o),u.listen(e,"127.0.0.1",()=>{u.removeListener("error",o),s({onConnected:()=>i})})})}function wT(e,t="utf-8"){let r=Ve.createConnection(e,"127.0.0.1");return[new St(r,t),new _t(r,t)]}function DT(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function ST(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function _T(e,t,r,i){if(!r)r=B.NullLogger;let s=DT(e)?new qn(e):e,o=ST(t)?new Bn(t):t;if(B.ConnectionStrategy.is(i))i={connectionStrategy:i};return B.createMessageConnection(s,o,r,i)}});var qr;(function(e){e[e.Text=1]="Text",e[e.Method=2]="Method",e[e.Function=3]="Function",e[e.Constructor=4]="Constructor",e[e.Field=5]="Field",e[e.Variable=6]="Variable",e[e.Class=7]="Class",e[e.Interface=8]="Interface",e[e.Module=9]="Module",e[e.Property=10]="Property",e[e.Unit=11]="Unit",e[e.Value=12]="Value",e[e.Enum=13]="Enum",e[e.Keyword=14]="Keyword",e[e.Snippet=15]="Snippet",e[e.Color=16]="Color",e[e.File=17]="File",e[e.Reference=18]="Reference",e[e.Folder=19]="Folder",e[e.EnumMember=20]="EnumMember",e[e.Constant=21]="Constant",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(qr||(qr={}));var Br;(function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message"})(Br||(Br={}));var Ur;(function(e){e[e.None=0]="None",e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Fixed=3]="Fixed",e[e.Variable=12]="Variable",e[e.NonRequired=14]="NonRequired",e[e.NonRest=11]="NonRest"})(Ur||(Ur={}));var jr;(function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ES2020=6]="ES2020",e[e.ES2022=7]="ES2022",e[e.ESNext=99]="ESNext",e[e.Node16=100]="Node16",e[e.Node18=101]="Node18",e[e.Node20=102]="Node20",e[e.NodeNext=199]="NodeNext",e[e.Preserve=200]="Preserve"})(jr||(jr={}));var Vr;(function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.UseSingleQuotesForStringLiteralType=268435456]="UseSingleQuotesForStringLiteralType",e[e.NoTypeReduction=536870912]="NoTypeReduction",e[e.UseInstantiationExpressions=1073741824]="UseInstantiationExpressions",e[e.OmitThisParameter=33554432]="OmitThisParameter",e[e.WriteCallStyleSignature=134217728]="WriteCallStyleSignature",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",e[e.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",e[e.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",e[e.AllowEmptyTuple=524288]="AllowEmptyTuple",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",e[e.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",e[e.IgnoreErrors=70221824]="IgnoreErrors",e[e.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.InInitialEntityName=16777216]="InInitialEntityName"})(Vr||(Vr={}));var ot;(function(e){e[e.None=0]="None",e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.MembersResolved=2097152]="MembersResolved",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.InstantiationExpressionType=16777216]="InstantiationExpressionType",e[e.SingleSignatureType=33554432]="SingleSignatureType",e[e.ObjectTypeKindMask=50332991]="ObjectTypeKindMask",e[e.ContainsSpread=4194304]="ContainsSpread",e[e.ObjectRestType=8388608]="ObjectRestType",e[e.IsClassInstanceClone=67108864]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=134217728]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=268435456]="IdenticalBaseTypeExists",e[e.UnresolvedMembers=536870912]="UnresolvedMembers",e[e.FromTypeNode=1073741824]="FromTypeNode",e[e.IsGenericTypeComputed=4194304]="IsGenericTypeComputed",e[e.IsGenericObjectType=8388608]="IsGenericObjectType",e[e.IsGenericIndexType=16777216]="IsGenericIndexType",e[e.IsGenericType=25165824]="IsGenericType",e[e.ContainsIntersections=33554432]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=67108864]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=134217728]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=33554432]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=67108864]="IsNeverIntersection",e[e.IsConstrainedTypeVariable=134217728]="IsConstrainedTypeVariable"})(ot||(ot={}));var at;(function(e){e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Construct=4]="Construct",e[e.Abstract=8]="Abstract",e[e.IsInnerCallChain=16]="IsInnerCallChain",e[e.IsOuterCallChain=32]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=64]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=128]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=256]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=335]="PropagatingFlags",e[e.CallChainFlags=48]="CallChainFlags"})(at||(at={}));var Wr;(function(e){e[e.Call=0]="Call",e[e.Construct=1]="Construct"})(Wr||(Wr={}));var It;(function(e){e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.ConstEnumOnlyModule=268435456]="ConstEnumOnlyModule",e[e.ReplaceableByMethod=536870912]="ReplaceableByMethod",e[e.GlobalLookup=1073741824]="GlobalLookup",e[e.All=536870912]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=13243]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46011]="GetAccessorExcludes",e[e.SetAccessorExcludes=78779]="SetAccessorExcludes",e[e.AccessorExcludes=111547]="AccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer"})(It||(It={}));var Q;(function(e){e[e.None=0]="None",e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.Undefined=4]="Undefined",e[e.Null=8]="Null",e[e.Void=16]="Void",e[e.String=32]="String",e[e.Number=64]="Number",e[e.BigInt=128]="BigInt",e[e.Boolean=256]="Boolean",e[e.ESSymbol=512]="ESSymbol",e[e.StringLiteral=1024]="StringLiteral",e[e.NumberLiteral=2048]="NumberLiteral",e[e.BigIntLiteral=4096]="BigIntLiteral",e[e.BooleanLiteral=8192]="BooleanLiteral",e[e.UniqueESSymbol=16384]="UniqueESSymbol",e[e.EnumLiteral=32768]="EnumLiteral",e[e.Enum=65536]="Enum",e[e.NonPrimitive=131072]="NonPrimitive",e[e.Never=262144]="Never",e[e.TypeParameter=524288]="TypeParameter",e[e.Object=1048576]="Object",e[e.Index=2097152]="Index",e[e.TemplateLiteral=4194304]="TemplateLiteral",e[e.StringMapping=8388608]="StringMapping",e[e.Substitution=16777216]="Substitution",e[e.IndexedAccess=33554432]="IndexedAccess",e[e.Conditional=67108864]="Conditional",e[e.Union=134217728]="Union",e[e.Intersection=268435456]="Intersection",e[e.Reserved1=536870912]="Reserved1",e[e.Reserved2=1073741824]="Reserved2",e[e.Reserved3=-2147483648]="Reserved3",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=12]="Nullable",e[e.Literal=15360]="Literal",e[e.Unit=97292]="Unit",e[e.Freshable=80896]="Freshable",e[e.StringOrNumberLiteral=3072]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=19456]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=15388]="DefinitelyFalsy",e[e.PossiblyFalsy=15868]="PossiblyFalsy",e[e.Intrinsic=393983]="Intrinsic",e[e.StringLike=12583968]="StringLike",e[e.NumberLike=67648]="NumberLike",e[e.BigIntLike=4224]="BigIntLike",e[e.BooleanLike=8448]="BooleanLike",e[e.EnumLike=98304]="EnumLike",e[e.ESSymbolLike=16896]="ESSymbolLike",e[e.VoidLike=20]="VoidLike",e[e.Primitive=12713980]="Primitive",e[e.DefinitelyNonNullable=13893600]="DefinitelyNonNullable",e[e.DisjointDomains=12812284]="DisjointDomains",e[e.UnionOrIntersection=402653184]="UnionOrIntersection",e[e.StructuredType=403701760]="StructuredType",e[e.TypeVariable=34078720]="TypeVariable",e[e.InstantiableNonPrimitive=117964800]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=14680064]="InstantiablePrimitive",e[e.Instantiable=132644864]="Instantiable",e[e.StructuredOrInstantiable=536346624]="StructuredOrInstantiable",e[e.ObjectFlagsType=403963917]="ObjectFlagsType",e[e.Simplifiable=102760448]="Simplifiable",e[e.Singleton=394239]="Singleton",e[e.Narrowable=536575971]="Narrowable",e[e.IncludesMask=416808959]="IncludesMask",e[e.IncludesMissingType=524288]="IncludesMissingType",e[e.IncludesNonWideningType=2097152]="IncludesNonWideningType",e[e.IncludesWildcard=33554432]="IncludesWildcard",e[e.IncludesEmptyObject=67108864]="IncludesEmptyObject",e[e.IncludesInstantiable=16777216]="IncludesInstantiable",e[e.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",e[e.IncludesError=1073741824]="IncludesError",e[e.NotPrimitiveUnion=286523411]="NotPrimitiveUnion"})(Q||(Q={}));var zr;(function(e){e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier"})(zr||(zr={}));var k;(function(e){e[e.EOF=-1]="EOF",e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5765]="ogham",e[e.replacementCharacter=65533]="replacementCharacter",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.backtick=96]="backtick",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.hash=35]="hash",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"})(k||(k={}));var Ft;(function(e){e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore"})(Ft||(Ft={}));var Hr;(function(e){e.Call="__call",e.Constructor="__constructor",e.New="__new",e.Index="__index",e.ExportStar="__export",e.Global="__global",e.Missing="__missing",e.Type="__type",e.Object="__object",e.JSXAttributes="__jsxAttributes",e.Class="__class",e.Function="__function",e.Computed="__computed",e.AssignmentDeclaration="__assignment",e.InstantiationExpression="__instantiationExpression",e.ImportAttributes="__importAttributes",e.ExportEquals="export=",e.Default="default",e.This="this",e.ModuleExports="module.exports"})(Hr||(Hr={}));var Qt;(function(e){e[e.Standard=0]="Standard",e[e.JSX=1]="JSX"})(Qt||(Qt={}));var j;(function(e){e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e[e.JavaScript=3872]="JavaScript"})(j||(j={}));var _e;(function(e){e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.Reparsed=8]="Reparsed",e[e.Synthesized=16]="Synthesized",e[e.OptionalChain=32]="OptionalChain",e[e.ExportContext=64]="ExportContext",e[e.ContainsThis=128]="ContainsThis",e[e.HasImplicitReturn=256]="HasImplicitReturn",e[e.HasExplicitReturn=512]="HasExplicitReturn",e[e.DisallowInContext=1024]="DisallowInContext",e[e.YieldContext=2048]="YieldContext",e[e.DecoratorContext=4096]="DecoratorContext",e[e.AwaitContext=8192]="AwaitContext",e[e.DisallowConditionalTypesContext=16384]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=32768]="ThisNodeHasError",e[e.JavaScriptFile=65536]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=131072]="ThisNodeOrAnySubNodesHasError",e[e.HasAsyncFunctions=262144]="HasAsyncFunctions",e[e.PossiblyContainsDynamicImport=524288]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=1048576]="PossiblyContainsImportMeta",e[e.HasJSDoc=2097152]="HasJSDoc",e[e.JSDoc=4194304]="JSDoc",e[e.Ambient=8388608]="Ambient",e[e.InWithStatement=16777216]="InWithStatement",e[e.JsonFile=33554432]="JsonFile",e[e.PossiblyContainsDeprecatedTag=67108864]="PossiblyContainsDeprecatedTag",e[e.Unreachable=134217728]="Unreachable",e[e.ReparserTransformedLiteral=268435456]="ReparserTransformedLiteral",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.AwaitUsing=6]="AwaitUsing",e[e.ReachabilityCheckFlags=768]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=262912]="ReachabilityAndEmitFlags",e[e.ContextFlags=25263104]="ContextFlags",e[e.TypeExcludesFlags=10240]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=1572864]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=128]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=262144]="IdentifierIsInJSDocNamespace",e[e.NestedNamespace=32]="NestedNamespace"})(_e||(_e={}));var de;(function(e){e[e.None=0]="None",e[e.HasIndices=1]="HasIndices",e[e.Global=2]="Global",e[e.IgnoreCase=4]="IgnoreCase",e[e.Multiline=8]="Multiline",e[e.DotAll=16]="DotAll",e[e.Unicode=32]="Unicode",e[e.UnicodeSets=64]="UnicodeSets",e[e.Sticky=128]="Sticky",e[e.AnyUnicodeMode=96]="AnyUnicodeMode"})(de||(de={}));var ct;(function(e){e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred"})(ct||(ct={}));var Yt;(function(e){e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ES2023=10]="ES2023",e[e.ES2024=11]="ES2024",e[e.ES2025=12]="ES2025",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"})(Yt||(Yt={}));var n;(function(e){e[e.Unknown=0]="Unknown",e[e.EndOfFile=1]="EndOfFile",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ConflictMarkerTrivia=6]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=7]="NonTextFileMarkerTrivia",e[e.NumericLiteral=8]="NumericLiteral",e[e.BigIntLiteral=9]="BigIntLiteral",e[e.StringLiteral=10]="StringLiteral",e[e.JsxText=11]="JsxText",e[e.JsxTextAllWhiteSpaces=12]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=13]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=14]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=15]="TemplateHead",e[e.TemplateMiddle=16]="TemplateMiddle",e[e.TemplateTail=17]="TemplateTail",e[e.OpenBraceToken=18]="OpenBraceToken",e[e.CloseBraceToken=19]="CloseBraceToken",e[e.OpenParenToken=20]="OpenParenToken",e[e.CloseParenToken=21]="CloseParenToken",e[e.OpenBracketToken=22]="OpenBracketToken",e[e.CloseBracketToken=23]="CloseBracketToken",e[e.DotToken=24]="DotToken",e[e.DotDotDotToken=25]="DotDotDotToken",e[e.SemicolonToken=26]="SemicolonToken",e[e.CommaToken=27]="CommaToken",e[e.QuestionDotToken=28]="QuestionDotToken",e[e.LessThanToken=29]="LessThanToken",e[e.LessThanSlashToken=30]="LessThanSlashToken",e[e.GreaterThanToken=31]="GreaterThanToken",e[e.LessThanEqualsToken=32]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=33]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=34]="EqualsEqualsToken",e[e.ExclamationEqualsToken=35]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=36]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=37]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=38]="EqualsGreaterThanToken",e[e.PlusToken=39]="PlusToken",e[e.MinusToken=40]="MinusToken",e[e.AsteriskToken=41]="AsteriskToken",e[e.AsteriskAsteriskToken=42]="AsteriskAsteriskToken",e[e.SlashToken=43]="SlashToken",e[e.PercentToken=44]="PercentToken",e[e.PlusPlusToken=45]="PlusPlusToken",e[e.MinusMinusToken=46]="MinusMinusToken",e[e.LessThanLessThanToken=47]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=48]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=49]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=50]="AmpersandToken",e[e.BarToken=51]="BarToken",e[e.CaretToken=52]="CaretToken",e[e.ExclamationToken=53]="ExclamationToken",e[e.TildeToken=54]="TildeToken",e[e.AmpersandAmpersandToken=55]="AmpersandAmpersandToken",e[e.BarBarToken=56]="BarBarToken",e[e.QuestionToken=57]="QuestionToken",e[e.ColonToken=58]="ColonToken",e[e.AtToken=59]="AtToken",e[e.QuestionQuestionToken=60]="QuestionQuestionToken",e[e.BacktickToken=61]="BacktickToken",e[e.HashToken=62]="HashToken",e[e.EqualsToken=63]="EqualsToken",e[e.PlusEqualsToken=64]="PlusEqualsToken",e[e.MinusEqualsToken=65]="MinusEqualsToken",e[e.AsteriskEqualsToken=66]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=67]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=68]="SlashEqualsToken",e[e.PercentEqualsToken=69]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=70]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=71]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=73]="AmpersandEqualsToken",e[e.BarEqualsToken=74]="BarEqualsToken",e[e.BarBarEqualsToken=75]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=76]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=77]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=78]="CaretEqualsToken",e[e.Identifier=79]="Identifier",e[e.PrivateIdentifier=80]="PrivateIdentifier",e[e.JSDocCommentTextToken=81]="JSDocCommentTextToken",e[e.BreakKeyword=82]="BreakKeyword",e[e.CaseKeyword=83]="CaseKeyword",e[e.CatchKeyword=84]="CatchKeyword",e[e.ClassKeyword=85]="ClassKeyword",e[e.ConstKeyword=86]="ConstKeyword",e[e.ContinueKeyword=87]="ContinueKeyword",e[e.DebuggerKeyword=88]="DebuggerKeyword",e[e.DefaultKeyword=89]="DefaultKeyword",e[e.DeleteKeyword=90]="DeleteKeyword",e[e.DoKeyword=91]="DoKeyword",e[e.ElseKeyword=92]="ElseKeyword",e[e.EnumKeyword=93]="EnumKeyword",e[e.ExportKeyword=94]="ExportKeyword",e[e.ExtendsKeyword=95]="ExtendsKeyword",e[e.FalseKeyword=96]="FalseKeyword",e[e.FinallyKeyword=97]="FinallyKeyword",e[e.ForKeyword=98]="ForKeyword",e[e.FunctionKeyword=99]="FunctionKeyword",e[e.IfKeyword=100]="IfKeyword",e[e.ImportKeyword=101]="ImportKeyword",e[e.InKeyword=102]="InKeyword",e[e.InstanceOfKeyword=103]="InstanceOfKeyword",e[e.NewKeyword=104]="NewKeyword",e[e.NullKeyword=105]="NullKeyword",e[e.ReturnKeyword=106]="ReturnKeyword",e[e.SuperKeyword=107]="SuperKeyword",e[e.SwitchKeyword=108]="SwitchKeyword",e[e.ThisKeyword=109]="ThisKeyword",e[e.ThrowKeyword=110]="ThrowKeyword",e[e.TrueKeyword=111]="TrueKeyword",e[e.TryKeyword=112]="TryKeyword",e[e.TypeOfKeyword=113]="TypeOfKeyword",e[e.VarKeyword=114]="VarKeyword",e[e.VoidKeyword=115]="VoidKeyword",e[e.WhileKeyword=116]="WhileKeyword",e[e.WithKeyword=117]="WithKeyword",e[e.ImplementsKeyword=118]="ImplementsKeyword",e[e.InterfaceKeyword=119]="InterfaceKeyword",e[e.LetKeyword=120]="LetKeyword",e[e.PackageKeyword=121]="PackageKeyword",e[e.PrivateKeyword=122]="PrivateKeyword",e[e.ProtectedKeyword=123]="ProtectedKeyword",e[e.PublicKeyword=124]="PublicKeyword",e[e.StaticKeyword=125]="StaticKeyword",e[e.YieldKeyword=126]="YieldKeyword",e[e.AbstractKeyword=127]="AbstractKeyword",e[e.AccessorKeyword=128]="AccessorKeyword",e[e.AsKeyword=129]="AsKeyword",e[e.AssertsKeyword=130]="AssertsKeyword",e[e.AssertKeyword=131]="AssertKeyword",e[e.AnyKeyword=132]="AnyKeyword",e[e.AsyncKeyword=133]="AsyncKeyword",e[e.AwaitKeyword=134]="AwaitKeyword",e[e.BooleanKeyword=135]="BooleanKeyword",e[e.ConstructorKeyword=136]="ConstructorKeyword",e[e.DeclareKeyword=137]="DeclareKeyword",e[e.GetKeyword=138]="GetKeyword",e[e.ImmediateKeyword=139]="ImmediateKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.DeferKeyword=166]="DeferKeyword",e[e.QualifiedName=167]="QualifiedName",e[e.ComputedPropertyName=168]="ComputedPropertyName",e[e.TypeParameter=169]="TypeParameter",e[e.Parameter=170]="Parameter",e[e.Decorator=171]="Decorator",e[e.PropertySignature=172]="PropertySignature",e[e.PropertyDeclaration=173]="PropertyDeclaration",e[e.MethodSignature=174]="MethodSignature",e[e.MethodDeclaration=175]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=176]="ClassStaticBlockDeclaration",e[e.Constructor=177]="Constructor",e[e.GetAccessor=178]="GetAccessor",e[e.SetAccessor=179]="SetAccessor",e[e.CallSignature=180]="CallSignature",e[e.ConstructSignature=181]="ConstructSignature",e[e.IndexSignature=182]="IndexSignature",e[e.TypePredicate=183]="TypePredicate",e[e.TypeReference=184]="TypeReference",e[e.FunctionType=185]="FunctionType",e[e.ConstructorType=186]="ConstructorType",e[e.TypeQuery=187]="TypeQuery",e[e.TypeLiteral=188]="TypeLiteral",e[e.ArrayType=189]="ArrayType",e[e.TupleType=190]="TupleType",e[e.OptionalType=191]="OptionalType",e[e.RestType=192]="RestType",e[e.UnionType=193]="UnionType",e[e.IntersectionType=194]="IntersectionType",e[e.ConditionalType=195]="ConditionalType",e[e.InferType=196]="InferType",e[e.ParenthesizedType=197]="ParenthesizedType",e[e.ThisType=198]="ThisType",e[e.TypeOperator=199]="TypeOperator",e[e.IndexedAccessType=200]="IndexedAccessType",e[e.MappedType=201]="MappedType",e[e.LiteralType=202]="LiteralType",e[e.NamedTupleMember=203]="NamedTupleMember",e[e.TemplateLiteralType=204]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=205]="TemplateLiteralTypeSpan",e[e.ImportType=206]="ImportType",e[e.ObjectBindingPattern=207]="ObjectBindingPattern",e[e.ArrayBindingPattern=208]="ArrayBindingPattern",e[e.BindingElement=209]="BindingElement",e[e.ArrayLiteralExpression=210]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=211]="ObjectLiteralExpression",e[e.PropertyAccessExpression=212]="PropertyAccessExpression",e[e.ElementAccessExpression=213]="ElementAccessExpression",e[e.CallExpression=214]="CallExpression",e[e.NewExpression=215]="NewExpression",e[e.TaggedTemplateExpression=216]="TaggedTemplateExpression",e[e.TypeAssertionExpression=217]="TypeAssertionExpression",e[e.ParenthesizedExpression=218]="ParenthesizedExpression",e[e.FunctionExpression=219]="FunctionExpression",e[e.ArrowFunction=220]="ArrowFunction",e[e.DeleteExpression=221]="DeleteExpression",e[e.TypeOfExpression=222]="TypeOfExpression",e[e.VoidExpression=223]="VoidExpression",e[e.AwaitExpression=224]="AwaitExpression",e[e.PrefixUnaryExpression=225]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=226]="PostfixUnaryExpression",e[e.BinaryExpression=227]="BinaryExpression",e[e.ConditionalExpression=228]="ConditionalExpression",e[e.TemplateExpression=229]="TemplateExpression",e[e.YieldExpression=230]="YieldExpression",e[e.SpreadElement=231]="SpreadElement",e[e.ClassExpression=232]="ClassExpression",e[e.OmittedExpression=233]="OmittedExpression",e[e.ExpressionWithTypeArguments=234]="ExpressionWithTypeArguments",e[e.AsExpression=235]="AsExpression",e[e.NonNullExpression=236]="NonNullExpression",e[e.MetaProperty=237]="MetaProperty",e[e.SyntheticExpression=238]="SyntheticExpression",e[e.SatisfiesExpression=239]="SatisfiesExpression",e[e.TemplateSpan=240]="TemplateSpan",e[e.SemicolonClassElement=241]="SemicolonClassElement",e[e.Block=242]="Block",e[e.EmptyStatement=243]="EmptyStatement",e[e.VariableStatement=244]="VariableStatement",e[e.ExpressionStatement=245]="ExpressionStatement",e[e.IfStatement=246]="IfStatement",e[e.DoStatement=247]="DoStatement",e[e.WhileStatement=248]="WhileStatement",e[e.ForStatement=249]="ForStatement",e[e.ForInStatement=250]="ForInStatement",e[e.ForOfStatement=251]="ForOfStatement",e[e.ContinueStatement=252]="ContinueStatement",e[e.BreakStatement=253]="BreakStatement",e[e.ReturnStatement=254]="ReturnStatement",e[e.WithStatement=255]="WithStatement",e[e.SwitchStatement=256]="SwitchStatement",e[e.LabeledStatement=257]="LabeledStatement",e[e.ThrowStatement=258]="ThrowStatement",e[e.TryStatement=259]="TryStatement",e[e.DebuggerStatement=260]="DebuggerStatement",e[e.VariableDeclaration=261]="VariableDeclaration",e[e.VariableDeclarationList=262]="VariableDeclarationList",e[e.FunctionDeclaration=263]="FunctionDeclaration",e[e.ClassDeclaration=264]="ClassDeclaration",e[e.InterfaceDeclaration=265]="InterfaceDeclaration",e[e.TypeAliasDeclaration=266]="TypeAliasDeclaration",e[e.EnumDeclaration=267]="EnumDeclaration",e[e.ModuleDeclaration=268]="ModuleDeclaration",e[e.ModuleBlock=269]="ModuleBlock",e[e.CaseBlock=270]="CaseBlock",e[e.NamespaceExportDeclaration=271]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=272]="ImportEqualsDeclaration",e[e.ImportDeclaration=273]="ImportDeclaration",e[e.ImportClause=274]="ImportClause",e[e.NamespaceImport=275]="NamespaceImport",e[e.NamedImports=276]="NamedImports",e[e.ImportSpecifier=277]="ImportSpecifier",e[e.ExportAssignment=278]="ExportAssignment",e[e.ExportDeclaration=279]="ExportDeclaration",e[e.NamedExports=280]="NamedExports",e[e.NamespaceExport=281]="NamespaceExport",e[e.ExportSpecifier=282]="ExportSpecifier",e[e.MissingDeclaration=283]="MissingDeclaration",e[e.ExternalModuleReference=284]="ExternalModuleReference",e[e.JsxElement=285]="JsxElement",e[e.JsxSelfClosingElement=286]="JsxSelfClosingElement",e[e.JsxOpeningElement=287]="JsxOpeningElement",e[e.JsxClosingElement=288]="JsxClosingElement",e[e.JsxFragment=289]="JsxFragment",e[e.JsxOpeningFragment=290]="JsxOpeningFragment",e[e.JsxClosingFragment=291]="JsxClosingFragment",e[e.JsxAttribute=292]="JsxAttribute",e[e.JsxAttributes=293]="JsxAttributes",e[e.JsxSpreadAttribute=294]="JsxSpreadAttribute",e[e.JsxExpression=295]="JsxExpression",e[e.JsxNamespacedName=296]="JsxNamespacedName",e[e.CaseClause=297]="CaseClause",e[e.DefaultClause=298]="DefaultClause",e[e.HeritageClause=299]="HeritageClause",e[e.CatchClause=300]="CatchClause",e[e.ImportAttributes=301]="ImportAttributes",e[e.ImportAttribute=302]="ImportAttribute",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.SourceFile=307]="SourceFile",e[e.JSDocTypeExpression=308]="JSDocTypeExpression",e[e.JSDocNameReference=309]="JSDocNameReference",e[e.JSDocAllType=310]="JSDocAllType",e[e.JSDocNullableType=311]="JSDocNullableType",e[e.JSDocNonNullableType=312]="JSDocNonNullableType",e[e.JSDocOptionalType=313]="JSDocOptionalType",e[e.JSDocVariadicType=314]="JSDocVariadicType",e[e.JSDoc=315]="JSDoc",e[e.JSDocText=316]="JSDocText",e[e.JSDocTypeLiteral=317]="JSDocTypeLiteral",e[e.JSDocSignature=318]="JSDocSignature",e[e.JSDocLink=319]="JSDocLink",e[e.JSDocLinkCode=320]="JSDocLinkCode",e[e.JSDocLinkPlain=321]="JSDocLinkPlain",e[e.JSDocUnknownTag=322]="JSDocUnknownTag",e[e.JSDocAugmentsTag=323]="JSDocAugmentsTag",e[e.JSDocImplementsTag=324]="JSDocImplementsTag",e[e.JSDocDeprecatedTag=325]="JSDocDeprecatedTag",e[e.JSDocPublicTag=326]="JSDocPublicTag",e[e.JSDocPrivateTag=327]="JSDocPrivateTag",e[e.JSDocProtectedTag=328]="JSDocProtectedTag",e[e.JSDocReadonlyTag=329]="JSDocReadonlyTag",e[e.JSDocOverrideTag=330]="JSDocOverrideTag",e[e.JSDocCallbackTag=331]="JSDocCallbackTag",e[e.JSDocOverloadTag=332]="JSDocOverloadTag",e[e.JSDocParameterTag=333]="JSDocParameterTag",e[e.JSDocReturnTag=334]="JSDocReturnTag",e[e.JSDocThisTag=335]="JSDocThisTag",e[e.JSDocTypeTag=336]="JSDocTypeTag",e[e.JSDocTemplateTag=337]="JSDocTemplateTag",e[e.JSDocTypedefTag=338]="JSDocTypedefTag",e[e.JSDocSeeTag=339]="JSDocSeeTag",e[e.JSDocPropertyTag=340]="JSDocPropertyTag",e[e.JSDocThrowsTag=341]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=342]="JSDocSatisfiesTag",e[e.JSDocImportTag=343]="JSDocImportTag",e[e.SyntaxList=344]="SyntaxList",e[e.JSTypeAliasDeclaration=345]="JSTypeAliasDeclaration",e[e.JSImportDeclaration=346]="JSImportDeclaration",e[e.NotEmittedStatement=347]="NotEmittedStatement",e[e.PartiallyEmittedExpression=348]="PartiallyEmittedExpression",e[e.SyntheticReferenceExpression=349]="SyntheticReferenceExpression",e[e.NotEmittedTypeElement=350]="NotEmittedTypeElement",e[e.Count=351]="Count",e[e.FirstAssignment=63]="FirstAssignment",e[e.LastAssignment=78]="LastAssignment",e[e.FirstCompoundAssignment=64]="FirstCompoundAssignment",e[e.LastCompoundAssignment=78]="LastCompoundAssignment",e[e.FirstReservedWord=82]="FirstReservedWord",e[e.LastReservedWord=117]="LastReservedWord",e[e.FirstKeyword=82]="FirstKeyword",e[e.LastKeyword=166]="LastKeyword",e[e.FirstFutureReservedWord=118]="FirstFutureReservedWord",e[e.LastFutureReservedWord=126]="LastFutureReservedWord",e[e.FirstTypeNode=183]="FirstTypeNode",e[e.LastTypeNode=206]="LastTypeNode",e[e.FirstPunctuation=18]="FirstPunctuation",e[e.LastPunctuation=78]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=166]="LastToken",e[e.FirstLiteralToken=8]="FirstLiteralToken",e[e.LastLiteralToken=14]="LastLiteralToken",e[e.FirstTemplateToken=14]="FirstTemplateToken",e[e.LastTemplateToken=17]="LastTemplateToken",e[e.FirstBinaryOperator=29]="FirstBinaryOperator",e[e.LastBinaryOperator=78]="LastBinaryOperator",e[e.FirstStatement=244]="FirstStatement",e[e.LastStatement=260]="LastStatement",e[e.FirstNode=167]="FirstNode",e[e.FirstJSDocNode=308]="FirstJSDocNode",e[e.LastJSDocNode=343]="LastJSDocNode",e[e.FirstJSDocTagNode=322]="FirstJSDocTagNode",e[e.LastJSDocTagNode=343]="LastJSDocTagNode",e[e.FirstContextualKeyword=127]="FirstContextualKeyword",e[e.LastContextualKeyword=166]="LastContextualKeyword",e[e.LastUnaryOperator=54]="LastUnaryOperator",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=6]="LastTriviaToken"})(n||(n={}));var qe;(function(e){e[e.None=0]="None",e[e.PrecedingLineBreak=1]="PrecedingLineBreak",e[e.PrecedingJSDocComment=2]="PrecedingJSDocComment",e[e.Unterminated=4]="Unterminated",e[e.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",e[e.Scientific=16]="Scientific",e[e.Octal=32]="Octal",e[e.HexSpecifier=64]="HexSpecifier",e[e.BinarySpecifier=128]="BinarySpecifier",e[e.OctalSpecifier=256]="OctalSpecifier",e[e.ContainsSeparator=512]="ContainsSeparator",e[e.UnicodeEscape=1024]="UnicodeEscape",e[e.ContainsInvalidEscape=2048]="ContainsInvalidEscape",e[e.HexEscape=4096]="HexEscape",e[e.ContainsLeadingZero=8192]="ContainsLeadingZero",e[e.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",e[e.PrecedingJSDocLeadingAsterisks=32768]="PrecedingJSDocLeadingAsterisks",e[e.SingleQuote=65536]="SingleQuote",e[e.PrecedingJSDocWithDeprecated=131072]="PrecedingJSDocWithDeprecated",e[e.PrecedingJSDocWithSeeOrLink=262144]="PrecedingJSDocWithSeeOrLink",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.WithSpecifier=448]="WithSpecifier",e[e.StringLiteralFlags=72716]="StringLiteralFlags",e[e.NumericLiteralFlags=25584]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=7180]="TemplateLiteralLikeFlags",e[e.RegularExpressionLiteralFlags=4]="RegularExpressionLiteralFlags",e[e.IsInvalid=26656]="IsInvalid"})(qe||(qe={}));function ri(e){let t=e;return t.length>=3&&t.charCodeAt(0)===k._&&t.charCodeAt(1)===k._&&t.charCodeAt(2)===k._?t.slice(1):t}function ni(e){return{statements:e.statements,endOfFileToken:e.endOfFileToken,text:e.text,fileName:e.fileName,path:e.path,languageVariant:e.languageVariant,scriptKind:e.scriptKind,isDeclarationFile:e.isDeclarationFile,referencedFiles:e.referencedFiles,typeReferenceDirectives:e.typeReferenceDirectives,libReferenceDirectives:e.libReferenceDirectives,imports:e.imports,moduleAugmentations:e.moduleAugmentations,ambientModuleNames:e.ambientModuleNames,externalModuleIndicator:e.externalModuleIndicator,tokenCache:void 0}}var ce;(function(e){e[e.Parentheses=1]="Parentheses",e[e.TypeAssertions=2]="TypeAssertions",e[e.NonNullAssertions=4]="NonNullAssertions",e[e.PartiallyEmittedExpressions=8]="PartiallyEmittedExpressions",e[e.ExpressionsWithTypeArguments=16]="ExpressionsWithTypeArguments",e[e.Satisfies=32]="Satisfies",e[e.ExcludeJSDocTypeAssertion=64]="ExcludeJSDocTypeAssertion",e[e.Assignments=128]="Assignments",e[e.Comma=256]="Comma",e[e.Assertions=38]="Assertions",e[e.All=63]="All",e[e.AllExceptAssertionsOrExpressionsWithTypeArguments=9]="AllExceptAssertionsOrExpressionsWithTypeArguments",e[e.ExpressionTypePassthrough=385]="ExpressionTypePassthrough"})(ce||(ce={}));function I(e){return e.kind===n.Identifier}function ii(e){return e.kind===n.CaseBlock}function si(e){return e.kind===n.CatchClause}function Ct(e){return e.kind===n.Block}function oi(e){return e.kind===n.VariableDeclaration}function ai(e){return e.kind===n.VariableDeclarationList}function Gr(e){return e.kind===n.ExpressionWithTypeArguments}function Nt(e){return e.kind===n.ImportAttributes}function $r(e){return e.kind===n.TemplateHead}function Fr(e){return e.kind===n.JsxAttributes}function ci(e){return e.kind===n.JsxOpeningElement}function ui(e){return e.kind===n.JsxOpeningFragment}function pi(e){return e.kind===n.JsxClosingFragment}function li(e){return e.kind===n.JsxClosingElement}function Qr(e){return e.kind===n.ImportClause}function Yr(e){return e.kind===n.TypeParameter}function fi(e){return e.kind===n.Identifier||e.kind===n.StringLiteral}function Lt(e){return e.kind===n.Identifier||e.kind===n.StringLiteral}function xe(e){let t=e.kind;return t===n.Identifier||t===n.StringLiteral||t===n.NoSubstitutionTemplateLiteral||t===n.NumericLiteral||t===n.ComputedPropertyName||t===n.PrivateIdentifier||t===n.BigIntLiteral}function mi(e){return e.kind===n.ModuleBlock||e.kind===n.ModuleDeclaration}function Xr(e){return e.kind===n.Identifier||e.kind===n.ModuleDeclaration}function hi(e){return e.kind===n.Identifier||e.kind===n.QualifiedName||e.kind===n.ExternalModuleReference}function di(e){return e.kind===n.NamespaceImport||e.kind===n.NamedImports}function Ti(e){return e.kind===n.NamespaceExport||e.kind===n.NamedExports}function gi(e){return e.kind===n.Identifier||e.kind===n.PrivateIdentifier}function Ee(e){return e.kind===n.Identifier||e.kind===n.QualifiedName}function Xt(e){return e.kind===n.Identifier||e.kind===n.ObjectBindingPattern||e.kind===n.ArrayBindingPattern}function yi(e){return e.kind===n.Identifier||e.kind===n.JsxNamespacedName}function xi(e){let t=e.kind;return t===n.StringLiteral||t===n.JsxExpression||t===n.JsxElement||t===n.JsxSelfClosingElement||t===n.JsxFragment}function Zr(e){return e.kind===n.TemplateMiddle||e.kind===n.TemplateTail}function Ei(e){return e.kind===n.TemplateExpression||e.kind===n.NoSubstitutionTemplateLiteral}function ki(e){return e.kind===n.Identifier||e.kind===n.ThisType}function wi(e){return e.kind===n.Identifier||e.kind===n.StringLiteral}function He(e){return e.kind===n.Block}function Wp(e){return e===n.EqualsToken||ol(e)}function zp(e){return al(e)||e===n.CommaToken}function Hp(e){return e===n.AsteriskAsteriskToken}function Gp(e){return e===n.AsteriskToken||e===n.SlashToken||e===n.PercentToken}function $p(e){return Hp(e)||Gp(e)}function Fp(e){return e===n.PlusToken||e===n.MinusToken}function Qp(e){return $p(e)||Fp(e)}function Yp(e){return e===n.LessThanLessThanToken||e===n.GreaterThanGreaterThanToken||e===n.GreaterThanGreaterThanGreaterThanToken}function Xp(e){return Qp(e)||Yp(e)}function Zp(e){return e===n.LessThanToken||e===n.LessThanEqualsToken||e===n.GreaterThanToken||e===n.GreaterThanEqualsToken||e===n.InstanceOfKeyword||e===n.InKeyword}function Kp(e){return Xp(e)||Zp(e)}function el(e){return e===n.EqualsEqualsToken||e===n.EqualsEqualsEqualsToken||e===n.ExclamationEqualsEqualsToken||e===n.ExclamationEqualsToken}function tl(e){return Kp(e)||el(e)}function rl(e){return e===n.AmpersandToken||e===n.BarToken||e===n.CaretToken}function nl(e){return tl(e)||rl(e)}function il(e){return e===n.AmpersandAmpersandToken||e===n.BarBarToken}function sl(e){return nl(e)||il(e)}function ol(e){return e===n.PlusEqualsToken||e===n.MinusEqualsToken||e===n.AsteriskAsteriskEqualsToken||e===n.AsteriskEqualsToken||e===n.SlashEqualsToken||e===n.PercentEqualsToken||e===n.AmpersandEqualsToken||e===n.BarEqualsToken||e===n.CaretEqualsToken||e===n.LessThanLessThanEqualsToken||e===n.GreaterThanGreaterThanGreaterThanEqualsToken||e===n.GreaterThanGreaterThanEqualsToken||e===n.BarBarEqualsToken||e===n.AmpersandAmpersandEqualsToken||e===n.QuestionQuestionEqualsToken}function al(e){return e===n.QuestionQuestionToken||sl(e)||Wp(e)}function Di(e){return e>=n.FirstJSDocNode&&e<=n.LastJSDocNode}function Si(e){return e.kind===n.EndOfFile}function Jt(e){return e.kind===n.DotDotDotToken}function Zt(e){return e.kind===n.QuestionToken}function _i(e){return e.kind===n.ExclamationToken}function Pi(e){return e.kind===n.ColonToken}function Ai(e){return e.kind===n.EqualsToken}function Rt(e){return e.kind===n.AsteriskToken}function bi(e){return e.kind===n.EqualsGreaterThanToken}function Ot(e){return e.kind===n.QuestionDotToken}function Ii(e){return e.kind===n.AssertsKeyword}function Kr(e){return e.kind===n.AwaitKeyword}function Ci(e){return zp(e.kind)}function _(e){return cl(e.kind)}function cl(e){return e>=n.FirstTypeNode&&e<=n.LastTypeNode||e===n.AnyKeyword||e===n.UnknownKeyword||e===n.NumberKeyword||e===n.BigIntKeyword||e===n.ObjectKeyword||e===n.BooleanKeyword||e===n.StringKeyword||e===n.SymbolKeyword||e===n.VoidKeyword||e===n.UndefinedKeyword||e===n.NeverKeyword||e===n.IntrinsicKeyword||e===n.ExpressionWithTypeArguments||e===n.JSDocAllType||e===n.JSDocNullableType||e===n.JSDocNonNullableType||e===n.JSDocOptionalType||e===n.JSDocVariadicType||e===n.JSDocTypeExpression||e===n.JSDocTypeLiteral||e===n.JSDocSignature}function Pe(e){let t=e.kind;return t===n.VariableStatement||t===n.EmptyStatement||t===n.ExpressionStatement||t===n.IfStatement||t===n.DoStatement||t===n.WhileStatement||t===n.ForStatement||t===n.ForInStatement||t===n.ForOfStatement||t===n.ContinueStatement||t===n.BreakStatement||t===n.ReturnStatement||t===n.WithStatement||t===n.SwitchStatement||t===n.LabeledStatement||t===n.ThrowStatement||t===n.TryStatement||t===n.DebuggerStatement||t===n.InterfaceDeclaration||t===n.TypeAliasDeclaration||t===n.EnumDeclaration||t===n.ModuleDeclaration||t===n.ImportDeclaration||t===n.ImportEqualsDeclaration||t===n.ExportDeclaration||t===n.ExportAssignment||t===n.NamespaceExportDeclaration||t===n.FunctionDeclaration||t===n.ClassDeclaration||t===n.MissingDeclaration||t===n.NotEmittedStatement||t===n.Block}function w(e){let t=e.kind;return t===n.ConditionalExpression||t===n.YieldExpression||t===n.ArrowFunction||t===n.BinaryExpression||t===n.SpreadElement||t===n.AsExpression||t===n.OmittedExpression||t===n.SatisfiesExpression||t===n.PrefixUnaryExpression||t===n.PostfixUnaryExpression||t===n.DeleteExpression||t===n.TypeOfExpression||t===n.VoidExpression||t===n.AwaitExpression||t===n.TypeAssertionExpression||t===n.CallExpression||t===n.NewExpression||t===n.TaggedTemplateExpression||t===n.NonNullExpression||t===n.MetaProperty||t===n.JsxExpression||t===n.PropertyAccessExpression||t===n.ElementAccessExpression||t===n.FunctionExpression||t===n.ClassExpression||t===n.ParenthesizedExpression||t===n.ArrayLiteralExpression||t===n.ObjectLiteralExpression||t===n.TemplateExpression||t===n.Identifier||t===n.PrivateIdentifier||t===n.NumericLiteral||t===n.BigIntLiteral||t===n.StringLiteral||t===n.RegularExpressionLiteral||t===n.NoSubstitutionTemplateLiteral||t===n.JsxElement||t===n.JsxSelfClosingElement||t===n.JsxFragment||t===n.NullKeyword||t===n.TrueKeyword||t===n.FalseKeyword||t===n.ThisKeyword||t===n.SuperKeyword||t===n.ImportKeyword||t===n.ExpressionWithTypeArguments}function Ni(e){return pl(ul(e).kind)}function ul(e){return fl(e,ce.PartiallyEmittedExpressions)}function pl(e){switch(e){case n.PropertyAccessExpression:case n.ElementAccessExpression:case n.NewExpression:case n.CallExpression:case n.JsxElement:case n.JsxSelfClosingElement:case n.JsxFragment:case n.TaggedTemplateExpression:case n.ArrayLiteralExpression:case n.ParenthesizedExpression:case n.ObjectLiteralExpression:case n.ClassExpression:case n.FunctionExpression:case n.Identifier:case n.PrivateIdentifier:case n.RegularExpressionLiteral:case n.NumericLiteral:case n.BigIntLiteral:case n.StringLiteral:case n.NoSubstitutionTemplateLiteral:case n.TemplateExpression:case n.FalseKeyword:case n.NullKeyword:case n.ThisKeyword:case n.TrueKeyword:case n.SuperKeyword:case n.NonNullExpression:case n.ExpressionWithTypeArguments:case n.MetaProperty:case n.ImportKeyword:case n.MissingDeclaration:return!0;default:return!1}}function ll(e,t=ce.All){switch(e.kind){case n.ParenthesizedExpression:if(t&ce.ExcludeJSDocTypeAssertion&&ml(e))return!1;return(t&ce.Parentheses)!==0;case n.TypeAssertionExpression:case n.AsExpression:return(t&ce.TypeAssertions)!==0;case n.SatisfiesExpression:return(t&(ce.ExpressionsWithTypeArguments|ce.Satisfies))!==0;case n.ExpressionWithTypeArguments:return(t&ce.ExpressionsWithTypeArguments)!==0;case n.NonNullExpression:return(t&ce.NonNullAssertions)!==0;case n.PartiallyEmittedExpression:return(t&ce.PartiallyEmittedExpressions)!==0}return!1}function fl(e,t=ce.All){while(ll(e,t))e=e.expression;return e}function ml(e){let t=e.getSourceFile();if(t.scriptKind!==ct.JS&&t.scriptKind!==ct.JSX)return!1;let r=e.expression;if(r.kind!==n.AsExpression)return!1;let i=r;return!!i.type&&(i.type.flags&_e.Reparsed)!==0}function Li(e){return e.kind===n.Block||w(e)}function Kt(e){return e.kind===n.VariableDeclarationList||w(e)}function Ge(e){return e.kind===n.QuestionToken||e.kind===n.ExclamationToken}function Ji(e){return e.kind===n.ReadonlyKeyword||e.kind===n.PlusToken||e.kind===n.MinusToken}function Ri(e){return e.kind===n.QuestionToken||e.kind===n.PlusToken||e.kind===n.MinusToken}function er(e){let t=e.kind;return t===n.ThisKeyword||t===n.Identifier||t===n.PropertyAccessExpression||t===n.JsxNamespacedName}function a(e,t,r){if(e===void 0)return;let i=t(e);if(i!==void 0&&r!==void 0&&!r(i))throw Error("Visited node failed test assertion.");return i}function T(e,t){if(e===void 0)return;let r=tr(e,t);if(r===e)return e;return m(r,e.pos,e.end)}function tr(e,t){if(e===void 0)return;let r;for(let i=0;i<e.length;i++){let s=e[i],o=t(s);if(r){if(o)r.push(o)}else if(o!==s){r=[];for(let u=0;u<i;u++)r.push(e[u]);if(o)r.push(o)}}return r??e}var Ug={[n.QualifiedName]:(e,t)=>{let r=a(e.left,t,Ee),i=a(e.right,t,I);return Oi(e,r,i)},[n.ComputedPropertyName]:(e,t)=>{let r=a(e.expression,t,w);return vi(e,r)},[n.Decorator]:(e,t)=>{let r=a(e.expression,t,Ni);return Mi(e,r)},[n.IfStatement]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.thenStatement,t,Pe),s=a(e.elseStatement,t,Pe);return qi(e,r,i,s)},[n.DoStatement]:(e,t)=>{let r=a(e.statement,t,Pe),i=a(e.expression,t,w);return Bi(e,r,i)},[n.WhileStatement]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.statement,t,Pe);return Ui(e,r,i)},[n.ForStatement]:(e,t)=>{let r=a(e.initializer,t,Kt),i=a(e.condition,t,w),s=a(e.incrementor,t,w),o=a(e.statement,t,Pe);return ji(e,r,i,s,o)},[n.BreakStatement]:(e,t)=>{let r=a(e.label,t,I);return Vi(e,r)},[n.ContinueStatement]:(e,t)=>{let r=a(e.label,t,I);return Wi(e,r)},[n.ReturnStatement]:(e,t)=>{let r=a(e.expression,t,w);return zi(e,r)},[n.WithStatement]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.statement,t,Pe);return Hi(e,r,i)},[n.SwitchStatement]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.caseBlock,t,ii);return Gi(e,r,i)},[n.CaseBlock]:(e,t)=>{let r=T(e.clauses,t);return $i(e,r)},[n.ThrowStatement]:(e,t)=>{let r=a(e.expression,t,w);return Fi(e,r)},[n.TryStatement]:(e,t)=>{let r=a(e.tryBlock,t,Ct),i=a(e.catchClause,t,si),s=a(e.finallyBlock,t,Ct);return Qi(e,r,i,s)},[n.CatchClause]:(e,t)=>{let r=a(e.variableDeclaration,t,oi),i=a(e.block,t,Ct);return Yi(e,r,i)},[n.LabeledStatement]:(e,t)=>{let r=a(e.label,t,I),i=a(e.statement,t,Pe);return Xi(e,r,i)},[n.ExpressionStatement]:(e,t)=>{let r=a(e.expression,t,w);return Zi(e,r)},[n.Block]:(e,t)=>{let r=T(e.statements,t);return Ki(e,r)},[n.VariableStatement]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.declarationList,t,ai);return es(e,r,i)},[n.VariableDeclaration]:(e,t)=>{let r=a(e.name,t,Xt),i=a(e.exclamationToken,t,_i),s=a(e.type,t,_),o=a(e.initializer,t,w);return ts(e,r,i,s,o)},[n.VariableDeclarationList]:(e,t)=>{let r=T(e.declarations,t);return rs(e,r)},[n.Parameter]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.dotDotDotToken,t,Jt),s=a(e.name,t,Xt),o=a(e.questionToken,t,Zt),u=a(e.type,t,_),f=a(e.initializer,t,w);return ns(e,r,i,s,o,u,f)},[n.BindingElement]:(e,t)=>{let r=a(e.dotDotDotToken,t,Jt),i=a(e.propertyName,t,xe),s=a(e.name,t,Xt),o=a(e.initializer,t,w);return is(e,r,i,s,o)},[n.MissingDeclaration]:(e,t)=>{let r=T(e.modifiers,t);return ss(e,r)},[n.FunctionDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.asteriskToken,t,Rt),s=a(e.name,t,I),o=T(e.typeParameters,t),u=T(e.parameters,t),f=a(e.type,t,_),E=a(e.body,t,He);return os(e,r,i,s,o,u,f,E)},[n.ClassDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,I),s=T(e.typeParameters,t),o=T(e.heritageClauses,t),u=T(e.members,t);return as(e,r,i,s,o,u)},[n.ClassExpression]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,I),s=T(e.typeParameters,t),o=T(e.heritageClauses,t),u=T(e.members,t);return cs(e,r,i,s,o,u)},[n.HeritageClause]:(e,t)=>{let r=T(e.types,t);return us(e,r)},[n.InterfaceDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,I),s=T(e.typeParameters,t),o=T(e.heritageClauses,t),u=T(e.members,t);return ps(e,r,i,s,o,u)},[n.TypeAliasDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,I),s=T(e.typeParameters,t),o=a(e.type,t,_);return ls(e,r,i,s,o)},[n.EnumMember]:(e,t)=>{let r=a(e.name,t,xe),i=a(e.initializer,t,w);return fs(e,r,i)},[n.EnumDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,I),s=T(e.members,t);return ms(e,r,i,s)},[n.ModuleBlock]:(e,t)=>{let r=T(e.statements,t);return hs(e,r)},[n.ImportDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.importClause,t,Qr),s=a(e.moduleSpecifier,t,w),o=a(e.attributes,t,Nt);return ds(e,r,i,s,o)},[n.ExternalModuleReference]:(e,t)=>{let r=a(e.expression,t,w);return Ts(e,r)},[n.NamespaceImport]:(e,t)=>{let r=a(e.name,t,I);return gs(e,r)},[n.NamedImports]:(e,t)=>{let r=T(e.elements,t);return ys(e,r)},[n.ExportAssignment]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.type,t,_),s=a(e.expression,t,w);return xs(e,r,i,s)},[n.NamespaceExportDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,I);return Es(e,r,i)},[n.NamespaceExport]:(e,t)=>{let r=a(e.name,t,Lt);return ks(e,r)},[n.NamedExports]:(e,t)=>{let r=T(e.elements,t);return ws(e,r)},[n.ExportSpecifier]:(e,t)=>{let r=a(e.propertyName,t,Lt),i=a(e.name,t,Lt);return Ds(e,r,i)},[n.CallSignature]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,_);return Ss(e,r,i,s)},[n.ConstructSignature]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,_);return _s(e,r,i,s)},[n.Constructor]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.typeParameters,t),s=T(e.parameters,t),o=a(e.type,t,_),u=a(e.body,t,He);return Ps(e,r,i,s,o,u)},[n.GetAccessor]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,xe),s=T(e.typeParameters,t),o=T(e.parameters,t),u=a(e.type,t,_),f=a(e.body,t,He);return As(e,r,i,s,o,u,f)},[n.SetAccessor]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,xe),s=T(e.typeParameters,t),o=T(e.parameters,t),u=a(e.type,t,_),f=a(e.body,t,He);return bs(e,r,i,s,o,u,f)},[n.IndexSignature]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.parameters,t),s=a(e.type,t,_);return Is(e,r,i,s)},[n.MethodSignature]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,xe),s=a(e.postfixToken,t,Ge),o=T(e.typeParameters,t),u=T(e.parameters,t),f=a(e.type,t,_);return Cs(e,r,i,s,o,u,f)},[n.MethodDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.asteriskToken,t,Rt),s=a(e.name,t,xe),o=a(e.postfixToken,t,Ge),u=T(e.typeParameters,t),f=T(e.parameters,t),E=a(e.type,t,_),P=a(e.body,t,He);return Ns(e,r,i,s,o,u,f,E,P)},[n.PropertySignature]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,xe),s=a(e.postfixToken,t,Ge),o=a(e.type,t,_),u=a(e.initializer,t,w);return Ls(e,r,i,s,o,u)},[n.PropertyDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,xe),s=a(e.postfixToken,t,Ge),o=a(e.type,t,_),u=a(e.initializer,t,w);return Js(e,r,i,s,o,u)},[n.ClassStaticBlockDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.body,t,Ct);return Rs(e,r,i)},[n.BinaryExpression]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.left,t,w),s=a(e.type,t,_),o=a(e.operatorToken,t,Ci),u=a(e.right,t,w);return Os(e,r,i,s,o,u)},[n.PrefixUnaryExpression]:(e,t)=>{let r=a(e.operand,t,w);return vs(e,r)},[n.PostfixUnaryExpression]:(e,t)=>{let r=a(e.operand,t,w);return Ms(e,r)},[n.YieldExpression]:(e,t)=>{let r=a(e.asteriskToken,t,Rt),i=a(e.expression,t,w);return qs(e,r,i)},[n.ArrowFunction]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.typeParameters,t),s=T(e.parameters,t),o=a(e.type,t,_),u=a(e.equalsGreaterThanToken,t,bi),f=a(e.body,t,Li);return Bs(e,r,i,s,o,u,f)},[n.FunctionExpression]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.asteriskToken,t,Rt),s=a(e.name,t,I),o=T(e.typeParameters,t),u=T(e.parameters,t),f=a(e.type,t,_),E=a(e.body,t,He);return Us(e,r,i,s,o,u,f,E)},[n.AsExpression]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.type,t,_);return js(e,r,i)},[n.SatisfiesExpression]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.type,t,_);return Vs(e,r,i)},[n.ConditionalExpression]:(e,t)=>{let r=a(e.condition,t,w),i=a(e.questionToken,t,Zt),s=a(e.whenTrue,t,w),o=a(e.colonToken,t,Pi),u=a(e.whenFalse,t,w);return Ws(e,r,i,s,o,u)},[n.PropertyAccessExpression]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.questionDotToken,t,Ot),s=a(e.name,t,gi);return zs(e,r,i,s)},[n.ElementAccessExpression]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.questionDotToken,t,Ot),s=a(e.argumentExpression,t,w);return Hs(e,r,i,s)},[n.CallExpression]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.questionDotToken,t,Ot),s=T(e.typeArguments,t),o=T(e.arguments,t);return Gs(e,r,i,s,o)},[n.NewExpression]:(e,t)=>{let r=a(e.expression,t,w),i=T(e.typeArguments,t),s=T(e.arguments,t);return $s(e,r,i,s)},[n.MetaProperty]:(e,t)=>{let r=a(e.name,t,I);return Fs(e,r)},[n.NonNullExpression]:(e,t)=>{let r=a(e.expression,t,w);return Qs(e,r)},[n.SpreadElement]:(e,t)=>{let r=a(e.expression,t,w);return Ys(e,r)},[n.TemplateExpression]:(e,t)=>{let r=a(e.head,t,$r),i=T(e.templateSpans,t);return Xs(e,r,i)},[n.TemplateSpan]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.literal,t,Zr);return Zs(e,r,i)},[n.TaggedTemplateExpression]:(e,t)=>{let r=a(e.tag,t,w),i=a(e.questionDotToken,t,Ot),s=T(e.typeArguments,t),o=a(e.template,t,Ei);return Ks(e,r,i,s,o)},[n.ParenthesizedExpression]:(e,t)=>{let r=a(e.expression,t,w);return eo(e,r)},[n.ArrayLiteralExpression]:(e,t)=>{let r=T(e.elements,t);return to(e,r)},[n.ObjectLiteralExpression]:(e,t)=>{let r=T(e.properties,t);return ro(e,r)},[n.SpreadAssignment]:(e,t)=>{let r=a(e.expression,t,w);return no(e,r)},[n.PropertyAssignment]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,xe),s=a(e.postfixToken,t,Ge),o=a(e.type,t,_),u=a(e.initializer,t,w);return io(e,r,i,s,o,u)},[n.ShorthandPropertyAssignment]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,xe),s=a(e.postfixToken,t,Ge),o=a(e.type,t,_),u=a(e.equalsToken,t,Ai),f=a(e.objectAssignmentInitializer,t,w);return so(e,r,i,s,o,u,f)},[n.DeleteExpression]:(e,t)=>{let r=a(e.expression,t,w);return oo(e,r)},[n.TypeOfExpression]:(e,t)=>{let r=a(e.expression,t,w);return ao(e,r)},[n.VoidExpression]:(e,t)=>{let r=a(e.expression,t,w);return co(e,r)},[n.AwaitExpression]:(e,t)=>{let r=a(e.expression,t,w);return uo(e,r)},[n.TypeAssertionExpression]:(e,t)=>{let r=a(e.type,t,_),i=a(e.expression,t,w);return po(e,r,i)},[n.UnionType]:(e,t)=>{let r=T(e.types,t);return lo(e,r)},[n.IntersectionType]:(e,t)=>{let r=T(e.types,t);return fo(e,r)},[n.ConditionalType]:(e,t)=>{let r=a(e.checkType,t,_),i=a(e.extendsType,t,_),s=a(e.trueType,t,_),o=a(e.falseType,t,_);return mo(e,r,i,s,o)},[n.TypeOperator]:(e,t)=>{let r=a(e.type,t,_);return ho(e,r)},[n.InferType]:(e,t)=>{let r=a(e.typeParameter,t,Yr);return To(e,r)},[n.ArrayType]:(e,t)=>{let r=a(e.elementType,t,_);return go(e,r)},[n.IndexedAccessType]:(e,t)=>{let r=a(e.objectType,t,_),i=a(e.indexType,t,_);return yo(e,r,i)},[n.TypeReference]:(e,t)=>{let r=a(e.typeName,t,Ee),i=T(e.typeArguments,t);return xo(e,r,i)},[n.ExpressionWithTypeArguments]:(e,t)=>{let r=a(e.expression,t,w),i=T(e.typeArguments,t);return Eo(e,r,i)},[n.LiteralType]:(e,t)=>{let r=a(e.literal,t);return ko(e,r)},[n.TypePredicate]:(e,t)=>{let r=a(e.assertsModifier,t,Ii),i=a(e.parameterName,t,ki),s=a(e.type,t,_);return wo(e,r,i,s)},[n.ImportAttribute]:(e,t)=>{let r=a(e.name,t,wi),i=a(e.value,t,w);return Do(e,r,i)},[n.ImportAttributes]:(e,t)=>{let r=T(e.attributes,t);return So(e,r)},[n.TypeQuery]:(e,t)=>{let r=a(e.exprName,t,Ee),i=T(e.typeArguments,t);return _o(e,r,i)},[n.MappedType]:(e,t)=>{let r=a(e.readonlyToken,t,Ji),i=a(e.typeParameter,t,Yr),s=a(e.nameType,t,_),o=a(e.questionToken,t,Ri),u=a(e.type,t,_),f=T(e.members,t);return Po(e,r,i,s,o,u,f)},[n.TypeLiteral]:(e,t)=>{let r=T(e.members,t);return Ao(e,r)},[n.TupleType]:(e,t)=>{let r=T(e.elements,t);return bo(e,r)},[n.NamedTupleMember]:(e,t)=>{let r=a(e.dotDotDotToken,t,Jt),i=a(e.name,t,I),s=a(e.questionToken,t,Zt),o=a(e.type,t,_);return Io(e,r,i,s,o)},[n.OptionalType]:(e,t)=>{let r=a(e.type,t,_);return Co(e,r)},[n.RestType]:(e,t)=>{let r=a(e.type,t,_);return No(e,r)},[n.ParenthesizedType]:(e,t)=>{let r=a(e.type,t,_);return Lo(e,r)},[n.FunctionType]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,_);return Jo(e,r,i,s)},[n.ConstructorType]:(e,t)=>{let r=T(e.modifiers,t),i=T(e.typeParameters,t),s=T(e.parameters,t),o=a(e.type,t,_);return Ro(e,r,i,s,o)},[n.TemplateLiteralType]:(e,t)=>{let r=a(e.head,t,$r),i=T(e.templateSpans,t);return Oo(e,r,i)},[n.TemplateLiteralTypeSpan]:(e,t)=>{let r=a(e.type,t,_),i=a(e.literal,t,Zr);return vo(e,r,i)},[n.SyntheticExpression]:(e,t)=>{let r=a(e.tupleNameSource,t);return Mo(e,r)},[n.PartiallyEmittedExpression]:(e,t)=>{let r=a(e.expression,t,w);return qo(e,r)},[n.JsxElement]:(e,t)=>{let r=a(e.openingElement,t,ci),i=T(e.children,t),s=a(e.closingElement,t,li);return Bo(e,r,i,s)},[n.JsxAttributes]:(e,t)=>{let r=T(e.properties,t);return Uo(e,r)},[n.JsxNamespacedName]:(e,t)=>{let r=a(e.namespace,t,I),i=a(e.name,t,I);return jo(e,r,i)},[n.JsxOpeningElement]:(e,t)=>{let r=a(e.tagName,t,er),i=T(e.typeArguments,t),s=a(e.attributes,t,Fr);return Vo(e,r,i,s)},[n.JsxSelfClosingElement]:(e,t)=>{let r=a(e.tagName,t,er),i=T(e.typeArguments,t),s=a(e.attributes,t,Fr);return Wo(e,r,i,s)},[n.JsxFragment]:(e,t)=>{let r=a(e.openingFragment,t,ui),i=T(e.children,t),s=a(e.closingFragment,t,pi);return zo(e,r,i,s)},[n.JsxAttribute]:(e,t)=>{let r=a(e.name,t,yi),i=a(e.initializer,t,xi);return Ho(e,r,i)},[n.JsxSpreadAttribute]:(e,t)=>{let r=a(e.expression,t,w);return Go(e,r)},[n.JsxClosingElement]:(e,t)=>{let r=a(e.tagName,t,er);return $o(e,r)},[n.JsxExpression]:(e,t)=>{let r=a(e.dotDotDotToken,t,Jt),i=a(e.expression,t,w);return Fo(e,r,i)},[n.SyntaxList]:(e,t)=>{let r=tr(e.children,t);return Qo(e,r)},[n.JSDoc]:(e,t)=>{let r=T(e.comment,t),i=T(e.tags,t);return Yo(e,r,i)},[n.JSDocTypeExpression]:(e,t)=>{let r=a(e.type,t,_);return Xo(e,r)},[n.JSDocNonNullableType]:(e,t)=>{let r=a(e.type,t,_);return Zo(e,r)},[n.JSDocNullableType]:(e,t)=>{let r=a(e.type,t,_);return Ko(e,r)},[n.JSDocVariadicType]:(e,t)=>{let r=a(e.type,t,_);return ea(e,r)},[n.JSDocOptionalType]:(e,t)=>{let r=a(e.type,t,_);return ta(e,r)},[n.JSDocTypeTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.typeExpression,t),s=T(e.comment,t);return ra(e,r,i,s)},[n.JSDocUnknownTag]:(e,t)=>{let r=a(e.tagName,t,I),i=T(e.comment,t);return na(e,r,i)},[n.JSDocTemplateTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.constraint,t),s=T(e.typeParameters,t),o=T(e.comment,t);return ia(e,r,i,s,o)},[n.JSDocReturnTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.typeExpression,t,_),s=T(e.comment,t);return sa(e,r,i,s)},[n.JSDocPublicTag]:(e,t)=>{let r=a(e.tagName,t,I),i=T(e.comment,t);return oa(e,r,i)},[n.JSDocPrivateTag]:(e,t)=>{let r=a(e.tagName,t,I),i=T(e.comment,t);return aa(e,r,i)},[n.JSDocProtectedTag]:(e,t)=>{let r=a(e.tagName,t,I),i=T(e.comment,t);return ca(e,r,i)},[n.JSDocReadonlyTag]:(e,t)=>{let r=a(e.tagName,t,I),i=T(e.comment,t);return ua(e,r,i)},[n.JSDocOverrideTag]:(e,t)=>{let r=a(e.tagName,t,I),i=T(e.comment,t);return pa(e,r,i)},[n.JSDocDeprecatedTag]:(e,t)=>{let r=a(e.tagName,t,I),i=T(e.comment,t);return la(e,r,i)},[n.JSDocSeeTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.nameExpression,t,_),s=T(e.comment,t);return fa(e,r,i,s)},[n.JSDocImplementsTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.className,t,Gr),s=T(e.comment,t);return ma(e,r,i,s)},[n.JSDocAugmentsTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.className,t,Gr),s=T(e.comment,t);return ha(e,r,i,s)},[n.JSDocSatisfiesTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.typeExpression,t,_),s=T(e.comment,t);return da(e,r,i,s)},[n.JSDocThrowsTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.typeExpression,t,_),s=T(e.comment,t);return Ta(e,r,i,s)},[n.JSDocThisTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.typeExpression,t,_),s=T(e.comment,t);return ga(e,r,i,s)},[n.JSDocImportTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.importClause,t,Qr),s=a(e.moduleSpecifier,t,w),o=a(e.attributes,t,Nt),u=T(e.comment,t);return ya(e,r,i,s,o,u)},[n.JSDocCallbackTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.typeExpression,t,_),s=a(e.name,t,Xr),o=T(e.comment,t);return xa(e,r,i,s,o)},[n.JSDocOverloadTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.typeExpression,t,_),s=T(e.comment,t);return Ea(e,r,i,s)},[n.JSDocTypedefTag]:(e,t)=>{let r=a(e.tagName,t,I),i=a(e.typeExpression,t),s=a(e.name,t,Xr),o=T(e.comment,t);return ka(e,r,i,s,o)},[n.JSDocSignature]:(e,t)=>{let r=T(e.typeParameters,t),i=T(e.parameters,t),s=a(e.type,t,_);return wa(e,r,i,s)},[n.JSDocNameReference]:(e,t)=>{let r=a(e.name,t,Ee);return Da(e,r)},[n.SourceFile]:(e,t)=>{let r=T(e.statements,t),i=a(e.endOfFileToken,t,Si);return Va(e,r,i)},[n.ModuleDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,fi),s=a(e.body,t,mi);return Sa(e,r,i,s)},[n.ImportEqualsDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,I),s=a(e.moduleReference,t,hi);return _a(e,r,i,s)},[n.ExportDeclaration]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.exportClause,t,Ti),s=a(e.moduleSpecifier,t,w),o=a(e.attributes,t,Nt);return Pa(e,r,i,s,o)},[n.ImportType]:(e,t)=>{let r=a(e.argument,t,_),i=a(e.attributes,t,Nt),s=a(e.qualifier,t,Ee),o=T(e.typeArguments,t);return Aa(e,r,i,s,o)},[n.ImportClause]:(e,t)=>{let r=a(e.name,t,I),i=a(e.namedBindings,t,di);return ba(e,r,i)},[n.ImportSpecifier]:(e,t)=>{let r=a(e.propertyName,t,Lt),i=a(e.name,t,I);return Ia(e,r,i)},[n.JSDocLink]:(e,t)=>{let r=a(e.name,t,Ee);return Ca(e,r)},[n.JSDocLinkPlain]:(e,t)=>{let r=a(e.name,t,Ee);return Na(e,r)},[n.JSDocLinkCode]:(e,t)=>{let r=a(e.name,t,Ee);return La(e,r)},[n.TypeParameter]:(e,t)=>{let r=T(e.modifiers,t),i=a(e.name,t,I),s=a(e.constraint,t,_),o=a(e.expression,t,w),u=a(e.defaultType,t,_);return Ja(e,r,i,s,o,u)},[n.SyntheticReferenceExpression]:(e,t)=>{let r=a(e.expression,t,w),i=a(e.thisArg,t,w);return Ra(e,r,i)},[n.JSDocTypeLiteral]:(e,t)=>{let r=tr(e.jsdocPropertyTags,t);return Oa(e,r)},[n.ForInStatement]:(e,t)=>{let r=a(e.awaitModifier,t,Kr),i=a(e.initializer,t,Kt),s=a(e.expression,t,w),o=a(e.statement,t,Pe);return va(e,r,i,s,o)},[n.ForOfStatement]:(e,t)=>{let r=a(e.awaitModifier,t,Kr),i=a(e.initializer,t,Kt),s=a(e.expression,t,w),o=a(e.statement,t,Pe);return Ma(e,r,i,s,o)},[n.CaseClause]:(e,t)=>{let r=a(e.expression,t,w),i=T(e.statements,t);return qa(e,r,i)},[n.DefaultClause]:(e,t)=>{let r=a(e.expression,t,w),i=T(e.statements,t);return Ba(e,r,i)},[n.ObjectBindingPattern]:(e,t)=>{let r=T(e.elements,t);return Ua(e,r)},[n.ArrayBindingPattern]:(e,t)=>{let r=T(e.elements,t);return ja(e,r)},[n.JSDocParameterTag]:rr,[n.JSDocPropertyTag]:rr};function vt(e,t){return t?e(t):void 0}function dl(e,t,r){if(!r)return;if(t)return t(r);for(let i of r){let s=e(i);if(s)return s}return}function nr(e,t,r){return vt(t,e.tagName)||(e.isNameFirst?vt(t,e.name)||vt(t,e.typeExpression):vt(t,e.typeExpression)||vt(t,e.name))||dl(t,r,e.comment)}function rr(e,t){let r=a(e.tagName,t,I),i=a(e.name,t,Ee),s=a(e.typeExpression,t,_),o=T(e.comment,t);return e.kind===n.JSDocParameterTag?Wa(e,r,i,s,o):za(e,r,i,s,o)}class l{kind;flags=0;pos=-1;end=-1;parent=void 0;_data;constructor(e,t){this.kind=e,this._data=t}get ambientModuleNames(){return this._data?.ambientModuleNames}get argument(){return this._data?.argument}get argumentExpression(){return this._data?.argumentExpression}get arguments(){return this._data?.arguments}get assertsModifier(){return this._data?.assertsModifier}get asteriskToken(){return this._data?.asteriskToken}get attributes(){return this._data?.attributes}get awaitModifier(){return this._data?.awaitModifier}get block(){return this._data?.block}get body(){return this._data?.body}get caseBlock(){return this._data?.caseBlock}get catchClause(){return this._data?.catchClause}get checkType(){return this._data?.checkType}get children(){return this._data?.children}get className(){return this._data?.className}get clauses(){return this._data?.clauses}get closingElement(){return this._data?.closingElement}get closingFragment(){return this._data?.closingFragment}get colonToken(){return this._data?.colonToken}get comment(){return this._data?.comment}get condition(){return this._data?.condition}get constraint(){return this._data?.constraint}get containsOnlyTriviaWhiteSpaces(){return this._data?.containsOnlyTriviaWhiteSpaces}get declarationList(){return this._data?.declarationList}get declarations(){return this._data?.declarations}get defaultType(){return this._data?.defaultType}get dotDotDotToken(){return this._data?.dotDotDotToken}get elementType(){return this._data?.elementType}get elements(){return this._data?.elements}get elseStatement(){return this._data?.elseStatement}get endOfFileToken(){return this._data?.endOfFileToken}get equalsGreaterThanToken(){return this._data?.equalsGreaterThanToken}get equalsToken(){return this._data?.equalsToken}get exclamationToken(){return this._data?.exclamationToken}get exportClause(){return this._data?.exportClause}get exprName(){return this._data?.exprName}get expression(){return this._data?.expression}get extendsType(){return this._data?.extendsType}get externalModuleIndicator(){return this._data?.externalModuleIndicator}get falseType(){return this._data?.falseType}get fileName(){return this._data?.fileName}get finallyBlock(){return this._data?.finallyBlock}get head(){return this._data?.head}get heritageClauses(){return this._data?.heritageClauses}get importClause(){return this._data?.importClause}get imports(){return this._data?.imports}get incrementor(){return this._data?.incrementor}get indexType(){return this._data?.indexType}get initializer(){return this._data?.initializer}get isArrayType(){return this._data?.isArrayType}get isBracketed(){return this._data?.isBracketed}get isDeclarationFile(){return this._data?.isDeclarationFile}get isExportEquals(){return this._data?.isExportEquals}get isNameFirst(){return this._data?.isNameFirst}get isSpread(){return this._data?.isSpread}get isTypeOf(){return this._data?.isTypeOf}get isTypeOnly(){return this._data?.isTypeOnly}get jsdocPropertyTags(){return this._data?.jsdocPropertyTags}get keyword(){return this._data?.keyword}get keywordToken(){return this._data?.keywordToken}get label(){return this._data?.label}get languageVariant(){return this._data?.languageVariant}get left(){return this._data?.left}get libReferenceDirectives(){return this._data?.libReferenceDirectives}get literal(){return this._data?.literal}get members(){return this._data?.members}get modifiers(){return this._data?.modifiers}get moduleAugmentations(){return this._data?.moduleAugmentations}get moduleReference(){return this._data?.moduleReference}get moduleSpecifier(){return this._data?.moduleSpecifier}get multiLine(){return this._data?.multiLine}get name(){return this._data?.name}get nameExpression(){return this._data?.nameExpression}get nameType(){return this._data?.nameType}get namedBindings(){return this._data?.namedBindings}get namespace(){return this._data?.namespace}get objectAssignmentInitializer(){return this._data?.objectAssignmentInitializer}get objectType(){return this._data?.objectType}get openingElement(){return this._data?.openingElement}get openingFragment(){return this._data?.openingFragment}get operand(){return this._data?.operand}get operator(){return this._data?.operator}get operatorToken(){return this._data?.operatorToken}get parameterName(){return this._data?.parameterName}get parameters(){return this._data?.parameters}get path(){return this._data?.path}get phaseModifier(){return this._data?.phaseModifier}get postfixToken(){return this._data?.postfixToken}get properties(){return this._data?.properties}get propertyName(){return this._data?.propertyName}get qualifier(){return this._data?.qualifier}get questionDotToken(){return this._data?.questionDotToken}get questionToken(){return this._data?.questionToken}get rawText(){return this._data?.rawText}get readonlyToken(){return this._data?.readonlyToken}get referencedFiles(){return this._data?.referencedFiles}get right(){return this._data?.right}get scriptKind(){return this._data?.scriptKind}get statement(){return this._data?.statement}get statements(){return this._data?.statements}get tag(){return this._data?.tag}get tagName(){return this._data?.tagName}get tags(){return this._data?.tags}get template(){return this._data?.template}get templateFlags(){return this._data?.templateFlags}get templateSpans(){return this._data?.templateSpans}get text(){return this._data?.text}get thenStatement(){return this._data?.thenStatement}get thisArg(){return this._data?.thisArg}get token(){return this._data?.token}get tokenCache(){return this._data?.tokenCache}get tokenFlags(){return this._data?.tokenFlags}get trueType(){return this._data?.trueType}get tryBlock(){return this._data?.tryBlock}get tupleNameSource(){return this._data?.tupleNameSource}get type(){return this._data?.type}get typeArguments(){return this._data?.typeArguments}get typeExpression(){return this._data?.typeExpression}get typeName(){return this._data?.typeName}get typeParameter(){return this._data?.typeParameter}get typeParameters(){return this._data?.typeParameters}get typeReferenceDirectives(){return this._data?.typeReferenceDirectives}get types(){return this._data?.types}get value(){return this._data?.value}get variableDeclaration(){return this._data?.variableDeclaration}get whenFalse(){return this._data?.whenFalse}get whenTrue(){return this._data?.whenTrue}forEachChild(e,t){let r=gl[this.kind];return r?r(this._data,e,t):void 0}getSourceFile(){let e=this;while(e.parent)e=e.parent;return e}getStart(e,t){return Mt(this,e??this.getSourceFile(),t)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(e){return this.getEnd()-this.getStart(e)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(e){return this.getStart(e)-this.pos}getFullText(e){return(e??this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return e??=this.getSourceFile(),e.text.substring(this.getStart(e),this.end)}}function Tl(e){return"pos"in e&&"end"in e}function m(e,t=-1,r=-1){if(Tl(e))return e;let i=e.slice();return i.pos=t,i.end=r,i}var gl={[n.QualifiedName]:(e,t,r)=>c(t,e.left)||c(t,e.right),[n.ComputedPropertyName]:(e,t,r)=>c(t,e.expression),[n.Decorator]:(e,t,r)=>c(t,e.expression),[n.IfStatement]:(e,t,r)=>c(t,e.expression)||c(t,e.thenStatement)||c(t,e.elseStatement),[n.DoStatement]:(e,t,r)=>c(t,e.statement)||c(t,e.expression),[n.WhileStatement]:(e,t,r)=>c(t,e.expression)||c(t,e.statement),[n.ForStatement]:(e,t,r)=>c(t,e.initializer)||c(t,e.condition)||c(t,e.incrementor)||c(t,e.statement),[n.BreakStatement]:(e,t,r)=>c(t,e.label),[n.ContinueStatement]:(e,t,r)=>c(t,e.label),[n.ReturnStatement]:(e,t,r)=>c(t,e.expression),[n.WithStatement]:(e,t,r)=>c(t,e.expression)||c(t,e.statement),[n.SwitchStatement]:(e,t,r)=>c(t,e.expression)||c(t,e.caseBlock),[n.CaseBlock]:(e,t,r)=>h(t,r,e.clauses),[n.ThrowStatement]:(e,t,r)=>c(t,e.expression),[n.TryStatement]:(e,t,r)=>c(t,e.tryBlock)||c(t,e.catchClause)||c(t,e.finallyBlock),[n.CatchClause]:(e,t,r)=>c(t,e.variableDeclaration)||c(t,e.block),[n.LabeledStatement]:(e,t,r)=>c(t,e.label)||c(t,e.statement),[n.ExpressionStatement]:(e,t,r)=>c(t,e.expression),[n.Block]:(e,t,r)=>h(t,r,e.statements),[n.VariableStatement]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.declarationList),[n.VariableDeclaration]:(e,t,r)=>c(t,e.name)||c(t,e.exclamationToken)||c(t,e.type)||c(t,e.initializer),[n.VariableDeclarationList]:(e,t,r)=>h(t,r,e.declarations),[n.Parameter]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.dotDotDotToken)||c(t,e.name)||c(t,e.questionToken)||c(t,e.type)||c(t,e.initializer),[n.BindingElement]:(e,t,r)=>c(t,e.dotDotDotToken)||c(t,e.propertyName)||c(t,e.name)||c(t,e.initializer),[n.MissingDeclaration]:(e,t,r)=>h(t,r,e.modifiers),[n.FunctionDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.ClassDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.heritageClauses)||h(t,r,e.members),[n.ClassExpression]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.heritageClauses)||h(t,r,e.members),[n.HeritageClause]:(e,t,r)=>h(t,r,e.types),[n.InterfaceDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.heritageClauses)||h(t,r,e.members),[n.TypeAliasDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||c(t,e.type),[n.JSTypeAliasDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||c(t,e.type),[n.EnumMember]:(e,t,r)=>c(t,e.name)||c(t,e.initializer),[n.EnumDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.members),[n.ModuleBlock]:(e,t,r)=>h(t,r,e.statements),[n.ImportDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.importClause)||c(t,e.moduleSpecifier)||c(t,e.attributes),[n.JSImportDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.importClause)||c(t,e.moduleSpecifier)||c(t,e.attributes),[n.ExternalModuleReference]:(e,t,r)=>c(t,e.expression),[n.NamespaceImport]:(e,t,r)=>c(t,e.name),[n.NamedImports]:(e,t,r)=>h(t,r,e.elements),[n.ExportAssignment]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.type)||c(t,e.expression),[n.NamespaceExportDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name),[n.NamespaceExport]:(e,t,r)=>c(t,e.name),[n.NamedExports]:(e,t,r)=>h(t,r,e.elements),[n.ExportSpecifier]:(e,t,r)=>c(t,e.propertyName)||c(t,e.name),[n.CallSignature]:(e,t,r)=>h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.ConstructSignature]:(e,t,r)=>h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.Constructor]:(e,t,r)=>h(t,r,e.modifiers)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.GetAccessor]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.SetAccessor]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.IndexSignature]:(e,t,r)=>h(t,r,e.modifiers)||h(t,r,e.parameters)||c(t,e.type),[n.MethodSignature]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.MethodDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||c(t,e.postfixToken)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.PropertySignature]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||c(t,e.type)||c(t,e.initializer),[n.PropertyDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||c(t,e.type)||c(t,e.initializer),[n.ClassStaticBlockDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.body),[n.BinaryExpression]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.left)||c(t,e.type)||c(t,e.operatorToken)||c(t,e.right),[n.PrefixUnaryExpression]:(e,t,r)=>c(t,e.operand),[n.PostfixUnaryExpression]:(e,t,r)=>c(t,e.operand),[n.YieldExpression]:(e,t,r)=>c(t,e.asteriskToken)||c(t,e.expression),[n.ArrowFunction]:(e,t,r)=>h(t,r,e.modifiers)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.equalsGreaterThanToken)||c(t,e.body),[n.FunctionExpression]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.asteriskToken)||c(t,e.name)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type)||c(t,e.body),[n.AsExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.type),[n.SatisfiesExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.type),[n.ConditionalExpression]:(e,t,r)=>c(t,e.condition)||c(t,e.questionToken)||c(t,e.whenTrue)||c(t,e.colonToken)||c(t,e.whenFalse),[n.PropertyAccessExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.questionDotToken)||c(t,e.name),[n.ElementAccessExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.questionDotToken)||c(t,e.argumentExpression),[n.CallExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.questionDotToken)||h(t,r,e.typeArguments)||h(t,r,e.arguments),[n.NewExpression]:(e,t,r)=>c(t,e.expression)||h(t,r,e.typeArguments)||h(t,r,e.arguments),[n.MetaProperty]:(e,t,r)=>c(t,e.name),[n.NonNullExpression]:(e,t,r)=>c(t,e.expression),[n.SpreadElement]:(e,t,r)=>c(t,e.expression),[n.TemplateExpression]:(e,t,r)=>c(t,e.head)||h(t,r,e.templateSpans),[n.TemplateSpan]:(e,t,r)=>c(t,e.expression)||c(t,e.literal),[n.TaggedTemplateExpression]:(e,t,r)=>c(t,e.tag)||c(t,e.questionDotToken)||h(t,r,e.typeArguments)||c(t,e.template),[n.ParenthesizedExpression]:(e,t,r)=>c(t,e.expression),[n.ArrayLiteralExpression]:(e,t,r)=>h(t,r,e.elements),[n.ObjectLiteralExpression]:(e,t,r)=>h(t,r,e.properties),[n.SpreadAssignment]:(e,t,r)=>c(t,e.expression),[n.PropertyAssignment]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||c(t,e.type)||c(t,e.initializer),[n.ShorthandPropertyAssignment]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.postfixToken)||c(t,e.type)||c(t,e.equalsToken)||c(t,e.objectAssignmentInitializer),[n.DeleteExpression]:(e,t,r)=>c(t,e.expression),[n.TypeOfExpression]:(e,t,r)=>c(t,e.expression),[n.VoidExpression]:(e,t,r)=>c(t,e.expression),[n.AwaitExpression]:(e,t,r)=>c(t,e.expression),[n.TypeAssertionExpression]:(e,t,r)=>c(t,e.type)||c(t,e.expression),[n.UnionType]:(e,t,r)=>h(t,r,e.types),[n.IntersectionType]:(e,t,r)=>h(t,r,e.types),[n.ConditionalType]:(e,t,r)=>c(t,e.checkType)||c(t,e.extendsType)||c(t,e.trueType)||c(t,e.falseType),[n.TypeOperator]:(e,t,r)=>c(t,e.type),[n.InferType]:(e,t,r)=>c(t,e.typeParameter),[n.ArrayType]:(e,t,r)=>c(t,e.elementType),[n.IndexedAccessType]:(e,t,r)=>c(t,e.objectType)||c(t,e.indexType),[n.TypeReference]:(e,t,r)=>c(t,e.typeName)||h(t,r,e.typeArguments),[n.ExpressionWithTypeArguments]:(e,t,r)=>c(t,e.expression)||h(t,r,e.typeArguments),[n.LiteralType]:(e,t,r)=>c(t,e.literal),[n.TypePredicate]:(e,t,r)=>c(t,e.assertsModifier)||c(t,e.parameterName)||c(t,e.type),[n.ImportAttribute]:(e,t,r)=>c(t,e.name)||c(t,e.value),[n.ImportAttributes]:(e,t,r)=>h(t,r,e.attributes),[n.TypeQuery]:(e,t,r)=>c(t,e.exprName)||h(t,r,e.typeArguments),[n.MappedType]:(e,t,r)=>c(t,e.readonlyToken)||c(t,e.typeParameter)||c(t,e.nameType)||c(t,e.questionToken)||c(t,e.type)||h(t,r,e.members),[n.TypeLiteral]:(e,t,r)=>h(t,r,e.members),[n.TupleType]:(e,t,r)=>h(t,r,e.elements),[n.NamedTupleMember]:(e,t,r)=>c(t,e.dotDotDotToken)||c(t,e.name)||c(t,e.questionToken)||c(t,e.type),[n.OptionalType]:(e,t,r)=>c(t,e.type),[n.RestType]:(e,t,r)=>c(t,e.type),[n.ParenthesizedType]:(e,t,r)=>c(t,e.type),[n.FunctionType]:(e,t,r)=>h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.ConstructorType]:(e,t,r)=>h(t,r,e.modifiers)||h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.TemplateLiteralType]:(e,t,r)=>c(t,e.head)||h(t,r,e.templateSpans),[n.TemplateLiteralTypeSpan]:(e,t,r)=>c(t,e.type)||c(t,e.literal),[n.SyntheticExpression]:(e,t,r)=>c(t,e.tupleNameSource),[n.PartiallyEmittedExpression]:(e,t,r)=>c(t,e.expression),[n.JsxElement]:(e,t,r)=>c(t,e.openingElement)||h(t,r,e.children)||c(t,e.closingElement),[n.JsxAttributes]:(e,t,r)=>h(t,r,e.properties),[n.JsxNamespacedName]:(e,t,r)=>c(t,e.namespace)||c(t,e.name),[n.JsxOpeningElement]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.typeArguments)||c(t,e.attributes),[n.JsxSelfClosingElement]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.typeArguments)||c(t,e.attributes),[n.JsxFragment]:(e,t,r)=>c(t,e.openingFragment)||h(t,r,e.children)||c(t,e.closingFragment),[n.JsxAttribute]:(e,t,r)=>c(t,e.name)||c(t,e.initializer),[n.JsxSpreadAttribute]:(e,t,r)=>c(t,e.expression),[n.JsxClosingElement]:(e,t,r)=>c(t,e.tagName),[n.JsxExpression]:(e,t,r)=>c(t,e.dotDotDotToken)||c(t,e.expression),[n.SyntaxList]:(e,t,r)=>h(t,r,e.children),[n.JSDoc]:(e,t,r)=>h(t,r,e.comment)||h(t,r,e.tags),[n.JSDocTypeExpression]:(e,t,r)=>c(t,e.type),[n.JSDocNonNullableType]:(e,t,r)=>c(t,e.type),[n.JSDocNullableType]:(e,t,r)=>c(t,e.type),[n.JSDocVariadicType]:(e,t,r)=>c(t,e.type),[n.JSDocOptionalType]:(e,t,r)=>c(t,e.type),[n.JSDocTypeTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocUnknownTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocTemplateTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.constraint)||h(t,r,e.typeParameters)||h(t,r,e.comment),[n.JSDocReturnTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocPublicTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocPrivateTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocProtectedTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocReadonlyTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocOverrideTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocDeprecatedTag]:(e,t,r)=>c(t,e.tagName)||h(t,r,e.comment),[n.JSDocSeeTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.nameExpression)||h(t,r,e.comment),[n.JSDocImplementsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.className)||h(t,r,e.comment),[n.JSDocAugmentsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.className)||h(t,r,e.comment),[n.JSDocSatisfiesTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocThrowsTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocThisTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocImportTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.importClause)||c(t,e.moduleSpecifier)||c(t,e.attributes)||h(t,r,e.comment),[n.JSDocCallbackTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||c(t,e.name)||h(t,r,e.comment),[n.JSDocOverloadTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||h(t,r,e.comment),[n.JSDocTypedefTag]:(e,t,r)=>c(t,e.tagName)||c(t,e.typeExpression)||c(t,e.name)||h(t,r,e.comment),[n.JSDocSignature]:(e,t,r)=>h(t,r,e.typeParameters)||h(t,r,e.parameters)||c(t,e.type),[n.JSDocNameReference]:(e,t,r)=>c(t,e.name),[n.ModuleDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.body),[n.ImportEqualsDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.moduleReference),[n.ExportDeclaration]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.exportClause)||c(t,e.moduleSpecifier)||c(t,e.attributes),[n.ImportType]:(e,t,r)=>c(t,e.argument)||c(t,e.attributes)||c(t,e.qualifier)||h(t,r,e.typeArguments),[n.ImportClause]:(e,t,r)=>c(t,e.name)||c(t,e.namedBindings),[n.ImportSpecifier]:(e,t,r)=>c(t,e.propertyName)||c(t,e.name),[n.JSDocLink]:(e,t,r)=>c(t,e.name),[n.JSDocLinkPlain]:(e,t,r)=>c(t,e.name),[n.JSDocLinkCode]:(e,t,r)=>c(t,e.name),[n.TypeParameter]:(e,t,r)=>h(t,r,e.modifiers)||c(t,e.name)||c(t,e.constraint)||c(t,e.expression)||c(t,e.defaultType),[n.SyntheticReferenceExpression]:(e,t,r)=>c(t,e.expression)||c(t,e.thisArg),[n.JSDocTypeLiteral]:(e,t,r)=>h(t,r,e.jsdocPropertyTags),[n.ForInStatement]:(e,t,r)=>c(t,e.awaitModifier)||c(t,e.initializer)||c(t,e.expression)||c(t,e.statement),[n.ForOfStatement]:(e,t,r)=>c(t,e.awaitModifier)||c(t,e.initializer)||c(t,e.expression)||c(t,e.statement),[n.CaseClause]:(e,t,r)=>c(t,e.expression)||h(t,r,e.statements),[n.DefaultClause]:(e,t,r)=>c(t,e.expression)||h(t,r,e.statements),[n.ObjectBindingPattern]:(e,t,r)=>h(t,r,e.elements),[n.ArrayBindingPattern]:(e,t,r)=>h(t,r,e.elements),[n.JSDocParameterTag]:nr,[n.JSDocPropertyTag]:nr,[n.SourceFile]:(e,t,r)=>h(t,r,e.statements)||c(t,e.endOfFileToken)};function c(e,t){return t?e(t):void 0}function h(e,t,r){if(!r)return;if(t)return t(r);for(let i of r){let s=e(i);if(s)return s}return}function yl(e,t){return new l(n.QualifiedName,{left:e,right:t})}function xl(e){return new l(n.ComputedPropertyName,{expression:e})}function El(e){return new l(n.Decorator,{expression:e})}function kl(e,t,r){return new l(n.IfStatement,{expression:e,thenStatement:t,elseStatement:r})}function wl(e,t){return new l(n.DoStatement,{statement:e,expression:t})}function Dl(e,t){return new l(n.WhileStatement,{expression:e,statement:t})}function Sl(e,t,r,i){return new l(n.ForStatement,{initializer:e,condition:t,incrementor:r,statement:i})}function _l(e){return new l(n.BreakStatement,{label:e})}function Pl(e){return new l(n.ContinueStatement,{label:e})}function Al(e){return new l(n.ReturnStatement,{expression:e})}function bl(e,t){return new l(n.WithStatement,{expression:e,statement:t})}function Il(e,t){return new l(n.SwitchStatement,{expression:e,caseBlock:t})}function Cl(e){return new l(n.CaseBlock,{clauses:m(e)})}function Nl(e){return new l(n.ThrowStatement,{expression:e})}function Ll(e,t,r){return new l(n.TryStatement,{tryBlock:e,catchClause:t,finallyBlock:r})}function Jl(e,t){return new l(n.CatchClause,{variableDeclaration:e,block:t})}function Rl(e,t){return new l(n.LabeledStatement,{label:e,statement:t})}function Ol(e){return new l(n.ExpressionStatement,{expression:e})}function vl(e,t){return new l(n.Block,{statements:m(e),multiLine:t})}function Ml(e,t){return new l(n.VariableStatement,{modifiers:e?m(e):void 0,declarationList:t})}function ql(e,t,r,i){return new l(n.VariableDeclaration,{name:e,exclamationToken:t,type:r,initializer:i})}function Bl(e,t){let r=new l(n.VariableDeclarationList,{declarations:m(e)});return r.flags=t,r}function Ul(e,t,r,i,s,o){return new l(n.Parameter,{modifiers:e?m(e):void 0,dotDotDotToken:t,name:r,questionToken:i,type:s,initializer:o})}function jl(e,t,r,i){return new l(n.BindingElement,{dotDotDotToken:e,propertyName:t,name:r,initializer:i})}function Vl(e){return new l(n.MissingDeclaration,{modifiers:e?m(e):void 0})}function Wl(e,t,r,i,s,o,u){return new l(n.FunctionDeclaration,{modifiers:e?m(e):void 0,asteriskToken:t,name:r,typeParameters:i?m(i):void 0,parameters:m(s),type:o,body:u})}function zl(e,t,r,i,s){return new l(n.ClassDeclaration,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,heritageClauses:i?m(i):void 0,members:m(s)})}function Hl(e,t,r,i,s){return new l(n.ClassExpression,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,heritageClauses:i?m(i):void 0,members:m(s)})}function Gl(e,t){return new l(n.HeritageClause,{token:e,types:m(t)})}function $l(e,t,r,i,s){return new l(n.InterfaceDeclaration,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,heritageClauses:i?m(i):void 0,members:m(s)})}function Fl(e,t,r,i){return new l(n.TypeAliasDeclaration,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,type:i})}function Ql(e,t){return new l(n.EnumMember,{name:e,initializer:t})}function Yl(e,t,r){return new l(n.EnumDeclaration,{modifiers:e?m(e):void 0,name:t,members:m(r)})}function Xl(e){return new l(n.ModuleBlock,{statements:m(e)})}function Zl(e,t,r,i){return new l(n.ImportDeclaration,{modifiers:e?m(e):void 0,importClause:t,moduleSpecifier:r,attributes:i})}function Kl(e){return new l(n.ExternalModuleReference,{expression:e})}function ef(e){return new l(n.NamespaceImport,{name:e})}function tf(e){return new l(n.NamedImports,{elements:m(e)})}function rf(e,t=!1,r,i){return new l(n.ExportAssignment,{modifiers:e?m(e):void 0,isExportEquals:t,type:r,expression:i})}function nf(e,t){return new l(n.NamespaceExportDeclaration,{modifiers:e?m(e):void 0,name:t})}function sf(e){return new l(n.NamespaceExport,{name:e})}function of(e){return new l(n.NamedExports,{elements:m(e)})}function af(e=!1,t,r){return new l(n.ExportSpecifier,{isTypeOnly:e,propertyName:t,name:r})}function cf(e,t,r){return new l(n.CallSignature,{typeParameters:e?m(e):void 0,parameters:m(t),type:r})}function uf(e,t,r){return new l(n.ConstructSignature,{typeParameters:e?m(e):void 0,parameters:m(t),type:r})}function pf(e,t,r,i,s){return new l(n.Constructor,{modifiers:e?m(e):void 0,typeParameters:t?m(t):void 0,parameters:m(r),type:i,body:s})}function lf(e,t,r,i,s,o){return new l(n.GetAccessor,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,parameters:m(i),type:s,body:o})}function ff(e,t,r,i,s,o){return new l(n.SetAccessor,{modifiers:e?m(e):void 0,name:t,typeParameters:r?m(r):void 0,parameters:m(i),type:s,body:o})}function mf(e,t,r){return new l(n.IndexSignature,{modifiers:e?m(e):void 0,parameters:m(t),type:r})}function hf(e,t,r,i,s,o){return new l(n.MethodSignature,{modifiers:e?m(e):void 0,name:t,postfixToken:r,typeParameters:i?m(i):void 0,parameters:m(s),type:o})}function df(e,t,r,i,s,o,u,f){return new l(n.MethodDeclaration,{modifiers:e?m(e):void 0,asteriskToken:t,name:r,postfixToken:i,typeParameters:s?m(s):void 0,parameters:m(o),type:u,body:f})}function Tf(e,t,r,i,s){return new l(n.PropertySignature,{modifiers:e?m(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function gf(e,t,r,i,s){return new l(n.PropertyDeclaration,{modifiers:e?m(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function yf(e,t){return new l(n.ClassStaticBlockDeclaration,{modifiers:e?m(e):void 0,body:t})}function xf(e,t,r,i,s){return new l(n.BinaryExpression,{modifiers:e?m(e):void 0,left:t,type:r,operatorToken:i,right:s})}function Ef(e,t){return new l(n.PrefixUnaryExpression,{operator:e,operand:t})}function kf(e,t){return new l(n.PostfixUnaryExpression,{operand:e,operator:t})}function wf(e,t){return new l(n.YieldExpression,{asteriskToken:e,expression:t})}function Df(e,t,r,i,s,o){return new l(n.ArrowFunction,{modifiers:e?m(e):void 0,typeParameters:t?m(t):void 0,parameters:m(r),type:i,equalsGreaterThanToken:s,body:o})}function Sf(e,t,r,i,s,o,u){return new l(n.FunctionExpression,{modifiers:e?m(e):void 0,asteriskToken:t,name:r,typeParameters:i?m(i):void 0,parameters:m(s),type:o,body:u})}function _f(e,t){return new l(n.AsExpression,{expression:e,type:t})}function Pf(e,t){return new l(n.SatisfiesExpression,{expression:e,type:t})}function Af(e,t,r,i,s){return new l(n.ConditionalExpression,{condition:e,questionToken:t,whenTrue:r,colonToken:i,whenFalse:s})}function bf(e,t,r,i){let s=new l(n.PropertyAccessExpression,{expression:e,questionDotToken:t,name:r});return s.flags=i,s}function If(e,t,r,i){let s=new l(n.ElementAccessExpression,{expression:e,questionDotToken:t,argumentExpression:r});return s.flags=i,s}function Cf(e,t,r,i,s){let o=new l(n.CallExpression,{expression:e,questionDotToken:t,typeArguments:r?m(r):void 0,arguments:m(i)});return o.flags=s,o}function Nf(e,t,r){return new l(n.NewExpression,{expression:e,typeArguments:t?m(t):void 0,arguments:r?m(r):void 0})}function Lf(e,t){return new l(n.MetaProperty,{keywordToken:e,name:t})}function Jf(e,t){let r=new l(n.NonNullExpression,{expression:e});return r.flags=t,r}function Rf(e){return new l(n.SpreadElement,{expression:e})}function Of(e,t){return new l(n.TemplateExpression,{head:e,templateSpans:m(t)})}function vf(e,t){return new l(n.TemplateSpan,{expression:e,literal:t})}function Mf(e,t,r,i,s){let o=new l(n.TaggedTemplateExpression,{tag:e,questionDotToken:t,typeArguments:r?m(r):void 0,template:i});return o.flags=s,o}function qf(e){return new l(n.ParenthesizedExpression,{expression:e})}function Bf(e,t){return new l(n.ArrayLiteralExpression,{elements:m(e),multiLine:t})}function Uf(e,t){return new l(n.ObjectLiteralExpression,{properties:m(e),multiLine:t})}function jf(e){return new l(n.SpreadAssignment,{expression:e})}function Vf(e,t,r,i,s){return new l(n.PropertyAssignment,{modifiers:e?m(e):void 0,name:t,postfixToken:r,type:i,initializer:s})}function Wf(e,t,r,i,s,o){return new l(n.ShorthandPropertyAssignment,{modifiers:e?m(e):void 0,name:t,postfixToken:r,type:i,equalsToken:s,objectAssignmentInitializer:o})}function zf(e){return new l(n.DeleteExpression,{expression:e})}function Hf(e){return new l(n.TypeOfExpression,{expression:e})}function Gf(e){return new l(n.VoidExpression,{expression:e})}function $f(e){return new l(n.AwaitExpression,{expression:e})}function Ff(e,t){return new l(n.TypeAssertionExpression,{type:e,expression:t})}function Qf(e){return new l(n.UnionType,{types:m(e)})}function Yf(e){return new l(n.IntersectionType,{types:m(e)})}function Xf(e,t,r,i){return new l(n.ConditionalType,{checkType:e,extendsType:t,trueType:r,falseType:i})}function Zf(e,t){return new l(n.TypeOperator,{operator:e,type:t})}function Kf(e){return new l(n.InferType,{typeParameter:e})}function em(e){return new l(n.ArrayType,{elementType:e})}function tm(e,t){return new l(n.IndexedAccessType,{objectType:e,indexType:t})}function rm(e,t){return new l(n.TypeReference,{typeName:e,typeArguments:t?m(t):void 0})}function nm(e,t){return new l(n.ExpressionWithTypeArguments,{expression:e,typeArguments:t?m(t):void 0})}function im(e){return new l(n.LiteralType,{literal:e})}function sm(e,t,r){return new l(n.TypePredicate,{assertsModifier:e,parameterName:t,type:r})}function om(e,t){return new l(n.ImportAttribute,{name:e,value:t})}function am(e,t,r){return new l(n.ImportAttributes,{token:e,attributes:m(t),multiLine:r})}function cm(e,t){return new l(n.TypeQuery,{exprName:e,typeArguments:t?m(t):void 0})}function um(e,t,r,i,s,o){return new l(n.MappedType,{readonlyToken:e,typeParameter:t,nameType:r,questionToken:i,type:s,members:o?m(o):void 0})}function pm(e){return new l(n.TypeLiteral,{members:m(e)})}function lm(e){return new l(n.TupleType,{elements:m(e)})}function fm(e,t,r,i){return new l(n.NamedTupleMember,{dotDotDotToken:e,name:t,questionToken:r,type:i})}function mm(e){return new l(n.OptionalType,{type:e})}function hm(e){return new l(n.RestType,{type:e})}function dm(e){return new l(n.ParenthesizedType,{type:e})}function Tm(e,t,r){return new l(n.FunctionType,{typeParameters:e?m(e):void 0,parameters:m(t),type:r})}function gm(e,t,r,i){return new l(n.ConstructorType,{modifiers:e?m(e):void 0,typeParameters:t?m(t):void 0,parameters:m(r),type:i})}function ym(e,t){return new l(n.TemplateLiteralType,{head:e,templateSpans:m(t)})}function xm(e,t){return new l(n.TemplateLiteralTypeSpan,{type:e,literal:t})}function Em(e,t,r){return new l(n.SyntheticExpression,{type:e,isSpread:t,tupleNameSource:r})}function km(e){return new l(n.PartiallyEmittedExpression,{expression:e})}function wm(e,t,r){return new l(n.JsxElement,{openingElement:e,children:m(t),closingElement:r})}function Dm(e){return new l(n.JsxAttributes,{properties:m(e)})}function Sm(e,t){return new l(n.JsxNamespacedName,{namespace:e,name:t})}function _m(e,t,r){return new l(n.JsxOpeningElement,{tagName:e,typeArguments:t?m(t):void 0,attributes:r})}function Pm(e,t,r){return new l(n.JsxSelfClosingElement,{tagName:e,typeArguments:t?m(t):void 0,attributes:r})}function Am(e,t,r){return new l(n.JsxFragment,{openingFragment:e,children:m(t),closingFragment:r})}function bm(e,t){return new l(n.JsxAttribute,{name:e,initializer:t})}function Im(e){return new l(n.JsxSpreadAttribute,{expression:e})}function Cm(e){return new l(n.JsxClosingElement,{tagName:e})}function Nm(e,t){return new l(n.JsxExpression,{dotDotDotToken:e,expression:t})}function Lm(e){return new l(n.SyntaxList,{children:e})}function Jm(e,t){return new l(n.JSDoc,{comment:m(e),tags:t?m(t):void 0})}function Rm(e){return new l(n.JSDocTypeExpression,{type:e})}function Om(e){return new l(n.JSDocNonNullableType,{type:e})}function vm(e){return new l(n.JSDocNullableType,{type:e})}function Mm(e){return new l(n.JSDocVariadicType,{type:e})}function qm(e){return new l(n.JSDocOptionalType,{type:e})}function Bm(e,t,r){return new l(n.JSDocTypeTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function Um(e,t){return new l(n.JSDocUnknownTag,{tagName:e,comment:t?m(t):void 0})}function jm(e,t,r,i){return new l(n.JSDocTemplateTag,{tagName:e,constraint:t,typeParameters:m(r),comment:i?m(i):void 0})}function Vm(e,t,r){return new l(n.JSDocReturnTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function Wm(e,t){return new l(n.JSDocPublicTag,{tagName:e,comment:t?m(t):void 0})}function zm(e,t){return new l(n.JSDocPrivateTag,{tagName:e,comment:t?m(t):void 0})}function Hm(e,t){return new l(n.JSDocProtectedTag,{tagName:e,comment:t?m(t):void 0})}function Gm(e,t){return new l(n.JSDocReadonlyTag,{tagName:e,comment:t?m(t):void 0})}function $m(e,t){return new l(n.JSDocOverrideTag,{tagName:e,comment:t?m(t):void 0})}function Fm(e,t){return new l(n.JSDocDeprecatedTag,{tagName:e,comment:t?m(t):void 0})}function Qm(e,t,r){return new l(n.JSDocSeeTag,{tagName:e,nameExpression:t,comment:r?m(r):void 0})}function Ym(e,t,r){return new l(n.JSDocImplementsTag,{tagName:e,className:t,comment:r?m(r):void 0})}function Xm(e,t,r){return new l(n.JSDocAugmentsTag,{tagName:e,className:t,comment:r?m(r):void 0})}function Zm(e,t,r){return new l(n.JSDocSatisfiesTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function Km(e,t,r){return new l(n.JSDocThrowsTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function eh(e,t,r){return new l(n.JSDocThisTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function th(e,t,r,i,s){return new l(n.JSDocImportTag,{tagName:e,importClause:t,moduleSpecifier:r,attributes:i,comment:s?m(s):void 0})}function rh(e,t,r,i){return new l(n.JSDocCallbackTag,{tagName:e,typeExpression:t,name:r,comment:i?m(i):void 0})}function nh(e,t,r){return new l(n.JSDocOverloadTag,{tagName:e,typeExpression:t,comment:r?m(r):void 0})}function ih(e,t,r,i){return new l(n.JSDocTypedefTag,{tagName:e,typeExpression:t,name:r,comment:i?m(i):void 0})}function sh(e,t,r){return new l(n.JSDocSignature,{typeParameters:e?m(e):void 0,parameters:m(t),type:r})}function oh(e){return new l(n.JSDocNameReference,{name:e})}function ah(e,t,r,i){return new l(n.ModuleDeclaration,{modifiers:e?m(e):void 0,keyword:t,name:r,body:i})}function ch(e,t=!1,r,i){return new l(n.ImportEqualsDeclaration,{modifiers:e?m(e):void 0,isTypeOnly:t,name:r,moduleReference:i})}function uh(e,t,r,i,s){return new l(n.ExportDeclaration,{modifiers:e?m(e):void 0,isTypeOnly:t,exportClause:r,moduleSpecifier:i,attributes:s})}function ph(e=!1,t,r,i,s){return new l(n.ImportType,{isTypeOf:e,argument:t,attributes:r,qualifier:i,typeArguments:s?m(s):void 0})}function lh(e,t,r){return new l(n.ImportClause,{phaseModifier:e,name:t,namedBindings:r})}function fh(e=!1,t,r){return new l(n.ImportSpecifier,{isTypeOnly:e,propertyName:t,name:r})}function mh(e,t){return new l(n.JSDocLink,{name:e,text:t})}function hh(e,t){return new l(n.JSDocLinkPlain,{name:e,text:t})}function dh(e,t){return new l(n.JSDocLinkCode,{name:e,text:t})}function Th(e,t,r,i,s){return new l(n.TypeParameter,{modifiers:e?m(e):void 0,name:t,constraint:r,expression:i,defaultType:s})}function gh(e,t){return new l(n.SyntheticReferenceExpression,{expression:e,thisArg:t})}function yh(e,t){return new l(n.JSDocTypeLiteral,{jsdocPropertyTags:e,isArrayType:t})}function xh(e,t,r,i){return new l(n.ForInStatement,{awaitModifier:e,initializer:t,expression:r,statement:i})}function Eh(e,t,r,i){return new l(n.ForOfStatement,{awaitModifier:e,initializer:t,expression:r,statement:i})}function kh(e,t){return new l(n.CaseClause,{expression:e,statements:m(t)})}function wh(e,t){return new l(n.DefaultClause,{expression:e,statements:m(t)})}function Dh(e){return new l(n.ObjectBindingPattern,{elements:m(e)})}function Sh(e){return new l(n.ArrayBindingPattern,{elements:m(e)})}function _h(e,t,r,i,s,o){return new l(n.JSDocParameterTag,{tagName:e,name:t,isBracketed:r,typeExpression:i,isNameFirst:s,comment:o?m(o):void 0})}function Ph(e,t,r,i,s,o){return new l(n.JSDocPropertyTag,{tagName:e,name:t,isBracketed:r,typeExpression:i,isNameFirst:s,comment:o?m(o):void 0})}function Oi(e,t,r){return e.left!==t||e.right!==r?yl(t,r):e}function vi(e,t){return e.expression!==t?xl(t):e}function Mi(e,t){return e.expression!==t?El(t):e}function qi(e,t,r,i){return e.expression!==t||e.thenStatement!==r||e.elseStatement!==i?kl(t,r,i):e}function Bi(e,t,r){return e.statement!==t||e.expression!==r?wl(t,r):e}function Ui(e,t,r){return e.expression!==t||e.statement!==r?Dl(t,r):e}function ji(e,t,r,i,s){return e.initializer!==t||e.condition!==r||e.incrementor!==i||e.statement!==s?Sl(t,r,i,s):e}function Vi(e,t){return e.label!==t?_l(t):e}function Wi(e,t){return e.label!==t?Pl(t):e}function zi(e,t){return e.expression!==t?Al(t):e}function Hi(e,t,r){return e.expression!==t||e.statement!==r?bl(t,r):e}function Gi(e,t,r){return e.expression!==t||e.caseBlock!==r?Il(t,r):e}function $i(e,t){return e.clauses!==t?Cl(t):e}function Fi(e,t){return e.expression!==t?Nl(t):e}function Qi(e,t,r,i){return e.tryBlock!==t||e.catchClause!==r||e.finallyBlock!==i?Ll(t,r,i):e}function Yi(e,t,r){return e.variableDeclaration!==t||e.block!==r?Jl(t,r):e}function Xi(e,t,r){return e.label!==t||e.statement!==r?Rl(t,r):e}function Zi(e,t){return e.expression!==t?Ol(t):e}function Ki(e,t){return e.statements!==t?vl(t,e.multiLine):e}function es(e,t,r){return e.modifiers!==t||e.declarationList!==r?Ml(t,r):e}function ts(e,t,r,i,s){return e.name!==t||e.exclamationToken!==r||e.type!==i||e.initializer!==s?ql(t,r,i,s):e}function rs(e,t){return e.declarations!==t?Bl(t,e.flags):e}function ns(e,t,r,i,s,o,u){return e.modifiers!==t||e.dotDotDotToken!==r||e.name!==i||e.questionToken!==s||e.type!==o||e.initializer!==u?Ul(t,r,i,s,o,u):e}function is(e,t,r,i,s){return e.dotDotDotToken!==t||e.propertyName!==r||e.name!==i||e.initializer!==s?jl(t,r,i,s):e}function ss(e,t){return e.modifiers!==t?Vl(t):e}function os(e,t,r,i,s,o,u,f){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.typeParameters!==s||e.parameters!==o||e.type!==u||e.body!==f?Wl(t,r,i,s,o,u,f):e}function as(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.heritageClauses!==s||e.members!==o?zl(t,r,i,s,o):e}function cs(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.heritageClauses!==s||e.members!==o?Hl(t,r,i,s,o):e}function us(e,t){return e.types!==t?Gl(e.token,t):e}function ps(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.heritageClauses!==s||e.members!==o?$l(t,r,i,s,o):e}function ls(e,t,r,i,s){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.type!==s?Fl(t,r,i,s):e}function fs(e,t,r){return e.name!==t||e.initializer!==r?Ql(t,r):e}function ms(e,t,r,i){return e.modifiers!==t||e.name!==r||e.members!==i?Yl(t,r,i):e}function hs(e,t){return e.statements!==t?Xl(t):e}function ds(e,t,r,i,s){return e.modifiers!==t||e.importClause!==r||e.moduleSpecifier!==i||e.attributes!==s?Zl(t,r,i,s):e}function Ts(e,t){return e.expression!==t?Kl(t):e}function gs(e,t){return e.name!==t?ef(t):e}function ys(e,t){return e.elements!==t?tf(t):e}function xs(e,t,r,i){return e.modifiers!==t||e.type!==r||e.expression!==i?rf(t,e.isExportEquals,r,i):e}function Es(e,t,r){return e.modifiers!==t||e.name!==r?nf(t,r):e}function ks(e,t){return e.name!==t?sf(t):e}function ws(e,t){return e.elements!==t?of(t):e}function Ds(e,t,r){return e.propertyName!==t||e.name!==r?af(e.isTypeOnly,t,r):e}function Ss(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?cf(t,r,i):e}function _s(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?uf(t,r,i):e}function Ps(e,t,r,i,s,o){return e.modifiers!==t||e.typeParameters!==r||e.parameters!==i||e.type!==s||e.body!==o?pf(t,r,i,s,o):e}function As(e,t,r,i,s,o,u){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.parameters!==s||e.type!==o||e.body!==u?lf(t,r,i,s,o,u):e}function bs(e,t,r,i,s,o,u){return e.modifiers!==t||e.name!==r||e.typeParameters!==i||e.parameters!==s||e.type!==o||e.body!==u?ff(t,r,i,s,o,u):e}function Is(e,t,r,i){return e.modifiers!==t||e.parameters!==r||e.type!==i?mf(t,r,i):e}function Cs(e,t,r,i,s,o,u){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.typeParameters!==s||e.parameters!==o||e.type!==u?hf(t,r,i,s,o,u):e}function Ns(e,t,r,i,s,o,u,f,E){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.postfixToken!==s||e.typeParameters!==o||e.parameters!==u||e.type!==f||e.body!==E?df(t,r,i,s,o,u,f,E):e}function Ls(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.initializer!==o?Tf(t,r,i,s,o):e}function Js(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.initializer!==o?gf(t,r,i,s,o):e}function Rs(e,t,r){return e.modifiers!==t||e.body!==r?yf(t,r):e}function Os(e,t,r,i,s,o){return e.modifiers!==t||e.left!==r||e.type!==i||e.operatorToken!==s||e.right!==o?xf(t,r,i,s,o):e}function vs(e,t){return e.operand!==t?Ef(e.operator,t):e}function Ms(e,t){return e.operand!==t?kf(t,e.operator):e}function qs(e,t,r){return e.asteriskToken!==t||e.expression!==r?wf(t,r):e}function Bs(e,t,r,i,s,o,u){return e.modifiers!==t||e.typeParameters!==r||e.parameters!==i||e.type!==s||e.equalsGreaterThanToken!==o||e.body!==u?Df(t,r,i,s,o,u):e}function Us(e,t,r,i,s,o,u,f){return e.modifiers!==t||e.asteriskToken!==r||e.name!==i||e.typeParameters!==s||e.parameters!==o||e.type!==u||e.body!==f?Sf(t,r,i,s,o,u,f):e}function js(e,t,r){return e.expression!==t||e.type!==r?_f(t,r):e}function Vs(e,t,r){return e.expression!==t||e.type!==r?Pf(t,r):e}function Ws(e,t,r,i,s,o){return e.condition!==t||e.questionToken!==r||e.whenTrue!==i||e.colonToken!==s||e.whenFalse!==o?Af(t,r,i,s,o):e}function zs(e,t,r,i){return e.expression!==t||e.questionDotToken!==r||e.name!==i?bf(t,r,i,e.flags):e}function Hs(e,t,r,i){return e.expression!==t||e.questionDotToken!==r||e.argumentExpression!==i?If(t,r,i,e.flags):e}function Gs(e,t,r,i,s){return e.expression!==t||e.questionDotToken!==r||e.typeArguments!==i||e.arguments!==s?Cf(t,r,i,s,e.flags):e}function $s(e,t,r,i){return e.expression!==t||e.typeArguments!==r||e.arguments!==i?Nf(t,r,i):e}function Fs(e,t){return e.name!==t?Lf(e.keywordToken,t):e}function Qs(e,t){return e.expression!==t?Jf(t,e.flags):e}function Ys(e,t){return e.expression!==t?Rf(t):e}function Xs(e,t,r){return e.head!==t||e.templateSpans!==r?Of(t,r):e}function Zs(e,t,r){return e.expression!==t||e.literal!==r?vf(t,r):e}function Ks(e,t,r,i,s){return e.tag!==t||e.questionDotToken!==r||e.typeArguments!==i||e.template!==s?Mf(t,r,i,s,e.flags):e}function eo(e,t){return e.expression!==t?qf(t):e}function to(e,t){return e.elements!==t?Bf(t,e.multiLine):e}function ro(e,t){return e.properties!==t?Uf(t,e.multiLine):e}function no(e,t){return e.expression!==t?jf(t):e}function io(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.initializer!==o?Vf(t,r,i,s,o):e}function so(e,t,r,i,s,o,u){return e.modifiers!==t||e.name!==r||e.postfixToken!==i||e.type!==s||e.equalsToken!==o||e.objectAssignmentInitializer!==u?Wf(t,r,i,s,o,u):e}function oo(e,t){return e.expression!==t?zf(t):e}function ao(e,t){return e.expression!==t?Hf(t):e}function co(e,t){return e.expression!==t?Gf(t):e}function uo(e,t){return e.expression!==t?$f(t):e}function po(e,t,r){return e.type!==t||e.expression!==r?Ff(t,r):e}function lo(e,t){return e.types!==t?Qf(t):e}function fo(e,t){return e.types!==t?Yf(t):e}function mo(e,t,r,i,s){return e.checkType!==t||e.extendsType!==r||e.trueType!==i||e.falseType!==s?Xf(t,r,i,s):e}function ho(e,t){return e.type!==t?Zf(e.operator,t):e}function To(e,t){return e.typeParameter!==t?Kf(t):e}function go(e,t){return e.elementType!==t?em(t):e}function yo(e,t,r){return e.objectType!==t||e.indexType!==r?tm(t,r):e}function xo(e,t,r){return e.typeName!==t||e.typeArguments!==r?rm(t,r):e}function Eo(e,t,r){return e.expression!==t||e.typeArguments!==r?nm(t,r):e}function ko(e,t){return e.literal!==t?im(t):e}function wo(e,t,r,i){return e.assertsModifier!==t||e.parameterName!==r||e.type!==i?sm(t,r,i):e}function Do(e,t,r){return e.name!==t||e.value!==r?om(t,r):e}function So(e,t){return e.attributes!==t?am(e.token,t,e.multiLine):e}function _o(e,t,r){return e.exprName!==t||e.typeArguments!==r?cm(t,r):e}function Po(e,t,r,i,s,o,u){return e.readonlyToken!==t||e.typeParameter!==r||e.nameType!==i||e.questionToken!==s||e.type!==o||e.members!==u?um(t,r,i,s,o,u):e}function Ao(e,t){return e.members!==t?pm(t):e}function bo(e,t){return e.elements!==t?lm(t):e}function Io(e,t,r,i,s){return e.dotDotDotToken!==t||e.name!==r||e.questionToken!==i||e.type!==s?fm(t,r,i,s):e}function Co(e,t){return e.type!==t?mm(t):e}function No(e,t){return e.type!==t?hm(t):e}function Lo(e,t){return e.type!==t?dm(t):e}function Jo(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?Tm(t,r,i):e}function Ro(e,t,r,i,s){return e.modifiers!==t||e.typeParameters!==r||e.parameters!==i||e.type!==s?gm(t,r,i,s):e}function Oo(e,t,r){return e.head!==t||e.templateSpans!==r?ym(t,r):e}function vo(e,t,r){return e.type!==t||e.literal!==r?xm(t,r):e}function Mo(e,t){return e.tupleNameSource!==t?Em(e.type,e.isSpread,t):e}function qo(e,t){return e.expression!==t?km(t):e}function Bo(e,t,r,i){return e.openingElement!==t||e.children!==r||e.closingElement!==i?wm(t,r,i):e}function Uo(e,t){return e.properties!==t?Dm(t):e}function jo(e,t,r){return e.namespace!==t||e.name!==r?Sm(t,r):e}function Vo(e,t,r,i){return e.tagName!==t||e.typeArguments!==r||e.attributes!==i?_m(t,r,i):e}function Wo(e,t,r,i){return e.tagName!==t||e.typeArguments!==r||e.attributes!==i?Pm(t,r,i):e}function zo(e,t,r,i){return e.openingFragment!==t||e.children!==r||e.closingFragment!==i?Am(t,r,i):e}function Ho(e,t,r){return e.name!==t||e.initializer!==r?bm(t,r):e}function Go(e,t){return e.expression!==t?Im(t):e}function $o(e,t){return e.tagName!==t?Cm(t):e}function Fo(e,t,r){return e.dotDotDotToken!==t||e.expression!==r?Nm(t,r):e}function Qo(e,t){return e.children!==t?Lm(t):e}function Yo(e,t,r){return e.comment!==t||e.tags!==r?Jm(t,r):e}function Xo(e,t){return e.type!==t?Rm(t):e}function Zo(e,t){return e.type!==t?Om(t):e}function Ko(e,t){return e.type!==t?vm(t):e}function ea(e,t){return e.type!==t?Mm(t):e}function ta(e,t){return e.type!==t?qm(t):e}function ra(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Bm(t,r,i):e}function na(e,t,r){return e.tagName!==t||e.comment!==r?Um(t,r):e}function ia(e,t,r,i,s){return e.tagName!==t||e.constraint!==r||e.typeParameters!==i||e.comment!==s?jm(t,r,i,s):e}function sa(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Vm(t,r,i):e}function oa(e,t,r){return e.tagName!==t||e.comment!==r?Wm(t,r):e}function aa(e,t,r){return e.tagName!==t||e.comment!==r?zm(t,r):e}function ca(e,t,r){return e.tagName!==t||e.comment!==r?Hm(t,r):e}function ua(e,t,r){return e.tagName!==t||e.comment!==r?Gm(t,r):e}function pa(e,t,r){return e.tagName!==t||e.comment!==r?$m(t,r):e}function la(e,t,r){return e.tagName!==t||e.comment!==r?Fm(t,r):e}function fa(e,t,r,i){return e.tagName!==t||e.nameExpression!==r||e.comment!==i?Qm(t,r,i):e}function ma(e,t,r,i){return e.tagName!==t||e.className!==r||e.comment!==i?Ym(t,r,i):e}function ha(e,t,r,i){return e.tagName!==t||e.className!==r||e.comment!==i?Xm(t,r,i):e}function da(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Zm(t,r,i):e}function Ta(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?Km(t,r,i):e}function ga(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?eh(t,r,i):e}function ya(e,t,r,i,s,o){return e.tagName!==t||e.importClause!==r||e.moduleSpecifier!==i||e.attributes!==s||e.comment!==o?th(t,r,i,s,o):e}function xa(e,t,r,i,s){return e.tagName!==t||e.typeExpression!==r||e.name!==i||e.comment!==s?rh(t,r,i,s):e}function Ea(e,t,r,i){return e.tagName!==t||e.typeExpression!==r||e.comment!==i?nh(t,r,i):e}function ka(e,t,r,i,s){return e.tagName!==t||e.typeExpression!==r||e.name!==i||e.comment!==s?ih(t,r,i,s):e}function wa(e,t,r,i){return e.typeParameters!==t||e.parameters!==r||e.type!==i?sh(t,r,i):e}function Da(e,t){return e.name!==t?oh(t):e}function Sa(e,t,r,i){return e.modifiers!==t||e.name!==r||e.body!==i?ah(t,e.keyword,r,i):e}function _a(e,t,r,i){return e.modifiers!==t||e.name!==r||e.moduleReference!==i?ch(t,e.isTypeOnly,r,i):e}function Pa(e,t,r,i,s){return e.modifiers!==t||e.exportClause!==r||e.moduleSpecifier!==i||e.attributes!==s?uh(t,e.isTypeOnly,r,i,s):e}function Aa(e,t,r,i,s){return e.argument!==t||e.attributes!==r||e.qualifier!==i||e.typeArguments!==s?ph(e.isTypeOf,t,r,i,s):e}function ba(e,t,r){return e.name!==t||e.namedBindings!==r?lh(e.phaseModifier,t,r):e}function Ia(e,t,r){return e.propertyName!==t||e.name!==r?fh(e.isTypeOnly,t,r):e}function Ca(e,t){return e.name!==t?mh(t,e.text):e}function Na(e,t){return e.name!==t?hh(t,e.text):e}function La(e,t){return e.name!==t?dh(t,e.text):e}function Ja(e,t,r,i,s,o){return e.modifiers!==t||e.name!==r||e.constraint!==i||e.expression!==s||e.defaultType!==o?Th(t,r,i,s,o):e}function Ra(e,t,r){return e.expression!==t||e.thisArg!==r?gh(t,r):e}function Oa(e,t){return e.jsdocPropertyTags!==t?yh(t,e.isArrayType):e}function va(e,t,r,i,s){return e.awaitModifier!==t||e.initializer!==r||e.expression!==i||e.statement!==s?xh(t,r,i,s):e}function Ma(e,t,r,i,s){return e.awaitModifier!==t||e.initializer!==r||e.expression!==i||e.statement!==s?Eh(t,r,i,s):e}function qa(e,t,r){return e.expression!==t||e.statements!==r?kh(t,r):e}function Ba(e,t,r){return e.expression!==t||e.statements!==r?wh(t,r):e}function Ua(e,t){return e.elements!==t?Dh(t):e}function ja(e,t){return e.elements!==t?Sh(t):e}function Wa(e,t,r,i,s){return e.tagName!==t||e.name!==r||e.typeExpression!==i||e.comment!==s?_h(t,r,e.isBracketed,i,e.isNameFirst,s):e}function za(e,t,r,i,s){return e.tagName!==t||e.name!==r||e.typeExpression!==i||e.comment!==s?Ph(t,r,e.isBracketed,i,e.isNameFirst,s):e}function Ah(e,t,r){return new l(n.SourceFile,{...ni(e),statements:m(t),endOfFileToken:r})}function Va(e,t,r){return e.statements!==t||e.endOfFileToken!==r?Ah(e,t,r):e}var Ha={abstract:n.AbstractKeyword,accessor:n.AccessorKeyword,any:n.AnyKeyword,as:n.AsKeyword,asserts:n.AssertsKeyword,assert:n.AssertKeyword,bigint:n.BigIntKeyword,boolean:n.BooleanKeyword,break:n.BreakKeyword,case:n.CaseKeyword,catch:n.CatchKeyword,class:n.ClassKeyword,continue:n.ContinueKeyword,const:n.ConstKeyword,["constructor"]:n.ConstructorKeyword,debugger:n.DebuggerKeyword,declare:n.DeclareKeyword,default:n.DefaultKeyword,defer:n.DeferKeyword,delete:n.DeleteKeyword,do:n.DoKeyword,else:n.ElseKeyword,enum:n.EnumKeyword,export:n.ExportKeyword,extends:n.ExtendsKeyword,false:n.FalseKeyword,finally:n.FinallyKeyword,for:n.ForKeyword,from:n.FromKeyword,function:n.FunctionKeyword,get:n.GetKeyword,if:n.IfKeyword,implements:n.ImplementsKeyword,import:n.ImportKeyword,in:n.InKeyword,infer:n.InferKeyword,instanceof:n.InstanceOfKeyword,interface:n.InterfaceKeyword,intrinsic:n.IntrinsicKeyword,is:n.IsKeyword,keyof:n.KeyOfKeyword,let:n.LetKeyword,module:n.ModuleKeyword,namespace:n.NamespaceKeyword,never:n.NeverKeyword,new:n.NewKeyword,null:n.NullKeyword,number:n.NumberKeyword,object:n.ObjectKeyword,package:n.PackageKeyword,private:n.PrivateKeyword,protected:n.ProtectedKeyword,public:n.PublicKeyword,override:n.OverrideKeyword,out:n.OutKeyword,readonly:n.ReadonlyKeyword,require:n.RequireKeyword,global:n.GlobalKeyword,return:n.ReturnKeyword,satisfies:n.SatisfiesKeyword,set:n.SetKeyword,static:n.StaticKeyword,string:n.StringKeyword,super:n.SuperKeyword,switch:n.SwitchKeyword,symbol:n.SymbolKeyword,this:n.ThisKeyword,throw:n.ThrowKeyword,true:n.TrueKeyword,try:n.TryKeyword,type:n.TypeKeyword,typeof:n.TypeOfKeyword,undefined:n.UndefinedKeyword,unique:n.UniqueKeyword,unknown:n.UnknownKeyword,using:n.UsingKeyword,var:n.VarKeyword,void:n.VoidKeyword,while:n.WhileKeyword,with:n.WithKeyword,yield:n.YieldKeyword,async:n.AsyncKeyword,await:n.AwaitKeyword,of:n.OfKeyword},cy=new Map(Object.entries(Ha)),bh=new Map(Object.entries({...Ha,"{":n.OpenBraceToken,"}":n.CloseBraceToken,"(":n.OpenParenToken,")":n.CloseParenToken,"[":n.OpenBracketToken,"]":n.CloseBracketToken,".":n.DotToken,"...":n.DotDotDotToken,";":n.SemicolonToken,",":n.CommaToken,"<":n.LessThanToken,">":n.GreaterThanToken,"<=":n.LessThanEqualsToken,">=":n.GreaterThanEqualsToken,"==":n.EqualsEqualsToken,"!=":n.ExclamationEqualsToken,"===":n.EqualsEqualsEqualsToken,"!==":n.ExclamationEqualsEqualsToken,"=>":n.EqualsGreaterThanToken,"+":n.PlusToken,"-":n.MinusToken,"**":n.AsteriskAsteriskToken,"*":n.AsteriskToken,"/":n.SlashToken,"%":n.PercentToken,"++":n.PlusPlusToken,"--":n.MinusMinusToken,"<<":n.LessThanLessThanToken,"</":n.LessThanSlashToken,">>":n.GreaterThanGreaterThanToken,">>>":n.GreaterThanGreaterThanGreaterThanToken,"&":n.AmpersandToken,"|":n.BarToken,"^":n.CaretToken,"!":n.ExclamationToken,"~":n.TildeToken,"&&":n.AmpersandAmpersandToken,"||":n.BarBarToken,"?":n.QuestionToken,"??":n.QuestionQuestionToken,"?.":n.QuestionDotToken,":":n.ColonToken,"=":n.EqualsToken,"+=":n.PlusEqualsToken,"-=":n.MinusEqualsToken,"*=":n.AsteriskEqualsToken,"**=":n.AsteriskAsteriskEqualsToken,"/=":n.SlashEqualsToken,"%=":n.PercentEqualsToken,"<<=":n.LessThanLessThanEqualsToken,">>=":n.GreaterThanGreaterThanEqualsToken,">>>=":n.GreaterThanGreaterThanGreaterThanEqualsToken,"&=":n.AmpersandEqualsToken,"|=":n.BarEqualsToken,"^=":n.CaretEqualsToken,"||=":n.BarBarEqualsToken,"&&=":n.AmpersandAmpersandEqualsToken,"??=":n.QuestionQuestionEqualsToken,"@":n.AtToken,"#":n.HashToken,"`":n.BacktickToken})),uy=new Map([[k.d,de.HasIndices],[k.g,de.Global],[k.i,de.IgnoreCase],[k.m,de.Multiline],[k.s,de.DotAll],[k.u,de.Unicode],[k.v,de.UnicodeSets],[k.y,de.Sticky]]);function Ih(e){let t=[];return e.forEach((r,i)=>{t[r]=i}),t}var py=Ih(bh);function Ga(e){let t=[],r=0,i=0;while(r<e.length){let s=e.charCodeAt(r);switch(r++,s){case k.carriageReturn:if(e.charCodeAt(r)===k.lineFeed)r++;case k.lineFeed:t.push(i),i=r;break;default:if(s>k.maxAsciiCharacter&&ut(s))t.push(i),i=r;break}}return t.push(i),t}function Ch(e){return Nh(e)||ut(e)}function Nh(e){return e===k.space||e===k.tab||e===k.verticalTab||e===k.formFeed||e===k.nonBreakingSpace||e===k.nextLine||e===k.ogham||e>=k.enQuad&&e<=k.zeroWidthSpace||e===k.narrowNoBreakSpace||e===k.mathematicalSpace||e===k.ideographicSpace||e===k.byteOrderMark}function ut(e){return e===k.lineFeed||e===k.carriageReturn||e===k.lineSeparator||e===k.paragraphSeparator}function en(e,t,r,i,s){if(t<0)return t;let o=!1;while(!0){let u=e.charCodeAt(t);switch(u){case k.carriageReturn:if(e.charCodeAt(t+1)===k.lineFeed)t++;case k.lineFeed:if(t++,r)return t;o=!!s;continue;case k.tab:case k.verticalTab:case k.formFeed:case k.space:t++;continue;case k.slash:if(i)break;if(e.charCodeAt(t+1)===k.slash){t+=2;while(t<e.length){if(ut(e.charCodeAt(t)))break;t++}o=!1;continue}if(e.charCodeAt(t+1)===k.asterisk){t+=2;while(t<e.length){if(e.charCodeAt(t)===k.asterisk&&e.charCodeAt(t+1)===k.slash){t+=2;break}t++}o=!1;continue}break;case k.lessThan:case k.bar:case k.equals:case k.greaterThan:if($a(e,t)){t=Lh(e,t),o=!1;continue}break;case k.hash:if(t===0&&Jh(e,t)){t=Rh(e,t);continue}break;case k.asterisk:if(o){t++,o=!1;continue}break;default:if(u>k.maxAsciiCharacter&&Ch(u)){t++;continue}break}return t}}function $a(e,t){if(t>=e.length)return!1;let r=e.charCodeAt(t);if(t===0||ut(e.charCodeAt(t-1))){if(r===k.lessThan||r===k.greaterThan||r===k.equals){if(t+6<e.length&&e.charCodeAt(t+1)===r&&e.charCodeAt(t+2)===r&&e.charCodeAt(t+3)===r&&e.charCodeAt(t+4)===r&&e.charCodeAt(t+5)===r&&e.charCodeAt(t+6)===r)return r===k.equals||e.charCodeAt(t+7)===k.space}if(r===k.bar&&t+6<e.length&&e.charCodeAt(t+1)===r&&e.charCodeAt(t+2)===r&&e.charCodeAt(t+3)===r&&e.charCodeAt(t+4)===r&&e.charCodeAt(t+5)===r&&e.charCodeAt(t+6)===r)return!0}return!1}function Lh(e,t){let r=e.charCodeAt(t),i=e.length;if(r===k.lessThan||r===k.greaterThan)while(t<i&&!ut(e.charCodeAt(t)))t++;else{t+=7;while(t<i){let s=e.charCodeAt(t);if((s===k.equals||s===k.greaterThan)&&$a(e,t))break;t++}}return t}function Jh(e,t){return t===0&&e.charCodeAt(0)===k.hash&&e.charCodeAt(1)===k.exclamation}function Rh(e,t){t+=2;while(t<e.length){if(ut(e.charCodeAt(t)))break;t++}return t}function Mt(e,t,r){if(vh(e))return e.pos;if(Di(e.kind)||e.kind===n.JsxText)return en(t.text,e.pos,!1,!0);if(r&&e.jsDoc&&e.jsDoc.length>0)return Mt(e.jsDoc[0],t,!1);return en(t.text,e.pos,!1,!1,!!(e.flags&_e.JSDoc))}function vh(e){return e.pos===e.end&&e.pos>=0&&e.kind!==n.EndOfFile}var $e={[n.QualifiedName]:["left","right"],[n.ComputedPropertyName]:["expression"],[n.Decorator]:["expression"],[n.IfStatement]:["expression","thenStatement","elseStatement"],[n.DoStatement]:["statement","expression"],[n.WhileStatement]:["expression","statement"],[n.ForStatement]:["initializer","condition","incrementor","statement"],[n.ForInStatement]:["awaitModifier","initializer","expression","statement"],[n.ForOfStatement]:["awaitModifier","initializer","expression","statement"],[n.BreakStatement]:["label"],[n.ContinueStatement]:["label"],[n.ReturnStatement]:["expression"],[n.WithStatement]:["expression","statement"],[n.SwitchStatement]:["expression","caseBlock"],[n.CaseBlock]:["clauses"],[n.CaseClause]:["expression","statements"],[n.DefaultClause]:["expression","statements"],[n.ThrowStatement]:["expression"],[n.TryStatement]:["tryBlock","catchClause","finallyBlock"],[n.CatchClause]:["variableDeclaration","block"],[n.LabeledStatement]:["label","statement"],[n.ExpressionStatement]:["expression"],[n.Block]:["statements"],[n.VariableStatement]:["modifiers","declarationList"],[n.VariableDeclaration]:["name","exclamationToken","type","initializer"],[n.VariableDeclarationList]:["declarations"],[n.ObjectBindingPattern]:["elements"],[n.ArrayBindingPattern]:["elements"],[n.Parameter]:["modifiers","dotDotDotToken","name","questionToken","type","initializer"],[n.BindingElement]:["dotDotDotToken","propertyName","name","initializer"],[n.MissingDeclaration]:["modifiers"],[n.FunctionDeclaration]:["modifiers","asteriskToken","name","typeParameters","parameters","type","body"],[n.ClassDeclaration]:["modifiers","name","typeParameters","heritageClauses","members"],[n.ClassExpression]:["modifiers","name","typeParameters","heritageClauses","members"],[n.HeritageClause]:["types"],[n.InterfaceDeclaration]:["modifiers","name","typeParameters","heritageClauses","members"],[n.TypeAliasDeclaration]:["modifiers","name","typeParameters","type"],[n.JSTypeAliasDeclaration]:["modifiers","name","typeParameters","type"],[n.EnumMember]:["name","initializer"],[n.EnumDeclaration]:["modifiers","name","members"],[n.ModuleBlock]:["statements"],[n.ImportDeclaration]:["modifiers","importClause","moduleSpecifier","attributes"],[n.JSImportDeclaration]:["modifiers","importClause","moduleSpecifier","attributes"],[n.ExternalModuleReference]:["expression"],[n.NamespaceImport]:["name"],[n.NamedImports]:["elements"],[n.ExportAssignment]:["modifiers","type","expression"],[n.NamespaceExportDeclaration]:["modifiers","name"],[n.NamespaceExport]:["name"],[n.NamedExports]:["elements"],[n.ExportSpecifier]:["propertyName","name"],[n.CallSignature]:["typeParameters","parameters","type"],[n.ConstructSignature]:["typeParameters","parameters","type"],[n.Constructor]:["modifiers","typeParameters","parameters","type","body"],[n.GetAccessor]:["modifiers","name","typeParameters","parameters","type","body"],[n.SetAccessor]:["modifiers","name","typeParameters","parameters","type","body"],[n.IndexSignature]:["modifiers","parameters","type"],[n.MethodSignature]:["modifiers","name","postfixToken","typeParameters","parameters","type"],[n.MethodDeclaration]:["modifiers","asteriskToken","name","postfixToken","typeParameters","parameters","type","body"],[n.PropertySignature]:["modifiers","name","postfixToken","type","initializer"],[n.PropertyDeclaration]:["modifiers","name","postfixToken","type","initializer"],[n.ClassStaticBlockDeclaration]:["modifiers","body"],[n.BinaryExpression]:["modifiers","left","type","operatorToken","right"],[n.PrefixUnaryExpression]:["operand"],[n.PostfixUnaryExpression]:["operand"],[n.YieldExpression]:["asteriskToken","expression"],[n.ArrowFunction]:["modifiers","typeParameters","parameters","type","equalsGreaterThanToken","body"],[n.FunctionExpression]:["modifiers","asteriskToken","name","typeParameters","parameters","type","body"],[n.AsExpression]:["expression","type"],[n.SatisfiesExpression]:["expression","type"],[n.ConditionalExpression]:["condition","questionToken","whenTrue","colonToken","whenFalse"],[n.PropertyAccessExpression]:["expression","questionDotToken","name"],[n.ElementAccessExpression]:["expression","questionDotToken","argumentExpression"],[n.CallExpression]:["expression","questionDotToken","typeArguments","arguments"],[n.NewExpression]:["expression","typeArguments","arguments"],[n.MetaProperty]:["name"],[n.NonNullExpression]:["expression"],[n.SpreadElement]:["expression"],[n.TemplateExpression]:["head","templateSpans"],[n.TemplateSpan]:["expression","literal"],[n.TaggedTemplateExpression]:["tag","questionDotToken","typeArguments","template"],[n.ParenthesizedExpression]:["expression"],[n.ArrayLiteralExpression]:["elements"],[n.ObjectLiteralExpression]:["properties"],[n.SpreadAssignment]:["expression"],[n.PropertyAssignment]:["modifiers","name","postfixToken","type","initializer"],[n.ShorthandPropertyAssignment]:["modifiers","name","postfixToken","type","equalsToken","objectAssignmentInitializer"],[n.DeleteExpression]:["expression"],[n.TypeOfExpression]:["expression"],[n.VoidExpression]:["expression"],[n.AwaitExpression]:["expression"],[n.TypeAssertionExpression]:["type","expression"],[n.UnionType]:["types"],[n.IntersectionType]:["types"],[n.ConditionalType]:["checkType","extendsType","trueType","falseType"],[n.TypeOperator]:["type"],[n.InferType]:["typeParameter"],[n.ArrayType]:["elementType"],[n.IndexedAccessType]:["objectType","indexType"],[n.TypeReference]:["typeName","typeArguments"],[n.ExpressionWithTypeArguments]:["expression","typeArguments"],[n.LiteralType]:["literal"],[n.TypePredicate]:["assertsModifier","parameterName","type"],[n.ImportAttribute]:["name","value"],[n.ImportAttributes]:["attributes"],[n.TypeQuery]:["exprName","typeArguments"],[n.MappedType]:["readonlyToken","typeParameter","nameType","questionToken","type","members"],[n.TypeLiteral]:["members"],[n.TupleType]:["elements"],[n.NamedTupleMember]:["dotDotDotToken","name","questionToken","type"],[n.OptionalType]:["type"],[n.RestType]:["type"],[n.ParenthesizedType]:["type"],[n.FunctionType]:["typeParameters","parameters","type"],[n.ConstructorType]:["modifiers","typeParameters","parameters","type"],[n.TemplateLiteralType]:["head","templateSpans"],[n.TemplateLiteralTypeSpan]:["type","literal"],[n.SyntheticExpression]:["tupleNameSource"],[n.PartiallyEmittedExpression]:["expression"],[n.JsxElement]:["openingElement","children","closingElement"],[n.JsxAttributes]:["properties"],[n.JsxNamespacedName]:["namespace","name"],[n.JsxOpeningElement]:["tagName","typeArguments","attributes"],[n.JsxSelfClosingElement]:["tagName","typeArguments","attributes"],[n.JsxFragment]:["openingFragment","children","closingFragment"],[n.JsxAttribute]:["name","initializer"],[n.JsxSpreadAttribute]:["expression"],[n.JsxClosingElement]:["tagName"],[n.JsxExpression]:["dotDotDotToken","expression"],[n.SyntaxList]:["children"],[n.JSDoc]:["comment","tags"],[n.JSDocTypeExpression]:["type"],[n.JSDocNonNullableType]:["type"],[n.JSDocNullableType]:["type"],[n.JSDocVariadicType]:["type"],[n.JSDocOptionalType]:["type"],[n.JSDocTypeTag]:["tagName","typeExpression","comment"],[n.JSDocUnknownTag]:["tagName","comment"],[n.JSDocTemplateTag]:["tagName","constraint","typeParameters","comment"],[n.JSDocReturnTag]:["tagName","typeExpression","comment"],[n.JSDocPublicTag]:["tagName","comment"],[n.JSDocPrivateTag]:["tagName","comment"],[n.JSDocProtectedTag]:["tagName","comment"],[n.JSDocReadonlyTag]:["tagName","comment"],[n.JSDocOverrideTag]:["tagName","comment"],[n.JSDocDeprecatedTag]:["tagName","comment"],[n.JSDocSeeTag]:["tagName","nameExpression","comment"],[n.JSDocImplementsTag]:["tagName","className","comment"],[n.JSDocAugmentsTag]:["tagName","className","comment"],[n.JSDocSatisfiesTag]:["tagName","typeExpression","comment"],[n.JSDocThrowsTag]:["tagName","typeExpression","comment"],[n.JSDocThisTag]:["tagName","typeExpression","comment"],[n.JSDocImportTag]:["tagName","importClause","moduleSpecifier","attributes","comment"],[n.JSDocCallbackTag]:["tagName","typeExpression","name","comment"],[n.JSDocOverloadTag]:["tagName","typeExpression","comment"],[n.JSDocTypedefTag]:["tagName","typeExpression","name","comment"],[n.JSDocSignature]:["typeParameters","parameters","type"],[n.JSDocNameReference]:["name"],[n.SourceFile]:["statements","endOfFileToken"],[n.ModuleDeclaration]:["modifiers","name","body"],[n.ImportEqualsDeclaration]:["modifiers","name","moduleReference"],[n.ExportDeclaration]:["modifiers","exportClause","moduleSpecifier","attributes"],[n.ImportType]:["argument","attributes","qualifier","typeArguments"],[n.ImportClause]:["name","namedBindings"],[n.ImportSpecifier]:["propertyName","name"],[n.JSDocLink]:["name"],[n.JSDocLinkPlain]:["name"],[n.JSDocLinkCode]:["name"],[n.TypeParameter]:["modifiers","name","constraint","expression","defaultType"],[n.SyntheticReferenceExpression]:["expression","thisArg"],[n.JSDocTypeLiteral]:["jsdocPropertyTags"],[n.JSDocParameterTag]:["tagName","name","typeExpression","comment"],[n.JSDocPropertyTag]:["tagName","name","typeExpression","comment"]},Mh={[n.ComputedPropertyName]:"expression",[n.Decorator]:"expression",[n.BreakStatement]:"label",[n.ContinueStatement]:"label",[n.ReturnStatement]:"expression",[n.CaseBlock]:"clauses",[n.ThrowStatement]:"expression",[n.ExpressionStatement]:"expression",[n.Block]:"statements",[n.VariableDeclarationList]:"declarations",[n.ObjectBindingPattern]:"elements",[n.ArrayBindingPattern]:"elements",[n.MissingDeclaration]:"modifiers",[n.HeritageClause]:"types",[n.ModuleBlock]:"statements",[n.ExternalModuleReference]:"expression",[n.NamespaceImport]:"name",[n.NamedImports]:"elements",[n.NamespaceExport]:"name",[n.NamedExports]:"elements",[n.PrefixUnaryExpression]:"operand",[n.PostfixUnaryExpression]:"operand",[n.MetaProperty]:"name",[n.NonNullExpression]:"expression",[n.SpreadElement]:"expression",[n.ParenthesizedExpression]:"expression",[n.ArrayLiteralExpression]:"elements",[n.ObjectLiteralExpression]:"properties",[n.SpreadAssignment]:"expression",[n.DeleteExpression]:"expression",[n.TypeOfExpression]:"expression",[n.VoidExpression]:"expression",[n.AwaitExpression]:"expression",[n.UnionType]:"types",[n.IntersectionType]:"types",[n.TypeOperator]:"type",[n.InferType]:"typeParameter",[n.ArrayType]:"elementType",[n.LiteralType]:"literal",[n.ImportAttributes]:"attributes",[n.TypeLiteral]:"members",[n.TupleType]:"elements",[n.OptionalType]:"type",[n.RestType]:"type",[n.ParenthesizedType]:"type",[n.SyntheticExpression]:"tupleNameSource",[n.PartiallyEmittedExpression]:"expression",[n.JsxAttributes]:"properties",[n.JsxSpreadAttribute]:"expression",[n.JsxClosingElement]:"tagName",[n.SyntaxList]:"children",[n.JSDocTypeExpression]:"type",[n.JSDocNonNullableType]:"type",[n.JSDocNullableType]:"type",[n.JSDocVariadicType]:"type",[n.JSDocOptionalType]:"type",[n.JSDocNameReference]:"name",[n.JSDocLink]:"name",[n.JSDocLinkPlain]:"name",[n.JSDocLinkCode]:"name",[n.JSDocTypeLiteral]:"jsdocPropertyTags"};var Fa=5,Qa=0,Ya=4,Xa=8,Za=12,Ka=16,ec=20,ir=24,sr=28,or=32,ar=36,cr=40,qt=44,ee=28,Fe=0,ur=4,pr=8,pt=12,Qe=16,lr=20,tc=24,Ye=4294967295,Re=0,Xe=1073741824,lt=2147483648;function rc(e){switch(e){case n.Identifier:case n.PrivateIdentifier:case n.JsxText:case n.JSDocText:case n.JSDocLink:case n.JSDocLinkPlain:case n.JSDocLinkCode:return Xe;case n.StringLiteral:case n.NumericLiteral:case n.BigIntLiteral:case n.RegularExpressionLiteral:case n.NoSubstitutionTemplateLiteral:case n.TemplateHead:case n.TemplateMiddle:case n.TemplateTail:case n.SourceFile:return lt;default:return Re}}function nc(e){switch(e.kind){case n.Block:return(e.multiLine?1:0)<<24;case n.HeritageClause:return(e.token===n.ImplementsKeyword?1:0)<<24;case n.ExportAssignment:return(e.isExportEquals?1:0)<<24;case n.ExportSpecifier:return(e.isTypeOnly?1:0)<<24;case n.PrefixUnaryExpression:return(e.operator===n.MinusToken?1:e.operator===n.TildeToken?2:e.operator===n.ExclamationToken?3:e.operator===n.PlusPlusToken?4:e.operator===n.MinusMinusToken?5:0)<<24;case n.PostfixUnaryExpression:return(e.operator===n.MinusMinusToken?1:0)<<24;case n.MetaProperty:return(e.keywordToken===n.NewKeyword?1:0)<<24;case n.ArrayLiteralExpression:return(e.multiLine?1:0)<<24;case n.ObjectLiteralExpression:return(e.multiLine?1:0)<<24;case n.TypeOperator:return(e.operator===n.ReadonlyKeyword?1:e.operator===n.UniqueKeyword?2:0)<<24;case n.ImportAttributes:return(e.multiLine?1:0)<<24|(e.token===n.AssertKeyword?1:0)<<25;case n.JsxText:return(e.containsOnlyTriviaWhiteSpaces?1:0)<<24;case n.ModuleDeclaration:return(e.keyword===n.NamespaceKeyword?1:0)<<24;case n.ImportEqualsDeclaration:return(e.isTypeOnly?1:0)<<24;case n.ExportDeclaration:return(e.isTypeOnly?1:0)<<24;case n.ImportType:return(e.isTypeOf?1:0)<<24;case n.ImportClause:return(e.phaseModifier===n.TypeKeyword?1:e.phaseModifier===n.DeferKeyword?2:0)<<24;case n.ImportSpecifier:return(e.isTypeOnly?1:0)<<24;case n.JSDocTypeLiteral:return(e.isArrayType?1:0)<<24;case n.JSDocParameterTag:case n.JSDocPropertyTag:return(e.isBracketed?1:0)<<24|(e.isNameFirst?1:0)<<25}return 0}import{Buffer as qh}from"node:buffer";var ic=237,Bh=160,Uh=191,jh=128,Vh=191;function Wh(e,t){return t+2<e.length&&e[t]===ic&&e[t+1]>=Bh&&e[t+1]<=Uh&&e[t+2]>=jh&&e[t+2]<=Vh}function zh(e,t){return 53248|(e[t+1]&63)<<6|e[t+2]&63}function Hh(e){return qh.from(e.buffer,e.byteOffset,e.byteLength).indexOf(ic)>=0}function Gh(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e)}class Ze extends TextDecoder{decode(e,t){if(e===void 0)return super.decode(e,t);let r=Gh(e);if(!Hh(r))return super.decode(r,t);let i=[],s=0;for(let o=0;o<r.length;o++){if(!Wh(r,o))continue;if(s<o)i.push(super.decode(r.subarray(s,o),t));i.push(String.fromCharCode(zh(r,o))),o+=2,s=o+1}if(s===0)return super.decode(r,t);if(s<r.length)i.push(super.decode(r.subarray(s),t));return i.join("")}}var $h=new TextEncoder,Fh=new Ze;class tn{buf;view;pos;constructor(e=256){this.buf=new Uint8Array(e),this.view=new DataView(this.buf.buffer),this.pos=0}ensure(e){if(this.pos+e>this.buf.length){let t=this.buf.length*2;while(t<this.pos+e)t*=2;let r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.view=new DataView(this.buf.buffer)}}writeArrayHeader(e){if(e<=15)this.ensure(1),this.buf[this.pos++]=144|e;else if(e<=65535)this.ensure(3),this.buf[this.pos++]=220,this.view.setUint16(this.pos,e,!1),this.pos+=2;else this.ensure(5),this.buf[this.pos++]=221,this.view.setUint32(this.pos,e,!1),this.pos+=4}writeUint(e){if(e<=127)this.ensure(1),this.buf[this.pos++]=e;else if(e<=255)this.ensure(2),this.buf[this.pos++]=204,this.buf[this.pos++]=e;else if(e<=65535)this.ensure(3),this.buf[this.pos++]=205,this.view.setUint16(this.pos,e,!1),this.pos+=2;else this.ensure(5),this.buf[this.pos++]=206,this.view.setUint32(this.pos,e,!1),this.pos+=4}writeString(e){let t=$h.encode(e),r=t.length;if(r<=31)this.ensure(1+r),this.buf[this.pos++]=160|r;else if(r<=255)this.ensure(2+r),this.buf[this.pos++]=217,this.buf[this.pos++]=r;else if(r<=65535)this.ensure(3+r),this.buf[this.pos++]=218,this.view.setUint16(this.pos,r,!1),this.pos+=2;else this.ensure(5+r),this.buf[this.pos++]=219,this.view.setUint32(this.pos,r,!1),this.pos+=4;this.buf.set(t,this.pos),this.pos+=r}writeBool(e){this.ensure(1),this.buf[this.pos++]=e?195:194}finish(){return this.buf.subarray(0,this.pos)}}class Bt{buf;view;pos;constructor(e,t=0){this.buf=e,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.pos=t}readArrayHeader(){let e=this.buf[this.pos++];if((e&240)===144)return e&15;if(e===220){let t=this.view.getUint16(this.pos,!1);return this.pos+=2,t}if(e===221){let t=this.view.getUint32(this.pos,!1);return this.pos+=4,t}throw Error(`Expected array header, got 0x${e.toString(16)}`)}readUint(){let e=this.buf[this.pos++];if(e<=127)return e;if(e===204)return this.buf[this.pos++];if(e===205){let t=this.view.getUint16(this.pos,!1);return this.pos+=2,t}if(e===206){let t=this.view.getUint32(this.pos,!1);return this.pos+=4,t}throw Error(`Expected uint, got 0x${e.toString(16)}`)}readString(){let e=this.buf[this.pos++],t;if((e&224)===160)t=e&31;else if(e===217)t=this.buf[this.pos++];else if(e===218)t=this.view.getUint16(this.pos,!1),this.pos+=2;else if(e===219)t=this.view.getUint32(this.pos,!1),this.pos+=4;else throw Error(`Expected string, got 0x${e.toString(16)}`);let r=Fh.decode(this.buf.subarray(this.pos,this.pos+t));return this.pos+=t,r}readBool(){let e=this.buf[this.pos++];if(e===195)return!0;if(e===194)return!1;throw Error(`Expected bool, got 0x${e.toString(16)}`)}}var sc=ee/4,oc=3,fr=4294967295;class uc{parts;byteLen;offsets;constructor(){this.parts=[],this.byteLen=0,this.offsets=[]}add(e){let t=this.offsets.length,i=ac().encode(e).length,s=this.byteLen;return this.parts.push(e),this.byteLen+=i,this.offsets.push(s,s+i),t}encode(){let t=ac().encode(this.parts.join("")),r=new Uint8Array(this.offsets.length*4),i=new DataView(r.buffer);for(let o=0;o<this.offsets.length;o++)i.setUint32(o*4,this.offsets[o],!0);let s=new Uint8Array(r.length+t.length);return s.set(r,0),s.set(t,r.length),s}stringByteLength(){return this.byteLen}offsetsCount(){return this.offsets.length}}var Qh;function ac(){return Qh??=new TextEncoder}function Yh(e){let t=e.kind,r=$e[t];if(!r)return 0;let i=e,s=0;for(let o=0;o<r.length;o++){let u=r[o];if(u!==void 0&&Xh(i[u]))s|=1<<o}return s}function Xh(e){if(e===void 0||e===null)return!1;return!0}function Zh(e,t){return t.add(e.text??"")}function rn(e,t){if(!e||e.length===0)return fr;let r=t.finish().length;t.writeArrayHeader(e.length);for(let i of e)t.writeArrayHeader(5),t.writeUint(i.pos),t.writeUint(i.end),t.writeString(i.fileName),t.writeUint(i.resolutionMode??0),t.writeBool(i.preserve??!1);return r}function Kh(e,t,r,i){let s=r.length*4;if(e.kind===n.SourceFile){let o=e,u=t.add(o.text),f=t.add(o.fileName),E=t.add(o.path),P=rn(o.referencedFiles,i),N=rn(o.typeReferenceDirectives,i),U=rn(o.libReferenceDirectives,i);r.push(u,f,E,o.languageVariant,o.scriptKind,P,N,U,fr,fr,fr,0)}else if(e.kind===n.TemplateHead||e.kind===n.TemplateMiddle||e.kind===n.TemplateTail){let o=e,u=o.text??"",f=o.rawText??"",E=o.templateFlags??0,P=t.add(u),N=t.add(f);r.push(P,N,E)}else{let o=e,u=o.text??"",f=o.tokenFlags??0,E=t.add(u);r.push(E,f)}return s}function cc(e,t,r,i){let s=rc(e.kind),o=nc(e);switch(s){case Re:return s|o|Yh(e);case Xe:return s|o|Zh(e,t);case lt:return s|o|Kh(e,t,r,i);default:throw Error("unreachable")}}function ed(e){return $e[e.kind]}function td(e){return Array.isArray(e)&&typeof e.pos==="number"&&typeof e.end==="number"}function pc(e){let t=new uc,r=[],i=new tn,s=[];s.push(0,0,0,0,0,0,0);let o=0,u=0,f=0;function E(J){o++;let le=o;if(f!==0)s[f*sc+oc]=le;let ae=cc(J,t,r,i);s.push(J.kind,J.pos>=0?J.pos:0,J.end>=0?J.end:0,0,u,ae,J.flags);let Ne=u,Le=f;u=le,f=0,N(J),f=le,u=Ne}function P(J){if(!J)return;o++;let le=o;if(f!==0)s[f*sc+oc]=le;s.push(Ye,J.pos>=0?J.pos:0,J.end>=0?J.end:0,0,u,J.length,0);let ae=u;u=le,f=0;for(let Ne of J)E(Ne);f=le,u=ae}function N(J){let le=ed(J),ae=J;if(le)for(let Ne of le){if(Ne===void 0)continue;let Le=ae[Ne];if(Le===void 0||Le===null)continue;if(td(Le))P(Le);else E(Le)}}o++,u++;let U=cc(e,t,r,i);s.push(e.kind,e.pos>=0?e.pos:0,e.end>=0?e.end:0,0,0,U,e.flags);let M=u;f=0,u=1,N(e),u=M;let Y=new Uint8Array(r.length*4),pe=new DataView(Y.buffer);for(let J=0;J<r.length;J++)pe.setUint32(J*4,r[J],!0);let Ie=i.finish(),tt=t.encode(),Te=new Uint8Array(s.length*4),we=new DataView(Te.buffer);for(let J=0;J<s.length;J++)we.setUint32(J*4,s[J]>>>0,!0);let rt=qt,ve=qt+t.offsetsCount()*4,v=ve+t.stringByteLength(),ge=v+Y.length,H=ge+Ie.length,he=new Uint8Array(qt),De=new DataView(he.buffer),$t=Fa<<24;De.setUint32(Qa,$t,!0),De.setUint32(ir,rt,!0),De.setUint32(sr,ve,!0),De.setUint32(or,v,!0),De.setUint32(ar,ge,!0),De.setUint32(cr,H,!0);let Ce=new Uint8Array(he.length+tt.length+Y.length+Ie.length+Te.length);return Ce.set(he,0),Ce.set(tt,qt),Ce.set(Y,v),Ce.set(Ie,ge),Ce.set(Te,H),Ce}function lc(e){return Buffer.from(e).toString("base64")}var fc=[0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8],mc=3221225472,hc=255,dc=16777215,Ke=16777215;function nn(e){let t=e.getUint32(Ya,!0),r=e.getUint32(Xa,!0),i=e.getUint32(Za,!0),s=e.getUint32(Ka,!0);return mr(s)+mr(i)+mr(r)+mr(t)}function sn(e){return e.getUint32(ec,!0).toString()}function mr(e){return(e>>>0).toString(16).padStart(8,"0")}function Tc(e){switch(e){case n.StaticKeyword:return j.Static;case n.PublicKeyword:return j.Public;case n.ProtectedKeyword:return j.Protected;case n.PrivateKeyword:return j.Private;case n.AbstractKeyword:return j.Abstract;case n.AccessorKeyword:return j.Accessor;case n.ExportKeyword:return j.Export;case n.DeclareKeyword:return j.Ambient;case n.ConstKeyword:return j.Const;case n.DefaultKeyword:return j.Default;case n.AsyncKeyword:return j.Async;case n.ReadonlyKeyword:return j.Readonly;case n.OverrideKeyword:return j.Override;case n.InKeyword:return j.In;case n.OutKeyword:return j.Out;case n.Decorator:return j.Decorator;default:return j.None}}class hr{parent;view;index;_byteIndex;constructor(e,t,r,i){this.view=e,this.index=t,this.parent=r,this._byteIndex=i}get kind(){return this.view.getUint32(this._byteIndex+Fe,!0)}get pos(){return this.view.getInt32(this._byteIndex+ur,!0)}get end(){return this.view.getInt32(this._byteIndex+pr,!0)}get next(){return this.view.getUint32(this._byteIndex+pt,!0)}get parentIndex(){return this.view.getUint32(this._byteIndex+Qe,!0)}get data(){return this.view.getUint32(this._byteIndex+lr,!0)}get dataType(){return this.data&mc}get childMask(){if(this.dataType!==Re)return-1;return this.data&hc}getFileText(e,t){return this.sourceFile._decoder.decode(new Uint8Array(this.view.buffer,this.view.byteOffset+this.sourceFile._offsetStringTable+e,t-e))}get sourceFile(){throw Error("sourceFile not available on base")}}class ft extends Array{static get[Symbol.species](){return Array}parent;hasTrailingComma;transformFlags=0;view;index;_byteIndex;_cursorIndex=0;_cursorNodeIndex=0;get pos(){return this.view.getUint32(this._byteIndex+ur,!0)}get end(){return this.view.getUint32(this._byteIndex+pr,!0)}get next(){return this.view.getUint32(this._byteIndex+pt,!0)}get data(){return this.view.getUint32(this._byteIndex+lr,!0)}sourceFile;constructor(e,t,r,i,s){super();this.view=e,this.index=t,this.parent=r,this.sourceFile=i,this._byteIndex=s+t*ee,this.length=this.data,this._cursorNodeIndex=t+1;let o=this.length;for(let u=16;u<o;u++)Object.defineProperty(this,u,{get(){return this.at(u)}})}get 0(){return this.at(0)}get 1(){return this.at(1)}get 2(){return this.at(2)}get 3(){return this.at(3)}get 4(){return this.at(4)}get 5(){return this.at(5)}get 6(){return this.at(6)}get 7(){return this.at(7)}get 8(){return this.at(8)}get 9(){return this.at(9)}get 10(){return this.at(10)}get 11(){return this.at(11)}get 12(){return this.at(12)}get 13(){return this.at(13)}get 14(){return this.at(14)}get 15(){return this.at(15)}*[Symbol.iterator](){if(!this.length)return;let e=this.index+1;while(e){let t=this.getOrCreateChildAtNodeIndex(e);e=t.next,yield t}}forEachNode(e){if(!this.length)return;let t=this.index+1;while(t){let r=this.getOrCreateChildAtNodeIndex(t);t=r.next;let i=e(r);if(i)return i}}at(e){if(!Number.isInteger(e))return;if(e>=this.data||e<0&&-e>this.data)return;if(e<0)e=this.length+e;let t=this.sourceFile._offsetNodes,r,i;if(e>=this._cursorIndex)r=this._cursorIndex,i=this._cursorNodeIndex;else r=0,i=this.index+1;for(;r<e;r++)i=this.view.getUint32(t+i*ee+pt,!0);return this._cursorIndex=e,this._cursorNodeIndex=i,this.getOrCreateChildAtNodeIndex(i)}getOrCreateChildAtNodeIndex(e){let t=this.sourceFile.nodes[e];if(!t){if(this.view.getUint32(this.sourceFile._offsetNodes+e*ee+Fe,!0)===Ye)throw Error("NodeList cannot directly contain another NodeList");let i=this.sourceFile;t=new Be(this.view,e,this.parent,i,i._offsetNodes),i.nodes[e]=t,i._timing?.recordMaterialization()}return t}__print(){let e=[];return e.push("kind: NodeList"),e.push(`index: ${this.index}`),e.push(`byteIndex: ${this._byteIndex}`),e.push(`length: ${this.length}`),e.join(`
8
+ `)}}class Be extends hr{static NODE_LEN=ee;get sourceFile(){return this._sourceFile}_sourceFile;get id(){return`${this.index}.${this.kind}.${this.sourceFile.path}`}constructor(e,t,r,i,s){super(e,t,r,s+t*ee);this._sourceFile=i}forEachChild(e,t){if(this.hasChildren()){let r=this.index+1;do{let i=this.getOrCreateChildAtNodeIndex(r);if(i instanceof ft)if(t){let s=t(i);if(s)return s}else{let s=i.forEachNode(e);if(s)return s}else if(i.kind!==n.JSDoc){let s=e(i);if(s)return s}r=i.next}while(r)}}get jsDoc(){if(!this.hasChildren())return;let e,t=this.index+1;do{let r=this.getOrCreateChildAtNodeIndex(t);if(!(r instanceof ft)&&r.kind===n.JSDoc)(e??=[]).push(r);t=r.next}while(t);return e}getSourceFile(){return this.sourceFile}getStart(e,t){return Mt(this,e??this.getSourceFile(),t)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(e){return this.getEnd()-this.getStart(e)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(e){return this.getStart(e)-this.pos}getFullText(e){return(e??this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return e??=this.getSourceFile(),e.text.substring(this.getStart(e),this.end)}getString(e){let t=this.sourceFile._offsetStringTableOffsets,r=this.view.getUint32(t+e*4,!0),i=this.view.getUint32(t+(e+1)*4,!0),s=this.sourceFile._offsetStringTable,o=new Uint8Array(this.view.buffer,this.view.byteOffset+s+r,i-r);return this.sourceFile._decoder.decode(o)}getOrCreateChildAtNodeIndex(e){let t=this.sourceFile.nodes[e];if(!t){let r=this.sourceFile,i=r._offsetNodes;t=this.view.getUint32(i+e*ee+Fe,!0)===Ye?new ft(this.view,e,this,r,i):new Be(this.view,e,this,r,i),r.nodes[e]=t,r._timing?.recordMaterialization()}return t}hasChildren(){if(this._byteIndex>=this.view.byteLength-ee)return!1;return this.view.getUint32(this.sourceFile._offsetNodes+(this.index+1)*ee+Qe,!0)===this.index}getNamedChild(e){let t=this.kind,r=$e[t];if(!r)return;let i=r.indexOf(e);if(i===-1)return;return this.getChildAtOrder(i)}getChildAtOrder(e){let t=this.childMask;if(!(t&1<<e))return;let r=e-fc[~(t|255<<e&255)&255],i=this.index+1;for(let s=0;s<r;s++)i=this.view.getUint32(this.sourceFile._offsetNodes+i*ee+pt,!0);return this.getOrCreateChildAtNodeIndex(i)}__print(){let e=[];e.push(`index: ${this.index}`),e.push(`byteIndex: ${this._byteIndex}`),e.push(`kind: ${n[this.kind]}`),e.push(`pos: ${this.pos}`),e.push(`end: ${this.end}`),e.push(`next: ${this.next}`),e.push(`parent: ${this.parentIndex}`),e.push(`data: ${this.data.toString(2).padStart(32,"0")}`);let t=this.dataType===Re?"children":this.dataType===Xe?"string":"extended";if(e.push(`dataType: ${t}`),this.dataType===Re)e.push(`childMask: ${this.childMask.toString(2).padStart(8,"0")}`),e.push(`childProperties: ${$e[this.kind]?.join(", ")}`);return e.join(`
9
+ `)}__printChildren(){let e=[],t=this.index+1;while(t){let r=this.getOrCreateChildAtNodeIndex(t);t=r.next,e.push(r.__print())}return e.join(`
10
+
11
+ `)}__printSubtree(){let e=[this.__print()];return this.forEachChild(function t(r){e.push(r.__print()),r.forEachChild(t)},(t)=>{e.push(t.__print())}),e.join(`
12
+
13
+ `)}get containsOnlyTriviaWhiteSpaces(){return(this.data&16777216)!==0}get isArrayType(){return(this.data&16777216)!==0}get isBracketed(){return(this.data&16777216)!==0}get isExportEquals(){return(this.data&16777216)!==0}get isNameFirst(){return(this.data&33554432)!==0}get isTypeOf(){return(this.data&16777216)!==0}get isTypeOnly(){return(this.data&16777216)!==0}get multiLine(){return(this.data&16777216)!==0}get keyword(){switch(this.kind){case n.ModuleDeclaration:return this.data>>24&1?n.NamespaceKeyword:n.ModuleKeyword}}get keywordToken(){switch(this.kind){case n.MetaProperty:return this.data>>24&1?n.NewKeyword:n.ImportKeyword}}get operator(){switch(this.kind){case n.PrefixUnaryExpression:{let e=this.data>>24&7;if(e===1)return n.MinusToken;if(e===2)return n.TildeToken;if(e===3)return n.ExclamationToken;if(e===4)return n.PlusPlusToken;if(e===5)return n.MinusMinusToken;return n.PlusToken}case n.PostfixUnaryExpression:return this.data>>24&1?n.MinusMinusToken:n.PlusPlusToken;case n.TypeOperator:{let e=this.data>>24&3;if(e===1)return n.ReadonlyKeyword;if(e===2)return n.UniqueKeyword;return n.KeyOfKeyword}}}get phaseModifier(){switch(this.kind){case n.ImportClause:{let e=this.data>>24&3;if(e===0)return;return e===1?n.TypeKeyword:e===2?n.DeferKeyword:void 0}}}get token(){switch(this.kind){case n.HeritageClause:return this.data>>24&1?n.ImplementsKeyword:n.ExtendsKeyword;case n.ImportAttributes:return this.data>>25&1?n.AssertKeyword:n.WithKeyword}}get templateFlags(){switch(this.kind){case n.TemplateHead:case n.TemplateMiddle:case n.TemplateTail:let e=this.sourceFile._offsetExtendedData+(this.data&Ke);return this.view.getUint32(e+8,!0)}}get tokenFlags(){switch(this.kind){case n.StringLiteral:case n.NumericLiteral:case n.BigIntLiteral:case n.RegularExpressionLiteral:let e=this.sourceFile._offsetExtendedData+(this.data&Ke);return this.view.getUint32(e+4,!0);default:return 0}}get argument(){return this.getNamedChild("argument")}get argumentExpression(){return this.getNamedChild("argumentExpression")}get arguments(){return this.getNamedChild("arguments")}get assertsModifier(){return this.getNamedChild("assertsModifier")}get asteriskToken(){return this.getNamedChild("asteriskToken")}get attributes(){return this.getNamedChild("attributes")}get awaitModifier(){return this.getNamedChild("awaitModifier")}get block(){return this.getNamedChild("block")}get body(){return this.getNamedChild("body")}get caseBlock(){return this.getNamedChild("caseBlock")}get catchClause(){return this.getNamedChild("catchClause")}get checkType(){return this.getNamedChild("checkType")}get children(){return this.getNamedChild("children")}get className(){return this.getNamedChild("className")}get clauses(){return this.getNamedChild("clauses")}get closingElement(){return this.getNamedChild("closingElement")}get closingFragment(){return this.getNamedChild("closingFragment")}get colonToken(){return this.getNamedChild("colonToken")}get comment(){return this.getNamedChild("comment")}get condition(){return this.getNamedChild("condition")}get constraint(){return this.getNamedChild("constraint")}get declarationList(){return this.getNamedChild("declarationList")}get declarations(){return this.getNamedChild("declarations")}get defaultType(){return this.getNamedChild("defaultType")}get dotDotDotToken(){return this.getNamedChild("dotDotDotToken")}get elements(){return this.getNamedChild("elements")}get elementType(){return this.getNamedChild("elementType")}get elseStatement(){return this.getNamedChild("elseStatement")}get endOfFileToken(){return this.getNamedChild("endOfFileToken")}get equalsGreaterThanToken(){return this.getNamedChild("equalsGreaterThanToken")}get equalsToken(){return this.getNamedChild("equalsToken")}get exclamationToken(){return this.getNamedChild("exclamationToken")}get exportClause(){return this.getNamedChild("exportClause")}get expression(){return this.getNamedChild("expression")}get exprName(){return this.getNamedChild("exprName")}get extendsType(){return this.getNamedChild("extendsType")}get falseType(){return this.getNamedChild("falseType")}get finallyBlock(){return this.getNamedChild("finallyBlock")}get head(){return this.getNamedChild("head")}get heritageClauses(){return this.getNamedChild("heritageClauses")}get importClause(){return this.getNamedChild("importClause")}get incrementor(){return this.getNamedChild("incrementor")}get indexType(){return this.getNamedChild("indexType")}get initializer(){return this.getNamedChild("initializer")}get jsdocPropertyTags(){return this.getNamedChild("jsdocPropertyTags")}get label(){return this.getNamedChild("label")}get left(){return this.getNamedChild("left")}get literal(){return this.getNamedChild("literal")}get members(){return this.getNamedChild("members")}get modifiers(){return this.getNamedChild("modifiers")}get moduleReference(){return this.getNamedChild("moduleReference")}get moduleSpecifier(){return this.getNamedChild("moduleSpecifier")}get name(){return this.getNamedChild("name")}get namedBindings(){return this.getNamedChild("namedBindings")}get nameExpression(){return this.getNamedChild("nameExpression")}get namespace(){return this.getNamedChild("namespace")}get nameType(){return this.getNamedChild("nameType")}get objectAssignmentInitializer(){return this.getNamedChild("objectAssignmentInitializer")}get objectType(){return this.getNamedChild("objectType")}get openingElement(){return this.getNamedChild("openingElement")}get openingFragment(){return this.getNamedChild("openingFragment")}get operand(){return this.getNamedChild("operand")}get operatorToken(){return this.getNamedChild("operatorToken")}get parameterName(){return this.getNamedChild("parameterName")}get parameters(){return this.getNamedChild("parameters")}get postfixToken(){return this.getNamedChild("postfixToken")}get properties(){return this.getNamedChild("properties")}get propertyName(){return this.getNamedChild("propertyName")}get qualifier(){return this.getNamedChild("qualifier")}get questionDotToken(){return this.getNamedChild("questionDotToken")}get questionToken(){return this.getNamedChild("questionToken")}get readonlyToken(){return this.getNamedChild("readonlyToken")}get right(){return this.getNamedChild("right")}get statement(){return this.getNamedChild("statement")}get statements(){return this.getNamedChild("statements")}get tag(){return this.getNamedChild("tag")}get tagName(){return this.getNamedChild("tagName")}get tags(){return this.getNamedChild("tags")}get template(){return this.getNamedChild("template")}get templateSpans(){return this.getNamedChild("templateSpans")}get thenStatement(){return this.getNamedChild("thenStatement")}get thisArg(){return this.getNamedChild("thisArg")}get trueType(){return this.getNamedChild("trueType")}get tryBlock(){return this.getNamedChild("tryBlock")}get tupleNameSource(){return this.getNamedChild("tupleNameSource")}get type(){return this.getNamedChild("type")}get typeArguments(){return this.getNamedChild("typeArguments")}get typeExpression(){return this.getNamedChild("typeExpression")}get typeName(){return this.getNamedChild("typeName")}get typeParameter(){return this.getNamedChild("typeParameter")}get typeParameters(){return this.getNamedChild("typeParameters")}get types(){return this.getNamedChild("types")}get value(){return this.getNamedChild("value")}get variableDeclaration(){return this.getNamedChild("variableDeclaration")}get whenFalse(){return this.getNamedChild("whenFalse")}get whenTrue(){return this.getNamedChild("whenTrue")}get text(){switch(this.kind){case n.Identifier:case n.PrivateIdentifier:case n.JsxText:case n.JSDocText:case n.JSDocLink:case n.JSDocLinkPlain:case n.JSDocLinkCode:{let e=this.data&dc;return this.getString(e)}case n.StringLiteral:case n.NumericLiteral:case n.BigIntLiteral:case n.RegularExpressionLiteral:case n.NoSubstitutionTemplateLiteral:case n.TemplateHead:case n.TemplateMiddle:case n.TemplateTail:case n.SourceFile:{let e=this.sourceFile._offsetExtendedData+(this.data&Ke),t=this.view.getUint32(e,!0);return this.getString(t)}}}get rawText(){switch(this.kind){case n.TemplateHead:case n.TemplateMiddle:case n.TemplateTail:let e=this.sourceFile._offsetExtendedData+(this.data&Ke),t=this.view.getUint32(e+4,!0);return this.getString(t)}}get flags(){return this.view.getUint32(this._byteIndex+tc,!0)}get modifierFlags(){let e=this.modifiers;if(!e)return j.None;let t=j.None;for(let r of e)t|=Tc(r.kind);return t}}var on=4294967295;class dr extends Be{nodes;_offsetNodes;_offsetStringTableOffsets;_offsetStringTable;_offsetExtendedData;_offsetStructuredData;_decoder;_timing;_lineStarts;_cachedText;_cachedReferencedFiles;_cachedTypeReferenceDirectives;_cachedLibReferenceDirectives;_cachedImports;_cachedModuleAugmentations;_cachedAmbientModuleNames;constructor(e,t,r){let i=new DataView(e.buffer,e.byteOffset,e.byteLength),s=i.getUint32(cr,!0);super(i,1,void 0,void 0,s);this._sourceFile=this,this._offsetNodes=s,this._offsetStringTableOffsets=i.getUint32(ir,!0),this._offsetStringTable=i.getUint32(sr,!0),this._offsetExtendedData=i.getUint32(or,!0),this._offsetStructuredData=i.getUint32(ar,!0),this._decoder=t,this._timing=r,this.nodes=Array((i.byteLength-s)/ee),this.nodes[1]=this,r?.recordSourceFileFetched(Math.max(0,this.nodes.length-2))}readFileReferences(e){if(e===on)return[];let t=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),r=new Bt(t,this._offsetStructuredData+e),i=r.readArrayHeader(),s=[];for(let o=0;o<i;o++){r.readArrayHeader();let u=r.readUint(),f=r.readUint(),E=r.readString(),P=r.readUint(),N=r.readBool();s.push({pos:u,end:f,fileName:E,resolutionMode:P,preserve:N})}return s}readNodeIndexArray(e){if(e===on)return[];let t=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),r=new Bt(t,this._offsetStructuredData+e),i=r.readArrayHeader(),s=[];for(let o=0;o<i;o++){let u=r.readUint();s.push(this.getOrCreateNodeAtIndex(u))}return s}readStringArray(e){if(e===on)return[];let t=new Uint8Array(this.view.buffer,this.view.byteOffset,this.view.byteLength),r=new Bt(t,this._offsetStructuredData+e),i=r.readArrayHeader(),s=[];for(let o=0;o<i;o++)s.push(r.readString());return s}getOrCreateNodeAtIndex(e){let t=this.nodes[e];if(!t){let r=this.view.getUint32(this._offsetNodes+e*ee+Qe,!0);while(r!==e&&this.view.getUint32(this._offsetNodes+r*ee+Fe,!0)===Ye)r=this.view.getUint32(this._offsetNodes+r*ee+Qe,!0);let i=r===e?this:this.getOrCreateNodeAtIndex(r);t=new Be(this.view,e,i,this,this._offsetNodes),this.nodes[e]=t,this._timing?.recordMaterialization()}return t}get extendedDataOffset(){return this._offsetExtendedData+(this.data&Ke)}get fileName(){let e=this.view.getUint32(this.extendedDataOffset+4,!0);return this.getString(e)}get path(){let e=this.view.getUint32(this.extendedDataOffset+8,!0);return this.getString(e)}get languageVariant(){return this.view.getUint32(this.extendedDataOffset+12,!0)}get scriptKind(){return this.view.getUint32(this.extendedDataOffset+16,!0)}get referencedFiles(){if(this._cachedReferencedFiles!==void 0)return this._cachedReferencedFiles;let e=this.view.getUint32(this.extendedDataOffset+20,!0),t=this.readFileReferences(e);return this._cachedReferencedFiles=t,t}get typeReferenceDirectives(){if(this._cachedTypeReferenceDirectives!==void 0)return this._cachedTypeReferenceDirectives;let e=this.view.getUint32(this.extendedDataOffset+24,!0),t=this.readFileReferences(e);return this._cachedTypeReferenceDirectives=t,t}get libReferenceDirectives(){if(this._cachedLibReferenceDirectives!==void 0)return this._cachedLibReferenceDirectives;let e=this.view.getUint32(this.extendedDataOffset+28,!0),t=this.readFileReferences(e);return this._cachedLibReferenceDirectives=t,t}get imports(){if(this._cachedImports!==void 0)return this._cachedImports;let e=this.view.getUint32(this.extendedDataOffset+32,!0),t=this.readNodeIndexArray(e);return this._cachedImports=t,t}get moduleAugmentations(){if(this._cachedModuleAugmentations!==void 0)return this._cachedModuleAugmentations;let e=this.view.getUint32(this.extendedDataOffset+36,!0),t=this.readNodeIndexArray(e);return this._cachedModuleAugmentations=t,t}get ambientModuleNames(){if(this._cachedAmbientModuleNames!==void 0)return this._cachedAmbientModuleNames;let e=this.view.getUint32(this.extendedDataOffset+40,!0),t=this.readStringArray(e);return this._cachedAmbientModuleNames=t,t}get externalModuleIndicator(){let e=this.view.getUint32(this.extendedDataOffset+44,!0);if(e===0)return;if(e===this.index)return!0;return this.getOrCreateNodeAtIndex(e)}get isDeclarationFile(){return(this.flags&_e.Ambient)!==0}get text(){if(this._cachedText!==void 0)return this._cachedText;let e=super.text;return this._cachedText=e,e}getLineStarts(){return this._lineStarts??=Ga(this.text??"")}getLineAndCharacterOfPosition(e){let t=this.getLineStarts(),r=rd(t,e);return{line:r,character:e-t[r]}}getPositionOfLineAndCharacter(e,t){let r=this.getLineStarts();if(e<0||e>=r.length)throw Error(`Bad line number. Line: ${e}, lineStarts.length: ${r.length}`);return r[e]+t}}function rd(e,t){let r=0,i=e.length-1;while(r<=i){let s=r+(i-r>>1),o=e[s];if(o<t)r=s+1;else if(o>t)i=s-1;else return s}return r-1}function gc(e){let t=e.indexOf(".");if(t===-1)throw Error(`Invalid node handle: ${e}`);let r=e.indexOf(".",t+1);if(r===-1)throw Error(`Invalid node handle: ${e}`);return{index:parseInt(e.slice(0,t),10),kind:parseInt(e.slice(t+1,r),10),path:e.slice(r+1)}}function an(e){return new dr(e,new Ze)}function X(e){if(!(e instanceof Be))throw Error("getNodeId requires a RemoteNode");return e.id}var nd=/\\/g,yc=/\/\/|(?:^|\/)\.\.?(?:$|\/)/;function id(e){return e===47||e===92}function cn(e){return e>=97&&e<=122||e>=65&&e<=90}function sd(e,t){let r=e.charCodeAt(t);if(r===58)return t+1;if(r===37&&e.charCodeAt(t+1)===51){let i=e.charCodeAt(t+2);if(i===97||i===65)return t+3}return-1}function un(e){let t=kc(e);return t<0?~t:t}function kc(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let i=e.indexOf(t===47?"/":"\\",2);if(i<0)return e.length;return i+1}if(cn(t)&&e.charCodeAt(1)===58){let i=e.charCodeAt(2);if(i===47||i===92)return 3;if(e.length===2)return 2}let r=e.indexOf("://");if(r!==-1){let i=r+3,s=e.indexOf("/",i);if(s!==-1){let o=e.slice(0,r),u=e.slice(i,s);if(o==="file"&&(u===""||u==="localhost")&&cn(e.charCodeAt(s+1))){let f=sd(e,s+2);if(f!==-1){if(e.charCodeAt(f)===47)return~(f+1);if(f===e.length)return~f}}return~(s+1)}return~e.length}return 0}function pn(e){return e.length>0&&id(e.charCodeAt(e.length-1))}function xc(e){if(pn(e))return e.substr(0,e.length-1);return e}function wc(e){if(!pn(e))return e+"/";return e}function Tr(e){return e.includes("\\")?e.replace(nd,"/"):e}function od(e,...t){if(e)e=Tr(e);for(let r of t){if(!r)continue;if(r=Tr(r),!e||un(r)!==0)e=r;else e=wc(e)+r}return e}function Dc(e){if(!yc.test(e))return e;let t=e.replace(/\/\.\//g,"/");if(t.startsWith("./"))t=t.slice(2);if(t!==e){if(e=t,!yc.test(e))return e}return}function Sc(e,t){let r=un(e);if(r===0&&t)e=od(t,e),r=un(e);else e=Tr(e);let i=Dc(e);if(i!==void 0)return i.length>r?xc(i):i;let s=e.length,o=e.substring(0,r),u,f=r,E=f,P=f,N=r!==0;while(f<s){E=f;let U=e.charCodeAt(f);while(U===47&&f+1<s)f++,U=e.charCodeAt(f);if(f>E)u??=e.substring(0,E-1),E=f;let M=e.indexOf("/",f+1);if(M===-1)M=s;let Y=M-E;if(Y===1&&e.charCodeAt(f)===46)u??=e.substring(0,P);else if(Y===2&&e.charCodeAt(f)===46&&e.charCodeAt(f+1)===46)if(!N)if(u!==void 0)u+=u.length===r?"..":"/..";else P=f+2;else if(u===void 0)if(P-2>=0)u=e.substring(0,Math.max(r,e.lastIndexOf("/",P-2)));else u=e.substring(0,P);else{let pe=u.lastIndexOf("/");if(pe!==-1)u=u.substring(0,Math.max(r,pe));else u=o;if(u.length===r)N=r!==0}else if(u!==void 0){if(u.length!==r)u+="/";N=!0,u+=e.substring(E,M)}else N=!0,P=M;f=M+1}return u??(s>r?xc(e):e)}function ad(e){e=Tr(e);let t=Dc(e);if(t!==void 0)return t;return t=Sc(e,""),t&&pn(e)?wc(t):t}function cd(e){return kc(e)>0}function _c(e,t,r){let i=cd(e)?ad(e):Sc(e,t);return r(i)}function Pc(e){return e?ud:pd}function ud(e){return e}function pd(e){return e.toLowerCase()}var ld="bundled:///";function Ac(e){return e.startsWith(ld)}function fd(e){return e.startsWith("^/")}function bc(e){if(e.length>=2&&cn(e.charCodeAt(0))&&e.charCodeAt(1)===58)return[e.substring(0,2).toLowerCase(),e.substring(2),!0];return["",e,!1]}var md={":":"%3A","/":"%2F","?":"%3F","#":"%23","[":"%5B","]":"%5D","@":"%40","!":"%21",$:"%24","&":"%26","'":"%27","(":"%28",")":"%29","*":"%2A","+":"%2B",",":"%2C",";":"%3B","=":"%3D"," ":"%20"};function Ec(e){let t=e;for(let[r,i]of Object.entries(md))t=t.replaceAll(r,i);return t}function Ic(e){if(Ac(e))return e;if(fd(e)){let o=e.substring(2),u=o.indexOf("/");if(u===-1)throw Error("invalid file name: "+e);let f=o.substring(0,u),E=o.substring(u+1),P=E.indexOf("/");if(P===-1)throw Error("invalid file name: "+e);let N=E.substring(0,P),U=E.substring(P+1);if(N==="ts-nul-authority")return f+":"+U;return f+"://"+N+"/"+U}let[t,r]=bc(e);if(t!=="")t="/"+Ec(t);if(r.startsWith("//"))r=r.substring(2);let s=r.split("/").map((o)=>Ec(encodeURIComponent(o)));return"file://"+t+s.join("/")}function ln(e){if(Ac(e))return e;if(e.startsWith("file://")){let o;try{o=new URL(e)}catch{throw Error("invalid file URI: "+e)}if(o.host!=="")return"//"+o.host+o.pathname;let u=decodeURIComponent(o.pathname);if(u.length>=3&&u.charCodeAt(0)===47){let[f,E,P]=bc(u.substring(1));if(P)return f+E}return u}let t=e.indexOf(":");if(t===-1)throw Error("invalid URI: "+e);let r=e.substring(0,t),i=e.substring(t+1),s="ts-nul-authority";if(i.startsWith("//")){let o=i.substring(2),u=o.indexOf("/");if(u===-1)throw Error("invalid URI: "+e);s=o.substring(0,u),i=o.substring(u+1)}return"^/"+r+"/"+s+"/"+i}function fn(e){if(typeof e==="string")return e;return ln(e.uri)}function Cc(e){let{openProject:t,openProjects:r,...i}=e??{},s=t!==void 0?[fn(t),...r??[]]:r;return{...i,...s!==void 0?{openProjects:s}:{}}}function Ut(e,t){return`${e}:${t}`}class mn{cache=new Map;snapshotProjectPaths=new Map;getRetained(e,t,r){let i=this.cache.get(e);if(!i)return;let s=Ut(t,r);return i.find((u)=>u.refs.has(s))?.file}set(e,t,r,i,s,o){let u=this.cache.get(e);if(!u)u=[],this.cache.set(e,u);let f=Ut(s,o),E=u.find((P)=>P.parseOptionsKey===r&&P.contentHash===i);if(E)return E.refs.add(f),this.trackPath(s,o,e),E.file;return u.push({file:t,contentHash:i,parseOptionsKey:r,refs:new Set([f])}),this.trackPath(s,o,e),t}retainForSnapshot(e,t,r){let i=this.snapshotProjectPaths.get(t);if(!i)return;let s=new Set(r?.removedProjects??[]),o=r?.changedProjects??{};for(let[u,f]of i){if(s.has(u))continue;let E=o[u],P;if(E){P=new Set;for(let M of E.changedFiles??[])P.add(M);for(let M of E.deletedFiles??[])P.add(M)}let N=Ut(t,u),U=Ut(e,u);for(let M of f){if(P?.has(M))continue;let Y=this.cache.get(M);if(!Y)continue;for(let pe of Y)if(pe.refs.has(N))pe.refs.add(U),this.trackPath(e,u,M)}}}releaseSnapshot(e){let t=this.snapshotProjectPaths.get(e);if(!t)return;for(let[r,i]of t){let s=Ut(e,r);for(let o of i){let u=this.cache.get(o);if(!u)continue;for(let f=u.length-1;f>=0;f--)if(u[f].refs.delete(s),u[f].refs.size===0)u.splice(f,1);if(u.length===0)this.cache.delete(o)}}this.snapshotProjectPaths.delete(e)}trackPath(e,t,r){let i=this.snapshotProjectPaths.get(e);if(!i)i=new Map,this.snapshotProjectPaths.set(e,i);let s=i.get(t);if(!s)s=new Set,i.set(t,s);s.add(r)}clear(){this.cache.clear(),this.snapshotProjectPaths.clear()}get size(){return this.cache.size}has(e){return this.cache.has(e)}}var oe=jp(Ku(),1);var Un=["readFile","fileExists","directoryExists","getAccessibleEntries","realpath"];import ep from"node:fs";import PT from"node:module";import Oe from"node:path";import{fileURLToPath as tp}from"node:url";function jn(){let e=Oe.dirname(tp(import.meta.url)),t=e.replace(/\\/g,"/"),r=JSON.parse(ep.readFileSync(Oe.join(e,"..","package.json"),"utf8")),i=r.name,s=i.startsWith("@")?i.split("/")[1]:i,o=s==="typescript"?"tsc":"tsgo",u=r.bin&&typeof r.bin==="object"?Object.keys(r.bin):[];if(u.length!==1||u[0]!==o)throw Error(`Expected ${i} to declare exactly one bin entry named ${o}.`);let f=o,E,P=s+"-"+process.platform+"-"+process.arch;if(t.endsWith("/_packages/"+s+"/lib"))E=Oe.resolve(e,"..","..","..","built","local"),f="tsgo";else if(t.endsWith("/built/npm/"+s+"/lib"))E=Oe.resolve(e,"..","..",P,"lib");else{let U="@typescript/"+P;try{if(typeof import.meta.resolve>"u"){let Y=PT.createRequire(import.meta.url).resolve(U+"/package.json");E=Oe.join(Oe.dirname(Y),"lib")}else{let M=import.meta.resolve(U+"/package.json"),Y=tp(M);E=Oe.join(Oe.dirname(Y),"lib")}}catch(M){throw Error("Unable to resolve "+U+". Either your platform is unsupported, or you are missing the package on disk.")}}let N=Oe.join(E,f);if(process.platform==="win32"){if(N+=".exe",N.length>=248)N="\\\\?\\"+N}if(!ep.existsSync(N))throw Error("Executable not found: "+N);return N}function Vn(e){return!("pipe"in e)}function rp(e){return e.tsserverPath??jn()}function Wn(){return{requestCount:0,roundTripMs:0,bytesSent:0,bytesReceived:0,serverTimeMs:0,transportOverheadMs:0,nodesMaterialized:0,sourceFilesFetched:0,nodesFetched:0}}function np(){return{enabled:!1,totals:Wn(),recentRequests:[]}}function ip(){return{enabled:!1,totals:{requestCount:0,totalProcessingTimeMs:0},recentRequests:[]}}function sp(e,t){if(!e.enabled)return e;let r=t.totals.totalProcessingTimeMs,i={...e.totals,serverTimeMs:r,transportOverheadMs:Math.max(0,e.totals.roundTripMs-r)},s=e.recentRequests.map((f)=>({...f})),o=t.recentRequests,u=Math.min(s.length,o.length);for(let f=1;f<=u;f++){let E=s[s.length-f],P=o[o.length-f];if(E.method===P.method)E.serverTimeMs=P.processingTimeMs,E.transportOverheadMs=Math.max(0,E.roundTripMs-P.processingTimeMs)}return{enabled:!0,totals:i,recentRequests:s}}class zn{totals=Wn();ring=[];head=0;record(e){this.totals.requestCount++,this.totals.roundTripMs+=e.roundTripMs,this.totals.bytesSent+=e.bytesSent,this.totals.bytesReceived+=e.bytesReceived;let t={method:e.method,roundTripMs:e.roundTripMs,bytesSent:e.bytesSent,bytesReceived:e.bytesReceived,timestamp:Date.now()};if(this.ring.length<5)this.ring.push(t);else this.ring[this.head]=t,this.head=(this.head+1)%5}recordMaterialization(){this.totals.nodesMaterialized++}recordSourceFileFetched(e){this.totals.sourceFilesFetched++,this.totals.nodesFetched+=e}getInfo(){let e=[];for(let t=0;t<this.ring.length;t++)e.push(this.ring[(this.head+t)%this.ring.length]);return{enabled:!0,totals:{...this.totals},recentRequests:e}}reset(){this.totals=Wn(),this.ring=[],this.head=0}}class Hn{socket;process;connection;options;connected=!1;timing;constructor(e){if(this.options=e,Vn(e)&&e.collectTiming)this.timing=new zn}async connect(){if(this.connected)return;if(Vn(this.options))await this.connectViaSpawn(this.options);else await this.connectViaSocket(this.options)}async connectViaSpawn(e){let{spawn:t}=await import("node:child_process");return new Promise((r,i)=>{let s=["--api","--async","--cwd",e.cwd??process.cwd()];if(e.collectTiming)s.push("--timing");let o=[];if(e.fs){for(let E of Un)if(e.fs[E])o.push(E)}if(o.length>0)s.push(`--callbacks=${o.join(",")}`);this.process=t(rp(e),s,{stdio:["pipe","pipe","inherit"]}),this.process.once("error",(E)=>{i(Error(`Failed to start tsgo process: ${E.message}`))}),this.process.once("spawn",()=>{this.connected=!0,r()});let u=new oe.StreamMessageReader(this.process.stdout),f=new oe.StreamMessageWriter(this.process.stdin);this.connection=oe.createMessageConnection(u,f),this.registerFSCallbacks(this.connection,e.fs),this.connection.listen()})}async connectViaSocket(e){let{createConnection:t}=await import("node:net");return new Promise((r,i)=>{this.socket=t(e.pipe,()=>{let s=new oe.SocketMessageReader(this.socket),o=new oe.SocketMessageWriter(this.socket);this.connection=oe.createMessageConnection(s,o),this.connection.listen(),this.connected=!0,r()}),this.socket.once("error",(s)=>{i(Error(`Socket error: ${s.message}`))})})}registerFSCallbacks(e,t){if(!t)return;for(let r of Un){let i=t[r];if(i){let s=new oe.RequestType(r);e.onRequest(s,(o)=>{let u=i(o);if(r==="readFile"){if(u===void 0)return null;return{content:u}}return u??null})}}}async apiRequest(e,t){if(!this.connected)await this.connect();if(!this.connection)throw Error("Connection not established");let r=new oe.RequestType(e);if(!this.timing)return this.connection.sendRequest(r,t);let i=t===void 0?0:Buffer.byteLength(JSON.stringify(t),"utf-8"),s=performance.now(),o=await this.connection.sendRequest(r,t),u=performance.now()-s;return this.timing.record({method:e,roundTripMs:u,bytesSent:i,bytesReceived:o===void 0||o===null?0:Buffer.byteLength(JSON.stringify(o),"utf-8")}),o}async apiRequestBinary(e,t){let r=await this.apiRequest(e,t);if(!r)return;let i=Buffer.from(r.data,"base64");return new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}getTimingCollector(){return this.timing}async getTimingInfo(){if(!this.timing)return np();let e=this.timing.getInfo();if(!this.connected||!this.connection)return e;return sp(e,await this.fetchServerTiming())}async resetTimingInfo(){if(!this.timing)return;if(this.timing.reset(),this.connected&&this.connection){let e=new oe.RequestType("resetServerTiming");await this.connection.sendRequest(e,void 0)}}async fetchServerTiming(){if(!this.connection)return ip();let e=new oe.RequestType("getServerTiming");return this.connection.sendRequest(e,void 0)}async close(){if(this.connection)this.connection.dispose(),this.connection=void 0;if(this.socket)this.socket.destroy(),this.socket=void 0;if(this.process)this.process.stdin?.end(),this.process=void 0;this.connected=!1}}class op{client;sourceFileCache;toPath;initialized=!1;activeSnapshots=new Set;latestSnapshot;internal;constructor(e={}){this.client=new Hn(e),this.sourceFileCache=new mn,this.internal=new ap(this.client,()=>this.ensureInitialized())}static async fromLSPConnection(e){let t=new op(e);return await t.ensureInitialized(),t}async ensureInitialized(){if(!this.initialized){let e=await this.client.apiRequest("initialize",null),t=Pc(e.useCaseSensitiveFileNames),r=e.currentDirectory;this.toPath=(i)=>_c(i,r,t),this.initialized=!0}}async parseConfigFile(e){return await this.ensureInitialized(),this.client.apiRequest("parseConfigFile",{file:e})}async updateSnapshot(e){await this.ensureInitialized();let t=Cc(e),r=await this.client.apiRequest("updateSnapshot",t);if(this.latestSnapshot){if(this.sourceFileCache.retainForSnapshot(r.snapshot,this.latestSnapshot.id,r.changes),this.latestSnapshot.isDisposed())this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id)}let i=new cp(r,this.client,this.sourceFileCache,this.toPath,()=>{if(this.activeSnapshots.delete(i),i!==this.latestSnapshot)this.sourceFileCache.releaseSnapshot(i.id)});return this.latestSnapshot=i,this.activeSnapshots.add(i),i}async close(){for(let e of[...this.activeSnapshots])await e.dispose();if(this.latestSnapshot)this.sourceFileCache.releaseSnapshot(this.latestSnapshot.id),this.latestSnapshot=void 0;await this.client.close(),this.sourceFileCache.clear()}clearSourceFileCache(){this.sourceFileCache.clear()}getTimingInfo(){return this.client.getTimingInfo()}resetTimingInfo(){return this.client.resetTimingInfo()}}class ap{client;ensureInitialized;constructor(e,t){this.client=e,this.ensureInitialized=t}async startCPUProfile(e){await this.ensureInitialized(),await this.client.apiRequest("startCPUProfile",{dir:e})}async stopCPUProfile(){return await this.ensureInitialized(),(await this.client.apiRequest("stopCPUProfile",null)).file}async saveHeapProfile(e){return await this.ensureInitialized(),(await this.client.apiRequest("saveHeapProfile",{dir:e})).file}}class cp{id;projectMap;toPath;client;disposed=!1;onDispose;snapshotRegistry;constructor(e,t,r,i,s){this.id=e.snapshot,this.client=t,this.toPath=i,this.onDispose=s,this.projectMap=new Map,this.snapshotRegistry=new up(t,this.id,(o)=>this.projectMap.get(o));for(let o of e.projects){let u=new lp(o,this.id,t,r,i,this.snapshotRegistry);this.projectMap.set(i(o.configFileName),u)}}getProjects(){return this.ensureNotDisposed(),[...this.projectMap.values()]}getProject(e){return this.ensureNotDisposed(),this.projectMap.get(this.toPath(e))}async getDefaultProjectForFile(e){this.ensureNotDisposed();let t=await this.client.apiRequest("getDefaultProjectForFile",{snapshot:this.id,file:e});if(!t)return;return this.projectMap.get(this.toPath(t.configFileName))}[globalThis.Symbol.dispose](){this.dispose()}async dispose(){if(this.disposed)return;this.disposed=!0;for(let e of this.projectMap.values())e.dispose();this.projectMap.clear(),this.snapshotRegistry.clear(),this.onDispose(),await this.client.apiRequest("release",{snapshot:this.id})}isDisposed(){return this.disposed}ensureNotDisposed(){if(this.disposed)throw Error("Snapshot is disposed")}}class up{symbols=new Map;client;snapshotId;resolveProject;constructor(e,t,r){this.client=e,this.snapshotId=t,this.resolveProject=r}getProject(e){return this.resolveProject(e)}getOrCreateSymbol(e){let t=this.symbols.get(e.id);if(!t)t=new dp(e,this),this.symbols.set(e.id,t);return t}getSymbol(e){return this.symbols.get(e)}clear(){this.symbols.clear()}async fetchSymbol(e,t,r,i){if(!r)return;let s=this.getSymbol(r);if(s)return s;let o=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:i,objectId:e.id});if(!o)throw Error(`${t} returned null symbol for ${e.constructor.name} ${e.id}`);return this.getOrCreateSymbol(o)}async fetchSymbols(e,t,r,i){if(r){let o=Array(r.length),u=!0;for(let f=0;f<r.length;f++){let E=this.getSymbol(r[f]);if(!E){u=!1;break}o[f]=E}if(u)return o}let s=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:i,objectId:e.id});if(s==null)return[];else return s.map((o)=>this.getOrCreateSymbol(o))}}class pp{client;snapshotId;project;snapshotRegistry;types=new Map;signatures=new Map;constructor(e,t,r,i){this.client=e,this.snapshotId=t,this.project=r,this.snapshotRegistry=i}getOrCreateSymbol(e){return this.snapshotRegistry.getOrCreateSymbol(e)}getSymbol(e){return this.snapshotRegistry.getSymbol(e)}getOrCreateType(e){let t=this.types.get(e.id);if(!t)t=new Tp(e,this),this.types.set(e.id,t);return t}getType(e){return this.types.get(e)}getOrCreateSignature(e){let t=this.signatures.get(e.id);if(!t)t=new yp(e,this.project,this),this.signatures.set(e.id,t);return t}getSignature(e){return this.signatures.get(e)}clear(){this.types.clear(),this.signatures.clear()}async fetchType(e,t,r){if(r!==!1){if(!r)return;let s=this.getType(r);if(s)return s}let i=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:this.project.id,objectId:e.id});if(!i)throw Error(`${t} returned null type for ${e.constructor.name} ${e.id}`);return this.getOrCreateType(i)}async fetchSymbol(e,t,r){return this.snapshotRegistry.fetchSymbol(e,t,r,this.project.id)}async fetchSignature(e,t,r){if(!r)return;let i=this.getSignature(r);if(i)return i;let s=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:this.project.id,objectId:e.id});if(!s)throw Error(`${t} returned null signature for ${e.constructor.name} ${e.id}`);return this.getOrCreateSignature(s)}async fetchTypes(e,t,r){if(r){let s=Array(r.length),o=!0;for(let u=0;u<r.length;u++){let f=this.getType(r[u]);if(!f){o=!1;break}s[u]=f}if(o)return s}let i=await this.client.apiRequest(t,{snapshot:this.snapshotId,project:this.project.id,objectId:e.id});if(i==null)return[];else return i.map((s)=>this.getOrCreateType(s))}async fetchSymbols(e,t,r){return this.snapshotRegistry.fetchSymbols(e,t,r,this.project.id)}async fetchBaseTypes(e){let t=await this.client.apiRequest("getBaseTypes",{snapshot:this.snapshotId,project:this.project.id,type:e.id});if(t==null)return[];return t.map((r)=>this.getOrCreateType(r))}}class lp{id;configFileName;compilerOptions;rootFiles;program;checker;emitter;client;constructor(e,t,r,i,s,o){this.id=e.id,this.configFileName=e.configFileName,this.compilerOptions=e.compilerOptions,this.rootFiles=e.rootFiles,this.client=r,this.program=new fp(t,this,r,i,s);let u=new pp(r,t,this,o);this.checker=new mp(t,this,r,u),this.emitter=new hp(r)}dispose(){this.checker.dispose()}}class fp{snapshotId;project;client;sourceFileCache;toPath;decoder=new Ze;sourceFileMetadataCache=new Map;constructor(e,t,r,i,s){this.snapshotId=e,this.project=t,this.client=r,this.sourceFileCache=i,this.toPath=s}getCompilerOptions(){return this.project.compilerOptions}async getSourceFile(e){let t=fn(e),r=this.toPath(t),i=this.sourceFileCache.getRetained(r,this.snapshotId,this.project.id);if(i)return i;let s=await this.client.apiRequestBinary("getSourceFile",{snapshot:this.snapshotId,project:this.project.id,file:e});if(!s)return;let o=new DataView(s.buffer,s.byteOffset,s.byteLength),u=nn(o),f=sn(o),E=new dr(s,this.decoder,this.client.getTimingCollector());return this.sourceFileCache.set(r,E,f,u,this.snapshotId,this.project.id)}async getSourceFileNames(){return await this.client.apiRequest("getSourceFileNames",{snapshot:this.snapshotId,project:this.project.id})??[]}getSourceFileMetadata(e){return this.getSourceFileMetadataByPath(this.toPath(e))}getSourceFileMetadataByPath(e){let t=this.sourceFileMetadataCache.get(e);if(t===void 0)t=this.fetchSourceFileMetadata(e),this.sourceFileMetadataCache.set(e,t);return t}async fetchSourceFileMetadata(e){return await this.client.apiRequest("getSourceFileMetadata",{snapshot:this.snapshotId,project:this.project.id,file:e})??void 0}async isSourceFileFromExternalLibrary(e){return(await this.getSourceFileMetadataByPath(e.path))?.isFromExternalLibrary??!1}async isSourceFileDefaultLibrary(e){return(await this.getSourceFileMetadataByPath(e.path))?.isDefaultLibrary??!1}async getSyntacticDiagnostics(e){return await this.client.apiRequest("getSyntacticDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getBindDiagnostics(e){return await this.client.apiRequest("getBindDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getSemanticDiagnostics(e){return await this.client.apiRequest("getSemanticDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getSuggestionDiagnostics(e){return await this.client.apiRequest("getSuggestionDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getDeclarationDiagnostics(e){return await this.client.apiRequest("getDeclarationDiagnostics",{snapshot:this.snapshotId,project:this.project.id,...e!==void 0?{file:e}:{}})??[]}async getProgramDiagnostics(){return await this.client.apiRequest("getProgramDiagnostics",{snapshot:this.snapshotId,project:this.project.id})??[]}async getGlobalDiagnostics(){return await this.client.apiRequest("getGlobalDiagnostics",{snapshot:this.snapshotId,project:this.project.id})??[]}async getConfigFileParsingDiagnostics(){return await this.client.apiRequest("getConfigFileParsingDiagnostics",{snapshot:this.snapshotId,project:this.project.id})??[]}}class mp{snapshotId;project;client;objectRegistry;wellKnownSymbols;constructor(e,t,r,i){this.snapshotId=e,this.project=t,this.client=r,this.objectRegistry=i}dispose(){this.objectRegistry.clear()}async getSymbolAtLocation(e){if(Array.isArray(e))return(await this.client.apiRequest("getSymbolsAtLocations",{snapshot:this.snapshotId,project:this.project.id,locations:e.map((i)=>X(i))})).map((i)=>i?this.objectRegistry.getOrCreateSymbol(i):void 0);let t=await this.client.apiRequest("getSymbolAtLocation",{snapshot:this.snapshotId,project:this.project.id,location:X(e)});return t?this.objectRegistry.getOrCreateSymbol(t):void 0}async getSymbolAtPosition(e,t){if(typeof t==="number"){let i=await this.client.apiRequest("getSymbolAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:e,position:t});return i?this.objectRegistry.getOrCreateSymbol(i):void 0}return(await this.client.apiRequest("getSymbolsAtPositions",{snapshot:this.snapshotId,project:this.project.id,file:e,positions:t})).map((i)=>i?this.objectRegistry.getOrCreateSymbol(i):void 0)}async getTypeOfSymbol(e){if(Array.isArray(e))return(await this.client.apiRequest("getTypesOfSymbols",{snapshot:this.snapshotId,project:this.project.id,symbols:e.map((i)=>i.id)})).map((i)=>i?this.objectRegistry.getOrCreateType(i):void 0);let t=await this.client.apiRequest("getTypeOfSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getDeclaredTypeOfSymbol(e){let t=await this.client.apiRequest("getDeclaredTypeOfSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});if(!t)throw Error(`getDeclaredTypeOfSymbol returned no type for symbol ${e.id}`);return this.objectRegistry.getOrCreateType(t)}async getReferencesToSymbolInFile(e,t){return(await this.client.apiRequest("getReferencesToSymbolInFile",{snapshot:this.snapshotId,project:this.project.id,file:e,symbol:t.id})??[]).map((i)=>new be(i,this.project))}async getReferencedSymbolsForNode(e,t){return(await this.client.apiRequest("getReferencedSymbolsForNode",{snapshot:this.snapshotId,project:this.project.id,node:X(e),position:t})??[]).map((i)=>({definition:new be(i.definition,this.project),symbol:i.symbol?this.objectRegistry.getOrCreateSymbol(i.symbol):void 0,references:(i.references??[]).map((s)=>new be(s,this.project))}))}async getSignatureUsage(e){return(await this.client.apiRequest("getSignatureUsages",{snapshot:this.snapshotId,project:this.project.id,signatureDecl:X(e)})??[]).map((r)=>({name:new be(r.name,this.project),call:r.call?new be(r.call,this.project):void 0}))}async getCompletionsAtPosition(e,t,r){let i=await this.client.apiRequest("getCompletionsAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:e,position:t,triggerCharacter:r?.triggerCharacter,includeSymbol:r?.includeSymbol});if(!i)return;return{isIncomplete:i.isIncomplete,entries:i.entries.map((s)=>({...s,symbol:s.symbol?this.objectRegistry.getOrCreateSymbol(s.symbol):void 0}))}}async getTypeAtLocation(e){if(Array.isArray(e))return(await this.client.apiRequest("getTypeAtLocations",{snapshot:this.snapshotId,project:this.project.id,locations:e.map((i)=>X(i))})).map((i)=>i?this.objectRegistry.getOrCreateType(i):void 0);let t=await this.client.apiRequest("getTypeAtLocation",{snapshot:this.snapshotId,project:this.project.id,location:X(e)});return t?this.objectRegistry.getOrCreateType(t):void 0}async getSignaturesOfType(e,t){return(await this.client.apiRequest("getSignaturesOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id,kind:t})).map((i)=>this.objectRegistry.getOrCreateSignature(i))}async getResolvedSignature(e){let t=await this.client.apiRequest("getResolvedSignature",{snapshot:this.snapshotId,project:this.project.id,location:X(e)});return t?this.objectRegistry.getOrCreateSignature(t):void 0}async getTypeAtPosition(e,t){if(typeof t==="number"){let i=await this.client.apiRequest("getTypeAtPosition",{snapshot:this.snapshotId,project:this.project.id,file:e,position:t});return i?this.objectRegistry.getOrCreateType(i):void 0}return(await this.client.apiRequest("getTypesAtPositions",{snapshot:this.snapshotId,project:this.project.id,file:e,positions:t})).map((i)=>i?this.objectRegistry.getOrCreateType(i):void 0)}async resolveName(e,t,r,i){let s=r&&"kind"in r,o=await this.client.apiRequest("resolveName",{snapshot:this.snapshotId,project:this.project.id,name:e,meaning:t,location:s?X(r):void 0,file:!s&&r?r.document:void 0,position:!s&&r?r.position:void 0,excludeGlobals:i});return o?this.objectRegistry.getOrCreateSymbol(o):void 0}async getResolvedSymbol(e){let t=e.text;if(!t)return;return this.resolveName(t,It.Value|It.ExportValue,e)}async getContextualType(e){let t=await this.client.apiRequest("getContextualType",{snapshot:this.snapshotId,project:this.project.id,location:X(e)});return t?this.objectRegistry.getOrCreateType(t):void 0}async getBaseTypeOfLiteralType(e){let t=await this.client.apiRequest("getBaseTypeOfLiteralType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getNonNullableType(e){let t=await this.client.apiRequest("getNonNullableType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getTypeFromTypeNode(e){let t=await this.client.apiRequest("getTypeFromTypeNode",{snapshot:this.snapshotId,project:this.project.id,location:X(e)});return t?this.objectRegistry.getOrCreateType(t):void 0}async getWidenedType(e){let t=await this.client.apiRequest("getWidenedType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getParameterType(e,t){let r=await this.client.apiRequest("getParameterType",{snapshot:this.snapshotId,project:this.project.id,signature:e.id,index:t});return r?this.objectRegistry.getOrCreateType(r):void 0}async isArrayLikeType(e){return this.client.apiRequest("isArrayLikeType",{snapshot:this.snapshotId,project:this.project.id,type:e.id})}async isTypeAssignableTo(e,t){return this.client.apiRequest("isTypeAssignableTo",{snapshot:this.snapshotId,project:this.project.id,source:e.id,target:t.id})}async getShorthandAssignmentValueSymbol(e){let t=await this.client.apiRequest("getShorthandAssignmentValueSymbol",{snapshot:this.snapshotId,project:this.project.id,location:X(e)});return t?this.objectRegistry.getOrCreateSymbol(t):void 0}async getTypeOfSymbolAtLocation(e,t){let r=await this.client.apiRequest("getTypeOfSymbolAtLocation",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id,location:X(t)});if(!r)throw Error(`getTypeOfSymbolAtLocation returned no type for symbol ${e.id}`);return this.objectRegistry.getOrCreateType(r)}async getIntrinsicType(e){let t=await this.client.apiRequest(e,{snapshot:this.snapshotId,project:this.project.id});return this.objectRegistry.getOrCreateType(t)}async getAnyType(){return this.getIntrinsicType("getAnyType")}async getStringType(){return this.getIntrinsicType("getStringType")}async getNumberType(){return this.getIntrinsicType("getNumberType")}async getBooleanType(){return this.getIntrinsicType("getBooleanType")}async getVoidType(){return this.getIntrinsicType("getVoidType")}async getUndefinedType(){return this.getIntrinsicType("getUndefinedType")}async getNullType(){return this.getIntrinsicType("getNullType")}async getNeverType(){return this.getIntrinsicType("getNeverType")}async getUnknownType(){return this.getIntrinsicType("getUnknownType")}async getBigIntType(){return this.getIntrinsicType("getBigIntType")}async getESSymbolType(){return this.getIntrinsicType("getESSymbolType")}async typeToTypeNode(e,t,r){let i=await this.client.apiRequestBinary("typeToTypeNode",{snapshot:this.snapshotId,project:this.project.id,type:e.id,location:t?X(t):void 0,flags:r});if(!i)return;return an(i)}async signatureToSignatureDeclaration(e,t,r,i){let s=await this.client.apiRequestBinary("signatureToSignatureDeclaration",{snapshot:this.snapshotId,project:this.project.id,signature:e.id,kind:t,location:r?X(r):void 0,flags:i});if(!s)return;return an(s)}async typeToString(e,t,r){return this.client.apiRequest("typeToString",{snapshot:this.snapshotId,project:this.project.id,type:e.id,location:t?X(t):void 0,flags:r})}async isContextSensitive(e){return this.client.apiRequest("isContextSensitive",{snapshot:this.snapshotId,project:this.project.id,location:X(e)})}async isArrayType(e){return this.client.apiRequest("isArrayType",{snapshot:this.snapshotId,project:this.project.id,type:e.id})}async isTupleType(e){return this.client.apiRequest("isTupleType",{snapshot:this.snapshotId,project:this.project.id,type:e.id})}async getReturnTypeOfSignature(e){let t=await this.client.apiRequest("getReturnTypeOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getRestTypeOfSignature(e){let t=await this.client.apiRequest("getRestTypeOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getTypePredicateOfSignature(e){let t=await this.client.apiRequest("getTypePredicateOfSignature",{snapshot:this.snapshotId,project:this.project.id,signature:e.id});if(!t)return;return{kind:t.kind,parameterIndex:t.parameterIndex,parameterName:t.parameterName,type:t.type?this.objectRegistry.getOrCreateType(t.type):void 0}}async getBaseTypes(e){let t=await this.client.apiRequest("getBaseTypes",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?t.map((r)=>this.objectRegistry.getOrCreateType(r)):[]}async getApparentType(e){let t=await this.client.apiRequest("getApparentType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getPropertiesOfType(e){let t=await this.client.apiRequest("getPropertiesOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?t.map((r)=>this.objectRegistry.getOrCreateSymbol(r)):[]}async getIndexInfosOfType(e){let t=await this.client.apiRequest("getIndexInfosOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});if(!t)return[];return t.map((r)=>({keyType:this.objectRegistry.getOrCreateType(r.keyType),valueType:this.objectRegistry.getOrCreateType(r.valueType),isReadonly:r.isReadonly??!1,declaration:r.declaration?new be(r.declaration,this.project):void 0}))}async getConstraintOfTypeParameter(e){let t=await this.client.apiRequest("getConstraintOfTypeParameter",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getBaseConstraintOfType(e){let t=await this.client.apiRequest("getBaseConstraintOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?this.objectRegistry.getOrCreateType(t):void 0}async getPropertyOfType(e,t){let r=await this.client.apiRequest("getPropertyOfType",{snapshot:this.snapshotId,project:this.project.id,type:e.id,name:t});return r?this.objectRegistry.getOrCreateSymbol(r):void 0}async getConstantValue(e){return await this.client.apiRequest("getConstantValue",{snapshot:this.snapshotId,project:this.project.id,location:X(e)})??void 0}async getSignatureFromDeclaration(e){let t=await this.client.apiRequest("getSignatureFromDeclaration",{snapshot:this.snapshotId,project:this.project.id,location:X(e)});return t?this.objectRegistry.getOrCreateSignature(t):void 0}async getExportSpecifierLocalTargetSymbol(e){let t=await this.client.apiRequest("getExportSpecifierLocalTargetSymbol",{snapshot:this.snapshotId,project:this.project.id,location:X(e)});return t?this.objectRegistry.getOrCreateSymbol(t):void 0}async getAliasedSymbol(e){let t=await this.client.apiRequest("getAliasedSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});if(!t)throw Error(`getAliasedSymbol returned no symbol for symbol ${e.id}`);return this.objectRegistry.getOrCreateSymbol(t)}async getImmediateAliasedSymbol(e){let t=await this.client.apiRequest("getImmediateAliasedSymbol",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});return t?this.objectRegistry.getOrCreateSymbol(t):void 0}getWellKnownSymbols(){return this.wellKnownSymbols??=this.client.apiRequest("getWellKnownSymbols",{snapshot:this.snapshotId,project:this.project.id})}async isUnknownSymbol(e){return e.id===(await this.getWellKnownSymbols()).unknown}async isUndefinedSymbol(e){return e.id===(await this.getWellKnownSymbols()).undefined}async isArgumentsSymbol(e){return e.id===(await this.getWellKnownSymbols()).arguments}async getExportsOfModule(e){let t=await this.client.apiRequest("getExportsOfModule",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id});return t?t.map((r)=>this.objectRegistry.getOrCreateSymbol(r)):[]}async getMemberInModuleExports(e,t){let r=await this.client.apiRequest("getMemberInModuleExports",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id,name:t});return r?this.objectRegistry.getOrCreateSymbol(r):void 0}async getJsDocTagsOfSymbol(e){return await this.client.apiRequest("getJsDocTags",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id})??[]}async getDocumentationCommentOfSymbol(e){return this.client.apiRequest("getDocumentationComment",{snapshot:this.snapshotId,project:this.project.id,symbol:e.id})}async getTypeArguments(e){let t=await this.client.apiRequest("getTypeArguments",{snapshot:this.snapshotId,project:this.project.id,type:e.id});return t?t.map((r)=>this.objectRegistry.getOrCreateType(r)):[]}}class hp{client;constructor(e){this.client=e}async printNode(e,t={}){let r=pc(e),i=lc(r);return this.client.apiRequest("printNode",{data:i,...t})}}class be{canonicalProject;index;kind;path;constructor(e,t){let r=gc(e);this.index=r.index,this.kind=r.kind,this.path=r.path,this.canonicalProject=t}async resolve(e=this.canonicalProject){let t=await e.program.getSourceFile(this.path);if(!t)return;return t.getOrCreateNodeAtIndex(this.index)}}class dp{objectRegistry;canonicalProject;id;escapedName;name;flags;checkFlags;declarations;valueDeclaration;parent;exportSymbol;membersCache;exportsCache;constructor(e,t){this.objectRegistry=t,this.id=e.id,this.escapedName=e.name,this.name=ri(e.name),this.flags=e.flags,this.checkFlags=e.checkFlags;let r=t.getProject(e.project);if(!r)throw Error(`Symbol ${e.id} references unknown canonical project '${e.project}'`);if(this.canonicalProject=r,this.declarations=(e.declarations??[]).map((i)=>new be(i,r)),this.valueDeclaration=e.valueDeclaration?new be(e.valueDeclaration,r):void 0,e.parent!==void 0)this.parent=e.parent;if(e.exportSymbol!==void 0)this.exportSymbol=e.exportSymbol}async getParent(){return this.objectRegistry.fetchSymbol(this,"getParentOfSymbol",this.parent,this.canonicalProject.id)}getMembers(){return this.membersCache??=this.fetchSymbolTable("getMembersOfSymbol")}getExports(){return this.exportsCache??=this.fetchSymbolTable("getExportsOfSymbol")}async fetchSymbolTable(e){let t=await this.objectRegistry.fetchSymbols(this,e,void 0,this.canonicalProject.id),r=new Map;for(let i of t)r.set(i.escapedName,i);return r}async getExportSymbol(){if(!this.exportSymbol)return this;return this.objectRegistry.fetchSymbol(this,"getExportSymbolOfSymbol",this.exportSymbol,this.canonicalProject.id)}async getJsDocTags(e){return e.getJsDocTagsOfSymbol(this)}async getDocumentationComment(e){return e.getDocumentationCommentOfSymbol(this)}}class Tp{objectRegistry;id;flags;objectFlags;symbol;value;intrinsicName;isThisType;freshType;regularType;target;typeParameters;outerTypeParameters;localTypeParameters;aliasTypeArguments;aliasSymbol;elementFlags;fixedLength;readonly;texts;objectType;indexType;checkType;extendsType;baseType;substConstraint;trueType;falseType;constructor(e,t){if(this.objectRegistry=t,this.id=e.id,this.flags=e.flags,e.objectFlags!==void 0)this.objectFlags=e.objectFlags;if(e.symbol!==void 0)this.symbol=e.symbol;if(e.value!=null)this.value=e.flags&Q.BigIntLiteral?BigInt(e.value):e.value;if(e.intrinsicName!==void 0)this.intrinsicName=e.intrinsicName;if(e.isThisType!==void 0)this.isThisType=e.isThisType;if(e.freshType!==void 0)this.freshType=e.freshType;if(e.regularType!==void 0)this.regularType=e.regularType;if(e.target!==void 0)this.target=e.target;if(this.typeParameters=e.typeParameters??[],this.outerTypeParameters=e.outerTypeParameters??[],this.localTypeParameters=e.localTypeParameters??[],this.aliasTypeArguments=e.aliasTypeArguments??[],e.aliasSymbol!==void 0)this.aliasSymbol=e.aliasSymbol;if(e.elementFlags!==void 0)this.elementFlags=e.elementFlags;if(e.fixedLength!==void 0)this.fixedLength=e.fixedLength;if(e.readonly!==void 0)this.readonly=e.readonly;if(e.texts!==void 0)this.texts=e.texts;if(e.objectType!==void 0)this.objectType=e.objectType;if(e.indexType!==void 0)this.indexType=e.indexType;if(e.checkType!==void 0)this.checkType=e.checkType;if(e.extendsType!==void 0)this.extendsType=e.extendsType;if(e.baseType!==void 0)this.baseType=e.baseType;if(e.substConstraint!==void 0)this.substConstraint=e.substConstraint;this.trueType=!1,this.falseType=!1}async getSymbol(){return this.objectRegistry.fetchSymbol(this,"getSymbolOfType",this.symbol)}async getAliasSymbol(){return this.objectRegistry.fetchSymbol(this,"getAliasSymbolOfType",this.aliasSymbol)}async getTarget(){return this.objectRegistry.fetchType(this,"getTargetOfType",this.target)}async getFreshType(){return this.objectRegistry.fetchType(this,"getFreshTypeOfType",this.freshType)}async getRegularType(){return this.objectRegistry.fetchType(this,"getRegularTypeOfType",this.regularType)}async getTypes(){if(!(this.flags&(Q.UnionOrIntersection|Q.TemplateLiteral)))return;return this.objectRegistry.fetchTypes(this,"getTypesOfType")}async getTypeParameters(){return this.objectRegistry.fetchTypes(this,"getTypeParametersOfType",this.typeParameters)}async getOuterTypeParameters(){return this.objectRegistry.fetchTypes(this,"getOuterTypeParametersOfType",this.outerTypeParameters)}async getLocalTypeParameters(){return this.objectRegistry.fetchTypes(this,"getLocalTypeParametersOfType",this.localTypeParameters)}async getAliasTypeArguments(){return this.objectRegistry.fetchTypes(this,"getAliasTypeArgumentsOfType",this.aliasTypeArguments)}async getObjectType(){return this.objectRegistry.fetchType(this,"getObjectTypeOfType",this.objectType)}async getIndexType(){return this.objectRegistry.fetchType(this,"getIndexTypeOfType",this.indexType)}async getCheckType(){return this.objectRegistry.fetchType(this,"getCheckTypeOfType",this.checkType)}async getExtendsType(){return this.objectRegistry.fetchType(this,"getExtendsTypeOfType",this.extendsType)}async getBaseType(){return this.objectRegistry.fetchType(this,"getBaseTypeOfType",this.baseType)}async getConstraint(){return this.objectRegistry.fetchType(this,"getConstraintOfType",this.substConstraint)}async getTrueType(){let e=await this.objectRegistry.fetchType(this,"getTrueTypeOfConditionalType",this.trueType);return this.trueType=e.id,e}async getFalseType(){let e=await this.objectRegistry.fetchType(this,"getFalseTypeOfConditionalType",this.falseType);return this.falseType=e.id,e}async getBaseTypes(){if(!this.isClassOrInterface())return;return this.objectRegistry.fetchBaseTypes(this)}isClassOrInterface(){return IT(this)}isUnionType(){return AT(this)}isIntersectionType(){return bT(this)}isObjectType(){return Jr(this)}isIntrinsicType(){return gp(this)}isErrorType(){return CT(this)}isLiteralType(){return NT(this)}isStringLiteralType(){return LT(this)}isNumberLiteralType(){return JT(this)}isBigIntLiteralType(){return RT(this)}isBooleanLiteralType(){return OT(this)}isTypeReference(){return vT(this)}isTupleType(){return MT(this)}isIndexType(){return qT(this)}isIndexedAccessType(){return BT(this)}isConditionalType(){return UT(this)}isSubstitutionType(){return jT(this)}isTemplateLiteralType(){return VT(this)}isStringMappingType(){return WT(this)}isTypeParameter(){return zT(this)}}function AT(e){return(e.flags&Q.Union)!==0}function bT(e){return(e.flags&Q.Intersection)!==0}function Jr(e){return(e.flags&Q.Object)!==0}function IT(e){return Jr(e)&&(e.objectFlags&ot.ClassOrInterface)!==0}function gp(e){return(e.flags&Q.Intrinsic)!==0}function CT(e){return gp(e)&&e.intrinsicName==="error"}function NT(e){return(e.flags&Q.Literal)!==0}function LT(e){return(e.flags&Q.StringLiteral)!==0}function JT(e){return(e.flags&Q.NumberLiteral)!==0}function RT(e){return(e.flags&Q.BigIntLiteral)!==0}function OT(e){return(e.flags&Q.BooleanLiteral)!==0}function vT(e){return Jr(e)&&(e.objectFlags&ot.Reference)!==0}function MT(e){return Jr(e)&&(e.objectFlags&ot.Tuple)!==0}function qT(e){return(e.flags&Q.Index)!==0}function BT(e){return(e.flags&Q.IndexedAccess)!==0}function UT(e){return(e.flags&Q.Conditional)!==0}function jT(e){return(e.flags&Q.Substitution)!==0}function VT(e){return(e.flags&Q.TemplateLiteral)!==0}function WT(e){return(e.flags&Q.StringMapping)!==0}function zT(e){return(e.flags&Q.TypeParameter)!==0}class yp{flags;objectRegistry;id;declaration;typeParameters;parameters;thisParameter;target;constructor(e,t,r){this.id=e.id,this.flags=e.flags,this.objectRegistry=r,this.declaration=e.declaration?new be(e.declaration,t):void 0,this.typeParameters=e.typeParameters??[],this.parameters=e.parameters??[],this.thisParameter=e.thisParameter,this.target=e.target}async getTypeParameters(){return this.objectRegistry.fetchTypes(this,"getTypeParametersOfSignature",this.typeParameters)}async getParameters(){return this.objectRegistry.fetchSymbols(this,"getParametersOfSignature",this.parameters)}async getThisParameter(){return this.objectRegistry.fetchSymbol(this,"getThisParameterOfSignature",this.thisParameter)}async getTarget(){return this.objectRegistry.fetchSignature(this,"getTargetOfSignature",this.target)}get hasRestParameter(){return(this.flags&at.HasRestParameter)!==0}get isConstruct(){return(this.flags&at.Construct)!==0}get isAbstract(){return(this.flags&at.Abstract)!==0}}export{op as API,mp as Checker,qr as CompletionItemKind,Br as DiagnosticCategory,Ur as ElementFlags,hp as Emitter,ap as InternalAPI,j as ModifierFlags,jr as ModuleKind,Vr as NodeBuilderFlags,be as NodeHandle,ot as ObjectFlags,fp as Program,lp as Project,yp as Signature,at as SignatureFlags,Wr as SignatureKind,cp as Snapshot,dp as Symbol,It as SymbolFlags,Q as TypeFlags,zr as TypePredicateKind,ln as documentURIToFileName,Ic as fileNameToDocumentURI,RT as isBigIntLiteralType,OT as isBooleanLiteralType,IT as isClassOrInterfaceType,UT as isConditionalType,CT as isErrorType,qT as isIndexType,BT as isIndexedAccessType,bT as isIntersectionType,gp as isIntrinsicType,NT as isLiteralType,JT as isNumberLiteralType,Jr as isObjectType,LT as isStringLiteralType,WT as isStringMappingType,jT as isSubstitutionType,VT as isTemplateLiteralType,MT as isTupleType,zT as isTypeParameter,vT as isTypeReference,AT as isUnionType};