UNPKG

code-server

Version:

Run VS Code on a remote server.

568 lines • 135 kB
"use strict";var Zt=Object.defineProperty;var Qt=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},zt=(e,t)=>{for(var r in t)Zt(e,r,{get:t[r],enumerable:!0})};var Le=Qt((exports,module)=>{var Module=typeof Module<"u"?Module:{},ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",TreeSitter=(function(){var initPromise,document=typeof window=="object"?{currentScript:window.document.currentScript}:null;class Parser{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(moduleOptions){return initPromise||(Module=Object.assign({},Module,moduleOptions),initPromise=new Promise(resolveInitPromise=>{var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs"),nodePath=require("path");scriptDirectory=__dirname+"/",readBinary=e=>{e=isFileURI(e)?new URL(e):nodePath.normalize(e);var t=fs.readFileSync(e);return t},readAsync=(e,t=!0)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),new Promise((r,n)=>{fs.readFile(e,t?void 0:"utf8",(s,o)=>{s?n(s):r(t?o.buffer:o)})})),!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),quit_=(e,t)=>{throw process.exitCode=e,t}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:typeof document<"u"&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory.startsWith("blob:")?scriptDirectory="":scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=e=>isFileURI(e)?new Promise((t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{(n.status==200||n.status==0&&n.response)&&r(n.response),t(n.status)},n.onerror=t,n.send(null)}):fetch(e,{credentials:"same-origin"}).then(t=>t.ok?t.arrayBuffer():Promise.reject(new Error(t.status+" : "+t.url))));var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary;Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var wasmMemory,ABORT=!1,EXITSTATUS,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,HEAP_DATA_VIEW;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP_DATA_VIEW=HEAP_DATA_VIEW=new DataView(e),Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var INITIAL_MEMORY=Module.INITIAL_MEMORY||33554432;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:2147483648/65536})}updateMemoryViews();var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies?.(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies?.(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var t=dependenciesFulfilled;dependenciesFulfilled=null,t()}}function abort(e){Module.onAbort?.(e),e="Aborted("+e+")",err(e),ABORT=!0,EXITSTATUS=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw t}var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=e=>e.startsWith(dataURIPrefix),isFileURI=e=>e.startsWith("file://");function findWasmBinary(){var e="tree-sitter.wasm";return isDataURI(e)?e:locateFile(e)}var wasmBinaryFile;function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(e){return wasmBinary?Promise.resolve().then(()=>getBinarySync(e)):readAsync(e).then(t=>new Uint8Array(t),()=>getBinarySync(e))}function instantiateArrayBuffer(e,t,r){return getBinaryPromise(e).then(n=>WebAssembly.instantiate(n,t)).then(r,n=>{err(`failed to asynchronously prepare wasm: ${n}`),abort(n)})}function instantiateAsync(e,t,r,n){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(t)&&!isFileURI(t)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var o=WebAssembly.instantiateStreaming(s,r);return o.then(n,function(_){return err(`wasm streaming compile failed: ${_}`),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(t,r,n)})}):instantiateArrayBuffer(t,r,n)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}function createWasm(){var e=getWasmImports();function t(n,s){wasmExports=n.exports,wasmExports=relocateExports(wasmExports,1024);var o=getDylinkMetadata(s);return o.neededDynlibs&&(dynamicLibraries=o.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency("wasm-instantiate"),wasmExports}addRunDependency("wasm-instantiate");function r(n){t(n.instance,n.module)}if(Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(n){return err(`Module.instantiateWasm callback failed with error: ${n}`),!1}return wasmBinaryFile||(wasmBinaryFile=findWasmBinary()),instantiateAsync(wasmBinary,wasmBinaryFile,e,r),{}}var ASM_CONSTS={};function ExitStatus(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(r.required=!0),r}},LE_HEAP_LOAD_F32=e=>HEAP_DATA_VIEW.getFloat32(e,!0),LE_HEAP_LOAD_F64=e=>HEAP_DATA_VIEW.getFloat64(e,!0),LE_HEAP_LOAD_I16=e=>HEAP_DATA_VIEW.getInt16(e,!0),LE_HEAP_LOAD_I32=e=>HEAP_DATA_VIEW.getInt32(e,!0),LE_HEAP_LOAD_U32=e=>HEAP_DATA_VIEW.getUint32(e,!0),LE_HEAP_STORE_F32=(e,t)=>HEAP_DATA_VIEW.setFloat32(e,t,!0),LE_HEAP_STORE_F64=(e,t)=>HEAP_DATA_VIEW.setFloat64(e,t,!0),LE_HEAP_STORE_I16=(e,t)=>HEAP_DATA_VIEW.setInt16(e,t,!0),LE_HEAP_STORE_I32=(e,t)=>HEAP_DATA_VIEW.setInt32(e,t,!0),LE_HEAP_STORE_U32=(e,t)=>HEAP_DATA_VIEW.setUint32(e,t,!0),callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,UTF8ArrayToString=(e,t,r)=>{for(var n=t+r,s=t;e[s]&&!(s>=n);)++s;if(s-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,s));for(var o="";t<s;){var _=e[t++];if(!(_&128)){o+=String.fromCharCode(_);continue}var a=e[t++]&63;if((_&224)==192){o+=String.fromCharCode((_&31)<<6|a);continue}var l=e[t++]&63;if((_&240)==224?_=(_&15)<<12|a<<6|l:_=(_&7)<<18|a<<12|l<<6|e[t++]&63,_<65536)o+=String.fromCharCode(_);else{var d=_-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},getDylinkMetadata=e=>{var t=0,r=0;function n(){return e[t++]}function s(){for(var Q=0,v=1;;){var O=e[t++];if(Q+=(O&127)*v,v*=128,!(O&128))break}return Q}function o(){var Q=s();return t+=Q,UTF8ArrayToString(e,t-Q,Q)}function _(Q,v){if(Q)throw new Error(v)}var a="dylink.0";if(e instanceof WebAssembly.Module){var l=WebAssembly.Module.customSections(e,a);l.length===0&&(a="dylink",l=WebAssembly.Module.customSections(e,a)),_(l.length===0,"need dylink section"),e=new Uint8Array(l[0]),r=e.length}else{var d=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),u=d[0]==1836278016||d[0]==6386541;_(!u,"need to see wasm magic number"),_(e[8]!==0,"need the dylink section to be first"),t=9;var c=s();r=t+c,a=o()}var m={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(a=="dylink"){m.memorySize=s(),m.memoryAlign=s(),m.tableSize=s(),m.tableAlign=s();for(var y=s(),w=0;w<y;++w){var p=o();m.neededDynlibs.push(p)}}else{_(a!=="dylink.0");for(var b=1,T=2,f=3,g=4,E=256,j=3,ve=1;t<r;){var A=n(),$=s();if(A===b)m.memorySize=s(),m.memoryAlign=s(),m.tableSize=s(),m.tableAlign=s();else if(A===T)for(var y=s(),w=0;w<y;++w)p=o(),m.neededDynlibs.push(p);else if(A===f)for(var Y=s();Y--;){var Z=o(),le=s();le&E&&m.tlsExports.add(Z)}else if(A===g)for(var Y=s();Y--;){var Se=o(),Z=o(),le=s();(le&j)==ve&&m.weakImports.add(Z)}else t+=$}}return m};function getValue(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":return HEAP8[e];case"i8":return HEAP8[e];case"i16":return LE_HEAP_LOAD_I16((e>>1)*2);case"i32":return LE_HEAP_LOAD_I32((e>>2)*4);case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return LE_HEAP_LOAD_F32((e>>2)*4);case"double":return LE_HEAP_LOAD_F64((e>>3)*8);case"*":return LE_HEAP_LOAD_U32((e>>2)*4);default:abort(`invalid type for getValue: ${t}`)}}var newDSO=(e,t,r)=>{var n={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=n,t!=null&&(LDSO.loadedLibsByHandle[t]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=78112,zeroMemory=(e,t)=>(HEAPU8.fill(0,e,e+t),e),alignMemory=(e,t)=>Math.ceil(e/t)*t,getMemory=e=>{if(runtimeInitialized)return zeroMemory(_malloc(e),e);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},isInternalSym=e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128Encode=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},sigToWasmTypes=e=>{for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:e[0]=="v"?[]:[t[e[0]]]},n=1;n<e.length;++n)r.parameters.push(t[e[n]]);return r},generateFuncType=(e,t)=>{var r=e.slice(0,1),n=e.slice(1),s={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),uleb128Encode(n.length,t);for(var o=0;o<n.length;++o)t.push(s[n[o]]);r=="v"?t.push(0):t.push(1,s[r])},convertJsFunctionToWasm=(e,t)=>{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(t),e);var r=[1];generateFuncType(t,r);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(r.length,n),n.push(...r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var s=new WebAssembly.Module(new Uint8Array(n)),o=new WebAssembly.Instance(s,{e:{f:e}}),_=o.exports.f;return _},wasmTableMirror=[],wasmTable=new WebAssembly.Table({initial:28,element:"anyfunc"}),getWasmTableEntry=e=>{var t=wasmTableMirror[e];return t||(e>=wasmTableMirror.length&&(wasmTableMirror.length=e+1),wasmTableMirror[e]=t=wasmTable.get(e)),t},updateTableMap=(e,t)=>{if(functionsInTableMap)for(var r=e;r<e+t;r++){var n=getWasmTableEntry(r);n&&functionsInTableMap.set(n,r)}},functionsInTableMap,getFunctionAddress=e=>(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return wasmTable.length-1},setWasmTableEntry=(e,t)=>{wasmTable.set(e,t),wasmTableMirror[e]=wasmTable.get(e)},addFunction=(e,t)=>{var r=getFunctionAddress(e);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(o){if(!(o instanceof TypeError))throw o;var s=convertJsFunctionToWasm(e,t);setWasmTableEntry(n,s)}return functionsInTableMap.set(e,n),n},updateGOT=(e,t)=>{for(var r in e)if(!isInternalSym(r)){var n=e[r];r.startsWith("orig$")&&(r=r.split("$")[1],t=!0),GOT[r]||=new WebAssembly.Global({value:"i32",mutable:!0}),(t||GOT[r].value==0)&&(typeof n=="function"?GOT[r].value=addFunction(n):typeof n=="number"?GOT[r].value=n:err(`unhandled export type for '${r}': ${typeof n}`))}},relocateExports=(e,t,r)=>{var n={};for(var s in e){var o=e[s];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=t),n[s]=o}return updateGOT(n,r),n},isSymbolDefined=e=>{var t=wasmImports[e];return!(!t||t.stub)},dynCallLegacy=(e,t,r)=>{e=e.replace(/p/g,"i");var n=Module["dynCall_"+e];return n(t,...r)},dynCall=(e,t,r=[])=>{if(e.includes("j"))return dynCallLegacy(e,t,r);var n=getWasmTableEntry(t)(...r);return n},stackSave=()=>_emscripten_stack_get_current(),stackRestore=e=>__emscripten_stack_restore(e),createInvokeFunction=e=>(t,...r)=>{var n=stackSave();try{return dynCall(e,t,r)}catch(s){if(stackRestore(n),s!==s+0)throw s;_setThrew(1,0)}},resolveGlobalSymbol=(e,t=!1)=>{var r;return t&&"orig$"+e in wasmImports&&(e="orig$"+e),isSymbolDefined(e)?r=wasmImports[e]:e.startsWith("invoke_")&&(r=wasmImports[e]=createInvokeFunction(e.split("_")[1])),{sym:r,name:e}},UTF8ToString=(e,t)=>e?UTF8ArrayToString(HEAPU8,e,t):"",loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8]=1,LE_HEAP_STORE_U32((handle+12>>2)*4,memoryBase),LE_HEAP_STORE_I32((handle+16>>2)*4,metadata.memorySize),LE_HEAP_STORE_U32((handle+20>>2)*4,tableBase),LE_HEAP_STORE_I32((handle+24>>2)*4,metadata.tableSize))}else memoryBase=LE_HEAP_LOAD_U32((handle+12>>2)*4),tableBase=LE_HEAP_LOAD_U32((handle+20>>2)*4);var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub)return wasmImports[t];if(!(t in e)){var r;e[t]=(...n)=>(r||=resolveSymbol(t),r(...n))}return e[t]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func=`(${args}) => { ${body} };`;ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start<stop;){var jsString=UTF8ToString(start);addEmAsm(start,jsString),start=HEAPU8.indexOf(0,start)+1}function addEmJs(name,cSig,body){var jsArgs=[];if(cSig=cSig.slice(1,-1),cSig!="void"){cSig=cSig.split(",");for(var i in cSig){var jsArg=cSig[i].split(" ").pop();jsArgs.push(jsArg.replace("*",""))}}var func=`(${jsArgs}) => ${body};`;moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(e=>postInstantiation(e.module,e.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return flags.loadAsync?metadata.neededDynlibs.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},mergeLibSymbols=(e,t)=>{for(var[r,n]of Object.entries(e)){let s=_=>{isSymbolDefined(_)||(wasmImports[_]=n)};s(r);let o="__main_argc_argv";r=="main"&&s(o),r==o&&s("main"),r.startsWith("dynCall_")&&!Module.hasOwnProperty(r)&&(Module[r]=n)}},asyncLoad=(e,t,r,n)=>{var s=n?"":`al ${e}`;readAsync(e).then(o=>{t(new Uint8Array(o)),s&&removeRunDependency(s)},o=>{if(r)r();else throw`Loading data file "${e}" failed.`}),s&&addRunDependency(s)};function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,n){var s=LDSO.loadedLibsByName[e];if(s)return t.global?s.global||(s.global=!0,mergeLibSymbols(s.exports,e)):r&&Object.assign(r,s.exports),t.nodelete&&s.refcount!==1/0&&(s.refcount=1/0),s.refcount++,n&&(LDSO.loadedLibsByHandle[n]=s),t.loadAsync?Promise.resolve(!0):!0;s=newDSO(e,n,"loading"),s.refcount=t.nodelete?1/0:1,s.global=t.global;function o(){if(n){var l=LE_HEAP_LOAD_U32((n+28>>2)*4),d=LE_HEAP_LOAD_U32((n+32>>2)*4);if(l&&d){var u=HEAP8.slice(l,l+d);return t.loadAsync?Promise.resolve(u):u}}var c=locateFile(e);if(t.loadAsync)return new Promise(function(m,y){asyncLoad(c,m,y)});if(!readBinary)throw new Error(`${c}: file not found, and synchronous loading of external files is not available`);return readBinary(c)}function _(){return t.loadAsync?o().then(l=>loadWebAssemblyModule(l,t,e,r,n)):loadWebAssemblyModule(o(),t,e,r,n)}function a(l){s.global?mergeLibSymbols(l,e):r&&Object.assign(r,l),s.exports=l}return t.loadAsync?_().then(l=>(a(l),!0)):(a(_()),!0)}var reportUndefinedSymbols=()=>{for(var[e,t]of Object.entries(GOT))if(t.value==0){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if(typeof r=="function")t.value=addFunction(r,r.sig);else if(typeof r=="number")t.value=r;else throw new Error(`bad export type for '${e}': ${typeof r}`)}},loadDylibs=()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs"),dynamicLibraries.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})),Promise.resolve()).then(()=>{reportUndefinedSymbols(),removeRunDependency("loadDylibs")})},noExitRuntime=Module.noExitRuntime||!0;function setValue(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":HEAP8[e]=t;break;case"i8":HEAP8[e]=t;break;case"i16":LE_HEAP_STORE_I16((e>>1)*2,t);break;case"i32":LE_HEAP_STORE_I32((e>>2)*4,t);break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":LE_HEAP_STORE_F32((e>>2)*4,t);break;case"double":LE_HEAP_STORE_F64((e>>3)*8,t);break;case"*":LE_HEAP_STORE_U32((e>>2)*4,t);break;default:abort(`invalid type for setValue: ${r}`)}}var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},78112),___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=()=>{abort("")};__abort_js.sig="v";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";var __emscripten_memcpy_js=(e,t,r)=>HEAPU8.copyWithin(e,t,t+r);__emscripten_memcpy_js.sig="vppp";var _emscripten_date_now=()=>Date.now();_emscripten_date_now.sig="d";var _emscripten_get_now;_emscripten_get_now=()=>performance.now(),_emscripten_get_now.sig="d";var getHeapMax=()=>2147483648,growMemory=e=>{var t=wasmMemory.buffer,r=(e-t.byteLength+65535)/65536;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}},_emscripten_resize_heap=e=>{var t=HEAPU8.length;e>>>=0;var r=getHeapMax();if(e>r)return!1;for(var n=(l,d)=>l+(d-l%d)%d,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var _=Math.min(r,n(Math.max(e,o),65536)),a=growMemory(_);if(a)return!0}return!1};_emscripten_resize_heap.sig="ip";var _fd_close=e=>52;_fd_close.sig="ii";var convertI32PairToI53Checked=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+t*4294967296:NaN;function _fd_seek(e,t,r,n,s){var o=convertI32PairToI53Checked(t,r);return 70}_fd_seek.sig="iiiiip";var printCharBuffers=[null,[],[]],printChar=(e,t)=>{var r=printCharBuffers[e];t===0||t===10?((e===1?out:err)(UTF8ArrayToString(r,0)),r.length=0):r.push(t)},_fd_write=(e,t,r,n)=>{for(var s=0,o=0;o<r;o++){var _=LE_HEAP_LOAD_U32((t>>2)*4),a=LE_HEAP_LOAD_U32((t+4>>2)*4);t+=8;for(var l=0;l<a;l++)printChar(e,HEAPU8[_+l]);s+=a}return LE_HEAP_STORE_U32((n>>2)*4,s),0};_fd_write.sig="iippp";function _tree_sitter_log_callback(e,t){if(currentLogCallback){let r=UTF8ToString(t);currentLogCallback(r,e!==0)}}function _tree_sitter_parse_callback(e,t,r,n,s){let _=currentParseCallback(t,{row:r,column:n});typeof _=="string"?(setValue(s,_.length,"i32"),stringToUTF16(_,e,10240)):setValue(s,0,"i32")}var runtimeKeepaliveCounter=0,keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0,_proc_exit=e=>{EXITSTATUS=e,keepRuntimeAlive()||(Module.onExit?.(e),ABORT=!0),quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,t)=>{EXITSTATUS=e,_proc_exit(e)},handleException=e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},lengthBytesUTF8=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},stringToUTF8Array=(e,t,r,n)=>{if(!(n>0))return 0;for(var s=r,o=r+n-1,_=0;_<e.length;++_){var a=e.charCodeAt(_);if(a>=55296&&a<=57343){var l=e.charCodeAt(++_);a=65536+((a&1023)<<10)|l&1023}if(a<=127){if(r>=o)break;t[r++]=a}else if(a<=2047){if(r+1>=o)break;t[r++]=192|a>>6,t[r++]=128|a&63}else if(a<=65535){if(r+2>=o)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|a&63}else{if(r+3>=o)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|a&63}}return t[r]=0,r-s},stringToUTF8=(e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r),stackAlloc=e=>__emscripten_stack_alloc(e),stringToUTF8OnStack=e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},stringToUTF16=(e,t,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var n=t,s=r<e.length*2?r/2:e.length,o=0;o<s;++o){var _=e.charCodeAt(o);LE_HEAP_STORE_I16((t>>1)*2,_),t+=2}return LE_HEAP_STORE_I16((t>>1)*2,0),t-n},AsciiToString=e=>{for(var t="";;){var r=HEAPU8[e++];if(!r)return t;t+=String.fromCharCode(r)}},wasmImports={__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_pointer:___stack_pointer,__table_base:___table_base,_abort_js:__abort_js,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_memcpy_js:__emscripten_memcpy_js,emscripten_get_now:_emscripten_get_now,emscripten_resize_heap:_emscripten_resize_heap,fd_close:_fd_close,fd_seek:_fd_seek,fd_write:_fd_write,memory:wasmMemory,tree_sitter_log_callback:_tree_sitter_log_callback,tree_sitter_parse_callback:_tree_sitter_parse_callback},wasmExports=createWasm(),___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports.__wasm_call_ctors)(),___wasm_apply_data_relocs=()=>(___wasm_apply_data_relocs=wasmExports.__wasm_apply_data_relocs)(),_malloc=Module._malloc=e=>(_malloc=Module._malloc=wasmExports.malloc)(e),_calloc=Module._calloc=(e,t)=>(_calloc=Module._calloc=wasmExports.calloc)(e,t),_realloc=Module._realloc=(e,t)=>(_realloc=Module._realloc=wasmExports.realloc)(e,t),_free=Module._free=e=>(_free=Module._free=wasmExports.free)(e),_ts_language_symbol_count=Module._ts_language_symbol_count=e=>(_ts_language_symbol_count=Module._ts_language_symbol_count=wasmExports.ts_language_symbol_count)(e),_ts_language_state_count=Module._ts_language_state_count=e=>(_ts_language_state_count=Module._ts_language_state_count=wasmExports.ts_language_state_count)(e),_ts_language_version=Module._ts_language_version=e=>(_ts_language_version=Module._ts_language_version=wasmExports.ts_language_version)(e),_ts_language_field_count=Module._ts_language_field_count=e=>(_ts_language_field_count=Module._ts_language_field_count=wasmExports.ts_language_field_count)(e),_ts_language_next_state=Module._ts_language_next_state=(e,t,r)=>(_ts_language_next_state=Module._ts_language_next_state=wasmExports.ts_language_next_state)(e,t,r),_ts_language_symbol_name=Module._ts_language_symbol_name=(e,t)=>(_ts_language_symbol_name=Module._ts_language_symbol_name=wasmExports.ts_language_symbol_name)(e,t),_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=(e,t,r,n)=>(_ts_language_symbol_for_name=Module._ts_language_symbol_for_name=wasmExports.ts_language_symbol_for_name)(e,t,r,n),_strncmp=Module._strncmp=(e,t,r)=>(_strncmp=Module._strncmp=wasmExports.strncmp)(e,t,r),_ts_language_symbol_type=Module._ts_language_symbol_type=(e,t)=>(_ts_language_symbol_type=Module._ts_language_symbol_type=wasmExports.ts_language_symbol_type)(e,t),_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=(e,t)=>(_ts_language_field_name_for_id=Module._ts_language_field_name_for_id=wasmExports.ts_language_field_name_for_id)(e,t),_ts_lookahead_iterator_new=Module._ts_lookahead_iterator_new=(e,t)=>(_ts_lookahead_iterator_new=Module._ts_lookahead_iterator_new=wasmExports.ts_lookahead_iterator_new)(e,t),_ts_lookahead_iterator_delete=Module._ts_lookahead_iterator_delete=e=>(_ts_lookahead_iterator_delete=Module._ts_lookahead_iterator_delete=wasmExports.ts_lookahead_iterator_delete)(e),_ts_lookahead_iterator_reset_state=Module._ts_lookahead_iterator_reset_state=(e,t)=>(_ts_lookahead_iterator_reset_state=Module._ts_lookahead_iterator_reset_state=wasmExports.ts_lookahead_iterator_reset_state)(e,t),_ts_lookahead_iterator_reset=Module._ts_lookahead_iterator_reset=(e,t,r)=>(_ts_lookahead_iterator_reset=Module._ts_lookahead_iterator_reset=wasmExports.ts_lookahead_iterator_reset)(e,t,r),_ts_lookahead_iterator_next=Module._ts_lookahead_iterator_next=e=>(_ts_lookahead_iterator_next=Module._ts_lookahead_iterator_next=wasmExports.ts_lookahead_iterator_next)(e),_ts_lookahead_iterator_current_symbol=Module._ts_lookahead_iterator_current_symbol=e=>(_ts_lookahead_iterator_current_symbol=Module._ts_lookahead_iterator_current_symbol=wasmExports.ts_lookahead_iterator_current_symbol)(e),_memset=Module._memset=(e,t,r)=>(_memset=Module._memset=wasmExports.memset)(e,t,r),_memcpy=Module._memcpy=(e,t,r)=>(_memcpy=Module._memcpy=wasmExports.memcpy)(e,t,r),_ts_parser_delete=Module._ts_parser_delete=e=>(_ts_parser_delete=Module._ts_parser_delete=wasmExports.ts_parser_delete)(e),_ts_parser_reset=Module._ts_parser_reset=e=>(_ts_parser_reset=Module._ts_parser_reset=wasmExports.ts_parser_reset)(e),_ts_parser_set_language=Module._ts_parser_set_language=(e,t)=>(_ts_parser_set_language=Module._ts_parser_set_language=wasmExports.ts_parser_set_language)(e,t),_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=e=>(_ts_parser_timeout_micros=Module._ts_parser_timeout_micros=wasmExports.ts_parser_timeout_micros)(e),_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=(e,t,r)=>(_ts_parser_set_timeout_micros=Module._ts_parser_set_timeout_micros=wasmExports.ts_parser_set_timeout_micros)(e,t,r),_ts_parser_set_included_ranges=Module._ts_parser_set_included_ranges=(e,t,r)=>(_ts_parser_set_included_ranges=Module._ts_parser_set_included_ranges=wasmExports.ts_parser_set_included_ranges)(e,t,r),_memmove=Module._memmove=(e,t,r)=>(_memmove=Module._memmove=wasmExports.memmove)(e,t,r),_memcmp=Module._memcmp=(e,t,r)=>(_memcmp=Module._memcmp=wasmExports.memcmp)(e,t,r),_ts_query_new=Module._ts_query_new=(e,t,r,n,s)=>(_ts_query_new=Module._ts_query_new=wasmExports.ts_query_new)(e,t,r,n,s),_ts_query_delete=Module._ts_query_delete=e=>(_ts_query_delete=Module._ts_query_delete=wasmExports.ts_query_delete)(e),_iswspace=Module._iswspace=e=>(_iswspace=Module._iswspace=wasmExports.iswspace)(e),_iswalnum=Module._iswalnum=e=>(_iswalnum=Module._iswalnum=wasmExports.iswalnum)(e),_ts_query_pattern_count=Module._ts_query_pattern_count=e=>(_ts_query_pattern_count=Module._ts_query_pattern_count=wasmExports.ts_query_pattern_count)(e),_ts_query_capture_count=Module._ts_query_capture_count=e=>(_ts_query_capture_count=Module._ts_query_capture_count=wasmExports.ts_query_capture_count)(e),_ts_query_string_count=Module._ts_query_string_count=e=>(_ts_query_string_count=Module._ts_query_string_count=wasmExports.ts_query_string_count)(e),_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=(e,t,r)=>(_ts_query_capture_name_for_id=Module._ts_query_capture_name_for_id=wasmExports.ts_query_capture_name_for_id)(e,t,r),_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=(e,t,r)=>(_ts_query_string_value_for_id=Module._ts_query_string_value_for_id=wasmExports.ts_query_string_value_for_id)(e,t,r),_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=(e,t,r)=>(_ts_query_predicates_for_pattern=Module._ts_query_predicates_for_pattern=wasmExports.ts_query_predicates_for_pattern)(e,t,r),_ts_query_disable_capture=Module._ts_query_disable_capture=(e,t,r)=>(_ts_query_disable_capture=Module._ts_query_disable_capture=wasmExports.ts_query_disable_capture)(e,t,r),_ts_tree_copy=Module._ts_tree_copy=e=>(_ts_tree_copy=Module._ts_tree_copy=wasmExports.ts_tree_copy)(e),_ts_tree_delete=Module._ts_tree_delete=e=>(_ts_tree_delete=Module._ts_tree_delete=wasmExports.ts_tree_delete)(e),_ts_init=Module._ts_init=()=>(_ts_init=Module._ts_init=wasmExports.ts_init)(),_ts_parser_new_wasm=Module._ts_parser_new_wasm=()=>(_ts_parser_new_wasm=Module._ts_parser_new_wasm=wasmExports.ts_parser_new_wasm)(),_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=(e,t)=>(_ts_parser_enable_logger_wasm=Module._ts_parser_enable_logger_wasm=wasmExports.ts_parser_enable_logger_wasm)(e,t),_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=(e,t,r,n,s)=>(_ts_parser_parse_wasm=Module._ts_parser_parse_wasm=wasmExports.ts_parser_parse_wasm)(e,t,r,n,s),_ts_parser_included_ranges_wasm=Module._ts_parser_included_ranges_wasm=e=>(_ts_parser_included_ranges_wasm=Module._ts_parser_included_ranges_wasm=wasmExports.ts_parser_included_ranges_wasm)(e),_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=(e,t)=>(_ts_language_type_is_named_wasm=Module._ts_language_type_is_named_wasm=wasmExports.ts_language_type_is_named_wasm)(e,t),_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=(e,t)=>(_ts_language_type_is_visible_wasm=Module._ts_language_type_is_visible_wasm=wasmExports.ts_language_type_is_visible_wasm)(e,t),_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=e=>(_ts_tree_root_node_wasm=Module._ts_tree_root_node_wasm=wasmExports.ts_tree_root_node_wasm)(e),_ts_tree_root_node_with_offset_wasm=Module._ts_tree_root_node_with_offset_wasm=e=>(_ts_tree_root_node_with_offset_wasm=Module._ts_tree_root_node_with_offset_wasm=wasmExports.ts_tree_root_node_with_offset_wasm)(e),_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=e=>(_ts_tree_edit_wasm=Module._ts_tree_edit_wasm=wasmExports.ts_tree_edit_wasm)(e),_ts_tree_included_ranges_wasm=Module._ts_tree_included_ranges_wasm=e=>(_ts_tree_included_ranges_wasm=Module._ts_tree_included_ranges_wasm=wasmExports.ts_tree_included_ranges_wasm)(e),_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=(e,t)=>(_ts_tree_get_changed_ranges_wasm=Module._ts_tree_get_changed_ranges_wasm=wasmExports.ts_tree_get_changed_ranges_wasm)(e,t),_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=e=>(_ts_tree_cursor_new_wasm=Module._ts_tree_cursor_new_wasm=wasmExports.ts_tree_cursor_new_wasm)(e),_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=e=>(_ts_tree_cursor_delete_wasm=Module._ts_tree_cursor_delete_wasm=wasmExports.ts_tree_cursor_delete_wasm)(e),_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=e=>(_ts_tree_cursor_reset_wasm=Module._ts_tree_cursor_reset_wasm=wasmExports.ts_tree_cursor_reset_wasm)(e),_ts_tree_cursor_reset_to_wasm=Module._ts_tree_cursor_reset_to_wasm=(e,t)=>(_ts_tree_cursor_reset_to_wasm=Module._ts_tree_cursor_reset_to_wasm=wasmExports.ts_tree_cursor_reset_to_wasm)(e,t),_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=e=>(_ts_tree_cursor_goto_first_child_wasm=Module._ts_tree_cursor_goto_first_child_wasm=wasmExports.ts_tree_cursor_goto_first_child_wasm)(e),_ts_tree_cursor_goto_last_child_wasm=Module._ts_tree_cursor_goto_last_child_wasm=e=>(_ts_tree_cursor_goto_last_child_wasm=Module._ts_tree_cursor_goto_last_child_wasm=wasmExports.ts_tree_cursor_goto_last_child_wasm)(e),_ts_tree_cursor_goto_first_child_for_index_wasm=Module._ts_tree_cursor_goto_first_child_for_index_wasm=e=>(_ts_tree_cursor_goto_first_child_for_index_wasm=Module._ts_tree_cursor_goto_first_child_for_index_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_index_wasm)(e),_ts_tree_cursor_goto_first_child_for_position_wasm=Module._ts_tree_cursor_goto_first_child_for_position_wasm=e=>(_ts_tree_cursor_goto_first_child_for_position_wasm=Module._ts_tree_cursor_goto_first_child_for_position_wasm=wasmExports.ts_tree_cursor_goto_first_child_for_position_wasm)(e),_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=e=>(_ts_tree_cursor_goto_next_sibling_wasm=Module._ts_tree_cursor_goto_next_sibling_wasm=wasmExports.ts_tree_cursor_goto_next_sibling_wasm)(e),_ts_tree_cursor_goto_previous_sibling_wasm=Module._ts_tree_cursor_goto_previous_sibling_wasm=e=>(_ts_tree_cursor_goto_previous_sibling_wasm=Module._ts_tree_cursor_goto_previous_sibling_wasm=wasmExports.ts_tree_cursor_goto_previous_sibling_wasm)(e),_ts_tree_cursor_goto_descendant_wasm=Module._ts_tree_cursor_goto_descendant_wasm=(e,t)=>(_ts_tree_cursor_goto_descendant_wasm=Module._ts_tree_cursor_goto_descendant_wasm=wasmExports.ts_tree_cursor_goto_descendant_wasm)(e,t),_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=e=>(_ts_tree_cursor_goto_parent_wasm=Module._ts_tree_cursor_goto_parent_wasm=wasmExports.ts_tree_cursor_goto_parent_wasm)(e),_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=e=>(_ts_tree_cursor_current_node_type_id_wasm=Module._ts_tree_cursor_current_node_type_id_wasm=wasmExports.ts_tree_cursor_current_node_type_id_wasm)(e),_ts_tree_cursor_current_node_state_id_wasm=Module._ts_tree_cursor_current_node_state_id_wasm=e=>(_ts_tree_cursor_current_node_state_id_wasm=Module._ts_tree_cursor_current_node_state_id_wasm=wasmExports.ts_tree_cursor_current_node_state_id_wasm)(e),_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=e=>(_ts_tree_cursor_current_node_is_named_wasm=Module._ts_tree_cursor_current_node_is_named_wasm=wasmExports.ts_tree_cursor_current_node_is_named_wasm)(e),_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=e=>(_ts_tree_cursor_current_node_is_missing_wasm=Module._ts_tree_cursor_current_node_is_missing_wasm=wasmExports.ts_tree_cursor_current_node_is_missing_wasm)(e),_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=e=>(_ts_tree_cursor_current_node_id_wasm=Module._ts_tree_cursor_current_node_id_wasm=wasmExports.ts_tree_cursor_current_node_id_wasm)(e),_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=e=>(_ts_tree_cursor_start_position_wasm=Module._ts_tree_cursor_start_position_wasm=wasmExports.ts_tree_cursor_start_position_wasm)(e),_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=e=>(_ts_tree_cursor_end_position_wasm=Module._ts_tree_cursor_end_position_wasm=wasmExports.ts_tree_cursor_end_position_wasm)(e),_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=e=>(_ts_tree_cursor_start_index_wasm=Module._ts_tree_cursor_start_index_wasm=wasmExports.ts_tree_cursor_start_index_wasm)(e),_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=e=>(_ts_tree_cursor_end_index_wasm=Module._ts_tree_cursor_end_index_wasm=wasmExports.ts_tree_cursor_end_index_wasm)(e),_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=e=>(_ts_tree_cursor_current_field_id_wasm=Module._ts_tree_cursor_current_field_id_wasm=wasmExports.ts_tree_cursor_current_field_id_wasm)(e),_ts_tree_cursor_current_depth_wasm=Module._ts_tree_cursor_current_depth_wasm=e=>(_ts_tree_cursor_current_depth_wasm=Module._ts_tree_cursor_current_depth_wasm=wasmExports.ts_tree_cursor_current_depth_wasm)(e),_ts_tree_cursor_current_descendant_index_wasm=Module._ts_tree_cursor_current_descendant_index_wasm=e=>(_ts_tree_cursor_current_descendant_index_wasm=Module._ts_tree_cursor_current_descendant_index_wasm=wasmExports.ts_tree_cursor_current_descendant_index_wasm)(e),_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=e=>(_ts_tree_cursor_current_node_wasm=Module._ts_tree_cursor_current_node_wasm=wasmExports.ts_tree_cursor_current_node_wasm)(e),_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=e=>(_ts_node_symbol_wasm=Module._ts_node_symbol_wasm=wasmExports.ts_node_symbol_wasm)(e),_ts_node_field_name_for_child_wasm=Module._ts_node_field_name_for_child_wasm=(e,t)=>(_ts_node_field_name_for_child_wasm=Module._ts_node_field_name_for_child_wasm=wasmExports.ts_node_field_name_for_child_wasm)(e,t),_ts_node_children_by_field_id_wasm=Module._ts_node_children_by_field_id_wasm=(e,t)=>(_ts_node_children_by_field_id_wasm=Module._ts_node_children_by_field_id_wasm=wasmExports.ts_node_children_by_field_id_wasm)(e,t),_ts_node_first_child_for_byte_wasm=Module._ts_node_first_child_for_byte_wasm=e=>(_ts_node_first_child_for_byte_wasm=Module._ts_node_first_child_for_byte_wasm=wasmExports.ts_node_first_child_for_byte_wasm)(e),_ts_node_first_named_child_for_byte_wasm=Module._ts_node_first_named_child_for_byte_wasm=e=>(_ts_node_first_named_child_for_byte_wasm=Module._ts_node_first_named_child_for_byte_wasm=wasmExports.ts_node_first_named_child_for_byte_wasm)(e),_ts_node_grammar_symbol_wasm=Module._ts_node_grammar_symbol_wasm=e=>(_ts_node_grammar_symbol_wasm=Module._ts_node_grammar_symbol_wasm=wasmExports.ts_node_grammar_symbol_wasm)(e),_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=e=>(_ts_node_child_count_wasm=Module._ts_node_child_count_wasm=wasmExports.ts_node_child_count_wasm)(e),_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=e=>(_ts_node_named_child_count_wasm=Module._ts_node_named_child_count_wasm=wasmExports.ts_node_named_child_count_wasm)(e),_ts_node_child_wasm=Module._ts_node_child_wasm=(e,t)=>(_ts_node_child_wasm=Module._ts_node_child_wasm=wasmExports.ts_node_child_wasm)(e,t),_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=(e,t)=>(_ts_node_named_child_wasm=Module._ts_node_named_child_wasm=wasmExports.ts_node_named_child_wasm)(e,t),_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=(e,t)=>(_ts_node_child_by_field_id_wasm=Module._ts_node_child_by_field_id_wasm=wasmExports.ts_node_child_by_field_id_wasm)(e,t),_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=e=>(_ts_node_next_sibling_wasm=Module._ts_node_next_sibling_wasm=wasmExports.ts_node_next_sibling_wasm)(e),_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=e=>(_ts_node_prev_sibling_wasm=Module._ts_node_prev_sibling_wasm=wasmExports.ts_node_prev_sibling_wasm)(e),_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=e=>(_ts_node_next_named_sibling_wasm=Module._ts_node_next_named_sibling_wasm=wasmExports.ts_node_next_named_sibling_wasm)(e),_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=e=>(_ts_node_prev_named_sibling_wasm=Module._ts_node_prev_named_sibling_wasm=wasmExports.ts_node_prev_named_sibling_wasm)(e),_ts_node_descendant_count_wasm=Module._ts_node_descendant_count_wasm=e=>(_ts_node_descendant_count_wasm=Module._ts_node_descendant_count_wasm=wasmExports.ts_node_descendant_count_wasm)(e),_ts_node_parent_wasm=Module._ts_node_parent_wasm=e=>(_ts_node_parent_wasm=Module._ts_node_parent_wasm=wasmExports.ts_node_parent_wasm)(e),_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=e=>(_ts_node_descendant_for_index_wasm=Module._ts_node_descendant_for_index_wasm=wasmExports.ts_node_descendant_for_index_wasm)(e),_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=e=>(_ts_node_named_descendant_for_index_wasm=Module._ts_node_named_descendant_for_index_wasm=wasmExports.ts_node_named_descendant_for_index_wasm)(e),_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=e=>(_ts_node_descendant_for_position_wasm=Module._ts_node_descendant_for_position_wasm=wasmExports.ts_node_descendant_for_position_wasm)(e),_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=e=>(_ts_node_named_descendant_for_position_wasm=Module._ts_node_named_descendant_for_position_wasm=wasmExports.ts_node_named_descendant_for_position_wasm)(e),_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=e=>(_ts_node_start_point_wasm=Module._ts_node_start_point_wasm=wasmExports.ts_node_start_point_wasm)(e),_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=e=>(_ts_node_end_point_wasm=Module._ts_node_end_point_wasm=wasmExports.ts_node_end_point_wasm)(e),_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=e=>(_ts_node_start_index_wasm=Module._ts_node_start_index_wasm=wasmExports.ts_node_start_index_wasm)(e),_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=e=>(_ts_node_end_index_wasm=Module._ts_node_end_index_wasm=wasmExports.ts_node_end_index_wasm)(e),_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=e=>(_ts_node_to_string_wasm=Module._ts_node_to_string_wasm=wasmExports.ts_node_to_string_wasm)(e),_ts_node_children_wasm=Module._ts_node_children_wasm=e=>(_ts_node_children_wasm=Module._ts_node_children_wasm=wasmExports.ts_node_children_wasm)(e),_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=e=>(_ts_node_named_children_wasm=Module._ts_node_named_children_wasm=wasmExports.ts_node_named_children_wasm)(e),_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=(e,t,r,n,s,o,_)=>(_ts_node_descendants_of_type_wasm=Module._ts_node_descendants_of_type_wasm=wasmExports.ts_node_descendants_of_type_wasm)(e,t,r,n,s,o,_),_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=e=>(_ts_node_is_named_wasm=Module._ts_node_is_named_wasm=wasmExports.ts_node_is_named_wasm)(e),_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=e=>(_ts_node_has_changes_wasm=Module._ts_node_has_changes_wasm=wasmExports.ts_node_has_changes_wasm)(e),_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=e=>(_ts_node_has_error_wasm=Module._ts_node_has_error_wasm=wasmExports.ts_node_has_error_wasm)(e),_ts_node_is_error_wasm=Module._ts_node_is_error_wasm=e=>(_ts_node_is_error_wasm=Module._ts_node_is_error_wasm=wasmExports.ts_node_is_error_wasm)(e),_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=e=>(_ts_node_is_missing_wasm=Module._ts_node_is_missing_wasm=wasmExports.ts_node_is_missing_wasm)(e),_ts_node_is_extra_wasm=Module._ts_node_is_extra_wasm=e=>(_ts_node_is_extra_wasm=Module._ts_node_is_extra_wasm=wasmExports.ts_node_is_extra_wasm)(e),_ts_node_parse_state_wasm=Module._ts_node_parse_state_wasm=e=>(_ts_node_parse_state_wasm=Module._ts_node_parse_state_wasm=wasmExports.ts_node_parse_state_wasm)(e),_ts_node_next_parse_state_wasm=Module._ts_node_next_parse_state_wasm=e=>(_ts_node_next_parse_state_wasm=Module._ts_node_next_parse_state_wasm=wasmExports.ts_node_next_parse_state_wasm)(e),_ts_query_matches_wasm=Module._ts_query_matches_wasm=(e,t,r,n,s,o,_,a,l,d)=>(_ts_query_matches_wasm=Module._ts_query_matches_wasm=wasmExports.ts_query_matches_wasm)(e,t,r,n,s,o,_,a,l,d),_ts_query_captures_wasm=Module._ts_query_captures_wasm=(e,t,r,n,s,o,_,a,l,d)=>(_ts_query_captures_wasm=Module._ts_query_captures_wasm=wasmExports.ts_query_captures_wasm)(e,t,r,n,s,o,_,a,l,d),_iswalpha=Module._iswalpha=e=>(_iswalpha=Module._iswalpha=wasmExports.iswalpha)(e),_iswblank=Module._iswblank=e=>(_iswblank=Module._iswblank=wasmExports.iswblank)(e),_iswdigit=Module._iswdigit=e=>(_iswdigit=Module._iswdigit=wasmExports.iswdigit)(e),_iswlower=Module._iswlower=e=>(_iswlower=Module._iswlower=wasmExports.iswlower)(e),_iswupper=Module._iswupper=e=>(_iswupper=Module._iswupper=wasmExports.iswupper)(e),_iswxdigit=Module._iswxdigit=e=>(_iswxdigit=Module._iswxdigit=wasmExports.iswxdigit)(e),_memchr=Module._memchr=(e,t,r)=>(_memchr=Module._memchr=wasmExports.memchr)(e,t,r),_strlen=Module._strlen=e=>(_strlen=Module._strlen=wasmExports.strlen)(e),_strcmp=Module._strcmp=(e,t)=>(_strcmp=Module._strcmp=wasmExports.strcmp)(e,t),_strncat=Module._strncat=(e,t,r)=>(_strncat=Module._strncat=wasmExports.strncat)(e,t,r),_strncpy=Module._strncpy=(e,t,r)=>(_strncpy=Module._strncpy=wasmExports.strncpy)(e,t,r),_towlower=Module._towlower=e=>(_towlower=Module._towlower=wasmExports.towlower)(e),_towupper=Module._towupper=e=>(_towupper=Module._towupper=wasmExports.towupper)(e),_setThrew=(e,t)=>(_setThrew=wasmExports.setThrew)(e,t),__emscripten_stack_restore=e=>(__emscripten_stack_restore=wasmExports._emscripten_stack_restore)(e),__emscripten_stack_alloc=e=>(__emscripten_stack_alloc=wasmExports._emscripten_stack_alloc)(e),_emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)(),dynCall_jiji=Module.dynCall_jiji=(e,t,r,n,s)=>(dynCall_jiji=Module.dynCall_jiji=wasmExports.dynCall_jiji)(e,t,r,n,s),_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=e=>(_orig$ts_parser_timeout_micros=Module._orig$ts_parser_timeout_micros=wasmExports.orig$ts_parser_timeout_micros)(e),_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=(e,t)=>(_orig$ts_parser_set_timeout_micros=Module._orig$ts_parser_set_timeout_micros=wasmExports.orig$ts_parser_set_timeout_micros)(e,t);Module.AsciiToString=AsciiToString,Module.stringToUTF16=stringToUTF16;var calledRun;dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)};function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,n=stackAlloc((r+1)*4),s=n;e.forEach(_=>{LE_HEAP_STORE_U32((s>>2)*4,stringToUTF8OnStack(_)),s+=4}),LE_HEAP_STORE_U32((s>>2)*4,0);try{var o=t(r,n);return exitJS(o,!0),o}catch(_){return handleException(_)}}}function run(e=arguments_){if(runDependencies>0||(preRun(),runDependencies>0))return;function t(){calledRun||(calledRun=!0,Module.calledRun=!0,!ABORT&&(initRuntime(),preMain(),Module.onRuntimeInitialized?.(),shouldRunNow&&callMain(e),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),t()},1)):t()}if(Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();let C=Module,INTERNAL={},SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},QUERY_WORD_REGEX=/[\w-.]*/g,PREDICATE_STEP_TYPE_CAPTURE=1,PREDICATE_STEP_TYPE_STRING=2,LANGUAGE_FUNCTION_REGEX=/^_?tree_sitter_\w+/,VERSION,MIN_COMPATIBLE_VERSION,TRANSFER_BUFFER,currentParseCallback,currentLogCallback;class ParserImpl{static init(){TRANSFER_BUFFER=C._ts_init(),VERSION=getValue(TRANSFER_BUFFER,"i32"),MIN_COMPATIBLE_VERSION=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}initialize(){C._ts_parser_new_wasm(),this[0]=getValue(TRANSFER_BUFFER,"i32"),this[1]=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32")}delete(){C._ts_parser_delete(this[0]),C._free(this[1]),this[0]=0,this[1]=0}setLanguage(t){let r;if(!t)r=0,t=null;else if(t.constructor===Language){r=t[0];let n=C._ts_language_version(r);if(n<MIN_COMPATIBLE_VERSION||VERSION<n)throw new Error(`Incompatible language version ${n}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${VERSION}.`)}else throw new Error("Argument must be a Language");return this.language=t,C._ts_parser_set_language(this[0],r),this}getLanguage(){return this.language}parse(t,r,n){if(typeof t=="string")currentParseCallback=(l,d)=>t.slice(l);else if(typeof t=="function")currentParseCallback=t;else throw new Error("Argument must be a string or a function");this.logCallback?(currentLogCallback=this.logCallback,C._ts_parser_enable_logger_wasm(this[0],1)):(currentLogCallback=null,C._ts_parser_enable_logger_wasm(this[0],0));let s=0,o=0;if(n?.includedRanges){s=n.includedRanges.length,o=C._calloc(s,SIZE_OF_RANGE);let l=o;for(let d=0;d<s;d++)marshalRange(l,n.includedRanges[d]),l+=SIZE_OF_RANGE}let _=C._ts_parser_parse_wasm(this[0],this[1],r?r[0]:0,o,s);if(!_)throw currentParseCallback=null,currentLogCallback=null,new Error("Parsing failed");let a=new Tree(INTERNAL,_,this.language,currentParseCallback);return currentParseCallback=null,currentLogCallback=null,a}reset(){C._ts_parser_reset(this[0])}getIncludedRanges(){C._ts_parser_included_ranges_wasm(this[0]);let t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)n[o]=unmarshalRange(s),s+=SIZE_OF_RANGE;C._free(r)}return n}getTimeoutMicros(){return C._ts_parser_timeout_micros(this[0])}setTimeoutMicros(t){C._ts_parser_set_timeout_micros(this[0],t)}setLogger(t){if(!t)t=null;else if(typeof t!="function")throw new Error("Logger callback must be a function");return this.logCallback=t,this}getLogger(){return this.logCallback}}class Tree{constructor(t,r,n,s){assertInternal(t),this[0]=r,this.language=n,this.textCallback=s}copy(){let t=C._ts_tree_copy(this[0]);return new Tree(INTERNAL,t,this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}edit(t){marshalEdit(t),C._ts_tree_edit_wasm(this[0])}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}rootNodeWithOffset(t,r){let n=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(n,t,"i32"),marshalPoint(n+SIZE_OF_INT,r),C._ts_tree_root_node_with_offset_wasm(this[0]),unmarshalNode(this)}getLanguage(){return this.language}walk(){return this.rootNode.walk()}getChangedRanges(t){if(t.constructor!==Tree)throw new TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],t[0]);let r=getValue(TRANSFER_BUFFER,"i32"),n=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),s=new Array(r);if(r>0){let o=n;for(let _=0;_<r;_++)s[_]=unmarshalRange(o),o+=SIZE_OF_RANGE;C._free(n)}return s}getIncludedRanges(){C._ts_tree_included_ranges_wasm(this[0]);let t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),n=new Array(t);if(t>0){let s=r;for(let o=0;o<t;o++)n[o]=unmarshalRange(s),s+=SIZE_OF_RANGE;C._free(r)}return n}}class Node{constructor(t,r){assertInternal(t),this.tree=r}get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return marshalNode(this),C._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get text(){return getText(this.tree,this.startIndex,this.endIndex)}get parseState(){return marshalNode(this),C._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return marshalNode(this),C._ts_node_next_parse_state_wasm(this.tree[0])}get isNamed(){return marshalNode(this),C._ts_node_is_named_wasm(this.tree[0])===1}get hasError(){return marshalNode(this),C._ts_node_has_error_wasm(this.tree[0])===1}get hasChanges(){return marshalNode(this),C._ts_node_has_changes_wasm(this.tree[0])===1}get isError(){return marshalNode(this),C._ts_node_is_error_wasm(this.tree[0])===1}get isMissing(){return marshalNode(this),C._ts_node_is_missing_wasm(this.tree[0])===1}get isExtra(){return marshalNode(this),C._ts_node_is_extra_wasm(this.tree[0])===1}equals(t){return this.id===t.id}child(t){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],t),unmarshalNode(this.tree)}namedChild(t){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],t),unmarshalNode(this.tree)}childForFieldId(t){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],t),unmarshalNode(this.tree)}childForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1?this.childForFieldId(r):null}fieldNameForChild(t){marshalNode(this);let r=C._ts_node_field_name_for_child_wasm(this.tree[0],t);return r?AsciiToString(r):null}childrenForFieldName(t){let r=this.tree.language.fields.indexOf(t);return r!==-1&&r!==0?this.childrenForFieldId(r):[]}childrenForFieldId(t){marshalNode(this),C._ts_node_children_by_field_id_wasm(this.tree[0],t);let r=getValue(TRANSFER_BUFFER,"i32"),n=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),s=new Array(r);if(r>0){let o=n;for(let _=0;_<r;_++)s[_]=unmarshalNode(this.tree,o),o+=SIZE_OF_NODE;C._free(n)}return s}firstChildForIndex(t){marshalNode(this);let r=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(r,t,"i32"),C._ts_node_first_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}firstNamedChildForIndex(t){marshalNode(this);let r=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(r,t,"i32"),C._ts_node_first_named_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);let t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._children=new Array(t),t>0){let n=r;for(let s=0;s<t;s++)this._children[s]=unmarshalNode(this.tree,n),n+=SIZE_OF_NODE;C._free(r)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);let t=getValue(TRANSFER_BUFFER,"i32"),r=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._namedChildren=new Array(t),t>0){let n=r;for(let s=0;s<t;s++)this._namedChildren[s]=unmarshalNode(this.tree,n),n+=SIZE_OF_NODE;C._free(r)}}return this._namedChildren}descendantsOfType(t,r,n){Array.isArray(t)||(t=[t]),r||(r=ZERO_POINT),n||(n=ZERO_POINT);let s=[],o=this.tree.language.types;for(let u=0,c=o.length;u<c;u++)t.includes(o[u])&&s.push(u);let _=C._malloc(SIZE_OF_INT*s.length);for(let u=0,c=s.length;u<c;u++)setValue(_+u*SIZE_OF_INT,s[u],"i32");marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],_,s.length,r.row,r.column,n.row,n.column);let a=getValue(TRANSFER_BUFFER,"i32"),l=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),d=new Array(a);if(a>0){let u=l;for(let c=0;c<a;c++)d[c]=unmarshalNode(this.tree,u),u+=SIZE_OF_NODE}return C._free(l),C._free(_),d}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get descendantCount(){return marshalNode(this),C._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(n,t,"i32"),setValue(n+SIZE_OF_INT,r,"i32"),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(t,r=t){if(typeof t!="number"||typeof r!="number")throw new Error("Arguments must be numbers");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return setValue(n,t,"i32"),setValue(n+SIZE_OF_INT,r,"i32"),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(t,r=t){if(!isPoint(t)||!isPoint(r))throw new Error("Arguments must be {row, column} objects");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(n,t),marshalPoint(n+SIZE_OF_POINT,r),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(t,r=t){if(!isPoint(t)||!isPoint(r))throw new Error("Arguments must be {row, column} objects");marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(n,t),marshalPoint(n+SIZE_OF_POINT,r),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}toString(){marshalNode(this);let t=C._ts_node_to_string_wasm(this.tree[0]),r=AsciiToString(t);return C._free(t),r}}class TreeCursor{constructor(t,r){assertInternal(t),this.tree=r,unmarshalTreeCursor(this)}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}reset(t){marshalNode(t),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}resetTo(t){marshalTreeCursor(this,TRANSFER_BUFFER),marshalTreeCursor(t,TRANSFER_BUFFER+SIZE_OF_CURSOR),C._ts_tree_cursor_reset_to_wasm(this.tree[0],t.tree[0]),unmarshalTreeCursor(this)}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])===1}get nodeIsMissing(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])===1}get nodeText(){marshalTreeCursor(this);let t=C._ts_tree_cursor_start_index_wasm(this.tree[0]),r=C._ts_tree_cursor_end_index_wasm(this.tree[0]);return getText(this.tree,t,r)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}get currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}get currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return marshalTreeCursor(this),C._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}gotoFirstChild(){marshalTreeCursor(this);let t=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),t===1}gotoLastChild(){marshalTreeCursor(this);let t=C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),t===1}gotoFirstChildForIndex(t){marshalTreeCursor(this),setValue(TRANSFER_BUFFER+SIZE_OF_CURSOR,t,"i32");let r=C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return unmarshalTreeCursor(this),r===1}gotoFirstChildForPosition(t){marshalTreeCursor(this),marshalPoint(TRANSFER_BUFFER+SIZE_OF_CURSOR,t);let r=C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return unmarshalTreeCursor(this),r===1}gotoNextSibling(){marshalTreeCursor(this);let t=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),t===1}gotoPreviousSibling(){marshalTreeCursor(this);let t=C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),t===1}gotoDescendant(t){marshalTreeCursor(this),C._ts_tree_cursor_goto_descendant_wasm(this.tree[0],t),unmarshalTreeCursor(this)}gotoParent(){marshalTreeCursor(this);let t=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),t===1}}class Language{constructor(t,r){assertInternal(t),this[0]=r,this.types=new Array(C._ts_language_symbol_count(this[0]));for(let n=0,s=this.types.length;n<s;n++)C._ts_language_symbol_type(this[0],n)<2&&(this.types[n]=UTF8ToString(C._ts_language_symbol_name(this[0],n)));this.fields=new Array(C._ts_language_field_count(this[0])+1);for(let n=0,s=this.fields.length;n<s;n++){let o=C._ts_language_field_name_for_id(this[0],n);o!==0?this.fields[n]=UTF8ToString(o):this.fields[n]=null}}get version(){return C._ts_language_version(this[0])}get fieldCount(){return this.fields.length-1}get stateCount(){return C._ts_language_state_count(this[0])}fieldIdForName(t){let r=this.fields.indexOf(t);return r!==-1?r:null}fieldNameForId(t){return this.fields[t]||null}idForNodeType(t,r){let n=lengthBytesUTF8(t),s=C._malloc(n+1);stringToUTF8(t,s,n+1);let o=C._ts_language_symbol_for_name(this[0],s,n,r);return C._free(s),o||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(t){let r=C._ts_language_symbol_name(this[0],t);return r?UTF8ToString(r):null}nodeTypeIsNamed(t){return!!C._ts_language_type_is_named_wasm(this[0],t)}nodeTypeIsVisible(t){return!!C._ts_language_type_is_visible_wasm(this[0],t)}nextState(t,r){return C._ts_language_next_state(this[0],t,r)}lookaheadIterator(t){let r=C._ts_lookahead_iterator_new(this[0],t);return r?new LookaheadIterable(INTERNAL,r,this):null}query(t){let r=lengthBytesUTF8(t),n=C._malloc(r+1);stringToUTF8(t,n,r+1);let s=C._ts_query_new(this[0],n,r,TRANSFER_BUFFER,TRANSFER_BUFFER+SIZE_OF_INT);if(!s){let p=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),b=getValue(TRANSFER_BUFFER,"i32"),T=UTF8ToString(n,b).length,f=t.substr(T,100).split(`
`)[0],g=f.match(QUERY_WORD_REGEX)[0],E;switch(p){case 2:E=new RangeError(`Bad node name '${g}'`);break;case 3:E=new RangeError(`Bad field name '${g}'`);break;case 4:E=new RangeError(`Bad capture name @${g}`);break;case 5:E=new TypeError(`Bad pattern structure at offset ${T}: '${f}'...`),g="";break;default:E=new SyntaxError(`Bad syntax at offset ${T}: '${f}'...`),g="";break}throw E.index=T,E.length=g.length,C._free(n),E}let o=C._ts_query_string_count(s),_=C._ts_query_capture_count(s),a=C._ts_query_pattern_count(s),l=new Array(_),d=new Array(o);for(let p=0;p<_;p++){let b=C._ts_query_capture_name_for_id(s,p,TRANSFER_BUFFER),T=getValue(TRANSFER_BUFFER,"i32");l[p]=UTF8ToString(b,T)}for(let p=0;p<o;p++){let b=C._ts_query_string_value_for_id(s,p,TRANSFER_BUFFER),T=getValue(TRANSFER_BUFFER,"i32");d[p]=UTF8ToString(b,T)}let u=new Array(a),c=new Array(a),m=new Array(a),y=new Array(a),w=new Array(a);for(let p=0;p<a;p++){let b=C._ts_query_predicates_for_pattern(s,p,TRANSFER_BUFFER),T=getValue(TRANSFER_BUFFER,"i32");y[p]=[],w[p]=[];let f=[],g=b;for(let E=0;E<T;E++){let j=getValue(g,"i32");g+=SIZE_OF_INT;let ve=getValue(g,"i32");if(g+=SIZE_OF_INT,j===PREDICATE_STEP_TYPE_CAPTURE)f.push({type:"capture",name:l[ve]});else if(j===PREDICATE_STEP_TYPE_STRING)f.push({type:"string",value:d[ve]});else if(f.length>0){if(f[0].type!=="string")throw new Error("Predicates must begin with a literal value");let A=f[0].value,$=!0,Y=!0,Z;switch(A){case"any-not-eq?":case"not-eq?":$=!1;case"any-eq?":case"eq?":if(f.length!==3)throw new Error(`Wrong number of arguments to \`#${A}\` predicate. Expected 2, got ${f.length-1}`);if(f[1].type!=="capture")throw new Error(`First argument of \`#${A}\` predicate must be a capture. Got "${f[1].value}"`);if(Y=!A.startsWith("any-"),f[2].type==="capture"){let v=f[1].name,O=f[2].name;w[p].push(H=>{let R=[],X=[];for(let L of H)L.name===v&&R.push(L.node),L.name===O&&X.push(L.node);let fe=(L,de,jt)=>jt?L.text===de.text:L.text!==de.text;return Y?R.every(L=>X.some(de=>fe(L,de,$))):R.some(L=>X.some(de=>fe(L,de,$)))})}else{Z=f[1].name;let v=f[2].value,O=R=>R.text===v,H=R=>R.text!==v;w[p].push(R=>{let X=[];for(let L of R)L.name===Z&&X.push(L.node);let fe=$?O:H;return Y?X.every(fe):X.some(fe)})}break;case"any-not-match?":case"not-match?":$=!1;case"any-match?":case"match?":if(f.length!==3)throw new Error(`Wrong number of arguments to \`#${A}\` predicate. Expected 2, got ${f.length-1}.`);if(f[1].type!=="capture")throw new Error(`First argument of \`#${A}\` predicate must be a capture. Got "${f[1].value}".`);if(f[2].type!=="string")throw new Error(`Second argument of \`#${A}\` predicate must be a string. Got @${f[2].value}.`);Z=f[1].name;let le=new RegExp(f[2].value);Y=!A.startsWith("any-"),w[p].push(v=>{let O=[];for(let R of v)R.name===Z&&O.push(R.node.text);let H=(R,X)=>X?le.test(R):!le.test(R);return O.length===0?!$:Y?O.every(R=>H(R,$)):O.some(R=>H(R,$))});break;case"set!":if(f.length<2||f.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${f.length-1}.`);if(f.some(v=>v.type!=="string"))throw new Error('Arguments to `#set!` predicate must be a strings.".');u[p]||(u[p]={}),u[p][f[1].value]=f[2]?f[2].value:null;break;case"is?":case"is-not?":if(f.length<2||f.length>3)throw new Error(`Wrong number of arguments to \`#${A}\` predicate. Expected 1 or 2. Got ${f.length-1}.`);if(f.some(v=>v.type!=="string"))throw new Error(`Arguments to \`#${A}\` predicate must be a strings.".`);let Se=A==="is?"?c:m;Se[p]||(Se[p]={}),Se[p][f[1].value]=f[2]?f[2].value:null;break;case"not-any-of?":$=!1;case"any-of?":if(f.length<2)throw new Error(`Wrong number of arguments to \`#${A}\` predicate. Expected at least 1. Got ${f.length-1}.`);if(f[1].type!=="capture")throw new Error(`First argument of \`#${A}\` predicate must be a capture. Got "${f[1].value}".`);for(let v=2;v<f.length;v++)if(f[v].type!=="string")throw new Error(`Arguments to \`#${A}\` predicate must be a strings.".`);Z=f[1].name;let Q=f.slice(2).map(v=>v.value);w[p].push(v=>{let O=[];for(let H of v)H.name===Z&&O.push(H.node.text);return O.length===0?!$:O.every(H=>Q.includes(H))===$});break;default:y[p].push({operator:A,operands:f.slice(1)})}f.length=0}}Object.freeze(u[p]),Object.freeze(c[p]),Object.freeze(m[p])}return C._free(n),new Query(INTERNAL,s,l,w,y,Object.freeze(u),Object.freeze(c),Object.freeze(m))}static load(t){let r;if(t instanceof Uint8Array)r=Promise.resolve(t);else{let n=t;if(typeof process<"u"&&process.versions&&process.versions.node){let s=require("fs");r=Promise.resolve(s.readFileSync(n))}else r=fetch(n).then(s=>s.arrayBuffer().then(o=>{if(s.ok)return new Uint8Array(o);{let _=new TextDecoder("utf-8").decode(o);throw new Error(`Language.load failed with status ${s.status}.

${_}`)}}))}return r.then(n=>loadWebAssemblyModule(n,{loadAsync:!0})).then(n=>{let s=Object.keys(n),o=s.find(a=>LANGUAGE_FUNCTION_REGEX.test(a)&&!a.includes("external_scanner_"));o||console.log(`Couldn't find language function in WASM file. Symbols:
${JSON.stringify(s,null,2)}`);let _=n[o]();return new Language(INTERNAL,_)})}}class LookaheadIterable{constructor(t,r,n){assertInternal(t),this[0]=r,this.language=n}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}resetState(t){return C._ts_lookahead_iterator_reset_state(this[0],t)}reset(t,r){return C._ts_lookahead_iterator_reset(this[0],t[0],r)?(this.language=t,!0):!1}[Symbol.iterator](){let t=this;return{next(){return C._ts_lookahead_iterator_next(t[0])?{done:!1,value:t.currentType}:{done:!0,value:""}}}}}class Query{constructor(t,r,n,s,o,_,a,l){assertInternal(t),this[0]=r,this.captureNames=n,this.textPredicates=s,this.predicates=o,this.setProperties=_,this.assertedProperties=a,this.refutedProperties=l,this.exceededMatchLimit=!1}delete(){C._ts_query_delete(this[0]),this[0]=0}matches(t,{startPosition:r=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:s=0,endIndex:o=0,matchLimit:_=4294967295,maxStartDepth:a=4294967295}={}){if(typeof _!="number")throw new Error("Arguments must be numbers");marshalNode(t),C._ts_query_matches_wasm(this[0],t.tree[0],r.row,r.column,n.row,n.column,s,o,_,a);let l=getValue(TRANSFER_BUFFER,"i32"),d=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),u=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),c=new Array(l);this.exceededMatchLimit=!!u;let m=0,y=d;for(let w=0;w<l;w++){let p=getValue(y,"i32");y+=SIZE_OF_INT;let b=getValue(y,"i32");y+=SIZE_OF_INT;let T=new Array(b);if(y=unmarshalCaptures(this,t.tree,y,T),this.textPredicates[p].every(f=>f(T))){c[m]={pattern:p,captures:T};let f=this.setProperties[p];f&&(c[m].setProperties=f);let g=this.assertedProperties[p];g&&(c[m].assertedProperties=g);let E=this.refutedProperties[p];E&&(c[m].refutedProperties=E),m++}}return c.length=m,C._free(d),c}captures(t,{startPosition:r=ZERO_POINT,endPosition:n=ZERO_POINT,startIndex:s=0,endIndex:o=0,matchLimit:_=4294967295,maxStartDepth:a=4294967295}={}){if(typeof _!="number")throw new Error("Arguments must be numbers");marshalNode(t),C._ts_query_captures_wasm(this[0],t.tree[0],r.row,r.column,n.row,n.column,s,o,_,a);let l=getValue(TRANSFER_BUFFER,"i32"),d=getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),u=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),c=[];this.exceededMatchLimit=!!u;let m=[],y=d;for(let w=0;w<l;w++){let p=getValue(y,"i32");y+=SIZE_OF_INT;let b=getValue(y,"i32");y+=SIZE_OF_INT;let T=getValue(y,"i32");if(y+=SIZE_OF_INT,m.length=b,y=unmarshalCaptures(this,t.tree,y,m),this.textPredicates[p].every(f=>f(m))){let f=m[T],g=this.setProperties[p];g&&(f.setProperties=g);let E=this.assertedProperties[p];E&&(f.assertedProperties=E);let j=this.refutedProperties[p];j&&(f.refutedProperties=j),c.push(f)}}return C._free(d),c}predicatesForPattern(t){return this.predicates[t]}disableCapture(t){let r=lengthBytesUTF8(t),n=C._malloc(r+1);stringToUTF8(t,n,r+1),C._ts_query_disable_capture(this[0],n,r),C._free(n)}didExceedMatchLimit(){return this.exceededMatchLimit}}function getText(e,t,r){let n=r-t,s=e.textCallback(t,null,r);for(t+=s.length;t<r;){let o=e.textCallback(t,null,r);if(o&&o.length>0)t+=o.length,s+=o;else break}return t>r&&(s=s.slice(0,n)),s}function unmarshalCaptures(e,t,r,n){for(let s=0,o=n.length;s<o;s++){let _=getValue(r,"i32");r+=SIZE_OF_INT;let a=unmarshalNode(t,r);r+=SIZE_OF_NODE,n[s]={name:e.captureNames[_],node:a}}return r}function assertInternal(e){if(e!==INTERNAL)throw new Error("Illegal constructor")}function isPoint(e){return e&&typeof e.row=="number"&&typeof e.column=="number"}function marshalNode(e){let t=TRANSFER_BUFFER;setValue(t,e.id,"i32"),t+=SIZE_OF_INT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.startPosition.row,"i32"),t+=SIZE_OF_INT,setValue(t,e.startPosition.column,"i32"),t+=SIZE_OF_INT,setValue(t,e[0],"i32")}function unmarshalNode(e,t=TRANSFER_BUFFER){let r=getValue(t,"i32");if(t+=SIZE_OF_INT,r===0)return null;let n=getValue(t,"i32");t+=SIZE_OF_INT;let s=getValue(t,"i32");t+=SIZE_OF_INT;let o=getValue(t,"i32");t+=SIZE_OF_INT;let _=getValue(t,"i32"),a=new Node(INTERNAL,e);return a.id=r,a.startIndex=n,a.startPosition={row:s,column:o},a[0]=_,a}function marshalTreeCursor(e,t=TRANSFER_BUFFER){setValue(t+0*SIZE_OF_INT,e[0],"i32"),setValue(t+1*SIZE_OF_INT,e[1],"i32"),setValue(t+2*SIZE_OF_INT,e[2],"i32"),setValue(t+3*SIZE_OF_INT,e[3],"i32")}function unmarshalTreeCursor(e){e[0]=getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),e[1]=getValue(TRANSFER_BUFFER+1*SIZE_OF_INT,"i32"),e[2]=getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),e[3]=getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,"i32")}function marshalPoint(e,t){setValue(e,t.row,"i32"),setValue(e+SIZE_OF_INT,t.column,"i32")}function unmarshalPoint(e){return{row:getValue(e,"i32")>>>0,column:getValue(e+SIZE_OF_INT,"i32")>>>0}}function marshalRange(e,t){marshalPoint(e,t.startPosition),e+=SIZE_OF_POINT,marshalPoint(e,t.endPosition),e+=SIZE_OF_POINT,setValue(e,t.startIndex,"i32"),e+=SIZE_OF_INT,setValue(e,t.endIndex,"i32"),e+=SIZE_OF_INT}function unmarshalRange(e){let t={};return t.startPosition=unmarshalPoint(e),e+=SIZE_OF_POINT,t.endPosition=unmarshalPoint(e),e+=SIZE_OF_POINT,t.startIndex=getValue(e,"i32")>>>0,e+=SIZE_OF_INT,t.endIndex=getValue(e,"i32")>>>0,t}function marshalEdit(e){let t=TRANSFER_BUFFER;marshalPoint(t,e.startPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.oldEndPosition),t+=SIZE_OF_POINT,marshalPoint(t,e.newEndPosition),t+=SIZE_OF_POINT,setValue(t,e.startIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.oldEndIndex,"i32"),t+=SIZE_OF_INT,setValue(t,e.newEndIndex,"i32"),t+=SIZE_OF_INT}for(let e of Object.getOwnPropertyNames(ParserImpl.prototype))Object.defineProperty(Parser.prototype,e,{value:ParserImpl.prototype[e],enumerable:!1,writable:!1});Parser.Language=Language,Module.onRuntimeInitialized=()=>{ParserImpl.init(),resolveInitPromise()}}))}}return Parser})();typeof exports=="object"&&(module.exports=TreeSitter)});var Gt=require("worker_threads");var Xe={};zt(Xe,{_dispose:()=>mt,_findLastTest:()=>Lt,_getCallExpressions:()=>Cr,_getClassDeclarations:()=>Pr,_getClassReferences:()=>Lr,_getCoarseParentScope:()=>Wr,_getDocumentableNodeIfOnIdentifier:()=>Ot,_getFineScopes:()=>Hr,_getFixSelectionOfInterest:()=>$r,_getFunctionBodies:()=>Br,_getFunctionDefinitions:()=>Nr,_getNodeMatchingSelection:()=>_e,_getNodeToDocument:()=>Ft,_getNodeToExplain:()=>Vr,_getParseErrorCount:()=>en,_getSemanticChunkNames:()=>Ur,_getSemanticChunkTree:()=>Dr,_getStructure:()=>Xr,_getSymbols:()=>kr,_getTypeDeclarations:()=>Fr,_getTypeReferences:()=>Or,getBlockNameTree:()=>Vt});function et(e,t,r){let n=0,s=e.length;for(;n<s;){let o=n+s>>>1;r(e[o],t)?n=o+1:s=o}return n}function tt(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n<e.length;n++){let s=e[n];t(s,r)>0&&(r=s)}return r}var Be=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Ie.isErrorNoTelemetry(t)?new Ie(t.message+`

`+t.stack):new Error(t.message+`

`+t.stack):t},0)}}addListener(t){return this.listeners.push(t),()=>{this._removeListener(t)}}emit(t){this.listeners.forEach(r=>{r(t)})}_removeListener(t){this.listeners.splice(this.listeners.indexOf(t),1)}setUnexpectedErrorHandler(t){this.unexpectedErrorHandler=t}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},sn=new Be;var rt=class e extends Error{static{this._name="PendingMigrationError"}static is(t){return t instanceof e||t instanceof Error&&t.name===e._name}constructor(t){super(t),this.name=e._name}};var Ie=class e extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let r=new e;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},ce=class e extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};var P={doesContain:(e,t)=>e.startIndex<=t.startIndex&&t.endIndex<=e.endIndex,ofSyntaxNode:e=>({startIndex:e.startIndex,endIndex:e.endIndex}),compare:(e,t)=>e.startIndex-t.startIndex||t.endIndex-e.endIndex,isEqual:(e,t)=>P.compare(e,t)===0,doIntersect:(e,t)=>{let r=Math.max(e.startIndex,t.startIndex),n=Math.min(e.endIndex,t.endIndex);return r<n},len:e=>e.endIndex-e.startIndex,intersectionSize:(e,t)=>{let r=Math.max(e.startIndex,t.startIndex),n=Math.min(e.endIndex,t.endIndex);return Math.max(n-r,0)},isTreeSitterOffsetRange(e){return typeof e.startIndex=="number"&&typeof e.endIndex=="number"}},V={isEqual(e,t){return e.row===t.row&&e.column===t.column},isBefore(e,t){return e.row<t.row||e.row===t.row&&e.column<t.column},isAfter(e,t){return V.isBefore(t,e)},isBeforeOrEqual(e,t){let r=V.isBefore(e,t),n=V.isEqual(e,t);return!!(r||n)},equals(e,t){return e.column===t.column&&e.row===t.row},isAfterOrEqual(e,t){return V.isBeforeOrEqual(t,e)},ofPoint:e=>({row:e.row,column:e.column})},se={doesContain:(e,t)=>V.isBeforeOrEqual(e.startPosition,t.startPosition)&&V.isAfterOrEqual(e.endPosition,t.endPosition),equals:(e,t)=>V.equals(e.startPosition,t.startPosition)&&V.equals(e.endPosition,t.endPosition),ofSyntaxNode:e=>({startPosition:e.startPosition,endPosition:e.endPosition})},ge={ofSyntaxNode:e=>({type:e.type,startIndex:e.startIndex,endIndex:e.endIndex})},k={ofSyntaxNode:e=>({range:se.ofSyntaxNode(e),startIndex:e.startIndex,text:e.text,endIndex:e.endIndex})},pe=class{constructor(t,r,n,s){this.startIndex=t;this.endIndex=r;this.kind=n;this.children=s;if(t>r)throw new ce("startIndex must be less than endIndex");let o=t;for(let _ of s){if(_.startIndex<o)throw new ce("Invalid child startIndex");if(_.endIndex>r)throw new ce("Invalid child endIndex");o=Math.max(_.endIndex,o)}}toString(){let t=[];function r(n,s=""){t.push(`${s}${n.kind} [${n.startIndex}, ${n.endIndex}]`),n.children.forEach(o=>r(o,s+"    "))}return r(this),t.join(`
`)}};var he=class{constructor(t,r){this.syntaxTreeRoot=r;this.roots=[];this.formTree(t)}formTree(t){t.sort((o,_)=>o.mainBlock.startIndex-_.mainBlock.startIndex||o.mainBlock.endIndex-_.mainBlock.endIndex);let r=[],n=()=>r[r.length-1],s=(o,_)=>o.mainBlock.startIndex===_.mainBlock.startIndex&&o.mainBlock.endIndex===_.mainBlock.endIndex;for(let o of t){let _={info:o,children:[]},a=n();if(!a){this.roots.push(_),r.push(_);continue}if(!s(a.info,o)){for(;a&&!P.doesContain(a.info.mainBlock,o.mainBlock);)r.pop(),a=n();a?a.children.push(_):this.roots.push(_),r.push(_)}}}};var ye=class{constructor(t,r){this.prev=null;this.next=null;this.key=t,this.value=r}},ue=class{constructor(t=10){if(t<1)throw new Error("Cache size must be at least 1");this._capacity=t,this._cache=new Map,this._head=new ye("",null),this._tail=new ye("",null),this._head.next=this._tail,this._tail.prev=this._head}_addNode(t){t.prev=this._head,t.next=this._head.next,this._head.next.prev=t,this._head.next=t}_removeNode(t){let r=t.prev,n=t.next;r.next=n,n.prev=r}_moveToHead(t){this._removeNode(t),this._addNode(t)}_popTail(){let t=this._tail.prev;return this._removeNode(t),t}clear(){this._cache.clear(),this._head.next=this._tail,this._tail.prev=this._head}deleteKey(t){let r=this._cache.get(t);if(r)return this._removeNode(r),this._cache.delete(t),r.value}get(t){let r=this._cache.get(t);if(r)return this._moveToHead(r),r.value}keys(){let t=[],r=this._head.next;for(;r!==this._tail;)t.push(r.key),r=r.next;return t}getValues(){let t=[],r=this._head.next;for(;r!==this._tail;)t.push(r.value),r=r.next;return t}put(t,r){let n=this._cache.get(t);if(n)n.value=r,this._moveToHead(n);else if(n=new ye(t,r),this._cache.set(t,n),this._addNode(n),this._cache.size>this._capacity){let s=this._popTail();return this._cache.delete(s.key),[s.key,s.value]}}entries(){let t=[],r=this._head.next;for(;r!==this._tail;)t.push([r.key,r.value]),r=r.next;return t}},Ae=class{constructor(t){this.actual=new ue(t)}dispose(){this.clear()}clear(){let t=this.actual.getValues();for(let r of t)r.dispose();this.actual.clear()}deleteKey(t){let r=this.actual.deleteKey(t);r&&r.dispose()}get(t){return this.actual.get(t)}keys(){return this.actual.keys()}getValues(){return this.actual.getValues()}put(t,r){let n=this.actual.put(t,r);n&&n[1].dispose()}};function We(){return globalThis._VSCODE_NLS_LANGUAGE}var mn=We()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;var me="en",Ne=!1,Pe=!1,Re=!1,Kt=!1,Yt=!1,st=!1,Xt=!1,er=!1,tr=!1,rr=!1,Me,Ce=me,nt=me,nr,ee,te=globalThis,D;typeof te.vscode<"u"&&typeof te.vscode.process<"u"?D=te.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(D=process);var ot=typeof D?.versions?.electron=="string",sr=ot&&D?.type==="renderer";if(typeof D=="object"){Ne=D.platform==="win32",Pe=D.platform==="darwin",Re=D.platform==="linux",Kt=Re&&!!D.env.SNAP&&!!D.env.SNAP_REVISION,Xt=ot,tr=!!D.env.CI||!!D.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!D.env.GITHUB_WORKSPACE,Me=me,Ce=me;let e=D.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Me=t.userLocale,nt=t.osLocale,Ce=t.resolvedLanguage||me,nr=t.languagePack?.translationsConfigFile}catch{}Yt=!0}else typeof navigator=="object"&&!sr?(ee=navigator.userAgent,Ne=ee.indexOf("Windows")>=0,Pe=ee.indexOf("Macintosh")>=0,er=(ee.indexOf("Macintosh")>=0||ee.indexOf("iPad")>=0||ee.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Re=ee.indexOf("Linux")>=0,rr=ee?.indexOf("Mobi")>=0,st=!0,Ce=We()||me,Me=navigator.language.toLowerCase(),nt=Me):console.error("Unable to resolve platform.");var $e=0;Pe?$e=1:Ne?$e=3:Re&&($e=2);var it=Ne,at=Pe;var or=st&&typeof te.importScripts=="function",fn=or?te.origin:void 0;var z=ee,oe=Ce,ir;(n=>{function e(){return oe}n.value=e;function t(){return oe.length===2?oe==="en":oe.length>=3?oe[0]==="e"&&oe[1]==="n"&&oe[2]==="-":!1}n.isDefaultVariant=t;function r(){return oe==="en"}n.isDefault=r})(ir||={});var ar=typeof te.postMessage=="function"&&!te.importScripts,pn=(()=>{if(ar){let e=[];te.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,s=e.length;n<s;n++){let o=e[n];if(o.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),o.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),te.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})();var _r=!!(z&&z.indexOf("Chrome")>=0),gn=!!(z&&z.indexOf("Firefox")>=0),hn=!!(!_r&&z&&z.indexOf("Safari")>=0),yn=!!(z&&z.indexOf("Edg/")>=0),wn=!!(z&&z.indexOf("Android")>=0);var ie,He=globalThis.vscode;if(typeof He<"u"&&typeof He.process<"u"){let e=He.process;ie={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?ie={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:ie={get platform(){return it?"win32":at?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var we=ie.cwd,_t=ie.env,lt=ie.platform,En=ie.arch;var dr=65,cr=97,ur=90,mr=122,ae=46,F=47,U=92,re=58,fr=63,Fe=class extends Error{constructor(t,r,n){let s;typeof r=="string"&&r.indexOf("not ")===0?(s="must not be",r=r.replace(/^not /,"")):s="must be";let o=t.indexOf(".")!==-1?"property":"argument",_=`The "${t}" ${o} ${s} of type ${r}`;_+=`. Received type ${typeof n}`,super(_),this.code="ERR_INVALID_ARG_TYPE"}};function pr(e,t){if(e===null||typeof e!="object")throw new Fe(t,"Object",e)}function I(e,t){if(typeof e!="string")throw new Fe(t,"string",e)}var B=lt==="win32";function h(e){return e===F||e===U}function Ve(e){return e===F}function ne(e){return e>=dr&&e<=ur||e>=cr&&e<=mr}function Oe(e,t,r,n){let s="",o=0,_=-1,a=0,l=0;for(let d=0;d<=e.length;++d){if(d<e.length)l=e.charCodeAt(d);else{if(n(l))break;l=F}if(n(l)){if(!(_===d-1||a===1))if(a===2){if(s.length<2||o!==2||s.charCodeAt(s.length-1)!==ae||s.charCodeAt(s.length-2)!==ae){if(s.length>2){let u=s.lastIndexOf(r);u===-1?(s="",o=0):(s=s.slice(0,u),o=s.length-1-s.lastIndexOf(r)),_=d,a=0;continue}else if(s.length!==0){s="",o=0,_=d,a=0;continue}}t&&(s+=s.length>0?`${r}..`:"..",o=2)}else s.length>0?s+=`${r}${e.slice(_+1,d)}`:s=e.slice(_+1,d),o=d-_-1;_=d,a=0}else l===ae&&a!==-1?++a:a=-1}return s}function gr(e){return e?`${e[0]==="."?"":"."}${e}`:""}function dt(e,t){pr(t,"pathObject");let r=t.dir||t.root,n=t.base||`${t.name||""}${gr(t.ext)}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}var M={resolve(...e){let t="",r="",n=!1;for(let s=e.length-1;s>=-1;s--){let o;if(s>=0){if(o=e[s],I(o,`paths[${s}]`),o.length===0)continue}else t.length===0?o=we():(o=_t[`=${t}`]||we(),(o===void 0||o.slice(0,2).toLowerCase()!==t.toLowerCase()&&o.charCodeAt(2)===U)&&(o=`${t}\\`));let _=o.length,a=0,l="",d=!1,u=o.charCodeAt(0);if(_===1)h(u)&&(a=1,d=!0);else if(h(u))if(d=!0,h(o.charCodeAt(1))){let c=2,m=c;for(;c<_&&!h(o.charCodeAt(c));)c++;if(c<_&&c!==m){let y=o.slice(m,c);for(m=c;c<_&&h(o.charCodeAt(c));)c++;if(c<_&&c!==m){for(m=c;c<_&&!h(o.charCodeAt(c));)c++;(c===_||c!==m)&&(l=`\\\\${y}\\${o.slice(m,c)}`,a=c)}}}else a=1;else ne(u)&&o.charCodeAt(1)===re&&(l=o.slice(0,2),a=2,_>2&&h(o.charCodeAt(2))&&(d=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(r=`${o.slice(a)}\\${r}`,n=d,d&&t.length>0)break}return r=Oe(r,!n,"\\",h),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){I(e,"path");let t=e.length;if(t===0)return".";let r=0,n,s=!1,o=e.charCodeAt(0);if(t===1)return Ve(o)?"\\":e;if(h(o))if(s=!0,h(e.charCodeAt(1))){let a=2,l=a;for(;a<t&&!h(e.charCodeAt(a));)a++;if(a<t&&a!==l){let d=e.slice(l,a);for(l=a;a<t&&h(e.charCodeAt(a));)a++;if(a<t&&a!==l){for(l=a;a<t&&!h(e.charCodeAt(a));)a++;if(a===t)return`\\\\${d}\\${e.slice(l)}\\`;a!==l&&(n=`\\\\${d}\\${e.slice(l,a)}`,r=a)}}}else r=1;else ne(o)&&e.charCodeAt(1)===re&&(n=e.slice(0,2),r=2,t>2&&h(e.charCodeAt(2))&&(s=!0,r=3));let _=r<t?Oe(e.slice(r),!s,"\\",h):"";if(_.length===0&&!s&&(_="."),_.length>0&&h(e.charCodeAt(t-1))&&(_+="\\"),!s&&n===void 0&&e.includes(":")){if(_.length>=2&&ne(_.charCodeAt(0))&&_.charCodeAt(1)===re)return`.\\${_}`;let a=e.indexOf(":");do if(a===t-1||h(e.charCodeAt(a+1)))return`.\\${_}`;while((a=e.indexOf(":",a+1))!==-1)}return n===void 0?s?`\\${_}`:_:s?`${n}\\${_}`:`${n}${_}`},isAbsolute(e){I(e,"path");let t=e.length;if(t===0)return!1;let r=e.charCodeAt(0);return h(r)||t>2&&ne(r)&&e.charCodeAt(1)===re&&h(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let o=0;o<e.length;++o){let _=e[o];I(_,"path"),_.length>0&&(t===void 0?t=r=_:t+=`\\${_}`)}if(t===void 0)return".";let n=!0,s=0;if(typeof r=="string"&&h(r.charCodeAt(0))){++s;let o=r.length;o>1&&h(r.charCodeAt(1))&&(++s,o>2&&(h(r.charCodeAt(2))?++s:n=!1))}if(n){for(;s<t.length&&h(t.charCodeAt(s));)s++;s>=2&&(t=`\\${t.slice(s)}`)}return M.normalize(t)},relative(e,t){if(I(e,"from"),I(t,"to"),e===t)return"";let r=M.resolve(e),n=M.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";if(r.length!==e.length||n.length!==t.length){let w=r.split("\\"),p=n.split("\\");w[w.length-1]===""&&w.pop(),p[p.length-1]===""&&p.pop();let b=w.length,T=p.length,f=b<T?b:T,g;for(g=0;g<f&&w[g].toLowerCase()===p[g].toLowerCase();g++);return g===0?n:g===f?T>f?p.slice(g).join("\\"):b>f?"..\\".repeat(b-1-g)+"..":"":"..\\".repeat(b-g)+p.slice(g).join("\\")}let s=0;for(;s<e.length&&e.charCodeAt(s)===U;)s++;let o=e.length;for(;o-1>s&&e.charCodeAt(o-1)===U;)o--;let _=o-s,a=0;for(;a<t.length&&t.charCodeAt(a)===U;)a++;let l=t.length;for(;l-1>a&&t.charCodeAt(l-1)===U;)l--;let d=l-a,u=_<d?_:d,c=-1,m=0;for(;m<u;m++){let w=e.charCodeAt(s+m);if(w!==t.charCodeAt(a+m))break;w===U&&(c=m)}if(m!==u){if(c===-1)return n}else{if(d>u){if(t.charCodeAt(a+m)===U)return n.slice(a+m+1);if(m===2)return n.slice(a+m)}_>u&&(e.charCodeAt(s+m)===U?c=m:m===2&&(c=3)),c===-1&&(c=0)}let y="";for(m=s+c+1;m<=o;++m)(m===o||e.charCodeAt(m)===U)&&(y+=y.length===0?"..":"\\..");return a+=c,y.length>0?`${y}${n.slice(a,l)}`:(n.charCodeAt(a)===U&&++a,n.slice(a,l))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=M.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===U){if(t.charCodeAt(1)===U){let r=t.charCodeAt(2);if(r!==fr&&r!==ae)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(ne(t.charCodeAt(0))&&t.charCodeAt(1)===re&&t.charCodeAt(2)===U)return`\\\\?\\${t}`;return t},dirname(e){I(e,"path");let t=e.length;if(t===0)return".";let r=-1,n=0,s=e.charCodeAt(0);if(t===1)return h(s)?e:".";if(h(s)){if(r=n=1,h(e.charCodeAt(1))){let a=2,l=a;for(;a<t&&!h(e.charCodeAt(a));)a++;if(a<t&&a!==l){for(l=a;a<t&&h(e.charCodeAt(a));)a++;if(a<t&&a!==l){for(l=a;a<t&&!h(e.charCodeAt(a));)a++;if(a===t)return e;a!==l&&(r=n=a+1)}}}}else ne(s)&&e.charCodeAt(1)===re&&(r=t>2&&h(e.charCodeAt(2))?3:2,n=r);let o=-1,_=!0;for(let a=t-1;a>=n;--a)if(h(e.charCodeAt(a))){if(!_){o=a;break}}else _=!1;if(o===-1){if(r===-1)return".";o=r}return e.slice(0,o)},basename(e,t){t!==void 0&&I(t,"suffix"),I(e,"path");let r=0,n=-1,s=!0,o;if(e.length>=2&&ne(e.charCodeAt(0))&&e.charCodeAt(1)===re&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let _=t.length-1,a=-1;for(o=e.length-1;o>=r;--o){let l=e.charCodeAt(o);if(h(l)){if(!s){r=o+1;break}}else a===-1&&(s=!1,a=o+1),_>=0&&(l===t.charCodeAt(_)?--_===-1&&(n=o):(_=-1,n=a))}return r===n?n=a:n===-1&&(n=e.length),e.slice(r,n)}for(o=e.length-1;o>=r;--o)if(h(e.charCodeAt(o))){if(!s){r=o+1;break}}else n===-1&&(s=!1,n=o+1);return n===-1?"":e.slice(r,n)},extname(e){I(e,"path");let t=0,r=-1,n=0,s=-1,o=!0,_=0;e.length>=2&&e.charCodeAt(1)===re&&ne(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){let l=e.charCodeAt(a);if(h(l)){if(!o){n=a+1;break}continue}s===-1&&(o=!1,s=a+1),l===ae?r===-1?r=a:_!==1&&(_=1):r!==-1&&(_=-1)}return r===-1||s===-1||_===0||_===1&&r===s-1&&r===n+1?"":e.slice(r,s)},format:dt.bind(null,"\\"),parse(e){I(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let r=e.length,n=0,s=e.charCodeAt(0);if(r===1)return h(s)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(h(s)){if(n=1,h(e.charCodeAt(1))){let c=2,m=c;for(;c<r&&!h(e.charCodeAt(c));)c++;if(c<r&&c!==m){for(m=c;c<r&&h(e.charCodeAt(c));)c++;if(c<r&&c!==m){for(m=c;c<r&&!h(e.charCodeAt(c));)c++;c===r?n=c:c!==m&&(n=c+1)}}}}else if(ne(s)&&e.charCodeAt(1)===re){if(r<=2)return t.root=t.dir=e,t;if(n=2,h(e.charCodeAt(2))){if(r===3)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let o=-1,_=n,a=-1,l=!0,d=e.length-1,u=0;for(;d>=n;--d){if(s=e.charCodeAt(d),h(s)){if(!l){_=d+1;break}continue}a===-1&&(l=!1,a=d+1),s===ae?o===-1?o=d:u!==1&&(u=1):o!==-1&&(u=-1)}return a!==-1&&(o===-1||u===0||u===1&&o===a-1&&o===_+1?t.base=t.name=e.slice(_,a):(t.name=e.slice(_,o),t.base=e.slice(_,a),t.ext=e.slice(o,a))),_>0&&_!==n?t.dir=e.slice(0,_-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},hr=(()=>{if(B){let e=/\\/g;return()=>{let t=we().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>we()})(),N={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=0&&!r;n--){let s=e[n];I(s,`paths[${n}]`),s.length!==0&&(t=`${s}/${t}`,r=s.charCodeAt(0)===F)}if(!r){let n=hr();t=`${n}/${t}`,r=n.charCodeAt(0)===F}return t=Oe(t,!r,"/",Ve),r?`/${t}`:t.length>0?t:"."},normalize(e){if(I(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===F,r=e.charCodeAt(e.length-1)===F;return e=Oe(e,!t,"/",Ve),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return I(e,"path"),e.length>0&&e.charCodeAt(0)===F},join(...e){if(e.length===0)return".";let t=[];for(let r=0;r<e.length;++r){let n=e[r];I(n,"path"),n.length>0&&t.push(n)}return t.length===0?".":N.normalize(t.join("/"))},relative(e,t){if(I(e,"from"),I(t,"to"),e===t||(e=N.resolve(e),t=N.resolve(t),e===t))return"";let r=1,n=e.length,s=n-r,o=1,_=t.length-o,a=s<_?s:_,l=-1,d=0;for(;d<a;d++){let c=e.charCodeAt(r+d);if(c!==t.charCodeAt(o+d))break;c===F&&(l=d)}if(d===a)if(_>a){if(t.charCodeAt(o+d)===F)return t.slice(o+d+1);if(d===0)return t.slice(o+d)}else s>a&&(e.charCodeAt(r+d)===F?l=d:d===0&&(l=0));let u="";for(d=r+l+1;d<=n;++d)(d===n||e.charCodeAt(d)===F)&&(u+=u.length===0?"..":"/..");return`${u}${t.slice(o+l)}`},toNamespacedPath(e){return e},dirname(e){if(I(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===F,r=-1,n=!0;for(let s=e.length-1;s>=1;--s)if(e.charCodeAt(s)===F){if(!n){r=s;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&I(t,"suffix"),I(e,"path");let r=0,n=-1,s=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let _=t.length-1,a=-1;for(o=e.length-1;o>=0;--o){let l=e.charCodeAt(o);if(l===F){if(!s){r=o+1;break}}else a===-1&&(s=!1,a=o+1),_>=0&&(l===t.charCodeAt(_)?--_===-1&&(n=o):(_=-1,n=a))}return r===n?n=a:n===-1&&(n=e.length),e.slice(r,n)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===F){if(!s){r=o+1;break}}else n===-1&&(s=!1,n=o+1);return n===-1?"":e.slice(r,n)},extname(e){I(e,"path");let t=-1,r=0,n=-1,s=!0,o=0;for(let _=e.length-1;_>=0;--_){let a=e[_];if(a==="/"){if(!s){r=_+1;break}continue}n===-1&&(s=!1,n=_+1),a==="."?t===-1?t=_:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||n===-1||o===0||o===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:dt.bind(null,"/"),parse(e){I(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let r=e.charCodeAt(0)===F,n;r?(t.root="/",n=1):n=0;let s=-1,o=0,_=-1,a=!0,l=e.length-1,d=0;for(;l>=n;--l){let u=e.charCodeAt(l);if(u===F){if(!a){o=l+1;break}continue}_===-1&&(a=!1,_=l+1),u===ae?s===-1?s=l:d!==1&&(d=1):s!==-1&&(d=-1)}if(_!==-1){let u=o===0&&r?1:o;s===-1||d===0||d===1&&s===_-1&&s===o+1?t.base=t.name=e.slice(u,_):(t.name=e.slice(u,s),t.base=e.slice(u,_),t.ext=e.slice(s,_))}return o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};N.win32=M.win32=M;N.posix=M.posix=N;var vn=B?M.normalize:N.normalize,Sn=B?M.isAbsolute:N.isAbsolute,In=B?M.join:N.join,qe=B?M.resolve:N.resolve,An=B?M.relative:N.relative,Mn=B?M.dirname:N.dirname,ct=B?M.basename:N.basename,Rn=B?M.extname:N.extname,Cn=B?M.format:N.format,Nn=B?M.parse:N.parse,Pn=B?M.toNamespacedPath:N.toNamespacedPath,Fn=B?M.sep:N.sep,On=B?M.delimiter:N.delimiter;var wr=Le(),ke=class{constructor(){this.loadedLanguagesCache=new Map}loadLanguage(t){return this.loadedLanguagesCache.has(t)||this.loadedLanguagesCache.set(t,this._doLoadLanguage(t)),this.loadedLanguagesCache.get(t)}_doLoadLanguage(t){let n=`tree-sitter-${t==="csharp"?"c-sharp":t}.wasm`,s=ct(__dirname)==="dist"?qe(__dirname,n):qe(__dirname,"../../../../dist",n);return wr.Language.load(s)}};var ut=Le(),De=class e{static{this.INSTANCE=new e}static{this.CACHE_SIZE_PER_LANGUAGE=5}constructor(){this.caches=new Map,this.languageLoader=new ke,this._parser=null}get parser(){return this._parser||(this._parser=new ut),this._parser}async parse(t,r){await ut.init();let n=this.getParseTreeCache(t),s=n.get(r);if(s)return s.createReference();let o=await this.languageLoader.loadLanguage(t);if(this.parser.setLanguage(o),s=n.get(r),s)return s.createReference();let _=this.parser.parse(r);return s=new Ge(_),n.put(r,s),s.createReference()}dispose(){this._parser&&(this.parser.delete(),this._parser=null);for(let t of this.caches.values())t.dispose()}getParseTreeCache(t){let r=this.caches.get(t);return r||(r=new Ae(e.CACHE_SIZE_PER_LANGUAGE),this.caches.set(t,r)),r}},Ge=class{constructor(t){this._tree=new Ze(t)}dispose(){this._tree.deref()}createReference(){return new je(this._tree)}},je=class{constructor(t){this._parseTree=t;this._parseTree.ref()}get tree(){return this._parseTree.tree}dispose(){this._parseTree.deref()}},Ze=class{constructor(t){this._tree=t;this._refCount=1}get tree(){if(this._refCount===0)throw new Error("Cannot access disposed RefCountedParseTree");return this._tree}ref(){if(this._refCount===0)throw new Error("Cannot ref disposed RefCountedParseTree");this._refCount++}deref(){if(this._refCount===0)throw new Error("Cannot deref disposed RefCountedParseTree");this._refCount--,this._refCount===0&&this._tree.delete()}};function mt(){De.INSTANCE.dispose()}function S(e,t){return De.INSTANCE.parse(e,t)}function xr(e,t,r=0,n=e.length){let s=r,o=n;for(;s<o;){let _=Math.floor((s+o)/2);t(e[_])?s=_+1:o=_}return s-1}var ft=class e{constructor(t){this._array=t;this._findLastMonotonousLastIdx=0}static{this.assertInvariants=!1}findLastMonotonous(t){if(e.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=xr(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};function gt(e,t){for(let r of t)e.push(r)}var ht;(a=>{function e(l){return l<0}a.isLessThan=e;function t(l){return l<=0}a.isLessThanOrEqual=t;function r(l){return l>0}a.isGreaterThan=r;function n(l){return l===0}a.isNeitherLessOrGreaterThan=n,a.greaterThan=1,a.lessThan=-1,a.neitherLessOrGreaterThan=0})(ht||={});var pt=class e{constructor(t){this.iterate=t}static{this.empty=new e(t=>{})}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new e(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new e(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(s=>((n||ht.isGreaterThan(t(s,r)))&&(n=!1,r=s),!0)),r}};var Qe=class{constructor(t){this.language=t;this.map=new Map}getQuery(t){return this.map.has(t)||this.map.set(t,this.language.query(t)),this.map.get(t)}},ze=class e{constructor(){this.map=new Map}static{this.INSTANCE=new e}getQuery(t,r){return this.map.has(t)||this.map.set(t,new Qe(t)),this.map.get(t).getQuery(r)}};function W(e,t){let r=[];for(let n of e){let o=ze.INSTANCE.getQuery(t.tree.getLanguage(),n).matches(t);gt(r,o)}return r}function xe(e,t){switch(t){case"python":case"csharp":return e.children.find(r=>r.type.match(/identifier/))?.text;case"go":{let r=e.children.find(s=>s.type.match(/identifier/));return r?r.text:e.children.find(s=>s.type.match(/spec/))?.children.find(s=>s.type.match(/identifier/))?.text}case"javascript":case"javascriptreact":case"typescript":case"typescriptreact":case"cpp":{let r=e.children.find(s=>s.type.match(/declarator/));return r?r.children.find(s=>s.type.match(/identifier/))?.text:e.children.find(s=>s.type.match(/identifier/))?.text}case"java":return e.children.find(n=>n.type==="identifier")?.text;case"ruby":return e.children.find(r=>r.type.match(/constant|identifier/))?.text;default:return e.children.find(r=>r.type.match(/identifier/))?.text}}function Te(e,t){switch(t){case"typescript":case"tsx":case"javascript":return e.type.match(/definition|declaration|declarator|export_statement/);case"go":return e.type.match(/definition|declaration|declarator|var_spec/);case"cpp":return e.type.match(/definition|declaration|class_specifier/);case"ruby":return e.type.match(/module|class|method|assignment/);case"python":return e.type.match(/^(function_definition|class_definition|decorated_definition)$/);default:return e.type.match(/definition|declaration|declarator/)}}function Ue(e,t){return t!=="python"||e.type!=="decorated_definition"?e:e.children.find(r=>r.type==="function_definition"||r.type==="class_definition")??e}function _e(e,t,r,n=Te){let s=[e.rootNode],o=[];for(;;){let _=s.map(a=>[a,P.intersectionSize(a,t)]).filter(([a,l])=>l>0).sort(([a,l],[d,u])=>u-l);if(_.length===0)return o.length===0?void 0:tt(o,([a,l],[d,u])=>l-u)[0];{let a=_.map(([l,d])=>{let u=P.len(l),c=Math.abs(P.len(t)-d),y=(d-c)/u;return[l,y]});o.push(...a.filter(([l,d])=>n(l,r))),s=[],s.push(...a.flatMap(([l,d])=>l.children))}}}var x=(()=>{function e(t,...r){return t.length===1?t[0]:t.reduce((n,s,o)=>`${n}${s}${r[o]||""}`,"")}return{typescript:e,javascript:e,python:e,go:e,ruby:e,csharp:e,cpp:e,java:e,rust:e}})();function q(e,t){return Object.fromEntries(e.map(r=>[r,t]))}var Tr={javascript:[],typescript:[],tsx:[],python:[],csharp:[],go:[],java:[],ruby:[],cpp:[],rust:[]};function G(e){for(let t in e){let r=e[t];Tr[t].push(...r)}return e}var yt=G({...q(["javascript","typescript","tsx"],[`[
			(call_expression
				function: (identifier) @identifier)
			(call_expression
				function: (member_expression
					(property_identifier) @identifier))
		] @call_expression`]),python:[`[
			(call
				function: (identifier) @identifier)
			(call
				function: (attribute
					attribute: (identifier) @identifier))
		] @call_expression`],csharp:[`[
			(invocation_expression
				function: (identifier) @identifier)
			(invocation_expression
				function: (member_access_expression
					name: (identifier) @identifier))
		] @call_expression`],go:[`[
			(call_expression
				((selector_expression
					(field_identifier) @identifier)))
			(call_expression
				(identifier) @identifier)
		] @call_expression`],java:[`[
			(method_invocation
				name: (identifier) @identifier)
		] @call_expression`],ruby:[`[
			(call (identifier) @identifier
				(#not-match? @identifier "new|send|public_send|method"))
			(call
				receiver: (identifier)
				method: (identifier) @method
				(#match? @method "^(send|public_send|method)")
				arguments: (argument_list
					(simple_symbol) @symbol))
		] @call_expression`],cpp:[`[
			(function_declarator
				(identifier) @identifier)
			(function_declarator
				(field_identifier) @identifier)
			(call_expression (identifier) @identifier)
			(call_expression
				(field_expression
					field: (field_identifier) @identifier))
			(call_expression
				(call_expression
					(primitive_type)
					(argument_list
						(pointer_expression
						(identifier) @identifier))))
		] @call_expression`],rust:[`[
			(call_expression (identifier) @identifier)
			(call_expression (field_expression (identifier) (field_identifier) @identifier))
			(call_expression (scoped_identifier (identifier) (identifier) @identifier (#not-match? @identifier "new")))
		] @call_expression`]}),wt=G({...q(["javascript","typescript","tsx"],["(class_declaration) @class_declaration"]),java:["(class_declaration) @class_declaration"],csharp:["(class_declaration) @class_declaration"],python:["(class_definition) @class_declaration"],cpp:["(class_specifier) @class_declaration"],ruby:["(class) @class_declaration"],go:[`(type_declaration
			(type_spec
				(type_identifier) @type_identifier)) @class_declaration`],rust:["(impl_item (type_identifier) @type_identifier) @class_declaration"]}),xt=G({typescript:[`[
			(interface_declaration)
			(type_alias_declaration)
		] @type_declaration`],csharp:[`(interface_declaration
			(identifier) @type_identifier) @type_declaration`],cpp:[`[
			(struct_specifier
				(type_identifier) @type_identifier)
			(union_specifier
				(type_identifier) @type_identifier)
			(enum_specifier
				(type_identifier) @type_identifier)
		] @type_declaration`],java:[`(interface_declaration
			(identifier) @type_identifier) @type_declaration`],go:[`(type_declaration
			(type_spec
				(type_identifier) @type_identifier)) @type_declaration`],ruby:["((constant) @type_identifier) @type_declaration"],python:[`(class_definition
			(identifier) @type_identifier) @type_declaration`]}),Tt=G({typescript:["(type_identifier) @type_identifier"],go:["(type_identifier) @type_identifier"],ruby:["(constant) @type_identifier"],csharp:[`[
			(base_list
				(identifier) @type_identifier)
			(variable_declaration
				(identifier) @type_identifier)
		]`],cpp:["(type_identifier) @type_identifier"],java:["(type_identifier) @type_identifier"],python:[`[
			(type (identifier) @type_identifier)
			(argument_list
				(identifier) @type_identifier)
		]`]}),bt=G({...q(["javascript","typescript","tsx"],[`(new_expression
			constructor: (identifier) @new_expression)`]),python:[`(call
			function: (identifier) @new_expression)`],csharp:[`(object_creation_expression
			(identifier) @new_expression)`],java:[`(object_creation_expression
			(type_identifier) @new_expression)`],cpp:[`[
			(declaration
				(type_identifier) @new_expression)
			(class_specifier
				(type_identifier) @new_expression)
		]`],go:["(composite_literal (type_identifier) @new_expression)"],ruby:[`((call
			receiver: ((constant) @new_expression)
			method: (identifier) @method)
				(#eq? @method "new"))`],rust:[`(call_expression
			(scoped_identifier
				(identifier) @new_expression
				(identifier) @identifier
				(#eq? @identifier "new")))`]}),Et=G({python:[`[
			(function_definition
				name: (identifier) @identifier
				body: (block
						(expression_statement (string))? @docstring) @body)
			(assignment
				left: (identifier) @identifier
				right: (lambda) @body)
		] @function`,'(ERROR ("def" (identifier) (parameters))) @function'],...q(["javascript","typescript","tsx"],[`[
			(function_expression
				name: (identifier)? @identifier
				body: (statement_block) @body)
			(function_declaration
				name: (identifier)? @identifier
				body: (statement_block) @body)
			(generator_function
				name: (identifier)? @identifier
				body: (statement_block) @body)
			(generator_function_declaration
				name: (identifier)? @identifier
				body: (statement_block) @body)
			(method_definition
				name: (property_identifier)? @identifier
				body: (statement_block) @body)
			(arrow_function
				body: (statement_block) @body)
		] @function`]),go:[`[
			(function_declaration
				name: (identifier) @identifier
				body: (block) @body)
			(method_declaration
				name: (field_identifier) @identifier
				body: (block) @body)
		] @function`],ruby:[`[
			(method
				name: (_) @identifier
				parameters: (method_parameters)? @params
				[(_)+ "end"] @body)
			(singleton_method
				name: (_) @identifier
				parameters: (method_parameters)? @params
				[(_)+ "end"] @body)
		] @function`],csharp:[`[
			(constructor_declaration
				(identifier) @identifier
				(block) @body)
			(destructor_declaration
				(identifier) @identifier
				(block) @body)
			(operator_declaration
				(block) @body)
			(method_declaration
				(identifier) @identifier
				(block) @body)
			(local_function_statement
				(identifier) @identifier
				(block) @body)
		] @function`],cpp:[`[
			(function_definition
				(_
					(identifier) @identifier)
					(compound_statement) @body)
			(function_definition
				(function_declarator
					(qualified_identifier
						(identifier) @identifier))
					(compound_statement) @body)
		] @function`],java:[`[
			(constructor_declaration
				name: (identifier) @identifier
				body: (constructor_body) @body)
			(method_declaration
				name: (_) @identifier
				body: (block) @body)
			(lambda_expression
				body: (block) @body)
		] @function`],rust:[`[
			(function_item (identifier) @identifier)
			(let_declaration (identifier) @identifier)
		] @function`]}),ts=G({javascript:[x.javascript`((comment) @comment
			(#match? @comment "^\\\\/\\\\*\\\\*")) @docComment`],...q(["typescript","tsx"],[x.typescript`((comment) @comment
			(#match? @comment "^\\\\/\\\\*\\\\*")) @docComment`]),java:[x.java`((block_comment) @block_comment
			(#match? @block_comment "^\\\\/\\\\*\\\\*")) @docComment`],cpp:[x.cpp`((comment) @comment
			(#match? @comment "^\\\\/\\\\*\\\\*")) @docComment`],csharp:[x.csharp`(
			((comment) @c
				(#match? @c "^\\\\/\\\\/\\\\/"))+
		) @docComment`],rust:[x.rust`((line_comment) @comment
			(#match? @comment "^\/\/\/|^\/\/!"))+ @docComment`],go:[x.go`((comment)+) @docComment`],ruby:[x.ruby`((comment)+) @docComment`],python:[`(expression_statement
			(string) @docComment)`]}),vt=G({javascript:[x.javascript`[
			(identifier) @symbol
			(property_identifier) @symbol
			(private_property_identifier) @symbol
		]`],...q(["typescript","tsx"],[x.typescript`[
			(identifier) @symbol
			(type_identifier) @symbol
			(property_identifier) @symbol
			(private_property_identifier) @symbol
		]`]),cpp:[x.cpp`[
			(identifier) @symbol
			(type_identifier) @symbol
		]`],csharp:[x.csharp`[
			(identifier) @symbol
		]`],go:[x.go`[
			(identifier) @symbol
		]`],java:[x.java`[
			(identifier) @symbol
		]`],python:[x.python`[
			(identifier) @symbol
		]`],ruby:[x.ruby`[
			(identifier) @symbol
		]`],rust:[x.rust`[
			(identifier) @symbol
		]`]}),St=G({typescript:[x.typescript`
			[
				(comment) @comment ;; split into multiple comment kinds?

				(declaration) @declaration

				;; class declaration related
				(public_field_definition) @public_field_definition
				(method_definition) @method_definition
				(class_declaration (_ (method_signature) @method_signature))
				(abstract_method_signature) @abstract_method_signature

				;; enum declaration related
				(enum_assignment) @enum_assignment

				;; interface declaration related
				(interface_declaration (_ (method_signature) @method_signature))
				(interface_declaration (_ (property_signature) @property_signature))

				;; statements

				(import_statement) @import_statement
				(export_statement) @export_statement

				(expression_statement) @expression_statement

				(for_in_statement) @for_in_statement
				;; exclude any children found in the for loop condition
				(for_statement condition: (_) @for_statement.exclude_captures ) @for_statement
				(break_statement) @break_statement
				(continue_statement) @continue_statement
				(do_statement) @do_statement
				(if_statement) @if_statement
				(if_statement
					consequence: [
						(expression_statement)
						(if_statement)
					] @if_statement.exclude_captures)
				(else_clause
					[
						(expression_statement)
						(if_statement) ; for if-else chains
					] @else_clause.exclude_captures)
				(switch_statement) @switch_statement
				(switch_case) @switch_case
				(try_statement) @try_statement
				(throw_statement) @throw_statement
				(debugger_statement) @debugger_statement
				(return_statement) @return_statement
			]
		`],tsx:[x.typescript`
			[
				(comment) @comment ;; split into multiple comment kinds?

				(declaration) @declaration

				;; class declaration related
				(public_field_definition) @public_field_definition
				(method_definition) @method_definition
				(class_declaration (_ (method_signature) @method_signature))
				(abstract_method_signature) @abstract_method_signature

				;; enum declaration related
				(enum_assignment) @enum_assignment

				;; interface declaration related
				(interface_declaration (_ (method_signature) @method_signature))
				(interface_declaration (_ (property_signature) @property_signature))

				;; statements

				(import_statement) @import_statement
				(export_statement) @export_statement

				(expression_statement) @expression_statement

				(for_in_statement) @for_in_statement
				;; exclude any children found in the for loop condition
				(for_statement condition: (_) @for_statement.exclude_captures ) @for_statement
				(break_statement) @break_statement
				(continue_statement) @continue_statement
				(do_statement) @do_statement
				(if_statement) @if_statement
				(if_statement
					consequence: [
						(expression_statement)
						(if_statement)
					] @if_statement.exclude_captures)
				(else_clause
					[
						(expression_statement)
						(if_statement) ; for if-else chains
					] @else_clause.exclude_captures)
				(switch_statement) @switch_statement
				(switch_case) @switch_case
				(try_statement) @try_statement
				(throw_statement) @throw_statement
				(debugger_statement) @debugger_statement
				(return_statement) @return_statement

				;; jsx
				(jsx_element) @jsx_element
				(jsx_element (_ (jsx_expression) @jsx_expression))
			]
		`],python:[x.python`
			[
				(comment) @comment

				;; simple statements
				(assert_statement) @assert_statement
				(break_statement) @break_statement
				(continue_statement) @continue_statement
				(delete_statement) @delete_statement
				(exec_statement) @exec_statement
				(expression_statement) @expression_statement
				(future_import_statement) @future_import_statement
				(global_statement) @global_statement
				(import_from_statement) @import_from_statement
				(import_statement) @import_statement
				(nonlocal_statement) @nonlocal_statement
				(pass_statement) @pass_statement
				(print_statement) @print_statement
				(raise_statement) @raise_statement
				(return_statement) @return_statement
				(type_alias_statement) @type_alias_statement


				;; compound statements

				(class_definition) @class_definition
				(decorated_definition) @decorated_definition
				(for_statement) @for_statement
				(function_definition) @function_definition
				(if_statement) @if_statement
				(try_statement) @try_statement
				(while_statement) @while_statement
				(with_statement) @with_statement


				;; expressions

				(expression_list) @expression_list
				(expression_statement) @expression_statement
			]
		`],javascript:[x.javascript`
			[
				(comment) @comment ;; split into multiple comment kinds?

				(declaration) @declaration

				;; class declaration related

				(field_definition) @field_definition
				(method_definition) @method_definition

				;; statements

				(import_statement) @import_statement
				(export_statement) @export_statement

				(expression_statement) @expression_statement

				(for_in_statement) @for_in_statement
				;; exclude any children found in the for loop condition
				(for_statement condition: (_) @for_statement.exclude_captures ) @for_statement
				(break_statement) @break_statement
				(continue_statement) @continue_statement
				(do_statement) @do_statement
				(if_statement) @if_statement
				(switch_statement) @switch_statement
				(switch_case) @switch_case
				(try_statement) @try_statement
				(throw_statement) @throw_statement
				(debugger_statement) @debugger_statement
				(return_statement) @return_statement
			]`],go:[x.go`
		[
			(_statement) @statement
			(function_declaration) @function_declaration
			(import_declaration) @import_declaration
			(method_declaration) @method_declaration
			(package_clause) @package_clause

			(if_statement
				initializer: (_) @for_statement.exclude_captures) @for_statement

			(expression_case) @expression_case ;; e.g., case 0:
		]
		`],ruby:[x.ruby`
			[
				(comment) @comment

				(assignment) @assignment

				(if) @if

				(call) @call

				(case) @case

				(when) @when

				(while) @while

				(for) @for

				(method) @method

				(class) @class

				(module) @module

				(begin) @begin
			]
		`],csharp:[x.csharp`
			[
				(comment) @comment

				(class_declaration) @class_declaration
				(constructor_declaration) @constructor_declaration
				(method_declaration) @method_declaration
				(delegate_declaration) @delegate_declaration
				(enum_declaration) @enum_declaration
				(extern_alias_directive) @extern_alias_directive
				(file_scoped_namespace_declaration) @file_scoped_namespace_declaration
				(global_attribute) @global_attribute
				(global_statement) @global_statement
				(interface_declaration) @interface_declaration
				(namespace_declaration) @namespace_declaration
				(record_declaration) @record_declaration
				(struct_declaration) @struct_declaration
				(using_directive) @using_directive

				(local_declaration_statement) @local_declaration_statement
				(expression_statement) @expression_statement
				(for_statement) @for_statement
				(foreach_statement) @foreach_statement
				(continue_statement) @continue_statement
				(break_statement) @break_statement
				(throw_statement) @throw_statement
				(return_statement) @return_statement
				(try_statement) @try_statement
			]
		`],cpp:[x.cpp`
			[
				(preproc_ifdef) @preproc_ifdef
				(preproc_call) @preproc_call
				(preproc_def) @preproc_def
				(type_definition) @type_definition
				(type_definition
					type:(_) @type_definition.exclude_captures) @type_definition

				(declaration) @declaration

				(expression_statement) @expression_statement

				(comment) @comment

				(preproc_include) @preproc_include

				(namespace_definition) @namespace_definition

				(enum_specifier) @enum_specifier

				(struct_specifier) @struct_specifier

				(template_declaration) @template_declaration

				(function_definition) @function_definition

				(return_statement) @return_statement

				(class_specifier) @class_specifier

				(try_statement) @try_statement

				(throw_statement) @throw_statement

				(for_statement) @for_statement
				(for_statement
					initializer:(_) @for_statement.exclude_captures) @for_statement

				(for_range_loop) @for_range_loop

				(while_statement) @while_statement
				(do_statement) @do_statement
				(if_statement) @if_statement

				(labeled_statement) @labeled_statement
				(goto_statement) @goto_statement

				(break_statement) @break_statement
			]
		`],java:[x.java`
		[
			(statement) @statement ;; @ulugbekna: this includes (declaration); but somehow it can't capture inner classes

			(line_comment) @line_comment
			(block_comment) @block_comment

			(for_statement
				init: (_) @for_statement.exclude_captures)

			(block) @block.exclude_captures

			(class_declaration) @class_declaration

			(constructor_declaration) @constructor_declaration

			(field_declaration) @field_declaration

			(method_declaration) @method_declaration
		]
		`],rust:[]}),It={...q(["typescript","tsx"],["program","interface_declaration","class_declaration","function_declaration","function_expression","type_alias_declaration","method_definition"]),javascript:["program","class_declaration","function_declaration","function_expression","method_definition"],java:["program","class_declaration","interface_declaration","method_declaration"],cpp:["translation_unit","class_specifier","function_definition"],csharp:["compilation_unit","class_declaration","interface_declaration","method_declaration"],python:["module","class_definition","function_definition"],go:["source_file","type_declaration","function_declaration","method_declaration"],ruby:["program","method","class","method"],rust:["source_file","function_item","impl_item","let_declaration"]},At=G({typescript:[J("typescript")],tsx:[J("tsx")],javascript:[J("javascript")],java:[J("java")],cpp:[J("cpp")],csharp:[J("csharp")],python:[J("python")],go:[J("go")],ruby:[J("ruby")],rust:[J("rust")]}),Mt={...q(["typescript","tsx","javascript"],["for_in_statement","for_statement","if_statement","while_statement","do_statement","try_statement","switch_statement"]),java:["for_statement","enhanced_for_statement","if_statement","while_statement","do_statement","try_statement","switch_expression"],cpp:["for_statement","for_range_loop","if_statement","while_statement","do_statement","try_statement","switch_statement"],csharp:["for_statement","for_each_statement","if_statement","while_statement","do_statement","try_statement","switch_expression"],python:["for_statement","if_statement","while_statement","try_statement"],go:["for_statement","if_statement","type_switch_statement"],ruby:["while","for","if","case"],rust:["for_statement","if_statement","while_statement","loop_statement","match_expression"]},br={...q(["typescript","tsx"],["lexical_declaration","expression_statement","public_field_definition"]),javascript:["call_expression","expression_statement","variable_declaration","public_field_definition"],java:["expression_statement","local_variable_declaration","field_declaration"],cpp:["field_declaration","expression_statement","declaration"],csharp:["field_declaration","expression_statement"],python:["expression_statement"],go:["short_var_declaration","call_expression"],ruby:["call","assignment"],rust:["expression_statement","let_declaration","use_declaration","assignment_expression","macro_definition","extern_crate_declaration"]},Er={...q(["typescript","tsx"],["class_declaration","function_declaration","generator_function_declaration","interface_declaration","internal_module","method_definition","abstract_class_declaration","abstract_method_signature","enum_declaration"]),javascript:["class_declaration","function_declaration","generator_function_declaration","method_definition"],java:["class_declaration","constructor_declaration","enum_declaration","interface_declaration","method_declaration","module_declaration"],cpp:["class_specifier","function_definition","namespace_definition","struct_specifier"],csharp:["class_declaration","constructor_declaration","destructor_declaration","enum_declaration","interface_declaration","method_declaration","namespace_declaration","struct_declaration"],python:["function_definition","class_definition"],go:["function_declaration","method_declaration"],ruby:["class","method","module"],rust:["function_item","impl_item","mod_item","struct_item","trait_item","union_item"]},Rt=G({typescript:[K("typescript")],tsx:[K("tsx")],javascript:[K("javascript")],java:[K("java")],cpp:[K("cpp")],csharp:[K("csharp")],python:[K("python")],go:[K("go")],rust:[K("rust")],ruby:[K("ruby")]});function J(e){return It[e].map(t=>`(${t}) @scope`).join(`
`)}function K(e){return`[
		${Er[e].map(r=>`(${r})`).join(`
`)}
	] @definition`}function be(e,t){return It[e].includes(t.type)||Mt[e].includes(t.type)}function Ct(e,t){return Mt[e].includes(t.type)}function Ke(e,t){return br[e].includes(t.type)}var Nt={...q(["typescript","tsx"],[x.typescript`[
			(expression_statement
				(call_expression
					function: (identifier) @fn
					(#any-of? @fn "test" "it")
				)
			) @test
		]`]),javascript:[x.javascript`[
			(call_expression
				function: (identifier) @fn
				(#any-of? @fn "test" "it")
			) @test
		]`],python:[x.python`[
			(function_definition
				name: (identifier) @fn
				(#match? @fn "^test_")
			) @test
		]`],java:[x.java`[
			(method_declaration
				name: (identifier) @fn
				(#match? @fn "^test")
			) @test
		]`],go:[x.go`[
			(function_declaration
				name: (identifier) @fn
				(#match? @fn "^Test")
			) @test
		]`],ruby:[],csharp:[],cpp:[],rust:[]};var Ye=class{constructor(){this._cache=new ue(5)}setCacheSize(t){this._cache=new ue(t)}async getStructure(t,r){let n=`${t}:${r}`,s=this._cache.get(n);return s||(s=await this._getStructure(t,r),this._cache.put(n,s)),s}async _getStructure(t,r){let n=St[t];if(n.length===0)return;let s=await S(t,r);try{let o=W(n,s.tree.rootNode).flatMap(d=>d.captures).sort((d,u)=>P.compare(d.node,u.node)),_=[];for(let d of o)d.name.endsWith(".exclude_captures")&&_.push(P.ofSyntaxNode(d.node));let a=new pe(0,r.length,"root",[]),l=[a];for(let d=0;d<o.length;++d){let c=o[d].node;if(_.some(w=>P.isEqual(w,c)))continue;let m;do m=l.pop();while(m&&!P.doesContain(m,c));if(new Set(["export_statement","ambient_declaration"]).has(m.kind))m.kind=c.type,l.push(m);else{let w=c.type;(t==="typescript"||t==="tsx"||t==="javascript")&&w==="method_definition"&&c.namedChildren.some(g=>g.type==="property_identifier"&&g.text==="constructor")&&(w="constructor");let p=c.startIndex,b=c.previousSibling;if(b!==null){let E=r.substring(b.endIndex,c.startIndex).indexOf(`
`);E===-1?p=b.endIndex:p=b.endIndex+E+1}let T=c.endIndex;if(c.nextSibling!==null){let g=c.nextSibling;if(t==="typescript"||t==="tsx"||t==="javascript"||t==="cpp")for(;g&&(g.type===";"||g.type===","||g.type==="comment"&&!r.substring(T,g.startIndex).includes(`
`));)_.push(P.ofSyntaxNode(g)),T=g.endIndex,g=g.nextSibling;if(g!==null){let j=r.substring(T,g.startIndex).indexOf(`
`);j!==-1&&(T=T+j+1)}}let f=new pe(p,T,w,[]);m.children.push(f),l.push(m,f)}}return a}catch(o){console.error(o instanceof Error?o:new Error(o))}finally{s.dispose()}}},Pt=new Ye;async function Ft(e,t,r){let n=await S(e,t);try{let o=r.startIndex===r.endIndex?void 0:_e(n.tree,r,e);if(o){let u=Ue(o,e);return{nodeIdentifier:xe(u,e),nodeToDocument:ge.ofSyntaxNode(u),nodeSelectionBy:"matchingSelection"}}let a=n.tree.rootNode.descendantForIndex(r.startIndex,r.endIndex),l=0;for(;!Te(a,e)&&a.parent!==null;)a=a.parent,++l;return a=Ue(a,e),{nodeIdentifier:xe(a,e),nodeToDocument:ge.ofSyntaxNode(a),nodeSelectionBy:"expanding"}}finally{n.dispose()}}async function Ot(e,t,r){let n=await S(e,t);try{let s=n.tree.rootNode.descendantForIndex(r.startIndex,r.endIndex);if(s.type.match(/identifier/)&&(s.parent===null||Te(s.parent,e))){let o=s.parent===null?null:Ue(s.parent,e),_=o===null?void 0:{startIndex:o.startIndex,endIndex:o.endIndex};return{identifier:s.text,nodeRange:_}}}finally{n.dispose()}}async function Lt(e,t){let r=await S(e,t);try{let s=W(Nt[e],r.tree.rootNode).flatMap(_=>_.captures).sort((_,a)=>_.node.endIndex-a.node.endIndex).filter(_=>_.name==="test");if(s.length===0)return null;let o=s[s.length-1].node;return{startIndex:o.startIndex,endIndex:o.endIndex}}finally{r.dispose()}}var Us=Le();function vr(e,t){let r=At[e];return W(r,t)}function Ut(e,t){let r=Et[e];return W(r,t)}function Sr(e,t){let r=yt[e];return r?W(r,t):[]}function Ir(e,t){let r=wt[e];return r?W(r,t):[]}function Ar(e,t){let r=xt[e];return r?W(r,t):[]}function Mr(e,t){let r=Tt[e];return r?W(r,t):[]}function Rr(e,t){let r=bt[e];return r?W(r,t):[]}function Bt(e,t){let r=Rt[e];return W(r,t)}async function Cr(e,t,r){let n=await S(e,t);try{return Sr(e,n.tree.rootNode).reduce((_,a)=>{let l=a.captures.find(d=>d.name==="call_expression").node;if(P.doIntersect(r,l)){let d,u;e==="ruby"&&(u=a.captures.find(c=>c.name==="symbol")?.node,d=u?.text?.slice(1)),u??=a.captures.find(c=>c.name==="identifier")?.node,d??=u?.text,_.push({identifier:d??"",text:l.text,startIndex:(u??l).startIndex,endIndex:(u??l).endIndex})}return _},[])}finally{n.dispose()}}async function Nr(e,t){let r=await S(e,t);try{return Ut(e,r.tree.rootNode).map(o=>{let _=o.captures.find(l=>l.name==="function").node;return{identifier:o.captures.find(l=>l.name==="identifier")?.node.text??"",text:_.text,startIndex:_.startIndex,endIndex:_.endIndex}})}finally{r.dispose()}}async function Pr(e,t){let r=await S(e,t);try{return Ir(e,r.tree.rootNode).map(o=>{let _=o.captures.find(l=>l.name==="class_declaration").node;return{identifier:_?.children.find(l=>l.type==="type_identifier"||l.type==="identifier"||l.type==="constant")?.text??"",text:_.text,startIndex:_.startIndex,endIndex:_.endIndex}})}finally{r.dispose()}}async function Fr(e,t){let r=await S(e,t);try{return Ar(e,r.tree.rootNode).map(o=>{let _=o.captures.find(l=>l.name==="type_declaration").node,a=o.captures.find(l=>l.name==="type_identifier")?.node.text;return a||(a=_?.children.find(l=>l.type==="type_identifier")?.text),{identifier:a??"",text:_.text,startIndex:_.startIndex,endIndex:_.endIndex}})}finally{r.dispose()}}async function Or(e,t,r){let n=await S(e,t);try{return Mr(e,n.tree.rootNode).reduce((_,a)=>{let l=a.captures.find(d=>d.name==="type_identifier").node;return P.doIntersect(r,l)&&_.push({identifier:l.text,text:l.text,startIndex:l.startIndex,endIndex:l.endIndex}),_},[])}finally{n.dispose()}}async function Lr(e,t,r){let n=await S(e,t);try{return Rr(e,n.tree.rootNode).reduce((_,a)=>{let l=a.captures.find(d=>d.name==="new_expression").node;return P.doIntersect(r,l)&&_.push({identifier:l.text,text:l.text,startIndex:l.startIndex,endIndex:l.endIndex}),_},[])}finally{n.dispose()}}async function kr(e,t,r){let n=await S(e,t);try{let s=vt[e];return W(s,n.tree.rootNode).reduce((a,l)=>{let d=l.captures.find(u=>u.name==="symbol").node;return P.doIntersect(r,d)&&a.push({identifier:d.text,text:d.text,startIndex:d.startIndex,endIndex:d.endIndex}),a},[])}finally{n.dispose()}}async function Dr(e,t){let r=await S(e,t);try{let n=Bt(e,r.tree.rootNode);return Gr(e,n,r.tree.rootNode)}finally{r.dispose()}}async function Ur(e,t){let r=await S(e,t);try{let n=Bt(e,r.tree.rootNode);return Vt(e,n,r.tree.rootNode)}finally{r.dispose()}}async function Br(e,t){let r=await S(e,t);try{return Ut(e,r.tree.rootNode).map(o=>{let _=o.captures.find(a=>a.name==="body").node;return{startIndex:_.startIndex,endIndex:_.endIndex}})}finally{r.dispose()}}async function Wr(e,t,r){let n=await S(e,t);try{let s=vr(e,n.tree.rootNode),o;for(let _ of s){let a=_.captures[0].node,l=se.ofSyntaxNode(a);if(se.doesContain(l,r)&&(o=a),V.isBefore(r.endPosition,l.startPosition))break}if(o)return se.ofSyntaxNode(o);throw new Error("No parent node found")}finally{n.dispose()}}async function $r(e,t,r,n){let s=await S(e,t);try{let o=s.tree.rootNode.descendantForPosition(r.startPosition,r.endPosition),_={startPosition:o.startPosition,endPosition:o.endPosition},a=$t(e,o,n,r,!0);return se.equals(_,a)?Wt(e,o):a}finally{s.dispose()}}function Wt(e,t){let r=t.parent,n={startPosition:t.startPosition,endPosition:t.endPosition};if(be(e,t)||!r)return n;let{filteredRanges:s,indexOfInterest:o}=Ht(e,r.children,n,!1);if(o-1>=0&&o+1<=s.length-1){let _=s[o-1],a=s[o+1];return{startPosition:_.startPosition,endPosition:a.endPosition}}return Wt(e,r)}function $t(e,t,r,n,s){let o=t.children;if(t.endPosition.row-t.startPosition.row+1<=r){let a=be(e,t)?{startPosition:t.startPosition,endPosition:t.endPosition}:Dt(e,o,r,n,s),l=t.parent;return l?$t(e,l,r,a,!1):a}return Dt(e,o,r,n,s)}function kt(e,t){return t.endPosition.row-e.startPosition.row+1}function Dt(e,t,r,n,s){if(t.length===0)return n;let{filteredRanges:o,indexOfInterest:_}=Ht(e,t,n,s),a=0,l=o.length-1,d=o[a],u=o[l];for(;kt(d,u)>r&&a!==l;)_-a<l-_?(l--,u=o[l]):(a++,d=o[a]);return kt(d,u)<=r?{startPosition:d.startPosition,endPosition:u.endPosition}:n}function Ht(e,t,r,n){let s,o;if(n?(s=t.filter(_=>be(e,_)||Ke(e,_)),o=et(s,r,(_,a)=>V.isBefore(_.startPosition,a.startPosition)),s.splice(o,0,r)):(s=t.filter(_=>se.doesContain(_,r)||be(e,_)||Ke(e,_)),o=s.findIndex(_=>se.doesContain(_,r))),o===-1)throw new Error("Valid index not found");return{filteredRanges:s,indexOfInterest:o}}async function Hr(e,t,r){let n=[],_=(await S(e,t)).tree.rootNode.descendantForIndex(r.startIndex,r.endIndex);for(;_!==null;)Ct(e,_)&&n.push({startIndex:_.startIndex,endIndex:_.endIndex}),_=_.parent;return n}async function Vr(e,t,r){let n=await S(e,t);try{let s=r.startIndex===r.endIndex;if(s)return;let o=s?void 0:_e(n.tree,r,e),_=s?void 0:_e(n.tree,r,e,qr);if(_&&o)return{nodeIdentifier:xe(o,e),nodeToExplain:ge.ofSyntaxNode(_)}}finally{n.dispose()}}function qr(e,t){return e.type.match(/definition/)}function Vt(e,t,r){let n=new Map;t.forEach(o=>{let a=o.captures.find(u=>u.name==="definition")?.node,l;e==="cpp"&&a?.type==="function_definition"?l=a?.childForFieldName("declarator")?.childForFieldName("declarator"):e==="rust"&&a?.type==="impl_item"?l=a?.childForFieldName("trait"):l=a?.childForFieldName("name");let d=a?.childForFieldName("body");if(a&&d){switch(e){case"typescript":case"javascript":{let{definition:c}=qt(a);a=c;break}}n.get(a.id)||n.set(a.id,{mainBlock:k.ofSyntaxNode(a),detailBlocks:{body:k.ofSyntaxNode(d),name:l?.text}})}});let s=Array.from(n.values());return new he(s,k.ofSyntaxNode(r))}function Gr(e,t,r){let n;switch(e){case"python":n=zr(t);break;case"ruby":n=Qr(t);break;default:{n=jr(t,e);break}}return new he(n,k.ofSyntaxNode(r))}function jr(e,t){let r=new Map;return e.forEach(n=>{let o=n.captures.find(a=>a.name==="definition")?.node,_=o?.childForFieldName("body");if(o&&_){let a;switch(t){case"typescript":case"javascript":{let{definition:d,comments:u}=qt(o);o=d,a=u;break}case"java":case"rust":a=Jr(o);break;default:{a=Ee(o);break}}r.get(o.id)||r.set(o.id,{mainBlock:k.ofSyntaxNode(o),detailBlocks:{comments:a.map(d=>k.ofSyntaxNode(d)),body:k.ofSyntaxNode(_)}})}}),Array.from(r.values())}function Zr(e){if(!(e.length<2))for(let t=1;t<e.length;t++){let r=e[t];if(!r.type.includes("parameters"))return r}}function Qr(e){let t=new Map;return e.forEach(r=>{let s=r.captures.find(o=>o.name==="definition")?.node;if(s){let o=s.namedChildren,_=Zr(o);if(_){let a=o[o.length-1],l=s.text.substring(_.startIndex-s.startIndex,a.endIndex-s.startIndex),d=Ee(s);t.get(s.id)||t.set(s.id,{mainBlock:k.ofSyntaxNode(s),detailBlocks:{comments:d.map(c=>k.ofSyntaxNode(c)),body:{range:{startPosition:{row:_.startPosition.row,column:_.startPosition.column},endPosition:{row:a.endPosition.row,column:a.endPosition.column}},startIndex:_.startIndex,text:l,endIndex:a.endIndex}}})}}}),Array.from(t.values())}function zr(e){let t=new Map;return e.forEach(r=>{let s=r.captures.find(_=>_.name==="definition")?.node,o=s?.childForFieldName("body");if(s&&o){let _=Yr(o),a=Kr(s);t.set(s.id,{mainBlock:k.ofSyntaxNode(s),detailBlocks:{docstring:_?k.ofSyntaxNode(_):void 0,decorator:a?k.ofSyntaxNode(a):void 0,body:k.ofSyntaxNode(o)}});return}}),Array.from(t.values())}function Ee(e,t=["comment"]){let r=[],n=e.previousNamedSibling;for(;n&&t.some(s=>s===n?.type);)r.push(n),n=n.previousNamedSibling;return r.reverse()}function qt(e){let t=e.parent;return t?.type==="export_statement"?{definition:t,comments:Ee(t)}:{definition:e,comments:Ee(e)}}function Jr(e){return Ee(e,["block_comment","line_comment"])}function Kr(e){let t=e.previousNamedSibling;return t?.type==="decorator"?t:void 0}function Yr(e){let t=e.firstChild;if(!t||t.type!=="expression_statement")return;let r=t.firstChild;return r?.type==="string"?r:void 0}function Xr(e,t){return Pt.getStructure(e,t)}async function en(e,t){let r=await S(e,t);try{let s=function(o){let _=o.type==="ERROR"?1:0;for(let a of o.children)_+=s(a);return _};var n=s;return r.tree.rootNode.hasError?s(r.tree.rootNode):0}finally{r.dispose()}}function tn(){let e=Gt.parentPort;if(!e)throw new Error("This module should only be used in a worker thread.");e.on("message",async({id:t,fn:r,args:n})=>{try{let s=await Xe[r](...n);e.postMessage({id:t,res:s})}catch(s){e.postMessage({id:t,err:s})}})}tn();
//!!! DO NOT modify, this file was COPIED from 'microsoft/vscode'