@lpc-lang/core 1.1.2-5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/README.md +255 -0
  2. package/bin/lpc +4 -0
  3. package/bin/lpcserver +4 -0
  4. package/cancellationToken/cancellationToken.d.ts +8 -0
  5. package/cancellationToken/cancellationToken.d.ts.map +1 -0
  6. package/cancellationToken/serverCancellationToken.d.ts +21 -0
  7. package/cancellationToken/serverCancellationToken.d.ts.map +1 -0
  8. package/cli/_namespaces/lpc.d.ts +2 -0
  9. package/cli/_namespaces/lpc.d.ts.map +1 -0
  10. package/cli/lpc.d.ts +2 -0
  11. package/cli/lpc.d.ts.map +1 -0
  12. package/compiler/LpcConfig.d.ts +17 -0
  13. package/compiler/LpcConfig.d.ts.map +1 -0
  14. package/compiler/_namespaces/lpc.d.ts +49 -0
  15. package/compiler/_namespaces/lpc.d.ts.map +1 -0
  16. package/compiler/_namespaces/lpc.moduleSpecifiers.d.ts +2 -0
  17. package/compiler/_namespaces/lpc.moduleSpecifiers.d.ts.map +1 -0
  18. package/compiler/_namespaces/lpc.performance.d.ts +2 -0
  19. package/compiler/_namespaces/lpc.performance.d.ts.map +1 -0
  20. package/compiler/binder.d.ts +2 -0
  21. package/compiler/binder.d.ts.map +1 -0
  22. package/compiler/builderPublic.d.ts +76 -0
  23. package/compiler/builderPublic.d.ts.map +1 -0
  24. package/compiler/checker.d.ts +2 -0
  25. package/compiler/checker.d.ts.map +1 -0
  26. package/compiler/commandLineParser.d.ts +47 -0
  27. package/compiler/commandLineParser.d.ts.map +1 -0
  28. package/compiler/core.d.ts +3 -0
  29. package/compiler/core.d.ts.map +1 -0
  30. package/compiler/corePublic.d.ts +19 -0
  31. package/compiler/corePublic.d.ts.map +1 -0
  32. package/compiler/debug.d.ts +71 -0
  33. package/compiler/debug.d.ts.map +1 -0
  34. package/compiler/diagnosticInformation.d.ts +518 -0
  35. package/compiler/diagnosticInformation.d.ts.map +1 -0
  36. package/compiler/emitter.d.ts +11 -0
  37. package/compiler/emitter.d.ts.map +1 -0
  38. package/compiler/executeCommandLine.d.ts +15 -0
  39. package/compiler/executeCommandLine.d.ts.map +1 -0
  40. package/compiler/expressionToTypeNode.d.ts +2 -0
  41. package/compiler/expressionToTypeNode.d.ts.map +1 -0
  42. package/compiler/factory/baseNodeFactory.d.ts +2 -0
  43. package/compiler/factory/baseNodeFactory.d.ts.map +1 -0
  44. package/compiler/factory/emitHelper.d.ts +2 -0
  45. package/compiler/factory/emitHelper.d.ts.map +1 -0
  46. package/compiler/factory/emitNode.d.ts +22 -0
  47. package/compiler/factory/emitNode.d.ts.map +1 -0
  48. package/compiler/factory/nodeChildren.d.ts +2 -0
  49. package/compiler/factory/nodeChildren.d.ts.map +1 -0
  50. package/compiler/factory/nodeConverters.d.ts +2 -0
  51. package/compiler/factory/nodeConverters.d.ts.map +1 -0
  52. package/compiler/factory/nodeFactory.d.ts +4 -0
  53. package/compiler/factory/nodeFactory.d.ts.map +1 -0
  54. package/compiler/factory/parenthesizerRules.d.ts +2 -0
  55. package/compiler/factory/parenthesizerRules.d.ts.map +1 -0
  56. package/compiler/factory/utilities.d.ts +2 -0
  57. package/compiler/factory/utilities.d.ts.map +1 -0
  58. package/compiler/factory/utilitiesPublic.d.ts +4 -0
  59. package/compiler/factory/utilitiesPublic.d.ts.map +1 -0
  60. package/compiler/lpcFileHandler.d.ts +10 -0
  61. package/compiler/lpcFileHandler.d.ts.map +1 -0
  62. package/compiler/lpcJsHelpers.d.ts +17 -0
  63. package/compiler/lpcJsHelpers.d.ts.map +1 -0
  64. package/compiler/lpcbuild.d.ts +2 -0
  65. package/compiler/lpcbuild.d.ts.map +1 -0
  66. package/compiler/lpcbuildPublic.d.ts +26 -0
  67. package/compiler/lpcbuildPublic.d.ts.map +1 -0
  68. package/compiler/moduleNameResolver.d.ts +55 -0
  69. package/compiler/moduleNameResolver.d.ts.map +1 -0
  70. package/compiler/moduleSpecifiers.d.ts +2 -0
  71. package/compiler/moduleSpecifiers.d.ts.map +1 -0
  72. package/compiler/nodeTests.d.ts +115 -0
  73. package/compiler/nodeTests.d.ts.map +1 -0
  74. package/compiler/parser.d.ts +65 -0
  75. package/compiler/parser.d.ts.map +1 -0
  76. package/compiler/path.d.ts +2 -0
  77. package/compiler/path.d.ts.map +1 -0
  78. package/compiler/perfLoger.d.ts +2 -0
  79. package/compiler/perfLoger.d.ts.map +1 -0
  80. package/compiler/performance.d.ts +2 -0
  81. package/compiler/performance.d.ts.map +1 -0
  82. package/compiler/performanceCore.d.ts +2 -0
  83. package/compiler/performanceCore.d.ts.map +1 -0
  84. package/compiler/program.d.ts +72 -0
  85. package/compiler/program.d.ts.map +1 -0
  86. package/compiler/resolutionCache.d.ts +6 -0
  87. package/compiler/resolutionCache.d.ts.map +1 -0
  88. package/compiler/resolver.d.ts +1 -0
  89. package/compiler/resolver.d.ts.map +1 -0
  90. package/compiler/scanner.d.ts +85 -0
  91. package/compiler/scanner.d.ts.map +1 -0
  92. package/compiler/sourcemap.d.ts +2 -0
  93. package/compiler/sourcemap.d.ts.map +1 -0
  94. package/compiler/sys.d.ts +56 -0
  95. package/compiler/sys.d.ts.map +1 -0
  96. package/compiler/tracing.d.ts +31 -0
  97. package/compiler/tracing.d.ts.map +1 -0
  98. package/compiler/transformers/declarations.d.ts +2 -0
  99. package/compiler/transformers/declarations.d.ts.map +1 -0
  100. package/compiler/transformers.d.ts +2 -0
  101. package/compiler/transformers.d.ts.map +1 -0
  102. package/compiler/types.d.ts +3284 -0
  103. package/compiler/types.d.ts.map +1 -0
  104. package/compiler/utilities.d.ts +57 -0
  105. package/compiler/utilities.d.ts.map +1 -0
  106. package/compiler/utilitiesPublic.d.ts +213 -0
  107. package/compiler/utilitiesPublic.d.ts.map +1 -0
  108. package/compiler/visitorPublic.d.ts +72 -0
  109. package/compiler/visitorPublic.d.ts.map +1 -0
  110. package/compiler/watch.d.ts +2 -0
  111. package/compiler/watch.d.ts.map +1 -0
  112. package/compiler/watchPublic.d.ts +44 -0
  113. package/compiler/watchPublic.d.ts.map +1 -0
  114. package/compiler/watchUtilities.d.ts +14 -0
  115. package/compiler/watchUtilities.d.ts.map +1 -0
  116. package/config-types.d.ts +33 -0
  117. package/config-types.d.ts.map +1 -0
  118. package/harness/harnessIO.d.ts +4 -0
  119. package/harness/harnessIO.d.ts.map +1 -0
  120. package/lpc/_namespaces/lpc.d.ts +6 -0
  121. package/lpc/_namespaces/lpc.d.ts.map +1 -0
  122. package/lpc/_namespaces/lpc.server.d.ts +2 -0
  123. package/lpc/_namespaces/lpc.server.d.ts.map +1 -0
  124. package/lpc/lpc.d.ts +2 -0
  125. package/lpc/lpc.d.ts.map +1 -0
  126. package/lpcserver/document.d.ts +1 -0
  127. package/lpcserver/document.d.ts.map +1 -0
  128. package/lpcserver/nodeServer.d.ts +25 -0
  129. package/lpcserver/nodeServer.d.ts.map +1 -0
  130. package/lpcserver/protocol.const.d.ts +46 -0
  131. package/lpcserver/protocol.const.d.ts.map +1 -0
  132. package/lpcserver/server.d.ts +3 -0
  133. package/lpcserver/server.d.ts.map +1 -0
  134. package/lpcserver/textRendering.d.ts +14 -0
  135. package/lpcserver/textRendering.d.ts.map +1 -0
  136. package/lpcserver/typeConverters.d.ts +44 -0
  137. package/lpcserver/typeConverters.d.ts.map +1 -0
  138. package/lpcserver/utils.d.ts +14 -0
  139. package/lpcserver/utils.d.ts.map +1 -0
  140. package/package.json +48 -0
  141. package/parse-fluff-docs.d.ts +2 -0
  142. package/parse-fluff-docs.d.ts.map +1 -0
  143. package/parse-ld-docs.d.ts +2 -0
  144. package/parse-ld-docs.d.ts.map +1 -0
  145. package/server/_namespaces/lpc.d.ts +5 -0
  146. package/server/_namespaces/lpc.d.ts.map +1 -0
  147. package/server/_namespaces/lpc.server.d.ts +11 -0
  148. package/server/_namespaces/lpc.server.d.ts.map +1 -0
  149. package/server/_namespaces/lpc.server.protocol.d.ts +2 -0
  150. package/server/_namespaces/lpc.server.protocol.d.ts.map +1 -0
  151. package/server/editorServices.d.ts +261 -0
  152. package/server/editorServices.d.ts.map +1 -0
  153. package/server/project.d.ts +143 -0
  154. package/server/project.d.ts.map +1 -0
  155. package/server/protocol.d.ts +962 -0
  156. package/server/protocol.d.ts.map +1 -0
  157. package/server/scriptInfo.d.ts +53 -0
  158. package/server/scriptInfo.d.ts.map +1 -0
  159. package/server/scriptVersionCache.d.ts +2 -0
  160. package/server/scriptVersionCache.d.ts.map +1 -0
  161. package/server/session.d.ts +150 -0
  162. package/server/session.d.ts.map +1 -0
  163. package/server/types.d.ts +24 -0
  164. package/server/types.d.ts.map +1 -0
  165. package/server/utilities.d.ts +2 -0
  166. package/server/utilities.d.ts.map +1 -0
  167. package/server/utilitiesPublic.d.ts +37 -0
  168. package/server/utilitiesPublic.d.ts.map +1 -0
  169. package/server.d.ts +2 -0
  170. package/server.d.ts.map +1 -0
  171. package/services/_namespaces/lpc.Completions.StringCompletions.d.ts +2 -0
  172. package/services/_namespaces/lpc.Completions.StringCompletions.d.ts.map +1 -0
  173. package/services/_namespaces/lpc.Completions.d.ts +4 -0
  174. package/services/_namespaces/lpc.Completions.d.ts.map +1 -0
  175. package/services/_namespaces/lpc.FindAllReferences.d.ts +3 -0
  176. package/services/_namespaces/lpc.FindAllReferences.d.ts.map +1 -0
  177. package/services/_namespaces/lpc.GoToDefinition.d.ts +2 -0
  178. package/services/_namespaces/lpc.GoToDefinition.d.ts.map +1 -0
  179. package/services/_namespaces/lpc.JsDoc.d.ts +2 -0
  180. package/services/_namespaces/lpc.JsDoc.d.ts.map +1 -0
  181. package/services/_namespaces/lpc.NavigationBar.d.ts +2 -0
  182. package/services/_namespaces/lpc.NavigationBar.d.ts.map +1 -0
  183. package/services/_namespaces/lpc.Rename.d.ts +2 -0
  184. package/services/_namespaces/lpc.Rename.d.ts.map +1 -0
  185. package/services/_namespaces/lpc.SignatureHelp.d.ts +2 -0
  186. package/services/_namespaces/lpc.SignatureHelp.d.ts.map +1 -0
  187. package/services/_namespaces/lpc.SymbolDisplay.d.ts +2 -0
  188. package/services/_namespaces/lpc.SymbolDisplay.d.ts.map +1 -0
  189. package/services/_namespaces/lpc.codefix.d.ts +3 -0
  190. package/services/_namespaces/lpc.codefix.d.ts.map +1 -0
  191. package/services/_namespaces/lpc.d.ts +30 -0
  192. package/services/_namespaces/lpc.d.ts.map +1 -0
  193. package/services/_namespaces/lpc.formatting.d.ts +7 -0
  194. package/services/_namespaces/lpc.formatting.d.ts.map +1 -0
  195. package/services/_namespaces/lpc.textChanges.d.ts +2 -0
  196. package/services/_namespaces/lpc.textChanges.d.ts.map +1 -0
  197. package/services/classifier2020.d.ts +2 -0
  198. package/services/classifier2020.d.ts.map +1 -0
  199. package/services/codefixes/helpers.d.ts +2 -0
  200. package/services/codefixes/helpers.d.ts.map +1 -0
  201. package/services/codefixes/importFixes.d.ts +2 -0
  202. package/services/codefixes/importFixes.d.ts.map +1 -0
  203. package/services/completions.d.ts +2 -0
  204. package/services/completions.d.ts.map +1 -0
  205. package/services/documentRegistry.d.ts +90 -0
  206. package/services/documentRegistry.d.ts.map +1 -0
  207. package/services/exportInfoMap.d.ts +5 -0
  208. package/services/exportInfoMap.d.ts.map +1 -0
  209. package/services/findAllReferences.d.ts +2 -0
  210. package/services/findAllReferences.d.ts.map +1 -0
  211. package/services/formatting/formatting.d.ts +2 -0
  212. package/services/formatting/formatting.d.ts.map +1 -0
  213. package/services/formatting/formattingContext.d.ts +2 -0
  214. package/services/formatting/formattingContext.d.ts.map +1 -0
  215. package/services/formatting/rule.d.ts +2 -0
  216. package/services/formatting/rule.d.ts.map +1 -0
  217. package/services/formatting/rules.d.ts +2 -0
  218. package/services/formatting/rules.d.ts.map +1 -0
  219. package/services/formatting/rulesMap.d.ts +2 -0
  220. package/services/formatting/rulesMap.d.ts.map +1 -0
  221. package/services/formatting/smartIndenter.d.ts +2 -0
  222. package/services/formatting/smartIndenter.d.ts.map +1 -0
  223. package/services/goToDefinition.d.ts +2 -0
  224. package/services/goToDefinition.d.ts.map +1 -0
  225. package/services/importTracker.d.ts +2 -0
  226. package/services/importTracker.d.ts.map +1 -0
  227. package/services/jsDoc.d.ts +2 -0
  228. package/services/jsDoc.d.ts.map +1 -0
  229. package/services/navigationBar.d.ts +2 -0
  230. package/services/navigationBar.d.ts.map +1 -0
  231. package/services/rename.d.ts +2 -0
  232. package/services/rename.d.ts.map +1 -0
  233. package/services/services.d.ts +54 -0
  234. package/services/services.d.ts.map +1 -0
  235. package/services/signatureHelp.d.ts +2 -0
  236. package/services/signatureHelp.d.ts.map +1 -0
  237. package/services/sourcemaps.d.ts +2 -0
  238. package/services/sourcemaps.d.ts.map +1 -0
  239. package/services/stringCompletions.d.ts +2 -0
  240. package/services/stringCompletions.d.ts.map +1 -0
  241. package/services/suggestionDiagnostics.d.ts +2 -0
  242. package/services/suggestionDiagnostics.d.ts.map +1 -0
  243. package/services/symbolDisplay.d.ts +2 -0
  244. package/services/symbolDisplay.d.ts.map +1 -0
  245. package/services/textChanges.d.ts +2 -0
  246. package/services/textChanges.d.ts.map +1 -0
  247. package/services/types.d.ts +901 -0
  248. package/services/types.d.ts.map +1 -0
  249. package/services/utilities.d.ts +3 -0
  250. package/services/utilities.d.ts.map +1 -0
  251. package/src/cli.js +58 -0
  252. package/src/cli.js.map +7 -0
  253. package/src/efuns/fluffos/arrays.h +205 -0
  254. package/src/efuns/fluffos/async.h +84 -0
  255. package/src/efuns/fluffos/buffers.h +80 -0
  256. package/src/efuns/fluffos/calls.h +275 -0
  257. package/src/efuns/fluffos/contrib.h +805 -0
  258. package/src/efuns/fluffos/db.h +125 -0
  259. package/src/efuns/fluffos/driver.h +107 -0
  260. package/src/efuns/fluffos/ed.h +48 -0
  261. package/src/efuns/fluffos/efuns.fluffos.h +75 -0
  262. package/src/efuns/fluffos/external.h +30 -0
  263. package/src/efuns/fluffos/filesystem.h +154 -0
  264. package/src/efuns/fluffos/floats.h +136 -0
  265. package/src/efuns/fluffos/functions.h +104 -0
  266. package/src/efuns/fluffos/general.h +548 -0
  267. package/src/efuns/fluffos/interactive.h +777 -0
  268. package/src/efuns/fluffos/internals.h +455 -0
  269. package/src/efuns/fluffos/lpc-config.json +10 -0
  270. package/src/efuns/fluffos/mappings.h +205 -0
  271. package/src/efuns/fluffos/misc.h +43 -0
  272. package/src/efuns/fluffos/mudlib.h +228 -0
  273. package/src/efuns/fluffos/numbers.h +41 -0
  274. package/src/efuns/fluffos/objects.h +365 -0
  275. package/src/efuns/fluffos/parsing.h +220 -0
  276. package/src/efuns/fluffos/pcre.h +75 -0
  277. package/src/efuns/fluffos/sockets.h +276 -0
  278. package/src/efuns/fluffos/strings.h +542 -0
  279. package/src/efuns/fluffos/system.h +408 -0
  280. package/src/efuns/fluffos/zh-cn/arrays.zh-cn.h +167 -0
  281. package/src/efuns/fluffos/zh-cn/async.zh-cn.h +81 -0
  282. package/src/efuns/fluffos/zh-cn/buffers.zh-cn.h +69 -0
  283. package/src/efuns/fluffos/zh-cn/calls.zh-cn.h +242 -0
  284. package/src/efuns/fluffos/zh-cn/contrib.zh-cn.h +767 -0
  285. package/src/efuns/fluffos/zh-cn/db.zh-cn.h +113 -0
  286. package/src/efuns/fluffos/zh-cn/ed.zh-cn.h +42 -0
  287. package/src/efuns/fluffos/zh-cn/efuns.fluffos.h +76 -0
  288. package/src/efuns/fluffos/zh-cn/external.zh-cn.h +25 -0
  289. package/src/efuns/fluffos/zh-cn/filesystem.zh-cn.h +140 -0
  290. package/src/efuns/fluffos/zh-cn/floats.zh-cn.h +129 -0
  291. package/src/efuns/fluffos/zh-cn/functions.zh-cn.h +87 -0
  292. package/src/efuns/fluffos/zh-cn/general.zh-cn.h +506 -0
  293. package/src/efuns/fluffos/zh-cn/interactive.zh-cn.h +659 -0
  294. package/src/efuns/fluffos/zh-cn/internals.zh-cn.h +356 -0
  295. package/src/efuns/fluffos/zh-cn/mappings.zh-cn.h +188 -0
  296. package/src/efuns/fluffos/zh-cn/misc.zh-cn.h +43 -0
  297. package/src/efuns/fluffos/zh-cn/mudlib.zh-cn.h +190 -0
  298. package/src/efuns/fluffos/zh-cn/numbers.zh-cn.h +36 -0
  299. package/src/efuns/fluffos/zh-cn/objects.zh-cn.h +280 -0
  300. package/src/efuns/fluffos/zh-cn/parsing.zh-cn.h +212 -0
  301. package/src/efuns/fluffos/zh-cn/pcre.zh-cn.h +67 -0
  302. package/src/efuns/fluffos/zh-cn/sockets.zh-cn.h +230 -0
  303. package/src/efuns/fluffos/zh-cn/strings.zh-cn.h +484 -0
  304. package/src/efuns/fluffos/zh-cn/system.zh-cn.h +366 -0
  305. package/src/efuns/ldmud/defines.h +69 -0
  306. package/src/efuns/ldmud/efun.h +10449 -0
  307. package/src/efuns/ldmud/efuns.ldmud.h +87 -0
  308. package/src/efuns/ldmud/lpc-config.json +9 -0
  309. package/src/efuns/ldmud/obsolete.h +2168 -0
  310. package/src/lpc.js +82486 -0
  311. package/src/lpc.js.map +6 -0
  312. package/src/server.js +129 -0
  313. package/src/server.js.map +7 -0
  314. package/types.d.ts +23 -0
  315. package/types.d.ts.map +1 -0
  316. package/utils.d.ts +21 -0
  317. package/utils.d.ts.map +1 -0
package/src/server.js ADDED
@@ -0,0 +1,129 @@
1
+ // Copyright 2024 John L Chmura
2
+
3
+ var dae=Object.create;var ck=Object.defineProperty;var fae=Object.getOwnPropertyDescriptor;var pae=Object.getOwnPropertyNames;var mae=Object.getPrototypeOf,gae=Object.prototype.hasOwnProperty;var yae=(e,n)=>()=>(e&&(n=e(e=0)),n);var Zt=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),cl=(e,n)=>{for(var r in n)ck(e,r,{get:n[r],enumerable:!0})},oW=(e,n,r,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of pae(n))!gae.call(e,a)&&a!==r&&ck(e,a,{get:()=>n[a],enumerable:!(i=fae(n,a))||i.enumerable});return e};var ig=(e,n,r)=>(r=e!=null?dae(mae(e)):{},oW(n||!e||!e.__esModule?ck(r,"default",{value:e,enumerable:!0}):r,e)),hae=e=>oW(ck({},"__esModule",{value:!0}),e);var lk=Zt(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.thenable=pc.typedArray=pc.stringArray=pc.array=pc.func=pc.error=pc.number=pc.string=pc.boolean=void 0;function Tae(e){return e===!0||e===!1}pc.boolean=Tae;function aW(e){return typeof e=="string"||e instanceof String}pc.string=aW;function Sae(e){return typeof e=="number"||e instanceof Number}pc.number=Sae;function _ae(e){return e instanceof Error}pc.error=_ae;function sW(e){return typeof e=="function"}pc.func=sW;function cW(e){return Array.isArray(e)}pc.array=cW;function xae(e){return cW(e)&&e.every(n=>aW(n))}pc.stringArray=xae;function bae(e,n){return Array.isArray(e)&&e.every(n)}pc.typedArray=bae;function Cae(e){return e&&sW(e.then)}pc.thenable=Cae});var P_=Zt(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.stringArray=wl.array=wl.func=wl.error=wl.number=wl.string=wl.boolean=void 0;function Dae(e){return e===!0||e===!1}wl.boolean=Dae;function lW(e){return typeof e=="string"||e instanceof String}wl.string=lW;function Eae(e){return typeof e=="number"||e instanceof Number}wl.number=Eae;function Pae(e){return e instanceof Error}wl.error=Pae;function Nae(e){return typeof e=="function"}wl.func=Nae;function uW(e){return Array.isArray(e)}wl.array=uW;function kae(e){return uW(e)&&e.every(n=>lW(n))}wl.stringArray=kae});var uR=Zt(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.Message=si.NotificationType9=si.NotificationType8=si.NotificationType7=si.NotificationType6=si.NotificationType5=si.NotificationType4=si.NotificationType3=si.NotificationType2=si.NotificationType1=si.NotificationType0=si.NotificationType=si.RequestType9=si.RequestType8=si.RequestType7=si.RequestType6=si.RequestType5=si.RequestType4=si.RequestType3=si.RequestType2=si.RequestType1=si.RequestType=si.RequestType0=si.AbstractMessageSignature=si.ParameterStructures=si.ResponseError=si.ErrorCodes=void 0;var _T=P_(),Jw;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(Jw||(si.ErrorCodes=Jw={}));var Ww=class e extends Error{constructor(n,r,i){super(r),this.code=_T.number(n)?n:Jw.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,e.prototype)}toJson(){let n={code:this.code,message:this.message};return this.data!==void 0&&(n.data=this.data),n}};si.ResponseError=Ww;var Gu=class e{constructor(n){this.kind=n}static is(n){return n===e.auto||n===e.byName||n===e.byPosition}toString(){return this.kind}};si.ParameterStructures=Gu;Gu.auto=new Gu("auto");Gu.byPosition=new Gu("byPosition");Gu.byName=new Gu("byName");var Ya=class{constructor(n,r){this.method=n,this.numberOfParams=r}get parameterStructures(){return Gu.auto}};si.AbstractMessageSignature=Ya;var Uw=class extends Ya{constructor(n){super(n,0)}};si.RequestType0=Uw;var Kw=class extends Ya{constructor(n,r=Gu.auto){super(n,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};si.RequestType=Kw;var qw=class extends Ya{constructor(n,r=Gu.auto){super(n,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};si.RequestType1=qw;var Vw=class extends Ya{constructor(n){super(n,2)}};si.RequestType2=Vw;var Hw=class extends Ya{constructor(n){super(n,3)}};si.RequestType3=Hw;var zw=class extends Ya{constructor(n){super(n,4)}};si.RequestType4=zw;var Gw=class extends Ya{constructor(n){super(n,5)}};si.RequestType5=Gw;var $w=class extends Ya{constructor(n){super(n,6)}};si.RequestType6=$w;var Qw=class extends Ya{constructor(n){super(n,7)}};si.RequestType7=Qw;var Yw=class extends Ya{constructor(n){super(n,8)}};si.RequestType8=Yw;var Xw=class extends Ya{constructor(n){super(n,9)}};si.RequestType9=Xw;var Zw=class extends Ya{constructor(n,r=Gu.auto){super(n,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};si.NotificationType=Zw;var eR=class extends Ya{constructor(n){super(n,0)}};si.NotificationType0=eR;var nR=class extends Ya{constructor(n,r=Gu.auto){super(n,1),this._parameterStructures=r}get parameterStructures(){return this._parameterStructures}};si.NotificationType1=nR;var tR=class extends Ya{constructor(n){super(n,2)}};si.NotificationType2=tR;var rR=class extends Ya{constructor(n){super(n,3)}};si.NotificationType3=rR;var iR=class extends Ya{constructor(n){super(n,4)}};si.NotificationType4=iR;var oR=class extends Ya{constructor(n){super(n,5)}};si.NotificationType5=oR;var aR=class extends Ya{constructor(n){super(n,6)}};si.NotificationType6=aR;var sR=class extends Ya{constructor(n){super(n,7)}};si.NotificationType7=sR;var cR=class extends Ya{constructor(n){super(n,8)}};si.NotificationType8=cR;var lR=class extends Ya{constructor(n){super(n,9)}};si.NotificationType9=lR;var dW;(function(e){function n(a){let c=a;return c&&_T.string(c.method)&&(_T.string(c.id)||_T.number(c.id))}e.isRequest=n;function r(a){let c=a;return c&&_T.string(c.method)&&a.id===void 0}e.isNotification=r;function i(a){let c=a;return c&&(c.result!==void 0||!!c.error)&&(_T.string(c.id)||_T.number(c.id)||c.id===null)}e.isResponse=i})(dW||(si.Message=dW={}))});var fR=Zt(My=>{"use strict";var fW;Object.defineProperty(My,"__esModule",{value:!0});My.LRUCache=My.LinkedMap=My.Touch=void 0;var Rl;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Rl||(My.Touch=Rl={}));var uk=class{constructor(){this[fW]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(n){return this._map.has(n)}get(n,r=Rl.None){let i=this._map.get(n);if(i)return r!==Rl.None&&this.touch(i,r),i.value}set(n,r,i=Rl.None){let a=this._map.get(n);if(a)a.value=r,i!==Rl.None&&this.touch(a,i);else{switch(a={key:n,value:r,next:void 0,previous:void 0},i){case Rl.None:this.addItemLast(a);break;case Rl.First:this.addItemFirst(a);break;case Rl.Last:this.addItemLast(a);break;default:this.addItemLast(a);break}this._map.set(n,a),this._size++}return this}delete(n){return!!this.remove(n)}remove(n){let r=this._map.get(n);if(r)return this._map.delete(n),this.removeItem(r),this._size--,r.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let n=this._head;return this._map.delete(n.key),this.removeItem(n),this._size--,n.value}forEach(n,r){let i=this._state,a=this._head;for(;a;){if(r?n.bind(r)(a.value,a.key,this):n(a.value,a.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");a=a.next}}keys(){let n=this._state,r=this._head,i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let a={value:r.key,done:!1};return r=r.next,a}else return{value:void 0,done:!0}}};return i}values(){let n=this._state,r=this._head,i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let a={value:r.value,done:!1};return r=r.next,a}else return{value:void 0,done:!0}}};return i}entries(){let n=this._state,r=this._head,i={[Symbol.iterator]:()=>i,next:()=>{if(this._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let a={value:[r.key,r.value],done:!1};return r=r.next,a}else return{value:void 0,done:!0}}};return i}[(fW=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(n){if(n>=this.size)return;if(n===0){this.clear();return}let r=this._head,i=this.size;for(;r&&i>n;)this._map.delete(r.key),r=r.next,i--;this._head=r,this._size=i,r&&(r.previous=void 0),this._state++}addItemFirst(n){if(!this._head&&!this._tail)this._tail=n;else if(this._head)n.next=this._head,this._head.previous=n;else throw new Error("Invalid list");this._head=n,this._state++}addItemLast(n){if(!this._head&&!this._tail)this._head=n;else if(this._tail)n.previous=this._tail,this._tail.next=n;else throw new Error("Invalid list");this._tail=n,this._state++}removeItem(n){if(n===this._head&&n===this._tail)this._head=void 0,this._tail=void 0;else if(n===this._head){if(!n.next)throw new Error("Invalid list");n.next.previous=void 0,this._head=n.next}else if(n===this._tail){if(!n.previous)throw new Error("Invalid list");n.previous.next=void 0,this._tail=n.previous}else{let r=n.next,i=n.previous;if(!r||!i)throw new Error("Invalid list");r.previous=i,i.next=r}n.next=void 0,n.previous=void 0,this._state++}touch(n,r){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(r!==Rl.First&&r!==Rl.Last)){if(r===Rl.First){if(n===this._head)return;let i=n.next,a=n.previous;n===this._tail?(a.next=void 0,this._tail=a):(i.previous=a,a.next=i),n.previous=void 0,n.next=this._head,this._head.previous=n,this._head=n,this._state++}else if(r===Rl.Last){if(n===this._tail)return;let i=n.next,a=n.previous;n===this._head?(i.previous=void 0,this._head=i):(i.previous=a,a.next=i),n.next=void 0,n.previous=this._tail,this._tail.next=n,this._tail=n,this._state++}}}toJSON(){let n=[];return this.forEach((r,i)=>{n.push([i,r])}),n}fromJSON(n){this.clear();for(let[r,i]of n)this.set(r,i)}};My.LinkedMap=uk;var dR=class extends uk{constructor(n,r=1){super(),this._limit=n,this._ratio=Math.min(Math.max(0,r),1)}get limit(){return this._limit}set limit(n){this._limit=n,this.checkTrim()}get ratio(){return this._ratio}set ratio(n){this._ratio=Math.min(Math.max(0,n),1),this.checkTrim()}get(n,r=Rl.AsNew){return super.get(n,r)}peek(n){return super.get(n,Rl.None)}set(n,r){return super.set(n,r,Rl.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};My.LRUCache=dR});var mW=Zt(dk=>{"use strict";Object.defineProperty(dk,"__esModule",{value:!0});dk.Disposable=void 0;var pW;(function(e){function n(r){return{dispose:r}}e.create=n})(pW||(dk.Disposable=pW={}))});var By=Zt(gR=>{"use strict";Object.defineProperty(gR,"__esModule",{value:!0});var pR;function mR(){if(pR===void 0)throw new Error("No runtime abstraction layer installed");return pR}(function(e){function n(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");pR=r}e.install=n})(mR||(mR={}));gR.default=mR});var k_=Zt(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.Emitter=N_.Event=void 0;var vae=By(),gW;(function(e){let n={dispose(){}};e.None=function(){return n}})(gW||(N_.Event=gW={}));var yR=class{add(n,r=null,i){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(n),this._contexts.push(r),Array.isArray(i)&&i.push({dispose:()=>this.remove(n,r)})}remove(n,r=null){if(!this._callbacks)return;let i=!1;for(let a=0,c=this._callbacks.length;a<c;a++)if(this._callbacks[a]===n)if(this._contexts[a]===r){this._callbacks.splice(a,1),this._contexts.splice(a,1);return}else i=!0;if(i)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...n){if(!this._callbacks)return[];let r=[],i=this._callbacks.slice(0),a=this._contexts.slice(0);for(let c=0,u=i.length;c<u;c++)try{r.push(i[c].apply(a[c],n))}catch(f){(0,vae.default)().console.error(f)}return r}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},fk=class e{constructor(n){this._options=n}get event(){return this._event||(this._event=(n,r,i)=>{this._callbacks||(this._callbacks=new yR),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(n,r);let a={dispose:()=>{this._callbacks&&(this._callbacks.remove(n,r),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(a),a}),this._event}fire(n){this._callbacks&&this._callbacks.invoke.call(this._callbacks,n)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};N_.Emitter=fk;fk._noop=function(){}});var gk=Zt(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});v_.CancellationTokenSource=v_.CancellationToken=void 0;var Fae=By(),Iae=P_(),hR=k_(),pk;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:hR.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:hR.Event.None});function n(r){let i=r;return i&&(i===e.None||i===e.Cancelled||Iae.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}e.is=n})(pk||(v_.CancellationToken=pk={}));var Lae=Object.freeze(function(e,n){let r=(0,Fae.default)().timer.setTimeout(e.bind(n),0);return{dispose(){r.dispose()}}}),mk=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Lae:(this._emitter||(this._emitter=new hR.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},TR=class{get token(){return this._token||(this._token=new mk),this._token}cancel(){this._token?this._token.cancel():this._token=pk.Cancelled}dispose(){this._token?this._token instanceof mk&&this._token.dispose():this._token=pk.None}};v_.CancellationTokenSource=TR});var yW=Zt(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});F_.SharedArrayReceiverStrategy=F_.SharedArraySenderStrategy=void 0;var Aae=gk(),oD;(function(e){e.Continue=0,e.Cancelled=1})(oD||(oD={}));var SR=class{constructor(){this.buffers=new Map}enableCancellation(n){if(n.id===null)return;let r=new SharedArrayBuffer(4),i=new Int32Array(r,0,1);i[0]=oD.Continue,this.buffers.set(n.id,r),n.$cancellationData=r}async sendCancellation(n,r){let i=this.buffers.get(r);if(i===void 0)return;let a=new Int32Array(i,0,1);Atomics.store(a,0,oD.Cancelled)}cleanup(n){this.buffers.delete(n)}dispose(){this.buffers.clear()}};F_.SharedArraySenderStrategy=SR;var _R=class{constructor(n){this.data=new Int32Array(n,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===oD.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},xR=class{constructor(n){this.token=new _R(n)}cancel(){}dispose(){}},bR=class{constructor(){this.kind="request"}createCancellationTokenSource(n){let r=n.$cancellationData;return r===void 0?new Aae.CancellationTokenSource:new xR(r)}};F_.SharedArrayReceiverStrategy=bR});var DR=Zt(yk=>{"use strict";Object.defineProperty(yk,"__esModule",{value:!0});yk.Semaphore=void 0;var wae=By(),CR=class{constructor(n=1){if(n<=0)throw new Error("Capacity must be greater than 0");this._capacity=n,this._active=0,this._waiting=[]}lock(n){return new Promise((r,i)=>{this._waiting.push({thunk:n,resolve:r,reject:i}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,wae.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let n=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let r=n.thunk();r instanceof Promise?r.then(i=>{this._active--,n.resolve(i),this.runNext()},i=>{this._active--,n.reject(i),this.runNext()}):(this._active--,n.resolve(r),this.runNext())}catch(r){this._active--,n.reject(r),this.runNext()}}};yk.Semaphore=CR});var TW=Zt(jy=>{"use strict";Object.defineProperty(jy,"__esModule",{value:!0});jy.ReadableStreamMessageReader=jy.AbstractMessageReader=jy.MessageReader=void 0;var PR=By(),I_=P_(),ER=k_(),Rae=DR(),hW;(function(e){function n(r){let i=r;return i&&I_.func(i.listen)&&I_.func(i.dispose)&&I_.func(i.onError)&&I_.func(i.onClose)&&I_.func(i.onPartialMessage)}e.is=n})(hW||(jy.MessageReader=hW={}));var hk=class{constructor(){this.errorEmitter=new ER.Emitter,this.closeEmitter=new ER.Emitter,this.partialMessageEmitter=new ER.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(n){this.errorEmitter.fire(this.asError(n))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(n){this.partialMessageEmitter.fire(n)}asError(n){return n instanceof Error?n:new Error(`Reader received error. Reason: ${I_.string(n.message)?n.message:"unknown"}`)}};jy.AbstractMessageReader=hk;var NR;(function(e){function n(r){let i,a,c,u=new Map,f,m=new Map;if(r===void 0||typeof r=="string")i=r??"utf-8";else{if(i=r.charset??"utf-8",r.contentDecoder!==void 0&&(c=r.contentDecoder,u.set(c.name,c)),r.contentDecoders!==void 0)for(let y of r.contentDecoders)u.set(y.name,y);if(r.contentTypeDecoder!==void 0&&(f=r.contentTypeDecoder,m.set(f.name,f)),r.contentTypeDecoders!==void 0)for(let y of r.contentTypeDecoders)m.set(y.name,y)}return f===void 0&&(f=(0,PR.default)().applicationJson.decoder,m.set(f.name,f)),{charset:i,contentDecoder:c,contentDecoders:u,contentTypeDecoder:f,contentTypeDecoders:m}}e.fromOptions=n})(NR||(NR={}));var kR=class extends hk{constructor(n,r){super(),this.readable=n,this.options=NR.fromOptions(r),this.buffer=(0,PR.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new Rae.Semaphore(1)}set partialMessageTimeout(n){this._partialMessageTimeout=n}get partialMessageTimeout(){return this._partialMessageTimeout}listen(n){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=n;let r=this.readable.onData(i=>{this.onData(i)});return this.readable.onError(i=>this.fireError(i)),this.readable.onClose(()=>this.fireClose()),r}onData(n){try{for(this.buffer.append(n);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders(!0);if(!i)return;let a=i.get("content-length");if(!a){this.fireError(new Error(`Header must provide a Content-Length property.
4
+ ${JSON.stringify(Object.fromEntries(i))}`));return}let c=parseInt(a);if(isNaN(c)){this.fireError(new Error(`Content-Length value must be a number. Got ${a}`));return}this.nextMessageLength=c}let r=this.buffer.tryReadBody(this.nextMessageLength);if(r===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let i=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(r):r,a=await this.options.contentTypeDecoder.decode(i,this.options);this.callback(a)}).catch(i=>{this.fireError(i)})}}catch(r){this.fireError(r)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,PR.default)().timer.setTimeout((n,r)=>{this.partialMessageTimer=void 0,n===this.messageToken&&(this.firePartialMessage({messageToken:n,waitingTime:r}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};jy.ReadableStreamMessageReader=kR});var CW=Zt(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});Jy.WriteableStreamMessageWriter=Jy.AbstractMessageWriter=Jy.MessageWriter=void 0;var SW=By(),aD=P_(),Oae=DR(),_W=k_(),Mae="Content-Length: ",xW=`\r
5
+ `,bW;(function(e){function n(r){let i=r;return i&&aD.func(i.dispose)&&aD.func(i.onClose)&&aD.func(i.onError)&&aD.func(i.write)}e.is=n})(bW||(Jy.MessageWriter=bW={}));var Tk=class{constructor(){this.errorEmitter=new _W.Emitter,this.closeEmitter=new _W.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(n,r,i){this.errorEmitter.fire([this.asError(n),r,i])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(n){return n instanceof Error?n:new Error(`Writer received error. Reason: ${aD.string(n.message)?n.message:"unknown"}`)}};Jy.AbstractMessageWriter=Tk;var vR;(function(e){function n(r){return r===void 0||typeof r=="string"?{charset:r??"utf-8",contentTypeEncoder:(0,SW.default)().applicationJson.encoder}:{charset:r.charset??"utf-8",contentEncoder:r.contentEncoder,contentTypeEncoder:r.contentTypeEncoder??(0,SW.default)().applicationJson.encoder}}e.fromOptions=n})(vR||(vR={}));var FR=class extends Tk{constructor(n,r){super(),this.writable=n,this.options=vR.fromOptions(r),this.errorCount=0,this.writeSemaphore=new Oae.Semaphore(1),this.writable.onError(i=>this.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(n){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(n,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let a=[];return a.push(Mae,i.byteLength.toString(),xW),a.push(xW),this.doWrite(n,a,i)},i=>{throw this.fireError(i),i}))}async doWrite(n,r,i){try{return await this.writable.write(r.join(""),"ascii"),this.writable.write(i)}catch(a){return this.handleError(a,n),Promise.reject(a)}}handleError(n,r){this.errorCount++,this.fireError(n,r,this.errorCount)}end(){this.writable.end()}};Jy.WriteableStreamMessageWriter=FR});var DW=Zt(Sk=>{"use strict";Object.defineProperty(Sk,"__esModule",{value:!0});Sk.AbstractMessageBuffer=void 0;var Bae=13,jae=10,Jae=`\r
6
+ `,IR=class{constructor(n="utf-8"){this._encoding=n,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(n){let r=typeof n=="string"?this.fromString(n,this._encoding):n;this._chunks.push(r),this._totalLength+=r.byteLength}tryReadHeaders(n=!1){if(this._chunks.length===0)return;let r=0,i=0,a=0,c=0;e:for(;i<this._chunks.length;){let y=this._chunks[i];for(a=0;a<y.length;){switch(y[a]){case Bae:switch(r){case 0:r=1;break;case 2:r=3;break;default:r=0}break;case jae:switch(r){case 1:r=2;break;case 3:r=4,a++;break e;default:r=0}break;default:r=0}a++}c+=y.byteLength,i++}if(r!==4)return;let u=this._read(c+a),f=new Map,m=this.toString(u,"ascii").split(Jae);if(m.length<2)return f;for(let y=0;y<m.length-2;y++){let g=m[y],S=g.indexOf(":");if(S===-1)throw new Error(`Message header must separate key and value using ':'
7
+ ${g}`);let _=g.substr(0,S),b=g.substr(S+1).trim();f.set(n?_.toLowerCase():_,b)}return f}tryReadBody(n){if(!(this._totalLength<n))return this._read(n)}get numberOfBytes(){return this._totalLength}_read(n){if(n===0)return this.emptyBuffer();if(n>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===n){let c=this._chunks[0];return this._chunks.shift(),this._totalLength-=n,this.asNative(c)}if(this._chunks[0].byteLength>n){let c=this._chunks[0],u=this.asNative(c,n);return this._chunks[0]=c.slice(n),this._totalLength-=n,u}let r=this.allocNative(n),i=0,a=0;for(;n>0;){let c=this._chunks[a];if(c.byteLength>n){let u=c.slice(0,n);r.set(u,i),i+=n,this._chunks[a]=c.slice(n),this._totalLength-=n,n-=n}else r.set(c,i),i+=c.byteLength,this._chunks.shift(),this._totalLength-=c.byteLength,n-=c.byteLength}return r}};Sk.AbstractMessageBuffer=IR});var vW=Zt(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.createMessageConnection=Xi.ConnectionOptions=Xi.MessageStrategy=Xi.CancellationStrategy=Xi.CancellationSenderStrategy=Xi.CancellationReceiverStrategy=Xi.RequestCancellationReceiverStrategy=Xi.IdCancellationReceiverStrategy=Xi.ConnectionStrategy=Xi.ConnectionError=Xi.ConnectionErrors=Xi.LogTraceNotification=Xi.SetTraceNotification=Xi.TraceFormat=Xi.TraceValues=Xi.Trace=Xi.NullLogger=Xi.ProgressType=Xi.ProgressToken=void 0;var EW=By(),Es=P_(),Fi=uR(),PW=fR(),sD=k_(),LR=gk(),uD;(function(e){e.type=new Fi.NotificationType("$/cancelRequest")})(uD||(uD={}));var AR;(function(e){function n(r){return typeof r=="string"||typeof r=="number"}e.is=n})(AR||(Xi.ProgressToken=AR={}));var cD;(function(e){e.type=new Fi.NotificationType("$/progress")})(cD||(cD={}));var wR=class{constructor(){}};Xi.ProgressType=wR;var RR;(function(e){function n(r){return Es.func(r)}e.is=n})(RR||(RR={}));Xi.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var ea;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(ea||(Xi.Trace=ea={}));var NW;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(NW||(Xi.TraceValues=NW={}));(function(e){function n(i){if(!Es.string(i))return e.Off;switch(i=i.toLowerCase(),i){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=n;function r(i){switch(i){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=r})(ea||(Xi.Trace=ea={}));var Ad;(function(e){e.Text="text",e.JSON="json"})(Ad||(Xi.TraceFormat=Ad={}));(function(e){function n(r){return Es.string(r)?(r=r.toLowerCase(),r==="json"?e.JSON:e.Text):e.Text}e.fromString=n})(Ad||(Xi.TraceFormat=Ad={}));var OR;(function(e){e.type=new Fi.NotificationType("$/setTrace")})(OR||(Xi.SetTraceNotification=OR={}));var _k;(function(e){e.type=new Fi.NotificationType("$/logTrace")})(_k||(Xi.LogTraceNotification=_k={}));var lD;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(lD||(Xi.ConnectionErrors=lD={}));var L_=class e extends Error{constructor(n,r){super(r),this.code=n,Object.setPrototypeOf(this,e.prototype)}};Xi.ConnectionError=L_;var MR;(function(e){function n(r){let i=r;return i&&Es.func(i.cancelUndispatched)}e.is=n})(MR||(Xi.ConnectionStrategy=MR={}));var xk;(function(e){function n(r){let i=r;return i&&(i.kind===void 0||i.kind==="id")&&Es.func(i.createCancellationTokenSource)&&(i.dispose===void 0||Es.func(i.dispose))}e.is=n})(xk||(Xi.IdCancellationReceiverStrategy=xk={}));var BR;(function(e){function n(r){let i=r;return i&&i.kind==="request"&&Es.func(i.createCancellationTokenSource)&&(i.dispose===void 0||Es.func(i.dispose))}e.is=n})(BR||(Xi.RequestCancellationReceiverStrategy=BR={}));var bk;(function(e){e.Message=Object.freeze({createCancellationTokenSource(r){return new LR.CancellationTokenSource}});function n(r){return xk.is(r)||BR.is(r)}e.is=n})(bk||(Xi.CancellationReceiverStrategy=bk={}));var Ck;(function(e){e.Message=Object.freeze({sendCancellation(r,i){return r.sendNotification(uD.type,{id:i})},cleanup(r){}});function n(r){let i=r;return i&&Es.func(i.sendCancellation)&&Es.func(i.cleanup)}e.is=n})(Ck||(Xi.CancellationSenderStrategy=Ck={}));var Dk;(function(e){e.Message=Object.freeze({receiver:bk.Message,sender:Ck.Message});function n(r){let i=r;return i&&bk.is(i.receiver)&&Ck.is(i.sender)}e.is=n})(Dk||(Xi.CancellationStrategy=Dk={}));var Ek;(function(e){function n(r){let i=r;return i&&Es.func(i.handleMessage)}e.is=n})(Ek||(Xi.MessageStrategy=Ek={}));var kW;(function(e){function n(r){let i=r;return i&&(Dk.is(i.cancellationStrategy)||MR.is(i.connectionStrategy)||Ek.is(i.messageStrategy))}e.is=n})(kW||(Xi.ConnectionOptions=kW={}));var $f;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})($f||($f={}));function Wae(e,n,r,i){let a=r!==void 0?r:Xi.NullLogger,c=0,u=0,f=0,m="2.0",y,g=new Map,S,_=new Map,b=new Map,v,T=new PW.LinkedMap,W=new Map,F=new Set,M=new Map,J=ea.Off,A=Ad.Text,V,ue=$f.New,ye=new sD.Emitter,he=new sD.Emitter,ce=new sD.Emitter,Ee=new sD.Emitter,Fe=new sD.Emitter,be=i&&i.cancellationStrategy?i.cancellationStrategy:Dk.Message;function de(Z){if(Z===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+Z.toString()}function Ae(Z){return Z===null?"res-unknown-"+(++f).toString():"res-"+Z.toString()}function G(){return"not-"+(++u).toString()}function Qe(Z,fe){Fi.Message.isRequest(fe)?Z.set(de(fe.id),fe):Fi.Message.isResponse(fe)?Z.set(Ae(fe.id),fe):Z.set(G(),fe)}function me(Z){}function Se(){return ue===$f.Listening}function _n(){return ue===$f.Closed}function tt(){return ue===$f.Disposed}function Pe(){(ue===$f.New||ue===$f.Listening)&&(ue=$f.Closed,he.fire(void 0))}function gn(Z){ye.fire([Z,void 0,void 0])}function $e(Z){ye.fire(Z)}e.onClose(Pe),e.onError(gn),n.onClose(Pe),n.onError($e);function Ln(){v||T.size===0||(v=(0,EW.default)().timer.setImmediate(()=>{v=void 0,Hn()}))}function Vt(Z){Fi.Message.isRequest(Z)?se(Z):Fi.Message.isNotification(Z)?wn(Z):Fi.Message.isResponse(Z)?jn(Z):Xn(Z)}function Hn(){if(T.size===0)return;let Z=T.shift();try{let fe=i?.messageStrategy;Ek.is(fe)?fe.handleMessage(Z,Vt):Vt(Z)}finally{Ln()}}let Ye=Z=>{try{if(Fi.Message.isNotification(Z)&&Z.method===uD.type.method){let fe=Z.params.id,Ce=de(fe),ne=T.get(Ce);if(Fi.Message.isRequest(ne)){let H=i?.connectionStrategy,ge=H&&H.cancelUndispatched?H.cancelUndispatched(ne,me):void 0;if(ge&&(ge.error!==void 0||ge.result!==void 0)){T.delete(Ce),M.delete(fe),ge.id=ne.id,At(ge,Z.method,Date.now()),n.write(ge).catch(()=>a.error("Sending response for canceled message failed."));return}}let sn=M.get(fe);if(sn!==void 0){sn.cancel(),It(Z);return}else F.add(fe)}Qe(T,Z)}finally{Ln()}};function se(Z){if(tt())return;function fe(kn,On,nn){let Dr={jsonrpc:m,id:Z.id};kn instanceof Fi.ResponseError?Dr.error=kn.toJson():Dr.result=kn===void 0?null:kn,At(Dr,On,nn),n.write(Dr).catch(()=>a.error("Sending response failed."))}function Ce(kn,On,nn){let Dr={jsonrpc:m,id:Z.id,error:kn.toJson()};At(Dr,On,nn),n.write(Dr).catch(()=>a.error("Sending response failed."))}function ne(kn,On,nn){kn===void 0&&(kn=null);let Dr={jsonrpc:m,id:Z.id,result:kn};At(Dr,On,nn),n.write(Dr).catch(()=>a.error("Sending response failed."))}xn(Z);let sn=g.get(Z.method),H,ge;sn&&(H=sn.type,ge=sn.handler);let qn=Date.now();if(ge||y){let kn=Z.id??String(Date.now()),On=xk.is(be.receiver)?be.receiver.createCancellationTokenSource(kn):be.receiver.createCancellationTokenSource(Z);Z.id!==null&&F.has(Z.id)&&On.cancel(),Z.id!==null&&M.set(kn,On);try{let nn;if(ge)if(Z.params===void 0){if(H!==void 0&&H.numberOfParams!==0){Ce(new Fi.ResponseError(Fi.ErrorCodes.InvalidParams,`Request ${Z.method} defines ${H.numberOfParams} params but received none.`),Z.method,qn);return}nn=ge(On.token)}else if(Array.isArray(Z.params)){if(H!==void 0&&H.parameterStructures===Fi.ParameterStructures.byName){Ce(new Fi.ResponseError(Fi.ErrorCodes.InvalidParams,`Request ${Z.method} defines parameters by name but received parameters by position`),Z.method,qn);return}nn=ge(...Z.params,On.token)}else{if(H!==void 0&&H.parameterStructures===Fi.ParameterStructures.byPosition){Ce(new Fi.ResponseError(Fi.ErrorCodes.InvalidParams,`Request ${Z.method} defines parameters by position but received parameters by name`),Z.method,qn);return}nn=ge(Z.params,On.token)}else y&&(nn=y(Z.method,Z.params,On.token));let Dr=nn;nn?Dr.then?Dr.then(Gt=>{M.delete(kn),fe(Gt,Z.method,qn)},Gt=>{M.delete(kn),Gt instanceof Fi.ResponseError?Ce(Gt,Z.method,qn):Gt&&Es.string(Gt.message)?Ce(new Fi.ResponseError(Fi.ErrorCodes.InternalError,`Request ${Z.method} failed with message: ${Gt.message}`),Z.method,qn):Ce(new Fi.ResponseError(Fi.ErrorCodes.InternalError,`Request ${Z.method} failed unexpectedly without providing any details.`),Z.method,qn)}):(M.delete(kn),fe(nn,Z.method,qn)):(M.delete(kn),ne(nn,Z.method,qn))}catch(nn){M.delete(kn),nn instanceof Fi.ResponseError?fe(nn,Z.method,qn):nn&&Es.string(nn.message)?Ce(new Fi.ResponseError(Fi.ErrorCodes.InternalError,`Request ${Z.method} failed with message: ${nn.message}`),Z.method,qn):Ce(new Fi.ResponseError(Fi.ErrorCodes.InternalError,`Request ${Z.method} failed unexpectedly without providing any details.`),Z.method,qn)}}else Ce(new Fi.ResponseError(Fi.ErrorCodes.MethodNotFound,`Unhandled method ${Z.method}`),Z.method,qn)}function jn(Z){if(!tt())if(Z.id===null)Z.error?a.error(`Received response message without id: Error is:
8
+ ${JSON.stringify(Z.error,void 0,4)}`):a.error("Received response message without id. No further error information provided.");else{let fe=Z.id,Ce=W.get(fe);if(pr(Z,Ce),Ce!==void 0){W.delete(fe);try{if(Z.error){let ne=Z.error;Ce.reject(new Fi.ResponseError(ne.code,ne.message,ne.data))}else if(Z.result!==void 0)Ce.resolve(Z.result);else throw new Error("Should never happen.")}catch(ne){ne.message?a.error(`Response handler '${Ce.method}' failed with message: ${ne.message}`):a.error(`Response handler '${Ce.method}' failed unexpectedly.`)}}}}function wn(Z){if(tt())return;let fe,Ce;if(Z.method===uD.type.method){let ne=Z.params.id;F.delete(ne),It(Z);return}else{let ne=_.get(Z.method);ne&&(Ce=ne.handler,fe=ne.type)}if(Ce||S)try{if(It(Z),Ce)if(Z.params===void 0)fe!==void 0&&fe.numberOfParams!==0&&fe.parameterStructures!==Fi.ParameterStructures.byName&&a.error(`Notification ${Z.method} defines ${fe.numberOfParams} params but received none.`),Ce();else if(Array.isArray(Z.params)){let ne=Z.params;Z.method===cD.type.method&&ne.length===2&&AR.is(ne[0])?Ce({token:ne[0],value:ne[1]}):(fe!==void 0&&(fe.parameterStructures===Fi.ParameterStructures.byName&&a.error(`Notification ${Z.method} defines parameters by name but received parameters by position`),fe.numberOfParams!==Z.params.length&&a.error(`Notification ${Z.method} defines ${fe.numberOfParams} params but received ${ne.length} arguments`)),Ce(...ne))}else fe!==void 0&&fe.parameterStructures===Fi.ParameterStructures.byPosition&&a.error(`Notification ${Z.method} defines parameters by position but received parameters by name`),Ce(Z.params);else S&&S(Z.method,Z.params)}catch(ne){ne.message?a.error(`Notification handler '${Z.method}' failed with message: ${ne.message}`):a.error(`Notification handler '${Z.method}' failed unexpectedly.`)}else ce.fire(Z)}function Xn(Z){if(!Z){a.error("Received empty message.");return}a.error(`Received message which is neither a response nor a notification message:
9
+ ${JSON.stringify(Z,null,4)}`);let fe=Z;if(Es.string(fe.id)||Es.number(fe.id)){let Ce=fe.id,ne=W.get(Ce);ne&&ne.reject(new Error("The received response has neither a result nor an error property."))}}function ft(Z){if(Z!=null)switch(J){case ea.Verbose:return JSON.stringify(Z,null,4);case ea.Compact:return JSON.stringify(Z);default:return}}function Ft(Z){if(!(J===ea.Off||!V))if(A===Ad.Text){let fe;(J===ea.Verbose||J===ea.Compact)&&Z.params&&(fe=`Params: ${ft(Z.params)}
10
+
11
+ `),V.log(`Sending request '${Z.method} - (${Z.id})'.`,fe)}else tn("send-request",Z)}function Et(Z){if(!(J===ea.Off||!V))if(A===Ad.Text){let fe;(J===ea.Verbose||J===ea.Compact)&&(Z.params?fe=`Params: ${ft(Z.params)}
12
+
13
+ `:fe=`No parameters provided.
14
+
15
+ `),V.log(`Sending notification '${Z.method}'.`,fe)}else tn("send-notification",Z)}function At(Z,fe,Ce){if(!(J===ea.Off||!V))if(A===Ad.Text){let ne;(J===ea.Verbose||J===ea.Compact)&&(Z.error&&Z.error.data?ne=`Error data: ${ft(Z.error.data)}
16
+
17
+ `:Z.result?ne=`Result: ${ft(Z.result)}
18
+
19
+ `:Z.error===void 0&&(ne=`No result returned.
20
+
21
+ `)),V.log(`Sending response '${fe} - (${Z.id})'. Processing request took ${Date.now()-Ce}ms`,ne)}else tn("send-response",Z)}function xn(Z){if(!(J===ea.Off||!V))if(A===Ad.Text){let fe;(J===ea.Verbose||J===ea.Compact)&&Z.params&&(fe=`Params: ${ft(Z.params)}
22
+
23
+ `),V.log(`Received request '${Z.method} - (${Z.id})'.`,fe)}else tn("receive-request",Z)}function It(Z){if(!(J===ea.Off||!V||Z.method===_k.type.method))if(A===Ad.Text){let fe;(J===ea.Verbose||J===ea.Compact)&&(Z.params?fe=`Params: ${ft(Z.params)}
24
+
25
+ `:fe=`No parameters provided.
26
+
27
+ `),V.log(`Received notification '${Z.method}'.`,fe)}else tn("receive-notification",Z)}function pr(Z,fe){if(!(J===ea.Off||!V))if(A===Ad.Text){let Ce;if((J===ea.Verbose||J===ea.Compact)&&(Z.error&&Z.error.data?Ce=`Error data: ${ft(Z.error.data)}
28
+
29
+ `:Z.result?Ce=`Result: ${ft(Z.result)}
30
+
31
+ `:Z.error===void 0&&(Ce=`No result returned.
32
+
33
+ `)),fe){let ne=Z.error?` Request failed: ${Z.error.message} (${Z.error.code}).`:"";V.log(`Received response '${fe.method} - (${Z.id})' in ${Date.now()-fe.timerStart}ms.${ne}`,Ce)}else V.log(`Received response ${Z.id} without active response promise.`,Ce)}else tn("receive-response",Z)}function tn(Z,fe){if(!V||J===ea.Off)return;let Ce={isLSPMessage:!0,type:Z,message:fe,timestamp:Date.now()};V.log(Ce)}function ot(){if(_n())throw new L_(lD.Closed,"Connection is closed.");if(tt())throw new L_(lD.Disposed,"Connection is disposed.")}function Zn(){if(Se())throw new L_(lD.AlreadyListening,"Connection is already listening")}function zt(){if(!Se())throw new Error("Call listen() first.")}function Yt(Z){return Z===void 0?null:Z}function Cr(Z){if(Z!==null)return Z}function xi(Z){return Z!=null&&!Array.isArray(Z)&&typeof Z=="object"}function Ie(Z,fe){switch(Z){case Fi.ParameterStructures.auto:return xi(fe)?Cr(fe):[Yt(fe)];case Fi.ParameterStructures.byName:if(!xi(fe))throw new Error("Received parameters by name but param is not an object literal.");return Cr(fe);case Fi.ParameterStructures.byPosition:return[Yt(fe)];default:throw new Error(`Unknown parameter structure ${Z.toString()}`)}}function Oe(Z,fe){let Ce,ne=Z.numberOfParams;switch(ne){case 0:Ce=void 0;break;case 1:Ce=Ie(Z.parameterStructures,fe[0]);break;default:Ce=[];for(let sn=0;sn<fe.length&&sn<ne;sn++)Ce.push(Yt(fe[sn]));if(fe.length<ne)for(let sn=fe.length;sn<ne;sn++)Ce.push(null);break}return Ce}let Je={sendNotification:(Z,...fe)=>{ot();let Ce,ne;if(Es.string(Z)){Ce=Z;let H=fe[0],ge=0,qn=Fi.ParameterStructures.auto;Fi.ParameterStructures.is(H)&&(ge=1,qn=H);let kn=fe.length,On=kn-ge;switch(On){case 0:ne=void 0;break;case 1:ne=Ie(qn,fe[ge]);break;default:if(qn===Fi.ParameterStructures.byName)throw new Error(`Received ${On} parameters for 'by Name' notification parameter structure.`);ne=fe.slice(ge,kn).map(nn=>Yt(nn));break}}else{let H=fe;Ce=Z.method,ne=Oe(Z,H)}let sn={jsonrpc:m,method:Ce,params:ne};return Et(sn),n.write(sn).catch(H=>{throw a.error("Sending notification failed."),H})},onNotification:(Z,fe)=>{ot();let Ce;return Es.func(Z)?S=Z:fe&&(Es.string(Z)?(Ce=Z,_.set(Z,{type:void 0,handler:fe})):(Ce=Z.method,_.set(Z.method,{type:Z,handler:fe}))),{dispose:()=>{Ce!==void 0?_.delete(Ce):S=void 0}}},onProgress:(Z,fe,Ce)=>{if(b.has(fe))throw new Error(`Progress handler for token ${fe} already registered`);return b.set(fe,Ce),{dispose:()=>{b.delete(fe)}}},sendProgress:(Z,fe,Ce)=>Je.sendNotification(cD.type,{token:fe,value:Ce}),onUnhandledProgress:Ee.event,sendRequest:(Z,...fe)=>{ot(),zt();let Ce,ne,sn;if(Es.string(Z)){Ce=Z;let kn=fe[0],On=fe[fe.length-1],nn=0,Dr=Fi.ParameterStructures.auto;Fi.ParameterStructures.is(kn)&&(nn=1,Dr=kn);let Gt=fe.length;LR.CancellationToken.is(On)&&(Gt=Gt-1,sn=On);let Rr=Gt-nn;switch(Rr){case 0:ne=void 0;break;case 1:ne=Ie(Dr,fe[nn]);break;default:if(Dr===Fi.ParameterStructures.byName)throw new Error(`Received ${Rr} parameters for 'by Name' request parameter structure.`);ne=fe.slice(nn,Gt).map(zi=>Yt(zi));break}}else{let kn=fe;Ce=Z.method,ne=Oe(Z,kn);let On=Z.numberOfParams;sn=LR.CancellationToken.is(kn[On])?kn[On]:void 0}let H=c++,ge;sn&&(ge=sn.onCancellationRequested(()=>{let kn=be.sender.sendCancellation(Je,H);return kn===void 0?(a.log(`Received no promise from cancellation strategy when cancelling id ${H}`),Promise.resolve()):kn.catch(()=>{a.log(`Sending cancellation messages for id ${H} failed`)})}));let qn={jsonrpc:m,id:H,method:Ce,params:ne};return Ft(qn),typeof be.sender.enableCancellation=="function"&&be.sender.enableCancellation(qn),new Promise(async(kn,On)=>{let nn=Rr=>{kn(Rr),be.sender.cleanup(H),ge?.dispose()},Dr=Rr=>{On(Rr),be.sender.cleanup(H),ge?.dispose()},Gt={method:Ce,timerStart:Date.now(),resolve:nn,reject:Dr};try{await n.write(qn),W.set(H,Gt)}catch(Rr){throw a.error("Sending request failed."),Gt.reject(new Fi.ResponseError(Fi.ErrorCodes.MessageWriteError,Rr.message?Rr.message:"Unknown reason")),Rr}})},onRequest:(Z,fe)=>{ot();let Ce=null;return RR.is(Z)?(Ce=void 0,y=Z):Es.string(Z)?(Ce=null,fe!==void 0&&(Ce=Z,g.set(Z,{handler:fe,type:void 0}))):fe!==void 0&&(Ce=Z.method,g.set(Z.method,{type:Z,handler:fe})),{dispose:()=>{Ce!==null&&(Ce!==void 0?g.delete(Ce):y=void 0)}}},hasPendingResponse:()=>W.size>0,trace:async(Z,fe,Ce)=>{let ne=!1,sn=Ad.Text;Ce!==void 0&&(Es.boolean(Ce)?ne=Ce:(ne=Ce.sendNotification||!1,sn=Ce.traceFormat||Ad.Text)),J=Z,A=sn,J===ea.Off?V=void 0:V=fe,ne&&!_n()&&!tt()&&await Je.sendNotification(OR.type,{value:ea.toString(Z)})},onError:ye.event,onClose:he.event,onUnhandledNotification:ce.event,onDispose:Fe.event,end:()=>{n.end()},dispose:()=>{if(tt())return;ue=$f.Disposed,Fe.fire(void 0);let Z=new Fi.ResponseError(Fi.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let fe of W.values())fe.reject(Z);W=new Map,M=new Map,F=new Set,T=new PW.LinkedMap,Es.func(n.dispose)&&n.dispose(),Es.func(e.dispose)&&e.dispose()},listen:()=>{ot(),Zn(),ue=$f.Listening,e.listen(Ye)},inspect:()=>{(0,EW.default)().console.log("inspect")}};return Je.onNotification(_k.type,Z=>{if(J===ea.Off||!V)return;let fe=J===ea.Verbose||J===ea.Compact;V.log(Z.message,fe?Z.verbose:void 0)}),Je.onNotification(cD.type,Z=>{let fe=b.get(Z.token);fe?fe(Z.value):Ee.fire(Z)}),Je}Xi.createMessageConnection=Wae});var Pk=Zt(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.ProgressType=Vn.ProgressToken=Vn.createMessageConnection=Vn.NullLogger=Vn.ConnectionOptions=Vn.ConnectionStrategy=Vn.AbstractMessageBuffer=Vn.WriteableStreamMessageWriter=Vn.AbstractMessageWriter=Vn.MessageWriter=Vn.ReadableStreamMessageReader=Vn.AbstractMessageReader=Vn.MessageReader=Vn.SharedArrayReceiverStrategy=Vn.SharedArraySenderStrategy=Vn.CancellationToken=Vn.CancellationTokenSource=Vn.Emitter=Vn.Event=Vn.Disposable=Vn.LRUCache=Vn.Touch=Vn.LinkedMap=Vn.ParameterStructures=Vn.NotificationType9=Vn.NotificationType8=Vn.NotificationType7=Vn.NotificationType6=Vn.NotificationType5=Vn.NotificationType4=Vn.NotificationType3=Vn.NotificationType2=Vn.NotificationType1=Vn.NotificationType0=Vn.NotificationType=Vn.ErrorCodes=Vn.ResponseError=Vn.RequestType9=Vn.RequestType8=Vn.RequestType7=Vn.RequestType6=Vn.RequestType5=Vn.RequestType4=Vn.RequestType3=Vn.RequestType2=Vn.RequestType1=Vn.RequestType0=Vn.RequestType=Vn.Message=Vn.RAL=void 0;Vn.MessageStrategy=Vn.CancellationStrategy=Vn.CancellationSenderStrategy=Vn.CancellationReceiverStrategy=Vn.ConnectionError=Vn.ConnectionErrors=Vn.LogTraceNotification=Vn.SetTraceNotification=Vn.TraceFormat=Vn.TraceValues=Vn.Trace=void 0;var ja=uR();Object.defineProperty(Vn,"Message",{enumerable:!0,get:function(){return ja.Message}});Object.defineProperty(Vn,"RequestType",{enumerable:!0,get:function(){return ja.RequestType}});Object.defineProperty(Vn,"RequestType0",{enumerable:!0,get:function(){return ja.RequestType0}});Object.defineProperty(Vn,"RequestType1",{enumerable:!0,get:function(){return ja.RequestType1}});Object.defineProperty(Vn,"RequestType2",{enumerable:!0,get:function(){return ja.RequestType2}});Object.defineProperty(Vn,"RequestType3",{enumerable:!0,get:function(){return ja.RequestType3}});Object.defineProperty(Vn,"RequestType4",{enumerable:!0,get:function(){return ja.RequestType4}});Object.defineProperty(Vn,"RequestType5",{enumerable:!0,get:function(){return ja.RequestType5}});Object.defineProperty(Vn,"RequestType6",{enumerable:!0,get:function(){return ja.RequestType6}});Object.defineProperty(Vn,"RequestType7",{enumerable:!0,get:function(){return ja.RequestType7}});Object.defineProperty(Vn,"RequestType8",{enumerable:!0,get:function(){return ja.RequestType8}});Object.defineProperty(Vn,"RequestType9",{enumerable:!0,get:function(){return ja.RequestType9}});Object.defineProperty(Vn,"ResponseError",{enumerable:!0,get:function(){return ja.ResponseError}});Object.defineProperty(Vn,"ErrorCodes",{enumerable:!0,get:function(){return ja.ErrorCodes}});Object.defineProperty(Vn,"NotificationType",{enumerable:!0,get:function(){return ja.NotificationType}});Object.defineProperty(Vn,"NotificationType0",{enumerable:!0,get:function(){return ja.NotificationType0}});Object.defineProperty(Vn,"NotificationType1",{enumerable:!0,get:function(){return ja.NotificationType1}});Object.defineProperty(Vn,"NotificationType2",{enumerable:!0,get:function(){return ja.NotificationType2}});Object.defineProperty(Vn,"NotificationType3",{enumerable:!0,get:function(){return ja.NotificationType3}});Object.defineProperty(Vn,"NotificationType4",{enumerable:!0,get:function(){return ja.NotificationType4}});Object.defineProperty(Vn,"NotificationType5",{enumerable:!0,get:function(){return ja.NotificationType5}});Object.defineProperty(Vn,"NotificationType6",{enumerable:!0,get:function(){return ja.NotificationType6}});Object.defineProperty(Vn,"NotificationType7",{enumerable:!0,get:function(){return ja.NotificationType7}});Object.defineProperty(Vn,"NotificationType8",{enumerable:!0,get:function(){return ja.NotificationType8}});Object.defineProperty(Vn,"NotificationType9",{enumerable:!0,get:function(){return ja.NotificationType9}});Object.defineProperty(Vn,"ParameterStructures",{enumerable:!0,get:function(){return ja.ParameterStructures}});var jR=fR();Object.defineProperty(Vn,"LinkedMap",{enumerable:!0,get:function(){return jR.LinkedMap}});Object.defineProperty(Vn,"LRUCache",{enumerable:!0,get:function(){return jR.LRUCache}});Object.defineProperty(Vn,"Touch",{enumerable:!0,get:function(){return jR.Touch}});var Uae=mW();Object.defineProperty(Vn,"Disposable",{enumerable:!0,get:function(){return Uae.Disposable}});var FW=k_();Object.defineProperty(Vn,"Event",{enumerable:!0,get:function(){return FW.Event}});Object.defineProperty(Vn,"Emitter",{enumerable:!0,get:function(){return FW.Emitter}});var IW=gk();Object.defineProperty(Vn,"CancellationTokenSource",{enumerable:!0,get:function(){return IW.CancellationTokenSource}});Object.defineProperty(Vn,"CancellationToken",{enumerable:!0,get:function(){return IW.CancellationToken}});var LW=yW();Object.defineProperty(Vn,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return LW.SharedArraySenderStrategy}});Object.defineProperty(Vn,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return LW.SharedArrayReceiverStrategy}});var JR=TW();Object.defineProperty(Vn,"MessageReader",{enumerable:!0,get:function(){return JR.MessageReader}});Object.defineProperty(Vn,"AbstractMessageReader",{enumerable:!0,get:function(){return JR.AbstractMessageReader}});Object.defineProperty(Vn,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return JR.ReadableStreamMessageReader}});var WR=CW();Object.defineProperty(Vn,"MessageWriter",{enumerable:!0,get:function(){return WR.MessageWriter}});Object.defineProperty(Vn,"AbstractMessageWriter",{enumerable:!0,get:function(){return WR.AbstractMessageWriter}});Object.defineProperty(Vn,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return WR.WriteableStreamMessageWriter}});var Kae=DW();Object.defineProperty(Vn,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Kae.AbstractMessageBuffer}});var ll=vW();Object.defineProperty(Vn,"ConnectionStrategy",{enumerable:!0,get:function(){return ll.ConnectionStrategy}});Object.defineProperty(Vn,"ConnectionOptions",{enumerable:!0,get:function(){return ll.ConnectionOptions}});Object.defineProperty(Vn,"NullLogger",{enumerable:!0,get:function(){return ll.NullLogger}});Object.defineProperty(Vn,"createMessageConnection",{enumerable:!0,get:function(){return ll.createMessageConnection}});Object.defineProperty(Vn,"ProgressToken",{enumerable:!0,get:function(){return ll.ProgressToken}});Object.defineProperty(Vn,"ProgressType",{enumerable:!0,get:function(){return ll.ProgressType}});Object.defineProperty(Vn,"Trace",{enumerable:!0,get:function(){return ll.Trace}});Object.defineProperty(Vn,"TraceValues",{enumerable:!0,get:function(){return ll.TraceValues}});Object.defineProperty(Vn,"TraceFormat",{enumerable:!0,get:function(){return ll.TraceFormat}});Object.defineProperty(Vn,"SetTraceNotification",{enumerable:!0,get:function(){return ll.SetTraceNotification}});Object.defineProperty(Vn,"LogTraceNotification",{enumerable:!0,get:function(){return ll.LogTraceNotification}});Object.defineProperty(Vn,"ConnectionErrors",{enumerable:!0,get:function(){return ll.ConnectionErrors}});Object.defineProperty(Vn,"ConnectionError",{enumerable:!0,get:function(){return ll.ConnectionError}});Object.defineProperty(Vn,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ll.CancellationReceiverStrategy}});Object.defineProperty(Vn,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ll.CancellationSenderStrategy}});Object.defineProperty(Vn,"CancellationStrategy",{enumerable:!0,get:function(){return ll.CancellationStrategy}});Object.defineProperty(Vn,"MessageStrategy",{enumerable:!0,get:function(){return ll.MessageStrategy}});var qae=By();Vn.RAL=qae.default});var RW=Zt(VR=>{"use strict";Object.defineProperty(VR,"__esModule",{value:!0});var AW=require("util"),og=Pk(),Nk=class e extends og.AbstractMessageBuffer{constructor(n="utf-8"){super(n)}emptyBuffer(){return e.emptyBuffer}fromString(n,r){return Buffer.from(n,r)}toString(n,r){return n instanceof Buffer?n.toString(r):new AW.TextDecoder(r).decode(n)}asNative(n,r){return r===void 0?n instanceof Buffer?n:Buffer.from(n):n instanceof Buffer?n.slice(0,r):Buffer.from(n,0,r)}allocNative(n){return Buffer.allocUnsafe(n)}};Nk.emptyBuffer=Buffer.allocUnsafe(0);var UR=class{constructor(n){this.stream=n}onClose(n){return this.stream.on("close",n),og.Disposable.create(()=>this.stream.off("close",n))}onError(n){return this.stream.on("error",n),og.Disposable.create(()=>this.stream.off("error",n))}onEnd(n){return this.stream.on("end",n),og.Disposable.create(()=>this.stream.off("end",n))}onData(n){return this.stream.on("data",n),og.Disposable.create(()=>this.stream.off("data",n))}},KR=class{constructor(n){this.stream=n}onClose(n){return this.stream.on("close",n),og.Disposable.create(()=>this.stream.off("close",n))}onError(n){return this.stream.on("error",n),og.Disposable.create(()=>this.stream.off("error",n))}onEnd(n){return this.stream.on("end",n),og.Disposable.create(()=>this.stream.off("end",n))}write(n,r){return new Promise((i,a)=>{let c=u=>{u==null?i():a(u)};typeof n=="string"?this.stream.write(n,r,c):this.stream.write(n,c)})}end(){this.stream.end()}},wW=Object.freeze({messageBuffer:Object.freeze({create:e=>new Nk(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,n)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),n.charset))}catch(r){return Promise.reject(r)}}}),decoder:Object.freeze({name:"application/json",decode:(e,n)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(n.charset))):Promise.resolve(JSON.parse(new AW.TextDecoder(n.charset).decode(e)))}catch(r){return Promise.reject(r)}}})}),stream:Object.freeze({asReadableStream:e=>new UR(e),asWritableStream:e=>new KR(e)}),console,timer:Object.freeze({setTimeout(e,n,...r){let i=setTimeout(e,n,...r);return{dispose:()=>clearTimeout(i)}},setImmediate(e,...n){let r=setImmediate(e,...n);return{dispose:()=>clearImmediate(r)}},setInterval(e,n,...r){let i=setInterval(e,n,...r);return{dispose:()=>clearInterval(i)}}})});function qR(){return wW}(function(e){function n(){og.RAL.install(wW)}e.install=n})(qR||(qR={}));VR.default=qR});var CT=Zt(Jo=>{"use strict";var Vae=Jo&&Jo.__createBinding||(Object.create?function(e,n,r,i){i===void 0&&(i=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,i,a)}:function(e,n,r,i){i===void 0&&(i=r),e[i]=n[r]}),Hae=Jo&&Jo.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&Vae(n,e,r)};Object.defineProperty(Jo,"__esModule",{value:!0});Jo.createMessageConnection=Jo.createServerSocketTransport=Jo.createClientSocketTransport=Jo.createServerPipeTransport=Jo.createClientPipeTransport=Jo.generateRandomPipeName=Jo.StreamMessageWriter=Jo.StreamMessageReader=Jo.SocketMessageWriter=Jo.SocketMessageReader=Jo.PortMessageWriter=Jo.PortMessageReader=Jo.IPCMessageWriter=Jo.IPCMessageReader=void 0;var A_=RW();A_.default.install();var OW=require("path"),zae=require("os"),Gae=require("crypto"),Fk=require("net"),wd=Pk();Hae(Pk(),Jo);var HR=class extends wd.AbstractMessageReader{constructor(n){super(),this.process=n;let r=this.process;r.on("error",i=>this.fireError(i)),r.on("close",()=>this.fireClose())}listen(n){return this.process.on("message",n),wd.Disposable.create(()=>this.process.off("message",n))}};Jo.IPCMessageReader=HR;var zR=class extends wd.AbstractMessageWriter{constructor(n){super(),this.process=n,this.errorCount=0;let r=this.process;r.on("error",i=>this.fireError(i)),r.on("close",()=>this.fireClose)}write(n){try{return typeof this.process.send=="function"&&this.process.send(n,void 0,void 0,r=>{r?(this.errorCount++,this.handleError(r,n)):this.errorCount=0}),Promise.resolve()}catch(r){return this.handleError(r,n),Promise.reject(r)}}handleError(n,r){this.errorCount++,this.fireError(n,r,this.errorCount)}end(){}};Jo.IPCMessageWriter=zR;var GR=class extends wd.AbstractMessageReader{constructor(n){super(),this.onData=new wd.Emitter,n.on("close",()=>this.fireClose),n.on("error",r=>this.fireError(r)),n.on("message",r=>{this.onData.fire(r)})}listen(n){return this.onData.event(n)}};Jo.PortMessageReader=GR;var $R=class extends wd.AbstractMessageWriter{constructor(n){super(),this.port=n,this.errorCount=0,n.on("close",()=>this.fireClose()),n.on("error",r=>this.fireError(r))}write(n){try{return this.port.postMessage(n),Promise.resolve()}catch(r){return this.handleError(r,n),Promise.reject(r)}}handleError(n,r){this.errorCount++,this.fireError(n,r,this.errorCount)}end(){}};Jo.PortMessageWriter=$R;var xT=class extends wd.ReadableStreamMessageReader{constructor(n,r="utf-8"){super((0,A_.default)().stream.asReadableStream(n),r)}};Jo.SocketMessageReader=xT;var bT=class extends wd.WriteableStreamMessageWriter{constructor(n,r){super((0,A_.default)().stream.asWritableStream(n),r),this.socket=n}dispose(){super.dispose(),this.socket.destroy()}};Jo.SocketMessageWriter=bT;var kk=class extends wd.ReadableStreamMessageReader{constructor(n,r){super((0,A_.default)().stream.asReadableStream(n),r)}};Jo.StreamMessageReader=kk;var vk=class extends wd.WriteableStreamMessageWriter{constructor(n,r){super((0,A_.default)().stream.asWritableStream(n),r)}};Jo.StreamMessageWriter=vk;var MW=process.env.XDG_RUNTIME_DIR,$ae=new Map([["linux",107],["darwin",103]]);function Qae(){let e=(0,Gae.randomBytes)(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let n;MW?n=OW.join(MW,`vscode-ipc-${e}.sock`):n=OW.join(zae.tmpdir(),`vscode-${e}.sock`);let r=$ae.get(process.platform);return r!==void 0&&n.length>r&&(0,A_.default)().console.warn(`WARNING: IPC handle "${n}" is longer than ${r} characters.`),n}Jo.generateRandomPipeName=Qae;function Yae(e,n="utf-8"){let r,i=new Promise((a,c)=>{r=a});return new Promise((a,c)=>{let u=(0,Fk.createServer)(f=>{u.close(),r([new xT(f,n),new bT(f,n)])});u.on("error",c),u.listen(e,()=>{u.removeListener("error",c),a({onConnected:()=>i})})})}Jo.createClientPipeTransport=Yae;function Xae(e,n="utf-8"){let r=(0,Fk.createConnection)(e);return[new xT(r,n),new bT(r,n)]}Jo.createServerPipeTransport=Xae;function Zae(e,n="utf-8"){let r,i=new Promise((a,c)=>{r=a});return new Promise((a,c)=>{let u=(0,Fk.createServer)(f=>{u.close(),r([new xT(f,n),new bT(f,n)])});u.on("error",c),u.listen(e,"127.0.0.1",()=>{u.removeListener("error",c),a({onConnected:()=>i})})})}Jo.createClientSocketTransport=Zae;function ese(e,n="utf-8"){let r=(0,Fk.createConnection)(e,"127.0.0.1");return[new xT(r,n),new bT(r,n)]}Jo.createServerSocketTransport=ese;function nse(e){let n=e;return n.read!==void 0&&n.addListener!==void 0}function tse(e){let n=e;return n.write!==void 0&&n.addListener!==void 0}function rse(e,n,r,i){r||(r=wd.NullLogger);let a=nse(e)?new kk(e):e,c=tse(n)?new vk(n):n;return wd.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,wd.createMessageConnection)(a,c,r,i)}Jo.createMessageConnection=rse});var QR=Zt((F_e,BW)=>{"use strict";BW.exports=CT()});var Lk=Zt((jW,Ik)=>{(function(e){if(typeof Ik=="object"&&typeof Ik.exports=="object"){var n=e(require,jW);n!==void 0&&(Ik.exports=n)}else typeof define=="function"&&define.amd&&define(["require","exports"],e)})(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TextDocument=n.EOL=n.WorkspaceFolder=n.InlineCompletionContext=n.SelectedCompletionInfo=n.InlineCompletionTriggerKind=n.InlineCompletionList=n.InlineCompletionItem=n.StringValue=n.InlayHint=n.InlayHintLabelPart=n.InlayHintKind=n.InlineValueContext=n.InlineValueEvaluatableExpression=n.InlineValueVariableLookup=n.InlineValueText=n.SemanticTokens=n.SemanticTokenModifiers=n.SemanticTokenTypes=n.SelectionRange=n.DocumentLink=n.FormattingOptions=n.CodeLens=n.CodeAction=n.CodeActionContext=n.CodeActionTriggerKind=n.CodeActionKind=n.DocumentSymbol=n.WorkspaceSymbol=n.SymbolInformation=n.SymbolTag=n.SymbolKind=n.DocumentHighlight=n.DocumentHighlightKind=n.SignatureInformation=n.ParameterInformation=n.Hover=n.MarkedString=n.CompletionList=n.CompletionItem=n.CompletionItemLabelDetails=n.InsertTextMode=n.InsertReplaceEdit=n.CompletionItemTag=n.InsertTextFormat=n.CompletionItemKind=n.MarkupContent=n.MarkupKind=n.TextDocumentItem=n.OptionalVersionedTextDocumentIdentifier=n.VersionedTextDocumentIdentifier=n.TextDocumentIdentifier=n.WorkspaceChange=n.WorkspaceEdit=n.DeleteFile=n.RenameFile=n.CreateFile=n.TextDocumentEdit=n.AnnotatedTextEdit=n.ChangeAnnotationIdentifier=n.ChangeAnnotation=n.TextEdit=n.Command=n.Diagnostic=n.CodeDescription=n.DiagnosticTag=n.DiagnosticSeverity=n.DiagnosticRelatedInformation=n.FoldingRange=n.FoldingRangeKind=n.ColorPresentation=n.ColorInformation=n.Color=n.LocationLink=n.Location=n.Range=n.Position=n.uinteger=n.integer=n.URI=n.DocumentUri=void 0;var r;(function(Q){function ie(Te){return typeof Te=="string"}Q.is=ie})(r||(n.DocumentUri=r={}));var i;(function(Q){function ie(Te){return typeof Te=="string"}Q.is=ie})(i||(n.URI=i={}));var a;(function(Q){Q.MIN_VALUE=-2147483648,Q.MAX_VALUE=2147483647;function ie(Te){return typeof Te=="number"&&Q.MIN_VALUE<=Te&&Te<=Q.MAX_VALUE}Q.is=ie})(a||(n.integer=a={}));var c;(function(Q){Q.MIN_VALUE=0,Q.MAX_VALUE=2147483647;function ie(Te){return typeof Te=="number"&&Q.MIN_VALUE<=Te&&Te<=Q.MAX_VALUE}Q.is=ie})(c||(n.uinteger=c={}));var u;(function(Q){function ie(te,q){return te===Number.MAX_VALUE&&(te=c.MAX_VALUE),q===Number.MAX_VALUE&&(q=c.MAX_VALUE),{line:te,character:q}}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&Le.uinteger(q.line)&&Le.uinteger(q.character)}Q.is=Te})(u||(n.Position=u={}));var f;(function(Q){function ie(te,q,qe,dn){if(Le.uinteger(te)&&Le.uinteger(q)&&Le.uinteger(qe)&&Le.uinteger(dn))return{start:u.create(te,q),end:u.create(qe,dn)};if(u.is(te)&&u.is(q))return{start:te,end:q};throw new Error("Range#create called with invalid arguments[".concat(te,", ").concat(q,", ").concat(qe,", ").concat(dn,"]"))}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&u.is(q.start)&&u.is(q.end)}Q.is=Te})(f||(n.Range=f={}));var m;(function(Q){function ie(te,q){return{uri:te,range:q}}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&f.is(q.range)&&(Le.string(q.uri)||Le.undefined(q.uri))}Q.is=Te})(m||(n.Location=m={}));var y;(function(Q){function ie(te,q,qe,dn){return{targetUri:te,targetRange:q,targetSelectionRange:qe,originSelectionRange:dn}}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&f.is(q.targetRange)&&Le.string(q.targetUri)&&f.is(q.targetSelectionRange)&&(f.is(q.originSelectionRange)||Le.undefined(q.originSelectionRange))}Q.is=Te})(y||(n.LocationLink=y={}));var g;(function(Q){function ie(te,q,qe,dn){return{red:te,green:q,blue:qe,alpha:dn}}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&Le.numberRange(q.red,0,1)&&Le.numberRange(q.green,0,1)&&Le.numberRange(q.blue,0,1)&&Le.numberRange(q.alpha,0,1)}Q.is=Te})(g||(n.Color=g={}));var S;(function(Q){function ie(te,q){return{range:te,color:q}}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&f.is(q.range)&&g.is(q.color)}Q.is=Te})(S||(n.ColorInformation=S={}));var _;(function(Q){function ie(te,q,qe){return{label:te,textEdit:q,additionalTextEdits:qe}}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&Le.string(q.label)&&(Le.undefined(q.textEdit)||V.is(q))&&(Le.undefined(q.additionalTextEdits)||Le.typedArray(q.additionalTextEdits,V.is))}Q.is=Te})(_||(n.ColorPresentation=_={}));var b;(function(Q){Q.Comment="comment",Q.Imports="imports",Q.Region="region"})(b||(n.FoldingRangeKind=b={}));var v;(function(Q){function ie(te,q,qe,dn,Jn,ke){var We={startLine:te,endLine:q};return Le.defined(qe)&&(We.startCharacter=qe),Le.defined(dn)&&(We.endCharacter=dn),Le.defined(Jn)&&(We.kind=Jn),Le.defined(ke)&&(We.collapsedText=ke),We}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&Le.uinteger(q.startLine)&&Le.uinteger(q.startLine)&&(Le.undefined(q.startCharacter)||Le.uinteger(q.startCharacter))&&(Le.undefined(q.endCharacter)||Le.uinteger(q.endCharacter))&&(Le.undefined(q.kind)||Le.string(q.kind))}Q.is=Te})(v||(n.FoldingRange=v={}));var T;(function(Q){function ie(te,q){return{location:te,message:q}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&m.is(q.location)&&Le.string(q.message)}Q.is=Te})(T||(n.DiagnosticRelatedInformation=T={}));var W;(function(Q){Q.Error=1,Q.Warning=2,Q.Information=3,Q.Hint=4})(W||(n.DiagnosticSeverity=W={}));var F;(function(Q){Q.Unnecessary=1,Q.Deprecated=2})(F||(n.DiagnosticTag=F={}));var M;(function(Q){function ie(Te){var te=Te;return Le.objectLiteral(te)&&Le.string(te.href)}Q.is=ie})(M||(n.CodeDescription=M={}));var J;(function(Q){function ie(te,q,qe,dn,Jn,ke){var We={range:te,message:q};return Le.defined(qe)&&(We.severity=qe),Le.defined(dn)&&(We.code=dn),Le.defined(Jn)&&(We.source=Jn),Le.defined(ke)&&(We.relatedInformation=ke),We}Q.create=ie;function Te(te){var q,qe=te;return Le.defined(qe)&&f.is(qe.range)&&Le.string(qe.message)&&(Le.number(qe.severity)||Le.undefined(qe.severity))&&(Le.integer(qe.code)||Le.string(qe.code)||Le.undefined(qe.code))&&(Le.undefined(qe.codeDescription)||Le.string((q=qe.codeDescription)===null||q===void 0?void 0:q.href))&&(Le.string(qe.source)||Le.undefined(qe.source))&&(Le.undefined(qe.relatedInformation)||Le.typedArray(qe.relatedInformation,T.is))}Q.is=Te})(J||(n.Diagnostic=J={}));var A;(function(Q){function ie(te,q){for(var qe=[],dn=2;dn<arguments.length;dn++)qe[dn-2]=arguments[dn];var Jn={title:te,command:q};return Le.defined(qe)&&qe.length>0&&(Jn.arguments=qe),Jn}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&Le.string(q.title)&&Le.string(q.command)}Q.is=Te})(A||(n.Command=A={}));var V;(function(Q){function ie(qe,dn){return{range:qe,newText:dn}}Q.replace=ie;function Te(qe,dn){return{range:{start:qe,end:qe},newText:dn}}Q.insert=Te;function te(qe){return{range:qe,newText:""}}Q.del=te;function q(qe){var dn=qe;return Le.objectLiteral(dn)&&Le.string(dn.newText)&&f.is(dn.range)}Q.is=q})(V||(n.TextEdit=V={}));var ue;(function(Q){function ie(te,q,qe){var dn={label:te};return q!==void 0&&(dn.needsConfirmation=q),qe!==void 0&&(dn.description=qe),dn}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&Le.string(q.label)&&(Le.boolean(q.needsConfirmation)||q.needsConfirmation===void 0)&&(Le.string(q.description)||q.description===void 0)}Q.is=Te})(ue||(n.ChangeAnnotation=ue={}));var ye;(function(Q){function ie(Te){var te=Te;return Le.string(te)}Q.is=ie})(ye||(n.ChangeAnnotationIdentifier=ye={}));var he;(function(Q){function ie(qe,dn,Jn){return{range:qe,newText:dn,annotationId:Jn}}Q.replace=ie;function Te(qe,dn,Jn){return{range:{start:qe,end:qe},newText:dn,annotationId:Jn}}Q.insert=Te;function te(qe,dn){return{range:qe,newText:"",annotationId:dn}}Q.del=te;function q(qe){var dn=qe;return V.is(dn)&&(ue.is(dn.annotationId)||ye.is(dn.annotationId))}Q.is=q})(he||(n.AnnotatedTextEdit=he={}));var ce;(function(Q){function ie(te,q){return{textDocument:te,edits:q}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&_n.is(q.textDocument)&&Array.isArray(q.edits)}Q.is=Te})(ce||(n.TextDocumentEdit=ce={}));var Ee;(function(Q){function ie(te,q,qe){var dn={kind:"create",uri:te};return q!==void 0&&(q.overwrite!==void 0||q.ignoreIfExists!==void 0)&&(dn.options=q),qe!==void 0&&(dn.annotationId=qe),dn}Q.create=ie;function Te(te){var q=te;return q&&q.kind==="create"&&Le.string(q.uri)&&(q.options===void 0||(q.options.overwrite===void 0||Le.boolean(q.options.overwrite))&&(q.options.ignoreIfExists===void 0||Le.boolean(q.options.ignoreIfExists)))&&(q.annotationId===void 0||ye.is(q.annotationId))}Q.is=Te})(Ee||(n.CreateFile=Ee={}));var Fe;(function(Q){function ie(te,q,qe,dn){var Jn={kind:"rename",oldUri:te,newUri:q};return qe!==void 0&&(qe.overwrite!==void 0||qe.ignoreIfExists!==void 0)&&(Jn.options=qe),dn!==void 0&&(Jn.annotationId=dn),Jn}Q.create=ie;function Te(te){var q=te;return q&&q.kind==="rename"&&Le.string(q.oldUri)&&Le.string(q.newUri)&&(q.options===void 0||(q.options.overwrite===void 0||Le.boolean(q.options.overwrite))&&(q.options.ignoreIfExists===void 0||Le.boolean(q.options.ignoreIfExists)))&&(q.annotationId===void 0||ye.is(q.annotationId))}Q.is=Te})(Fe||(n.RenameFile=Fe={}));var be;(function(Q){function ie(te,q,qe){var dn={kind:"delete",uri:te};return q!==void 0&&(q.recursive!==void 0||q.ignoreIfNotExists!==void 0)&&(dn.options=q),qe!==void 0&&(dn.annotationId=qe),dn}Q.create=ie;function Te(te){var q=te;return q&&q.kind==="delete"&&Le.string(q.uri)&&(q.options===void 0||(q.options.recursive===void 0||Le.boolean(q.options.recursive))&&(q.options.ignoreIfNotExists===void 0||Le.boolean(q.options.ignoreIfNotExists)))&&(q.annotationId===void 0||ye.is(q.annotationId))}Q.is=Te})(be||(n.DeleteFile=be={}));var de;(function(Q){function ie(Te){var te=Te;return te&&(te.changes!==void 0||te.documentChanges!==void 0)&&(te.documentChanges===void 0||te.documentChanges.every(function(q){return Le.string(q.kind)?Ee.is(q)||Fe.is(q)||be.is(q):ce.is(q)}))}Q.is=ie})(de||(n.WorkspaceEdit=de={}));var Ae=function(){function Q(ie,Te){this.edits=ie,this.changeAnnotations=Te}return Q.prototype.insert=function(ie,Te,te){var q,qe;if(te===void 0?q=V.insert(ie,Te):ye.is(te)?(qe=te,q=he.insert(ie,Te,te)):(this.assertChangeAnnotations(this.changeAnnotations),qe=this.changeAnnotations.manage(te),q=he.insert(ie,Te,qe)),this.edits.push(q),qe!==void 0)return qe},Q.prototype.replace=function(ie,Te,te){var q,qe;if(te===void 0?q=V.replace(ie,Te):ye.is(te)?(qe=te,q=he.replace(ie,Te,te)):(this.assertChangeAnnotations(this.changeAnnotations),qe=this.changeAnnotations.manage(te),q=he.replace(ie,Te,qe)),this.edits.push(q),qe!==void 0)return qe},Q.prototype.delete=function(ie,Te){var te,q;if(Te===void 0?te=V.del(ie):ye.is(Te)?(q=Te,te=he.del(ie,Te)):(this.assertChangeAnnotations(this.changeAnnotations),q=this.changeAnnotations.manage(Te),te=he.del(ie,q)),this.edits.push(te),q!==void 0)return q},Q.prototype.add=function(ie){this.edits.push(ie)},Q.prototype.all=function(){return this.edits},Q.prototype.clear=function(){this.edits.splice(0,this.edits.length)},Q.prototype.assertChangeAnnotations=function(ie){if(ie===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},Q}(),G=function(){function Q(ie){this._annotations=ie===void 0?Object.create(null):ie,this._counter=0,this._size=0}return Q.prototype.all=function(){return this._annotations},Object.defineProperty(Q.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Q.prototype.manage=function(ie,Te){var te;if(ye.is(ie)?te=ie:(te=this.nextId(),Te=ie),this._annotations[te]!==void 0)throw new Error("Id ".concat(te," is already in use."));if(Te===void 0)throw new Error("No annotation provided for id ".concat(te));return this._annotations[te]=Te,this._size++,te},Q.prototype.nextId=function(){return this._counter++,this._counter.toString()},Q}(),Qe=function(){function Q(ie){var Te=this;this._textEditChanges=Object.create(null),ie!==void 0?(this._workspaceEdit=ie,ie.documentChanges?(this._changeAnnotations=new G(ie.changeAnnotations),ie.changeAnnotations=this._changeAnnotations.all(),ie.documentChanges.forEach(function(te){if(ce.is(te)){var q=new Ae(te.edits,Te._changeAnnotations);Te._textEditChanges[te.textDocument.uri]=q}})):ie.changes&&Object.keys(ie.changes).forEach(function(te){var q=new Ae(ie.changes[te]);Te._textEditChanges[te]=q})):this._workspaceEdit={}}return Object.defineProperty(Q.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),Q.prototype.getTextEditChange=function(ie){if(_n.is(ie)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var Te={uri:ie.uri,version:ie.version},te=this._textEditChanges[Te.uri];if(!te){var q=[],qe={textDocument:Te,edits:q};this._workspaceEdit.documentChanges.push(qe),te=new Ae(q,this._changeAnnotations),this._textEditChanges[Te.uri]=te}return te}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var te=this._textEditChanges[ie];if(!te){var q=[];this._workspaceEdit.changes[ie]=q,te=new Ae(q),this._textEditChanges[ie]=te}return te}},Q.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new G,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},Q.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},Q.prototype.createFile=function(ie,Te,te){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var q;ue.is(Te)||ye.is(Te)?q=Te:te=Te;var qe,dn;if(q===void 0?qe=Ee.create(ie,te):(dn=ye.is(q)?q:this._changeAnnotations.manage(q),qe=Ee.create(ie,te,dn)),this._workspaceEdit.documentChanges.push(qe),dn!==void 0)return dn},Q.prototype.renameFile=function(ie,Te,te,q){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var qe;ue.is(te)||ye.is(te)?qe=te:q=te;var dn,Jn;if(qe===void 0?dn=Fe.create(ie,Te,q):(Jn=ye.is(qe)?qe:this._changeAnnotations.manage(qe),dn=Fe.create(ie,Te,q,Jn)),this._workspaceEdit.documentChanges.push(dn),Jn!==void 0)return Jn},Q.prototype.deleteFile=function(ie,Te,te){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var q;ue.is(Te)||ye.is(Te)?q=Te:te=Te;var qe,dn;if(q===void 0?qe=be.create(ie,te):(dn=ye.is(q)?q:this._changeAnnotations.manage(q),qe=be.create(ie,te,dn)),this._workspaceEdit.documentChanges.push(qe),dn!==void 0)return dn},Q}();n.WorkspaceChange=Qe;var me;(function(Q){function ie(te){return{uri:te}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&Le.string(q.uri)}Q.is=Te})(me||(n.TextDocumentIdentifier=me={}));var Se;(function(Q){function ie(te,q){return{uri:te,version:q}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&Le.string(q.uri)&&Le.integer(q.version)}Q.is=Te})(Se||(n.VersionedTextDocumentIdentifier=Se={}));var _n;(function(Q){function ie(te,q){return{uri:te,version:q}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&Le.string(q.uri)&&(q.version===null||Le.integer(q.version))}Q.is=Te})(_n||(n.OptionalVersionedTextDocumentIdentifier=_n={}));var tt;(function(Q){function ie(te,q,qe,dn){return{uri:te,languageId:q,version:qe,text:dn}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&Le.string(q.uri)&&Le.string(q.languageId)&&Le.integer(q.version)&&Le.string(q.text)}Q.is=Te})(tt||(n.TextDocumentItem=tt={}));var Pe;(function(Q){Q.PlainText="plaintext",Q.Markdown="markdown";function ie(Te){var te=Te;return te===Q.PlainText||te===Q.Markdown}Q.is=ie})(Pe||(n.MarkupKind=Pe={}));var gn;(function(Q){function ie(Te){var te=Te;return Le.objectLiteral(Te)&&Pe.is(te.kind)&&Le.string(te.value)}Q.is=ie})(gn||(n.MarkupContent=gn={}));var $e;(function(Q){Q.Text=1,Q.Method=2,Q.Function=3,Q.Constructor=4,Q.Field=5,Q.Variable=6,Q.Class=7,Q.Interface=8,Q.Module=9,Q.Property=10,Q.Unit=11,Q.Value=12,Q.Enum=13,Q.Keyword=14,Q.Snippet=15,Q.Color=16,Q.File=17,Q.Reference=18,Q.Folder=19,Q.EnumMember=20,Q.Constant=21,Q.Struct=22,Q.Event=23,Q.Operator=24,Q.TypeParameter=25})($e||(n.CompletionItemKind=$e={}));var Ln;(function(Q){Q.PlainText=1,Q.Snippet=2})(Ln||(n.InsertTextFormat=Ln={}));var Vt;(function(Q){Q.Deprecated=1})(Vt||(n.CompletionItemTag=Vt={}));var Hn;(function(Q){function ie(te,q,qe){return{newText:te,insert:q,replace:qe}}Q.create=ie;function Te(te){var q=te;return q&&Le.string(q.newText)&&f.is(q.insert)&&f.is(q.replace)}Q.is=Te})(Hn||(n.InsertReplaceEdit=Hn={}));var Ye;(function(Q){Q.asIs=1,Q.adjustIndentation=2})(Ye||(n.InsertTextMode=Ye={}));var se;(function(Q){function ie(Te){var te=Te;return te&&(Le.string(te.detail)||te.detail===void 0)&&(Le.string(te.description)||te.description===void 0)}Q.is=ie})(se||(n.CompletionItemLabelDetails=se={}));var jn;(function(Q){function ie(Te){return{label:Te}}Q.create=ie})(jn||(n.CompletionItem=jn={}));var wn;(function(Q){function ie(Te,te){return{items:Te||[],isIncomplete:!!te}}Q.create=ie})(wn||(n.CompletionList=wn={}));var Xn;(function(Q){function ie(te){return te.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}Q.fromPlainText=ie;function Te(te){var q=te;return Le.string(q)||Le.objectLiteral(q)&&Le.string(q.language)&&Le.string(q.value)}Q.is=Te})(Xn||(n.MarkedString=Xn={}));var ft;(function(Q){function ie(Te){var te=Te;return!!te&&Le.objectLiteral(te)&&(gn.is(te.contents)||Xn.is(te.contents)||Le.typedArray(te.contents,Xn.is))&&(Te.range===void 0||f.is(Te.range))}Q.is=ie})(ft||(n.Hover=ft={}));var Ft;(function(Q){function ie(Te,te){return te?{label:Te,documentation:te}:{label:Te}}Q.create=ie})(Ft||(n.ParameterInformation=Ft={}));var Et;(function(Q){function ie(Te,te){for(var q=[],qe=2;qe<arguments.length;qe++)q[qe-2]=arguments[qe];var dn={label:Te};return Le.defined(te)&&(dn.documentation=te),Le.defined(q)?dn.parameters=q:dn.parameters=[],dn}Q.create=ie})(Et||(n.SignatureInformation=Et={}));var At;(function(Q){Q.Text=1,Q.Read=2,Q.Write=3})(At||(n.DocumentHighlightKind=At={}));var xn;(function(Q){function ie(Te,te){var q={range:Te};return Le.number(te)&&(q.kind=te),q}Q.create=ie})(xn||(n.DocumentHighlight=xn={}));var It;(function(Q){Q.File=1,Q.Module=2,Q.Namespace=3,Q.Package=4,Q.Class=5,Q.Method=6,Q.Property=7,Q.Field=8,Q.Constructor=9,Q.Enum=10,Q.Interface=11,Q.Function=12,Q.Variable=13,Q.Constant=14,Q.String=15,Q.Number=16,Q.Boolean=17,Q.Array=18,Q.Object=19,Q.Key=20,Q.Null=21,Q.EnumMember=22,Q.Struct=23,Q.Event=24,Q.Operator=25,Q.TypeParameter=26})(It||(n.SymbolKind=It={}));var pr;(function(Q){Q.Deprecated=1})(pr||(n.SymbolTag=pr={}));var tn;(function(Q){function ie(Te,te,q,qe,dn){var Jn={name:Te,kind:te,location:{uri:qe,range:q}};return dn&&(Jn.containerName=dn),Jn}Q.create=ie})(tn||(n.SymbolInformation=tn={}));var ot;(function(Q){function ie(Te,te,q,qe){return qe!==void 0?{name:Te,kind:te,location:{uri:q,range:qe}}:{name:Te,kind:te,location:{uri:q}}}Q.create=ie})(ot||(n.WorkspaceSymbol=ot={}));var Zn;(function(Q){function ie(te,q,qe,dn,Jn,ke){var We={name:te,detail:q,kind:qe,range:dn,selectionRange:Jn};return ke!==void 0&&(We.children=ke),We}Q.create=ie;function Te(te){var q=te;return q&&Le.string(q.name)&&Le.number(q.kind)&&f.is(q.range)&&f.is(q.selectionRange)&&(q.detail===void 0||Le.string(q.detail))&&(q.deprecated===void 0||Le.boolean(q.deprecated))&&(q.children===void 0||Array.isArray(q.children))&&(q.tags===void 0||Array.isArray(q.tags))}Q.is=Te})(Zn||(n.DocumentSymbol=Zn={}));var zt;(function(Q){Q.Empty="",Q.QuickFix="quickfix",Q.Refactor="refactor",Q.RefactorExtract="refactor.extract",Q.RefactorInline="refactor.inline",Q.RefactorRewrite="refactor.rewrite",Q.Source="source",Q.SourceOrganizeImports="source.organizeImports",Q.SourceFixAll="source.fixAll"})(zt||(n.CodeActionKind=zt={}));var Yt;(function(Q){Q.Invoked=1,Q.Automatic=2})(Yt||(n.CodeActionTriggerKind=Yt={}));var Cr;(function(Q){function ie(te,q,qe){var dn={diagnostics:te};return q!=null&&(dn.only=q),qe!=null&&(dn.triggerKind=qe),dn}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&Le.typedArray(q.diagnostics,J.is)&&(q.only===void 0||Le.typedArray(q.only,Le.string))&&(q.triggerKind===void 0||q.triggerKind===Yt.Invoked||q.triggerKind===Yt.Automatic)}Q.is=Te})(Cr||(n.CodeActionContext=Cr={}));var xi;(function(Q){function ie(te,q,qe){var dn={title:te},Jn=!0;return typeof q=="string"?(Jn=!1,dn.kind=q):A.is(q)?dn.command=q:dn.edit=q,Jn&&qe!==void 0&&(dn.kind=qe),dn}Q.create=ie;function Te(te){var q=te;return q&&Le.string(q.title)&&(q.diagnostics===void 0||Le.typedArray(q.diagnostics,J.is))&&(q.kind===void 0||Le.string(q.kind))&&(q.edit!==void 0||q.command!==void 0)&&(q.command===void 0||A.is(q.command))&&(q.isPreferred===void 0||Le.boolean(q.isPreferred))&&(q.edit===void 0||de.is(q.edit))}Q.is=Te})(xi||(n.CodeAction=xi={}));var Ie;(function(Q){function ie(te,q){var qe={range:te};return Le.defined(q)&&(qe.data=q),qe}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&f.is(q.range)&&(Le.undefined(q.command)||A.is(q.command))}Q.is=Te})(Ie||(n.CodeLens=Ie={}));var Oe;(function(Q){function ie(te,q){return{tabSize:te,insertSpaces:q}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&Le.uinteger(q.tabSize)&&Le.boolean(q.insertSpaces)}Q.is=Te})(Oe||(n.FormattingOptions=Oe={}));var Je;(function(Q){function ie(te,q,qe){return{range:te,target:q,data:qe}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&f.is(q.range)&&(Le.undefined(q.target)||Le.string(q.target))}Q.is=Te})(Je||(n.DocumentLink=Je={}));var Z;(function(Q){function ie(te,q){return{range:te,parent:q}}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&f.is(q.range)&&(q.parent===void 0||Q.is(q.parent))}Q.is=Te})(Z||(n.SelectionRange=Z={}));var fe;(function(Q){Q.namespace="namespace",Q.type="type",Q.class="class",Q.enum="enum",Q.interface="interface",Q.struct="struct",Q.typeParameter="typeParameter",Q.parameter="parameter",Q.variable="variable",Q.property="property",Q.enumMember="enumMember",Q.event="event",Q.function="function",Q.method="method",Q.macro="macro",Q.keyword="keyword",Q.modifier="modifier",Q.comment="comment",Q.string="string",Q.number="number",Q.regexp="regexp",Q.operator="operator",Q.decorator="decorator"})(fe||(n.SemanticTokenTypes=fe={}));var Ce;(function(Q){Q.declaration="declaration",Q.definition="definition",Q.readonly="readonly",Q.static="static",Q.deprecated="deprecated",Q.abstract="abstract",Q.async="async",Q.modification="modification",Q.documentation="documentation",Q.defaultLibrary="defaultLibrary"})(Ce||(n.SemanticTokenModifiers=Ce={}));var ne;(function(Q){function ie(Te){var te=Te;return Le.objectLiteral(te)&&(te.resultId===void 0||typeof te.resultId=="string")&&Array.isArray(te.data)&&(te.data.length===0||typeof te.data[0]=="number")}Q.is=ie})(ne||(n.SemanticTokens=ne={}));var sn;(function(Q){function ie(te,q){return{range:te,text:q}}Q.create=ie;function Te(te){var q=te;return q!=null&&f.is(q.range)&&Le.string(q.text)}Q.is=Te})(sn||(n.InlineValueText=sn={}));var H;(function(Q){function ie(te,q,qe){return{range:te,variableName:q,caseSensitiveLookup:qe}}Q.create=ie;function Te(te){var q=te;return q!=null&&f.is(q.range)&&Le.boolean(q.caseSensitiveLookup)&&(Le.string(q.variableName)||q.variableName===void 0)}Q.is=Te})(H||(n.InlineValueVariableLookup=H={}));var ge;(function(Q){function ie(te,q){return{range:te,expression:q}}Q.create=ie;function Te(te){var q=te;return q!=null&&f.is(q.range)&&(Le.string(q.expression)||q.expression===void 0)}Q.is=Te})(ge||(n.InlineValueEvaluatableExpression=ge={}));var qn;(function(Q){function ie(te,q){return{frameId:te,stoppedLocation:q}}Q.create=ie;function Te(te){var q=te;return Le.defined(q)&&f.is(te.stoppedLocation)}Q.is=Te})(qn||(n.InlineValueContext=qn={}));var kn;(function(Q){Q.Type=1,Q.Parameter=2;function ie(Te){return Te===1||Te===2}Q.is=ie})(kn||(n.InlayHintKind=kn={}));var On;(function(Q){function ie(te){return{value:te}}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&(q.tooltip===void 0||Le.string(q.tooltip)||gn.is(q.tooltip))&&(q.location===void 0||m.is(q.location))&&(q.command===void 0||A.is(q.command))}Q.is=Te})(On||(n.InlayHintLabelPart=On={}));var nn;(function(Q){function ie(te,q,qe){var dn={position:te,label:q};return qe!==void 0&&(dn.kind=qe),dn}Q.create=ie;function Te(te){var q=te;return Le.objectLiteral(q)&&u.is(q.position)&&(Le.string(q.label)||Le.typedArray(q.label,On.is))&&(q.kind===void 0||kn.is(q.kind))&&q.textEdits===void 0||Le.typedArray(q.textEdits,V.is)&&(q.tooltip===void 0||Le.string(q.tooltip)||gn.is(q.tooltip))&&(q.paddingLeft===void 0||Le.boolean(q.paddingLeft))&&(q.paddingRight===void 0||Le.boolean(q.paddingRight))}Q.is=Te})(nn||(n.InlayHint=nn={}));var Dr;(function(Q){function ie(Te){return{kind:"snippet",value:Te}}Q.createSnippet=ie})(Dr||(n.StringValue=Dr={}));var Gt;(function(Q){function ie(Te,te,q,qe){return{insertText:Te,filterText:te,range:q,command:qe}}Q.create=ie})(Gt||(n.InlineCompletionItem=Gt={}));var Rr;(function(Q){function ie(Te){return{items:Te}}Q.create=ie})(Rr||(n.InlineCompletionList=Rr={}));var zi;(function(Q){Q.Invoked=0,Q.Automatic=1})(zi||(n.InlineCompletionTriggerKind=zi={}));var zo;(function(Q){function ie(Te,te){return{range:Te,text:te}}Q.create=ie})(zo||(n.SelectedCompletionInfo=zo={}));var sa;(function(Q){function ie(Te,te){return{triggerKind:Te,selectedCompletionInfo:te}}Q.create=ie})(sa||(n.InlineCompletionContext=sa={}));var mo;(function(Q){function ie(Te){var te=Te;return Le.objectLiteral(te)&&i.is(te.uri)&&Le.string(te.name)}Q.is=ie})(mo||(n.WorkspaceFolder=mo={})),n.EOL=[`
34
+ `,`\r
35
+ `,"\r"];var Ve;(function(Q){function ie(qe,dn,Jn,ke){return new et(qe,dn,Jn,ke)}Q.create=ie;function Te(qe){var dn=qe;return!!(Le.defined(dn)&&Le.string(dn.uri)&&(Le.undefined(dn.languageId)||Le.string(dn.languageId))&&Le.uinteger(dn.lineCount)&&Le.func(dn.getText)&&Le.func(dn.positionAt)&&Le.func(dn.offsetAt))}Q.is=Te;function te(qe,dn){for(var Jn=qe.getText(),ke=q(dn,function(kr,Or){var Rn=kr.range.start.line-Or.range.start.line;return Rn===0?kr.range.start.character-Or.range.start.character:Rn}),We=Jn.length,ln=ke.length-1;ln>=0;ln--){var zn=ke[ln],St=qe.offsetAt(zn.range.start),ct=qe.offsetAt(zn.range.end);if(ct<=We)Jn=Jn.substring(0,St)+zn.newText+Jn.substring(ct,Jn.length);else throw new Error("Overlapping edit");We=St}return Jn}Q.applyEdits=te;function q(qe,dn){if(qe.length<=1)return qe;var Jn=qe.length/2|0,ke=qe.slice(0,Jn),We=qe.slice(Jn);q(ke,dn),q(We,dn);for(var ln=0,zn=0,St=0;ln<ke.length&&zn<We.length;){var ct=dn(ke[ln],We[zn]);ct<=0?qe[St++]=ke[ln++]:qe[St++]=We[zn++]}for(;ln<ke.length;)qe[St++]=ke[ln++];for(;zn<We.length;)qe[St++]=We[zn++];return qe}})(Ve||(n.TextDocument=Ve={}));var et=function(){function Q(ie,Te,te,q){this._uri=ie,this._languageId=Te,this._version=te,this._content=q,this._lineOffsets=void 0}return Object.defineProperty(Q.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),Q.prototype.getText=function(ie){if(ie){var Te=this.offsetAt(ie.start),te=this.offsetAt(ie.end);return this._content.substring(Te,te)}return this._content},Q.prototype.update=function(ie,Te){this._content=ie.text,this._version=Te,this._lineOffsets=void 0},Q.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var ie=[],Te=this._content,te=!0,q=0;q<Te.length;q++){te&&(ie.push(q),te=!1);var qe=Te.charAt(q);te=qe==="\r"||qe===`
36
+ `,qe==="\r"&&q+1<Te.length&&Te.charAt(q+1)===`
37
+ `&&q++}te&&Te.length>0&&ie.push(Te.length),this._lineOffsets=ie}return this._lineOffsets},Q.prototype.positionAt=function(ie){ie=Math.max(Math.min(ie,this._content.length),0);var Te=this.getLineOffsets(),te=0,q=Te.length;if(q===0)return u.create(0,ie);for(;te<q;){var qe=Math.floor((te+q)/2);Te[qe]>ie?q=qe:te=qe+1}var dn=te-1;return u.create(dn,ie-Te[dn])},Q.prototype.offsetAt=function(ie){var Te=this.getLineOffsets();if(ie.line>=Te.length)return this._content.length;if(ie.line<0)return 0;var te=Te[ie.line],q=ie.line+1<Te.length?Te[ie.line+1]:this._content.length;return Math.max(Math.min(te+ie.character,q),te)},Object.defineProperty(Q.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),Q}(),Le;(function(Q){var ie=Object.prototype.toString;function Te(ct){return typeof ct<"u"}Q.defined=Te;function te(ct){return typeof ct>"u"}Q.undefined=te;function q(ct){return ct===!0||ct===!1}Q.boolean=q;function qe(ct){return ie.call(ct)==="[object String]"}Q.string=qe;function dn(ct){return ie.call(ct)==="[object Number]"}Q.number=dn;function Jn(ct,kr,Or){return ie.call(ct)==="[object Number]"&&kr<=ct&&ct<=Or}Q.numberRange=Jn;function ke(ct){return ie.call(ct)==="[object Number]"&&-2147483648<=ct&&ct<=2147483647}Q.integer=ke;function We(ct){return ie.call(ct)==="[object Number]"&&0<=ct&&ct<=2147483647}Q.uinteger=We;function ln(ct){return ie.call(ct)==="[object Function]"}Q.func=ln;function zn(ct){return ct!==null&&typeof ct=="object"}Q.objectLiteral=zn;function St(ct,kr){return Array.isArray(ct)&&ct.every(kr)}Q.typedArray=St})(Le||(Le={}))})});var us=Zt($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.ProtocolNotificationType=$u.ProtocolNotificationType0=$u.ProtocolRequestType=$u.ProtocolRequestType0=$u.RegistrationType=$u.MessageDirection=void 0;var w_=CT(),JW;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(JW||($u.MessageDirection=JW={}));var YR=class{constructor(n){this.method=n}};$u.RegistrationType=YR;var XR=class extends w_.RequestType0{constructor(n){super(n)}};$u.ProtocolRequestType0=XR;var ZR=class extends w_.RequestType{constructor(n){super(n,w_.ParameterStructures.byName)}};$u.ProtocolRequestType=ZR;var e1=class extends w_.NotificationType0{constructor(n){super(n)}};$u.ProtocolNotificationType0=e1;var n1=class extends w_.NotificationType{constructor(n){super(n,w_.ParameterStructures.byName)}};$u.ProtocolNotificationType=n1});var Ak=Zt(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.objectLiteral=mc.typedArray=mc.stringArray=mc.array=mc.func=mc.error=mc.number=mc.string=mc.boolean=void 0;function ise(e){return e===!0||e===!1}mc.boolean=ise;function WW(e){return typeof e=="string"||e instanceof String}mc.string=WW;function ose(e){return typeof e=="number"||e instanceof Number}mc.number=ose;function ase(e){return e instanceof Error}mc.error=ase;function sse(e){return typeof e=="function"}mc.func=sse;function UW(e){return Array.isArray(e)}mc.array=UW;function cse(e){return UW(e)&&e.every(n=>WW(n))}mc.stringArray=cse;function lse(e,n){return Array.isArray(e)&&e.every(n)}mc.typedArray=lse;function use(e){return e!==null&&typeof e=="object"}mc.objectLiteral=use});var VW=Zt(wk=>{"use strict";Object.defineProperty(wk,"__esModule",{value:!0});wk.ImplementationRequest=void 0;var KW=us(),qW;(function(e){e.method="textDocument/implementation",e.messageDirection=KW.MessageDirection.clientToServer,e.type=new KW.ProtocolRequestType(e.method)})(qW||(wk.ImplementationRequest=qW={}))});var GW=Zt(Rk=>{"use strict";Object.defineProperty(Rk,"__esModule",{value:!0});Rk.TypeDefinitionRequest=void 0;var HW=us(),zW;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=HW.MessageDirection.clientToServer,e.type=new HW.ProtocolRequestType(e.method)})(zW||(Rk.TypeDefinitionRequest=zW={}))});var YW=Zt(R_=>{"use strict";Object.defineProperty(R_,"__esModule",{value:!0});R_.DidChangeWorkspaceFoldersNotification=R_.WorkspaceFoldersRequest=void 0;var Ok=us(),$W;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=Ok.MessageDirection.serverToClient,e.type=new Ok.ProtocolRequestType0(e.method)})($W||(R_.WorkspaceFoldersRequest=$W={}));var QW;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=Ok.MessageDirection.clientToServer,e.type=new Ok.ProtocolNotificationType(e.method)})(QW||(R_.DidChangeWorkspaceFoldersNotification=QW={}))});var eU=Zt(Mk=>{"use strict";Object.defineProperty(Mk,"__esModule",{value:!0});Mk.ConfigurationRequest=void 0;var XW=us(),ZW;(function(e){e.method="workspace/configuration",e.messageDirection=XW.MessageDirection.serverToClient,e.type=new XW.ProtocolRequestType(e.method)})(ZW||(Mk.ConfigurationRequest=ZW={}))});var rU=Zt(O_=>{"use strict";Object.defineProperty(O_,"__esModule",{value:!0});O_.ColorPresentationRequest=O_.DocumentColorRequest=void 0;var Bk=us(),nU;(function(e){e.method="textDocument/documentColor",e.messageDirection=Bk.MessageDirection.clientToServer,e.type=new Bk.ProtocolRequestType(e.method)})(nU||(O_.DocumentColorRequest=nU={}));var tU;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=Bk.MessageDirection.clientToServer,e.type=new Bk.ProtocolRequestType(e.method)})(tU||(O_.ColorPresentationRequest=tU={}))});var aU=Zt(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.FoldingRangeRefreshRequest=M_.FoldingRangeRequest=void 0;var jk=us(),iU;(function(e){e.method="textDocument/foldingRange",e.messageDirection=jk.MessageDirection.clientToServer,e.type=new jk.ProtocolRequestType(e.method)})(iU||(M_.FoldingRangeRequest=iU={}));var oU;(function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=jk.MessageDirection.serverToClient,e.type=new jk.ProtocolRequestType0(e.method)})(oU||(M_.FoldingRangeRefreshRequest=oU={}))});var lU=Zt(Jk=>{"use strict";Object.defineProperty(Jk,"__esModule",{value:!0});Jk.DeclarationRequest=void 0;var sU=us(),cU;(function(e){e.method="textDocument/declaration",e.messageDirection=sU.MessageDirection.clientToServer,e.type=new sU.ProtocolRequestType(e.method)})(cU||(Jk.DeclarationRequest=cU={}))});var fU=Zt(Wk=>{"use strict";Object.defineProperty(Wk,"__esModule",{value:!0});Wk.SelectionRangeRequest=void 0;var uU=us(),dU;(function(e){e.method="textDocument/selectionRange",e.messageDirection=uU.MessageDirection.clientToServer,e.type=new uU.ProtocolRequestType(e.method)})(dU||(Wk.SelectionRangeRequest=dU={}))});var yU=Zt(Wy=>{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});Wy.WorkDoneProgressCancelNotification=Wy.WorkDoneProgressCreateRequest=Wy.WorkDoneProgress=void 0;var dse=CT(),Uk=us(),pU;(function(e){e.type=new dse.ProgressType;function n(r){return r===e.type}e.is=n})(pU||(Wy.WorkDoneProgress=pU={}));var mU;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=Uk.MessageDirection.serverToClient,e.type=new Uk.ProtocolRequestType(e.method)})(mU||(Wy.WorkDoneProgressCreateRequest=mU={}));var gU;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=Uk.MessageDirection.clientToServer,e.type=new Uk.ProtocolNotificationType(e.method)})(gU||(Wy.WorkDoneProgressCancelNotification=gU={}))});var _U=Zt(Uy=>{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});Uy.CallHierarchyOutgoingCallsRequest=Uy.CallHierarchyIncomingCallsRequest=Uy.CallHierarchyPrepareRequest=void 0;var B_=us(),hU;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=B_.MessageDirection.clientToServer,e.type=new B_.ProtocolRequestType(e.method)})(hU||(Uy.CallHierarchyPrepareRequest=hU={}));var TU;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=B_.MessageDirection.clientToServer,e.type=new B_.ProtocolRequestType(e.method)})(TU||(Uy.CallHierarchyIncomingCallsRequest=TU={}));var SU;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=B_.MessageDirection.clientToServer,e.type=new B_.ProtocolRequestType(e.method)})(SU||(Uy.CallHierarchyOutgoingCallsRequest=SU={}))});var PU=Zt(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Qu.SemanticTokensRefreshRequest=Qu.SemanticTokensRangeRequest=Qu.SemanticTokensDeltaRequest=Qu.SemanticTokensRequest=Qu.SemanticTokensRegistrationType=Qu.TokenFormat=void 0;var ag=us(),xU;(function(e){e.Relative="relative"})(xU||(Qu.TokenFormat=xU={}));var dD;(function(e){e.method="textDocument/semanticTokens",e.type=new ag.RegistrationType(e.method)})(dD||(Qu.SemanticTokensRegistrationType=dD={}));var bU;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=ag.MessageDirection.clientToServer,e.type=new ag.ProtocolRequestType(e.method),e.registrationMethod=dD.method})(bU||(Qu.SemanticTokensRequest=bU={}));var CU;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=ag.MessageDirection.clientToServer,e.type=new ag.ProtocolRequestType(e.method),e.registrationMethod=dD.method})(CU||(Qu.SemanticTokensDeltaRequest=CU={}));var DU;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=ag.MessageDirection.clientToServer,e.type=new ag.ProtocolRequestType(e.method),e.registrationMethod=dD.method})(DU||(Qu.SemanticTokensRangeRequest=DU={}));var EU;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=ag.MessageDirection.serverToClient,e.type=new ag.ProtocolRequestType0(e.method)})(EU||(Qu.SemanticTokensRefreshRequest=EU={}))});var vU=Zt(Kk=>{"use strict";Object.defineProperty(Kk,"__esModule",{value:!0});Kk.ShowDocumentRequest=void 0;var NU=us(),kU;(function(e){e.method="window/showDocument",e.messageDirection=NU.MessageDirection.serverToClient,e.type=new NU.ProtocolRequestType(e.method)})(kU||(Kk.ShowDocumentRequest=kU={}))});var LU=Zt(qk=>{"use strict";Object.defineProperty(qk,"__esModule",{value:!0});qk.LinkedEditingRangeRequest=void 0;var FU=us(),IU;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=FU.MessageDirection.clientToServer,e.type=new FU.ProtocolRequestType(e.method)})(IU||(qk.LinkedEditingRangeRequest=IU={}))});var JU=Zt(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.WillDeleteFilesRequest=Ol.DidDeleteFilesNotification=Ol.DidRenameFilesNotification=Ol.WillRenameFilesRequest=Ol.DidCreateFilesNotification=Ol.WillCreateFilesRequest=Ol.FileOperationPatternKind=void 0;var gf=us(),AU;(function(e){e.file="file",e.folder="folder"})(AU||(Ol.FileOperationPatternKind=AU={}));var wU;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=gf.MessageDirection.clientToServer,e.type=new gf.ProtocolRequestType(e.method)})(wU||(Ol.WillCreateFilesRequest=wU={}));var RU;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=gf.MessageDirection.clientToServer,e.type=new gf.ProtocolNotificationType(e.method)})(RU||(Ol.DidCreateFilesNotification=RU={}));var OU;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=gf.MessageDirection.clientToServer,e.type=new gf.ProtocolRequestType(e.method)})(OU||(Ol.WillRenameFilesRequest=OU={}));var MU;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=gf.MessageDirection.clientToServer,e.type=new gf.ProtocolNotificationType(e.method)})(MU||(Ol.DidRenameFilesNotification=MU={}));var BU;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=gf.MessageDirection.clientToServer,e.type=new gf.ProtocolNotificationType(e.method)})(BU||(Ol.DidDeleteFilesNotification=BU={}));var jU;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=gf.MessageDirection.clientToServer,e.type=new gf.ProtocolRequestType(e.method)})(jU||(Ol.WillDeleteFilesRequest=jU={}))});var VU=Zt(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});Ky.MonikerRequest=Ky.MonikerKind=Ky.UniquenessLevel=void 0;var WU=us(),UU;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(UU||(Ky.UniquenessLevel=UU={}));var KU;(function(e){e.$import="import",e.$export="export",e.local="local"})(KU||(Ky.MonikerKind=KU={}));var qU;(function(e){e.method="textDocument/moniker",e.messageDirection=WU.MessageDirection.clientToServer,e.type=new WU.ProtocolRequestType(e.method)})(qU||(Ky.MonikerRequest=qU={}))});var $U=Zt(qy=>{"use strict";Object.defineProperty(qy,"__esModule",{value:!0});qy.TypeHierarchySubtypesRequest=qy.TypeHierarchySupertypesRequest=qy.TypeHierarchyPrepareRequest=void 0;var j_=us(),HU;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=j_.MessageDirection.clientToServer,e.type=new j_.ProtocolRequestType(e.method)})(HU||(qy.TypeHierarchyPrepareRequest=HU={}));var zU;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=j_.MessageDirection.clientToServer,e.type=new j_.ProtocolRequestType(e.method)})(zU||(qy.TypeHierarchySupertypesRequest=zU={}));var GU;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=j_.MessageDirection.clientToServer,e.type=new j_.ProtocolRequestType(e.method)})(GU||(qy.TypeHierarchySubtypesRequest=GU={}))});var XU=Zt(J_=>{"use strict";Object.defineProperty(J_,"__esModule",{value:!0});J_.InlineValueRefreshRequest=J_.InlineValueRequest=void 0;var Vk=us(),QU;(function(e){e.method="textDocument/inlineValue",e.messageDirection=Vk.MessageDirection.clientToServer,e.type=new Vk.ProtocolRequestType(e.method)})(QU||(J_.InlineValueRequest=QU={}));var YU;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=Vk.MessageDirection.serverToClient,e.type=new Vk.ProtocolRequestType0(e.method)})(YU||(J_.InlineValueRefreshRequest=YU={}))});var t7=Zt(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});Vy.InlayHintRefreshRequest=Vy.InlayHintResolveRequest=Vy.InlayHintRequest=void 0;var W_=us(),ZU;(function(e){e.method="textDocument/inlayHint",e.messageDirection=W_.MessageDirection.clientToServer,e.type=new W_.ProtocolRequestType(e.method)})(ZU||(Vy.InlayHintRequest=ZU={}));var e7;(function(e){e.method="inlayHint/resolve",e.messageDirection=W_.MessageDirection.clientToServer,e.type=new W_.ProtocolRequestType(e.method)})(e7||(Vy.InlayHintResolveRequest=e7={}));var n7;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=W_.MessageDirection.serverToClient,e.type=new W_.ProtocolRequestType0(e.method)})(n7||(Vy.InlayHintRefreshRequest=n7={}))});var l7=Zt(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.DiagnosticRefreshRequest=yf.WorkspaceDiagnosticRequest=yf.DocumentDiagnosticRequest=yf.DocumentDiagnosticReportKind=yf.DiagnosticServerCancellationData=void 0;var c7=CT(),fse=Ak(),U_=us(),r7;(function(e){function n(r){let i=r;return i&&fse.boolean(i.retriggerRequest)}e.is=n})(r7||(yf.DiagnosticServerCancellationData=r7={}));var i7;(function(e){e.Full="full",e.Unchanged="unchanged"})(i7||(yf.DocumentDiagnosticReportKind=i7={}));var o7;(function(e){e.method="textDocument/diagnostic",e.messageDirection=U_.MessageDirection.clientToServer,e.type=new U_.ProtocolRequestType(e.method),e.partialResult=new c7.ProgressType})(o7||(yf.DocumentDiagnosticRequest=o7={}));var a7;(function(e){e.method="workspace/diagnostic",e.messageDirection=U_.MessageDirection.clientToServer,e.type=new U_.ProtocolRequestType(e.method),e.partialResult=new c7.ProgressType})(a7||(yf.WorkspaceDiagnosticRequest=a7={}));var s7;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=U_.MessageDirection.serverToClient,e.type=new U_.ProtocolRequestType0(e.method)})(s7||(yf.DiagnosticRefreshRequest=s7={}))});var y7=Zt(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.DidCloseNotebookDocumentNotification=js.DidSaveNotebookDocumentNotification=js.DidChangeNotebookDocumentNotification=js.NotebookCellArrayChange=js.DidOpenNotebookDocumentNotification=js.NotebookDocumentSyncRegistrationType=js.NotebookDocument=js.NotebookCell=js.ExecutionSummary=js.NotebookCellKind=void 0;var fD=Lk(),Qf=Ak(),Xp=us(),t1;(function(e){e.Markup=1,e.Code=2;function n(r){return r===1||r===2}e.is=n})(t1||(js.NotebookCellKind=t1={}));var r1;(function(e){function n(a,c){let u={executionOrder:a};return(c===!0||c===!1)&&(u.success=c),u}e.create=n;function r(a){let c=a;return Qf.objectLiteral(c)&&fD.uinteger.is(c.executionOrder)&&(c.success===void 0||Qf.boolean(c.success))}e.is=r;function i(a,c){return a===c?!0:a==null||c===null||c===void 0?!1:a.executionOrder===c.executionOrder&&a.success===c.success}e.equals=i})(r1||(js.ExecutionSummary=r1={}));var Hk;(function(e){function n(c,u){return{kind:c,document:u}}e.create=n;function r(c){let u=c;return Qf.objectLiteral(u)&&t1.is(u.kind)&&fD.DocumentUri.is(u.document)&&(u.metadata===void 0||Qf.objectLiteral(u.metadata))}e.is=r;function i(c,u){let f=new Set;return c.document!==u.document&&f.add("document"),c.kind!==u.kind&&f.add("kind"),c.executionSummary!==u.executionSummary&&f.add("executionSummary"),(c.metadata!==void 0||u.metadata!==void 0)&&!a(c.metadata,u.metadata)&&f.add("metadata"),(c.executionSummary!==void 0||u.executionSummary!==void 0)&&!r1.equals(c.executionSummary,u.executionSummary)&&f.add("executionSummary"),f}e.diff=i;function a(c,u){if(c===u)return!0;if(c==null||u===null||u===void 0||typeof c!=typeof u||typeof c!="object")return!1;let f=Array.isArray(c),m=Array.isArray(u);if(f!==m)return!1;if(f&&m){if(c.length!==u.length)return!1;for(let y=0;y<c.length;y++)if(!a(c[y],u[y]))return!1}if(Qf.objectLiteral(c)&&Qf.objectLiteral(u)){let y=Object.keys(c),g=Object.keys(u);if(y.length!==g.length||(y.sort(),g.sort(),!a(y,g)))return!1;for(let S=0;S<y.length;S++){let _=y[S];if(!a(c[_],u[_]))return!1}}return!0}})(Hk||(js.NotebookCell=Hk={}));var u7;(function(e){function n(i,a,c,u){return{uri:i,notebookType:a,version:c,cells:u}}e.create=n;function r(i){let a=i;return Qf.objectLiteral(a)&&Qf.string(a.uri)&&fD.integer.is(a.version)&&Qf.typedArray(a.cells,Hk.is)}e.is=r})(u7||(js.NotebookDocument=u7={}));var K_;(function(e){e.method="notebookDocument/sync",e.messageDirection=Xp.MessageDirection.clientToServer,e.type=new Xp.RegistrationType(e.method)})(K_||(js.NotebookDocumentSyncRegistrationType=K_={}));var d7;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=Xp.MessageDirection.clientToServer,e.type=new Xp.ProtocolNotificationType(e.method),e.registrationMethod=K_.method})(d7||(js.DidOpenNotebookDocumentNotification=d7={}));var f7;(function(e){function n(i){let a=i;return Qf.objectLiteral(a)&&fD.uinteger.is(a.start)&&fD.uinteger.is(a.deleteCount)&&(a.cells===void 0||Qf.typedArray(a.cells,Hk.is))}e.is=n;function r(i,a,c){let u={start:i,deleteCount:a};return c!==void 0&&(u.cells=c),u}e.create=r})(f7||(js.NotebookCellArrayChange=f7={}));var p7;(function(e){e.method="notebookDocument/didChange",e.messageDirection=Xp.MessageDirection.clientToServer,e.type=new Xp.ProtocolNotificationType(e.method),e.registrationMethod=K_.method})(p7||(js.DidChangeNotebookDocumentNotification=p7={}));var m7;(function(e){e.method="notebookDocument/didSave",e.messageDirection=Xp.MessageDirection.clientToServer,e.type=new Xp.ProtocolNotificationType(e.method),e.registrationMethod=K_.method})(m7||(js.DidSaveNotebookDocumentNotification=m7={}));var g7;(function(e){e.method="notebookDocument/didClose",e.messageDirection=Xp.MessageDirection.clientToServer,e.type=new Xp.ProtocolNotificationType(e.method),e.registrationMethod=K_.method})(g7||(js.DidCloseNotebookDocumentNotification=g7={}))});var S7=Zt(zk=>{"use strict";Object.defineProperty(zk,"__esModule",{value:!0});zk.InlineCompletionRequest=void 0;var h7=us(),T7;(function(e){e.method="textDocument/inlineCompletion",e.messageDirection=h7.MessageDirection.clientToServer,e.type=new h7.ProtocolRequestType(e.method)})(T7||(zk.InlineCompletionRequest=T7={}))});var L8=Zt(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.WorkspaceSymbolRequest=we.CodeActionResolveRequest=we.CodeActionRequest=we.DocumentSymbolRequest=we.DocumentHighlightRequest=we.ReferencesRequest=we.DefinitionRequest=we.SignatureHelpRequest=we.SignatureHelpTriggerKind=we.HoverRequest=we.CompletionResolveRequest=we.CompletionRequest=we.CompletionTriggerKind=we.PublishDiagnosticsNotification=we.WatchKind=we.RelativePattern=we.FileChangeType=we.DidChangeWatchedFilesNotification=we.WillSaveTextDocumentWaitUntilRequest=we.WillSaveTextDocumentNotification=we.TextDocumentSaveReason=we.DidSaveTextDocumentNotification=we.DidCloseTextDocumentNotification=we.DidChangeTextDocumentNotification=we.TextDocumentContentChangeEvent=we.DidOpenTextDocumentNotification=we.TextDocumentSyncKind=we.TelemetryEventNotification=we.LogMessageNotification=we.ShowMessageRequest=we.ShowMessageNotification=we.MessageType=we.DidChangeConfigurationNotification=we.ExitNotification=we.ShutdownRequest=we.InitializedNotification=we.InitializeErrorCodes=we.InitializeRequest=we.WorkDoneProgressOptions=we.TextDocumentRegistrationOptions=we.StaticRegistrationOptions=we.PositionEncodingKind=we.FailureHandlingKind=we.ResourceOperationKind=we.UnregistrationRequest=we.RegistrationRequest=we.DocumentSelector=we.NotebookCellTextDocumentFilter=we.NotebookDocumentFilter=we.TextDocumentFilter=void 0;we.MonikerRequest=we.MonikerKind=we.UniquenessLevel=we.WillDeleteFilesRequest=we.DidDeleteFilesNotification=we.WillRenameFilesRequest=we.DidRenameFilesNotification=we.WillCreateFilesRequest=we.DidCreateFilesNotification=we.FileOperationPatternKind=we.LinkedEditingRangeRequest=we.ShowDocumentRequest=we.SemanticTokensRegistrationType=we.SemanticTokensRefreshRequest=we.SemanticTokensRangeRequest=we.SemanticTokensDeltaRequest=we.SemanticTokensRequest=we.TokenFormat=we.CallHierarchyPrepareRequest=we.CallHierarchyOutgoingCallsRequest=we.CallHierarchyIncomingCallsRequest=we.WorkDoneProgressCancelNotification=we.WorkDoneProgressCreateRequest=we.WorkDoneProgress=we.SelectionRangeRequest=we.DeclarationRequest=we.FoldingRangeRefreshRequest=we.FoldingRangeRequest=we.ColorPresentationRequest=we.DocumentColorRequest=we.ConfigurationRequest=we.DidChangeWorkspaceFoldersNotification=we.WorkspaceFoldersRequest=we.TypeDefinitionRequest=we.ImplementationRequest=we.ApplyWorkspaceEditRequest=we.ExecuteCommandRequest=we.PrepareRenameRequest=we.RenameRequest=we.PrepareSupportDefaultBehavior=we.DocumentOnTypeFormattingRequest=we.DocumentRangesFormattingRequest=we.DocumentRangeFormattingRequest=we.DocumentFormattingRequest=we.DocumentLinkResolveRequest=we.DocumentLinkRequest=we.CodeLensRefreshRequest=we.CodeLensResolveRequest=we.CodeLensRequest=we.WorkspaceSymbolResolveRequest=void 0;we.InlineCompletionRequest=we.DidCloseNotebookDocumentNotification=we.DidSaveNotebookDocumentNotification=we.DidChangeNotebookDocumentNotification=we.NotebookCellArrayChange=we.DidOpenNotebookDocumentNotification=we.NotebookDocumentSyncRegistrationType=we.NotebookDocument=we.NotebookCell=we.ExecutionSummary=we.NotebookCellKind=we.DiagnosticRefreshRequest=we.WorkspaceDiagnosticRequest=we.DocumentDiagnosticRequest=we.DocumentDiagnosticReportKind=we.DiagnosticServerCancellationData=we.InlayHintRefreshRequest=we.InlayHintResolveRequest=we.InlayHintRequest=we.InlineValueRefreshRequest=we.InlineValueRequest=we.TypeHierarchySupertypesRequest=we.TypeHierarchySubtypesRequest=we.TypeHierarchyPrepareRequest=void 0;var qt=us(),_7=Lk(),Hc=Ak(),pse=VW();Object.defineProperty(we,"ImplementationRequest",{enumerable:!0,get:function(){return pse.ImplementationRequest}});var mse=GW();Object.defineProperty(we,"TypeDefinitionRequest",{enumerable:!0,get:function(){return mse.TypeDefinitionRequest}});var k8=YW();Object.defineProperty(we,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return k8.WorkspaceFoldersRequest}});Object.defineProperty(we,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return k8.DidChangeWorkspaceFoldersNotification}});var gse=eU();Object.defineProperty(we,"ConfigurationRequest",{enumerable:!0,get:function(){return gse.ConfigurationRequest}});var v8=rU();Object.defineProperty(we,"DocumentColorRequest",{enumerable:!0,get:function(){return v8.DocumentColorRequest}});Object.defineProperty(we,"ColorPresentationRequest",{enumerable:!0,get:function(){return v8.ColorPresentationRequest}});var F8=aU();Object.defineProperty(we,"FoldingRangeRequest",{enumerable:!0,get:function(){return F8.FoldingRangeRequest}});Object.defineProperty(we,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return F8.FoldingRangeRefreshRequest}});var yse=lU();Object.defineProperty(we,"DeclarationRequest",{enumerable:!0,get:function(){return yse.DeclarationRequest}});var hse=fU();Object.defineProperty(we,"SelectionRangeRequest",{enumerable:!0,get:function(){return hse.SelectionRangeRequest}});var c1=yU();Object.defineProperty(we,"WorkDoneProgress",{enumerable:!0,get:function(){return c1.WorkDoneProgress}});Object.defineProperty(we,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return c1.WorkDoneProgressCreateRequest}});Object.defineProperty(we,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return c1.WorkDoneProgressCancelNotification}});var l1=_U();Object.defineProperty(we,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return l1.CallHierarchyIncomingCallsRequest}});Object.defineProperty(we,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return l1.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(we,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return l1.CallHierarchyPrepareRequest}});var q_=PU();Object.defineProperty(we,"TokenFormat",{enumerable:!0,get:function(){return q_.TokenFormat}});Object.defineProperty(we,"SemanticTokensRequest",{enumerable:!0,get:function(){return q_.SemanticTokensRequest}});Object.defineProperty(we,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return q_.SemanticTokensDeltaRequest}});Object.defineProperty(we,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return q_.SemanticTokensRangeRequest}});Object.defineProperty(we,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return q_.SemanticTokensRefreshRequest}});Object.defineProperty(we,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return q_.SemanticTokensRegistrationType}});var Tse=vU();Object.defineProperty(we,"ShowDocumentRequest",{enumerable:!0,get:function(){return Tse.ShowDocumentRequest}});var Sse=LU();Object.defineProperty(we,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return Sse.LinkedEditingRangeRequest}});var DT=JU();Object.defineProperty(we,"FileOperationPatternKind",{enumerable:!0,get:function(){return DT.FileOperationPatternKind}});Object.defineProperty(we,"DidCreateFilesNotification",{enumerable:!0,get:function(){return DT.DidCreateFilesNotification}});Object.defineProperty(we,"WillCreateFilesRequest",{enumerable:!0,get:function(){return DT.WillCreateFilesRequest}});Object.defineProperty(we,"DidRenameFilesNotification",{enumerable:!0,get:function(){return DT.DidRenameFilesNotification}});Object.defineProperty(we,"WillRenameFilesRequest",{enumerable:!0,get:function(){return DT.WillRenameFilesRequest}});Object.defineProperty(we,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return DT.DidDeleteFilesNotification}});Object.defineProperty(we,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return DT.WillDeleteFilesRequest}});var u1=VU();Object.defineProperty(we,"UniquenessLevel",{enumerable:!0,get:function(){return u1.UniquenessLevel}});Object.defineProperty(we,"MonikerKind",{enumerable:!0,get:function(){return u1.MonikerKind}});Object.defineProperty(we,"MonikerRequest",{enumerable:!0,get:function(){return u1.MonikerRequest}});var d1=$U();Object.defineProperty(we,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return d1.TypeHierarchyPrepareRequest}});Object.defineProperty(we,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return d1.TypeHierarchySubtypesRequest}});Object.defineProperty(we,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return d1.TypeHierarchySupertypesRequest}});var I8=XU();Object.defineProperty(we,"InlineValueRequest",{enumerable:!0,get:function(){return I8.InlineValueRequest}});Object.defineProperty(we,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return I8.InlineValueRefreshRequest}});var f1=t7();Object.defineProperty(we,"InlayHintRequest",{enumerable:!0,get:function(){return f1.InlayHintRequest}});Object.defineProperty(we,"InlayHintResolveRequest",{enumerable:!0,get:function(){return f1.InlayHintResolveRequest}});Object.defineProperty(we,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return f1.InlayHintRefreshRequest}});var pD=l7();Object.defineProperty(we,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return pD.DiagnosticServerCancellationData}});Object.defineProperty(we,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return pD.DocumentDiagnosticReportKind}});Object.defineProperty(we,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return pD.DocumentDiagnosticRequest}});Object.defineProperty(we,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return pD.WorkspaceDiagnosticRequest}});Object.defineProperty(we,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return pD.DiagnosticRefreshRequest}});var Zp=y7();Object.defineProperty(we,"NotebookCellKind",{enumerable:!0,get:function(){return Zp.NotebookCellKind}});Object.defineProperty(we,"ExecutionSummary",{enumerable:!0,get:function(){return Zp.ExecutionSummary}});Object.defineProperty(we,"NotebookCell",{enumerable:!0,get:function(){return Zp.NotebookCell}});Object.defineProperty(we,"NotebookDocument",{enumerable:!0,get:function(){return Zp.NotebookDocument}});Object.defineProperty(we,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return Zp.NotebookDocumentSyncRegistrationType}});Object.defineProperty(we,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return Zp.DidOpenNotebookDocumentNotification}});Object.defineProperty(we,"NotebookCellArrayChange",{enumerable:!0,get:function(){return Zp.NotebookCellArrayChange}});Object.defineProperty(we,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return Zp.DidChangeNotebookDocumentNotification}});Object.defineProperty(we,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return Zp.DidSaveNotebookDocumentNotification}});Object.defineProperty(we,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return Zp.DidCloseNotebookDocumentNotification}});var _se=S7();Object.defineProperty(we,"InlineCompletionRequest",{enumerable:!0,get:function(){return _se.InlineCompletionRequest}});var i1;(function(e){function n(r){let i=r;return Hc.string(i)||Hc.string(i.language)||Hc.string(i.scheme)||Hc.string(i.pattern)}e.is=n})(i1||(we.TextDocumentFilter=i1={}));var o1;(function(e){function n(r){let i=r;return Hc.objectLiteral(i)&&(Hc.string(i.notebookType)||Hc.string(i.scheme)||Hc.string(i.pattern))}e.is=n})(o1||(we.NotebookDocumentFilter=o1={}));var a1;(function(e){function n(r){let i=r;return Hc.objectLiteral(i)&&(Hc.string(i.notebook)||o1.is(i.notebook))&&(i.language===void 0||Hc.string(i.language))}e.is=n})(a1||(we.NotebookCellTextDocumentFilter=a1={}));var s1;(function(e){function n(r){if(!Array.isArray(r))return!1;for(let i of r)if(!Hc.string(i)&&!i1.is(i)&&!a1.is(i))return!1;return!0}e.is=n})(s1||(we.DocumentSelector=s1={}));var x7;(function(e){e.method="client/registerCapability",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolRequestType(e.method)})(x7||(we.RegistrationRequest=x7={}));var b7;(function(e){e.method="client/unregisterCapability",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolRequestType(e.method)})(b7||(we.UnregistrationRequest=b7={}));var C7;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(C7||(we.ResourceOperationKind=C7={}));var D7;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(D7||(we.FailureHandlingKind=D7={}));var E7;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(E7||(we.PositionEncodingKind=E7={}));var P7;(function(e){function n(r){let i=r;return i&&Hc.string(i.id)&&i.id.length>0}e.hasId=n})(P7||(we.StaticRegistrationOptions=P7={}));var N7;(function(e){function n(r){let i=r;return i&&(i.documentSelector===null||s1.is(i.documentSelector))}e.is=n})(N7||(we.TextDocumentRegistrationOptions=N7={}));var k7;(function(e){function n(i){let a=i;return Hc.objectLiteral(a)&&(a.workDoneProgress===void 0||Hc.boolean(a.workDoneProgress))}e.is=n;function r(i){let a=i;return a&&Hc.boolean(a.workDoneProgress)}e.hasWorkDoneProgress=r})(k7||(we.WorkDoneProgressOptions=k7={}));var v7;(function(e){e.method="initialize",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(v7||(we.InitializeRequest=v7={}));var F7;(function(e){e.unknownProtocolVersion=1})(F7||(we.InitializeErrorCodes=F7={}));var I7;(function(e){e.method="initialized",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method)})(I7||(we.InitializedNotification=I7={}));var L7;(function(e){e.method="shutdown",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType0(e.method)})(L7||(we.ShutdownRequest=L7={}));var A7;(function(e){e.method="exit",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType0(e.method)})(A7||(we.ExitNotification=A7={}));var w7;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method)})(w7||(we.DidChangeConfigurationNotification=w7={}));var R7;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(R7||(we.MessageType=R7={}));var O7;(function(e){e.method="window/showMessage",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolNotificationType(e.method)})(O7||(we.ShowMessageNotification=O7={}));var M7;(function(e){e.method="window/showMessageRequest",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolRequestType(e.method)})(M7||(we.ShowMessageRequest=M7={}));var B7;(function(e){e.method="window/logMessage",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolNotificationType(e.method)})(B7||(we.LogMessageNotification=B7={}));var j7;(function(e){e.method="telemetry/event",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolNotificationType(e.method)})(j7||(we.TelemetryEventNotification=j7={}));var J7;(function(e){e.None=0,e.Full=1,e.Incremental=2})(J7||(we.TextDocumentSyncKind=J7={}));var W7;(function(e){e.method="textDocument/didOpen",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method)})(W7||(we.DidOpenTextDocumentNotification=W7={}));var U7;(function(e){function n(i){let a=i;return a!=null&&typeof a.text=="string"&&a.range!==void 0&&(a.rangeLength===void 0||typeof a.rangeLength=="number")}e.isIncremental=n;function r(i){let a=i;return a!=null&&typeof a.text=="string"&&a.range===void 0&&a.rangeLength===void 0}e.isFull=r})(U7||(we.TextDocumentContentChangeEvent=U7={}));var K7;(function(e){e.method="textDocument/didChange",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method)})(K7||(we.DidChangeTextDocumentNotification=K7={}));var q7;(function(e){e.method="textDocument/didClose",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method)})(q7||(we.DidCloseTextDocumentNotification=q7={}));var V7;(function(e){e.method="textDocument/didSave",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method)})(V7||(we.DidSaveTextDocumentNotification=V7={}));var H7;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(H7||(we.TextDocumentSaveReason=H7={}));var z7;(function(e){e.method="textDocument/willSave",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method)})(z7||(we.WillSaveTextDocumentNotification=z7={}));var G7;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(G7||(we.WillSaveTextDocumentWaitUntilRequest=G7={}));var $7;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method)})($7||(we.DidChangeWatchedFilesNotification=$7={}));var Q7;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Q7||(we.FileChangeType=Q7={}));var Y7;(function(e){function n(r){let i=r;return Hc.objectLiteral(i)&&(_7.URI.is(i.baseUri)||_7.WorkspaceFolder.is(i.baseUri))&&Hc.string(i.pattern)}e.is=n})(Y7||(we.RelativePattern=Y7={}));var X7;(function(e){e.Create=1,e.Change=2,e.Delete=4})(X7||(we.WatchKind=X7={}));var Z7;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolNotificationType(e.method)})(Z7||(we.PublishDiagnosticsNotification=Z7={}));var e8;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(e8||(we.CompletionTriggerKind=e8={}));var n8;(function(e){e.method="textDocument/completion",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(n8||(we.CompletionRequest=n8={}));var t8;(function(e){e.method="completionItem/resolve",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(t8||(we.CompletionResolveRequest=t8={}));var r8;(function(e){e.method="textDocument/hover",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(r8||(we.HoverRequest=r8={}));var i8;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(i8||(we.SignatureHelpTriggerKind=i8={}));var o8;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(o8||(we.SignatureHelpRequest=o8={}));var a8;(function(e){e.method="textDocument/definition",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(a8||(we.DefinitionRequest=a8={}));var s8;(function(e){e.method="textDocument/references",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(s8||(we.ReferencesRequest=s8={}));var c8;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(c8||(we.DocumentHighlightRequest=c8={}));var l8;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(l8||(we.DocumentSymbolRequest=l8={}));var u8;(function(e){e.method="textDocument/codeAction",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(u8||(we.CodeActionRequest=u8={}));var d8;(function(e){e.method="codeAction/resolve",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(d8||(we.CodeActionResolveRequest=d8={}));var f8;(function(e){e.method="workspace/symbol",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(f8||(we.WorkspaceSymbolRequest=f8={}));var p8;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(p8||(we.WorkspaceSymbolResolveRequest=p8={}));var m8;(function(e){e.method="textDocument/codeLens",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(m8||(we.CodeLensRequest=m8={}));var g8;(function(e){e.method="codeLens/resolve",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(g8||(we.CodeLensResolveRequest=g8={}));var y8;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolRequestType0(e.method)})(y8||(we.CodeLensRefreshRequest=y8={}));var h8;(function(e){e.method="textDocument/documentLink",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(h8||(we.DocumentLinkRequest=h8={}));var T8;(function(e){e.method="documentLink/resolve",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(T8||(we.DocumentLinkResolveRequest=T8={}));var S8;(function(e){e.method="textDocument/formatting",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(S8||(we.DocumentFormattingRequest=S8={}));var _8;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(_8||(we.DocumentRangeFormattingRequest=_8={}));var x8;(function(e){e.method="textDocument/rangesFormatting",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(x8||(we.DocumentRangesFormattingRequest=x8={}));var b8;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(b8||(we.DocumentOnTypeFormattingRequest=b8={}));var C8;(function(e){e.Identifier=1})(C8||(we.PrepareSupportDefaultBehavior=C8={}));var D8;(function(e){e.method="textDocument/rename",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(D8||(we.RenameRequest=D8={}));var E8;(function(e){e.method="textDocument/prepareRename",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(E8||(we.PrepareRenameRequest=E8={}));var P8;(function(e){e.method="workspace/executeCommand",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolRequestType(e.method)})(P8||(we.ExecuteCommandRequest=P8={}));var N8;(function(e){e.method="workspace/applyEdit",e.messageDirection=qt.MessageDirection.serverToClient,e.type=new qt.ProtocolRequestType("workspace/applyEdit")})(N8||(we.ApplyWorkspaceEditRequest=N8={}))});var w8=Zt(Gk=>{"use strict";Object.defineProperty(Gk,"__esModule",{value:!0});Gk.createProtocolConnection=void 0;var A8=CT();function xse(e,n,r,i){return A8.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,A8.createMessageConnection)(e,n,r,i)}Gk.createProtocolConnection=xse});var O8=Zt(Yu=>{"use strict";var bse=Yu&&Yu.__createBinding||(Object.create?function(e,n,r,i){i===void 0&&(i=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,i,a)}:function(e,n,r,i){i===void 0&&(i=r),e[i]=n[r]}),$k=Yu&&Yu.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&bse(n,e,r)};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.LSPErrorCodes=Yu.createProtocolConnection=void 0;$k(CT(),Yu);$k(Lk(),Yu);$k(us(),Yu);$k(L8(),Yu);var Cse=w8();Object.defineProperty(Yu,"createProtocolConnection",{enumerable:!0,get:function(){return Cse.createProtocolConnection}});var R8;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(R8||(Yu.LSPErrorCodes=R8={}))});var Zs=Zt(em=>{"use strict";var Dse=em&&em.__createBinding||(Object.create?function(e,n,r,i){i===void 0&&(i=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,i,a)}:function(e,n,r,i){i===void 0&&(i=r),e[i]=n[r]}),M8=em&&em.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&Dse(n,e,r)};Object.defineProperty(em,"__esModule",{value:!0});em.createProtocolConnection=void 0;var Ese=QR();M8(QR(),em);M8(O8(),em);function Pse(e,n,r,i){return(0,Ese.createMessageConnection)(e,n,r,i)}em.createProtocolConnection=Pse});var p1=Zt(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.generateUuid=hf.parse=hf.isUUID=hf.v4=hf.empty=void 0;var mD=class{constructor(n){this._value=n}asHex(){return this._value}equals(n){return this.asHex()===n.asHex()}},gD=class e extends mD{static _oneOf(n){return n[Math.floor(n.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}};gD._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];gD._timeHighBits=["8","9","a","b"];hf.empty=new mD("00000000-0000-0000-0000-000000000000");function B8(){return new gD}hf.v4=B8;var Nse=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function j8(e){return Nse.test(e)}hf.isUUID=j8;function kse(e){if(!j8(e))throw new Error("invalid uuid");return new mD(e)}hf.parse=kse;function vse(){return B8().asHex()}hf.generateUuid=vse});var J8=Zt(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.attachPartialResult=zy.ProgressFeature=zy.attachWorkDone=void 0;var Hy=Zs(),Fse=p1(),ET=class e{constructor(n,r){this._connection=n,this._token=r,e.Instances.set(this._token,this)}begin(n,r,i,a){let c={kind:"begin",title:n,percentage:r,message:i,cancellable:a};this._connection.sendProgress(Hy.WorkDoneProgress.type,this._token,c)}report(n,r){let i={kind:"report"};typeof n=="number"?(i.percentage=n,r!==void 0&&(i.message=r)):i.message=n,this._connection.sendProgress(Hy.WorkDoneProgress.type,this._token,i)}done(){e.Instances.delete(this._token),this._connection.sendProgress(Hy.WorkDoneProgress.type,this._token,{kind:"end"})}};ET.Instances=new Map;var Qk=class extends ET{constructor(n,r){super(n,r),this._source=new Hy.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},yD=class{constructor(){}begin(){}report(){}done(){}},Yk=class extends yD{constructor(){super(),this._source=new Hy.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Ise(e,n){if(n===void 0||n.workDoneToken===void 0)return new yD;let r=n.workDoneToken;return delete n.workDoneToken,new ET(e,r)}zy.attachWorkDone=Ise;var Lse=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(n){super.initialize(n),n?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(Hy.WorkDoneProgressCancelNotification.type,r=>{let i=ET.Instances.get(r.token);(i instanceof Qk||i instanceof Yk)&&i.cancel()}))}attachWorkDoneProgress(n){return n===void 0?new yD:new ET(this.connection,n)}createWorkDoneProgress(){if(this._progressSupported){let n=(0,Fse.generateUuid)();return this.connection.sendRequest(Hy.WorkDoneProgressCreateRequest.type,{token:n}).then(()=>new Qk(this.connection,n))}else return Promise.resolve(new Yk)}};zy.ProgressFeature=Lse;var m1;(function(e){e.type=new Hy.ProgressType})(m1||(m1={}));var g1=class{constructor(n,r){this._connection=n,this._token=r}report(n){this._connection.sendProgress(m1.type,this._token,n)}};function Ase(e,n){if(n===void 0||n.partialResultToken===void 0)return;let r=n.partialResultToken;return delete n.partialResultToken,new g1(e,r)}zy.attachPartialResult=Ase});var W8=Zt(Xk=>{"use strict";Object.defineProperty(Xk,"__esModule",{value:!0});Xk.ConfigurationFeature=void 0;var wse=Zs(),Rse=lk(),Ose=e=>class extends e{getConfiguration(n){return n?Rse.string(n)?this._getConfiguration({section:n}):this._getConfiguration(n):this._getConfiguration({})}_getConfiguration(n){let r={items:Array.isArray(n)?n:[n]};return this.connection.sendRequest(wse.ConfigurationRequest.type,r).then(i=>Array.isArray(i)?Array.isArray(n)?i:i[0]:Array.isArray(n)?[]:null)}};Xk.ConfigurationFeature=Ose});var U8=Zt(ev=>{"use strict";Object.defineProperty(ev,"__esModule",{value:!0});ev.WorkspaceFoldersFeature=void 0;var Zk=Zs(),Mse=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(n){super.initialize(n);let r=n.workspace;r&&r.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Zk.Emitter,this.connection.onNotification(Zk.DidChangeWorkspaceFoldersNotification.type,i=>{this._onDidChangeWorkspaceFolders.fire(i.event)}))}fillServerCapabilities(n){super.fillServerCapabilities(n);let r=n.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=r===!0||typeof r=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Zk.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Zk.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};ev.WorkspaceFoldersFeature=Mse});var K8=Zt(nv=>{"use strict";Object.defineProperty(nv,"__esModule",{value:!0});nv.CallHierarchyFeature=void 0;var y1=Zs(),Bse=e=>class extends e{get callHierarchy(){return{onPrepare:n=>this.connection.onRequest(y1.CallHierarchyPrepareRequest.type,(r,i)=>n(r,i,this.attachWorkDoneProgress(r),void 0)),onIncomingCalls:n=>{let r=y1.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))},onOutgoingCalls:n=>{let r=y1.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))}}}};nv.CallHierarchyFeature=Bse});var T1=Zt(Gy=>{"use strict";Object.defineProperty(Gy,"__esModule",{value:!0});Gy.SemanticTokensBuilder=Gy.SemanticTokensDiff=Gy.SemanticTokensFeature=void 0;var tv=Zs(),jse=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(tv.SemanticTokensRefreshRequest.type),on:n=>{let r=tv.SemanticTokensRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))},onDelta:n=>{let r=tv.SemanticTokensDeltaRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))},onRange:n=>{let r=tv.SemanticTokensRangeRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))}}}};Gy.SemanticTokensFeature=jse;var rv=class{constructor(n,r){this.originalSequence=n,this.modifiedSequence=r}computeDiff(){let n=this.originalSequence.length,r=this.modifiedSequence.length,i=0;for(;i<r&&i<n&&this.originalSequence[i]===this.modifiedSequence[i];)i++;if(i<r&&i<n){let a=n-1,c=r-1;for(;a>=i&&c>=i&&this.originalSequence[a]===this.modifiedSequence[c];)a--,c--;(a<i||c<i)&&(a++,c++);let u=a-i+1,f=this.modifiedSequence.slice(i,c+1);return f.length===1&&f[0]===this.originalSequence[a]?[{start:i,deleteCount:u-1}]:[{start:i,deleteCount:u,data:f}]}else return i<r?[{start:i,deleteCount:0,data:this.modifiedSequence.slice(i)}]:i<n?[{start:i,deleteCount:n-i}]:[]}};Gy.SemanticTokensDiff=rv;var h1=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(n,r,i,a,c){let u=n,f=r;this._dataLen>0&&(u-=this._prevLine,u===0&&(f-=this._prevChar)),this._data[this._dataLen++]=u,this._data[this._dataLen++]=f,this._data[this._dataLen++]=i,this._data[this._dataLen++]=a,this._data[this._dataLen++]=c,this._prevLine=n,this._prevChar=r}get id(){return this._id.toString()}previousResult(n){this.id===n&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new rv(this._prevData,this._data).computeDiff()}:this.build()}};Gy.SemanticTokensBuilder=h1});var q8=Zt(iv=>{"use strict";Object.defineProperty(iv,"__esModule",{value:!0});iv.ShowDocumentFeature=void 0;var Jse=Zs(),Wse=e=>class extends e{showDocument(n){return this.connection.sendRequest(Jse.ShowDocumentRequest.type,n)}};iv.ShowDocumentFeature=Wse});var V8=Zt(ov=>{"use strict";Object.defineProperty(ov,"__esModule",{value:!0});ov.FileOperationsFeature=void 0;var V_=Zs(),Use=e=>class extends e{onDidCreateFiles(n){return this.connection.onNotification(V_.DidCreateFilesNotification.type,r=>{n(r)})}onDidRenameFiles(n){return this.connection.onNotification(V_.DidRenameFilesNotification.type,r=>{n(r)})}onDidDeleteFiles(n){return this.connection.onNotification(V_.DidDeleteFilesNotification.type,r=>{n(r)})}onWillCreateFiles(n){return this.connection.onRequest(V_.WillCreateFilesRequest.type,(r,i)=>n(r,i))}onWillRenameFiles(n){return this.connection.onRequest(V_.WillRenameFilesRequest.type,(r,i)=>n(r,i))}onWillDeleteFiles(n){return this.connection.onRequest(V_.WillDeleteFilesRequest.type,(r,i)=>n(r,i))}};ov.FileOperationsFeature=Use});var H8=Zt(av=>{"use strict";Object.defineProperty(av,"__esModule",{value:!0});av.LinkedEditingRangeFeature=void 0;var Kse=Zs(),qse=e=>class extends e{onLinkedEditingRange(n){return this.connection.onRequest(Kse.LinkedEditingRangeRequest.type,(r,i)=>n(r,i,this.attachWorkDoneProgress(r),void 0))}};av.LinkedEditingRangeFeature=qse});var z8=Zt(sv=>{"use strict";Object.defineProperty(sv,"__esModule",{value:!0});sv.TypeHierarchyFeature=void 0;var S1=Zs(),Vse=e=>class extends e{get typeHierarchy(){return{onPrepare:n=>this.connection.onRequest(S1.TypeHierarchyPrepareRequest.type,(r,i)=>n(r,i,this.attachWorkDoneProgress(r),void 0)),onSupertypes:n=>{let r=S1.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))},onSubtypes:n=>{let r=S1.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))}}}};sv.TypeHierarchyFeature=Vse});var $8=Zt(cv=>{"use strict";Object.defineProperty(cv,"__esModule",{value:!0});cv.InlineValueFeature=void 0;var G8=Zs(),Hse=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(G8.InlineValueRefreshRequest.type),on:n=>this.connection.onRequest(G8.InlineValueRequest.type,(r,i)=>n(r,i,this.attachWorkDoneProgress(r)))}}};cv.InlineValueFeature=Hse});var Y8=Zt(lv=>{"use strict";Object.defineProperty(lv,"__esModule",{value:!0});lv.FoldingRangeFeature=void 0;var Q8=Zs(),zse=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(Q8.FoldingRangeRefreshRequest.type),on:n=>{let r=Q8.FoldingRangeRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))}}}};lv.FoldingRangeFeature=zse});var X8=Zt(uv=>{"use strict";Object.defineProperty(uv,"__esModule",{value:!0});uv.InlayHintFeature=void 0;var _1=Zs(),Gse=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(_1.InlayHintRefreshRequest.type),on:n=>this.connection.onRequest(_1.InlayHintRequest.type,(r,i)=>n(r,i,this.attachWorkDoneProgress(r))),resolve:n=>this.connection.onRequest(_1.InlayHintResolveRequest.type,(r,i)=>n(r,i))}}};uv.InlayHintFeature=Gse});var Z8=Zt(dv=>{"use strict";Object.defineProperty(dv,"__esModule",{value:!0});dv.DiagnosticFeature=void 0;var hD=Zs(),$se=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(hD.DiagnosticRefreshRequest.type),on:n=>this.connection.onRequest(hD.DocumentDiagnosticRequest.type,(r,i)=>n(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(hD.DocumentDiagnosticRequest.partialResult,r))),onWorkspace:n=>this.connection.onRequest(hD.WorkspaceDiagnosticRequest.type,(r,i)=>n(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(hD.WorkspaceDiagnosticRequest.partialResult,r)))}}};dv.DiagnosticFeature=$se});var b1=Zt(fv=>{"use strict";Object.defineProperty(fv,"__esModule",{value:!0});fv.TextDocuments=void 0;var PT=Zs(),x1=class{constructor(n){this._configuration=n,this._syncedDocuments=new Map,this._onDidChangeContent=new PT.Emitter,this._onDidOpen=new PT.Emitter,this._onDidClose=new PT.Emitter,this._onDidSave=new PT.Emitter,this._onWillSave=new PT.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(n){this._willSaveWaitUntil=n}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(n){return this._syncedDocuments.get(n)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(n){n.__textDocumentSync=PT.TextDocumentSyncKind.Incremental;let r=[];return r.push(n.onDidOpenTextDocument(i=>{let a=i.textDocument,c=this._configuration.create(a.uri,a.languageId,a.version,a.text);this._syncedDocuments.set(a.uri,c);let u=Object.freeze({document:c});this._onDidOpen.fire(u),this._onDidChangeContent.fire(u)})),r.push(n.onDidChangeTextDocument(i=>{let a=i.textDocument,c=i.contentChanges;if(c.length===0)return;let{version:u}=a;if(u==null)throw new Error(`Received document change event for ${a.uri} without valid version identifier`);let f=this._syncedDocuments.get(a.uri);f!==void 0&&(f=this._configuration.update(f,c,u),this._syncedDocuments.set(a.uri,f),this._onDidChangeContent.fire(Object.freeze({document:f})))})),r.push(n.onDidCloseTextDocument(i=>{let a=this._syncedDocuments.get(i.textDocument.uri);a!==void 0&&(this._syncedDocuments.delete(i.textDocument.uri),this._onDidClose.fire(Object.freeze({document:a})))})),r.push(n.onWillSaveTextDocument(i=>{let a=this._syncedDocuments.get(i.textDocument.uri);a!==void 0&&this._onWillSave.fire(Object.freeze({document:a,reason:i.reason}))})),r.push(n.onWillSaveTextDocumentWaitUntil((i,a)=>{let c=this._syncedDocuments.get(i.textDocument.uri);return c!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:c,reason:i.reason}),a):[]})),r.push(n.onDidSaveTextDocument(i=>{let a=this._syncedDocuments.get(i.textDocument.uri);a!==void 0&&this._onDidSave.fire(Object.freeze({document:a}))})),PT.Disposable.create(()=>{r.forEach(i=>i.dispose())})}};fv.TextDocuments=x1});var D1=Zt(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});H_.NotebookDocuments=H_.NotebookSyncFeature=void 0;var Tf=Zs(),eK=b1(),Qse=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:n=>this.connection.onNotification(Tf.DidOpenNotebookDocumentNotification.type,r=>{n(r)}),onDidChangeNotebookDocument:n=>this.connection.onNotification(Tf.DidChangeNotebookDocumentNotification.type,r=>{n(r)}),onDidSaveNotebookDocument:n=>this.connection.onNotification(Tf.DidSaveNotebookDocumentNotification.type,r=>{n(r)}),onDidCloseNotebookDocument:n=>this.connection.onNotification(Tf.DidCloseNotebookDocumentNotification.type,r=>{n(r)})}}};H_.NotebookSyncFeature=Qse;var pv=class e{onDidOpenTextDocument(n){return this.openHandler=n,Tf.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(n){this.openHandler&&this.openHandler(n)}onDidChangeTextDocument(n){return this.changeHandler=n,Tf.Disposable.create(()=>{this.changeHandler=n})}changeTextDocument(n){this.changeHandler&&this.changeHandler(n)}onDidCloseTextDocument(n){return this.closeHandler=n,Tf.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(n){this.closeHandler&&this.closeHandler(n)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}};pv.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var C1=class{constructor(n){n instanceof eK.TextDocuments?this._cellTextDocuments=n:this._cellTextDocuments=new eK.TextDocuments(n),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new Tf.Emitter,this._onDidChange=new Tf.Emitter,this._onDidSave=new Tf.Emitter,this._onDidClose=new Tf.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(n){return this._cellTextDocuments.get(n.document)}getNotebookDocument(n){return this.notebookDocuments.get(n)}getNotebookCell(n){let r=this.notebookCellMap.get(n);return r&&r[0]}findNotebookDocumentForCell(n){let r=typeof n=="string"?n:n.document,i=this.notebookCellMap.get(r);return i&&i[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(n){let r=new pv,i=[];return i.push(this.cellTextDocuments.listen(r)),i.push(n.notebooks.synchronization.onDidOpenNotebookDocument(a=>{this.notebookDocuments.set(a.notebookDocument.uri,a.notebookDocument);for(let c of a.cellTextDocuments)r.openTextDocument({textDocument:c});this.updateCellMap(a.notebookDocument),this._onDidOpen.fire(a.notebookDocument)})),i.push(n.notebooks.synchronization.onDidChangeNotebookDocument(a=>{let c=this.notebookDocuments.get(a.notebookDocument.uri);if(c===void 0)return;c.version=a.notebookDocument.version;let u=c.metadata,f=!1,m=a.change;m.metadata!==void 0&&(f=!0,c.metadata=m.metadata);let y=[],g=[],S=[],_=[];if(m.cells!==void 0){let F=m.cells;if(F.structure!==void 0){let M=F.structure.array;if(c.cells.splice(M.start,M.deleteCount,...M.cells!==void 0?M.cells:[]),F.structure.didOpen!==void 0)for(let J of F.structure.didOpen)r.openTextDocument({textDocument:J}),y.push(J.uri);if(F.structure.didClose)for(let J of F.structure.didClose)r.closeTextDocument({textDocument:J}),g.push(J.uri)}if(F.data!==void 0){let M=new Map(F.data.map(J=>[J.document,J]));for(let J=0;J<=c.cells.length;J++){let A=M.get(c.cells[J].document);if(A!==void 0){let V=c.cells.splice(J,1,A);if(S.push({old:V[0],new:A}),M.delete(A.document),M.size===0)break}}}if(F.textContent!==void 0)for(let M of F.textContent)r.changeTextDocument({textDocument:M.document,contentChanges:M.changes}),_.push(M.document.uri)}this.updateCellMap(c);let b={notebookDocument:c};f&&(b.metadata={old:u,new:c.metadata});let v=[];for(let F of y)v.push(this.getNotebookCell(F));let T=[];for(let F of g)T.push(this.getNotebookCell(F));let W=[];for(let F of _)W.push(this.getNotebookCell(F));(v.length>0||T.length>0||S.length>0||W.length>0)&&(b.cells={added:v,removed:T,changed:{data:S,textContent:W}}),(b.metadata!==void 0||b.cells!==void 0)&&this._onDidChange.fire(b)})),i.push(n.notebooks.synchronization.onDidSaveNotebookDocument(a=>{let c=this.notebookDocuments.get(a.notebookDocument.uri);c!==void 0&&this._onDidSave.fire(c)})),i.push(n.notebooks.synchronization.onDidCloseNotebookDocument(a=>{let c=this.notebookDocuments.get(a.notebookDocument.uri);if(c!==void 0){this._onDidClose.fire(c);for(let u of a.cellTextDocuments)r.closeTextDocument({textDocument:u});this.notebookDocuments.delete(a.notebookDocument.uri);for(let u of c.cells)this.notebookCellMap.delete(u.document)}})),Tf.Disposable.create(()=>{i.forEach(a=>a.dispose())})}updateCellMap(n){for(let r of n.cells)this.notebookCellMap.set(r.document,[r,n])}};H_.NotebookDocuments=C1});var nK=Zt(mv=>{"use strict";Object.defineProperty(mv,"__esModule",{value:!0});mv.MonikerFeature=void 0;var Yse=Zs(),Xse=e=>class extends e{get moniker(){return{on:n=>{let r=Yse.MonikerRequest.type;return this.connection.onRequest(r,(i,a)=>n(i,a,this.attachWorkDoneProgress(i),this.attachPartialResultProgress(r,i)))}}}};mv.MonikerFeature=Xse});var F1=Zt(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.createConnection=Xo.combineFeatures=Xo.combineNotebooksFeatures=Xo.combineLanguagesFeatures=Xo.combineWorkspaceFeatures=Xo.combineWindowFeatures=Xo.combineClientFeatures=Xo.combineTracerFeatures=Xo.combineTelemetryFeatures=Xo.combineConsoleFeatures=Xo._NotebooksImpl=Xo._LanguagesImpl=Xo.BulkUnregistration=Xo.BulkRegistration=Xo.ErrorMessageTracker=void 0;var ar=Zs(),Sf=lk(),P1=p1(),qi=J8(),Zse=W8(),ece=U8(),nce=K8(),tce=T1(),rce=q8(),ice=V8(),oce=H8(),ace=z8(),sce=$8(),cce=Y8(),lce=X8(),uce=Z8(),dce=D1(),fce=nK();function E1(e){if(e!==null)return e}var N1=class{constructor(){this._messages=Object.create(null)}add(n){let r=this._messages[n];r||(r=0),r++,this._messages[n]=r}sendErrors(n){Object.keys(this._messages).forEach(r=>{n.window.showErrorMessage(r)})}};Xo.ErrorMessageTracker=N1;var gv=class{constructor(){}rawAttach(n){this._rawConnection=n}attach(n){this._connection=n}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(n){}initialize(n){}error(n){this.send(ar.MessageType.Error,n)}warn(n){this.send(ar.MessageType.Warning,n)}info(n){this.send(ar.MessageType.Info,n)}log(n){this.send(ar.MessageType.Log,n)}debug(n){this.send(ar.MessageType.Debug,n)}send(n,r){this._rawConnection&&this._rawConnection.sendNotification(ar.LogMessageNotification.type,{type:n,message:r}).catch(()=>{(0,ar.RAL)().console.error("Sending log message failed")})}},k1=class{constructor(){}attach(n){this._connection=n}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(n){}fillServerCapabilities(n){}showErrorMessage(n,...r){let i={type:ar.MessageType.Error,message:n,actions:r};return this.connection.sendRequest(ar.ShowMessageRequest.type,i).then(E1)}showWarningMessage(n,...r){let i={type:ar.MessageType.Warning,message:n,actions:r};return this.connection.sendRequest(ar.ShowMessageRequest.type,i).then(E1)}showInformationMessage(n,...r){let i={type:ar.MessageType.Info,message:n,actions:r};return this.connection.sendRequest(ar.ShowMessageRequest.type,i).then(E1)}},tK=(0,rce.ShowDocumentFeature)((0,qi.ProgressFeature)(k1)),rK;(function(e){function n(){return new yv}e.create=n})(rK||(Xo.BulkRegistration=rK={}));var yv=class{constructor(){this._registrations=[],this._registered=new Set}add(n,r){let i=Sf.string(n)?n:n.method;if(this._registered.has(i))throw new Error(`${i} is already added to this registration`);let a=P1.generateUuid();this._registrations.push({id:a,method:i,registerOptions:r||{}}),this._registered.add(i)}asRegistrationParams(){return{registrations:this._registrations}}},iK;(function(e){function n(){return new TD(void 0,[])}e.create=n})(iK||(Xo.BulkUnregistration=iK={}));var TD=class{constructor(n,r){this._connection=n,this._unregistrations=new Map,r.forEach(i=>{this._unregistrations.set(i.method,i)})}get isAttached(){return!!this._connection}attach(n){this._connection=n}add(n){this._unregistrations.set(n.method,n)}dispose(){let n=[];for(let i of this._unregistrations.values())n.push(i);let r={unregisterations:n};this._connection.sendRequest(ar.UnregistrationRequest.type,r).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(n){let r=Sf.string(n)?n:n.method,i=this._unregistrations.get(r);if(!i)return!1;let a={unregisterations:[i]};return this._connection.sendRequest(ar.UnregistrationRequest.type,a).then(()=>{this._unregistrations.delete(r)},c=>{this._connection.console.info(`Un-registering request handler for ${i.id} failed.`)}),!0}},hv=class{attach(n){this._connection=n}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(n){}fillServerCapabilities(n){}register(n,r,i){return n instanceof yv?this.registerMany(n):n instanceof TD?this.registerSingle1(n,r,i):this.registerSingle2(n,r)}registerSingle1(n,r,i){let a=Sf.string(r)?r:r.method,c=P1.generateUuid(),u={registrations:[{id:c,method:a,registerOptions:i||{}}]};return n.isAttached||n.attach(this.connection),this.connection.sendRequest(ar.RegistrationRequest.type,u).then(f=>(n.add({id:c,method:a}),n),f=>(this.connection.console.info(`Registering request handler for ${a} failed.`),Promise.reject(f)))}registerSingle2(n,r){let i=Sf.string(n)?n:n.method,a=P1.generateUuid(),c={registrations:[{id:a,method:i,registerOptions:r||{}}]};return this.connection.sendRequest(ar.RegistrationRequest.type,c).then(u=>ar.Disposable.create(()=>{this.unregisterSingle(a,i).catch(()=>{this.connection.console.info(`Un-registering capability with id ${a} failed.`)})}),u=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(u)))}unregisterSingle(n,r){let i={unregisterations:[{id:n,method:r}]};return this.connection.sendRequest(ar.UnregistrationRequest.type,i).catch(()=>{this.connection.console.info(`Un-registering request handler for ${n} failed.`)})}registerMany(n){let r=n.asRegistrationParams();return this.connection.sendRequest(ar.RegistrationRequest.type,r).then(()=>new TD(this._connection,r.registrations.map(i=>({id:i.id,method:i.method}))),i=>(this.connection.console.info("Bulk registration failed."),Promise.reject(i)))}},v1=class{constructor(){}attach(n){this._connection=n}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(n){}fillServerCapabilities(n){}applyEdit(n){function r(a){return a&&!!a.edit}let i=r(n)?n:{edit:n};return this.connection.sendRequest(ar.ApplyWorkspaceEditRequest.type,i)}},oK=(0,ice.FileOperationsFeature)((0,ece.WorkspaceFoldersFeature)((0,Zse.ConfigurationFeature)(v1))),Tv=class{constructor(){this._trace=ar.Trace.Off}attach(n){this._connection=n}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(n){}fillServerCapabilities(n){}set trace(n){this._trace=n}log(n,r){this._trace!==ar.Trace.Off&&this.connection.sendNotification(ar.LogTraceNotification.type,{message:n,verbose:this._trace===ar.Trace.Verbose?r:void 0}).catch(()=>{})}},Sv=class{constructor(){}attach(n){this._connection=n}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(n){}fillServerCapabilities(n){}logEvent(n){this.connection.sendNotification(ar.TelemetryEventNotification.type,n).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},_v=class{constructor(){}attach(n){this._connection=n}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(n){}fillServerCapabilities(n){}attachWorkDoneProgress(n){return(0,qi.attachWorkDone)(this.connection,n)}attachPartialResultProgress(n,r){return(0,qi.attachPartialResult)(this.connection,r)}};Xo._LanguagesImpl=_v;var aK=(0,cce.FoldingRangeFeature)((0,fce.MonikerFeature)((0,uce.DiagnosticFeature)((0,lce.InlayHintFeature)((0,sce.InlineValueFeature)((0,ace.TypeHierarchyFeature)((0,oce.LinkedEditingRangeFeature)((0,tce.SemanticTokensFeature)((0,nce.CallHierarchyFeature)(_v))))))))),xv=class{constructor(){}attach(n){this._connection=n}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(n){}fillServerCapabilities(n){}attachWorkDoneProgress(n){return(0,qi.attachWorkDone)(this.connection,n)}attachPartialResultProgress(n,r){return(0,qi.attachPartialResult)(this.connection,r)}};Xo._NotebooksImpl=xv;var sK=(0,dce.NotebookSyncFeature)(xv);function cK(e,n){return function(r){return n(e(r))}}Xo.combineConsoleFeatures=cK;function lK(e,n){return function(r){return n(e(r))}}Xo.combineTelemetryFeatures=lK;function uK(e,n){return function(r){return n(e(r))}}Xo.combineTracerFeatures=uK;function dK(e,n){return function(r){return n(e(r))}}Xo.combineClientFeatures=dK;function fK(e,n){return function(r){return n(e(r))}}Xo.combineWindowFeatures=fK;function pK(e,n){return function(r){return n(e(r))}}Xo.combineWorkspaceFeatures=pK;function mK(e,n){return function(r){return n(e(r))}}Xo.combineLanguagesFeatures=mK;function gK(e,n){return function(r){return n(e(r))}}Xo.combineNotebooksFeatures=gK;function pce(e,n){function r(a,c,u){return a&&c?u(a,c):a||c}return{__brand:"features",console:r(e.console,n.console,cK),tracer:r(e.tracer,n.tracer,uK),telemetry:r(e.telemetry,n.telemetry,lK),client:r(e.client,n.client,dK),window:r(e.window,n.window,fK),workspace:r(e.workspace,n.workspace,pK),languages:r(e.languages,n.languages,mK),notebooks:r(e.notebooks,n.notebooks,gK)}}Xo.combineFeatures=pce;function mce(e,n,r){let i=r&&r.console?new(r.console(gv)):new gv,a=e(i);i.rawAttach(a);let c=r&&r.tracer?new(r.tracer(Tv)):new Tv,u=r&&r.telemetry?new(r.telemetry(Sv)):new Sv,f=r&&r.client?new(r.client(hv)):new hv,m=r&&r.window?new(r.window(tK)):new tK,y=r&&r.workspace?new(r.workspace(oK)):new oK,g=r&&r.languages?new(r.languages(aK)):new aK,S=r&&r.notebooks?new(r.notebooks(sK)):new sK,_=[i,c,u,f,m,y,g,S];function b(M){return M instanceof Promise?M:Sf.thenable(M)?new Promise((J,A)=>{M.then(V=>J(V),V=>A(V))}):Promise.resolve(M)}let v,T,W,F={listen:()=>a.listen(),sendRequest:(M,...J)=>a.sendRequest(Sf.string(M)?M:M.method,...J),onRequest:(M,J)=>a.onRequest(M,J),sendNotification:(M,J)=>{let A=Sf.string(M)?M:M.method;return a.sendNotification(A,J)},onNotification:(M,J)=>a.onNotification(M,J),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:M=>(T=M,{dispose:()=>{T=void 0}}),onInitialized:M=>a.onNotification(ar.InitializedNotification.type,M),onShutdown:M=>(v=M,{dispose:()=>{v=void 0}}),onExit:M=>(W=M,{dispose:()=>{W=void 0}}),get console(){return i},get telemetry(){return u},get tracer(){return c},get client(){return f},get window(){return m},get workspace(){return y},get languages(){return g},get notebooks(){return S},onDidChangeConfiguration:M=>a.onNotification(ar.DidChangeConfigurationNotification.type,M),onDidChangeWatchedFiles:M=>a.onNotification(ar.DidChangeWatchedFilesNotification.type,M),__textDocumentSync:void 0,onDidOpenTextDocument:M=>a.onNotification(ar.DidOpenTextDocumentNotification.type,M),onDidChangeTextDocument:M=>a.onNotification(ar.DidChangeTextDocumentNotification.type,M),onDidCloseTextDocument:M=>a.onNotification(ar.DidCloseTextDocumentNotification.type,M),onWillSaveTextDocument:M=>a.onNotification(ar.WillSaveTextDocumentNotification.type,M),onWillSaveTextDocumentWaitUntil:M=>a.onRequest(ar.WillSaveTextDocumentWaitUntilRequest.type,M),onDidSaveTextDocument:M=>a.onNotification(ar.DidSaveTextDocumentNotification.type,M),sendDiagnostics:M=>a.sendNotification(ar.PublishDiagnosticsNotification.type,M),onHover:M=>a.onRequest(ar.HoverRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),void 0)),onCompletion:M=>a.onRequest(ar.CompletionRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onCompletionResolve:M=>a.onRequest(ar.CompletionResolveRequest.type,M),onSignatureHelp:M=>a.onRequest(ar.SignatureHelpRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),void 0)),onDeclaration:M=>a.onRequest(ar.DeclarationRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onDefinition:M=>a.onRequest(ar.DefinitionRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onTypeDefinition:M=>a.onRequest(ar.TypeDefinitionRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onImplementation:M=>a.onRequest(ar.ImplementationRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onReferences:M=>a.onRequest(ar.ReferencesRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onDocumentHighlight:M=>a.onRequest(ar.DocumentHighlightRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onDocumentSymbol:M=>a.onRequest(ar.DocumentSymbolRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onWorkspaceSymbol:M=>a.onRequest(ar.WorkspaceSymbolRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onWorkspaceSymbolResolve:M=>a.onRequest(ar.WorkspaceSymbolResolveRequest.type,M),onCodeAction:M=>a.onRequest(ar.CodeActionRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onCodeActionResolve:M=>a.onRequest(ar.CodeActionResolveRequest.type,(J,A)=>M(J,A)),onCodeLens:M=>a.onRequest(ar.CodeLensRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onCodeLensResolve:M=>a.onRequest(ar.CodeLensResolveRequest.type,(J,A)=>M(J,A)),onDocumentFormatting:M=>a.onRequest(ar.DocumentFormattingRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),void 0)),onDocumentRangeFormatting:M=>a.onRequest(ar.DocumentRangeFormattingRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),void 0)),onDocumentOnTypeFormatting:M=>a.onRequest(ar.DocumentOnTypeFormattingRequest.type,(J,A)=>M(J,A)),onRenameRequest:M=>a.onRequest(ar.RenameRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),void 0)),onPrepareRename:M=>a.onRequest(ar.PrepareRenameRequest.type,(J,A)=>M(J,A)),onDocumentLinks:M=>a.onRequest(ar.DocumentLinkRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onDocumentLinkResolve:M=>a.onRequest(ar.DocumentLinkResolveRequest.type,(J,A)=>M(J,A)),onDocumentColor:M=>a.onRequest(ar.DocumentColorRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onColorPresentation:M=>a.onRequest(ar.ColorPresentationRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onFoldingRanges:M=>a.onRequest(ar.FoldingRangeRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onSelectionRanges:M=>a.onRequest(ar.SelectionRangeRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),(0,qi.attachPartialResult)(a,J))),onExecuteCommand:M=>a.onRequest(ar.ExecuteCommandRequest.type,(J,A)=>M(J,A,(0,qi.attachWorkDone)(a,J),void 0)),dispose:()=>a.dispose()};for(let M of _)M.attach(F);return a.onRequest(ar.InitializeRequest.type,M=>{n.initialize(M),Sf.string(M.trace)&&(c.trace=ar.Trace.fromString(M.trace));for(let J of _)J.initialize(M.capabilities);if(T){let J=T(M,new ar.CancellationTokenSource().token,(0,qi.attachWorkDone)(a,M),void 0);return b(J).then(A=>{if(A instanceof ar.ResponseError)return A;let V=A;V||(V={capabilities:{}});let ue=V.capabilities;ue||(ue={},V.capabilities=ue),ue.textDocumentSync===void 0||ue.textDocumentSync===null?ue.textDocumentSync=Sf.number(F.__textDocumentSync)?F.__textDocumentSync:ar.TextDocumentSyncKind.None:!Sf.number(ue.textDocumentSync)&&!Sf.number(ue.textDocumentSync.change)&&(ue.textDocumentSync.change=Sf.number(F.__textDocumentSync)?F.__textDocumentSync:ar.TextDocumentSyncKind.None);for(let ye of _)ye.fillServerCapabilities(ue);return V})}else{let J={capabilities:{textDocumentSync:ar.TextDocumentSyncKind.None}};for(let A of _)A.fillServerCapabilities(J.capabilities);return J}}),a.onRequest(ar.ShutdownRequest.type,()=>{if(n.shutdownReceived=!0,v)return v(new ar.CancellationTokenSource().token)}),a.onNotification(ar.ExitNotification.type,()=>{try{W&&W()}finally{n.shutdownReceived?n.exit(0):n.exit(1)}}),a.onNotification(ar.SetTraceNotification.type,M=>{c.trace=ar.Trace.fromString(M.value)}),F}Xo.createConnection=mce});var yK=Zt(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});Xu.resolveModulePath=Xu.FileSystem=Xu.resolveGlobalYarnPath=Xu.resolveGlobalNodePath=Xu.resolve=Xu.uriToFilePath=void 0;var gce=require("url"),Yf=require("path"),I1=require("fs"),R1=require("child_process");function yce(e){let n=gce.parse(e);if(n.protocol!=="file:"||!n.path)return;let r=n.path.split("/");for(var i=0,a=r.length;i<a;i++)r[i]=decodeURIComponent(r[i]);if(process.platform==="win32"&&r.length>1){let c=r[0],u=r[1];c.length===0&&u.length>1&&u[1]===":"&&r.shift()}return Yf.normalize(r.join("/"))}Xu.uriToFilePath=yce;function L1(){return process.platform==="win32"}function bv(e,n,r,i){let a="NODE_PATH",c=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise((u,f)=>{let m=process.env,y=Object.create(null);Object.keys(m).forEach(g=>y[g]=m[g]),n&&I1.existsSync(n)&&(y[a]?y[a]=n+Yf.delimiter+y[a]:y[a]=n,i&&i(`NODE_PATH value is: ${y[a]}`)),y.ELECTRON_RUN_AS_NODE="1";try{let g=(0,R1.fork)("",[],{cwd:r,env:y,execArgv:["-e",c]});if(g.pid===void 0){f(new Error(`Starting process to resolve node module ${e} failed`));return}g.on("error",_=>{f(_)}),g.on("message",_=>{_.c==="r"&&(g.send({c:"e"}),_.s?u(_.r):f(new Error(`Failed to resolve module: ${e}`)))});let S={c:"rs",a:e};g.send(S)}catch(g){f(g)}})}Xu.resolve=bv;function A1(e){let n="npm",r=Object.create(null);Object.keys(process.env).forEach(c=>r[c]=process.env[c]),r.NO_UPDATE_NOTIFIER="true";let i={encoding:"utf8",env:r};L1()&&(n="npm.cmd",i.shell=!0);let a=()=>{};try{process.on("SIGPIPE",a);let c=(0,R1.spawnSync)(n,["config","get","prefix"],i).stdout;if(!c){e&&e("'npm config get prefix' didn't return a value.");return}let u=c.trim();return e&&e(`'npm config get prefix' value is: ${u}`),u.length>0?L1()?Yf.join(u,"node_modules"):Yf.join(u,"lib","node_modules"):void 0}catch{return}finally{process.removeListener("SIGPIPE",a)}}Xu.resolveGlobalNodePath=A1;function hce(e){let n="yarn",r={encoding:"utf8"};L1()&&(n="yarn.cmd",r.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let a=(0,R1.spawnSync)(n,["global","dir","--json"],r),c=a.stdout;if(!c){e&&(e("'yarn global dir' didn't return a value."),a.stderr&&e(a.stderr));return}let u=c.trim().split(/\r?\n/);for(let f of u)try{let m=JSON.parse(f);if(m.type==="log")return Yf.join(m.data,"node_modules")}catch{}return}catch{return}finally{process.removeListener("SIGPIPE",i)}}Xu.resolveGlobalYarnPath=hce;var w1;(function(e){let n;function r(){return n!==void 0||(process.platform==="win32"?n=!1:n=!I1.existsSync(__filename.toUpperCase())||!I1.existsSync(__filename.toLowerCase())),n}e.isCaseSensitive=r;function i(a,c){return r()?Yf.normalize(c).indexOf(Yf.normalize(a))===0:Yf.normalize(c).toLowerCase().indexOf(Yf.normalize(a).toLowerCase())===0}e.isParent=i})(w1||(Xu.FileSystem=w1={}));function Tce(e,n,r,i){return r?(Yf.isAbsolute(r)||(r=Yf.join(e,r)),bv(n,r,r,i).then(a=>w1.isParent(r,a)?a:Promise.reject(new Error(`Failed to load ${n} from node path location.`))).then(void 0,a=>bv(n,A1(i),e,i))):bv(n,A1(i),e,i)}Xu.resolveModulePath=Tce});var O1=Zt((Bxe,hK)=>{"use strict";hK.exports=Zs()});var TK=Zt(Cv=>{"use strict";Object.defineProperty(Cv,"__esModule",{value:!0});Cv.InlineCompletionFeature=void 0;var Sce=Zs(),_ce=e=>class extends e{get inlineCompletion(){return{on:n=>this.connection.onRequest(Sce.InlineCompletionRequest.type,(r,i)=>n(r,i,this.attachWorkDoneProgress(r)))}}};Cv.InlineCompletionFeature=_ce});var xK=Zt(Ml=>{"use strict";var xce=Ml&&Ml.__createBinding||(Object.create?function(e,n,r,i){i===void 0&&(i=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,i,a)}:function(e,n,r,i){i===void 0&&(i=r),e[i]=n[r]}),_K=Ml&&Ml.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&xce(n,e,r)};Object.defineProperty(Ml,"__esModule",{value:!0});Ml.ProposedFeatures=Ml.NotebookDocuments=Ml.TextDocuments=Ml.SemanticTokensBuilder=void 0;var bce=T1();Object.defineProperty(Ml,"SemanticTokensBuilder",{enumerable:!0,get:function(){return bce.SemanticTokensBuilder}});var Cce=TK();_K(Zs(),Ml);var Dce=b1();Object.defineProperty(Ml,"TextDocuments",{enumerable:!0,get:function(){return Dce.TextDocuments}});var Ece=D1();Object.defineProperty(Ml,"NotebookDocuments",{enumerable:!0,get:function(){return Ece.NotebookDocuments}});_K(F1(),Ml);var SK;(function(e){e.all={__brand:"features",languages:Cce.InlineCompletionFeature}})(SK||(Ml.ProposedFeatures=SK={}))});var G_=Zt(_f=>{"use strict";var Pce=_f&&_f.__createBinding||(Object.create?function(e,n,r,i){i===void 0&&(i=r);var a=Object.getOwnPropertyDescriptor(n,r);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,i,a)}:function(e,n,r,i){i===void 0&&(i=r),e[i]=n[r]}),EK=_f&&_f.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&Pce(n,e,r)};Object.defineProperty(_f,"__esModule",{value:!0});_f.createConnection=_f.Files=void 0;var bK=require("util"),M1=lk(),Nce=F1(),SD=yK(),NT=O1();EK(O1(),_f);EK(xK(),_f);var CK;(function(e){e.uriToFilePath=SD.uriToFilePath,e.resolveGlobalNodePath=SD.resolveGlobalNodePath,e.resolveGlobalYarnPath=SD.resolveGlobalYarnPath,e.resolve=SD.resolve,e.resolveModulePath=SD.resolveModulePath})(CK||(_f.Files=CK={}));var DK;function Dv(){if(DK!==void 0)try{DK.end()}catch{}}var z_=!1,PK;function kce(){let e="--clientProcessId";function n(r){try{let i=parseInt(r);isNaN(i)||(PK=setInterval(()=>{try{process.kill(i,0)}catch{Dv(),process.exit(z_?0:1)}},3e3))}catch{}}for(let r=2;r<process.argv.length;r++){let i=process.argv[r];if(i===e&&r+1<process.argv.length){n(process.argv[r+1]);return}else{let a=i.split("=");a[0]===e&&n(a[1])}}}kce();var vce={initialize:e=>{let n=e.processId;M1.number(n)&&PK===void 0&&setInterval(()=>{try{process.kill(n,0)}catch{process.exit(z_?0:1)}},3e3)},get shutdownReceived(){return z_},set shutdownReceived(e){z_=e},exit:e=>{Dv(),process.exit(e)}};function Fce(e,n,r,i){let a,c,u,f;return e!==void 0&&e.__brand==="features"&&(a=e,e=n,n=r,r=i),NT.ConnectionStrategy.is(e)||NT.ConnectionOptions.is(e)?f=e:(c=e,u=n,f=r),Ice(c,u,f,a)}_f.createConnection=Fce;function Ice(e,n,r,i){let a=!1;if(!e&&!n&&process.argv.length>2){let m,y,g=process.argv.slice(2);for(let S=0;S<g.length;S++){let _=g[S];if(_==="--node-ipc"){e=new NT.IPCMessageReader(process),n=new NT.IPCMessageWriter(process);break}else if(_==="--stdio"){a=!0,e=process.stdin,n=process.stdout;break}else if(_==="--socket"){m=parseInt(g[S+1]);break}else if(_==="--pipe"){y=g[S+1];break}else{var c=_.split("=");if(c[0]==="--socket"){m=parseInt(c[1]);break}else if(c[0]==="--pipe"){y=c[1];break}}}if(m){let S=(0,NT.createServerSocketTransport)(m);e=S[0],n=S[1]}else if(y){let S=(0,NT.createServerPipeTransport)(y);e=S[0],n=S[1]}}var u="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+u);if(!n)throw new Error("Connection output stream is not set. "+u);if(M1.func(e.read)&&M1.func(e.on)){let m=e;m.on("end",()=>{Dv(),process.exit(z_?0:1)}),m.on("close",()=>{Dv(),process.exit(z_?0:1)})}let f=m=>{let y=(0,NT.createProtocolConnection)(e,n,m,r);return a&&Lce(m),y};return(0,Nce.createConnection)(f,vce,i)}function Lce(e){function n(i){return i.map(a=>typeof a=="string"?a:(0,bK.inspect)(a)).join(" ")}let r=new Map;console.assert=function(a,...c){if(!a)if(c.length===0)e.error("Assertion failed");else{let[u,...f]=c;e.error(`Assertion failed: ${u} ${n(f)}`)}},console.count=function(a="default"){let c=String(a),u=r.get(c)??0;u+=1,r.set(c,u),e.log(`${c}: ${c}`)},console.countReset=function(a){a===void 0?r.clear():r.delete(String(a))},console.debug=function(...a){e.log(n(a))},console.dir=function(a,c){e.log((0,bK.inspect)(a,c))},console.log=function(...a){e.log(n(a))},console.error=function(...a){e.error(n(a))},console.trace=function(...a){let c=new Error().stack.replace(/(.+\n){2}/,""),u="Trace";a.length!==0&&(u+=`: ${n(a)}`),e.log(`${u}
38
+ ${c}`)},console.warn=function(...a){e.warn(n(a))}}});var kK=Zt((Kxe,NK)=>{"use strict";NK.exports=G_()});var Cz=Zt(T2=>{var bz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");T2.encode=function(e){if(0<=e&&e<bz.length)return bz[e];throw new TypeError("Must be between 0 and 63: "+e)};T2.decode=function(e){var n=65,r=90,i=97,a=122,c=48,u=57,f=43,m=47,y=26,g=52;return n<=e&&e<=r?e-n:i<=e&&e<=a?e-i+y:c<=e&&e<=u?e-c+g:e==f?62:e==m?63:-1}});var x2=Zt(_2=>{var Dz=Cz(),S2=5,Ez=1<<S2,Pz=Ez-1,Nz=Ez;function ope(e){return e<0?(-e<<1)+1:(e<<1)+0}function ape(e){var n=(e&1)===1,r=e>>1;return n?-r:r}_2.encode=function(n){var r="",i,a=ope(n);do i=a&Pz,a>>>=S2,a>0&&(i|=Nz),r+=Dz.encode(i);while(a>0);return r};_2.decode=function(n,r,i){var a=n.length,c=0,u=0,f,m;do{if(r>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(m=Dz.decode(n.charCodeAt(r++)),m===-1)throw new Error("Invalid base64 digit: "+n.charAt(r-1));f=!!(m&Nz),m&=Pz,c=c+(m<<u),u+=S2}while(f);i.value=ape(c),i.rest=r}});var mb=Zt(Gl=>{function spe(e,n,r){if(n in e)return e[n];if(arguments.length===3)return r;throw new Error('"'+n+'" is a required argument.')}Gl.getArg=spe;var kz=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,cpe=/^data:.+\,.+$/;function BE(e){var n=e.match(kz);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}Gl.urlParse=BE;function fb(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}Gl.urlGenerate=fb;function b2(e){var n=e,r=BE(e);if(r){if(!r.path)return e;n=r.path}for(var i=Gl.isAbsolute(n),a=n.split(/\/+/),c,u=0,f=a.length-1;f>=0;f--)c=a[f],c==="."?a.splice(f,1):c===".."?u++:u>0&&(c===""?(a.splice(f+1,u),u=0):(a.splice(f,2),u--));return n=a.join("/"),n===""&&(n=i?"/":"."),r?(r.path=n,fb(r)):n}Gl.normalize=b2;function vz(e,n){e===""&&(e="."),n===""&&(n=".");var r=BE(n),i=BE(e);if(i&&(e=i.path||"/"),r&&!r.scheme)return i&&(r.scheme=i.scheme),fb(r);if(r||n.match(cpe))return n;if(i&&!i.host&&!i.path)return i.host=n,fb(i);var a=n.charAt(0)==="/"?n:b2(e.replace(/\/+$/,"")+"/"+n);return i?(i.path=a,fb(i)):a}Gl.join=vz;Gl.isAbsolute=function(e){return e.charAt(0)==="/"||kz.test(e)};function lpe(e,n){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;n.indexOf(e+"/")!==0;){var i=e.lastIndexOf("/");if(i<0||(e=e.slice(0,i),e.match(/^([^\/]+:\/)?\/*$/)))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}Gl.relative=lpe;var Fz=function(){var e=Object.create(null);return!("__proto__"in e)}();function Iz(e){return e}function upe(e){return Lz(e)?"$"+e:e}Gl.toSetString=Fz?Iz:upe;function dpe(e){return Lz(e)?e.slice(1):e}Gl.fromSetString=Fz?Iz:dpe;function Lz(e){if(!e)return!1;var n=e.length;if(n<9||e.charCodeAt(n-1)!==95||e.charCodeAt(n-2)!==95||e.charCodeAt(n-3)!==111||e.charCodeAt(n-4)!==116||e.charCodeAt(n-5)!==111||e.charCodeAt(n-6)!==114||e.charCodeAt(n-7)!==112||e.charCodeAt(n-8)!==95||e.charCodeAt(n-9)!==95)return!1;for(var r=n-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function fpe(e,n,r){var i=pb(e.source,n.source);return i!==0||(i=e.originalLine-n.originalLine,i!==0)||(i=e.originalColumn-n.originalColumn,i!==0||r)||(i=e.generatedColumn-n.generatedColumn,i!==0)||(i=e.generatedLine-n.generatedLine,i!==0)?i:pb(e.name,n.name)}Gl.compareByOriginalPositions=fpe;function ppe(e,n,r){var i=e.generatedLine-n.generatedLine;return i!==0||(i=e.generatedColumn-n.generatedColumn,i!==0||r)||(i=pb(e.source,n.source),i!==0)||(i=e.originalLine-n.originalLine,i!==0)||(i=e.originalColumn-n.originalColumn,i!==0)?i:pb(e.name,n.name)}Gl.compareByGeneratedPositionsDeflated=ppe;function pb(e,n){return e===n?0:e===null?1:n===null?-1:e>n?1:-1}function mpe(e,n){var r=e.generatedLine-n.generatedLine;return r!==0||(r=e.generatedColumn-n.generatedColumn,r!==0)||(r=pb(e.source,n.source),r!==0)||(r=e.originalLine-n.originalLine,r!==0)||(r=e.originalColumn-n.originalColumn,r!==0)?r:pb(e.name,n.name)}Gl.compareByGeneratedPositionsInflated=mpe;function gpe(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Gl.parseSourceMapInput=gpe;function ype(e,n,r){if(n=n||"",e&&(e[e.length-1]!=="/"&&n[0]!=="/"&&(e+="/"),n=e+n),r){var i=BE(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var a=i.path.lastIndexOf("/");a>=0&&(i.path=i.path.substring(0,a+1))}n=vz(fb(i),n)}return b2(n)}Gl.computeSourceURL=ype});var E2=Zt(Az=>{var C2=mb(),D2=Object.prototype.hasOwnProperty,_S=typeof Map<"u";function $g(){this._array=[],this._set=_S?new Map:Object.create(null)}$g.fromArray=function(n,r){for(var i=new $g,a=0,c=n.length;a<c;a++)i.add(n[a],r);return i};$g.prototype.size=function(){return _S?this._set.size:Object.getOwnPropertyNames(this._set).length};$g.prototype.add=function(n,r){var i=_S?n:C2.toSetString(n),a=_S?this.has(n):D2.call(this._set,i),c=this._array.length;(!a||r)&&this._array.push(n),a||(_S?this._set.set(n,c):this._set[i]=c)};$g.prototype.has=function(n){if(_S)return this._set.has(n);var r=C2.toSetString(n);return D2.call(this._set,r)};$g.prototype.indexOf=function(n){if(_S){var r=this._set.get(n);if(r>=0)return r}else{var i=C2.toSetString(n);if(D2.call(this._set,i))return this._set[i]}throw new Error('"'+n+'" is not in the set.')};$g.prototype.at=function(n){if(n>=0&&n<this._array.length)return this._array[n];throw new Error("No element indexed by "+n)};$g.prototype.toArray=function(){return this._array.slice()};Az.ArraySet=$g});var Oz=Zt(Rz=>{var wz=mb();function hpe(e,n){var r=e.generatedLine,i=n.generatedLine,a=e.generatedColumn,c=n.generatedColumn;return i>r||i==r&&c>=a||wz.compareByGeneratedPositionsInflated(e,n)<=0}function MI(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}MI.prototype.unsortedForEach=function(n,r){this._array.forEach(n,r)};MI.prototype.add=function(n){hpe(this._last,n)?(this._last=n,this._array.push(n)):(this._sorted=!1,this._array.push(n))};MI.prototype.toArray=function(){return this._sorted||(this._array.sort(wz.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Rz.MappingList=MI});var P2=Zt(Mz=>{var jE=x2(),Dc=mb(),BI=E2().ArraySet,Tpe=Oz().MappingList;function Af(e){e||(e={}),this._file=Dc.getArg(e,"file",null),this._sourceRoot=Dc.getArg(e,"sourceRoot",null),this._skipValidation=Dc.getArg(e,"skipValidation",!1),this._sources=new BI,this._names=new BI,this._mappings=new Tpe,this._sourcesContents=null}Af.prototype._version=3;Af.fromSourceMap=function(n){var r=n.sourceRoot,i=new Af({file:n.file,sourceRoot:r});return n.eachMapping(function(a){var c={generated:{line:a.generatedLine,column:a.generatedColumn}};a.source!=null&&(c.source=a.source,r!=null&&(c.source=Dc.relative(r,c.source)),c.original={line:a.originalLine,column:a.originalColumn},a.name!=null&&(c.name=a.name)),i.addMapping(c)}),n.sources.forEach(function(a){var c=a;r!==null&&(c=Dc.relative(r,a)),i._sources.has(c)||i._sources.add(c);var u=n.sourceContentFor(a);u!=null&&i.setSourceContent(a,u)}),i};Af.prototype.addMapping=function(n){var r=Dc.getArg(n,"generated"),i=Dc.getArg(n,"original",null),a=Dc.getArg(n,"source",null),c=Dc.getArg(n,"name",null);this._skipValidation||this._validateMapping(r,i,a,c),a!=null&&(a=String(a),this._sources.has(a)||this._sources.add(a)),c!=null&&(c=String(c),this._names.has(c)||this._names.add(c)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:a,name:c})};Af.prototype.setSourceContent=function(n,r){var i=n;this._sourceRoot!=null&&(i=Dc.relative(this._sourceRoot,i)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Dc.toSetString(i)]=r):this._sourcesContents&&(delete this._sourcesContents[Dc.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Af.prototype.applySourceMap=function(n,r,i){var a=r;if(r==null){if(n.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);a=n.file}var c=this._sourceRoot;c!=null&&(a=Dc.relative(c,a));var u=new BI,f=new BI;this._mappings.unsortedForEach(function(m){if(m.source===a&&m.originalLine!=null){var y=n.originalPositionFor({line:m.originalLine,column:m.originalColumn});y.source!=null&&(m.source=y.source,i!=null&&(m.source=Dc.join(i,m.source)),c!=null&&(m.source=Dc.relative(c,m.source)),m.originalLine=y.line,m.originalColumn=y.column,y.name!=null&&(m.name=y.name))}var g=m.source;g!=null&&!u.has(g)&&u.add(g);var S=m.name;S!=null&&!f.has(S)&&f.add(S)},this),this._sources=u,this._names=f,n.sources.forEach(function(m){var y=n.sourceContentFor(m);y!=null&&(i!=null&&(m=Dc.join(i,m)),c!=null&&(m=Dc.relative(c,m)),this.setSourceContent(m,y))},this)};Af.prototype._validateMapping=function(n,r,i,a){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(n&&"line"in n&&"column"in n&&n.line>0&&n.column>=0&&!r&&!i&&!a)){if(n&&"line"in n&&"column"in n&&r&&"line"in r&&"column"in r&&n.line>0&&n.column>=0&&r.line>0&&r.column>=0&&i)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:n,source:i,original:r,name:a}))}};Af.prototype._serializeMappings=function(){for(var n=0,r=1,i=0,a=0,c=0,u=0,f="",m,y,g,S,_=this._mappings.toArray(),b=0,v=_.length;b<v;b++){if(y=_[b],m="",y.generatedLine!==r)for(n=0;y.generatedLine!==r;)m+=";",r++;else if(b>0){if(!Dc.compareByGeneratedPositionsInflated(y,_[b-1]))continue;m+=","}m+=jE.encode(y.generatedColumn-n),n=y.generatedColumn,y.source!=null&&(S=this._sources.indexOf(y.source),m+=jE.encode(S-u),u=S,m+=jE.encode(y.originalLine-1-a),a=y.originalLine-1,m+=jE.encode(y.originalColumn-i),i=y.originalColumn,y.name!=null&&(g=this._names.indexOf(y.name),m+=jE.encode(g-c),c=g)),f+=m}return f};Af.prototype._generateSourcesContent=function(n,r){return n.map(function(i){if(!this._sourcesContents)return null;r!=null&&(i=Dc.relative(r,i));var a=Dc.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,a)?this._sourcesContents[a]:null},this)};Af.prototype.toJSON=function(){var n={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(n.file=this._file),this._sourceRoot!=null&&(n.sourceRoot=this._sourceRoot),this._sourcesContents&&(n.sourcesContent=this._generateSourcesContent(n.sources,n.sourceRoot)),n};Af.prototype.toString=function(){return JSON.stringify(this.toJSON())};Mz.SourceMapGenerator=Af});var Bz=Zt(xS=>{xS.GREATEST_LOWER_BOUND=1;xS.LEAST_UPPER_BOUND=2;function N2(e,n,r,i,a,c){var u=Math.floor((n-e)/2)+e,f=a(r,i[u],!0);return f===0?u:f>0?n-u>1?N2(u,n,r,i,a,c):c==xS.LEAST_UPPER_BOUND?n<i.length?n:-1:u:u-e>1?N2(e,u,r,i,a,c):c==xS.LEAST_UPPER_BOUND?u:e<0?-1:e}xS.search=function(n,r,i,a){if(r.length===0)return-1;var c=N2(-1,r.length,n,r,i,a||xS.GREATEST_LOWER_BOUND);if(c<0)return-1;for(;c-1>=0&&i(r[c],r[c-1],!0)===0;)--c;return c}});var Jz=Zt(jz=>{function k2(e,n,r){var i=e[n];e[n]=e[r],e[r]=i}function Spe(e,n){return Math.round(e+Math.random()*(n-e))}function v2(e,n,r,i){if(r<i){var a=Spe(r,i),c=r-1;k2(e,a,i);for(var u=e[i],f=r;f<i;f++)n(e[f],u)<=0&&(c+=1,k2(e,c,f));k2(e,c+1,f);var m=c+1;v2(e,n,r,m-1),v2(e,n,m+1,i)}}jz.quickSort=function(e,n){v2(e,n,0,e.length-1)}});var Uz=Zt(jI=>{var Kr=mb(),F2=Bz(),gb=E2().ArraySet,_pe=x2(),JE=Jz().quickSort;function ts(e,n){var r=e;return typeof e=="string"&&(r=Kr.parseSourceMapInput(e)),r.sections!=null?new yp(r,n):new _l(r,n)}ts.fromSourceMap=function(e,n){return _l.fromSourceMap(e,n)};ts.prototype._version=3;ts.prototype.__generatedMappings=null;Object.defineProperty(ts.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ts.prototype.__originalMappings=null;Object.defineProperty(ts.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ts.prototype._charIsMappingSeparator=function(n,r){var i=n.charAt(r);return i===";"||i===","};ts.prototype._parseMappings=function(n,r){throw new Error("Subclasses must implement _parseMappings")};ts.GENERATED_ORDER=1;ts.ORIGINAL_ORDER=2;ts.GREATEST_LOWER_BOUND=1;ts.LEAST_UPPER_BOUND=2;ts.prototype.eachMapping=function(n,r,i){var a=r||null,c=i||ts.GENERATED_ORDER,u;switch(c){case ts.GENERATED_ORDER:u=this._generatedMappings;break;case ts.ORIGINAL_ORDER:u=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var f=this.sourceRoot;u.map(function(m){var y=m.source===null?null:this._sources.at(m.source);return y=Kr.computeSourceURL(f,y,this._sourceMapURL),{source:y,generatedLine:m.generatedLine,generatedColumn:m.generatedColumn,originalLine:m.originalLine,originalColumn:m.originalColumn,name:m.name===null?null:this._names.at(m.name)}},this).forEach(n,a)};ts.prototype.allGeneratedPositionsFor=function(n){var r=Kr.getArg(n,"line"),i={source:Kr.getArg(n,"source"),originalLine:r,originalColumn:Kr.getArg(n,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],c=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",Kr.compareByOriginalPositions,F2.LEAST_UPPER_BOUND);if(c>=0){var u=this._originalMappings[c];if(n.column===void 0)for(var f=u.originalLine;u&&u.originalLine===f;)a.push({line:Kr.getArg(u,"generatedLine",null),column:Kr.getArg(u,"generatedColumn",null),lastColumn:Kr.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++c];else for(var m=u.originalColumn;u&&u.originalLine===r&&u.originalColumn==m;)a.push({line:Kr.getArg(u,"generatedLine",null),column:Kr.getArg(u,"generatedColumn",null),lastColumn:Kr.getArg(u,"lastGeneratedColumn",null)}),u=this._originalMappings[++c]}return a};jI.SourceMapConsumer=ts;function _l(e,n){var r=e;typeof e=="string"&&(r=Kr.parseSourceMapInput(e));var i=Kr.getArg(r,"version"),a=Kr.getArg(r,"sources"),c=Kr.getArg(r,"names",[]),u=Kr.getArg(r,"sourceRoot",null),f=Kr.getArg(r,"sourcesContent",null),m=Kr.getArg(r,"mappings"),y=Kr.getArg(r,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);u&&(u=Kr.normalize(u)),a=a.map(String).map(Kr.normalize).map(function(g){return u&&Kr.isAbsolute(u)&&Kr.isAbsolute(g)?Kr.relative(u,g):g}),this._names=gb.fromArray(c.map(String),!0),this._sources=gb.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map(function(g){return Kr.computeSourceURL(u,g,n)}),this.sourceRoot=u,this.sourcesContent=f,this._mappings=m,this._sourceMapURL=n,this.file=y}_l.prototype=Object.create(ts.prototype);_l.prototype.consumer=ts;_l.prototype._findSourceIndex=function(e){var n=e;if(this.sourceRoot!=null&&(n=Kr.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};_l.fromSourceMap=function(n,r){var i=Object.create(_l.prototype),a=i._names=gb.fromArray(n._names.toArray(),!0),c=i._sources=gb.fromArray(n._sources.toArray(),!0);i.sourceRoot=n._sourceRoot,i.sourcesContent=n._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=n._file,i._sourceMapURL=r,i._absoluteSources=i._sources.toArray().map(function(b){return Kr.computeSourceURL(i.sourceRoot,b,r)});for(var u=n._mappings.toArray().slice(),f=i.__generatedMappings=[],m=i.__originalMappings=[],y=0,g=u.length;y<g;y++){var S=u[y],_=new Wz;_.generatedLine=S.generatedLine,_.generatedColumn=S.generatedColumn,S.source&&(_.source=c.indexOf(S.source),_.originalLine=S.originalLine,_.originalColumn=S.originalColumn,S.name&&(_.name=a.indexOf(S.name)),m.push(_)),f.push(_)}return JE(i.__originalMappings,Kr.compareByOriginalPositions),i};_l.prototype._version=3;Object.defineProperty(_l.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Wz(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}_l.prototype._parseMappings=function(n,r){for(var i=1,a=0,c=0,u=0,f=0,m=0,y=n.length,g=0,S={},_={},b=[],v=[],T,W,F,M,J;g<y;)if(n.charAt(g)===";")i++,g++,a=0;else if(n.charAt(g)===",")g++;else{for(T=new Wz,T.generatedLine=i,M=g;M<y&&!this._charIsMappingSeparator(n,M);M++);if(W=n.slice(g,M),F=S[W],F)g+=W.length;else{for(F=[];g<M;)_pe.decode(n,g,_),J=_.value,g=_.rest,F.push(J);if(F.length===2)throw new Error("Found a source, but no line and column");if(F.length===3)throw new Error("Found a source and line, but no column");S[W]=F}T.generatedColumn=a+F[0],a=T.generatedColumn,F.length>1&&(T.source=f+F[1],f+=F[1],T.originalLine=c+F[2],c=T.originalLine,T.originalLine+=1,T.originalColumn=u+F[3],u=T.originalColumn,F.length>4&&(T.name=m+F[4],m+=F[4])),v.push(T),typeof T.originalLine=="number"&&b.push(T)}JE(v,Kr.compareByGeneratedPositionsDeflated),this.__generatedMappings=v,JE(b,Kr.compareByOriginalPositions),this.__originalMappings=b};_l.prototype._findMapping=function(n,r,i,a,c,u){if(n[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+n[i]);if(n[a]<0)throw new TypeError("Column must be greater than or equal to 0, got "+n[a]);return F2.search(n,r,c,u)};_l.prototype.computeColumnSpans=function(){for(var n=0;n<this._generatedMappings.length;++n){var r=this._generatedMappings[n];if(n+1<this._generatedMappings.length){var i=this._generatedMappings[n+1];if(r.generatedLine===i.generatedLine){r.lastGeneratedColumn=i.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};_l.prototype.originalPositionFor=function(n){var r={generatedLine:Kr.getArg(n,"line"),generatedColumn:Kr.getArg(n,"column")},i=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",Kr.compareByGeneratedPositionsDeflated,Kr.getArg(n,"bias",ts.GREATEST_LOWER_BOUND));if(i>=0){var a=this._generatedMappings[i];if(a.generatedLine===r.generatedLine){var c=Kr.getArg(a,"source",null);c!==null&&(c=this._sources.at(c),c=Kr.computeSourceURL(this.sourceRoot,c,this._sourceMapURL));var u=Kr.getArg(a,"name",null);return u!==null&&(u=this._names.at(u)),{source:c,line:Kr.getArg(a,"originalLine",null),column:Kr.getArg(a,"originalColumn",null),name:u}}}return{source:null,line:null,column:null,name:null}};_l.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(n){return n==null}):!1};_l.prototype.sourceContentFor=function(n,r){if(!this.sourcesContent)return null;var i=this._findSourceIndex(n);if(i>=0)return this.sourcesContent[i];var a=n;this.sourceRoot!=null&&(a=Kr.relative(this.sourceRoot,a));var c;if(this.sourceRoot!=null&&(c=Kr.urlParse(this.sourceRoot))){var u=a.replace(/^file:\/\//,"");if(c.scheme=="file"&&this._sources.has(u))return this.sourcesContent[this._sources.indexOf(u)];if((!c.path||c.path=="/")&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(r)return null;throw new Error('"'+a+'" is not in the SourceMap.')};_l.prototype.generatedPositionFor=function(n){var r=Kr.getArg(n,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var i={source:r,originalLine:Kr.getArg(n,"line"),originalColumn:Kr.getArg(n,"column")},a=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",Kr.compareByOriginalPositions,Kr.getArg(n,"bias",ts.GREATEST_LOWER_BOUND));if(a>=0){var c=this._originalMappings[a];if(c.source===i.source)return{line:Kr.getArg(c,"generatedLine",null),column:Kr.getArg(c,"generatedColumn",null),lastColumn:Kr.getArg(c,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};jI.BasicSourceMapConsumer=_l;function yp(e,n){var r=e;typeof e=="string"&&(r=Kr.parseSourceMapInput(e));var i=Kr.getArg(r,"version"),a=Kr.getArg(r,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new gb,this._names=new gb;var c={line:-1,column:0};this._sections=a.map(function(u){if(u.url)throw new Error("Support for url field in sections not implemented.");var f=Kr.getArg(u,"offset"),m=Kr.getArg(f,"line"),y=Kr.getArg(f,"column");if(m<c.line||m===c.line&&y<c.column)throw new Error("Section offsets must be ordered and non-overlapping.");return c=f,{generatedOffset:{generatedLine:m+1,generatedColumn:y+1},consumer:new ts(Kr.getArg(u,"map"),n)}})}yp.prototype=Object.create(ts.prototype);yp.prototype.constructor=ts;yp.prototype._version=3;Object.defineProperty(yp.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}});yp.prototype.originalPositionFor=function(n){var r={generatedLine:Kr.getArg(n,"line"),generatedColumn:Kr.getArg(n,"column")},i=F2.search(r,this._sections,function(c,u){var f=c.generatedLine-u.generatedOffset.generatedLine;return f||c.generatedColumn-u.generatedOffset.generatedColumn}),a=this._sections[i];return a?a.consumer.originalPositionFor({line:r.generatedLine-(a.generatedOffset.generatedLine-1),column:r.generatedColumn-(a.generatedOffset.generatedLine===r.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:n.bias}):{source:null,line:null,column:null,name:null}};yp.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(n){return n.consumer.hasContentsOfAllSources()})};yp.prototype.sourceContentFor=function(n,r){for(var i=0;i<this._sections.length;i++){var a=this._sections[i],c=a.consumer.sourceContentFor(n,!0);if(c)return c}if(r)return null;throw new Error('"'+n+'" is not in the SourceMap.')};yp.prototype.generatedPositionFor=function(n){for(var r=0;r<this._sections.length;r++){var i=this._sections[r];if(i.consumer._findSourceIndex(Kr.getArg(n,"source"))!==-1){var a=i.consumer.generatedPositionFor(n);if(a){var c={line:a.line+(i.generatedOffset.generatedLine-1),column:a.column+(i.generatedOffset.generatedLine===a.line?i.generatedOffset.generatedColumn-1:0)};return c}}}return{line:null,column:null}};yp.prototype._parseMappings=function(n,r){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var a=this._sections[i],c=a.consumer._generatedMappings,u=0;u<c.length;u++){var f=c[u],m=a.consumer._sources.at(f.source);m=Kr.computeSourceURL(a.consumer.sourceRoot,m,this._sourceMapURL),this._sources.add(m),m=this._sources.indexOf(m);var y=null;f.name&&(y=a.consumer._names.at(f.name),this._names.add(y),y=this._names.indexOf(y));var g={source:m,generatedLine:f.generatedLine+(a.generatedOffset.generatedLine-1),generatedColumn:f.generatedColumn+(a.generatedOffset.generatedLine===f.generatedLine?a.generatedOffset.generatedColumn-1:0),originalLine:f.originalLine,originalColumn:f.originalColumn,name:y};this.__generatedMappings.push(g),typeof g.originalLine=="number"&&this.__originalMappings.push(g)}JE(this.__generatedMappings,Kr.compareByGeneratedPositionsDeflated),JE(this.__originalMappings,Kr.compareByOriginalPositions)};jI.IndexedSourceMapConsumer=yp});var qz=Zt(Kz=>{var xpe=P2().SourceMapGenerator,JI=mb(),bpe=/(\r?\n)/,Cpe=10,yb="$$$isSourceNode$$$";function $d(e,n,r,i,a){this.children=[],this.sourceContents={},this.line=e??null,this.column=n??null,this.source=r??null,this.name=a??null,this[yb]=!0,i!=null&&this.add(i)}$d.fromStringWithSourceMap=function(n,r,i){var a=new $d,c=n.split(bpe),u=0,f=function(){var _=v(),b=v()||"";return _+b;function v(){return u<c.length?c[u++]:void 0}},m=1,y=0,g=null;return r.eachMapping(function(_){if(g!==null)if(m<_.generatedLine)S(g,f()),m++,y=0;else{var b=c[u]||"",v=b.substr(0,_.generatedColumn-y);c[u]=b.substr(_.generatedColumn-y),y=_.generatedColumn,S(g,v),g=_;return}for(;m<_.generatedLine;)a.add(f()),m++;if(y<_.generatedColumn){var b=c[u]||"";a.add(b.substr(0,_.generatedColumn)),c[u]=b.substr(_.generatedColumn),y=_.generatedColumn}g=_},this),u<c.length&&(g&&S(g,f()),a.add(c.splice(u).join(""))),r.sources.forEach(function(_){var b=r.sourceContentFor(_);b!=null&&(i!=null&&(_=JI.join(i,_)),a.setSourceContent(_,b))}),a;function S(_,b){if(_===null||_.source===void 0)a.add(b);else{var v=i?JI.join(i,_.source):_.source;a.add(new $d(_.originalLine,_.originalColumn,v,b,_.name))}}};$d.prototype.add=function(n){if(Array.isArray(n))n.forEach(function(r){this.add(r)},this);else if(n[yb]||typeof n=="string")n&&this.children.push(n);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);return this};$d.prototype.prepend=function(n){if(Array.isArray(n))for(var r=n.length-1;r>=0;r--)this.prepend(n[r]);else if(n[yb]||typeof n=="string")this.children.unshift(n);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);return this};$d.prototype.walk=function(n){for(var r,i=0,a=this.children.length;i<a;i++)r=this.children[i],r[yb]?r.walk(n):r!==""&&n(r,{source:this.source,line:this.line,column:this.column,name:this.name})};$d.prototype.join=function(n){var r,i,a=this.children.length;if(a>0){for(r=[],i=0;i<a-1;i++)r.push(this.children[i]),r.push(n);r.push(this.children[i]),this.children=r}return this};$d.prototype.replaceRight=function(n,r){var i=this.children[this.children.length-1];return i[yb]?i.replaceRight(n,r):typeof i=="string"?this.children[this.children.length-1]=i.replace(n,r):this.children.push("".replace(n,r)),this};$d.prototype.setSourceContent=function(n,r){this.sourceContents[JI.toSetString(n)]=r};$d.prototype.walkSourceContents=function(n){for(var r=0,i=this.children.length;r<i;r++)this.children[r][yb]&&this.children[r].walkSourceContents(n);for(var a=Object.keys(this.sourceContents),r=0,i=a.length;r<i;r++)n(JI.fromSetString(a[r]),this.sourceContents[a[r]])};$d.prototype.toString=function(){var n="";return this.walk(function(r){n+=r}),n};$d.prototype.toStringWithSourceMap=function(n){var r={code:"",line:1,column:0},i=new xpe(n),a=!1,c=null,u=null,f=null,m=null;return this.walk(function(y,g){r.code+=y,g.source!==null&&g.line!==null&&g.column!==null?((c!==g.source||u!==g.line||f!==g.column||m!==g.name)&&i.addMapping({source:g.source,original:{line:g.line,column:g.column},generated:{line:r.line,column:r.column},name:g.name}),c=g.source,u=g.line,f=g.column,m=g.name,a=!0):a&&(i.addMapping({generated:{line:r.line,column:r.column}}),c=null,a=!1);for(var S=0,_=y.length;S<_;S++)y.charCodeAt(S)===Cpe?(r.line++,r.column=0,S+1===_?(c=null,a=!1):a&&i.addMapping({source:g.source,original:{line:g.line,column:g.column},generated:{line:r.line,column:r.column},name:g.name})):r.column++}),this.walkSourceContents(function(y,g){i.setSourceContent(y,g)}),{code:r.code,map:i}};Kz.SourceNode=$d});var Vz=Zt(WI=>{WI.SourceMapGenerator=P2().SourceMapGenerator;WI.SourceMapConsumer=Uz().SourceMapConsumer;WI.SourceNode=qz().SourceNode});var zz=Zt((M7e,Hz)=>{var Dpe=Object.prototype.toString,I2=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function Epe(e){return Dpe.call(e).slice(8,-1)==="ArrayBuffer"}function Ppe(e,n,r){n>>>=0;var i=e.byteLength-n;if(i<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=i;else if(r>>>=0,r>i)throw new RangeError("'length' is out of bounds");return I2?Buffer.from(e.slice(n,n+r)):new Buffer(new Uint8Array(e.slice(n,n+r)))}function Npe(e,n){if((typeof n!="string"||n==="")&&(n="utf8"),!Buffer.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return I2?Buffer.from(e,n):new Buffer(e,n)}function kpe(e,n,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return Epe(e)?Ppe(e,n,r):typeof e=="string"?Npe(e,n):I2?Buffer.from(e):new Buffer(e)}Hz.exports=kpe});var eG=Zt(CS=>{var vpe=Vz().SourceMapConsumer,L2=require("path"),km;try{km=require("fs"),(!km.existsSync||!km.readFileSync)&&(km=null)}catch{}var Fpe=zz(),Gz=!1,$z=!1,A2=!1,WE="auto",bS={},UE={},Ipe=/^data:application\/json[^,]+base64,/,Ah=[],wh=[];function R2(){return WE==="browser"?!0:WE==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function Lpe(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}function UI(e){return function(n){for(var r=0;r<e.length;r++){var i=e[r](n);if(i)return i}return null}}var O2=UI(Ah);Ah.push(function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,function(i,a){return a?"":"/"})),e in bS)return bS[e];var n="";try{if(km)km.existsSync(e)&&(n=km.readFileSync(e,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),r.readyState===4&&r.status===200&&(n=r.responseText)}}catch{}return bS[e]=n});function w2(e,n){if(!e)return n;var r=L2.dirname(e),i=/^\w+:\/\/[^\/]*/.exec(r),a=i?i[0]:"",c=r.slice(a.length);return a&&/^\/\w\:/.test(c)?(a+="/",a+L2.resolve(r.slice(a.length),n).replace(/\\/g,"/")):a+L2.resolve(r.slice(a.length),n)}function Ape(e){var n;if(R2())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),n=r.readyState===4?r.responseText:null;var i=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(i)return i}catch{}n=O2(e);for(var a=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,c,u;u=a.exec(n);)c=u;return c?c[1]:null}var M2=UI(wh);wh.push(function(e){var n=Ape(e);if(!n)return null;var r;if(Ipe.test(n)){var i=n.slice(n.indexOf(",")+1);r=Fpe(i,"base64").toString(),n=e}else n=w2(e,n),r=O2(n);return r?{url:n,map:r}:null});function B2(e){var n=UE[e.source];if(!n){var r=M2(e.source);r?(n=UE[e.source]={url:r.url,map:new vpe(r.map)},n.map.sourcesContent&&n.map.sources.forEach(function(a,c){var u=n.map.sourcesContent[c];if(u){var f=w2(n.url,a);bS[f]=u}})):n=UE[e.source]={url:null,map:null}}if(n&&n.map&&typeof n.map.originalPositionFor=="function"){var i=n.map.originalPositionFor(e);if(i.source!==null)return i.source=w2(n.url,i.source),i}return e}function Yz(e){var n=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(n){var r=B2({source:n[2],line:+n[3],column:n[4]-1});return"eval at "+n[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return n=/^eval at ([^(]+) \((.+)\)$/.exec(e),n?"eval at "+n[1]+" ("+Yz(n[2])+")":e}function wpe(){var e,n="";if(this.isNative())n="native";else{e=this.getScriptNameOrSourceURL(),!e&&this.isEval()&&(n=this.getEvalOrigin(),n+=", "),e?n+=e:n+="<anonymous>";var r=this.getLineNumber();if(r!=null){n+=":"+r;var i=this.getColumnNumber();i&&(n+=":"+i)}}var a="",c=this.getFunctionName(),u=!0,f=this.isConstructor(),m=!(this.isToplevel()||f);if(m){var y=this.getTypeName();y==="[object Object]"&&(y="null");var g=this.getMethodName();c?(y&&c.indexOf(y)!=0&&(a+=y+"."),a+=c,g&&c.indexOf("."+g)!=c.length-g.length-1&&(a+=" [as "+g+"]")):a+=y+"."+(g||"<anonymous>")}else f?a+="new "+(c||"<anonymous>"):c?a+=c:(a+=n,u=!1);return u&&(a+=" ("+n+")"),a}function Qz(e){var n={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(r){n[r]=/^(?:is|get)/.test(r)?function(){return e[r].call(e)}:e[r]}),n.toString=wpe,n}function Xz(e){if(e.isNative())return e;var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var r=e.getLineNumber(),i=e.getColumnNumber()-1,a=62;r===1&&i>a&&!R2()&&!e.isEval()&&(i-=a);var c=B2({source:n,line:r,column:i});e=Qz(e);var u=e.getFunctionName;return e.getFunctionName=function(){return c.name||u()},e.getFileName=function(){return c.source},e.getLineNumber=function(){return c.line},e.getColumnNumber=function(){return c.column+1},e.getScriptNameOrSourceURL=function(){return c.source},e}var f=e.isEval()&&e.getEvalOrigin();return f&&(f=Yz(f),e=Qz(e),e.getEvalOrigin=function(){return f}),e}function Rpe(e,n){A2&&(bS={},UE={});var r=e.name||"Error",i=e.message||"",a=r+": "+i;return a+n.map(function(c){return`
39
+ at `+Xz(c)}).join("")}function Zz(e){var n=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(n){var r=n[1],i=+n[2],a=+n[3],c=bS[r];if(!c&&km&&km.existsSync(r))try{c=km.readFileSync(r,"utf8")}catch{c=""}if(c){var u=c.split(/(?:\r\n|\r|\n)/)[i-1];if(u)return r+":"+i+`
40
+ `+u+`
41
+ `+new Array(a).join(" ")+"^"}}return null}function Ope(e){var n=Zz(e);process.stderr._handle&&process.stderr._handle.setBlocking&&process.stderr._handle.setBlocking(!0),n&&(console.error(),console.error(n)),console.error(e.stack),process.exit(1)}function Mpe(){var e=process.emit;process.emit=function(n){if(n==="uncaughtException"){var r=arguments[1]&&arguments[1].stack,i=this.listeners(n).length>0;if(r&&!i)return Ope(arguments[1])}return e.apply(this,arguments)}}var Bpe=Ah.slice(0),jpe=wh.slice(0);CS.wrapCallSite=Xz;CS.getErrorSource=Zz;CS.mapSourcePosition=B2;CS.retrieveSourceMap=M2;CS.install=function(e){if(e=e||{},e.environment&&(WE=e.environment,["node","browser","auto"].indexOf(WE)===-1))throw new Error("environment "+WE+" was unknown. Available options are {auto, browser, node}");if(e.retrieveFile&&(e.overrideRetrieveFile&&(Ah.length=0),Ah.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(wh.length=0),wh.unshift(e.retrieveSourceMap)),e.hookRequire&&!R2()){var n;try{n=require("module")}catch{}var r=n.prototype._compile;r.__sourceMapSupport||(n.prototype._compile=function(a,c){return bS[c]=a,UE[c]=void 0,r.call(this,a,c)},n.prototype._compile.__sourceMapSupport=!0)}if(A2||(A2="emptyCacheBetweenOperations"in e?e.emptyCacheBetweenOperations:!1),Gz||(Gz=!0,Error.prepareStackTrace=Rpe),!$z){var i="handleUncaughtExceptions"in e?e.handleUncaughtExceptions:!0;i&&Lpe()&&($z=!0,Mpe())}};CS.resetRetrieveHandlers=function(){Ah.length=0,wh.length=0,Ah=Bpe.slice(0),wh=jpe.slice(0),M2=UI(wh),O2=UI(Ah)}});var dX={};cl(dX,{default:()=>VSe});function lX(e){return uX.existsSync(e)}function qSe(e){let n;for(let r=0;r<e.length-1;r++)if(e[r]==="--cancellationPipeName"){n=e[r+1];break}if(!n)return{isCancellationRequested:()=>!1,setRequest:r=>{},resetRequest:r=>{}};if(n.charAt(n.length-1)==="*"){let r=n.slice(0,-1);if(r.length===0||r.includes("*"))throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'.");let i,a;return{isCancellationRequested:()=>i!==void 0&&lX(i),setRequest(c){a=c,i=r+c},resetRequest(c){if(a!==c)throw new Error(`Mismatched request id, expected ${a}, actual ${c}`);i=void 0}}}else return{isCancellationRequested:()=>lX(n),setRequest:r=>{},resetRequest:r=>{}}}var uX,VSe,fX=yae(()=>{uX=ig(require("fs"));VSe=qSe});var cA=ig(kK());var JS=ig(G_()),ny=ig(G_());var B1="LPC";function gc(e){let n;return()=>(e&&(n=e(),e=void 0),n)}function Qy(e){let n=new Map;return r=>{let i=`${typeof r}:${r}`,a=n.get(i);return a===void 0&&!n.has(i)&&(a=e(r),n.set(i,a)),a}}function Ci(e){return e}function Ro(e,n,r,i){if(n===void 0||n.length===0)return e;if(e===void 0)return n.slice(r,i);r=r===void 0?0:vK(n,r),i=i===void 0?n.length:vK(n,i);for(let a=r;a<i&&a<n.length;a++)n[a]!==void 0&&e.push(n[a]);return e}function vK(e,n){return n<0?e.length+n:n}var Re=[],$_=new Map;function gr(e){return e!==void 0?e.length:0}var $y=Object.prototype.hasOwnProperty;function Ia(e,n){return $y.call(e,n)}function LK(e,n){return e===n?0:e===void 0?-1:n===void 0?1:e<n?-1:1}function io(e,n){return LK(e,n)}function Ace(e,n,r){n.sort((i,a)=>r(e[i],e[a])||io(i,a))}function xf(e,n){let r=Rce(e);return Ace(e,r,n),r.map(i=>e[i])}function wce(e,n){return n}function Rce(e){return e.map(wce)}function Vo(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Pn(e,n){if(e!==void 0)if(n!==void 0){for(let r=0;r<e.length;r++)if(n(e[r]))return!0}else return e.length>0;return!1}function AK(e,n,r){for(let i=0;i<e.length;i++)n=Math.max(n,r(e[i]));return n}function J1(e,n,r){let i=[];E.assertEqual(e.length,n.length);for(let a=0;a<e.length;a++)i.push(r(e[a],n[a],a));return i}function Yn(e,n){let r;if(e!==void 0){r=[];for(let i=0;i<e.length;i++)r.push(n(e[i],i))}return r}function Pv(){return typeof process<"u"&&!!process.nextTick&&!process.browser&&typeof require<"u"}function Vi(e){}function Ps(e,n,r){let i=e.length-n.length;return i>=0&&(r?bf(e.slice(i),n):e.indexOf(n,i)===i)}function bf(e,n){return e===n||e!==void 0&&n!==void 0&&e.toUpperCase()===n.toUpperCase()}function Q_(e){return e?W1:ul}function ul(e,n){return LK(e,n)}function W1(e,n){return e===n?0:e===void 0?-1:n===void 0?1:(e=e.toUpperCase(),n=n.toUpperCase(),e<n?-1:e>n?1:0)}function cg(e,n){return lg(e,n)}function lg(e,n){return e===n}function na(e){return e?Ci:ug}function Oce(e){return e.toLowerCase()}var FK=/[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g,IK=new Map;function ug(e){let n=IK.get(e);return n===void 0&&(n=FK.test(e)?e.replace(FK,Oce):e,IK.set(e,n)),n}function Eo(e,n,r){return r?bf(e.slice(0,n.length),n):e.lastIndexOf(n,0)===0}function Bn(e,n){if(e!==void 0)for(let r=0;r<e.length;r++){let i=n(e[r],r);if(i)return i}}function Gr(e,n,r=lg){if(e!==void 0){for(let i=0;i<e.length;i++)if(r(e[i],n))return!0}return!1}function dg(e,n,r){return e!==void 0?(fu(e,n,r),e):[n]}function fu(e,n,r){return Gr(e,n,r)?!1:(e.push(n),!0)}function Bl(e,n,r,i,a){if(e&&e.length>0){let c=e.length;if(c>0){let u=i===void 0||i<0?0:i,f=a===void 0||u+a>c-1?c-1:u+a,m;for(arguments.length<=2?(m=e[u],u++):m=r;u<=f;)m=n(m,e[u],u),u++;return m}}return r}function Rd(e,n,r,i,a){return kT(e,r(n),r,i,a)}function kT(e,n,r,i,a){if(!Pn(e))return-1;let c=a??0,u=e.length-1;for(;c<=u;){let f=c+(u-c>>1),m=r(e[f],f);switch(i(m,n)){case-1:c=f+1;break;case 0:return f;case 1:u=f-1;break}}return~c}function Xf(e,n,r,i,a){if(e.length===0)return e.push(n),!0;let c=Rd(e,n,Ci,r);if(c<0){if(i&&!a){let u=~c;if(u>0&&i(n,e[u-1]))return!1;if(u<e.length&&i(n,e[u]))return e.splice(u,1,n),!0}return e.splice(~c,0,n),!0}return a?(e.splice(c,0,n),!0):!1}function Nr(e){return Array.isArray(e)}function vT(e,n){let r=[];if(e!==void 0)for(let i=0;i<e.length;i++){let a=n(e[i],i);a&&(Nr(a)?Ro(r,a):r.push(a))}return r}function Zr(e,n){return n===void 0||n.length===0?e:e===void 0||e.length===0?n:[...e,...n]}function FT(e){e.length=0}function Sr(e,n,r){if(e!==void 0)for(let i=r??0;i<e.length;i++){let a=e[i];if(n(a,i))return a}}function Yy(){}function jl(){return!1}function Nv(){return!0}function gi(e){return typeof e=="string"}function wK(e,n,r){if(e!==void 0)for(let i=r??e.length-1;i>=0;i--){let a=e[i];if(n(a,i))return a}}function Ei(e,n){let r=[];if(e!==void 0)for(let i=0;i<e.length;i++){let a=n(e[i],i);a!==void 0&&r.push(a)}return r}function oo(e,n){let r=[];for(let i of e)r.push(n?n(i):i);return r}function fg(e,n,r){let i=Math.max(2,Math.floor(e.length*.34)),a=Math.floor(e.length*.4)+1,c;for(let u of n){let f=r(u);if(f!==void 0&&Math.abs(f.length-e.length)<=i){if(f===e||f.length<3&&f.toLowerCase()!==e.toLowerCase())continue;let m=Mce(e,f,a-.1);if(m===void 0)continue;E.assert(m<a),a=m,c=u}}return c}function Mce(e,n,r){let i=new Array(n.length+1),a=new Array(n.length+1),c=r+.01;for(let f=0;f<=n.length;f++)i[f]=f;for(let f=1;f<=e.length;f++){let m=e.charCodeAt(f-1),y=Math.ceil(f>r?f-r:1),g=Math.floor(n.length>r+f?r+f:n.length);a[0]=f;let S=f;for(let b=1;b<y;b++)a[b]=c;for(let b=y;b<=g;b++){let v=e[f-1].toLowerCase()===n[b-1].toLowerCase()?i[b-1]+.1:i[b-1]+2,T=m===n.charCodeAt(b-1)?i[b-1]:Math.min(i[b]+1,a[b-1]+1,v);a[b]=T,S=Math.min(S,T)}for(let b=g+1;b<=n.length;b++)a[b]=c;if(S>r)return;let _=i;i=a,a=_}let u=i[n.length];return u>r?void 0:u}function yi(e,n){if(e!==void 0){for(let r=0;r<e.length;r++)if(!n(e[r],r))return!1}return!0}function Oo(e,n){let r;if(e!==void 0)for(let i=0;i<e.length;i++){let a=n(e[i],i);a&&(Nr(a)?r=Ro(r,a):r=$r(r,a))}return r??Re}function $r(e,n){return n===void 0?e:e===void 0?[n]:(e.push(n),e)}function Wo(e,n){return e!==void 0&&n(e)?e:void 0}function Uo(e){return E.assert(e.length!==0),e[0]}function Xa(e,n){return e!==void 0&&n(e)?e:E.fail(`Invalid cast. The supplied value ${e} did not pass the test '${E.getFunctionName(n)}'.`)}function Za(e,n){if(e!==void 0)for(let r=0;r<e.length;r++){let i=e[r],a=n(i,r);if(i!==a){let c=e.slice(0,r);for(c.push(a),r++;r<e.length;r++)c.push(n(e[r],r));return c}}return e}function ha(e){return e===void 0||e.length===0?void 0:e[0]}function pu(e,n,r=lg){if(e===void 0||n===void 0)return e===n;if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(!r(e[i],n[i],i))return!1;return!0}function Js(){let e=new Map;return e.add=Bce,e.remove=jce,e}function Bce(e,n){let r=this.get(e);return r!==void 0?r.push(n):this.set(e,r=[n]),r}function jce(e,n){let r=this.get(e);r!==void 0&&(Y_(r,n),r.length||this.delete(e))}function Y_(e,n){return Jce(e,r=>r===n)}function Jce(e,n){for(let r=0;r<e.length;r++)if(n(e[r]))return RK(e,r),!0;return!1}function RK(e,n){e[n]=e[e.length-1],e.pop()}function IT(e){return e===void 0?void 0:[e]}function Ta(e,n){return n?.bind(e)}function X_(e,n){for(let r=0;r<e.length;r++)if(e[r]===n)return pg(e,r),!0;return!1}function pg(e,n){for(let r=n;r<e.length-1;r++)e[r]=e[r+1];e.pop()}function OK(e,n,r,i,a,c){c??(c=Vi);let u=0,f=0,m=e.length,y=n.length,g=!1;for(;u<m&&f<y;){let S=e[u],_=n[f],b=r(S,_);b===-1?(i(S),u++,g=!0):b===1?(a(_),f++,g=!0):(c(_,S),u++,f++)}for(;u<m;)i(e[u++]),g=!0;for(;f<y;)a(n[f++]),g=!0;return g}function kv(e){let n=[];for(let r in e)$y.call(e,r)&&n.push(r);return n}function mg(e,n){return Ps(e,n)?e.slice(0,e.length-n.length):e}function U1(e,n){return Eo(e,n)?e.substr(n.length):e}function LT(e,n,r){if(e.has(n))return e.get(n);let i=r();return e.set(n,i),i}function _D(e,n){for(let r of e){let i=n(r);if(i!==void 0)return i}}function Ar(e,n){if(e!==void 0){let r=e.length,i=0;for(;i<r&&n(e[i]);)i++;if(i<r){let a=e.slice(0,i);for(i++;i<r;){let c=e[i];n(c)&&a.push(c),i++}return a}}return e}function vv(...e){return(...n)=>{let r;for(let i of e)if(r=i(...n),r)return r;return r}}function ta(e){return E.assert(e.length!==0),e[e.length-1]}function Ns(e,n){if(e!==void 0)for(let r=0;r<e.length;r++){let i=n(e[r],r);if(i!==void 0)return i}}function AT(e){return e!==void 0&&e.length===1?e[0]:void 0}function Zf(e,n){let r=0;if(e!==void 0)for(let i=0;i<e.length;i++){let a=e[i];n(a,i)&&r++}return r}function ep(){throw new Error("Not implemented")}function zc(e,n,r){if(e===void 0)return-1;for(let i=r??0;i<e.length;i++)if(n(e[i],i))return i;return-1}function K1(e,n,r,i){for(;r<i;){if(e[r]!==n[r])return!1;r++}return!0}function mu(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];i&&(Nr(i)?Ro(n,i):n.push(i))}return n}function MK(e,n,r){for(let i=r??0;i<e.length;i++)if(Gr(n,e.charCodeAt(i)))return i;return-1}function Fv(e,n){return e.length===0?e:e.slice().sort(n)}function*q1(e,n){for(let r of e)yield n(r)}function*Xy(e,n){for(let r of e){let i=n(r);i!==void 0&&(yield i)}}function*BK(e){for(let n=e.length-1;n>=0;n--)yield e[n]}function gg(e,n){return e.has(n)?!1:(e.add(n),!0)}function Wce(e,n){if(e.length===0)return Re;let r=e[0],i=[r];for(let a=1;a<e.length;a++){let c=e[a];switch(n(c,r)){case!0:case 0:continue;case-1:return E.fail("Array is unsorted.")}i.push(r=c)}return i}function wT(e,n,r){return Wce(Fv(e,n),r||n||ul)}function jK(e,n,r=lg){if(e===n)return!0;if(!e||!n)return!1;for(let i in e)if($y.call(e,i)&&(!$y.call(n,i)||!r(e[i],n[i])))return!1;for(let i in n)if($y.call(n,i)&&!$y.call(e,i))return!1;return!0}var Uce=(()=>{return n;function e(r,i,a){if(r===i)return 0;if(r===void 0)return-1;if(i===void 0)return 1;let c=a(r,i);return c<0?-1:c>0?1:0}function n(r){let i=new Intl.Collator(r,{usage:"sort",sensitivity:"variant",numeric:!0}).compare;return(a,c)=>e(a,c,i)}})(),j1,Ev;function JK(){return Ev}function WK(e){Ev!==e&&(Ev=e,j1=void 0)}function xD(e,n){return(j1||(j1=Uce(Ev)))(e,n)}function Iv(e,n){let r=0;for(let i=0;i<e.length;i++)n(e[i],i,e)&&(e[r]=e[i],r++);e.length=r}function UK(e){let n=e?.slice()||[],r=0;function i(){return r===n.length}function a(...u){n.push(...u)}function c(){if(i())throw new Error("Queue is empty");let u=n[r];if(n[r]=void 0,r++,r>100&&r>n.length>>1){let f=n.length-r;n.copyWithin(0,r),n.length=f,r=0}return u}return{enqueue:a,dequeue:c,isEmpty:i}}function KK(e,n){if(!e)return;let r=new Map;return e.forEach((i,a)=>{let c=n(a,i);if(c!==void 0){let[u,f]=c;u!==void 0&&f!==void 0&&r.set(u,f)}}),r}function qK(e){for(let n of e)return n;E.fail("iterator is empty")}function VK(e,n){let r=new Map,i=0;function*a(){for(let u of r.values())Nr(u)?yield*u:yield u}let c={has(u){let f=e(u);if(!r.has(f))return!1;let m=r.get(f);if(!Nr(m))return n(m,u);for(let y of m)if(n(y,u))return!0;return!1},add(u){let f=e(u);if(r.has(f)){let m=r.get(f);if(Nr(m))Gr(m,u,n)||(m.push(u),i++);else{let y=m;n(y,u)||(r.set(f,[y,u]),i++)}}else r.set(f,u),i++;return this},delete(u){let f=e(u);if(!r.has(f))return!1;let m=r.get(f);if(Nr(m)){for(let y=0;y<m.length;y++)if(n(m[y],u))return m.length===1?r.delete(f):m.length===2?r.set(f,m[1-y]):RK(m,y),i--,!0}else if(n(m,u))return r.delete(f),i--,!0;return!1},clear(){r.clear(),i=0},get size(){return i},forEach(u){for(let f of oo(r.values()))if(Nr(f))for(let m of f)u(m,m,c);else{let m=f;u(m,m,c)}},keys(){return a()},values(){return a()},*entries(){for(let u of a())yield[u,u]},[Symbol.iterator]:()=>a(),[Symbol.toStringTag]:r[Symbol.toStringTag]};return c}function HK(e,n){return Ps(e,n)?e.slice(0,e.length-n.length):void 0}function Lv(e,n,r=lg){return e.length===n.length&&e.every((i,a)=>r(i,n[a]))}function Av(e,n){if(e.length<=1)return e;let r=[];for(let i=0,a=e.length;i<a;i++)i&&r.push(n),r.push(e[i]);return r}function bD(e,n,r){if(e===void 0)return-1;for(let i=r??e.length-1;i>=0;i--)if(n(e[i],i))return i;return-1}function Kce(e,n,r=Ci){let i=Js();for(let a of e)i.add(n(a),r(a));return i}function zK(e,n,r=Ci){return oo(Kce(e,n).values(),r)}function V1(e,n){return io(e?.start,n?.start)||io(e?.length,n?.length)}function Z_(){return[]}function GK(e,n,r=Ci){let i=new Map;for(let a of e){let c=n(a);c!==void 0&&i.set(c,r(a))}return i}function CD(e,...n){for(let r of n)if(r!==void 0)for(let i in r)Ia(r,i)&&(e[i]=r[i]);return e}function H1(e){return Nr(e)?e:[e]}function $K(e,n){let r={};for(let i in n)$y.call(n,i)&&(r[i]=n[i]);for(let i in e)$y.call(e,i)&&(r[i]=e[i]);return r}function*QK(e){yield e}function YK(e){if(e)for(let n of e)return n}function XK(e,n){let r=new Array(e);for(let i=0;i<e;i++)r[i]=n(i);return r}function ZK(e){let n=[];return e5(e,n,void 0,0),n}function e5(e,n,r,i){for(let a of e[i]){let c;r?(c=r.slice(),c.push(a)):c=[a],i===e.length-1?n.push(c):e5(e,n,c,i+1)}}function n5(e,n,r){let i=e.slice(0);return i[n]=r,i}function t5(e,n,r){let i;for(let a=0;a<e.length;a++)n(e[a])?i=i===void 0?a:i:i!==void 0&&(r(i,a),i=void 0);i!==void 0&&r(i,e.length)}function qce(){if(Pv())try{let{performance:e}=require("perf_hooks");return{shouldWriteNativeEvents:!1,performance:e}}catch{}if(typeof performance=="object")return{shouldWriteNativeEvents:!0,performance}}function Vce(){let e=qce();if(!e)return;let{shouldWriteNativeEvents:n,performance:r}=e,i={shouldWriteNativeEvents:n,performance:void 0,performanceTime:void 0};return typeof r.timeOrigin=="number"&&typeof r.now=="function"&&(i.performanceTime=r),i.performanceTime&&typeof r.mark=="function"&&typeof r.measure=="function"&&typeof r.clearMarks=="function"&&typeof r.clearMeasures=="function"&&(i.performance=r),i}var i5=Vce(),r5=i5?.performanceTime;function o5(){return i5}var Ki=r5?()=>r5.now()??Date.now():Date.now;var wv;try{let e=process.env.TS_ETW_MODULE_PATH??"./node_modules/@microsoft/typescript-etw";wv=require(e)}catch{wv=void 0}var yg=wv?.logEvent?wv:void 0;var E;(pr=>{let e=!1,n=0;pr.currentLogLevel=2,pr.isDebugging=!1;let c;function u(tn){e&&(typeof Object.setPrototypeOf=="function"?(c||(c=Object.create(Array.prototype),m(c)),Object.setPrototypeOf(tn,c)):m(tn))}pr.attachNodeArrayDebugInfo=u;function f(tn){let ot=tn&7,Zn=ot===0?"in out":ot===3?"[bivariant]":ot===2?"in":ot===1?"out":ot===4?"[independent]":"";return tn&8?Zn+=" (unmeasurable)":tn&16&&(Zn+=" (unreliable)"),Zn}pr.formatVariance=f;function m(tn){"__lpcDebuggerDisplay"in tn||Object.defineProperties(tn,{__lpcDebuggerDisplay:{value(ot){return ot=String(ot).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]"),`NodeArray ${ot}`}}})}function y(tn){return v(tn,Ov,!0)}pr.formatNodeCheckFlags=y;function g(tn,ot){debugger;let Zn=new Error(tn?`Debug Failure. ${tn}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(Zn,ot||g),Zn}pr.fail=g;function S(tn,ot,Zn,zt){tn>=ot&&g(`Expected ${tn} < ${ot}. ${Zn||""}`,zt||S)}pr.assertLessThan=S;function _(tn,ot,Zn){tn==null&&g(ot,Zn||_)}pr.assertIsDefined=_;function b(tn,ot,Zn){return g(`${ot||"Unexpected node."}\r
42
+ Node ${be(tn.kind)} was unexpected.`,Zn||b)}pr.failBadSyntaxKind=b;function v(tn=0,ot,Zn){let zt=W(ot);if(tn===0)return zt.length>0&&zt[0][0]===0?zt[0][1]:"0";if(Zn){let Yt=[],Cr=tn;for(let[xi,Ie]of zt){if(xi>tn)break;xi!==0&&xi&tn&&(Yt.push(Ie),Cr&=~xi)}if(Cr===0)return Yt.join("|")}else for(let[Yt,Cr]of zt)if(Yt===tn)return Cr;return tn.toString()}pr.formatEnum=v;let T=new Map;function W(tn){let ot=T.get(tn);if(ot)return ot;let Zn=[];for(let Yt in tn){let Cr=tn[Yt];typeof Cr=="number"&&Zn.push([Cr,Yt])}let zt=xf(Zn,(Yt,Cr)=>io(Yt[0],Cr[0]));return T.set(tn,zt),zt}function F(tn){return v(tn,dl,!0)}pr.formatSymbolFlags=F;function M(tn){return v(tn,RT,!0)}pr.formatObjectFlags=M;function J(tn){return v(tn,Rv,!0)}pr.formatSignatureFlags=J;function A(tn){return v(tn,nm,!0)}pr.formatTypeFlags=A;function V(tn,ot,Zn){for(let zt of tn)_(zt,ot,Zn||V)}pr.assertEachIsDefined=V;function ue(tn,ot,Zn){return V(tn,ot,Zn||ue),tn}pr.checkEachDefined=ue;function ye(){if(e)return;let tn=new WeakMap,ot=new WeakMap;Object.defineProperties(pa.getSymbolConstructor().prototype,{__lpcDebuggerDisplay:{value(){let zt=this.flags&33554432?"TransientSymbol":"Symbol",Yt=this.flags&-33554433;return`${zt} '${Ws(this)}'${Yt?` (${F(Yt)})`:""}`}},__debugFlags:{get(){return F(this.flags)}}}),Object.defineProperties(pa.getTypeConstructor().prototype,{__lpcDebuggerDisplay:{value(){let zt=this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&1048576?"UnionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",Yt=this.flags&524288?this.objectFlags&-1344:0;return`${zt}${this.symbol?` '${Ws(this.symbol)}'`:""}${Yt?` (${M(Yt)})`:""}`}},__debugFlags:{get(){return A(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?M(this.objectFlags):""}},__debugTypeToString:{value(){let zt=tn.get(this);return zt===void 0&&(zt=this.checker.typeToString(this),tn.set(this,zt)),zt}}}),Object.defineProperties(pa.getSignatureConstructor().prototype,{__debugFlags:{get(){return J(this.flags)}},__debugSignatureToString:{value(){return this.checker?.signatureToString(this)}}});let Zn=[pa.getNodeConstructor(),pa.getIdentifierConstructor(),pa.getTokenConstructor(),pa.getSourceFileConstructor()];for(let zt of Zn)Ia(zt.prototype,"__debugKind")||Object.defineProperties(zt.prototype,{__lpcDebuggerDisplay:{value(){return`${Sn(this)?`Identifier '${ra(this)}'`:ji(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:yu(this)?`NumericLiteral ${this.text}`:hg(this)?`FloatLiteral ${this.text}`:_o(this)?"ParameterDeclaration":Zu(this)?"ArrayTypeNode":tx(this)?"UnionTypeNode":ix(this)?"ParenthesizedTypeNode":Tg(this)?"IndexedAccessTypeNode":hu(this)?"LiteralTypeNode":be(this.kind)}${this.flags?` (${de(this.flags)})`:""}`}},__debugKind:{get(){return be(this.kind)}},__debugNodeFlags:{get(){return de(this.flags)}},__debugModifierFlags:{get(){return Ae(a5(this))}},__debugIsParseTreeNode:{get(){return nx(this)}},__debugGetText:{value(Yt){if(Zi(this))return"";let Cr=ot.get(this);if(Cr===void 0){let xi=Io(this),Ie=xi&&$t(xi);Cr=Ie?np(Ie,xi,Yt):"",ot.set(this,Cr)}return Cr}}});e=!0}pr.enableDebugInfo=ye;function he(tn,ot,Zn,zt,Yt){if(tn!==ot){let Cr=Zn?zt?`${Zn} ${zt}`:Zn:"";g(`Expected ${tn} === ${ot}. ${Cr}`,Yt||he)}}pr.assertEqual=he;function ce(tn,ot,Zn){tn<ot&&g(`Expected ${tn} >= ${ot}`,Zn||ce)}pr.assertGreaterThanOrEqual=ce;function Ee(tn,ot,Zn){tn>ot&&g(`Expected ${tn} <= ${ot}`,Zn||Ee)}pr.assertLessThanOrEqual=Ee;function Fe(tn,ot,Zn){return _(tn,ot,Zn||Fe),tn}pr.checkDefined=Fe;function be(tn){return v(tn,fo,!1)}pr.formatSyntaxKind=be;function de(tn){return v(tn,Gc,!0)}pr.formatNodeFlags=de;function Ae(tn){return v(tn,gu,!0)}pr.formatModifierFlags=Ae;function G(tn,ot,Zn,zt){tn||(ot=ot?`False expression: ${ot}`:"False expression.",Zn&&(ot+=`\r
43
+ Verbose Debug Information: `+(typeof Zn=="string"?Zn:Zn())),g(ot,zt||G))}pr.assert=G;function Qe(tn){return v(tn,ex,!0)}pr.formatFlowFlags=Qe;let me,Se;function _n(tn){}function tt(tn){e&&typeof Object.setPrototypeOf=="function"&&(Se||(Se=Object.create(Object.prototype),Pe(Se)),Object.setPrototypeOf(tn,Se))}pr.attachMacroDebugInfo=tt;function Pe(tn){"__debugMacroText"in tn||Object.defineProperties(tn,{__lpcDebuggerDisplay:{value(){return this.getText().substring(tn.range.pos,tn.range.end)}},__debugToString:{value(){return`${this.name}: ${gn(this)}`}}})}function gn(tn){return tn.getText().substring(tn.range.pos,tn.range.end)}function $e(tn){return e&&(typeof Object.setPrototypeOf=="function"?(me||(me=Object.create(Object.prototype),void 0),Object.setPrototypeOf(tn,me)):void 0),tn}pr.attachFlowNodeDebugInfo=$e;function Ln(tn){let ot=-1;function Zn(ie){return ie.id||(ie.id=ot,ot--),ie.id}let zt;(St=>(St.lr="\u2500",St.ud="\u2502",St.dr="\u256D",St.dl="\u256E",St.ul="\u256F",St.ur="\u2570",St.udr="\u251C",St.udl="\u2524",St.dlr="\u252C",St.ulr="\u2534",St.udlr="\u256B"))(zt||(zt={}));let Yt;(yt=>(yt[yt.None=0]="None",yt[yt.Up=1]="Up",yt[yt.Down=2]="Down",yt[yt.Left=4]="Left",yt[yt.Right=8]="Right",yt[yt.UpDown=3]="UpDown",yt[yt.LeftRight=12]="LeftRight",yt[yt.UpLeft=5]="UpLeft",yt[yt.UpRight=9]="UpRight",yt[yt.DownLeft=6]="DownLeft",yt[yt.DownRight=10]="DownRight",yt[yt.UpDownLeft=7]="UpDownLeft",yt[yt.UpDownRight=11]="UpDownRight",yt[yt.UpLeftRight=13]="UpLeftRight",yt[yt.DownLeftRight=14]="DownLeftRight",yt[yt.UpDownLeftRight=15]="UpDownLeftRight",yt[yt.NoChildren=16]="NoChildren"))(Yt||(Yt={}));let Cr=2032,xi=882,Ie=Object.create(null),Oe=[],Je=[],Z=On(tn,new Set);for(let ie of Oe)ie.text=mo(ie.flowNode,ie.circular),Dr(ie);let fe=Gt(Z),Ce=Rr(fe);return zi(Z,0),Ve();function ne(ie){return!!(ie.flags&128)}function sn(ie){return!!(ie.flags&12)&&!!ie.antecedent}function H(ie){return!!(ie.flags&Cr)}function ge(ie){return!!(ie.flags&xi)}function qn(ie){let Te=[];for(let te of ie.edges)te.source===ie&&Te.push(te.target);return Te}function kn(ie){let Te=[];for(let te of ie.edges)te.target===ie&&Te.push(te.source);return Te}function On(ie,Te){let te=Zn(ie),q=Ie[te];if(q&&Te.has(ie))return q.circular=!0,q={id:-1,flowNode:ie,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Oe.push(q),q;if(Te.add(ie),!q)if(Ie[te]=q={id:te,flowNode:ie,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Oe.push(q),sn(ie))for(let qe of ie.antecedent)nn(q,qe,Te);else H(ie)&&nn(q,ie.antecedent,Te);return Te.delete(ie),q}function nn(ie,Te,te){let q=On(Te,te),qe={source:ie,target:q};Je.push(qe),ie.edges.push(qe),q.edges.push(qe)}function Dr(ie){if(ie.level!==-1)return ie.level;let Te=0;for(let te of kn(ie))Te=Math.max(Te,Dr(te)+1);return ie.level=Te}function Gt(ie){let Te=0;for(let te of qn(ie))Te=Math.max(Te,Gt(te));return Te+1}function Rr(ie){let Te=Le(Array(ie),0);for(let te of Oe)Te[te.level]=Math.max(Te[te.level],te.text.length);return Te}function zi(ie,Te){if(ie.lane===-1){ie.lane=Te,ie.endLane=Te;let te=qn(ie);for(let q=0;q<te.length;q++){q>0&&Te++;let qe=te[q];zi(qe,Te),qe.endLane>ie.endLane&&(Te=qe.endLane)}ie.endLane=Te}}function zo(ie){if(ie&2)return"Start";if(ie&4)return"Branch";if(ie&8)return"Loop";if(ie&16)return"Assignment";if(ie&32)return"True";if(ie&64)return"False";if(ie&128)return"SwitchClause";if(ie&256)return"ArrayMutation";if(ie&512)return"Call";if(ie&1024)return"ReduceLabel";if(ie&1)return"Unreachable";throw new Error}function sa(ie){let Te=$t(ie);return np(Te,ie,!1)}function mo(ie,Te){let te=zo(ie.flags);if(Te&&(te=`${te}#${Zn(ie)}`),ne(ie)){let q=[],{switchStatement:qe,clauseStart:dn,clauseEnd:Jn}=ie.node;for(let ke=dn;ke<Jn;ke++){let We=qe.caseBlock.clauses[ke];rx(We)?q.push("default"):q.push(sa(We.expression))}te+=` (${q.join(", ")})`}else ge(ie)&&ie.node&&(te+=` (${sa(ie.node)})`);return Te==="circularity"?`Circular(${te})`:te}function Ve(){let ie=Ce.length,Te=AK(Oe,0,Jn=>Jn.lane)+1,te=Le(Array(Te),""),q=Ce.map(()=>Array(Te)),qe=Ce.map(()=>Le(Array(Te),0));for(let Jn of Oe){q[Jn.level][Jn.lane]=Jn;let ke=qn(Jn);for(let ln=0;ln<ke.length;ln++){let zn=ke[ln],St=8;zn.lane===Jn.lane&&(St|=4),ln>0&&(St|=1),ln<ke.length-1&&(St|=2),qe[Jn.level][zn.lane]|=St}ke.length===0&&(qe[Jn.level][Jn.lane]|=16);let We=kn(Jn);for(let ln=0;ln<We.length;ln++){let zn=We[ln],St=4;ln>0&&(St|=1),ln<We.length-1&&(St|=2),qe[Jn.level-1][zn.lane]|=St}}for(let Jn=0;Jn<ie;Jn++)for(let ke=0;ke<Te;ke++){let We=Jn>0?qe[Jn-1][ke]:0,ln=ke>0?qe[Jn][ke-1]:0,zn=qe[Jn][ke];zn||(We&8&&(zn|=12),ln&2&&(zn|=3),qe[Jn][ke]=zn)}for(let Jn=0;Jn<ie;Jn++)for(let ke=0;ke<te.length;ke++){let We=qe[Jn][ke],ln=We&4?"\u2500":" ",zn=q[Jn][ke];zn?(dn(ke,zn.text),Jn<ie-1&&(dn(ke," "),dn(ke,Q(ln,Ce[Jn]-zn.text.length)))):Jn<ie-1&&dn(ke,Q(ln,Ce[Jn]+1)),dn(ke,et(We)),dn(ke,We&8&&Jn<ie-1&&!q[Jn+1][ke]?"\u2500":" ")}return`
44
+ ${te.join(`
45
+ `)}
46
+ `;function dn(Jn,ke){te[Jn]+=ke}}function et(ie){switch(ie){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function Le(ie,Te){if(ie.fill)ie.fill(Te);else for(let te=0;te<ie.length;te++)ie[te]=Te;return ie}function Q(ie,Te){if(ie.repeat)return Te>0?ie.repeat(Te):"";let te="";for(;te.length<Te;)te+=ie;return te}}pr.formatControlFlowGraph=Ln;function Vt(tn){}pr.type=Vt;class Hn{__debugToString(){switch(this.kind){case 3:return this.debugInfo?.()||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return J1(this.sources,this.targets||Yn(this.sources,()=>"any"),(ot,Zn)=>`${ot.__debugTypeToString()} -> ${typeof Zn=="string"?Zn:Zn.__debugTypeToString()}`).join(", ");case 2:return J1(this.sources,this.targets,(ot,Zn)=>`${ot.__debugTypeToString()} -> ${Zn().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(`
47
+ `).join(`
48
+ `)}
49
+ m2: ${this.mapper2.__debugToString().split(`
50
+ `).join(`
51
+ `)}`;default:return Ye(this)}}}pr.DebugTypeMapper=Hn;function Ye(tn,ot="Illegal value:",Zn){let zt=typeof tn=="object"&&Ia(tn,"kind")&&Ia(tn,"pos")?"SyntaxKind: "+be(tn.kind):JSON.stringify(tn);return g(`${ot} ${zt}`,Zn||Ye)}pr.assertNever=Ye;function se(tn){return pr.isDebugging?Object.setPrototypeOf(tn,Hn.prototype):tn}pr.attachDebugPrototypeIfDebug=se;let jn={};function wn(tn,ot){return Xn(tn)?!0:(jn[ot]={level:tn,assertion:pr[ot]},pr[ot]=Vi,!1)}function Xn(tn){return n>=tn}pr.shouldAssert=Xn;function ft(tn){if(typeof tn!="function")return"";if(Ia(tn,"name"))return tn.name;{let ot=Function.prototype.toString.call(tn),Zn=/^function\s+([\w$]+)\s*\(/.exec(ot);return Zn?Zn[1]:""}}pr.getFunctionName=ft;function Ft(tn,ot,Zn,zt){wn(1,"assertNode")&&G(tn!==void 0&&(ot===void 0||ot(tn)),Zn||"Unexpected node.",()=>`Node ${be(tn?.kind)} did not pass test '${ft(ot)}'.`,zt||Ft)}pr.assertNode=Ft;function Et(tn){let ot=n;if(n=tn,tn>ot)for(let Zn of kv(jn)){let zt=jn[Zn];zt!==void 0&&pr[Zn]!==zt.assertion&&tn>=zt.level&&(pr[Zn]=zt,jn[Zn]=void 0)}}pr.setAssertionLevel=Et;function At(tn){return`{ name: ${tn.name}; flags: ${F(tn.flags)}; declarations: ${Yn(tn.declarations,ot=>be(ot.kind))} }`}pr.formatSymbol=At;function xn(tn,ot,Zn,zt){wn(1,"assertEachNode")&&G(ot===void 0||yi(tn,ot),Zn||"Unexpected node.",()=>`Node array did not pass test '${ft(ot)}'.`,zt||xn)}pr.assertEachNode=xn;function It(tn,ot,Zn,zt){wn(1,"assertOptionalNode")&&G(ot===void 0||tn===void 0||ot(tn),Zn||"Unexpected node.",()=>`Node ${be(tn?.kind)} did not pass test '${ft(ot)}'.`,zt||It)}pr.assertOptionalNode=It})(E||(E={}));var po={};cl(po,{clearMarks:()=>ele,clearMeasures:()=>Zce,createTimer:()=>G1,createTimerIf:()=>Gce,disable:()=>rle,enable:()=>tle,forEachMark:()=>Xce,forEachMeasure:()=>Yce,getCount:()=>$ce,getDuration:()=>Qce,isEnabled:()=>nle,mark:()=>ax,measure:()=>Mv,nullTimer:()=>$1});var DD,sx;function Gce(e,n,r,i){return e?G1(n,r,i):$1}function G1(e,n,r){let i=0;return{enter:a,exit:c};function a(){++i===1&&ax(n)}function c(){--i===0?(ax(r),Mv(e,n,r)):i<0&&E.fail("enter/exit count does not match.")}}var $1={enter:Vi,exit:Vi},OT=!1,c5=Ki(),MT=new Map,ox=new Map,BT=new Map;function ax(e){if(OT){let n=ox.get(e)??0;ox.set(e,n+1),MT.set(e,Ki()),sx?.mark(e),typeof onProfilerEvent=="function"&&onProfilerEvent(e)}}function Mv(e,n,r){if(OT){let i=(r!==void 0?MT.get(r):void 0)??Ki(),a=(n!==void 0?MT.get(n):void 0)??c5,c=BT.get(e)||0;BT.set(e,c+(i-a)),sx?.measure(e,n,r)}}function $ce(e){return ox.get(e)||0}function Qce(e){return BT.get(e)||0}function Yce(e){BT.forEach((n,r)=>e(r,n))}function Xce(e){MT.forEach((n,r)=>e(r))}function Zce(e){e!==void 0?BT.delete(e):BT.clear(),sx?.clearMeasures(e)}function ele(e){e!==void 0?(ox.delete(e),MT.delete(e)):(ox.clear(),MT.clear()),sx?.clearMarks(e)}function nle(){return OT}function tle(e=ho){return OT||(OT=!0,DD||(DD=o5()),DD?.performance&&(c5=DD.performance.timeOrigin,(DD.shouldWriteNativeEvents||e?.cpuProfilingEnabled?.()||e?.debugMode)&&(sx=DD.performance))),!0}function rle(){OT&&(MT.clear(),ox.clear(),BT.clear(),sx=void 0,OT=!1)}var In,Bv;(J=>{let e,n,r=0,i=0,a=[],c,u=[],f;(Fe=>(Fe.Parse="parse",Fe.Program="program",Fe.Bind="bind",Fe.Check="check",Fe.CheckTypes="checkTypes",Fe.Emit="emit",Fe.Session="session"))(f=J.Phase||(J.Phase={}));let m=[];function y(A,V,ue,ye=!1){}J.push=y;function g(A){E.assert(m.length>0),b(m.length-1,1e3*Ki(),A),m.length--}J.pop=g;function S(){let A=1e3*Ki();for(let V=m.length-1;V>=0;V--)b(V,A);m.length=0}J.popAll=S;let _=1e3*10;function b(A,V,ue){let{phase:ye,name:he,args:ce,time:Ee,separateBeginAndEnd:Fe}=m[A];Fe?(E.assert(!ue,"`results` are not supported for events with `separateBeginAndEnd`"),v("E",ye,he,ce,void 0,V)):_-Ee%_<=V-Ee&&v("X",ye,he,{...ce,results:ue},`"dur":${V-Ee}`,Ee)}function v(A,V,ue,ye,he,ce=1e3*Ki()){e==="server"&&V==="checkTypes"||(ax("beginTracing"),n.writeSync(i,`,
52
+ {"pid":1,"tid":1,"ph":"${A}","cat":"${V}","ts":${ce},"name":"${ue}"`),he&&n.writeSync(i,`,${he}`),ye&&n.writeSync(i,`,"args":${JSON.stringify(ye)}`),n.writeSync(i,"}"),ax("endTracing"),Mv("Tracing","beginTracing","endTracing"))}function T(A,V,ue){if(E.assert(!In,"Tracing already started"),n===void 0)try{n=require("fs")}catch(Fe){throw new Error(`tracing requires having fs
53
+ (original error: ${Fe.message||Fe})`)}e=A,a.length=0,c===void 0&&(c=fi(V,"legend.json")),n.existsSync(V)||n.mkdirSync(V,{recursive:!0});let ye=e==="build"?`.${process.pid}-${++r}`:e==="server"?`.${process.pid}`:"",he=fi(V,`trace${ye}.json`),ce=fi(V,`types${ye}.json`);u.push({configFilePath:ue,tracePath:he,typesPath:ce}),i=n.openSync(he,"w"),In=J;let Ee={cat:"__metadata",ph:"M",ts:1e3*Ki(),pid:1,tid:1};n.writeSync(i,`[
54
+ `+[{name:"process_name",args:{name:"tsc"},...Ee},{name:"thread_name",args:{name:"Main"},...Ee},{name:"TracingStartedInBrowser",...Ee,cat:"disabled-by-default-devtools.timeline"}].map(Fe=>JSON.stringify(Fe)).join(`,
55
+ `))}J.startTracing=T;function W(){c&&n.writeFileSync(c,JSON.stringify(u))}J.dumpLegend=W;function F(A){e!=="server"&&a.push(A)}J.recordType=F;function M(A,V,ue){v("I",A,V,ue,'"s":"g"')}J.instant=M})(Bv||(Bv={}));var wbe=Bv.startTracing,Rbe=Bv.dumpLegend;var jv=(g=>(g[g.RootFile=0]="RootFile",g[g.MasterFile=1]="MasterFile",g[g.SourceFromProjectReference=2]="SourceFromProjectReference",g[g.OutputFromProjectReference=3]="OutputFromProjectReference",g[g.Import=4]="Import",g[g.ReferenceFile=5]="ReferenceFile",g[g.TypeReferenceDirective=6]="TypeReferenceDirective",g[g.LibFile=7]="LibFile",g[g.LibReferenceDirective=8]="LibReferenceDirective",g[g.AutomaticTypeDirectiveFile=9]="AutomaticTypeDirectiveFile",g))(jv||{});var fo=(C=>(C[C.Unknown=0]="Unknown",C[C.EndOfFileToken=1]="EndOfFileToken",C[C.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",C[C.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",C[C.NewLineTrivia=4]="NewLineTrivia",C[C.WhitespaceTrivia=5]="WhitespaceTrivia",C[C.ConflictMarkerTrivia=6]="ConflictMarkerTrivia",C[C.MacroIdentifierTrivia=7]="MacroIdentifierTrivia",C[C.ShebangTrivia=8]="ShebangTrivia",C[C.NonTextFileMarkerTrivia=9]="NonTextFileMarkerTrivia",C[C.NumericLiteral=10]="NumericLiteral",C[C.IntLiteral=11]="IntLiteral",C[C.CharLiteral=12]="CharLiteral",C[C.FloatLiteral=13]="FloatLiteral",C[C.BytesLiteral=14]="BytesLiteral",C[C.StringArrayLiteral=15]="StringArrayLiteral",C[C.StringLiteral=16]="StringLiteral",C[C.OpenBraceToken=17]="OpenBraceToken",C[C.BacktickToken=18]="BacktickToken",C[C.CloseBraceToken=19]="CloseBraceToken",C[C.OpenParenToken=20]="OpenParenToken",C[C.CloseParenToken=21]="CloseParenToken",C[C.OpenBracketToken=22]="OpenBracketToken",C[C.CloseBracketToken=23]="CloseBracketToken",C[C.DotToken=24]="DotToken",C[C.DotDotDotToken=25]="DotDotDotToken",C[C.SemicolonToken=26]="SemicolonToken",C[C.CommaToken=27]="CommaToken",C[C.QuestionDotToken=28]="QuestionDotToken",C[C.LessThanToken=29]="LessThanToken",C[C.LessThanSlashToken=30]="LessThanSlashToken",C[C.LessThanDotDotToken=31]="LessThanDotDotToken",C[C.GreaterThanToken=32]="GreaterThanToken",C[C.LessThanEqualsToken=33]="LessThanEqualsToken",C[C.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",C[C.EqualsEqualsToken=35]="EqualsEqualsToken",C[C.ExclamationEqualsToken=36]="ExclamationEqualsToken",C[C.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",C[C.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",C[C.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",C[C.MinusGreaterThanToken=40]="MinusGreaterThanToken",C[C.PlusToken=41]="PlusToken",C[C.MinusToken=42]="MinusToken",C[C.AsteriskToken=43]="AsteriskToken",C[C.AsteriskAsteriskToken=44]="AsteriskAsteriskToken",C[C.SlashToken=45]="SlashToken",C[C.PercentToken=46]="PercentToken",C[C.PlusPlusToken=47]="PlusPlusToken",C[C.MinusMinusToken=48]="MinusMinusToken",C[C.LessThanLessThanToken=49]="LessThanLessThanToken",C[C.GreaterThanGreaterThanToken=50]="GreaterThanGreaterThanToken",C[C.GreaterThanGreaterThanGreaterThanToken=51]="GreaterThanGreaterThanGreaterThanToken",C[C.AmpersandToken=52]="AmpersandToken",C[C.BarToken=53]="BarToken",C[C.CaretToken=54]="CaretToken",C[C.ExclamationToken=55]="ExclamationToken",C[C.DoubleExclamationToken=56]="DoubleExclamationToken",C[C.TildeToken=57]="TildeToken",C[C.AmpersandAmpersandToken=58]="AmpersandAmpersandToken",C[C.BarBarToken=59]="BarBarToken",C[C.QuestionToken=60]="QuestionToken",C[C.ColonToken=61]="ColonToken",C[C.AtToken=62]="AtToken",C[C.AtAtToken=63]="AtAtToken",C[C.QuestionQuestionToken=64]="QuestionQuestionToken",C[C.HashToken=65]="HashToken",C[C.OpenParenColonToken=66]="OpenParenColonToken",C[C.ColonCloseParenToken=67]="ColonCloseParenToken",C[C.OpenParenBracketToken=68]="OpenParenBracketToken",C[C.OpenParenBraceToken=69]="OpenParenBraceToken",C[C.OpenParenAsteriskToken=70]="OpenParenAsteriskToken",C[C.ColonColonToken=71]="ColonColonToken",C[C.LambdaToken=72]="LambdaToken",C[C.DotDotToken=73]="DotDotToken",C[C.EqualsToken=74]="EqualsToken",C[C.PlusEqualsToken=75]="PlusEqualsToken",C[C.MinusEqualsToken=76]="MinusEqualsToken",C[C.AsteriskEqualsToken=77]="AsteriskEqualsToken",C[C.AsteriskAsteriskEqualsToken=78]="AsteriskAsteriskEqualsToken",C[C.SlashEqualsToken=79]="SlashEqualsToken",C[C.PercentEqualsToken=80]="PercentEqualsToken",C[C.LessThanLessThanEqualsToken=81]="LessThanLessThanEqualsToken",C[C.GreaterThanGreaterThanEqualsToken=82]="GreaterThanGreaterThanEqualsToken",C[C.GreaterThanGreaterThanGreaterThanEqualsToken=83]="GreaterThanGreaterThanGreaterThanEqualsToken",C[C.AmpersandEqualsToken=84]="AmpersandEqualsToken",C[C.BarEqualsToken=85]="BarEqualsToken",C[C.BarBarEqualsToken=86]="BarBarEqualsToken",C[C.QuestionQuestionEqualsToken=87]="QuestionQuestionEqualsToken",C[C.CaretEqualsToken=88]="CaretEqualsToken",C[C.Identifier=89]="Identifier",C[C.StringizedIdentifier=90]="StringizedIdentifier",C[C.JSDocCommentTextToken=91]="JSDocCommentTextToken",C[C.IntKeyword=92]="IntKeyword",C[C.FloatKeyword=93]="FloatKeyword",C[C.StringKeyword=94]="StringKeyword",C[C.LwObjectKeyword=95]="LwObjectKeyword",C[C.UndefinedKeyword=96]="UndefinedKeyword",C[C.AnyKeyword=97]="AnyKeyword",C[C.ClosureKeyword=98]="ClosureKeyword",C[C.StructKeyword=99]="StructKeyword",C[C.CatchKeyword=100]="CatchKeyword",C[C.MixedKeyword=101]="MixedKeyword",C[C.UnknownKeyword=102]="UnknownKeyword",C[C.InKeyword=103]="InKeyword",C[C.MappingKeyword=104]="MappingKeyword",C[C.VoidKeyword=105]="VoidKeyword",C[C.BreakKeyword=106]="BreakKeyword",C[C.BytesKeyword=107]="BytesKeyword",C[C.BufferKeyword=108]="BufferKeyword",C[C.DoKeyword=109]="DoKeyword",C[C.ElseKeyword=110]="ElseKeyword",C[C.ForKeyword=111]="ForKeyword",C[C.ForEachKeyword=112]="ForEachKeyword",C[C.CaseKeyword=113]="CaseKeyword",C[C.DefaultKeyword=114]="DefaultKeyword",C[C.IfKeyword=115]="IfKeyword",C[C.ReturnKeyword=116]="ReturnKeyword",C[C.SwitchKeyword=117]="SwitchKeyword",C[C.WhileKeyword=118]="WhileKeyword",C[C.AsyncKeyword=119]="AsyncKeyword",C[C.InheritKeyword=120]="InheritKeyword",C[C.ContinueKeyword=121]="ContinueKeyword",C[C.PrivateKeyword=122]="PrivateKeyword",C[C.ProtectedKeyword=123]="ProtectedKeyword",C[C.PublicKeyword=124]="PublicKeyword",C[C.StaticKeyword=125]="StaticKeyword",C[C.VisibleKeyword=126]="VisibleKeyword",C[C.NoSaveKeyword=127]="NoSaveKeyword",C[C.NoShadowKeyword=128]="NoShadowKeyword",C[C.IntrinsicKeyword=129]="IntrinsicKeyword",C[C.NoMaskKeyword=130]="NoMaskKeyword",C[C.VarArgsKeyword=131]="VarArgsKeyword",C[C.DeprecatedKeyword=132]="DeprecatedKeyword",C[C.ClassKeyword=133]="ClassKeyword",C[C.StatusKeyword=134]="StatusKeyword",C[C.FalseKeyword=135]="FalseKeyword",C[C.TrueKeyword=136]="TrueKeyword",C[C.NullKeyword=137]="NullKeyword",C[C.FunctionKeyword=138]="FunctionKeyword",C[C.SymbolKeyword=139]="SymbolKeyword",C[C.ObjectKeyword=140]="ObjectKeyword",C[C.RefKeyword=141]="RefKeyword",C[C.IsKeyword=142]="IsKeyword",C[C.FunctionsKeyword=143]="FunctionsKeyword",C[C.VirtualKeyword=144]="VirtualKeyword",C[C.NewKeyword=145]="NewKeyword",C[C.QualifiedName=146]="QualifiedName",C[C.ComputedPropertyName=147]="ComputedPropertyName",C[C.TypeParameter=148]="TypeParameter",C[C.Parameter=149]="Parameter",C[C.IndexSignature=150]="IndexSignature",C[C.CallSignature=151]="CallSignature",C[C.PropertyDeclaration=152]="PropertyDeclaration",C[C.PropertySignature=153]="PropertySignature",C[C.MethodDeclaration=154]="MethodDeclaration",C[C.InterfaceDeclaration=155]="InterfaceDeclaration",C[C.MethodSignature=156]="MethodSignature",C[C.UnionType=157]="UnionType",C[C.FunctionType=158]="FunctionType",C[C.IntersectionType=159]="IntersectionType",C[C.RestType=160]="RestType",C[C.ArrayType=161]="ArrayType",C[C.TupleType=162]="TupleType",C[C.TypeLiteral=163]="TypeLiteral",C[C.TypeQuery=164]="TypeQuery",C[C.ParenthesizedType=165]="ParenthesizedType",C[C.TypeReference=166]="TypeReference",C[C.TypePredicate=167]="TypePredicate",C[C.ConditionalType=168]="ConditionalType",C[C.FunctionDeclaration=169]="FunctionDeclaration",C[C.ClassDeclaration=170]="ClassDeclaration",C[C.ExportSpecifier=171]="ExportSpecifier",C[C.ExportDeclaration=172]="ExportDeclaration",C[C.MissingDeclaration=173]="MissingDeclaration",C[C.PropertyAssignment=174]="PropertyAssignment",C[C.ShorthandPropertyAssignment=175]="ShorthandPropertyAssignment",C[C.SourceFile=176]="SourceFile",C[C.Bundle=177]="Bundle",C[C.IncludeDirective=178]="IncludeDirective",C[C.DefineDirective=179]="DefineDirective",C[C.UndefDirective=180]="UndefDirective",C[C.IfDirective=181]="IfDirective",C[C.IfDefDirective=182]="IfDefDirective",C[C.IfNDefDirective=183]="IfNDefDirective",C[C.ElseDirective=184]="ElseDirective",C[C.ElseIfDirective=185]="ElseIfDirective",C[C.EndIfDirective=186]="EndIfDirective",C[C.PragmaDirective=187]="PragmaDirective",C[C.JSDocTypeExpression=188]="JSDocTypeExpression",C[C.JSDocNameReference=189]="JSDocNameReference",C[C.JSDocMemberName=190]="JSDocMemberName",C[C.JSDocAllType=191]="JSDocAllType",C[C.JSDocUnknownType=192]="JSDocUnknownType",C[C.JSDocNullableType=193]="JSDocNullableType",C[C.JSDocNonNullableType=194]="JSDocNonNullableType",C[C.JSDocOptionalType=195]="JSDocOptionalType",C[C.JSDocFunctionType=196]="JSDocFunctionType",C[C.JSDocVariadicType=197]="JSDocVariadicType",C[C.JSDocNamepathType=198]="JSDocNamepathType",C[C.JSDoc=199]="JSDoc",C[C.JSDocComment=199]="JSDocComment",C[C.JSDocText=200]="JSDocText",C[C.JSDocTypeLiteral=201]="JSDocTypeLiteral",C[C.JSDocSignature=202]="JSDocSignature",C[C.JSDocLink=203]="JSDocLink",C[C.JSDocLinkCode=204]="JSDocLinkCode",C[C.JSDocLinkPlain=205]="JSDocLinkPlain",C[C.JSDocTag=206]="JSDocTag",C[C.JSDocAugmentsTag=207]="JSDocAugmentsTag",C[C.JSDocImplementsTag=208]="JSDocImplementsTag",C[C.JSDocAuthorTag=209]="JSDocAuthorTag",C[C.JSDocDeprecatedTag=210]="JSDocDeprecatedTag",C[C.JSDocClassTag=211]="JSDocClassTag",C[C.JSDocPublicTag=212]="JSDocPublicTag",C[C.JSDocPrivateTag=213]="JSDocPrivateTag",C[C.JSDocProtectedTag=214]="JSDocProtectedTag",C[C.JSDocReadonlyTag=215]="JSDocReadonlyTag",C[C.JSDocOverrideTag=216]="JSDocOverrideTag",C[C.JSDocCallbackTag=217]="JSDocCallbackTag",C[C.JSDocOverloadTag=218]="JSDocOverloadTag",C[C.JSDocEnumTag=219]="JSDocEnumTag",C[C.JSDocParameterTag=220]="JSDocParameterTag",C[C.JSDocReturnTag=221]="JSDocReturnTag",C[C.JSDocThisTag=222]="JSDocThisTag",C[C.JSDocTypeTag=223]="JSDocTypeTag",C[C.JSDocTemplateTag=224]="JSDocTemplateTag",C[C.JSDocTypedefTag=225]="JSDocTypedefTag",C[C.JSDocSeeTag=226]="JSDocSeeTag",C[C.JSDocPropertyTag=227]="JSDocPropertyTag",C[C.JSDocVariableTag=228]="JSDocVariableTag",C[C.JSDocThrowsTag=229]="JSDocThrowsTag",C[C.JSDocSatisfiesTag=230]="JSDocSatisfiesTag",C[C.JSDocImportTag=231]="JSDocImportTag",C[C.SyntaxList=232]="SyntaxList",C[C.NotEmittedStatement=233]="NotEmittedStatement",C[C.PartiallyEmittedExpression=234]="PartiallyEmittedExpression",C[C.CommaListExpression=235]="CommaListExpression",C[C.Block=236]="Block",C[C.VariableDeclaration=237]="VariableDeclaration",C[C.VariableDeclarationList=238]="VariableDeclarationList",C[C.TypeAliasDeclaration=239]="TypeAliasDeclaration",C[C.CaseBlock=240]="CaseBlock",C[C.StructDeclaration=241]="StructDeclaration",C[C.VariableStatement=242]="VariableStatement",C[C.ForStatement=243]="ForStatement",C[C.ForEachStatement=244]="ForEachStatement",C[C.DoWhileStatement=245]="DoWhileStatement",C[C.WhileStatement=246]="WhileStatement",C[C.ExpressionStatement=247]="ExpressionStatement",C[C.ReturnStatement=248]="ReturnStatement",C[C.LabeledStatement=249]="LabeledStatement",C[C.BreakStatement=250]="BreakStatement",C[C.ContinueStatement=251]="ContinueStatement",C[C.InheritDeclaration=252]="InheritDeclaration",C[C.IfStatement=253]="IfStatement",C[C.EmptyStatement=254]="EmptyStatement",C[C.CatchStatement=255]="CatchStatement",C[C.SwitchStatement=256]="SwitchStatement",C[C.LiteralType=257]="LiteralType",C[C.StructType=258]="StructType",C[C.InferType=259]="InferType",C[C.ThisType=260]="ThisType",C[C.IndexedAccessType=261]="IndexedAccessType",C[C.NamedTupleMember=262]="NamedTupleMember",C[C.TypeOperator=263]="TypeOperator",C[C.MappedType=264]="MappedType",C[C.ArrayBindingPattern=265]="ArrayBindingPattern",C[C.BindingElement=266]="BindingElement",C[C.ConditionalExpression=267]="ConditionalExpression",C[C.CatchExpression=268]="CatchExpression",C[C.BinaryExpression=269]="BinaryExpression",C[C.FunctionExpression=270]="FunctionExpression",C[C.ArrowFunction=271]="ArrowFunction",C[C.CallExpression=272]="CallExpression",C[C.CloneObjectExpression=273]="CloneObjectExpression",C[C.ClassExpression=274]="ClassExpression",C[C.SyntheticExpression=275]="SyntheticExpression",C[C.NewExpression=276]="NewExpression",C[C.NewStructExpression=277]="NewStructExpression",C[C.EvaluateExpression=278]="EvaluateExpression",C[C.TypeAssertionExpression=279]="TypeAssertionExpression",C[C.ExpressionWithTypeArguments=280]="ExpressionWithTypeArguments",C[C.ElementAccessExpression=281]="ElementAccessExpression",C[C.RangeExpression=282]="RangeExpression",C[C.InlineClosureExpression=283]="InlineClosureExpression",C[C.LambdaIdentifierExpression=284]="LambdaIdentifierExpression",C[C.LambdaOperatorExpression=285]="LambdaOperatorExpression",C[C.PropertyAccessExpression=286]="PropertyAccessExpression",C[C.SuperAccessExpression=287]="SuperAccessExpression",C[C.PostfixUnaryExpression=288]="PostfixUnaryExpression",C[C.ParenthesizedExpression=289]="ParenthesizedExpression",C[C.ArrayLiteralExpression=290]="ArrayLiteralExpression",C[C.MappingLiteralExpression=291]="MappingLiteralExpression",C[C.MappingEntryExpression=292]="MappingEntryExpression",C[C.ObjectLiteralExpression=293]="ObjectLiteralExpression",C[C.SpreadElement=294]="SpreadElement",C[C.ByRefElement=295]="ByRefElement",C[C.CastExpression=296]="CastExpression",C[C.OmittedExpression=297]="OmittedExpression",C[C.PrefixUnaryExpression=298]="PrefixUnaryExpression",C[C.CaseClause=299]="CaseClause",C[C.HeritageClause=300]="HeritageClause",C[C.DefaultClause=301]="DefaultClause",C[C.Count=302]="Count",C[C.FirstReservedWord=92]="FirstReservedWord",C[C.LastReservedWord=132]="LastReservedWord",C[C.FirstKeyword=92]="FirstKeyword",C[C.LastKeyword=145]="LastKeyword",C[C.FirstToken=0]="FirstToken",C[C.LastToken=145]="LastToken",C[C.FirstStatement=242]="FirstStatement",C[C.LastStatement=256]="LastStatement",C[C.FirstAssignment=74]="FirstAssignment",C[C.LastAssignment=88]="LastAssignment",C[C.SuperKeyword=71]="SuperKeyword",C[C.FirstTypeNode=157]="FirstTypeNode",C[C.LastTypeNode=168]="LastTypeNode",C[C.FirstNode=146]="FirstNode",C[C.FirstFutureReservedWord=92]="FirstFutureReservedWord",C[C.LastFutureReservedWord=145]="LastFutureReservedWord",C[C.FirstJSDocNode=188]="FirstJSDocNode",C[C.LastJSDocNode=231]="LastJSDocNode",C[C.FirstLiteralToken=11]="FirstLiteralToken",C[C.LastLiteralToken=16]="LastLiteralToken",C[C.FirstJSDocTagNode=188]="FirstJSDocTagNode",C[C.LastJSDocTagNode=231]="LastJSDocTagNode",C[C.FirstTriviaToken=2]="FirstTriviaToken",C[C.LastTriviaToken=8]="LastTriviaToken",C[C.FirstBinaryOperator=29]="FirstBinaryOperator",C[C.LastBinaryOperator=88]="LastBinaryOperator",C[C.FirstPunctuation=17]="FirstPunctuation",C[C.LastPunctuation=73]="LastPunctuation",C[C.FirstContextualKeyword=92]="FirstContextualKeyword",C[C.LastContextualKeyword=121]="LastContextualKeyword",C))(fo||{}),nm=(ge=>(ge[ge.Any=1]="Any",ge[ge.Unknown=2]="Unknown",ge[ge.String=4]="String",ge[ge.Number=8]="Number",ge[ge.Boolean=16]="Boolean",ge[ge.Enum=32]="Enum",ge[ge.Float=64]="Float",ge[ge.StringLiteral=128]="StringLiteral",ge[ge.IntLiteral=256]="IntLiteral",ge[ge.BooleanLiteral=512]="BooleanLiteral",ge[ge.EnumLiteral=1024]="EnumLiteral",ge[ge.FloatLiteral=2048]="FloatLiteral",ge[ge.Bytes=4096]="Bytes",ge[ge.BytesLiteral=8192]="BytesLiteral",ge[ge.Void=16384]="Void",ge[ge.Undefined=32768]="Undefined",ge[ge.Null=65536]="Null",ge[ge.Never=131072]="Never",ge[ge.TypeParameter=262144]="TypeParameter",ge[ge.Object=524288]="Object",ge[ge.Union=1048576]="Union",ge[ge.Intersection=2097152]="Intersection",ge[ge.Index=4194304]="Index",ge[ge.IndexedAccess=8388608]="IndexedAccess",ge[ge.Conditional=16777216]="Conditional",ge[ge.Substitution=33554432]="Substitution",ge[ge.NonPrimitive=67108864]="NonPrimitive",ge[ge.TemplateLiteral=134217728]="TemplateLiteral",ge[ge.StringMapping=268435456]="StringMapping",ge[ge.Reserved1=536870912]="Reserved1",ge[ge.Reserved2=1073741824]="Reserved2",ge[ge.LpcDocVariable=-2147483648]="LpcDocVariable",ge[ge.AnyOrUnknown=3]="AnyOrUnknown",ge[ge.Nullable=98304]="Nullable",ge[ge.Literal=2944]="Literal",ge[ge.Unit=101280]="Unit",ge[ge.Freshable=2976]="Freshable",ge[ge.StringOrNumberLiteral=384]="StringOrNumberLiteral",ge[ge.StringOrNumberLiteralOrUnique=384]="StringOrNumberLiteralOrUnique",ge[ge.DefinitelyFalsy=117632]="DefinitelyFalsy",ge[ge.PossiblyFalsy=121820]="PossiblyFalsy",ge[ge.Intrinsic=67359327]="Intrinsic",ge[ge.StringLike=402653316]="StringLike",ge[ge.NumberLike=2344]="NumberLike",ge[ge.BooleanLike=528]="BooleanLike",ge[ge.EnumLike=1056]="EnumLike",ge[ge.VoidLike=49152]="VoidLike",ge[ge.BytesLike=12288]="BytesLike",ge[ge.Primitive=402784188]="Primitive",ge[ge.DefinitelyNonNullable=470302652]="DefinitelyNonNullable",ge[ge.DisjointDomains=469892028]="DisjointDomains",ge[ge.UnionOrIntersection=3145728]="UnionOrIntersection",ge[ge.StructuredType=3670016]="StructuredType",ge[ge.TypeVariable=8650752]="TypeVariable",ge[ge.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",ge[ge.InstantiablePrimitive=406847488]="InstantiablePrimitive",ge[ge.Instantiable=465829888]="Instantiable",ge[ge.StructuredOrInstantiable=469499904]="StructuredOrInstantiable",ge[ge.ObjectFlagsType=3899393]="ObjectFlagsType",ge[ge.Simplifiable=25165824]="Simplifiable",ge[ge.Singleton=67358815]="Singleton",ge[ge.Narrowable=536624063]="Narrowable",ge[ge.IncludesMask=473694143]="IncludesMask",ge[ge.IncludesMissingType=262144]="IncludesMissingType",ge[ge.IncludesNonWideningType=4194304]="IncludesNonWideningType",ge[ge.IncludesWildcard=8388608]="IncludesWildcard",ge[ge.IncludesEmptyObject=16777216]="IncludesEmptyObject",ge[ge.IncludesInstantiable=33554432]="IncludesInstantiable",ge[ge.IncludesConstrainedTypeVariable=536870912]="IncludesConstrainedTypeVariable",ge[ge.IncludesError=1073741824]="IncludesError",ge[ge.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",ge))(nm||{});var Gc=(G=>(G[G.None=0]="None",G[G.Variable=1]="Variable",G[G.ExternalFile=4]="ExternalFile",G[G.Synthesized=16]="Synthesized",G[G.IncludeContext=32]="IncludeContext",G[G.MacroContext=64]="MacroContext",G[G.ExportContext=128]="ExportContext",G[G.HasImplicitReturn=512]="HasImplicitReturn",G[G.HasExplicitReturn=1024]="HasExplicitReturn",G[G.HasAsyncFunctions=4096]="HasAsyncFunctions",G[G.DisallowInContext=8192]="DisallowInContext",G[G.YieldContext=16384]="YieldContext",G[G.DisallowTypes=32768]="DisallowTypes",G[G.AwaitContext=65536]="AwaitContext",G[G.DisallowCommaContext=131072]="DisallowCommaContext",G[G.ThisNodeHasError=262144]="ThisNodeHasError",G[G.DisallowConditionalTypesContext=524288]="DisallowConditionalTypesContext",G[G.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",G[G.HasAggregatedChildData=2097152]="HasAggregatedChildData",G[G.OptionalChain=4194304]="OptionalChain",G[G.JSDoc=16777216]="JSDoc",G[G.Ambient=33554432]="Ambient",G[G.TypeCached=268435456]="TypeCached",G[G.Deprecated=536870912]="Deprecated",G[G.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",G[G.ReachabilityAndEmitFlags=1536]="ReachabilityAndEmitFlags",G[G.ContextFlags=34332768]="ContextFlags",G[G.BlockScoped=1]="BlockScoped",G[G.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",G[G.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",G[G.IncludeOrMacro=96]="IncludeOrMacro",G))(Gc||{});var gu=(Se=>(Se[Se.None=0]="None",Se[Se.Public=1]="Public",Se[Se.Private=2]="Private",Se[Se.Protected=4]="Protected",Se[Se.NoMask=32]="NoMask",Se[Se.NoShadow=64]="NoShadow",Se[Se.NoSave=128]="NoSave",Se[Se.Static=256]="Static",Se[Se.VarArgs=512]="VarArgs",Se[Se.Visible=1024]="Visible",Se[Se.Export=2048]="Export",Se[Se.Ambient=4096]="Ambient",Se[Se.Readonly=8192]="Readonly",Se[Se.In=16384]="In",Se[Se.Out=32768]="Out",Se[Se.Deprecated=65536]="Deprecated",Se[Se.JSDocPublic=8388608]="JSDocPublic",Se[Se.JSDocPrivate=16777216]="JSDocPrivate",Se[Se.JSDocProtected=33554432]="JSDocProtected",Se[Se.JSDocReadonly=67108864]="JSDocReadonly",Se[Se.JSDocOverride=134217728]="JSDocOverride",Se[Se.SyntacticOrJSDocModifiers=7]="SyntacticOrJSDocModifiers",Se[Se.SyntacticOnlyModifiers=2016]="SyntacticOnlyModifiers",Se[Se.SyntacticModifiers=2023]="SyntacticModifiers",Se[Se.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",Se[Se.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",Se[Se.NonCacheOnlyModifiers=67559]="NonCacheOnlyModifiers",Se[Se.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",Se[Se.HasComputedFlags=536870912]="HasComputedFlags",Se[Se.AccessibilityModifier=7]="AccessibilityModifier",Se[Se.ParameterPropertyModifier=167]="ParameterPropertyModifier",Se[Se.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",Se[Se.All=67559]="All",Se[Se.Modifier=67559]="Modifier",Se))(gu||{});var jT=(a=>(a[a.Warning=0]="Warning",a[a.Error=1]="Error",a[a.Suggestion=2]="Suggestion",a[a.Message=3]="Message",a))(jT||{});function Zy(e,n=!0){let r=jT[e.category];return n?r.toLowerCase():r}var ex=(T=>(T[T.Unreachable=1]="Unreachable",T[T.Start=2]="Start",T[T.BranchLabel=4]="BranchLabel",T[T.LoopLabel=8]="LoopLabel",T[T.Assignment=16]="Assignment",T[T.TrueCondition=32]="TrueCondition",T[T.FalseCondition=64]="FalseCondition",T[T.SwitchClause=128]="SwitchClause",T[T.ArrayMutation=256]="ArrayMutation",T[T.Call=512]="Call",T[T.ReduceLabel=1024]="ReduceLabel",T[T.Referenced=2048]="Referenced",T[T.Shared=4096]="Shared",T[T.Label=12]="Label",T[T.Condition=96]="Condition",T))(ex||{});var dl=(ne=>(ne[ne.None=0]="None",ne[ne.FunctionScopedVariable=1]="FunctionScopedVariable",ne[ne.BlockScopedVariable=2]="BlockScopedVariable",ne[ne.Property=4]="Property",ne[ne.EnumMember=8]="EnumMember",ne[ne.Function=16]="Function",ne[ne.Class=32]="Class",ne[ne.Interface=64]="Interface",ne[ne.ConstEnum=128]="ConstEnum",ne[ne.RegularEnum=256]="RegularEnum",ne[ne.ValueModule=512]="ValueModule",ne[ne.NamespaceModule=1024]="NamespaceModule",ne[ne.TypeLiteral=2048]="TypeLiteral",ne[ne.ObjectLiteral=4096]="ObjectLiteral",ne[ne.Method=8192]="Method",ne[ne.Constructor=16384]="Constructor",ne[ne.GetAccessor=32768]="GetAccessor",ne[ne.SetAccessor=65536]="SetAccessor",ne[ne.Signature=131072]="Signature",ne[ne.TypeParameter=262144]="TypeParameter",ne[ne.TypeAlias=524288]="TypeAlias",ne[ne.ExportValue=1048576]="ExportValue",ne[ne.Alias=2097152]="Alias",ne[ne.Prototype=4194304]="Prototype",ne[ne.FakeGlobal=8388608]="FakeGlobal",ne[ne.Optional=16777216]="Optional",ne[ne.Transient=33554432]="Transient",ne[ne.Assignment=67108864]="Assignment",ne[ne.ModuleExports=134217728]="ModuleExports",ne[ne.Define=268435456]="Define",ne[ne.All=-1]="All",ne[ne.Enum=384]="Enum",ne[ne.Variable=3]="Variable",ne[ne.Value=111551]="Value",ne[ne.ValueOrDefine=268547007]="ValueOrDefine",ne[ne.Type=788968]="Type",ne[ne.Namespace=1920]="Namespace",ne[ne.Module=1536]="Module",ne[ne.Accessor=98304]="Accessor",ne[ne.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",ne[ne.BlockScopedVariableExcludes=268547007]="BlockScopedVariableExcludes",ne[ne.ParameterExcludes=111551]="ParameterExcludes",ne[ne.PropertyExcludes=0]="PropertyExcludes",ne[ne.EnumMemberExcludes=900095]="EnumMemberExcludes",ne[ne.FunctionExcludes=110991]="FunctionExcludes",ne[ne.DefineExcludes=111039]="DefineExcludes",ne[ne.ClassExcludes=899503]="ClassExcludes",ne[ne.InterfaceExcludes=788872]="InterfaceExcludes",ne[ne.RegularEnumExcludes=899327]="RegularEnumExcludes",ne[ne.ConstEnumExcludes=899967]="ConstEnumExcludes",ne[ne.ValueModuleExcludes=110735]="ValueModuleExcludes",ne[ne.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",ne[ne.MethodExcludes=103359]="MethodExcludes",ne[ne.GetAccessorExcludes=46015]="GetAccessorExcludes",ne[ne.SetAccessorExcludes=78783]="SetAccessorExcludes",ne[ne.AccessorExcludes=13247]="AccessorExcludes",ne[ne.TypeParameterExcludes=526824]="TypeParameterExcludes",ne[ne.TypeAliasExcludes=788968]="TypeAliasExcludes",ne[ne.AliasExcludes=2097152]="AliasExcludes",ne[ne.ModuleMember=2623475]="ModuleMember",ne[ne.ExportHasLocal=944]="ExportHasLocal",ne[ne.BlockScoped=418]="BlockScoped",ne[ne.PropertyOrAccessor=98308]="PropertyOrAccessor",ne[ne.ClassMember=106500]="ClassMember",ne[ne.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",ne[ne.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",ne[ne.Classifiable=2885600]="Classifiable",ne[ne.LateBindingContainer=6256]="LateBindingContainer",ne))(dl||{}),RT=(se=>(se[se.None=0]="None",se[se.Class=1]="Class",se[se.Interface=2]="Interface",se[se.Reference=4]="Reference",se[se.Tuple=8]="Tuple",se[se.Anonymous=16]="Anonymous",se[se.Mapped=32]="Mapped",se[se.Instantiated=64]="Instantiated",se[se.ObjectLiteral=128]="ObjectLiteral",se[se.EvolvingArray=256]="EvolvingArray",se[se.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",se[se.ReverseMapped=1024]="ReverseMapped",se[se.MappingLiteral=2048]="MappingLiteral",se[se.JSLiteral=4096]="JSLiteral",se[se.FreshLiteral=8192]="FreshLiteral",se[se.ArrayLiteral=16384]="ArrayLiteral",se[se.PrimitiveUnion=32768]="PrimitiveUnion",se[se.ContainsWideningType=65536]="ContainsWideningType",se[se.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",se[se.NonInferrableType=262144]="NonInferrableType",se[se.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",se[se.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",se[se.ClassOrInterface=3]="ClassOrInterface",se[se.RequiresWidening=196608]="RequiresWidening",se[se.PropagatingFlags=458752]="PropagatingFlags",se[se.InstantiatedMapped=96]="InstantiatedMapped",se[se.ObjectTypeKindMask=1343]="ObjectTypeKindMask",se[se.ContainsSpread=2097152]="ContainsSpread",se[se.ObjectRestType=4194304]="ObjectRestType",se[se.InstantiationExpressionType=8388608]="InstantiationExpressionType",se[se.SingleSignatureType=134217728]="SingleSignatureType",se[se.IsClassInstanceClone=16777216]="IsClassInstanceClone",se[se.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",se[se.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",se[se.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",se[se.IsGenericObjectType=4194304]="IsGenericObjectType",se[se.IsGenericIndexType=8388608]="IsGenericIndexType",se[se.IsGenericType=12582912]="IsGenericType",se[se.ContainsIntersections=16777216]="ContainsIntersections",se[se.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",se[se.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",se[se.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",se[se.IsNeverIntersection=33554432]="IsNeverIntersection",se[se.IsConstrainedTypeVariable=67108864]="IsConstrainedTypeVariable",se))(RT||{}),Rv=(b=>(b[b.None=0]="None",b[b.HasRestParameter=1]="HasRestParameter",b[b.HasLiteralTypes=2]="HasLiteralTypes",b[b.Abstract=4]="Abstract",b[b.IsVarArgs=8]="IsVarArgs",b[b.HasJsDoc=16]="HasJsDoc",b[b.IsInnerCallChain=64]="IsInnerCallChain",b[b.IsOuterCallChain=128]="IsOuterCallChain",b[b.IsUntypedSignatureInJSFile=256]="IsUntypedSignatureInJSFile",b[b.IsNonInferrable=512]="IsNonInferrable",b[b.IsSignatureCandidateForOverloadFailure=1024]="IsSignatureCandidateForOverloadFailure",b[b.PropagatingFlags=1295]="PropagatingFlags",b[b.CallChainFlags=192]="CallChainFlags",b))(Rv||{});var Sg=class{};var Ov=(Ee=>(Ee[Ee.None=0]="None",Ee[Ee.TypeChecked=1]="TypeChecked",Ee[Ee.LexicalThis=2]="LexicalThis",Ee[Ee.CaptureThis=4]="CaptureThis",Ee[Ee.CaptureNewTarget=8]="CaptureNewTarget",Ee[Ee.SuperInstance=16]="SuperInstance",Ee[Ee.SuperStatic=32]="SuperStatic",Ee[Ee.ContextChecked=64]="ContextChecked",Ee[Ee.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",Ee[Ee.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",Ee[Ee.CaptureArguments=512]="CaptureArguments",Ee[Ee.EnumValuesComputed=1024]="EnumValuesComputed",Ee[Ee.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",Ee[Ee.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",Ee[Ee.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",Ee[Ee.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",Ee[Ee.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",Ee[Ee.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",Ee[Ee.AssignmentsMarked=131072]="AssignmentsMarked",Ee[Ee.ContainsConstructorReference=262144]="ContainsConstructorReference",Ee[Ee.ConstructorReference=536870912]="ConstructorReference",Ee[Ee.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",Ee[Ee.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",Ee[Ee.InCheckIdentifier=4194304]="InCheckIdentifier",Ee[Ee.PartiallyTypeChecked=8388608]="PartiallyTypeChecked",Ee[Ee.LazyFlags=539358128]="LazyFlags",Ee))(Ov||{});var ED=(i=>(i[i.Not=0]="Not",i[i.SafeModules=1]="SafeModules",i[i.Completely=2]="Completely",i))(ED||{});var Jv=(n=>(n[n.Classic=1]="Classic",n))(Jv||{});var JT=(g=>(g[g.None=0]="None",g[g.Auto=1]="Auto",g[g.Loop=2]="Loop",g[g.Unique=3]="Unique",g[g.Node=4]="Node",g[g.KindMask=7]="KindMask",g[g.ReservedInNestedScopes=8]="ReservedInNestedScopes",g[g.Optimistic=16]="Optimistic",g[g.FileLevel=32]="FileLevel",g[g.AllowNameSubstitution=64]="AllowNameSubstitution",g))(JT||{});var Q1={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0},{name:"resolution-mode",optional:!0},{name:"preserve",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"this-object":{args:[{name:"name"}],kind:2},this_object:{args:[{name:"name"}],kind:2},"lpc-check":{kind:2},"lpc-nocheck":{kind:2}};function K(e,n,r,i,a,c,u){return{code:e,category:n,key:r,message:i,reportsUnnecessary:a,elidedInCompatabilityPyramid:c,reportsDeprecated:u}}var N={Structs_not_supported:K(9001,1,"Structs_not_supported_9001","Structs not supported."),Semicolon_expected:K(9002,1,"Semicolon_expected_9002","Semicolon expected."),Macro_already_defined_0:K(9003,1,"Macro_already_defined_0_9003","Macro already defined '{0}'."),Missing_argument_for_macro_0:K(9004,1,"Missing_argument_for_macro_0_9004","Missing argument for macro '{0}'."),Else_directive_without_if:K(9005,1,"Else_directive_without_if_9005","#else directive without #if."),Elseif_directive_without_if:K(9007,1,"Elseif_directive_without_if_9007","#elseif directive without #if."),Unterminated_directive:K(9006,1,"Unterminated_directive_9006","Unterminated directive."),Expected_newline_after_directive:K(9008,1,"Expected_newline_after_directive_9008","Expected newline after directive."),Pragma_directive_requires_at_least_one_argument:K(9009,1,"Pragma_directive_requires_at_least_one_argument_9009","#pragma directive requires at least one argument."),Unexpected_endIf_directive:K(9010,1,"Unexpected_endIf_directive_9010","Unexpected #endIf directive."),Catch_expression_modifier_expected:K(9011,1,"Catch_expression_modifier_expected_9011","Catch expression modifier expected."),Unterminated_macro_arguments_list:K(9012,1,"Unterminated_macro_arguments_list_9012","Unterminated macro arguments list."),Unmatched_conditional_directive:K(9013,1,"Unmatched_conditional_directive_9013","Unmatched conditional directive."),Identifier_or_string_expected:K(9014,1,"Identifier_or_string_expected_9014","Identifier or string expected."),Character_literal_must_be_one_character:K(9015,1,"Character_literal_must_be_one_character_9015","Character literal must be one character."),Stringized_literal_only_valid_in_macro:K(9016,1,"Stringized_literal_only_valid_in_macro_9016","Stringized literal only valid in macro."),Macro_parameter_0_not_found:K(9017,1,"Macro_parameter_0_not_found_9017","Macro parameter '{0}' not found."),Cannot_find_include_file_0:K(9018,1,"Cannot_find_include_file_0_9018","Cannot find include file '{0}'."),Pragma_option_expected:K(9019,1,"Pragma_option_expected_9019","Pragma option expected."),File_is_master_file_specified_here:K(9020,1,"File_is_master_file_specified_here_9020","File is master file specified here."),Cannot_find_0_Do_you_need_to_change_your_driver_type:K(9021,1,"Cannot_find_0_Do_you_need_to_change_your_driver_type_9021","Cannot find '{0}'. Do you need to change your driver type?"),When_comparing_types_check_that_the_objectStructure_is_compatible_with_the_target_type:K(9022,3,"When_comparing_types_check_that_the_objectStructure_is_compatible_with_the_target_type_6699","When comparing types, check that the object structure is compatible with the target type."),Super_access_can_only_be_used_in_a_file_that_inherits_from_another_file:K(9023,1,"Super_access_can_only_be_used_in_a_file_that_inherits_from_another_file_9023","Super access can only be used in a file that inherits from another file."),LPCDoc_var_tag_should_have_a_type_annotation:K(9024,1,"LPCDoc_var_tag_should_have_a_type_annotation_9024","LPCDoc @var tag should have a type annotation."),Include_file_0_contains_one_or_more_errors:K(9025,1,"Include_file_0_contains_one_or_more_errors_9025","Include file '{0}' contains one or more errors."),LPCDoc_var_tags_must_be_in_their_own_LPCDoc_comment:K(9026,1,"LPCDoc_var_tags_must_be_in_their_own_LPCDoc_comment_9026","LPCDoc @var tags must be in their own LPCDoc comment."),LPCDoc_var_tags_can_only_annotate_inherited_variables_0_is_a_local_variable:K(9027,1,"LPCDoc_var_tags_can_only_annotate_inherited_variables_0_is_a_local_variable_9027","LPCDoc @var tags can only annotate inherited variables. '{0}' is a local variable."),LPCDoc_var_tag_should_provide_a_variable_name:K(9028,1,"LPCDoc_var_tag_should_provide_a_variable_name_9028","LPCDoc @var tag should provide a variable name."),Circular_include_detected_0_to_1:K(9029,1,"Circular_include_detected_0_to_1_9029","Circular include detected '{0}' -> '{1}'."),Locale_0_is_not_supported:K(9030,1,"Locale_0_is_not_supported_9030","Locale '{0}' is not supported."),No_errors:K(9031,3,"No_errors_9031","No errors - That is some happy LPC."),Catch_expression_cannot_also_have_a_block:K(9032,1,"Catch_expression_cannot_also_have_a_block_9032","Catch expression cannot also have a block."),_0_expected:K(1005,1,"_0_expected_1005","'{0}' expected."),c_must_be_followed_by_an_ASCII_letter:K(1512,1,"c_must_be_followed_by_an_ASCII_letter_1512","'\\c' must be followed by an ASCII letter."),Undetermined_character_escape:K(1513,1,"Undetermined_character_escape_1513","Undetermined character escape."),Incomplete_quantifier_Digit_expected:K(1505,1,"Incomplete_quantifier_Digit_expected_1505","Incomplete quantifier. Digit expected."),q_is_only_available_inside_character_class:K(1511,1,"q_is_only_available_inside_character_class_1511","'\\q' is only available inside character class."),Unexpected_0_Did_you_mean_to_escape_it_with_backslash:K(1508,1,"Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508","Unexpected '{0}'. Did you mean to escape it with backslash?"),Numbers_out_of_order_in_quantifier:K(1506,1,"Numbers_out_of_order_in_quantifier_1506","Numbers out of order in quantifier."),Asterisk_Slash_expected:K(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),Hexadecimal_digit_expected:K(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Invalid_character:K(1127,1,"Invalid_character_1127","Invalid character."),can_only_be_used_at_the_start_of_a_file:K(18026,1,"can_only_be_used_at_the_start_of_a_file_18026","'#!' can only be used at the start of a file."),File_appears_to_be_binary:K(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),Multiple_consecutive_numeric_separators_are_not_permitted:K(6189,1,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Numeric_separators_are_not_allowed_here:K(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Unterminated_string_literal:K(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:K(1198,1,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unexpected_end_of_text:K(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Unterminated_Unicode_escape_sequence:K(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead:K(1536,1,"Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536","Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:K(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class:K(1537,1,"Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537","Decimal escape sequences and backreferences are not allowed in a character class."),Escape_sequence_0_is_not_allowed:K(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),This_character_cannot_be_escaped_in_a_regular_expression:K(1535,1,"This_character_cannot_be_escaped_in_a_regular_expression_1535","This character cannot be escaped in a regular expression."),Octal_literals_are_not_allowed_Use_the_syntax_0:K(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Binary_digit_expected:K(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:K(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Digit_expected:K(1124,1,"Digit_expected_1124","Digit expected."),Decimals_with_leading_zeros_are_not_allowed:K(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),A_bigint_literal_cannot_use_exponential_notation:K(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:K(1353,1,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:K(1351,1,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),Variable_declaration_not_allowed_at_this_location:K(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Unknown_keyword_or_identifier_Did_you_mean_0:K(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Unexpected_keyword_or_identifier:K(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Variable_declaration_expected:K(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Declaration_expected:K(1146,1,"Declaration_expected_1146","Declaration expected."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:K(1359,1,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),Identifier_expected:K(1003,1,"Identifier_expected_1003","Identifier expected."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:K(17006,1,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),Unicode_escape_sequence_cannot_appear_here:K(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:K(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Keywords_cannot_contain_escape_characters:K(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:K(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Merge_conflict_marker_encountered:K(1e3,1,"Merge_conflict_marker_encountered_1000","Merge conflict marker encountered."),Expression_expected:K(1001,1,"Expression_expected_1001","Expression expected."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:K(1100,1,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Cannot_redeclare_block_scoped_variable_0:K(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),Duplicate_identifier_0:K(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:K(2693,1,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Circular_definition_of_import_alias_0:K(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:K(2749,1,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749","'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"),Cannot_find_name_0_Did_you_mean_1:K(2552,1,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),_0_is_declared_here:K(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:K(18004,1,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Cannot_find_name_0:K(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),_0_is_deprecated:K(6385,2,"_0_is_deprecated_6385","'{0}' is deprecated.",void 0,void 0,!0),The_signature_0_of_1_is_deprecated:K(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),The_declaration_was_marked_as_deprecated_here:K(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Cannot_assign_to_0_because_it_is_a_function:K(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_not_a_variable:K(2539,1,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Variable_0_is_used_before_being_assigned:K(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Unreachable_code_detected:K(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),_0_is_declared_but_its_value_is_never_read:K(6133,1,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),All_variables_are_unused:K(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),A_function_returning_never_cannot_have_a_reachable_end_point:K(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),A_function_whose_declared_type_is_not_void_must_return_a_value:K(2355,0,"A_function_whose_declared_type_is_not_void_must_return_a_value_2355","A function whose declared type is not 'void' must return a value."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:K(2366,1,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),Not_all_code_paths_return_a_value:K(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),A_0_parameter_must_be_the_first_parameter:K(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_rest_parameter_must_be_of_an_array_type:K(2370,1,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),File_0_not_found:K(6053,1,"File_0_not_found_6053","File '{0}' not found."),A_file_cannot_have_a_reference_to_itself:K(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),Cannot_read_file_0_Colon_1:K(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:K(1261,1,"Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261","Already included file name '{0}' differs from file name '{1}' only in casing."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:K(1149,1,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),_0_is_of_type_unknown:K(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),Object_is_of_type_unknown:K(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:K(2723,1,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null:K(2721,1,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:K(2722,1,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Are_you_missing_a_semicolon:K(2734,1,"Are_you_missing_a_semicolon_2734","Are you missing a semicolon?"),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:K(2348,1,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),Type_0_has_no_call_signatures:K(2757,1,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Type_0_has_no_construct_signatures:K(2761,1,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Not_all_constituents_of_type_0_are_callable:K(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Not_all_constituents_of_type_0_are_constructable:K(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),No_constituent_of_type_0_is_callable:K(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),No_constituent_of_type_0_is_constructable:K(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:K(2758,1,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:K(2762,1,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),This_expression_is_not_callable:K(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),This_expression_is_not_constructable:K(2351,1,"This_expression_is_not_constructable_2351","This expression is not constructable."),An_expression_of_type_void_cannot_be_tested_for_truthiness:K(1345,1,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness."),This_condition_will_always_return_0:K(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:K(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this function is always defined. Did you mean to call it instead?"),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:K(2447,1,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:K(2362,1,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:K(2363,1,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:K(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:K(2695,1,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:K(2364,1,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Did_you_mean_to_use_new_with_this_expression:K(6213,3,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Operator_0_cannot_be_applied_to_types_1_and_2:K(2365,1,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:K(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Did_you_mean_to_call_this_expression:K(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),_0_was_also_declared_here:K(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:K(6204,3,"and_here_6204","and here."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:K(2779,1,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),Did_you_mean_0:K(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:K(2356,1,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:K(2357,1,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:K(2777,1,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),Operator_0_cannot_be_applied_to_type_1:K(2736,1,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),The_body_of_an_if_statement_cannot_be_the_empty_statement:K(1313,1,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Index_signature_in_type_0_only_permits_reading:K(2542,1,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Property_0_is_used_before_being_assigned:K(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),All_declarations_of_0_must_have_identical_modifiers:K(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:K(2481,1,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:K(2717,1,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:K(2403,1,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),Type_instantiation_is_excessively_deep_and_possibly_infinite:K(2589,1,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Object_literal_s_property_0_implicitly_has_an_1_type:K(7018,1,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Type_arguments_for_0_circularly_reference_themselves:K(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:K(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),A_return_statement_can_only_be_used_within_a_function_body:K(1108,1,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Return_type_annotation_circularly_references_itself:K(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:K(7023,1,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:K(7024,1,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Types_of_property_0_are_incompatible:K(2326,1,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Call_signature_return_types_0_and_1_are_incompatible:K(2202,1,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:K(2204,1,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:K(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:K(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),The_types_of_0_are_incompatible_between_these_types:K(2200,1,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:K(2201,1,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Type_0_is_not_comparable_to_type_1:K(2678,1,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:K(2719,1,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:K(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Type_0_is_not_assignable_to_type_1:K(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:K(2345,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:K(2692,1,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:K(2696,1,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:K(2560,1,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Type_0_has_no_properties_in_common_with_type_1:K(2559,1,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:K(2561,1,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:K(2353,1,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:K(2563,1,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Expression_produces_a_union_type_that_is_too_complex_to_represent:K(2590,1,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_global_type_0:K(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Global_type_0_must_be_a_class_or_interface_type:K(2316,1,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:K(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Excessive_complexity_comparing_types_0_and_1:K(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),Excessive_stack_depth_comparing_types_0_and_1:K(2321,1,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),The_last_overload_gave_the_following_error:K(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),No_overload_matches_this_call:K(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_is_declared_here:K(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:K(2772,1,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:K(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_arguments_but_got_1:K(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:K(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:K(2575,1,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),An_argument_for_0_was_not_provided:K(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:K(6211,3,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Arguments_for_the_rest_parameter_0_were_not_provided:K(6236,1,"Arguments_for_the_rest_parameter_0_were_not_provided_6236","Arguments for the rest parameter '{0}' were not provided."),The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible:K(2793,1,"The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793","The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."),Cannot_read_file_0:K(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),The_files_list_in_config_file_0_is_empty:K(18002,1,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),Compiler_option_0_requires_a_value_of_type_1:K(5024,1,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:K(5010,1,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:K(5065,1,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:K(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:K(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:K(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Expected_0_type_arguments_but_got_1:K(2558,1,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:K(2743,1,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Cannot_find_object_0:K(2307,1,"Cannot_find_object_0_2307","Cannot find object '{0}'."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:K(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),File_0_is_not_a_module:K(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Clone_object_can_only_accept_an_object_name_and_an_optional_set_of_attributes_as_arguments_1450:K(1450,3,"Clone_object_can_only_accept_an_object_name_and_an_optional_set_of_attributes_as_arguments_1450","Clone object can only accept an object name and an optional set of attributes as arguments"),Clone_object_s_specifier_must_be_of_type_string_but_here_has_type_0:K(7036,1,"Clone_object_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Clone object's specifier must be of type 'string', but here has type '{0}'."),Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified:K(6145,3,"Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145","Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:K(6144,3,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Resolving_module_0_from_1:K(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Using_compiler_options_of_project_reference_redirect_0:K(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Resolution_for_module_0_was_found_in_cache_from_location_1:K(6147,3,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Module_resolution_kind_is_not_specified_using_0:K(6088,3,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Explicitly_specified_module_resolution_kind_Colon_0:K(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:K(6218,3,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Module_name_0_was_successfully_resolved_to_1:K(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:K(6090,3,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),Resolving_real_path_for_0_result_1:K(6130,3,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:K(6107,3,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:K(6104,3,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Longest_matching_prefix_for_0_is_1:K(6108,3,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:K(6109,3,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:K(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:K(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),File_0_exists_use_it_as_a_name_resolution_result:K(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),File_0_does_not_exist:K(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:K(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:K(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),Directory_0_does_not_exist_skipping_all_lookups_in_it:K(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),File_name_0_has_a_1_extension_stripping_it:K(6132,3,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:K(2308,1,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),You_cannot_rename_this_element:K(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:K(8001,1,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),You_cannot_rename_a_module_via_a_global_import:K(8031,1,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Add_missing_comma_for_object_member_completion_0:K(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),Duplicate_index_signature_for_type_0:K(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_generic:K(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:K(2352,1,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Type_alias_0_circularly_references_itself:K(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),An_element_access_expression_should_take_an_argument:K(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Type_0_is_generic_and_can_only_be_indexed_for_reading:K(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),Type_0_cannot_be_used_to_index_type_1:K(2536,1,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_cannot_be_used_as_an_index_type:K(2538,1,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Property_0_does_not_exist_on_type_1:K(2339,1,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:K(7015,1,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:K(2551,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:K(7052,1,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:K(7054,1,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:K(7053,1,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:K(2537,1,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:K(2549,1,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:K(2548,1,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type:K(2495,1,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),Type_0_is_not_an_array_type:K(2461,1,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_type_literal_property_cannot_have_an_initializer:K(1247,1,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_mapped_type_may_not_declare_properties_or_methods:K(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:K(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:K(2464,1,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),Property_0_was_also_declared_here:K(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Duplicate_property_0:K(2718,1,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:K(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),Declaration_name_conflicts_with_built_in_global_identifier_0:K(2397,1,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:K(1189,1,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:K(2405,1,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:K(2406,1,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:K(2780,1,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:K(2407,1,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:K(2371,1,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),The_value_0_cannot_be_used_here:K(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),_0_is_possibly_undefined:K(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),Object_is_possibly_undefined:K(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),The_expected_type_comes_from_the_return_type_of_this_signature:K(6502,3,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),_0_needs_an_explicit_type_annotation:K(2782,3,"_0_needs_an_explicit_type_annotation_2782","'{0}' needs an explicit type annotation."),Overload_signatures_must_all_be_public_private_or_protected:K(2385,1,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Function_overload_must_not_be_static:K(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:K(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:K(2391,1,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Duplicate_function_implementation:K(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),Class_declaration_cannot_implement_overload_list_for_0:K(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:K(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),This_overload_signature_is_not_compatible_with_its_implementation_signature:K(2394,1,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),The_implementation_signature_is_declared_here:K(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:K(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),Types_of_parameters_0_and_1_are_incompatible:K(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Signature_0_must_be_a_type_predicate:K(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:K(7022,1,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:K(2502,1,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:K(2509,1,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Type_0_recursively_references_itself_as_a_base_type:K(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:K(2506,1,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:K(2507,1,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:K(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),_0_tag_already_specified:K(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:K(1069,1,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags:K(8033,1,"A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033","A JSDoc '@typedef' comment may not contain multiple '@type' tags."),The_tag_was_first_specified_here:K(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),Unexpected_token:K(1012,1,"Unexpected_token_1012","Unexpected token."),Circularity_detected_while_resolving_configuration_Colon_0:K(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),String_literal_with_double_quotes_expected:K(1327,1,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:K(1328,1,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),Unknown_option_excludes_Did_you_mean_exclude:K(6114,1,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Command_line_Options:K(6171,3,"Command_line_Options_6171","Command-line Options"),Type_Checking:K(6248,3,"Type_Checking_6248","Type Checking"),Language_and_Environment:K(6254,3,"Language_and_Environment_6254","Language and Environment"),Disable_including_any_library_files_including_the_default_efun_h:K(6670,3,"Disable_including_any_library_files_including_the_default_efun_h_6670","Disable including any library files, including the default efun.h."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:K(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),Enable_verbose_logging:K(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Print_this_message:K(6017,3,"Print_this_message_6017","Print this message."),Watch_input_files:K(6005,3,"Watch_input_files_6005","Watch input files."),Output_Formatting:K(6256,3,"Output_Formatting_6256","Output Formatting"),Disable_wiping_the_console_in_watch_mode:K(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Compiler_Diagnostics:K(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Print_all_of_the_files_read_during_the_compilation:K(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Print_files_read_during_the_compilation_including_why_it_was_included:K(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Print_the_names_of_emitted_files_after_a_compilation:K(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:K(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Log_paths_used_during_the_moduleResolution_process:K(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Output_compiler_performance_information_after_building:K(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Output_more_detailed_compiler_performance_information_after_building:K(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),FILE_OR_DIRECTORY:K(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),KIND:K(6034,3,"KIND_6034","KIND"),FILE:K(6035,3,"FILE_6035","FILE"),VERSION:K(6036,3,"VERSION_6036","VERSION"),LOCATION:K(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:K(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:K(6039,3,"STRATEGY_6039","STRATEGY"),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:K(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Generates_an_event_trace_and_a_list_of_types:K(6237,3,"Generates_an_event_trace_and_a_list_of_types_6237","Generates an event trace and a list of types."),Projects:K(6255,3,"Projects_6255","Projects"),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:K(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),false_unless_composite_is_set:K(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),Emit:K(6246,3,"Emit_6246","Emit"),Create_source_map_files_for_emitted_JavaScript_files:K(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Include_sourcemap_files_inside_the_emitted_JavaScript:K(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Watch_and_Build_Modes:K(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:K(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:K(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Platform_specific:K(6912,3,"Platform_specific_6912","Platform specific"),Property_assignment_expected:K(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Compiler_option_0_may_only_be_used_with_build:K(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Unknown_compiler_option_0:K(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Unknown_compiler_option_0_Did_you_mean_1:K(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Compiler_option_0_expects_an_argument:K(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Option_0_can_only_be_specified_on_command_line:K(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Compiler_option_0_cannot_be_given_an_empty_string:K(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),File_Management:K(6245,3,"File_Management_6245","File Management"),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:K(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:K(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),The_root_value_of_a_0_file_must_be_an_object:K(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Argument_for_0_option_must_be_Colon_1:K(6046,1,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:K(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:K(18003,1,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),Untyped_function_calls_may_not_accept_type_arguments:K(2347,1,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Declaration_or_statement_expected:K(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),case_or_default_expected:K(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Statement_expected:K(1129,1,"Statement_expected_1129","Statement expected."),Property_or_signature_expected:K(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:K(1068,1,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),_0_is_not_allowed_as_a_variable_declaration_name:K(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),Property_destructuring_pattern_expected:K(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:K(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),Argument_expression_expected:K(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Expression_or_comma_expected:K(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:K(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),_0_is_not_allowed_as_a_parameter_name:K(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),Type_parameter_declaration_expected:K(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:K(1140,1,"Type_argument_expected_1140","Type argument expected."),Type_expected:K(1110,1,"Type_expected_1110","Type expected."),Unexpected_token_expected:K(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Found_1_error_in_0:K(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_1_error:K(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:K(6217,3,"Found_0_errors_6217","Found {0} errors."),Found_0_errors_in_the_same_file_starting_at_Colon_1:K(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:K(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),Errors_Files:K(6041,3,"Errors_Files_6041","Errors Files"),File_is_output_of_project_reference_source_0:K(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),The_file_is_in_the_program_because_Colon:K(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),Root_file_specified_for_compilation:K(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),Part_of_files_list_in_lpcconfig_json:K(1409,3,"Part_of_files_list_in_lpcconfig_json_1409","Part of 'files' list in lpc-config.json"),Matched_by_include_pattern_0_in_1:K(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:K(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),Output_from_referenced_project_0_included_because_1_specified:K(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_1_specified:K(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:K(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:K(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:K(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),Entry_point_of_type_library_0_specified_in_compilerOptions:K(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_for_implicit_type_library_0_with_packageId_1:K(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:K(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),Default_library_for_target_0:K(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),Default_library:K(1424,3,"Default_library_1424","Default library"),File_is_included_via_import_here:K(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),File_is_included_via_reference_here:K(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),File_is_included_via_type_library_reference_here:K(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),File_is_included_via_library_reference_here:K(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Cannot_find_lib_definition_for_0_Did_you_mean_1:K(2727,1,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),Cannot_find_lib_definition_for_0:K(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Modifiers_cannot_appear_here:K(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),_0_modifier_cannot_appear_on_a_type_member:K(1070,1,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:K(1071,1,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),Accessibility_modifier_already_seen:K(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_already_seen:K(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_a_parameter:K(1090,1,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:K(1187,1,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:K(1317,1,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),_0_modifier_must_precede_1_modifier:K(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:K(8029,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","LPCDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:K(8032,1,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:K(8024,1,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","LPCDoc '@param' tag has name '{0}', but there is no parameter with that name."),A_rest_parameter_must_be_last_in_a_parameter_list:K(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:K(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:K(2775,1,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Trailing_comma_not_allowed:K(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),A_rest_parameter_cannot_have_an_initializer:K(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),Block_scoped_variable_0_used_before_its_declaration:K(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:K(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Jump_target_cannot_cross_function_boundary:K(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:K(1115,1,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:K(1116,1,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:K(1105,1,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:K(1104,1,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),Fallthrough_case_in_switch:K(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:K(1228,1,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:K(1229,1,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:K(2677,1,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Cannot_find_parameter_0:K(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:K(1230,1,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),The_type_of_a_function_declaration_must_match_the_function_s_signature:K(8030,1,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:K(2776,1,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),Specify_the_root_folder_within_your_source_files:K(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Computed_from_the_list_of_input_files:K(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Imported_via_0_from_file_1:K(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:K(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Referenced_via_0_from_file_1:K(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),Library_referenced_via_0_from_file_1:K(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_matched_by_files_list_specified_here:K(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),File_is_matched_by_include_pattern_specified_here:K(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),File_is_output_from_referenced_project_specified_here:K(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),File_is_source_from_referenced_project_specified_here:K(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),File_is_entry_point_of_type_library_specified_here:K(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),File_is_library_specified_here:K(1423,3,"File_is_library_specified_here_1423","File is library specified here."),File_is_default_library_for_target_specified_here:K(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:K(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:K(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:K(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:K(6140,1,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Source_has_0_element_s_but_target_requires_1:K(2618,1,"Source_has_0_element_s_but_target_requires_1_2618","Source has {0} element(s) but target requires {1}."),Source_has_0_element_s_but_target_allows_only_1:K(2619,1,"Source_has_0_element_s_but_target_allows_only_1_2619","Source has {0} element(s) but target allows only {1}."),Target_requires_0_element_s_but_source_may_have_fewer:K(2620,1,"Target_requires_0_element_s_but_source_may_have_fewer_2620","Target requires {0} element(s) but source may have fewer."),Target_allows_only_0_element_s_but_source_may_have_more:K(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:K(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:K(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Source_provides_no_match_for_required_element_at_position_0_in_target:K(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2:K(18015,1,"Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015","Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."),Class_0_incorrectly_implements_interface_1:K(2420,1,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:K(2720,1,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Property_0_is_missing_in_type_1_but_required_in_type_2:K(2741,1,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:K(2740,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:K(2739,1,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Types_have_separate_declarations_of_a_private_property_0:K(2442,1,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_private_in_type_1_but_not_in_type_2:K(2325,1,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:K(2443,1,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:K(2444,1,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_optional_in_type_1_but_required_in_type_2:K(2327,1,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Index_signature_for_type_0_is_missing_in_type_1:K(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_index_signatures_are_incompatible:K(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),_0_and_1_index_signatures_are_incompatible:K(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),Property_0_is_incompatible_with_index_signature:K(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:K(2517,1,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),Type_0_provides_no_match_for_the_signature_1:K(2658,1,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),Type_produces_a_tuple_type_that_is_too_large_to_represent:K(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:K(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),All_type_parameters_are_unused:K(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:K(8021,1,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","LPCDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),Type_alias_name_cannot_be_0:K(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),Type_parameter_0_has_a_circular_default:K(2716,1,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Type_parameter_name_cannot_be_0:K(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),Required_type_parameters_may_not_follow_optional_type_parameters:K(2706,1,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:K(2744,1,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),Type_0_does_not_satisfy_the_constraint_1:K(2344,1,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:K(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:K(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Type_parameter_0_has_a_circular_constraint:K(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Circularity_originates_in_type_at_this_location:K(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:K(4105,1,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Cannot_assign_to_0_because_it_is_a_read_only_property:K(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),A_tuple_type_cannot_be_indexed_with_a_negative_value:K(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Tuple_type_0_of_length_1_has_no_element_at_index_2:K(2493,1,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:K(5075,1,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1:K(5082,1,"_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082","'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:K(4104,1,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),This_type_parameter_might_need_an_extends_0_constraint:K(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),Type_of_property_0_circularly_references_itself_in_mapped_type_1:K(2615,1,"Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615","Type of property '{0}' circularly references itself in mapped type '{1}'."),false_unless_strict_is_set:K(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),Generic_type_0_requires_1_type_argument_s:K(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Generic_type_0_requires_between_1_and_2_type_arguments:K(2707,1,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:K(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:K(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Type_parameter_list_cannot_be_empty:K(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:K(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),JSDoc_types_can_only_be_used_inside_documentation_comments:K(8020,1,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","LPCDoc types can only be used inside documentation comments."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:K(6048,1,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'."),Unable_to_open_file_0:K(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:K(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Version_0:K(6029,3,"Version_0_6029","Version {0}"),Unused_lpc_expect_error_directive:K(2578,1,"Unused_lpc_expect_error_directive_2578","Unused '@lpc-expect-error' directive."),The_left_hand_side_of_a_for_each_statement_cannot_be_a_destructuring_pattern:K(2491,1,"The_left_hand_side_of_a_for_each_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'foreach' statement cannot be a destructuring pattern."),The_left_hand_side_of_a_for_each_mapping_statement_must_be_a_variable_or_a_property_access:K(2487,1,"The_left_hand_side_of_a_for_each_mapping_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'foreach...mapping' statement must be a variable or a property access."),Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found:K(6386,3,"Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386","Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found.")};function td(e){return e>=89}function WT(e,n,r=!1){return{fileName:n,end:e,isSpeculative:r}}var ole={"#include":178,"#define":179,"#undef":180,"#if":181,"#ifdef":182,"#ifndef":183,"#else":184,"#elif":185,"#endif":186,"#pragma":187},ale=new Map(Object.entries(ole)),Uv={any:97,break:106,buffer:108,bytes:107,case:113,catch:100,class:133,closure:98,continue:121,default:114,do:109,else:110,false:135,float:93,foreach:112,for:111,functions:143,function:138,if:115,in:103,int:92,inherit:120,intrinsic:129,is:142,lwobject:95,mapping:104,mixed:101,new:145,nomask:130,null:137,nosave:127,object:140,private:122,protected:123,public:124,ref:141,return:116,static:125,string:94,status:134,struct:99,switch:117,symbol:139,true:136,undefined:96,unknown:102,varargs:131,virtual:144,void:105,while:118,async:119},sle=new Map(Object.entries(Uv)),f5=new Map(Object.entries({...Uv,"{":17,"}":19,"(":20,")":21,"[":22,"]":23,".":24,"..":73,"...":25,";":26,",":27,"<":29,">":32,"<..":31,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"->":40,"+":41,"-":42,"**":44,"*":43,"/":45,"%":46,"++":47,"--":48,"<<":49,"</":30,">>":50,">>>":51,"&":52,"|":53,"^":54,"!":55,"~":57,"&&":58,"||":59,"?":60,"??":64,"?.":28,":":61,"::":71,"=":74,"+=":75,"-=":76,"*=":77,"**=":78,"/=":79,"%=":80,"<<=":81,">>=":82,">>>=":83,"&=":84,"|=":85,"^=":88,"||=":86,"??=":87,"@":62,"@@":63,"#":65,"(:":66,"([":68,"({":69,"(*":70,"`":18}));var p5=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5905,5919,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70207,70208,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73474,73474,73476,73488,73490,73523,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824,78895,78913,78918,82944,83526,92160,92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,122624,122654,122661,122666,122928,122989,123136,123180,123191,123197,123214,123214,123536,123565,123584,123627,124112,124139,124896,124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,194560,195101,196608,201546,201552,205743];var cle=/^\/\/\/?\s*@(lpc-expect-error|lpc-ignore)/,lle=/^(?:\/|\*)*\s*@(lpc-expect-error|lpc-ignore)/;function m5(e,n){if(e<n[0])return!1;let r=0,i=n.length,a;for(;r+1<i;){if(a=r+(i-r)/2,a-=a%2,n[a]<=e&&e<=n[a+1])return!0;e<n[a]?i=a:r=a+2}return!1}function ule(e,n){return m5(e,p5)}function dle(e,n){return m5(e,p5)}function fle(e){let n=[];return e.forEach((r,i)=>{n[r]=i}),n}var ple=fle(f5);function Ai(e){return ple[e]}function tp(e){return f5.get(e)}function nh(e){let n=[],r=0,i=0;for(;r<e.length;){let a=e.charCodeAt(r);switch(r++,a){case 13:e.charCodeAt(r)===10&&r++;case 10:n.push(i),i=r;break;default:a>127&&ds(a)&&(n.push(i),i=r);break}}return n.push(i),n}function Kv(e,n,r,i){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(n,r,i):ND(yc(e),n,r,e.text,i)}function ND(e,n,r,i,a){(n<0||n>=e.length)&&(a?n=n<0?0:n>=e.length?e.length-1:n:E.fail(`Bad line number. Line: ${n}, lineStarts.length: ${e.length} , line map is correct? ${i!==void 0?Lv(e,nh(i)):"unknown"}`));let c=e[n]+r;return a?c>e[n+1]?e[n+1]:typeof i=="string"&&c>i.length?i.length:c:(n<e.length-1?E.assert(c<e[n+1]):i!==void 0&&E.assert(c<=i.length),c)}function yc(e){return e.lineMap||(e.lineMap=nh(e.text))}function xg(e,n){let r=lx(e,n);return{line:r,character:n-e[r]}}function lx(e,n,r){let i=Rd(e,n,Ci,io,r);return i<0&&(i=~i-1,E.assert(i!==-1,"position cannot precede the beginning of the file")),i}function kD(e,n,r){if(n===r)return 0;let i=yc(e),a=Math.min(n,r),c=a===r,u=c?n:r,f=lx(i,a),m=lx(i,u,f);return c?f-m:m-f}function ma(e,n){return xg(yc(e),n)}function Tu(e){return Jl(e)||ds(e)}function Jl(e){return e===32||e===9||e===11||e===12||e===160||e===133||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function ds(e){return e===10||e===13||e===8232||e===8233}function eh(e){return e>=48&&e<=57}function Y1(e){return eh(e)||e>=65&&e<=70||e>=97&&e<=102}function g5(e){return e>=65&&e<=90||e>=97&&e<=122}function mle(e){return g5(e)||eh(e)||e===95}function X1(e){return e>=48&&e<=55}function eo(e,n,r,i,a){if(ec(n))return n;let c=!1;for(;;){let u=e.charCodeAt(n);switch(u){case 13:e.charCodeAt(n+1)===10&&n++;case 10:if(n++,r)return n;c=!!a;continue;case 9:case 11:case 12:case 32:n++;continue;case 47:if(i)break;if(e.charCodeAt(n+1)===47){for(n+=2;n<e.length&&!ds(e.charCodeAt(n));)n++;c=!1;continue}if(e.charCodeAt(n+1)===42){for(n+=2;n<e.length;){if(e.charCodeAt(n)===42&&e.charCodeAt(n+1)===47){n+=2;break}n++}c=!1;continue}break;case 60:case 124:case 61:case 62:if(cx(e,n)){n=PD(e,n),c=!1;continue}break;case 35:if(n===0&&y5(e,n)){n=h5(e,n),c=!1;continue}break;case 42:if(c){n++,c=!1;continue}break;default:if(u>127&&Tu(u)){n++;continue}break}return n}}var Wv=7;function cx(e,n){if(E.assert(n>=0),n===0||ds(e.charCodeAt(n-1))){let r=e.charCodeAt(n);if(n+Wv<e.length){for(let i=0;i<Wv;i++)if(e.charCodeAt(n+i)!==r)return!1;return r===61||e.charCodeAt(n+Wv)===32}}return!1}function PD(e,n,r){r&&r(N.Merge_conflict_marker_encountered,n,Wv);let i=e.charCodeAt(n),a=e.length;if(i===60||i===62)for(;n<a&&!ds(e.charCodeAt(n));)n++;else for(E.assert(i===124||i===61);n<a;){let c=e.charCodeAt(n);if((c===61||c===62)&&c!==i&&cx(e,n))break;n++}return n}var tO=/^#!.*/;function y5(e,n){return E.assert(n===0),tO.test(e)}function h5(e,n){let r=tO.exec(e)[0];return n=n+r.length,n}function rO(e,n,r,i,a,c,u){let f,m,y,g,S=!1,_=i,b=u;if(r===0){_=!0;let v=ux(n);v&&(r=v.length)}e:for(;r>=0&&r<n.length;){let v=n.charCodeAt(r);switch(v){case 13:n.charCodeAt(r+1)===10&&r++;case 10:if(r++,i)break e;_=!0,S&&(g=!0);continue;case 9:case 11:case 12:case 32:r++;continue;case 47:let T=n.charCodeAt(r+1),W=!1;if(T===47||T===42){let F=T===47?2:3,M=r;if(r+=2,T===47)for(;r<n.length;){if(ds(n.charCodeAt(r))){W=!0;break}r++}else for(;r<n.length;){if(n.charCodeAt(r)===42&&n.charCodeAt(r+1)===47){r+=2;break}r++}if(_){if(S&&(b=a(f,m,y,g,c,b),!e&&b))return b;f=M,m=r,y=F,g=W,S=!0}continue}break e;default:if(v>127&&Tu(v)){S&&ds(v)&&(g=!0),r++;continue}break e}}return S&&(b=a(f,m,y,g,c,b)),b}function vD(e,n,r,i){return rO(!1,e,n,!1,r,i)}function gle(e,n,r,i,a){return rO(!0,e,n,!1,r,i,a)}function yle(e,n,r,i,a){return rO(!0,e,n,!0,r,i,a)}function T5(e,n,r,i,a,c=[]){return c.push({kind:r,pos:e,end:n,hasTrailingNewLine:i}),c}function Su(e,n){return gle(e,n,T5,void 0,void 0)}function rp(e,n){return yle(e,n,T5,void 0,void 0)}function ux(e){let n=tO.exec(e);if(n)return n[0]}function fl(e,n){return g5(e)||e===36||e===95||e>127&&ule(e,n)}function nd(e,n,r){return mle(e)||e===36||e>127&&dle(e,n)}function tm(e,n,r){let i=Z1(e,0);if(!fl(i,n))return!1;for(let a=ed(i);a<e.length;a+=ed(i))if(!nd(i=Z1(e,a),n,r))return!1;return!0}function KT(e,n,r,i=2,a,c,u,f){var m=a,y=!1,g=!0,S,_=1,b=2,v=[],T,W,F,M,J,A,V,ue,ye,he=0,ce=!1,Ee=!1,Fe=!1,be=0,de=0;Ve(m,u,f);var Ae={getTokenFullStart:()=>M,getStartPos:()=>M,getTokenEnd:()=>T,getFileName:()=>W,getTextPos:()=>T,getToken:()=>A,getTokenStart:()=>J,getTokenPos:()=>J,getTokenText:()=>m.substring(J,T),getTokenValue:()=>V,getStateId:()=>_,getState:Dr,releaseState:()=>{E.assertIsDefined(S),S?.()},resetSavedStates:()=>{S=void 0,b=2,_=1,v=[]},hasUnicodeEscape:()=>(ue&1024)!==0,hasExtendedUnicodeEscape:()=>(ue&8)!==0,hasPrecedingLineBreak:()=>(ue&1)!==0,hasPrecedingJSDocComment:()=>(ue&2)!==0,isIdentifier:()=>A===89||A>132,isReservedWord:()=>A>=92&&A<=132,isUnterminated:()=>(ue&4)!==0,getCommentDirectives:()=>ye,getNumericLiteralFlags:()=>ue&58352,getTokenFlags:()=>ue,reScanGreaterToken:Ie,reScanAsteriskEqualsToken:Oe,reScanLessThanToken:Ce,reScanLessThanTokenAsStringLiteral:fe,reScanHashToken:ne,reScanQuestionToken:sn,reScanInvalidIdentifier:Yt,reScanInclude:zt,scanJsDocToken:ge,scanJSDocCommentTextToken:H,scan:ot,switchStream:On,getText:sa,clearCommentDirectives:mo,setText:Ve,setReportLineBreak:te,setScriptTarget:Q,setLanguageVariant:ie,setScriptKind:Te,setJSDocParsingMode:q,setOnError:Le,setParseBracketAsStringLiteral:et,resetTokenState:qe,setTextPos:qe,setSkipJsDocLeadingAsterisks:dn,hasLeadingAsterisks:Jn,tryScan:zi,lookAhead:Rr,scanRange:Gt,getEnd:zo,setFileName:ke=>W=ke,getStateEndings:()=>v};return E.isDebugging&&(Object.defineProperty(Ae,"__debugShowCurrentPositionInText",{get:()=>{let ke=Ae.getText();return ke.slice(0,Ae.getTokenFullStart())+"\u2551"+ke.slice(Ae.getTokenFullStart())}}),Object.defineProperty(Ae,"__debugEndStates",{get:()=>JSON.stringify(Ae.getStateEndings(),void 0,2)})),Ae;function G(ke){return Z1(m,ke)}function Qe(ke){return ke>=0&&ke<F?G(ke):-1}function me(ke){return m.charCodeAt(ke)}function Se(ke){return ke>=0&&ke<F?me(ke):-1}function _n(ke,We=T,ln,zn){if(c){let St=T;T=We,c(ke,ln||0,zn),T=St}}function tt(){let ke=T,We=!1,ln=!1,zn="";for(;;){let St=me(T);if(St===95){ue|=512,We?(We=!1,ln=!0,zn+=m.substring(ke,T)):(ue|=16384,_n(ln?N.Multiple_consecutive_numeric_separators_are_not_permitted:N.Numeric_separators_are_not_allowed_here,T,1)),T++,ke=T;continue}if(eh(St)){We=!0,ln=!1,T++;continue}break}return me(T-1)===95&&(ue|=16384,_n(N.Numeric_separators_are_not_allowed_here,T-1,1)),zn+m.substring(ke,T)}function Pe(){let ke=T,We;if(me(T)===48)if(T++,me(T)===95)ue|=16896,_n(N.Numeric_separators_are_not_allowed_here,T,1),T--,We=tt();else if(!Ln())ue|=8192,We=""+ +V;else if(!V)We="0";else{V=""+parseInt(V,8),ue|=32;let kr=A===42,Or=(kr?"-":"")+"0o"+(+V).toString(8);return kr&&ke--,11}else We=tt();let ln,zn;me(T)===46&&me(T+1)!==46&&(T++,ln=tt());let St=T;if(me(T)===69||me(T)===101){T++,ue|=16,(me(T)===43||me(T)===45)&&T++;let kr=T,Or=tt();Or?(zn=m.substring(St,kr)+Or,St=T):_n(N.Digit_expected)}let ct;if(ue&512?(ct=We,ln&&(ct+="."+ln),zn&&(ct+=zn)):ct=m.substring(ke,St),ln!==void 0||ue&16)return $e(ke,ln===void 0&&!!(ue&16)),V=""+ +ct,11;{V=ct;let kr=gn();return $e(ke),kr}}function gn(){return V=""+(ue&128?parseInt(V.slice(2),2):ue&256?parseInt(V.slice(2),8):+V),11}function $e(ke,We){if(!fl(G(T),e))return;let ln=T,{length:zn}=xn();zn===1&&m[ln]==="n"?_n(We?N.A_bigint_literal_cannot_use_exponential_notation:N.A_bigint_literal_must_be_an_integer,ke,ln-ke+1):(_n(N.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,ln,zn),T=ln)}function Ln(){let ke=T,We=!0;for(;eh(Se(T));)X1(me(T))||(We=!1),T++;return V=m.substring(ke,T),We}function Vt(ke,We){let ln=Ye(ke,!1,We);return ln?parseInt(ln,16):-1}function Hn(ke,We){return Ye(ke,!0,We)}function Ye(ke,We,ln){let zn=[],St=!1,ct=!1;for(;zn.length<ke||We;){let kr=me(T);if(ln&&kr===95){ue|=512,St?(St=!1,ct=!0):_n(ct?N.Multiple_consecutive_numeric_separators_are_not_permitted:N.Numeric_separators_are_not_allowed_here,T,1),T++;continue}if(St=ln,kr>=65&&kr<=70)kr+=32;else if(!(kr>=48&&kr<=57||kr>=97&&kr<=102))break;zn.push(kr),T++,ct=!1}return zn.length<ke&&(zn=[]),me(T-1)===95&&_n(N.Numeric_separators_are_not_allowed_here,T-1,1),String.fromCharCode(...zn)}function se(){let ke=me(T);return T++,Xn()}function jn(){let ke=me(T);if(ke!==39)return!1;T++;let We=T;for(;;){if(T>=F)return!1;let ln=me(T);if(ln===ke)return!1;if(T>=1&&ln===44||ln===10||ln===13||ln===32||!nd(ln,e,i))return!0;T++}}function wn(ke){Cr(me(T),ke);let We=eO(eO(V,"@"),"@"),ln="",zn=T,St=T,ct=T,kr=T,Or="";for(;;){if(T>=F){ln+=m.substring(zn,T),ue|=4,_n(N.Unterminated_string_literal,St,1);break}let Rn=me(T);if(Tu(Rn)||iO(Rn)){if(m.substring(ct+1,T).trim()==We){ln+=m.substring(zn,T-We.length);break}ds(Rn)&&(ct=T),kr=T}else St=T;T++}return ln}function Xn(ke=!1){let We=me(T);T++;let ln="",zn=T;for(;;){if(T>=F){ln+=m.substring(zn,T),ue|=4,_n(N.Unterminated_string_literal);break}let St=me(T);if(St===We||We===60&&St===62){ln+=m.substring(zn,T),T++;break}if(St===92&&!ke){ln+=m.substring(zn,T),ln+=ft(3),zn=T;continue}if(i!==1&&(St===10||St===13)&&!ke){ln+=m.substring(zn,T),ue|=4,_n(N.Unterminated_string_literal);break}T++}return ln}function ft(ke){let We=T;if(T++,T>=F)return _n(N.Unexpected_end_of_text),"";let ln=me(T);switch(T++,ln){case 48:if(T>=F||!eh(me(T)))return"\0";case 49:case 50:case 51:T<F&&X1(me(T))&&T++;case 52:case 53:case 54:case 55:if(T<F&&X1(me(T))&&T++,ue|=2048,ke&6){let ct=parseInt(m.substring(We+1,T),8);return ke&4&&!(ke&32)&&ln!==48?_n(N.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead,We,T-We,"\\x"+ct.toString(16).padStart(2,"0")):_n(N.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0,We,T-We,"\\x"+ct.toString(16).padStart(2,"0")),String.fromCharCode(ct)}return m.substring(We,T);case 56:case 57:return ue|=2048,ke&6?(ke&4&&!(ke&32)?_n(N.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class,We,T-We):_n(N.Escape_sequence_0_is_not_allowed,We,T-We,m.substring(We,T)),String.fromCharCode(ln)):m.substring(We,T);case 98:return"\b";case 116:return" ";case 110:return`
56
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:if(ke&17&&T<F&&me(T)===123)return T-=2,Ft(!!(ke&6));for(;T<We+6;T++)if(!(T<F&&Y1(me(T))))return ue|=2048,ke&6&&_n(N.Hexadecimal_digit_expected),m.substring(We,T);ue|=1024;let zn=parseInt(m.substring(We+2,T),16),St=String.fromCharCode(zn);if(ke&16&&zn>=55296&&zn<=56319&&T+6<F&&m.substring(T,T+2)==="\\u"&&me(T+2)!==123){let ct=T,kr=T+2;for(;kr<ct+6;kr++)if(!Y1(me(T)))return St;let Or=parseInt(m.substring(ct+2,kr),16);if(Or>=56320&&Or<=57343)return T=kr,St+String.fromCharCode(Or)}return St;case 120:for(;T<We+4;T++)if(!(T<F&&Y1(me(T))))return ue|=2048,ke&6&&_n(N.Hexadecimal_digit_expected),m.substring(We,T);return ue|=4096,String.fromCharCode(parseInt(m.substring(We+2,T),16));case 13:T<F&&me(T)===10&&T++;case 10:case 8232:case 8233:return"";default:return(ke&16||ke&4&&!(ke&8)&&nd(ln,e))&&_n(N.This_character_cannot_be_escaped_in_a_regular_expression,T-2,2),String.fromCharCode(ln)}}function Ft(ke){let We=T;T+=3;let ln=T,zn=Hn(1,!1),St=zn?parseInt(zn,16):-1,ct=!1;return St<0?(ke&&_n(N.Hexadecimal_digit_expected),ct=!0):St>1114111&&(ke&&_n(N.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,ln,T-ln),ct=!0),T>=F?(ke&&_n(N.Unexpected_end_of_text),ct=!0):me(T)===125?T++:(ke&&_n(N.Unterminated_Unicode_escape_sequence),ct=!0),ct?(ue|=2048,m.substring(We,T)):(ue|=8,l5(St))}function Et(){if(T+5<F&&me(T+1)===117){let ke=T;T+=2;let We=Vt(4,!1);return T=ke,We}return-1}function At(){if(G(T+1)===117&&G(T+2)===123){let ke=T;T+=3;let We=Hn(1,!1),ln=We?parseInt(We,16):-1;return T=ke,ln}return-1}function xn(){let ke="",We=T;for(;T<F;){let ln=G(T);if(nd(ln,e))T+=ed(ln);else if(ln===92){if(ln=At(),ln>=0&&nd(ln,e)){ke+=Ft(!0),We=T;continue}if(ln=Et(),!(ln>=0&&nd(ln,e)))break;ue|=1024,ke+=m.substring(We,T),ke+=l5(ln),T+=6,We=T}else break}return ke+=m.substring(We,T),ke}function It(){let ke=V.length;if(ke>=2&&ke<=12){let We=V.charCodeAt(0);if(We>=97&&We<=122){let ln=sle.get(V);if(ln!==void 0)return A=ln}}return A=89}function pr(ke){let We="#"+V.substring(ke),ln=We.length;if(ln>=3&&ln<=12){let zn=We.charCodeAt(1);if(zn>=97&&zn<=122){let St=ale.get(We);if(St!==void 0)return A=St}}return A=89}function tn(ke){let We="",ln=!1,zn=!1;for(;;){let St=me(T);if(St===95){ue|=512,ln?(ln=!1,zn=!0):_n(zn?N.Multiple_consecutive_numeric_separators_are_not_permitted:N.Numeric_separators_are_not_allowed_here,T,1),T++;continue}if(ln=!0,!eh(St)||St-48>=ke)break;We+=m[T],T++,zn=!1}return me(T-1)===95&&_n(N.Numeric_separators_are_not_allowed_here,T-1,1),We}function ot(){for(M=T,ue=0,ce=!1,v[_]=WT(T,W);;){J=T;let ke=!1,We=!1;for(;g&&T>=F&&S;){let zn=_;We=S(),v[_]??(v[_]=WT(T,W)),v[_].end=T,ke=!0}if(We)return A;if(ke)continue;if(T>=F)return A=1;let ln=G(T);if(T===0&&ln===35&&y5(m,T)){if(T=h5(m,T),n)continue;return A=8}switch(ln){case 10:case 13:if(ue|=1,n&&!Ee){T++;continue}else return ln===13&&T+1<F&&me(T+1)===10?T+=2:T++,A=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(n){T++;continue}else{for(;T<F&&Jl(me(T));)T++;return A=5}case 33:return me(T+1)===61?me(T+2)===61?(T+=3,A=38):(T+=2,A=36):(T++,A=55);case 39:return fl(me(T+1),e)&&Rr(jn)?(T++,A=72):(V=Xn(!1),V.length>1&&_n(N.Character_literal_must_be_one_character,J,V.length+2),V=""+V.charCodeAt(0),ue|=32768,A=12);case 34:return V=Xn(),A=16;case 37:return me(T+1)===61?(T+=2,A=80):(T++,A=46);case 38:return me(T+1)===38?(T+=2,A=58):me(T+1)===61?(T+=2,A=84):(T++,A=52);case 40:return me(T+1)===91?(T+=2,A=68):me(T+1)===123?(T+=2,A=69):me(T+1)===42?(T+=2,A=70):(T++,A=20);case 41:return T++,A=21;case 42:if(me(T+1)===61)return T+=2,A=77;if(me(T+1)===42)return me(T+2)===61?(T+=3,A=78):(T+=2,A=44);if(T++,he&&!ce&&ue&1){ce=!0;continue}return A=43;case 43:return me(T+1)===43?(T+=2,A=47):me(T+1)===61?(T+=2,A=75):(T++,A=41);case 44:return T++,A=27;case 45:return me(T+1)===62?(T+=2,A=40):me(T+1)===45?(T+=2,A=48):me(T+1)===61?(T+=2,A=76):(T++,A=42);case 46:return eh(me(T+1))?(Pe(),A=13):me(T+1)===46?me(T+2)===46?(T+=3,A=25):(T+=2,A=73):(T++,A=24);case 47:if(me(T+1)===47){for(T+=2;T<F&&!ds(me(T));)T++;if(ye=Je(ye,m.slice(J,T),cle,J),n)continue;return A=2}if(me(T+1)===42){T+=2;let Li=me(T)===42&&me(T+1)!==47,yt=!1,Lo=J;for(;T<F;){let Ko=me(T);if(Ko===42&&me(T+1)===47){T+=2,yt=!0;break}T++,ds(Ko)&&(Lo=T,ue|=1)}if(Li&&Zn()&&(ue|=2),ye=Je(ye,m.slice(Lo,T),lle,Lo),yt||_n(N.Asterisk_Slash_expected),n)continue;return yt||(ue|=4),A=3}return me(T+1)===61?(T+=2,A=79):(T++,A=45);case 48:if(T+2<F&&(me(T+1)===88||me(T+1)===120))return T+=2,V=Hn(1,!0),V||(_n(N.Hexadecimal_digit_expected),V="0"),V="0x"+V,ue|=64,A=gn();if(T+2<F&&(me(T+1)===66||me(T+1)===98))return T+=2,V=tn(2),V||(_n(N.Binary_digit_expected),V="0"),V="0b"+V,ue|=128,A=gn();if(T+2<F&&(me(T+1)===79||me(T+1)===111))return T+=2,V=tn(8),V||(_n(N.Octal_digit_expected),V="0"),V="0o"+V,ue|=256,A=gn();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return A=Pe();case 58:return me(T+1)===58?(T+=2,A=71):(T++,A=61);case 59:return T++,A=26;case 60:if(cx(m,T)){if(T=PD(m,T,_n),n)continue;return A=6}return me(T+1)===60?me(T+2)===61?(T+=3,A=81):(T+=2,A=49):me(T+1)===61?(T+=2,A=33):me(T+1)===46&&me(T+2)===46?(T+=3,A=31):Fe?(V=Xn(),A=16):(T++,A=29);case 61:if(cx(m,T)){if(T=PD(m,T,_n),n)continue;return A=6}return me(T+1)===61?me(T+2)===61?(T+=3,A=37):(T+=2,A=35):me(T+1)===62?(T+=2,A=39):(T++,A=74);case 62:if(cx(m,T)){if(T=PD(m,T,_n),n)continue;return A=6}return T++,A=32;case 63:return me(T+1)===46&&!eh(me(T+2))?(T+=2,A=28):me(T+1)===63?me(T+2)===61?(T+=3,A=87):(T+=2,A=64):(T++,A=60);case 91:return T++,A=22;case 93:return T++,A=23;case 94:return me(T+1)===61?(T+=2,A=88):(T++,A=54);case 123:return T++,A=17;case 124:if(cx(m,T)){if(T=PD(m,T,_n),n)continue;return A=6}return me(T+1)===124?me(T+2)===61?(T+=3,A=86):(T+=2,A=59):me(T+1)===61?(T+=2,A=85):(T++,A=53);case 125:return T++,A=19;case 126:return T++,A=57;case 64:T++;let zn=me(T)===64;return zn&&T++,fl(me(T),e)?(V=wn(e),A=zn?15:16):A=zn?63:62;case 92:let St=At();if(St>=0&&fl(St,e))return V=Ft(!0)+xn(),A=It();let ct=Et();if(ct>=0&&fl(ct,e))return T+=6,ue|=1024,V=String.fromCharCode(ct)+xn(),A=It();switch(me(T+1)){case 13:T+2<F&&me(T+2)===10&&(T+=1);case 10:T+=2,ue|=1;continue}return _n(N.Invalid_character),T++,A=0;case 35:if(T!==0&&m[T+1]==="!")return _n(N.can_only_be_used_at_the_start_of_a_file,T,2),T++,A=0;if(me(T+1)===39)return T+=2,A=72;if(T===0||ds(me(T-1))){if(T++,A=xi(me(T),e),r)switch(A){case 181:case 184:case 185:case 186:case 183:case 182:for(;T<F&&!ds(me(T));)T++;continue;default:}return A}let kr=G(T+1);if(kr===92){T++;let Li=At(),yt=Et();T--}return fl(kr,e)?(T++,Cr(kr,e),A=90):(V="#",_n(N.Invalid_character,T++,ed(ln)),A=0);case 65533:return _n(N.File_appears_to_be_binary,0,0),T=F,A=9;case 98:if(me(T+1)===34)return V=se(),A=14;default:let Or=Cr(ln,e);if(Or)return A=Or;if(Jl(ln)){T+=ed(ln);continue}else if(ds(ln)){ue|=1,T+=ed(ln);continue}let Rn=ed(ln);return _n(N.Invalid_character,T,Rn),T+=Rn,A=0}}}function Zn(){switch(de){case 0:return!0;case 1:return!1}return!0}function zt(ke){J=M=ke;let We=ot();return E.assert(We===178,"Expected to rescan an include directive"),We}function Yt(){E.assert(A===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),T=J=M,ue=0;let ke=G(T),We=Cr(ke,1);return We?A=We:(T+=ed(ke),A)}function Cr(ke,We){let ln=ke;if(fl(ln,We)){for(T+=ed(ln);T<F&&nd(ln=G(T),We);)T+=ed(ln);return V=m.substring(J,T),ln===92&&(V+=xn()),It()}}function xi(ke,We){let ln=T,zn=ke;for(;T<F&&Jl(zn);)zn=G(++T);let St=T-ln+1;if(fl(zn,We)){for(T+=ed(zn);T<F&&nd(zn=G(T),We);)T+=ed(zn);return V=m.substring(J,T),zn===92&&(V+=xn()),pr(St)}}function Ie(){if(A===32){if(me(T)===62)return me(T+1)===62?me(T+2)===61?(T+=3,A=83):(T+=2,A=51):me(T+1)===61?(T+=2,A=82):(T++,A=50);if(me(T)===61)return T++,A=34}return A}function Oe(){return E.assert(A===77,"'reScanAsteriskEqualsToken' should only be called on a '*='"),T=J+1,A=74}function Je(ke,We,ln,zn){let St=Z(We.trimStart(),ln);return St===void 0?ke:$r(ke,{range:{pos:zn,end:T},type:St})}function Z(ke,We){let ln=We.exec(ke);if(ln)switch(ln[1]){case"lpc-expect-error":return 0;case"lpc-ignore":return 1}}function fe(){if(A===29)return T--,V=Xn(),A=16}function Ce(){return A===49?(T=J+1,A=29):A}function ne(){return A}function sn(){return E.assert(A===64,"'reScanQuestionToken' should only be called on a '??'"),T=J+1,A=60}function H(ke){if(M=J=T,ue=0,E.assert(!v[_]||v[_].end<=T,"State ending cannot be after the current position"),v[_]=WT(T,W),T>=F)return A=1;for(let We=me(T);T<F&&!ds(We)&&We!==96;We=G(++T))if(!ke){if(We===123)break;if(We===64&&T-1>=0&&Jl(me(T-1))&&!(T+1<F&&Tu(me(T+1))))break}return T===J?ge():(V=m.substring(J,T),A=91)}function ge(){if(M=J=T,ue=0,v[_]=WT(T,W),T>=F)return A=1;let ke=G(T);switch(T+=ed(ke),ke){case 9:case 11:case 12:case 32:for(;T<F&&Jl(me(T));)T++;return A=5;case 64:return A=62;case 13:me(T)===10&&T++;case 10:return ue|=1,A=4;case 42:return A=43;case 123:return A=17;case 125:return A=19;case 91:return A=22;case 93:return A=23;case 40:return A=20;case 41:return A=21;case 60:return A=29;case 62:return A=32;case 61:return A=74;case 44:return A=27;case 46:return A=24;case 96:return A=18;case 35:return A=65;case 92:T--;let We=At();if(We>=0&&fl(We,e))return V=Ft(!0)+xn(),A=It();let ln=Et();return ln>=0&&fl(ln,e)?(T+=6,ue|=1024,V=String.fromCharCode(ln)+xn(),A=It()):(T++,A=0)}if(fl(ke,e)){let We=ke;for(;T<F&&nd(We=G(T),e)||We===45;)T+=ed(We);return V=m.substring(J,T),We===92&&(V+=xn()),A=It()}else return A=0}function qn(ke=!1){let We=kn(ke),ln=_=b++;return()=>(_>=ln&&We(),v[ln]&&(v[ln].isSpeculative=ke),!1)}function kn(ke){let We=ke,ln=T,zn=F,St=M,ct=J,kr=A,Or=V,Rn=ue,Li=W,yt=S,Lo=_,Ko=m,Ua=g,ca=!1;return()=>{E.assert(!ca,"State has already been released"),ca=!0,ke=We,W=Li,T=ln,F=zn,M=St,J=ct,A=kr,V=Or,ue=Rn,_=Lo,m=Ko,g=Ua,S=yt}}function On(ke,We,ln,zn,St=!0,ct){let kr=qn();return y=!1,g=St,S=function(){let Or=_;return kr(),ct?.()},Ve(We,ln,zn),W=ke,v[_]=WT(T,W),S}function nn(ke,We){let ln=[...v],zn=_,St=b,ct=S,kr=qn(!0);y=!We;let Or=!0,Rn=!1;E.assert(_!=zn);let Li=S=function(Ko){return Ko?(Or=!1,!1):Rn?!1:Or?(Rn=!0,kr()):(Rn=!0,!1)},yt=_,Lo=ke();if(!Lo||We){for(;_>yt;)S();Li(),v=ln,b=St,E.assert(_<=zn,"State id mismatch")}else{Li(!0),E.assert(_>zn);let Ko=new Map,Ua=_;for(;Ua>=zn;){let ca=v[Ua].fileName;Ko.set(ca,Math.max(v[Ua].end,Ko.get(ca)||0)),v[Ua].end=Ko.get(ca),Ua--}_=zn,S=ct}return Lo}function Dr(ke){return v[ke]}function Gt(ke,We,ln){let zn=_,St=b,ct=[...v],kr=qn(),Or=_;y=!1,W="",v[_]=WT(ke,W),Ve(m,ke,We);let Rn=ln();for(;_>Or;)S();return kr(),v=ct,b=St,E.assert(_<=zn,"State id mismatch"),Rn}function Rr(ke){return nn(ke,!0)}function zi(ke){return nn(ke,!1)}function zo(){return F}function sa(){return m}function mo(){ye=void 0}function Ve(ke,We,ln){m=ke||"",F=ln===void 0?m.length:We+ln,qe(We||0)}function et(ke){Fe=ke}function Le(ke){c=ke}function Q(ke){e=ke}function ie(ke){i=ke}function Te(ke){be=ke}function te(ke){Ee=ke}function q(ke){de=ke}function qe(ke,We){E.assert(ke>=0),T=ke,M=ke,J=ke,A=0,V=void 0,ue=0,We&&(v[_]=WT(ke,W))}function dn(ke){he+=ke?1:-1}function Jn(){return ce}}function Z1(e,n){return e.codePointAt(n)}function ed(e){return e>=65536?2:e===-1?0:1}function hle(e){if(E.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);let n=Math.floor((e-65536)/1024)+55296,r=(e-65536)%1024+56320;return String.fromCharCode(n,r)}var Tle=String.fromCodePoint?e=>String.fromCodePoint(e):hle;function l5(e){return Tle(e)}var Zbe=new Map(Object.entries({General_Category:"General_Category",gc:"General_Category",Script:"Script",sc:"Script",Script_Extensions:"Script_Extensions",scx:"Script_Extensions"}));var u5={General_Category:new Set(["C","Other","Cc","Control","cntrl","Cf","Format","Cn","Unassigned","Co","Private_Use","Cs","Surrogate","L","Letter","LC","Cased_Letter","Ll","Lowercase_Letter","Lm","Modifier_Letter","Lo","Other_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter","M","Mark","Combining_Mark","Mc","Spacing_Mark","Me","Enclosing_Mark","Mn","Nonspacing_Mark","N","Number","Nd","Decimal_Number","digit","Nl","Letter_Number","No","Other_Number","P","Punctuation","punct","Pc","Connector_Punctuation","Pd","Dash_Punctuation","Pe","Close_Punctuation","Pf","Final_Punctuation","Pi","Initial_Punctuation","Po","Other_Punctuation","Ps","Open_Punctuation","S","Symbol","Sc","Currency_Symbol","Sk","Modifier_Symbol","Sm","Math_Symbol","So","Other_Symbol","Z","Separator","Zl","Line_Separator","Zp","Paragraph_Separator","Zs","Space_Separator"]),Script:new Set(["Adlm","Adlam","Aghb","Caucasian_Albanian","Ahom","Arab","Arabic","Armi","Imperial_Aramaic","Armn","Armenian","Avst","Avestan","Bali","Balinese","Bamu","Bamum","Bass","Bassa_Vah","Batk","Batak","Beng","Bengali","Bhks","Bhaiksuki","Bopo","Bopomofo","Brah","Brahmi","Brai","Braille","Bugi","Buginese","Buhd","Buhid","Cakm","Chakma","Cans","Canadian_Aboriginal","Cari","Carian","Cham","Cher","Cherokee","Chrs","Chorasmian","Copt","Coptic","Qaac","Cpmn","Cypro_Minoan","Cprt","Cypriot","Cyrl","Cyrillic","Deva","Devanagari","Diak","Dives_Akuru","Dogr","Dogra","Dsrt","Deseret","Dupl","Duployan","Egyp","Egyptian_Hieroglyphs","Elba","Elbasan","Elym","Elymaic","Ethi","Ethiopic","Geor","Georgian","Glag","Glagolitic","Gong","Gunjala_Gondi","Gonm","Masaram_Gondi","Goth","Gothic","Gran","Grantha","Grek","Greek","Gujr","Gujarati","Guru","Gurmukhi","Hang","Hangul","Hani","Han","Hano","Hanunoo","Hatr","Hatran","Hebr","Hebrew","Hira","Hiragana","Hluw","Anatolian_Hieroglyphs","Hmng","Pahawh_Hmong","Hmnp","Nyiakeng_Puachue_Hmong","Hrkt","Katakana_Or_Hiragana","Hung","Old_Hungarian","Ital","Old_Italic","Java","Javanese","Kali","Kayah_Li","Kana","Katakana","Kawi","Khar","Kharoshthi","Khmr","Khmer","Khoj","Khojki","Kits","Khitan_Small_Script","Knda","Kannada","Kthi","Kaithi","Lana","Tai_Tham","Laoo","Lao","Latn","Latin","Lepc","Lepcha","Limb","Limbu","Lina","Linear_A","Linb","Linear_B","Lisu","Lyci","Lycian","Lydi","Lydian","Mahj","Mahajani","Maka","Makasar","Mand","Mandaic","Mani","Manichaean","Marc","Marchen","Medf","Medefaidrin","Mend","Mende_Kikakui","Merc","Meroitic_Cursive","Mero","Meroitic_Hieroglyphs","Mlym","Malayalam","Modi","Mong","Mongolian","Mroo","Mro","Mtei","Meetei_Mayek","Mult","Multani","Mymr","Myanmar","Nagm","Nag_Mundari","Nand","Nandinagari","Narb","Old_North_Arabian","Nbat","Nabataean","Newa","Nkoo","Nko","Nshu","Nushu","Ogam","Ogham","Olck","Ol_Chiki","Orkh","Old_Turkic","Orya","Oriya","Osge","Osage","Osma","Osmanya","Ougr","Old_Uyghur","Palm","Palmyrene","Pauc","Pau_Cin_Hau","Perm","Old_Permic","Phag","Phags_Pa","Phli","Inscriptional_Pahlavi","Phlp","Psalter_Pahlavi","Phnx","Phoenician","Plrd","Miao","Prti","Inscriptional_Parthian","Rjng","Rejang","Rohg","Hanifi_Rohingya","Runr","Runic","Samr","Samaritan","Sarb","Old_South_Arabian","Saur","Saurashtra","Sgnw","SignWriting","Shaw","Shavian","Shrd","Sharada","Sidd","Siddham","Sind","Khudawadi","Sinh","Sinhala","Sogd","Sogdian","Sogo","Old_Sogdian","Sora","Sora_Sompeng","Soyo","Soyombo","Sund","Sundanese","Sylo","Syloti_Nagri","Syrc","Syriac","Tagb","Tagbanwa","Takr","Takri","Tale","Tai_Le","Talu","New_Tai_Lue","Taml","Tamil","Tang","Tangut","Tavt","Tai_Viet","Telu","Telugu","Tfng","Tifinagh","Tglg","Tagalog","Thaa","Thaana","Thai","Tibt","Tibetan","Tirh","Tirhuta","Tnsa","Tangsa","Toto","Ugar","Ugaritic","Vaii","Vai","Vith","Vithkuqi","Wara","Warang_Citi","Wcho","Wancho","Xpeo","Old_Persian","Xsux","Cuneiform","Yezi","Yezidi","Yiii","Yi","Zanb","Zanabazar_Square","Zinh","Inherited","Qaai","Zyyy","Common","Zzzz","Unknown"]),Script_Extensions:void 0};u5.Script_Extensions=u5.Script;function S5(){return{explode:e,implode:n,__lpcBinaryArrayHelper:r,__lpcBinaryHelper:i,__lpcIndexAccessHelper:a};function e(c,u){return c&&c.split(u)}function n(c,u){return c&&c.join(u)}function r(c,u,f){switch(f){case"+":return c.concat(u);case"-":return c.filter(m=>!u.includes(m));default:throw"Unhandled array operator "+f}}function i(c,u,f){if(Array.isArray(c)&&Array.isArray(u))return r(c,u,f);switch(f){case"+":return c+u;case"-":return c-u;case"*":return c*u;case"/":return c/u;case"==":return c==u;case"=":return u;default:throw new Error("Unhandled operator "+f)}}function a(c,u){if(typeof u=="number")return c[u];if(typeof u=="string"){let f=u.startsWith("<")?c.length-parseInt(u.slice(1))+1:parseInt(u);return c[f]}else if(typeof u=="object"){let{start:f,end:m}=u;return typeof f=="string"&&f.startsWith("<")&&(f=c.length-parseInt(f.slice(1))+1),typeof m=="string"&&m.startsWith("<")&&(m=c.length-parseInt(m.slice(1))+1),m===void 0?c.slice(f):f===void 0?c.slice(0,m):c.slice(f,m)}}}function qT(e){return Ia(e,"pos")&&Ia(e,"end")}function Ws(e){return e.name}function ra(e){return e.text}function nx(e){return(e.flags&16)===0}function Io(e,n){if(e===void 0||nx(e))return e;for(e=e.original;e;){if(nx(e))return!n||n(e)?e:void 0;e=e.original}}function Ji(e){return!!e&&th(e.kind)}function C5(e){switch(e){case 169:case 154:case 270:case 271:case 283:return!0;default:return!1}}function th(e){switch(e){case 156:case 151:case 202:case 283:case 150:case 158:case 196:return!0;default:return C5(e)}}function oO(e,n){To(e)&&(e=Qv(e));let r=n(e);return e.kind===237&&(e=e.parent),e&&e.kind===238&&(r|=n(e),e=e.parent),e&&e.kind===242&&(r|=n(e)),r}function rm(e){return oO(e,Sle)}function Sle(e){return e.flags}function Wl(e){switch(e.kind){case 236:case 283:case 151:case 240:case 255:case 168:case 243:case 244:case 169:case 270:case 158:case 150:case 217:case 219:case 196:case 202:case 225:case 264:case 176:case 239:return!0;default:return!1}}function pl(e){return!!e.name}function ID(e){switch(e.kind){case 89:return e;case 272:case 269:switch(es(e)){default:return}case 176:let n=e;return e.name}return e.name}function _le(e){if(e.parent){if(br(e.parent)&&e===e.parent.right){if(Sn(e.parent.left))return e.parent.left}else if(xo(e.parent)&&Sn(e.parent.name))return e.parent.name}else return}function ci(e){if(e!==void 0)return ID(e)||(fs(e)||Kl(e)?_le(e):void 0)}function bg(e){return e.kind===244}function id(e){return Pg(e,8)}function od(e){return D5(id(e).kind)}function D5(e){switch(e){case 268:case 286:case 281:case 276:case 278:case 272:case 273:case 237:case 290:case 291:case 289:case 283:case 293:case 282:case 277:case 274:case 270:case 89:case 284:case 285:case 11:case 13:case 16:case 14:case 135:case 137:case 136:case 71:case 173:return!0;default:return!1}}function Md(e){return e.kind===272||e.kind===276}function Zo(e){return U5(e.kind)}function $c(e){return e&&C5(e.kind)}function FD(e,n){if(!XT(e))return Re;let r=e.jsDoc?.jsDocCache;if(r===void 0||n){let i=rF(e,n);E.assert(i.length<2||i[0]!==i[1]),r=Oo(i,a=>Oc(a)?a.tags:a),n||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=r)}return r}function rh(e,n,r){return Sr(FD(e,r),n)}function aO(e){return rh(e,H5)}function er(e,n){for(;e;){let r=n(e);if(r==="quit")return;if(r)return e;e=e.parent}}function Cg(e){switch(e.kind){case 272:case 276:case 273:return!0;default:return!1}}function qv(e,n){switch(e.kind){case 243:case 244:case 245:case 246:return!0}return!1}function xle(e){return e===283||e===266||e===274||e===169||e===270||e===149||e===174||e===152||e===175||e===148||e===237||e===225||e===217||e===227}function ad(e){return e.kind===148?e.parent&&e.parent.kind!==224:xle(e.kind)}function Po(e){return e?e.kind===265:!1}function ip(e){switch(e.kind){case 283:case 269:case 266:case 272:case 274:case 281:case 169:case 270:case 89:case 150:case 217:case 219:case 196:case 220:case 227:case 202:case 225:case 201:case 276:case 11:case 13:case 293:case 149:case 286:case 174:case 152:case 175:case 176:case 16:case 163:case 148:case 237:return!0;default:return!1}}function sO(e){return Vr(e)||_c(e)&&Ji(e.parent)}function ble(e){return e===169||e===173||e===170||e===239||e===241||e===172}function Cle(e){return e.kind!==236||e.parent!==void 0&&e.parent.kind===255?!1:!Ng(e)}function E5(e){return e===250||e===251||e===245||e===247||e===254||e===244||e===243||e===253||e===249||e===248||e===256||e===242||e===246||e===233}function im(e){let n=e.kind;return E5(n)||ble(n)||Cle(e)}function ih(e){return oO(e,Df)}function Tc(e){return Dle(id(e).kind)}function Dle(e){switch(e){case 267:case 283:case 269:case 294:case 235:case 234:return!0;default:return P5(e)}}function dx(e){return P5(id(e).kind)}function P5(e){switch(e){case 298:case 288:case 296:case 279:return!0;default:return D5(e)}}function LD(e){let n=tp(e.text);return n?Wo(n,Qc):void 0}function VT(e){return Vv(e.kind)}function Vv(e){return e>=0&&e<=145}function Hv(e){return e.kind===203||e.kind===204||e.kind===205}function zv(e){return e.kind===199||e.kind===198||e.kind===200||Hv(e)||ah(e)||Jd(e)||Ef(e)}function fx(e){return e>=146}function Dg(e){return e.kind===89}function rd(e){return e.start+e.length}function Rc(e,n){if(e<0)throw new Error("start < 0");if(n<0)throw E.fail("length < 0"),new Error("length < 0");return{start:e,length:n}}function Sc(e,n){return Rc(e,n-e)}function op(e){return!!e.initializer}function px(e){return e.kind===250||e.kind===251}function oh(e){let n=e.kind;return n===146||n===89}function Gv(e){return!1}function om(e){let n=e.kind;return n===89||n===16||n===11||n===147}function cO(e){switch(e.kind){case 293:case 290:case 270:case 274:return!0}return!1}function $v(e){let n=e.kind;return n===286||n===146}function N5(e,n){return n>=e.pos&&n<=e.end}function HT(e){return 11<=e&&e<=16}var _5=1073741823;function lO(e){let n=_5;for(let r of e){if(!r.length)continue;let i=0;for(;i<r.length&&i<n&&Tu(r.charCodeAt(i));i++);if(i<n&&(n=i),n===0)return 0}return n===_5?void 0:n}function ks(e,n){if(e)for(;e.original!==void 0;)e=e.original;return!e||!n||n(e)?e:void 0}function zT(e){return HT(e.kind)}function mx(e){switch(e.kind){case 237:case 149:case 266:case 152:case 174:return!0;default:return!1}}function k5(e){let n=Vo(e.parameters);return!!n&&AD(n)}function AD(e){let n=hc(e)?e.typeExpression&&e.typeExpression.type:e.type;return e.dotDotDotToken!==void 0||!!n&&n.kind===197||!!(Df(e)&512)}function Qv(e){let n=e.parent;for(;To(n.parent);)n=n.parent.parent;return n.parent}function Sa(e){return!!e&&(e.kind===170||e.kind===274||e.kind===176)}function am(e){return Sn(e)&&e.emitNode?.autoGenerate!==void 0}function Yv(e,n){if(n<0)throw new Error("newLength < 0");return{span:e,newLength:n}}var Xv=Yv(Rc(0,0),0);function v5(e){if(e.length===0)return Xv;if(e.length===1)return e[0];let n=e[0],r=n.span.start,i=rd(n.span),a=r+n.newLength;for(let c=1;c<e.length;c++){let u=e[c],f=r,m=i,y=a,g=u.span.start,S=rd(u.span),_=g+u.newLength;r=Math.min(f,g),i=Math.max(m,m+(S-y)),a=Math.max(_,_+(y-S))}return Yv(Sc(r,i),a-r)}function uO(e){return oO(e,K5)}function GT(e){return wT(e,Sx,tF)}function dO(e){switch(e?.driverType){case 1:return"efuns/fluffos/";case 0:default:return"efuns/ldmud/"}}function fO(e){switch(e?.driverType){case 1:return"efuns.fluffos.h";case 0:default:return"efuns.ldmud.h"}}function Ul(e){return dh(e)||vs(e)}function Zv(e){return e.kind===16}function ah(e){return e.kind>=188&&e.kind<=231}function $T(e){return e.kind===150}function pO(e){return Cg(e)||MD(e)}function gx(e){return!!e.type}function _u(e){return e.kind===16}function eF(e){return!!(lh(e)&167)}function F5(e){return eF(e)||e===125}function sm(e){return sh(e.kind)}function sh(e){switch(e){case 119:case 114:case 124:case 122:case 123:case 125:case 131:case 130:case 128:case 127:case 143:case 144:return!0}return!1}function cm(e){return FD(e,!1)}function Eg(e){return e.kind===227||e.kind===220}function wD(e){return E5(e.kind)}function QT(e){let n=e.kind;return n===152||n===154||n===150}function mO(e){return $T(e)||QT(e)}function I5(e,n){if(e.name)if(Sn(e.name)){let r=e.name.text;return FD(e.parent,n).filter(i=>hc(i)&&Sn(i.name)&&i.name.text===r)}else{let r=e.parent.parameters.indexOf(e);E.assert(r>-1,"Parameters should always be in their parents' parameter list");let i=FD(e.parent,n).filter(hc);if(r<i.length)return[i[r]]}return Re}function yx(e){return I5(e,!1)}function L5(e){return I5(e,!0)}function A5(e,n){let r=e.name.text;return FD(e.parent,n).filter(i=>wc(i)&&i.typeParameters.some(a=>a.name.text===r))}function YT(e){let n=rh(e,ZT);return!n&&_o(e)&&(n=Sr(yx(e),r=>!!r.typeExpression)),n&&n.typeExpression&&n.typeExpression.type}function RD(e){let n=e.kind;return n===279||n===296}function w5(e){return A5(e,!0)}function R5(e){return A5(e,!1)}function OD(e){return e.constraint?e.constraint:wc(e.parent)&&e===e.parent.typeParameters[0]?e.parent.constraint:void 0}function O5(e){if(xu(e,67559))return Ar(e.modifiers,sm)}function ch(e){let n=rh(e,ZT);if(n&&n.typeExpression&&n.typeExpression.type)return n}function nF(e){return rh(e,oF)}function gO(e,n){return cm(e).filter(n)}function M5(e){return gO(e,z5)}function yO(e,n,r){return Ele(e.start,e.length,n,r)}function Ele(e,n,r,i){let a=e+n,c=r+i;return r<=a&&c>=e}function Ple(e){return rh(e,_x)}function B5(e){let n=Ple(e);if(n&&n.typeExpression)return n.typeExpression.type;let r=ch(e);if(r&&r.typeExpression){let i=r.typeExpression.type;if(Bd(i)){let a=Sr(i.members,G5);return a&&a.type}if(kg(i)||aF(i))return i.type}}function hx(e){if(Ef(e)){if(uh(e.parent)){let n=Tx(e.parent);if(n&&gr(n.tags))return Oo(n.tags,r=>wc(r)?r.typeParameters:void 0)}return Re}if(jd(e))return E.assert(e.parent.kind===199),Oo(e.parent.tags,n=>wc(n)?n.typeParameters:void 0);if(e.typeParameters||q5(e)&&e.typeParameters)return e.typeParameters;if(wr(e)){let n=V5(e);if(n.length)return n;let r=YT(e);if(r&&kg(r)&&r.typeParameters)return r.typeParameters}return Re}function hO(e){return rh(e,$5)}function j5(e){return!!rh(e,hc)}function TO(e){return rh(e,iF)}function J5(e){return e.kind===166||e.kind===280}var x5=["zh-cn"];function W5(e,n,r){let i=e.toLowerCase(),a=/^([a-z]+)([_-]([a-z]+))?$/.exec(i);if(!a){r&&r.push(Ac(N.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1,"en","zh-cn"));return}let c=a[1],u=a[3];c!="en"&&r&&!Gr(x5,i)&&!Gr(x5,c)&&r.push(Ac(N.Locale_0_is_not_supported,e)),WK(e)}var pF=ig(require("vm"));var bO=[],UD=160,c9=1e6,pa={getNodeConstructor:()=>SO,getTokenConstructor:()=>f9,getIdentifierConstructor:()=>p9,getSourceFileConstructor:()=>SO,getSymbolConstructor:()=>d9,getTypeConstructor:()=>u9,getSignatureConstructor:()=>l9},Fle=[];function l9(e,n){this.flags=n,E.isDebugging&&(this.checker=e)}function u9(e,n){this.flags=n,(E.isDebugging||In)&&(this.checker=e)}function d9(e,n){this.flags=e,this.name=n,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}function SO(e,n,r){this.pos=n,this.end=r,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function f9(e,n,r){this.pos=n,this.end=r,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function p9(e,n,r){this.pos=n,this.end=r,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function Ile(e,n){return e.end=n,e}function ns(e,n,r){return Ile(CO(e,n),r)}function CO(e,n){return e.pos=n,e}function m9(e,n,r){return ns(e,n,n+r)}function DO(e,n,r){E.assertGreaterThanOrEqual(n,0),E.assertGreaterThanOrEqual(r,0),E.assertLessThanOrEqual(n,e.length),E.assertLessThanOrEqual(n+r,e.length)}var Q5;function um(e){return Q5&&Q5[e.key]||e.message}function rS(e,n){return e.replace(/{(\d+)}/g,(r,i)=>""+E.checkDefined(n[+i]))}function Px(e,n,r,i,a,...c){E.assertIsDefined(n),r+i>n.length&&(i=n.length-r),DO(n,r,i);let u=um(a);return Pn(c)&&(u=rS(u,c)),{file:void 0,start:r,length:i,messageText:u,category:a.category,code:a.code,reportsUnnecessary:a.reportsUnnecessary,fileName:e}}function Nx(e,n){let r=[];for(let i of e)i.fileName===n.fileName&&r.push(g9(i,n));return r}function g9(e,n){let r=n.fileName||"",i=n.text.length;E.assertEqual(e.fileName,r),E.assertLessThanOrEqual(e.start,i),E.assertLessThanOrEqual(e.start+e.length,i);let a={file:n,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){a.relatedInformation=[];for(let c of e.relatedInformation)Lle(c)&&c.fileName===r?(E.assertLessThanOrEqual(c.start,i),E.assertLessThanOrEqual(c.start+c.length,i),a.relatedInformation.push(g9(c,n))):a.relatedInformation.push(c)}return a}function Lle(e){return e.file===void 0&&e.start!==void 0&&e.length!==void 0&&typeof e.fileName=="string"}function a5(e){return y9(e)|Ale(e)}function Ale(e){return 0}function y9(e){return Qx(e)?EO(e.modifiers):0}function EO(e){let n=0;if(e)for(let r of e)n|=lh(r.kind);return n}function lh(e){switch(e){case 125:return 256;case 124:return 1;case 123:return 4;case 122:return 2;case 130:return 32;case 128:return 64;case 127:return 128;case 126:return 1024;case 131:return 512}return 0}function ec(e){return!(e>=0)}function Zi(e){return ec(e.pos)||ec(e.end)}function $t(e){for(;e&&e.kind!==176;)e=e.parent;return e}function Mc(e,n=!1){let r=e;for(;e&&e.kind!==176&&!(e.kind===178&&(!n||e.parent&&e.parent.kind===176)&&e.text&&e!=r);)e=e.parent;return e}function np(e,n,r=!1){return wle(e.text,n,r)}function wle(e,n,r=!1){if(Da(n))return"";let i=e.substring(r?n.pos:eo(e,n.pos),n.end);return Rle(n)&&(i=i.split(/\r\n|\n|\r/).map(a=>a.replace(/^\s*\*/,"").trimStart()).join(`
57
+ `)),i}function Rle(e){return!!er(e,Bg)}function Da(e){return e===void 0?!0:e.pos===e.end&&e.pos>=0&&e.kind!==1}function xc(e,n){return e&&n&&(e.parent=n),e}function Wi(e){let n=new Map;if(e)for(let r of e)n.set(r.name,r);return n}function dm(e){if(e.kind===270||e.kind===283){let n=e,r=e.parent;for(;r.kind===289;)n=r,r=r.parent;if(r.kind===272&&r.expression===n)return r}}function lm(e){return!Da(e)}function mF(e){return(rm(e)&1)!==0||Ole(e)}function Ole(e){let n=e;return n.kind===237&&n.parent.kind===255}function Th(e){return e.kind===149}function xu(e,n){return!!Mle(e,n)}function Mle(e,n){return PO(e)&n}function PO(e){return NO(e,!1)}function NO(e,n,r){return e.kind>=0&&e.kind<=145?0:(e.modifierFlagsCache&536870912||(e.modifierFlagsCache=y9(e)|536870912),Ble(e.modifierFlagsCache))}function Ble(e){return e&2023}function jle(e){return 0}function es(e){let n=jle(e);return n===5?n:0}function Y5(e){return br(e)||Sn(e)||ao(e)}function KD(e,n){let{valueDeclaration:r}=e;(!r||!(n.flags&33554432&&!(r.flags&33554432))&&Y5(r)&&!Y5(n)||r.kind!==n.kind)&&(e.valueDeclaration=n)}function ia(e,...n){return!n.length||!Nr(n)||(e.relatedInformation||(e.relatedInformation=[]),E.assert(e.relatedInformation!==Re,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...n.slice(0,100))),e}function Fg(e){switch(e.kind){case 89:case 16:case 11:return!0;default:return!1}}function kx(e){return e.end-e.pos}function Fs(e){return!e||kx(e)===0?"(Missing)":ml(e)}function ml(e,n=!1){return(Sn(e)||ji(e)?e.text:void 0)??np(Mc(e),e,n)}function gF(e,n){for(;rue(n)&&n.parent;)n=n.parent;let r=n;switch(n.kind){case 176:{let c=eo(e.text,0,!1);return c===e.text.length?Rc(0,0):ph(e,c)}case 237:case 266:case 274:case 169:case 270:case 152:r=n.name;break;case 299:case 301:{let c=eo(e.text,n.pos),u=Math.max(n.end,n.statements.length>0?n.statements[0].pos:n.end);return Sc(c,u)}case 248:{let c=eo(e.text,n.pos);return ph(e,c)}}if(r===void 0)return ph(e,n.pos);let i=Da(r);E.assertIsDefined(e);let a=i?r.pos:eo(e.text,r.pos);return i?(E.assert(a===r.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),E.assert(a===r.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(E.assert(a>=r.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),E.assert(a<=r.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),Sc(a,r.end)}function ph(e,n){let r=KT(e.languageVersion,!0,!1,e.languageVariant,e.text,void 0,n);r.scan();let i=r.getTokenStart();return Sc(i,r.getTokenEnd())}function gl(e,n,r,...i){let a=gF(e,n);return sd(e,a.start,a.length,r,...i)}function sd(e,n,r,i,...a){n>e.text.length&&(n=0),DO(e.text,n,r);let c=um(i);return Pn(a)&&(c=rS(c,a)),{file:e,start:n,length:r,messageText:c,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary,reportsDeprecated:i.reportsDeprecated}}function qD(e){switch(e.kind){case 16:case 11:case 13:return!0;default:return!1}}function h9(e){return qD(e)&&e.text==="0"}function kO(e){return qD(e)&&e.text.length>0&&e.text!="0"}function T9(e){return br(e)&&VD(e.operatorToken.kind)}function VD(e){return e===86||e===87}function vO(e){return e===59||e===58}function FO(e){return vO(e)}function vx(e){return br(e)&&FO(e.operatorToken.kind)}function qd(e){return e>=74&&e<=88}function Jle(e,n=15){switch(e.kind){case 289:return(n&1)!==0;case 234:return(n&8)!==0}return!1}function Pg(e,n=15){for(;Jle(e,n);)e=e.expression;return e}function S9(e){for(;e.parent&&e.kind===289;)e=e.parent;return e}function Vd(e){return!!IO(e)}function IO(e){let n=e.parent;for(;;){switch(n.kind){case 269:let r=n,i=r.operatorToken.kind;return qd(i)&&r.left===e?r:void 0;case 298:case 288:let a=n,c=a.operator;return c===47||c===48?a:void 0;case 244:let u=n;return u.initializer===e?u:void 0;case 289:case 290:case 294:e=n;break;case 175:if(n.name!==e)return;e=n.parent;break;case 174:if(n.name===e)return;e=n.parent;break;default:return}n=e.parent}}function Dx(e){return e.kind===89||e.kind===71||e.kind===286&&Dx(e.expression)||e.kind===289&&Dx(e.expression)}function $o(e,n){let r=n?17:1;return Pg(e,r)}function HD(){let e=[],n=[],r=new Map,i=!1;return{add:c,lookup:a,getGlobalDiagnostics:u,getDiagnostics:f};function a(m){let y;if(m.file?y=r.get(m.file.fileName):y=e,!y)return;let g=Rd(y,m,Ci,_O);if(g>=0)return y[g];if(~g>0&&tF(m,y[~g-1]))return y[~g-1]}function c(m){let y;m.file?(y=r.get(m.file.fileName),y||(y=[],r.set(m.file.fileName,y),Xf(n,m.file.fileName,ul))):(i&&(i=!1,e=e.slice()),y=e),Xf(y,m,_O,tF)}function u(){return i=!0,e}function f(m){if(m)return r.get(m)||[];let y=vT(n,g=>r.get(g));return e.length&&y.unshift(...e),y}}function sF(e){return e.canonicalHead?.code||e.code}function cF(e){return e.canonicalHead?.messageText||e.messageText}function lF(e){return e.file?e.file.path:void 0}function Wle(e,n){let r=cF(e),i=cF(n);typeof r!="string"&&(r=r.messageText),typeof i!="string"&&(i=i.messageText);let a=typeof e.messageText!="string"?e.messageText.next:void 0,c=typeof n.messageText!="string"?n.messageText.next:void 0,u=ul(r,i);return u||(u=Ule(a,c),u)?u:e.canonicalHead&&!n.canonicalHead?-1:n.canonicalHead&&!e.canonicalHead?1:0}function _O(e,n){let r=sF(e),i=sF(n);return ul(lF(e),lF(n))||io(e.start,n.start)||io(e.length,n.length)||io(r,i)||Wle(e,n)||0}function Ule(e,n){return e===void 0&&n===void 0?0:e===void 0?1:n===void 0?-1:_9(e,n)||x9(e,n)}function _9(e,n){if(e===void 0&&n===void 0)return 0;if(e===void 0)return 1;if(n===void 0)return-1;let r=io(n.length,e.length);if(r)return r;for(let i=0;i<n.length;i++)if(r=_9(e[i].next,n[i].next),r)return r;return 0}function x9(e,n){let r;for(let i=0;i<n.length;i++){if(r=ul(e[i].messageText,n[i].messageText),r)return r;if(e[i].next!==void 0&&(r=x9(e[i].next,n[i].next),r))return r}return 0}function tF(e,n){let r=sF(e),i=sF(n),a=cF(e),c=cF(n);return ul(lF(e),lF(n))===0&&io(e.start,n.start)===0&&io(e.length,n.length)===0&&io(r,i)===0&&Kle(a,c)}function Kle(e,n){let r=typeof e=="string"?e:e.messageText,i=typeof n=="string"?n:n.messageText;return ul(r,i)===0}function LO({compilerOptions:e,requireSymbol:n,argumentsSymbol:r,error:i,getSymbolOfDeclaration:a,globals:c,lookup:u,setRequiresScopeChangeCache:f=Yy,getRequiresScopeChangeCache:m=Yy,onPropertyWithInvalidInitializer:y=jl,onFailedToResolveSymbol:g=Yy,onSuccessfullyResolvedSymbol:S=Yy}){var _=Wi();return b;function b(M,J,A,V,ue,ye){let he=M,ce,Ee,Fe,be,de,Ae=!1,G,Qe=gi(J)?J:J?.text,me=!gi(J)&&iI(J.parent)?J.parent.namespace:void 0,Se=me?ml(me)??"*":void 0;if(Se==="efun"){let _n=c.get("efun::");if(_n&&(ce=u(_n.members,Qe,A)))return ce}(Se||A&268435456)&&(M=$t(M));e:for(;M;){if(!Se&&Wl(M)&&M.locals&&(ce=u(M.locals,Qe,A))){let _n=!0;if(Ji(M)&&Ee&&Ee!==M.body&&(A&ce.flags&788968&&Ee.kind!==199&&(_n=ce.flags&262144?!!(Ee.flags&16)||Ee===M.type||Ee.kind===149||Ee.kind===220||Ee.kind===221||Ee.kind===148:!1),A&ce.flags&3&&(v(ce,M,Ee)?_n=!1:ce.flags&1&&(_n=Ee.kind===149||!!(Ee.flags&16)||Ee===M.type&&!!er(ce.valueDeclaration,_o)))),_n)break e;ce=void 0}switch(Ae=Ae||T(M,Ee),M.kind){case 176:let _n=a(M);if(!Se&&((ce=u(_n.members,Qe,A))||(ce=u(_n.exports,Qe,A))))break e;let tt=_n.inherits,Pe=Array.from(tt?.entries()??Re),gn=new Set;for(;!ce&&Pe.length;){let[Ln,Vt]=Pe.shift();if(gn.has(Ln))continue;gn.add(Ln);let Hn=Vt?.symbol?.exports??_;if(ce=u(Hn,Qe,A),ce||(ce=u(Vt?.symbol?.members??_,Qe,A)),ce)break e;let Ye=Vt?.symbol?.inherits;Pe.push(...Ye?.entries()??Re)}break;case 152:break;case 241:case 274:if(ce=u(a(M).members||_,Qe,A&788968)){if(!F(ce,M)){ce=void 0;break}break e}break;case 283:case 169:if(A&3&&/^\$\d+$/.test(Qe)){ce=r;break e}else if(A&16&&Qe==="$"){ce=r;break e}break;case 270:if(A&3&&Qe==="arguments"){ce=r;break e}if(A&16){let Ln=M.name;if(Ln&&Qe===Ln.text){ce=M.symbol;break e}}break;case 225:case 217:case 219:case 231:let $e=Tx(M);$e&&(M=$e.parent);break;case 149:Ee&&(Ee===M.initializer||Ee===M.name)&&(de||(de=M));break}W(M,Ee)&&(Fe=M),Ee=M,M=wc(M)?GD(M)||M.parent:(hc(M)||_x(M))&&oS(M)||M.parent}if(ue&&ce&&(!Fe||ce!==Fe.symbol)&&(ce.isReferenced|=A),ce||(Ee&&E.assertNode(Ee,Vr),ye||(ce=u(c,Qe,A))),V){if(be&&y(he,Qe,be,ce))return;if(ce)S(he,ce,A,Ee,de,Ae);else{let _n=g(he,J,A,V);_n&&(ce=_n)}}return ce}function v(M,J,A){let V=J;return _o(A)&&V.body&&M.valueDeclaration&&M.valueDeclaration.pos>=V.body.pos&&M.valueDeclaration.end<=V.body.end,!1;function ue(he){return ye(he.name)||!!he.initializer&&ye(he.initializer)}function ye(he){switch(he.kind){case 283:case 270:case 169:return!1;case 174:return ye(he.name);case 152:return ye(he.name);default:return Zo(he)?!1:No(he,ye)||!1}}}function T(M,J){return M.kind!==283&&M.kind!==270?($c(M)||M.kind===152)&&(!J||J!==M.name):J&&J===M.name?!1:M.asteriskToken?!0:!dm(M)}function W(M,J){switch(M.kind){case 149:return!!J&&J===M.name;case 169:case 241:case 170:case 155:case 239:return!0;default:return!1}}function F(M,J){if(M.declarations){for(let A of M.declarations)if(A.kind===148&&(wc(A.parent)?zD(A.parent):A.parent)===J)return!0}return!1}}function zD(e){let n=Tx(e);if(!n)return;let r=n.parent;if(r&&r.jsDoc&&n===Vo(r.jsDoc))return r}function Tx(e){return er(e.parent,Oc)}function Fx(e){if(e.declarations){for(let n of e.declarations)if(n.localSymbol)return n.localSymbol}}function GD(e){if(Oc(e.parent)&&e.parent.tags){let n=Sr(e.parent.tags,jd);if(n)return n}return oS(e)}function U5(e){return e>=157&&e<=168||e===102||e===92||e===93||e===140||e===101||e===94||e===104||e===105||e===98||e===99||e===258||e===133||e===191||e===192||e===193||e===194||e===195||e===196||e===197}function wi(e,n,...r){let i=Mc(e);return E.assertIsDefined(i.text),gl(i,e,n,...r)}function Ac(e,...n){let r=um(e);return Pn(n)&&(r=rS(r,n)),{file:void 0,start:void 0,length:void 0,messageText:r,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated}}function Us(e){return e.kind===286||e.kind===281}function Ks(e){return e.kind===89||AO(e)}function AO(e){return Ti(e)&&Sn(e.name)&&Ks(e.expression)}function b9(e){return Ks(e)||Kl(e)}function Ix(e){return C9(e,!0)}function C9(e,n){return!1}function D9(e,...n){return{code:e.code,messageText:wO(e,...n)}}function wO(e,...n){let r=um(e);return Pn(n)&&(r=rS(r,n)),r}function yF(e){return e.externalModuleIndicator!==void 0}function fm(e){switch(e.kind){case 71:case 290:case 287:case 293:case 286:case 281:case 272:case 276:case 289:case 270:case 274:case 283:case 298:case 288:case 269:case 267:case 294:case 295:return!0;case 190:case 89:case 11:case 13:case 16:return qle(e);default:return!1}}function qle(e){let{parent:n}=e;switch(n.kind){case 237:case 149:case 152:case 174:return n.initializer===e;case 247:case 253:case 245:case 246:case 248:case 256:case 299:return n.expression===e;case 243:let r=n;return r.initializer===e&&r.initializer.kind!==238||r.condition===e||r.incrementor===e;case 244:let i=n;return i.initializer===e&&i.initializer.kind!==238||i.expression===e;case 175:return n.objectAssignmentInitializer===e;default:return fm(n)}}function hF(e){return!!(e.flags&33554432)||!(fm(e)||Vle(e))}function Vle(e){return Sn(e)&&ud(e.parent)&&e.parent.name===e}function TF(e){return eS(e)===1}function Lx(e){return eS(e)!==0}function eS(e){let{parent:n}=e;switch(n?.kind){case 289:return eS(n);case 288:case 298:let{operator:r}=n;return r===47||r===48?2:0;case 269:let{left:i,operatorToken:a}=n;return i===e&&qd(a.kind)?(a.kind===74,2):0;case 286:return n.name!==e?0:eS(n);case 174:{let c=eS(n.parent);return e===n.name?Hle(c):c}case 175:return e===n.objectAssignmentInitializer?0:eS(n.parent);case 290:return eS(n);default:return 0}}function Hle(e){switch(e){case 0:return 1;case 1:return 0;case 2:return 2;default:return E.assertNever(e)}}function XT(e){switch(e.kind){case 269:case 236:case 250:case 299:case 274:case 251:case 179:case 245:case 281:case 254:case 1:case 247:case 244:case 243:case 169:case 270:case 158:case 89:case 253:case 178:case 283:case 252:case 150:case 196:case 202:case 293:case 149:case 289:case 286:case 174:case 152:case 153:case 248:case 175:case 256:case 148:case 237:case 242:case 246:return!0;default:return!1}}function rF(e,n){let r;jx(e)&&op(e)&&nc(e.initializer)&&(r=Ro(r,X5(e,e.initializer.jsDoc)));let i=e;for(;i&&i.parent;){if(nc(i)&&(r=Ro(r,X5(e,i.jsDoc))),i.kind===149){r=Ro(r,(n?L5:yx)(i));break}if(i.kind===148){r=Ro(r,(n?w5:R5)(i));break}i=QO(i)}return r||Re}function X5(e,n){let r=ta(n);return Oo(n,i=>{if(i===r){let a=Ar(i.tags,c=>zle(e,c));return i.tags===a?[i]:a}else return Ar(i.tags,uh)})}function zle(e,n){return!(ZT(n)||iF(n))||!n.parent||!Oc(n.parent)||!Hd(n.parent.parent)||n.parent.parent===e}function Pf(e,n){return br(e)&&(n?e.operatorToken.kind===74:qd(e.operatorToken.kind))&&od(e.left)}function Sh(e){return er(e.parent,n=>Gle(n,n.parent))}function E9(e){return er(e.parent,n=>Wl(n))}function SF(e){return!!e&&th(e.kind)}function Gle(e,n){switch(e.kind){case 176:case 240:case 255:case 243:case 244:case 169:case 270:case 283:case 152:return!0;case 236:return!SF(n)}return!1}function RO(e){let n=e.kind;return n===270||n===169||n===283||n===176}function pm(e,n){for(;e;){if(e.kind===n)return e;e=e.parent}}function mm(e){let n=IO(e);if(!n)return 0;switch(n.kind){case 269:let r=n.operatorToken.kind;return r===74||VD(r)?1:2;case 298:case 288:return 2;case 244:return 1}}function $le(e){let n=$o(e.right);return n.kind===269&&tue(n.operatorToken.kind)}function Qle(e){return e===44}function Yle(e){return e===43||e===45||e===46}function Xle(e){return Qle(e)||Yle(e)}function Zle(e){return e===41||e===42}function eue(e){return Zle(e)||Xle(e)}function nue(e){return e===49||e===50||e===51}function tue(e){return nue(e)||eue(e)}function OO(e){let n=IO(e);return!!n&&Pf(n,!0)&&$le(n)}function _F(e){if(e.kind>=242&&e.kind<=256)return!0;switch(e.kind){case 89:case 71:case 281:case 286:case 266:case 270:case 283:return!0;default:return!1}}function dt(e){return e.flags&3899393?e.objectFlags:0}function iS(e,n){return e&&(e.flags=n),e}function P9(e,n){return e.checkLpcDirective&&e.checkLpcDirective.enabled===!1?!1:e.scriptKind===1||e.scriptKind===5?!0:e.scriptKind==7}function ql(e){return E.assertIsDefined(e.parent),!Vr(e)&&!Po(e)&&ad(e.parent)&&e.parent.name===e}function MO(e,n,r){return{file:e,start:0,length:0,code:n.code,category:n.category,messageText:n.next?n:n.messageText,relatedInformation:r}}function _h(e,n,r,i){let a=gF(e,n);return xF(e,a.start,a.length,r,i)}function xF(e,n,r,i,a){return DO(e.text,n,r),{file:e,start:n,length:r,code:i.code,category:i.category,messageText:i.next?i:i.messageText,relatedInformation:a,canonicalHead:i.canonicalHead}}function Ax(e){return iue(e),(e.flags&1048576)!==0}function $D(e){return(e.flags&32)!==0}function rue(e){return(e.flags&64)!==0}function xh(e){return(e.flags&96)!==0}function iue(e){e.flags&2097152||((e.flags&262144||No(e,Ax))&&(e.flags|=1048576),e.flags|=2097152)}function yl(e){if(!e)return 4;let n=0;switch(e.kind){case 169:case 270:case 283:break}return e.body||(n|=4),n}function Vl(e){return Ef(e)?e.type&&e.type.typeExpression&&e.type.typeExpression.type:(wr(e)?B5(e):void 0)??e.type}function Ng(e){return e&&e.kind===236&&Ji(e.parent)}function wx(e){return er(e.parent,Ji)}var oue=[".c",".h",".lpc"];function bu(e){for(let n of oue){let r=aue(e,n);if(r!==void 0)return r}return e}function aue(e,n){return qs(e,n)?BO(e,n):void 0}function BO(e,n){return e.substring(0,e.length-n.length)}function ap(e,n){return!!bF(e,n)}function bF(e,n){return Df(e)&n}function Df(e){return NO(e,!0)}function N9(e){let n=e.parent;switch(n.kind){case 152:case 174:case 286:return n.name===e;case 266:return n.propertyName===e}return!1}function Qc(e){return 92<=e&&e<=145}function Rx(e){return e.kind>=188&&e.kind<=231}function mh(e,n,r){if(Da(e))return e.pos;if(Rx(e))return eo((n??$t(e)).text,e.pos,!1,!0);if(r&&nc(e))return mh(e.jsDoc[0],n);if(e.kind===232){n??(n=$t(e));let i=ha(tI(e,n));if(i)return mh(i,n,r)}return eo((n??$t(e)).text,e.pos,!1,!1,CF(e))}function CF(e){return!!e&&!!(e.flags&16777216)}function nc(e){if(!XT(e))return!1;let{jsDoc:n}=e;return!!n&&n.length>0}function gh(e){return e.text}function k9(e){Object.assign(pa,e),Bn(Fle,n=>n(pa))}var sue=`\r
58
+ `,cue=`
59
+ `;function Nf(e){switch(e.newLine){case 0:return sue;case 1:case void 0:return cue}}var DF={files:Re,directories:Re};function gm(e){e.close()}function EF(e,n,r){return e!==n&&r.some(i=>!MF(uF(e,i),uF(n,i)))}function lue({name:e,subModuleName:n}){return n?`${e}/${n}`:e}function Ig(e){return`${lue(e)}@${e.version}${e.peerDependencies??""}`}function PF(e,n){return n||1}var v9=[".c",".h",".lpc"];function bc(e,n){let r=e.entries();for(let[i,a]of r){let c=n(a,i);if(c)return c}}function Ox(e,n){return!n.directoryExists||n.directoryExists(e)}function Lg(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags}function kf(e,n){let r=e.declarations;if(r){for(let i of r)if(i.kind===n)return i}}function oa(e){return e.flags&33554432?e.links.checkFlags:0}function Cu(e,n=!1){if(e.valueDeclaration){let r=e.valueDeclaration,i=ih(r);return e.parent&&e.parent.flags&32?i:i&-8}if(oa(e)&6){let r=e.links.checkFlags,i=r&1024?2:r&256?1:4,a=r&2048?256:0;return i|a}return e.flags&4194304?257:0}function Ag(e){return(+e).toString()===e}function ym(e){return(e.flags&33554432)!==0}function F9(e){return e.parent.kind===286&&e.parent.expression===e}function jO(e){return e.parent.kind===286&&e.parent.name===e}function I9(e){return!!e.parent&&(Ti(e.parent)&&e.parent.name===e||rc(e.parent)&&e.parent.argumentExpression===e)}function L9(e){return hl(e.parent)&&e.parent.right===e||Ti(e.parent)&&e.parent.name===e}function NF(e){let n=zD(e);if(n)return gq(n)||uue(n)||mq(n)||dF(n)||n}function uue(e){return xE(e)&&br(e.expression)&&e.expression.operatorToken.kind===74?due(e.expression):void 0}function due(e){for(;Pf(e,!0);)e=e.right;return e}function oS(e){let n=NF(e);if(n)return Ff(n)&&n.type&&Ji(n.type)?n.type:Ji(n)?n:void 0}function wr(e){return!0}function wg(e){switch(e.kind){case 89:return e;case 146:do e=e.left;while(e.kind!==89);return e;case 286:do e=e.expression;while(e.kind!==89);return e}}function Wd(e){switch(e.kind){case 89:return kx(e)===0?ra(e):ml(e);case 146:return Wd(e.left)+"."+Wd(e.right);case 286:return Sn(e.name)?Wd(e.expression)+"."+Wd(e.name):E.assertNever(e.name);default:return E.assertNever(e)}}function Mx(e){switch(e.kind){case 283:return e.body;default:return!e.expression||Zo(e.expression)?void 0:e.expression}}var xx=[""," "];function kF(e){let n=xx[1];for(let r=xx.length;r<=e;r++)xx.push(xx[r-1]+n);return xx[e]}function bx(){return xx[1].length}function bh(e){var n,r,i,a,c,u=!1;function f(T){let W=nh(T);W.length>1?(a=a+W.length-1,c=n.length-T.length+ta(W),i=c-n.length===0):i=!1}function m(T){T&&T.length&&(i&&(T=kF(r)+T,i=!1),n+=T,f(T))}function y(T){T&&(u=!1),m(T)}function g(T){T&&(u=!0),m(T)}function S(){n="",r=0,i=!0,a=0,c=0,u=!1}function _(T){T!==void 0&&(n+=T,f(T),u=!1)}function b(T){T&&T.length&&y(T)}function v(T){(!i||T)&&(n+=e,a++,c=n.length,i=!0,u=!1)}return S(),{write:y,rawWrite:_,writeLiteral:b,writeLine:v,increaseIndent:()=>{r++},decreaseIndent:()=>{r--},getIndent:()=>r,getTextPos:()=>n.length,getLine:()=>a,getColumn:()=>i?r*bx():n.length-c,getText:()=>n,isAtStartOfLine:()=>i,hasTrailingComment:()=>u,hasTrailingWhitespace:()=>!!n.length&&Tu(n.charCodeAt(n.length-1)),clear:S,writeKeyword:y,writeOperator:y,writeParameter:y,writeProperty:y,writePunctuation:y,writeSpace:y,writeStringLiteral:y,writeSymbol:(T,W)=>y(T),writeTrailingSemicolon:y,writeComment:g}}function Pi(e,n,...r){let i=um(n);return Pn(r)&&(i=rS(i,r)),{messageText:i,category:n.category,code:n.code,next:e===void 0||Array.isArray(e)?e:[e]}}function Hl(e){return 1}var fue=/[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,pue=/[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,mue=/\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g,gue=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085","\r\n":"\\r\\n"}));function A9(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}function yue(e,n,r){if(e.charCodeAt(0)===0){let i=r.charCodeAt(n+e.length);return i>=48&&i<=57?"\\x00":"\\0"}return gue.get(e)||A9(e.charCodeAt(0))}function sp(e,n){let r=n===96?mue:n===39?pue:fue;return e.replace(r,yue)}function vF(e){return e===39||e===34}function w9(e,n){if(e.length===0)return!1;let r=e.charCodeAt(0);return r===35?e.length>1&&fl(e.charCodeAt(1),n):fl(r,n)}function zl(e){let n=e.length;return n>=2&&e.charCodeAt(0)===e.charCodeAt(n-1)&&hue(e.charCodeAt(0))?e.substring(1,n-1):e}function hue(e){return e===39||e===34||e===96}function tc(e,n){if(!wr(e)&&Is(e)||Xx(e))return;let r=e.type;!r&&xo(e)&&ld(e.parent.parent)&&(r=e.parent.parent.type);function i(){return Eg(e)?e.typeExpression&&e.typeExpression.type:YT(e)}if(r&&Z5(r)){let a=i(),c=a&&(a.kind!==r.kind||Zu(a))?a:r;if(xo(e)&&Sn(e.name)&&Z5(c))if(n){let u=n.locals.get("__varDocTags")?.members,f;if(u&&(f=u.get(e.name.text))&&f.declarations){let y=Uo(f.declarations).typeExpression?.type;y&&(c=y)}}else console.warn("originatingFile should be provided for variable declarations");return c}else if(r||!wr(e))return r;return i()}function Z5(e){return e9(e)||e.kind===138||e.kind===98||e&&Zu(e)&&e9(e.elementType)}function e9(e){return e&&(e.kind===140||e.kind===101)}function FF(e){if(Pn(e.parameters,n=>!tc(n)))return!0;if(e.kind!==283){let n=ha(e.parameters)}return!1}function cp(e,n){return r(e);function r(i){switch(i.kind){case 248:return n(i);case 240:case 236:case 253:case 245:case 246:case 243:case 244:case 256:case 299:case 301:case 255:return No(i,r)}}}function Sx(e,n){return _O(e,n)||Tue(e,n)||0}function Tue(e,n){return!e.relatedInformation&&!n.relatedInformation?0:e.relatedInformation&&n.relatedInformation?io(n.relatedInformation.length,e.relatedInformation.length)||Bn(e.relatedInformation,(r,i)=>{let a=n.relatedInformation[i];return Sx(r,a)})||0:e.relatedInformation?-1:1}function R9(e){switch(e.kind){case 274:case 163:return e.members;case 293:return e.properties}}function O9(e){return!1}var BD=Sue();function Sue(){var e="";let n=r=>e+=r;return{getText:()=>e,write:n,rawWrite:n,writeKeyword:n,writeOperator:n,writePunctuation:n,writeSpace:n,writeStringLiteral:n,writeLiteral:n,writeParameter:n,writeProperty:n,writeSymbol:(r,i)=>n(r),writeTrailingSemicolon:n,writeComment:n,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&Tu(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:Vi,decreaseIndent:Vi,clear:()=>e=""}}function JO(e){let n=BD.getText();try{return e(BD),BD.getText()}finally{BD.clear(),BD.writeKeyword(n)}}function QD(e,n,r){switch(e){case 235:return 0;case 294:return 1;case 267:return 4;case 269:switch(n){case 27:return 0;case 74:case 75:case 76:case 78:case 77:case 79:case 80:case 81:case 82:case 83:case 84:case 88:case 85:case 86:case 87:return 3;default:return YD(n)}case 298:return 16;case 288:return 17;case 272:return 18;case 276:return r?19:18;case 286:case 281:return 19;case 71:case 89:case 137:case 136:case 135:case 11:case 13:case 16:case 290:case 293:case 270:case 283:case 274:case 289:return 20;default:return-1}}function YD(e){switch(e){case 59:return 5;case 58:return 6;case 53:return 7;case 54:return 8;case 52:return 9;case 35:case 36:case 37:case 38:return 10;case 29:case 32:case 33:case 34:case 103:return 11;case 49:case 50:case 51:return 12;case 41:case 42:return 13;case 43:case 45:case 46:return 14;case 44:return 15;case 74:return 11}return-1}function IF(e){let n=M9(e),r=e.kind===276&&e.arguments!==void 0;return QD(e.kind,n,r)}function M9(e){return e.kind===269?e.operatorToken.kind:e.kind===298||e.kind===288?e.operator:e.kind}function B9(e){let n=M9(e),r=e.kind===276&&e.arguments!==void 0;return WO(e.kind,n,r)}function WO(e,n,r){switch(e){case 276:return r?0:1;case 298:case 267:return 1;case 269:switch(n){case 44:case 74:case 75:case 76:case 78:case 77:case 79:case 80:case 81:case 82:case 83:case 84:case 88:case 85:case 86:case 87:return 1}}return 0}function XD(e){return e.kind===269&&e.operatorToken.kind===27}function _ue(e){return e.kind===235}function ZD(e){return XD(e)||_ue(e)}function eE(e,n){for(;;){switch(e.kind){case 288:e=e.operand;continue;case 269:e=e.left;continue;case 267:e=e.condition;continue;case 272:if(n)return e;case 281:case 286:case 234:e=e.expression;continue}return e}}function nE(e){let n=e.emitNode;return n&&n.internalFlags||0}function bo(e){let n=e.emitNode;return n&&n.flags||0}function xue(e,n,r){return Du(JD(e,r,!1),n.end,r)}function lp(e,n){return xue(e,e,n)}function aS(e,n,r){return Du(JD(e,r,!1),JD(n,r,!1),r)}function Du(e,n,r){return kD(r,e,n)===0}function JD(e,n,r){return ec(e.pos)?-1:eo(n.text,e.pos,!1,r)}function tE(e,n,r,i){let a=JD(n,r,i);return kD(r,e.end,a)}function Bx(e,n,r){return Du(e.end,JD(n,r,!1),r)}function UO(e){return 0}function j9(e){return Yx(e)&&(e.operator===41||e.operator===42)&&yu(e.operand)}function Rg(e){switch(e.kind){case 89:return e.text;case 16:case 11:return e.text;case 147:let n=e.expression;return Bc(n)?n.text:j9(n)?n.operator===42?Ai(n.operator)+n.operand.text:n.operand.text:void 0;default:return E.assertNever(e)}}function n9(e){return Ti(e)}function bue(e){if(Ti(e))return e.name;let n=$o(e.argumentExpression);return yu(n)||ji(n)?n:e}function yh(e){let n=bue(e);if(n&&(Sn(n)||ji(n)||yu(n)))return n.text}function J9(e,n){return Fg(e)&&Fg(n)?gh(e)===gh(n):n9(e)&&n9(n)?yh(e)===yh(n)&&J9(e.expression,n.expression):!1}function LF(e){return wr(e)&&e.initializer&&br(e.initializer)&&e.initializer.operatorToken.kind===59&&e.name&&Ks(e.name)&&J9(e.name,e.initializer.left)?e.initializer.right:e.initializer}function jx(e){if(e)switch(e.kind){case 266:case 149:case 174:case 152:case 175:case 237:return!0}return!1}function W9(e){return To(e)&&Ix(e.parent.parent)}function Jx(e){return e.kind===270||e.kind===283}function Cue(e){return e.pos}function Wx(e,n){return Rd(e,n,Cue,io)}function Ux(e,n){for(;e;){if(e===n)return!0;e=e.parent}return!1}function hm(e){if(157<=e.kind&&e.kind<=168)return!0;switch(e.kind){case 102:case 92:case 93:case 94:case 140:case 137:case 104:case 101:return!0;case 148:return e.parent.kind===264;case 89:(e.parent.kind===146&&e.parent.right===e||e.parent.kind===286&&e.parent.name===e)&&(e=e.parent),E.assert(e.kind===89||e.kind===146||e.kind===286,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 146:case 286:{let{parent:n}=e;if(157<=n.kind&&n.kind<=168)return!0;switch(n.kind){case 148:return e===n.constraint;case 224:return e===n.constraint;case 152:case 149:case 237:return e===n.type;case 169:case 270:case 283:return e===n.type;case 150:return e===n.type;case 272:case 276:return!1}}}return!1}function rE(e){return jd(e)||Xx(e)||sV(e)}function U9(e){return er(e.parent,SF)}function K9(e,n){e.forEach((r,i)=>{n.set(i,r)})}function q9(e,n=lg){if(e.length<2)return!0;let r=e[0];for(let i=1,a=e.length;i<a;i++){let c=e[i];if(!n(r,c))return!1}return!0}function V9(e){return vf(e)&&Sn(e.typeName)}function H9(e){switch(e.kind){case 242:case 169:return!0;default:return!1}}function z9(e,n){for(;e&&e.kind===n;)e=e.parent;return e}function AF(e){return z9(e,165)}function G9(e){return e.declaration?Fs(e.declaration.parameters[0].name):void 0}function KO(e,n,r){return!(r&&r(n))&&!e.identifiers.has(n)}function Bc(e){return ji(e)||yu(e)}function Tm(e){return e.flags&384?""+e.value:E.fail()}function Kx(e){return!1}function $9(e){let n=e.kind;return(n===286||n===281)&&!0}function Q9(e,n){let r=e;for(;r.next;)r=r.next[0];r.next=[n]}function K5(e){return NO(e,!0,!0)}function Y9(e,n){E.assert(e.length!==0);let r=n(e[0]),i=r;for(let a=1;a<e.length;a++){let c=n(e[a]);c<r?r=c:c>i&&(i=c)}return{min:r,max:i}}function X9(e){return typeof e.messageText=="string"?{code:e.code,category:e.category,messageText:e.messageText,next:e.next}:e.messageText}function iE(e,n,r,i){let a=eo(e.text,n.pos);return xF(e,a,n.end-a,r,i)}function oE(e,n,r,...i){let a=eo(e.text,n.pos);return sd(e,a,n.end-a,r,...i)}var xO=[[".lpc",".h",".lpc"]],Z9=mu(xO);function qO(e){return Pn(Z9,n=>qs(e,n))}var Due={driverType:{dependencies:[],computeValue:e=>e.driverType??0}},Ake=Due.driverType.computeValue,Eue=["node_modules","bower_components","jspm_packages"],VO=`(?!(${Eue.join("|")})(/|$))`,eq={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${VO}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>HO(e,eq.singleAsteriskRegexFragment)};function HO(e,n){return e==="*"?n:e==="?"?"[^/]":"\\"+e}var nq={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${VO}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>HO(e,nq.singleAsteriskRegexFragment)},tq={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:e=>HO(e,tq.singleAsteriskRegexFragment)},zO={files:eq,directories:nq,exclude:tq},t9=/[^\w\s/]/g;function GO(e){return!/[.*?]/.test(e)}function wF(e,n,r,{singleAsteriskRegexFragment:i,doubleAsteriskRegexFragment:a,replaceWildcardCharacter:c}=zO[r]){let u="",f=!1,m=Zx(e,n),y=ta(m);if(r!=="exclude"&&y==="**")return;m[0]=Cm(m[0]),GO(y)&&m.push("**","*");let g=0;for(let S of m){if(S==="**")u+=a;else if(r==="directories"&&(u+="(",g++),f&&(u+=Mo),r!=="exclude"){let _="";S.charCodeAt(0)===42?(_+="([^./]"+i+")?",S=S.substr(1)):S.charCodeAt(0)===63&&(_+="[^./]",S=S.substr(1)),_+=S.replace(t9,c),_!==S&&(u+=VO),u+=_}else u+=S.replace(t9,c);f=!0}for(;g>0;)u+=")?",g--;return u}function rq(e,n,r){if(!(e===void 0||e.length===0))return Oo(e,i=>i&&wF(i,n,r,zO[r]))}function Cx(e,n,r){let i=rq(e,n,r);return!i||!i.length?void 0:`^(${i.map(u=>`(${u})`).join("|")})${r==="exclude"?"($|/)":"$"}`}function Pue(e,n,r){let i=[e];if(n){let a=[];for(let c of n){let u=vs(c)?c:Qr(fi(e,c));a.push(kue(u))}a.sort(Q_(!r));for(let c of a)yi(i,u=>!fp(u,c,e,!r))&&i.push(c)}return i}var Nue=[42,63];function kue(e){let n=MK(e,Nue);return n<0?bm(e)?Cm(ei(e)):e:e.substring(0,e.lastIndexOf(Mo,n))}function vue(e,n,r,i,a){e=Qr(e),a=Qr(a);let c=fi(a,e);return{includeFilePatterns:Yn(rq(r,c,"files"),u=>`^${u}$`),includeFilePattern:Cx(r,c,"files"),includeDirectoryPattern:Cx(r,c,"directories"),excludePattern:Cx(n,c,"exclude"),basePaths:Pue(e,r,i)}}function vg(e,n){return new RegExp(e,n?"":"i")}function RF(e,n,r,i,a,c,u,f,m){e=Qr(e),c=Qr(c);let y=vue(e,r,i,a,c),g=y.includeFilePatterns&&y.includeFilePatterns.map(F=>vg(F,a)),S=y.includeDirectoryPattern&&vg(y.includeDirectoryPattern,a),_=y.excludePattern&&vg(y.excludePattern,a),b=g?g.map(()=>[]):[[]],v=new Map,T=na(a);for(let F of y.basePaths)W(F,fi(c,F),u);return mu(b);function W(F,M,J){let A=T(m(M));if(v.has(A))return;v.set(A,!0);let{files:V,directories:ue}=f(F);for(let ye of Fv(V,ul)){let he=fi(F,ye),ce=fi(M,ye);if(!(n&&!oI(he,n))&&!(_&&_.test(ce)))if(!g)b[0].push(he);else{let Ee=zc(g,Fe=>Fe.test(ce));Ee!==-1&&b[Ee].push(he)}}if(!(J!==void 0&&(J--,J===0)))for(let ye of Fv(ue,ul)){let he=fi(F,ye),ce=fi(M,ye);(!S||S.test(ce))&&(!_||!_.test(ce))&&W(he,ce,J)}}}function Fue(e,n,r){let{onDeleteValue:i,onExistingValue:a}=r;e.forEach((c,u)=>{n?.has(u)?a&&a(c,n.get?.(u),u):(e.delete(u),i(c,u))})}function $O(e,n,r){Fue(e,n,r);let{createNewValue:i}=r;n?.forEach((a,c)=>{e.has(c)||e.set(c,i(c,a))})}function OF(e,n){let r=e.keys();for(let i of r){let a=n(i);if(a)return a}}function Og(e,n){e.forEach(n),e.clear()}function MF(e,n){return e===n||typeof e=="object"&&e!==null&&typeof n=="object"&&n!==null&&jK(e,n,MF)}function Iue(e,n){if(!n||n.length===0)return xO;let r=xO,i=mu(r);return[...r]}function iq(e,n,r){if(!e)return!1;let i=Iue(n,r);for(let a of mu(i))if(qs(e,a))return!0;return!1}function oq(e,n,r){let i=e.getCompilerOptions(),a=n===void 0?e.getSourceFiles():[n];return Ar(a,c=>Lue(c,e,r))}function Ch(e){return e.scriptKind===6}function Lue(e,n,r){let i=n.getCompilerOptions();if(e.isDeclarationFile||n.isSourceFileFromExternalLibrary(e))return!1;if(r||!Ch(e)||i.outFile)return!0;if(!i.outDir)return!1;if(i.rootDir){let a=Di(cV(i,()=>[],n.getCurrentDirectory(),n.getCanonicalFileName),n.getCurrentDirectory()),c=aq(e.fileName,i.outDir,n.getCurrentDirectory(),a,n.getCanonicalFileName);if(eb(e.fileName,c,n.getCurrentDirectory(),!n.useCaseSensitiveFileNames())===0)return!1}return!0}function aq(e,n,r,i,a){let c=Di(e,r);return c=a(c).indexOf(a(i))===0?c.substring(i.length):c,fi(n,c)}function sq(e){return!Ch(e)}function up(e,n){if(!e)return e;return nS(e,Rx(e)?r:a),e;function r(c,u){if(n&&c?.parent===u)return"skip";xc(c,u)}function i(c){if(c&&nc(c))for(let u of c.jsDoc)r(u,c),nS(u,r)}function a(c,u){return r(c,u)||i(c)}}function uF(e,n){return e[n.name]}function eO(e,n){return e?.startsWith(n)?e.slice(n.length):e}var jD="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function cq(e,n){if(e&&e.base64decode)return e.base64decode(n);let r=n.length,i=[],a=0;for(;a<r&&n.charCodeAt(a)!==jD.charCodeAt(64);){let c=jD.indexOf(n[a]),u=jD.indexOf(n[a+1]),f=jD.indexOf(n[a+2]),m=jD.indexOf(n[a+3]),y=(c&63)<<2|u>>4&3,g=(u&15)<<4|f>>2&15,S=(f&3)<<6|m&63;g===0&&f!==0?i.push(y):S===0&&m!==0?i.push(y,g):i.push(y,g,S),a+=4}return Aue(i)}function Aue(e){let n="",r=0,i=e.length;for(;r<i;){let a=e[r];if(a<128)n+=String.fromCharCode(a),r++;else if((a&192)===192){let c=a&63;r++;let u=e[r];for(;(u&192)===128;)c=c<<6|u&63,r++,u=e[r];n+=String.fromCharCode(c)}else n+=String.fromCharCode(a),r++}return n}function lq(e,n,r){let i=n.outDir,a=i?aq(e,i,r.getCurrentDirectory(),r.getCommonSourceDirectory(),u=>r.getCanonicalFileName(u)):e,c=wue(a);return bu(a)+c}function wue(e){return oI(e,[".json"])?".d.json.ts":".h"}function qx(e){return e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames():!1}function uq(e){return na(qx(e))}function dq(e){return n=>{n.externalModuleIndicator=!0}}function fq(e){return!1}function pq(e){return!0}function aE(e){let n=e.parent;switch(e.kind){case 16:case 10:if(ps(n))return n.parent;case 89:if(ad(n))return n.name===e?n:void 0;if(hl(n)){let r=n.parent;return hc(r)&&r.name===n?r:void 0}else{let r=n.parent;return br(r)&&es(r)!==0&&(r.left.symbol||r.symbol)&&ci(r)===e?r:void 0}default:return}}function sE(e){return Bc(e)&&e.parent.kind===147&&ad(e.parent.parent)}function cd(e,n){return e.flags&2097152?n.getAliasedSymbol(e):e}function Dh(e){return z9(e,289)}function MD(e){return e.kind===270}function dF(e){return ld(e)?ha(e.declarationList.declarations):void 0}function mq(e){switch(e.kind){case 242:let n=dF(e);return n&&n.initializer;case 152:return e.initializer;case 174:return e.initializer}}function gq(e){return xE(e)&&br(e.expression)&&es(e.expression)!==0&&br(e.expression.right)&&e.expression.right.operatorToken.kind===59?e.expression.right.right:void 0}function QO(e){let n=e.parent;if(n.kind===174||n.kind===152||n.kind===247&&e.kind===286||n.kind===248||Pf(e))return n;if(n.parent&&(dF(n.parent)===e||Pf(n)))return n.parent;if(n.parent&&n.parent.parent&&(dF(n.parent.parent)||mq(n.parent.parent)===e||gq(n.parent.parent)))return n.parent.parent}function yq(e,n){return Su(n.text,e.pos)}function cE(e){return Vr(e)?Zr(IT(fE(e)),Mue(e))||Re:Re}function YO(e,n){for(;;){if(e=e.parent,!e)return;switch(e.kind){case 147:e=e.parent;break;case 169:case 270:if(!n)continue;case 152:case 153:return e}}}function sS(e){return!1}function Sm(e,n,r=!0){return e.has(n)?!1:(e.set(n,r),!0)}function BF(e){return e.text}function hq(e){return e?.kind===176}function XO(e,n){return np(n,e).charCodeAt(0)===34}function lE(e){switch(e.parent.kind){case 172:case 231:return e.parent;case 252:return e.parent;case 273:return e.parent;default:return}}function Tq(e){return lE(e)||E.failBadSyntaxKind(e.parent)}function Sq(e){return C9(e,!1)}function _q(e){return e.kind===176}function xq(e){switch(e.kind){case 169:case 270:return!0}return!1}function bq(e,n){for(;;){let r=n(e);if(r==="quit")return;if(r!==void 0)return r;if(!e||Vr(e))return;e=e.parent}}function uE(e){switch(e.kind){case 89:return e.emitNode?.autoGenerate?void 0:e.text;case 16:case 11:return e.text;case 147:return Bc(e.expression)?e.expression.text:void 0;default:return E.assertNever(e)}}function ZO(e){return e.replace(/\$/gm,()=>"\\$")}function dp(e,n=e){return E.assert(n>=e||n===-1),{pos:e,end:n}}function jF(e,n){let r=e.kind===149||e.kind===148||e.kind===270||e.kind===271||e.kind===289||e.kind===237||e.kind===179||e.kind===252||e.kind===171?Zr(rp(n,e.pos),Su(n,e.pos)):Su(n,e.pos);return Ar(r,i=>i.end<=e.end&&n.charCodeAt(i.pos+1)===42&&n.charCodeAt(i.pos+2)===42&&n.charCodeAt(i.pos+3)!==47)}function Vx(e,n){let r=yc(e);return lx(r,n)}function Cq(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".c":case".h":case".lpc":return 1;case".json":return 6;default:return 0}}function JF(e,n){return E.assert(e>=0),yc(n)[e]}function Hx(e,n){return e.charCodeAt(n+1)===42&&e.charCodeAt(n+2)===33}function dE(e){return e.kind===247&&e.expression.kind===16}function WF(e){return{pos:mh(e),end:e.end}}function UF(e,n){let r=n.pos-1,i=Math.min(e.text.length,eo(e.text,n.end)+1);return{pos:r,end:i}}function Dq(e){for(;Us(e);)e=e.expression;return e}function Eq(e){return!1}function Pq(e){let n;return No(e,r=>{lm(r)&&(n=r)},r=>{for(let i=r.length-1;i>=0;i--)if(lm(r[i])){n=r[i];break}}),n}function Eh(e){return Eo(e.name,"__@")}function Nq(e){return e.kind===152&&e.initializer!==void 0}function eM(e){return 92<=e&&e<=121}function r9(e){let n=e.match(/\//g);return n?n.length:0}function kq(e,n){return io(r9(e),r9(n))}function Rue(e){return Qc(e)&&!eM(e)}function vq(e){let n=tp(e);return n!==void 0&&Rue(n)}function iO(e){return 17<=e&&e<=73}function KF(e){return Qc(e)||iO(e)}function fE(e){let n=void 0;return n&&wr(e),n}function pE(e){switch(e.kind){case 148:case 170:case 241:case 225:case 217:case 219:return!0;default:return!1}}function La(e,n=!1,r=!1,i=!1){return{value:e,isSyntacticallyString:n,resolvedOtherFiles:r,hasExternalReferences:i}}function Fq({evaluateElementAccessExpression:e,evaluateEntityNameExpression:n}){function r(i,a){let c=!1,u=!1,f=!1;switch(i=$o(i),i.kind){case 298:let m=r(i.operand,a);if(u=m.resolvedOtherFiles,f=m.hasExternalReferences,typeof m.value=="number")switch(i.operator){case 41:return La(m.value,c,u,f);case 42:return La(-m.value,c,u,f);case 57:return La(~m.value,c,u,f)}break;case 269:{let y=r(i.left,a),g=r(i.right,a);if(c=(y.isSyntacticallyString||g.isSyntacticallyString)&&i.operatorToken.kind===41,u=y.resolvedOtherFiles||g.resolvedOtherFiles,f=y.hasExternalReferences||g.hasExternalReferences,typeof y.value=="number"&&typeof g.value=="number")switch(i.operatorToken.kind){case 53:return La(y.value|g.value,c,u,f);case 52:return La(y.value&g.value,c,u,f);case 50:return La(y.value>>g.value,c,u,f);case 51:return La(y.value>>>g.value,c,u,f);case 49:return La(y.value<<g.value,c,u,f);case 54:return La(y.value^g.value,c,u,f);case 43:return La(y.value*g.value,c,u,f);case 45:return La(y.value/g.value,c,u,f);case 41:return La(y.value+g.value,c,u,f);case 42:return La(y.value-g.value,c,u,f);case 46:return La(y.value%g.value,c,u,f);case 44:return La(y.value**g.value,c,u,f)}else if((typeof y.value=="string"||typeof y.value=="number")&&(typeof g.value=="string"||typeof g.value=="number")&&i.operatorToken.kind===41)return La(""+y.value+g.value,c,u,f);break}case 16:return La(i.text,!0);case 11:return La(+i.text);case 13:return La(+i.text);case 89:return n(i,a);case 286:if(Ks(i))return n(i,a);break;case 281:return e(i,a)}return La(void 0,c,u,f)}return r}function _m(e){return!!(e.flags&384)}function WD(e){if(Ti(e)){let n=WD(e.expression);if(n!==void 0)return n+"."+Wd(e.name)}else if(rc(e)){let n=WD(e.expression);if(n!==void 0&&om(e.argumentExpression))return n+"."+Rg(e.argumentExpression)}else if(Sn(e))return e.text}function qF(e){return e.kind===147&&!Bc(e.expression)}function Iq(e){return!1}function mE(e){return er(e.parent,n=>!!(bM(n)&1))}function VF(e){return(e.kind===154||e.kind===169)&&(e.parent.kind===293||e.parent.kind===176)}function Lq(e){return e&&e.kind===1}function nM(e){return qO(e)?e:e+".c"}function gE(e){return e.declarations?.find(Sa)}function tM(e){return e.content.map(r=>r.text).join("")}function HF(e){return e==="Infinity"||e==="-Infinity"||e==="NaN"}function Aq(e){switch(E.type(e),e.kind){case 149:case 153:case 152:case 266:case 286:case 281:case 269:case 237:case 174:return!0;default:return!1}}function wq(e){if(!Eg(e))return!1;let{isBracketed:n,typeExpression:r}=e;return n||!!r&&r.type.kind===195}function rM(e){return wr(e)&&(e.type&&e.type.kind===195||yx(e).some(wq))}function Rq(e){switch(e.kind){case 149:return rM(e);case 227:case 220:return wq(e);default:return!1}}function xm(e){return Hd(e)&&wr(e)&&!!ch(e)}function iM(e,n=!0){switch(E.type(e),e.kind){case 136:case 135:case 11:case 13:case 16:return!0;case 298:return e.operator===42?Ud(e.operand):e.operator===41?Ud(e.operand):!1;default:return!1}}function zF(e){return fs(e)||zd(e)||Kl(e)||Is(e)}function oM(e,n,r,i){let a=eo(r.text,e,!1,i),c=Oue(a,n,r);return kD(r,c??n,a)}function Oue(e,n=0,r){for(;e-- >n;)if(!Tu(r.text.charCodeAt(e)))return e}function aM(e){if(!e.parent)return;switch(e.kind){case 148:let{parent:r}=e;return;case 149:return e.parent.parameters;case 252:return e.parent.statements}let{parent:n}=e;if(ah(e))return Jd(e.parent)?void 0:e.parent.tags;switch(n.kind){case 163:return $T(e)?n.members:void 0;case 157:return n.types;case 290:case 235:return n.elements;case 293:return n.properties;case 272:case 276:return n.expression===e?void 0:n.arguments;case 236:case 299:case 301:return n.statements;case 240:return n.clauses;case 170:case 274:return QT(e)?n.members:void 0;case 176:return n.statements}}function sM(e,n,r){return Du(e.end,n.end,r)}function cM(e,n,r,i){let a=eo(r.text,e,!1,i);return kD(r,e,Math.min(n,a))}function yE(e){let n=!1;function r(){n&&(e.writeTrailingSemicolon(";"),n=!1)}return{...e,writeTrailingSemicolon(){n=!0},writeLiteral(i){r(),e.writeLiteral(i)},writeStringLiteral(i){r(),e.writeStringLiteral(i)},writeSymbol(i,a){r(),e.writeSymbol(i,a)},writePunctuation(i){r(),e.writePunctuation(i)},writeKeyword(i){r(),e.writeKeyword(i)},writeOperator(i){r(),e.writeOperator(i)},writeParameter(i){r(),e.writeParameter(i)},writeSpace(i){r(),e.writeSpace(i)},writeProperty(i){r(),e.writeProperty(i)},writeComment(i){r(),e.writeComment(i)},writeLine(){r(),e.writeLine()},increaseIndent(){r(),e.increaseIndent()},decreaseIndent(){r(),e.decreaseIndent()}}}function lM(e){return E.checkDefined(uE(e))}function zx(e,n,r){for(E.assert(e.kind!==176);;){if(e=e.parent,!e)return E.fail();switch(e.kind){case 147:if(r&&Sa(e.parent.parent))return e;e=e.parent.parent;break;case 271:case 283:if(!n)continue;case 169:case 270:case 152:case 153:case 154:case 156:case 151:case 150:case 176:return e}}}function Oq(e){return oV(e)?.kind===0}function Mue(e){let n;return n=M5(e).map(r=>r.class),n||(n=Ei(e.heritageClauses,r=>r.inheritClause)),n}function GF(e){for(;ix(e);)e=e.type;return e}function Bue(e){return e.text==="this_object"}function Mq(e){return!!e&&e.kind===89&&Bue(e)}function uM(e){return vf(e)&&Sn(e.typeName)&&e.typeName.text==="object"&&e.typeArguments&&e.typeArguments.length===2&&(e.typeArguments[0].kind===94||e.typeArguments[0].kind===92)}function hE(e){let n=ci(e);return!!n&&jue(n)}function jue(e){if(!(e.kind===147||e.kind===281))return!1;let n=rc(e)?$o(e.argumentExpression):e.expression;return!Bc(n)&&!j9(n)}function dM(e){return e===".c"||e===".lpc"||e===".h"}function $F(e){return dM(e)||e===".json"}function fM(e,n,r,i,a,c,u){let f,m;if(u?a.pos===0&&(f=Ar(Su(e,a.pos),y)):f=Su(e,a.pos),f){let g=[],S;for(let _ of f){if(S){let b=fh(n,S.end);if(fh(n,_.pos)>=b+2)break}g.push(_),S=_}if(g.length){let _=fh(n,ta(g).end);fh(n,eo(e,a.pos))>=_+2&&(Jue(n,r,a,f),Kue(e,n,r,g,!1,!0,c,i),m={nodePos:a.pos,detachedCommentEndPos:ta(g).end})}}return m;function y(g){return Hx(e,g.pos)}}function Jue(e,n,r,i){Wue(e,n,r.pos,i)}function Wue(e,n,r,i){i&&i.length&&r!==i[0].pos&&fh(e,r)!==fh(e,i[0].pos)&&n.writeLine()}function TE(e,n,r,i,a,c){if(e.charCodeAt(i+1)===42){let u=xg(n,i),f=n.length,m;for(let y=i,g=u.line;y<a;g++){let S=g+1===f?e.length+1:n[g+1];if(y!==i){m===void 0&&(m=i9(e,n[u.line],i));let b=r.getIndent()*bx()-m+i9(e,y,S);if(b>0){let v=b%bx(),T=kF((b-v)/bx());for(r.rawWrite(T);v;)r.rawWrite(" "),v--}else r.rawWrite("")}Uue(e,a,r,c,y,S),y=S}}else r.writeComment(e.substring(i,a))}function pM(e,n,r,i){r!==i&&fh(e,r)!==fh(e,i)&&n.writeLine()}function Uue(e,n,r,i,a,c){let u=Math.min(n,c-1),f=e.substring(a,u).trim();f?(r.writeComment(f),u!==n&&r.writeLine()):r.rawWrite(i)}function fh(e,n){return lx(e,n)}function i9(e,n,r){let i=0;for(;n<r&&Jl(e.charCodeAt(n));n++)e.charCodeAt(n)===9?i+=bx()-i%bx():i++;return i}function Kue(e,n,r,i,a,c,u,f){if(i&&i.length>0){a&&r.writeSpace(" ");let m=!1;for(let y of i)m&&(r.writeSpace(" "),m=!1),f(e,n,r,y.pos,y.end,u),y.hasTrailingNewLine?r.writeLine():m=!0;m&&c&&r.writeSpace(" ")}}var o9=/[^\u0000-\u007F]/g;function QF(e,n){return e=sp(e,n),o9.test(e)?e.replace(o9,r=>A9(r.charCodeAt(0))):e}function mM(e,n,r){if(n&&que(e,r))return np(n,e);switch(e.kind){case 16:{let i=r&1||bo(e)&16777216?sp:QF;return e.singleQuote?"'"+i(e.text,39)+"'":'"'+i(e.text,34)+'"'}case 10:case 11:case 13:return e.text}return E.fail(`Literal kind '${e.kind}' not accounted for.`)}function que(e,n){if(Zi(e)||!e.parent||n&4&&e.isUnterminated)return!1;if(Ud(e)){if(e.numericLiteralFlags&26656)return!1;if(e.numericLiteralFlags&512)return!!(n&8)}return!0}function Bq(e){let n=Sr(e?.statements,c=>Is(c)&&c.name.text==="get_include_path");if(!n)return;let r=lV(n,e)+`
60
+ return get_include_path(ctxInput);`,a={parsingContext:pF.createContext(S5(),{name:"masterApply_GetIncludePath"}),filename:e.fileName+".js.vm"};return pF.compileFunction(r,["ctxInput"],a)}function jq(e,n){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText,relatedInformation:n}}function Jq(e,n,r){let i=e&&wF(e,n,r,zO[r]);return i&&`^(${i})${r==="exclude"?"($|/)":"$"}`}function YF(e){return console.debug("todo - getNameOfScriptTarget"),"LPC"}function Wq(e){switch(e){case"fluffos":return 1;case"ldmud":default:return 0}}function SE(e){return!1}function gM(e,n){return e.path===n.path&&!e.prepend==!n.prepend&&!e.circular==!n.circular}function yM(e,n){if(!e||!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(let r in e)if(typeof e[r]=="object"){if(!yM(e[r],n[r]))return!1}else if(typeof e[r]!="function"&&e[r]!==n[r])return!1;return!0}function Gx(e,n,r){return _E(hM(e),n,r)}function hM(e){if(e&&e.statements.length){let n=e.statements[0].expression;return Wo(n,ms)}}function _E(e,n,r,i){return Bn(e?.properties,a=>{if(!dd(a))return;let c=uE(a.name);return n===c||i&&i===c?r(a):void 0})}function $x(e,n,r){return n.skipLibCheck&&e.isDeclarationFile||n.skipDefaultLibCheck&&e.hasNoDefaultLib||n.noCheck||r.isSourceOfProjectReferenceRedirect(e.fileName)||!Vue(e,n)}function Vue(e,n){return e.checkLpcDirective&&e.checkLpcDirective.enabled===!1?!1:e.scriptKind===1||e.scriptKind===5?!0:e.scriptKind===7}function TM(e){if(e.symbol)return e.symbol;if(!Sn(e.name))return;let n=e.name.text,r=oS(e);if(!r)return;let i=Sr(r.parameters,a=>a.name.kind===89&&a.name.text===n);return i&&i.symbol}function Mg(e,n){if(!vs(e))return e;let r=n?.rootDir??ei(n?.configFilePath??"");if(r&&e.startsWith(r)){let i=e.substring(r.length);return i=i.replace(/\\/g,"/"),i.startsWith("/")||(i="/"+i),i}}function XF(e,n){let r=Nr(n)?n[0]:n;return xc(ns(Ge.createStringLiteral(r.arguments.name),r.range.pos,r.range.pos),e)}function SM(e,n,r){return Gx(e,n,i=>cS(i.initializer)?Sr(i.initializer.elements,a=>ji(a)&&a.text===r):void 0)}function Uq(e,n,r){return _E(e,n,i=>cS(i.initializer)?Sr(i.initializer.elements,a=>ji(a)&&a.text===r):void 0)}function Kq(e,n){return e.configFilePath!==n.configFilePath||ZF(e,n)||Hue(e,n)}function ZF(e,n){return e.masterFile!==n.masterFile||e.sefunFile!==n.sefunFile}function Hue(e,n){return EF(e,n,rI)}function qq(e,n,r,i){E.assert(e.length===n.length);for(let a=0;a<e.length;a++){let c=n[a],u=e[a],f=r(u);if(f?!c||!i(f,c):c)return!0}return!1}function Vq(e,n){return e===n||e.resolvedModule===n.resolvedModule||!!e.resolvedModule&&!!n.resolvedModule&&e.resolvedModule.isExternalLibraryImport===n.resolvedModule.isExternalLibraryImport&&e.resolvedModule.extension===n.resolvedModule.extension&&e.resolvedModule.resolvedFileName===n.resolvedModule.resolvedFileName&&e.resolvedModule.originalPath===n.resolvedModule.originalPath&&e.alternateResult===n.alternateResult}function Hq(e,n){return EF(e,n,aV)}function zq(e){let n=e.name.text,{typeParameters:r}=e.parent.parent.parent;return r&&Sr(r,i=>i.name.text===n)}function q5(e){let n=e.kind;return!1}function V5(e){return Oo(cm(e),n=>zue(n)?n.typeParameters:void 0)}function zue(e){return wc(e)&&!(e.parent.kind===199&&(e.parent.tags.some(jd)||e.parent.tags.some(uh)))}function Gq(e){return e.kind===272&&e.expression.kind===287}function $q(e){return gO(e,uh)}function eI(e,n){return e[n]===void 0?!!e.strict:!!e[n]}function Qq(e){return wr(e)&&Hd(e)&&nc(e)&&!!TO(e)}function Yq(e){return E.checkDefined(_M(e))}function _M(e){let n=TO(e);return n&&n.typeExpression&&n.typeExpression.type}function Xq(e){return e.allowUnreachableCode===!1}function Zq(e,n){let r=e.indexOf(n);return E.assert(r!==-1),e.slice(r)}function eV(e){let n;for(;e&&e.kind===165;)n=e,e=e.parent;return[n,e]}function nV(e,n){let r=KT(e.languageVersion,!0,!0,e.languageVariant,e.text,void 0,n);return r.scan(),r.getToken()}function nI(e){let n=ei(Qr(ho.getExecutingFilePath())),r=dO(e),i=JK().toLowerCase(),c=/^([a-z]+)([_-]([a-z]+))?$/.exec(i)[1],u=fO(e),f=[fi(n,r,i,u),fi(n,r,c,u),fi(n,r,u)];return Sr(f,m=>ho.fileExists(m))}function xM(e,n){let r=n.indexOf(e);return r>=0&&r<n.length-1?n[r+1]:void 0}function tV(e,n,r){return{file:e,start:n.pos,length:n.end-n.pos,code:r.code,category:r.category,messageText:r.message}}function rV(e,n){let r=new Map(n.map(u=>[`${ma(e,u.range.end).line}`,u])),i=new Map;return{getUnusedExpectations:a,markUsed:c};function a(){return oo(r.entries()).filter(([u,f])=>f.type===0&&!i.get(u)).map(([u,f])=>f)}function c(u){return r.has(`${u}`)?(i.set(`${u}`,!0),!0):!1}}function iV(e){if(ao(e)){let n=ci(e.expression);if(n&&Sn(n)&&n.text==="this_object")return!0}return!1}function uV(){let e,n,r,i;return{createBaseSourceFileNode:a,createBaseIdentifierNode:c,createBaseTokenNode:u,createBaseNode:f};function a(m){return new(i||(i=pa.getSourceFileConstructor()))(m,-1,-1)}function c(m){return new(r||(r=pa.getIdentifierConstructor()))(m,-1,-1)}function u(m){return new(n||(n=pa.getTokenConstructor()))(m,-1,-1)}function f(m){return new(e||(e=pa.getNodeConstructor()))(m,-1,-1)}}function dV(e){let n,r;return{getParenthesizeLeftSideOfBinaryForOperator:i,getParenthesizeRightSideOfBinaryForOperator:a,parenthesizeLeftSideOfBinary:y,parenthesizeRightSideOfBinary:g,parenthesizeExpressionOfComputedPropertyName:S,parenthesizeConditionOfConditionalExpression:_,parenthesizeBranchOfConditionalExpression:b,parenthesizeExpressionOfExportDefault:v,parenthesizeExpressionOfNew:T,parenthesizeLeftSideOfAccess:W,parenthesizeOperandOfPostfixUnary:F,parenthesizeOperandOfPrefixUnary:M,parenthesizeExpressionsOfCommaDelimitedList:J,parenthesizeExpressionForDisallowedComma:A,parenthesizeExpressionOfExpressionStatement:V,parenthesizeConciseBodyOfArrowFunction:ue,parenthesizeCheckTypeOfConditionalType:ye,parenthesizeExtendsTypeOfConditionalType:he,parenthesizeConstituentTypesOfUnionType:Ee,parenthesizeConstituentTypeOfUnionType:ce,parenthesizeConstituentTypesOfIntersectionType:be,parenthesizeConstituentTypeOfIntersectionType:Fe,parenthesizeOperandOfTypeOperator:de,parenthesizeOperandOfReadonlyTypeOperator:Ae,parenthesizeNonArrayTypeOfPostfixType:G,parenthesizeTypeOfOptionalType:me,parenthesizeTypeArguments:tt,parenthesizeLeadingTypeArgument:Se};function i(Pe){n||(n=new Map);let gn=n.get(Pe);return gn||(gn=$e=>y(Pe,$e),n.set(Pe,gn)),gn}function a(Pe){r||(r=new Map);let gn=r.get(Pe);return gn||(gn=$e=>g(Pe,void 0,$e),r.set(Pe,gn)),gn}function c(Pe,gn,$e,Ln){let Vt=QD(269,Pe),Hn=WO(269,Pe),Ye=id(gn);if(!$e&&gn.kind===283&&Vt>3)return!0;let se=IF(Ye);switch(io(se,Vt)){case-1:return!0;case 1:return!1;case 0:if($e)return Hn===1;if(br(Ye)&&Ye.operatorToken.kind===Pe){if(u(Pe))return!1;if(Pe===41){let wn=Ln?f(Ln):0;if(HT(wn)&&wn===f(Ye))return!1}}return B9(Ye)===0}}function u(Pe){return Pe===43||Pe===53||Pe===52||Pe===54||Pe===27}function f(Pe){if(Pe=id(Pe),HT(Pe.kind))return Pe.kind;if(Pe.kind===269&&Pe.operatorToken.kind===41){if(Pe.cachedLiteralKind!==void 0)return Pe.cachedLiteralKind;let gn=f(Pe.left),$e=HT(gn)&&gn===f(Pe.right)?gn:0;return Pe.cachedLiteralKind=$e,$e}return 0}function m(Pe,gn,$e,Ln){return id(gn).kind===289?gn:c(Pe,gn,$e,Ln)?e.createParenthesizedExpression(gn):gn}function y(Pe,gn){return m(Pe,gn,!0)}function g(Pe,gn,$e){return m(Pe,$e,!1,gn)}function S(Pe){return ZD(Pe)?e.createParenthesizedExpression(Pe):Pe}function _(Pe){let gn=QD(267,60),$e=id(Pe),Ln=IF($e);return io(Ln,gn)!==1?e.createParenthesizedExpression(Pe):Pe}function b(Pe){let gn=id(Pe);return ZD(gn)?e.createParenthesizedExpression(Pe):Pe}function v(Pe){let gn=id(Pe),$e=ZD(gn);if(!$e)switch(eE(gn,!1).kind){case 274:case 270:$e=!0}return $e?e.createParenthesizedExpression(Pe):Pe}function T(Pe){let gn=eE(Pe,!0);switch(gn.kind){case 272:return e.createParenthesizedExpression(Pe);case 276:return gn.arguments?Pe:e.createParenthesizedExpression(Pe)}return W(Pe)}function W(Pe,gn){let $e=id(Pe);return od($e)&&($e.kind!==276||$e.arguments)?Pe:Ea(e.createParenthesizedExpression(Pe),Pe)}function F(Pe){return od(Pe)?Pe:Ea(e.createParenthesizedExpression(Pe),Pe)}function M(Pe){return dx(Pe)?Pe:Ea(e.createParenthesizedExpression(Pe),Pe)}function J(Pe){let gn=Za(Pe,A);return Ea(e.createNodeArray(gn,Pe.hasTrailingComma),Pe)}function A(Pe){let gn=id(Pe),$e=IF(gn),Ln=QD(269,27);return $e>Ln?Pe:Ea(e.createParenthesizedExpression(Pe),Pe)}function V(Pe){let gn=id(Pe);if(ao(gn)){let Ln=gn.expression,Vt=id(Ln).kind;(Vt===270||Vt===283)&&console.warn("implement me - parenthesizeExpressionOfExpressionStatement")}let $e=eE(gn,!1).kind;return $e===293||$e===270?Ea(e.createParenthesizedExpression(Pe),Pe):Pe}function ue(Pe){return!_c(Pe)&&(ZD(Pe)||eE(Pe,!1).kind===293)?Ea(e.createParenthesizedExpression(Pe),Pe):Pe}function ye(Pe){switch(Pe.kind){}return Pe}function he(Pe){switch(Pe.kind){}return Pe}function ce(Pe){switch(Pe.kind){case 157:return e.createParenthesizedType(Pe)}return ye(Pe)}function Ee(Pe){return e.createNodeArray(Za(Pe,ce))}function Fe(Pe){switch(Pe.kind){case 157:return e.createParenthesizedType(Pe)}return ce(Pe)}function be(Pe){return e.createNodeArray(Za(Pe,Fe))}function de(Pe){return Fe(Pe)}function Ae(Pe){return de(Pe)}function G(Pe){return de(Pe)}function Qe(Pe){return console.warn("implement me - hasJSDocPostfixQuestion"),!1}function me(Pe){return Qe(Pe)?e.createParenthesizedType(Pe):G(Pe)}function Se(Pe){return Pe}function _n(Pe,gn){return gn===0?Pe:Pe}function tt(Pe){if(Pn(Pe))return e.createNodeArray(Za(Pe,_n))}}var fV={getParenthesizeLeftSideOfBinaryForOperator:e=>Ci,getParenthesizeRightSideOfBinaryForOperator:e=>Ci,parenthesizeLeftSideOfBinary:(e,n)=>n,parenthesizeRightSideOfBinary:(e,n,r)=>r,parenthesizeExpressionOfComputedPropertyName:Ci,parenthesizeConditionOfConditionalExpression:Ci,parenthesizeBranchOfConditionalExpression:Ci,parenthesizeExpressionOfExportDefault:Ci,parenthesizeExpressionOfNew:e=>Xa(e,od),parenthesizeLeftSideOfAccess:e=>Xa(e,od),parenthesizeOperandOfPostfixUnary:e=>Xa(e,od),parenthesizeOperandOfPrefixUnary:e=>Xa(e,dx),parenthesizeExpressionsOfCommaDelimitedList:e=>Xa(e,qT),parenthesizeExpressionForDisallowedComma:Ci,parenthesizeExpressionOfExpressionStatement:Ci,parenthesizeConciseBodyOfArrowFunction:Ci,parenthesizeCheckTypeOfConditionalType:Ci,parenthesizeExtendsTypeOfConditionalType:Ci,parenthesizeConstituentTypesOfUnionType:e=>Xa(e,qT),parenthesizeConstituentTypeOfUnionType:Ci,parenthesizeConstituentTypesOfIntersectionType:e=>Xa(e,qT),parenthesizeConstituentTypeOfIntersectionType:Ci,parenthesizeOperandOfTypeOperator:Ci,parenthesizeOperandOfReadonlyTypeOperator:Ci,parenthesizeNonArrayTypeOfPostfixType:Ci,parenthesizeTypeOfOptionalType:Ci,parenthesizeTypeArguments:e=>e&&Xa(e,qT),parenthesizeLeadingTypeArgument:Ci};var pV={convertToFunctionBlock:ep,convertToFunctionExpression:ep};var mV=0;function nb(e,n){let r=e&8?Ci:Gd,i=gc(()=>e&1?fV:dV(m)),a=gc(()=>pV),c=Qy(D=>(k,j,Y)=>A(D,k,j,Y)),u=Qy(D=>(k,j)=>bt(D,k,j)),f=Qy(D=>k=>w(D,k)),m={get parenthesizer(){return i()},baseFactory:n,flags:e,get converters(){return a()},getDeclarationName:M,createToken:_,createSourceFile:y,createNodeArray:g,createIdentifier:G,createIntLiteral:Xn,createFloatLiteral:ft,createStringLiteral:Et,createBytesLiteral:At,createLiteralLikeNode:zi,createTrue:ye,createFalse:he,createStringLiteralFromNode:xn,createIncludeDirective:Jc,createPragmaDirective:wt,createDefineDirective:te,createUndefDirective:q,createIndexSignature:be,createTypeParameterDeclaration:Ka,updateTypeParameterDeclaration:pt,createFunctionTypeNode:Pe,createCallSignature:Fe,createModifier:Gi,createModifiersFromModifierFlags:qa,createTypePredicateNode:It,updateTypePredicateNode:pr,createArrayTypeNode:tn,createUnionTypeNode:Zn,createIntersectionTypeNode:zt,createParenthesizedType:xl,createKeywordTypeNode:Sd,createTypeReferenceNode:jn,updateTypeReferenceNode:wn,createLiteralTypeNode:se,createTypeLiteralNode:Mr,createStructTypeNode:Vt,createPropertySignature:ki,createMethodSignature:On,createQualifiedName:la,createComputedPropertyName:Jt,updateComputedPropertyName:Gn,createBindingElement:nn,updateBindingElement:Dr,createEmptyStatement:H,createBlock:ge,createVariableDeclarationList:Cr,createVariableStatement:xi,createVariableDeclaration:Ie,createFunctionDeclaration:Rr,createExpressionStatement:et,createReturnStatement:Le,createBreakStatement:Q,createContinueStatement:ie,createInheritDeclaration:qe,createIfStatement:Jn,createCaseBlock:ke,createSwitchStatement:We,createCaseClause:zn,createDefaultClause:ln,createForStatement:Or,createForEachStatement:Rn,createDoWhileStatement:Li,createWhileStatement:yt,createParameterDeclaration:Ko,createMissingDeclaration:Ae,createStructDeclarationNode:Ye,createCatchStatement:me,createCatchExpression:Qe,createEvaluateExpression:Se,createNewExpression:_n,createSpreadElement:tt,createByRefElement:Te,createFunctionExpression:gn,createOmittedExpression:Br,createParenthesizedExpression:Er,createConditionalExpression:Z,createBinaryExpression:fe,createCallExpression:mo,createInlineClosure:Ve,createSuperAccessExpression:St,createPropertyAccessExpression:kr,createPrefixUnaryExpression:Pr,createPostfixUnaryExpression:Lo,createElementAccessExpression:eu,createRangeExpression:vn,createArrayLiteralExpression:Co,createObjectLiteralExpression:nu,createMappingLiteralExpression:Xr,createMappingEntryExpression:Lt,convertToAssignmentExpression:ne,createLambdaIdentifierExpression:qn,createLambdaOperatorExpression:kn,createCastExpression:Ce,createCloneObjectExpression:zo,createTypeAssertion:Ln,createNewStructExpression:Hn,createExpressionWithTypeArguments:ui,cloneNode:de,createPropertyAssignment:$e,createJSDocText:ga,createJSDocComment:zs,createJSDocParameterTag:yn,createJSDocTypeExpression:Gs,createJSDocNameReference:Pc,createJSDocLink:ri,createJSDocLinkCode:ai,createJSDocLinkPlain:yr,createJSDocUnknownTag:Ht,createJSDocPropertyTag:li,createJSDocVariableTag:co,createJSDocTypeLiteral:ua,createJSDocSeeTag:rs,createJSDocImplementsTag:_s,createJSDocTypedefTag:el,createJSDocAugmentsTag:Nc,createJSDocSignature:bl,createJSDocCallbackTag:As,createJSDocOverloadTag:xs,createJSDocTemplateTag:Cn,get createJSDocOptionalType(){return f(195)},get createJSDocTypeTag(){return c(223)},get createJSDocReturnTag(){return c(221)},get createJSDocClassTag(){return u(211)},get createJSDocPublicTag(){return u(212)},get createJSDocPrivateTag(){return u(213)},get createJSDocProtectedTag(){return u(214)},get createJSDocOverrideTag(){return u(216)},get createJSDocDeprecatedTag(){return u(210)},get createJSDocAuthorTag(){return u(209)},get createJSDocThrowsTag(){return c(229)},get createJSDocSatisfiesTag(){return c(230)},get createJSDocThisTag(){return c(222)},get createJSDocVariadicType(){return f(197)},createSyntheticExpression:nl,createSyntaxList:is};return m;function y(D,k,j){let Y=n.createBaseSourceFileNode(176);return Y.statements=g(D),Y.endOfFileToken=k,Y.flags|=j,Y.text="",Y.fileName="",Y.path="",Y.resolvedPath="",Y.originalFileName="",Y.languageVersion=1,Y.languageVariant=0,Y.scriptKind=0,Y.isDeclarationFile=!1,Y.hasNoDefaultLib=!1,Y.transformFlags|=ic(Y.statements)|Yr(Y.endOfFileToken),Y.heritageClauses=void 0,Y.inactiveCodeRanges=void 0,Y.importCandidates=void 0,Y.jsDocParsingMode=void 0,Y.parsedMacros=void 0,Y.locals=void 0,Y.nextContainer=void 0,Y.endFlowNode=void 0,Y.bindSuggestionDiagnostics=void 0,Y.nodeCount=0,Y.identifierCount=0,Y.symbolCount=0,Y.parseDiagnostics=void 0,Y.bindDiagnostics=void 0,Y.lineMap=void 0,Y.externalModuleIndicator=void 0,Y.setExternalModuleIndicator=void 0,Y.pragmas=void 0,Y.checkLpcDirective=void 0,Y.referencedFiles=void 0,Y.typeReferenceDirectives=void 0,Y.libReferenceDirectives=void 0,Y.commentDirectives=void 0,Y.identifiers=void 0,Y.imports=void 0,Y.ambientModuleNames=void 0,Y.classifiableNames=void 0,Y.impliedNodeFormat=void 0,Y.nodeMacroMap=void 0,Y}function g(D,k){if(D===void 0||D===Re)D=[];else if(qT(D)){if(k===void 0||D.hasTrailingComma===k)return E.attachNodeArrayDebugInfo(D),D;let Be=D.slice();return Be.pos=D.pos,Be.end=D.end,Be.hasTrailingComma=k,Be.isComplete=void 0,E.attachNodeArrayDebugInfo(Be),Be}let j=D.length,Y=j>=1&&j<=4?D.slice():D;return Y.pos=ha(Y)?.pos??-1,Y.end=Vo(Y)?.end??-1,Y.hasTrailingComma=!!k,Y.isComplete=void 0,Xue(Y),E.attachNodeArrayDebugInfo(Y),Y}function S(D){return n.createBaseTokenNode(D)}function _(D){return S(D)}function b(D){return n.createBaseNode(D)}function v(D){let k=b(D);return k.symbol=void 0,k.localSymbol=void 0,k}function T(D,k,j,Y=0,Be){let Ue=Be?D&&ID(D):ci(D);if(Ue&&Sn(Ue)&&!am(Ue)){let $n=xc(Ea(de(Ue),Ue),Ue.parent);return Y|=bo(Ue),j||(Y|=96),k||(Y|=3072),Y&&gs($n,Y),$n}return W(D)}function W(D,k=0,j,Y){E.assert(!(k&7),"Argument out of range: flags");let Be=D?Dg(D)?fd(!1,j,D,Y,ra):`generated@${ys(D)}`:"";(j||Y)&&(k|=16);let Ue=F(Be,4|k,j,Y);return Ue.original=D,Ue}function F(D,k,j,Y){let Be=V(D);return yV(Be,{flags:k,id:mV,prefix:j,suffix:Y}),mV++,Be}function M(D,k,j){return T(D,k,j)}function J(D,k,j){let Y=b(D);return Y.tagName=k,Y.comment=j,Y}function A(D,k,j,Y){let Be=J(D,k??G(gV(D)),Y);return Be.typeExpression=j,Be}function V(D){let k=n.createBaseIdentifierNode(89);return k.text=D,k.jsDoc=void 0,k.flowNode=void 0,k.symbol=void 0,k}function ue(D){let k=n.createBaseSourceFileNode(176);k.flags|=D.flags&-17;for(let j in D)if(!(Ia(k,j)||!Ia(D,j))){if(j==="emitNode"){k.emitNode=void 0;continue}k[j]=D[j]}return k}function ye(){return _(136)}function he(){return _(135)}function ce(D){let k=ue(D);return r(k,D),k}function Ee(D){let k=V(D.text);k.flags|=D.flags&-17,k.jsDoc=D.jsDoc,k.flowNode=D.flowNode,k.symbol=D.symbol,k.transformFlags=D.transformFlags,r(k,D);let j=jg(D);return j&&uS(k,j),k}function Fe(D,k,j){let Y=v(151);return Y.parameters=Yt(k),Y.type=j,Y.transformFlags=0,Y.jsDoc=void 0,Y.locals=void 0,Y.nextContainer=void 0,Y.typeArguments=void 0,Y}function be(D,k,j){let Y=v(150);return Y.modifiers=Yt(D),Y.parameters=Yt(k),Y.type=j,Y.transformFlags=0,Y.jsDoc=void 0,Y.locals=void 0,Y.nextContainer=void 0,Y.typeArguments=void 0,Y}function de(D){if(D===void 0)return D;if(Vr(D))return ce(D);if(Sn(D))return Ee(D);let k=fx(D.kind)?n.createBaseNode(D.kind):n.createBaseTokenNode(D.kind);k.flags|=D.flags&-17,k.transformFlags=D.transformFlags,r(k,D);for(let j in D)Ia(k,j)||!Ia(D,j)||(k[j]=D[j]);return k}function Ae(){let D=v(173);return D.jsDoc=void 0,D}function G(D,k,j){k===void 0&&D&&(k=tp(D)),k===89&&(k=void 0);let Y=V(D);return j&&(Y.flags|=256),Y.transformFlags=0,Y}function Qe(D,k,j,Y){let Be=b(268);return Be.expression=D,Be.modifier=k,Be.modifierExpression=j,Be.block=Y,Be}function me(D,k){let j=b(255);return j.expression=D,j.block=k,j.transformFlags|=Yr(j.expression)|Yr(j.block),j.locals=void 0,j.nextContainer=void 0,j}function Se(D,k){let j=b(278);return j.expression=D,j.arguments=k?i().parenthesizeExpressionsOfCommaDelimitedList(k):void 0,j.transformFlags|=Yr(j.expression)|ic(j.arguments)|2,j}function _n(D,k,j){let Y=v(276);return Y.expression=D&&(Zo(D)?D:i().parenthesizeExpressionOfNew(D)),Y.typeArguments=Yt(k),Y.arguments=j?i().parenthesizeExpressionsOfCommaDelimitedList(j):void 0,Y.transformFlags|=Yr(Y.expression)|ic(Y.arguments)|2,Y}function tt(D){let k=b(294);return k.expression=i().parenthesizeExpressionForDisallowedComma(D),k.transformFlags|=Yr(k.expression)|1,k}function Pe(D,k,j){let Y=v(158);return Y.parameters=Yt(k),Y.type=j,Y.transformFlags=0,Y.modifiers=void 0,Y.jsDoc=void 0,Y.locals=void 0,Y.nextContainer=void 0,Y.typeArguments=void 0,Y}function gn(D,k,j,Y,Be){let Ue=v(270);return Ue.modifiers=Yt(D),Ue.name=Je(k),Ue.parameters=g(j),Ue.type=Y,Ue.body=Be,Ue.transformFlags|=lS(Ue.name)|Yr(Ue.type)|ic(Ue.parameters)|Yr(Ue.body),Ue.typeArguments=void 0,Ue.jsDoc=void 0,Ue.locals=void 0,Ue.nextContainer=void 0,Ue.flowNode=void 0,Ue.endFlowNode=void 0,Ue.returnFlowNode=void 0,Ue}function $e(D,k){let j=v(174);return j.name=Je(D),j.initializer=i().parenthesizeExpressionForDisallowedComma(k),j.transformFlags|=lS(j.name)|Yr(j.initializer),j.modifiers=void 0,j.jsDoc=void 0,j}function Ln(D,k){let j=b(279);return j.expression=i().parenthesizeOperandOfPrefixUnary(k),j.type=D,j.transformFlags|=Yr(j.expression)|Yr(j.type),j}function Vt(D){let k=b(258);return k.typeName=D,k}function Hn(D,k){let j=v(277);return j.type=D,j.arguments=k?Yt(k):void 0,j}function Ye(D,k,j,Y){let Be=v(241);return Be.name=k,Be.modifiers=Yt(D),Be.heritageName=j,Be.type=Y,Be.transformFlags=Be.heritageName?3:0,Be.jsDoc=void 0,Be.locals=void 0,Be.nextContainer=void 0,Be}function se(D){let k=b(257);return k.literal=D,k.transformFlags=0,k}function jn(D,k){let j=b(166);return j.typeName=Je(D),j.typeArguments=k&&i().parenthesizeTypeArguments(g(k)),j.transformFlags=0,j}function wn(D,k,j){return D.typeName!==k||D.typeArguments!==j?Gt(jn(k,j),D):D}function Xn(D,k=0){let j=typeof D=="number"?D+"":D,Y=v(11);return Y.text=j,Y.numericLiteralFlags=k,Y.transformFlags=0,Y}function ft(D,k=0){let j=typeof D=="number"?D+"":D,Y=v(13);return Y.text=j,Y.numericLiteralFlags=k,Y.transformFlags=0,Y}function Ft(D){let k=v(16);return k.text=D,k}function Et(D,k){let j=Ft(D);return j.hasExtendedUnicodeEscape=k,j}function At(D,k){let j=v(14);return j.text=D,j.hasExtendedUnicodeEscape=k,j}function xn(D){let k=Ft(gh(D));return k.textSourceNode=D,k}function It(D,k,j){let Y=b(167);return Y.parameterName=Je(k),Y.type=j,Y.transformFlags=0,Y}function pr(D,k,j,Y){return D.parameterName!==j||D.type!==Y?Gt(It(k,j,Y),D):D}function tn(D){let k=b(161);return k.elementType=D,k}function ot(D,k,j){let Y=b(D);return Y.types=m.createNodeArray(j(k)),Y.transformFlags=0,Y}function Zn(D){let k=b(157);return k.types=m.createNodeArray(D),k}function zt(D){return ot(159,D,i().parenthesizeConstituentTypesOfIntersectionType)}function Yt(D){return D?.length>0?g(D):void 0}function Cr(D,k=0){let j=b(238);return j.flags|=k&1,j.declarations=g(D),j}function xi(D,k,j){let Y=b(242);return Y.modifiers=Yt(D),Y.type=k,Y.declarationList=Array.isArray(j)?Cr(j):j,Y.transformFlags|=ic(Y.modifiers)|Yr(Y.declarationList),Y.jsDoc=void 0,Y.flowNode=void 0,Y}function Ie(D,k,j,Y){let Be=v(237);return Be.name=Je(D),Be.type=j,Be.initializer=Y,Be.refToken=k,Be.transformFlags|=lS(Be.name)|Yr(Be.initializer),Be.jsDoc=void 0,Be}function Oe(D){return D}function Je(D){return typeof D=="string"?G(D):D}function Z(D,k,j,Y,Be){let Ue=b(267);return Ue.condition=D,Ue.questionToken=k??_(60),Ue.whenTrue=j,Ue.colonToken=Y??_(61),Ue.whenFalse=Be,Ue}function fe(D,k,j){let Y=v(269),Be=sn(k);return Y.left=D,Y.operatorToken=Be,Y.right=j,Y.jsDoc=void 0,Y}function Ce(D,k){let j=b(296);return j.expression=D,j.type=k,j}function ne(D){E.assertNode(D.name,Sn),E.assertIsDefined(D.equalsToken),E.assertIsDefined(D.initializer);let k=D.name,j=D.initializer,Y=D.equalsToken;D.name=void 0,D.initializer=void 0,D.equalsToken=void 0;let Be=D;return Be.kind=269,Be.left=k,Be.operatorToken=Y,Be.right=j,Be}function sn(D){return typeof D=="number"?_(D):D}function H(){let D=b(254);return D.jsDoc=void 0,D}function ge(D,k){let j=b(236);return j.statements=g(D),j.multiLine=k,j.transformFlags|=ic(j.statements),j.jsDoc=void 0,j.locals=void 0,j.nextContainer=void 0,j}function qn(D){let k=b(284);return k.name=D,k}function kn(D){let k=b(285);return k.operator=D,k}function On(D,k,j,Y,Be,Ue){let $n=v(156);return $n.modifiers=Yt(D),$n.name=Je(k),$n.parameters=Yt(Be),$n.type=Ue,$n.transformFlags=0,$n.jsDoc=void 0,$n.locals=void 0,$n.nextContainer=void 0,$n.typeArguments=void 0,$n}function nn(D,k,j,Y){let Be=v(266);return Be.dotDotDotToken=D,Be.propertyName=Je(k),Be.name=Je(j),Be.initializer=Y,Be.transformFlags|=Yr(Be.dotDotDotToken)|lS(Be.propertyName)|lS(Be.name)|Yr(Be.initializer)|(Be.dotDotDotToken?1:0),Be.flowNode=void 0,Be}function Dr(D,k,j,Y,Be){return D.propertyName!==j||D.dotDotDotToken!==k||D.name!==Y||D.initializer!==Be?Gt(nn(k,j,Y,Be),D):D}function Gt(D,k){return D!==k&&(r(D,k),Ea(D,k)),D}function Rr(D,k,j,Y,Be){let Ue=v(169);return Ue.modifiers=Yt(D),Ue.name=Je(k),Ue.parameters=g(j),Ue.type=Y,Ue.body=Be,Ue.body?Ue.transformFlags=ic(Ue.modifiers)|Yr(Ue.asteriskToken)|lS(Ue.name)|ic(Ue.typeParameters)|ic(Ue.parameters)|Yr(Ue.type)|Yr(Ue.body)|4:Ue.transformFlags=0,Ue.typeArguments=void 0,Ue.jsDoc=void 0,Ue.locals=void 0,Ue.nextContainer=void 0,Ue.endFlowNode=void 0,Ue.returnFlowNode=void 0,Ue}function zi(D,k){switch(D){case 11:return Xn(k,0);case 13:return ft(k);case 16:return Et(k,void 0)}}function zo(D,k){let j=v(273);return j.expression=D,j.arguments=Yt(k),j}function sa(D,k){let j=v(272);return j.expression=D,j.arguments=k,j.transformFlags|=Yr(j.expression)|ic(j.typeArguments)|ic(j.arguments),j.typeArguments&&(j.transformFlags|=0),j}function mo(D,k){return sa(D,k)}function Ve(D){let k=v(283);return k.body=D,k.transformFlags|=Yr(k.body),k.jsDoc=void 0,k.locals=void 0,k.nextContainer=void 0,k.flowNode=void 0,k.endFlowNode=void 0,k.returnFlowNode=void 0,k.typeArguments=void 0,k}function et(D){let k=b(247);return k.expression=D,k.transformFlags|=Yr(k.expression),k.jsDoc=void 0,k.flowNode=void 0,k}function Le(D){let k=b(248);return k.expression=D,k.transformFlags|=Yr(k.expression),k.jsDoc=void 0,k.flowNode=void 0,k}function Q(D){let k=b(250);return k.label=Je(D),k.transformFlags|=Yr(k.label)|4,k.jsDoc=void 0,k.flowNode=void 0,k}function ie(D){let k=b(251);return k.label=Je(D),k.transformFlags|=Yr(k.label)|4,k.jsDoc=void 0,k.flowNode=void 0,k}function Te(D,k){let j=b(295);return j.expression=k,j}function te(D,k,j){let Y=v(179);return Y.name=Je(D),Y.arguments=Yt(k),Y.range=j,Y.transformFlags|=Yr(Y.name),Y.jsDoc=void 0,Y}function q(D){let k=b(180);return k.name=Je(D),k.transformFlags=0,k}function qe(D,k){let j=b(252);return j.modifiers=Yt(k),j.inheritClause=D,j.transformFlags|=ic(j.modifiers)|Yr(j.inheritClause),j.jsDoc=void 0,j}function dn(D){return D}function Jn(D,k,j){let Y=b(253);return Y.expression=D,Y.thenStatement=k,Y.elseStatement=j,Y.transformFlags|=Yr(Y.expression)|Yr(Y.thenStatement)|Yr(Y.elseStatement),Y.jsDoc=void 0,Y.flowNode=void 0,Y}function ke(D){let k=b(240);return k.clauses=g(D),k.transformFlags|=ic(k.clauses),k.locals=void 0,k.nextContainer=void 0,k}function We(D,k,j){let Y=b(256);return Y.expression=D,Y.caseBlock=j,Y.preBlock=k,Y.transformFlags|=Yr(Y.expression)|Yr(Y.caseBlock),Y.jsDoc=void 0,Y.flowNode=void 0,Y.possiblyExhaustive=!1,Y}function ln(D){let k=b(301);return k.statements=g(D),k.transformFlags=ic(k.statements),k}function zn(D,k){let j=b(299);return j.expression=D,j.statements=g(k),j.transformFlags|=Yr(j.expression)|ic(j.statements),j.jsDoc=void 0,j}function St(D,k){let j=b(287);return j.namespace=Je(k),j.name=D,j}function ct(D,k,j){let Y=v(286);return Y.expression=D,Y.name=k,Y.propertyAccessToken=j,Y.transformFlags=Yr(Y.expression)|(Sn(Y.name)?CM(Y.name):Yr(Y.name)),Y.jsDoc=void 0,Y.flowNode=void 0,Y}function kr(D,k,j){return ct(i().parenthesizeLeftSideOfAccess(D,!1),Je(k),j)}function Or(D,k,j,Y){let Be=b(243);return Be.initializer=D,Be.statement=Y,Be.condition=k,Be.incrementor=j,Be.transformFlags|=Yr(Be.initializer)|Yr(Be.condition)|Yr(Be.incrementor)|Yr(Be.statement),Be.jsDoc=void 0,Be.locals=void 0,Be.nextContainer=void 0,Be.flowNode=void 0,Be}function Rn(D,k,j){let Y=b(244);return Y.initializer=D,Y.statement=j,Y.expression=k,Y.transformFlags|=Yr(Y.initializer)|Yr(Y.expression)|Yr(Y.statement),Y.jsDoc=void 0,Y.locals=void 0,Y.nextContainer=void 0,Y.flowNode=void 0,Y}function Li(D,k){let j=b(245);return j.statement=D,j.expression=k,j.transformFlags|=Yr(j.statement)|Yr(j.expression)|4,j.jsDoc=void 0,j.flowNode=void 0,j}function yt(D,k){let j=b(246);return j.statement=D,j.expression=k,j.transformFlags|=Yr(j.statement)|Yr(j.expression)|4,j.jsDoc=void 0,j.flowNode=void 0,j}function Lo(D,k){let j=b(288);return j.operator=k,j.operand=D,j.transformFlags|=Yr(j.operand),j}function Ko(D,k,j,Y,Be,Ue){let $n=v(149);return $n.modifiers=Yt(D),$n.name=Je(j),$n.dotDotDotToken=k,$n.ampToken=Y,$n.type=Be,$n.initializer=Ue,$n.transformFlags=ic($n.modifiers)|Yr($n.dotDotDotToken)|lS($n.name)|Yr($n.initializer),$n.jsDoc=void 0,$n}function Ua(D,k){let j=v(281);return j.expression=D,j.argumentExpression=k,j.transformFlags|=Yr(j.expression)|Yr(j.argumentExpression),j.jsDoc=void 0,j.flowNode=void 0,j}function ca(D){return typeof D=="string"?Et(D):typeof D=="number"?Xn(D):D}function wt(D){let k=b(187);return k.expression=Yt(D),k.transformFlags=0,k.jsDoc=void 0,k}function Jc(D,k){let j=b(178);return j.content=g(D),j.localFirst=k,j.transformFlags=0,j.jsDoc=void 0,j}function vn(D,k){let j=v(282);return j.left=D,j.right=k,j.transformFlags|=Yr(j.left)|Yr(j.right),j.jsDoc=void 0,j}function eu(D,k){return Ua(i().parenthesizeLeftSideOfAccess(D,!1),ca(k))}function la(D,k){let j=b(146);return j.left=D,j.right=Je(k),j.transformFlags|=Yr(j.left)|CM(j.right),j.flowNode=void 0,j}function Jt(D){let k=b(147);return k.expression=D,k.transformFlags|=Yr(k.expression),k}function Gn(D,k){return D.expression!==k?Gt(Jt(k),D):D}function Br(){return b(297)}function Er(D){let k=b(289);return k.expression=D,k.transformFlags=Yr(k.expression),k.jsDoc=void 0,k}function xl(D){let k=b(165);return k.type=D,k.transformFlags=0,k}function Sd(D){return _(D)}function Pr(D,k){let j=b(298);return j.operator=D,dx(k)||(k=Ea(m.createParenthesizedExpression(k),k)),j.operand=Xa(k,dx),j.transformFlags|=Yr(j.operand),(D===47||D===48)&&Sn(j.operand)&&!am(j.operand)&&!hV(j.operand)&&(j.transformFlags|=5),j}function nu(D,k){let j=v(293);return j.properties=g(D),j.multiLine=k,j.transformFlags|=ic(j.properties),j.jsDoc=void 0,j}function Co(D,k,j){let Y=b(290),Be=D&&Vo(D),Ue=D?g(D,j):void 0;return Y.elements=i().parenthesizeExpressionsOfCommaDelimitedList(Ue),Y.multiLine=k,Y.transformFlags|=ic(Y.elements),Y}function Xr(D,k,j,Y){let Be=b(291),Ue=k&&Vo(k),$n=k?g(k,Y):void 0;return Be.initializer=D,Be.elements=$n,Be.multiLine=j,Be.transformFlags|=ic(Be.elements),Be}function Lt(D,k){let j=b(292);return j.name=D,j.elements=Yt(k),j.transformFlags|=Yr(j.name)|ic(j.elements),j}function ki(D,k,j){let Y=v(153);return Y.modifiers=Yt(D),Y.name=Je(k),Y.type=j,Y.transformFlags=0,Y.initializer=void 0,Y.jsDoc=void 0,Y}function Mr(D){let k=v(163);return k.members=g(D),k.transformFlags=0,k}function ga(D){let k=b(200);return k.text=D,k}function zs(D,k){let j=b(199);return j.comment=D,j.tags=Yt(k),j}function Gs(D){let k=b(188);return k.type=D,k}function Pc(D){let k=b(189);return k.name=D,k}function fr(D,k,j=!1){let Y=w(D,j?k&&i().parenthesizeNonArrayTypeOfPostfixType(k):k);return Y.postfix=j,Y}function w(D,k){let j=b(D);return j.type=k,j}function De(D,k,j){let Y=v(D);return Y.comment=j,Y.tagName=k,Y}function yn(D,k,j,Y,Be,Ue){let $n=De(220,D??G("param"),Ue);return $n.typeExpression=Y,$n.name=k,$n.isNameFirst=!!Be,$n.isBracketed=j,$n}function bt(D,k,j){return J(D,k??G(gV(D)),j)}function ri(D,k){let j=b(203);return j.name=D,j.text=k,j}function ai(D,k){let j=b(204);return j.name=D,j.text=k,j}function yr(D,k){let j=b(205);return j.name=D,j.text=k,j}function Ht(D,k){return J(206,D,k)}function li(D,k,j,Y,Be,Ue){let $n=De(227,D??G("prop"),Ue);return $n.typeExpression=Y,$n.name=k,$n.isNameFirst=!!Be,$n.isBracketed=j,$n}function co(D,k,j,Y,Be,Ue){let $n=De(228,D??G("var"),Ue);return $n.typeExpression=Y,$n.name=k,$n.isNameFirst=!!Be,$n.isBracketed=j,$n}function ua(D,k=!1){let j=v(201);return j.jsDocPropertyTags=Yt(D),j.isArrayType=k,j}function rs(D,k,j){let Y=J(226,D??G("see"),j);return Y.name=k,Y}function _s(D,k,j){let Y=J(208,D??G("implements"),j);return Y.class=k,Y}function el(D,k,j,Y){let Be=De(225,D??G("typedef"),Y);return Be.typeExpression=k,Be.fullName=j,Be.name=j,Be.locals=void 0,Be.nextContainer=void 0,Be}function Nc(D,k,j){let Y=J(207,D??G("augments"),j);return Y.class=k,Y}function ui(D,k){let j=b(280);return j.expression=i().parenthesizeLeftSideOfAccess(D,!1),j.typeArguments=k&&i().parenthesizeTypeArguments(k),j.transformFlags|=Yr(j.expression)|ic(j.typeArguments),j}function nl(D,k=!1,j){let Y=b(275);return Y.type=D,Y.isSpread=k,Y.tupleNameSource=j,Y}function is(D){let k=b(232);return k._children=D,k}function bl(D,k,j){let Y=v(202);return Y.parameters=g(k),Y.type=j,Y.jsDoc=void 0,Y.locals=void 0,Y.nextContainer=void 0,Y}function As(D,k,j,Y){let Be=De(217,D??G("callback"),Y);return Be.typeExpression=k,Be.fullName=j,Be.name=j,Be.locals=void 0,Be.nextContainer=void 0,Be}function xs(D,k,j){let Y=J(218,D??G("overload"),j);return Y.typeExpression=k,Y}function Cn(D,k,j,Y){let Be=J(224,D??G("template"),Y);return Be.constraint=k,Be.typeParameters=g(j),Be}function Ka(D,k,j,Y){let Be=v(148);return Be.modifiers=Yt(D),Be.name=Je(k),Be.constraint=j,Be.default=Y,Be.transformFlags=0,Be.expression=void 0,Be.jsDoc=void 0,Be}function pt(D,k,j,Y,Be){return D.modifiers!==k||D.name!==j||D.constraint!==Y||D.default!==Be?Gt(Ka(k,j,Y,Be),D):D}function Gi(D){return _(D)}function qa(D){let k=[];return D&1&&k.push(Gi(124)),D&2&&k.push(Gi(122)),D&4&&k.push(Gi(123)),D&256&&k.push(Gi(125)),D&32&&k.push(Gi(130)),D&128&&k.push(Gi(127)),D&64&&k.push(Gi(128)),D&512&&k.push(Gi(131)),k.length?k:void 0}}function Gd(e,n){if(e.original!==n&&(e.original=n,n)){let r=n.emitNode;r&&(e.emitNode=$ue(r,e.emitNode))}return e}function $ue(e,n){let{flags:r}=e;return n||(n={}),n}var aI=uV();function sI(e){return e.flags|=16,e}var Que={createBaseSourceFileNode:e=>sI(aI.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>sI(aI.createBaseIdentifierNode(e)),createBaseTokenNode:e=>sI(aI.createBaseTokenNode(e)),createBaseNode:e=>sI(aI.createBaseNode(e))},Ge=nb(4,Que);function Yue(e,n){return n}function Yr(e){if(!e)return 0;let n=e.transformFlags;return pl(e)&&om(e.name)?Yue(e.name,n):n}function Xue(e){let n=0;for(let r of e)n|=Yr(r);e.transformFlags=n}function gV(e){switch(e){case 223:return"type";case 221:return"returns";case 222:return"this";case 219:return"enum";case 209:return"author";case 211:return"class";case 212:return"public";case 213:return"private";case 214:return"protected";case 215:return"readonly";case 216:return"override";case 224:return"template";case 225:return"typedef";case 220:return"param";case 227:return"prop";case 217:return"callback";case 218:return"overload";case 207:return"augments";case 208:return"implements";case 231:return"import";default:return E.fail(`Unsupported kind: ${E.formatSyntaxKind(e)}`)}}function ic(e){return e?e.transformFlags:0}function lS(e){return e&&Sn(e)?CM(e):Yr(e)}function CM(e){return Yr(e)}var DM=new WeakMap;function tI(e,n){let r=e.kind;return fx(r)?r===232?e._children:DM.get(n)?.get(e):Re}function TV(e,n,r){if(e.kind===232)return E.fail("Should not need to re-set the children of a SyntaxList."),[];let i=DM.get(n);return i===void 0&&(i=new WeakMap,DM.set(n,i)),i.set(e,r),r}function EM(e,n){return e===n?0:e.priority===n.priority?0:e.priority===void 0?1:n.priority===void 0?-1:io(e.priority,n.priority)}function gs(e,n){return dS(e).flags=n,e}function dS(e){if(e.emitNode)E.assert(!(e.emitNode.internalFlags&8),"Invalid attempt to mutate an immutable node.");else{if(nx(e)){if(e.kind===176)return e.emitNode={annotatedNodes:[e]};let n=$t(Io($t(e)))??E.fail("Could not determine parsed source file.");dS(n).annotatedNodes.push(e)}e.emitNode={}}return e.emitNode}function fS(e){return e.emitNode?.startsOnNewLine}function uS(e,n){return dS(e).identifierTypeArguments=n,e}function jg(e){return e.emitNode?.identifierTypeArguments}function ede(e,n){return dS(e).leadingComments=n,e}function cI(e){return e.emitNode?.leadingComments}function lI(e,n,r,i){return ede(e,$r(cI(e),{kind:n,pos:-1,end:-1,hasTrailingNewLine:i,text:r}))}function PM(e){let n=$t(Io(e))?.emitNode?.annotatedNodes;if(n)for(let r of n)r.emitNode=void 0}function NM(e,n){let r=dS(e);return r.snippetElement=n,e}function SV(e,n){let r=dS(e);return r.flags=r.flags|n,e}function bE(e){return e.emitNode?.commentRange??e}function oV(e){return e.emitNode?.snippetElement}function kM(e){return e.emitNode?.helpers}function yV(e,n){return dS(e).autoGenerate=n,e}function Ea(e,n){return n?ns(e,n.pos,n.end):e}function Qx(e){let n=e.kind;return n===148||n===149||n===153||n===152||n===156||n===154||n===150||n===270||n===242||n===169||n===271||n===274||n===170||n===239}var uI;(y=>{function e(g,S,_,b,v,T,W){let F=S>0?v[S-1]:void 0;return E.assertEqual(_[S],e),v[S]=g.onEnter(b[S],F,W),_[S]=u(g,e),S}y.enter=e;function n(g,S,_,b,v,T,W){E.assertEqual(_[S],n),E.assertIsDefined(g.onLeft),_[S]=u(g,n);let F=g.onLeft(b[S].left,v[S],b[S]);return F?(m(S,b,F),f(S,_,b,v,F)):S}y.left=n;function r(g,S,_,b,v,T,W){return E.assertEqual(_[S],r),E.assertIsDefined(g.onOperator),_[S]=u(g,r),g.onOperator(b[S].operatorToken,v[S],b[S]),S}y.operator=r;function i(g,S,_,b,v,T,W){E.assertEqual(_[S],i),E.assertIsDefined(g.onRight),_[S]=u(g,i);let F=g.onRight(b[S].right,v[S],b[S]);return F?(m(S,b,F),f(S,_,b,v,F)):S}y.right=i;function a(g,S,_,b,v,T,W){E.assertEqual(_[S],a),_[S]=u(g,a);let F=g.onExit(b[S],v[S]);if(S>0){if(S--,g.foldState){let M=_[S]===a?"right":"left";v[S]=g.foldState(v[S],F,M)}}else T.value=F;return S}y.exit=a;function c(g,S,_,b,v,T,W){return E.assertEqual(_[S],c),S}y.done=c;function u(g,S){switch(S){case e:if(g.onLeft)return n;case n:if(g.onOperator)return r;case r:if(g.onRight)return i;case i:return a;case a:return c;case c:return c;default:E.fail("Invalid state")}}y.nextState=u;function f(g,S,_,b,v){return g++,S[g]=e,_[g]=v,b[g]=void 0,g}function m(g,S,_){if(E.shouldAssert(2))for(;g>=0;)E.assert(S[g]!==_,"Circular traversal detected."),g--}})(uI||(uI={}));var vM=class{constructor(n,r,i,a,c,u){this.onEnter=n;this.onLeft=r;this.onOperator=i;this.onRight=a;this.onExit=c;this.foldState=u}};function pS(e,n,r,i,a,c){let u=new vM(e,n,r,i,a,c);return f;function f(m,y){let g={value:void 0},S=[uI.enter],_=[m],b=[void 0],v=0;for(;S[v]!==uI.done;)v=S[v](u,v,S,_,b,g,y);return E.assertEqual(v,0),g.value}}function hV(e){return(bo(e)&32768)!==0}function fd(e,n,r,i,a){return n=pp(n,a),i=pp(i,a),r=nde(r,a),`${e?"#":""}${n}${r}${i}`}function nde(e,n){return typeof e=="string"?e:tde(e,E.checkDefined(n))}function tde(e,n){return am(e)?n(e):ra(e)}function pp(e,n){return typeof e=="object"?fd(!1,e.prefix,e.node,e.suffix,n):typeof e=="string"?e.length>0&&e.charCodeAt(0)===35?e.slice(1):e:""}function FM(e){let n=e.emitNode.autoGenerate;if(n.flags&4){let r=n.id,i=e,a=i.original;for(;a;){i=a;let c=i.emitNode?.autoGenerate;if(Dg(i)&&(c===void 0||c.flags&4&&c.id!==r))break;a=i.original}return i}return e}function mS(e){let n=YT(e);return E.assertIsDefined(n),n}function IM(e){let n=ks(e,Vr),r=n&&n.emitNode;return!!r&&(!!r.externalHelpersModuleName||!!r.externalHelpers)}function Ph(e){return{loadInclude:n,loadIncludeFile:r};function n(a,c){let u=r(a,c,!1);return{uri:u.filename,source:u.source,error:u.error}}function r(a,c,u,f){let m=Qr(a),y=ei(m),g=Qr(c),S=e.getCompilerOptions().rootDir||e.getCurrentDirectory(),_,b;if(dh(g))_=mp(y,g);else if(LM(g))_=mp(S,"."+g);else{let T=[...i(a),...f||[],S];fu(T,y),u&&T.reverse(),b=T,_=Bn(T,W=>(_=mp(W,g),e.fileExists(_)?_:void 0))}if(!_)return{filename:g,error:`Include file ${c} not found`};let v=e.readFile(_);return{filename:_,source:v}}function i(a){return e.getIncludeDirs(a)}}var ode=8,ade=()=>kV;function kV(e,n,r,i){this.directive=void 0,this.name=e,this.includeFilename=n,this.includeDirPos=void 0,this.includeDirEnd=void 0,this.disabled=!1,this.pos=void 0,this.end=void 0,this.argsIn=void 0,this.range=i,this.arguments=void 0,this.getText=r,this.originFilename=void 0,this.posInOrigin=void 0,this.endInOrigin=void 0}var CE;(MP=>{var e=KT(1,!0,!1),n,r,i=8192,a,c,u,f,m,y,g,S,_,b,v,T,W=[],F,M,J=!0,A,V=1,ue=!0,ye,he=!1,ce,Ee,Fe,be=!1,de,Ae,G,Qe,me,Se,_n,tt,Pe,gn,$e,Ln,Vt;function Hn(R){return Ae++,R}var Ye={createBaseSourceFileNode:R=>Hn(new f(R,0,0)),createBaseIdentifierNode:R=>Hn(new u(R,0,0)),createBaseTokenNode:R=>Hn(new c(R,0,0)),createBaseNode:R=>Hn(new a(R,0,0))},se=nb(11,Ye),{createObjectLiteralExpression:jn,createElementAccessExpression:wn,createForStatement:Xn,createIfStatement:ft,createCallExpression:Ft,createArrayLiteralExpression:Et,createParenthesizedExpression:At,createPropertyAccessExpression:xn,createVariableDeclaration:It,createVariableDeclarationList:pr,createVariableStatement:tn,createBlock:ot,createNodeArray:Zn,createIntLiteral:zt,createFloatLiteral:Yt,createStringLiteral:Cr,createBytesLiteral:xi,createLiteralLikeNode:Ie,createIdentifier:Oe,createToken:Je,createExpressionStatement:Z,createNewExpression:fe}=se;function Ce(R,$,oe,Ne,Ze,Dn,ut,_r,Qt,Ri){a=pa.getNodeConstructor(),c=pa.getTokenConstructor(),u=pa.getIdentifierConstructor(),f=pa.getSourceFileConstructor(),m=ade(),y=R,g=_r,_=$,_=$,b=Ze,Fe=Dn,v=ut,T=Ri;let C=ei(y);C.endsWith("/")||(C=C+"/"),$e=new Map,F=new Map,F.set("__DIR__",bt("__DIR__",`"${C}"`)),F.set("__FILE__",bt("__FILE__",`"${y}"`)),bc(Ne||$_,(Bt,Jr)=>{F.set(Jr,bt(Jr,Bt))}),W=[],Bn(oe,Bt=>{let Jr=se.createStringLiteral(Bt);ns(Jr,0,0);let uo=se.createIncludeDirective([Jr],!1);iS(uo,16);let vc=Cn(uo,0,0);W.push(vc)}),A=[],M=void 0,me=new Map,me.set(y,_),Se=new Map,n=void 0,r=void 0,ce=[],Ae=0,ue=!0,G=new Map,Qe=0,_n=[],tt=[],Pe=[],gn=new Map,e.resetSavedStates(),e.setText(_),e.setFileName(y),e.setOnError(sn),e.setScriptTarget(b),e.setLanguageVariant(T),e.setScriptKind(v),e.setJSDocParsingMode(Qt)}function ne(){e.clearCommentDirectives(),e.setText(""),e.setOnError(void 0),e.setScriptKind(0),e.setJSDocParsingMode(0),e.setFileName(void 0),e.resetSavedStates(),_=void 0,b=void 0,Fe=void 0,v=void 0,T=void 0,S=0,ce=void 0,Ee=void 0,Ln=0,G=void 0,_n=void 0,ue=!0,me=void 0,Se.clear(),Se=void 0,A=void 0,V=1,tt=void 0,Pe=void 0,gn=void 0,n=void 0,r=void 0,$e=void 0,F=void 0,M=void 0,J=!0}function sn(R,$,oe){We(e.getTokenEnd(),$,e.getFileName(),R,oe)}function H(){return de}function ge(R,$,oe=1,Ne,Ze=!1){Ce(R,$,Re,$_,oe,Ne,6,void 0,0,2),S=ye,nn();let Dn=Rn(),ut,_r;if(H()===1)ut=Co([],Dn.pos,Dn.pos),_r=Gi();else{let C;for(;H()!==1;){let uo;switch(H()){case 22:uo=of();break;case 136:case 135:case 137:uo=Gi();break;case 42:Ao(()=>nn()===10&&nn()!==61)?uo=Yb():uo=qn();break;case 10:case 16:if(Ao(()=>nn()!==61)){uo=Wm();break}default:uo=qn();break}C&&Nr(C)?C.push(uo):C?C=[C,uo]:(C=uo,H()!==1&&yt(N.Unexpected_token))}let Bt=Nr(C)?Cn(Et(C),Dn):E.checkDefined(C),Jr=Z(Bt);Cn(Jr,Dn),ut=Co([Jr],Dn),_r=k(1,N.Unexpected_token)}let Qt=ke(R,ut,_r);Ze&&ly(Qt),Qt.nodeCount=Ae,Qt.identifierCount=Qe,Qt.identifiers=G,Qt.parseDiagnostics=Nx(ce,Qt),Ee&&(Qt.jsDocDiagnostics=Nx(Ee,Qt));let Ri=Qt;return ne(),Ri}MP.parseJsonText=ge;function qn(){let R=Rn(),$=e.getTokenStart(),oe=pt(17),Ne=e.hasPrecedingLineBreak(),Ze=os(15,kn,!0);return qa(17,19,oe,$,R.fileName),Cn(jn(Ze,Ne),R)}function kn(){let R=Rn(),$=Lt(),oe=tf(!0),Ne=$n(43),Ze=Ka(),Dn=jr(),ut=$n(60),_r=$n(55),Qt;pt(61);let Ri=hr(()=>Uc(!0));return Qt=se.createPropertyAssignment(Dn,Ri),Qt.modifiers=oe,lo(Cn(Qt,R),$)}function On(R){switch(R){case 184:return V===0&&Rr(),V===1?yt(N.Else_directive_without_if):V=V===0?-1:0,V===0&&Gt(),e.scan();case 185:case 181:let $=R===185;V===0&&Rr(),!$&&V!==1?A.push(V):$&&V===1&&yt(N.Elseif_directive_without_if);let oe=0;for(R=e.scan();R!=4&&R!=1;)oe++,R===11&&e.getTokenValue()==="0"?V=0:V=-1,R=e.scan();return V===0&&Gt(),oe==0&&ln(e.getTokenStart(),e.getTokenEnd(),e.getFileName(),N.Expression_expected),R;case 182:case 183:let Ne=R===182;if(V!==1&&A.push(V),R=e.scan(),R===89||Qc(R)){let Ze=e.getTokenValue();V=Ne?F.has(Ze)?-1:0:F.has(Ze)?0:-1,R=e.scan()}else yt(N.Identifier_expected);return V===0&&Gt(),R}}function nn(){return Qc(de)&&(e.hasUnicodeEscape()||e.hasExtendedUnicodeEscape())&&ln(e.getTokenStart(),e.getTokenEnd(),e.getFileName(),N.Keywords_cannot_contain_escape_characters),zi()}function Dr(){let R=[],$=pt(20,void 0,!1)?1:0,oe="",Ne=e.getTokenFullStart();if($===0)return nn(),R;for(;$>0;)switch(nn()){case 1:$>0&&We(Ne,e.getTokenEnd()-Ne,e.getFileName(),N.Unterminated_macro_arguments_list),$=0;break;case 20:$++,oe+=e.getTokenText();break;case 21:$--,$>0&&(oe+=e.getTokenText());break;case 27:if($===1){R.push({text:oe,disabled:!1,posInOrigin:Ne,endInOrigin:e.getTokenFullStart(),originFilename:e.getFileName(),pos:0,end:oe.length}),oe="",Ne=e.getTokenEnd();break}default:oe+=e.getTokenText();break}return oe.length>0&&R.push({text:oe,disabled:!1,posInOrigin:Ne,endInOrigin:e.getTokenFullStart(),originFilename:e.getFileName(),pos:0,end:oe.length}),pt(21),R}function Gt(){e.getFileName()===y&&tt.push({pos:e.getTokenFullStart(),end:0})}function Rr(R){if(e.getFileName()===y){E.assert(tt.length>0);let $=ta(tt);E.assert($.end===0),$.end=R||e.getTokenFullStart()}}function zi(){let R=e.scan();for(;V===0&&R!==1;){let $=e.getTokenFullStart();switch(R){case 186:e.setReportLineBreak(!0),V=A.pop()??1,R=e.scan(),R!==4&&R!==1&&We(e.getTokenStart(),e.getTokenEnd()-e.getTokenStart(),e.getFileName(),N.Expected_newline_after_directive),e.setReportLineBreak(!1);break;case 185:case 184:e.setReportLineBreak(!0),A.length===0&&(V=V===0?-1:0),R=e.scan(),R!==4&&R!==1&&We(e.getTokenStart(),e.getTokenEnd()-e.getTokenStart(),e.getFileName(),N.Expected_newline_after_directive),e.setReportLineBreak(!1);break;case 181:case 182:case 183:for(e.setReportLineBreak(!0);R!=4&&R!=1;)R=e.scan();R!==4&&We(e.getTokenStart(),e.getTokenEnd()-e.getTokenStart(),e.getFileName(),N.Expected_newline_after_directive),e.setReportLineBreak(!1),A.push(V);break}return V!==0&&Rr($),zi()}switch(R){case 186:return e.setReportLineBreak(!0),V=A.pop()??1,R=e.scan(),R!==4&&R!==1&&We(e.getTokenStart(),e.getTokenEnd()-e.getTokenStart(),e.getFileName(),N.Expected_newline_after_directive),e.setReportLineBreak(!1),zi();case 182:case 183:case 181:case 185:case 184:return e.setReportLineBreak(!0),R=On(R),R!==4&&We(e.getTokenStart(),e.getTokenEnd()-e.getTokenStart(),e.getFileName(),N.Expected_newline_after_directive),e.setReportLineBreak(!1),zi()}if(J&&R===89){let $=e.getTokenValue(),oe=F.get($);if(M&&M.argsIn?.[$]&&M.argsIn?.[$].disabled!==!0)return zo(R,$,M);if(oe&&oe.disabled!==!0&&oe.range)return sa(R,$,oe)}return de=R}function zo(R,$,oe){let Ne=oe.argsIn[$];return Ne.disabled=!0,e.switchStream("",Ne.text,Ne.pos,Ne.end,!0,()=>(Ne.disabled=!1,!1)),zi()}function sa(R,$,oe){oe.disabled=!0,oe.originFilename=e.getFileName(),oe.posInOrigin=e.getTokenFullStart(),oe.endInOrigin=e.getTokenFullStart()+$.length+1,oe.pos=Rn(),oe.end=oe.pos.tokenStart+$.length;let{range:Ne,arguments:Ze}=oe,Dn={};if(Ze?.length>0){de=zi();let _r=Dr(),Qt=e.getTokenFullStart(),Ri=Vo(_r);Bn(Ze,(C,Bt)=>{E.assertIsDefined(C.name);let Jr=C.name.text;if(_r.length>Bt){let uo=_r[Bt];Dn[Jr]=uo}else ln(Ri?.end??Qt,Qt,e.getFileName(),N.Missing_argument_for_macro_0,Jr),Dn[Jr]={posInOrigin:Ri?.end??Qt,endInOrigin:Ri?.end??Qt,pos:0,end:0,text:"",disabled:!1}}),oe.argsIn=Dn}let ut=M;return e.switchStream(oe.includeFilename??oe.originFilename,oe.getText(),Ne.pos,Ne.end-Ne.pos,!0,()=>(E.assertIsDefined(oe),oe.disabled=!1,oe.argsIn=void 0,oe.originFilename=void 0,oe.posInOrigin=void 0,oe.endInOrigin=void 0,oe.pos=void 0,M=ut,Ze?.length>0)),M=oe,zi()}function mo(R){return nn(),R()}function Ve(){return nn(),td(H())}function et(){return nn(),td(H())&&!e.hasPrecedingLineBreak()}function Le(){return nn(),td(H())&&nn()===20}function Q(){return nn()===20}function ie(){return nn()===17}function Te(){return nn()===45}function te(){return nn(),H()===11||H()===13||H()===12}function q(){return de=e.reScanLessThanToken()}function qe(){return de=e.reScanGreaterToken()}function dn(R,$,oe,Ne,Ze,Dn,ut,_r=!1,Qt,Ri,C=0,Bt=0,Jr=!1){Ce(R,$,oe,Ne,Dn,ut,Qt,Ze,C,Bt);try{let uo=Jn(Dn,_r,Qt||1,C,Jr);return ne(),uo}catch(uo){throw console.error(uo),ne(),uo}}MP.parseSourceFile=dn;function Jn(R,$,oe,Ne,Ze){let Dn=Rn(),ut=W.shift();ut&&Gs(ut)||nn();let _r=Lo(0,Xr,Dn);ut&&_r.unshift(ut),E.assert(H()===1);let Qt=Lt(),Ri=lo(Gi(),Qt),C=ke(y,_r,Ri);Sde(C,_),_de(C,Jr);let Bt=Vo(tt);if(Bt&&Bt.end===0&&(We(Bt.pos,1,y,N.Unmatched_conditional_directive),Bt.end=e.getTokenEnd()),C.commentDirectives=e.getCommentDirectives(),C.nodeCount=Ae,C.identifierCount=Qe,C.identifiers=G,C.heritageClauses=se.createNodeArray(_n),C.parseDiagnostics=Nx(ce,C),C.inactiveCodeRanges=tt,C.importCandidates=Pe,C.jsDocParsingMode=Ne,Ee&&(C.jsDocDiagnostics=Nx(Ee,C)),C.nodeMacroMap=$e,Ze){let uo=new Map;F.forEach((vc,Wf)=>{if(vc.includeFilename!="macro"){let{name:Uf,range:wu}=vc;uo.set(Uf,wu?vc.getText()?.substring(wu.pos,wu.end)??"":"")}vc.argsIn=void 0}),C.parsedMacros=uo}return $&&ly(C),C;function Jr(uo,vc,Wf){ce.push(Px(y,_,uo,vc,Wf))}}function ke(R,$,oe){let Ne=se.createSourceFile($,oe,0);return m9(Ne,0,_.length),Ne.fileName=R,Ne.text=_,Ne.bindDiagnostics=[],Ne.bindSuggestionDiagnostics=void 0,Ne.languageVersion=b||1,Ne.fileName=R,Ne.languageVariant=T,Ne.isDeclarationFile=!1,Ne.scriptKind=v||1,Ne}function We(R,$,oe,Ne,...Ze){let Dn=Vo(ce),ut;return(!Dn||R!==Dn.start)&&(ut=Px(oe,me.get(oe)??e.getText(),R,$,Ne,...Ze),ce.push(ut)),he=!0,ut}function ln(R,$,oe,Ne,...Ze){return We(R,$-R,oe,Ne,...Ze)}function zn(R,$,oe,...Ne){ln(R.pos,R.end,$,oe,...Ne)}function St(R){return typeof R=="object"&&typeof R.pos=="number"}function ct(R,$,oe,...Ne){let Ze=Rn();$?We(e.getTokenFullStart(),0,Ze.fileName,oe,...Ne):oe&&yt(oe,...Ne);let Dn=R===89?Oe("",void 0):R===11||R===12?zt("",void 0):R===13?Yt("",void 0):R===16?Cr("",void 0):R===173?se.createMissingDeclaration():Je(R);return Cn(Dn,Ze.pos,Ze.pos)}function kr(){let R=Co([],Rn());return R.isMissingList=!0,R}function Or(R){return!!R.isMissingList}function Rn(){return{pos:Li(),tokenStart:e.getTokenStart(),fileName:e.getFileName(),include:n,macro:M?{...M}:void 0,stateId:e.getStateId()}}function Li(){return e.getTokenFullStart()}function yt(R,...$){return ln(e.getTokenStart(),e.getTokenEnd(),e.getFileName(),R,...$)}function Lo(R,$,oe){let Ne=Vt,Ze=Ln;Ln|=1<<R,Vt=R;let Dn=[];for(oe??(oe=Rn());!Gn(R);){if(wt(R,!1)){Dn.push(Er(R,$));continue}if(Ko(R))break}return Ln=Ze,Vt=Ne,Co(Dn,oe)}function Ko(R){return ca(R),Ua()?!0:(nn(),!1)}function Ua(){E.assert(Ln,"Missing parsing context");for(let R=0;R<30;R++)if(Ln&1<<R&&(wt(R,!0)||Gn(R)))return!0;return!1}function ca(R){switch(R){case 0:return yt(N.Declaration_or_statement_expected);case 1:return yt(N.Declaration_or_statement_expected);case 3:return yt(N.case_or_default_expected);case 4:return yt(N.Statement_expected);case 22:case 5:return yt(N.Property_or_signature_expected);case 6:return yt(N.Unexpected_token_A_constructor_method_accessor_or_property_was_expected);case 10:return yt(N.Expression_expected);case 11:return Qc(H())?yt(N._0_is_not_allowed_as_a_variable_declaration_name,Ai(H())):yt(N.Variable_declaration_expected);case 12:return yt(N.Property_destructuring_pattern_expected);case 13:return yt(N.Array_element_destructuring_pattern_expected);case 14:return yt(N.Argument_expression_expected);case 15:return yt(N.Property_assignment_expected);case 17:case 16:return yt(N.Expression_or_comma_expected);case 18:case 19:return yt(N.Expression_or_comma_expected);case 21:return yt(N.Parameter_declaration_expected);case 20:return Qc(H())?yt(N._0_is_not_allowed_as_a_parameter_name,Ai(H())):yt(N.Parameter_declaration_expected);case 23:return yt(N.Type_parameter_declaration_expected);case 24:return yt(N.Type_argument_expected);case 25:return yt(N.Type_expected);case 26:return yt(N.Unexpected_token_expected);case 33:return yt(N.Variable_declaration_expected);case 29:return yt(N.Identifier_expected);case 30:return E.fail("ParsingContext.Count used as a context");case 34:return yt(N.Pragma_option_expected);case 31:return yt(N.Expression_or_comma_expected);case 8:return yt(N.Property_or_signature_expected);default:E.fail("Unknown ParsingContext"),console.debug("todo - parsingContextErrors")}}function wt(R,$){if(Sd(R))return!0;switch(R){case 0:case 1:case 2:case 4:return!(H()===26&&$)&&vn();case 3:return H()===113||H()===114;case 5:return Ao(ze);case 8:return td(H());case 15:switch(H()){case 22:case 43:case 25:case 24:return!0;default:return Dp()}case 22:return Dp();case 11:return Pd()||H()===43;case 33:return Pd()||ze();case 34:return Pd();case 13:return H()===27||H()===25||Pd();case 23:return H()===103||Ka();case 18:case 17:case 16:switch(H()){case 27:case 24:return!0}case 14:case 31:return H()===25||$s();case 19:return H()===26||$s();case 20:return Jc(!1);case 21:return Jc(!0);case 24:case 25:return H()===27||Ra();case 30:return E.fail("ParsingContext.Count used as a context")}}function Jc(R){return H()===25||Pd()||sh(H())||H()===62||H()===52||Ra(!R)}function vn(){switch(H()){case 70:case 26:case 17:case 120:case 99:case 98:case 133:case 115:case 109:case 118:case 111:case 112:case 121:case 106:case 116:case 117:return!0;case 119:return!0;case 124:case 122:case 123:case 125:case 130:case 127:case 128:case 131:case 138:case 92:case 93:case 94:case 101:case 105:case 140:case 104:case 107:case 134:case 95:case 139:case 108:return Jt()||!Ao(et);case 62:return pi(16777216);default:return eu()||$s()}}function eu(){switch(H()){case 178:case 179:case 180:case 181:case 184:case 185:case 186:case 187:return!0}}function la(){for(;;)switch(H()){case 138:case 133:case 99:case 98:return!0;case 119:case 122:case 123:case 124:case 125:case 130:case 127:case 131:case 128:case 107:case 95:case 108:case 92:case 93:case 94:case 101:case 105:case 104:case 29:return!0;case 140:return Ao(()=>nn()!==71);case 134:case 139:return T===0;case 89:return Ln===1&&Ao(()=>nn()===20);default:return!1}}function Jt(){return la()}function Gn(R){if(H()===1)return!0;switch(R){case 1:case 3:case 5:case 6:case 7:case 12:case 27:case 28:return H()===19||H()===67||H()===4;case 31:return H()===61;case 15:return H()===19;case 34:return H()===4;case 2:case 4:return H()===19||H()===113||H()===114;case 33:case 11:return Br();case 14:return H()===21||H()===26;case 17:return H()===23;case 16:return H()===19;case 25:case 13:return H()===23;case 18:return H()===23;case 19:return H()===23||H()===27;case 21:case 20:case 22:return H()===21||H()===23;case 24:return H()!==27;case 26:return H()===17||H()===19;case 8:return H()===26;default:return!1}}function Br(){return!!(bs()||kc(H())||H()===39)}function Er(R,$){let oe=Sd(R);return oe?nu(oe):$()}function xl(R){switch(R){case 6:case 3:case 0:case 1:case 4:case 7:case 5:case 11:case 21:case 20:return!0}return!1}function Sd(R,$){if(!Fe||!xl(R)||he)return;let oe=Fe.currentNode($??e.getTokenFullStart());if(!(Da(oe)||pde(oe)||Ax(oe)||(oe.flags&34332768)!==ye)&&Pr(oe,R))return XT(oe)&&oe.jsDoc?.jsDocCache&&(oe.jsDoc.jsDocCache=void 0),oe}function Pr(R,$){switch($){}return!1}function nu(R){return e.resetTokenState(R.end),nn(),R}function Co(R,$,oe,Ne){let Ze=Zn(R,Ne),Dn;if(typeof $=="number")Dn=$,oe??(oe=e.getTokenFullStart());else if($.macro?.pos){let ut=$.macro?xs($.macro):void 0,_r=Rn(),Qt=_r.fileName===y&&!_r.macro?_r.pos:ut.end;Dn=ut.pos.pos,oe=Qt}else Dn=$.pos,oe??(oe=e.getState($.stateId)?.end);return ns(Ze,Dn,oe),Ze}function Xr(){switch(H()){case 120:return Gh();case 26:return ki();case 17:return ay(!1);case 115:return yr();case 109:return is();case 118:return bl();case 111:return li();case 112:return Ht();case 121:return co(251);case 106:return co(250);case 116:return zh();case 117:return nl();case 100:return rs();case 133:case 99:if(Jt())return Va();case 122:case 123:case 124:case 125:case 130:case 127:case 128:case 131:case 138:case 107:case 134:case 95:case 98:case 139:case 108:case 105:case 92:case 93:case 94:case 101:case 104:case 140:case 89:case 29:if(Jt())return Va()}return eu()?ga():ko()}function Lt(){return e.hasPrecedingJSDocComment()}function ki(){let R=Rn(),$=Lt();return pt(26),lo(Cn(se.createEmptyStatement(),R),$)}function Mr(){return H()==4||H()==1?!0:(yt(N.Expected_newline_after_directive),!1)}function ga(){e.setReportLineBreak(!0);let R;switch(H()){case 178:R=w();break;case 179:R=no(De);break;case 180:R=no(ai);break;case 187:R=fr();break;case 186:R=ct(186,!0,N.Unexpected_endIf_directive);default:nn();let oe=[];for(;H()!==4;)oe.push(H()),nn()}let $=Mr();return e.setReportLineBreak(!1),R?.kind===178&&$&&($=!Gs(R)),R||(R=ct(178,!0,N.Unexpected_keyword_or_identifier)),$&&nn(),R}function zs(R){let $=R.content.map(Ne=>Ne.text).join("");return g.loadIncludeFile(e.getFileName(),$,R.localFirst)}function Gs(R){let $=e.getFileName()??y,oe=zs(R),Ne=Um(oe.filename),Ze=!1;if(Ne===y)return!1;if(R.fileName=Ne,oe?.source?.length>0){if(Se.has($)||Se.set($,new Set),Se.get($).add(Ne),Pc(Se,$))return console.error(`Circular include detected: ${$} -> ${Ne}`),zn(n??R,y,N.Circular_include_detected_0_to_1,$,Ne),!1;let _r=tt;R.text=oe.source,nr(32,()=>{rf(R);let Qt=oe.source;me.set(Ne,oe.source);let Ri=n,C=r,Bt=e.switchStream(Ne,Qt,0,Qt.length,!1,()=>(n=Ri,r=C,de=e.getToken(),!1));n??(n=R),r=R,nn();let Jr=Rn(),uo=Lo(0,Xr,Jr);E.assert(H()===1);let vc=Lt(),Wf=lo(Gi(),vc);R.statements=se.createNodeArray(uo),R.endOfFileToken=Wf,Bt(),Ze=!0}),R.inactiveCodeRanges=tt,tt=_r}let Dn=W.shift();return Dn&&(Ze||(Ze=Gs(Dn))),Ze&&!pi(32)&&nn(),Ze}function Pc(R,$){let oe=new Set,Ne=new Set;function Ze(Dn){if(Ne.has(Dn))return!0;if(oe.has(Dn))return!1;oe.add(Dn),Ne.add(Dn);let ut=R.get(Dn)||new Set;for(let _r of ut)if(Ze(_r))return!0;return Ne.delete(Dn),!1}return Ze($)}function fr(){let R=Rn();pt(187);let $=os(34,oe=>Kc());return $.length===0&&($=kr(),yt(N.Pragma_directive_requires_at_least_one_argument)),Cn(se.createPragmaDirective($),R)}function w(){let R=Rn(),$=Lt(),oe=[];pt(178);let Ne=!1;if(H()===29)de=e.reScanLessThanTokenAsStringLiteral(),oe.push(Wm());else{for(;H()===16;)oe.push(Wm());Ne=!0}return oe.length===0&&oe.push(ct(16,!0,N.Expression_expected)),lo(Cn(se.createIncludeDirective(oe,Ne),R),$)}function De(){let R=Rn(),$=Lt();pt(179);let oe=Rn(),Ne=e.getTokenStart(),Ze=Um(e.getTokenValue()),Dn=H()===89?Kc():xd();Dn.kind===4&&(We(oe.pos,oe.pos,R.fileName,N.Identifier_expected),Dn=ct(89,!1));let ut;Ne+Ze.length===e.getTokenStart()&&H()===20&&(ut=Bo(Ke));let Qt=0,Ri=e.getTokenStart(),C=e.getFileName().length>0?e.getFileName():y,Bt=Ri;for(;H()!==4&&H()!==1;)Qt++,Bt=e.getTokenEnd(),nn();let Jr;Qt>0&&(Jr=ns(se.createBlock([],!1),Ri,Bt));let uo=lo(Cn(se.createDefineDirective(Dn,ut,Jr),R),$);return Sn(Dn)&&Ze?.length>0&&(F.has(Ze)?ln(Ne,Ne+Ze.length,R.fileName,N.Macro_already_defined_0,Ze):F.set(Ze,ri(uo,C))),uo}function yn(R,$,oe,Ne){let Ze=new m(R,$,oe,Ne);return E.attachMacroDebugInfo(Ze),Ze}function bt(R,$){let oe=ns(se.createBlock([],!1),0,$?.length||0);return yn(R,"builtin",()=>$,oe)}function ri(R,$){function oe(){return E.assertIsDefined(R.range,"Cannot expand macro for a define without content"),me.get($)??""}let Ne=yn(R.name.text,$,oe,R.range);return Ne.directive=R,Ne.arguments=R.arguments,Ne}function ai(){let R=Rn(),$=Lt();pt(180);let oe=Kc();return F.delete(oe.text),lo(Cn(se.createUndefDirective(oe),R),$)}function yr(){let R=Rn(),$=Lt();pt(115);let oe=e.getTokenStart(),Ne=e.getFileName(),Ze=pt(20),Dn=hr(Go);qa(20,21,Ze,oe,Ne);let ut=Xr(),_r=Ue(110)?Xr():void 0;return lo(Cn(ft(Dn,ut,_r),R),$)}function Ht(){let R=Rn(),$=Lt();pt(112),pt(20);let oe;Pl()?oe=wo(!0,void 0,33):oe=Hr(Go);let Ne=!1;Ue(103)||(Ne=!0,pt(61));let Ze=Iu(21);pt(21);let Dn=Xr(),ut=se.createForEachStatement(oe,Ze,Dn);return lo(Cn(ut,R),$)}function li(){let R=Rn(),$=Lt();pt(111),pt(20);let oe;if(H()!==26)if(Pl()&&Ao(Ve)){let ut=_a();oe=wo(!0,ut)}else oe=Hr(Go);let Ne;pt(26);let Ze=H()!==26&&H()!==21?hr(Go):void 0;pt(26);let Dn=H()!==21?hr(Go):void 0;return pt(21),Ne=Xn(oe,Ze,Dn,Xr()),lo(Cn(Ne,R),$)}function co(R){let $=Rn(),oe=Lt();pt(R===250?106:121);let Ne=bs()?void 0:Kc();vu();let Ze=R===250?se.createBreakStatement(Ne):se.createContinueStatement(Ne);return lo(Cn(Ze,$),oe)}function ua(){let R=Rn(),$,oe,Ne,Ze;return pt(100),Ue(20)?($=Go(),Ue(26)&&(oe=Kc(N.Catch_expression_modifier_expected),!Da(oe)&&H()!==21&&(Ne=Go())),pt(21)):Ze=cr(0),Cn(se.createCatchExpression($,oe,Ne,Ze),R)}function rs(){let R=Rn(),$=Lt();pt(100);let oe;Ue(20)&&(oe=Go(),pt(21));let Ne=cr(0);return lo(Cn(se.createCatchStatement(oe,Ne),R),$)}function _s(){let R=Rn(),$=Lt();pt(113);let oe=Iu(61);pt(61);let Ne=Lo(4,Xr);return lo(Cn(se.createCaseClause(oe,Ne),R),$)}function el(){let R=Rn();pt(114),pt(61);let $=Lo(4,Xr);return Cn(se.createDefaultClause($),R)}function Nc(){return H()===113?_s():el()}function ui(){let R=Rn(),$=Lo(3,Nc);return Cn(se.createCaseBlock($),R)}function nl(){let R=Rn(),$=Lt();pt(117),pt(20);let oe=hr(Go);pt(21),pt(17);let Ne=Lo(2,Xr),Ze=ui();return pt(19),lo(Cn(se.createSwitchStatement(oe,Ne,Ze),R),$)}function is(){let R=Rn(),$=Lt();pt(109);let oe=Xr();pt(118);let Ne=e.getTokenStart(),Ze=e.getFileName(),Dn=pt(20),ut=hr(Go);return qa(20,21,Dn,Ne,Ze),Ue(26),lo(Cn(se.createDoWhileStatement(oe,ut),R),$)}function bl(){let R=Rn(),$=Lt();pt(118);let oe=e.getTokenStart(),Ne=e.getFileName(),Ze=pt(20),Dn=hr(Go);qa(20,21,Ze,oe,Ne);let ut=Xr();return lo(Cn(se.createWhileStatement(ut,Dn),R),$)}function As(R){return y}function xs(R){let $=R;for(;$.pos?.macro;)$=$.pos?.macro;return $}function Cn(R,$,oe){if(typeof $!="number"){let Ne=e.getState($.stateId);E.assertIsDefined(Ne,"Scanner state must be defined"),E.assert(Ne.fileName==$.fileName,"Scanner state filename does not match position state filename"),gn.set(R,Ne.fileName?.length>0?Ne.fileName:y);let Ze=$.macro?xs($.macro):void 0,Dn=Ze?.pos;if(Ze&&(iS(R,R.flags|80),$e.set(R,Ze.name)),Dn){let ut=Rn(),_r=Math.max(ut.fileName===y&&!ut.macro?ut.pos:0,Ze.end);ns(R,Dn.pos,_r)}else ns(R,$.pos,oe??Ne.end)}else ns(R,$,oe);return ye&&(R.flags|=ye),he&&(he=!1,R.flags|=262144),R}function Ka(){return H()===89?!0:H()>132}function pt(R,$,oe=!0){return H()===R?(oe&&nn(),!0):($?yt($):yt(N._0_expected,Ai(R)),!1)}function Gi(){let R=Rn(),$=H();return nn(),Cn(Je($),R)}function qa(R,$,oe,Ne,Ze){if(H()===$){nn();return}let Dn=yt(N._0_expected,Ai($));if(oe&&Dn){let ut=Ze||e.getFileName()||y,_r=me.get(ut);ia(Dn,Px(ut,_r,Ne,1,N.The_parser_expected_to_find_a_1_to_match_the_0_token_here,Ai(R),Ai($)))}}function D(R,$,oe,Ne,Ze){E.assert($.length>0,"closeKind should have at least one element");let Dn=0,ut,_r,Qt=$.map(Ai).join("");for(;Dn<$.length;){if(H()===$[Dn++]){nn();continue}_r=$[Dn-1],ut=yt(N._0_expected,Qt);break}oe&&ut&&ia(ut,Px(Ze,me.get(Ze)??e.getText(),Ne,1,N.The_parser_expected_to_find_a_1_to_match_the_0_token_here,Ai(R),Qt))}function k(R,$,oe){return $n(R)||ct(R,!1,$||N._0_expected,oe||Ai(R))}function j(R){let $=Y(R);return $||(E.assert(KF(R)),ct(R,!1,N._0_expected,Ai(R)))}function Y(R){if(H()===R)return Be()}function Be(){let R=Rn(),$=H();return Cs(),Cn(Je($),R)}function Ue(R){return H()===R?(nn(),!0):!1}function $n(R){if(H()===R)return Gi()}function di(R,$){let oe=R&ye;if(oe){Lr(!1,oe);let Ne=$();return Lr(!0,oe),Ne}return $()}function nr(R,$){let oe=R&~ye;if(oe){Lr(!0,oe);let Ne=$();return Lr(!1,oe),Ne}return $()}function Lr(R,$){R?ye|=$:ye&=~$}function Mt(R){Lr(R,8192)}function hr(R){return di(8192,R)}function vi(R){return di(524288,R)}function Oi(R){return di(139264,R)}function Hr(R){return nr(8192,R)}function ii(R){return nr(131072,R)}function Bo(R){return nr(32768,R)}function no(R){let $=J;J=!1;let oe=R();return J=$,oe}function pi(R){return(ye&R)!==0}function Wc(){return pi(8192)}function bs(){return H()===26?!0:H()===19||H()===1||e.hasPrecedingLineBreak()}function _d(R,$){let oe=be,Ne=de,Ze=ce.length,Dn=he,ut=M,_r=n,Qt=r,Ri=ye;be=!0;let C=$!==0?e.lookAhead(R):e.tryScan(R);return E.assert(Ri===ye),(!C||$!==0)&&(de=Ne,$!==2&&(ce.length=Ze),he=Dn,M=ut,n=_r,r=Qt),be=oe,C}function Ao(R){return _d(R,1)}function Zd(R){return _d(R,0)}function _p(){return bs()?(H()===26&&nn(),!0):!1}function vu(){return _p()||pt(26)}function ko(){let R=Rn(),$=Lt(),oe,Ne=H()===20,Ze=hr(Go);return _p()||Fu(Ze),oe=Z(Ze),Ne&&($=!1),lo(Cn(oe,R),$)}function wm(R){for(let $ of Rm)if(R.length>$.length+2&&Eo(R,$))return`${$} ${R.slice($.length)}`}let Rm=Object.keys(Uv).filter(R=>R.length>2);function Fu(R){let $=Sn(R)?ra(R):void 0;if(!$||!tm($,b)){yt(N._0_expected,Ai(26));return}let oe=Xh(R)??y,Ne=me.get(oe),Ze=eo(Ne,R.pos);switch($){case"const":case"let":case"var":ln(Ze,R.end,oe,N.Variable_declaration_not_allowed_at_this_location);return;case"declare":return}let Dn=fg($,Rm,Ci)??wm($);if(Dn){ln(Ze,R.end,Xh(R),N.Unknown_keyword_or_identifier_Did_you_mean_0,Dn);return}H()!==0&&ln(Ze,Math.max(Ze,R.end),oe,N.Unexpected_keyword_or_identifier)}let tl=!1;function lo(R,$){if(!$)return R;E.assert(!R.jsDoc);let oe=_,Ne=Xh(R);_=me.get(Ne)??_;let Ze;e.getFileName()!=Ne&&(Ze=e.switchStream(Ne,_,R.pos,R.end));let Dn=Ei(jF(R,_),ut=>HS.parseJSDocComment(R,ut.pos,ut.end-ut.pos));return Dn.length&&(R.jsDoc=Dn),tl&&(tl=!1,R.flags|=536870912),_=oe,Ze&&Ze(),R}function Cl(){switch(H()){case 71:case 136:case 135:case 10:case 11:case 12:case 13:case 16:case 15:case 20:case 22:case 66:case 17:case 69:case 68:case 70:case 138:case 133:case 145:case 100:case 45:case 79:case 89:case 72:return!0;case 137:if(v===6)return!0;default:return Ka()}}function $s(){if(Cl())return!0;switch(H()){case 41:case 42:case 57:case 55:case 105:case 47:case 48:case 29:return!0;case 62:return pi(16777216);default:return xa()?!0:Ka()}}function _a(){let R=Rn();return sc()}function ef(R,$,oe){let Ne=Rn();if(Ue(29)){let ut=ef(R,$,oe);return pt(32),Ue(43)?Cn(se.createArrayTypeNode(ut),Ne):ut}let Ze=Ue(R),Dn=$();if(H()===R||Ze){let ut=[Dn];for(;Ue(R);)if(H()===29)ut.push(ef(R,$,oe));else{let _r=$()??ct(101,!0,N.Type_expected);E.assertIsDefined(_r),ut.push(_r)}Dn=Cn(oe(Co(ut,Ne)),Ne)}return Dn}function Dl(){return vi(wa)}function Qs(){return ef(52,Dl,se.createIntersectionTypeNode)}function sc(){return ef(53,pi(16777216)?Qs:Dl,se.createUnionTypeNode)}function wa(){let R=Rn(),$=nf();for(;H()!=1;)if(Ue(43)&&($=Cn(se.createArrayTypeNode($),R)),Ue(44))$=Cn(se.createArrayTypeNode(se.createArrayTypeNode($)),R);else return $}function Ra(R){switch(H()){case 97:case 102:case 94:case 107:case 134:case 95:case 98:case 139:case 108:case 92:case 93:case 101:case 104:case 140:case 105:case 96:case 17:case 22:case 29:case 53:case 52:case 145:case 16:case 15:case 10:case 11:case 12:case 13:case 136:case 135:case 43:case 60:case 55:case 25:case 138:return!0;case 42:return!R&&Ao(te);case 137:if(v===6)return!0;default:return Ka()}}function xd(){let R=Gi();return H()===24?void 0:R}function nf(){switch(H()){case 97:case 102:case 94:case 107:case 95:case 98:case 108:case 92:case 93:case 138:case 101:case 104:case 140:case 96:return xd();case 134:case 139:return T===0?xd():void 0;case 77:e.reScanAsteriskEqualsToken();case 16:case 15:case 11:case 12:case 13:return Na();case 105:return Gi();case 17:return Ys();case 133:case 99:return El(H());case 136:case 135:case 137:if(v===6)return Na();default:return pi(16777216)?bd():void 0}}function bd(){let R=Rn();return Cn(se.createTypeReferenceNode(Cd(),xp()),R)}function Cd(){return cC(!0,N.Type_expected)}function xp(){if(!e.hasPrecedingLineBreak()&&q()===29)return Hh(24,_a,29,32)}function Hh(R,$,oe,Ne){if(pt(oe)){let Ze=os(R,$);return pt(Ne),Ze}return kr()}function Ys(){let R=Rn();return Cn(se.createTypeLiteralNode(ty()),R)}function ty(){let R;return pt(17)?(R=se.createNodeArray(mu(Lo(5,un))),pt(19)):R=kr(),R}function El(R,$=!0){let oe=Rn();$&&!pt(R)&&ct(R,!0,N._0_expected,"struct");let Ne=Kc();return Cn(se.createStructTypeNode(Ne),oe)}function Na(R){let $=Rn();R&&nn();let oe=bp(H());if(R)oe=Cn(se.createPrefixUnaryExpression(42,oe),$);else if(za(oe)){let Ne;for(;H()===16;){let Ze=Cn(Je(41),Rn());Ne=sy(Ne??oe,Ze,Jf(),$)}Ne&&(oe=Cn(Ne,$))}return Cn(se.createLiteralTypeNode(oe),$)}function zh(){let R=Rn(),$=Lt();pt(116);let oe=bs()?void 0:hr(Go);return vu(),lo(Cn(se.createReturnStatement(oe),R),$)}function Gh(){let R=Rn(),$=Lt(),oe=tf(!1,!1,!1);return rf(ry(R,$,oe))}function ry(R,$,oe){E.assert(!be,"Inherit statements should not be speculatively parsed."),pt(120);let Ne=hr(Go);vu();let Ze=lo(Cn(se.createInheritDeclaration(Ne,oe),R),$);return _n.push(Ze),Ze}function bp(R){let $=Rn();if(R===15){let Ne=Cr(e.getTokenValue(),void 0,e.hasExtendedUnicodeEscape());e.isUnterminated()&&(Ne.isUnterminated=!0);let Ze=se.createArrayLiteralExpression([Ne],e.hasPrecedingLineBreak(),!1);return nn(),Cn(Ze,$)}let oe=R===11||R===10?zt(e.getTokenValue(),e.getNumericLiteralFlags()):R===13?Yt(e.getTokenValue(),e.getNumericLiteralFlags()):R===12?zt(e.getTokenValue(),e.getNumericLiteralFlags()):R===16?Cr(fA(e.getTokenValue()),void 0,e.hasExtendedUnicodeEscape()):R===14?xi(e.getTokenValue(),e.hasExtendedUnicodeEscape()):HT(R)?Ie(R,e.getTokenValue()):E.fail();return e.hasExtendedUnicodeEscape()&&(oe.hasExtendedUnicodeEscape=!0),e.isUnterminated()&&(oe.isUnterminated=!0),nn(),Cn(oe,$)}function tf(R,$,oe){let Ne=Rn(),Ze,Dn,ut,_r=!1,Qt=!1,Ri=!1;for(;ut=Dd(_r,$,oe);)ut.kind===125&&(_r=!0),Ze=$r(Ze,ut),Qt=!0;if(Ri)for(;ut=Dd(_r,$,oe);)ut.kind===125&&(_r=!0),Ze=$r(Ze,ut);return Ze&&Co(Ze,Ne)}function Dd(R,$,oe){let Ne=Rn(),Ze=H();if(Cp())return nn(),Cn(Je(Ze),Ne)}function Cp(){return sh(H())&&Ao(Ed)}function Ed(){switch(H()){default:return $h()}}function $h(){return nn(),iy()}function iy(){return H()===22||H()===17||H()===43||H()===25||H()===29||Pl()||Dp()}function Pl(){switch(H()){case 107:case 95:case 98:case 108:case 136:case 135:case 92:case 93:case 94:case 101:case 104:case 140:case 99:case 133:case 138:case 105:return!0;case 134:case 139:return T===0;case 137:return b===3}return!1}function Dp(){return td(H())||H()===16||H()===11}function Om(){return H()===99||H()===133}function Qh(){return Om()?Ao(()=>{if(nn()==89)switch(nn()){case 17:case 20:return!0}return!1}):!1}function Va(){let R=Rn(),$=Lt(),oe=tf(!0);if(H()==120)return ry(R,$,oe);let Ne=_a();return L(R,$,oe,Ne)}function L(R,$,oe,Ne){if(Ka()){let Ze=Ao(()=>nn());return Ze===20?vr(R,$,oe,Ne):Ze===17?ae(R,$,oe,Ne):ee(R,$,oe,Ne)}else if(Ne&&MM(Ne))return ae(R,$,oe,Ne);switch(H()){default:if(oe||Ne){let Ze=ct(173,!0,N.Declaration_expected);return CO(Ze,R.pos),Ze.modifiers=oe,Ze.type=Ne,Ze}return nn(),ct(173,!0,N.Declaration_expected)}}function ae(R,$,oe,Ne){let Ze=Ne&&MM(Ne)?Ne.typeName:Kc(),Dn;Ue(20)&&(Dn=Kc(),pt(21));let ut=_a();vu();let _r=se.createStructDeclarationNode(oe,Ze,Dn,ut);return lo(Cn(_r,R),$)}function ze(){if(H()===29)return!0;let R=!1;for(;sh(H());)R=!0,nn();return H()===22||Pl()?!0:(Dp()&&(R=!0,nn()),R?H()==26:!1)}function un(){let R=Rn(),$=Lt(),oe=tf(!1);return Ut(R,$,oe)}function Ut(R,$,oe){let Ne=_a(),Ze,Dn=os(8,jr),ut=!1,_r=Yn(Dn,(Qt,Ri)=>{let C=Ne,Bt=oe;return Ri>0&&(C=se.cloneNode(Ne),iS(C,C.flags|16),Bt=se.createNodeArray(Yn(oe,Jr=>{let uo=se.cloneNode(Jr);return iS(uo,uo.flags|16),uo}))),Ze=se.createPropertySignature(Bt,Qt,C),H()===74&&(Ze.initializer=Oa()),H()==26&&(vu(),ut=!0),lo(Cn(Ze,R),$)});return se.createNodeArray(_r)}function jr(){return kt(!0)}function kt(R){if(H()===16||H()===10){let $=Wm();return $.text=Um($.text),$}return kp()}function vr(R,$,oe,Ne){let Ze=oy(),Dn=Ke(),ut=cr(0),_r=se.createFunctionDeclaration(oe,Ze,Dn,Ne,ut);return lo(Cn(_r,R),$)}function cr(R,$){if(H()!==17&&bs()){vu();return}return P(R,$)}function P(R,$){let oe=ue;ue=!1;let Ne=ay(!!(R&16),$);return ue=oe,Ne}function ee(R,$,oe,Ne){let Ze=wo(!1,Ne);vu();let Dn=tn(oe,Ne,Ze);return lo(Cn(Dn,R),$)}function Ke(){if(!pt(20))return kr();let R=En(0,!0);return pt(21),R}function En(R,$){return R&32?os(21,hn):os(20,()=>$?xt():rt())}function xt(){return sr()}function rt(){return sr(!1)}function sr(R=!0){let $=Rn(),oe=Lt(),Ne=tf(!1,!1,!1),Ze=ue;if(ue=!1,!R&&!hi())return;let Dn=pi(32768)?void 0:_a(),ut=$n(52)||T===1&&$n(141);$n(43)&&(Dn=se.createArrayTypeNode(Dn));let Qt=Pd()?at(Ne):void 0,Ri=$n(25),C=Oa(H()===74?74:61),Bt=lo(Cn(se.createParameterDeclaration(Ne,Ri,Qt,ut,Dn,C),$),oe);return ue=Ze,Bt}function at(R){let $=Ep();return kx($)===0&&!Pn(R)&&sh(H())&&nn(),$}function hi(){return Pd()||H()===22||H()===17}function hn(){let R=Rn();return Cn(se.createParameterDeclaration(void 0,void 0,void 0,void 0,sC(),void 0),R)}function wo(R,$,oe=0){let Ne=Rn(),Ze=1,Dn,ut=Wc();return Mt(R),Dn=os(oe||11,_r=>tu($,_r)),Mt(ut),Cn(pr(Dn,Ze),Ne)}function kc(R){return R===103||R===61}function tu(R,$){let oe=Rn(),Ne=Lt(),Ze=_a();if(Ze&&Zu(Ze)&&!Ze.elementType&&R){let C=Cn(se.cloneNode(Zu(R)?R.elementType:R),oe);Ze.elementType=C}else $&&(!Ze||!Zu(Ze))&&R&&Zu(R)&&(Ze=Cn(se.cloneNode(R.elementType),oe));let Dn=Rn(),ut;Ue(141)&&(ut=Cn(Je(141),Dn));let _r=Ep(),Qt=kc(H())?void 0:Oa(),Ri=It(_r,ut,Ze,Qt);return lo(Cn(Ri,oe),Ne)}function Oa(R=74){return Ue(R)?Uc(!0):void 0}function Ep(){return oy()}function oy(){return Pp(Pd(),void 0)}function Pd(){return H()===89?!0:H()>132}function Pp(R,$,oe){if(R){Qe++;let _r=Rn();_r.pos=e.hasLeadingAsterisks()?e.getTokenStart():Li();let Qt=H(),Ri=Um(e.getTokenValue()),C=e.hasExtendedUnicodeEscape();return zi(),Cn(Oe(Ri,Qt,C),_r)}if(H()===0&&e.tryScan(()=>e.reScanInvalidIdentifier()===89))return Pp(!0);Qe++;let Ne=H()===1,Ze=e.isReservedWord(),Dn=e.getTokenText(),ut=Ze?N.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:N.Identifier_expected;return ct(89,Ne,$||ut,Dn)}function zb(R){}function os(R,$,oe){let Ne=Ln;Ln|=1<<R;let Ze=[],Dn=Rn(),ut=-1;for(;;){if(wt(R,!1)){let _r=e.getTokenFullStart(),Qt=Er(R,()=>$(Ze.length));if(!Qt){Ln=Ne;return}if(Ze.push(Qt),ut=e.getTokenStart(),Ue(27))continue;if(ut=-1,Gn(R))break;pt(27,void 0),oe&&H()===26&&!e.hasPrecedingLineBreak()&&nn(),_r===e.getTokenFullStart()&&nn();continue}if(Gn(R)||Ko(R))break}return Ln=Ne,Co(Ze,Dn,void 0,ut>=0)}function qo(R,$,oe){let Ne=Ln;Ln|=1<<R;let Ze=[],Dn=Rn(),ut=-1;for(;;){if(wt(R,!1)){let _r=e.getTokenFullStart(),Qt=Er(R,$);if(!Qt){Ln=Ne;return}if(Ze.push(Qt),ut=e.getTokenStart(),Ue(oe))continue;if(ut=-1,Gn(R))break;pt(oe),_r===e.getTokenFullStart()&&nn();continue}if(Gn(R)||Ko(R))break}return Ln=Ne,Co(Ze,Dn,void 0,ut>=0)}function Go(){let R=Rn(),$=Uc(!0);H()==74&&($=Cn(At(Ha(10,$,R)),R));let oe;for(;!pi(131072)&&(oe=$n(27));)$=sy($,oe,Uc(!0),R);return $}function ay(R,$){let oe=Rn(),Ne=Lt(),Ze=e.getTokenStart(),Dn=e.getFileName(),ut=!R&&pt(17,$)||Ue(17);if(ut||R){let _r=e.hasPrecedingLineBreak(),Qt=Lo(1,Xr);ut&&qa(17,19,ut,Ze,Dn);let Ri=lo(Cn(ot(Qt,_r),oe),Ne);return H()===74&&(yt(N.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),nn()),Ri}else{let _r=kr();return lo(Cn(ot(_r,void 0),oe),Ne)}}function xa(){return Wc()&&H()===103?!1:YD(H())>0}function Uc(R){let $=Rn(),oe=Lt(),Ne=vP(0);return od(Ne)&&qd(qe())?sy(Ne,Gi(),Uc(R),$):FP(Ne,$,R)}function sy(R,$,oe,Ne){return Cn(se.createBinaryExpression(R,$,oe),Ne)}function vP(R){let $=Rn(),oe=Gb();return Ha(R,oe,$)}function FP(R,$,oe){let Ne=$n(60);if(!Ne)return R;let Ze;return Cn(se.createConditionalExpression(R,Ne,di(i,()=>Uc(!1)),Ze=k(61),lm(Ze)?Uc(oe):ct(89,!1,N._0_expected,Ai(61))),$)}function Ha(R,$,oe){for(;;){qe();let Ne=za($)&&H()==16,Ze=R==0&&H()==74?0:YD(Ne?41:H());if(!(H()===44?Ze>=R:Ze>R)||H()===103&&Wc())break;let ut=Ne?Cn(Je(41),Rn()):Gi();$=sy($,ut,vP(Ze),oe)}return $}function Gb(){if(jf()){let oe=Rn(),Ne=Mm();return H()===44?Ha(YD(H()),Ne,oe):Ne}let R=H(),$=$b();if(H()===44){let oe=eo(_,$.pos),{end:Ne}=$;E.assert(KF(R)),ln(oe,Ne,Xh($),N.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,Ai(R))}return $}function $b(){switch(H()){case 29:case 41:case 42:case 57:case 55:return Yb();case 20:case 69:let R=Bf();if(R)return R;default:return Mm()}}function Qb(){let R=Rn();pt(20),pt(29);let $=El(99,!1);E.assert($.kind===258,"Expected a struct type node"),pt(32);let oe=Ao(()=>H()===89&&nn()===61),Ne;return oe?Ne=os(14,Zb):Ne=os(14,cy),pt(21),Cn(se.createNewStructExpression($,Ne),R)}function Bf(){let R=Rn();if(Ao(()=>{let $=Ue(69);$||pt(20);let oe=!1;if(H()===29&&Ao(()=>nn())===89&&(oe=Ue(29)),H()!==29&&!Pl())return!1;let Ne=_a();if(oe&&pt(32),$)pt(19),pt(21);else if(!Ue(21))return!1;return!0})){let $=Ue(69);$||pt(20);let oe=!1;if(H()===29&&Ao(()=>nn())===89&&(oe=Ue(29)),H()!==29&&!Pl())return;let Ne=_a();if(oe&&pt(32),$)pt(19),pt(21);else if(!Ue(21))return;let Ze=$b();return Cn(se.createTypeAssertion(Ne,Ze),R)}}function Yb(){let R=Rn(),$=H(),oe=mo(()=>ii($b));return H()==74&&(oe=Cn(At(Ha(10,oe,R)),R)),Cn(se.createPrefixUnaryExpression($,oe),R)}function jf(){switch(H()){case 41:case 42:case 57:case 55:case 105:case 29:case 69:return!1;case 20:return Ao(()=>nn()===29);default:return!0}}function Mm(){if(H()===47||H()===48){let oe=Rn();return Cn(se.createPrefixUnaryExpression(H(),mo(Xb)),oe)}let R=Rn(),$=Xb();if((H()===47||H()===48)&&!e.hasPrecedingLineBreak()){let oe=H();return nn(),Cn(se.createPostfixUnaryExpression($,oe),R)}return $}function Xb(){let R=Rn(),$;return $=H()==71?da(R):IP(),lA(R,$)}function lA(R,$){for(;;){if($=eC(R,$,!0),H()===20){let oe=Wt(),Ne=Sn($)?$.text:void 0;if(Ne==="clone_object"){let Ze=se.createCloneObjectExpression($,oe);$=rf(Cn(Ze,R));continue}else{let Ze=Ft($,oe);$=Cn(Ze,R),Ne==="base_name"&&rf($);continue}}break}return $}function rf(R){return Pe.push(R),R}function Wt(){pt(20);let R=os(14,cy),$=pt(21);return WS(R,$)}function WS(R,$){return R.isComplete=$,R}function cy(){return di(i,tC)}function Zb(){return di(i,uA)}function uA(){let R=Rn(),$=Lt(),oe=jr();pt(61);let Ne=hr(()=>Uc(!0)),Ze=se.createPropertyAssignment(oe,Ne);return lo(Cn(Ze,R),$)}function da(R,$){let oe=Lt();k(71);let Ne=Ka()?Kc():ct(89,!0,N.Identifier_expected);$&&!(Sn($)||ji($))&&zn($,Xh($),N.Identifier_or_string_expected);let Ze=se.createSuperAccessExpression(Ne,$);return lo(Cn(Ze,R),oe)}function IP(){let R=Rn(),$=Jf();return eC(R,$,!0)}function LP(){return H()===40}function eC(R,$,oe){for(;;){let Ne=!1,Ze;if(H()==71&&($=da(R,$)),(H()==24||H()==40)&&(Ne=!0,Ze=Gi()),Ne){$=Nd(R,$,Ze);continue}let Dn;for(;za($)&&(H()==16||H()===90);){let ut=Cn(Je(41),Rn());Dn=sy(Dn??$,ut,Jf(),R)}if(Dn&&($=Cn(At(Dn),R)),Ue(22)){$=Lu(R,$);continue}return $}}function za(R){return ji(R)||br(R)}function Iu(R){let $=Rn(),oe,Ne;return Ue(73)?Ne=hr(Go):(oe=hr(Go),Ue(73)&&H()!==R&&(Ne=hr(Go))),Ne?Cn(se.createRangeExpression(oe,Ne),$):oe}function Lu(R,$){let oe;if(H()===23)oe=ct(89,!0,N.An_element_access_expression_should_take_an_argument);else{let Ze,Dn;Ue(73)?Dn=Oi(Go):(Ze=Oi(Go),Ue(73)&&H()!==23&&(Dn=Oi(Go)));let ut=Dn?Cn(se.createRangeExpression(Ze,Dn),R):Ze;Bc(ut)&&(ut.text=Um(ut.text)),oe=ut}pt(23);let Ne=wn($,oe);return Cn(Ne,R)}function Nd(R,$,oe){let Ne=AP(!0,!0,!0),Ze=!1,Dn=xn($,Ne,oe);return rf(Cn(Dn,R))}function AP(R,$,oe){return e.hasPrecedingLineBreak()&&td(H())&&Ao(et)?ct(89,!0,N.Identifier_expected):R?oe?kp():US():Kc()}function Np(){let R=Rn();pt(72);let $;if(H()==89){let oe=Rn(),Ne=Kc();H()==71&&(Ne=da(oe,Ne)),$=se.createLambdaIdentifierExpression(Ne)}else{H()==32&&qe();let oe=Gi();if($=se.createLambdaOperatorExpression(oe),oe.kind==22)for(;H()!=27;){let Ne=nn()}}return Cn($,R)}function nC(){let R=Rn();if(!M)return nn(),ct(16,!0,N.Stringized_literal_only_valid_in_macro);let $=e.getTokenValue().slice(1),oe=M.argsIn[$]?.text;if(nn(),oe){let Ne=Cr(Um(oe),void 0,e.hasExtendedUnicodeEscape());return Cn(Ne,R)}return We(R.pos,$.length+1,R.fileName,N.Macro_parameter_0_not_found,$),ct(16,!1)}function Kc(R,$){return Pp(Ka(),R,$)}function kp(R){return Pp(td(H()),R)}function US(){return(e.hasUnicodeEscape()||e.hasExtendedUnicodeEscape())&&yt(N.Unicode_escape_sequence_cannot_appear_here),Pp(td(H()))}function rl(R=!0){let $=Rn(),oe=Lt();R&&pt(20);let Ne=hr(Go);return pt(21),lo(Cn(At(Ne),$),oe)}function Au(){let R=Rn(),$=e.getTokenStart(),oe=e.getFileName(),Ne=pt(68),Ze,Dn;Ue(61)?Ze=Uc(!1):Dn=os(18,dA),D(68,[23,21],Ne,$,oe);let ut=e.hasPrecedingLineBreak();return Cn(se.createMappingLiteralExpression(Ze,Dn,ut),R)}function dA(){let R=Rn(),$=Uc(!1),oe;return Ue(61)&&(oe=qo(19,vp,26),oe?.length===0&&ct(247,!0,N.Expression_expected)),Cn(se.createMappingEntryExpression($,oe),R)}function vp(){return H()===26?Cn(se.createOmittedExpression(),Rn()):Uc(!0)}function wP(R){let $=Rn(),oe=Lt(),Ne=Ln;Ln|=31;let Ze=pt(20)&&pt(61),Dn=RP(R);return D(66,[61,21],Ze,$.pos,$.fileName),Ln=Ne,lo(Cn(se.createInlineClosure(Dn),$),oe)}function ka(){return H()!==17&&H()!==133&&H()!==62&&$s()}function RP(R){if(H()===17)return P(0);if(H()!==26&&H()!==138&&H()!==133&&vn()&&!ka())return P(16);let $=ue;ue=!1;let oe=os(31,cy);return ue=$,oe.length==1?oe[0]:oe}function of(){let R=Rn(),$=e.getFileName(),oe=e.getTokenStart(),Ne=pt(22),Ze=e.hasPrecedingLineBreak(),Dn=os(17,tC);return qa(22,23,Ne,oe,$),Cn(Et(Dn,Ze),R)}function Yh(){let R=Rn(),$=e.getTokenStart(),oe=e.getFileName(),Ne=pt(69),Ze=e.hasPrecedingLineBreak(),Dn=os(16,tC);return D(69,[19,21],Ne,$,oe),Cn(Et(Dn,Ze),R)}function Bm(){let R=Rn();pt(25);let $=Uc(!0);return Cn(se.createSpreadElement($),R)}function jm(){let R=Rn(),$=T===0?k(52):k(141),oe=Uc(!0);return Cn(se.createByRefElement($,oe),R)}function tC(){let R=Rn(),$=H()===25?Bm():H()===52||H()===141?jm():H()===27?Cn(se.createOmittedExpression(),Rn()):Uc(!0);return H()===25&&(pt(25),$=Cn(se.createSpreadElement($),R)),$}function Jf(){switch(H()){case 10:case 11:case 12:case 13:case 16:case 15:case 14:return Wm();case 90:return nC();case 71:case 136:case 135:return Gi();case 20:let R=Ao(()=>nn());return R===61?wP(!0):R===29?Qb():rl();case 69:return Yh();case 66:return wP(!0);case 68:return Au();case 70:return rC();case 138:return KS();case 100:return ua();case 72:return Np();case 22:if(v===6)return of();break;case 17:if(v===6)return qn();break}if(H()===137&&v===6)return Gi();if(H()===145&&T===1)return Jm();if(Pl()&&Ao(()=>nn()!==71)){let R=_a();return tu(R)}return Kc(N.Expression_expected)}function rC(){let R=Rn();pt(70);let $=Uc(!0);pt(21);let oe=Wt();return Cn(se.createEvaluateExpression($,oe),R)}function Jm(){let R=Rn();pt(145);let $,oe;return pt(20),H()==133?($=_a(),Ue(27)&&(H()==89&&Ao(()=>nn()==61)?oe=os(14,Zb):oe=os(14,cy))):oe=os(14,cy),pt(21),rf(Cn(fe($,void 0,oe),R))}function KS(){let R=Rn(),$=Lt(),oe=tf(!1);pt(138);let Ne=_a(),Ze=Ka()?Kc():void 0,Dn=Ke(),ut=P(0),_r=se.createFunctionExpression(oe,Ze,Dn,Ne,ut);return lo(Cn(_r,R),$)}function Wm(){return bp(H())}let qS;(lr=>(lr[lr.SourceElements=0]="SourceElements",lr[lr.BlockStatements=1]="BlockStatements",lr[lr.SwitchPreBlock=2]="SwitchPreBlock",lr[lr.SwitchClauses=3]="SwitchClauses",lr[lr.SwitchClauseStatements=4]="SwitchClauseStatements",lr[lr.TypeMembers=5]="TypeMembers",lr[lr.ClassMembers=6]="ClassMembers",lr[lr.EnumMembers=7]="EnumMembers",lr[lr.PropertySignatureNames=8]="PropertySignatureNames",lr[lr.ElementAccess=9]="ElementAccess",lr[lr.HeritageClauseElement=10]="HeritageClauseElement",lr[lr.VariableDeclarations=11]="VariableDeclarations",lr[lr.ObjectBindingElements=12]="ObjectBindingElements",lr[lr.ArrayBindingElements=13]="ArrayBindingElements",lr[lr.ArgumentExpressions=14]="ArgumentExpressions",lr[lr.ObjectLiteralMembers=15]="ObjectLiteralMembers",lr[lr.ArrayLiteralMembers=16]="ArrayLiteralMembers",lr[lr.JsonArrayLiteralMembers=17]="JsonArrayLiteralMembers",lr[lr.MappingLiteralMembers=18]="MappingLiteralMembers",lr[lr.MappingEntryMembers=19]="MappingEntryMembers",lr[lr.Parameters=20]="Parameters",lr[lr.JSDocParameters=21]="JSDocParameters",lr[lr.RestProperties=22]="RestProperties",lr[lr.TypeParameters=23]="TypeParameters",lr[lr.TypeArguments=24]="TypeArguments",lr[lr.TupleElementTypes=25]="TupleElementTypes",lr[lr.HeritageClauses=26]="HeritageClauses",lr[lr.ImportOrExportSpecifiers=27]="ImportOrExportSpecifiers",lr[lr.ImportAttributes=28]="ImportAttributes",lr[lr.JSDocComment=29]="JSDocComment",lr[lr.Count=30]="Count",lr[lr.InlineClosure=31]="InlineClosure",lr[lr.StructMembers=32]="StructMembers",lr[lr.ForEachInitializers=33]="ForEachInitializers",lr[lr.PragmaArguments=34]="PragmaArguments"))(qS||(qS={}));function Um(R){let $=G.get(R);return $===void 0&&G.set(R,$=R),$}function fA(R){if(R&&R.length<=ode){let $=G.get(R);return $===void 0&&G.set(R,$=R),$}return R}function iC(R){return H()===R?(Cs(),!0):(E.assert(KF(R)),yt(N._0_expected,Ai(R)),!1)}function Cs(){return de=e.scanJsDocToken()}function oC(R){return de=e.scanJSDocCommentTextToken(R)}function pA(){let R=Kc();if(H()===142&&!e.hasPrecedingLineBreak())return nn(),R}function aC(){let R=Rn(),$=Ka()&&Ao(()=>nn()===142)?pA():void 0,oe=_a();return $?Cn(se.createTypePredicateNode(void 0,$,oe),R):oe}function sC(){e.setSkipJsDocLeadingAsterisks(!0);let R=Rn(),$=Ue(25),oe=aC();return Ue(22)&&iC(23)&&(oe=Cn(se.createArrayTypeNode(oe),R)),e.setSkipJsDocLeadingAsterisks(!1),$&&(oe=Cn(se.createJSDocVariadicType(oe),R)),H()===74?(nn(),Cn(se.createJSDocOptionalType(oe),R)):oe}function ly(R){up(R,!0)}MP.fixupParentReferences=ly;function cC(R,$){let oe=Rn(),Ne=R?kp($):Kc($);for(;Ue(24)&&H()!==29;)Ne=Cn(se.createQualifiedName(Ne,AP(R,!1,!0)),oe);return Ne}function OP(R,$,oe){return Cn(se.createQualifiedName(R,$),oe)}function Xh(R){let $=gn.get(R);return E.assertIsDefined($,"node should have a filename"),$}function VS(){return r?.fileName||y}let HS;(_r=>{function R(Qt,Ri,C){let Bt=de,Jr=ce.length,uo=he,vc=nr(16777216,()=>ut(Ri,C));return xc(vc,Qt),Ee||(Ee=[]),Ro(Ee,ce,Jr),de=Bt,ce.length=Jr,he=uo,vc}_r.parseJSDocComment=R;let $;(Jr=>(Jr[Jr.BeginningOfLine=0]="BeginningOfLine",Jr[Jr.SawAsterisk=1]="SawAsterisk",Jr[Jr.SavingComments=2]="SavingComments",Jr[Jr.SavingBackticks=3]="SavingBackticks"))($||($={}));function oe(Qt){let Ri=Rn(),C=(Qt?Ue:pt)(17),Bt=nr(16777216,sC);(!Qt||C)&&iC(19);let Jr=se.createJSDocTypeExpression(Bt);return ly(Jr),Cn(Jr,Ri)}_r.parseJSDocTypeExpression=oe;function Ne(){let Qt=Rn(),Ri=Ue(17),C=Li(),Bt=cC(!1);Ri&&iC(19);let Jr=se.createJSDocNameReference(Bt);return ly(Jr),Cn(Jr,Qt)}_r.parseJSDocNameReference=Ne;function Ze(Qt,Ri,C){Ce("",Qt,Re,$_,1,void 0,1,void 0,0,2);let Bt=nr(16777216,()=>ut(Ri,C)),Jr={languageVariant:2,text:Qt},uo=Nx(ce,Jr);return ne(),Bt?{jsDoc:Bt,diagnostics:uo}:void 0}_r.parseIsolatedJSDocComment=Ze;let Dn;(Jr=>(Jr[Jr.Property=1]="Property",Jr[Jr.Parameter=2]="Parameter",Jr[Jr.CallbackParameter=4]="CallbackParameter",Jr[Jr.Variable=8]="Variable"))(Dn||(Dn={}));function ut(Qt=0,Ri){let C=_,Bt=Ri===void 0?C.length:Qt+Ri;if(Ri=Bt-Qt,E.assert(Qt>=0),E.assert(Qt<=Bt),E.assert(Bt<=C.length),!fI(C,Qt))return;let Jr,uo,vc,Wf,Uf,wu=[],Fp=[],mA=Ln;Ln|=1<<29;let gA=e.scanRange(Qt+3,Ri-5,BP);return Ln=mA,gA;function BP(){let cn=1,Un,Mn=Qt-(C.lastIndexOf(`
61
+ `,Qt)+1)+4;function ht(bi){Un||(Un=Mn),wu.push(bi),Mn+=bi.length}for(Cs();Km(5););Km(4)&&(cn=0,Mn=0);e:for(;;){switch(H()){case 62:yA(wu),Uf||(Uf=Li()),lr(WP(Mn)),cn=0,Un=void 0;break;case 4:wu.push(e.getTokenText()),cn=0,Mn=0;break;case 43:let bi=e.getTokenText();cn===1?(cn=2,ht(bi)):(E.assert(cn===0),cn=1,Mn+=bi.length);break;case 5:E.assert(cn!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let to=e.getTokenText();Un!==void 0&&Mn+to.length>Un&&wu.push(to.slice(Un-Mn)),Mn+=to.length;break;case 1:break e;case 91:cn=2,ht(e.getTokenValue());break;case 17:cn=2;let ru=e.getTokenFullStart(),Ma=e.getTokenEnd()-1,Ga=UP(Ma);if(Ga){Wf||jP(wu),Fp.push(Cn(se.createJSDocText(wu.join("")),Wf??Qt,ru)),Fp.push(Ga),wu=[],Wf=e.getTokenEnd();break}default:cn=2,ht(e.getTokenText());break}cn===2?oC(!1):Cs()}let Tt=wu.join("").trimEnd();Fp.length&&Tt.length&&Fp.push(Cn(se.createJSDocText(Tt),Wf??Qt,Uf)),Fp.length&&Jr&&E.assertIsDefined(Uf,"having parsed tags implies that the end of the comment span should be set");let tr=Jr&&Co(Jr,uo,vc);return Cn(se.createJSDocComment(Fp.length?Co(Fp,Qt,Uf):Tt.length?Tt:void 0,tr),Qt,Bt)}function jP(cn){for(;cn.length&&(cn[0]===`
62
+ `||cn[0]==="\r");)cn.shift()}function yA(cn){for(;cn.length;){let Un=cn[cn.length-1].trimEnd();if(Un==="")cn.pop();else if(Un.length<cn[cn.length-1].length){cn[cn.length-1]=Un;break}else break}}function JP(){for(;;){if(Cs(),H()===1)return!0;if(!(H()===5||H()===4))return!1}}function Ru(){if(!((H()===5||H()===4)&&Ao(JP)))for(;H()===5||H()===4;)Cs()}function Ip(){if((H()===5||H()===4)&&Ao(JP))return"";let cn=e.hasPrecedingLineBreak(),Un=!1,Mn="";for(;cn&&H()===43||H()===5||H()===4;)Mn+=e.getTokenText(),H()===4?(cn=!0,Un=!0,Mn=""):H()===43&&(cn=!1),Cs();return Un?Mn:""}function WP(cn){E.assert(H()===62);let Un=e.getTokenStart(),Mn=Rn();Cs();let ht=Kf(void 0),Tt=Ip(),tr;switch(ht.text){case"author":tr=CA(Mn,ht,cn,Tt);break;case"implements":tr=EA(Mn,ht,cn,Tt);break;case"augments":case"extends":tr=PA(Mn,ht,cn,Tt);break;case"class":case"constructor":tr=dy(Mn,se.createJSDocClassTag,ht,cn,Tt);break;case"public":tr=dy(Mn,se.createJSDocPublicTag,ht,cn,Tt);break;case"private":tr=dy(Mn,se.createJSDocPrivateTag,ht,cn,Tt);break;case"protected":tr=dy(Mn,se.createJSDocProtectedTag,ht,cn,Tt);break;case"override":tr=dy(Mn,se.createJSDocOverrideTag,ht,cn,Tt);break;case"deprecated":tl=!0,tr=dy(Mn,se.createJSDocDeprecatedTag,ht,cn,Tt);break;case"this":tr=HP(Mn,ht,cn,Tt);break;case"arg":case"argument":case"param":return $S(Mn,ht,2,cn);case"var":return $S(Mn,ht,8,cn);case"return":case"returns":tr=qP(Mn,ht,cn,Tt);break;case"template":tr=ZS(Mn,ht,cn,Tt);break;case"type":tr=VP(Mn,ht,cn,Tt);break;case"typedef":tr=kA(Mn,ht,cn,Tt);break;case"callback":tr=vA(Mn,ht,cn,Tt);break;case"overload":tr=uC(Mn,ht,cn,Tt);break;case"satisfies":tr=NA(Mn,ht,cn,Tt);break;case"see":tr=xA(Mn,ht,cn,Tt);break;case"exception":case"throws":tr=bA(Mn,ht,cn,Tt);break;default:tr=TA(Mn,ht,cn,Tt);break}return tr}function Fc(cn,Un,Mn,ht){return ht||(Mn+=Un-cn.pos),zS(Mn,ht.slice(Mn))}function zS(cn,Un){let Mn=Li(),ht=[],Tt=[],tr,bi=0,to;function ru(Mu){to||(to=cn),ht.push(Mu),cn+=Mu.length}Un!==void 0&&(Un!==""&&ru(Un),bi=1);let Ma=H();e:for(;;){switch(Ma){case 4:bi=0,ht.push(e.getTokenText()),cn=0;break;case 62:e.resetTokenState(e.getTokenEnd()-1);break e;case 1:break e;case 5:E.assert(bi!==2&&bi!==3,"whitespace shouldn't come from the scanner while saving comment text");let Mu=e.getTokenText();to!==void 0&&cn+Mu.length>to&&(ht.push(Mu.slice(to-cn)),bi=2),cn+=Mu.length;break;case 17:bi=2;let af=e.getTokenFullStart(),rr=e.getTokenEnd()-1,ba=UP(rr);ba?(Tt.push(Cn(se.createJSDocText(ht.join("")),tr??Mn,af)),Tt.push(ba),ht=[],tr=e.getTokenEnd()):ru(e.getTokenText());break;case 18:bi===3?bi=2:bi=3,ru(e.getTokenText());break;case 91:bi!==3&&(bi=2),ru(e.getTokenValue());break;case 43:if(bi===0){bi=1,cn+=1;break}default:bi!==3&&(bi=2),ru(e.getTokenText());break}bi===2||bi===3?Ma=oC(bi===3):Ma=Cs()}jP(ht);let Ga=ht.join("").trimEnd();if(Tt.length)return Ga.length&&Tt.push(Cn(se.createJSDocText(Ga),tr??Mn)),Co(Tt,Mn,e.getTokenEnd());if(Ga.length)return Ga}function UP(cn){let Un=Zd(KP);if(!Un)return;Cs(),Ru();let Mn=hA(),ht=[];for(;H()!==19&&H()!==4&&H()!==1;)ht.push(e.getTokenText()),Cs();let Tt=Un==="link"?se.createJSDocLink:Un==="linkcode"?se.createJSDocLinkCode:se.createJSDocLinkPlain;return Cn(Tt(Mn,ht.join("")),cn,e.getTokenEnd())}function hA(){if(td(H())){let cn=Rn(),Un=kp();for(;Ue(24);)Un=Cn(se.createQualifiedName(Un,kp()),cn);return Un}}function KP(){if(Ip(),H()===17&&Cs()===62&&td(Cs())){let cn=e.getTokenValue();if(lC(cn))return cn}}function lC(cn){return cn==="link"||cn==="linkcode"||cn==="linkplain"}function TA(cn,Un,Mn,ht){return Cn(se.createJSDocUnknownTag(Un,Fc(cn,Li(),Mn,ht)),cn)}function lr(cn){cn&&(Jr?Jr.push(cn):(Jr=[cn],uo=cn.pos),vc=cn.end)}function Zh(){return Ip(),H()===17?oe():void 0}function SA(){let cn=Km(22);cn&&Ru();let Un=Km(18),Mn=AA();return Un&&j(18),cn&&(Ru(),$n(74)&&Go(),pt(23)),{name:Mn,isBracketed:cn}}function GS(cn){switch(cn.kind){case 140:return!0;case 161:return GS(cn.elementType);default:return vf(cn)&&Sn(cn.typeName)&&cn.typeName.text==="Object"&&!cn.typeArguments}}function $S(cn,Un,Mn,ht){let Tt=Zh(),tr=!Tt;Ip();let{name:bi,isBracketed:to}=SA(),ru=Ip();tr&&!Ao(KP)&&(Tt=Zh());let Ma=Fc(cn,Li(),ht,ru),Ga=_A(Tt,bi,Mn,ht);Ga&&(Tt=Ga,tr=!0);let Mu=Mn===1?se.createJSDocPropertyTag(Un,bi,to,Tt,tr,Ma):Mn===8?se.createJSDocVariableTag(Un,bi,to,Tt,tr,Ma):se.createJSDocParameterTag(Un,bi,to,Tt,tr,Ma);return rf(Cn(Mu,cn))}function _A(cn,Un,Mn,ht){if(cn?.type&&GS(cn.type)){let Tt=Rn(),tr,bi;for(;tr=Zd(()=>XS(Mn,ht,Un));)tr.kind===220||tr.kind===227?bi=$r(bi,tr):tr.kind===224&&zn(tr.tagName,VS(),N.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(bi){let to=Cn(se.createJSDocTypeLiteral(bi,cn.type.kind===161),Tt);return Cn(se.createJSDocTypeExpression(to),Tt)}}}function qP(cn,Un,Mn,ht){Pn(Jr,_x)&&ln(Un.pos,e.getTokenStart(),e.getFileName(),N._0_tag_already_specified,Un.text);let Tt=Zh();return rf(Cn(se.createJSDocReturnTag(Un,Tt,Fc(cn,Li(),Mn,ht)),cn))}function VP(cn,Un,Mn,ht){Pn(Jr,ZT)&&ln(Un.pos,e.getTokenStart(),e.getFileName(),N._0_tag_already_specified,Un.text);let Tt=oe(!0),tr=Mn!==void 0&&ht!==void 0?Fc(cn,Li(),Mn,ht):void 0;return rf(Cn(se.createJSDocTypeTag(Un,Tt,tr),cn))}function xA(cn,Un,Mn,ht){let tr=H()===22||Ao(()=>Cs()===62&&td(Cs())&&lC(e.getTokenValue()))?void 0:Ne(),bi=Mn!==void 0&&ht!==void 0?Fc(cn,Li(),Mn,ht):void 0;return Cn(se.createJSDocSeeTag(Un,tr,bi),cn)}function bA(cn,Un,Mn,ht){let Tt=Zh(),tr=Fc(cn,Li(),Mn,ht);return Cn(se.createJSDocThrowsTag(Un,Tt,tr),cn)}function CA(cn,Un,Mn,ht){let Tt=Rn(),tr=DA(),bi=e.getTokenFullStart(),to=Fc(cn,bi,Mn,ht);to||(bi=e.getTokenFullStart());let ru=typeof to!="string"?Co(Zr([Cn(tr,Tt.pos,bi)],to),Tt):tr.text+to;return Cn(se.createJSDocAuthorTag(Un,ru),cn)}function DA(){let cn=[],Un=!1,Mn=e.getToken();for(;Mn!==1&&Mn!==4;){if(Mn===29)Un=!0;else{if(Mn===62&&!Un)break;if(Mn===32&&Un){cn.push(e.getTokenText()),e.resetTokenState(e.getTokenEnd());break}}cn.push(e.getTokenText()),Mn=Cs()}return se.createJSDocText(cn.join(""))}function EA(cn,Un,Mn,ht){let Tt=QS();return Cn(se.createJSDocImplementsTag(Un,Tt,Fc(cn,Li(),Mn,ht)),cn)}function PA(cn,Un,Mn,ht){let Tt=QS();return Cn(se.createJSDocAugmentsTag(Un,Tt,Fc(cn,Li(),Mn,ht)),cn)}function NA(cn,Un,Mn,ht){let Tt=oe(!1),tr=Mn!==void 0&&ht!==void 0?Fc(cn,Li(),Mn,ht):void 0;return Cn(se.createJSDocSatisfiesTag(Un,Tt,tr),cn)}function QS(){let cn=Ue(17),Un=Rn(),Mn=uy();e.setSkipJsDocLeadingAsterisks(!0);let ht=void 0;e.setSkipJsDocLeadingAsterisks(!1);let Tt=se.createExpressionWithTypeArguments(Mn,ht),tr=Cn(Tt,Un);return cn&&pt(19),tr}function uy(){let cn=Rn(),Un=Kf();for(;Ue(24);){let Mn=Kf();Un=Cn(xn(Un,Mn),cn)}return Un}function dy(cn,Un,Mn,ht,Tt){return Cn(Un(Mn,Fc(cn,Li(),ht,Tt)),cn)}function HP(cn,Un,Mn,ht){let Tt=oe(!0);return Ru(),Cn(se.createJSDocThisTag(Un,Tt,Fc(cn,Li(),Mn,ht)),cn)}function kA(cn,Un,Mn,ht){let Tt=Zh();Ip();let tr=zP();Ru();let bi=zS(Mn),to;if(!Tt||Tt.type&&GS(Tt.type)){let Ma,Ga,Mu,af=!1;for(;(Ma=Zd(()=>FA(Mn)))&&Ma.kind!==224;)if(af=!0,Ma.kind===223)if(Ga){let rr=yt(N.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);rr&&ia(rr,Px(y,_,0,0,N.The_tag_was_first_specified_here));break}else Ga=Ma;else Mu=$r(Mu,Ma);if(af){let rr=Tt&&Tt.type.kind===161,ba=se.createJSDocTypeLiteral(Mu,rr);Tt=Ga&&Ga.typeExpression&&!GS(Ga.typeExpression.type)?Ga.typeExpression:Cn(ba,cn),to=Tt.end}}to=to||bi!==void 0?Li():(tr??Tt??Un).end,bi||(bi=Fc(cn,to,Mn,ht));let ru=se.createJSDocTypedefTag(Un,Tt,tr,bi);return rf(Cn(ru,cn.pos,to))}function Vj(cn){let Un=Rn(),Mn,ht;for(;Mn=Zd(()=>XS(4,cn));){if(Mn.kind===224){zn(Mn.tagName,VS(),N.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}ht=$r(ht,Mn)}return Co(ht||[],Un)}function YS(cn,Un){let Mn=Vj(Un),ht=Zd(()=>{if(Km(62)){let Tt=WP(Un);if(Tt&&Tt.kind===221)return Tt}});return Cn(se.createJSDocSignature(void 0,Mn,ht),cn)}function zP(cn){let Un=e.getTokenStart();if(!td(H()))return;let Mn=Kf();return cn&&(Mn.flags|=4096),Mn}function vA(cn,Un,Mn,ht){let Tt=zP();Ru();let tr=zS(Mn),bi=YS(cn,Mn);return tr||(tr=Fc(cn,Li(),Mn,ht)),Cn(se.createJSDocCallbackTag(Un,bi,Tt,tr),cn)}function uC(cn,Un,Mn,ht){Ru();let Tt=zS(Mn),tr=YS(cn,Mn);Tt||(Tt=Fc(cn,Li(),Mn,ht));let bi=Tt!==void 0?Li():tr.end;return Cn(se.createJSDocOverloadTag(Un,tr,Tt),cn.pos,bi)}function dC(cn,Un){for(;!Sn(cn)||!Sn(Un);)if(!Sn(cn)&&!Sn(Un)&&cn.right.text===Un.right.text)cn=cn.left,Un=Un.left;else return!1;return cn.text===Un.text}function FA(cn){return XS(1,cn)}function XS(cn,Un,Mn){let ht=!0,Tt=!1;for(;;)switch(Cs()){case 62:if(ht){let tr=IA(cn,Un);return tr&&(tr.kind===220||tr.kind===227)&&Mn&&(Sn(tr.name)||!dC(Mn,tr.name.left))?!1:tr}Tt=!1;break;case 4:ht=!0,Tt=!1;break;case 43:Tt&&(ht=!1),Tt=!0;break;case 89:ht=!1;break;case 1:return!1}}function IA(cn,Un){E.assert(H()===62);let Mn=Rn();Cs();let ht=Kf(),Tt=Ip(),tr;switch(ht.text){case"type":return cn===1&&VP(Mn,ht);case"prop":case"property":tr=1;break;case"arg":case"argument":case"param":tr=6;break;case"template":return ZS(Mn,ht,Un,Tt);case"this":return HP(Mn,ht,Un,Tt);default:return!1}return cn&tr?$S(Mn,ht,cn,Un):!1}function Ou(){let cn=Rn(),Un=Km(22);Un&&Ru();let Mn=tf(!1,!0),ht=Kf(N.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),Tt;if(Un&&(Ru(),pt(74),Tt=nr(16777216,sC),pt(23)),!Da(ht))return Cn(se.createTypeParameterDeclaration(Mn,ht,void 0,Tt),cn)}function LA(){let cn=Rn(),Un=[];do{Ru();let Mn=Ou();Mn!==void 0&&Un.push(Mn),Ip()}while(Km(27));return Co(Un,cn)}function ZS(cn,Un,Mn,ht){let Tt=H()===17?oe():void 0,tr=LA();return Cn(se.createJSDocTemplateTag(Un,Tt,tr,Fc(cn,Li(),Mn,ht)),cn)}function Km(cn){return H()===cn?(Cs(),!0):!1}function AA(){let cn=Rn(),Un=Kf();for(Ue(22)&&pt(23);Ue(24);){let Mn=Kf();Ue(22)&&pt(23),Un=OP(Un,Mn,cn)}return Un}function Kf(cn){if(!td(H()))return ct(89,!cn,cn||N.Identifier_expected);Qe++;let Un=e.getTokenStart(),Mn=e.getTokenEnd(),ht=H(),Tt=Um(e.getTokenValue()),tr=Cn(Oe(Tt,ht),Un,Mn);return Cs(),tr}}})(HS=MP.JSDocParser||(MP.JSDocParser={}))})(CE||(CE={}));var _V,xV,bV,CV,sde={createBaseSourceFileNode:e=>new(CV||(CV=pa.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(bV||(bV=pa.getIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(xV||(xV=pa.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(_V||(_V=pa.getNodeConstructor()))(e,-1,-1)},DE=nb(1,sde);function An(e,n){return n&&e(n)}function Ii(e,n,r){if(r){if(n)return n(r);for(let i of r){let a=e(i);if(a)return a}}}var cde={176:function(n,r,i){return Ii(r,i,n.statements)||An(r,n.endOfFileToken)},255:function(n,r,i){return An(r,n.expression)||An(r,n.block)},149:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.type)||An(r,n.name)||An(r,n.ampToken)||An(r,n.dotDotDotToken)||An(r,n.initializer)},152:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.name)||An(r,n.type)||An(r,n.initializer)},174:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.name)||An(r,n.initializer)},153:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.name)||An(r,n.type)||An(r,n.initializer)},173:function(n,r,i){return Ii(r,i,n.modifiers)},235:function(n,r,i){return Ii(r,i,n.elements)},278:function(n,r,i){return An(r,n.expression)||Ii(r,i,n.arguments)},276:AM,277:function(n,r,i){return An(r,n.type)||Ii(r,i,n.arguments)},241:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.name)||An(r,n.heritageName)||An(r,n.type)},257:function(n,r,i){return An(r,n.literal)},259:function(n,r,i){return An(r,n.typeParameter)},163:function(n,r,i){return Ii(r,i,n.members)},148:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.name)||An(r,n.constraint)||An(r,n.default)||An(r,n.expression)},166:function(n,r,i){return An(r,n.typeName)||Ii(r,i,n.typeArguments)},167:function(n,r,i){return An(r,n.parameterName)||An(r,n.type)},169:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.type)||An(r,n.asteriskToken)||An(r,n.name)||Ii(r,i,n.parameters)||An(r,n.body)},270:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.type)||An(r,n.name)||Ii(r,i,n.parameters)||An(r,n.body)},178:function(n,r,i){return Ii(r,i,n.content)||Ii(r,i,n.statements)||An(r,n.endOfFileToken)},179:function(n,r,i){return An(r,n.name)||Ii(r,i,n.arguments)},283:function(n,r,i){return Ii(r,i,n.parameters)||Nr(n.body)?Ii(r,i,n.body):An(r,n.body)},252:function(n,r,i){return An(r,n.inheritClause)},157:function(n,r,i){return Ii(r,i,n.types)},159:function(n,r,i){return Ii(r,i,n.types)},258:function(n,r,i){return An(r,n.typeName)},273:AM,281:function(n,r,i){return An(r,n.expression)||An(r,n.argumentExpression)},282:function(n,r,i){return An(r,n.left)||An(r,n.right)},272:AM,286:function(n,r,i){return An(r,n.expression)||An(r,n.name)},287:function(n,r,i){return An(r,n.namespace)||An(r,n.name)},288:function(n,r,i){return An(r,n.operand)},279:function(n,r,i){return An(r,n.type)||An(r,n.expression)},289:function(n,r,i){return An(r,n.expression)},298:function(n,r,i){return An(r,n.operand)},295:function(n,r,i){return An(r,n.refToken)||An(r,n.expression)},269:function(n,r,i){return An(r,n.left)||An(r,n.operatorToken)||An(r,n.right)},268:function(n,r,i){return An(r,n.expression)||An(r,n.modifier)||An(r,n.modifierExpression)||An(r,n.block)},294:function(n,r,i){return An(r,n.expression)},267:function(n,r,i){return An(r,n.condition)||An(r,n.questionToken)||An(r,n.whenTrue)||An(r,n.colonToken)||An(r,n.whenFalse)},236:lde,242:function(n,r,i){return Ii(r,i,n.modifiers)||An(r,n.type)||An(r,n.declarationList)},238:function(n,r,i){return Ii(r,i,n.declarations)},237:function(n,r,i){return An(r,n.type)||An(r,n.refToken)||An(r,n.name)||An(r,n.initializer)},247:function(n,r,i){return An(r,n.expression)},253:function(n,r,i){return An(r,n.expression)||An(r,n.thenStatement)||An(r,n.elseStatement)},245:function(n,r,i){return An(r,n.statement)||An(r,n.expression)},246:function(n,r,i){return An(r,n.expression)||An(r,n.statement)},243:function(n,r,i){return An(r,n.initializer)||An(r,n.condition)||An(r,n.incrementor)||An(r,n.statement)},244:function(n,r,i){return An(r,n.initializer)||An(r,n.expression)||An(r,n.statement)},251:DV,250:DV,248:function(n,r,i){return An(r,n.expression)},256:function(n,r,i){return An(r,n.expression)||Ii(r,i,n.preBlock)||An(r,n.caseBlock)},240:function(n,r,i){return Ii(r,i,n.clauses)},299:function(n,r,i){return An(r,n.expression)||Ii(r,i,n.statements)},301:function(n,r,i){return Ii(r,i,n.statements)},296:function(n,r,i){return An(r,n.type)||An(r,n.expression)},290:function(n,r,i){return Ii(r,i,n.elements)},284:function(n,r,i){return An(r,n.name)},285:function(n,r,i){return An(r,n.operator)},161:function(n,r,i){return An(r,n.elementType)},291:function(n,r,i){return An(r,n.initializer)||Ii(r,i,n.elements)},292:function(n,r,i){return An(r,n.name)||Ii(r,i,n.elements)},188:PV,199:function(n,r,i){return(typeof n.comment=="string"?void 0:Ii(r,i,n.comment))||Ii(r,i,n.tags)},226:function(n,r,i){return An(r,n.tagName)||An(r,n.name)||(typeof n.comment=="string"?void 0:Ii(r,i,n.comment))},189:function(n,r,i){return An(r,n.name)},190:function(n,r,i){return An(r,n.left)||An(r,n.right)},220:wM,228:wM,227:wM,209:function(n,r,i){return An(r,n.tagName)||(typeof n.comment=="string"?void 0:Ii(r,i,n.comment))},208:function(n,r,i){return An(r,n.tagName)||An(r,n.class)||(typeof n.comment=="string"?void 0:Ii(r,i,n.comment))},207:function(n,r,i){return An(r,n.tagName)||An(r,n.class)||(typeof n.comment=="string"?void 0:Ii(r,i,n.comment))},224:function(n,r,i){return An(r,n.tagName)||An(r,n.constraint)||Ii(r,i,n.typeParameters)||(typeof n.comment=="string"?void 0:Ii(r,i,n.comment))},225:function(n,r,i){return An(r,n.tagName)||(n.typeExpression&&n.typeExpression.kind===188?An(r,n.typeExpression)||An(r,n.fullName)||(typeof n.comment=="string"?void 0:Ii(r,i,n.comment)):An(r,n.fullName)||An(r,n.typeExpression)||(typeof n.comment=="string"?void 0:Ii(r,i,n.comment)))},217:function(n,r,i){return An(r,n.tagName)||An(r,n.fullName)||An(r,n.typeExpression)||(typeof n.comment=="string"?void 0:Ii(r,i,n.comment))},221:tb,223:tb,222:tb,230:tb,229:tb,218:tb,197:PV,202:function(n,r,i){return Bn(n.parameters,r)||An(r,n.type)},203:RM,204:RM,205:RM,201:function(n,r,i){return Bn(n.jsDocPropertyTags,r)},206:gS,211:gS,212:gS,213:gS,214:gS,210:gS,216:gS};function DV(e,n,r){return An(n,e.label)}function lde(e,n,r){return Ii(n,r,e.statements)}function AM(e,n,r){return An(n,e.expression)||Ii(n,r,e.arguments)}function No(e,n,r){if(e===void 0||e.kind<=145)return;let i=cde[e.kind];return i===void 0?void 0:i(e,n,r)}function nS(e,n,r){let i=EV(e),a=[];for(;a.length<i.length;)a.push(e);for(;i.length!==0;){let c=i.pop(),u=a.pop();if(Nr(c)){if(r){let f=r(c,u);if(f){if(f==="skip")continue;return f}}for(let f=c.length-1;f>=0;--f)i.push(c[f]),a.push(u)}else{let f=n(c,u);if(f){if(f==="skip")continue;return f}if(c&&c.kind>=146)for(let m of EV(c))i.push(m),a.push(c)}}}function EV(e){let n=[];return No(e,r,r),n;function r(i){n.unshift(i)}}function ude(e){e.externalModuleIndicator=!0}function rb(e,n,r,i=!1,a,c){In?.push(In.Phase.Parse,"createSourceFile",{path:e},!0),po.mark("beforeParse");let u,{languageVersion:f,setExternalModuleIndicator:m,impliedNodeFormat:y,jsDocParsingMode:g,globalIncludes:S,configDefines:_,fileHandler:b,reportParsedDefines:v}=typeof r=="object"?r:{languageVersion:r},T=W=>{ude(W)};return u=CE.parseSourceFile(e,n,S,_,b,1,void 0,i,void 0,T,g,c,v),po.mark("afterParse"),po.measure("Parse","beforeParse","afterParse"),In?.pop(),u}function Jg(e){return dde(e)!==void 0}function dde(e){let n=EE(e,v9,!1);if(n)return n;if(qs(e,".c")){let r=hs(e).lastIndexOf(".d.");if(r>=0)return e.substring(r)}}function vV(e,n,r,i,a,c,u=!1,f){return console.warn("implement me- updateSourceFile"),CE.parseSourceFile(e.fileName,n,r,i,a,1,void 0,!0,void 0,void 0,void 0,f)}function dI(e){return e.externalModuleIndicator!==void 0}function fI(e,n){return e.charCodeAt(n+1)===42&&e.charCodeAt(n+2)===42&&e.charCodeAt(n+3)!==47}var fde=new WeakSet;function pde(e){return fde.has(e)}function PV(e,n,r){return An(n,e.type)}function wM(e,n,r){return An(n,e.tagName)||(e.isNameFirst?An(n,e.name)||An(n,e.typeExpression):An(n,e.typeExpression)||An(n,e.name))||(typeof e.comment=="string"?void 0:Ii(n,r,e.comment))}function tb(e,n,r){return An(n,e.tagName)||An(n,e.typeExpression)||(typeof e.comment=="string"?void 0:Ii(n,r,e.comment))}function RM(e,n,r){return An(n,e.name)}function gS(e,n,r){return An(n,e.tagName)||(typeof e.comment=="string"?void 0:Ii(n,r,e.comment))}function pI(e,n){return CE.parseJsonText(e,n)}var OM=new Map;function mde(e){if(OM.has(e))return OM.get(e);let n=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return OM.set(e,n),n}var gde=/^\/\/\/\s*<(\S+)\s.*?\/>/im,yde=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im;function hde(e,n,r){let i=n.kind===2&&gde.exec(r);if(i){let c=i[1].toLowerCase(),u=Q1[c];if(!u||!(u.kind&1))return;if(u.args){let f={};for(let m of u.args){let g=mde(m.name).exec(r);if(!g&&!m.optional)return;if(g){let S=g[2]||g[3];if(m.captureSpan){let _=n.pos+g.index+g[1].length+1;f[m.name]={value:S,pos:_,end:_+S.length}}else f[m.name]=S}}e.push({name:c,args:{arguments:f,range:n}})}else e.push({name:c,args:{arguments:{},range:n}});return}let a=n.kind===2&&yde.exec(r);if(a)return NV(e,n,2,a);if(n.kind===3){let c=/@(\S+)(\s+.*)?$/gim,u;for(;u=c.exec(r);)NV(e,n,4,u)}}function NV(e,n,r,i){if(!i)return;let a=i[1].toLowerCase(),c=Q1[a];if(!c||!(c.kind&r))return;let u=i[2],f=Tde(c,u);f!=="fail"&&e.push({name:a,args:{arguments:f,range:n}})}function Tde(e,n){if(!n)return{};if(!e.args)return{};let r=n.trim().split(/\s+/),i={};for(let a=0;a<e.args.length;a++){let c=e.args[a];if(!r[a]&&!c.optional)return"fail";if(c.captureSpan)return E.fail("Capture spans not yet implemented for non-xml pragmas");i[c.name]=r[a]}return i}function Sde(e,n){let r=[];for(let i of Su(n,0)||Re){let a=n.substring(i.pos,i.end);hde(r,i,a)}e.pragmas=new Map;for(let i of r){if(e.pragmas.has(i.name)){let a=e.pragmas.get(i.name);a instanceof Array?a.push(i.args):e.pragmas.set(i.name,[a,i.args]);continue}e.pragmas.set(i.name,i.args)}}function _de(e,n){e.checkLpcDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((r,i)=>{switch(i){case"reference":{let a=e.referencedFiles,c=e.typeReferenceDirectives,u=e.libReferenceDirectives;Bn(H1(r),f=>{let{types:m,lib:y,path:g,["resolution-mode"]:S,preserve:_}=f.arguments,b=_==="true"?!0:void 0;f.arguments["no-default-lib"]==="true"?e.hasNoDefaultLib=!0:m||(y?u.push({pos:y.pos,end:y.end,fileName:y.value,...b?{preserve:b}:{}}):g&&a.push({pos:g.pos,end:g.end,fileName:g.value,...b?{preserve:b}:{}}))});break}case"lpc-nocheck":case"lpc-check":{Bn(H1(r),a=>{(!e.checkLpcDirective||a.range.pos>e.checkLpcDirective.pos)&&(e.checkLpcDirective={enabled:i==="lpc-check",end:a.range.end,pos:a.range.pos})});break}case"this-object":case"this_object":return;default:E.fail("Unhandled pragma kind")}})}var xde=require("vscode-uri");function PE(e,n){return e?.startsWith(n)?e.slice(n.length):e}function mI(e,n){n&&e.push(n)}var bde=[["ldmud","ldmud.efun.c"]],yI=bde.map(e=>e[0]),jM={name:"compileOnSave",type:"boolean",defaultValueDescription:!1},NE={name:"extends",type:"listOrElement",element:{name:"extends",type:"string"},category:N.File_Management,disallowNullOrUndefined:!0};function hI(e,n,r,i,a=Re){n=Qr(n);let c=na(i.useCaseSensitiveFileNames),u=new Map,f=new Map,m=new Map,{validatedFilesSpec:y,validatedIncludeSpecs:g,validatedExcludeSpecs:S}=e;if(y)for(let T of y){let W=Di(T,n);u.set(c(W),W)}let _=[".c",".h",".lpc"];if(g&&g.length>0)for(let T of i.readDirectory(n,mu(_),S,g,void 0)){let W=c(T);!u.has(W)&&!f.has(W)&&f.set(W,T)}let b=oo(u.values()),v=oo(f.values());return b.concat(v,oo(m.values()))}function RV(e,n){let r;try{r=n(e)}catch(i){return Ac(N.Cannot_read_file_0_Colon_1,e,i.message)}return r===void 0?Ac(N.Cannot_read_file_0,e):r}function UM(e,n,r,i,a,c,u,f){In?.push(In.Phase.Parse,"parseJsonSourceFileConfigFileContent",{path:e.fileName});let m=Cde(void 0,e,n,r,i,f,a,c,u);return In?.pop(),m}function KM(e,n){return ei(Di(e,n))}function qM(e){return{enable:!!e&&hs(e)==="jsconfig.json",include:[],exclude:[]}}function Cde(e,n,r,i,a={},c,u,f=[],m=[],y){E.assert(e===void 0&&n!==void 0||e!==void 0&&n===void 0);let g=[],S=ZV(e,n,r,i,u,f,g,y),{raw:_}=S,b=Dde($K(a,S.options||{}),Qde,i),v=c;b.configFilePath=u&&Cc(u);let T=Qr(u?KM(u,i):i),W=ye();n&&(n.configFileSpecs=W),rH(b,n);let F=_?.include&&Nr(_.include)?ha(_.include):void 0,M=Qr(fi(T,F??"./"));b.rootDir=M,b.rootDirs=[M],b.driverType=Wq(_?.driver?.type),_?.libInclude&&Nr(_.libInclude)&&(b.libIncludeDirs=Yn(_.libInclude,Ae=>Qr(fi(M,PE(Ae,"/"))))),_?.libFiles?.global_include&&(b.globalIncludeFiles=[_?.libFiles?.global_include],b.resolvedGlobalIncludeFiles=b.globalIncludeFiles.map(Ae=>Bn(b.libIncludeDirs,Qe=>{let me=Qr(fi(Qe,Ae));if(r.fileExists(me))return me}))),b.diagnostics=_?.diagnostics==="on"||_?.diagnostics===!0;let J=PE(b.sefunFile??_?.libFiles?.simul_efun??"/obj/sefun.c","/");b.sefunFile=Qr(fi(M,J));let A=PE(b.masterFile??_?.libFiles?.master??"/obj/master.c","/");b.masterFile=Qr(fi(M,A));let V=PE(b.playerFile??_?.libFiles?.player??"/obj/player.c","/");b.playerFile=Qr(fi(M,V)),b.configDefines??(b.configDefines={});let ue=_?.defines??Re;return Bn(ue,Ae=>{let G=ha(Object.keys(Ae||{}));if(G){let Qe=Ae[G];b.configDefines[G]=Ae[G]}}),{options:b,watchOptions:v,fileNames:he(T),projectReferences:ce(T),typeAcquisition:qM(),raw:S,errors:g,wildcardDirectories:OV(W,T,r.useCaseSensitiveFileNames),compileOnSave:!1};function ye(){let Ae=be("references",Hn=>typeof Hn=="object","object"),G=Ee(Fe("files"));if(G){let Hn=Ae==="no-prop"||Nr(Ae)&&Ae.length===0,Ye=Ia(_,"extends");if(G.length===0&&Hn&&!Ye)if(n){let se=u||"lpc-config.json",jn=N.The_files_list_in_config_file_0_is_empty,wn=Gx(n,"files",ft=>ft.initializer),Xn=If(n,wn,jn,se);g.push(Xn)}else de(N.The_files_list_in_config_file_0_is_empty,u||"tsconfig.json")}let Qe=Ee(Fe("include")),me=Fe("exclude"),Se=!1,_n=Ee(me);if(me==="no-prop"){let Hn=b.outDir,Ye=b.declarationDir;(Hn||Ye)&&(_n=Ar([Hn,Ye],se=>!!se))}G===void 0&&Qe===void 0&&(Qe=[MV],Se=!0);let tt,Pe,gn,$e;Qe&&(tt=gI(Qe,g,!0,n,"include"),gn=Nh(tt,T)||tt),_n&&(Pe=gI(_n,g,!1,n,"exclude"),$e=Nh(Pe,T)||Pe);let Ln=Ar(G,gi),Vt=Nh(Ln,T)||Ln;return{filesSpecs:G,includeSpecs:Qe,excludeSpecs:_n,validatedFilesSpec:Vt,validatedIncludeSpecs:gn,validatedExcludeSpecs:$e,validatedFilesSpecBeforeSubstitution:Ln,validatedIncludeSpecsBeforeSubstitution:tt,validatedExcludeSpecsBeforeSubstitution:Pe,pathPatterns:void 0,isDefaultIncludeSpec:Se}}function he(Ae){let G=hI(W,Ae,b,r,m);return GM(G,aH(_),f)&&g.push($M(W,u)),G}function ce(Ae){let G,Qe=be("references",me=>typeof me=="object","object");return G}function Ee(Ae){return Nr(Ae)?Ae:void 0}function Fe(Ae){return be(Ae,gi,"string")}function be(Ae,G,Qe){if(Ia(_,Ae)&&!ib(_[Ae]))if(Nr(_[Ae])){let me=_[Ae];return!n&&!yi(me,G)&&g.push(Ac(N.Compiler_option_0_requires_a_value_of_type_1,Ae,Qe)),me}else return de(N.Compiler_option_0_requires_a_value_of_type_1,Ae,"Array"),"not-array";return"no-prop"}function de(Ae,...G){n||g.push(Ac(Ae,...G))}}function Dde(e,n,r){if(!e)return e;let i;for(let c of n)if(e[c.name]!==void 0){let u=e[c.name];switch(c.type){case"string":E.assert(c.isFilePath),VM(u)&&a(c,jV(u,r));break;case"list":E.assert(c.element.isFilePath);let f=Nh(u,r);f&&a(c,f);break;case"object":E.assert(c.name==="paths");let m=Ede(u,r);m&&a(c,m);break;default:E.fail("option type not supported")}}return i||e;function a(c,u){(i??(i=CD({},e)))[c.name]=u}}function OV({validatedIncludeSpecs:e,validatedExcludeSpecs:n},r,i){let a=Cx(n,r,"exclude"),c=a&&new RegExp(a,i?"":"i"),u={},f=new Map;if(e!==void 0){let m=[];for(let y of e){let g=Qr(fi(r,y));if(c&&c.test(g))continue;let S=Pde(g,i);if(S){let{key:_,path:b,flags:v}=S,T=f.get(_),W=T!==void 0?u[T]:void 0;(W===void 0||W<v)&&(u[T!==void 0?T:b]=v,T===void 0&&f.set(_,b),v===1&&m.push(_))}}for(let y in u)if(Ia(u,y))for(let g of m){let S=JM(y,i);S!==g&&fp(g,S,r,!i)&&delete u[y]}}return u}var MV="**/*";function gI(e,n,r,i,a){return e.filter(c=>{if(!gi(c))return!1;let u=Nde(c,r);return u!==void 0&&console.warn("implement diagnostic - ",u),u===void 0})}function Ede(e,n){let r;return kv(e).forEach(a=>{if(!Nr(e[a]))return;let c=Nh(e[a],n);c&&((r??(r=CD({},e)))[a]=c)}),r}function Nh(e,n){if(!e)return e;let r;return e.forEach((i,a)=>{VM(i)&&((r??(r=e.slice()))[a]=jV(i,n))}),r}function ib(e){return e==null}function JM(e,n){return n?e:ug(e)}function Pde(e,n){let r=kde.exec(e);if(r){let i=e.indexOf("?"),a=e.indexOf("*"),c=e.lastIndexOf(Mo);return{key:JM(r[0],n),path:r[0],flags:i!==-1&&i<c||a!==-1&&a<c?1:0}}if(GO(e.substring(e.lastIndexOf(Mo)+1))){let i=Cm(e);return{key:JM(i,n),path:i,flags:1}}}function Nde(e,n){if(E.assert(typeof e=="string"),n&&vde.test(e))return[N.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e];if(JV(e))return[N.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0,e]}var BV="${configDir}";function VM(e){return gi(e)&&Eo(e,BV,!0)}function jV(e,n){return Di(e.replace(BV,"./"),n)}var kde=/^[^*?]*(?=\/[^/]*[*?])/,vde=/(^|\/)\*\*\/?$/;function JV(e){let n=Eo(e,"**/")?0:e.indexOf("/**/");return n===-1?!1:(Ps(e,"/..")?e.length:e.lastIndexOf("/../"))>n}function WV(e,n,r,i,a){let c=Cx(n,fi(Qr(i),a),"exclude"),u=c&&vg(c,r);return u?u.test(e)?!0:!bm(e)&&u.test(Lf(e)):!1}function UV(e,n,r,i,a){let{validatedFilesSpec:c,validatedIncludeSpecs:u,validatedExcludeSpecs:f}=n;if(!gr(u)||!gr(f))return!1;r=Qr(r);let m=na(i);if(c){for(let y of c)if(m(Di(y,r))===e)return!1}return WV(e,f,i,a,r)}function KV(e,n,r,i){return WV(e,Ar(n,a=>!JV(a)),r,i)}function Fde(e,n){return WM(e,e.statements[0]?.expression,n,!0,void 0)}function WM(e,n,r,i,a){if(!n)return i?{}:void 0;return f(n,a?.rootOptions);function c(y,g){let S=i?{}:void 0;for(let _ of y.properties){if(_.kind!==174){r.push(gl(e,_,N.Property_assignment_expected));continue}m(_.name)||r.push(gl(e,_.name,N.String_literal_with_double_quotes_expected));let b=qF(_.name)?void 0:lM(_.name),v=b&&b,T=v?g?.elementOptions?.get(v):void 0,W=f(_.initializer,T);typeof v<"u"&&(i&&(S[v]=W),a?.onPropertySet(v,W,_,g,T))}return S}function u(y,g){if(!i){y.forEach(S=>f(S,g));return}return Ar(y.map(S=>f(S,g)),S=>S!==void 0)}function f(y,g){switch(y.kind){case 136:return!0;case 135:return!1;case 137:return null;case 16:return m(y)||r.push(gl(e,y,N.String_literal_with_double_quotes_expected)),y.text;case 10:return Number(y.text);case 298:if(y.operator!==42||y.operand.kind!==10)break;return-Number(y.operand.text);case 293:return c(y,g);case 290:return u(y.elements,g&&g.element)}g?r.push(gl(e,y,N.Compiler_option_0_requires_a_value_of_type_1,g.name,HM(g))):r.push(gl(e,y,N.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal))}function m(y){return ji(y)&&XO(y,e)}}function HM(e){return e.type==="listOrElement"?`${HM(e.element)} or Array`:e.type==="list"?"Array":gi(e.type)?e.type:"string"}var FV;function Ide(){return FV||(FV=qV(wde))}var Lde={diagnostic:N.Compiler_option_0_may_only_be_used_with_build,getOptionsNameMap:Ide};function qV(e){let n=new Map,r=new Map;return Bn(e,i=>{n.set(i.name.toLowerCase(),i),i.shortName&&r.set(i.shortName,i.name)}),{optionsNameMap:n,shortOptionNames:r}}function VV(e){return e&&hs(e)==="jsconfig.json"?{maxNodeModuleJsDepth:2}:{}}function HV(e){return GK(e,zV)}function zV(e){return e.name}var GV=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:N.Command_line_Options,description:N.Print_this_message,defaultValueDescription:!1},{name:"help",shortName:"?",type:"boolean",isCommandLineOnly:!0,category:N.Command_line_Options,defaultValueDescription:!1},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,isCommandLineOnly:!0,category:N.Command_line_Options,description:N.Watch_input_files,defaultValueDescription:!1},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:N.Output_Formatting,description:N.Disable_wiping_the_console_in_watch_mode,defaultValueDescription:!1},{name:"listFiles",type:"boolean",category:N.Compiler_Diagnostics,description:N.Print_all_of_the_files_read_during_the_compilation,defaultValueDescription:!1},{name:"explainFiles",type:"boolean",category:N.Compiler_Diagnostics,description:N.Print_files_read_during_the_compilation_including_why_it_was_included,defaultValueDescription:!1},{name:"listEmittedFiles",type:"boolean",category:N.Compiler_Diagnostics,description:N.Print_the_names_of_emitted_files_after_a_compilation,defaultValueDescription:!1},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:N.Output_Formatting,description:N.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,defaultValueDescription:!0},{name:"traceResolution",type:"boolean",category:N.Compiler_Diagnostics,description:N.Log_paths_used_during_the_moduleResolution_process,defaultValueDescription:!1},{name:"diagnostics",type:"boolean",category:N.Compiler_Diagnostics,description:N.Output_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"extendedDiagnostics",type:"boolean",category:N.Compiler_Diagnostics,description:N.Output_more_detailed_compiler_performance_information_after_building,defaultValueDescription:!1},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:N.FILE_OR_DIRECTORY,category:N.Compiler_Diagnostics,description:N.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,defaultValueDescription:"profile.cpuprofile"},{name:"generateTrace",type:"string",isFilePath:!0,isCommandLineOnly:!0,paramType:N.DIRECTORY,category:N.Compiler_Diagnostics,description:N.Generates_an_event_trace_and_a_list_of_types},{name:"incremental",shortName:"i",type:"boolean",category:N.Projects,description:N.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects,transpileOptionValue:void 0,defaultValueDescription:N.false_unless_composite_is_set},{name:"sourceMap",type:"boolean",affectsBuildInfo:!0,showInSimplifiedHelpView:!0,category:N.Emit,defaultValueDescription:!1,description:N.Create_source_map_files_for_emitted_JavaScript_files},{name:"assumeChangesOnlyAffectDirectDependencies",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,affectsBuildInfo:!0,category:N.Watch_and_Build_Modes,description:N.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,defaultValueDescription:!1},{name:"locale",type:"string",category:N.Command_line_Options,isCommandLineOnly:!0,description:N.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,defaultValueDescription:N.Platform_specific}],$V=[{name:"rootDir",type:"string",affectsEmit:!0,affectsBuildInfo:!0,affectsDeclarationPath:!0,isFilePath:!0,paramType:N.LOCATION,category:N.Command_line_Options,description:N.Specify_the_root_folder_within_your_source_files,defaultValueDescription:N.Computed_from_the_list_of_input_files},{name:"strictObjectTypes",type:"boolean",affectsSemanticDiagnostics:!0,affectsBuildInfo:!0,strictFlag:!0,category:N.Type_Checking,description:N.When_comparing_types_check_that_the_objectStructure_is_compatible_with_the_target_type,defaultValueDescription:N.false_unless_strict_is_set},{name:"noLib",type:"boolean",category:N.Language_and_Environment,affectsProgramStructure:!0,description:N.Disable_including_any_library_files_including_the_default_efun_h,transpileOptionValue:!0,defaultValueDescription:!1}],Ug=[...GV,...$V],zM=[],Ade=[{name:"verbose",shortName:"v",category:N.Command_line_Options,description:N.Enable_verbose_logging,type:"boolean",defaultValueDescription:!1}],wde=[...GV,...Ade],rI=Ug.filter(e=>!!e.affectsModuleResolution),IV;function QV(){return IV||(IV=HV(Ug))}var YV=Ug.filter(e=>!!e.affectsSourceFile||!!e.affectsBindDiagnostics);function Rde(e,n,r,i,a,c){if(n){for(let u in n){let f=e.get(u);f?(i||(i={}))[f.name]=Wg(f,n[u],r,c):c.push(iH(u,a))}return i}}function Ode(e,n,r,i,a){Ia(e,"excludes")&&a.push(Ac(N.Unknown_option_excludes_Did_you_mean_exclude));let c=Ude(e.compilerOptions,r,a,i),u=Bde(e.typeAcquisition,r,a,i),f=jde(e.watchOptions,r,a);e.compileOnSave=Mde(e,r,a);let m=e.extends||e.extends===""?XV(e.extends,n,r,i,a):void 0;return{raw:e,options:c,watchOptions:f,typeAcquisition:u,extendedConfigPath:m}}function LV(e,n,r,i,a,c){if(e=Cc(e),vs(e)||Eo(e,"./")||Eo(e,"../")){let u=Di(e,r);if(!n.fileExists(u)&&!Ps(u,".json")&&(u=`${u}.json`,!n.fileExists(u))){i.push(If(c,a,N.File_0_not_found,e));return}return u}e===""?i.push(If(c,a,N.Compiler_option_0_cannot_be_given_an_empty_string,"extends")):i.push(If(c,a,N.File_0_not_found,e))}function XV(e,n,r,i,a,c,u,f){let m,y=i?KM(i,r):r;if(gi(e))m=LV(e,n,y,a,u,f);else if(Nr(e)){m=[];for(let g=0;g<e.length;g++){let S=e[g];gi(S)?m=$r(m,LV(S,n,y,a,u?.elements[g],f)):Wg(NE.element,e,r,a,c,u?.elements[g],f)}}else Wg(NE,e,r,a,c,u,f);return m}function Mde(e,n,r){if(!Ia(e,jM.name))return!1;let i=Wg(jM,e.compileOnSave,n,r);return typeof i=="boolean"&&i}function Bde(e,n,r,i){console.debug("todo - convertTypeAcquisitionFromJsonWorker")}function jde(e,n,r){console.debug("todo - convertWatchOptionsFromJsonWorker")}function ZV(e,n,r,i,a,c,u,f){i=Cc(i);let m=Di(a||"",i);if(c.includes(m))return u.push(Ac(N.Circularity_detected_while_resolving_configuration_Colon_0,[...c,m].join(" -> "))),{raw:e||Fde(n,u)};let y=e?Ode(e,r,i,a,u):zde(n,r,i,a,u);if(y.options?.paths&&(y.options.pathsBasePath=i),y.extendedConfigPath){c=c.concat([m]);let S={options:{}};gi(y.extendedConfigPath)?g(S,y.extendedConfigPath):y.extendedConfigPath.forEach(_=>g(S,_)),S.include&&(y.raw.include=S.include),S.exclude&&(y.raw.exclude=S.exclude),S.files&&(y.raw.files=S.files),y.raw.compileOnSave===void 0&&S.compileOnSave&&(y.raw.compileOnSave=S.compileOnSave),n&&S.extendedSourceFiles&&(n.extendedSourceFiles=oo(S.extendedSourceFiles.keys())),y.options=CD(S.options,y.options),y.watchOptions=y.watchOptions&&S.watchOptions?CD(S.watchOptions,y.watchOptions):y.watchOptions||S.watchOptions}return y;function g(S,_){console.debug("todo - applyExtendedConfig")}}var Jde;function Wde(){return Jde||(Jde=qV(Ug))}var eH={alternateMode:Lde,getOptionsNameMap:Wde,optionDeclarations:Ug,unknownOptionDiagnostic:N.Unknown_compiler_option_0,unknownDidYouMeanDiagnostic:N.Unknown_compiler_option_0_Did_you_mean_1,optionTypeMismatchDiagnostic:N.Compiler_option_0_expects_an_argument};function Ude(e,n,r,i){let a=VV(i);return Rde(QV(),e,n,a,eH,r),i&&(a.configFilePath=Cc(i)),a}function If(e,n,r,...i){return e&&n?gl(e,n,r,...i):Ac(r,...i)}function nH(e,n){if(e){if(ib(n))return!e.disallowNullOrUndefined;if(e.type==="list")return Nr(n);if(e.type==="listOrElement")return Nr(n)||nH(e.element,n);let r=gi(e.type)?e.type:"string";return typeof n===r}return!1}function AV(e,n,r,i,a,c,u){return Ar(Yn(n,(f,m)=>Wg(e.element,f,r,i,a,c?.elements[m],u)),f=>e.listPreserveFalsyValues?!0:!!f)}function Kde(e,n,r,i,a){if(ib(n))return;let c=n.toLowerCase(),u=e.type.get(c);if(u!==void 0)return tH(e,u,r,i,a);r.push(qde(e,(f,...m)=>If(a,i,f,...m)))}function qde(e,n){let r=oo(e.type.keys()),i=(e.deprecatedKeys?r.filter(a=>!e.deprecatedKeys.has(a)):r).map(a=>`'${a}'`).join(", ");return n(N.Argument_for_0_option_must_be_Colon_1,`--${e.name}`,i)}function Wg(e,n,r,i,a,c,u){if(e.isCommandLineOnly){i.push(If(u,a?.name,N.Option_0_can_only_be_specified_on_command_line,e.name));return}if(nH(e,n)){let f=e.type;if(f==="list"&&Nr(n))return AV(e,n,r,i,a,c,u);if(f==="listOrElement")return Nr(n)?AV(e,n,r,i,a,c,u):Wg(e.element,n,r,i,a,c,u);if(!gi(e.type))return Kde(e,n,i,c,u);let m=tH(e,n,i,c,u);return ib(m)?m:Vde(e,r,m)}else i.push(If(u,c,N.Compiler_option_0_requires_a_value_of_type_1,e.name,HM(e)))}function Vde(e,n,r){return e.isFilePath&&(r=Cc(r),r=VM(r)?r:Di(r,n),r===""&&(r=".")),r}function tH(e,n,r,i,a){if(ib(n))return;let c=e.extraValidation?.(n);if(!c)return n;r.push(If(a,i,...c))}function rH(e,n){n&&Object.defineProperty(e,"configFile",{enumerable:!1,writable:!1,value:n})}function iH(e,n,r,i,a){if(n.alternateMode?.getOptionsNameMap().optionsNameMap.has(e.toLowerCase()))return If(a,i,n.alternateMode.diagnostic,e);let c=fg(e,n.optionDeclarations,zV);return c?If(a,i,n.unknownDidYouMeanDiagnostic,r||e,c.name):If(a,i,n.unknownOptionDiagnostic,r||e)}var oH={name:"compilerOptions",type:"object",elementOptions:QV(),extraKeyDiagnostics:eH},BM;function Hde(){return BM===void 0&&(BM={name:void 0,type:"object",elementOptions:HV([oH,NE,{name:"references",type:"list",element:{name:"references",type:"object"},category:N.Projects},{name:"files",type:"list",element:{name:"files",type:"string"},category:N.File_Management},{name:"include",type:"list",element:{name:"include",type:"string"},category:N.File_Management,defaultValueDescription:N.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk},{name:"exclude",type:"list",element:{name:"exclude",type:"string"},category:N.File_Management,defaultValueDescription:N.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified},jM])}),BM}function zde(e,n,r,i,a){let c=VV(i),u,f,m,y,g=Hde(),S=Gde(e,a,{rootOptions:g,onPropertySet:_});return u||(u=qM(i)),y&&S&&S.compilerOptions===void 0&&a.push(gl(e,y[0],N._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file,lM(y[0]))),{raw:S,options:c,watchOptions:f,typeAcquisition:u,extendedConfigPath:m};function _(b,v,T,W,F){if(F&&F!==NE&&(v=Wg(F,v,r,a,T,T.initializer,e)),W?.name)if(F){let M;W===oH?M=c:E.fail("Unknown option"),M[F.name]=v}else b&&W?.extraKeyDiagnostics&&(W.elementOptions?a.push(iH(b,W.extraKeyDiagnostics,void 0,T.name,e)):a.push(gl(e,T.name,W.extraKeyDiagnostics.unknownOptionDiagnostic,b)));else W===g&&(F===NE?m=XV(v,n,r,i,a,T,T.initializer,e):F||(b==="excludes"&&a.push(gl(e,T.name,N.Unknown_option_excludes_Did_you_mean_exclude)),Sr($V,M=>M.name===b)&&(y=$r(y,T.name))))}}function Gde(e,n,r){let i=e.statements[0]?.expression;if(i&&i.kind!==293){if(n.push(gl(e,i,N.The_root_value_of_a_0_file_must_be_an_object,hs(e.fileName)==="jsconfig.json"?"jsconfig.json":"tsconfig.json")),cS(i)){let a=Sr(i.elements,ms);if(a)return WM(e,a,n,!0,r)}return{}}return WM(e,i,n,!0,r)}function GM(e,n,r){return e.length===0&&n&&(!r||r.length===0)}function aH(e){return!Ia(e,"files")&&!Ia(e,"references")}function $M({includeSpecs:e,excludeSpecs:n},r){return Ac(N.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2,r||"lpc-config.json",JSON.stringify(e||[]),JSON.stringify(n||[]))}function sH(e,n,r,i,a,c,u,f,m){In?.push(In.Phase.Parse,"parseJsonSourceFileConfigFileContent",{path:e.fileName});let y=$de(void 0,e,n,r,i,m,a,c,u,f);return In?.pop(),y}function $de(e,n,r,i,a={},c,u,f=[],m=[],y){E.assert(e===void 0&&n!==void 0||e!==void 0&&n===void 0);let g=[],S=ZV(e,n,r,i,u,f,g,y),{raw:_}=S,b=a,v=c;b.configFilePath=u&&Cc(u);let T=Qr(u?KM(u,i):i),W=F();return n&&(n.configFileSpecs=W),rH(b,n),{options:b,watchOptions:v,fileNames:M(T),projectReferences:J(T),typeAcquisition:S.typeAcquisition||qM(),raw:_,errors:g,wildcardDirectories:OV(W,T,r.useCaseSensitiveFileNames),compileOnSave:!!_.compileOnSave};function F(){let he=ue("references",tt=>typeof tt=="object","object"),ce=A(V("files"));if(ce){let tt=he==="no-prop"||Nr(he)&&he.length===0,Pe=Ia(_,"extends");if(ce.length===0&&tt&&!Pe)if(n){let gn=u||"tsconfig.json",$e=N.The_files_list_in_config_file_0_is_empty,Ln=Gx(n,"files",Hn=>Hn.initializer),Vt=If(n,Ln,$e,gn);g.push(Vt)}else ye(N.The_files_list_in_config_file_0_is_empty,u||"tsconfig.json")}let Ee=A(V("include")),Fe=V("exclude"),be=!1,de=A(Fe);if(Fe==="no-prop"){let tt=b.outDir,Pe=b.declarationDir;(tt||Pe)&&(de=Ar([tt,Pe],gn=>!!gn))}ce===void 0&&Ee===void 0&&(Ee=[MV],be=!0);let Ae,G,Qe,me;Ee&&(Ae=gI(Ee,g,!0,n,"include"),Qe=Nh(Ae,T)||Ae),de&&(G=gI(de,g,!1,n,"exclude"),me=Nh(G,T)||G);let Se=Ar(ce,gi),_n=Nh(Se,T)||Se;return{filesSpecs:ce,includeSpecs:Ee,excludeSpecs:de,validatedFilesSpec:_n,validatedIncludeSpecs:Qe,validatedExcludeSpecs:me,validatedFilesSpecBeforeSubstitution:Se,validatedIncludeSpecsBeforeSubstitution:Ae,validatedExcludeSpecsBeforeSubstitution:G,pathPatterns:void 0,isDefaultIncludeSpec:be}}function M(he){let ce=hI(W,he,b,r,m);return GM(ce,aH(_),f)&&g.push($M(W,u)),ce}function J(he){let ce,Ee=ue("references",Fe=>typeof Fe=="object","object");if(Nr(Ee))for(let Fe of Ee)typeof Fe.path!="string"?ye(N.Compiler_option_0_requires_a_value_of_type_1,"reference.path","string"):(ce||(ce=[])).push({path:Di(Fe.path,he),originalPath:Fe.path,prepend:Fe.prepend,circular:Fe.circular});return ce}function A(he){return Nr(he)?he:void 0}function V(he){return ue(he,gi,"string")}function ue(he,ce,Ee){if(Ia(_,he)&&!ib(_[he]))if(Nr(_[he])){let Fe=_[he];return!n&&!yi(Fe,ce)&&g.push(Ac(N.Compiler_option_0_requires_a_value_of_type_1,he,Ee)),Fe}else return ye(N.Compiler_option_0_requires_a_value_of_type_1,he,"Array"),"not-array";return"no-prop"}function ye(he,...ce){n||g.push(Ac(he,...ce))}}var Qde=Ug.filter(e=>e.allowConfigDirTemplateSubstitution||!e.isCommandLineOnly&&e.isFilePath),aV=Ug.filter(e=>!!e.affectsProgramStructure),cH=[{name:"enable",type:"boolean",defaultValueDescription:!1},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},{name:"disableFilenameBasedTypeAcquisition",type:"boolean",defaultValueDescription:!1}];function Yde(e){return e.code===N.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code}function lH(e,n,r,i,a){let c=i.length;return GM(e,a)?i.push($M(r,n)):Iv(i,u=>!Yde(u)),c!==i.length}function Dm(e,n){return!!e.traceResolution&&n.trace!==void 0}function Pa(e,n,...r){e.trace(wO(n,...r))}function kE(e,n){return n===void 0?e:`${n}|${e}`}function ob(){let e=new Map,n=new Map,r={get(a,c){return e.get(i(a,c))},set(a,c,u){return e.set(i(a,c),u),r},delete(a,c){return e.delete(i(a,c)),r},has(a,c){return e.has(i(a,c))},forEach(a){return e.forEach((c,u)=>{let[f,m]=n.get(u);return a(c,f,m)})},size(){return e.size}};return r;function i(a,c){let u=kE(a,c);return n.set(u,[a,c]),u}}function Xde(e){return e.resolvedModule&&(e.resolvedModule.originalPath||e.resolvedModule.resolvedFileName)}function xI(e,n,r,i,a){let c=Zde(e,n,r,i,Xde,a);return c.getOrCreateCacheForModuleName=(u,f,m)=>c.getOrCreateCacheForNonRelativeName(u,f,m),c}function Zde(e,n,r,i,a,c){c??(c=new Map);let u=tfe(e,n,r,c),f=nfe(e,n,r,a,c);return{...i,...u,...f,clear:m,update:g,getPackageJsonInfoCache:()=>i,clearAllExceptPackageJsonInfoCache:y,optionsToRedirectsKey:c};function m(){y()}function y(){u.clear(),f.clear()}function g(S){u.update(S),f.update(S)}}function fH(e,n){let r=new Map,i=new Map,a=new Map;return e&&r.set(e,a),{getMapOfCacheRedirects:c,getOrCreateMapOfCacheRedirects:u,update:f,clear:y,getOwnMap:()=>a};function c(S){return S?m(S.commandLine.options,!1):a}function u(S){return S?m(S.commandLine.options,!0):a}function f(S){e!==S&&(e?a=m(S,!0):r.set(S,a),e=S)}function m(S,_){let b=r.get(S);if(b)return b;let v=g(S);if(b=i.get(v),!b){if(e){let T=g(e);T===v?b=a:i.has(T)||i.set(T,a)}_&&(b??(b=new Map)),b&&i.set(v,b)}return b&&r.set(S,b),b}function y(){let S=e&&n.get(e);a.clear(),r.clear(),n.clear(),i.clear(),e&&(S&&n.set(e,S),r.set(e,a))}function g(S){let _=n.get(S);return _||n.set(S,_=efe(S,rI)),_}}function YM(e){if(e===null||typeof e!="object")return""+e;if(Nr(e))return`[${e.map(r=>YM(r))?.join(",")}]`;let n="{";for(let r in e)Ia(e,r)&&(n+=`${r}: ${YM(e[r])}`);return n+"}"}function efe(e,n){return n.map(r=>YM(uF(e,r))).join("|")+`|${e.configFilePath}`}function nfe(e,n,r,i,a){let c=fH(r,a);return{getFromNonRelativeNameCache:m,getOrCreateCacheForNonRelativeName:y,clear:u,update:f};function u(){c.clear()}function f(S){c.update(S)}function m(S,_,b,v){return c.getMapOfCacheRedirects(v)?.get(kE(S,_))?.get(b)}function y(S,_,b){return pH(c,b,kE(S,_),g)}function g(){let S=new Map;return{get:_,set:b};function _(T){return S.get(Aa(T,e,n))}function b(T,W){let F=Aa(T,e,n);if(S.has(F))return;S.set(F,W);let M=i(W),J=M&&v(F,M),A=F;for(;A!==J;){let V=ei(A);if(V===A||S.has(V))break;S.set(V,W),A=V}}function v(T,W){let F=Aa(ei(W),e,n),M=0,J=Math.min(T.length,F.length);for(;M<J&&T.charCodeAt(M)===F.charCodeAt(M);)M++;if(M===T.length&&(F.length===M||F[M]===Mo))return T;let A=Eu(T);if(M<A)return;let V=T.lastIndexOf(Mo,M-1);if(V!==-1)return T.substr(0,Math.max(V,A))}}}function tfe(e,n,r,i){let a=fH(r,i);return{getFromDirectoryCache:m,getOrCreateCacheForDirectory:f,clear:c,update:u,directoryToModuleNameMap:a};function c(){a.clear()}function u(y){a.update(y)}function f(y,g){let S=Aa(y,e,n);return pH(a,g,S,()=>ob())}function m(y,g,S,_){let b=Aa(S,e,n);return a.getMapOfCacheRedirects(_)?.get(b)?.get(y,g)}}function bI(e,n,r,i,a,c,u){let f=Dm(r,i);c&&(r=c.commandLine.options),f&&(Pa(i,N.Resolving_module_0_from_1,e,n),c&&Pa(i,N.Using_compiler_options_of_project_reference_redirect_0,c.sourceFile.fileName));let m=ei(n),y=a?.getFromDirectoryCache(e,u,m,c);if(y)f&&Pa(i,N.Resolution_for_module_0_was_found_in_cache_from_location_1,e,m);else{let g=1;switch(g===void 0||f&&Pa(i,N.Explicitly_specified_module_resolution_kind_Colon_0,Jv[g]),yg?.logStartResolveModule(e),g){case 1:y=ofe(e,n,r,i,a,c);break;default:return E.fail(`Unexpected moduleResolution: ${g}`)}y&&y.resolvedModule&&yg?.logInfoEvent(`Module "${e}" resolved to "${y.resolvedModule.resolvedFileName}"`),yg?.logStopResolveModule(y&&y.resolvedModule?""+y.resolvedModule.resolvedFileName:"null"),a&&!a.isReadonly&&(a.getOrCreateCacheForDirectory(m,c).set(e,u,y),Ul(e)||a.getOrCreateCacheForNonRelativeName(e,u,c).set(m,y))}return f&&(y.resolvedModule?y.resolvedModule.packageId?Pa(i,N.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2,e,y.resolvedModule.resolvedFileName,Ig(y.resolvedModule.packageId)):Pa(i,N.Module_name_0_was_successfully_resolved_to_1,e,y.resolvedModule.resolvedFileName):Pa(i,N.Module_name_0_was_not_resolved,e)),y}var rfe="/node_modules/";function ife(e){return e.includes(rfe)}function ofe(e,n,r,i,a,c){let u=Dm(r,i),f=[],m=[],y=ei(n),g=[],S={compilerOptions:r,host:i,traceEnabled:u,failedLookupLocations:f,affectingLocations:m,packageJsonInfoCache:a,features:0,conditions:[],requestContainingDirectory:y,reportDiagnostic:v=>void g.push(v),isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},_=b(5);return afe(e,_&&_.value,_?.value&&ife(_.value.path),f,m,g,S,a);function b(v){let T=ufe(v,e,y,TI,S);if(T)return{value:T};if(vs(e)){let W=S.compilerOptions.rootDir,F=Qr(fi(W,"."+e));return e.indexOf(".")===-1&&(F+=".c"),_I(TI(v,F,!1,S))}if(Ul(e)){let W=Qr(fi(y,e));return _I(TI(v,W,!1,S))}else{let W=CI(y,F=>{let M=gH(a,e,void 0,F,c,S);if(M)return M;let J=Qr(fi(F,e));return _I(TI(v,J,!1,S))});if(W)return W;if(v&5){let F=Tfe(e,y,S);return v&4&&(F??(F=void 0)),F}}}}function pH(e,n,r,i){let a=e.getOrCreateMapOfCacheRedirects(n),c=a.get(r);return c||(c=i(),a.set(r,c)),c}function uH(e){let n=[];return e&1&&n.push("LPC"),e&2&&n.push("JavaScript"),e&4&&n.push("Declaration"),e&8&&n.push("JSON"),n.join(", ")}function afe(e,n,r,i,a,c,u,f,m){if(!u.resultFromCache&&!u.compilerOptions.preserveSymlinks&&n&&r&&!n.originalPath&&!Ul(e)){let{resolvedFileName:y,originalPath:g}=lfe(n.path,u.host,u.traceEnabled);g&&(n={...n,path:y,originalPath:g})}return mH(n,r,i,a,c,u.resultFromCache,f,m)}function mH(e,n,r,i,a,c,u,f){return c?u?.isReadonly?{...c,failedLookupLocations:QM(c.failedLookupLocations,r),affectingLocations:QM(c.affectingLocations,i),resolutionDiagnostics:QM(c.resolutionDiagnostics,a)}:(c.failedLookupLocations=yS(c.failedLookupLocations,r),c.affectingLocations=yS(c.affectingLocations,i),c.resolutionDiagnostics=yS(c.resolutionDiagnostics,a),c):{resolvedModule:e&&{resolvedFileName:e.path,originalPath:e.originalPath===!0?void 0:e.originalPath,extension:e.extension,isExternalLibraryImport:n,packageId:e.packageId,resolvedUsingTsExtension:!!e.resolvedUsingTsExtension},failedLookupLocations:SI(r),affectingLocations:SI(i),resolutionDiagnostics:SI(a),alternateResult:f}}function SI(e){return e.length?e:void 0}function yS(e,n){return n?.length?e?.length?(e.push(...n),e):n:e}function QM(e,n){return e?.length?n.length?[...e,...n]:e.slice():SI(n)}function sfe(e,n,r){if(!n.realpath)return e;let i=Qr(n.realpath(e));return r&&Pa(n,N.Resolving_real_path_for_0_result_1,e,i),i}function cfe(e,n,r){let i=typeof r.useCaseSensitiveFileNames=="function"?r.useCaseSensitiveFileNames():r.useCaseSensitiveFileNames;return eb(e,n,!i)===0}function lfe(e,n,r){let i=sfe(e,n,r),a=cfe(e,i,n);return{resolvedFileName:a?e:i,originalPath:a?void 0:e}}function _I(e){return e!==void 0?{value:e}:void 0}function ufe(e,n,r,i,a){return dfe(e,n,r,i,a)}function dfe(e,n,r,i,a){if(!a.compilerOptions.rootDir)return;a.traceEnabled&&Pa(a.host,N.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0,n);let c=Qr(fi(r,n)),u,f;for(let m of a.compilerOptions.rootDirs){let y=Qr(m);Ps(y,Mo)||(y+=Mo);let g=Eo(c,y)&&(f===void 0||f.length<y.length);a.traceEnabled&&Pa(a.host,N.Checking_if_0_is_the_longest_matching_prefix_for_1_2,y,c,g),g&&(f=y,u=m)}if(f){a.traceEnabled&&Pa(a.host,N.Longest_matching_prefix_for_0_is_1,c,f);let m=c.substr(f.length);a.traceEnabled&&Pa(a.host,N.Loading_0_from_the_root_dir_1_candidate_location_2,m,f,c);let y=i(e,c,!Ox(r,a.host),a);if(y)return y;a.traceEnabled&&Pa(a.host,N.Trying_other_entries_in_rootDirs);for(let g of a.compilerOptions.rootDir){if(g===u)continue;let S=fi(Qr(g),m);a.traceEnabled&&Pa(a.host,N.Loading_0_from_the_root_dir_1_candidate_location_2,m,g,S);let _=ei(S),b=i(e,S,!Ox(_,a.host),a);if(b)return b}a.traceEnabled&&Pa(a.host,N.Module_resolution_using_rootDirs_has_failed)}}function gH(e,n,r,i,a,c){let u=e&&e.getFromNonRelativeNameCache(n,r,i,a);if(u)return c.traceEnabled&&Pa(c.host,N.Resolution_for_module_0_was_found_in_cache_from_location_1,n,i),c.resultFromCache=u,{value:u.resolvedModule&&{path:u.resolvedModule.resolvedFileName,originalPath:u.resolvedModule.originalPath||!0,extension:u.resolvedModule.extension,packageId:u.resolvedModule.packageId,resolvedUsingTsExtension:u.resolvedModule.resolvedUsingTsExtension}}}function ffe(e,n,r){let i;if(n&&e){let a=e.contents.packageJsonContent;typeof a.name=="string"&&typeof a.version=="string"&&(i={name:a.name,subModuleName:n.path.slice(e.packageDirectory.length+Mo.length),version:a.version,peerDependencies:void 0})}return n&&{path:n.path,extension:n.ext,packageId:i,resolvedUsingTsExtension:n.resolvedUsingTsExtension}}function pfe(e){return ffe(void 0,e,void 0)}function TI(e,n,r,i){return pfe(mfe(e,n,r,i))}function mfe(e,n,r,i){let a=gfe(e,n,r,i);if(a)return a;if(!(i.features&32)){let c=yH(n,e,"",r,i);if(c)return c}}function gfe(e,n,r,i){if(!hs(n).includes("."))return;let c=bu(n);c===n&&(c=n.substring(0,n.lastIndexOf(".")));let u=n.substring(c.length);return i.traceEnabled&&Pa(i.host,N.File_name_0_has_a_1_extension_stripping_it,n,u),yH(c,e,u,r,i)}function yH(e,n,r,i,a){if(!i){let u=ei(e);u&&(i=!Ox(u,a.host))}switch(r){case".c":case".h":case".lpc":case"":return n&1&&c(".c",r===".c"||r===".h")||n&1&&c(".h",r===".c"||r===".h")||a.isConfigLookup&&c(".json")||void 0;default:return n&4&&!Jg(e+r)&&c(`.d${r}.ts`)||void 0}function c(u,f){let m=yfe(e+u,i,a);return m===void 0?void 0:{path:m,ext:u,resolvedUsingTsExtension:!a.candidateIsFromPackageJsonField&&f}}}function yfe(e,n,r){return hfe(e,n,r)}function hfe(e,n,r){if(!n){if(r.host.fileExists(e))return r.traceEnabled&&Pa(r.host,N.File_0_exists_use_it_as_a_name_resolution_result,e),e;r.traceEnabled&&Pa(r.host,N.File_0_does_not_exist,e)}r.failedLookupLocations?.push(e)}function Tfe(e,n,r){return Sfe(4,e,n,r,!0,void 0,void 0)}function Sfe(e,n,r,i,a,c,u){let m=e&5,y=e&-6;if(m){dH(i,N.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0,uH(m));let S=g(m);if(S)return S}if(y&&!a)return dH(i,N.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0,uH(y)),g(y);function g(S){return CI(Cc(r),_=>{if(hs(_)!=="node_modules"){let b=gH(c,n,void 0,_,u,i);return b||_I(void 0)}})}}function dH(e,n,...r){e.traceEnabled&&Pa(e.host,n,...r)}function hH(e){let n=e.indexOf(Mo);return e[0]==="@"&&(n=e.indexOf(Mo,n+1)),n===-1?{packageName:e,rest:""}:{packageName:e.slice(0,n),rest:e.slice(n+1)}}function TH(e,n,r,i,a,c){let u=Dm(r,i);u&&Pa(i,N.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2,n,e,a);let f=[],m=[],y=[],g={compilerOptions:r,host:i,traceEnabled:u,failedLookupLocations:f,affectingLocations:m,packageJsonInfoCache:c,features:0,conditions:[],requestContainingDirectory:void 0,reportDiagnostic:_=>void y.push(_),isConfigLookup:!1,candidateIsFromPackageJsonField:!1,resolvedPackageDirectory:!1},S=void 0;return mH(S,!0,f,m,y,g.resultFromCache,void 0)}function br(e){return e.kind===269}function Ti(e){return e.kind===286}function Sn(e){return e.kind===89}function MM(e){return e.kind===258}function ld(e){return e.kind===242}function Is(e){return e.kind===169}function _c(e){return e.kind===236}function ao(e){return e.kind===272}function DI(e){return e.kind===252}function SH(e){return e.kind===273}function kh(e){return e.kind===178}function Kg(e){return e.kind===179}function xo(e){return e.kind===237}function EI(e){return e.kind===238}function Bg(e){return e.kind===188}function fs(e){return e.kind===270}function yu(e){return e.kind===11}function hg(e){return e.kind===13}function ji(e){return e.kind===16}function Pu(e){return e.kind===148}function _o(e){return e.kind===149}function Zu(e){return e.kind===161}function tx(e){return e.kind===157}function _H(e){return e.kind===159}function Vr(e){return e.kind===176}function Ef(e){return e.kind===202}function Oc(e){return e.kind===199}function xE(e){return e.kind===247}function XM(e){return e.kind===253}function rx(e){return e.kind===301}function Kl(e){return e.kind===283}function Hd(e){return e.kind===289}function Yx(e){return e.kind===298}function wc(e){return e.kind===224}function sV(e){return e.kind===241}function ud(e){return e.kind===175}function H5(e){return e.kind===210}function To(e){return e.kind===266}function Tl(e){return e.kind===152}function ZM(e){return e.kind===243}function ab(e){return console.debug("todo - isSpreadAssignment"),!1}function hu(e){return e.kind===257}function rc(e){return e.kind===281}function Tg(e){return e.kind===261}function hS(e){return e.kind===265}function xH(e){return e.kind===256}function ps(e){return e.kind===147}function hl(e){return e.kind===146}function Em(e){return e.kind===276}function bH(e){return e.kind===225}function Yc(e){return!1}function ms(e){return e.kind===293}function ix(e){return e.kind===165}function hc(e){return e.kind===220}function e2(e){return e.kind===228}function dd(e){return e.kind===174}function vf(e){return e.kind===166}function Bd(e){return e.kind===163}function vh(e){return!1}function sb(e){return e.kind===170}function zd(e){return!1}function jd(e){return e.kind===225||e.kind===217||e.kind===219}function CH(e){return!1}function PI(e){return e.kind===249}function NI(e){return!1}function Ff(e){return e.kind===153}function Ud(e){return e.kind===92||e.kind===93}function DH(e){return!1}function cb(e){return e.kind===154}function EH(e){return e.kind===203}function PH(e){return e.kind===204}function kg(e){return e.kind===158}function uh(e){return e.kind===218}function Jd(e){return e.kind===201}function NH(e){return e.kind===200}function n2(e){return e.kind===299}function kH(e){return!1}function vH(e){return e.kind===240}function TS(e){return e.kind===232}function FH(e){return e.kind===113}function kI(e){return e.kind===294}function _x(e){return e.kind===221}function ZT(e){return e.kind===223}function Xx(e){return e.kind===239}function Fh(e){return e.kind===297}function vE(e){return e.kind===274}function iF(e){return e.kind===230}function qg(e){return e.kind===167}function oF(e){return e.kind===222}function cS(e){return e.kind===290}function FE(e){return e.kind===234}function z5(e){return e.kind===208}function IE(e){return e.kind===168}function t2(e){return e.kind===260}function IH(e){return e.kind===191}function LH(e){return e.kind===192}function r2(e){return e.kind===197}function AH(e){return e.kind===280}function aF(e){return e.kind===196}function wH(e){return e.kind===227}function G5(e){return e.kind===151}function RH(e){return e.kind===254}function $5(e){return e.kind===211}function OH(e){return!1}function MH(e){return e.kind===189}function BH(e){return e.kind===190}function jH(e){return!1}function JH(e){return e.kind===155}function iI(e){return e.kind===287}function WH(e){return e.kind===255}var _fe=xfe();function KH(e,n){po.mark("beforeBind"),_fe(e,n),po.mark("afterBind"),po.measure("Bind","beforeBind","afterBind")}function Nu(e,n,r){return E.attachFlowNodeDebugInfo({flags:e,id:0,node:n,antecedent:r})}function xfe(){var e,n,r,i,a,c,u,f,m,y,g,S,_,b,v,T,W,F,M,J,A,V,ue,ye=!1,he=0,ce,Ee,Fe=Nu(1,void 0,void 0),be=Nu(1,void 0,void 0),de=Pr();return Ae;function Ae(w,De){e=w,n=De,Ee=new Set,he=0,ce=pa.getSymbolConstructor(),E.attachFlowNodeDebugInfo(Fe),E.attachFlowNodeDebugInfo(be),e.locals||(In?.push(In.Phase.Bind,"bindSourceFile",{path:e.path},!0),G(e),In?.pop(),e.symbolCount=he,e.classifiableNames=Ee,ga(),Mr()),e=void 0,n=void 0,r=void 0,i=void 0,a=void 0,c=void 0,u=void 0,f=void 0,m=void 0,y=!1,g=void 0,S=void 0,_=void 0,b=void 0,v=void 0,T=void 0,W=void 0,M=void 0,J=!1,A=!1,ye=!1,V=0}function G(w){if(w)if(xc(w,r),In&&(w.tracingPath=e.path),Xn(w),w.kind>145){let De=r;r=w;let yn=bM(w);yn===0?Se(w):_n(w,yn),r=De}else{let De=r;w.kind===1&&(r=w),Qe(w),r=De}}function Qe(w){if(nc(w))if(wr(w))for(let De of w.jsDoc)G(De);else for(let De of w.jsDoc)xc(De,w),up(De,!1)}function me(w){G(w.expression),nu(w.expression)}function Se(w){let De=ye;if(ye=!1,Hn(w)){Pe(w),Qe(w),ye=De;return}switch(w.kind>=242&&w.kind<=256&&(!n.allowUnreachableCode||w.kind===248)&&(w.flowNode=g),w.kind){case 179:G(w.name),tt(w.arguments,G);break;case 246:ln(w);break;case 245:zn(w);break;case 243:St(w);break;case 244:ct(w);break;case 253:qn(w);break;case 248:fe(w);break;case 250:case 251:Rn(w);break;case 256:Li(w);break;case 240:eu(w);break;case 299:la(w);break;case 247:me(w);break;case 298:Jt(w);break;case 288:Gn(w);break;case 269:de(w);break;case 267:dn(w);break;case 237:Te(w);break;case 286:case 281:Lt(w);break;case 272:fr(w);break;case 225:case 217:case 219:Gs(w);break;case 228:Pc(w);case 176:{tt(w.statements),G(w.endOfFileToken);break}case 252:ge(w);break;case 236:tt(w.statements);break;case 266:Le(w);break;case 149:Q(w);break;case 293:case 290:case 174:case 294:case 291:case 277:case 283:case 295:ye=De;default:Pe(w);break}Qe(w),ye=De}function _n(w,De){let yn=i,bt=a,ri=c;if(De&1?(w.kind!==283&&(a=i),i=c=w,De&32&&(i.locals=Wi(),jn(i))):De&2&&(c=w,De&32&&(c.locals=void 0)),De&4){let ai=g,yr=S,Ht=_,li=b,co=W,ua=M,rs=J,_s=De&16&&!w.asteriskToken&&!!dm(w);_s||(g=Nu(2,void 0,void 0),De&152&&(g.node=w)),b=_s||w.kind===169||w.kind===270?wn():void 0,W=void 0,S=void 0,_=void 0,M=void 0,J=!1,Se(w),w.flags&=-1537,!(g.flags&1)&&De&8&&lm(w.body)&&(w.flags|=512,J&&(w.flags|=1024),w.endFlowNode=g),w.kind===176&&(w.flags|=V,w.endFlowNode=g),b&&(Ln(b,g),g=$e(b),(w.kind===169||w.kind===270)&&(w.returnFlowNode=g)),_s||(g=ai),S=yr,_=Ht,b=li,W=co,M=ua,J=rs}else Se(w);i=yn,a=bt,c=ri}function tt(w,De=G){w!==void 0&&Bn(w,De)}function Pe(w){No(w,G,tt)}function gn(w){w.flags|=w.flags&2048?4096:2048}function $e(w){let De=w.antecedent;return De?De.length===1?De[0]:w:Fe}function Ln(w,De){!(De.flags&1)&&!Gr(w.antecedent,De)&&((w.antecedent||(w.antecedent=[])).push(De),gn(De))}function Vt(w,De,yn){return De.flags&1?De:yn?kO(yn)&&w&64||h9(yn)&&w&32?Fe:ca(yn)?(gn(De),Nu(w,yn,De)):De:w&32?De:Fe}function Hn(w){if(!(g.flags&1))return!1;if(g===Fe&&(wD(w)&&w.kind!==254||w.kind===170)&&(g=be,!n.allowUnreachableCode)){let yn=Xq(n)&&!(w.flags&33554432)&&(!ld(w)||!!(rm(w.declarationList)&1)||w.declarationList.declarations.some(bt=>!!bt.initializer));Cfe(w,(bt,ri)=>Ye(yn,bt,ri,N.Unreachable_code_detected))}return!0}function Ye(w,De,yn,bt){if(!w&&$D(De))return;let ri=$D(De)?Mc(De):e;se(w,{pos:mh(De,ri),end:yn.end},bt,ri)}function se(w,De,yn,bt=e){let ri=sd(bt,De.pos,De.end-De.pos,yn);w?e.bindDiagnostics.push(ri):e.bindSuggestionDiagnostics=$r(e.bindSuggestionDiagnostics,{...ri,category:2})}function jn(w){u&&(u.nextContainer=w),u=w}function wn(){return Nu(4,void 0,void 0)}function Xn(w){switch(w.kind){case 89:if(w.flags&4096){let yr=w.parent;for(;yr;)yr=yr.parent;kn(yr,524288,788968);break}return g&&(Tc(w)||r.kind===175)&&(w.flowNode=g),Zn(w);case 176:return Dr();case 179:return zt(w);case 241:return kn(w,524288,788968);case 237:return zo(w);case 149:return Ve(w);case 169:return Yt(w);case 270:case 283:return ft(w);case 152:case 153:return tn(w);case 174:case 175:return ot(w,4,0);case 150:return On(w,131072,0);case 211:return Ft(w);case 158:case 196:case 202:return Et(w);case 167:break;case 148:return zs(w);case 272:switch(es(w)){case 0:break;default:return E.fail("Unknown call expression assignment declaration kind")}return;case 266:if(w.flowNode=g,zo(w),w.kind!==269)return;case 286:case 281:let yn=w;g&&Lo(yn)&&(yn.flowNode=g);break;case 163:case 201:case 264:return At(w);case 239:return kn(w,524288,788968);case 220:if(w.parent.kind===202)return Ve(w);if(w.parent.kind!==201)break;case 227:let bt=w,ri=bt.isBracketed||bt.typeExpression&&bt.typeExpression.type.kind===195?16777220:4;return On(bt,ri,0);case 225:case 217:case 219:return(f||(f=[])).push(w);case 228:return(m||(m=[])).push(w);case 218:return G(w.typeExpression);case 269:switch(es(w)){case 5:let yr=w.left.expression;E.fail("implement me - specialkind binary expression");break;case 0:break;default:E.fail("Unknown binary expression special property assignment kind")}return}}function ft(w){g&&(w.flowNode=g);let De=w.name?w.name.text:"__function";return Rr(w,16,De)}function Ft(w){Pe(w);let De=oS(w);De&&De.kind!==154&&Je(De.symbol,De,32)}function Et(w){let De=xi(131072,Cr(w));Je(De,w,131072);let yn=xi(2048,"__type");Je(yn,w,2048),yn.members=Wi(),yn.members.set(De.name,De)}function At(w){return Rr(w,2048,"__type")}function xn(w,De=i){if(Sn(w))return bfe(De,w.text);{let yn=xn(w.expression);return yn&&yn.exports&&yn.exports.get(yh(w))}}function It(w,De,yn,bt){pr(De,void 0,yn)}function pr(w,De,yn){return!1}function tn(w){let De=4,yn=0;return ot(w,De|0,yn)}function ot(w,De,yn){return g&&VF(w)&&(w.flowNode=g),hE(w)?Rr(w,De,"__computed"):On(w,De,yn)}function Zn(w){if(!e.parseDiagnostics.length&&!(w.flags&33554432)&&!(w.flags&16777216)&&!N9(w)){let De=LD(w);if(De===void 0)return;ue&&De>=92&&De<=145&&console.warn("implement me - checkContextualIdentifier")}}function zt(w){let De=i;i=e,On(w,268435456,111039),i=De}function Yt(w){!e.isDeclarationFile&&w.flags&33554432,g&&(w.flowNode=g);let De=w.body?0:110991;On(w,16,110991)}function Cr(w){let De=ci(w);if(De)return Fg(De)?De.text:void 0;switch(w.kind){case 158:case 151:case 202:return"__call";case 150:return"__index";case 176:return"export=";case 269:if(es(w)===2)return"export=";E.fail("Unknown binary declaration kind");break;case 196:return"__call";case 149:if(Is(w.parent)){w.parent.body&&Z(w,N.Parameter_declaration_expected);break}E.assert(w.parent.kind===196,"Impossible parameter parent kind",()=>`parent is: ${E.formatSyntaxKind(w.parent.kind)}, expected JSDocFunctionType`)}}function xi(w,De){return he++,new ce(w,De)}function Ie(w,De,yn,bt,ri,ai,yr){E.assert(yr||!hE(yn));let Ht=yr?"__computed":Cr(yn),li;if(Ht===void 0)li=xi(0,"__missing");else if(li=w.get(Ht),bt&2885600&&Ee.add(Ht),!li)w.set(Ht,li=xi(0,Ht)),ai&&(li.isReplaceableByMethod=!0);else{if(ai&&!li.isReplaceableByMethod)return li;if(li.flags&ri){if(li.isReplaceableByMethod)w.set(Ht,li=xi(0,Ht));else if(!(bt&3&&li.flags&67108864)){pl(yn)&&xc(yn.name,yn);let co=li.flags&2?N.Cannot_redeclare_block_scoped_variable_0:N.Duplicate_identifier_0,ua=!0,rs=!1;gr(li.declarations);let _s=[],el=ci(yn)||yn;Bn(li.declarations,(ui,nl)=>{let is=ci(ui)||ui,bl=ua?Z(is,co,Oe(ui)):Z(is,co)});let Nc=ua?Z(el,co,Oe(yn)):Z(el,co);e.bindDiagnostics.push(ia(Nc,..._s)),li=xi(0,Ht)}}}return Je(li,yn,bt),Kg(yn)||(li.parent?E.assert(li.parent===De,"Existing symbol parent should match new one"):li.parent=De),li}function Oe(w){return pl(w)?Fs(w.name):E.checkDefined(Cr(w))}function Je(w,De,yn){w.flags|=yn,De.symbol=w,w.declarations=dg(w.declarations,De),yn&1955&&!w.exports&&(w.exports=Wi()),yn&6240&&!w.members&&(w.members=Wi()),w.constEnumOnlyModule&&w.flags&304&&(w.constEnumOnlyModule=!1),yn&111551&&KD(w,De)}function Z(w,De,...yn){return gl(Mc(w)||e,w,De,...yn)}function fe(w){G(w.expression),w.kind===248&&(J=!0,b&&Ln(b,g)),g=Fe,A=!0}function Ce(w,De,yn,bt){let ri=v,ai=T;v=yn,T=bt,w(De),v=ri,T=ai}function ne(w,De,yn){Ce(G,w,De,yn),(!w||!sn(w)&&!H(w))&&(Ln(De,Vt(32,g,w)),Ln(yn,Vt(64,g,w)))}function sn(w){return T9(w)}function H(w){for(;;)if(w.kind===289)w=w.expression;else if(w.kind===298&&w.operator===55)w=w.operand;else return vx(w)}function ge(w){G(w.inheritClause)}function qn(w){let De=wn(),yn=wn(),bt=wn();ne(w.expression,De,yn),g=$e(De),G(w.thenStatement),Ln(bt,g),g=$e(yn),G(w.elseStatement),Ln(bt,g),g=$e(bt)}function kn(w,De,yn){switch(c.kind){case 176:let bt=Ie(e.locals,void 0,w,De,yn);bt.exportSymbol=Ie(e.symbol.members,i.symbol,w,De,yn),w.localSymbol=bt;break;default:E.assertNode(c,Wl),c.locals||(c.locals=Wi(),jn(c)),Ie(c.locals,void 0,w,De,yn)}}function On(w,De,yn){switch(i.kind){case 176:return sa(w,De,yn);case 163:case 201:case 293:return Ie(i.symbol.members,i.symbol,w,De,yn);case 158:case 151:case 202:case 150:case 154:case 156:case 169:case 270:case 283:case 241:case 196:case 239:case 264:return i.locals&&E.assertNode(i,Wl),Ie(i.locals,void 0,w,De,yn)}}function nn(w){w.flags&33554432?w.flags|=128:w.flags&=-129}function Dr(){nn(e),Gt();let w=e.symbol;Ie(e.symbol.exports,e.symbol,e,4,-1),e.symbol=w}function Gt(){let w=bu(Mg(e.fileName,n)??e.fileName);Rr(e,544,`"${w}"`)}function Rr(w,De,yn){let bt=xi(De,yn);return De&106508&&(bt.parent=i.symbol),Je(bt,w,De),bt}function zi(w){if(w.kind===170)kn(w,32,899503);else{let yn=w.name?w.name.text:"__class";Rr(w,32,yn),w.name&&Ee.add(w.name.text)}let{symbol:De}=w}function zo(w){let De=w.kind===237?w:w.parent.parent;if(mF(w)){if(xo(w)&&!w.type&&(!EI(w.parent)||w.parent.declarations.length==1&&(!ld(w.parent.parent)||(w.parent.parent.modifiers?.length??0)==0))){let yn=Cr(w);if(E.assertIsDefined(yn,"Expected variable declaration to have a name"),(c&&Wl(c)?c.locals?.get(yn):void 0)&&Pf(w)){let ri=Ge.convertToAssignmentExpression(w);return}}kn(w,2,268547007)}else Th(w)?On(w,1,111551):On(w,1,111550)}function sa(w,De,yn){return e.isDefaultLib?Ie(e.locals,void 0,w,De,yn):Kg(w)||xo(w)||ih(w)&6?Ie(e.symbol.members,void 0,w,De,yn):mo(w,De,yn)}function mo(w,De,yn){if(De&2097152)return E.assertNode(i,Wl),Ie(i.locals,void 0,w,De,yn);{if(!Wl(i)||!i.locals)return Ie(i.symbol.exports,i.symbol,w,De,yn);let ri=De&111551?1048576:0,ai=Ie(i.locals,void 0,w,ri,yn);return ai.exportSymbol=Ie(i.symbol.exports,i.symbol,w,De,yn),w.localSymbol=ai,ai}}function Ve(w){w.kind===220&&i.kind!==202||(Po(w.name)?Rr(w,1,"__"+w.parent.parameters.indexOf(w)):On(w,1,111551))}function et(w){tt(w,De=>De.kind===169?G(De):void 0),tt(w,De=>De.kind!==169?G(De):void 0)}function Le(w){G(w.dotDotDotToken),G(w.propertyName),ie(w.initializer),G(w.name)}function Q(w){tt(w.modifiers),G(w.dotDotDotToken),G(w.type),ie(w.initializer),G(w.name)}function ie(w){if(!w)return;let De=g;if(G(w),De===Fe||De===g)return;let yn=wn();Ln(yn,De),Ln(yn,g),g=$e(yn)}function Te(w){Pe(w),(w.initializer||bg(w.parent.parent))&&te(w)}function te(w){let De=Fh(w)?void 0:w.name;if(Po(De))for(let yn of De.elements)te(yn);else g=qe(16,g,w)}function q(w,De){return gn(w),A=!0,Nu(512,De,w)}function qe(w,De,yn){gn(De),A=!0;let bt=Nu(w,yn,De);return W&&Ln(W,bt),bt}function dn(w){let De=wn(),yn=wn(),bt=wn(),ri=g,ai=A;A=!1,ne(w.condition,De,yn),g=$e(De),G(w.questionToken),G(w.whenTrue),Ln(bt,g),g=$e(yn),G(w.colonToken),G(w.whenFalse),Ln(bt,g),g=A?$e(bt):ri,A||(A=ai)}function Jn(w,De){let yn=M;for(;yn&&w.parent.kind===249;)yn.continueTarget=De,yn=yn.next,w=w.parent;return De}function ke(){return Nu(8,void 0,void 0)}function We(w,De,yn){let bt=S,ri=_;S=De,_=yn,G(w),S=bt,_=ri}function ln(w){let De=Jn(w,ke()),yn=wn(),bt=wn();Ln(De,g),g=De,ne(w.expression,yn,bt),g=$e(yn),We(w.statement,bt,De),Ln(De,g),g=$e(bt)}function zn(w){let De=ke(),yn=Jn(w,wn()),bt=wn();Ln(De,g),g=De,We(w.statement,bt,yn),Ln(yn,g),g=$e(yn),ne(w.expression,De,bt),g=$e(bt)}function St(w){let De=Jn(w,ke()),yn=wn(),bt=wn();G(w.initializer),Ln(De,g),g=De,ne(w.condition,yn,bt),g=$e(yn),We(w.statement,bt,De),G(w.incrementor),Ln(De,g),g=$e(bt)}function ct(w){let De=Jn(w,ke()),yn=wn();G(w.expression),Ln(De,g),g=De,Ln(yn,g),G(w.initializer),w.initializer.kind!==238&&Br(w.initializer),We(w.statement,yn,De),Ln(De,g),g=$e(yn)}function kr(w){for(let De=M;De;De=De.next)if(De.name===w)return De}function Or(w,De,yn){let bt=w.kind===250?De:yn;bt&&(Ln(bt,g),g=Fe,A=!0)}function Rn(w){if(G(w.label),w.label){let De=kr(w.label.text);De&&(De.referenced=!0,Or(w,De.breakTarget,De.continueTarget))}else Or(w,S,_)}function Li(w){let De=wn();G(w.expression);let yn=S,bt=F;S=De,F=g,tt(w.preBlock),G(w.caseBlock),Ln(De,g);let ri=Bn(w.caseBlock.clauses,ai=>ai.kind===301);w.possiblyExhaustive=!ri&&!De.antecedent,ri||Ln(De,yt(F,w,0,0)),S=yn,F=bt,g=$e(De)}function yt(w,De,yn,bt){return gn(w),Nu(128,{switchStatement:De,clauseStart:yn,clauseEnd:bt},w)}function Lo(w){switch(w.kind){case 89:case 284:case 71:return!0;case 286:case 289:return Lo(w.expression);case 281:return(Bc(w.argumentExpression)||Ks(w.argumentExpression))&&Lo(w.expression);case 269:return w.operatorToken.kind===27&&Lo(w.right)||qd(w.operatorToken.kind)&&od(w.left)}return!1}function Ko(w){return Lo(w)}function Ua(w){if(w.arguments){for(let De of w.arguments)if(Ko(De))return!0}return!!(w.expression.kind===286&&Ko(w.expression.expression))}function ca(w){switch(w.kind){case 89:return!0;case 286:case 281:return Ko(w);case 272:return Ua(w);case 289:return xm(w)?!1:ca(w.expression);case 269:return wt(w);case 298:return w.operator===55&&ca(w.operand)}return!1}function wt(w){switch(w.operatorToken.kind){case 74:case 86:return Ko(w.left);case 35:case 36:case 37:case 38:return vn(w.left)||vn(w.right)||Jc(w.right,w.left)||Jc(w.left,w.right);case 103:return ca(w.right);case 27:return ca(w.right)}return!1}function Jc(w,De){return!1}function vn(w){switch(w.kind){case 289:return vn(w.expression);case 269:switch(w.operatorToken.kind){case 74:return vn(w.left);case 27:return vn(w.right)}}return Ko(w)}function eu(w){let De=w.clauses,yn=kO(w.parent.expression)||ca(w.parent.expression),bt=Fe;for(let ri=0;ri<De.length;ri++){let ai=ri;for(;!De[ri].statements.length&&ri+1<De.length;)bt===Fe&&(g=F),G(De[ri]),ri++;let yr=wn();Ln(yr,yn?yt(F,w.parent,ai,ri+1):F),Ln(yr,bt),g=$e(yr);let Ht=De[ri];G(Ht),bt=g,!(g.flags&1)&&ri!==De.length-1&&n.noFallthroughCasesInSwitch&&(Ht.fallthroughFlowNode=g)}}function la(w){let De=g;g=F,G(w.expression),g=De,tt(w.statements)}function Jt(w){if(w.operator===55){let De=v;v=T,T=De,Pe(w),T=v,v=De}else Pe(w),(w.operator===47||w.operator===48)&&Br(w.operand)}function Gn(w){Pe(w),(w.operator===47||w.operator===48)&&Br(w.operand)}function Br(w){if(Lo(w))g=qe(16,g,w);else if(w.kind===290)for(let De of w.elements)Er(De);else if(w.kind===291){for(let De of w.elements)if(!Fh(De)&&De.elements)for(let yn of De.elements)Er(De)}else if(w.kind===293)for(let De of w.properties)De.kind===174?Er(De.initializer):De.kind===175&&Br(De.name)}function Er(w){w.kind===269&&w.operatorToken.kind===74?Br(w.left):Br(w)}function xl(w){let De=w.parent;switch(De.kind){case 253:case 246:case 245:return De.expression===w;case 243:case 267:return De.condition===w}return!1}function Sd(w){for(;Hd(w.parent)||Yx(w.parent)&&w.parent.operator===55;)w=w.parent;return!xl(w)&&!H(w.parent)}function Pr(){return pS(w,De,yn,bt,ri,void 0);function w(yr,Ht){if(Ht){Ht.stackIndex++,xc(yr,r);let co=ue;Xn(yr);let ua=r;r=yr,Ht.skip=!1,Ht.inStrictModeStack[Ht.stackIndex]=co,Ht.parentStack[Ht.stackIndex]=ua}else Ht={stackIndex:0,skip:!1,inStrictModeStack:[void 0],parentStack:[void 0]};let li=yr.operatorToken.kind;if(vO(li)||VD(li)){if(Sd(yr)){let co=wn(),ua=g,rs=A;A=!1,Xr(yr,co,co),g=A?$e(co):ua,A||(A=rs)}else Xr(yr,v,T);Ht.skip=!0}return Ht}function De(yr,Ht,li){if(!Ht.skip){let co=ai(yr);return li.operatorToken.kind===27&&nu(yr),co}}function yn(yr,Ht,li){Ht.skip||G(yr)}function bt(yr,Ht,li){if(!Ht.skip){let co=ai(yr);return li.operatorToken.kind===27&&nu(yr),co}}function ri(yr,Ht){if(!Ht.skip){let ua=yr.operatorToken.kind;if(qd(ua)&&!Vd(yr)&&(Br(yr.left),ua===74&&yr.left.kind===281)){let rs=yr.left;vn(rs.expression)&&(g=qe(256,g,yr))}}let li=Ht.inStrictModeStack[Ht.stackIndex],co=Ht.parentStack[Ht.stackIndex];li!==void 0&&(ue=li),co!==void 0&&(r=co),Ht.skip=!1,Ht.stackIndex--}function ai(yr){if(yr&&br(yr))return yr;G(yr)}}function nu(w){if(w.kind===272){let De=w;De.expression.kind!==71&&Dx(De.expression)&&!Co(De)&&(g=q(g,De))}}function Co(w){return Sn(w.expression)&&w.expression.text===(e.languageVariant===1?"error":"raise_error")}function Xr(w,De,yn){let bt=wn();w.operatorToken.kind===58?ne(w.left,bt,yn):ne(w.left,De,bt),g=$e(bt),G(w.operatorToken),VD(w.operatorToken.kind)?(Ce(G,w.right,De,yn),Br(w.left),Ln(De,Vt(32,g,w)),Ln(yn,Vt(64,g,w))):ne(w.right,De,yn)}function Lt(w){Pe(w)}function ki(w){let De=er(w,yn=>yn.parent&&IE(yn.parent)&&yn.parent.extendsType===yn);return De&&De.parent}function Mr(){if(!m)return;let w=i,De=u,yn=c,bt=r,ri=g;for(let ai of m){let yr=ai.parent.parent;if(i=mE(yr)||e,c=Sh(yr)||e,g=Nu(2,void 0,void 0),r=ai,ci(ai)){r=ai.parent;let li=e;E.assertNode(li,Wl),li.locals||(li.locals=Wi(),jn(li));let co=li.locals.get("__varDocTags")??xi(3,"__varDocTags");co.members??(co.members=Wi()),li.locals.has("__varDocTags")||li.locals.set("__varDocTags",co),Ie(co.members,e.symbol,ai,2,268547007)}i=w,u=De,c=yn,r=bt,g=ri}}function ga(){if(!f)return;let w=i,De=u,yn=c,bt=r,ri=g;for(let ai of f){let yr=ai.parent.parent;i=mE(yr)||e,c=Sh(yr)||e,g=Nu(2,void 0,void 0),r=ai,G(ai.typeExpression);let Ht=ci(ai);!ai.fullName&&Ht&&AO(Ht.parent)||(!ai.fullName||ai.fullName.kind===89?(r=ai.parent,kn(ai,524288,788968)):G(ai.fullName))}i=w,u=De,c=yn,r=bt,g=ri}function zs(w){if(wc(w.parent)){let De=GD(w.parent);De?(E.assertNode(De,Wl),De.locals??(De.locals=Wi()),Ie(De.locals,void 0,w,262144,526824)):On(w,262144,526824)}else if(w.parent.kind===259){let De=ki(w.parent);De?(E.assertNode(De,Wl),De.locals??(De.locals=Wi()),Ie(De.locals,void 0,w,262144,526824)):Rr(w,262144,Cr(w))}else On(w,262144,526824)}function Gs(w){G(w.tagName),w.fullName&&(xc(w.fullName,w),up(w.fullName,!1)),typeof w.comment!="string"&&tt(w.comment)}function Pc(w){G(w.tagName),G(w.typeExpression),w.name&&(xc(w.name,w),up(w.name,!1)),typeof w.comment!="string"&&tt(w.comment)}function fr(w){let De=$o(w.expression);if(De.kind===270||De.kind===283?(tt(w.arguments),G(w.expression)):(Pe(w),w.expression.kind===71?g=q(g,w):Co(w)&&(g=Fe,A=!0)),w.expression.kind===286){let yn=w.expression}}}function bM(e){switch(e.kind){case 274:case 170:case 293:case 163:case 201:return 1;case 239:case 241:case 264:case 150:return 33;case 176:return 37;case 169:return 45;case 151:case 202:case 196:case 158:return 45;case 270:case 283:case 179:return 61;case 152:return e.initializer?4:0;case 243:case 244:case 240:return 34;case 276:return 33;case 236:return Ji(e.parent)||WH(e.parent)?0:34}return 0}function bfe(e,n){let r=Wo(e,Wl)?.locals?.get(n);if(r)return r.exportSymbol??r;if(ip(e))return e.symbol?.exports?.get(n)}function Cfe(e,n){if(im(e)&&UH(e)&&_c(e.parent)){let{statements:r}=e.parent,i=Zq(r,e);t5(i,UH,(a,c)=>n(i[a],i[c-1]))}else n(e,e)}function UH(e){return!Is(e)&&!Dfe(e)&&!OH(e)&&!(ld(e)&&!(rm(e)&1)&&e.declarationList.declarations.some(n=>!n.initializer))}function Dfe(e){switch(e.kind){case 155:case 239:return!0;default:return!1}}var qH=1,VH=1,HH=1,zH=1,vfe="(anonymous)";var Ffe=new Map(Object.entries({Uppercase:0,Lowercase:1,Capitalize:2,Uncapitalize:3,NoInfer:4}));function ez(e){var n=[],r=t=>{n.push(t)},i,a,c=pa.getSymbolConstructor(),u=pa.getTypeConstructor(),f=pa.getSignatureConstructor(),m=0,y=0,g=0,S=0,_=0,b=0,v,T,W=!1,F,M=na(e.useCaseSensitiveFileNames()),J,A=Wi(),V=[1],ue=[],ye=[],he=[],ce=0,Ee=!1,Fe=e.getCompilerOptions(),be=Hl(Fe),de=e.getDriverType(),Ae=Fe.exactOptionalPropertyTypes,G=!1,Qe=!1,me=eI(Fe,"strictFunctionTypes"),Se=eI(Fe,"strictObjectTypes"),_n=$ne(),tt=Nte(),Pe=Bte(),gn=oz(Fe,{isEntityNameVisible:Ite,isExpandoFunctionDeclaration:Fte,requiresAddingImplicitUndefined:Y4,isUndefinedIdentifierExpression(t){return E.assert(fm(t)),Fl(t)===ft},isDefinitelyReferenceToGlobalSymbolObject:Lte}),$e=!1,Ln=!1,Vt,Hn=new Map,Ye=new Map,se=0,jn,wn=Fq({evaluateElementAccessExpression:Vte,evaluateEntityNameExpression:t3}),Xn=Wi(),ft=Fo(4,"undefined");ft.declarations=[];var Ft=Fo(1536,"globalThis",8);Ft.exports=Xn,Ft.declarations=[],Xn.set(Ft.name,Ft);var Et=Fo(4,"arguments"),At=Fo(4,"require"),xn,It,pr=0,tn,ot=0,Zn=HD(),zt=HD(),Yt=new Map,Cr=0,xi=10,Ie=[],Oe=[],Je=[],Z=[],fe=[],Ce=[],ne=[],sn=[],H=[],ge=[],qn=[],kn=[],On=[],nn=[],Dr=[],Gt=[],Rr=[],zi=[],zo=new Map,sa=[],mo=new Map,Ve=0,et=0,Le=0,Q=!1,ie=0,Te,te,q,qe=[],dn=[],Jn=[],ke=0,We=[],ln=[],zn=[],St=0,ct=new Set,kr=new Map,Or=LO({compilerOptions:Fe,requireSymbol:At,argumentsSymbol:Et,globals:Xn,getSymbolOfDeclaration:rt,error:hn,getRequiresScopeChangeCache:cy,setRequiresScopeChangeCache:Zb,lookup:WS,onPropertyWithInvalidInitializer:Xee,onFailedToResolveSymbol:Qte,onSuccessfullyResolvedSymbol:Xte}),Rn=LO({compilerOptions:Fe,requireSymbol:At,argumentsSymbol:Et,globals:Xn,getSymbolOfDeclaration:rt,error:hn,getRequiresScopeChangeCache:cy,setRequiresScopeChangeCache:Zb,lookup:Gte});let Li={getTypeOfSymbol:Xt,getNodeCount:()=>Bl(e.getSourceFiles(),(t,o)=>t+o.nodeCount,0),getIdentifierCount:()=>Bl(e.getSourceFiles(),(t,o)=>t+o.identifierCount,0),getSymbolCount:()=>Bl(e.getSourceFiles(),(t,o)=>t+o.symbolCount,y),getTypeCount:()=>m,getInstantiationCount:()=>g,getStringType:()=>Er,getRelationCacheSizes:()=>({assignable:sc.size,identity:Ra.size,subtype:Dl.size,strictSubtype:Qs.size}),signatureToString:d_,getDiagnostics:Xb,getAliasedSymbol:cu,runWithCurrentFile:Ys,getSymbolAtLocation:t=>{let o=Io(t);return Ys(o,()=>o?Fl(o,!0):void 0)},getSignatureFromDeclaration:t=>{let o=Io(t,Ji);return Ys(o,()=>o?to(o):void 0)},evaluate:wn,typeToTypeNode:Pe.typeToTypeNode,getAugmentedPropertiesOfType:jA,getPropertiesOfType:Ba,getUnionType:vt,getWidenedType:sl,symbolToString:Qi,getRootSymbols:wo,getEmitResolver:kc,getTypeFromTypeNode:rr,getPropertyOfType:qo,getMergedSymbol:kt,getAllPossiblePropertiesOfTypes:zX,isArrayLikeType:rg,isNullableType:VJ,getNullableType:HJ,getNonNullableType:MP,getNonOptionalType:Um,getIndexTypeOfType:(t,o)=>Nd(t,o===0?Er:Ht),isTypeInvalidDueToUnionDiscriminant:AP,typeHasCallOrConstructSignatures:ow,getReturnTypeOfSignature:$i,getTypeOfPropertyAccessExpr:Ke,getContextualType:(t,o)=>{let s=Io(t,Tc);if(s)return Ys(s,()=>o&4?nW(s,()=>iu(s,o)):iu(s,o))},getSymbolsInScope:(t,o)=>{let s=Io(t);return Ys(s,()=>s?P(s,o):[])},getTypeOfSymbolAtLocation:(t,o)=>{let s=Io(o);return Ys(s,()=>s?Ne(t,s):Gn)},isDeclarationVisible:oe,getResolvedSignature:(t,o,s)=>YN(t,o,s,0),getShorthandAssignmentValueSymbol:t=>{let o=Io(t);return Ys(o,()=>o?cae(o):void 0)},getContextualTypeForArgumentAtIndex:(t,o)=>{let s=Io(t,Cg);return Ys(s,()=>s&&y6(s,o))},isUnknownSymbol:t=>t===ko,isUndefinedSymbol:t=>t===ft,getTypeAtLocation:t=>{let o=Io(t);return Ys(o,()=>o?Ys(o,()=>xt(o)):Gn)},getCandidateSignaturesForStringLiteralCompletions:doe,runWithCancellationToken:(t,o)=>{try{return i=t,o(Li)}finally{i=void 0}},writeType:(t,o,s,l)=>_t(t,Io(o),s,l),writeSymbol:(t,o,s,l,d)=>Qi(t,Io(o),s,l,d),writeSignature:(t,o,s,l,d)=>d_(t,Io(o),s,l,d),symbolToTypeParameterDeclarations:Pe.symbolToTypeParameterDeclarations,tryGetThisTypeAt:(t,o,s)=>{let l=Io(t);return Ys(l,()=>l&&Qh(l,o,s))},getBaseConstraintOfType:xa,getDefaultFromTypeParameter:t=>t&&t.flags&262144?Gm(t):void 0,getSignaturesOfType:ro,getGlobalDiagnostics:$h,getFullyQualifiedName:Cw,getAccessibleSymbolChain:wC,isValidPropertyAccessForCompletions:(t,o,s)=>{let l=Io(t,Ti);return Ys(l,()=>!!l&&G3(l,o,s))},isArgumentsSymbol:t=>t===Et,resolveExternalModuleSymbol:M0,resolveName(t,o,s,l){return Or(o,t,s,void 0,!1,l)},resolveBaseTypesOfClass:Qb,getExportsOfModule:ee,resolveExternalModuleName:t=>{let o=Io(t,Tc);return Ys(o,()=>{let s=ni(o,64);return o&&Dy(o,o,s,!0)})},getContextualTypeForObjectLiteralElement:t=>{console.debug("todo - getContextualTypeForObjectLiteralElement")},getExpandedParameters:G4,getLocalTypeParametersOfClassOrInterfaceOrTypeAlias:Jm,getResolvedSignatureForSignatureHelp:(t,o,s)=>jw(t,()=>YN(t,o,s,16)),getTypePredicateOfSignature:Ic,hasEffectiveRestParameter:kd,isOptionalParameter:t=>{let o=Io(t,_o);return Ys(o,()=>o?w0(o):!1)},symbolToParameterDeclaration:Pe.symbolToParameterDeclaration,typeParameterToDeclaration:Pe.typeParameterToDeclaration,writeTypePredicate:(t,o,s,l)=>(console.log("todo - writeTypePredicate"),""),createSymbol:Fo,getSuggestionDiagnostics:(t,o)=>{let s=Io(t,Vr)||E.fail("Could not determine parsed source file.");if($x(s,Fe,e))return Re;let l;try{return i=o,N0(s),E.assert(!!(Wt(s).flags&1)),l=Ro(l,zt.getDiagnostics(s.fileName)),DJ(T4(s),(d,p,h)=>{!$D(d)&&!Ax(d)&&!h4(p,!!(d.flags&33554432))&&(l||(l=[])).push({...h,category:2})}),l||Re}finally{i=void 0}}};var yt=un(131072,"never",void 0,"unique literal"),Lo=PC(t=>t.flags&262144?yt:t,()=>"(unique literal mapper)"),Ko=new Map,Ua=new Map,ca=new Map,wt=un(1,"mixed",void 0,"mixed"),Jc=wt,vn=un(1,"mixed",262144,"auto"),eu=un(524288,"object",262144,"object"),la=un(1,"any",void 0,"wildcard"),Jt=un(1,"any",void 0,"blocked string"),Gn=un(1,"error"),Br=un(131072,"never",262144,"silent"),Er=un(4,"string"),xl=un(4096,"bytes"),Sd=un(524288,"closure",262144,"closure"),Pr=un(524288,"lwobject",262144,"lwobject"),nu=G?De:un(65536,"null",65536,"widening"),Co=un(8,"int"),Xr=un(8,"float"),Lt=un(131072,"never"),ki=un(32768,"undefined",void 0,"missing"),Mr=un(2,"unknown"),ga=un(131072,"never",void 0,"implicit"),zs=un(1,"unresolved"),Gs=un(1,"any",65536,"non-inferrable"),Pc=un(1,"intrinsic"),fr=un(32768,"undefined"),w=G?fr:un(32768,"undefined",65536,"widening"),De=un(65536,"null"),yn=un(67108864,"object"),bt=un(16384,"void"),ri=vt([Er,Co]),ai,yr=vt([Er,Co,Xr]),Ht=vt([Co,Xr]),li=new Map,co=new Map,ua=new Map,rs=fr,_s=un(131072,"never",void 0,"unreachable"),el=PC(t=>t.flags&262144?RZ(t):t,()=>"(restrictive mapper)"),Nc=PC(t=>t.flags&262144?la:t,()=>"(permissive mapper)"),ui=Fo(2048,"__type");ui.members=Wi();var nl=Lc(ui,A,Re,Re,Re),is=Lc(void 0,A,Re,Re,Re),bl=G?vt([fr,De,is]):Mr,As=Lc(void 0,A,Re,Re,Re);As.instantiations=new Map;var xs=un(256,"0",void 0,"fresh"),Cn=rl(0),Ka=un(256,"1",void 0,"fresh"),pt=rl(1);Ka.regularType=pt,Ka.freshType=Ka,pt.regularType=pt,pt.freshType=Ka,xs.regularType=Cn,xs.freshType=xs,Cn.regularType=Cn,Cn.freshType=xs;var Gi=vt([Cn,pt]),qa=Au(""),D=rl(0),k,j,Y,Be,Ue,$n,di,nr,Lr,Mt,hr,vi,Oi,Hr,ii,Bo=Lc(void 0,A,Re,Re,Re),no=o_(1,"<<unresolved>>",0,wt),pi=df(void 0,void 0,void 0,Re,wt,void 0,0,0),Wc=df(void 0,void 0,void 0,Re,Gn,void 0,0,0),bs=df(void 0,void 0,void 0,Re,wt,void 0,0,0),_d=df(void 0,void 0,void 0,Re,Br,void 0,0,0),Ao=Kp(Ht,Er,!0),Zd=new Map,_p=new Map,vu=new Set,$s=Lc(void 0,A,Re,Re,Re),ko=Fo(4,"unknown"),wm=new Map,Rm=new Map,bd=kl(),Cd=kl();Cd.constraint=bd;var xp=kl(),Fu=kl(),tl=kl();tl.constraint=Fu;var lo=Fo(0,"__resolving__"),Cl=Lc(void 0,A,Re,Re,Re),$s=Lc(void 0,A,Re,Re,Re),_a=Lc(void 0,A,Re,Re,Re),ef=Lc(void 0,A,Re,Re,Re),Dl=new Map,Qs=new Map,sc=new Map,wa=new Map,Ra=new Map,xd=PC(t=>(F&&(t===bd||t===Cd||t===xp)&&F(!0),t),()=>"(unmeasurable reporter)"),nf=PC(t=>(F&&(t===bd||t===Cd||t===xp)&&F(!1),t),()=>"(unreliable reporter)"),bd=kl(),Cd=kl();Cd.constraint=bd;var xp=kl();return Hh(),Li;function Hh(){for(let o of e.getSourceFiles())o.isDefaultLib,KH(o,Fe);for(let o of e.getSourceFiles())if(o.isDefaultLib){Ed(Xn,o.locals);let s=Fo(1920,"efun::",8);s.members=o.locals,Xn.set("efun::",s)}let t=e.getSourceFile(Fe.sefunFile);t&&ty(t,Xn),Gh(),at(ft).type=w,at(Et).type=wt,at(ko).type=Gn,at(Ft).type=Ku(16,Ft),Y=El("__LS__Array",0,!0),Be=El("__LS__Mapping",0,!0),k=El("__LS__Object",0,!0),j=El("__LS__Function",0,!0),$n=Ln&&El("__LS__CallableFunction",0,!0)||j,di=Ln&&El("__LS__NewableFunction",0,!0)||j,nr=El("__LS__String",0,!0),Lr=El("__LS__Int",0,!0),hr=El("__LS__Closure",0,!0),Oi=Na(wt),vi=Na(vn),vi===Bo&&(vi=Lc(void 0,A,Re,Re,Re)),Ue=ry("__LS__ReadonlyArray",1),Hr=Ue?bp(Ue,[wt]):Oi,ai=vt([Ht,Y])}function Ys(t,o){let s=!0;J||(s=!1,J=$t(t));let l=o();return s||(J=void 0),l}function ty(t,o){let s=new Set,l=Fl(t,!0),p=[Xt(l,64)];for(;p.length;){let h=p.shift();if(s.has(h.symbol.name))continue;s.add(h.symbol.name);let x=Bf(h);h.members.forEach((I,B)=>{o.set(B,I)}),p.push(...x)}}function El(t,o,s){let l=Dd(t,3,s?N.Cannot_find_global_type_0:void 0);if(!l)return console.warn("Global symbol not found: "+t),Gn;let d=Fo(8388640,t);d.valueDeclaration=l.valueDeclaration,d.members=Wi();let p=t,h=Fo(8388612,p,8);return h.valueDeclaration=l.valueDeclaration,d.members.set(p,h),Cp(d,o)}function Na(t,o){return bp(o?Ue:Y,[t])}function zh(t,o,s){return E.assert(s!==!0,"readonly not supported"),bp(Be,[t,o])}function Gh(){let t=ft.name,o=Xn.get(t);o?Bn(o.declarations,s=>{pE(s)||Zn.add(wi(s,N.Declaration_name_conflicts_with_built_in_global_identifier_0,t))}):Xn.set(t,ft)}function ry(t,o=0){let s=Dd(t,788968,void 0);return s&&Cp(s,o)}function bp(t,o){return t!==As?py(t,o):Bo}function tf(t,o,s=3){return Dd(t,s,o?N.Cannot_find_global_type_0:void 0)}function Dd(t,o,s){return Or(void 0,t,o,s,!1,!1)}function Cp(t,o){function s(d){let p=d.declarations;if(p)for(let h of p)switch(h.kind){case 170:case 155:return h}}if(!t)return o?As:Bo;if(t.flags&19)return mre(t);let l=as(t);return l.flags&524288?gr(l.typeParameters)!==o?(hn(s(t),N.Global_type_0_must_have_1_type_parameter_s,Ws(t),o),o?As:Bo):l:(hn(s(t),N.Global_type_0_must_be_a_class_or_interface_type,Ws(t)),o?As:Bo)}function Ed(t,o,s=!1){o.forEach((l,d)=>{let p=t.get(d);t.set(d,p?ze(p,l,s):kt(l))})}function $h(){return k0(),Zn.getGlobalDiagnostics()}function iy(t){let o=!1;for(;t.parent&&!Ji(t.parent);){if(_o(t.parent)&&(o||t.parent.initializer===t))return!0;To(t.parent)&&t.parent.initializer===t&&(o=!0),t=t.parent}return!1}function Pl(t){if(t.thisParameter)return Xt(t.thisParameter)}function Dp(t){return Pl(to(t))}function Om(t){let o=nF(t);if(o&&o.typeExpression)return rr(o.typeExpression);let s=af(t);if(s)return Pl(s)}function Qh(t,o=!0,s=zx(t,!1,!1)){let l=wr(t);if(Ji(s)&&!iy(t)){let d=Dp(s)||l&&Om(s);if(d)return tg(t,d)}if(Sa(s.parent)){let d=rt(s.parent),p=as(d).thisType;return tg(t,p)}Vr(s)&&console.debug("todo - tryGetThisTypeAt")}function Va(t){let o=0;return t&2&&(o|=268547007),t&1&&(o|=111550),t&4&&(o|=0),t&8&&(o|=900095),t&16&&(o|=110991),t&32&&(o|=899503),t&64&&(o|=788872),t&256&&(o|=899327),t&128&&(o|=899967),t&512&&(o|=110735),t&8192&&(o|=103359),t&32768&&(o|=46015),t&65536&&(o|=78783),t&262144&&(o|=526824),t&524288&&(o|=788968),t&2097152&&(o|=2097152),o}function L(t,o){o.mergeId||(o.mergeId=HH,HH++),Ie[o.mergeId]=t}function ae(t){let o=Fo(t.flags,t.name);return o.declarations=t.declarations?t.declarations.slice():[],o.parent=t.parent,t.valueDeclaration&&(o.valueDeclaration=t.valueDeclaration),t.constEnumOnlyModule&&(o.constEnumOnlyModule=!0),t.members&&(o.members=new Map(t.members)),t.exports&&(o.exports=new Map(t.exports)),L(o,t),o}function ze(t,o,s=!1){if(!(t.flags&Va(o.flags))||(o.flags|t.flags)&67108864){if(o===t)return t;if(!(t.flags&33554432)){let p=xy(t);if(p===ko)return o;if(!(p.flags&Va(o.flags))||(o.flags|p.flags)&67108864)t=ae(p);else return l(t,o),o}o.flags&512&&t.flags&512&&t.constEnumOnlyModule&&!o.constEnumOnlyModule&&(t.constEnumOnlyModule=!1),t.flags|=o.flags,o.valueDeclaration&&KD(t,o.valueDeclaration),Ro(t.declarations,o.declarations),o.members&&(t.members||(t.members=Wi()),Ed(t.members,o.members,s)),o.exports&&(t.exports||(t.exports=Wi()),Ed(t.exports,o.exports,s)),s||L(t,o)}else l(t,o);return t;function l(p,h){let x=!!(p.flags&384||h.flags&384),I=!!(p.flags&2||h.flags&2),B=I?N.Cannot_redeclare_block_scoped_variable_0:N.Duplicate_identifier_0,z=h.declarations&&$t(h.declarations[0]),re=p.declarations&&$t(p.declarations[0]),pe=!1,_e=!1,on=Qi(h);if(z&&re&&Vt&&!x&&z!==re){let pn=eb(z.path,re.path)===-1?z:re,Kn=pn===z?re:z,Nn=LT(Vt,`${pn.path}|${Kn.path}`,()=>({firstFile:pn,secondFile:Kn,conflictingSymbols:new Map})),it=LT(Nn.conflictingSymbols,on,()=>({isBlockScoped:I,firstFileLocations:[],secondFileLocations:[]}));pe||d(it.firstFileLocations,h),_e||d(it.secondFileLocations,p)}else pe||CN(h,B,on,p),_e||CN(p,B,on,h)}function d(p,h){if(h.declarations)for(let x of h.declarations)fu(p,x)}}function un(t,o,s=0,l){jr(o,l);let d=Ut(t);return d.intrinsicName=o,d.debugIntrinsicName=l,d.objectFlags=s|524288|2097152|33554432|16777216,d}function Ut(t){let o=new u(Li,t);return m++,o.id=m,In?.recordType(o),o}function jr(t,o){let s=`${t},${o??""}`;ct.has(s)&&E.fail(`Duplicate intrinsic type name ${t}${o?` (${o})`:""}; you may need to pass a name to createIntrinsicType.`),ct.add(s)}function kt(t){let o;return t&&t.mergeId&&(o=Ie[t.mergeId])?o:t}function vr(t){return jO(t)&&(t=t.parent),ba(cs(t))}function cr(t){let o=[];return t.forEach((s,l)=>{z4(l)||o.push(s)}),o}function P(t,o){let s=Wi(),l=!1;return d(),s.delete("this"),cr(s);function d(){for(;t;){switch(Wl(t)&&t.locals&&!_q(t)&&h(t.locals,o),t.kind){case 176:h(rt(t).exports,o&-1);break;case 274:h(pf(rt(t)),o&788968);break;case 270:t.name&&p(t.symbol,o);break}xq(t)&&p(Et,o),l=!1,t=t.parent}h(Xn,o)}function p(x,I){if(Lg(x)&I){let B=x.name;s.has(B)||s.set(B,x)}}function h(x,I){I&&x.forEach(B=>{p(B,I)})}}function ee(t){return cr(W4(t))}function Ke(t){return OP(t.expression,t,64)||Qm(t.expression,192)||Gn}function En(t){return t.kind===89&&pE(t.parent)&&ci(t.parent)===t}function xt(t){if(Vr(t))return Gn;if(hm(t))return rr(t);if(fm(t))return vr(t);if(pE(t)){let o=rt(t);return as(o)}if(En(t)){let o=Fl(t);return o?as(o):Gn}if(To(t))return TC(t,!0,0)||Gn;if(ad(t)){let o=rt(t);return o?Xt(o):Gn}if(GH(t)){let o=Fl(t);return o?Xt(o):Gn}return Po(t)&&TC(t.parent,!0,0)||Gn}function rt(t){return kt(t.symbol&&sr(t.symbol))}function sr(t){if(t.flags&32&&Vr(t.valueDeclaration)){let o=Xt(t,64);o.resolvedBaseTypes||Qb(o)}if(t.flags&106500&&t.name==="__computed"){let o=at(t);if(!o.lateSymbol&&Pn(t.declarations,$0)){let s=kt(t.parent);pf(s)}return o.lateSymbol||(o.lateSymbol=t)}return t}function at(t){if(t.flags&33554432)return t.links;let o=so(t);return Oe[o]??(Oe[o]=new i2)}function hi(t,o,...s){return t?wi(t,o,...s):Ac(o,...s)}function hn(t,o,...s){let l=hi(t,o,...s);return Zn.add(l),l}function wo(t){let o=zb(t);return o?Oo(o,wo):[t]}function kc(t,o,s){return s||Xb(t,o),tt}function tu(t,o){return Vu(t,o,sc)?-1:0}function Oa(t,o,s=tu){return z3(t,o,s)||Pp(t,o)||Ep(t,o)||oy(t,o)||Pd(t,o)}function Ep(t,o){if(dt(t)&128&&Id(o,rg))return Sr(o.types,s=>!rg(s))}function oy(t,o){let s=0;if(ro(t,s).length>0||(s=1,ro(t,s).length>0))return Sr(o.types,d=>ro(d,s).length>0)}function Pd(t,o){let s;if(!(t.flags&406978492)){let l=0;for(let d of o.types)if(!(d.flags&406978492)){let p=Mi([ju(t),ju(d)]);if(p.flags&4194304)return d;if(Dn(p)||p.flags&1048576){let h=p.flags&1048576?Zf(p.types,Dn):1;h>=l&&(s=d,l=h)}}}return s}function Pp(t,o){let s=dt(t);if(s&20&&o.flags&1048576)return Sr(o.types,l=>{if(l.flags&524288){let d=s&dt(l);if(d&4)return t.target===l.target;if(d&16)return!!t.aliasSymbol&&t.aliasSymbol===l.aliasSymbol}return!1})}function zb(t){if(oa(t)&6)return Ei(at(t).containingType.types,o=>qo(o,t.name));if(t.flags&33554432){let{links:{leftSpread:o,rightSpread:s,syntheticOrigin:l}}=t;return o?[o,s]:l?[l]:IT(os(t))}}function os(t){let o,s=t;for(;s=at(s).target;)o=s;return o}function qo(t,o,s,l){if(t=Mm(t),va(t)){let d=ha(t.resolvedTypeArguments);d.flags&524288&&(t=d)}if(t.flags&524288){let d=Wu(t),p=d.members?.get(o);if(p&&v0(p,l))return p;if(s)return;let h=d===Cl?j:d.callSignatures?.length?$n:d.constructSignatures?.length?di:void 0;if(h){let x=jf(h,o);if(x)return x}return jf(k,o)}if(t.flags&2097152){let d=Go(t,o,!0);return d||(s?void 0:Go(t,o,s))}if(t.flags&1048576)return Go(t,o,s)}function Go(t,o,s){let l=ay(t,o,s);return l&&!(oa(l)&16)?l:void 0}function ay(t,o,s){let l=s?t.propertyCacheWithoutObjectFunctionPropertyAugment?.get(o):t.propertyCache?.get(o);return l||(l=Yb(t,o,s),l&&((s?t.propertyCacheWithoutObjectFunctionPropertyAugment||(t.propertyCacheWithoutObjectFunctionPropertyAugment=Wi()):t.propertyCache||(t.propertyCache=Wi())).set(o,l),s&&!(oa(l)&48)&&!t.propertyCache?.get(o)&&(t.propertyCache||(t.propertyCache=Wi())).set(o,l))),l}function xa(t){if(t.flags&464781312){let o=tw(t);return o!==$s&&o!==_a?o:void 0}return t.flags&4194304?yr:void 0}function Uc(t,o){if(t===o)return t.resolvedApparentType||(t.resolvedApparentType=Xm(t,o,!0));let s=`I${Ca(t)},${Ca(o)}`;return ON(s)??MN(s,Xm(t,o,!0))}function sy(t){return t.resolvedApparentType||(t.resolvedApparentType=vP(t))}function vP(t){let o=t.target??t,s=IN(o);if(s&&!o.declaration.nameType){let l=VC(t),d=Rs(l)?sy(l):xa(l);if(d&&Vc(d,p=>cf(p)||FP(p)))return or(o,yy(s,d,t.mapper))}return t}function FP(t){return!!(t.flags&2097152)&&yi(t.types,cf)}function Ha(t){let o=t.flags&465829888?xa(t)||Mr:t,s=dt(o);return s&32?sy(o):s&4&&o!==t?Xm(o,t):o.flags&2097152?Uc(o,t):o.flags&402653316?nr:o.flags&256?Lr:o.flags&2048?Mt:o.flags&524288&&o.intrinsicName==="closure"?hr:o.flags&67108864?Bo:o.flags&4194304?yr:o.flags&2&&!G?Bo:o}function Gb(t){let o=gE(t.symbol);return o&&fE(o)}function $b(t,o){let s=t.symbol??Qp(o);E.assertIsDefined(s),Bn(o.heritageClauses,h=>XS(h));let l=by(s);ff(t,l,Re,Re,Re);let d=Ha(t);if(!s?.inherits)return t.resolvedBaseTypes=Re;let p=[d];return bc(s?.inherits,(h,x)=>{Bf(h);let I=Ha(h);p.push(I)}),t.resolvedBaseTypes=p}function Qb(t){t.resolvedBaseTypes=bO;let o=gE(t.symbol);if(o&&Vr(o))return $b(t,o);let s=Ha(U0(t));if(!(s.flags&2621441))return t.resolvedBaseTypes=Re;let l;if(s.flags&1?l=s:E.fail("todo - resolveBaseTypesOfClass"),da(l))return t.resolvedBaseTypes=Re;let d=Nl(l);return YS(d)?t===d||xw(d,t)?(hn(t.symbol.valueDeclaration,N.Type_0_recursively_references_itself_as_a_base_type,_t(t,void 0,2)),t.resolvedBaseTypes=Re):(t.resolvedBaseTypes===bO&&(t.members=void 0),t.resolvedBaseTypes=[d]):(console.debug("todo - isValidBaseType"),t.resolvedBaseTypes=Re)}function Bf(t){if(!t.baseTypesResolved){if(Op(t,6)&&(t.resolvedBaseTypes=[],t.symbol?.flags&96&&t.symbol.flags&32&&Qb(t),!Rp()&&t.symbol?.declarations))for(let o of t.symbol.declarations);t.baseTypesResolved=!0}return t.resolvedBaseTypes}function Yb(t,o,s){let l,d,p,h=t.flags&1048576,x,I=4,B=h?0:8,z=!1;for(let Qn of t.types){let Ct=Ha(Qn);if(!(da(Ct)||Ct.flags&131072)){let Rt=qo(Ct,o,s),Fr=Rt?Cu(Rt):0;if(Rt){if(Rt.flags&106500&&(x??(x=h?0:16777216),h?x|=Rt.flags&16777216:x&=Rt.flags),!l)l=Rt;else if(Rt!==l)if((KS(Rt)||Rt)===(KS(l)||l)&&IP(l,Rt,(jo,go)=>jo===go?-1:0)===-1)z=!!l.parent&&!!gr(Jm(l.parent));else{d||(d=new Map,d.set(so(l),l));let jo=so(Rt);d.has(jo)||d.set(jo,Rt)}h&&jm(Rt)?B|=8:!h&&!jm(Rt)&&(B&=-9),B|=(Fr&6?0:256)|(Fr&4?512:0)|(Fr&2?1024:0)|(Fr&256?2048:0),I=2}else if(h){let Wr=!rC(o)&&vp(Ct,o);Wr?(B|=32|(Wr.isReadonly?8:0),p=$r(p,Wr.type)):Lu(Ct)&&!(dt(Ct)&2097152)?(B|=32,p=$r(p,fr)):B|=16}}}if(!l||h&&(d||B&48)&&B&1536&&!(d&&wP(d.values())))return;if(!d&&!(B&16)&&!p)if(z){let Qn=Wo(l,ym)?.links,Ct=Bm(l,Qn?.type);return Ct.parent=l.valueDeclaration?.symbol?.parent,Ct.links.containingType=t,Ct.links.mapper=Qn?.mapper,Ct.links.writeType=Yh(l),Ct}else return l;let re=d?oo(d.values()):[l],pe,_e,on,pn=[],Kn,Nn,it=!1;for(let Qn of re){Nn?Qn.valueDeclaration&&Qn.valueDeclaration!==Nn&&(it=!0):Nn=Qn.valueDeclaration,pe=Ro(pe,Qn.declarations);let Ct=Xt(Qn);_e||(_e=Ct,on=at(Qn).nameType);let Rt=Yh(Qn);(Kn||Rt!==Ct)&&(Kn=$r(Kn||pn.slice(),Rt)),Ct!==_e&&(B|=64),Jf(Ct)&&(B|=128),Ct.flags&131072&&Ct!==yt&&(B|=131072),pn.push(Ct)}Ro(pn,p);let lt=Fo(4|(x??0),o,I|B);return lt.links.containingType=t,!it&&Nn&&(lt.valueDeclaration=Nn,Nn.symbol.parent&&(lt.parent=Nn.symbol.parent)),lt.declarations=pe,lt.links.nameType=on,pn.length>2?(lt.links.checkFlags|=65536,lt.links.deferralParent=t,lt.links.deferralConstituents=pn,lt.links.deferralWriteConstituents=Kn):(lt.links.type=h?vt(pn):Mi(pn),Kn&&(lt.links.writeType=h?vt(Kn):Mi(Kn))),lt}function jf(t,o){if(t.flags&524288){let l=Wu(t).members.get(o);if(l&&v0(l))return l}}function Mm(t){return Nl(Ha(Nl(t)))}function Xb(t,o,s){try{return i=o,Ys(t,()=>lA(t,s))}finally{i=void 0}}function lA(t,o){if(t){k0();let s=Zn.getGlobalDiagnostics(),l=s.length;N0(t,o);let d=Zn.getDiagnostics(t.fileName),p=Ar(t.statements,kh);if(Bn(p,x=>{let I=Zn.getDiagnostics(x.fileName);if(I.length){let B=wi(x,N.Include_file_0_contains_one_or_more_errors,tM(x));ia(B,...I),d.push(B)}}),o)return d;let h=Zn.getGlobalDiagnostics();if(h===s){if(l===0&&h.length>0)return Zr(h,d)}return d}return Bn(e.getSourceFiles(),s=>N0(s)),Zn.getDiagnostics()}function rf(t,o){In?.push(In.Phase.Check,o?"checkSourceFileNodes":"checkSourceFile",{path:t.path},!0);let s=o?"beforeCheckNodes":"beforeCheck",l=o?"afterCheckNodes":"afterCheck";po.mark(s),J=t,o?ene(t,o):Zee(t),J=void 0,po.mark(l),po.measure("Check",s,l),In?.pop()}function Wt(t){let o=ys(t);return Je[o]||(Je[o]=new nz)}function WS(t,o,s){if(s){let l=kt(t.get(o));if(l&&(l.flags&s||l.flags&2097152&&lT(l)&s))return l}}function cy(t){return Wt(t).declarationRequiresScopeChange}function Zb(t,o){Wt(t).declarationRequiresScopeChange=o}function uA(t){return!!(t.flags&33554432)&&Wm(t)}function da(t){return t===Gn||!!(t.flags&1&&t.aliasSymbol)}function IP(t,o,s){if(t===o)return-1;let l=Cu(t)&6,d=Cu(o)&6;if(l!==d)return 0;if(l){if(KS(t)!==KS(o))return 0}else if((t.flags&16777216)!==(o.flags&16777216))return 0;return jm(t)!==jm(o)?0:s(Xt(t),Xt(o))}function LP(t,o){return Sr(t,s=>s.keyType===o)}function eC(t){return t.flags&3670016?Wu(t).indexInfos??Re:Re}function za(t){return eC(Mm(t))}function Iu(t,o){return LP(za(t),o)}function Lu(t){return!!(dt(t)&128)}function Nd(t,o){return Iu(t,o)?.type}function AP(t,o){return o.properties.some(l=>{let d=l.name&&Ay(l.name),p=d&&_m(d)?Tm(d):void 0,h=p===void 0?void 0:al(t,p);return!!h&&Jf(h)&&!Ui(xt(l),h)})}function Np(t,o){return Ui(t,o)||o===Er&&Ui(t,Ht)||o===Ht&&!!(t.flags&128)&&Ag(t.value)}function nC(t,o){return za(t).filter(s=>Np(o,s.keyType))}function Kc(t,o){E.assertIsDefined(t);let s,l,d;for(let p of t)p.keyType===Er?s=p:Np(o,p.keyType)&&(l?(d||(d=[l])).push(p):l=p);return l||(s&&Np(o,Er)?s:void 0)}function kp(t,o){return Kc(za(t),o)}function US(t,o,s,l){let d=AC(t,s);return d.value=o,d.regularType=l||d,d}function rl(t){let o;return li.get(t)||(li.set(t,o=US(256,t)),o)}function Au(t){let o;return co.get(t)||(co.set(t,o=US(128,t)),o)}function dA(t){let o;return ua.get(t)||(ua.set(t,o=US(8192,t)),o)}function vp(t,o){return kp(t,Au(o))}function wP(t){let o;for(let s of t){if(!s.declarations)return;if(!o){o=new Set(s.declarations);continue}if(o.forEach(l=>{Gr(s.declarations,l)||o.delete(l)}),o.size===0)return}return o}function ka(t,o){if(t.flags&1048576){let s=t.types,l=Ar(s,o);if(l===s)return t;let d=t.origin,p;if(d&&d.flags&1048576){let h=d.types,x=Ar(h,I=>!!(I.flags&1048576)||o(I));if(h.length-x.length===s.length-l.length){if(x.length===1)return x[0];p=C(1048576,x)}}return qS(l,t.objectFlags&16809984,void 0,void 0,p)}return t.flags&131072||o(t)?t:Lt}function RP(t,o){return ka(t,s=>s!==o)}function of(t,o){return t}function Yh(t){let o=oa(t);return t.flags&4?of(Xt(t),!!(t.flags&16777216)):Xt(t)}function Bm(t,o){let s=Fo(t.flags,t.name,oa(t)&8);s.declarations=t.declarations,s.parent=t.parent,s.links.type=o,s.links.target=t,t.valueDeclaration&&(s.valueDeclaration=t.valueDeclaration);let l=at(t).nameType;return l&&(s.links.nameType=l),s}function jm(t){return!!(oa(t)&8||t.flags&98304&&!(t.flags&65536)||t.flags&8||Pn(t.declarations,ut))}function tC(t){return!!(t.flags&128)}function Jf(t){return t.flags&16?!0:t.flags&1048576?t.flags&1024?!0:yi(t.types,Dn):Dn(t)}function rC(t){return t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)===64}function Jm(t){if(!t.declarations)return;let o;for(let s of t.declarations)(s.kind===155||s.kind===170||s.kind===274||rE(s))&&(o=VA(o,hx(s)));return o}function KS(t){return oa(t)&1?t.links.target:t}function Wm(t){for(let o of t.statements)console.warn("Implement me - grammar check");return!1}function qS(t,o,s,l,d){if(t.length===0)return Lt;if(t.length===1)return t[0];let h=(d?d.flags&1048576?`|${uc(d.types)}`:d.flags&2097152?`&${uc(d.types)}`:`#${d.type.id}|${uc(t)}`:uc(t))+Py(s,l),x=Ua.get(h);return x||(x=Ut(1048576),x.objectFlags=o|Qt(t,98304),x.types=t,x.origin=d,x.aliasSymbol=s,x.aliasTypeArguments=l,t.length===2&&t[0].flags&512&&t[1].flags&512&&(x.flags|=16,x.intrinsicName="boolean"),Ua.set(h,x)),x}function Um(t){return t}function fA(t,o,s){t.name&&ni(t.name);let l=Yn(t.elements||Re,ni);return l.length===1?l[0]:Oi}function iC(t,o,s){let l=t.elements,d=l?.length||0,p=[],h=[],x=[];t0(t);let I=!1;for(let re=0;re<d;re++){let pe=l[re];if(Ae&&pe.kind===297)I=!0,h.push([rs]),x.push(2);else if(!Fh(pe)){let _e=m_(pe.name,o,s);p.push(_e),x.push(I?2:1),Bn(pe.elements,(on,pn)=>{let Kn=m_(on,o,s);h[pn]=h[pn]||[],h[pn].push(su(Kn,!0,I)),x.push(I?2:1)})}}i_();let B=Nl(vt(p,2)),z=h.length>1?Na(vt(h.map(re=>Nl(vt(re,2))))):h.length===1?Nl(vt(h[0],2)):G?ga:vn;return pA(zh(B,z,!1))}function Cs(t,o,s){let l=t.elements,d=l.length,p=[],h=[];t0(t);let x=Vd(t),I=!1,B=gC(t,void 0),z=!1,re=!1;for(let pe=0;pe<d;pe++){let _e=l[pe];if(_e.kind===294){let on=ni(_e.expression,o,s);if(rg(on))p.push(on),h.push(8);else if(x){let pn=Nd(on,Ht)||ly(65,on,fr,void 0,!1)||Mr;p.push(pn),h.push(4)}else p.push(Gp(33,on,fr,_e.expression)),h.push(4)}else if(Ae&&_e.kind===297)re=!0,p.push(rs),h.push(2);else{let on=m_(_e,o,s);if(p.push(su(on,!0,re)),h.push(re?2:1),z&&o&&o&2&&!(o&4)&&ol(_e)){let pn=tT(t);E.assert(pn),d6(pn,_e,on)}}}return i_(),x?mf(p,h):oC(s||I||z?mf(p,h,I&&!(B&&Id(B,Moe))):Na(p.length?vt(Za(p,(pe,_e)=>h[_e]&8?fy(pe,Ht)||wt:pe),2):G?ga:w,I))}function oC(t){if(!(dt(t)&4))return t;let o=t.literalType;return o||(o=t.literalType=aC(t),o.objectFlags|=147456),o}function pA(t){if(!(dt(t)&4))return t;let o=t.literalType;return o||(o=t.literalType=aC(t),o.objectFlags|=133120),o}function aC(t){let o=AC(t.flags,t.symbol);return o.objectFlags=t.objectFlags,o.target=t.target,o.resolvedTypeArguments=t.resolvedTypeArguments,o}function sC(t,o,s){return FC(t,!1,void 0,_t(o))}function ly(t,o,s,l,d){let p=(t&2)!==0;if(o===Lt){l&&sC(l,o,p);return}let x=!!0,I=Fe.noUncheckedIndexedAccess&&!!(t&128),B=o,z=!1;if(t&4){if(B.flags&1048576){let _e=o.types,on=Ar(_e,pn=>!(pn.flags&402653316));on!==_e&&(B=vt(on,2))}else B.flags&402653316&&(B=Lt);if(z=B!==o,z&&B.flags&131072)return I?$C(Er):Er}if(!rg(B)&&!Ty(B)){if(l){let _e=!!(t&4)&&!z,[on,pn]=pe(_e,x);FC(l,!1,on,_t(B))}return z?I?$C(Er):Er:void 0}let re=va(B)&&B.resolvedTypeArguments?Uo(B.resolvedTypeArguments):Nd(B,Ht);if(z&&re)return re.flags&402653316&&!Fe.noUncheckedIndexedAccess?Er:vt(I?[re,Er,fr]:[re,Er],2);if(Ty(B))return B.resolvedTypeArguments?.length?vt(B.resolvedTypeArguments):vn;return t&128?$C(re):re;function pe(_e,on){return on?_e?[N.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:[N.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:_e?[N.Type_0_is_not_an_array_type_or_a_string_type,!0]:[N.Type_0_is_not_an_array_type,!0]}}function cC(t,o,s){return t.flags&4194304?Xh(t,o):z0(t,t.expression,OP(t.expression,t,o)??Qm(t.expression,o),t.name,o,s)}function OP(t,o,s){if(t.kind===16)return x0(t);if(Sn(t))return;{let l=ni(t,s);if(l.flags&132){let d=t,h=Dy(o||t,d,l);if(h){let x=kC(h,d,!0);if(x&&Vr(x.valueDeclaration))return Xt(x)}}}}function Xh(t,o){let s=ni(t.expression),l=VS(s,t.expression);return HS(z0(t,t.expression,Fd(l,t.expression),t.name,o),t,l!==s)}function VS(t,o){return console.debug("todo - getOptionalExpressionType"),t}function HS(t,o,s){return t}function MP(t){return t}function R(t){return er(t,o=>{switch(o.kind){case 237:case 238:return!1;default:return!0}}).parent}function $(t){return tn===t||(tn=t,ot=ih(t)),ot}function oe(t){if(t){let s=Wt(t);return s.isVisible===void 0&&(s.isVisible=!!o()),s.isVisible}return!1;function o(){switch(t.kind){case 217:case 225:case 219:return!!(t.parent&&t.parent.parent&&t.parent.parent.parent&&Vr(t.parent.parent.parent));case 266:return oe(t.parent.parent);case 237:if(Po(t.name)&&!t.name.elements.length)return!1;case 239:case 169:let s=R(t);return!($(t)&2048)&&!(s.kind!==176&&s.flags&33554432)?!0:oe(s);case 152:case 153:if(ap(t,6))return!1;case 150:case 149:case 163:case 166:case 161:case 157:case 159:case 165:return oe(t.parent);case 148:case 176:return!0;default:return!1}}}function Ne(t,o){if(t=Ey(t),o.kind===89&&(jO(o)&&(o=o.parent),fm(o)&&(!Vd(o)||Lx(o)))){let s=cs(o);if(Ey(Wt(o).resolvedSymbol)===t)return s}return I9(o)&&Lx(o.parent)?Yh(t):Ze(t)}function Ze(t){return of(Xt(t),!!(t.flags&16777216))}function Dn(t){return!!(t.flags&101280)}function ut(t){return ao(t)&&console.warn("Implement me - isReadonlyAssignmentDeclaration"),!1}function _r(t){return t.valueDeclaration?OC(t.valueDeclaration):0}function Qt(t,o){let s=0;for(let l of t)(o===void 0||!(l.flags&o))&&(s|=dt(l));return s&458752}function Ri(t){return new u(Li,t)}function C(t,o){let s=Ri(t);return s.types=o,s}function Bt(t){if(t){let o=v;v=t,S=0,Jr(t),v=o}}function Jr(t){if(d4(t)&8388608)return;XT(t)&&Bn(t.jsDoc,({comment:s,tags:l})=>{W6(s),Bn(l,d=>{W6(d.comment),wr(t)&&Bt(d)})});let o=t.kind;if(i)switch(o){case 169:i.throwIfCancellationRequested()}switch(o>=242&&o<=256&&_F(t)&&t.flowNode&&!bC(t.flowNode)&&r4(Fe.allowUnreachableCode===!1,t,N.Unreachable_code_detected),o){case 148:return K6(t);case 149:return s6(t);case 252:return XS(t);case 178:return FA(t);case 241:return dy(t);case 258:case 166:return gA(t);case 152:return Fp(t);case 153:return wu(t);case 158:case 151:case 150:return YP(t);case 163:return Ip(t);case 161:return lr(t);case 157:case 159:return TA(t);case 165:case 160:return Bt(t.type);case 167:return See(t);case 263:E.fail("type operator");case 207:E.fail("augments");case 208:E.fail("implements");case 225:case 217:return iee(t);case 228:return ree(t);case 224:return oee(t);case 223:return aee(t);case 203:case 204:case 205:console.debug("todo - checkJSDocLinkLikeTag");return;case 220:return see(t);case 227:return cee(t);case 221:return lee(t);case 196:uee(t);case 194:case 193:case 191:case 192:case 201:No(t,Bt);return;case 197:console.debug("todo - checkJSDocVariadicType");return;case 188:return Bt(t.type);case 212:case 214:case 213:console.debug("todo - checkJSDocAccessibilityModifiers");return;case 230:console.debug("todo - checkJSDocSatisfiesTag");return;case 261:return AA(t);case 264:return IA(t);case 169:return Mn(t);case 236:return t4(t);case 242:return Mee(t);case 247:return vc(t);case 253:return Wf(t);case 245:return xA(t);case 246:return bA(t);case 243:return EA(t);case 244:return PA(t);case 251:case 250:return zZ(t);case 248:return SA(t);case 256:return Zh(t);case 237:qP(t);return;case 266:VP(t);return;case 170:E.fail("class declaration");case 239:E.fail("type alias");case 173:return void 0;case 255:return Bt(t.block);case 269:case 92:case 94:case 140:case 105:case 138:case 101:return;case 179:return;case 1:case 257:case 16:case 11:case 272:case 104:case 89:case 267:case 93:case 187:case 281:case 206:case 254:case 211:case 202:return}console.warn("Implement me - checkSourceElementWorker - "+E.formatSyntaxKind(t.kind))}function uo(t){}function vc(t){ni(t.expression)}function Wf(t){let o=uy(t.expression);P0(t.expression,o,t.thenStatement),Bt(t.thenStatement),Bt(t.elseStatement)}function Uf(t,o,...s){let l=Mc(t),d=$t(t);if(!OA(d)){let p=ph(l,t.pos);return Zn.add(sd(l,p.start,p.length,o,...s)),!0}return!1}function wu(t){return Fp(t)}function Fp(t){!_y(t)&&mA(t),XP(t)}function mA(t){if(!Sa(t.parent)){if(Bd(t.parent)&&(E.assertNode(t,Ff),t.initializer))return cc(t.initializer,N.A_type_literal_property_cannot_have_an_initializer)}}function gA(t){if(r6(t,t.typeArguments),t.kind===166&&!wr(t)&&!CF(t)&&t.typeArguments&&t.typeName.end!==t.typeArguments.pos){let o=$t(t);nV(o,t.typeName.end)===24&&QP(t,eo(o.text,t.typeName.end),1,N.JSDoc_types_can_only_be_used_inside_documentation_comments)}Bn(t.typeArguments,Bt),JP(t)}function BP(t){let o=rr(t);if(!da(o)){let s=Wt(t).resolvedSymbol;if(s)return jP(o,s)}}function jP(t,o){if(!da(t))return o.flags&524288&&at(o).typeParameters||(dt(t)&4?t.target.localTypeParameters:void 0)}function yA(t,o){let s,l,d=!0;for(let p=0;p<o.length;p++){let h=dc(o[p]);h&&(s||(s=i0(t,o),l=ws(o,s)),d=d&&Wp(s[p],or(h,l),t.typeArguments[p],N.Type_0_does_not_satisfy_the_constraint_1))}return d}function JP(t){let o=rr(t);if(!da(o)){t.typeArguments&&r(()=>{let l=BP(t);l&&yA(t,l)});let s=Wt(t).resolvedSymbol;s&&Pn(s.declarations,l=>pE(l)&&!!(l.flags&536870912))&&p_(Ru(t),s.declarations,s.name)}}function Ru(t){switch(t=$o(t),t.kind){case 272:case 276:return Ru(t.expression);case 281:return t.argumentExpression;case 286:return t.name;case 166:let o=t;return hl(o.typeName)?o.typeName.right:o;default:return t}}function Ip(t){Bn(t.members,Bt),r(o);function o(){let s=lC(t);WP(s,s.symbol),hA(t),UP(t)}}function WP(t,o,s){let l=za(t);if(l.length===0)return;for(let p of uf(t))s&&p.flags&4194304||Fc(t,p,mC(p,384,!0),Ze(p));let d=o.valueDeclaration;if(d&&Sa(d)){for(let p of d.members)if(!sS(p)&&!ht(p)){let h=rt(p);Fc(t,h,cs(p.name.expression),Ze(h))}}if(l.length>1)for(let p of l)zS(t,p)}function Fc(t,o,s,l){let d=o.valueDeclaration,p=ci(d);if(p&&Yc(p))return;let h=nC(t,s),x=dt(t)&2?kf(t.symbol,155):void 0,I=d&&d.kind===269||p&&p.kind===147?d:void 0,B=zf(o)===t.symbol?d:void 0;for(let z of h){let re=z.declaration&&zf(rt(z.declaration))===t.symbol?z.declaration:void 0,pe=B||re||(x&&!Pn(Bf(t),_e=>!!jf(_e,o.name)&&!!Nd(_e,z.keyType))?x:void 0);if(pe&&!Ui(l,z.type)){let _e=hi(pe,N.Property_0_of_type_1_is_not_assignable_to_2_index_type_3,Qi(o),_t(l),_t(z.keyType),_t(z.type));I&&pe!==I&&ia(_e,wi(I,N._0_is_declared_here,Qi(o))),Zn.add(_e)}}}function zS(t,o){let s=o.declaration,l=nC(t,o.keyType),d=dt(t)&2?kf(t.symbol,155):void 0,p=s&&zf(rt(s))===t.symbol?s:void 0;for(let h of l){if(h===o)continue;let x=h.declaration&&zf(rt(h.declaration))===t.symbol?h.declaration:void 0,I=p||x||(d&&!Pn(Bf(t),B=>!!Iu(B,o.keyType)&&!!Nd(B,h.keyType))?d:void 0);I&&!Ui(o.type,h.type)&&hn(I,N._0_index_type_1_is_not_assignable_to_2_index_type_3,_t(o.keyType),_t(o.type),_t(h.keyType),_t(h.type))}}function UP(t){let o=new Map;for(let s of t.members)if(s.kind===153){let l,d=s.name;switch(d.kind){case 16:case 11:l=d.text;break;case 89:l=ra(d);break;default:continue}o.get(l)?(hn(ci(s.symbol.valueDeclaration),N.Duplicate_identifier_0,l),hn(s.name,N.Duplicate_identifier_0,l)):o.set(l,!0)}}function hA(t){let o=g0(rt(t));if(o?.declarations){let s=new Map;for(let l of o.declarations)l.parameters.length===1&&l.parameters[0].type&&Ry(rr(l.parameters[0].type),d=>{let p=s.get(Ca(d));p?p.declarations.push(l):s.set(Ca(d),{type:d,declarations:[l]})});s.forEach(l=>{if(l.declarations.length>1)for(let d of l.declarations)hn(d,N.Duplicate_index_signature_for_type_0,_t(l.type))})}}function KP(t){let o=Wt(t);return o.resolvedType||(o.resolvedType=Lp(rt(t.typeParameter))),o.resolvedType}function lC(t){let o=Wt(t);if(!o.resolvedType){let s=qm(t);if(pf(t.symbol).size===0&&!s)o.resolvedType=nl;else{let l=Ku(16,t.symbol);l.aliasSymbol=s,l.aliasTypeArguments=my(s),Jd(t)&&t.isArrayType&&(l=Na(l)),o.resolvedType=l}}return o.resolvedType}function TA(t){Bn(t.types,Bt),rr(t)}function lr(t){Bt(t.elementType)}function Zh(t){let o,s=!1,l=ni(t.expression);Bn(t.caseBlock.clauses,d=>{d.kind===301&&!s&&(o===void 0?o=d:(cc(d,N.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),s=!0)),d.kind===299&&r(p(d)),Bn(d.statements,Bt),Fe.noFallthroughCasesInSwitch&&d.fallthroughFlowNode&&bC(d.fallthroughFlowNode)&&hn(d,N.Fallthrough_case_in_switch);function p(h){return()=>{let x=ni(h.expression);C0(l,x)||S4(x,l,h.expression,void 0)}}}),t.caseBlock.locals&&c_(t.caseBlock)}function SA(t){let o=U9(t);if(!o){Uf(t,N.A_return_statement_can_only_be_used_within_a_function_body);return}let s=to(o);E.assertIsDefined(s,"Container should have a signature");let l=$i(s),d=yl(o);if(G||t.expression||l.flags&131072){let p=t.expression?Ds(t.expression):fr;if(Ga(o)){let h=pC(l,d)??l;h&&Jp(p,h,t,t.expression)}}else Fe.noImplicitReturns&&!t6(o,l)&&hn(t,N.Not_all_code_paths_return_a_value)}function GS(t,o){if(__(t),o&&o&4&&ol(t)){if(!Vl(t)&&!FF(t)){let l=t_(t);if(l&&Bu($i(l))){let d=Wt(t);if(d.contextFreeType)return d.contextFreeType;let p=DC(t,o),h=df(void 0,void 0,void 0,Re,p,void 0,0,512),x=Lc(t.symbol,A,[h],Re,Re);return x.objectFlags|=262144,d.contextFreeType=x}}return Cl}let s=MA(t);return $S(t,o),Xt(rt(t))}function $S(t,o){let s=Wt(t);if(!(s.flags&64)){let l=t_(t);if(!(s.flags&64)){s.flags|=64;let d=ha(ro(Xt(rt(t)),0));if(!d)return;if((ol(t)||l&&!t.typeParameters&&l.parameters?.length>t.parameters?.length)&&console.debug("todo - contextuallyCheckFunctionExpressionOrObjectLiteralMethod"),l&&!Ga(t)&&!d.resolvedReturnType){let p=DC(t,o);d.resolvedReturnType||(d.resolvedReturnType=p)}YP(t)}}}function _A(t,o){let s=ni(t.expression,o);return Gp(33,s,fr,t.expression)}function qP(t){In?.push(In.Phase.Check,"checkVariableDeclaration",{kind:t.kind,pos:t.pos,end:t.end,path:t.tracingPath}),CA(t);let o=XP(t);return In?.pop(),o}function VP(t){return XP(t)}function xA(t){Bt(t.statement),uy(t.expression)}function bA(t){uy(t.expression),Bt(t.statement)}function CA(t){let s=OC(t)&1;return t.parent.parent.kind!==244&&t.parent.parent.kind!==243&&t.initializer,!!s}function DA(t){if(t.initializer.kind===238){let o=t.initializer;if(!o4(o)){let s=o.declarations;if(!s.length)return!1;let l=Bn(s,d=>d.initializer);if(l){let d=N.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer;return cc(l.parent.name,d)}}}return!1}function EA(t){t.initializer&&(t.initializer.kind===238?dC(t.initializer):ni(t.initializer)),t.condition&&uy(t.condition),t.incrementor&&ni(t.incrementor),Bt(t.statement),t.locals&&c_(t)}function PA(t){if(DA(t),t.initializer.kind===238){let o=t.initializer.declarations[0];o&&Po(o.name)&&hn(o.name,N.The_left_hand_side_of_a_for_each_statement_cannot_be_a_destructuring_pattern),dC(t.initializer)}else{let o=t.initializer,s=Tw(t),l=ni(o),d,p=ni(t.expression);if(o.kind===290||o.kind===293?hn(o,N.The_left_hand_side_of_a_for_each_statement_cannot_be_a_destructuring_pattern):XD(o)?(cT(o.left,N.The_left_hand_side_of_a_for_each_mapping_statement_must_be_a_variable_or_a_property_access,N.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access),cT(o.right,N.The_left_hand_side_of_a_for_each_mapping_statement_must_be_a_variable_or_a_property_access,N.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access),l=ni(o.left),d=ni(o.right),Ui(NA(p),l)||hn(o,N.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any)):Ui(p,l)?cT(o,N.The_left_hand_side_of_a_for_each_mapping_statement_must_be_a_variable_or_a_property_access,N.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access):hn(o,N.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any),s){if(XD(o)&&s.flags&1048576){let h=s;Jp(h.types.at(0)??Gn,l,o.left,t.expression),Jp(h.types.at(1)??Gn,d,o.right,t.expression)}else Jp(s,l,o,t.expression);return}else!xo(o)&&!XD(o)&&cT(o,N.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access,N.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access);(p===Lt||!Os(p,126091268))&&hn(t.expression,N.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0,_t(p))}Bt(t.statement),t.locals&&c_(t)}function NA(t){let o=qZ(ju(t));return o.flags&131072?Er:o}function QS(t,o){return t.flags&16384&&hn(o,N.An_expression_of_type_void_cannot_be_tested_for_truthiness),t}function uy(t,o){return QS(ni(t,o),t)}function dy(t){_y(t),Bt(t.type)}function HP(t){let o=!1,s=!1;return console.info("todo - checkGrammarClassDeclarationHeritageClauses"),!0}function kA(t){let o=$t(t);return HP(t)}function Vj(t){kA(t),Vr(t)||(t.name,void 0);let o=rt(t),s=as(o),l=Xt(o);Tt(o),zP(t);let d=fE(t);console.debug("todo - checkClassLikeDeclaration")}function YS(t){if(t.flags&262144){let o=xa(t);if(o)return YS(o)}return!!(t.flags&67633153&&!Rs(t)||t.flags&2097152&&yi(t.types,YS))}function zP(t){let o=new Map,s=new Map,l=new Map;if(Vr(t))return;for(let p of t.members){let h=p.name;if(!h)continue;let x=o,I=h&&vA(h);if(I)switch(p.kind){case 152:d(x,h,I,3);break;case 154:d(x,h,I,8);break}}function d(p,h,x,I){let B=p.get(x);if(B){let z=!!(B&8),re=!!(I&8);z||re?z!==re&&hn(h,N.Duplicate_identifier_0,ml(h)):B&I&-17?hn(h,N.Duplicate_identifier_0,ml(h)):p.set(x,B|I)}else p.set(x,I)}}function vA(t){let o=Rg(t);return o||(ps(t)?uC(cs(t.expression)):void 0)}function uC(t){return t.flags&384?""+t.value:void 0}function dC(t){let o=rm(t)&1;Bn(t.declarations,Bt)}function FA(t){t.flags&16||(t.text||hn(t,N.Cannot_find_include_file_0,tM(t)),Bn(t.statements,Bt),Bt(t.endOfFileToken))}function XS(t){let o=$t(t),s=Qp(o);s.inherits??(s.inherits=new Map);let l=t.inheritClause,d=ni(l),p=Dy(t,l,d);if(p){let h=kC(p,l,!0);if(h){let x=Xt(h);s.inherits.set(p.name,x)}}}function IA(t){Km(t),Bt(t.typeParameter),Bt(t.nameType),Bt(t.type),t.type||Ma(t,wt);let o=ZS(t),s=Ou(o);if(s)Wp(s,yr,t.nameType);else{let l=uu(o);Wp(l,yr,OD(t.typeParameter))}}function Ou(t){return t.declaration.nameType?t.nameType||(t.nameType=or(rr(t.declaration.nameType),t.mapper)):void 0}function LA(t){let o=Wt(t);if(!o.resolvedType){let s=rr(t.checkType),l=qm(t),d=my(l),p=n_(t,!0),h=d?p:Ar(p,I=>N6(I,t)),x={node:t,checkType:s,extendsType:rr(t.extendsType),isDistributive:!!(s.flags&262144),inferTypeParameters:R0(t),outerTypeParameters:h,instantiations:void 0,aliasSymbol:l,aliasTypeArguments:d};o.resolvedType=zA(x,void 0,!1),h&&(x.instantiations=new Map,x.instantiations.set(uc(h),o.resolvedType))}return o.resolvedType}function ZS(t){let o=Wt(t);if(!o.resolvedType){let s=Ku(32,t.symbol);s.declaration=t,s.aliasSymbol=qm(t),s.aliasTypeArguments=my(s.aliasSymbol),o.resolvedType=s,uu(s)}return o.resolvedType}function Km(t){if(t.members?.length)return cc(t.members[0],N.A_mapped_type_may_not_declare_properties_or_methods)}function AA(t){Bt(t.objectType),Bt(t.indexType),cn(Kf(t),t)}function Kf(t){let o=Wt(t);if(!o.resolvedType){let s=rr(t.objectType),l=rr(t.indexType),d=qm(t);o.resolvedType=ou(s,l,0,t,d,my(d))}return o.resolvedType}function cn(t,o){if(!(t.flags&8388608))return t;let s=t.objectType,l=t.indexType,d=Rs(s)&&GA(s)===2?O6(s,0):ju(s,0),p=!!Iu(s,Ht);if(Vc(l,h=>Ui(h,d)||p&&Np(h,Ht)))return o.kind===281&&Vd(o)&&dt(s)&32&&Un(s)&1&&hn(o,N.Index_signature_in_type_0_only_permits_reading,_t(s)),t;if(f0(s)){let h=T6(l,o);if(h){let x=Ry(Ha(s),I=>qo(I,h));if(x&&Cu(x)&6)return hn(o,N.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter,h),Gn}}return hn(o,N.Type_0_cannot_be_used_to_index_type_1,_t(l),_t(s)),Gn}function Un(t){let o=t.declaration;return(o.readonlyToken?o.readonlyToken.kind===42?2:1:0)|0}function Mn(t){_y(t),r(o);function o(){tr(t),t.name}}function ht(t){return!0}function Tt(t){r(()=>fee(t))}function tr(t){YP(t);let o=yl(t);if(ht(t)){let p=rt(t),h=t.localSymbol||p,x=h.declarations?.find(I=>I.kind===t.kind);t===x&&Tt(h),p.parent&&Tt(p)}let s=t.body;Bt(s),n6(t,Ga(t)),r(d);let l=ch(t);l&&l.typeExpression&&!XA(rr(l.typeExpression),t)&&hn(l.typeExpression.type,N.The_type_of_a_function_declaration_must_match_the_function_s_signature);function d(){Vl(t)||(Da(s)&&Ma(t,wt),o&1&&lm(s)&&$i(to(t)))}}function bi(t){let o;for(let s of hx(t))o=dg(o,Lp(s.symbol));return o?.length?o:Is(t)?af(t)?.typeParameters:void 0}function to(t){let o=Wt(t);if(!o.resolvedSignature){let s=[],l=0,d=0,p,h=wr(t)?nF(t):void 0,x=!1,I=dm(t),B=!1;!I&&wr(t)&&zF(t)&&!j5(t)&&!YT(t)&&(l|=256),$(t)&512&&(l|=8),nc(t)&&(l|=16);for(let pn=B?1:0;pn<t.parameters?.length;pn++){let Kn=t.parameters[pn];if(wr(Kn)&&oF(Kn)){h=Kn;continue}let Nn=Kn.symbol,it=hc(Kn)?Kn.typeExpression&&Kn.typeExpression.type:Kn.type;Nn&&Nn.flags&4&&!Po(Kn.name)&&(Nn=Or(Kn,Nn.name,111551,void 0,!1)),pn===0&&Nn.name==="this"?(x=!0,p=Kn.symbol):s.push(Nn),it&&it.kind===257&&(l|=2),d=s.length}h&&h.typeExpression&&(p=Bm(Fo(1,"this"),rr(h.typeExpression)));let pe=Ef(t)?NF(t):t,_e=pe&&vh(pe)?$m(kt(pe.parent.symbol)):void 0,on=_e?_e.localTypeParameters:bi(t);(k5(t)||wr(t)&&ru(t,s))&&(l|=1),o.resolvedSignature=df(t,on,p,s,void 0,void 0,d,l)}return o.resolvedSignature}function ru(t,o){return!1}function Ma(t,o,s){console.warn("Implement me - reportImplicitAny")}function Ga(t){let o=Vl(t);if(Ef(t)){let s=Tx(t);if(s&&vh(s.parent)&&!o)return $m(kt(s.parent.parent.symbol))}return o?qg(o)&&t.type?vt([xs,rr(t.type)]):rr(o):Mu(t)}function Mu(t){let o=af(t);return o&&$i(o)}function af(t){if(!$c(t))return;let o=ch(t);return o?.typeExpression&&Up(rr(o.typeExpression))}function rr(t){return wX(Xj(t),t)}function ba(t){return t.flags&2976?t.regularType:t.flags&1048576?t.regularType||(t.regularType=Fa(t,ba)):t}function hX(t){let o=Wt(t);if(!o.resolvedType){if(t.parent&&(s(t)||qg(t.parent))&&(ji(t.literal)||br(t.literal))){let l=t.literal,d=Dy(t,l,void 0),p=kC(d,l,!0);if(p&&Vr(p.valueDeclaration)){let h=Xt(p);o.resolvedType=h}}o.resolvedType||(o.resolvedType=ba(ni(t.literal)))}return o.resolvedType&&t.parent&&e2(t.parent.parent)&&(o.resolvedType.flags|=-2147483648),o.resolvedType;function s(l){return Bg(l)||l.parent&&Bg(l.parent)||l.parent.parent&&Bg(l.parent.parent)||l.parent.parent.parent&&Bg(l.parent.parent.parent)}}function TX(t){switch(t.kind){case 258:case 166:return t.typeName;case 280:let o=t.expression;if(Ks(o))return o}}function eT(t,o,s){let l=TX(t);if(!l)return ko;let d=Il(l,o,s);return d&&d!==ko?d:s?ko:GP(l)}function GP(t){let s=(t.kind===146?t.right:t.kind===286?t.name:t).text;if(s){let l=t.kind===146?GP(t.left):t.kind===286?GP(t.expression):void 0,d=l?`${Hj(l)}.${s}`:s,p=wm.get(d);return p||(wm.set(d,p=Fo(524288,s,1048576)),p.parent=l,p.links.declaredType=zs),p}return ko}function Hj(t){return t.parent?`${Hj(t.parent)}.${t.name}`:t.name}function SX(t,o){console.debug("getTypeFromClassOrInterfaceReference?");let s=as(kt(o));return s}function _X(t,o){let s=Wt(t);if(!s.resolvedJSDocType){let d=Xt(o);o.valueDeclaration,s.resolvedJSDocType=d}return s.resolvedJSDocType}function zj(t,o){if(o===ko)return Gn;if(o.flags&96)return SX(t,o);if(o.flags&524288)return xX(t,o);let s=e6(o);if(s)return Vf(t,o)?ba(s):Gn;if(o.flags&111551&&$P(t)){let l=_X(t,o);return l||(eT(t,788968),Xt(o))}return Gn}function Gj(t){let o=t.declarations?.find(rE);return!!(o&&wx(o))}function xX(t,o){if(oa(o)&1048576){let d=[],p=Py(o,d),h=Rm.get(p);return h||(h=un(1,"error",void 0,`alias ${p}`),h.aliasSymbol=o,h.aliasTypeArguments=d,Rm.set(p,h)),h}let s=as(o),l=at(o).typeParameters;if(l){let d=gr(t.typeArguments),p=lf(l);if(d<p||d>l.length)return hn(t,p===l.length?N.Generic_type_0_requires_1_type_argument_s:N.Generic_type_0_requires_between_1_and_2_type_arguments,Qi(o),p,l.length),Gn;let h=qm(t),x=h&&(Gj(o)||!Gj(h))?h:void 0,I;if(x)I=my(x);else if(J5(t)){let B=eT(t,2097152,!0);if(B&&B!==ko){let z=cu(B);z&&z.flags&524288&&(x=z,I=h0(t)||(l?[]:void 0))}}return lw(o,h0(t),x,I)}return Vf(t,o)?s:Gn}function bX(t){let o=Wt(t);if(!o.resolvedType){let s=qm(t),l=Yn(t.types,rr),d=l.length===2?l.indexOf(nl):-1,h=!!((d>=0?l[1-d]:Mr).flags&76);o.resolvedType=Mi(l,h?1:0,s,my(s))}return o.resolvedType}function CX(t){let o=Wt(t);if(!o.resolvedType){let s=qm(t);o.resolvedType=vt(Yn(t.types,rr),1,s,my(s))}return o.resolvedType}function DX(t){return!1}function $j(t){switch(t.kind){case 165:return $j(t.type);case 162:t.elements.length===1&&(t=t.elements[0],console.debug("todo - array element"));break;case 161:return t.elementType}}function EX(t){let o=DX(t.parent);if($j(t))return o?Ue:Y;let l=Yn(t.elements,Qj);return Fw(l,o,Yn(t.elements,PX))}function PX(t){console.debug("todo - memberIfLabeledElementDeclaration")}function Qj(t){return console.debug("todo - getTupleElementFlags"),1}function NX(t){E.assert(t.kind===138||t.kind===98);let o=Wt(t);return o.resolvedType||(o.resolvedType=hr),o.resolvedType}function kX(t){let o=Wt(t);if(!o.resolvedType){let s=EX(t);if(s===As)o.resolvedType=Bo;else if(!(t.kind===162&&Pn(t.elements,l=>!!(Qj(l)&8)))&&vX(t))o.resolvedType=t.kind===162&&t.elements.length===0?s:D6(s,t,void 0);else{let l=t.kind===161?[rr(t.elementType)]:Yn(t.elements,rr);o.resolvedType=UA(s,l)}}return o.resolvedType}function vX(t,o){return!!qm(t)||Yj(t)&&(t.kind===161?qf(t.elementType):t.kind===162?Pn(t.elements,qf):o||Pn(t.typeArguments,qf))}function qf(t){switch(t.kind){case 166:return $P(t)||!!(eT(t,788968).flags&524288);case 164:return!0;case 263:return console.debug("todo - mayResolveTypeAlias"),!1;case 165:case 262:case 195:case 193:case 194:case 188:return qf(t.type);case 160:return console.debug("todo - mayResolveTypeAlias"),!1;case 157:case 159:return Pn(t.types,qf);case 261:return qf(t.objectType)||qf(t.indexType);case 168:return qf(t.checkType)||qf(t.extendsType)||qf(t.trueType)||qf(t.falseType)}return!1}function Yj(t){let o=t.parent;switch(o.kind){case 165:case 262:case 166:case 157:case 159:case 261:case 168:case 263:case 161:case 162:return Yj(o);case 239:return!0}return!1}function Xj(t){switch(E.assertIsDefined(t),t.kind){case 97:case 191:case 192:return wt;case 102:return Mr;case 94:return Er;case 134:case 92:return Co;case 93:return Xr;case 104:return Be;case 107:case 108:return xl;case 105:return bt;case 101:return Jc;case 95:return Pr;case 138:case 98:return NX(t);case 140:return eu;case 257:return hX(t);case 161:return kX(t);case 157:return CX(t);case 159:return bX(t);case 258:case 166:return fC(t);case 167:return Gi;case 195:return su(rr(t.type));case 165:case 194:case 188:return rr(t.type);case 163:case 201:case 196:case 202:return lC(t);case 261:return Kf(t);case 264:return ZS(t);case 168:return LA(t);case 259:return KP(t);case 89:case 286:let o=Fl(t);return o?as(o):Gn;default:return console.warn("Implement me - getTypeFromTypeNodeWorker "+E.formatSyntaxKind(t.kind)),Gn}}function $P(t){return!!(t.flags&16777216)&&t.kind===166}function Vf(t,o){return t.typeArguments?(hn(t,N.Type_0_is_not_generic,o?Qi(o):t.typeName?Fs(t.typeName):vfe),!1):!0}function FX(t){let o=[];for(let s of t)if(s.flags&2097152&&dt(s)&67108864){let l=s.types[0].flags&8650752?0:1;fu(o,s.types[l])}for(let s of o){let l=[];for(let p of t)if(p.flags&2097152&&dt(p)&67108864){let h=p.types[0].flags&8650752?0:1;p.types[h]===s&&jC(l,p.types[1-h])}let d=xa(s);if(Vc(d,p=>vl(l,p))){let p=t.length;for(;p>0;){p--;let h=t[p];if(h.flags&2097152&&dt(h)&67108864){let x=h.types[0].flags&8650752?0:1;h.types[x]===s&&vl(l,h.types[1-x])&&pg(t,p)}}jC(t,s)}}}function Zj(t){if(Sn(t.typeName)){let o=t.typeArguments;switch(t.typeName.text){case"string":return Vf(t),Er;case"int":return Vf(t),Co;case"float":return Vf(t),Xr;case"mixed":return Vf(t),wt;case"void":return Vf(t),bt;case"undefined":return Vf(t),fr;case"null":return Vf(t),De;case"Function":case"function":return Vf(t),j;case"array":return(!o||!o.length)&&!$e?Oi:void 0;case"object":if(o&&o.length===2){if(uM(t)){let s=rr(o[0]),l=rr(o[1]),d=s===Er||s===Ht?[Kp(s,l,!1)]:Re;return Lc(void 0,A,Re,Re,d)}return wt}return Vf(t),$e?void 0:wt;default:console.debug("todo - unhandled jsdoc type ref name "+t.typeName.text)}}}function fC(t){let o=Wt(t);if(!o.resolvedType){let s,l,d=788968;$P(t)&&(l=Zj(t),l||(s=eT(t,d,!0),s===ko?s=eT(t,d|111551):eT(t,d),l=zj(t,s))),l||(s=eT(t,d),l=zj(t,s)),o.resolvedSymbol=s,o.resolvedType=l}return o.resolvedType}function as(t){return e6(t)||Gn}function e6(t){if(t.flags&96)return $m(t);if(t.flags&524288)return IX(t);if(t.flags&262144)return Lp(t);if(t.flags&2097152)return LX(t)}function IX(t){let o=at(t);if(!o.declaredType){if(!Op(t,2))return Gn;let s=E.checkDefined(t.declarations?.find(rE),"Type alias symbol with no valid declaration found"),l=jd(s)?s.typeExpression:s.type,d=l?rr(l):Gn;if(Rp()){let p=Jm(t);p&&(o.typeParameters=p,o.instantiations=new Map,o.instantiations.set(uc(p),d))}else d=Gn,hn(pl(s)&&s.name||s,N.Type_alias_0_circularly_references_itself,Qi(t));o.declaredType??(o.declaredType=d)}return o.declaredType}function LX(t){let o=at(t);return o.declaredType||(o.declaredType=as(cu(t)))}function sf(t){return t.flags&33554432?sf(t.baseType):t.flags&8388608&&(t.objectType.flags&33554432||t.indexType.flags&33554432)?ou(sf(t.objectType),sf(t.indexType)):t}function AX(t,o,s){return sf(rr(o))===sf(t)?rr(s):void 0}function wX(t,o){let s,l=!0;for(;o&&!im(o)&&o.kind!==199;){let d=o.parent;if(d.kind===149&&(l=!l),(l||t.flags&8650752)&&d.kind===168&&o===d.trueType){let p=AX(t,d.checkType,d.extendsType);p&&(s=$r(s,p))}else if(t.flags&262144&&d.kind===264&&!d.nameType&&o===d.type){let p=rr(d);if(il(p)===sf(t)){let h=IN(p);if(h){let x=dc(h);x&&Vc(x,cf)&&console.debug("todo - getConditionalFlowTypeOfType - homomorphic mapped type")}}}o=d}return t}function pC(t,o){return!!(o&2)?wA(t)||Gn:t}function wA(t,o,s,...l){return console.warn("Implement me - getAwaitedTypeNoAlias"),t}function vo(t,o){if(t.flags&o)return!0;if(t.flags&3145728){let s=t.types;for(let l of s)if(vo(l,o))return!0}return!1}function RA(t){return t.endFlowNode&&bC(t.endFlowNode)}function n6(t,o){r(s);return;function s(){let l=yl(t),d=o&&pC(o,l);if(d&&(vo(d,16384)||d.flags&32769)||Da(t.body)||t.body.kind!==236||!RA(t))return;let p=t.flags&1024,h=Vl(t)||t;if(d&&d.flags&131072)hn(h,N.A_function_returning_never_cannot_have_a_reachable_end_point);else if(d&&!p)hn(h,N.A_function_whose_declared_type_is_not_void_must_return_a_value);else if(d&&G&&!Ui(fr,d))hn(h,N.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);else if(Fe.noImplicitReturns){if(!d){if(!p)return;let x=$i(to(t));if(t6(t,x))return}hn(h,N.Not_all_code_paths_return_a_value)}}}function t6(t,o){let s=pC(o,yl(t));return!!(s&&(vo(s,16384)||s.flags&32769))}function OA(t){return t.parseDiagnostics.length>0}function cc(t,o,...s){let l=$t(t);return OA(l)?!1:(Zn.add(wi(t,o,...s)),!0)}function RX(t){return console.warn("Implement me - checkGrammarIndexSignatureParameters"),!1}function OX(t){return _y(t)||RX(t)}function MA(t){let o=$t(t);return _y(t)||MX(t.typeParameters,o)||jX(t.parameters)}function MX(t,o){if(t&&t.length===0){let s=t.pos-1,l=eo(o.text,t.end)+1;return QP(o,s,l-s,N.Type_parameter_list_cannot_be_empty)}return!1}function YSe(t){return r6(t,t.typeArguments)}function r6(t,o){return i6(o)||BX(t,o)}function BX(t,o){if(o&&o.length===0){let s=$t(t),l=o.pos-1,d=eo(s.text,o.end)+1;return QP(s,l,d-l,N.Type_argument_list_cannot_be_empty)}return!1}function QP(t,o,s,l,...d){let p=$t(t);return OA(p)?!1:(Zn.add(sd(p,o,s,l,...d)),!0)}function i6(t,o=N.Trailing_comma_not_allowed){return t&&t.hasTrailingComma?QP(t[0],t.end-1,1,o):!1}function jX(t){let o=!1,s=t?.length??0;for(let l=0;l<s;l++){let d=t[l];if(d.dotDotDotToken){if(l!==s-1)return cc(d.dotDotDotToken,N.A_rest_parameter_must_be_last_in_a_parameter_list);if(d.flags&33554432||i6(t,N.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma),d.initializer)return cc(d.name,N.A_rest_parameter_cannot_have_an_initializer)}}}function YP(t){t.kind===150?OX(t):t.kind===169&&MA(t);let o=yl(t);dee(t),Bn(t.parameters,s6),t.type&&Bt(t.type),r(s);function s(){let l=Vl(t),d=l;if(wr(t)){let p=ch(t);if(p&&p.typeExpression&&vf(p.typeExpression.type)){let h=Up(rr(p.typeExpression));h&&h.declaration&&(l=Vl(h.declaration),d=p.typeExpression.type)}}if(l&&d){let p=yl(t)}t.kind!==150&&t.kind!==196&&c_(t)}}function XP(t){if(To(t)||Bt(t.type),!t.name)return Gn;if(To(t)){if(t.propertyName&&Sn(t.name)&&Th(t)&&Da(wx(t).body))return;let l=t.parent.parent,d=t.dotDotDotToken?32:0,p=fJ(l,d),h=t.propertyName||t.name;if(p&&!Po(h)){let x=Ay(h);if(_m(x)){let I=Tm(x),B=qo(p,I);B&&(m0(B,void 0,!1),m4(t,!!l.initializer&&l.initializer.kind===71,!1,p,B))}}}if(Po(t.name)&&Bn(t.name.elements,Bt),t.initializer&&Th(t)&&Da(wx(t).body)){hn(t,N.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);return}if(Po(t.name)){if(c6(t))return wt;let l=mx(t)&&t.initializer&&t.parent.parent.kind!==244,d=!1;if(l||d){let p=mN(t);if(l){let h=Ds(t.initializer);G&&d?o6(h,t):Jp(h,mN(t),t,t.initializer)}d&&(hS(t.name)?Gp(65,p,fr,t):G&&o6(p,t))}return xt(t)}let o=rt(t);if(o.flags&2097152&&(Ix(t)||W9(t)))return JX(t),xt(t);let s=BN(Xt(o));if(t===o.valueDeclaration){let l=mx(t)&&LF(t);if(l&&!(wr(t)&&ms(l)&&l.properties.length===0&&!!o.exports?.size)&&t.parent.parent.kind!==244){let p;if(Kl(l)){Ds(l);let h=ZC(l);p=$i(h)}else p||(p=Ds(l));Jp(p,s,t,l,void 0)}o.declarations&&o.declarations.length>1&&Pn(o.declarations,d=>d!==t&&jx(d)&&!a6(d,t))&&hn(t.name,N.All_declarations_of_0_must_have_identical_modifiers,Fs(t.name))}else{let l=BN(mN(t));!da(s)&&!da(l)&&!nT(s,l)&&!(o.flags&67108864)&&l6(o.valueDeclaration,s,t,l),mx(t)&&t.initializer&&Jp(Ds(t.initializer),l,t,t.initializer,void 0),o.valueDeclaration&&!a6(t,o.valueDeclaration)&&hn(t.name,N.All_declarations_of_0_must_have_identical_modifiers,Fs(t.name))}return t.kind!==152&&t.kind!==153&&((t.kind===237||t.kind===266)&&VX(t),t.name,void 0),xt(t)}function o6(t,o){let s=Fd(t,o);if(s.flags&16384){if(Ks(o)){let l=Wd(o);if(Sn(o)&&l==="undefined")return hn(o,N.The_value_0_cannot_be_used_here,l),s;if(l.length<100)return hn(o,N._0_is_possibly_undefined,l),s}hn(o,N.Object_is_possibly_undefined)}return s}function a6(t,o){if(t.kind===149&&o.kind===237||t.kind===237&&o.kind===149)return!0;let s=262;return bF(t,s)===bF(o,s)}function JX(t){let o=rt(t),s=cu(o);if(s!==ko){o=kt(o.exportSymbol||o);let l=lT(s),d=(o.flags&1160127?111551:0)|(o.flags&788968?788968:0)|(o.flags&1920?1920:0);l&d&&E.fail("Shouldn't have a symbol conflict here.")}}function s6(t){_y(t),XP(t);let o=wx(t);xu(t,167),t.name&&Sn(t.name)&&(t.name.text==="this"||t.name.text==="new")&&o.parameters.indexOf(t)!==0&&hn(t,N.A_0_parameter_must_be_the_first_parameter,t.name.text),t.dotDotDotToken&&!Po(t.name)&&!Ui(Nl(Xt(t.symbol)),Hr)&&hn(t,N.A_rest_parameter_must_be_of_an_array_type)}function Nl(t){return t.flags&1048576&&t.objectFlags&16777216?t.resolvedReducedType||(t.resolvedReducedType=qX(t)):t.flags&2097152?(t.objectFlags&16777216||(t.objectFlags|=16777216|(Pn(q0(t),WX)?33554432:0)),t.objectFlags&33554432?Lt:t):t}function WX(t){return UX(t)||KX(t)}function UX(t){return!(t.flags&16777216)&&(oa(t)&131264)===192&&!!(Xt(t).flags&131072)}function KX(t){return!t.valueDeclaration&&!!(oa(t)&1024)}function qX(t){let o=Za(t.types,Nl);if(o===t.types)return t;let s=vt(o);return s.flags&1048576&&(s.resolvedReducedType=s),s}function nT(t,o){return Vu(t,o,Ra)}function c6(t){return!!(t.flags&33554432)}function XSe(t){}function VX(t){if(OC(t)&1||Th(t))return;let o=rt(t);if(o.flags&1){if(!Sn(t.name))return E.fail();let s=Or(t,t.name.text,3,void 0,!1);if(s&&s!==o&&s.flags&2&&_r(s)&1){let l=pm(s.valueDeclaration,238),d=l.parent.kind===242&&l.parent.parent?l.parent.parent:void 0;if(!(d&&(d.kind===236&&Ji(d.parent)||d.kind===176))){let h=Qi(s);hn(t,N.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,h,h)}}}}function l6(t,o,s,l){let d=ci(s),p=s.kind===152?N.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:N.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,h=Fs(d),x=hn(d,p,h,_t(o),_t(l));t&&ia(x,wi(t,N._0_was_also_declared_here,h))}function ZP(t,o,s){r(()=>{$e&&dt(o)&65536&&(!s||!BA(t))&&(ZA(o)||Ma(t,o,s))})}function BA(t){return Jx(t)?t_(t):void 0}function HX(t,o){for(let s=ke-1;s>=0;s--)if(t===qe[s]&&(o||!Jn[s]))return s;return-1}function jA(t){t=Ha(t);let o=Wi(Ba(t)),s=ro(t,0).length?$n:ro(t,1).length?di:void 0;return s&&Bn(Ba(s),l=>{o.has(l.name)||o.set(l.name,l)}),LC(o)}function zX(t){let o=vt(t);if(!(o.flags&1048576))return jA(o);let s=Wi();for(let l of t)for(let{name:d}of jA(l))if(!s.has(d)){let p=Yb(o,d);p&&s.set(d,p)}return oo(s.values())}function GX(t,o){if(__(t),fs(t)&&(t.name,void 0),o&&o&4&&ol(t)){if(!Vl(t)&&!FF(t)){let l=t_(t);if(l&&Bu($i(l))){let d=Wt(t);if(d.contextFreeType)return d.contextFreeType;let p=DC(t,o),h=df(void 0,void 0,void 0,Re,p,void 0,0,512),x=Lc(t.symbol,A,[h],Re,Re);return x.objectFlags|=262144,d.contextFreeType=x}}return Cl}let s=MA(t);return $S(t,o),Xt(rt(t))}function $X(t,o){return u6(t,o)}function u6(t,o){let{type:s,expression:l}=_4(t),d=ni(l,o),p=Wt(t);return p.assertionExpressionType=d,Bt(s),__(t),rr(s)}function d6(t,o,s){(t.intraExpressionInferenceSites??(t.intraExpressionInferenceSites=[])).push({node:o,type:s})}function QX(t,o){return nc(t)&&xm(t)?u6(t,o):ni(t.expression,o)}function YX(t,o){let{type:s,arguments:l}=t,d=fC(s),p=Wt(t);return Bt(s),__(t),XX(t,o),rr(s)}function XX(t,o=0){if(!t.arguments)return;let s=Vd(t),l=G?Wi():void 0,d=Wi(),p=[],h=Bo;t0(t);let x=gC(t,void 0),I=0,B=8192,z=!1,re=!1,pe=!1,_e=!1,on=0;if(t.arguments&&dd(Uo(t.arguments)))for(let Nn of t.arguments){let it=rt(Nn);if(Nn.kind===174||Nn.kind===175||Kx(Nn)){let lt=Nn.kind===174?y3(Nn,o):Nn.kind===175?m_(!s&&Nn.objectAssignmentInitializer?Nn.objectAssignmentInitializer:Nn.name,o):void 0;B|=dt(lt)&458752;let Qn=Fo(4|it.flags,it.name,I);if(Qn.declarations=it.declarations,Qn.parent=it.parent,it.valueDeclaration&&(Qn.valueDeclaration=it.valueDeclaration),Qn.links.type=lt,Qn.links.target=it,it=Qn,l?.set(Qn.name,Qn),x&&o&2&&!(o&4)&&Nn.kind===174&&ol(Nn)){let Ct=tT(t);E.assert(Ct);let Rt=Nn.kind===174?Nn.initializer:Nn;d6(Ct,Rt,lt)}}d.set(it.name,it),p.push(it)}if(i_(),da(h))return Gn;return Kn();function Kn(){let Nn=[];re&&Nn.push(f6(t,on,p,Er)),pe&&Nn.push(f6(t,on,p,Ht));let it=Lc(t.symbol,d,Re,Re,Nn);return it.objectFlags|=B|128|131072,z&&(it.objectFlags|=512),it}}function f6(t,o,s,l){let d=[];for(let h=o;h<s.length;h++){let x=s[h];(l===Er&&!nZ(x)||l===Ht&&eZ(x))&&d.push(Xt(s[h]))}let p=d.length?vt(d,2):fr;return Kp(l,p,!1)}function ZX(t){switch(t.kind){case 89:return Ag(t.text);case 10:case 16:return Ag(t.text);default:return!1}}function eZ(t){let o=t.declarations?.[0];return Ag(t.name)||o&&pl(o)&&ZX(o.name)}function nZ(t){let o=t.declarations?.[0];return Eh(t)}function iu(t,o){var d;let s=HX(t,!o);if(s>=0)return dn[s];let{parent:l}=t;switch(l.kind){case 237:case 149:case 152:case 153:case 266:return sZ(t,o);case 283:case 248:return aZ(t,o);case 272:case 276:return mZ(l,t);case 279:case 296:return rr(l.type);case 269:return tZ(t,o);case 284:case 285:return wt;case 174:case 175:console.warn("todo getContextualType - getContextualTypeForObjectLiteralElement");case 290:{let p=l,h=gC(p,o),x=Wx(p.elements,t),I=(d=Wt(p)).spreadIndices??(d.spreadIndices=pZ(p.elements||Re));return g6(h,x,p.elements?.length||0,I.first,I.last)}case 267:return dZ(t,o);case 289:{if(wr(l)){if(Qq(l))return rr(Yq(l));let p=ch(l);if(p)return rr(p.typeExpression.type)}return iu(l,o)}}}function tZ(t,o){let s=t.parent,{left:l,operatorToken:d,right:p}=s;switch(d.kind){case 74:case 86:return t===p?rZ(s):void 0;case 59:return iu(s,o);case 58:case 27:return t===p?iu(s,o):void 0;default:return}}function ZSe(t){if(ip(t)&&t.symbol)return t.symbol;if(Sn(t))return lc(t);if(Ti(t)){let o=cs(t.expression);return qo(o,t.name.text)}if(rc(t)){let o=Ds(t.argumentExpression);if(!_m(o))return;let s=cs(t.expression);return qo(s,Tm(o))}}function rZ(t){let o=es(t);switch(o){case 0:case 4:return Mr;case 5:if(G0(t,o))return iZ(t);if(!ip(t.left)||!t.left.symbol)return cs(t.left);{let d=t.left.symbol.valueDeclaration;if(!d)return;let p=Xa(t.left,Us),h=tc(d);if(h)return rr(h);if(Sn(p.expression)){let x=p.expression,I=Or(x,x.text,111551,void 0,!0);if(I){let B=I.valueDeclaration&&tc(I.valueDeclaration);if(B){let z=yh(p);if(z!==void 0)return eN(rr(B),z)}return}}return wr(d)||d===t.left?void 0:cs(t.left)}case 1:case 6:case 3:case 2:let s;o!==2&&(s=ip(t.left)?t.left.symbol?.valueDeclaration:void 0),s||(s=t.symbol?.valueDeclaration);let l=s&&tc(s);return l?rr(l):void 0;case 7:case 8:case 9:return E.fail("Does not apply");default:return E.assertNever(o)}}function iZ(t){if(!t.symbol)return cs(t.left);if(t.symbol.valueDeclaration){let d=tc(t.symbol.valueDeclaration);if(d){let p=rr(d);if(p)return p}}let o=Xa(t.left,Us);if(!Kx(zx(o.expression,!1,!1)))return;let s=oZ(o.expression),l=yh(o);return l!==void 0&&eN(s,l)||void 0}function oZ(t){E.fail("todo - checkThisExpression")}function aZ(t,o){let s=wx(t);if(s){let l=c4(s,o);if(l){let d=yl(s);return l}}}function sZ(t,o){let s=t.parent;if(op(s)&&t===s.initializer){let l=m6(s,o);if(l)return l;if(!(o&8)&&Po(s.name)&&s.name.elements.length>0)return JA(s.name,!0,!1)}}function JA(t,o=!1,s=!1){return E.assertEqual(t.kind,265),cZ(t,o,s)}function p6(t){return t.kind===266&&!!t.initializer||t.kind===269&&t.operatorToken.kind===74}function cZ(t,o,s){let l=t.elements,d=Vo(l),p=d&&d.kind===266&&d.dotDotDotToken?d:void 0;if(l.length===0||l.length===1&&p)return Oi;let h=Yn(l,z=>Fh(z)?wt:lZ(z,o,s)),x=bD(l,z=>!(z===p||Fh(z)||p6(z)),l.length-1)+1,I=Yn(l,(z,re)=>z===p?4:re>=x?2:1),B=mf(h,I);return o&&(B=aC(B),B.pattern=t,B.objectFlags|=131072),B}function lZ(t,o,s){if(t.initializer){let l=Po(t.name)?JA(t.name,!0,!1):Mr;return su(n0(t,r_(t,s?0:1,l)))}return Po(t.name)?JA(t.name,o,s):(s&&Ma(t,wt),o?Gs:wt)}function m6(t,o){let s=tc(t,J)||(wr(t)?_M(t):void 0);if(s)return rr(s);switch(t.kind){case 149:return q6(t);case 266:return uZ(t,o);case 152:}}function uZ(t,o){let s=t.parent.parent,l=t.propertyName||t.name,d=m6(s,o)||s.kind!==266&&s.initializer&&r_(s,t.dotDotDotToken?32:0);if(!d||Po(l)||qF(l))return;if(s.name.kind===265){let h=Wx(t.parent.elements,t);return h<0?void 0:g6(d,h)}let p=Ay(l);if(_m(p)){let h=Tm(p);return al(d,h)}}function dZ(t,o){let s=t.parent;return t===s.whenTrue||t===s.whenFalse?iu(s,o):void 0}function g6(t,o,s,l,d){return t&&Fa(t,p=>(!l||o<l)&&eN(p,""+o)||ly(1,p,fr,void 0,!1),!0)}function eN(t,o,s){return Fa(t,l=>{if(l.flags&3670016){let d=qo(l,o);return d?fZ(d)?void 0:of(Xt(d),!!(d.flags&16777216)):Kc(eC(l),s||Au(o))?.type}},!0)}function fZ(t){return!!(oa(t)&262144&&!t.links.type&&pN(t,0)>=0)}function pZ(t){let o,s;for(let l=0;l<t.length;l++)kI(t[l])&&(o??(o=l),s=l);return{first:o,last:s}}function tT(t){for(let o=St-1;o>=0;o--)if(Ux(t,ln[o]))return zn[o]}function mZ(t,o){let l=gN(t).indexOf(o);return l===-1?void 0:y6(t,l)}function y6(t,o){let s=Wt(t).resolvedSignature===bs?bs:ZC(t),l=s.parameters.length-1;return Sl(s)&&o>=l?ou(Xt(s.parameters[l]),rl(o-l),256):vd(s,o)}function ou(t,o,s=0,l,d,p){return fy(t,o,s,l,d,p)||(l?Gn:Mr)}function h6(t){return t.flags&524288&&!Rs(t)&&Ba(t).length===0&&za(t).length===1&&!!Iu(t,Er)||t.flags&3145728&&yi(t.types,h6)||!1}function fy(t,o,s=0,l,d,p){if(t===la||o===la)return la;t=Nl(t),h6(t)&&!(o.flags&98304)&&Os(o,12)&&(o=Er),Fe.noUncheckedIndexedAccess&&s&32&&(s|=1);let h=Mm(t);if(o.flags&1048576&&!(o.flags&16)){let x=[],I=!1;for(let B of o.types){let z=S6(t,h,B,o,l,s|(I?128:0));if(z)x.push(z);else if(l)I=!0;else return}return I?void 0:s&4?Mi(x,0,d,p):vt(x,1,d,p)}return S6(t,h,o,o,l,s|8|64)}function T6(t,o){return _m(t)?Tm(t):o&&om(o)?Rg(o):void 0}function WA(t){return t.kind===281?t.argumentExpression:t.kind===261?t.indexType:t.kind===147?t.expression:t}function e_(t){if($e)return!1;if(dt(t)&4096)return!0;if(t.flags&1048576)return yi(t.types,e_);if(t.flags&2097152)return Pn(t.types,e_);if(t.flags&465829888){let o=tw(t);return o!==t&&e_(o)}return!1}function gZ(t,o,s){return s===0?!1:jm(o)?!0:(Us(t)&&$o(t.expression).kind===89&&E.fail("todo - isAssignmentToReadonlyEntity"),!1)}function S6(t,o,s,l,d,p){let h=d&&d.kind===281?d:void 0,x=d&&Yc(d)?void 0:T6(s,d);if(x!==void 0){if(p&256)return eN(o,x)||wt;let B=qo(o,x);if(B){if(p&64&&d&&B.declarations&&MC(B)&&J0(d,B)){let re=h?.argumentExpression??(Tg(d)?d.indexType:d);p_(re,B.declarations,x)}if(h){if(m0(B,h,y4(h.expression,o.symbol)),gZ(h,B,mm(h))){hn(h.argumentExpression,N.Cannot_assign_to_0_because_it_is_a_read_only_property,Qi(B));return}p&8&&(Wt(d).resolvedSymbol=B)}let z=p&4?Yh(B):Xt(B);return h&&mm(h)!==1?tg(h,z):d&&Tg(d)&&XN(z)?vt([z,fr]):z}if(Vc(o,Bi)&&Ag(x)){let z=+x;if(d&&Vc(o,re=>!re.target.hasRestElement)&&!(p&16)){let re=WA(d);if(Bi(o)){if(z<0)return hn(re,N.A_tuple_type_cannot_be_indexed_with_a_negative_value),fr;hn(re,N.Tuple_type_0_of_length_1_has_no_element_at_index_2,_t(o),zp(o),x)}else hn(re,N.Property_0_does_not_exist_on_type_1,x,_t(o))}if(z>=0)return I(Iu(o,Ht)),Y6(o,z,p&1?ki:void 0)}}if(!(s.flags&98304)&&Os(s,402655660)){if(o.flags&131073)return o;let B=kp(o,s)||Iu(o,Er);if(B){if(p&2&&B.keyType!==Ht){h&&(p&4?hn(h,N.Type_0_is_generic_and_can_only_be_indexed_for_reading,_t(t)):hn(h,N.Type_0_cannot_be_used_to_index_type_1,_t(s),_t(t)));return}if(d&&B.keyType===Er&&!Os(s,12)){let z=WA(d);return hn(z,N.Type_0_cannot_be_used_as_an_index_type,_t(s)),p&1?vt([B.type,ki]):B.type}return I(B),p&1&&!(o.symbol&&o.symbol.flags&384&&s.symbol&&s.flags&1024&&zf(s.symbol)===o.symbol)?vt([B.type,ki]):B.type}if(s.flags&131072)return Lt;if(e_(o))return wt;if(h){if(Lu(o)){if($e&&s.flags&384)return Zn.add(wi(h,N.Property_0_does_not_exist_on_type_1,s.value,_t(o))),fr;if(s.flags&12){let z=Yn(o.properties,re=>Xt(re));return vt($r(z,fr))}}if(o.symbol===Ft&&x!==void 0&&Ft.exports.has(x)&&Ft.exports.get(x).flags&418)hn(h,N.Property_0_does_not_exist_on_type_1,x,_t(o));else if($e&&!(p&128))if(Nd(o,Ht))hn(h.argumentExpression,N.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{let z;if(x!==void 0&&(z=Q3(x,o)))z!==void 0&&hn(h.argumentExpression,N.Property_0_does_not_exist_on_type_1_Did_you_mean_2,x,_t(o),z);else{let re=yZ(o,h,s);if(re!==void 0)hn(h,N.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,_t(o),re);else{let pe;s.flags&1024?pe=Pi(void 0,N.Property_0_does_not_exist_on_type_1,"["+_t(s)+"]",_t(o)):s.flags&128?pe=Pi(void 0,N.Property_0_does_not_exist_on_type_1,s.value,_t(o)):s.flags&256?pe=Pi(void 0,N.Property_0_does_not_exist_on_type_1,s.value,_t(o)):s.flags&12&&(pe=Pi(void 0,N.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,_t(s),_t(o))),pe=Pi(pe,N.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,_t(l),_t(o)),Zn.add(_h($t(h),h,pe))}}}return}}if(e_(o))return wt;if(d){let B=WA(d);s.flags&384?hn(B,N.Property_0_does_not_exist_on_type_1,""+s.value,_t(o)):s.flags&12?hn(B,N.Type_0_has_no_matching_index_signature_for_type_1,_t(o),_t(s)):Ty(t)||hn(B,N.Type_0_cannot_be_used_as_an_index_type,_t(s))}if(Ms(s))return s;return;function I(B){B&&B.isReadonly&&h&&Vd(h)&&hn(h,N.Index_signature_in_type_0_only_permits_reading,_t(o))}}function yZ(t,o,s){function l(h){let x=jf(t,h);if(x){let I=Up(Xt(x));return!!I&&Ju(I)>=1&&Ui(s,vd(I,0))}return!1}let d=Vd(o)?"set":"get";if(!l(d))return;let p=WD(o.expression);return p===void 0?p=d:p+="."+d,p}function or(t,o){return t&&o?x6(t,o,void 0,void 0):t}function _6(t){if(t.aliasSymbol&&!t.aliasTypeArguments){let o=kf(t.aliasSymbol,239);return!!(o&&er(o.parent,s=>s.kind===176?!0:"quit"))}return!1}function Bu(t){let o=dt(t);if(o&524288)return!!(o&1048576);let s=!!(t.flags&465829888||t.flags&524288&&!_6(t)&&(o&4&&(t.node||Pn(Qo(t),Bu))||o&134217728&&gr(t.outerTypeParameters)||o&16&&t.symbol&&t.symbol.flags&14384&&t.symbol.declarations||o&12583968)||t.flags&3145728&&!(t.flags&1024)&&!_6(t)&&Pn(t.types,Bu));return t.flags&3899393&&(t.objectFlags|=524288|(s?1048576:0)),s}function x6(t,o,s,l){if(!Bu(t))return t;if(_===100||S>=5e6)return In?.instant(In.Phase.CheckTypes,"instantiateType_DepthLimit",{typeId:t.id,instantiationDepth:_,instantiationCount:S}),hn(v,N.Type_instantiation_is_excessively_deep_and_possibly_infinite),Gn;g++,S++,_++;let d=NZ(t,o,s,l);return _--,d}function au(t,o){return nN(t,o,or)}function nN(t,o,s){if(t&&t.length)for(let l=0;l<t.length;l++){let d=t[l],p=s(d,o);if(d!==p){let h=l===0?[]:t.slice(0,l);for(h.push(p),l++;l<t.length;l++)h.push(s(t[l],o));return h}}return t}function UA(t,o){return t.objectFlags&8?mw(t,o):py(t,o)}function py(t,o){let s=uc(o),l=t?.instantiations?.get(s);return t&&!l&&(l=Ku(4,t.symbol),t.instantiations?.set(s,l),l.objectFlags|=o?Qt(o):0,l.target=t,l.resolvedTypeArguments=o),l}function hZ(t,o){let s=or(t.mappedType,o);if(!(dt(s)&32))return t;let l=or(t.constraintType,o);if(!(l.flags&4194304))return t;let d=b6(or(t.source,o),s,l);return d||t}function KA(t){return!(dt(t)&262144)||Lu(t)&&Pn(Ba(t),o=>KA(Xt(o)))||Bi(t)&&Pn(vy(t),KA)}function rT(t){return t.templateType||(t.templateType=t.declaration.type?or(su(rr(t.declaration.type),!0,!!(Un(t)&4)),t.mapper):Gn)}function TZ(t,o,s){let l=ou(s.type,il(o)),d=rT(o),p=Lw(l);return Mp([p],t,d),YJ(p)||Mr}function qA(t,o,s){let l=t.id+","+o.id+","+s.id;if(Hn.has(l))return Hn.get(l)||Mr;Rr.push(t),zi.push(o);let d=se;fT(t,Rr,Rr.length,2)&&(se|=1),fT(o,zi,zi.length,2)&&(se|=2);let p;return se!==3&&(p=TZ(t,o,s)),Rr.pop(),zi.pop(),se=d,Hn.set(l,p),p}function SZ(t,o,s){if(!(Iu(t,Er)||Ba(t).length!==0&&KA(t)))return;if(va(t)){let d=qA(Qo(t)[0],o,s);return d?Na(d,yT(t)):void 0}if(Bi(t)){let d=Yn(vy(t),h=>qA(h,o,s));if(!yi(d,h=>!!h))return;let p=Un(o)&4?Za(t.target.elementFlags,h=>h&2?1:h):t.target.elementFlags;return mf(d,p,t.target.readonly,t.target.labeledElementDeclarations)}let l=Ku(1040,void 0);return l.source=t,l.mappedType=o,l.constraintType=s,l}function b6(t,o,s){let l=t.id+","+o.id+","+s.id;if(Ye.has(l))return Ye.get(l);let d=SZ(t,o,s);return Ye.set(l,d),d}function _Z(t){if(!t||!wr(t))return!1;let o=Is(t)||fs(t)?t:(xo(t)||dd(t))&&t.initializer&&fs(t.initializer)?t.initializer:void 0;return o?hO(t)?!0:dd(Dh(o.parent))?!1:!!rt(o)?.members?.size:!1}function n_(t,o){for(;;){if(t=t.parent,t&&br(t)){let s=es(t)}if(!t)return;switch(t.kind){case 274:case 170:case 155:case 151:case 156:case 158:case 196:case 169:case 154:case 270:case 283:case 239:case 224:case 225:case 219:case 217:case 264:case 168:{let l=n_(t,o);if(t.kind===264)return $r(l,Lp(rt(t.typeParameter)));if(t.kind===168)return Zr(l,R0(t));let d=VA(l,hx(t)),p=o&&(t.kind===170||t.kind===274||t.kind===155||_Z(t))&&$m(rt(t)).thisType;return p?$r(d,p):d}case 220:let s=TM(t);s&&(t=s.valueDeclaration);break;case 199:{let l=n_(t,o);return t.tags?VA(l,Oo(t.tags,d=>wc(d)?d.typeParameters:void 0)):l}}}}function C6(t){let o=kf(t.symbol,148),s=wc(o.parent)?GD(o.parent):o.parent;return s&&Qp(s)}function VA(t,o){for(let s of o)t=dg(t,Lp(rt(s)));return t}function Lp(t){let o=at(t);return o.declaredType||(o.declaredType=kl(t))}function kl(t){return AC(262144,t)}function Ap(t,o){switch(o.kind){case 0:return t===o.source?o.target:t;case 1:{let l=o.sources,d=o.targets;for(let p=0;p<l.length;p++)if(t===l[p])return d?d[p]:wt;return t}case 2:{let l=o.sources,d=o.targets;for(let p=0;p<l.length;p++)if(t===l[p])return d[p]();return t}case 3:return o.func(t);case 4:case 5:let s=Ap(t,o.mapper1);return s!==t&&o.kind===4?or(s,o.mapper2):Ap(s,o.mapper2)}}function HA(t){let o=kl(t.symbol);return o.target=t,o}function Hf(t,o){return E.attachDebugPrototypeIfDebug({kind:0,source:t,target:o})}function il(t){return t.typeParameter||(t.typeParameter=Lp(rt(t.declaration.typeParameter)))}function tN(t,o,s,l){E.assert(t.symbol,"anonymous type must have symbol to be instantiated");let d=Ku(t.objectFlags&-1572865|64,t.symbol);if(t.objectFlags&32){d.declaration=t.declaration;let p=il(t),h=HA(p);d.typeParameter=h,o=wp(Hf(p,h),o),h.mapper=o}return t.objectFlags&8388608&&(d.node=t.node),t.objectFlags&134217728&&(d.outerTypeParameters=t.outerTypeParameters),d.target=t,d.mapper=o,d.aliasSymbol=s||t.aliasSymbol,d.aliasTypeArguments=s?l:au(t.aliasTypeArguments,o),d.objectFlags|=d.aliasTypeArguments?Qt(d.aliasTypeArguments):0,d}function xZ(t,o){return E.attachDebugPrototypeIfDebug({kind:1,sources:t,targets:o})}function ws(t,o){return t.length===1?Hf(t[0],o?o[0]:wt):xZ(t,o)}function qm(t){let o=t.parent;for(;ix(o)||Bg(o);)o=o.parent;return rE(o)?rt(o):void 0}function my(t){return t?Jm(t):void 0}function D6(t,o,s,l,d){if(!l){l=qm(o);let h=my(l);d=s?au(h,s):h}let p=Ku(4,t.symbol);return p.target=t,p.node=o,p.mapper=s,p.aliasSymbol=l,p.aliasTypeArguments=d,p}function bZ(t,o,s,l){let d=IN(t);if(d){let h=or(d,o);if(d!==h)return L6(Nl(h),p,s,l)}return or(uu(t),o)===la?la:tN(t,o,s,l);function p(h){if(h.flags&61603843&&h!==la&&!da(h)){if(!t.declaration.nameType){let x;if(va(h)||h.flags&1&&pN(d,4)<0&&(x=dc(d))&&Vc(x,cf))return CZ(h,t,yy(d,h,o));if(Bi(h))return DZ(h,t,d,o);if(FP(h))return Mi(Yn(h.types,p))}return tN(t,yy(d,h,o))}return h}}function E6(t,o,s,l){let d=oN(l,il(t),o),p=or(rT(t.target||t),d),h=Un(t);return G&&h&4&&!vo(p,49152)?Bp(p,!0):G&&h&8&&s?Hu(p,524288):p}function P6(t,o){return o&1?!0:o&2?!1:t}function CZ(t,o,s){let l=E6(o,Ht,!0,s);return da(l)?Gn:Na(l,P6(yT(t),Un(o)))}function DZ(t,o,s,l){let d=t.target.elementFlags,p=t.target.fixedLength,h=p?yy(s,t,l):l,x=Yn(vy(t),(re,pe)=>{let _e=d[pe];return pe<p?E6(o,Au(""+pe),!!(_e&2),h):_e&8?or(o,yy(s,re,l)):_C(or(o,yy(s,Na(re),l)))??Mr}),I=Un(o),B=I&4?Yn(d,re=>re&1?2:re):I&8?Yn(d,re=>re&2?1:re):d,z=P6(t.target.readonly,Un(o));return Gr(x,Gn)?Gn:mf(x,B,z,t.target.labeledElementDeclarations)}function EZ(t,o,s,l){let d=t.objectFlags&4||t.objectFlags&8388608?t.node:t.symbol.declarations[0],p=Wt(d),h=t.objectFlags&4?p.resolvedType:t.objectFlags&64?t.target:t,x=t.objectFlags&134217728?t.outerTypeParameters:p.outerTypeParameters;if(!x){x=n_(d,!0)||Re;let B=t.objectFlags&8388612?[d]:t.symbol.declarations;x=(h.objectFlags&8388612||h.symbol.flags&8192||h.symbol.flags&2048)&&!h.aliasTypeArguments?Ar(x,z=>Pn(B,re=>N6(z,re))):x,p.outerTypeParameters=x}if(x.length){let I=wp(t.mapper,o),B=Yn(x,on=>Ap(on,I)),z=s||t.aliasSymbol,re=s?l:au(t.aliasTypeArguments,o),pe=(t.objectFlags&134217728?"S":"")+uc(B)+Py(z,re);h.instantiations||(h.instantiations=new Map,h.instantiations.set(uc(x)+Py(h.aliasSymbol,h.aliasTypeArguments),h));let _e=h.instantiations.get(pe);if(!_e){if(t.objectFlags&134217728)return _e=tN(t,o),h.instantiations.set(pe,_e),_e;let on=ws(x,B);_e=h.objectFlags&4?D6(t.target,t.node,on,z,re):h.objectFlags&32?bZ(h,on,z,re):tN(h,on,z,re),h.instantiations.set(pe,_e);let pn=dt(_e);if(_e.flags&3899393&&!(pn&524288)){let Kn=Pn(B,Bu);dt(_e)&524288||(pn&52?_e.objectFlags|=524288|(Kn?1048576:0):_e.objectFlags|=Kn?0:524288)}}return _e}return t}function wp(t,o){return t?rN(4,t,o):o}function rN(t,o,s){return E.attachDebugPrototypeIfDebug({kind:t,mapper1:o,mapper2:s})}function PZ(t){return!(t.parent.kind===166&&t.parent.typeArguments&&t===t.parent.typeName)}function N6(t,o){if(t.symbol&&t.symbol.declarations&&t.symbol.declarations.length===1){let l=t.symbol.declarations[0].parent;for(let d=o;d!==l;d=d.parent)if(!d||d.kind===236)return!0;return s(o)}return!0;function s(l){switch(l.kind){case 89:return!t.isThisType&&hm(l)&&PZ(l)&&Xj(l)===t;case 164:E.fail("todo - type query")}return!!No(l,s)}}function NZ(t,o,s,l){let d=t.flags;if(d&262144)return Ap(t,o);if(d&524288){let p=t.objectFlags;if(p&52){if(p&4&&!t.node){let h=t.resolvedTypeArguments,x=au(h,o);return x!==h?UA(t.target,x):t}return p&1024?hZ(t,o):EZ(t,o,s,l)}return t}if(d&3145728){let p=t.flags&1048576?t.origin:void 0,h=p&&p.flags&3145728?p.types:t.types,x=au(h,o);if(x===h&&s===t.aliasSymbol)return t;let I=s||t.aliasSymbol,B=s?l:au(t.aliasTypeArguments,o);return d&2097152||p&&p.flags&2097152?Mi(x,0,I,B):vt(x,1,I,B)}if(d&4194304)return ju(or(t.type,o));if(d&8388608){let p=s||t.aliasSymbol,h=s?l:au(t.aliasTypeArguments,o);return ou(or(t.objectType,o),or(t.indexType,o),t.accessFlags,void 0,p,h)}if(d&16777216)return v6(t,wp(t.mapper,o),!1,s,l);if(d&33554432){let p=or(t.baseType,o);if(pT(t))return sw(p);let h=or(t.constraint,o);return p.flags&8650752&&oT(h)?k6(p,h):h.flags&3||Ui(gy(p),gy(h))?p:p.flags&8650752?k6(p,h):Mi([h,p])}return t}function iN(t){return t.flags&402915263?t:t.permissiveInstantiation||(t.permissiveInstantiation=or(t,Nc))}function gy(t){return t.flags&402915263?t:(t.restrictiveInstantiation||(t.restrictiveInstantiation=or(t,el),t.restrictiveInstantiation.restrictiveInstantiation=t.restrictiveInstantiation),t.restrictiveInstantiation)}function k6(t,o){return o.flags&3||o===t||t.flags&1?t:Z3(t,o)}function v6(t,o,s,l,d){let p=t.root;if(p.outerTypeParameters){let h=Yn(p.outerTypeParameters,B=>Ap(B,o)),x=(s?"C":"")+uc(h)+Py(l,d),I=p.instantiations.get(x);if(!I){let B=ws(p.outerTypeParameters,h),z=p.checkType,re=p.isDistributive?Nl(Ap(z,B)):void 0;I=re&&z!==re&&re.flags&1179648?L6(re,pe=>zA(p,yy(z,pe,B),s),l,d):zA(p,B,s,l,d),p.instantiations.set(x,I)}return I}return t}function F6(t){return console.debug("todo - isSimpleTupleType"),!1}function I6(t,o){return oT(t)||o&&Bi(t)&&Pn(vy(t),oT)}function zA(t,o,s,l,d){let p,h,x=0;for(;;){if(x===1e3)return hn(v,N.Type_instantiation_is_excessively_deep_and_possibly_infinite),Gn;let B=or(sf(t.checkType),o),z=or(t.extendsType,o);if(B===Gn||z===Gn)return Gn;if(B===la||z===la)return la;let re=GF(t.node.checkType),pe=GF(t.node.extendsType),_e=F6(re)&&F6(pe)&&gr(re.elements)===gr(pe.elements),on=I6(B,_e),pn;if(t.inferTypeParameters){let Nn=rD(t.inferTypeParameters,void 0,0);o&&(Nn.nonFixingMapper=wp(Nn.nonFixingMapper,o)),on||Mp(Nn.inferences,B,z,1536),pn=o?wp(Nn.mapper,o):Nn.mapper}let Kn=pn?or(t.extendsType,pn):z;if(!on&&!I6(Kn,_e)){if(!(Kn.flags&3)&&(B.flags&1||!Ui(iN(B),iN(Kn)))){(B.flags&1||s&&!(Kn.flags&131072)&&Id(iN(Kn),it=>Ui(it,iN(B))))&&(h||(h=[])).push(or(rr(t.node.trueType),pn||o));let Nn=rr(t.node.falseType);if(Nn.flags&16777216){let it=Nn.root;if(it.node.parent===t.node&&(!it.isDistributive||it.checkType===t.checkType)){t=it;continue}if(I(Nn,o))continue}p=or(Nn,o);break}if(Kn.flags&3||Ui(gy(B),gy(Kn))){let Nn=rr(t.node.trueType),it=pn||o;if(I(Nn,it))continue;p=or(Nn,it);break}}p=Ut(16777216),p.root=t,p.checkType=or(t.checkType,o),p.extendsType=or(t.extendsType,o),p.mapper=o,p.combinedMapper=pn,p.aliasSymbol=l||t.aliasSymbol,p.aliasTypeArguments=l?d:au(t.aliasTypeArguments,o);break}return h?vt($r(h,p)):p;function I(B,z){if(B.flags&16777216&&z){let re=B.root;if(re.outerTypeParameters){let pe=wp(B.mapper,z),_e=Yn(re.outerTypeParameters,Kn=>Ap(Kn,pe)),on=ws(re.outerTypeParameters,_e),pn=re.isDistributive?Ap(re.checkType,on):void 0;if(!pn||pn===re.checkType||!(pn.flags&1179648))return t=re,o=on,l=void 0,d=void 0,re.aliasSymbol&&x++,!0}}return!1}}function L6(t,o,s,l){return t.flags&1048576&&s?vt(Yn(t.types,o),1,s,l):Fa(t,o)}function kZ(t){let o=il(t);return s(Ou(t)||o);function s(l){return l.flags&470810559?!0:l.flags&16777216?l.root.isDistributive&&l.checkType===o:l.flags&137363456?yi(l.types,s):l.flags&8388608?s(l.objectType)&&s(l.indexType):l.flags&33554432?s(l.baseType)&&s(l.constraint):l.flags&268435456?s(l.type):!1}}function GA(t){let o=Ou(t);return o?Ui(o,il(t))?1:2:0}function A6(t){return!!(t.flags&1048576&&t.objectFlags&16777216&&Pn(t.types,A6)||t.flags&2097152&&vZ(t))}function vZ(t){let o=t.uniqueLiteralFilledInstantiation||(t.uniqueLiteralFilledInstantiation=or(t,Lo));return Nl(o)!==o}function FZ(t,o){return o&1?t.resolvedStringIndexType||(t.resolvedStringIndexType=w6(t,1)):t.resolvedIndexType||(t.resolvedIndexType=w6(t,0))}function w6(t,o){let s=Ut(4194304);return s.type=t,s.indexFlags=o,s}function $A(t,o=0){return!!(t.flags&58982400||Vp(t)||Rs(t)&&(!kZ(t)||GA(t)===2)||t.flags&1048576&&!(o&4)&&A6(t)||t.flags&2097152&&vo(t,465829888)&&Pn(t.types,lu))}function ju(t,o=0){return pT(t)?sw(ju(t.baseType,o)):$A(t,o)?FZ(t,o):t.flags&1048576?Mi(Yn(t.types,s=>ju(s,o))):t.flags&2097152?vt(Yn(t.types,s=>ju(s,o))):dt(t)&32?O6(t,o):t===la?la:t.flags&2?Lt:t.flags&131073?yr:LZ(t,(o&2?128:402653316)|(o&1?0:2344),o===0)}function IZ(t){let o=Ri(4194304);return o.type=t,o}function mC(t,o,s){if(s||!(Cu(t)&6)){let l=at(sr(t)).nameType;if(!l){let d=ci(t.valueDeclaration);l=t.name==="default"?Au("default"):d&&Ay(d)||(Eh(t)?void 0:Au(Ws(t)))}if(l&&l.flags&o)return l}return Lt}function LZ(t,o,s){let l=s&&(dt(t)&7||t.aliasSymbol)?IZ(t):void 0,d=Yn(Ba(t),h=>mC(h,o)),p=Yn(za(t),h=>h!==Ao&&R6(h.keyType,o)?h.keyType===Er&&o&8?ri:h.keyType:Lt);return vt(Zr(d,p),1,void 0,void 0,l)}function R6(t,o){return!!(t.flags&o||t.flags&2097152&&Pn(t.types,s=>R6(s,o)))}function QA(t){if(t.flags&4194304){let o=Ha(t.type);return Vp(o)?iJ(o):ju(o)}if(t.flags&16777216&&console.debug("todo - getLowerBoundOfKeyType"),t.flags&1048576)return Fa(t,QA,!0);if(t.flags&2097152){let o=t.types;return o.length===2&&o[0].flags&76&&o[1]===nl?t:Mi(Za(t.types,QA))}return t}function AZ(t,o){let s=t.inferences.slice(o);return ws(Yn(s,l=>l.typeParameter),Yn(s,()=>Mr))}function wZ(t,o){return t?rN(5,t,o):o}function yy(t,o,s){return s?rN(5,Hf(t,o),s):Hf(t,o)}function oN(t,o,s){return t?rN(5,t,Hf(o,s)):Hf(o,s)}function RZ(t){return!t.constraint&&!YA(t)||t.constraint===$s?t:t.restrictiveInstantiation||(t.restrictiveInstantiation=kl(t.symbol),t.restrictiveInstantiation.constraint=$s,t.restrictiveInstantiation)}function YA(t){return Ei(Ar(t.symbol&&t.symbol.declarations,Pu),OD)[0]}function O6(t,o){let s=il(t),l=uu(t),d=Ou(t.target||t);if(!d&&!(o&2))return l;let p=[];T_(l)?Ry(l,x):Ry(QA(l),x);let h=o&2?ka(vt(p),I=>!(I.flags&5)):vt(p);if(h.flags&1048576&&l.flags&1048576&&uc(h.types)===uc(l.types))return l;return h;function x(I){let B=d?or(d,oN(t.mapper,s,I)):I;p.push(B===Er?ri:B)}}function aN(t,o){return t.flags&465829888?or(t,o):t.flags&1048576?vt(Yn(t.types,s=>aN(s,o)),0):t.flags&2097152?Mi(Yn(t.types,s=>aN(s,o))):t}function OZ(t){return!!(t.candidates||t.contraCandidates)||M6(t.typeParameter)}function M6(t){return!!(t.symbol&&Bn(t.symbol.declarations,o=>Pu(o)&&o.default))}function vl(t,o){return Rd(t,o,Ca,io)>=0}function sN(t,o,s){if(t&&vo(t,465829888)){let l=tT(o);if(l&&s&1&&Pn(l.inferences,OZ))return aN(t,l.nonFixingMapper);if(l?.returnMapper){let d=aN(t,l.returnMapper);return d.flags&1048576&&vl(d.types,Cn)&&vl(d.types,pt)?ka(d,p=>p!==Cn&&p!==pt):d}}return t}function gC(t,o){let s=iu(t,o),l=sN(s,t,o);if(l&&!(o&&o&2&&l.flags&8650752))return Fa(l,p=>dt(p)&32?p:Ha(p),!0)}function XA(t,o){let s=ro(t,0),l=Ar(s,d=>!WZ(d,o));return l.length===1?l[0]:MZ(l)}function MZ(t){eI(Fe,"noImplicitAny")&&console.debug("todo - getIntersectedSignatures")}function BZ(t){return!!($(t)&512)||!!t.dotDotDotToken}function jZ(t){return!!(t.flags&8)}function JZ(t){return Pn(t.parameters,BZ)}function kd(t){if(JZ(t.declaration))return!0;if(Sl(t)){let o=Xt(t.parameters[t.parameters.length-1]);return!Bi(o)||o.target.hasRestElement}return!1}function qc(t){let o=t.parameters.length;if(Sl(t)){let s=Xt(t.parameters[o-1]);if(Bi(s))return o+s.target.fixedLength-(s.target.hasRestElement?0:1)}return o}function WZ(t,o){let s=0;for(;s<(o.parameters?.length??0);s++){let l=o.parameters[s];if(l.initializer||l.dotDotDotToken||rM(l))break}return!kd(t)&&qc(t)<s}function t_(t){let o=af(t);if(o)return o;let s=gC(t,1);if(!s)return;if(!(s.flags&1048576))return XA(s,t);let l,d=s.types;for(let p of d){let h=XA(p,t);if(h)if(!l)l=[h];else if(lN(l[0],h,!1,!0,!0,cN))l.push(h);else return}if(l)return l.length===1?l[0]:B6(l[0],l)}function cN(t,o){return Vu(t,o,Ra)?-1:0}function yC(t){let o=df(t.declaration,t.typeParameters,t.thisParameter,t.parameters,void 0,void 0,t.minArgumentCount,t.flags&1295);return o.target=t.target,o.mapper=t.mapper,o.compositeSignatures=t.compositeSignatures,o.compositeKind=t.compositeKind,o}function B6(t,o){let s=yC(t);return s.compositeSignatures=o,s.compositeKind=1048576,s.target=void 0,s.mapper=void 0,s}function Ju(t,o){let s=o&1,l=o&2;if(l||t.resolvedMinArgumentCount===void 0){let d;if(xu(t.declaration,512))d=0;else if(Sl(t)){let p=Xt(t.parameters[t.parameters.length-1]);if(d=t.parameters.length-1,Bi(p)){let h=zc(p.target.elementFlags,I=>!(I&1)),x=h<0?p.target.fixedLength:h;x>0&&(d=t.parameters.length-1+x)}}if(d===void 0&&(d=t.minArgumentCount),l)return d;for(let p=d-1;p>=0;p--){let h=vd(t,p);if(ka(h,j6).flags&131072)break;d=p}t.resolvedMinArgumentCount=d}return t.resolvedMinArgumentCount}function j6(t){return!!(t.flags&16384)}function vd(t,o){return hy(t,o)||wt}function hy(t,o){let s=t.parameters.length-(Sl(t)?1:0);if(o<s)return hC(t.parameters[o]);if(Sl(t)){let l=Xt(t.parameters[s]),d=o-s;if(!Bi(l)||l.target.combinedFlags&12||d<l.target.fixedLength)return ou(l,rl(d))}}function su(t,o=!1,s=!0){return G&&s?Bp(t,o):t}function hC(t){let o=t.valueDeclaration;return su(Xt(t),!1,!!o&&op(o))}function UZ(t,o,s){let l=qc(t),d=qc(o),p=Ju(t),h=Ju(o),x=kd(t),I=kd(o);return!!(l===d&&p===h&&x===I||s&&p<=h)}function lN(t,o,s,l,d,p){if(t===o)return-1;if(!UZ(t,o,s))return 0;if(gr(t.typeParameters)!==gr(o.typeParameters))return 0;if(o.typeParameters){let I=ws(t.typeParameters,o.typeParameters);for(let B=0;B<o.typeParameters.length;B++){let z=t.typeParameters[B],re=o.typeParameters[B];if(!(z===re||p(or(l_(z),I)||Mr,l_(re)||Mr)&&p(or(Gm(z),I)||Mr,Gm(re)||Mr)))return 0}t=sT(t,I,!0)}let h=-1,x=qc(o);for(let I=0;I<x;I++){let B=vd(t,I),z=vd(o,I),re=p(z,B);if(!re)return 0;h&=re}if(!d){let I=Ic(t),B=Ic(o);h&=I||B?KZ(I,B,p):p($i(t),$i(o))}return h}function KZ(t,o,s){return t&&o&&l0(t,o)?t.type===o.type?-1:t.type&&o.type?s(t.type,o.type):0:0}function cf(t){return va(t)}function va(t){return!!(dt(t)&4)&&(t.target===Y||t.target===Ue)}function Ty(t){return!!(dt(t)&4)&&t.target===Be}function ZA(t){let o=!1;if(dt(t)&65536){if(t.flags&1048576)if(Pn(t.types,Yp))o=!0;else for(let s of t.types)o||(o=ZA(s));else if(!cf(t)){if(Lu(t))for(let s of uf(t)){let l=Xt(s);if(dt(l)&65536&&(o=ZA(l),!o)){let d=s.declarations?.find(p=>p.symbol.valueDeclaration?.parent===t.symbol.valueDeclaration);d&&(hn(d,N.Object_literal_s_property_0_implicitly_has_an_1_type,Qi(s),_t(sl(l))),o=!0)}}}}return o}function qZ(t){return console.debug("todo - getExtractStringType - is this needed?"),Er}function e_e(t){return t}function iT(t){let o=tc(t,J);if(o)return rr(o)}function e0(t){let o=$o(t,!0);return o.kind===290&&o.elements.length===0}function VZ(t,o){let s=af(t);if(!s)return;let l=t.parameters.indexOf(o);return vd(s,l)}function TC(t,o,s){if(xo(t)&&t.parent.parent.kind===244){let h=t.parent.parent,x=ni(h.expression,s);if(va(x)&&x.resolvedTypeArguments)return Uo(x.resolvedTypeArguments);if(Ty(x)){let I=Tw(h)||wt;if(I.flags&1048576){let B=t.parent.declarations.indexOf(t),z=I.types.at(B)||wt;if(t.type){let re=rr(t.type);if(!Jp(z,re,t,h.expression))return Gn}return z}else if(I===w)return iT(t);return I}}Po(t.parent)&&E.fail("implement me - getTypeForVariableLikeDeclaration");let l=Tl(t)&&!Iq(t)||Ff(t)||wH(t),d=!1,p=iT(t);if(p)return su(p,l,d);if(($e||wr(t))&&xo(t)&&!Po(t.name)&&!($(t)&2048)&&!(t.flags&33554432)){if(!t.initializer||HZ(t.initializer))return vn;if(t.initializer&&e0(t.initializer))return vi}if(_o(t)){if(!t.symbol)return;let h=t.parent,x=VZ(h,t);if(x)return x;let I=q6(t);if(I)return su(I,!1,d)}if(mx(t)&&t.initializer){let h=n0(t,r_(t,s));return su(h,l,d)}}function HZ(t){let o=$o(t,!0);return o.kind===137||o.kind===89&&lc(o)===ft}function n0(t,o){let s=Sy(o);if(wr(t)){if(J6(s))return Ma(t,wt),wt;if(fN(s))return Ma(t,Oi),Oi}return s}function r_(t,o,s){let l=LF(t);return uJ(l)||(s?SC(l,s,void 0,o||0):Ds(l,o))}function zZ(t){GZ(t)}function GZ(t){let o=t;for(;o;){if(SF(o))return cc(t,N.Jump_target_cannot_cross_function_boundary);switch(o.kind){case 249:if(t.label&&o.label.text===t.label.text)return t.kind===251&&!qv(o.statement,!0)?cc(t,N.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement):!1;break;case 256:if(t.kind===250&&!t.label)return!1;break;default:if(qv(o,!1)&&!t.label)return!1;break}o=o.parent}if(t.label){let s=t.kind===250?N.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:N.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;return cc(t,s)}else{let s=t.kind===250?N.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:N.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;return cc(t,s)}}function SC(t,o,s,l){let d=t;dN(d,o,!1),$Z(d,s);let p=ni(t,l|1|(s?2:0));s&&s.intraExpressionInferenceSites&&(s.intraExpressionInferenceSites=void 0);let h=vo(p,2944)&&uN(p,sN(o,t,void 0))?ba(p):p;return QZ(),i_(),h}function uN(t,o){if(o){if(o.flags&3145728){let s=o.types;return Pn(s,l=>uN(t,l))}if(o.flags&58982400){let s=xa(o)||Mr;return vo(s,4)&&vo(t,128)||vo(s,8)&&vo(t,256)||vo(s,64)&&vo(t,2048)||vo(s,4096)&&vo(t,8192)||uN(t,s)}return!!(o.flags&406847616&&vo(t,128)||o.flags&256&&vo(t,256)||o.flags&2048&&vo(t,2048)||o.flags&512&&vo(t,512)||o.flags&4096&&vo(t,8192))}return!1}function $Z(t,o){ln[St]=t,zn[St]=o,St++}function QZ(){St--}function t0(t){dN(t,iu(t,void 0),!0)}function dN(t,o,s){qe[ke]=t,dn[ke]=o,Jn[ke]=s,ke++}function i_(){ke--}function n_e(t){return t}function J6(t){return G?t===ga:t===w}function fN(t){let o=_C(t);return!!o&&J6(o)}function _C(t){return va(t)?Qo(t)[0]:void 0}function Rp(){return ue.pop(),he.pop(),ye.pop()}function r0(t){return t?wt:Mr}function Vm(t,o,s,l){let d=gr(o);if(!d)return[];let p=gr(t);if(l||p>=s&&p<=d){let h=t?t.slice():[];for(let I=p;I<d;I++)h[I]=Gn;let x=r0(l);for(let I=p;I<d;I++){let B=Gm(o[I]);l&&B&&(nT(B,Mr)||nT(B,Bo))&&(B=wt),h[I]=B?or(B,ws(o,h)):x}return h.length=o.length,h}return t&&t.slice()}function lf(t){let o=0;if(t)for(let s=0;s<t.length;s++)M6(t[s])||(o=s+1);return o}function i0(t,o){return Vm(Yn(t.typeArguments,rr),o,lf(o),wr(t))}function Qo(t){if(!t.resolvedTypeArguments){if(!Op(t,5))return Zr(t.target.outerTypeParameters,t.target.localTypeParameters?.map(()=>Gn))||Re;let o=t.node,s=o?o.kind===166?Zr(t.target.outerTypeParameters,i0(o,t.target.localTypeParameters)):o.kind===161?[rr(o.elementType)]:Yn(o.elements,rr):Re;Rp()?t.resolvedTypeArguments??(t.resolvedTypeArguments=t.mapper?au(s,t.mapper):s):(t.resolvedTypeArguments??(t.resolvedTypeArguments=Zr(t.target.outerTypeParameters,t.target.localTypeParameters?.map(()=>Gn)||Re)),hn(t.node||v,t.target.symbol?N.Type_arguments_for_0_circularly_reference_themselves:N.Tuple_type_arguments_circularly_reference_themselves,t.target.symbol&&Qi(t.target.symbol)))}return t.resolvedTypeArguments}function pN(t,o){for(let s=ue.length-1;s>=ce;s--){if(YZ(ue[s],he[s]))return-1;if(ue[s]===t&&he[s]===o)return s}return-1}function YZ(t,o){switch(o){case 0:return!!at(t).type;case 2:return!!at(t).declaredType;case 3:return!!t.resolvedReturnType;case 4:return!!t.immediateBaseConstraint;case 5:return!!t.resolvedTypeArguments;case 6:return!!t.baseTypesResolved;case 7:return!!at(t).writeType;case 8:return Wt(t).parameterInitializerContainsUndefined!==void 0}return E.assertNever(o)}function Op(t,o){let s=pN(t,o);if(s>=0){let{length:l}=ue;for(let d=s;d<l;d++)ye[d]=!1;return!1}return ue.push(t),ye.push(!0),he.push(o),!0}function XZ(t,o,s){return t?(s&&ZP(o,t),sl(t)):(t=_o(o)&&o.dotDotDotToken?Oi:wt,t)}function mN(t,o){return XZ(TC(t,!0,0),t,o)}function ZZ(t){let o=Wt(t);return o.containsArgumentsReference===void 0&&(o.flags&512?o.containsArgumentsReference=!0:o.containsArgumentsReference=s(t.body)),o.containsArgumentsReference;function s(l){if(!l)return!1;switch(l.kind){case 89:return l.text===Et.name&&$4(l)===Et;case 152:case 154:return l.name.kind===147&&s(l.name);case 286:case 281:return s(l.expression);case 174:return s(l.initializer);default:return!RO(l)&&!hm(l)&&!!No(l,s)}}}function W6(t){Nr(t)&&Bn(t,o=>{Hv(o)&&Bt(o)})}function U6(t,o){switch(t.text){case"any":case"unknown":case"never":case"number":case"bigint":case"boolean":case"string":case"symbol":case"void":case"object":case"undefined":hn(t,o,t.text)}}function eee(t){return A0(t)!==_a}function K6(t){_y(t),t.expression&&Uf(t.expression,N.Type_expected),Bt(t.constraint),Bt(t.default);let o=Lp(rt(t));xa(o),eee(o)||hn(t.default,N.Type_parameter_0_has_a_circular_default,_t(o));let s=dc(o),l=Gm(o);s&&l&&Wp(l,Xm(or(s,Hf(o,l)),l),t.default,N.Type_0_does_not_satisfy_the_constraint_1),__(t),r(()=>U6(t.name,N.Type_parameter_name_cannot_be_0))}function nee(t){let o=!1;if(t)for(let l=0;l<t.length;l++){let d=t[l];K6(d),r(s(d,l))}function s(l,d){return()=>{l.default?(o=!0,tee(l.default,t,d)):o&&hn(l,N.Required_type_parameters_may_not_follow_optional_type_parameters);for(let p=0;p<d;p++)t[p].symbol===l.symbol&&hn(l.name,N.Duplicate_identifier_0,Fs(l.name))}}}function tee(t,o,s){l(t);function l(d){if(d.kind===166){let p=fC(d);if(p.flags&262144)for(let h=s;h<o.length;h++)p.symbol===rt(o[h])&&hn(d,N.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters)}No(d,l)}}function ree(t){let o;t.typeExpression||(o=hn(t.name,N.LPCDoc_var_tag_should_have_a_type_annotation));let s=t.parent;if(!o&&Pn(s.tags,l=>!e2(l))&&(o=hn(t.name,N.LPCDoc_var_tags_must_be_in_their_own_LPCDoc_comment)),!o)if(Da(t.name))o=hn(t.name,N.LPCDoc_var_tag_should_provide_a_variable_name);else{let l=Sn(t.name)?t.name:t.name.right,d=Or(t.name,l,3,N.Cannot_find_name_0,!1,!0);if(d){let p=$t(d.valueDeclaration),h=$t(t);p==h&&(o=hn(t.name,N.LPCDoc_var_tags_can_only_annotate_inherited_variables_0_is_a_local_variable,l.text))}}Bt(t.typeExpression)}function iee(t){t.typeExpression||hn(t.name,N.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),t.name&&U6(t.name,N.Type_alias_name_cannot_be_0),Bt(t.typeExpression),nee(hx(t))}function oee(t){Bt(t.constraint);for(let o of t.typeParameters)Bt(o)}function aee(t){Bt(t.typeExpression)}function see(t){Bt(t.typeExpression)}function cee(t){Bt(t.typeExpression)}function lee(t){Bt(t.typeExpression)}function uee(t){r(o),YP(t);function o(){t.type||Ma(t,wt)}}function dee(t){let o=Ar(cm(t),hc);if(!gr(o))return;let s=wr(t),l=new Set,d=new Set;if(Bn(t.parameters,({name:h},x)=>{h&&Sn(h)&&l.add(h.text),h&&Po(h)&&d.add(x)}),ZZ(t)){let h=o.length-1,x=o[h];s&&x&&Sn(x.name)&&x.typeExpression&&x.typeExpression.type&&!l.has(x.name.text)&&!d.has(h)&&!va(rr(x.typeExpression.type))&&hn(x.name,N.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type,ra(x.name))}else Bn(o,({name:h,isNameFirst:x},I)=>{d.has(I)||Sn(h)&&l.has(h.text)||(hl(h)?s&&hn(h,N.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1,Wd(h),Wd(h.left)):x||r4(s,h,N.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name,ra(h)))})}function o0(t){return Jx(t)&&O4(t)}function gN(t){let o=t.arguments||Re,s=Iw(o);if(s>=0){let l=o.slice(0,s);for(let d=s;d<o.length;d++){let p=o[d],h=p.kind===294&&(et?ni(p.expression):Ds(p.expression));l.push(p)}return l}return o}function Sy(t){return t.flags&128&&Ym(t)?Er:t.flags&256&&Ym(t)?Co:t.flags&2048&&Ym(t)?Xr:t.flags&512&&Ym(t)?Gi:t.flags&1048576?Fa(t,Sy):t}function a0(t,o,s){return console.warn("todo - getRestTypeAtPosition"),wt}function q6(t){let o=t.parent;if(!o0(o))return;let s=dm(o);if(s&&s.arguments){let d=gN(s),p=o.parameters.indexOf(t);if(t.dotDotDotToken)return vw(d,p,d.length,wt,void 0,0);let h=Wt(s),x=h.resolvedSignature;h.resolvedSignature=pi;let I=p<d.length?Sy(ni(d[p])):t.initializer?void 0:w;return h.resolvedSignature=x,I}let l=t_(o);if(l){let d=o.parameters.indexOf(t);return t.dotDotDotToken&&Vo(o.parameters)===t?a0(l,d):hy(l,d)}}function s0(t,o){let s=$(t);if(t.parent.kind!==170&&t.parent.kind!==274&&t.flags&33554432){let l=mE(t);l&&l.flags&128&&!(s&4096)&&(s|=2048),s|=4096}return s&o}function fee(t){function o(lt,Qn){return Qn!==void 0&&Qn.parent===lt[0].parent?Qn:lt[0]}function s(lt,Qn,Ct,Rt,Fr){if((Rt^Fr)!==0){let jo=s0(o(lt,Qn),Ct);Bn(lt,go=>{let oi=s0(go,Ct)^jo})}}function l(lt,Qn,Ct,Rt){}let d=6150,p=0,h=d,x=!1,I=!0,B=!1,z,re,pe,_e=t.declarations,on=(t.flags&16384)!==0,pn=!1,Kn=!1,Nn=!1,it=[];if(_e)for(let lt of _e){let Qn=lt,Ct=Qn.flags&33554432,Rt=Qn.parent&&Qn.parent.kind===163||Ct;if(Rt&&(pe=void 0),(Qn.kind===170||Qn.kind===274)&&!Ct&&(Nn=!0),Qn.kind===169||Qn.kind===154||Qn.kind===156){it.push(Qn);let Fr=s0(Qn,d);p|=Fr,h&=Fr;let Wr=lm(Qn.body);Wr&&z&&(on?Kn=!0:pn=!0),Wr?z||(z=Qn):B=!0,pe=Qn,Rt||(re=Qn)}}if(pn&&Bn(it,lt=>{hn(ci(lt)||lt,N.Duplicate_function_implementation)}),Nn&&!on&&t.flags&16&&_e&&Bn(_e,lt=>{let Qn=lt.kind===170?N.Class_declaration_cannot_implement_overload_list_for_0:lt.kind===169?N.Function_with_bodies_can_only_merge_with_classes_that_are_ambient:void 0;Qn&&ia(hn(ci(lt)||lt,Qn,Ws(t)))}),B&&(_e&&(s(_e,z,d,p,h),void 0),z)){let lt=aT(t),Qn=to(z);for(let Ct of lt)if(!mee(Qn,Ct)){let Rt=Qn.declaration&&Ef(Qn.declaration)?Qn.declaration.parent.tagName:Qn.declaration;ia(hn(Rt,N.This_overload_signature_is_not_compatible_with_its_implementation_signature),wi(Ct.declaration,N.The_implementation_signature_is_declared_here));break}}}function V6(t){return ws(t,void 0)}function pee(t){return sT(t,V6(t.typeParameters),!0)}function xC(t){return t.typeParameters?t.erasedSignatureCache||(t.erasedSignatureCache=pee(t)):t}function mee(t,o){let s=xC(t),l=xC(o),d=$i(s),p=$i(l);return p===bt||Vu(p,d,sc)||Vu(d,p,sc)?gee(s,l,!0):!1}function gee(t,o,s){return d0(t,o,s?4:0,!1,void 0,void 0,tu,void 0)!==0}function yN(t){if(!t.typeParameters&&(!t.thisParameter||Ms(hC(t.thisParameter)))&&t.parameters.length===1&&Sl(t)){let o=hC(t.parameters[0]);return!!((va(o)?Qo(o)[0]:o).flags&131073&&$i(t).flags&3)}return!1}function yee(t){return ik(t,Yn(t.typeParameters,o=>o.target&&!dc(o.target)?o.target:o),wr(t.declaration))}function hee(t){return t.typeParameters?t.canonicalSignatureCache||(t.canonicalSignatureCache=yee(t)):t}function c0(t,o,s){let l=qc(t),d=qc(o),p=ZN(t),h=ZN(o),x=h?d-1:d,I=p?x:Math.min(l,x);for(let B=0;B<I;B++)s(vd(t,B),vd(o,B));h&&s(a0(t,I,!1),h)}function H6(t,o,s,l){let d=rD(t.typeParameters,t,0,l),p=ZN(o),h=s&&(p&&p.flags&262144?s.nonFixingMapper:s.mapper),x=h?sT(o,h):o;return c0(x,t,(I,B)=>{Mp(d.inferences,I,B)}),s||u0(o,t,(I,B)=>{Mp(d.inferences,I,B,128)}),ik(t,G6(d),wr(o.declaration))}function l0(t,o){return t.kind===o.kind&&t.parameterIndex===o.parameterIndex}function u0(t,o,s){let l=Ic(o);if(l){let p=Ic(t);if(p&&l0(p,l)&&p.type&&l.type){s(p.type,l.type);return}}let d=$i(o);Bu(d)&&s($i(t),d)}function Tee(t){switch(t.parent.kind){case 271:case 151:case 169:case 270:case 158:case 154:case 156:let o=t.parent;if(t===o.type)return o;case 188:return zD(t)}}function See(t){let o=Tee(t);if(!o){hn(t,N.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return}let s=to(o),l=Ic(s);if(!l)return;Bt(t.type);let{parameterName:d}=t;if(l.parameterIndex>=0){if(Sl(s)&&l.parameterIndex===s.parameters.length-1)hn(d,N.A_type_predicate_cannot_reference_a_rest_parameter);else if(l.type){let p=()=>Pi(void 0,N.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type);Wp(l.type,Xt(s.parameters[l.parameterIndex]),t.type,void 0,p)}}else if(d){let p=!1;for(let{name:h}of o.parameters)if(Po(h)&&z6(h,d,l.parameterName)){p=!0;break}p||hn(t.parameterName,N.Cannot_find_parameter_0,l.parameterName)}}function z6(t,o,s){for(let l of t.elements){if(Fh(l))continue;let d=l.name;if(d.kind===89&&d.text===s)return hn(o,N.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,s),!0;if(d.kind===265&&z6(d,o,s))return!0}}function _ee(t,o){let s,l=[];for(let p of t){let h=Ic(p);if(h){if(h.kind!==1||s&&!l0(s,h))return;s=h,l.push(h.type)}else{let x=o!==2097152?$i(p):void 0;if(x!==xs&&x!==Cn)return}}if(!s)return;let d=s4(l,o);return o_(s.kind,s.parameterName,s.parameterIndex,d)}function o_(t,o,s,l){return{kind:t,parameterName:o,parameterIndex:s,type:l}}function xee(t,o){return o_(t.kind,t.parameterName,t.parameterIndex,or(t.type,o))}function Ic(t){if(!t.resolvedTypePredicate){if(t.target){let o=Ic(t.target);t.resolvedTypePredicate=o?xee(o,t.mapper):no}else if(t.compositeSignatures)t.resolvedTypePredicate=_ee(t.compositeSignatures,t.compositeKind)||no;else{let o=t.declaration&&Vl(t.declaration),s;if(!o){let l=af(t.declaration);l&&t!==l&&(s=Ic(l))}if(o||s)t.resolvedTypePredicate=o&&qg(o)?bee(o,t):s||no;else if(t.declaration&&$c(t.declaration)&&(!t.resolvedReturnType||t.resolvedReturnType.flags&16)&&qc(t)>0){let{declaration:l}=t;t.resolvedTypePredicate=no,t.resolvedTypePredicate=Cee(l)||no}else t.resolvedTypePredicate=no}E.assert(!!t.resolvedTypePredicate)}return t.resolvedTypePredicate===no?void 0:t.resolvedTypePredicate}function bee(t,o){let s=t.parameterName,l=t.type&&rr(t.type);return s.kind===260?o_(0,void 0,void 0,l):o_(1,s.text,zc(o.parameters,d=>d.name===s.text),l)}function Cee(t){if(yl(t)!==0)return;let s;if(t.body&&t.body.kind!==236)s=t.body;else if(cp(t.body,d=>{if(s||!d.expression)return!0;s=d.expression})||!s||RA(t))return;return Dee(t,s)}function Dee(t,o){if(o=$o(o,!0),!!(Ds(o).flags&16))return Bn(t.parameters,(l,d)=>{let p=Xt(l.symbol);if(!p||p.flags&16||!Sn(l.name)||c3(l.symbol)||AD(l))return;let h=Eee(t,o,l,p);if(h)return o_(1,l.name.text,d,h)})}function Eee(t,o,s,l){let d=o.flowNode||o.parent.kind===248&&o.parent.flowNode||Nu(2,void 0,void 0),p=Nu(32,o,d),h=tg(s.name,l,l,t,p);if(h===l)return;let x=Nu(64,o,d);return tg(s.name,l,h,t,x).flags&131072?h:void 0}function G6(t){let o=[];for(let s=0;s<t.inferences.length;s++)o.push(Rw(t,s));return o}function Pee(t,o){return o===ki?t===o:nT(t,o)||!!(o.flags&4&&t.flags&128||o.flags&8&&t.flags&256)}function Nee(t,o){return!!(t.flags&524288&&o.flags&524288&&t.symbol&&t.symbol===o.symbol||t.aliasSymbol&&t.aliasTypeArguments&&t.aliasSymbol===o.aliasSymbol)}function $6(t){return!!Wt(t).skipDirectInference}function Q6(t){return!!(t.symbol&&Pn(t.symbol.declarations,$6))}function kee(t,o){return Bi(o)&&vee(o,0)===ou(t,rl(0))&&!al(o,"1")}function vee(t,o){let s=al(t,""+o);if(s)return s;if(Vc(t,Bi))return Y6(t,o,Fe.noUncheckedIndexedAccess?fr:void 0)}function Fee(t){return t.fixedLength+qC(t,3)}function Y6(t,o,s){return Fa(t,l=>{let d=l,p=dJ(d);return p?s&&o>=Fee(d.target)?vt([p,s]):p:fr})}function a_(t,o,s=0){return!!(t===o||t.flags&3145728&&Pn(t.types,l=>a_(l,o,s))||s<3&&t.flags&16777216&&(a_(Ny(t),o,s+1)||a_(ky(t),o,s+1)))}function X6(t,o,s){if(t.flags&1048576||t.flags&2097152&&!$A(t)){let l=Yn(t.types,d=>du(ou(d,o),s));return t.flags&2097152||s?Mi(l):vt(l)}}function Iee(t){let o=Wi();Ry(t,l=>{if(!(l.flags&128))return;let d=l.value,p=Fo(4,d);p.links.type=wt,l.symbol&&(p.declarations=l.symbol.declarations,p.valueDeclaration=l.symbol.valueDeclaration),o.set(d,p)});let s=t.flags&4?[Kp(Er,Bo,!1)]:Re;return Lc(void 0,o,Re,Re,s)}function Lee(t,o){return!(o.target.combinedFlags&8)&&o.target.minLength>t.target.minLength||!o.target.hasRestElement&&(t.target.hasRestElement||o.target.fixedLength<t.target.fixedLength)}function Aee(t,o){return Bi(t)&&Bi(o)?Lee(t,o):!!uw(t,o,!1,!0)&&!!uw(o,t,!1,!1)}function wee(t,o){return zp(t)===zp(o)&&yi(t.target.elementFlags,(s,l)=>(s&12)===(o.target.elementFlags[l]&12))}function Ree(t){let o=t.typeParameters;if(o){if(t.baseSignatureCache)return t.baseSignatureCache;let s=V6(o),l=ws(o,Yn(o,p=>dc(p)||Mr)),d=Yn(o,p=>or(p,l)||Mr);for(let p=0;p<o.length-1;p++)d=au(d,l);return d=au(d,s),t.baseSignatureCache=sT(t,ws(o,d),!0)}return t}function Z6(t){return Ae?RP(t,ki):Hu(t,524288)}function Mp(t,o,s,l=0,d=!1){let p=!1,h,x=2048,I,B,z,re=0;pe(o,s);function pe(an,je){if(!(!Bu(je)||pT(je))){if(an===la||an===Jt){let Dt=h;h=an,pe(je,je),h=Dt;return}if(an.aliasSymbol&&an.aliasSymbol===je.aliasSymbol){if(an.aliasTypeArguments){let Dt=at(an.aliasSymbol).typeParameters,ir=lf(Dt),jt=Vm(an.aliasTypeArguments,Dt,ir,wr(an.aliasSymbol.valueDeclaration)),Si=Vm(je.aliasTypeArguments,Dt,ir,wr(an.aliasSymbol.valueDeclaration));it(jt,Si,$J(an.aliasSymbol))}return}if(an===je&&an.flags&3145728){for(let Dt of an.types)pe(Dt,Dt);return}if(je.flags&1048576){let[Dt,ir]=Nn(an.flags&1048576?an.types:[an],je.types,Pee),[jt,Si]=Nn(Dt,ir,Nee);if(Si.length===0)return;if(je=vt(Si),jt.length===0){_e(an,je,1);return}an=vt(jt)}else if(je.flags&2097152&&!yi(je.types,tJ)&&!(an.flags&1048576)){let[Dt,ir]=Nn(an.flags&2097152?an.types:[an],je.types,nT);if(Dt.length===0||ir.length===0)return;an=Mi(Dt),je=Mi(ir)}if(je.flags&41943040){if(pT(je))return;je=sf(je)}if(je.flags&8650752){if(Q6(an))return;let Dt=Ct(je);if(Dt){if(dt(an)&262144||an===Gs)return;if(!Dt.isFixed){let jt=h||an;if(jt===Jt)return;if((Dt.priority===void 0||l<Dt.priority)&&(Dt.candidates=void 0,Dt.contraCandidates=void 0,Dt.topLevel=!0,Dt.priority=l),l===Dt.priority){if(kee(Dt.typeParameter,jt))return;d&&!p?Gr(Dt.contraCandidates,jt)||(Dt.contraCandidates=$r(Dt.contraCandidates,jt),rk(t)):Gr(Dt.candidates,jt)||(Dt.candidates=$r(Dt.candidates,jt),rk(t))}!(l&128)&&je.flags&262144&&Dt.topLevel&&!a_(s,je)&&(Dt.topLevel=!1,rk(t))}x=Math.min(x,l);return}let ir=du(je,!1);if(ir!==je)pe(an,ir);else if(je.flags&8388608){let jt=du(je.indexType,!1);if(jt.flags&465829888){let Si=X6(du(je.objectType,!1),jt,!1);Si&&Si!==je&&pe(an,Si)}}}if(dt(an)&4&&dt(je)&4&&(an.target===je.target||va(an)&&va(je))&&!(an.node&&je.node))it(Qo(an),Qo(je),pw(an.target));else if(an.flags&4194304&&je.flags&4194304)lt(an.type,je.type);else if((Jf(an)||an.flags&4)&&je.flags&4194304){let Dt=Iee(an);on(Dt,je.type,256)}else if(an.flags&8388608&&je.flags&8388608)pe(an.objectType,je.objectType),pe(an.indexType,je.indexType);else if(an.flags&268435456&&je.flags&268435456)an.symbol===je.symbol&&pe(an.type,je.type);else if(an.flags&33554432)pe(an.baseType,je),_e(gw(an),je,4);else if(je.flags&16777216)Kn(an,je,jo);else if(je.flags&3145728)Fr(an,je.types,je.flags);else if(an.flags&1048576){let Dt=an.types;for(let ir of Dt)pe(ir,je)}else{if(an=Nl(an),Rs(an)&&Rs(je)&&Kn(an,je,go),!(l&512&&an.flags&467927040)){let Dt=Ha(an);if(Dt!==an&&!(Dt.flags&2621440))return pe(Dt,je);an=Dt}an.flags&2621440&&Kn(an,je,oi)}}}function _e(an,je,Dt){let ir=l;l|=Dt,pe(an,je),l=ir}function on(an,je,Dt){let ir=l;l|=Dt,lt(an,je),l=ir}function pn(an,je,Dt,ir){let jt=l;l|=ir,Fr(an,je,Dt),l=jt}function Kn(an,je,Dt){let ir=an.id+","+je.id,jt=I&&I.get(ir);if(jt!==void 0){x=Math.min(x,jt);return}(I||(I=new Map)).set(ir,-1);let Si=x;x=2048;let zr=re;(B??(B=[])).push(an),(z??(z=[])).push(je),fT(an,B,B.length,2)&&(re|=1),fT(je,z,z.length,2)&&(re|=2),re!==3?Dt(an,je):x=-1,z.pop(),B.pop(),re=zr,I.set(ir,x),x=Math.min(x,Si)}function Nn(an,je,Dt){let ir,jt;for(let Si of je)for(let zr of an)Dt(zr,Si)&&(pe(zr,Si),ir=dg(ir,zr),jt=dg(jt,Si));return[ir?Ar(an,Si=>!Gr(ir,Si)):an,jt?Ar(je,Si=>!Gr(jt,Si)):je]}function it(an,je,Dt){let ir=an.length<je.length?an.length:je.length;for(let jt=0;jt<ir;jt++)jt<Dt.length&&(Dt[jt]&7)===2?lt(an[jt],je[jt]):pe(an[jt],je[jt])}function lt(an,je){d=!d,pe(an,je),d=!d}function Qn(an,je){me||l&1024?lt(an,je):pe(an,je)}function Ct(an){if(an.flags&8650752){for(let je of t)if(an===je.typeParameter)return je}}function Rt(an){let je;for(let Dt of an){let ir=Dt.flags&2097152&&Sr(Dt.types,jt=>!!Ct(jt));if(!ir||je&&ir!==je)return;je=ir}return je}function Fr(an,je,Dt){let ir=0;if(Dt&1048576){let jt,Si=an.flags&1048576?an.types:[an],zr=new Array(Si.length),fa=!1;for(let yo of je)if(Ct(yo))jt=yo,ir++;else for(let Yi=0;Yi<Si.length;Yi++){let Xs=x;x=2048,pe(Si[Yi],yo),x===l&&(zr[Yi]=!0),fa=fa||x===-1,x=Math.min(x,Xs)}if(ir===0){let yo=Rt(je);yo&&_e(an,yo,1);return}if(ir===1&&!fa){let yo=Oo(Si,(Yi,Xs)=>zr[Xs]?void 0:Yi);if(yo.length){pe(vt(yo),jt);return}}}else for(let jt of je)Ct(jt)?ir++:pe(an,jt);if(Dt&2097152?ir===1:ir>0)for(let jt of je)Ct(jt)&&_e(an,jt,1)}function Wr(an,je,Dt){if(Dt.flags&1048576||Dt.flags&2097152){let ir=!1;for(let jt of Dt.types)ir=Wr(an,je,jt)||ir;return ir}if(Dt.flags&4194304){let ir=Ct(Dt.type);if(ir&&!ir.isFixed&&!Q6(an)){let jt=b6(an,je,Dt);jt&&_e(jt,ir.typeParameter,dt(an)&262144?16:8)}return!0}if(Dt.flags&262144){_e(ju(an,an.pattern?2:0),Dt,32);let ir=qp(Dt);if(ir&&Wr(an,je,ir))return!0;let jt=Yn(Ba(an),Xt),Si=Yn(za(an),zr=>zr!==Ao?zr.type:Lt);return pe(vt(Zr(jt,Si)),rT(je)),!0}return!1}function jo(an,je){if(an.flags&16777216)pe(an.checkType,je.checkType),pe(an.extendsType,je.extendsType),pe(Ny(an),Ny(je)),pe(ky(an),ky(je));else{let Dt=[Ny(je),ky(je)];pn(an,Dt,je.flags,d?64:0)}}function go(an,je){pe(uu(an),uu(je)),pe(rT(an),rT(je));let Dt=Ou(an),ir=Ou(je);Dt&&ir&&pe(Dt,ir)}function oi(an,je){if(dt(an)&4&&dt(je)&4&&(an.target===je.target||va(an)&&va(je))){it(Qo(an),Qo(je),pw(an.target));return}if(Rs(an)&&Rs(je)&&go(an,je),dt(je)&32&&!je.declaration.nameType){let Dt=uu(je);if(Wr(an,je,Dt))return}if(!Aee(an,je)){if(cf(an)){if(Bi(je)){let Dt=zp(an),ir=zp(je),jt=Qo(je),Si=je.target.elementFlags;if(Bi(an)&&wee(an,je)){for(let yo=0;yo<ir;yo++)pe(Qo(an)[yo],jt[yo]);return}let zr=Bi(an)?Math.min(an.target.fixedLength,je.target.fixedLength):0,fa=Math.min(Bi(an)?qC(an.target,3):0,je.target.hasRestElement?qC(je.target,3):0);for(let yo=0;yo<zr;yo++)pe(Qo(an)[yo],jt[yo]);if(!Bi(an)||Dt-zr-fa===1&&an.target.elementFlags[zr]&4){let yo=Qo(an)[zr];for(let Yi=zr;Yi<ir-fa;Yi++)pe(Si[Yi]&8?Na(yo):yo,jt[Yi])}else{let yo=ir-zr-fa;if(yo===2){if(Si[zr]&Si[zr+1]&8){let Yi=Ct(jt[zr]);Yi&&Yi.impliedArity!==void 0&&(pe(S_(an,zr,fa+Dt-Yi.impliedArity),jt[zr]),pe(S_(an,zr+Yi.impliedArity,fa),jt[zr+1]))}else if(Si[zr]&8&&Si[zr+1]&4){let Yi=Ct(jt[zr])?.typeParameter,Xs=Yi&&xa(Yi);if(Xs&&Bi(Xs)&&!Xs.target.hasRestElement){let Ll=Xs.target.fixedLength;pe(S_(an,zr,Dt-(zr+Ll)),jt[zr]),pe(GC(an,zr+Ll,fa),jt[zr+1])}}else if(Si[zr]&4&&Si[zr+1]&8){let Yi=Ct(jt[zr+1])?.typeParameter,Xs=Yi&&xa(Yi);if(Xs&&Bi(Xs)&&!Xs.target.hasRestElement){let Ll=Xs.target.fixedLength,zu=Dt-qC(je.target,3),Gf=zu-Ll,Al=mf(Qo(an).slice(Gf,zu),an.target.elementFlags.slice(Gf,zu),!1,an.target.labeledElementDeclarations&&an.target.labeledElementDeclarations.slice(Gf,zu));pe(GC(an,zr,fa+Ll),jt[zr]),pe(Al,jt[zr+1])}}}else if(yo===1&&Si[zr]&8){let Yi=je.target.elementFlags[ir-1]&2,Xs=S_(an,zr,fa);_e(Xs,jt[zr],Yi?2:0)}else if(yo===1&&Si[zr]&4){let Yi=GC(an,zr,fa);Yi&&pe(Yi,jt[zr])}}for(let yo=0;yo<fa;yo++)pe(Qo(an)[Dt-yo-1],jt[ir-yo-1]);return}if(va(je)){$a(an,je);return}}So(an,je),Ir(an,je,0),Ir(an,je,1),$a(an,je)}}function So(an,je){let Dt=uf(je);for(let ir of Dt){let jt=qo(an,ir.name);jt&&!Pn(jt.declarations,$6)&&pe(of(Xt(jt),!!(jt.flags&16777216)),of(Xt(ir),!!(ir.flags&16777216)))}}function Ir(an,je,Dt){let ir=ro(an,Dt),jt=ir.length;if(jt>0){let Si=ro(je,Dt),zr=Si.length;for(let fa=0;fa<zr;fa++){let yo=Math.max(jt-zr+fa,0);ls(Ree(ir[yo]),xC(Si[fa]))}}}function ls(an,je){if(!(an.flags&512)){let Dt=p,ir=je.declaration?je.declaration.kind:0;p=p||ir===154||ir===156,c0(an,je,Qn),p=Dt}u0(an,je,pe)}function $a(an,je){let Dt=dt(an)&dt(je)&32?8:0,ir=za(je);if(UN(an))for(let jt of ir){let Si=[];for(let zr of Ba(an))if(Np(mC(zr,384),jt.keyType)){let fa=Xt(zr);Si.push(zr.flags&16777216?Z6(fa):fa)}for(let zr of za(an))Np(zr.keyType,jt.keyType)&&Si.push(zr.type);Si.length&&_e(vt(Si),jt.type,Dt)}for(let jt of ir){let Si=kp(an,jt.keyType);Si&&_e(Si.type,jt.type,Dt)}}}function d0(t,o,s,l,d,p,h,x){if(t===o)return-1;if(!(s&16&&yN(t))&&yN(o))return-1;if(s&16&&yN(t)&&!yN(o))return 0;let I=qc(o);if(!kd(o)&&(s&8?kd(t)||qc(t)>I:Ju(t)>I))return l&&!(s&8)&&d(N.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1,Ju(t),I),0;t.typeParameters&&t.typeParameters!==o.typeParameters&&(o=hee(o),t=H6(t,o,void 0,h));let z=qc(t),re=x_(t),pe=x_(o);(re||pe)&&or(re||pe,x);let _e=o.declaration?o.declaration.kind:0,on=!(s&3)&&me&&_e!==154&&_e!==156,pn=-1,Kn=re||pe?Math.min(z,I):Math.max(z,I),Nn=re||pe?Kn-1:-1;for(let it=0;it<Kn;it++){let lt=it===Nn?n4(t,it):hy(t,it),Qn=it===Nn?n4(o,it):hy(o,it);if(lt&&Qn&&(lt!==Qn||s&8)){let Ct=s&3||e4(t,it)?void 0:Up(lt),Rt=s&3||e4(o,it)?void 0:Up(Qn),Wr=Ct&&Rt&&!Ic(Ct)&&!Ic(Rt)&&eD(lt,50331648)===eD(Qn,50331648)?d0(Rt,Ct,s&8|(on?2:1),l,d,p,h,x):!(s&3)&&!on&&h(lt,Qn,!1)||h(Qn,lt,l);if(Wr&&s&8&&it>=Ju(t)&&it<Ju(o)&&h(lt,Qn,!1)&&(Wr=0),!Wr)return l&&d(N.Types_of_parameters_0_and_1_are_incompatible,NC(t,it),NC(o,it)),0;pn&=Wr}}if(!(s&4)){let it=TN(o)?wt:$i(o);if(it===bt||it===wt)return pn;let lt=TN(t)?wt:$i(t),Qn=Ic(o);if(Qn){let Ct=Ic(t);if(Ct)pn&=Oee(Ct,Qn,l,d,h);else if(Lq(Qn))return l&&d(N.Signature_0_must_be_a_type_predicate,d_(t)),0}else pn&=s&1&&h(it,lt,!1)||h(lt,it,l),!pn&&l&&p&&p(lt,it)}return pn}function Oee(t,o,s,l,d){return console.info("todo - compareTypePredicateRelatedTo"),-1}function oT(t){return!!s_(t)}function f0(t){return!!(s_(t)&4194304)}function s_(t){return t.flags&3145728?(t.objectFlags&2097152||(t.objectFlags|=2097152|Bl(t.types,(o,s)=>o|s_(s),0)),t.objectFlags&12582912):t.flags&33554432?(t.objectFlags&2097152||(t.objectFlags|=2097152|s_(t.baseType)|s_(t.constraint)),t.objectFlags&12582912):(t.flags&58982400||Rs(t)||Vp(t)?4194304:0)|(t.flags&63176704||BJ(t)?8388608:0)}function e4(t,o){let s;return!!(t.target&&(s=hy(t.target,o))&&oT(s))}function n4(t,o){let s=a0(t,o),l=s&&_C(s);return l&&Ms(l)?wt:s}function t_e(t,o){}function Mee(t){!_y(t)&&!o4(t.declarationList)&&Wee(t),dC(t.declarationList)}function t4(t){if(t.kind,236,sO(t)){let o=Q;Bn(t.statements,Bt),Q=o}else Bn(t.statements,Bt);t.locals&&c_(t)}function c_(t){r(o);function o(){let s=$t(t),l=Yt.get(s.path);l||(l=[],Yt.set(s.path,l)),l.push(t)}}function r4(t,o,s,...l){if(o.pos<0||o.end<0){if(!t)return;let d=Mc(o);wN(t,"message"in s?sd(d,0,0,s,...l):MO(d,s));return}wN(t,"message"in s?wi(o,s,...l):_h($t(o),o,s))}function bC(t){let o=SN(t,!1);return Te=t,te=o,o}function i4(t){return t.id<=0&&(t.id=zH,zH++),t.id}function Bee(t){return t===2?"private":t===4?"protected":"public"}function _y(t){let o=jee(t);if(o!==void 0)return o;let s=ld(t)?t.declarationList.flags&1:0,l,d,p,h,x=0,I=!1,B=!1;for(let z of t.modifiers){if(t.kind===153||t.kind===156)return cc(z,N._0_modifier_cannot_appear_on_a_type_member,Ai(z.kind));if(t.kind===150&&(z.kind!==125||!Sa(t.parent)))return cc(z,N._0_modifier_cannot_appear_on_an_index_signature,Ai(z.kind));switch(z.kind){case 124:case 123:case 122:let re=Bee(lh(z.kind));if(x&7)return cc(z,N.Accessibility_modifier_already_seen);if(x&256)return cc(z,N._0_modifier_must_precede_1_modifier,re,"static");if(x&8192)return cc(z,N._0_modifier_must_precede_1_modifier,re,"readonly");x|=lh(z.kind);break;case 125:if(x&256)return cc(z,N._0_modifier_already_seen,"static");if(t.kind===149)return cc(z,N._0_modifier_cannot_appear_on_a_parameter,"static");x|=256,l=z;break}}return t.kind===149&&x&167&&Po(t.name)?cc(t,N.A_parameter_property_may_not_be_declared_using_a_binding_pattern):t.kind===149&&x&167&&t.dotDotDotToken?cc(t,N.A_parameter_property_cannot_be_declared_using_a_rest_parameter):!1}function jee(t){if(!t.modifiers)return!1;let o=Jee(t);return o&&Uf(o,N.Modifiers_cannot_appear_here)}function Jee(t){switch(t.kind){case 152:case 153:case 154:case 156:case 150:case 270:case 271:case 149:case 148:case 169:case 242:return;case 174:case 175:case 173:return Sr(t.modifiers,sm);default:switch(t.kind){case 170:case 274:case 239:case 241:case 283:return Sr(t.modifiers,sm);default:E.assertNever(t)}}}function r_e(t,o){let s=Sr(t.modifiers,sm);return s&&s.kind!==o?s:void 0}function Wee(t){return!1}function o4(t){let o=t.declarations;return!1}function Uee(t){return(xo(t)||Tl(t)||Ff(t)||_o(t))&&!!(tc(t,J)||wr(t)&&op(t)&&t.initializer&&MD(t.initializer)&&Vl(t.initializer))}function p0(t,o){if(t=xy(t),t.flags&8752)return Xt(t);if(t.flags&7){if(oa(t)&262144){let l=t.links.syntheticOrigin;if(l&&p0(l))return Xt(t)}let s=t.valueDeclaration;if(s){if(Uee(s))return Xt(t);if(xo(s)&&s.parent.parent.kind===244){let l=s.parent.parent,d=CC(l.expression,void 0);if(d)return Gp(13,d,fr,void 0)}o&&ia(o,wi(s,N._0_needs_an_explicit_type_annotation,Qi(t)))}}}function CC(t,o){switch(t.kind){case 89:let s=ao(t.parent)?16:void 0,l=Ey(lc(t,s));return p0(l,o);case 71:return S0(t);case 286:{let d=CC(t.expression,o);if(d){let p=t.name,h;return h=qo(d,p.text),h&&p0(h,o)}return}case 289:return CC(t.expression,o)}}function hN(t){let o=Wt(t),s=o.effectsSignature;if(s===void 0){let l;t.parent.kind===247?l=CC(t.expression,void 0):t.expression.kind!==71&&(l=Qm(t.expression));let d=ro(l&&Ha(l)||Mr,0),p=d.length===1&&!d[0].typeParameters?d[0]:Pn(d,a4)?ZC(t):void 0;s=o.effectsSignature=p&&a4(p)?p:Wc}return s===Wc?void 0:s}function a4(t){return!!(Ic(t)||t.declaration&&(Ga(t.declaration)||Mr).flags&131072)}function s4(t,o,s){return o!==2097152?vt(t,s):Mi(t)}function Kee(t,o){let s=yl(t),l=[],d=RA(t),p=!1;if(cp(t.body,h=>{let x=h.expression;if(x){if(x=$o(x,!0),x.kind===272&&x.expression.kind===89&&Ds(x.expression).symbol===kt(t.symbol)&&!Jx(t.symbol.valueDeclaration)){p=!0;return}let I=Ds(x,o&&o&-9);I.flags&131072&&(p=!0),fu(l,I)}else d=!0}),!(l.length===0&&!d&&(p||qee(t))))return G&&l.length&&d&&fu(l,fr),l}function qee(t){switch(t.kind){case 270:case 283:return!0;default:return!1}}function TN(t){return t.compositeSignatures&&Pn(t.compositeSignatures,TN)||!t.resolvedReturnType&&pN(t,3)>=0}function c4(t,o){let s=Ga(t);if(s)return s;let l=BA(t);if(l&&!TN(l)){let p=$i(l),h=yl(t);return h&1?ka(p,x=>!!(x.flags&58998787)):h&2?ka(p,x=>!!(x.flags&58998787)):p}let d=dm(t);if(d)return iu(d,o)}function DC(t,o){if(!t.body)return Gn;let s=yl(t),l=(s&2)!==0,d=(s&1)!==0,p,h,x,I=bt;if(t.body.kind!==236){if(Kl(t)&&Nr(t.body))return console.debug("todo - remove this hack"),wt;p=Ds(t.body,o&&o&-9),Kl(t)&&Sn(t.body)&&dt(p)&16&&(p=ha(p.callSignatures)?.resolvedReturnType??p)}else{let B=Kee(t,o);if(!B)return Lt;if(B.length===0){let z=c4(t,void 0);return z&&(pC(z,s)||bt).flags&32768?fr:bt}p=vt(B,2)}if(p||h||x){if(h&&ZP(t,h,3),p&&ZP(t,p,1),x&&ZP(t,x,2),p&&Dn(p)||h&&Dn(h)||x&&Dn(x)){let B=BA(t),z=B?B===to(t)?d?void 0:p:sN($i(B),t,void 0):void 0;p=Vee(p,z,l)}h&&(h=sl(h)),p&&(p=sl(p)),x&&(x=sl(x))}return p||I}function l4(t,o){return uN(t,o)||(t=Sy(t)),ba(t)}function Vee(t,o,s){return t&&Dn(t)&&(t=l4(t,o)),t}function $i(t){if(!t.resolvedReturnType){if(!Op(t,3))return Gn;let o=t.target?or($i(t.target),t.mapper):t.compositeSignatures?or(s4(Yn(t.compositeSignatures,$i),t.compositeKind,2),t.mapper):Ga(t.declaration)||(Da(t.declaration.body)?wt:DC(t.declaration));if(t.flags&128&&(o=Bp(o)),!Rp()){if(t.declaration){let s=Vl(t.declaration);if(s)hn(s,N.Return_type_annotation_circularly_references_itself);else if($e){let l=t.declaration,d=ci(l);d?hn(d,N._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Fs(d)):hn(l,N.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}o=wt}t.resolvedReturnType??(t.resolvedReturnType=o)}return t.resolvedReturnType}function u4(t){let o=Wt(t);if(o.isExhaustive===void 0){o.isExhaustive=0;let s=Gee(t);o.isExhaustive===0&&(o.isExhaustive=s)}else o.isExhaustive===0&&(o.isExhaustive=!1);return o.isExhaustive}function Hee(t){return!(t.flags&232352)}function zee(t,o){return t.flags&1048576?!Bn(t.types,s=>!Gr(o,s)):Gr(o,t)}function Gee(t){let o=Ds(t.expression);if(!Jf(o))return!1;let s=VN(t);return!s.length||Pn(s,Hee)?!1:zee(Fa(o,ba),s)}function SN(t,o){let s=0;for(;;){if(s++>100)return console.warn("Bailing out of reachable flow worker"),te;if(t===Te)return te;let l=t.flags;if(l&4096){if(!o){let d=i4(t),p=ge[d];return p!==void 0?p:ge[d]=SN(t,!0)}o=!1}if(l&1)return!1;if(l&368)t=t.antecedent;else if(l&512){let d=hN(t.node);if(d&&$i(d).flags&131072)return!1;t=t.antecedent}else{if(l&4)return Pn(t.antecedent,d=>SN(d,!1));if(l&8){let d=t.antecedent;if(d===void 0||d.length===0)return!1;t=d[0]}else if(l&128){let d=t.node;if(d.clauseStart===d.clauseEnd&&u4(d.switchStatement))return!1;t=t.antecedent}else if(l&1024){Te=void 0;let d=t.node.target,p=d.antecedent;d.antecedent=t.node.antecedents;let h=SN(t.antecedent,!1);return d.antecedent=p,h}else return!(l&1)}}}function d4(t){let o=t.id||0;return o<0||o>=Je.length?0:Je[o]?.flags||0}function i_e(t,o){return $ee(t,o),!!(d4(t)&o)}function $ee(t,o){if(!Fe.noCheck&&P9($t(t),Fe)||Wt(t).calculatedFlags&o)return;switch(o){case 16:case 32:return h(t);case 128:case 256:case 2097152:return p(t);case 512:case 8192:case 65536:case 262144:return I(t);case 536870912:return B(t);case 4096:case 32768:case 16384:return re(t);default:return E.assertNever(o,`Unhandled node check flag calculation: ${E.formatNodeCheckFlags(o)}`)}function l(_e,on){let pn=on(_e,_e.parent);if(pn!=="skip")return pn||nS(_e,on)}function d(_e){let on=Wt(_e);if(on.calculatedFlags&o)return"skip";on.calculatedFlags|=2097536,h(_e)}function p(_e){l(_e,d)}function h(_e){let on=Wt(_e);on.calculatedFlags|=48,_e.kind===71&&S0(_e)}function x(_e){let on=Wt(_e);if(on.calculatedFlags&o)return"skip";on.calculatedFlags|=336384,B(_e)}function I(_e){l(_e,x)}function B(_e){let on=Wt(_e);if(on.calculatedFlags|=536920064,Sn(_e)&&fm(_e)&&!(Ti(_e.parent)&&_e.parent.name===_e)){let pn=Fl(_e,!0);pn&&pn!==ko&&f3(_e,pn)}}function z(_e){let on=Wt(_e);if(on.calculatedFlags&o)return"skip";on.calculatedFlags|=53248,pe(_e)}function re(_e){let on=Sh(ql(_e)?_e.parent:_e);l(on,z)}function pe(_e){B(_e)}}function Qee(t){let o=t.valueDeclaration;return o&&Tl(o)&&!tc(o)&&!o.initializer&&($e||wr(o))}function Yee(t,o){let s=o?.valueDeclaration&&(!Qee(o)||Df(o.valueDeclaration)&4096)&&f4(o)||fr;return tg(t,vn,s)}function f4(t){let o=EC(t),s=o&&Bf(o)[0];return s&&al(s,t.name)}function EC(t){return t.parent&&t.parent.flags&32?as(zf(t)):void 0}function p4(t,o,s,l,d){let p=mm(t);if(p===1)return of(s,!!(o&&o.flags&16777216));if(o&&!(o.flags&98311)&&!(o.flags&8192&&s.flags&1048576))return s;if(s===vn)return Yee(t,o);s=H0(s,t,d);let h=!1;G&&o&&o.valueDeclaration&&Ti(o.valueDeclaration)&&UO(o.valueDeclaration)&&JC(t)===JC(o.valueDeclaration)&&(h=!0);let x=tg(t,s,h?Bp(s):s);return h&&!WC(s)&&WC(x)?(hn(l,N.Property_0_is_used_before_being_assigned,Qi(o)),s):p?qu(x):x}function Bp(t,o=!1){E.assert(G);let s=o?rs:fr;return t===s||t.flags&1048576&&t.types[0]===s?t:vt([t,s])}function m4(t,o,s,l,d,p=!0){let h=p?t.kind===146?t.right:t.kind===266&&t.propertyName?t.propertyName:t.name:void 0;return g4(t,o,s,l,d,h)}function g4(t,o,s,l,d,p){return!(Cu(d,s)&6)||o||l.flags&262144&&(l=l.isThisType?dc(l):xa(l)),!0}function m0(t,o,s){let l=t&&t.flags&106500&&t.valueDeclaration;if(!l)return;let d=ap(l,2),p=t.valueDeclaration&&pl(t.valueDeclaration)&&Yc(t.valueDeclaration.name);if(!(!d&&!p)&&!(o&&TF(o)&&!(t.flags&65536))){if(s){let h=er(o,$c);if(h&&h.symbol===t)return}(oa(t)&1?at(t).target:t).isReferenced=-1}}function y4(t,o){return!!o&&Ks(t)&&o===lc(wg(t))}function Xee(t,o,s,l){return!1}function Zee(t){let o=Wt(t);if(!(o.flags&1)){if($x(t,Fe,e))return;uA(t),FT(kn),FT(On),FT(nn),FT(Dr),o.flags&8388608&&(kn=o.potentialThisCollisions,On=o.potentialNewTargetCollisions,nn=o.potentialWeakMapSetCollisions,Dr=o.potentialReflectCollisions),Bn(t.statements,Bt),Bt(t.endOfFileToken);let s=Qp(t),l=$m(s);nne(t),c_(t),r(()=>{!t.isDeclarationFile&&(Fe.noUnusedLocals||Fe.noUnusedParameters)&&DJ(T4(t),(d,p,h)=>{!Ax(d)&&h4(p,!!(d.flags&33554432))&&Zn.add(h)})}),hte(t),o.flags|=1}}function h4(t,o){if(o)return!1;switch(t){case 0:return!!Fe.noUnusedLocals;case 1:return!!Fe.noUnusedParameters;default:return E.assertNever(t)}}function T4(t){return Yt.get(t.path)||Re}function ene(t,o){console.warn("Implement me - checkSourceFileNodesWorker")}function nne(t){let o=Wt(t);o.deferredNodes&&o.deferredNodes.forEach(tne),o.deferredNodes=void 0}function PC(t,o){return E.attachDebugPrototypeIfDebug({kind:3,func:t,debugInfo:E.isDebugging?o:void 0})}function Fl(t,o){if(Vr(t))return kt(t.symbol);let{parent:s}=t,l=s?.parent;if(GH(t))return rt(s);switch(t.kind,89,t.kind){case 89:case 286:case 146:return noe(t);case 71:return ni(t).symbol;case 179:return Il(t.name,268435456);case 16:if(t.parent.kind===252&&t.parent.inheritClause===t)return Dy(t,t,void 0,o);case 11:let p=rc(s)?s.argumentExpression===t?cs(s.expression):void 0:hu(s)&&Tg(l)?rr(l.objectType):void 0;return p&&qo(p,t.text);case 39:return Qp(t.parent);default:return}}function tne(t){In?.push(In.Phase.Check,"checkDeferredNode",{kind:t.kind,pos:t.pos,end:t.end,path:t.tracingPath});let o=v;switch(v=t,S=0,t.kind){case 272:case 276:_N(t);break;case 270:case 283:one(t);break;case 274:break;case 148:ine(t);break;case 279:case 296:case 289:rne(t);break;case 269:break;default:console.log("Unhandled deferred node kind: ",E.formatSyntaxKind(t.kind))}v=o,In?.pop()}function rne(t){let{type:o}=_4(t),s=Hd(t)?o:t,l=Wt(t);E.assertIsDefined(l.assertionExpressionType);let d=UC(qu(l.assertionExpressionType)),p=rr(o);da(p)||r(()=>{let h=sl(d);PN(p,h)||S4(d,p,s,N.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first)})}function S4(t,o,s,l,d){return Zm(t,o,wa,s,l,d)}function _4(t){let o,s;switch(t.kind){case 296:case 279:o=t.type,s=t.expression;break;case 289:o=mS(t),s=t.expression;break}return{type:o,expression:s}}function ine(t){if(JH(t.parent)||Sa(t.parent)||Xx(t.parent)){let o=Lp(rt(t)),s=GJ(o)&49152;if(s){let l=rt(t.parent);if(Xx(t.parent)&&!(dt(as(l))&52))hn(t,N.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);else if(s===16384||s===32768){In?.push(In.Phase.CheckTypes,"checkTypeParameterDeferred",{parent:Ca(as(l)),id:Ca(o)});let d=KC(l,o,s===32768?tl:Fu),p=KC(l,o,s===32768?Fu:tl),h=o;T=o,Wp(d,p,t,N.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation),T=h,In?.pop()}}}}function one(t){let o=yl(t),s=Ga(t);if(n6(t,s),t.body){if(Kl(t)&&Nr(t.body)){console.warn("todo - getReturnTypeFromBody - possible FluffOS function shortcut"),t.body.forEach(l=>ni(l));return}if(Vl(t)||$i(to(t)),t.body.kind===236)Bt(t.body);else{let l=ni(t.body),d=s&&pC(s,o);if(d){let p=Nw(t.body);Jp(l,d,p,p)}}}}function _N(t){return x4(t)&&Bn(t.typeArguments,Bt),br(t)?ni(t.left):Md(t)&&Bn(t.arguments,o=>{ni(o)}),pi}function x4(t){return Md(t)}function aT(t){if(!t||!t.declarations)return Re;let o=[];for(let s=0;s<t.declarations.length;s++){let l=t.declarations[s];if(Ji(l)){if(s>0&&l.body){let d=t.declarations[s-1];if(l.parent===d.parent&&l.kind===d.kind&&l.pos===d.end)continue}if(wr(l)&&l.jsDoc){let d=$q(l);if(gr(d)){for(let p of d){let h=p.typeExpression;h.type===void 0&&!vh(l)&&Ma(h,wt),o.push(to(h))}continue}}o.push(!Jx(l)&&!Kx(l)&&af(l)||to(l))}}return o}function g0(t){return t?.members?QN(t.members):void 0}function b4(t){let o=g0(t);return o?C4(o):Re}function C4(t){if(t.declarations){let o=[];for(let s of t.declarations)if(s.parameters.length===1){let l=s.parameters[0];l.type&&Ry(rr(l.type),d=>{ane(d)&&!LP(o,d)&&o.push(Kp(d,s.type?rr(s.type):wt,ap(s,8192),s))})}return o}return Re}function ane(t){return!!(t.flags&12)}function D4(t){if(!t.declaredProperties){v4(t);let o=t.symbol,s=pf(o);t.declaredProperties=LC(s),t.declaredCallSignatures=Re,t.declaredConstructSignatures=Re,t.declaredIndexInfos=Re,t.declaredCallSignatures=aT(s.get("__call")),t.declaredConstructSignatures=aT(s.get("__new")),t.declaredIndexInfos=b4(o)}return t}function ni(t,o,s,l){In?.push(In.Phase.Check,"checkExpression",{kind:t.kind,pos:t.pos,end:t.end,path:t.tracingPath});let d=v;v=t,S=0;let p=One(t,o,s,l),h=Ane(t,p,o);return v=d,In?.pop(),h}function sne(t){let o=D4(t.target),s=Zr(o.typeParameters,[o.thisType]),l=Qo(t),d=l.length===s.length?l:Zr(l,[t]);N4(t,o,s,d)}function sT(t,o,s){let l;if(t.typeParameters&&!s){l=Yn(t.typeParameters,HA),o=wp(ws(t.typeParameters,l),o);for(let p of l)p.mapper=o}let d=df(t.declaration,l,t.thisParameter&&y0(t.thisParameter,o),nN(t.parameters,o,y0),void 0,void 0,t.minArgumentCount,t.flags&1295);return d.target=t,d.mapper=o,d}function xN(t,o){return nN(t,o,sT)}function cne(t,o){return Kp(t.keyType,or(t.type,o),t.isReadonly,t.declaration)}function E4(t,o){return nN(t,o,cne)}function P4(t,o){for(let s of o){let l=t.get(s.name);(!l||l.valueDeclaration&&br(l.valueDeclaration))&&t.set(s.name,s)}}function N4(t,o,s,l){let d,p,h,x,I;K1(s,l,0,s.length)?(p=o.symbol?pf(o.symbol):Wi(o.declaredProperties),h=o.declaredCallSignatures,x=o.declaredConstructSignatures,I=o.declaredIndexInfos):(d=ws(s,l),p=k4(o.declaredProperties,d,s.length===1),h=xN(o.declaredCallSignatures,d),x=xN(o.declaredConstructSignatures,d),I=E4(o.declaredIndexInfos,d));let B=Bf(o);if(B.length){if(o.symbol&&p===pf(o.symbol)){let re=Wi(o.declaredProperties),pe=g0(o.symbol);pe&&re.set("__index",pe),p=re}ff(t,p,h,x,I);let z=Vo(l);for(let re of B){let pe=re;P4(p,Ba(pe)),h=Zr(h,ro(pe,0)),x=Zr(x,ro(pe,1));let _e=pe!==wt?za(pe):[Kp(Er,wt,!1)];I=Zr(I,Ar(_e,on=>!LP(I,on.keyType)))}}ff(t,p,h,x,I)}function lne(t){return!0}function y0(t,o){let s=at(t);if(s.type&&!Bu(s.type)&&(!(t.flags&65536)||s.writeType&&!Bu(s.writeType)))return t;oa(t)&1&&(t=s.target,o=wp(s.mapper,o));let l=Fo(t.flags,t.name,1|oa(t)&53256);return l.declarations=t.declarations,l.parent=t.parent,l.links.target=t,l.links.mapper=o,t.valueDeclaration&&(l.valueDeclaration=t.valueDeclaration),s.nameType&&(l.links.nameType=s.nameType),l}function k4(t,o,s){let l=Wi();for(let d of t)l.set(d.name,s&&lne(d)?d:y0(d,o));return l}function une(t){let o=LC(t),s=QN(t);return s?Zr(o,[s]):o}function v4(t){if(t.target){ff(t,A,Re,Re,Re);let h=k4(uf(t.target),t.mapper,!1),x=xN(ro(t.target,0),t.mapper),I=xN(ro(t.target,1),t.mapper),B=E4(za(t.target),t.mapper);ff(t,h,x,I,B);return}let o=kt(t.symbol);if(!o){console.debug("no symbol found");return}if(o.flags&2048){ff(t,A,Re,Re,Re);let h=pf(o),x=aT(h.get("__call")),I=aT(h.get("__new")),B=b4(o);ff(t,h,x,I,B);return}let s=by(o),l,d;if(ff(t,s,Re,Re,Re),o?.flags&32){let h=$m(o);h.flags&11272192&&(s=Wi(une(s)),P4(s,Ba(h)))}let p=QN(s);if(p?l=C4(p):d&&(l=$r(l,d)),ff(t,s,Re,Re,l||Re),o.flags&8208&&(t.callSignatures=aT(o)),o.flags&32){let h=$m(o),x=o.members?aT(o.members.get("__constructor")):Re;o.flags&16&&(console.debug("todo - resolveAnonymousTypeMembers - function"),x=Ro(x.slice(),Ei(t.callSignatures,I=>{}))),x.length||(x=dne(h)),t.constructSignatures=x}}function h0(t){return Yn(t.typeArguments,rr)}function dne(t){let o=U0(t),s=ro(o,1),l=gE(t.symbol),d=!1;if(s.length===0)return[df(void 0,t.localTypeParameters,void 0,Re,t,void 0,0,d?4:0)];let p=Gb(t),h=wr(p),x=h0(p),I=gr(x),B=[];for(let z of s){let re=lf(z.typeParameters),pe=gr(z.typeParameters);if(h||I>=re&&I<=pe){let _e=pe?ok(z,Vm(x,z.typeParameters,re,h)):yC(z);_e.typeParameters=t.localTypeParameters,_e.resolvedReturnType=t,_e.flags=d?_e.flags|4:_e.flags&-5,B.push(_e)}}return B}function T0(t){N4(t,D4(t),Re,Re)}function fne(t){console.debug("todo - resolveReverseMappedTypeMembers")}function pne(t){console.debug("todo - resolveMappedTypeMembers")}function Wu(t){return t.members||(t.flags&524288?t.objectFlags&4?sne(t):t.objectFlags&3||t.objectFlags&3?T0(t):t.objectFlags&1024?fne(t):t.objectFlags&16?v4(t):t.objectFlags&32&&pne(t):t.flags&1048576?Sne(t):t.flags&2097152?mne(t):E.fail("Unhandled type "+E.formatTypeFlags(t.flags))),t}function mne(t){let o,s,l,d=t.types,p=hne(d),h=Zf(p,x=>x);for(let x=0;x<d.length;x++){let I=t.types[x];if(!p[x]){let B=ro(I,1);B.length&&h>0&&(B=Yn(B,z=>{let re=yC(z);return re.resolvedReturnType=Tne($i(z),d,p,x),re})),s=F4(s,B)}o=F4(o,ro(I,0)),l=Bl(za(I),(B,z)=>gne(B,z,!1),l)}ff(t,A,o||Re,s||Re,l||Re)}function F4(t,o){for(let s of o)(!t||yi(t,l=>!lN(l,s,!1,!1,!1,cN)))&&(t=$r(t,s));return t}function gne(t,o,s){if(t)for(let l=0;l<t.length;l++){let d=t[l];if(d.keyType===o.keyType)return t[l]=Kp(d.keyType,s?vt([d.type,o.type]):Mi([d.type,o.type]),s?d.isReadonly||o.isReadonly:d.isReadonly&&o.isReadonly),t}return $r(t,o)}function yne(t){let o=ro(t,1);if(o.length===1){let s=o[0];if(!s.typeParameters&&s.parameters.length===1&&Sl(s)){let l=hC(s.parameters[0]);return Ms(l)||_C(l)===wt}}return!1}function hne(t){let o=Zf(t,l=>ro(l,1).length>0),s=Yn(t,yne);if(o>0&&o===Zf(s,l=>l)){let l=s.indexOf(!0);s[l]=!1}return s}function Tne(t,o,s,l){let d=[];for(let p=0;p<o.length;p++)p===l?d.push(t):s[p]&&d.push($i(ro(o[p],1)[0]));return Mi(d)}function Sne(t){let o=I4(Yn(t.types,d=>d===j?[Wc]:ro(d,0))),s=I4(Yn(t.types,d=>ro(d,1))),l=_ne(t.types);ff(t,A,o,s,l)}function _ne(t){let o=za(t[0]);if(o){let s=[];for(let l of o){let d=l.keyType;yi(t,p=>!!Iu(p,d))&&s.push(Kp(d,vt(Yn(t,p=>Nd(p,d))),Pn(t,p=>Iu(p,d).isReadonly)))}return s}return Re}function I4(t){let o,s;for(let l=0;l<t.length;l++){if(t[l].length===0)return Re;t[l].length>1&&(s=s===void 0?l:-1);for(let d of t[l])if(!o||!bN(o,d,!1,!1,!0)){let p=Nne(t,d,l);if(p){let h=d;if(p.length>1){let x=d.thisParameter,I=Bn(p,B=>B.thisParameter);if(I){let B=Mi(Ei(p,z=>z.thisParameter&&Xt(z.thisParameter)));x=Bm(I,B)}h=B6(d,p),h.thisParameter=x}(o||(o=[])).push(h)}}}if(!gr(o)&&s!==-1){let l=t[s!==void 0?s:0],d=l.slice();for(let p of t)if(p!==l){let h=p[0];if(E.assert(!!h,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),d=h.typeParameters&&Pn(d,x=>!!x.typeParameters&&!Cne(h.typeParameters,x.typeParameters))?void 0:Yn(d,x=>xne(x,h)),!d)break}o=d}return o||Re}function xne(t,o){let s=t.typeParameters||o.typeParameters,l;t.typeParameters&&o.typeParameters&&(l=ws(o.typeParameters,t.typeParameters));let d=t.declaration,p=bne(t,o,l),h=Math.max(t.minArgumentCount,o.minArgumentCount),x=df(d,s,void 0,p,void 0,void 0,h,(t.flags|o.flags)&1295);return x.compositeKind=1048576,x.compositeSignatures=Zr(t.compositeKind!==2097152&&t.compositeSignatures||[t],[o]),l?x.mapper=t.compositeKind!==2097152&&t.mapper&&t.compositeSignatures?wp(t.mapper,l):l:t.compositeKind!==2097152&&t.mapper&&t.compositeSignatures&&(x.mapper=t.mapper),x}function bne(t,o,s){let l=qc(t),d=qc(o),p=l>=d?t:o,h=p===t?o:t,x=p===t?l:d,I=kd(t)||kd(o),B=I&&!kd(p),z=new Array(x+(B?1:0));for(let re=0;re<x;re++){let pe=hy(p,re);p===o&&(pe=or(pe,s));let _e=hy(h,re)||Mr;h===o&&(_e=or(_e,s));let on=Mi([pe,_e]),pn=I&&!B&&re===x-1,Kn=re>=Ju(p)&&re>=Ju(h),Nn=re>=l?void 0:NC(t,re),it=re>=d?void 0:NC(o,re),lt=Nn===it?Nn:Nn?it?void 0:Nn:it,Qn=Fo(1|(Kn&&!pn?16777216:0),lt||`arg${re}`,pn?32768:Kn?16384:0);Qn.links.type=pn?Na(on):on,z[re]=Qn}if(B){let re=Fo(1,"args",32768);re.links.type=Na(vd(h,x)),h===o&&(re.links.type=or(re.links.type,s)),z[x]=re}return z}function NC(t,o,s){let l=t.parameters.length-(Sl(t)?1:0);if(o<l)return t.parameters[o].name;let d=t.parameters[l]||ko,p=s||Xt(d);return d.name}function Cne(t,o){if(gr(t)!==gr(o))return!1;if(!t||!o)return!0;let s=ws(o,t);for(let l=0;l<t.length;l++){let d=t[l],p=o[l];if(d!==p&&!nT(l_(d)||Mr,or(l_(p)||Mr,s)))return!1}return!0}function l_(t){if(!t.constraint)if(t.target){let o=dc(t.target);t.constraint=o?or(o,t.mapper):$s}else{let o=YA(t);if(!o)t.constraint=Ene(t)||$s;else{let s=rr(o);s.flags&1&&!da(s)&&(s=o.parent.parent.kind===264?yr:Mr),t.constraint=s}}return t.constraint===$s?void 0:t.constraint}function Dne(t,o,s){return t.typeArguments&&s<t.typeArguments.length?rr(t.typeArguments[s]):i0(t,o)[s]}function Ene(t,o){let s;if(t.symbol?.declarations){for(let l of t.symbol.declarations)if(l.parent.kind===259){let[d=l.parent,p]=eV(l.parent.parent);if(p.kind===166&&!o){let h=p,x=BP(h);if(x){let I=h.typeArguments.indexOf(d);if(I<x.length){let B=dc(x[I]);if(B){let z=Ow(x,x.map((pe,_e)=>()=>Dne(h,x,_e))),re=or(B,z);re!==t&&(s=$r(s,re))}}}}else if(p.kind===149&&p.dotDotDotToken||p.kind===160||p.kind===262&&p.dotDotDotToken)s=$r(s,Na(Mr));else if(p.kind===148&&p.parent.kind===264)s=$r(s,yr);else if(p.kind===264&&p.type&&$o(p.type)===l.parent&&p.parent.kind===168&&p.parent.extendsType===p&&p.parent.checkType.kind===264&&p.parent.checkType.type){let h=p.parent.checkType,x=rr(h.type);s=$r(s,or(x,Hf(Lp(rt(h.typeParameter)),h.typeParameter.constraint?rr(h.typeParameter.constraint):yr)))}}}return s&&Mi(s)}function bN(t,o,s,l,d){for(let p of t)if(lN(p,o,s,l,d,s?Pne:cN))return p}function Pne(t,o){return Vu(t,o,Dl)?-1:0}function Nne(t,o,s){if(o.typeParameters){if(s>0)return;for(let d=1;d<t.length;d++)if(!bN(t[d],o,!1,!1,!1))return;return[o]}let l;for(let d=0;d<t.length;d++){let p=d===s?o:bN(t[d],o,!1,!1,!0)||bN(t[d],o,!0,!1,!0);if(!p)return;l=dg(l,p)}return l}function u_(t,o,s){if(t.flags&524288){let l=Wu(t);if(s||l.properties&&l.properties?.length===0&&l.indexInfos?.length===0){if(o===0&&l.callSignatures?.length===1&&l.constructSignatures?.length===0)return l.callSignatures[0];if(o===1&&l.constructSignatures?.length===1&&l.callSignatures?.length===0)return l.constructSignatures[0]}}}function kne(t,o){return t.block&&t.expression&&hn(t,N.Catch_expression_cannot_also_have_a_block),t.block?t4(t.block):ni(t.expression,o),vt([xs,Er])}function S0(t,o){Wt(t).flags|=16;let s=$t(t),l=Qp(s);!l.inherits?.size&&(!t.namespace||ml(t.namespace)!=="efun")&&hn(t,N.Super_access_can_only_be_used_in_a_file_that_inherits_from_another_file);let d=as(l);return d&&Bf(d)[0]?L3(t.name,o):Gn}function _0(t,o){return Pn(t,s=>s.symbol.name===o)}function vne(t,o){let s=o.length;for(;s>1&&o.charCodeAt(s-1)>=48&&o.charCodeAt(s-1)<=57;)s--;let l=o.slice(0,s);for(let d=1;;d++){let p=l+d;if(!_0(t,p))return p}}function Fne(t,o){let s=[],l,d;for(let p of o){let h=p.symbol.name;if(_0(t.inferredTypeParameters,h)||_0(s,h)){let x=vne(Zr(t.inferredTypeParameters,s),h),I=Fo(262144,x),B=kl(I);B.target=p,l=$r(l,p),d=$r(d,B),s.push(B)}else s.push(p)}if(d){let p=ws(l,d);for(let h of d)h.mapper=p}return s}function Ine(t,o){for(let s=0;s<t.length;s++)if(wy(t[s])&&wy(o[s]))return!0;return!1}function Lne(t,o){for(let s=0;s<t.length;s++)!wy(t[s])&&wy(o[s])&&(t[s]=o[s])}function Ane(t,o,s){if(s&&s&10){let l=u_(o,0,!0),d=u_(o,1,!0),p=l||d;if(p&&p.typeParameters){let h=gC(t,2);if(h){let x=u_(h,l?0:1,!1);if(x&&!x.typeParameters){if(s&8)return vJ(t,s),Cl;let I=tT(t),B=I.signature&&$i(I.signature),z=B&&XJ(B);if(z&&!z.typeParameters&&!yi(I.inferences,wy)){let re=Fne(I,p.typeParameters),pe=Mw(p,re),_e=Yn(I.inferences,on=>Lw(on.typeParameter));if(c0(pe,x,(on,pn)=>{Mp(_e,on,pn,0,!0)}),Pn(_e,wy)&&(u0(pe,x,(on,pn)=>{Mp(_e,on,pn)}),!Ine(I.inferences,_e)))return Lne(I.inferences,_e),I.inferredTypeParameters=Zr(I.inferredTypeParameters,re),RC(pe)}return RC(H6(p,x,I),Oo(zn,re=>re&&Yn(re.inferences,pe=>pe.typeParameter)).slice())}}}}return o}function wne(t,o){return t.flags&4194304?Rne(t,o):L4(t,Qm(t.expression),o)}function Rne(t,o){let s=ni(t.expression),l=VS(s,t.expression);return HS(L4(t,Fd(l,t.expression),o),t,l!==s)}function L4(t,o,s){let l=mm(t)!==0||k3(t)?sl(o):o,d=t.argumentExpression,p=ni(d);if(da(l)||l===Br)return l;let h=p,x=mm(t),I;x===0?I=32:(I=4,x===2&&(I|=32));let B=fy(l,h,I,t)||Gn;return cn(p4(t,Wt(t).resolvedSymbol,B,d,s),t)}function One(t,o,s,l){let d=t.kind;if(i)switch(d){case 274:case 270:case 283:i.throwIfCancellationRequested()}switch(d){case 89:return L3(t,o,l);case 16:if(o&128){let p=x0(t);if(p)return p}return Hm(Au(t.text));case 14:return Hm(dA(t.text));case 11:return Hm(rl(+t.text));case 13:return Hm(rl(parseFloat(t.text)));case 290:return Cs(t,o,s);case 291:return iC(t,o,!1);case 292:return fA(t,o,!1);case 286:return cC(t,o);case 146:return v3(t,o);case 281:return wne(t,o);case 272:case 276:return Une(t,o);case 273:return A4(t,o);case 277:return YX(t,o);case 289:return QX(t,o);case 270:return GX(t,o);case 283:return GS(t,o);case 279:case 296:return $X(t,o);case 280:return console.debug("todo - implement check expression w/ type args"),wt;case 298:return Vne(t);case 288:return Kne(t);case 269:return _n(t,o);case 267:return Bne(t,o);case 282:return Mne(t,o);case 294:return _A(t,o);case 275:return E.fail("TODO - implement me - checkExpressionWorker - SyntheticExpression"),wt;case 237:return qP(t);case 287:return S0(t);case 268:return kne(t)}return console.warn("Implement me - checkExpressionWorker - "+E.formatSyntaxKind(t.kind)),Gn}function Mne(t,o){let s=[];return t.left&&s.push(ni(t.left,o)),t.right&&s.push(ni(t.right,o)),s.length>1?vt(s,2):s[0]}function Bne(t,o){let s=uy(t.condition,o);P0(t.condition,s,t.whenTrue);let l=ni(t.whenTrue,o),d=ni(t.whenFalse,o);return vt([l,d],2)}function jne(t,o){if(!(t.flags&1024)&&t.declaration&&t.declaration.flags&536870912){let s=Ru(o),l=WD(Mx(o));Jne(s,t.declaration,l,d_(t))}}function Jne(t,o,s,l){let d=s?wi(t,N.The_signature_0_of_1_is_deprecated,l,s):wi(t,N._0_is_deprecated,l);return a3(o,d)}function x0(t,o){let s=t,d=Dy(o||t,s,void 0);if(d){let p=kC(d,s,!0);if(p&&Vr(p.valueDeclaration))return Xt(p)}}function A4(t,o){if(Wne(t),!t.arguments?.length)return wt;let s=t.arguments[0],l=Ds(s);for(let p=1;p<t.arguments.length;++p)Ds(t.arguments[p]);(l.flags&32768||l.flags&65536||!Ui(l,Er))&&hn(s,N.Clone_object_s_specifier_must_be_of_type_string_but_here_has_type_0,_t(l));let d=Dy(t,s,l);if(d){let p=kC(d,s,!0);if(p&&Vr(p.valueDeclaration))return Xt(p)}return wt}function kC(t,o,s){let l=M0(t);return!s&&l&&E.fail("TODO - implement me - resolveExternalObjectSymbol"),l}function Wne(t){if(t.arguments?.length===0)return cc(t,N.Clone_object_can_only_accept_an_object_name_and_an_optional_set_of_attributes_as_arguments_1450)}function Une(t,o){let s=ZC(t,void 0,o);if(s===bs)return Br;if(jne(s,t),Em(t)&&!t.expression&&t.arguments?.length)return A4(t);if(ao(t)){if(t.expression.kind===71)return bt;let d=ci(t.expression),p=d&&Sn(d)?d.text:void 0;if(p==="this_object"){let h=$t(t),x=h.pragmas.get("this-object")??h.pragmas.get("this_object"),I;if(x){let B=XF(h,x);I=B.text?.length?x0(B):void 0}if(!I){let B=Fl(h);I=Xt(B)}return I}else if(p==="base_name"&&!t.arguments?.length){let h=$t(t),x=Mg(h.fileName,Fe);return Au(x)}if(p==="$"&&de===1&&er(t,Kl)){let h=t.arguments||Re,x=ha(h);if(x&&Sn(x)){let I=Ds(x,o&&o&-9);for(let B=1;B<h.length;++B)ni(h[B]);return I}return h.forEach(I=>ni(I)),wt}}let l=$i(s);if(t.kind===272&&t.parent.kind===247&&l.flags&16384&&Ic(s)){if(!Dx(t.expression))hn(t.expression,N.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name);else if(!hN(t)){let d=hn(t.expression,N.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation);CC(t.expression,d)}}return l}function Kne(t){let o=ni(t.operand);return o===Br?Br:(NN(t.operand,Fd(o,t.operand),N.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&cT(t.operand,N.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,N.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),b0(o))}function Hm(t){if(t.flags&2976){if(!t.freshType){let o=US(t.flags,t.value,t.symbol,t);o.freshType=o,t.freshType=o}return t.freshType}return t}function qne(t,o){if(vo(t,o))return!0;let s=jp(t);return!!s&&vo(s,o)}function jp(t){return xa(t)||t}function Vne(t){let o=ni(t.operand);if(o===Br)return Br;switch(t.operand.kind){case 11:switch(t.operator){case 42:return Hm(rl(-t.operand.text));case 41:return Hm(rl(+t.operand.text))}break;case 13:switch(t.operator){case 42:return Hm(rl(-t.operand.text));case 41:return Hm(rl(+t.operand.text))}}switch(t.operator){case 41:case 42:case 57:return Fd(o,t.operand),t.operator===41?(qne(o,2048)&&hn(t.operand,N.Operator_0_cannot_be_applied_to_type_1,Ai(t.operator),_t(qu(o))),Ht):b0(o);case 55:QS(o,t.operand);let s=eD(o,12582912);return s===4194304?xs:s===8388608?Ka:Gi;case 47:case 48:return NN(t.operand,Fd(o,t.operand),N.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&cT(t.operand,N.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,N.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),b0(o)}return Gn}function b0(t){return vo(t,2048)?Os(t,3)||vo(t,2344)?Co:Xr:Ht}function Hne(t,o,s,l){return console.debug("TODO - Implement me - checkDestructuringAssignment"),wt}function C0(t,o){return(o.flags&98304)!==0||PN(t,o)}function zne(t){return Fa(t,Gne)}function Gne(t){return t.flags&4?qa:t.flags&8?D:t===Cn||t===xs||t.flags&114691||t.flags&128&&t.value===""||t.flags&256&&t.value===0||t.flags&2048&&t.value===0?t:Lt}function $ne(){let t=pS(o,s,l,d,p,h);return(pe,_e)=>{let on=t(pe,_e);return E.assertIsDefined(on),on};function o(pe,_e,on){return _e?(_e.stackIndex++,_e.skip=!1,B(_e,void 0),re(_e,void 0)):_e={checkMode:on,skip:!1,stackIndex:0,typeStack:[void 0,void 0]},pe.operatorToken.kind===74&&(pe.left.kind===293||pe.left.kind===290)&&(_e.skip=!0,re(_e,Hne(pe.left,ni(pe.right,on),on,!1))),_e}function s(pe,_e,on){if(!_e.skip)return x(_e,pe)}function l(pe,_e,on){if(!_e.skip){let pn=z(_e);E.assertIsDefined(pn),B(_e,pn),re(_e,void 0);let Kn=pe.kind;if(FO(Kn)){let Nn=on.parent;for(;Nn.kind===289||vx(Nn);)Nn=Nn.parent;(Kn===58||XM(Nn))&&P0(on.left,pn,XM(Nn)?Nn.thenStatement:void 0),QS(pn,on.left)}}}function d(pe,_e,on){if(!_e.skip)return x(_e,pe)}function p(pe,_e){let on;if(_e.skip)on=z(_e);else{let pn=I(_e);E.assertIsDefined(pn);let Kn=z(_e);E.assertIsDefined(Kn),on=ate(pe.left,pe.operatorToken,pe.right,pn,Kn,_e.checkMode,pe)}return _e.skip=!1,B(_e,void 0),re(_e,void 0),_e.stackIndex--,on}function h(pe,_e,on){return re(pe,_e),pe}function x(pe,_e){if(br(_e))return _e;re(pe,ni(_e,pe.checkMode))}function I(pe){return pe.typeStack[pe.stackIndex]}function B(pe,_e){pe.typeStack[pe.stackIndex]=_e}function z(pe){return pe.typeStack[pe.stackIndex+1]}function re(pe,_e){pe.typeStack[pe.stackIndex+1]=_e}}function Qne(t){return t.flags&402653312?Er:t.flags&256?Co:t.flags&2048?Xr:t.flags&1048576?Fa(t,Qne):t}function Yne(t){return ka(t,o=>Uu(o,4194304))}function vC(t){switch(t=$o(t),t.kind){case 89:case 16:case 11:case 13:case 137:case 270:case 274:case 283:case 290:case 293:return!0;case 267:return vC(t.whenTrue)&&vC(t.whenFalse);case 269:return qd(t.operatorToken.kind)?!1:vC(t.left)&&vC(t.right);case 298:case 288:switch(t.operator){case 55:case 41:case 42:case 57:return!0}return!1;default:return!1}}function CN(t,o,s,l){Bn(t.declarations,d=>{ite(d,o,s,l.declarations)})}function Xne(t,o,...s){let l=t?wi(t,o,...s):Ac(o,...s),d=Zn.lookup(l);return d||(Zn.add(l),l)}function Jp(t,o,s,l,d,p){return w4(t,o,sc,s,l,d,p,void 0)}function w4(t,o,s,l,d,p,h,x){return Vu(t,o,s)?!0:!l||!EN(d,t,o,s,p,h,x)?Zm(t,o,s,l,p,h,x):!1}function R4(t){return!!(t.flags&16777216||t.flags&2097152&&Pn(t.types,R4))}function Wp(t,o,s,l,d,p){return Zm(t,o,sc,s,l,d,p)}function Zne(t,o,s,l,d,p,h){let x=ro(o,0),I=ro(o,1);for(let B of[I,x])if(Pn(B,z=>{let re=$i(z);return!(re.flags&131073)&&Zm(re,s,l,void 0)})){let z=h||{};Wp(o,s,t,d,p,z);let re=z.errors[z.errors.length-1];return ia(re,wi(t,B===I?N.Did_you_mean_to_use_new_with_this_expression:N.Did_you_mean_to_call_this_expression)),!0}return!1}function ete(t){return t.typeParameters||Vl(t)||!t.body?!1:t.body.kind!==236?ol(t.body):!!cp(t.body,o=>!!o.expression&&ol(o.expression))}function O4(t){return FF(t)||ete(t)}function ol(t){switch(t.kind){case 270:case 283:case 169:return O4(t);case 293:return Pn(t.properties,ol);case 290:return Pn(t.elements,ol);case 267:return ol(t.whenTrue)||ol(t.whenFalse);case 269:return t.operatorToken.kind===59&&(ol(t.left)||ol(t.right));case 174:return ol(t.initializer);case 289:return ol(t.expression)}return!1}function DN(t){return t&&!!t.valueDeclaration&&Tc(t.valueDeclaration)&&!ol(t.valueDeclaration)}function D0(t){return _t(t,void 0,64)}function E0(t,o){let s=DN(t.symbol)?_t(t,t.symbol.valueDeclaration):_t(t),l=DN(o.symbol)?_t(o,o.symbol.valueDeclaration):_t(o);return s===l&&(s=D0(t),l=D0(o)),[s,l]}function nte(t,o,s){let l=t,d=o,p=qu(t),h=qu(o);return s(p,h)||(l=p,d=h),[l,d]}function EN(t,o,s,l,d,p,h){if(!t||R4(s))return!1;if(!Zm(o,s,l,void 0)&&Zne(t,o,s,l,d,p,h))return!0;switch(t.kind){case 289:return EN(t.expression,o,s,l,d,p,h);case 269:switch(t.operatorToken.kind){case 74:case 27:return EN(t.right,o,s,l,d,p,h)}break;case 293:console.warn("todo - elaborateError - ObjectLiteralExpression");case 290:return tte(t,o,s,l,p,h);case 283:return rte(t,o,s,l,p,h)}return!1}function tte(t,o,s,l,d,p){if(s.flags&402915260)return!1;dN(t,s,!1);let h=Cs(t,1,!0);return i_(),!1}function rte(t,o,s,l,d,p){if(_c(t.body)||Pn(t.parameters,gx))return!1;let h=Up(o);if(!h)return!1;let x=ro(s,0);if(!gr(x))return!1;let I=t.body,B=$i(h),z=vt(Yn(x,$i));if(!Zm(B,z,l,void 0)){let re=I&&EN(I,B,z,l,void 0,d,p);if(re)return re;let pe=p||{};Zm(B,z,l,I,void 0,d,pe),pe.errors&&s.symbol&&gr(s.symbol.declarations)&&ia(pe.errors[pe.errors.length-1],wi(s.symbol.declarations[0],N.The_expected_type_comes_from_the_return_type_of_this_signature))}return!1}function cT(t,o,s){let l=Pg(t,7);return l.kind!==89&&!Us(l)?(hn(t,o),!1):l.flags&4194304?(hn(t,s),!1):!0}function ite(t,o,s,l){let d=ci(t)||t,p=Xne(d,o,s);for(let h of l||Re){let x=ci(h)||h;if(x===d)continue;p.relatedInformation=p.relatedInformation||[];let I=wi(x,N._0_was_also_declared_here,s),B=wi(x,N.and_here);gr(p.relatedInformation)>=5||Pn(p.relatedInformation,z=>Sx(z,B)===0||Sx(z,I)===0)||ia(p,gr(p.relatedInformation)?B:I)}}function uf(t){return t.flags&524288?Wu(t).properties:Re}function ote(t,o){let s=Ks(t)?Wd(t):void 0;console.debug("TODO - Implement me - reportObjectPossiblyNullOrUndefinedError")}function Fd(t,o){return kJ(t,o,ote)}function FC(t,o,s,...l){return hn(t,s,...l)}function PN(t,o){return Vu(t,o,wa)}function IC(t,o){return PN(t,o)||PN(o,t)}function NN(t,o,s,l=!1){return Ui(o,ai)?!0:(FC(t,!1,s),!1)}function o_e(t){if(va(t)&&t.resolvedTypeArguments?.length===1){let o=Uo(t.resolvedTypeArguments);return o.flags&256&&o.value===0}return!1}function ate(t,o,s,l,d,p,h){let x=o.kind;switch(x){case 43:case 44:case 77:case 78:case 45:case 79:case 46:case 80:case 42:case 76:case 49:case 81:case 50:case 82:case 51:case 83:case 53:case 85:case 54:case 88:case 52:case 84:if(l===Br||d===Br)return Br;l=Fd(l,t),d=Fd(d,s);let lt;if(l.flags&528&&d.flags&528&&(lt=re(o.kind))!==void 0)return hn(h||o,N.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead,Ai(o.kind),Ai(lt)),Ht;{let Rt=NN(t,l,N.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0),Fr=NN(s,d,N.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type,!0),Wr;return va(l)&&va(d)?Wr=l:Os(l,3)&&Os(d,3)||!(vo(l,2048)||vo(d,2048))?Wr=Ht:(pn(I),Wr=Gn),Rt&&Fr&&pe(Wr),Wr}case 41:case 75:if(l===Br||d===Br)return Br;!Os(l,402653316)&&!Os(d,402653316)&&(l=Fd(l,t),d=Fd(d,s));let Qn;if(Os(l,2344,!0)&&Os(d,2344,!0))Qn=Ht;else if(Os(l,402653316,!0)||Os(d,402653316,!0))Qn=Er;else if(Os(l,12288,!0)&&Os(d,12288,!0))Qn=xl;else if(Ms(l)||Ms(d))Qn=da(l)||da(d)?Gn:wt;else if(va(l)&&va(d)){let Rt=Uo(l.resolvedTypeArguments),Fr=Uo(d.resolvedTypeArguments);IC(Rt,Fr)&&(Qn=l)}else Ty(l)&&Ty(d)&&(Qn=l);if(!Qn){let Rt=402655663;return pn((Fr,Wr)=>Os(Fr,Rt)&&Os(Wr,Rt)),wt}return x===75&&pe(Qn),Qn;case 29:case 32:case 33:case 34:return Gi;case 35:case 36:case 37:case 38:if(!(p&&p&64)){if((cO(t)||cO(s))&&(!wr(t)||x===37||x===38)){let Rt=x===35||x===37;hn(h,N.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value,Rt?"false":"true")}Nn(h,x,t,s),on((Rt,Fr)=>C0(Rt,Fr)||C0(Fr,Rt))}return Gi;case 103:return ste(t,s,l,d);case 58:return Uu(l,4194304)?vt([zne(G?l:qu(d)),d]):l;case 59:case 86:{let Rt=Uu(l,8388608)?vt([Yne(l),d],2):l;return x===86&&pe(d),Rt}case 74:let Ct=br(t.parent)?es(t.parent):0;return B(Ct,d),_e(Ct)?((!(d.flags&524288)||Ct!==2&&Ct!==6&&!Yp(d)&&!(dt(d)&1))&&pe(d),l):(pe(d),d);case 27:if(!Fe.allowUnreachableCode&&vC(t)&&!z(t.parent)&&!bg(t.parent.parent)&&!er(t.parent,rc)){let Fr=$t(t).text,Wr=eo(Fr,t.pos);hn(t,N.Left_side_of_comma_operator_is_unused_and_has_no_side_effects)}return d;default:return E.fail()}function I(lt,Qn){return Os(lt,2048)&&Os(Qn,2048)}function B(lt,Qn){if(lt===2)for(let Ct of uf(Qn)){let Rt=Xt(Ct);if(Rt.symbol&&Rt.symbol.flags&32){let Fr=Ct.name,Wr=Or(Ct.valueDeclaration,Fr,788968,void 0,!1);Wr?.declarations&&Wr.declarations.some(bH)&&(CN(Wr,N.Duplicate_identifier_0,Fr,Ct),CN(Ct,N.Duplicate_identifier_0,Fr,Wr))}}}function z(lt){return lt.parent.kind===289&&yu(lt.left)&&lt.left.text==="0"&&ao(lt.parent.parent)&&lt.parent.parent.expression===lt.parent&&(Us(lt.right)||Sn(lt.right)&&lt.right.text==="eval")}function re(lt){switch(lt){case 53:case 85:return 59;case 54:case 88:return 38;case 52:case 84:return 58;default:return}}function pe(lt){qd(x)&&r(Qn);function Qn(){let Ct=l;cT(t,N.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,N.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)&&Jp(lt,Ct,t,s,void 0)}}function _e(lt){switch(lt){case 2:return!0;case 1:case 5:case 6:case 3:case 4:let Qn=Qp(t);return!1;default:return!1}}function on(lt){return lt(l,d)?!1:(pn(lt),!0)}function pn(lt){let Qn=!1,Ct=h||o;if(lt){let go=wA(l),oi=wA(d);Qn=!(go===l&&oi===d)&&!!(go&&oi)&&lt(go,oi)}let Rt=l,Fr=d;!Qn&&lt&&([Rt,Fr]=nte(l,d,lt));let[Wr,jo]=E0(Rt,Fr);Kn(Ct,Qn,Wr,jo)||FC(Ct,Qn,N.Operator_0_cannot_be_applied_to_types_1_and_2,Ai(o.kind),Wr,jo)}function Kn(lt,Qn,Ct,Rt){switch(o.kind){case 37:case 35:case 38:case 36:return FC(lt,Qn,N.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap,Ct,Rt);default:return}}function Nn(lt,Qn,Ct,Rt){let Fr=it($o(Ct)),Wr=it($o(Rt));if(Fr||Wr){let jo=hn(lt,N.This_condition_will_always_return_0,Ai(Qn===37||Qn===35?135:136));if(Fr&&Wr)return;let go=Qn===38||Qn===36?Ai(55):"",oi=Fr?Rt:Ct,So=$o(oi);ia(jo,wi(oi,N.Did_you_mean_0,`${go}Number.isNaN(${Ks(So)?Wd(So):"..."})`))}}function it(lt){return!1}}function M4(t){return t=$o(t,!0),t.kind===279||t.kind===296||xm(t)}function ste(t,o,s,l){return s===Br||l===Br?Br:(Wp(Fd(s,t),yr,t),Wp(Fd(l,o),yn,o)&&cte(l)&&hn(o,N.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator,_t(l)),Gi)}function cte(t){return Id(t,o=>o===is||!!(o.flags&2097152)&&lu(jp(o)))}function P0(t,o,s){if(!G)return;l(t,s);function l(p,h){for(p=$o(p),d(p,h);br(p)&&p.operatorToken.kind===59;)p=$o(p.left),d(p,h)}function d(p,h){let x=vx(p)?$o(p.right):p;if(vx(x)){l(x,h);return}let I=x===p?o:uy(x);if(I.flags&1024&&Ti(x)&&(Wt(x.expression).resolvedSymbol??ko).flags&384){hn(x,N.This_condition_will_always_return_0,I.value?"true":"false");return}let B=Ti(x)&&M4(x.expression);if(!Uu(I,4194304)||B||ro(I,0).length===0)return;let re=Sn(x)?x:Ti(x)?x.name:void 0,pe=re&&Fl(re);if(!pe)return;pe&&br(p.parent)&&ute(p.parent,pe)||pe&&h&&lte(p,h,re,pe)||hn(x,N.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead)}}function lte(t,o,s,l){return!!No(o,function d(p){if(Sn(p)){let h=Fl(p);if(h&&h===l){if(Sn(t)||Sn(s)&&br(s.parent))return!0;let x=s.parent,I=p.parent;for(;x&&I;){if(Sn(x)&&Sn(I))return Fl(x)===Fl(I);if(Ti(x)&&Ti(I)){if(Fl(x.name)!==Fl(I.name))return!1;I=I.expression,x=x.expression}else if(ao(x)&&ao(I))I=I.expression,x=x.expression;else return!1}}}return No(p,d)})}function ute(t,o){for(;br(t)&&t.operatorToken.kind===58;){if(No(t.right,function l(d){if(Sn(d)){let p=Fl(d);if(p&&p===o)return!0}return No(d,l)}))return!0;t=t.parent}return!1}function Uu(t,o){return eD(t,o)!==0}function N0(t,o){k0();let s=r;r=l=>l(),rf(t,o),r=s}function k0(){for(let t of n)t();n=[]}function Fo(t,o,s){y++;let l=new c(t|33554432,o);return l.links=new i2,l.links.checkFlags=s||0,l}function d_(t,o,s=0,l,d){return d?p(d).getText():JO(p);function p(h){let x;s&262144?x=158:x=151;let I=Pe.signatureToSignatureDeclaration(t,x,o,FJ(s)|70221824|512),B=iz(),z=o&&Mc(o);return B.writeNode(4,I,z,yE(h)),h}}function df(t,o,s,l,d,p,h,x){let I=new f(Li,x);return I.declaration=t,I.typeParameters=o,I.parameters=l,I.thisParameter=s,I.resolvedReturnType=d,I.resolvedTypePredicate=p,I.minArgumentCount=h,I.resolvedMinArgumentCount=void 0,I.target=void 0,I.mapper=void 0,I.compositeSignatures=void 0,I.compositeKind=void 0,I}function Lc(t,o,s,l,d){return ff(Ku(16,t),o,s,l,d)}function ff(t,o,s,l,d){let p=t;return p.members=o,p.properties=Re,p.callSignatures=s,p.constructSignatures=l,p.indexInfos=d,o!==A&&(p.properties=LC(o)),p}function a_e(t,o){let s=Fo(788968,o),l=AC(524288,s);return l.objectFlags=t,l.instantiations=new Map,l.resolvedBaseTypes=[],l.members=Wi(),l}function Ku(t,o){let s=AC(524288,o);return s.objectFlags=t,s.members=void 0,s.properties=void 0,s.callSignatures=void 0,s.constructSignatures=void 0,s.indexInfos=void 0,s}function LC(t){let o;return t.forEach((s,l)=>{dte(s,l)&&(o||(o=[])).push(s)}),o||Re}function AC(t,o){let s=Ut(t);return s.symbol=o,s}function dte(t,o){return v0(t)}function v0(t,o){return!!(t.flags&111551||t.flags&2097152&&lT(t,!o)&111551)}function lT(t,o,s){return t.flags}function fte(t,o,s){return!Sn(t)||t.text!==o||CJ(t)||SE(t),!1}function pte(t){return t==="string"||t==="int"||t==="object"||t==="float"||t==="mixed"||t==="mapping"||t==="unknown"||t==="bytes"||t==="buffer"}function B4(t,o=901119){return t?(t.flags&(2097152|o))===2097152||!!(t.flags&2097152&&t.flags&67108864):!1}function xy(t,o){return!o&&B4(t)?cu(t):t}function cu(t){E.assert((t.flags&2097152)!==0,"Should only get Alias here.");let o=at(t);if(o.aliasTarget)o.aliasTarget===lo&&(o.aliasTarget=ko);else{o.aliasTarget=lo;let s=uT(t);if(!s)return E.fail();let l=B0(s);o.aliasTarget===lo?o.aliasTarget=l||ko:hn(s,N.Circular_definition_of_import_alias_0,Qi(t))}return o.aliasTarget}function mte(t){if(at(t).aliasTarget!==lo)return cu(t)}function Qi(t,o,s,l=4,d){let p=70221824;l&2&&(p|=128),l&1&&(p|=512),l&8&&(p|=16384),l&32&&(p|=134217728),l&16&&(p|=1073741824);let h=l&4?Pe.symbolToNode:Pe.symbolToEntityName;return d?x(d).getText():JO(x);function x(I){let B=h(t,s,o,p),z=o?.kind===176?rz():zg(),re=o&&$t(o);return z.writeNode(4,B,re,I),I}}function F0(t,o,s,l){return o.tracker.trackSymbol(t,o.enclosingDeclaration,s),gte(t,o,s,l)}function gte(t,o,s,l){let d;return!(t.flags&262144)&&(o.enclosingDeclaration||o.flags&64)&&!(o.flags&134217728)?(d=E.checkDefined(h(t,s,!0)),E.assert(d&&d.length>0)):d=[t],d;function h(x,I,B){let z=wC(x,o.enclosingDeclaration,I,!!(o.flags&128)),re;if(!z||K4(z[0],o.enclosingDeclaration,z.length===1?I:Cy(I))){let _e=H4(z?z[0]:x,o.enclosingDeclaration,I);if(gr(_e)){re=_e.map(Kn=>{});let on=_e.map((Kn,Nn)=>Nn);on.sort(pe);let pn=on.map(Kn=>_e[Kn]);for(let Kn of pn){let Nn=h(Kn,Cy(I),!1);if(Nn){if(Kn.exports&&Kn.exports.get("export=")&&zm(Kn.exports.get("export="),x)){z=Nn;break}z=Nn.concat(z||[I0(Kn,x)||x]);break}}}}if(z)return z;if(B||!(x.flags&6144))return!B&&!l&&Bn(x.declarations,vN)?void 0:[x];function pe(_e,on){let pn=re[_e],Kn=re[on];if(pn&&Kn){let Nn=dh(Kn);return dh(pn)===Nn?LE.countPathComponents(pn)-LE.countPathComponents(Kn):Nn?-1:1}return 0}}}function j4(t,o){let s=at(t).nameType;if(s&&s.flags&384){let l=""+s.value;return!tm(l,Hl(Fe))&&!Ag(l)?`"${sp(l,34)}"`:Ag(l)&&Eo(l,"-")?`[${l}]`:l}}function kN(t,o){if(o?.remappedSymbolReferences?.has(so(t))&&(t=o.remappedSymbolReferences.get(so(t))),o&&t.name==="default"&&!(o.flags&16384)&&(!(o.flags&16777216)||!t.declarations))return"default";if(t.declarations&&t.declarations.length){let l=Ns(t.declarations,p=>ci(p)?p:void 0),d=l&&ci(l);if(l&&d){if(ps(d)&&!(oa(t)&4096)){let p=at(t).nameType;if(p&&p.flags&384){let h=j4(t,o);if(h!==void 0)return h}}return Fs(d)}if(l||(l=t.declarations[0]),l.parent&&l.parent.kind===237)return Fs(l.parent.name);switch(l.kind){case 274:case 270:case 283:return o&&!o.encounteredError&&!(o.flags&131072)&&(o.encounteredError=!0),l.kind===274?"(Anonymous class)":"(Anonymous function)"}}let s=j4(t,o);return s!==void 0?s:Ws(t)}function vN(t){return!1}function yte(t){return Zr(J4(t),Jm(t))}function J4(t){let o=t.flags&32||t.flags&16?t.valueDeclaration:t.declarations?.find(s=>{if(s.kind===155)return!0;if(s.kind!==237)return!1;let l=s.initializer;return!!l&&(l.kind===270||l.kind===283)});return E.assert(!!o,"Class was missing valueDeclaration -OR- non-class had no interface declarations"),n_(o)}function by(t){return t?.flags&6256?O3(t,"resolvedExports"):t?.exports??A}function W4(t){let o=at(t);if(!o.resolvedExports){let{exports:s}=Mre(t);o.resolvedExports=s}return o.resolvedExports}function hte(t){let o=rt(t),s=at(o);if(!s.exportsChecked){let l=W4(o);s.exportsChecked=!0}}function zm(t,o){if(kt(xy(kt(t)))===kt(xy(kt(o))))return t}function U4(t,o){return L0(t,o,111551,!1,!0).accessibility===0}function FN(t,o){let s;for(let l=t;l;l=l.parent){if(Wl(l)&&l.locals&&(s=o(l.locals,void 0,!0,l)))return s;switch(l.kind){case 176:let d=rt(l);if(s=o(d?.exports||A,void 0,!0,l))return s;break;case 274:let p;if((rt(l).members||A).forEach((h,x)=>{h.flags&788968&&(p||(p=Wi())).set(x,h)}),p&&(s=o(p,void 0,!1,l)))return s;break}}return o(Xn,void 0,!0)}function K4(t,o,s){let l=!1;return FN(o,d=>{let p=kt(d.get(t.name));if(!p)return!1;if(p===t)return!0;let h=p.flags&2097152&&!kf(p,171);return p=h?cu(p):p,(h?lT(p):p.flags)&s?(l=!0,!0):!1}),l}function Tte(t){if(t.declarations&&t.declarations.length){for(let o of t.declarations)switch(o.kind){case 152:continue;default:return!1}return!0}return!1}function Cy(t){return t===111551?111551:1920}function wC(t,o,s,l,d=new Map){if(!(t&&!Tte(t)))return;let p=at(t),h=p.accessibleChainCache||(p.accessibleChainCache=new Map),x=FN(o,(Nn,it,lt,Qn)=>Qn),I=`${l?0:1}|${x&&ys(x)}|${s}`;if(h.has(I))return h.get(I);let B=so(t),z=d.get(B);z||d.set(B,z=[]);let re=FN(o,pe);return h.set(I,re),re;function pe(Nn,it,lt){if(!fu(z,Nn))return;let Qn=pn(Nn,it,lt);return z.pop(),Qn}function _e(Nn,it){return!K4(Nn,o,it)||!!wC(Nn.parent,o,Cy(it),l,d)}function on(Nn,it,lt){return(t===(it||Nn)||kt(t)===kt(it||Nn))&&!Pn(Nn.declarations,vN)&&(lt||_e(kt(Nn),s))}function pn(Nn,it,lt){return on(Nn.get(t.name),void 0,it)?[t]:bc(Nn,Ct=>{if(Ct.flags&2097152&&Ct.name!=="export="&&Ct.name!=="default"&&(it||!kf(Ct,171))){let Rt=cu(Ct),Fr=Kn(Ct,Rt,it);if(Fr)return Fr}if(Ct.name===t.name&&Ct.exportSymbol&&on(kt(Ct.exportSymbol),void 0,it))return[t]})||(Nn===Xn?Kn(Ft,Ft,it):void 0)}function Kn(Nn,it,lt){if(on(Nn,it,lt))return[Nn];let Qn=by(it),Ct=Qn&&pe(Qn,!0);if(Ct&&_e(Nn,Cy(s)))return[Nn].concat(Ct)}}function q4(t,o){let s;if(!yi(Ar(t.declarations,p=>p.kind!==89),l))return;return{accessibility:0,aliasesToMakeVisible:s};function l(p){if(!oe(p)){if(xo(p)&&ld(p.parent.parent)&&!xu(p.parent.parent,2048)&&oe(p.parent.parent.parent))return d(p,p.parent.parent);if(H9(p)&&!xu(p,2048)&&oe(p.parent))return d(p,p);if(To(p)){if(t.flags&2097152&&wr(p)&&p.parent?.parent&&xo(p.parent.parent)&&p.parent.parent.parent?.parent&&ld(p.parent.parent.parent.parent)&&!xu(p.parent.parent.parent.parent,2048)&&p.parent.parent.parent.parent.parent&&oe(p.parent.parent.parent.parent.parent))return d(p,p.parent.parent.parent.parent);if(t.flags&2){let h=er(p,ld);return xu(h,2048)?!0:oe(h.parent)?d(p,h):!1}}return!1}return!0}function d(p,h){return o&&(Wt(p).isVisible=!0,s=dg(s,h)),!0}}function V4(t,o,s,l,d,p){if(!gr(t))return;let h,x=!1;for(let I of t){let B=wC(I,o,l,!1);if(B){h=I;let pe=q4(B[0],d);if(pe)return pe}if(p&&Pn(I.declarations,vN)){if(d){x=!0;continue}return{accessibility:0}}let z=H4(I,o,l),re=V4(z,o,s,s===I?Cy(l):l,d,p);if(re)return re}if(x)return{accessibility:0};if(h)return{accessibility:1,errorSymbolName:Qi(s,o,l),errorModuleName:h!==s?Qi(h,o,1920):void 0}}function I0(t,o){if(t===zf(o))return o;let s=t.exports&&t.exports.get("export=");if(s&&zm(s,o))return t;let l=by(t),d=l.get(o.name);return d&&zm(d,o)?d:bc(l,p=>{if(zm(p,o))return p})}function Ste(t,o){let s=!!gr(t.declarations)&&Uo(t.declarations);if(o&111551&&s&&s.parent&&xo(s.parent)&&(ms(s)&&s===s.parent.initializer||Bd(s)&&s===s.parent.type))return rt(s.parent)}function H4(t,o,s){let l=zf(t);if(l&&!(t.flags&262144))return I(l);let d=Ei(t.declarations,z=>{if(z.parent&&vN(z.parent))return rt(z.parent)});if(!gr(d))return;let p=Ei(d,z=>I0(z,t)?z:void 0),h=[],x=[];for(let z of p){let[re,...pe]=I(z);h=$r(h,re),x=Ro(x,pe)}return Zr(h,x);function I(z){let re=Ei(z.declarations,B),pe=o&&_te(t,o),_e=Ste(z,s);if(o&&z.flags&Cy(s)&&wC(z,o,1920,!1))return $r(Zr(Zr([z],re),pe),_e);let on=!(z.flags&Cy(s))&&z.flags&788968&&as(z).flags&524288&&s===111551?FN(o,Kn=>bc(Kn,Nn=>{if(Nn.flags&Cy(s)&&Xt(Nn)===as(z))return Nn})):void 0,pn=on?[on,...re,z]:[...re,z];return pn=$r(pn,_e),pn=Ro(pn,pe),pn}function B(z){return l&&void 0}}function s_e(t,o){}function _te(t,o){let s=$t(o),l=ys(s),d=at(t),p;if(d.extendedContainersByFile&&(p=d.extendedContainersByFile.get(l)))return p;if(d.extendedContainers)return d.extendedContainers;let h=e.getSourceFiles();for(let x of h){let I=rt(x);I0(I,t)&&(p=$r(p,I))}return d.extendedContainers=p||Re}function L0(t,o,s,l,d){if(t&&o){let p=V4([t],o,t,s,l,d);return p||{accessibility:1,errorSymbolName:Qi(t,o,s)}}return{accessibility:0}}function xte(t,o){return L0(t,o,788968,!1,!0).accessibility===0}function z4(t){return t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)!==95&&t.charCodeAt(2)!==64&&t.charCodeAt(2)!==35}function bte(t){let o=[],s=0;for(let l=0;l<t.length;l++){let d=t[l];s|=d.flags,d.flags&98304||o.push(d)}return s&32768&&o.push(fr),o||t}function IN(t){console.debug("TODO - getHomomorphicTypeVariable")}function Cte(t){if(t.symbol&&t.symbol.flags&2048&&t.symbol.declarations){let o=AF(t.symbol.declarations[0].parent)}}function RC(t,o){if(!t.isolatedSignatureType){let s=t.declaration?.kind,l=!1,d=Ku(134217744,Fo(16,"__function"));t.declaration&&!Zi(t.declaration)&&(d.symbol.declarations=[t.declaration],d.symbol.valueDeclaration=t.declaration),o||(o=t.declaration&&n_(t.declaration,!0)),d.outerTypeParameters=o,d.members=A,d.properties=Re,d.callSignatures=l?Re:[t],d.constructSignatures=l?[t]:Re,d.indexInfos=Re,t.isolatedSignatureType=d}return t.isolatedSignatureType}function Dte(t,o,s="arg"){return t?(E.assert(Sn(t.name)),t.name.text):`${s}_${o}`}function G4(t,o){if(Sl(t)){let d=t.parameters.length-1,p=t.parameters[d].name,h=Xt(t.parameters[d]);if(Bi(h))return[s(h,d,p)];if(!o&&h.flags&1048576&&yi(h.types,Bi))return Yn(h.types,x=>s(x,d,p))}return[t.parameters];function s(d,p,h){let x=Qo(d),I=l(d,h),B=Yn(x,(z,re)=>{let pe=I&&I[re]?I[re]:NC(t,p+re,d),_e=d.target.elementFlags[re],on=_e&12?32768:_e&2?16384:0,pn=Fo(1,pe,on);return pn.links.type=_e&4?Na(z):z,pn});return Zr(t.parameters.slice(0,p),B)}function l(d,p){let h=new Map;return Yn(d.target.labeledElementDeclarations,(x,I)=>{let B=Dte(x,I,p),z=h.get(B);return z===void 0?(h.set(B,1),B):(h.set(B,z+1),`${B}_${z}`)})}}function $4(t,o){let s=Wt(t).resolvedSymbol;if(s)return s;let l=t;if(o){let d=t.parent;ad(d)&&t===d.name&&(l=R(d))}return Or(l,t.text,3257279,void 0,!0)}function Ete(t,o){let s=Io(t,Sn);if(s){let l=$4(s,!1);if(l){if(l.flags&1048576){let p=kt(l.exportSymbol);if(!o&&p.flags&944&&!(p.flags&3))return;l=p}let d=zf(l);if(d){if(d.flags&512&&d.valueDeclaration?.kind===176){let p=d.valueDeclaration,h=$t(s);return p!==h?void 0:p}E.fail("not implemented")}}}}function Pte(t){return Xn.has(t)}function Nte(){return{getReferencedExportContainer:Ete,hasGlobalName:Pte}}function kte(t){return rr(t)}function Gm(t){let o=A0(t);return o!==$s&&o!==_a?o:void 0}function A0(t){if(t.default)t.default===ef&&(t.default=_a);else if(t.target){let o=A0(t.target);t.default=o?or(o,t.mapper):$s}else{t.default=ef;let o=t.symbol&&Bn(t.symbol.declarations,l=>Pu(l)&&l.default),s=o?rr(o):$s;t.default===ef&&(t.default=s)}return t.default}function LN(t){let o=tc(t);if(o)return o}function vte(t){let o=LN(t);if(!o)return!1;let s=rr(o);return WC(s)}function Q4(t){let o;return t.parent.kind===280&&!hm(t.parent)||t.parent.kind===147||t.parent.kind===167&&t.parent.parameterName===t?o=1160127:t.kind===146||t.kind===286||t.parent.kind===146&&t.parent.left===t||t.parent.kind===286&&t.parent.expression===t||t.parent.kind===281&&t.parent.expression===t?o=1920:o=788968,o}function Fte(t){return!1}function Ite(t,o,s=!0){let l=Q4(t),d=wg(t),p=Or(o,d.text,l,void 0,!1);return p&&p.flags&262144&&l&788968?{accessibility:0}:p?q4(p,s)||{accessibility:1,errorSymbolName:ml(d),errorNode:d}:{accessibility:3,errorSymbolName:ml(d),errorNode:d}}function Lte(t){return!Ti(t)||!Sn(t.name)||!Ti(t.expression)&&!Sn(t.expression)?!1:Sn(t.expression)?ra(t.expression)==="Symbol"&&lc(t.expression)===(Dd("Symbol",1160127,void 0)||ko):Sn(t.expression.expression)?ra(t.expression.name)==="Symbol"&&ra(t.expression.expression)==="globalThis"&&lc(t.expression.expression)===Ft:!1}function Y4(t){return(Ate(t)||wte(t))&&!vte(t)}function w0(t){if(!_o(t))return!1;if(t.initializer){let s=to(t.parent),l=t.parent.parameters.indexOf(t);return E.assert(l>=0),l>=Ju(s,3)}let o=dm(t.parent);return o?!t.type&&!t.dotDotDotToken&&t.parent.parameters.indexOf(t)>=gN(o).length:!1}function Ate(t){return!!G&&!w0(t)&&!hc(t)&&!!t.initializer&&!xu(t,167)}function wte(t){return G&&w0(t)&&(hc(t)||!t.initializer)&&xu(t,167)}function Rte(t){return Ji(t)||jx(t)}function X4(t){return Ji(t)?Ote(t):t.initializer?t.initializer:void 0}function Ote(t){let o;if(t&&!Da(t.body)){if(yl(t)&3)return;let s=t.body;s&&_c(s)?cp(s,l=>{if(!o)o=l.expression;else return o=void 0,!0}):o=s}return o}function Z4(t){let o=t.flags&1048576?t.types[0]:t;return!!(o.flags&32768)&&o!==ki}function Mte(t){let o=Vl(t);if(o)return o}function R0(t){let o;return t.locals&&t.locals.forEach(s=>{s.flags&262144&&(o=$r(o,as(s)))}),o}function O0(t,o,s,l){return L0(t,o,s,l,!0)}function Bte(){return{symbolToExpression:(O,U,xe,He,mn)=>rn(xe,He,mn,fn=>Qa(O,fn,U)),symbolToEntityName:(O,U,xe,He,mn)=>rn(xe,He,mn,fn=>ve(O,fn,U,!1)),symbolToNode:(O,U,xe,He,mn)=>rn(xe,He,mn,fn=>sk(O,fn,U)),typeToTypeNode:(O,U,xe,He)=>rn(U,xe,He,mn=>t(O,mn)),symbolToTypeParameterDeclarations:(O,U,xe,He)=>rn(U,xe,He,mn=>void 0),signatureToSignatureDeclaration:(O,U,xe,He,mn)=>rn(xe,He,mn,fn=>fa(O,U,fn)),symbolToParameterDeclaration:(O,U,xe,He)=>rn(U,xe,He,mn=>Dt(O,mn)),typeParameterToDeclaration:(O,U,xe,He)=>rn(U,xe,He,mn=>B(O,mn))};function t(O,U){let xe=U.flags,He=yo(O,U);return U.flags=xe,He}function o(O){let U=Ge.createIdentifier(O.name);return O.parent?Ge.createQualifiedName(o(O.parent),U):U}function s(O,U,xe){return(!Zi(U)||!(U.flags&16)||!O.enclosingFile||O.enclosingFile!==$t(ks(U)))&&(U=Ge.cloneNode(U)),U===xe||!xe?U:!O.enclosingFile||O.enclosingFile!==$t(ks(xe))?Gd(U,xe):Ea(Gd(U,xe),xe)}function l(O,U,xe){if(Pn(O)){if(d(U))if(xe){if(O.length>2)return[t(O[0],U),Ge.createTypeReferenceNode(`... ${O.length-2} more ...`,void 0),t(O[O.length-1],U)]}else return[Ge.createTypeReferenceNode("...",void 0)];let mn=!(U.flags&64)?Js():void 0,fn=[],Wn=0;for(let Pt of O){if(Wn++,d(U)&&Wn+2<O.length-1){fn.push(Ge.createTypeReferenceNode(`... ${O.length-Wn} more ...`,void 0));let Tr=t(O[O.length-1],U);Tr&&fn.push(Tr);break}U.approximateLength+=2;let ur=t(Pt,U);ur&&(fn.push(ur),mn&&V9(ur)&&mn.add(ur.typeName.text,[Pt,fn.length-1]))}if(mn){let Pt=U.flags;U.flags|=64,mn.forEach(ur=>{if(!q9(ur,([Tr],[ti])=>p(Tr,ti)))for(let[Tr,ti]of ur)fn[ti]=t(Tr,U)}),U.flags=Pt}return fn}}function d(O){return O.truncating?O.truncating:O.truncating=O.approximateLength>(O.flags&1?c9:UD)}function p(O,U){return O===U||!!O.symbol&&O.symbol===U.symbol||!!O.aliasSymbol&&O.aliasSymbol===U.aliasSymbol}function h(O,U,xe){E.assert(O&&0<=U&&U<O.length);let He=O[U],mn=so(He);if(xe.typeParameterSymbolList?.has(mn))return;xe.mustCreateTypeParameterSymbolList&&(xe.mustCreateTypeParameterSymbolList=!1,xe.typeParameterSymbolList=new Set(xe.typeParameterSymbolList)),xe.typeParameterSymbolList.add(mn);let fn;if(xe.flags&512&&U<O.length-1){let Wn=He,Pt=O[U+1];if(oa(Pt)&1){let ur=yte(Wn.flags&2097152?cu(Wn):Wn);fn=l(Yn(ur,Tr=>Ap(Tr,Pt.links.mapper)),xe)}else fn=void 0}return fn}function x(O,U){}function I(O,U,xe,He){let mn=F0(O,U,xe,!(U.flags&16384)),fn=xe===111551,Wn=Tr(mn,mn.length-1,0);if(Tg(Wn))return Wn;let Pt=Sn(Wn)?Wn:Wn.right,ur=jg(Pt);return uS(Pt,void 0),Ge.createTypeReferenceNode(Wn,ur);function Tr(ti,Do,ya){let Tn=Do===ti.length-1?He:h(ti,Do,U),_i=ti[Do],nt=ti[Do-1],Kt;if(Do===0)U.flags|=16777216,Kt=kN(_i,U),U.approximateLength+=(Kt?Kt.length:0)+1,U.flags^=16777216;else if(nt&&by(nt)){let st=by(nt);bc(st,(mr,X)=>{if(zm(mr,_i)&&!rC(X)&&X!=="export=")return Kt=X,!0})}if(Kt===void 0){let st=Ns(_i.declarations,ci);if(st&&ps(st)&&oh(st.expression)){let mr=Tr(ti,Do-1,ya);return oh(mr)&&E.fail("implement me"),mr}Kt=kN(_i,U)}if(U.approximateLength+=Kt.length+1,!(U.flags&16)&&nt&&pf(nt)&&pf(nt).get(_i.name)&&zm(pf(nt).get(_i.name),_i)){let st=Tr(ti,Do-1,ya);Tg(st)?E.fail("implement me"):E.fail("implement me")}let Ur=gs(Ge.createIdentifier(Kt),16777216);if(Tn&&uS(Ur,Ge.createNodeArray(Tn)),Ur.symbol=_i,Do>ya){let st=Tr(ti,Do-1,ya);return oh(st)?Ge.createQualifiedName(st,Ur):E.fail("Impossible construct - an export of an indexed access cannot be reachable")}return Ur}}function B(O,U,xe=dc(O)){let He=xe&&_e(xe,pe(O),U);return z(O,U,He)}function z(O,U,xe){let He=U.flags;U.flags&=-513;let mn=Ge.createModifiersFromModifierFlags(re(O)),fn=Al(O,U),Wn=Gm(O),Pt=Wn&&t(Wn,U);return U.flags=He,Ge.createTypeParameterDeclaration(mn,fn,xe,Pt)}function re(O){return 0}function pe(O){return Ei(Ar(O.symbol&&O.symbol.declarations,Pu),OD)[0]}function _e(O,U,xe){return U&&it(xe,U,O)||t(O,xe)}function on(O,U,xe){return xe===U}function pn(O,U){if(!(dt(U)&4)||!vf(O))return!0;fC(O);let xe=Wt(O).resolvedSymbol,He=xe&&as(xe);return!He||He!==U.target?!0:gr(O.typeArguments)>=lf(U.target.typeParameters)}function Kn(O,U,xe){let He=kte(U);if(!O.mapper)return He;let mn=or(He,O.mapper);return xe&&mn!==He?void 0:mn}function Nn(O){let U=kf(O,149);if(U)return U;if(!ym(O))return kf(O,220)}function it(O,U,xe,He=O.enclosingDeclaration,mn=Kn(O,U,!0)){if(mn&&on(He,xe,mn)&&pn(U,xe)){let fn=go(O,U);if(fn)return fn}}function lt(O){return Ji(O)||Ef(O)}function Qn(O,U){let xe=Kn(O,U);return t(xe,O)}function Ct(O){return Ji(O)||Ef(O)?to(O).parameters:void 0}function Rt(O){return Ji(O)||Ef(O)?to(O).typeParameters:IE(O)?R0(O):[Lp(rt(O.typeParameter))]}function Fr(O,U){if(t2(U))return O.mapper===void 0?!0:!!Kn(O,U,!0);if(vf(U)){let xe=fC(U),He=Wt(U).resolvedSymbol;if(!He)return!1;if(He.flags&262144){let mn=as(He);if(O.mapper&&Ap(mn,O.mapper)!==mn)return!1}if(CF(U))return pn(U,xe)&&!Zj(U)&&He.flags&788968}return!0}function Wr(O,U){let xe=!1,He=wg(O),mn=Q4(O),fn;if(Mq(He))return fn=rt(zx(He,!1,!1)),O0(fn,He,mn,!1).accessibility!==0&&(xe=!0,U.tracker.reportInaccessibleThisError()),{introducesError:xe,node:Wn(O)};if(fn=Il(He,mn,!0,!0),U.enclosingDeclaration&&!(fn&&fn.flags&262144)){fn=Ey(fn);let Pt=Il(He,mn,!0,!0,U.enclosingDeclaration);if(Pt===ko||Pt===void 0&&fn!==void 0||Pt&&fn&&!zm(Ey(Pt),fn))return Pt!==ko&&U.tracker.reportInferenceFallback(O),xe=!0,{introducesError:xe,node:O,sym:fn};fn=Pt}if(fn)return fn.flags&1&&fn.valueDeclaration&&(Th(fn.valueDeclaration)||hc(fn.valueDeclaration))?{introducesError:xe,node:Wn(O)}:(!(fn.flags&262144)&&!ql(O)&&O0(fn,U.enclosingDeclaration,mn,!1).accessibility!==0?(U.tracker.reportInferenceFallback(O),xe=!0):U.tracker.trackSymbol(fn,U.enclosingDeclaration,mn),{introducesError:xe,node:Wn(O)});return{introducesError:xe,node:O};function Wn(Pt){if(Pt===He){let Tr=as(fn),ti=fn.flags&262144?Al(Tr,U):Ge.cloneNode(Pt);return ti.symbol=fn,s(U,gs(ti,16777216),Pt)}let ur=Hg(Pt,Tr=>Wn(Tr),void 0);return ur!==Pt&&s(U,ur,Pt),ur}}function jo(O,U,xe,He){let mn=xe?111551:788968,fn=Il(U,mn,!0);if(!fn)return;let Wn=fn.flags&2097152?cu(fn):fn;if(O0(fn,O.enclosingDeclaration,mn,!1).accessibility===0)return I(Wn,O,mn,He)}function go(O,U){i&&i.throwIfCancellationRequested&&i.throwIfCancellationRequested();let xe=!1,{finalizeBoundary:He,startRecoveryScope:mn}=Pt(),fn=jc(U,Wn,Zo);if(!He())return;if(hu(fn)&&br(fn.literal)){let Tn=wn(fn.literal).value;fn.literal=Ge.createStringLiteral(Tn)}return O.approximateLength+=U.end-U.pos,fn;function Wn(Tn){if(xe)return Tn;let _i=mn(),nt=lt(Tn)?ur(Tn):void 0,Kt=ya(Tn);return nt?.(),xe?Zo(Tn)&&!qg(Tn)?(_i(),Qn(O,Tn)):Tn:Kt?s(O,Kt,Tn):void 0}function Pt(){let Tn,_i,nt=O.tracker,Kt=O.trackedSymbols;O.trackedSymbols=void 0;let Ur=O.encounteredError;return O.tracker=new vI(O,{...nt.inner,reportCyclicStructureError(){st(()=>nt.reportCyclicStructureError())},reportInaccessibleThisError(){st(()=>nt.reportInaccessibleThisError())},reportInaccessibleUniqueSymbolError(){st(()=>nt.reportInaccessibleUniqueSymbolError())},reportLikelyUnsafeImportRequiredError(le){st(()=>nt.reportLikelyUnsafeImportRequiredError(le))},reportNonSerializableProperty(le){st(()=>nt.reportNonSerializableProperty(le))},trackSymbol(le,Me,Xe){return(Tn??(Tn=[])).push([le,Me,Xe]),!1},moduleResolverHost:O.tracker.moduleResolverHost},O.tracker.moduleResolverHost),{startRecoveryScope:mr,finalizeBoundary:X};function st(le){xe=!0,(_i??(_i=[])).push(le)}function mr(){let le=Tn?.length??0,Me=_i?.length??0;return()=>{xe=!1,Tn&&(Tn.length=le),_i&&(_i.length=Me)}}function X(){return O.tracker=nt,O.trackedSymbols=Kt,O.encounteredError=Ur,_i?.forEach(le=>le()),xe?!1:(Tn?.forEach(([le,Me,Xe])=>O.tracker.trackSymbol(le,Me,Xe)),!0)}}function ur(Tn){return b_(O,Tn,Ct(Tn),Rt(Tn))}function Tr(Tn){let _i=GF(Tn);switch(_i.kind){case 166:return Do(_i);case 261:return ti(_i)}return jc(Tn,Wn,Zo)}function ti(Tn){Tr(Tn.objectType)!==void 0&&E.fail("todo - update indexed access type node")}function Do(Tn){if(Fr(O,Tn)){let{introducesError:_i,node:nt}=Wr(Tn.typeName,O),Kt=Vg(Tn.typeArguments,Wn,Zo);if(_i){let Ur=jo(O,Tn.typeName,!1,Kt);if(Ur)return s(O,Ur,Tn.typeName)}else{let Ur=Ge.updateTypeReferenceNode(Tn,nt,Kt);return s(O,Ur,Tn)}}}function ya(Tn){if(Bg(Tn))return jc(Tn.type,Wn,Zo);if(IH(Tn)||Tn.kind===198)return Ge.createKeywordTypeNode(97);if(LH(Tn))return Ge.createKeywordTypeNode(102);if(r2(Tn))return Ge.createArrayTypeNode(jc(Tn.type,Wn,Zo));if(Jd(Tn))return Ge.createTypeLiteralNode(Yn(Tn.jsDocPropertyTags,st=>{let mr=jc(Sn(st.name)?st.name:st.name.right,Wn,Sn),X=al(Kn(O,Tn),mr.text),le=X&&st.typeExpression&&Kn(O,st.typeExpression.type)!==X?t(X,O):void 0;return Ge.createPropertySignature(void 0,mr,le||st.typeExpression&&jc(st.typeExpression.type,Wn,Zo)||Ge.createKeywordTypeNode(97))}));if(vf(Tn)&&Sn(Tn.typeName)&&Tn.typeName.text==="")return Gd(Ge.createKeywordTypeNode(97),Tn);if((AH(Tn)||vf(Tn))&&uM(Tn))return Ge.createTypeLiteralNode([Ge.createIndexSignature(void 0,[Ge.createParameterDeclaration(void 0,void 0,"x",void 0,jc(Tn.typeArguments[0],Wn,Zo))],jc(Tn.typeArguments[1],Wn,Zo))]);if(aF(Tn))return Ge.createFunctionTypeNode(Vg(Tn.typeParameters,Wn,Pu),Yn(Tn.parameters,(st,mr)=>Ge.createParameterDeclaration(void 0,Kt(st),s(O,Ge.createIdentifier(Ur(st,mr)),st),Ge.cloneNode(st.ampToken),jc(st.type,Wn,Zo),void 0)),jc(Tn.type,Wn,Zo)||Ge.createKeywordTypeNode(97));if(t2(Tn))return Fr(O,Tn)||(xe=!0),Tn;if(Pu(Tn))return Ge.updateTypeParameterDeclaration(Tn,Vg(Tn.modifiers,Wn,sm),s(O,Al(as(rt(Tn)),O),Tn),jc(Tn.constraint,Wn,Zo),jc(Tn.default,Wn,Zo));if(Tg(Tn)){let st=ti(Tn);return st||(xe=!0,Tn)}if(vf(Tn)){let st=Do(Tn);return st||(xe=!0,Tn)}if(pl(Tn)&&Tn.name.kind===147&&!Q0(Tn.name)){if(!hE(Tn))return _i(Tn,Wn);if(!(O.flags&1&&Ks(Tn.name.expression)&&jN(Tn.name).flags&1))return}if(Ji(Tn)&&!Tn.type||Tl(Tn)&&!Tn.type&&!Tn.initializer||Ff(Tn)&&!Tn.type&&!Tn.initializer||_o(Tn)&&!Tn.type&&!Tn.initializer){let st=_i(Tn,Wn);return st===Tn&&(st=s(O,Ge.cloneNode(Tn),Tn)),st.type=Ge.createKeywordTypeNode(97),_o(Tn)&&(st.modifiers=void 0),st}if(ps(Tn)&&Ks(Tn.expression)){let{node:st,introducesError:mr}=Wr(Tn.expression,O);if(mr){let X=sl(vr(Tn.expression)),le=t(X,O),Me;if(hu(le))Me=le.literal;else{let Xe=t3(Tn.expression),Fn=typeof Xe.value=="string"?Ge.createStringLiteral(Xe.value,void 0):typeof Xe.value=="number"?Ge.createIntLiteral(Xe.value,0):void 0;if(!Fn)return Tn;Me=Fn}return Me.kind===16&&tm(Me.text,Hl(Fe))?Ge.createIdentifier(Me.text):Me.kind===10&&!Me.text.startsWith("-")?Me:Ge.updateComputedPropertyName(Tn,Me)}else return Ge.updateComputedPropertyName(Tn,st)}if(qg(Tn)){let st;if(Sn(Tn.parameterName)){let{node:mr,introducesError:X}=Wr(Tn.parameterName,O);xe=xe||X,st=mr}else st=Ge.cloneNode(Tn.parameterName);return Ge.updateTypePredicateNode(Tn,void 0,st,jc(Tn.type,Wn,Zo))}if(Bd(Tn)){let st=_i(Tn,Wn),mr=s(O,st===Tn?Ge.cloneNode(Tn):st,Tn),X=bo(mr);return gs(mr,X|(O.flags&1024&&Bd(Tn)?0:1)),mr}if(ji(Tn)&&O.flags&268435456&&!Tn.singleQuote){let st=Ge.cloneNode(Tn);return st.singleQuote=!0,st}if(IE(Tn)){let st=jc(Tn.checkType,Wn,Zo),mr=ur(Tn),X=jc(Tn.extendsType,Wn,Zo),le=jc(Tn.trueType,Wn,Zo);mr();let Me=jc(Tn.falseType,Wn,Zo);E.fail("todo - update conditional type node")}return _i(Tn,Wn);function _i(st,mr){let X=!O.enclosingFile||O.enclosingFile!==$t(st);return Hg(st,mr,void 0,X?nt:void 0)}function nt(st,mr,X,le,Me){let Xe=Vg(st,mr,X,le,Me);return Xe&&(Xe.pos!==-1||Xe.end!==-1)&&(Xe===st&&(Xe=Ge.createNodeArray(st.slice(),st.hasTrailingComma)),ns(Xe,-1,-1)),Xe}function Kt(st){return st.dotDotDotToken||(st.type&&r2(st.type)?Ge.createToken(25):void 0)}function Ur(st,mr){return st.name&&Sn(st.name)&&st.name.text==="this"?"this":Kt(st)?"args":`arg${mr}`}}}function oi(O,U){return O.declarations&&Sr(O.declarations,xe=>!!LN(xe)&&(!U||!!er(xe,He=>He===U)))}function So(O,U,xe,He,mn){let fn=xe;mn&&(xe=Bp(xe,!_o(He)));let Wn=it(O,U,xe,He);if(Wn)return mn&&Z4(xe)&&!Id(Kn(O,U),Pt=>!!(Pt.flags&32768))?Ge.createUnionTypeNode([Wn,Ge.createKeywordTypeNode(96)]):Wn;if(mn&&fn!==xe){let Pt=it(O,U,fn,He);if(Pt)return Ge.createUnionTypeNode([Pt,Ge.createKeywordTypeNode(96)])}}function Ir(O,U,xe,He){let mn=U&&(_o(U)||hc(U))&&Y4(U),fn=O.enclosingDeclaration,Wn=O.flags;if(U&&Aq(U)&&!(O.flags&-2147483648)&&gn.serializeTypeOfDeclaration(U,O),O.flags|=-2147483648,fn&&(!da(xe)||O.flags&1)){let ti=U&&LN(U)?U:oi(He);if(ti&&!$c(ti)){let Do=LN(ti),ya=mn||!!(He.flags&4&&He.flags&16777216&&Rq(ti)&&He.links?.mappedType&&Z4(xe)),Tn=!qg(Do)&&So(O,Do,xe,ti,ya);if(Tn)return O.flags=Wn,Tn}}let Pt=U??He.valueDeclaration??He.declarations?.[0],ur=Pt&&Rte(Pt)?X4(Pt):void 0,Tr=ls(O,ur,xe,mn);return O.flags=Wn,Tr}function ls(O,U,xe,He){let mn=O.flags;U&&!(O.flags&-2147483648)&&gn.serializeTypeOfExpression(U,O,He),O.flags|=-2147483648;let fn=$a(O,U,xe,He);return O.flags=mn,fn}function $a(O,U,xe,He){if(U){let mn=RD(U)?U.type:xm(U)?mS(U):void 0;if(mn){let fn=So(O,mn,xe,U.parent,He);if(fn)return fn}}return He&&(xe=Bp(xe)),t(xe,O)}function an(O,U,xe){return U?U.name?U.name.kind===89?gs(Ge.cloneNode(U.name),16777216):U.name.kind===146?gs(Ge.cloneNode(U.name.right),16777216):He(U.name):Ws(O):Ws(O);function He(mn){return fn(mn);function fn(Wn){xe.tracker.canTrackSymbol&&ps(Wn)&&Q0(Wn)&&je(Wn.expression,xe.enclosingDeclaration,xe);let Pt=Hg(Wn,fn,void 0,void 0,fn);return To(Pt)&&(Pt=Ge.updateBindingElement(Pt,Pt.dotDotDotToken,Pt.propertyName,Pt.name,void 0)),Zi(Pt)||(Pt=Ge.cloneNode(Pt)),gs(Pt,16777217)}}}function je(O,U,xe){if(!xe.tracker.canTrackSymbol)return;let He=wg(O),mn=Or(He,He.text,1160127,void 0,!0);mn&&xe.tracker.trackSymbol(mn,U,111551)}function Dt(O,U,xe){let He=Nn(O),mn=Xt(O),fn=Ir(U,He,mn,O),Wn=!(U.flags&8192)&&xe&&He&&Qx(He)?Yn(O5(He),Ge.cloneNode):void 0,ur=He&&AD(He)||oa(O)&32768?Ge.createToken(25):void 0,Tr=an(O,He,U),Do=Ge.createParameterDeclaration(Wn,ur,Tr,void 0,fn,void 0);return U.approximateLength+=Ws(O).length+3,Do}function ir(O,U){if(O.thisParameter)return Dt(O.thisParameter,U);if(O.declaration&&wr(O.declaration)){let xe=nF(O.declaration);if(xe&&xe.typeExpression)return Ge.createParameterDeclaration(void 0,void 0,"this",void 0,t(Kn(U,xe.typeExpression),U))}}function jt(O,U){let xe=O.flags&256,He=O.flags;xe&&(O.flags&=-257);let mn,fn=$i(U);return fn&&!(xe&&Ms(fn))?(U.declaration&&!(O.flags&-2147483648)&&gn.serializeReturnTypeForSignature(U.declaration,O),O.flags|=-2147483648,mn=zr(O,U)):xe||(mn=Ge.createKeywordTypeNode(97)),O.flags=He,mn}function Si(O,U){let xe=O.kind===1||O.kind===3?gs(Ge.createIdentifier(O.parameterName),16777216):void 0,He=O.type&&t(O.type,U);return Ge.createTypePredicateNode(void 0,xe,He)}function zr(O,U){let xe=Ic(U),He=$i(U);if(O.enclosingDeclaration&&(!da(He)||O.flags&1)&&U.declaration&&!Zi(U.declaration)){let fn=Mte(U.declaration);if(fn){let Wn=So(O,fn,He,O.enclosingDeclaration);if(Wn)return Wn}}if(xe)return Si(xe,O);let mn=U.declaration&&X4(U.declaration);return ls(O,mn,He)}function fa(O,U,xe,He){let mn,fn,Wn=G4(O,!0)[0],Pt=b_(xe,O.declaration,Wn,O.typeParameters,O.parameters,O.mapper);xe.approximateLength+=3,xe.flags&32&&O.target&&O.mapper&&O.target.typeParameters?fn=O.target.typeParameters.map(Tn=>t(or(Tn,O.mapper),xe)):mn=O.typeParameters&&O.typeParameters.map(Tn=>B(Tn,xe));let ur=xe.flags;xe.flags&=-257;let Tr=(Pn(Wn,Tn=>Tn!==Wn[Wn.length-1]&&!!(oa(Tn)&32768))?O.parameters:Wn).map(Tn=>Dt(Tn,xe,!1));xe.flags=ur;let ti=jt(xe,O),Do=He?.modifiers,ya=U===151?Ge.createCallSignature(mn,Tr,ti):U===156?Ge.createMethodSignature(Do,He?.name??Ge.createIdentifier(""),void 0,mn,Tr,ti):U===154?E.fail("todo-method decl"):U===150?Ge.createIndexSignature(Do,Tr,ti):U===169?Ge.createFunctionDeclaration(Do,He?.name?Xa(He.name,Sn):Ge.createIdentifier(""),Tr,ti,void 0):U===270?Ge.createFunctionExpression(Do,He?.name?Xa(He.name,Sn):Ge.createIdentifier(""),Tr,ti,Ge.createBlock([])):U===271?E.fail("todo-arrow"):U===196?E.fail("todo-jsdoc function"):U===283?Ge.createInlineClosure(Ge.createBlock([])):U===158?Ge.createFunctionTypeNode(mn,Tr,ti):E.assertNever(U);if(fn&&(ya.typeArguments=Ge.createNodeArray(fn)),O.declaration?.kind===202&&O.declaration.parent.kind===218){let Tn=ml(O.declaration.parent.parent,!0).slice(2,-2).split(/\r\n|\n|\r/).map(_i=>_i.replace(/^\s+/," ")).join(`
63
+ `);lI(ya,3,Tn,!0)}return Pt?.(),ya}function yo(O,U){i&&i.throwIfCancellationRequested&&i.throwIfCancellationRequested();let xe=U.flags&8388608;if(U.flags&=-8388609,!O){if(!(U.flags&262144)){U.encounteredError=!0;return}return U.approximateLength+=3,Ge.createKeywordTypeNode(97)}if(U.flags&536870912||(O=Nl(O)),O.flags&1)return O.aliasSymbol?Ge.createTypeReferenceNode(o(O.aliasSymbol),l(O.aliasTypeArguments,U)):O===zs?lI(Ge.createKeywordTypeNode(97),3,"unresolved"):(U.approximateLength+=3,Ge.createKeywordTypeNode(O===Pc?129:97));if(O.flags&524288){if(O.aliasSymbol)return Ge.createTypeReferenceNode(o(O.aliasSymbol),l(O.aliasTypeArguments,U));if(O===zs)return lI(Ge.createKeywordTypeNode(140),3,"unresolved");if(va(O)){let nt=yo(Uo(O.resolvedTypeArguments),U);return Ge.createArrayTypeNode(nt)}return Ty(O)?(U.approximateLength+=3,Ge.createKeywordTypeNode(104)):(U.approximateLength+=3,Ge.createKeywordTypeNode(140))}if(O.flags&2)return Ge.createKeywordTypeNode(102);if(O.flags&4096)return U.approximateLength+=5,Ge.createKeywordTypeNode(107);if(O.flags&4)return U.approximateLength+=6,Ge.createKeywordTypeNode(94);if(O.flags&8)return U.approximateLength+=6,Ge.createKeywordTypeNode(92);if(O.flags&64)return U.approximateLength+=5,Ge.createKeywordTypeNode(93);if(O.flags&1056){if(O.symbol.flags&8){let nt=zf(O.symbol),Kt=I(nt,U,788968);if(as(nt)===O)return Kt;let Ur=Ws(O.symbol);return tm(Ur,1)?ya(Kt,Ge.createTypeReferenceNode(Ur,void 0)):E.fail("Unhandled type node kind returned from `symbolToTypeNode`.")}return I(O.symbol,U,788968)}if(O.flags&8192)return U.approximateLength+=O.value.length+3,Ge.createLiteralTypeNode(gs(Ge.createBytesLiteral(O.value),16777216));if(O.flags&128)return U.approximateLength+=O.value.length+2,Ge.createLiteralTypeNode(gs(Ge.createStringLiteral(O.value),16777216));if(O.flags&256){let nt=O.value;return U.approximateLength+=(""+nt).length,Ge.createLiteralTypeNode(nt<0?Ge.createPrefixUnaryExpression(42,Ge.createIntLiteral(-nt)):Ge.createIntLiteral(nt))}if(O.flags&2048){let nt=O.value;return U.approximateLength+=(""+nt.toFixed()).length,Ge.createLiteralTypeNode(nt<0?Ge.createPrefixUnaryExpression(42,Ge.createFloatLiteral(-nt)):Ge.createFloatLiteral(nt))}if(O.flags&512)return U.approximateLength+=O.intrinsicName.length,Ge.createLiteralTypeNode(O.intrinsicName==="true"?Ge.createIntLiteral(1):Ge.createIntLiteral(0));if(O.flags&16384)return U.approximateLength+=4,Ge.createKeywordTypeNode(105);if(O.flags&32768)return U.approximateLength+=9,Ge.createKeywordTypeNode(96);if(O.flags&67108864)return U.approximateLength+=6,Ge.createKeywordTypeNode(140);if(!xe&&O.aliasSymbol&&(U.flags&16384||xte(O.aliasSymbol,U.enclosingDeclaration))){let nt=l(O.aliasTypeArguments,U);return z4(O.aliasSymbol.name)&&!(O.aliasSymbol.flags&32)?Ge.createTypeReferenceNode(Ge.createIdentifier(""),nt):gr(nt)===1&&O.aliasSymbol===Y.symbol?Ge.createArrayTypeNode(nt[0]):I(O.aliasSymbol,U,788968,nt)}let He=dt(O);if(He&4)return E.assert(!!(O.flags&524288)),O.node?Tr(O,Do):Do(O);if(O.flags&262144||He&3){if(O.flags&262144&&Gr(U.inferTypeParameters,O))return E.fail("implement");if(U.flags&4&&O.flags&262144){let Kt=Al(O,U);return U.approximateLength+=ra(Kt).length,Ge.createTypeReferenceNode(Ge.createIdentifier(ra(Kt)),void 0)}if(O.symbol)return I(O.symbol,U,788968);let nt=(O===Fu||O===tl)&&T&&T.symbol?(O===tl?"sub-":"super-")+Ws(T.symbol):"?";return Ge.createTypeReferenceNode(Ge.createIdentifier(nt),void 0)}if(O.flags&1048576&&O.origin&&(O=O.origin),O.flags&3145728){let nt=bte(O.types);if(gr(nt)===1)return t(nt[0],U);let Kt=l(nt,U,!0);if(Kt&&Kt.length>0)return Ge.createUnionTypeNode(Kt);!U.encounteredError&&!(U.flags&262144)&&(U.encounteredError=!0);return}if(He&48)return E.assert(!!(O.flags&524288)),ur(O);if(O.flags&4194304&&E.fail("implement"),O.flags&134217728)return E.fail("Should be unreachable.");if(O.flags&268435456)return E.fail("Should be unreachable.");if(O.flags&8388608)return E.fail("Should be unreachable.");if(O.flags&16777216)return E.fail("Should be unreachable.");if(O.flags&33554432)return E.fail("Should be unreachable.");return;function mn(nt){return nt.flags&1048576?U.visitedTypes?.has(Ca(nt))?(U.flags&131072||(U.encounteredError=!0,U.tracker?.reportCyclicStructureError?.()),Ll(U)):Tr(nt,Kt=>t(Kt,U)):t(nt,U)}function fn(nt){return!!IN(nt)}function Wn(nt){return!!nt.target&&fn(nt.target)&&!fn(nt)}function Pt(nt){E.fail("implement me")}function ur(nt){let Kt=nt.id,Ur=nt.symbol;if(Ur){if(!!(dt(nt)&8388608)){let le=nt.node;return U.visitedTypes?.has(Kt)?Ll(U):Tr(nt,ti)}if(U.visitedTypes?.has(Kt)){let X=Cte(nt);return X?I(X,U,788968):Ll(U)}else return Tr(nt,ti)}else return ti(nt);function st(){if(!!(Ur.flags&16)&&(Ur.parent||Bn(Ur.declarations,X=>X.parent.kind===176)))return(!!(U.flags&4096)||U.visitedTypes?.has(Kt))&&(!(U.flags&8)||U4(Ur,U.enclosingDeclaration))}}function Tr(nt,Kt){let Ur=nt.id,st=dt(nt)&16&&nt.symbol&&nt.symbol.flags&32,mr=dt(nt)&4&&nt.node?"N"+ys(nt.node):nt.flags&16777216?"N"+ys(nt.root.node):nt.symbol?(st?"+":"")+so(nt.symbol):void 0;U.visitedTypes||(U.visitedTypes=new Set),mr&&!U.symbolDepth&&(U.symbolDepth=new Map);let X=U.enclosingDeclaration&&Wt(U.enclosingDeclaration),le=`${Ca(nt)}|${U.flags}`;X&&(X.serializedTypes||(X.serializedTypes=new Map));let Me=X?.serializedTypes?.get(le);if(Me)return Me.trackedSymbols?.forEach(([xr,mi,Nt])=>U.tracker.trackSymbol(xr,mi,Nt)),Me.truncating&&(U.truncating=!0),U.approximateLength+=Me.addedLength,gt(Me.node);let Xe;if(mr){if(Xe=U.symbolDepth.get(mr)||0,Xe>10)return Ll(U);U.symbolDepth.set(mr,Xe+1)}U.visitedTypes.add(Ur);let Fn=U.trackedSymbols;U.trackedSymbols=void 0;let en=U.approximateLength,bn=Kt(nt),mt=U.approximateLength-en;return!U.reportedDiagnostic&&!U.encounteredError&&X?.serializedTypes?.set(le,{node:bn,truncating:U.truncating,addedLength:mt,trackedSymbols:U.trackedSymbols}),U.visitedTypes.delete(Ur),mr&&U.symbolDepth.set(mr,Xe),U.trackedSymbols=Fn,bn;function gt(xr){return!Zi(xr)&&Io(xr)===xr?xr:s(U,Ge.cloneNode(Hg(xr,gt,void 0,dr,gt)),xr)}function dr(xr,mi,Nt,Ot,qr){return xr&&xr.length===0?Ea(Ge.createNodeArray(void 0,xr.hasTrailingComma),xr):Vg(xr,mi,Nt,Ot,qr)}}function ti(nt){let Kt=Wu(nt);if(!Kt.properties.length&&!Kt.indexInfos.length){if(!Kt.callSignatures.length&&!Kt.constructSignatures.length)return U.approximateLength+=2,gs(Ge.createTypeLiteralNode(void 0),1);if(Kt.callSignatures.length===1&&!Kt.constructSignatures.length){let le=Kt.callSignatures[0];return fa(le,158,U)}}let Ur=Ar(Kt.constructSignatures,le=>!!(le.flags&4));if(Pn(Ur)){let le=Yn(Ur,Xe=>RC(Xe)),Me=Kt.callSignatures.length+(Kt.constructSignatures.length-Ur.length)+Kt.indexInfos.length+(U.flags&2048?Zf(Kt.properties,Xe=>!(Xe.flags&4194304)):gr(Kt.properties));E.fail("not supported")}let st=U.flags;U.flags|=4194304;let mr=_i(Kt);U.flags=st;let X=Ge.createTypeLiteralNode(mr);return U.approximateLength+=2,gs(X,U.flags&1024?0:1),X}function Do(nt){let Kt=Qo(nt);if(nt.target===Y||nt.target===Ue){if(U.flags&2){let mr=t(Kt[0],U);return Ge.createTypeReferenceNode(nt.target===Y?"Array":"ReadonlyArray",[mr])}let Ur=t(Kt[0],U);return Ge.createArrayTypeNode(Ur)}else if(nt.target.objectFlags&8){Kt=Za(Kt,(Ur,st)=>of(Ur,!!(nt.target.elementFlags[st]&2))),console.debug("todo - tuple type"),U.encounteredError=!0;return}else{if(U.flags&2048&&nt.symbol.valueDeclaration&&Sa(nt.symbol.valueDeclaration)&&!U4(nt.symbol,U.enclosingDeclaration))return ur(nt);{let Ur=nt.target.outerTypeParameters,st=0,mr;if(Ur){let Xe=Ur.length;for(;st<Xe;){let Fn=st,en=C6(Ur[st]);do st++;while(st<Xe&&C6(Ur[st])===en);if(!K1(Ur,Kt,Fn,st)){let bn=l(Kt.slice(Fn,st),U),mt=U.flags;U.flags|=16;let gt=I(en,U,788968,bn);U.flags=mt,mr=mr?ya(mr,gt):gt}}}let X;if(Kt.length>0){let Xe=(nt.target.typeParameters||Re).length;X=l(Kt.slice(st,Xe),U)}let le=U.flags;U.flags|=16;let Me=I(nt.symbol,U,788968,X);return U.flags=le,mr?ya(mr,Me):Me}}}function ya(nt,Kt){{let Ur=nt.typeArguments,st=nt.typeName;Sn(st)?Ur!==jg(st)&&(st=uS(Ge.cloneNode(st),Ur)):E.fail("implement me"),Ur=Kt.typeArguments;let mr=Tn(Kt);for(let X of mr)st=Ge.createQualifiedName(st,X);E.fail("implement me")}}function Tn(nt){let Kt=nt.typeName,Ur=[];for(;!Sn(Kt);)Ur.unshift(Kt.right),Kt=Kt.left;return Ur.unshift(Kt),Ur}function _i(nt){if(d(U))return[Ge.createPropertySignature(void 0,"...",void 0)];let Kt=[];for(let mr of nt.callSignatures)console.debug("todo - callsig");for(let mr of nt.indexInfos)Kt.push(Xs(mr,U,nt.objectFlags&1024?Ll(U):void 0));let Ur=nt.properties;if(!Ur)return Kt;let st=0;for(let mr of Ur){if(st++,U.flags&2048){if(mr.flags&4194304)continue;Cu(mr)&6&&U.tracker.reportPrivateInBaseOfClassExpression&&U.tracker.reportPrivateInBaseOfClassExpression(mr.name)}if(d(U)&&st+2<Ur.length-1){Kt.push(Ge.createPropertySignature(void 0,`... ${Ur.length-st} more ...`,void 0)),Yi(Ur[Ur.length-1],U,Kt);break}Yi(mr,U,Kt)}return Kt.length?Kt:void 0}}function Yi(O,U,xe){console.warn("implement me");let He=!!(oa(O)&8192)}function Xs(O,U,xe){let He=G9(O)||"x",mn=t(O.keyType,U),fn=Ge.createParameterDeclaration(void 0,void 0,He,void 0,mn,void 0);return xe||(xe=t(O.type||wt,U)),!O.type&&!(U.flags&2097152)&&(U.encounteredError=!0),U.approximateLength+=He.length+4,Ge.createIndexSignature(void 0,[fn],xe)}function Ll(O){return O.approximateLength+=3,O.flags&1?Ge.createKeywordTypeNode(97):Ge.createTypeReferenceNode(Ge.createIdentifier("..."),void 0)}function zu(O){let U=O.mustCreateTypeParameterSymbolList,xe=O.mustCreateTypeParametersNamesLookups;O.mustCreateTypeParameterSymbolList=!0,O.mustCreateTypeParametersNamesLookups=!0;let He=O.typeParameterNames,mn=O.typeParameterNamesByText,fn=O.typeParameterNamesByTextNextNameCount,Wn=O.typeParameterSymbolList;return()=>{O.typeParameterNames=He,O.typeParameterNamesByText=mn,O.typeParameterNamesByTextNextNameCount=fn,O.typeParameterSymbolList=Wn,O.mustCreateTypeParameterSymbolList=U,O.mustCreateTypeParametersNamesLookups=xe}}function Gf(O,U,xe){let He=Or(U.enclosingDeclaration,O,788968,void 0,!1);return He&&He.flags&262144?He!==xe.symbol:!1}function Al(O,U){if(U.flags&4&&U.typeParameterNames){let mn=U.typeParameterNames.get(Ca(O));if(mn)return mn}let xe=ve(O.symbol,U,788968,!0);if(!(xe.kind&89))return Ge.createIdentifier("(Missing type parameter)");let He=O.symbol?.declarations?.[0];if(He&&Pu(He)&&(xe=s(U,xe,He.name)),U.flags&4){let mn=xe.text,fn=U.typeParameterNamesByTextNextNameCount?.get(mn)||0,Wn=mn;for(;U.typeParameterNamesByText?.has(Wn)||Gf(Wn,U,O);)fn++,Wn=`${mn}_${fn}`;if(Wn!==mn){let Pt=jg(xe);xe=Ge.createIdentifier(Wn),uS(xe,Pt)}U.mustCreateTypeParametersNamesLookups&&(U.mustCreateTypeParametersNamesLookups=!1,U.typeParameterNames=new Map(U.typeParameterNames),U.typeParameterNamesByTextNextNameCount=new Map(U.typeParameterNamesByTextNextNameCount),U.typeParameterNamesByText=new Set(U.typeParameterNamesByText)),U.typeParameterNamesByTextNextNameCount.set(mn,fn),U.typeParameterNames.set(Ca(O),xe),U.typeParameterNamesByText.add(Wn)}return xe}function b_(O,U,xe,He,mn,fn){let Wn=zu(O),Pt,ur,Tr=O.enclosingDeclaration,ti=O.mapper;if(fn&&(O.mapper=fn),O.enclosingDeclaration&&U){let Do=function(ya,Tn){E.assert(O.enclosingDeclaration);let _i;Wt(O.enclosingDeclaration).fakeScopeForSignatureDeclaration===ya?_i=O.enclosingDeclaration:O.enclosingDeclaration.parent&&Wt(O.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration===ya&&(_i=O.enclosingDeclaration.parent),E.assertOptionalNode(_i,_c);let nt=_i?.locals??Wi(),Kt,Ur;if(Tn((st,mr)=>{if(_i){let X=nt.get(st);X?Ur=$r(Ur,{name:st,oldSymbol:X}):Kt=$r(Kt,st)}nt.set(st,mr)}),_i)return function(){Bn(Kt,mr=>nt.delete(mr)),Bn(Ur,mr=>nt.set(mr.name,mr.oldSymbol))};{let st=Ge.createBlock(Re);Wt(st).fakeScopeForSignatureDeclaration=ya,st.locals=nt,xc(st,O.enclosingDeclaration),O.enclosingDeclaration=st}};Pt=Pn(xe)?Do("params",ya=>{if(xe)for(let Tn=0;Tn<xe.length;Tn++){let _i=xe[Tn],nt=mn?.[Tn];mn&&nt!==_i?(ya(_i.name,ko),nt&&ya(nt.name,ko)):Bn(_i.declarations,Kt=>{if(_o(Kt)&&Po(Kt.name))return Ur(Kt.name),!0;return;function Ur(mr){Bn(mr.elements,X=>{switch(X.kind){case 266:return st(X);default:return E.assertNever(X)}})}function st(mr){if(Po(mr.name))return Ur(mr.name);let X=rt(mr);ya(X.name,X)}})||ya(_i.name,_i)}}):void 0,O.flags&4&&Pn(He)&&(ur=Do("typeParams",ya=>{for(let Tn of He??Re){let _i=Al(Tn,O).text;ya(_i,Tn.symbol)}}))}return()=>{Pt?.(),ur?.(),Wn(),O.enclosingDeclaration=Tr,O.mapper=ti}}function Qa(O,U,xe){let He=F0(O,U,xe);return mn(He,He.length-1);function mn(fn,Wn){let Pt=fn[Wn];Wn===0&&(U.flags|=16777216);let ur=kN(Pt,U);Wn===0&&(U.flags^=16777216);let Tr=ur.charCodeAt(0);if(Wn===0||w9(ur,be)){let ti=gs(Ge.createIdentifier(ur),16777216);return ti.symbol=Pt,Wn>0?Ge.createPropertyAccessExpression(mn(fn,Wn-1),ti):ti}else{Tr===91&&(ur=ur.substring(1,ur.length-1),Tr=ur.charCodeAt(0));let ti;if(vF(Tr)&&!(Pt.flags&8)?ti=Ge.createStringLiteral(zl(ur).replace(/\\./g,Do=>Do.substring(1)),Tr===39):""+ +ur===ur&&(ti=Ge.createIntLiteral(+ur)),!ti){let Do=gs(Ge.createIdentifier(ur),16777216);Do.symbol=Pt,ti=Do}return Ge.createElementAccessExpression(mn(fn,Wn-1),ti)}}}function sk(O,U,xe){if(U.flags&1073741824){if(O.valueDeclaration){let mn=ci(O.valueDeclaration);if(mn&&ps(mn))return mn}let He=at(O).nameType}return Qa(O,U,xe)}function ve(O,U,xe,He){let mn=F0(O,U,xe);return He&&mn.length!==1&&!U.encounteredError&&!(U.flags&65536)&&(U.encounteredError=!0),fn(mn,mn.length-1);function fn(Wn,Pt){let ur=Wn[Pt];Pt===0&&(U.flags|=16777216);let Tr=kN(ur,U);Pt===0&&(U.flags^=16777216);let ti=gs(Ge.createIdentifier(Tr),16777216);return ti.symbol=ur,Pt>0?Ge.createQualifiedName(fn(Wn,Pt-1),ti):ti}}function rn(O,U,xe,He){let mn=xe?.trackSymbol?xe.moduleResolverHost:U&134217728?Ife(e):void 0,fn={enclosingDeclaration:O,enclosingFile:O&&$t(O),flags:U||0,tracker:void 0,encounteredError:!1,reportedDiagnostic:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0,trackedSymbols:void 0,bundled:!1,truncating:!1,usedSymbolNames:void 0,remappedSymbolNames:void 0,remappedSymbolReferences:void 0,reverseMappedStack:void 0,mustCreateTypeParameterSymbolList:!0,typeParameterSymbolList:void 0,mustCreateTypeParametersNamesLookups:!0,typeParameterNames:void 0,typeParameterNamesByText:void 0,typeParameterNamesByTextNextNameCount:void 0,mapper:void 0};fn.tracker=new vI(fn,xe,mn);let Wn=He(fn);return fn.truncating&&fn.flags&1&&fn.tracker.reportTruncationError(),fn.encounteredError?void 0:Wn}}function Dy(t,o,s,l){let d=N.Cannot_find_object_0;return jte(t,o,s,l?void 0:d)}function jte(t,o,s,l,d=!1){let p=ji(o)?o.text:ao(o)&&s&&tC(s)?s.value:wn(o)?.value??"";return p===""?wt.getSymbol():Jte(t,p,l,o,d)}function Jte(t,o,s,l,d=!1){let p=$t(t),h=1,x=1,I=e.getResolvedModule(p,o,h)?.resolvedModule,B=I&&a2(Fe,I,p),z=I&&!B&&e.getSourceFile(I.resolvedFileName);if(z){if(B&&hn(l,B,o,I.resolvedFileName),z.symbol){let pe=Xt(z.symbol);return T0(pe),kt(z.symbol)}s&&hn(l,N.File_0_is_not_a_module,z.fileName);return}if(s)if(B)hn(l,B,o,I.resolvedFileName);else{let pe=dh(o)&&!bm(o);hn(l,s,o)}return;function re(pe){return BO(o,pe)}}function M0(t,o){return t}function B0(t,o=!1){switch(t.kind){case 273:case 276:E.fail("not implemented yet");case 175:return Il(t.name,901119,!0,o);case 174:return e3(t.initializer,o);case 281:case 286:return Wte(t,o);default:return E.fail()}}function e3(t,o){if(!oh(t)&&!Ks(t))return;let s=Il(t,901119,!0,o);return s||(Ds(t),Wt(t).resolvedSymbol)}function Wte(t,o){if(br(t.parent)&&t.parent.left===t&&t.parent.operatorToken.kind===74)return e3(t.parent.right,o)}function uT(t){return t.declarations&&wK(t.declarations,Ute)}function Ute(t){return Us(t)&&br(t.parent)&&t.parent.left===t&&t.parent.operatorToken.kind===74&&n3(t.parent.right)||t.kind===175||t.kind===174&&n3(t.initializer)||t.kind===237&&Ix(t)}function n3(t){return b9(t)}function Kte(t,o,s){if(s&111551){if(pte(o)){let p=t.parent.parent;return hn(t,N._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,o),!0}let l=xy(Or(t,o,788544,void 0,!1)),d=l&&lT(l);if(l&&d!==void 0&&!(d&111551)){let p=o;return hn(t,N._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,p),!0}}return!1}function t3(t,o){let s=Il(t,111551,!0);if(!s)return La(void 0);if(t.kind===89){let l=t;if(HF(l.text)&&s===Dd(l.text,111551,void 0))return La(+l.text,!1)}if(qte(s)){let l=s.valueDeclaration;if(l&&xo(l)&&!l.type&&l.initializer&&(!o||l!==o&&AN(l,o))){let d=wn(l.initializer,l);return o&&$t(o)!==$t(l)?La(d.value,!1,!0,!0):La(d.value,d.isSyntacticallyString,d.resolvedOtherFiles,!0)}}return La(void 0)}function qte(t){return(t.flags&3)!==0}function Vte(t,o){let s=t.expression;if(Ks(s)&&_u(t.argumentExpression)){let l=Il(s,111551,!0);if(l&&l.flags&384){let d=t.argumentExpression.text;l.exports.get(d)&&E.fail("no enum members")}}return La(void 0)}function Hte(t,o,s){if(s&788584){let l=xy(Or(t,o,111127,void 0,!1));if(l&&!(l.flags&1920))return hn(t,N._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,o),!0}return!1}function r3(t,o,s){return!!o&&!!er(t,l=>l===o||(l===s||Ji(l)&&(!dm(l)||yl(l)&3)?"quit":!1))}function AN(t,o){let s=$t(t),l=$t(o),d=Sh(t);if(s!==l){if(t.flags&33554432||h(o,t))return!0;let I=e.getSourceFiles();return I.indexOf(s)<=I.indexOf(l)}if(o.flags&16777216||SE(o)||c6(o))return!0;if(t.pos<=o.pos){if(t.kind===266){let I=pm(o,266);return I?er(I,To)!==er(t,To)||t.pos<I.pos:AN(pm(t,237),o)}else{if(t.kind===237)return!p(t,o);if(Sa(t))return!er(o,B=>B===t?"quit":ps(B)?B.parent.parent===t:"quit");if(Tl(t))return!x(t,o,!1)}return!0}if(h(o,t))return!0;return!1;function p(I,B){switch(I.parent.parent.kind){case 242:case 243:case 244:if(r3(B,I,d))return!0;break}let z=I.parent.parent;return bg(z)&&r3(B,z.expression,d)}function h(I,B){return!!er(I,z=>{if(z===d)return"quit";if(Ji(z))return!0;let re=Wo(z.parent,Tl);return!!(re&&re.initializer===z&&!(B.kind===152&&!sS(B)))})}function x(I,B,z){return B.end>I.end?!1:er(B,pe=>{if(pe===I)return"quit";switch(pe.kind){case 271:return!0;case 152:return z&&Tl(I)&&pe.parent===I.parent?"quit":!0;case 236:switch(pe.parent.kind){case 154:return!0;default:return!1}default:return!1}})===void 0}}function zte(t,o,s){return E.assert(o!==void 0,"outername should always be defined"),Rn(t,o,s,void 0,!1,!1)}function Gte(t,o,s){let l=WS(t,o,s);if(l)return l;let d;return t===Xn?d=Ei(["string","number","boolean","object","bigint","symbol"],h=>t.has(h.charAt(0).toUpperCase()+h.slice(1))?Fo(524288,h):void 0).concat(oo(t.values())):d=oo(t.values()),i3(o,d,s)}function i3(t,o,s){return fg(t,o,l);function l(d){let p=Ws(d);if(!Eo(p,'"')){if(d.flags&s)return p;if(d.flags&2097152){let h=mte(d);if(h&&h.flags&s)return p}}}}function $te(t,o,s,l,d,p){E.assertIsDefined(t);let h=Sn(s.left)?s.left.text:void 0,x;if(h===void 0)x=Fo(0,"__missing");else if(x=t.get(h),!x)t.set(h,x=Fo(2,h,4096)),p&&(x.isReplaceableByMethod=!0);else{if(p&&!x.isReplaceableByMethod)return x;if(x.flags&d){if(x.isReplaceableByMethod)t.set(h,x=Fo(0,h));else if(!(l&3&&x.flags&67108864)){pl(s)&&xc(s.name,s);let I=x.flags&2?N.Cannot_redeclare_block_scoped_variable_0:N.Duplicate_identifier_0,B=!0,z=!1;gr(x.declarations);let re=[],pe=ci(s)||s;Bn(x.declarations,(on,pn)=>{let Kn=ci(on)||on,Nn=B?wi(Kn,I,Fs(pe)):wi(Kn,I)});let _e=B?wi(pe,I,Fs(s)):wi(pe,I);Zn.add(ia(_e,...re)),x=Fo(0,h)}}}return s.symbol=x,x.name!=="__missing"&&B3(x,s,2),KD(x,s),x.parent?E.assert(x.parent===o,"Existing symbol parent should match new one"):x.parent=o,x}function Qte(t,o,s,l){E.assert(!t||t.parent);let d=gi(o)?o:o.text;if(t?.parent&&Pf(t.parent)&&t.parent.left===o){let p=t.parent,h=E9(t.parent);h.locals||(h.locals=Wi());let x=Qp(h);return $te(h.locals,x,p,3,0)}r(()=>{if(!t||t.parent.kind!==203&&!fte(t,d,o)&&!Kte(t,d,s)&&!Hte(t,d,s)){let p,h;if(!h&&Cr<xi&&(p=zte(t,d,s),p)){let x=Qi(p),I=N.Cannot_find_name_0_Did_you_mean_1,B=hi(t,I,j0(o),x);B.canonicalHead=D9(l,j0(o)),wN(!0,B),p.valueDeclaration&&ia(B,wi(p.valueDeclaration,N._0_is_declared_here,x))}!p&&!h&&o&&hn(t,l,j0(o)),Cr++}})}function wN(t,o){t?Zn.add(o):zt.add({...o,category:2})}function j0(t){return gi(t)?t:Fs(t)}function Ey(t){return kt(t&&(t.flags&1048576)!==0&&t.exportSymbol||t)}function Yte(t,o){if(E.assert(!!(t.flags&3||t.flags&32||t.flags&384)),t.flags&67108881&&t.flags&32)return;let s=t.declarations?.find(l=>mF(l)||Pf(l));if(s===void 0)return E.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(s.flags&33554432)&&!AN(s,o)){let l,d=Fs(ci(s));t.flags&3?l=hn(o,N.Block_scoped_variable_0_used_before_its_declaration,d):t.flags&32&&(l=hn(o,N.Class_0_used_before_its_declaration,d)),l&&ia(l,wi(s,N._0_is_declared_here,d))}}function Xte(t,o,s,l,d,p){r(()=>{let h=o.name,x=l&&Vr(l)&&yF(l);if(t&&(s&2||(s&32||s&384)&&(s&111551)===111551)){let I=Ey(o);(I.flags&2||I.flags&32||I.flags&384)&&Yte(I,t)}})}function o3(t){switch(t.text){case"bytes":case"buffer":return N.Cannot_find_0_Do_you_need_to_change_your_driver_type;default:return t.parent?.kind===175?N.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:N.Cannot_find_name_0}}function lc(t,o=1160127){let s=Wt(t);return s.resolvedSymbol||(s.resolvedSymbol=!Da(t)&&Or(t,t,o,o3(t),!TF(t),!1)||ko),s.resolvedSymbol}function zf(t){return kt(t.parent&&sr(t.parent))}function OC(t){return It===t||(It=t,pr=rm(t)),pr}function f_(t){return!!(OC(t)&536870912)}function MC(t){let o=zf(t);return o&&gr(t.declarations)>1?o.flags&64?Pn(t.declarations,f_):yi(t.declarations,f_):!!t.valueDeclaration&&f_(t.valueDeclaration)||gr(t.declarations)&&yi(t.declarations,f_)}function Zte(t){E.assert((t.flags&2097152)!==0,"Should only get Alias here.");let o=at(t);if(!o.immediateTarget){let s=uT(t);if(!s)return E.fail();o.immediateTarget=B0(s,!0)}return o.immediateTarget}function p_(t,o,s){let l=wi(t,N._0_is_deprecated,s);return a3(o,l)}function a3(t,o){let s=Array.isArray(t)?Bn(t,aO):aO(t);return s&&ia(o,wi(s,N.The_declaration_was_marked_as_deprecated_here)),zt.add(o),o}function s3(t,o){if(!(t.flags&2097152)||MC(t)||!uT(t))return t;let s=cu(t);if(s===ko)return s;for(;t.flags&2097152;){let l=Zte(t);if(l){if(l===s)break;if(l.declarations&&gr(l.declarations))if(MC(l)){p_(o,l.declarations,l.name);break}else{if(t===s)break;t=l}}else break}return s}function ss(t,o){switch(o.kind){case 289:return ss(t,o.expression);case 269:return Pf(o)&&ss(t,o.left)||br(o)&&o.operatorToken.kind===27&&ss(t,o.right)}switch(t.kind){case 89:return o.kind===89&&lc(t)===lc(o)||(xo(o)||To(o))&&rt(lc(t).declarations[0])===rt(o);case 71:return o.kind===71;case 289:return ss(t.expression,o);case 286:case 281:let s=eg(t);if(s!==void 0){let l=Us(o)?eg(o):void 0;if(l!==void 0)return l===s&&ss(t.expression,o.expression)}if(rc(t)&&rc(o)&&Sn(t.argumentExpression)&&Sn(o.argumentExpression)){let l=lc(t.argumentExpression);if(l===lc(o.argumentExpression)&&bw(l)&&!c3(l))return ss(t.expression,o.expression)}break;case 269:return br(t)&&t.operatorToken.kind===27&&ss(t.right,o)}return!1}function c3(t){return!bJ(t,void 0)}function l3(t,o){for(;Us(t);)if(t=t.expression,ss(t,o))return!0;return!1}function u3(t,o){return ss(t,o)||l3(t,o)}function d3(t,o){if(t.arguments){for(let s of t.arguments)if(u3(o,s))return!0}return!!(t.expression.kind===286&&u3(o,t.expression.expression))}function J0(t,o){if(o.flags&8208){let s=er(t.parent,l=>!Us(l))||t.parent;return Cg(s)?Md(s)&&Sn(t)&&d3(s,t):yi(o.declarations,l=>!Ji(l)||f_(l))}return!0}function f3(t,o){let s=Ey(o),l=s3(s,t);MC(l)&&J0(t,l)&&l.declarations&&p_(t,l.declarations,t.text);let d=s.valueDeclaration;if(d&&s.flags&32&&Sa(d)&&d.name!==t){let p=zx(t,!1,!1);for(;p.kind!==176&&p.parent!==d;)p=zx(p,!1,!1);p.kind!==176&&(Wt(d).flags|=262144,Wt(p).flags|=262144,Wt(t).flags|=536870912)}tre(t,o)}function ere(t,o){return!!er(t,s=>s===o?"quit":Ji(s)||s.parent&&Tl(s.parent)&&s.parent.initializer===s)}function p3(t){return er(t,o=>!o||RO(o)?"quit":qv(o,!1))}function nre(t,o){return er(t,s=>s===o?"quit":s===o.initializer||s===o.condition||s===o.incrementor||s===o.statement)}function tre(t,o){if(!(o.flags&34)||!o.valueDeclaration||Vr(o.valueDeclaration)||o.valueDeclaration.parent.kind===255)return;let s=Sh(o.valueDeclaration),l=ere(t,s),d=p3(s);if(d){if(l){let p=!0;if(ZM(s)){let h=pm(o.valueDeclaration,238);if(h&&h.parent===s){let x=nre(t.parent,s);if(x){let I=Wt(x);I.flags|=8192;let B=I.capturedBlockScopeBindings||(I.capturedBlockScopeBindings=[]);fu(B,o),x===s.initializer&&(p=!1)}}}p&&(Wt(d).flags|=4096)}if(ZM(s)){let p=pm(o.valueDeclaration,238);p&&p.parent===s&&rre(t,s)&&(Wt(o.valueDeclaration).flags|=65536)}Wt(o.valueDeclaration).flags|=32768}l&&(Wt(o.valueDeclaration).flags|=16384)}function rre(t,o){let s=t;for(;s.parent.kind===289;)s=s.parent;let l=!1;if(Vd(s))l=!0;else if(s.parent.kind===298||s.parent.kind===288){let d=s.parent;l=d.operator===47||d.operator===48}return l?!!er(s,d=>d===o?"quit":d===o.statement):!1}function ire(t){return!!er(t,o=>{switch(o.kind){case 152:return!0;case 174:case 252:return!1;case 283:case 247:return"quit";default:return fm(o)?!1:"quit"}})}function ore(t){let o=t.valueDeclaration;return o?(To(o)&&(o=Qv(o)),_o(o)?o0(o.parent):!1):!1}function are(t){let o=at(t);return o.type||(o.type=or(Xt(o.target),o.mapper))}function sre(t){let o=at(t);return o.type||(o.type=qA(t.links.propertyType,t.links.mappedType,t.links.constraintType)||Mr),o.type}function cre(t){var o;if(!t.links.type){let s=t.links.mappedType;if(!Op(t,0))return s.containsError=!0,Gn;let l=rT(s.target||s),d=oN(s.mapper,il(s),t.links.keyType),p=or(l,d),h=G&&t.flags&16777216&&!vo(p,49152)?Bp(p,!0):t.links.checkFlags&524288?Z6(p):p;Rp()||(hn(v,N.Type_of_property_0_circularly_references_itself_in_mapped_type_1,Qi(t),_t(s)),h=Gn),(o=t.links).type??(o.type=h)}return t.links.type}function lre(t){let o=at(t);if(o.localVarType&&J){let s=o.localVarType.get(J?.fileName);return s||(s=g3(t),o.localVarType.set(J?.fileName,s)),s}if(!o.type){let s=g3(t);return s?.flags&-2147483648&&J?((o.localVarType||(o.localVarType=new Map)).set(J.fileName,s),s):(!o.type&&!ore(t)&&(o.type=s),s)}return o.type}function W0(t,o){let s,l=!1,d=!1;if(!s){let h;if(t.declarations){let x;for(let I of t.declarations){let B=br(I)||ao(I)?I:Us(I)?br(I.parent)?I.parent:I:void 0;if(!B)continue;let z=Us(B)?UO(B):es(B);(z===4||br(B)&&G0(B,z))&&(d=!0),ao(B)||(x=gre(x,B,t,I)),x||(h||(h=[])).push(br(B)||ao(B)?pre(t,o,B,z):Lt)}s=x}if(!s){if(!gr(h))return Gn;let x;if(d){let B=f4(t);B&&((x||(x=[])).push(B),l=!0)}let I=Pn(x,B=>!!(B.flags&-98305))?x:h;s=vt(I)}}let p=sl(su(s,!1,d&&!l));return t.valueDeclaration&&wr(t.valueDeclaration)&&ka(p,h=>!!(h.flags&-98305))===Lt?(Ma(t.valueDeclaration,wt),wt):p}function al(t,o){let s=qo(t,o);return s?Xt(s):void 0}function Up(t){return u_(t,0,!1)}function ure(t){return dre(t,Lt)}function dre(t,o){return t.parameters.length>0?vd(t,0):o}function fre(t,o){return!1}function pre(t,o,s,l){if(ao(s)){if(o)return Xt(o);let p=Ds(s.arguments[2]),h=al(p,"value");if(h)return h;let x=al(p,"get");if(x){let B=Up(x);if(B)return $i(B)}let I=al(p,"set");if(I){let B=Up(I);if(B)return ure(B)}return wt}if(fre(s.left,s.right))return wt;let d=o?Xt(o):Sy(Ds(s.right));if(d.flags&524288&&l===2&&t.name==="export="){let p=Wu(d),h=Wi();K9(p.members,h);let x=h.size;o&&!o.exports&&(o.exports=Wi()),(o||t).exports.forEach((B,z)=>{let re=h.get(z);if(re&&re!==B&&!(B.flags&2097152))if(B.flags&111551&&re.flags&111551){if(B.valueDeclaration&&re.valueDeclaration&&$t(B.valueDeclaration)!==$t(re.valueDeclaration)){let _e=B.name,on=Wo(re.valueDeclaration,pl)?.name||re.valueDeclaration;ia(hn(B.valueDeclaration,N.Duplicate_identifier_0,_e),wi(on,N._0_was_also_declared_here,_e)),ia(hn(on,N.Duplicate_identifier_0,_e),wi(B.valueDeclaration,N._0_was_also_declared_here,_e))}let pe=Fo(B.flags|re.flags,z);pe.links.type=vt([Xt(B),Xt(re)]),pe.valueDeclaration=re.valueDeclaration,pe.declarations=Zr(re.declarations,B.declarations),h.set(z,pe)}else h.set(z,ze(B,re));else h.set(z,B)});let I=Lc(x!==h.size?void 0:p.symbol,h,p.callSignatures,p.constructSignatures,p.indexInfos);if(x===h.size&&(d.aliasSymbol&&(I.aliasSymbol=d.aliasSymbol,I.aliasTypeArguments=d.aliasTypeArguments),dt(d)&4)){I.aliasSymbol=d.symbol;let B=Qo(d);I.aliasTypeArguments=gr(B)?B:void 0}return I.objectFlags|=Qt([d])|dt(d)&20608,I.symbol&&I.symbol.flags&32&&d===$m(I.symbol)&&(I.objectFlags|=16777216),I}return fN(d)?(Ma(s,Oi),Oi):d}function m3(t,o){if(o){let s=at(o);if(!s.inferredClassSymbol||!s.inferredClassSymbol.has(so(t))){let l=ym(t)?t:ae(t);return l.exports=l.exports||Wi(),l.members=l.members||Wi(),l.flags|=o.flags&32,o.exports?.size&&Ed(l.exports,o.exports),o.members?.size&&Ed(l.members,o.members),(s.inferredClassSymbol||(s.inferredClassSymbol=new Map)).set(so(l),l),l}return s.inferredClassSymbol.get(so(t))}}function c_e(t){}function mre(t){let o=at(t),s=o;if(!o.declaredType){let l=t.flags&32?1:2,d=m3(t,t.valueDeclaration&&(t.valueDeclaration,void 0));d&&(t=d,o=d.links);let p=s.declaredType=o.declaredType=Ku(l,t),h=Jm(t);p.objectFlags|=4,p.typeParameters=h,p.localTypeParameters=h,p.instantiations=new Map,p.instantiations.set(uc(p.typeParameters),p),p.target=p,p.resolvedTypeArguments=p.typeParameters,p.thisType=kl(t),p.thisType.isThisType=!0,p.thisType.constraint=p}return o.declaredType}function $m(t){let o=at(t),s=o;if(!o.declaredType){let l=t.flags&32?1:2,d=m3(t,t.valueDeclaration&&(t.valueDeclaration,void 0));d&&(t=d,o=d.links);let p=s.declaredType=o.declaredType=Ku(l,t),h=J4(t),x=Jm(t);(h||x||l===1)&&(p.objectFlags|=4,p.typeParameters=Zr(h,x),p.outerTypeParameters=h,p.localTypeParameters=x,p.instantiations=new Map,p.instantiations.set(uc(p.typeParameters),p),p.target=p,p.resolvedTypeArguments=p.typeParameters,p.thisType=kl(t),p.thisType.isThisType=!0,p.thisType.constraint=p)}return o.declaredType}function gre(t,o,s,l){let d=tc(o.parent);if(d){let p=sl(rr(d));if(t)!da(t)&&!da(p)&&!nT(t,p)&&l6(void 0,t,l,p);else return p}if(s.parent?.valueDeclaration){let p=R3(s.parent);if(p.valueDeclaration){let h=tc(p.valueDeclaration);if(h){let x=qo(rr(h),s.name);if(x)return Ze(x)}}}return t}function g3(t){if(t===At)return wt;if(t.flags&134217728&&t.valueDeclaration){let l=rt($t(t.valueDeclaration)),d=Fo(l.flags,"exports");d.declarations=l.declarations?l.declarations.slice():[],d.parent=t,d.links.target=l,l.valueDeclaration&&(d.valueDeclaration=l.valueDeclaration),l.members&&(d.members=new Map(l.members)),l.exports&&(d.exports=new Map(l.exports));let p=Wi();return p.set("exports",d),Lc(t,p,Re,Re,Re)}E.assertIsDefined(t.valueDeclaration);let o=t.valueDeclaration;if(!Op(t,0))return t.flags&512&&!(t.flags&67108864)?RN(t):BC(t);let s;if(br(o)||wr(o)&&(ao(o)||Ti(o)&&br(o.parent)))s=W0(t);else if(Ti(o)||rc(o)||Sn(o)||ji(o)||yu(o)||hg(o)||Is(o)||Vr(o)){if(t.flags&9136)return RN(t);s=o.parent&&br(o.parent)?W0(t):iT(o)||wt}else if(dd(o))s=iT(o)||y3(o);else if(ud(o))s=iT(o)||m_(o.name,0);else if(_o(o)||Tl(o)||Ff(o)||xo(o)||To(o)||Eg(o))s=mN(o,!0);else if(Kg(o))s=wt;else return E.fail("Unhandled declaration kind! "+E.formatSyntaxKind(o.kind)+" for "+E.formatSymbol(t));return Rp()?s:t.flags&512&&!(t.flags&67108864)?RN(t):BC(t)}function BC(t){let o=t.valueDeclaration;if(o){if(tc(o))return hn(t.valueDeclaration,N._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Qi(t)),Gn;$e&&(o.kind!==149||o.initializer)&&hn(t.valueDeclaration,N._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,Qi(t))}else if(t.flags&2097152){let s=uT(t);s&&hn(s,N.Circular_definition_of_import_alias_0,Qi(t))}return wt}function y3(t,o){return m_(t.initializer,o)}function m_(t,o,s){let l=ni(t,o,s);if(Jf(l)){let d=ba(l);if(d.isIntLiteral()&&d.value===0)return d}return M4(t)?l:l4(l,sN(iu(t,void 0),t,void 0))}function Xt(t,o){let s=oa(t);return s&65536&&E.fail("TODO - getTypeOfSymbol"),s&1?are(t):s&262144?cre(t):s&8192?sre(t):t.flags&7?lre(t):t.flags&9136?RN(t):t.flags&2097152?yre(t):Gn}function yre(t){let o=at(t);if(!o.type){if(!Op(t,0))return Gn;let s=cu(t),l=t.declarations&&B0(uT(t),!0),d=Ns(l?.declarations,p=>jH(p)?iT(p):void 0);if(o.type??(o.type=d||(lT(s)&111551?Xt(s):Gn)),!Rp())return BC(l??t),o.type??(o.type=Gn)}return o.type}function RN(t){let o=at(t),s=o;return o.type||(s.type=o.type=hre(t)),o.type}function hre(t){let o=t.valueDeclaration;if(o&&(o.kind===269||Us(o)&&o.parent.kind===269))return W0(t);let s=Ku(16,t);if(t.flags&32){let l=Tre(t);return l?Mi([s,l]):s}else return G&&t.flags&16777216?Bp(s,!0):s}function Tre(t){let o=U0($m(t));return o?.flags&8650752?o:o?.flags&2097152?Sr(o.types,s=>!!(s.flags&8650752)):void 0}function l_e(t){return t.heritageClauses.length>0}function U0(t){if(!t.resolvedBaseConstructorType){let o=gE(t.symbol),s=o&&fE(o),l=Gb(t);if(!l)return t.resolvedBaseConstructorType=fr;if(!Op(t,1))return Gn;let d=ni(l.expression);if(s&&l!==s&&(E.assert(!s.typeArguments),ni(s.expression)),d.flags&2621440&&Wu(d),!Rp())return hn(t.symbol.valueDeclaration,N._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,Qi(t.symbol)),t.resolvedBaseConstructorType??(t.resolvedBaseConstructorType=Gn);!(d.flags&1)&&d!==nu&&console.debug("todo - implement this"),t.resolvedBaseConstructorType??(t.resolvedBaseConstructorType=d)}return t.resolvedBaseConstructorType}function h3(t){let o=t.parent;if(o){if(Ti(o)&&o.expression===t)return!1;let s=o.parent?.parent}return!0}function T3(t,o){if(B4(t,111551)){let s=cu(t);lT(t,!0)&1160127&&Sre(t)}}function Sre(t){let o=at(t);if(!o.referenced&&(o.referenced=!0,!uT(t)))return E.fail()}function S3(t){let o=lc(t);o&&o!==Et&&o!==ko&&T3(o,t)}function K0(t,o,s,l){if(!(t.flags&33554432))switch(o){case 1:return S3(t);case 2:return _3(t,s,l);case 0:{if(Sn(t)&&(fm(t)||ud(t.parent))&&h3(t)){if($v(t.parent)&&(Ti(t.parent)?t.parent.expression:t.parent.left)!==t)return;S3(t);return}if($v(t)){let d=t;for(;$v(d);)d=d.parent;return _3(t)}$c(t);return}default:E.assertNever(o,`Unhandled reference hint: ${o}`)}}function _3(t,o,s){let l=Ti(t)?t.expression:t.left;if(!Sn(l))return;let d=lc(l);if(!d||d===ko)return;let p=s||Ds(l);if(Ms(p)||p===Br){T3(d,t);return}let h=o;if(!h&&!s){let x=Ti(t)?t.name:t.right,I=!1,B=mm(t),z=Ha(B!==0?sl(p):p);h=qo(z,x.text)}}function sl(t){return V0(t,void 0)}function x3(t,o,s){return{parent:t,propertyName:o,siblings:s,resolvedProperties:void 0}}function b3(t){if(!t.siblings){let o=[];for(let s of b3(t.parent))if(Lu(s)){let l=jf(s,t.propertyName);l&&Ry(Xt(l),d=>{o.push(d)})}t.siblings=o}return t.siblings}function q0(t){if(!t.resolvedProperties){let o=Wi();for(let s of t.types){for(let l of Ba(s))if(!o.has(l.name)){let d=Go(t,l.name,!!(t.flags&2097152));d&&o.set(l.name,d)}if(t.flags&1048576&&za(s).length===0)break}t.resolvedProperties=LC(o)}return t.resolvedProperties}function Ba(t){return t=Mm(t),t.flags&3145728?q0(t):uf(t)??Re}function _re(t){if(!t.resolvedProperties){let o=new Map;for(let s of b3(t))if(Lu(s)&&!(dt(s)&2097152))for(let l of Ba(s))o.set(l.name,l);t.resolvedProperties=oo(o.values())}return t.resolvedProperties}function xre(t,o){if(!(t.flags&4))return t;let s=Xt(t),l=o&&x3(o,t.name,void 0),d=V0(s,l);return d===s?t:Bm(t,d)}function bre(t){let o=mo.get(t.name);if(o)return o;let s=Bm(t,rs);return s.flags|=16777216,mo.set(t.name,s),s}function Cre(t,o){let s=Wi();for(let d of uf(t))s.set(d.name,xre(d,o));if(o)for(let d of _re(o))s.has(d.name)||s.set(d.name,bre(d));let l=Lc(t.symbol,s,Re,Re,Za(za(t),d=>Kp(d.keyType,sl(d.type),d.isReadonly)));return l.objectFlags|=dt(t)&266240,l}function Kp(t,o,s,l){return{keyType:t,type:o,isReadonly:s,declaration:l}}function V0(t,o){if(dt(t)&196608){if(o===void 0&&t.widened)return t.widened;let s;if(t.flags&98305)s=wt;else if(Lu(t))s=Cre(t,o);else if(t.flags&1048576){let l=o||x3(void 0,void 0,t.types),d=Za(t.types,p=>p.flags&98304?p:V0(p,l));s=vt(d,Pn(d,Yp)?2:1)}else t.flags&2097152?s=Mi(Za(t.types,sl)):cf(t)&&(s=py(t.target,Za(Qo(t),sl)));return s&&o===void 0&&(t.widened=s),s||t}return t}function Ds(t,o){if(o)return ni(t,o);let s=Wt(t);if(!s.resolvedType){let l=Ve,d=q;Ve=et,q=void 0,s.resolvedType=ni(t,o),q=d,Ve=l}return E.assertIsDefined(s.resolvedType),s.resolvedType}function Dre(t,o,s){let l=Xt(t,s),d=t.valueDeclaration;if(d){if(To(d)&&!d.initializer&&!d.dotDotDotToken&&d.parent.elements.length>=2){let p=d.parent.parent;p.kind===149&&console.log("TODO - getNarrowedTypeOfSymbol")}if(_o(d)&&!d.type&&!d.initializer&&!d.dotDotDotToken){let p=d.parent;if(p.parameters?.length>=2&&o0(p)){let h=t_(p);if(h&&h.parameters.length===1&&Sl(h)){let x=Mm(or(Xt(h.parameters[0]),tT(p)?.nonFixingMapper));console.debug("todo - getNarrowedTypeOfSymbol")}}}}return l}function qu(t){return t.flags&128?Er:t.flags&256?Co:t.flags&2048?Xr:t.flags&1048576?vre(t):t}function Ca(t){return t.id}function ON(t){return t?zo.get(t):void 0}function MN(t,o){return t&&zo.set(t,o),o}function uc(t){let o="";if(t){let s=t.length,l=0;for(;l<s;){E.assertIsDefined(t[l]);let d=t[l].id,p=1;for(;l+p<s&&t[l+p].id===d+p;)p++;o.length&&(o+=","),o+=d,p>1&&(o+=":"+p),l+=p}}return o}function Py(t,o){return t?`@${so(t)}`+(o?`:${uc(o)}`:""):""}function vt(t,o=1,s,l,d){if(t.length===0)return Lt;if(t.length===1)return t[0];if(t.length===2&&!d&&(t[0].flags&1048576||t[1].flags&1048576)){let p=o===0?"N":o===2?"S":"L",h=t[0].id<t[1].id?0:1,x=t[h].id+p+t[1-h].id+Py(s,l),I=kr.get(x);return I||(I=E3(t,o,s,l,void 0),kr.set(x,I)),I}return E3(t,o,s,l,d)}function C3(t,o,s){let l;for(let d of s)d!==l&&(o=d.flags&1048576?C3(t,o|(Ere(d)?1048576:0),d.types):Pre(t,o,d),l=d);return o}function Ere(t){return!!(t.flags&1048576&&(t.aliasSymbol||t.origin))}function Pre(t,o,s){let l=s.flags;if(!(l&131072))if(o|=l&473694143,l&465829888&&(o|=33554432),l&2097152&&dt(s)&67108864&&(o|=536870912),s===la&&(o|=8388608),da(s)&&(o|=1073741824),!G&&l&98304)dt(s)&65536||(o|=4194304);else{let d=t.length,p=d&&s.id>t[d-1].id?~d:Rd(t,s,Ca,io);p<0&&t.splice(~p,0,s)}return o}function Nre(t,o,s){let l=t.length;for(;l>0;){l--;let d=t[l],p=d.flags;(p&402653312&&o&4||p&256&&o&8||p&2048&&o&64||p&8192&&o&4096||s&&p&32768&&o&16384||Ym(d)&&vl(t,d.regularType))&&pg(t,l)}}function Rs(t){if(dt(t)&32){let o=uu(t);if(T_(o))return!0;let s=Ou(t);if(s&&T_(or(s,Hf(il(t),o))))return!0}return!1}function kre(t,o){if(t.length<2)return t;let s=uc(t),l=_p.get(s);if(l)return l;let d=o&&Pn(t,I=>!!(I.flags&524288)&&!Rs(I)&&Y0(Wu(I))),p=t.length,h=p,x=0;for(;h>0;){h--;let I=t[h];if(d||I.flags&469499904){if(I.flags&262144&&jp(I).flags&1048576){Vu(I,vt(Yn(t,re=>re===I?Lt:re)),Qs)&&pg(t,h);continue}let B=I.flags&61603840?Sr(Ba(I),re=>Dn(Xt(re))):void 0,z=B&&ba(Xt(B));for(let re of t)if(I!==re){if(x===1e5&&x/(p-h)*p>1e6){In?.instant(In.Phase.CheckTypes,"removeSubtypes_DepthLimit",{typeIds:t.map(_e=>_e.id)}),hn(v,N.Expression_produces_a_union_type_that_is_too_complex_to_represent);return}if(x++,B&&re.flags&61603840){let pe=al(re,B.name);if(pe&&Dn(pe)&&ba(pe)!==z)continue}if(Vu(I,re,Qs)&&(!(dt(HN(I))&1)||!(dt(HN(re))&1)||$p(I,re))){pg(t,h);break}}}}return _p.set(s,t),t}function D3(t,o){for(let s of o)if(s.flags&1048576){let l=s.origin;s.aliasSymbol||l&&!(l.flags&1048576)?fu(t,s):l&&l.flags&1048576&&D3(t,l.types)}}function E3(t,o,s,l,d){let p=[],h=C3(p,0,t);if(o!==0){if(h&3)return h&1?h&8388608?la:h&1073741824?Gn:wt:Mr;if(h&32768&&p.length>=2&&p[0]===fr&&p[1]===ki&&pg(p,1),(h&402656160||h&16384&&h&32768)&&Nre(p,h,!!(o&2)),h&536870912&&FX(p),o===2&&(p=kre(p,!!(h&524288)),!p))return Gn;if(p.length===0)return h&65536?h&4194304?De:nu:h&32768?h&4194304?fr:w:Lt}if(!d&&h&1048576){let I=[];D3(I,t);let B=[];for(let re of p)Pn(I,pe=>vl(pe.types,re))||B.push(re);if(!s&&I.length===1&&B.length===0)return I[0];if(Bl(I,(re,pe)=>re+pe.types.length,0)+B.length===p.length){for(let re of I)jC(B,re);d=C(1048576,B)}}let x=(h&36323331?0:32768)|(h&2097152?16777216:0);return qS(p,x,s,l,d)}function jC(t,o){let s=Rd(t,o,Ca,io);return s<0?(t.splice(~s,0,o),!0):!1}function Fa(t,o,s){if(t.flags&131072)return t;if(!(t.flags&1048576))return o(t);let l=t.origin,d=l&&l.flags&1048576?l.types:t.types,p,h=!1;for(let x of d){let I=x.flags&1048576?Fa(x,o,s):o(x);h||(h=x!==I),I&&(p?p.push(I):p=[I])}return h?p&&vt(p,s?0:1):t}function vre(t){let o=`B${Ca(t)}`;return ON(o)??MN(o,Fa(t,qu))}function H0(t,o,s){return pT(t)&&(t=t.baseType),!(s&&s&2)&&Id(t,P3)&&(Ire(t,o)||Fre(o,s))?Fa(t,jp):t}function P3(t){return t.flags&2097152?Pn(t.types,P3):!!(t.flags&465829888&&jp(t).flags&1146880)}function Fre(t,o){let s=(Sn(t)||Ti(t)||rc(t))&&(o&&o&32?iu(t,8):iu(t,void 0));return s&&!oT(s)}function Ire(t,o){let s=o.parent;return s.kind===286||s.kind===146||s.kind===272&&s.expression===o||s.kind===276&&s.expression===o||s.kind===281&&s.expression===o&&!(Id(t,N3)&&T_(cs(s.argumentExpression)))}function N3(t){return t.flags&2097152?Pn(t.types,N3):!!(t.flags&465829888&&!vo(jp(t),98304))}function JC(t){return er(t.parent,o=>Ji(o)&&!dm(o)||o.kind===176||o.kind===152)}function Qm(t,o){return Fd(ni(t,o),t)}function k3(t){for(;t.parent.kind===289;)t=t.parent;return Md(t.parent)&&t.parent.expression===t}function v3(t,o){let s=Qm(t.left);return z0(t,t.left,s,t.right,o)}function z0(t,o,s,l,d,p){let h=Wt(o).resolvedSymbol,x=mm(t),I=s;s=de===1&&va(s)?_C(s):s;let B=Ha(x!==0||k3(t)?sl(s):s),z=Ms(B)||B===Br,re;if(z)return Sn(o)&&h&&K0(t,2,void 0,s),da(B)?Gn:B;if(re=qo(B,l.text,!1,t.kind===146),!re&&iV(o)){let _e=s.symbol;re=Or(Uo(_e.declarations),l.text,16,void 0,!1,!0),re&&(re.declarations.some(on=>($(on)&2)===0)||(re=void 0))}K0(t,2,re,s);let pe;if(re){let _e=s3(re,l);MC(_e)&&J0(t,_e)&&_e.declarations&&p_(l,_e.declarations,l.text),m0(re,t,y4(o,h)),Wt(t).resolvedSymbol=re,m4(t,o.kind===71,Lx(t),B,re),pe=p||TF(t)?Yh(re):Xt(re)}else{let _e=!Yc(l)&&x===0?vp(B,l.text):void 0;if(!(_e&&_e.type))return e_(s)?wt:(l.text&&!Are(t)&&Lre(l,s,!1),Gn);_e.isReadonly&&Vd(t)&&hn(t,N.Index_signature_in_type_0_only_permits_reading,_t(B)),pe=_e.type,_e.declaration&&f_(_e.declaration)&&p_(l,[_e.declaration],l.text)}return p4(t,re,pe,l,d)}function Lre(t,o,s){let l,d;if(!Yc(t)&&o.flags&1048576&&!(o.flags&402784188)){for(let B of o.types)if(!qo(B,t.text)&&!vp(B,t.text)){l=Pi(l,N.Property_0_does_not_exist_on_type_1,Fs(t),_t(B));break}}let p=Fs(t),h=_t(o),x=$3(t,o);if(x!==void 0){let B=Ws(x),z=s?N.Property_0_may_not_exist_on_type_1_Did_you_mean_2:N.Property_0_does_not_exist_on_type_1_Did_you_mean_2;l=Pi(l,z,p,h,B),d=x.valueDeclaration&&wi(x.valueDeclaration,N._0_is_declared_here,B)}else{let B=N.Property_0_does_not_exist_on_type_1;l=Pi(F3(l,o),B,p,h)}let I=_h(Mc(t,!1),t,l);d&&ia(I,d),wN(!s||l.code!==N.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code,I)}function F3(t,o){return o.flags&2097152&&dt(o)&33554432&&E.fail("never intersection"),t}function Are(t){let o=I3(t);return!1}function I3(t){switch(t.kind){case 89:case 286:return t.parent?I3(t.parent):void 0;default:return}}function wre(t,o){return G&&o.kind===149&&o.initializer&&Uu(t,16777216)&&!Rre(o)?Hu(t,524288):t}function Rre(t){let o=Wt(t);if(o.parameterInitializerContainsUndefined===void 0){if(!Op(t,8))return BC(t.symbol),!0;let s=!!Uu(r_(t,0),16777216);if(!Rp())return BC(t.symbol),!0;o.parameterInitializerContainsUndefined??(o.parameterInitializerContainsUndefined=s)}return o.parameterInitializerContainsUndefined}function L3(t,o,s){let l=lc(t,s);if(l===ko)return Gn;if(f3(t,l),l===Et)return ire(t)?Gn:Xt(l);h3(t)&&K0(t,1);let d=Ey(l),p=d.valueDeclaration,h=Dre(d,t,o),x=mm(t);if(x&&!(d.flags&3)){let it=d.flags&16?N.Cannot_assign_to_0_because_it_is_a_function:N.Cannot_assign_to_0_because_it_is_not_a_variable;return hn(t,it,Qi(l)),Gn}let I=d.flags&2097152;if(d.flags&3){if(x===1)return OO(t)?qu(h):h}else if(I)p=uT(l);else return h;if(!p)return h;h=H0(h,t,o);let B=p.kind===149,z=JC(p),re=JC(t),pe=re!==z,_e=l.flags&134217728,on=h===vn||h===vi;for(;re!==z&&(re.kind===270||re.kind===283||VF(re))&&(h!==vi||bw(d)&&bJ(d,t));)re=JC(re);let pn=B||I||pe||_e||Ore(t,p)||h!==vn&&h!==vi&&(!G||(h.flags&16387)!==0)||p.flags&33554432,Kn=pn?B?wre(h,p):h:on?fr:Bp(h),Nn=tg(t,h,Kn,re);if(!cJ(t)&&(h===vn||h===vi)){if(Nn===vn||Nn===vi)return BN(Nn)}else if(!pn&&!WC(h)&&WC(Nn))return hn(t,N.Variable_0_is_used_before_being_assigned,Qi(l)),h;return x?qu(Nn):Nn}function WC(t){return!!((t.flags&1048576?t.types[0]:t).flags&32768)}function BN(t){return t===vn?wt:t===vi?Oi:t}function Ore(t,o){if(To(o)){let s=er(t,To);return s&&s===o}}function A3(t){let{parent:o}=t;return o.kind===289||o.kind===269&&o.operatorToken.kind===74&&o.left===t||o.kind===269&&o.operatorToken.kind===27&&o.right===t?A3(o):t}function Ym(t){return!!(t.flags&2976)&&t.freshType===t}function g_(t,o,s,l){let d=t.flags,p=o.flags;return p&1||d&131072||p&2&&!(s===Qs&&d&1)?!0:p&131072?!1:!!(d&256&&t.value===0||d&402653316&&p&4||d&2344&&p&8||d&528&&p&16||d&528&&p&8||d&4096&&p&4096||d&8192&&p&4096||d&32768&&(!G&&!(p&3145728)||p&49152)||d&65536&&(!G&&!(p&3145728)||p&65536)||d&524288&&p&67108864&&!(s===Qs&&lu(t)&&!(dt(t)&8192))||d&524288&&t.symbol?.flags&16&&t.symbol?.name==="__function"&&p&524288&&o===hr||(s===sc||s===wa)&&(d&1||jre(o)))}function pf(t){return t?.flags&6256?O3(t,"resolvedMembers"):t?.members||A}function w3(t,o,s,l){o&&o.forEach((d,p)=>{if(p==="default")return;let h=t.get(p);if(!h)t.set(p,d),s&&l&&s.set(p,{specifierText:ml(l.moduleSpecifier)});else if(s&&l&&h&&xy(h)!==xy(d)){let x=s.get(p);x.exportsWithDuplicate?x.exportsWithDuplicate.push(l):x.exportsWithDuplicate=[l]}})}function Mre(t){let o=[],s=new Set;return t=M0(t),{exports:d(t)||A,undefined:void 0};function d(p,h){if(!h&&p?.exports&&p.exports.forEach((B,z)=>s.add(z)),!(p&&p.exports&&fu(o,p)))return;let x=new Map(p.exports),I=p.exports.get("__export");if(I){let B=Wi(),z=new Map;if(I.declarations)for(let re of I.declarations){let pe=Dy(re,re.moduleSpecifier,void 0),_e=d(pe,h||re.isTypeOnly);w3(B,_e,z,re)}z.forEach(({exportsWithDuplicate:re},pe)=>{if(!(pe==="export="||!(re&&re.length)||x.has(pe)))for(let _e of re)Zn.add(wi(_e,N.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,z.get(pe).specifierText,pe))}),w3(x,B)}return x}}function R3(t){return(t.valueDeclaration?.kind===283||t.valueDeclaration?.kind===270)&&Qp(t.valueDeclaration.parent)||t}function G0(t,o=es(t)){if(o===4)return!0;if(!wr(t)||o!==5||!Sn(t.left.expression))return!1;let s=t.left.expression.text,l=Or(t.left,s,111551,void 0,!0,!0);return O9(l?.valueDeclaration)}function $0(t){let o=ci(t);return!!o&&Q0(o)}function O3(t,o){let s=at(t);if(!s[o]){let l=t.flags&1536?t.exports:t.members;s[o]=l||A;let d=Wi();for(let x of t.declarations||Re){let I=R9(x);if(I)for(let B of I)$0(B)&&M3(t,l,d,B)}let p=R3(t).assignmentDeclarationMembers;if(p){let x=oo(p.values());for(let I of x){let B=es(I);B===3||br(I)&&G0(I,B)||B===9||B===6||$0(I)&&M3(t,l,d,I)}}let h=Bre(l,d);if(t.flags&33554432&&s.cjsExportMerged&&t.declarations)for(let x of t.declarations){let I=at(x.symbol)[o];if(!h){h=I;continue}I&&I.forEach((B,z)=>{let re=h.get(z);if(!re)h.set(z,B);else{if(re===B)return;h.set(z,ze(re,B))}})}s[o]=h||A}return s[o]}function M3(t,o,s,l){E.assert(!!l.symbol,"The member is expected to have a symbol.");let d=Wt(l);if(!d.resolvedSymbol){d.resolvedSymbol=l.symbol;let p=br(l)?l.left:l.name,h=rc(p)?Ds(p.argumentExpression):jN(p);if(_m(h)){let x=Tm(h),I=l.symbol.flags,B=s.get(x);B||s.set(x,B=Fo(0,x,4096));let z=o&&o.get(x);if(!(t.flags&32)&&B.flags&Va(I)){let re=z?Zr(z.declarations,B.declarations):B.declarations,pe=x||Fs(p);Bn(re,_e=>hn(ci(_e)||_e,N.Property_0_was_also_declared_here,pe)),hn(p||l,N.Duplicate_property_0,pe),B=Fo(0,x,4096)}return B.links.nameType=h,B3(B,l,I),B.parent?E.assert(B.parent===t,"Existing symbol parent should match new one"):B.parent=t,d.resolvedSymbol=B}}return d.resolvedSymbol}function B3(t,o,s){E.assert(!!(oa(t)&4096),"Expected a late-bound symbol."),t.flags|=s,at(o.symbol).lateSymbol=t,t.declarations?o.symbol.isReplaceableByMethod||t.declarations.push(o):t.declarations=[o],s&111551&&(!t.valueDeclaration||t.valueDeclaration.kind!==o.kind)&&(t.valueDeclaration=o)}function Q0(t){if(!ps(t)&&!rc(t))return!1;let o=ps(t)?t.expression:t.argumentExpression;return Ks(o)&&_m(ps(t)?jN(t):Ds(o))}function jN(t){let o=Wt(t.expression);if(!o.resolvedType){if((Bd(t.parent.parent)||Sa(t.parent.parent))&&br(t.expression)&&t.expression.operatorToken.kind===103)return o.resolvedType=Gn;if(o.resolvedType=ni(t.expression),Tl(t.parent)&&vE(t.parent.parent)){let s=Sh(t.parent.parent),l=p3(s);l&&(Wt(l).flags|=4096,Wt(t).flags|=32768,Wt(t.parent.parent).flags|=32768)}(o.resolvedType.flags&98304||!Os(o.resolvedType,402655660)&&!Ui(o.resolvedType,yr))&&hn(t,N.A_computed_property_name_must_be_of_type_string_number_symbol_or_any)}return o.resolvedType}function Bre(t,o){if(!t?.size)return o;if(!o?.size)return t;let s=Wi();return Ed(s,t),Ed(s,o),s}function lu(t){return!!(dt(t)&16&&(t.members&&Y0(t)||t.symbol&&t.symbol.flags&2048&&pf(t.symbol).size===0))}function Y0(t){return t!==Cl&&(t.properties?.length||0)===0&&(t.callSignatures?.length||0)===0&&(t.constructSignatures?.length||0)===0&&(t.indexInfos?.length||0)===0}function jre(t){if(G&&t.flags&1048576){if(!(t.objectFlags&33554432)){let o=t.types;t.objectFlags|=33554432|(o.length>=3&&o[0].flags&32768&&o[1].flags&65536&&Pn(o,lu)?67108864:0)}return!!(t.objectFlags&67108864)}return!1}function Vu(t,o,s){if(Ym(t)&&(t=t.regularType),Ym(o)&&(o=o.regularType),t===o||t.flags&256&&t.value===0)return!0;if(s!==Ra){if(s===wa&&!(o.flags&131072)&&g_(o,t,s)||g_(t,o,s))return!0}else if(!((t.flags|o.flags)&61865984)){if(t.flags!==o.flags)return!1;if(t.flags&67358815)return!0}if(t.flags&524288&&o.flags&524288){let l=s.get(KN(t,o,0,s,!1));if(l!==void 0)return!!(l&1)}if(t.flags&469499904||o.flags&469499904){let l=Zm(t,o,s,void 0);return j3(t,o)&&!l&&t.flags&524288&&o.flags&524288?!0:l}return!1}function j3(t,o){return!Se&&!(J3(t)&&J3(o))}function J3(t){return t?.symbol?.flags&8388608}function X0(t){if(t.flags&16)return!1;if(t.flags&3145728)return!!Bn(t.types,X0);if(t.flags&465829888){let o=qp(t);if(o&&o!==t)return X0(o)}return Dn(t)||!!(t.flags&134217728)||!!(t.flags&268435456)}function qp(t){return t.flags&262144?dc(t):t.flags&8388608?Wre(t):t.flags&16777216?Jre(t):xa(t)}function Jre(t){return JN(t)?U3(t):void 0}function Wre(t){return JN(t)?Ure(t):void 0}function JN(t){return tw(t)!==_a}function Ure(t){if(fw(t))return nw(t.objectType,t.indexType);let o=Z0(t.indexType);if(o&&o!==t.indexType){let l=fy(t.objectType,o,t.accessFlags);if(l)return l}let s=Z0(t.objectType);if(s&&s!==t.objectType)return fy(s,t.indexType,t.accessFlags)}function Z0(t){let o=du(t,!1);return o!==t?o:qp(t)}function ew(t){if(t.flags&524288&&!Aw(t)){if(dt(t)&4&&t.node)return t.node;if(t.symbol&&!(dt(t)&16&&t.symbol.flags&32))return t.symbol;if(Bi(t))return t.target}if(t.flags&262144)return t.symbol;if(t.flags&8388608){do t=t.objectType;while(t.flags&8388608);return t}return t.flags&16777216?t.root:t}function nw(t,o){let s=ws([il(t)],[o]),l=wp(t.mapper,s),d=or(rT(t.target||t),l),p=aJ(t)>0||(oT(t)?mT(VC(t))>0:Kre(t,o));return su(d,!0,p)}function Kre(t,o){let s=xa(o);return!!s&&Pn(Ba(t),l=>!!(l.flags&16777216)&&Ui(mC(l,384),s))}function tw(t){if(t.resolvedBaseConstraint)return t.resolvedBaseConstraint;let o=[];return t.resolvedBaseConstraint=s(t);function s(p){if(!p.immediateBaseConstraint){if(!Op(p,4))return _a;let h,x=ew(p);if((o.length<10||o.length<50&&!Gr(o,x))&&(o.push(x),h=d(du(p,!1)),o.pop()),!Rp()){if(p.flags&262144){let I=YA(p);if(I){let B=hn(I,N.Type_parameter_0_has_a_circular_constraint,_t(p));v&&!Ux(I,v)&&!Ux(v,I)&&ia(B,wi(v,N.Circularity_originates_in_type_at_this_location))}}h=_a}p.immediateBaseConstraint??(p.immediateBaseConstraint=h||$s)}return p.immediateBaseConstraint}function l(p){let h=s(p);return h!==$s&&h!==_a?h:void 0}function d(p){if(p.flags&262144){let h=l_(p);return p.isThisType||!h?h:l(h)}if(p.flags&3145728){let h=p.types,x=[],I=!1;for(let B of h){let z=l(B);z?(z!==B&&(I=!0),x.push(z)):I=!0}return I?p.flags&1048576&&x.length===h.length?vt(x):p.flags&2097152&&x.length?Mi(x):void 0:p}if(p.flags&4194304)return yr;if(p.flags&268435456){let h=l(p.type);return h&&h!==p.type?eJ(p.symbol,h):Er}if(p.flags&8388608){if(fw(p))return l(nw(p.objectType,p.indexType));let h=l(p.objectType),x=l(p.indexType),I=h&&x&&fy(h,x,p.accessFlags);return I&&l(I)}if(p.flags&16777216){let h=U3(p);return h&&l(h)}if(p.flags&33554432)return l(gw(p));if(Vp(p)){let h=Yn(vy(p),(x,I)=>{let B=x.flags&262144&&p.target.elementFlags[I]&8&&l(x)||x;return B!==x&&Vc(B,z=>cf(z)&&!Vp(z))?B:x});return mf(h,p.target.elementFlags,p.target.readonly,p.target.labeledElementDeclarations)}return p}}function qre(t){if(t.resolvedConstraintOfDistributive!==void 0)return t.resolvedConstraintOfDistributive||void 0;if(t.root.isDistributive&&t.restrictiveInstantiation!==t){let o=du(t.checkType,!1),s=o===t.checkType?qp(o):o;if(s&&s!==t.checkType){let l=v6(t,yy(t.root.checkType,s,t.mapper),!0);if(!(l.flags&131072))return t.resolvedConstraintOfDistributive=l,l}}t.resolvedConstraintOfDistributive=!1}function Ny(t){return t.resolvedTrueType||(t.resolvedTrueType=or(rr(t.root.node.trueType),t.mapper))}function Vre(t){return t.resolvedInferredTrueType||(t.resolvedInferredTrueType=t.combinedMapper?or(rr(t.root.node.trueType),t.combinedMapper):Ny(t))}function ky(t){return t.resolvedFalseType||(t.resolvedFalseType=or(rr(t.root.node.falseType),t.mapper))}function W3(t){if(!t.resolvedDefaultConstraint){let o=Vre(t),s=ky(t);t.resolvedDefaultConstraint=Ms(o)?s:Ms(s)?o:vt([o,s])}return t.resolvedDefaultConstraint}function U3(t){return qre(t)||W3(t)}function Hre(t,o){let s=o.types.filter(l=>!!(l.flags&128));return fg(t.value,s,l=>l.value)}function rw(t){if(!(dt(t)&4)||!(dt(t.target)&3))return;if(dt(t)&33554432)return dt(t)&67108864?t.cachedEquivalentBaseType:void 0;t.objectFlags|=33554432;let o=t.target;if(dt(o)&1){let d=Gb(o);if(d&&d.expression.kind!==89&&d.expression.kind!==286)return}let s=Bf(o);if(s.length!==1||pf(t.symbol).size)return;let l=gr(o.typeParameters)?or(s[0],ws(o.typeParameters,Qo(t).slice(0,o.typeParameters.length))):s[0];return gr(Qo(t))>gr(o.typeParameters)&&console.debug("todo - implement this - typeref"),t.objectFlags|=67108864,t.cachedEquivalentBaseType=l}function iw(t){if(t.flags&524288){let o=Wu(t);return o.callSignatures?.length===0&&o.constructSignatures.length===0&&o.indexInfos.length===0&&o.properties.length>0&&yi(o.properties,s=>!!(s.flags&16777216))}return t.flags&33554432?iw(t.baseType):t.flags&2097152?yi(t.types,iw):!1}function ow(t){return ro(t,0).length!==0||ro(t,1).length!==0}function zre(t,o,s){for(let l of Ba(t))if(aw(o,l.name,s))return!0;return!1}function aw(t,o,s){if(t.flags&524288&&(jf(t,o)||vp(t,o)||rC(o)&&Iu(t,Er)))return!0;if(t.flags&3145728&&y_(t)){for(let l of t.types)if(aw(l,o,s))return!0}return!1}function y_(t){return!!(t.flags&524288&&!(dt(t)&512)||t.flags&67108864||t.flags&33554432&&y_(t.baseType)||t.flags&1048576&&Pn(t.types,y_)||t.flags&2097152&&yi(t.types,y_))}function h_(t,o){return ka(t,s=>(s.flags&o)!==0)}function K3(t,o){let s=zN(t),l=s&&al(o,s);return l&&GN(t,l)}function Gre(t,o){let s=Wi();for(let l of uf(t)){let d=Xt(l),p=o(d);s.set(l.name,p===d?l:Bm(l,p))}return s}function UC(t){if(!(Lu(t)&&dt(t)&8192))return t;let o=t.regularType;if(o)return o;let s=t,l=Gre(t,UC),d=Lc(s.symbol,l,s.callSignatures,s.constructSignatures,s.indexInfos);return d.flags=s.flags,d.objectFlags|=s.objectFlags&-8193,t.regularType=d,d}function $re(t,o){if(t.flags&1048576){for(let s of t.types)if(!vl(o.types,s))return!1;return!0}return vl(o.types,t)}function dT(t,o){return!!(t===o||t.flags&131072||o.flags&1048576&&$re(t,o))}function q3(t,o){if(t&&t.flags&1048576){let s=ay(t,o);if(s&&oa(s)&2)return s.links.isDiscriminantProperty===void 0&&(s.links.isDiscriminantProperty=(s.links.checkFlags&192)===192&&!oT(Xt(s))),!!s.links.isDiscriminantProperty}return!1}function V3(t,o){let s;for(let l of t)if(q3(o,l.name)){if(s){s.push(l);continue}s=[l]}return s}function H3(t,o){let s;return al(t,o)||(s=vp(t,o)?.type)&&su(s,!0,!0)}function Qre(t,o,s){let l=t.types,d=l.map(h=>h.flags&402784188?0:-1);for(let[h,x]of o){let I=!1;for(let B=0;B<l.length;B++)if(d[B]){let z=H3(l[B],x);z&&Id(h(),re=>!!s(re,z))?I=!0:d[B]=3}for(let B=0;B<l.length;B++)d[B]===3&&(d[B]=I?0:-1)}let p=Gr(d,0)?vt(l.filter((h,x)=>d[x]),0):t;return p.flags&131072?t:p}function z3(t,o,s){if(o.flags&1048576&&t.flags&2621440){let l=K3(o,t);if(l)return l;let d=Ba(t);if(d){let p=V3(d,o);if(p){let h=Qre(o,Yn(p,x=>[()=>Xt(x),x.name]),s);if(h!==o)return h}}}}function Yre(t){if(vo(t,67108864)){let o=ka(t,s=>!(s.flags&402784188));if(!(o.flags&131072))return o}return t}function Xre(t,o,s,l,d){return Ms(l)?!0:g4(t,o,s,l,d)}function G3(t,o,s){return Xre(t,t.kind===286&&t.expression.kind===71,!1,o,s)}function $3(t,o){let s=Ba(o)??Re;if(typeof t!="string"){let l=t.parent;Ti(l)&&(s=Ar(s,d=>G3(l,o,d))),t=ra(t)}return i3(t,s,111551)}function Q3(t,o){let s=$3(t,o);return s&&Ws(s)}function Y3(t){let o;for(;(dt(t)&96)===96&&(o=VC(t))&&(o.symbol||o.flags&2097152&&Pn(o.types,s=>!!s.symbol));)t=o;return t}function X3(t,o){return(dt(t)&96)===96&&(t=Y3(t)),t.flags&2097152?Pn(t.types,s=>X3(s,o)):ew(t)===o}function fT(t,o,s,l=3){if(s>=l){if((dt(t)&96)===96&&(t=Y3(t)),t.flags&2097152)return Pn(t.types,x=>fT(x,o,s,l));let d=ew(t),p=0,h=0;for(let x=0;x<s;x++){let I=o[x];if(X3(I,d)){if(I.id>=h&&(p++,p>=l))return!0;h=I.id}}}return!1}function Zre(t,o){let s=Nl(t);if(s!==t)return s;if(t.flags&2097152&&eie(t)){let l=Za(t.types,d=>HC(d,o));if(l!==t.types)return Mi(l)}return t}function eie(t){let o=!1,s=!1;for(let l of t.types)if(o||(o=!!(l.flags&465829888)),s||(s=!!(l.flags&98304)||lu(l)),o&&s)return!0;return!1}function Z3(t,o){let s=`${Ca(t)}>${Ca(o)}`,l=Zd.get(s);if(l)return l;let d=Ut(33554432);return d.baseType=t,d.constraint=o,Zd.set(s,d),d}function sw(t){return cw(t)?Z3(t,Mr):t}function cw(t){return!!(t.flags&3145728&&Pn(t.types,cw)||t.flags&33554432&&!pT(t)&&cw(t.baseType)||t.flags&524288&&!lu(t)||t.flags&432275456)}function pT(t){return!!(t.flags&33554432&&t.constraint.flags&2)}function eJ(t,o){E.fail("not implemented - getStringMappingType")}function lw(t,o,s,l){let d=as(t);if(d===Pc){let B=Ffe.get(t.name);if(B!==void 0&&o&&o.length===1)return B===4?sw(o[0]):eJ(t,o[0])}let p=at(t),h=p.typeParameters,x=uc(o)+Py(s,l),I=p.instantiations.get(x);return I||p.instantiations.set(x,I=x6(d,ws(h,Vm(o,h,lf(h),wr(t.valueDeclaration))),s,l)),I}function KC(t,o,s){let l=Hf(o,s),d=as(t);if(da(d))return d;let p=t.flags&524288?lw(t,au(at(t).typeParameters,l)):py(d,au(d.typeParameters,l));return vu.add(Ca(p)),p}function WN(t){return vu.has(Ca(t))}function nie(t,o){let s,l=!1;for(let d of t)if(d.flags&465829888){let p=qp(d);for(;p&&p.flags&21233664;)p=qp(p);p&&(s=$r(s,p),o&&(s=$r(s,d)))}else(d.flags&469892028||lu(d))&&(l=!0);if(s&&(o||l)){if(l)for(let d of t)(d.flags&469892028||lu(d))&&(s=$r(s,d));return HC(Mi(s,2),!1)}}function tie(t,o){let s=zc(t.elementFlags,l=>!(l&o));return s>=0?s:t.elementFlags.length}function qC(t,o){return t.elementFlags.length-bD(t.elementFlags,s=>!(s&o))-1}function Vp(t){return Bi(t)&&!!(t.target.combinedFlags&8)}function*nJ(t,o,s,l){let d=Ba(o);for(let p of d)if(s||!(p.flags&16777216||oa(p)&48)){let h=qo(t,p.name);if(!h)yield p;else if(l){let x=Xt(p);if(x.flags&101280){let I=Xt(h);I.flags&1||ba(I)===ba(x)||(yield p)}}}}function uw(t,o,s,l){return YK(nJ(t,o,s,l))}function dw(t,o){if(oa(t)&6){for(let s of t.links.containingType.types){let l=qo(s,t.name),d=l&&dw(l,o);if(d)return d}return}return o(t)}function rie(t,o){return dw(t,s=>{let l=EC(s);return l?xw(l,o):!1})}function iie(t,o){return!dw(o,s=>Cu(s)&4?!rie(t,EC(s)):!1)}function UN(t){let o=dt(t);return t.flags&2097152?yi(t.types,UN):!!(t.symbol&&t.symbol.flags&7040&&!(t.symbol.flags&32)&&!ow(t))||!!(o&4194304)||!!(o&1024&&UN(t.source))}function tJ(t){return!!(t.flags&524288)&&!Rs(t)}function rJ(t){return Vp(t)&&t.target.elementFlags.length===1}function uu(t){return t.constraintType||(t.constraintType=dc(il(t))||Gn)}function iJ(t){return vt($r(XK(t.target.fixedLength,o=>Au(""+o)),ju(t.target.readonly?Ue:Y)))}function T_(t){return!!(s_(t)&8388608)}function oJ(t,o){return t?o?Mi([t,o]):t:o}function Xm(t,o,s){if(dt(t)&4){let l=t.target,d=Qo(t);return gr(l.typeParameters)===gr(d)?py(l,Zr(d,[o||l.thisType])):t}else if(t.flags&2097152){let l=Za(t.types,d=>Xm(d,o,s));return l!==t.types?Mi(l):t}return s?Ha(t):t}function fw(t){let o;return!!(t.flags&8388608&&dt(o=t.objectType)&32&&!Rs(o)&&T_(t.indexType)&&!(Un(o)&8)&&!o.declaration.nameType)}function oie(t){return!!(dt(t)&32&&Un(t)&4)}function aJ(t){let o=Un(t);return o&8?-1:o&4?1:0}function VC(t){if(!t.modifiersType){let o=ZS(t.declaration),s=uu(o),l=s&&s.flags&262144?dc(s):s;t.modifiersType=l&&l.flags&4194304?or(l.type,t.mapper):Mr}return t.modifiersType}function mT(t){if(dt(t)&32)return aJ(t)||mT(VC(t));if(t.flags&2097152){let o=mT(t.types[0]);return yi(t.types,(s,l)=>l===0||mT(s)===o)?o:0}return 0}function pw(t){return t===Y||t===Ue||t.objectFlags&8?V:QJ(t.symbol,t.typeParameters)}function aie(t){return t.flags&1048576?t.types.length:1}function sie(t,o){for(let s=0;s<o.length;s++)if((o[s]&7)===1&&t[s].flags&16384)return!0;return!1}function cie(t){return OD(t.declaration.typeParameter)}function lie(t){let o=cie(t);return console.debug("todo - isMappedTypeWithKeyofConstraintDeclaration"),!1}function uie(t,o,s,l){for(let d of Ba(t))l(mC(d,o));if(t.flags&1)l(Er);else for(let d of za(t))(!s||d.keyType.flags&134217732)&&l(d.keyType)}function Zm(t,o,s,l,d,p,h){let x,I,B,z,re,pe,_e=0,on=0,pn=0,Kn=0,Nn=!1,it=0,lt=0,Qn,Ct,Rt=16e6-s.size>>3;E.assert(s!==Ra||!l,"no error reporting in identity checking");let Fr=je(t,o,3,!!l,d);if(Ct&&oi(),Nn){let X=KN(t,o,0,s,!1);s.set(X,2|(Rt<=0?32:64)),In?.instant(In.Phase.CheckTypes,"checkTypeRelatedTo_DepthLimit",{sourceId:t.id,targetId:o.id,depth:on,targetDepth:pn});let le=Rt<=0?N.Excessive_complexity_comparing_types_0_and_1:N.Excessive_stack_depth_comparing_types_0_and_1,Me=hn(l||v,le,_t(t),_t(o));h&&(h.errors||(h.errors=[])).push(Me)}else if(x){if(p){let Me=p();Me&&(Q9(Me,x),x=Me)}let le=_h(Mc(l),l,x,void 0);I&&ia(le,...I),h&&(h.errors||(h.errors=[])).push(le),(!h||!h.skipLogging)&&Zn.add(le)}return l&&h&&h.skipLogging&&Fr===0&&E.assert(!!h.errors,"missed opportunity to interact with error."),Fr!==0;function Wr(X){x=X.errorInfo,Qn=X.lastSkippedInfo,Ct=X.incompatibleStack,it=X.overrideNextErrorInfo,lt=X.skipParentCounter,I=X.relatedInfo}function jo(){return{errorInfo:x,lastSkippedInfo:Qn,incompatibleStack:Ct?.slice(),overrideNextErrorInfo:it,skipParentCounter:lt,relatedInfo:I?.slice()}}function go(X,le){if(In&&X.flags&3145728&&le.flags&3145728){let Me=X,Xe=le;if(Me.objectFlags&Xe.objectFlags&32768)return;let Fn=Me.types.length,en=Xe.types.length;Fn*en>1e6&&In.instant(In.Phase.CheckTypes,"traceUnionsOrIntersectionsTooLarge_DepthLimit",{sourceId:X.id,sourceSize:Fn,targetId:le.id,targetSize:en,pos:l?.pos,end:l?.end})}}function oi(){let X=Ct||[];Ct=void 0;let le=Qn;if(Qn=void 0,X.length===1){Ir(...X[0]),le&&So(void 0,...le);return}let Me="",Xe=[];for(;X.length;){let[Fn,...en]=X.pop();switch(Fn.code){case N.Types_of_property_0_are_incompatible.code:{Me.indexOf("new ")===0&&(Me=`(${Me})`);let bn=""+en[0];Me.length===0?Me=`${bn}`:tm(bn,Hl(Fe))?Me=`${Me}.${bn}`:bn[0]==="["&&bn[bn.length-1]==="]"?Me=`${Me}${bn}`:Me=`${Me}[${bn}]`;break}case N.Call_signature_return_types_0_and_1_are_incompatible.code:case N.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:{if(Me.length===0){let bn=Fn;Fn.code===N.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code&&(bn=N.Call_signature_return_types_0_and_1_are_incompatible),Xe.unshift([bn,en[0],en[1]])}else Me=`${Me}()`;break}case N.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code:{Xe.unshift([N.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,en[0],en[1]]);break}case N.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code:{Xe.unshift([N.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,en[0],en[1],en[2]]);break}default:return E.fail(`Unhandled Diagnostic: ${Fn.code}`)}}Me?Ir(Me[Me.length-1]===")"?N.The_types_returned_by_0_are_incompatible_between_these_types:N.The_types_of_0_are_incompatible_between_these_types,Me):Xe.shift();for(let[Fn,...en]of Xe){let bn=Fn.elidedInCompatabilityPyramid;Fn.elidedInCompatabilityPyramid=!1,Ir(Fn,...en),Fn.elidedInCompatabilityPyramid=bn}le&&So(void 0,...le)}function So(X,le,Me){Ct&&oi();let[Xe,Fn]=E0(le,Me),en=le,bn=Xe;if(Jf(le)&&!X0(Me)&&(en=qu(le),bn=D0(en)),(Me.flags&8388608&&!(le.flags&8388608)?Me.objectType.flags:Me.flags)&262144&&Me!==Fu&&Me!==tl){let gt=xa(Me),dr;gt&&(Ui(en,gt)||(dr=Ui(le,gt)))?Ir(N._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2,dr?Xe:bn,Fn,_t(gt)):(x=void 0,Ir(N._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1,Fn,bn))}if(!X)if(s===wa)X=N.Type_0_is_not_comparable_to_type_1;else if(Xe===Fn)X=N.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;else{if(le.flags&128&&Me.flags&1048576){let gt=Hre(le,Me);if(gt){Ir(N.Type_0_is_not_assignable_to_type_1_Did_you_mean_2,bn,Fn,_t(gt));return}}X=N.Type_0_is_not_assignable_to_type_1}Ir(X,bn,Fn)}function Ir(X,...le){E.assert(!!l),Ct&&oi(),!X.elidedInCompatabilityPyramid&&(lt===0?x=Pi(x,X,...le):lt--)}function ls(X,le,Me){return Bi(X)?X.target.readonly&&nD(le)?(Me&&Ir(N.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,_t(X),_t(le)),!1):cf(le):yT(X)&&nD(le)?(Me&&Ir(N.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1,_t(X),_t(le)),!1):Bi(le)?va(X):!0}function $a(X,le){let Me=DN(X.symbol)?_t(X,X.symbol.valueDeclaration):_t(X),Xe=DN(le.symbol)?_t(le,le.symbol.valueDeclaration):_t(le);(nr===X&&Er===le||Lr===X&&Co===le||Mt===X&&Xr===le)&&Ir(N._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,Xe,Me)}function an(X,le,Me,Xe,Fn){let en=!!rw(X),bn=!!rw(le);Me=X.aliasSymbol||en?X:Me,Xe=le.aliasSymbol||bn?le:Xe;let mt=it>0;if(mt&&it--,Me.flags&524288&&Xe.flags&524288){let gt=x;ls(Me,Xe,!0),x!==gt&&(mt=!!x)}if(Me.flags&524288&&Xe.flags&402784188?$a(Me,Xe):Me.symbol&&Me.flags&524288&&k===Me?Ir(N.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead):x=F3(x,le),!Fn&&mt){let gt=jo();So(Fn,Me,Xe);let dr;x&&x!==gt.errorInfo&&(dr={code:x.code,messageText:x.messageText}),Wr(gt),dr&&x&&(x.canonicalHead=dr),Qn=[Me,Xe];return}if(So(Fn,Me,Xe),Me.flags&262144&&Me.symbol?.declarations?.[0]&&!qp(Me)){let gt=HA(Me);if(gt.constraint=or(Xe,Hf(Me,gt)),JN(gt)){let dr=_t(Xe,Me.symbol.declarations[0]);Qa(wi(Me.symbol.declarations[0],N.This_type_parameter_might_need_an_extends_0_constraint,dr))}}}function je(X,le,Me=3,Xe=!1,Fn,en=0){if(X===le)return-1;if(X.flags&524288&&le.flags&402784188)return s===wa&&!(le.flags&131072)&&g_(le,X,s)||g_(X,le,s,Xe?Ir:void 0)?-1:(Xe&&an(X,le,X,le,Fn),0);let bn=HC(X,!1),mt=HC(le,!0);if(bn===mt)return-1;if(s===Ra)return bn.flags!==mt.flags?0:bn.flags&67358815?-1:(go(bn,mt),mr(bn,mt,!1,0,Me));if(bn.flags&262144&&qp(bn)===mt)return-1;if(bn.flags&470302652&&mt.flags&1048576){let gt=mt.types,dr=gt.length===2&&gt[0].flags&98304?gt[1]:gt.length===3&&gt[0].flags&98304&&gt[1].flags&98304?gt[2]:void 0;if(dr&&!(dr.flags&98304)&&(mt=HC(dr,!0),bn===mt))return-1}if(s===wa&&!(mt.flags&131072)&&g_(mt,bn,s)||g_(bn,mt,s,Xe?Ir:void 0))return-1;if(bn.flags&469499904||mt.flags&469499904){if(!(en&2)&&Lu(bn)&&dt(bn)&8192&&Xs(bn,mt,Xe))return Xe&&So(Fn,bn,le.aliasSymbol?le:mt),0;if((s!==wa||Dn(bn))&&!(en&2)&&bn.flags&405405628&&bn!==k&&mt.flags&2621440&&iw(mt)&&(Ba(bn).length>0||ow(bn))&&!zre(bn,mt,!1)){if(Xe){let Nt=_t(X.aliasSymbol?X:bn),Ot=_t(le.aliasSymbol?le:mt),qr=ro(bn,0),Yo=ro(bn,1);qr.length>0&&je($i(qr[0]),mt,1,!1)||Yo.length>0&&je($i(Yo[0]),mt,1,!1)?Ir(N.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,Nt,Ot):Ir(N.Type_0_has_no_properties_in_common_with_type_1,Nt,Ot)}return 0}go(bn,mt);let mi=bn.flags&1048576&&bn.types.length<4&&!(mt.flags&1048576)||mt.flags&1048576&&mt.types.length<4&&!(bn.flags&469499904)?zr(bn,mt,Xe,en):mr(bn,mt,Xe,en,Me);if(mi)return mi}return Xe&&an(X,le,bn,mt,Fn),0}function Dt(X,le,Me,Xe){let Fn=X.types;if(X.flags&1048576&&vl(Fn,le))return-1;let en=Fn.length;for(let bn=0;bn<en;bn++){let mt=je(Fn[bn],le,1,Me&&bn===en-1,void 0,Xe);if(mt)return mt}return 0}function ir(X,le){return X.flags&1048576&&le.flags&1048576&&!(X.types[0].flags&32768)&&le.types[0].flags&32768?h_(le,-32769):le}function jt(X,le,Me,Xe){let Fn=-1,en=X.types,bn=ir(X,le);for(let mt=0;mt<en.length;mt++){let gt=en[mt];if(bn.flags&1048576&&en.length>=bn.types.length&&en.length%bn.types.length===0){let xr=je(gt,bn.types[mt%bn.types.length],3,!1,void 0,Xe);if(xr){Fn&=xr;continue}}let dr=je(gt,le,1,Me,void 0,Xe);if(!dr)return 0;Fn&=dr}return Fn}function Si(X,le,Me,Xe){let Fn=le.types;if(le.flags&1048576){if(vl(Fn,X))return-1;if(s!==wa&&dt(le)&32768&&!(X.flags&1024)&&(X.flags&2432||(s===Dl||s===Qs)&&X.flags&256)){let bn=X===X.regularType?X.freshType:X.regularType,mt=X.flags&128?Er:X.flags&256?Co:X.flags&2048?Xr:X.flags&4096?xl:void 0;return mt&&vl(Fn,mt)||bn&&vl(Fn,bn)?-1:0}let en=K3(le,X);if(en){let bn=je(X,en,2,!1,void 0,Xe);if(bn)return bn}}for(let en of Fn){let bn=je(X,en,2,!1,void 0,Xe);if(bn)return bn}if(Me){let en=Oa(X,le,je);en&&je(X,en,2,!0,void 0,Xe)}return 0}function zr(X,le,Me,Xe){if(X.flags&1048576){if(le.flags&1048576){let Fn=X.origin;if(Fn&&Fn.flags&2097152&&le.aliasSymbol&&Gr(Fn.types,le))return-1;let en=le.origin;if(en&&en.flags&1048576&&X.aliasSymbol&&Gr(en.types,X))return-1}return s===wa?Dt(X,le,Me&&!(X.flags&402784188),Xe):jt(X,le,Me&&!(X.flags&402784188),Xe)}if(le.flags&1048576)return Si(UC(X),le,Me&&!(X.flags&402784188)&&!(le.flags&402784188),Xe);if(le.flags&2097152)return fa(X,le,Me,2);if(s===wa&&le.flags&402784188){let Fn=Za(X.types,en=>en.flags&465829888?xa(en)||Mr:en);if(Fn!==X.types){if(X=Mi(Fn),X.flags&131072)return 0;if(!(X.flags&2097152))return je(X,le,1,!1)||je(le,X,1,!1)}}return Dt(X,le,!1,1)}function fa(X,le,Me,Xe){let Fn=-1,en=le.types;for(let bn of en){let mt=je(X,bn,2,Me,void 0,Xe);if(!mt)return 0;Fn&=mt}return Fn}function yo(X,le){return X.valueDeclaration&&le.valueDeclaration&&X.valueDeclaration.parent===le.valueDeclaration}function Yi(X,...le){Ir(X,...le),lt++}function Xs(X,le,Me){if(!y_(le)||!$e&&dt(le)&4096||(s===sc||s===wa)&&(dT(k,le)||Yp(le)))return!1;let Xe=le,Fn;le.flags&1048576&&(Xe=z3(X,le,je)||Yre(le),Fn=Xe.flags&1048576?Xe.types:[Xe]);for(let en of Ba(X))if(yo(en,X.symbol)){if(!aw(Xe,en.name,!1)){if(Me){let bn=ka(Xe,y_);if(!l)return E.fail();let mt=X.symbol?.declarations&&ha(X.symbol.declarations),gt;if(en.valueDeclaration&&er(en.valueDeclaration,dr=>dr===mt)&&$t(mt)===$t(l)){let xr=en.valueDeclaration.name;l=xr,Sn(xr)&&(gt=Q3(xr,bn))}gt!==void 0?Yi(N.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2,Qi(en),_t(bn),gt):Yi(N.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,Qi(en),_t(bn))}return!0}if(Fn&&!je(Xt(en),Ll(Fn,en.name),3,Me))return Me&&Al(N.Types_of_property_0_are_incompatible,Qi(en)),!0}return!1}function Ll(X,le){return vt(Bl(X,(Xe,Fn)=>{Fn=Ha(Fn);let en=Fn.flags&3145728?Go(Fn,le):jf(Fn,le),bn=en&&Xt(en)||vp(Fn,le)?.type||fr;return $r(Xe,bn)},void 0)||Re)}function zu(X,le){if(!le||X.length===0)return X;let Me;for(let Xe=0;Xe<X.length;Xe++)le.has(X[Xe].name)?Me||(Me=X.slice(0,Xe)):Me&&Me.push(X[Xe]);return Me||X}function Gf(X,le,Me){if(!(X.flags&524288&&le.flags&524288))return 0;let Xe=zu(uf(X),Me),Fn=zu(uf(le),Me);if(Xe.length!==Fn.length)return 0;let en=-1;for(let bn of Xe){let mt=jf(le,bn.name);if(!mt)return 0;let gt=IP(bn,mt,je);if(!gt)return 0;en&=gt}return en}function Al(X,...le){it++,Qn=void 0,(Ct||(Ct=[])).push([X,...le])}function b_(X,le){let Me=Bw(X,0),Xe=Bw(X,1),Fn=uf(X);return Fn&&(Me?.length||Xe?.length)&&!Fn.length?!!(ro(le,0).length&&Me.length||ro(le,1).length&&Xe.length):!0}function Qa(X){E.assert(!!x),I?I.push(X):I=[X]}function sk(X,le,Me,Xe){let Fn=!1,en=oo(nJ(X,le,Xe,!1));if((!d||d.code!==N.Class_0_incorrectly_implements_interface_1.code&&d.code!==N.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code)&&(Fn=!0),en.length===1){let bn=Qi(Me,void 0,0,20);Ir(N.Property_0_is_missing_in_type_1_but_required_in_type_2,bn,...E0(X,le)),gr(Me.declarations)&&Qa(wi(Me.declarations[0],N._0_is_declared_here,bn)),Fn&&x&&it++}else ls(X,le,!1)&&(en.length>5?Ir(N.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,_t(X),_t(le),Yn(en.slice(0,4),bn=>Qi(bn)).join(", "),en.length-4):Ir(N.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,_t(X),_t(le),Yn(en,bn=>Qi(bn)).join(", ")),Fn&&x&&it++)}function ve(X,le,Me,Xe,Fn){let en=G&&!!(oa(le)&48),bn=su(Ze(le),!1,en),mt=Me(X);return je(mt,bn,3,Xe,void 0,Fn)}function rn(X,le,Me,Xe,Fn,en,bn,mt){let gt=Cu(Me),dr=Cu(Xe);if(gt&2||dr&2){if(Me.valueDeclaration!==Xe.valueDeclaration)return en&&(gt&2&&dr&2?Ir(N.Types_have_separate_declarations_of_a_private_property_0,Qi(Xe)):Ir(N.Property_0_is_private_in_type_1_but_not_in_type_2,Qi(Xe),_t(gt&2?X:le),_t(gt&2?le:X))),0}else if(dr&4){if(!iie(Me,Xe))return en&&Ir(N.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,Qi(Xe),_t(EC(Me)||X),_t(EC(Xe)||le)),0}else if(gt&4)return en&&Ir(N.Property_0_is_protected_in_type_1_but_public_in_type_2,Qi(Xe),_t(X),_t(le)),0;if(s===Qs&&jm(Me)&&!jm(Xe))return 0;let xr=ve(Me,Xe,Fn,en,bn);return xr?!mt&&Me.flags&16777216&&Xe.flags&106500&&!(Xe.flags&16777216)?(en&&Ir(N.Property_0_is_optional_in_type_1_but_required_in_type_2,Qi(Xe),_t(X),_t(le)),0):xr:(en&&Al(N.Types_of_property_0_are_incompatible,Qi(Xe)),0)}function O(X,le,Me,Xe,Fn,en){if(s===Ra)return Gf(X,le,Xe);let bn=-1;if(Bi(le)){if(cf(X)){if(!le.target.readonly&&(yT(X)||Bi(X)&&X.target.readonly))return 0;let mi=zp(X),Nt=zp(le),Ot=Bi(X)?X.target.combinedFlags&4:4,qr=le.target.combinedFlags&4,Yo=Bi(X)?X.target.minLength:0,Bs=le.target.minLength;if(!Ot&&mi<Bs)return Me&&Ir(N.Source_has_0_element_s_but_target_requires_1,mi,Bs),0;if(!qr&&Nt<Yo)return Me&&Ir(N.Source_has_0_element_s_but_target_allows_only_1,Yo,Nt),0;if(!qr&&(Ot||Nt<mi))return Me&&(Yo<Bs?Ir(N.Target_requires_0_element_s_but_source_may_have_fewer,Bs):Ir(N.Target_allows_only_0_element_s_but_source_may_have_more,Nt)),0;let fc=Qo(X),C_=Qo(le),hT=tie(le.target,11),Oy=qC(le.target,11),D_=le.target.hasRestElement,iD=!!Xe;for(let Ld=0;Ld<mi;Ld++){let E_=Bi(X)?X.target.elementFlags[Ld]:4,tW=mi-1-Ld,TT=D_&&Ld>=hT?Nt-1-Math.min(tW,Oy):Ld,ST=le.target.elementFlags[TT];if(ST&8&&!(E_&8))return Me&&Ir(N.Source_provides_no_match_for_variadic_element_at_position_0_in_target,TT),0;if(E_&8&&!(ST&12))return Me&&Ir(N.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target,Ld,TT),0;if(ST&1&&!(E_&1))return Me&&Ir(N.Source_provides_no_match_for_required_element_at_position_0_in_target,TT),0;if(iD&&((E_&12||ST&12)&&(iD=!1),iD&&Xe?.has(""+Ld)))continue;let lae=of(fc[Ld],!!(E_&ST&2)),rW=C_[TT],uae=E_&8&&ST&4?Na(rW):of(rW,!!(ST&2)),iW=je(lae,uae,3,Me,void 0,en);if(!iW)return Me&&(Nt>1||mi>1)&&(D_&&Ld>=hT&&tW>=Oy&&hT!==mi-Oy-1?Al(N.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target,hT,mi-Oy-1,TT):Al(N.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target,Ld,TT)),0;bn&=iW}return bn}if(le.target.combinedFlags&12)return 0}let mt=(s===Dl||s===Qs)&&!Lu(X)&&!fN(X)&&!Bi(X),gt=uw(X,le,mt,!1);if(gt)return Me&&b_(X,le)&&sk(X,le,gt,mt),0;if(Lu(le)){for(let mi of zu(Ba(X),Xe))if(!jf(le,mi.name)&&!(Xt(mi).flags&32768))return Me&&Ir(N.Property_0_does_not_exist_on_type_1,Qi(mi),_t(le)),0}let dr=Ba(le),xr=Bi(X)&&Bi(le);for(let mi of zu(dr,Xe)){let Nt=mi.name;if(!(mi.flags&4194304)&&(!xr||Ag(Nt)||Nt==="length")&&(!Fn||mi.flags&16777216)){let Ot=qo(X,Nt);if(Ot&&Ot!==mi){let qr=rn(X,le,Ot,mi,Ze,Me,en,s===wa);if(!qr)return 0;bn&=qr}}}return bn}function U(X,le){let Me=za(X),Xe=za(le);if(Me.length!==Xe.length)return 0;for(let Fn of Xe){let en=Iu(X,Fn.keyType);if(!(en&&je(en.type,Fn.type,3)&&en.isReadonly===Fn.isReadonly))return 0}return-1}function xe(X,le,Me,Xe,Fn){if(s===Ra)return U(X,le);let en=za(le),bn=Pn(en,gt=>gt.keyType===Er),mt=-1;for(let gt of en){let dr=s!==Qs&&!Me&&bn&&gt.type.flags&1?-1:Rs(X)&&bn?je(He(X),gt.type,3,Xe):mn(X,gt,Xe,Fn);if(!dr)return 0;mt&=dr}return mt}function He(X){return X.templateType||(X.templateType=X.declaration.type?or(su(rr(X.declaration.type),!0,!!(Un(X)&4)),X.mapper):Gn)}function mn(X,le,Me,Xe){let Fn=kp(X,le.keyType);return Fn?fn(Fn,le,Me,Xe):!(Xe&1)&&(s!==Qs||dt(X)&8192)&&UN(X)?Pt(X,le,Me,Xe):(Me&&Ir(N.Index_signature_for_type_0_is_missing_in_type_1,_t(le.keyType),_t(X)),0)}function fn(X,le,Me,Xe){let Fn=je(X.type,le.type,3,Me,void 0,Xe);return!Fn&&Me&&(X.keyType===le.keyType?Ir(N._0_index_signatures_are_incompatible,_t(X.keyType)):Ir(N._0_and_1_index_signatures_are_incompatible,_t(X.keyType),_t(le.keyType))),Fn}function Wn(X,le,Me){if(Me||!(Cu(X)&6)){let Xe=at(sr(X)).nameType;if(!Xe){let Fn=ci(X.valueDeclaration);Xe=X.name==="default"?Au("default"):Fn&&Ay(Fn)||(Eh(X)?void 0:Au(Ws(X)))}if(Xe&&Xe.flags&le)return Xe}return Lt}function Pt(X,le,Me,Xe){let Fn=-1,en=le.keyType,bn=X.flags&2097152?q0(X):uf(X);for(let mt of bn)if(Np(Wn(mt,384),en)){let gt=Ze(mt),dr=Ae||gt.flags&32768||en===Ht||!(mt.flags&16777216)?gt:Hu(gt,524288),xr=je(dr,le.type,3,Me,void 0,Xe);if(!xr)return Me&&Ir(N.Property_0_is_incompatible_with_index_signature,Qi(mt)),0;Fn&=xr}for(let mt of za(X))if(Np(mt.keyType,en)){let gt=fn(mt,le,Me,Xe);if(!gt)return 0;Fn&=gt}return Fn}function ur(X,le,Me,Xe){let Fn=jo(),en=st(X,le,Me,Xe,Fn);if(s!==Ra){if(!en&&(X.flags&2097152||X.flags&262144&&le.flags&1048576)){let bn=nie(X.flags&2097152?X.types:[X],!!(le.flags&1048576));bn&&Vc(bn,mt=>mt!==X)&&(en=je(bn,le,1,!1,void 0,Xe))}en&&!(Xe&2)&&le.flags&2097152&&!f0(le)&&X.flags&2621440?(en&=O(X,le,Me,void 0,!1,0),en&&Lu(X)&&dt(X)&8192&&(en&=xe(X,le,!1,Me,0))):en&&tJ(le)&&!cf(le)&&X.flags&2097152&&Ha(X).flags&3670016&&!Pn(X.types,bn=>bn===le||!!(dt(bn)&262144))&&(en&=O(X,le,Me,void 0,!0,Xe))}return en&&Wr(Fn),en}function Tr(X,le){let Me=-1,Xe=X.types;for(let Fn of Xe){let en=Si(Fn,le,!1,0);if(!en)return 0;Me&=en}return Me}function ti(X,le,Me){if(s===wa||(s===Ra?Un(X)===Un(le):mT(X)<=mT(le))){let Fn,en=uu(le),bn=or(uu(X),mT(X)<0?nf:xd);if(Fn=je(en,bn,3,Me)){let mt=ws([il(X)],[il(le)]);if(or(Ou(X),mt)===or(Ou(le),mt))return Fn&je(or(He(X),mt),He(le),3,Me)}}return 0}function Do(X,le,Me){let Xe=ro(X,Me),Fn=ro(le,Me);if(Xe.length!==Fn.length)return 0;let en=-1;for(let bn=0;bn<Xe.length;bn++){let mt=lN(Xe[bn],Fn[bn],!1,!1,!1,je);if(!mt)return 0;en&=mt}return en}function ya(X,le){return X.parameters.length===0&&le.parameters.length===0?(Me,Xe)=>Al(N.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1,_t(Me),_t(Xe)):(Me,Xe)=>Al(N.Call_signature_return_types_0_and_1_are_incompatible,_t(Me),_t(Xe))}function Tn(X,le,Me,Xe,Fn,en){let bn=s===Dl?16:s===Qs?24:0;return d0(Me?xC(X):X,Me?xC(le):le,bn,Xe,Ir,en,mt,xd);function mt(gt,dr,xr){return je(gt,dr,3,xr,void 0,Fn)}}function _i(X,le,Me,Xe,Fn){if(s===Ra)return Do(X,le,Me);if(le===Cl||X===Cl)return-1;let en=!1,bn=!1,mt=ro(X,en&&Me===1?0:Me),gt=ro(le,bn&&Me===1?0:Me);Me===1&&mt.length&&gt.length&&console.debug("todo - constructor");let dr=-1,xr=ya,mi=dt(X),Nt=dt(le);if(mi&64&&Nt&64&&X.symbol===le.symbol||mi&4&&Nt&4&&X.target===le.target){E.assertEqual(mt.length,gt.length);for(let Ot=0;Ot<gt.length;Ot++){let qr=Tn(mt[Ot],gt[Ot],!0,Xe,Fn,xr(mt[Ot],gt[Ot]));if(!qr)return 0;dr&=qr}}else if(mt.length===1&&gt.length===1){let Ot=s===wa,qr=Uo(mt),Yo=Uo(gt);dr=Tn(qr,Yo,Ot,Xe,Fn,xr(qr,Yo))}else e:for(let Ot of gt){let qr=jo(),Yo=Xe;for(let Bs of mt){let fc=Tn(Bs,Ot,!0,Yo,Fn,xr(Bs,Ot));if(fc){dr&=fc,Wr(qr);continue e}Yo=!1}return Yo&&Ir(N.Type_0_provides_no_match_for_the_signature_1,_t(X),d_(Ot,void 0,void 0,Me)),0}return dr}function nt(X,le){let Me=Ba(X),Xe=V3(Me,le);if(!Xe)return 0;let Fn=1;for(let xr of Xe)if(Fn*=aie(Ze(xr)),Fn>25)return In?.instant(In.Phase.CheckTypes,"typeRelatedToDiscriminatedType_DepthLimit",{sourceId:X.id,targetId:le.id,numCombinations:Fn}),0;let en=new Array(Xe.length),bn=new Set;for(let xr=0;xr<Xe.length;xr++){let mi=Xe[xr],Nt=Ze(mi);en[xr]=Nt.flags&1048576?Nt.types:[Nt],bn.add(mi.name)}let mt=ZK(en),gt=[];for(let xr of mt){let mi=!1;e:for(let Nt of le.types){for(let Ot=0;Ot<Xe.length;Ot++){let qr=Xe[Ot],Yo=qo(Nt,qr.name);if(!Yo)continue e;if(qr===Yo)continue;if(!rn(X,le,qr,Yo,fc=>xr[Ot],!1,0,G||s===wa))continue e}fu(gt,Nt,lg),mi=!0}if(!mi)return 0}let dr=-1;for(let xr of gt)if(dr&=O(X,xr,!1,bn,!1,0),dr&&(dr&=_i(X,xr,0,!1,0),dr&&(dr&=_i(X,xr,1,!1,0),dr&&!(Bi(X)&&Bi(xr))&&(dr&=xe(X,xr,!1,!1,0)))),!dr)return dr;return dr}function Kt(X=Re,le=Re,Me=Re,Xe,Fn){if(X.length!==le.length&&s===Ra)return 0;let en=X.length<=le.length?X.length:le.length,bn=-1;for(let mt=0;mt<en;mt++){let gt=mt<Me.length?Me[mt]:1,dr=gt&7;if(dr!==4){let xr=X[mt],mi=le[mt],Nt=-1;if(gt&8?Nt=s===Ra?je(xr,mi,3,!1):cN(xr,mi):dr===1?Nt=je(xr,mi,3,Xe,void 0,Fn):dr===2?Nt=je(mi,xr,3,Xe,void 0,Fn):dr===3?(Nt=je(mi,xr,3,!1),Nt||(Nt=je(xr,mi,3,Xe,void 0,Fn))):(Nt=je(xr,mi,3,Xe,void 0,Fn),Nt&&(Nt&=je(mi,xr,3,Xe,void 0,Fn))),!Nt)return 0;bn&=Nt}}return bn}function Ur(X,le){let Me=Ha(VC(le)),Xe=[];return uie(Me,384,!1,Fn=>void Xe.push(or(X,oN(le.mapper,il(le),Fn)))),vt(Xe)}function st(X,le,Me,Xe,Fn){let en,bn,mt=!1,gt=X.flags,dr=le.flags;if(s===Ra){if(gt&3145728){let Nt=Tr(X,le);return Nt&&(Nt&=Tr(le,X)),Nt}if(gt&4194304)return je(X.type,le.type,3,!1);if(gt&8388608&&(en=je(X.objectType,le.objectType,3,!1))&&(en&=je(X.indexType,le.indexType,3,!1))||gt&16777216&&X.root.isDistributive===le.root.isDistributive&&(en=je(X.checkType,le.checkType,3,!1))&&(en&=je(X.extendsType,le.extendsType,3,!1))&&(en&=je(Ny(X),Ny(le),3,!1))&&(en&=je(ky(X),ky(le),3,!1))||gt&33554432&&(en=je(X.baseType,le.baseType,3,!1))&&(en&=je(X.constraint,le.constraint,3,!1)))return en;if(!(gt&524288))return 0}else if(gt&3145728||dr&3145728){if(en=zr(X,le,Me,Xe))return en;if(!(gt&465829888||gt&524288&&dr&1048576||gt&2097152&&dr&467402752))return 0}if(gt&17301504&&X.aliasSymbol&&X.aliasTypeArguments&&X.aliasSymbol===le.aliasSymbol&&!(WN(X)||WN(le))){let Nt=$J(X.aliasSymbol);if(Nt===Re)return 1;let Ot=at(X.aliasSymbol).typeParameters,qr=lf(Ot),Yo=Vm(X.aliasTypeArguments,Ot,qr,wr(X.aliasSymbol.valueDeclaration)),Bs=Vm(le.aliasTypeArguments,Ot,qr,wr(X.aliasSymbol.valueDeclaration)),fc=mi(Yo,Bs,Nt,Xe);if(fc!==void 0)return fc}if(rJ(X)&&!X.target.readonly&&(en=je(Qo(X)[0],le,1))||rJ(le)&&(le.target.readonly||nD(xa(X)||X))&&(en=je(X,Qo(le)[0],2)))return en;if(dr&262144){if(dt(X)&32&&!X.declaration.nameType&&je(ju(le),uu(X),3)&&!(Un(X)&4)){let Nt=He(X),Ot=ou(le,il(X));if(en=je(Nt,Ot,3,Me))return en}if(s===wa&&gt&262144){let Nt=dc(X);if(Nt)for(;Nt&&Id(Nt,Ot=>!!(Ot.flags&262144));){if(en=je(Nt,le,1,!1))return en;Nt=dc(Nt)}return 0}}else if(dr&4194304){let Nt=le.type;if(gt&4194304&&(en=je(Nt,X.type,3,!1)))return en;if(Bi(Nt)){if(en=je(X,iJ(Nt),2,Me))return en}else{let Ot=Z0(Nt);if(Ot){if(je(X,ju(Ot,le.indexFlags|4),2,Me)===-1)return-1}else if(Rs(Nt)){let qr=Ou(Nt),Yo=uu(Nt),Bs;if(qr&&lie(Nt)){let fc=Ur(qr,Nt);Bs=vt([fc,qr])}else Bs=qr||Yo;if(je(X,Bs,2,Me)===-1)return-1}}}else if(dr&8388608){if(gt&8388608){if((en=je(X.objectType,le.objectType,3,Me))&&(en&=je(X.indexType,le.indexType,3,Me)),en)return en;Me&&(bn=x)}if(s===sc||s===wa){let Nt=le.objectType,Ot=le.indexType,qr=xa(Nt)||Nt,Yo=xa(Ot)||Ot;if(!f0(qr)&&!T_(Yo)){let Bs=4|(qr!==Nt?2:0),fc=fy(qr,Yo,Bs);if(fc){if(Me&&bn&&Wr(Fn),en=je(X,fc,2,Me,void 0,Xe))return en;Me&&bn&&x&&(x=xr([bn])<=xr([x])?bn:x)}}}Me&&(bn=void 0)}else if(Rs(le)&&s!==Ra){let Nt=!!le.declaration.nameType,Ot=He(le),qr=Un(le);if(!(qr&8)){if(!Nt&&Ot.flags&8388608&&Ot.objectType===X&&Ot.indexType===il(le))return-1;if(!Rs(X)){let Yo=Nt?Ou(le):uu(le),Bs=ju(X,2),fc=qr&4,C_=fc?oJ(Yo,Bs):void 0;if(fc?!(C_.flags&131072):je(Yo,Bs,3)){let hT=He(le),Oy=il(le),D_=h_(hT,-98305);if(!Nt&&D_.flags&8388608&&D_.indexType===Oy){if(en=je(X,D_.objectType,2,Me))return en}else{let iD=Nt?C_||Yo:C_?Mi([C_,Oy]):Oy,Ld=ou(X,iD);if(en=je(Ld,hT,3,Me))return en}}bn=x,Wr(Fn)}}}else dr&16777216?console.debug("todo - targetFlags Conditional"):le.flags&268435456&&(X.flags&268435456||console.debug("todo - targetFlags StringMapping"));if(gt&8650752){if(!(gt&8388608&&dr&8388608)){let Nt=qp(X)||Mr;if(en=je(Nt,le,1,!1,void 0,Xe))return en;if(en=je(Xm(Nt,X),le,1,Me&&Nt!==Mr&&!(dr&gt&262144),void 0,Xe))return en;if(fw(X)){let Ot=qp(X.indexType);if(Ot&&(en=je(ou(X.objectType,Ot),le,1,Me)))return en}}}else if(gt&4194304){let Nt=$A(X.type,X.indexFlags)&&dt(X.type)&32;if(en=je(yr,le,1,Me&&!Nt))return en;if(Nt){let Ot=X.type,Yo=Ou(Ot)||uu(Ot);if(en=je(Yo,le,1,Me))return en}}else if(gt&134217728&&!(dr&524288)){if(!(dr&134217728)){let Nt=xa(X);if(Nt&&Nt!==X&&(en=je(Nt,le,1,Me)))return en}}else if(gt&268435456)if(dr&268435456){if(X.symbol!==le.symbol)return 0;if(en=je(X.type,le.type,3,Me))return en}else{let Nt=xa(X);if(Nt&&(en=je(Nt,le,1,Me)))return en}else if(gt&16777216)console.debug("todo - sourceFlags Conditional");else{if(s!==Dl&&s!==Qs&&oie(le)&&Yp(X))return-1;if(Rs(le))return Rs(X)&&(en=ti(X,le,Me))?en:0;let Nt=!!(gt&402784188);if(s!==Ra)X=Ha(X),gt=X.flags;else if(Rs(X))return 0;if(dt(X)&4&&dt(le)&4&&X.target===le.target&&!Bi(X)&&!(WN(X)||WN(le))){if(fN(X))return-1;let Ot=pw(X.target);if(Ot===Re)return 1;let qr=mi(Qo(X),Qo(le),Ot,Xe);if(qr!==void 0)return qr}else{if(yT(le)?Vc(X,cf):va(le)&&Vc(X,Ot=>Bi(Ot)&&!Ot.target.readonly))return s!==Ra?je(Nd(X,Ht)||wt,Nd(le,Ht)||wt,3,Me):0;if(Vp(X)&&Bi(le)&&!Vp(le)){let Ot=jp(X);if(Ot!==X)return je(Ot,le,1,Me)}else if((s===Dl||s===Qs)&&Yp(le)&&dt(le)&8192&&!Yp(X))return 0}if(gt&2621440&&dr&524288){let Ot=j3(X,le),qr=!Ot&&Me&&x===Fn.errorInfo&&!Nt;if(en=O(X,le,qr,void 0,!1,Xe),en&&(en&=_i(X,le,0,qr,Xe),en&&(en&=_i(X,le,1,qr,Xe),en&&(en&=xe(X,le,Nt,qr,Xe)))),mt&&en)x=bn||x||Fn.errorInfo;else if(en)return en;if(Ot)return-1}if(gt&2621440&&dr&1048576){let Ot=h_(le,36175872);if(Ot.flags&1048576){let qr=nt(X,Ot);if(qr)return qr}}}return 0;function xr(Nt){return Nt?Bl(Nt,(Ot,qr)=>Ot+1+xr(qr.next),0):0}function mi(Nt,Ot,qr,Yo){if(en=Kt(Nt,Ot,qr,Me,Yo))return en;if(Pn(qr,fc=>!!(fc&24))){bn=void 0,Wr(Fn);return}let Bs=Ot&&sie(Ot,qr);if(mt=!Bs,qr!==Re&&!Bs){if(mt&&!(Me&&Pn(qr,fc=>(fc&7)===0)))return 0;bn=x,Wr(Fn)}}}function mr(X,le,Me,Xe,Fn){if(Nn)return 0;let en=KN(X,le,Xe,s,!1),bn=s.get(en);if(bn!==void 0&&!(Me&&bn&2&&!(bn&96))){if(F){let Ot=bn&24;Ot&8&&or(X,nf),Ot&16&&or(X,xd)}if(Me&&bn&96){let Ot=bn&32?N.Excessive_complexity_comparing_types_0_and_1:N.Excessive_stack_depth_comparing_types_0_and_1;Ir(Ot,_t(X),_t(le)),it++}return bn&1?-1:0}if(Rt<=0)return Nn=!0,0;if(!B)B=[],z=new Set,re=[],pe=[];else{if(z.has(en))return 3;let Ot=en.startsWith("*")?KN(X,le,Xe,s,!0):void 0;if(Ot&&z.has(Ot))return 3;if(on===100||pn===100)return Nn=!0,0}let mt=_e;B[_e]=en,z.add(en),_e++;let gt=Kn;Fn&1&&(re[on]=X,on++,!(Kn&1)&&fT(X,re,on)&&(Kn|=1)),Fn&2&&(pe[pn]=le,pn++,!(Kn&2)&&fT(le,pe,pn)&&(Kn|=2));let dr,xr=0;F&&(dr=F,F=Ot=>(xr|=Ot?16:8,dr(Ot)));let mi;return Kn===3?(In?.instant(In.Phase.CheckTypes,"recursiveTypeRelatedTo_DepthLimit",{sourceId:X.id,sourceIdStack:re.map(Ot=>Ot.id),targetId:le.id,targetIdStack:pe.map(Ot=>Ot.id),depth:on,targetDepth:pn}),mi=3):(In?.push(In.Phase.CheckTypes,"structuredTypeRelatedTo",{sourceId:X.id,targetId:le.id}),mi=ur(X,le,Me,Xe),In?.pop()),F&&(F=dr),Fn&1&&on--,Fn&2&&pn--,Kn=gt,mi?(mi===-1||on===0&&pn===0)&&(mi===-1||mi===3?Nt(!0):Nt(!1)):(s.set(en,2|xr),Rt--,Nt(!1)),mi;function Nt(Ot){for(let qr=mt;qr<_e;qr++)z.delete(B[qr]),Ot&&(s.set(B[qr],1|xr),Rt--);_e=mt}}}function HC(t,o){for(;;){let s=Ym(t)?t.regularType:Vp(t)?die(t,o):dt(t)&4?t.node?py(t.target,Qo(t)):rw(t)||t:t.flags&3145728?Zre(t,o):t.flags&33554432?o?t.baseType:gw(t):t.flags&25165824?du(t,o):t;if(s===t)return s;t=s}}function die(t,o){let s=vy(t),l=Za(s,d=>d.flags&25165824?du(d,o):d);return s!==l?mw(t.target,l):t}function vy(t){let o=Qo(t),s=zp(t);return o.length===s?o:o.slice(0,s)}function mw(t,o){if(!(t.combinedFlags&14))return py(t,o);if(t.combinedFlags&8){let z=zc(o,(re,pe)=>!!(t.elementFlags[pe]&8&&re.flags&1179648));if(z>=0)return OJ(Yn(o,(re,pe)=>t.elementFlags[pe]&8?re:Mr))?Fa(o[z],re=>mw(t,n5(o,z,re))):Gn}let s=[],l=[],d=[],p=-1,h=-1,x=-1;for(let z=0;z<o.length;z++){let re=o[z],pe=t.elementFlags[z];if(pe&8)if(re.flags&1)B(re,4,t.labeledElementDeclarations?.[z]);else if(re.flags&58982400||Rs(re))B(re,8,t.labeledElementDeclarations?.[z]);else if(Bi(re)){let _e=vy(re);if(_e.length+s.length>=1e4)return hn(v,hm(v)?N.Type_produces_a_tuple_type_that_is_too_large_to_represent:N.Expression_produces_a_tuple_type_that_is_too_large_to_represent),Gn;Bn(_e,(on,pn)=>B(on,re.target.elementFlags[pn],re.target.labeledElementDeclarations?.[pn]))}else B(rg(re)&&Nd(re,Ht)||Gn,4,t.labeledElementDeclarations?.[z]);else B(re,pe,t.labeledElementDeclarations?.[z])}for(let z=0;z<p;z++)l[z]&2&&(l[z]=1);h>=0&&h<x&&(s[h]=vt(Za(s.slice(h,x+1),(z,re)=>l[h+re]&8?ou(z,Ht):z)),s.splice(h+1,x-h),l.splice(h+1,x-h),d.splice(h+1,x-h));let I=Fw(l,t.readonly,d);return I===As?Bo:l.length?py(I,s):I;function B(z,re,pe){re&1&&(p=l.length),re&4&&h<0&&(h=l.length),re&6&&(x=l.length),s.push(re&2?su(z,!0):z),l.push(re),d.push(pe)}}function fie(t,o,s){if(o.flags&1048576){let l=Yn(o.types,d=>du(ou(t,d),s));return s?Mi(l):vt(l)}}function pie(t,o){let s=o?"simplifiedForWriting":"simplifiedForReading";if(t[s])return t[s]===_a?t:t[s];t[s]=_a;let l=du(t.objectType,o),d=du(t.indexType,o),p=fie(l,d,o);if(p)return t[s]=p;if(!(d.flags&465829888)){let h=X6(l,d,o);if(h)return t[s]=h}if(Vp(l)&&d.flags&2344){let h=GC(l,d.flags&8?0:l.target.fixedLength,0,o);if(h)return t[s]=h}return Rs(l)&&GA(l)!==2?t[s]=Fa(nw(l,t.indexType),h=>du(h,o)):t[s]=t}function sJ(t,o){return!!(vt([oJ(t,o),Lt]).flags&131072)}function mie(t,o){let s=t.checkType,l=t.extendsType,d=Ny(t),p=ky(t);if(p.flags&131072&&sf(d)===sf(s)){if(s.flags&1||Ui(gy(s),gy(l)))return du(d,o);if(sJ(s,l))return Lt}else if(d.flags&131072&&sf(p)===sf(s)){if(!(s.flags&1)&&Ui(gy(s),gy(l)))return Lt;if(s.flags&1||sJ(s,l))return du(p,o)}return t}function du(t,o){return t.flags&8388608?pie(t,o):t.flags&16777216?mie(t,o):t}function gw(t){return pT(t)?t.baseType:Mi([t.constraint,t.baseType])}function KN(t,o,s,l,d){if(l===Ra&&t.id>o.id){let h=t;t=o,o=h}let p=s?":"+s:"";return`${t.id},${o.id}${p}`}function Ui(t,o){return Vu(t,o,sc)}function Os(t,o,s){return t.flags&o?!0:s&&t.flags&114691?!1:!!(o&2344)&&Ui(t,Co)||!!(o&2344)&&Ui(t,Xr)||!!(o&402653316)&&Ui(t,Er)||!!(o&12288)&&Ui(t,xl)||!!(o&131072)&&Ui(t,Lt)||!!(o&32768)&&Ui(t,fr)||!!(o&67108864)&&Ui(t,yn)}function cJ(t){let o=A3(t),s=o.parent;return s.kind===281&&s.expression===o&&s.parent.kind===269&&s.parent.operatorToken.kind===74&&s.parent.left===s&&!Vd(s.parent)&&Os(cs(s.argumentExpression),2344)}function cs(t){let o=uJ(t);if(o)return o;if(t.flags&268435456&&q){let d=q[ys(t)];if(d)return d}let s=ie,l=ni(t,64);if(ie!==s){let d=q||(q=[]);d[ys(t)]=l,iS(t,t.flags|268435456)}return l}function gie(t){return!1}function yie(t){let o=ni(t.expression),s=VS(o,t.expression),l=lJ(o);return l&&HS(l,t,s!==o)}function lJ(t){let o=Up(t);if(o&&!o.typeParameters)return $i(o)}function uJ(t){if(xm(t)){let s=mS(t);return rr(s)}let o=$o(t,!0);if(xm(o)){let s=mS(o);return rr(s)}if(o=$o(t),ao(o)&&o.expression.kind!==71&&!gie(o))return Gv(o)?yie(o):lJ(Qm(o.expression));if(RD(o))return rr(o.type);if(zT(t))return ni(t)}function Hp(t){return t.flags===0?t.type:t}function hie(t){return t.flags&131072?vi:Na(t.flags&1048576?vt(t.types,2):t)}function Tie(t){return t.finalArrayType||(t.finalArrayType=hie(t.elementType))}function zC(t){return dt(t)&256?Tie(t):t}function Hu(t,o){return ka(t,s=>Uu(s,o))}function Sie(t){return Bc(t.argumentExpression)?t.argumentExpression.text:Ks(t.argumentExpression)?_ie(t.argumentExpression):void 0}function _ie(t){let o=Il(t,111551,!0);if(!o||!(o.flags&8))return;let s=o.valueDeclaration;if(s===void 0)return;let l=iT(s);if(l){let d=uC(l);if(d!==void 0)return d}if(mx(s)&&AN(s,t)){let d=LF(s);if(d){let p=Po(s.parent)?xie(s):cs(d);return p&&uC(p)}}}function xie(t){let o=t.dotDotDotToken?32:0,s=fJ(t.parent.parent,o);return s&&bie(t,s,!1)}function bie(t,o,s){if(Ms(o))return o;let l=t.parent;G&&t.flags&33554432&&Th(t)?o=o:G&&l.parent.initializer&&!Uu(pJ(l.parent.initializer),65536)&&(o=Hu(o,524288));let d,p=Gp(65|(t.dotDotDotToken?0:128),o,fr,l),h=l.elements.indexOf(t);if(t.dotDotDotToken){let x=Fa(o,I=>I.flags&58982400?jp(I):I);d=Vc(x,Bi)?Fa(x,I=>S_(I,h)):Na(p)}else if(rg(o)){let x=rl(h),I=32|(s||p6(t)?16:0),B=fy(o,x,I,t.name)||Gn;d=Cie(t,B)}else d=p;return t.initializer?tc(Qv(t))?G&&!Uu(r_(t,0),16777216)?hw(d):d:n0(t,vt([hw(d),r_(t,0)],2)):d}function Cie(t,o){let s=yw(t);return s?tg(s,o):o}function Die(t){let o=t.parent.parent;switch(o.kind){case 266:case 174:return yw(o);case 290:return yw(t.parent);case 237:return o.initializer;case 269:return o.right}}function Eie(t){let o=t.parent;return t.kind===174||t.kind===175?Pie(t.name):""+o.elements.indexOf(t)}function Pie(t){let o=Ay(t);return o.flags&384?""+o.value:void 0}function yw(t){let o=Die(t);if(o&&_F(o)&&o.flowNode){let s=Eie(t);if(s){let l=Ea(DE.createStringLiteral(s),t),d=od(o)?o:DE.createParenthesizedExpression(o),p=Ea(DE.createElementAccessExpression(d,l),t);return xc(l,p),xc(p,t),d!==o&&xc(d,p),p.flowNode=o.flowNode,p}}}function zp(t){return gr(t.target.typeParameters)}function Nie(t){let o=dJ(t);return o&&Na(o)}function dJ(t){return GC(t,t.target.fixedLength)}function GC(t,o,s=0,l=!1,d=!1){let p=zp(t)-s;if(o<p){let h=Qo(t),x=[];for(let I=o;I<p;I++){let B=h[I];x.push(t.target.elementFlags[I]&8?ou(B,Ht):B)}return l?Mi(x):vt(x,d?0:1)}}function S_(t,o,s=0){let l=t.target,d=zp(t)-s;return o>l.fixedLength?Nie(t)||mf(Re):mf(Qo(t).slice(o,d),l.elementFlags.slice(o,d),!1,l.labeledElementDeclarations&&l.labeledElementDeclarations.slice(o,d))}function fJ(t,o){if(o!==0)return TC(t,!1,o);let s=rt(t);return s&&at(s).type||TC(t,!1,o)}function eg(t){if(Ti(t))return t.name.text;if(rc(t))return Sie(t);if(!To(t)&&_o(t))return""+t.parent.parameters.indexOf(t)}function qN(t,o,s,l){switch(t.kind){case 89:let d=lc(t);return d!==ko?`${l?ys(l):"-1"}|${Ca(o)}|${Ca(s)}|${so(d)}`:void 0;case 289:return qN(t.expression,o,s,l);case 146:let p=qN(t.left,o,s,l);return p&&`${p}.${t.right.text}`;case 286:case 281:let h=eg(t);if(h!==void 0){let x=qN(t.expression,o,s,l);return x&&`${x}.${h}`}if(rc(t)&&Sn(t.argumentExpression)){let x=lc(t.argumentExpression)}break;case 265:case 169:case 270:case 283:return`${ys(t)}#${Ca(o)}`}}function kie(t){let o=er(t,sO),s=$t(t),l=ph(s,o.statements.pos);Zn.add(sd(s,l.start,l.length,N.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis))}function pJ(t){return Wt(t).resolvedType||cs(t)}function vie(t){return t.initializer?pJ(t.initializer):t.parent.parent.kind===244&&Fie(t.parent.parent)||Gn}function Fie(t){return Gp(13,Qm(t.expression),fr,t.expression)}function $C(t){return t&&(Fe.noUncheckedIndexedAccess?vt([t,ki]):t)}function Gp(t,o,s,l){return Ms(o)?o:ly(t,o,s,l,!0)||wt}function mJ(t,o){return $C(Gp(65,t,fr,void 0))||Gn}function Iie(t){let o=t.parent,s=gJ(o.parent),l=mJ(s,o.elements.indexOf(t));return Lie(l,t.initializer)}function Lie(t,o){return o?vt([hw(t),cs(o)]):t}function Aie(t){return!!(t.flags&465829888)&&vo(xa(t)||Mr,32768)}function hw(t){let o=Id(t,Aie)?Fa(t,s=>s.flags&465829888?jp(s):s):t;return Hu(o,524288)}function gJ(t){return t.kind===237?vie(t):Iie(t)}function Tw(t){return Gp(13,Qm(t.expression),fr,t.expression)}function Sw(t){let{parent:o}=t;switch(o.kind){case 244:return Tw(o)||Gn;case 269:return Mie(o);case 290:return Oie(o,t);case 174:return Rie(o);case 175:E.fail("implement")}return Gn}function wie(t,o){let s=Ay(o),l=Tm(s);return al(t,l)||$C(vp(t,l)?.type)||Gn}function Rie(t){return wie(Sw(t.parent),t.name)}function Oie(t,o){return mJ(Sw(t),t.elements.indexOf(o))}function Mie(t){return cs(t.right)}function Fy(t,o){return o?{flags:0,type:t.flags&131072?Br:t}:t}function Iy(t){return t.flags===0}function Bie(t){return t.kind===237&&t.initializer&&e0(t.initializer)||t.kind!==266&&t.parent.kind===269&&e0(t.parent.right)}function jie(t){let o=Ku(256);return o.elementType=t,o}function _w(t){return sa[t.id]||(sa[t.id]=jie(t))}function Jie(t,o){if(t===o)return t;if(o.flags&131072)return o;let s=`A${Ca(t)},${Ca(o)}`;return ON(s)??MN(s,Wie(t,o))}function Wie(t,o){let s=ka(t,d=>Uie(o,d)),l=o.flags&512&&Ym(o)?Fa(s,Hm):s;return Ui(o,l)?l:t}function Uie(t,o){if(!(t.flags&1048576))return Ui(t,o);for(let s of t.types)if(Ui(s,o))return!0;return!1}function Ly(t){switch(t.kind){case 289:return Ly(t.expression);case 269:switch(t.operatorToken.kind){case 74:case 86:return Ly(t.left);case 27:return Ly(t.right)}}return t}function Kie(t){let o=!1;for(let s of t)if(!(s.flags&131072)){if(!(dt(s)&256))return!1;o=!0}return o}function qie(t){return dt(t)&256?t.elementType:Lt}function yJ(t){return t===bl?Mr:t}function Vie(t){return ii||(ii=Dd("NonNullable",524288,void 0)||ko),ii!==ko?lw(ii,[t]):Mi([t,Bo])}function gT(t,o){let s=yJ(Hu(G&&t.flags&2?bl:t,o));if(G)switch(o){case 2097152:case 4194304:return Fa(s,l=>Uu(l,262144)?Vie(l):l);default:console.debug("todo - getAdjustedTypeWithFacts")}return s}function QC(t,o){return!1}function hJ(t,o){return vo(t,134217804)&&vo(o,402655616)?Fa(t,s=>s.flags&4?h_(o,402653316):s.flags&8?h_(o,264):s.flags&64?h_(o,2112):s):t}function TJ(t){let o=jp(t);return o.flags&2097152?Pn(o.types,Dn):Dn(o)}function Hie(t){return t.kind===299?ba(cs(t.expression)):Lt}function VN(t){let o=Wt(t);if(!o.switchTypes){o.switchTypes=[];for(let s of t.caseBlock.clauses)o.switchTypes.push(Hie(s))}return o.switchTypes}function zie(t){return t.flags&2097152&&Sr(t.types,Dn)||t}function ng(t,o){return Vu(t,o,Dl)}function SJ(t){return!!(t.flags&524288)&&ro(t,0).length>0}function $p(t,o){return t.flags&1048576?yi(t.types,s=>$p(s,o)):o.flags&1048576?Pn(o.types,s=>$p(t,s)):t.flags&2097152?Pn(t.types,s=>$p(s,o)):t.flags&58982400?$p(xa(t)||Mr,o):lu(o)?!!(t.flags&67633152):o===k?!!(t.flags&67633152)&&!lu(t):o===j?!!(t.flags&524288)&&Gie(t):xw(t,HN(o))||va(o)&&!yT(o)&&$p(t,Ue)}function yT(t){return!!(dt(t)&4)&&t.target===Ue}function HN(t){return dt(t)&4?t.target:t}function Gie(t){let o=Wu(t);return!!(o.callSignatures.length||o.constructSignatures.length||o.members.get("bind")&&ng(t,j))}function xw(t,o){return s(t);function s(l){if(dt(l)&7){let d=HN(l);return d===o||Pn(Bf(d),s)}else if(l.flags&2097152)return Pn(l.types,s);return!1}}function zN(t){let o=t.types;if(!(o.length<10||dt(t)&32768||Zf(o,s=>!!(s.flags&59506688))<10)){if(t.keyPropertyName===void 0){let s=Bn(o,d=>d.flags&59506688?Bn(Ba(d),p=>Dn(Xt(p))?p.name:void 0):void 0),l=s&&$ie(o,s);t.keyPropertyName=l?s:"",t.constituentMap=l}return t.keyPropertyName.length?t.keyPropertyName:void 0}}function $ie(t,o){let s=new Map,l=0;for(let d of t)if(d.flags&61603840){let p=al(d,o);if(p){if(!Jf(p))return;let h=!1;Ry(p,x=>{let I=Ca(ba(x)),B=s.get(I);B?B!==Mr&&(s.set(I,Mr),h=!0):s.set(I,d)}),h||l++}}return l>=10&&l*2>=t.length?s:void 0}function GN(t,o){let s=t.constituentMap?.get(Ca(ba(o)));return s!==Mr?s:void 0}function YC(t,o){return Vu(t,o,Qs)}function Qie(t,o){if(t.kind===1||t.kind===3)return o.arguments[t.parameterIndex];let s=$o(o.expression);return Us(s)?$o(s.expression):void 0}function _J(t){let o=Wt(t);if(o.contextFreeType)return o.contextFreeType;dN(t,wt,!1);let s=o.contextFreeType=ni(t,4);return i_(),s}function tg(t,o,s=o,l,d=Wo(t,_F)?.flowNode){let p,h=!1,x=0;if(Q)return Gn;if(!d)return o;ie++;let I=Le,B=Hp(pe(d));Le=I;let z=dt(B)&256&&cJ(t)?vi:zC(B);if(z===_s&&!(z.flags&131072)&&Hu(z,2097152).flags&131072)return o;return z;function re(){return h?p:(h=!0,p=qN(t,o,s,l))}function pe(ve){if(x===2e3)return In?.instant(In.Phase.CheckTypes,"getTypeAtFlowNode_DepthLimit",{flowId:ve.id}),Q=!0,kie(t),Gn;x++;let rn;for(;;){let O=ve.flags;if(O&4096){for(let xe=I;xe<Le;xe++)if(sn[xe]===ve)return x--,H[xe];rn=ve}let U;if(O&16){if(U=on(ve),!U){ve=ve.antecedent;continue}}else if(O&512){if(U=Kn(ve),!U){ve=ve.antecedent;continue}}else if(O&96)U=Qn(ve);else if(O&128)U=Ct(ve);else if(O&12){if(ve.antecedent.length===1){ve=ve.antecedent[0];continue}U=O&4?Rt(ve):Fr(ve)}else if(O&256){if(U=lt(ve),!U){ve=ve.antecedent;continue}}else if(O&1024){let xe=ve.node.target,He=xe.antecedent;xe.antecedent=ve.node.antecedents,U=pe(ve.antecedent),xe.antecedent=He}else if(O&2){let xe=ve.node;if(xe&&xe!==l&&t.kind!==286&&t.kind!==281){ve=xe.flowNode;continue}U=s}else U=BN(o);return rn&&(sn[Le]=rn,H[Le]=U,Le++),x--,U}}function _e(ve){let rn=ve.node;return H0(rn.kind===237||rn.kind===266?gJ(rn):Sw(rn),t)}function on(ve){let rn=ve.node;if(ss(t,rn)){if(!bC(ve))return _s;if(mm(rn)===2){let U=pe(ve.antecedent);return Fy(qu(Hp(U)),Iy(U))}if(o===vn||o===vi||o===eu||o===Jc||Ty(o)){if(Bie(rn))return _w(Lt);let U=Sy(_e(ve));return Ui(U,o)?U:Oi}let O=OO(rn)?qu(o):o;return O.flags&1048576?Jie(O,_e(ve)):O}if(l3(t,rn))return bC(ve)?o:_s;if(xo(rn)&&rn.parent.parent.kind===244&&(ss(t,rn.parent.parent.expression)||QC(rn.parent.parent.expression,t)))return zC(Hp(pe(ve.antecedent)))}function pn(ve,rn){let O=$o(rn,!0);if(O.kind===135)return _s;if(O.kind===269){if(O.operatorToken.kind===58)return pn(pn(ve,O.left),O.right);if(O.operatorToken.kind===59)return vt([pn(ve,O.left),pn(ve,O.right)])}return Qa(ve,O,!0)}function Kn(ve){let rn=hN(ve.node);if(rn){let O=Ic(rn);if(O&&O.kind===3){let U=pe(ve.antecedent),xe=zC(Hp(U)),He=O.type?Nn(xe,O,ve.node,!0):O.kind===3&&O.parameterIndex>=0&&O.parameterIndex<ve.node.arguments.length?pn(xe,ve.node.arguments[O.parameterIndex]):xe;return He===xe?U:Fy(He,Iy(U))}if($i(rn).flags&131072)return _s}}function Nn(ve,rn,O,U){if(rn.type&&!(Ms(ve)&&(rn.type===k||rn.type===j))){let xe=Qie(rn,O);if(xe){if(ss(t,xe))return Gf(ve,rn.type,U,!1);G&&QC(xe,t)&&(U&&!Uu(rn.type,65536)||!U&&Vc(rn.type,VJ))&&(ve=gT(ve,2097152));let He=go(xe,ve);if(He)return oi(ve,He,mn=>Gf(mn,rn.type,U,!1))}}return ve}function it(ve,rn){let O=UC(qu(_J(rn)));return dT(O,ve.elementType)?ve:_w(vt([ve.elementType,O]))}function lt(ve){if(o===vn||o===vi){let rn=ve.node,O=rn.kind===272?rn.expression.expression:rn.left.expression;if(ss(t,Ly(O))){let U=pe(ve.antecedent),xe=Hp(U);if(dt(xe)&256){let He=xe;if(console.warn("TODO - getTypeAtFlowArrayMutation"),rn.kind===272)for(let mn of rn.arguments)He=it(He,mn);else{let mn=_J(rn.left.argumentExpression);Os(mn,2344)&&(He=it(He,rn.right))}return He===xe?U:Fy(He,Iy(U))}return U}}}function Qn(ve){let rn=pe(ve.antecedent),O=Hp(rn);if(O.flags&131072)return rn;let U=(ve.flags&32)!==0,xe=zC(O),He=Qa(xe,ve.node,U);return He===xe?rn:Fy(He,Iy(rn))}function Ct(ve){let rn=$o(ve.node.switchStatement.expression),O=pe(ve.antecedent),U=Hp(O);if(ss(t,rn))U=fa(U,ve.node);else if(rn.kind===136)U=Xs(U,ve.node);else{let xe=go(rn,U);xe&&(U=Ir(U,xe,ve.node))}return Fy(U,Iy(O))}function Rt(ve){let rn=[],O=!1,U=!1,xe;for(let He of ve.antecedent){if(!xe&&He.flags&128&&He.node.clauseStart===He.node.clauseEnd){xe=He;continue}let mn=pe(He),fn=Hp(mn);if(fn===o&&o===s)return fn;fu(rn,fn),dT(fn,s)||(O=!0),Iy(mn)&&(U=!0)}if(xe){let He=pe(xe),mn=Hp(He);if(!(mn.flags&131072)&&!Gr(rn,mn)&&!u4(xe.node.switchStatement)){if(mn===o&&o===s)return mn;rn.push(mn),dT(mn,s)||(O=!0),Iy(He)&&(U=!0)}}return Fy(Wr(rn,O?2:1),U)}function Fr(ve){let rn=i4(ve),O=Z[rn]||(Z[rn]=new Map),U=re();if(!U)return o;let xe=O.get(U);if(xe)return xe;for(let Pt=Ve;Pt<et;Pt++)if(fe[Pt]===ve&&Ce[Pt]===U&&ne[Pt].length)return Fy(Wr(ne[Pt],1),!0);let He=[],mn=!1,fn;for(let Pt of ve.antecedent){let ur;if(!fn)ur=fn=pe(Pt);else{fe[et]=ve,Ce[et]=U,ne[et]=He,et++;let ti=q;q=void 0,ur=pe(Pt),q=ti,et--;let Do=O.get(U);if(Do)return Do}let Tr=Hp(ur);if(fu(He,Tr),dT(Tr,s)||(mn=!0),Tr===o)break}let Wn=Wr(He,mn?2:1);return Iy(fn)?Fy(Wn,!0):(O.set(U,Wn),Wn)}function Wr(ve,rn){if(Kie(ve))return _w(vt(Yn(ve,qie)));let O=yJ(vt(Za(ve,zC),rn));return O!==o&&O.flags&o.flags&1048576&&pu(O.types,o.types)?o:O}function jo(ve){if(Po(t)||Jx(t)||Kx(t)){if(Sn(ve)){let O=lc(ve).valueDeclaration;if(O&&(To(O)||_o(O))&&t===O.parent&&!O.initializer&&!O.dotDotDotToken)return O}}else if(Us(ve)){if(ss(t,ve.expression))return ve}else if(Sn(ve)){let rn=lc(ve)}}function go(ve,rn){if(o.flags&1048576||rn.flags&1048576){let O=jo(ve);if(O){let U=eg(O);if(U){let xe=o.flags&1048576&&dT(rn,o)?o:rn;if(q3(xe,U))return O}}}}function oi(ve,rn,O){let U=eg(rn);if(U===void 0)return ve;let xe=!1,He=G&&(xe||$9(rn))&&vo(ve,98304),mn=al(He?Hu(ve,2097152):ve,U);if(!mn)return ve;mn=He&&xe?Bp(mn):mn;let fn=O(mn);return ka(ve,Wn=>{let Pt=H3(Wn,U)||Mr;return!(Pt.flags&131072)&&!(fn.flags&131072)&&IC(fn,Pt)})}function So(ve,rn,O,U,xe){if((O===37||O===38)&&ve.flags&1048576){let He=zN(ve);if(He&&He===eg(rn)){let mn=GN(ve,cs(U));if(mn)return O===(xe?37:38)?mn:Dn(al(mn,He)||Mr)?RP(ve,mn):ve}}return oi(ve,rn,He=>jt(He,O,U,xe))}function Ir(ve,rn,O){if(O.clauseStart<O.clauseEnd&&ve.flags&1048576&&zN(ve)===eg(rn)){let U=VN(O.switchStatement).slice(O.clauseStart,O.clauseEnd),xe=vt(Yn(U,He=>GN(ve,He)||Mr));if(xe!==Mr)return xe}return oi(ve,rn,U=>fa(U,O))}function ls(ve,rn,O){if(ss(t,rn))return gT(ve,O?4194304:8388608);G&&O&&QC(rn,t)&&(ve=gT(ve,2097152));let U=go(rn,ve);return U?oi(ve,U,xe=>Hu(xe,O?4194304:8388608)):ve}function $a(ve,rn,O){let U=qo(ve,rn);return U?!!(U.flags&16777216||oa(U)&48)||O:!!vp(ve,rn)||!O}function an(ve,rn,O){console.debug("todo - narrowTypeByInKeyword");let U=Tm(rn);return Id(ve,He=>$a(He,U,!0))?ka(ve,He=>$a(He,U,O)):ve}function je(ve,rn,O,U,xe){let He=O.text!="0"&&O.text!=="";return xe=xe!==(He===!0)!=(U!==38&&U!==36),Qa(ve,rn,xe)}function Dt(ve,rn,O){switch(rn.operatorToken.kind){case 74:case 86:return ls(Qa(ve,rn.right,O),rn.left,O);case 35:case 36:case 37:case 38:let U=rn.operatorToken.kind,xe=Ly(rn.left),He=Ly(rn.right);if(ss(t,xe))return jt(ve,U,He,O);if(ss(t,He))return jt(ve,U,xe,O);G&&(QC(xe,t)?ve=ir(ve,U,He,O):QC(He,t)&&(ve=ir(ve,U,xe,O)));let mn=go(xe,ve);if(mn)return So(ve,mn,U,He,O);let fn=go(He,ve);if(fn)return So(ve,fn,U,xe,O);if(Ll(xe))return zu(ve,U,He,O);if(Ll(He))return zu(ve,U,xe,O);if(qD(He)&&!Us(xe))return je(ve,xe,He,U,O);if(qD(xe)&&!Us(He))return je(ve,He,xe,U,O);break;case 103:let Wn=Ly(rn.right);if(XN(ve)&&Us(t)&&ss(t.expression,Wn)){let Pt=cs(rn.left);if(_m(Pt)&&eg(t)===Tm(Pt))return Hu(ve,O?524288:65536)}if(ss(t,Wn)){let Pt=cs(rn.left);if(_m(Pt))return an(ve,Pt,O)}break;case 27:return Qa(ve,rn.right,O);case 58:return O?Qa(Qa(ve,rn.left,!0),rn.right,!0):vt([Qa(ve,rn.left,!1),Qa(ve,rn.right,!1)]);case 59:return O?vt([Qa(ve,rn.left,!0),Qa(ve,rn.right,!0)]):Qa(Qa(ve,rn.left,!1),rn.right,!1)}return ve}function ir(ve,rn,O,U){let xe=rn===35||rn===37,He=rn===35||rn===36?98304:32768,mn=cs(O);return xe!==U&&Vc(mn,Wn=>!!(Wn.flags&He))||xe===U&&Vc(mn,Wn=>!(Wn.flags&(3|He)))?gT(ve,2097152):ve}function jt(ve,rn,O,U){if(ve.flags&1)return ve;(rn===36||rn===38)&&(U=!U);let xe=cs(O),He=rn===35||rn===36;if(xe.flags&98304){if(!G)return ve;let mn=He?U?262144:2097152:xe.flags&65536?U?131072:1048576:U?65536:524288;return gT(ve,mn)}if(U){if(!He&&(ve.flags&2||Id(ve,lu))){if(xe.flags&469893052||lu(xe))return xe;if(xe.flags&524288)return yn}let mn=ka(ve,fn=>IC(fn,xe));return hJ(mn,xe)}return Dn(xe)?ka(ve,mn=>!(TJ(mn)&&IC(mn,xe))):ve}function Si(ve,rn,O){return O?yo(ve,rn.text):gT(ve,Lfe.get(rn.text)||32768)}function zr(ve,{switchStatement:rn,clauseStart:O,clauseEnd:U},xe){return O!==U&&yi(VN(rn).slice(O,U),xe)?Hu(ve,2097152):ve}function fa(ve,{switchStatement:rn,clauseStart:O,clauseEnd:U}){let xe=VN(rn);if(!xe.length)return ve;let He=xe.slice(O,U),mn=O===U||Gr(He,Lt);if(ve.flags&2&&!mn){let ur;for(let Tr=0;Tr<He.length;Tr+=1){let ti=He[Tr];if(ti.flags&469893052)ur!==void 0&&ur.push(ti);else if(ti.flags&524288)ur===void 0&&(ur=He.slice(0,Tr)),ur.push(yn);else return ve}return vt(ur===void 0?He:ur)}let fn=vt(He),Wn=fn.flags&131072?Lt:hJ(ka(ve,ur=>IC(fn,ur)),fn);if(!mn)return Wn;let Pt=ka(ve,ur=>!(TJ(ur)&&Gr(xe,ur.flags&32768?fr:ba(zie(ur)))));return Wn.flags&131072?Pt:vt([Wn,Pt])}function yo(ve,rn){switch(rn){case"string":return Yi(ve,Er,1);case"number":return Yi(ve,Ht,2);case"bigint":return Yi(ve,Xr,4);case"boolean":return Yi(ve,Gi,8);case"object":return ve.flags&1?ve:vt([Yi(ve,yn,32),Yi(ve,De,131072)]);case"function":return ve.flags&1?ve:Yi(ve,j,64);case"undefined":return Yi(ve,fr,65536)}return Yi(ve,yn,128)}function Yi(ve,rn,O){return Fa(ve,U=>Vu(U,rn,Qs)?Uu(U,O)?U:Lt:ng(rn,U)?rn:Uu(U,O)?Mi([U,rn]):Lt)}function Xs(ve,{switchStatement:rn,clauseStart:O,clauseEnd:U}){let xe=zc(rn.caseBlock.clauses,fn=>fn.kind===301),He=O===U||xe>=O&&xe<U;for(let fn=0;fn<O;fn++){let Wn=rn.caseBlock.clauses[fn];Wn.kind===299&&(ve=Qa(ve,Wn.expression,!1))}if(He){for(let fn=U;fn<rn.caseBlock.clauses.length;fn++){let Wn=rn.caseBlock.clauses[fn];Wn.kind===299&&(ve=Qa(ve,Wn.expression,!1))}return ve}let mn=rn.caseBlock.clauses.slice(O,U);return vt(Yn(mn,fn=>fn.kind===299?Qa(ve,fn.expression,!0):Lt))}function Ll(ve){return(Ti(ve)&&ra(ve.name)==="constructor"||rc(ve)&&ji(ve.argumentExpression)&&ve.argumentExpression.text==="constructor")&&ss(t,ve.expression)}function zu(ve,rn,O,U){if(U?rn!==35&&rn!==37:rn!==36&&rn!==38)return ve;let xe=cs(O);if(!SJ(xe))return ve;let He=qo(xe,"prototype");if(!He)return ve;let mn=Xt(He),fn=Ms(mn)?void 0:mn;if(!fn||fn===k||fn===j)return ve;if(Ms(ve))return fn;return ka(ve,Pt=>Wn(Pt,fn));function Wn(Pt,ur){return Pt.flags&524288&&dt(Pt)&1||ur.flags&524288&&dt(ur)&1?Pt.symbol===ur.symbol:ng(Pt,ur)}}function Gf(ve,rn,O,U){let xe=ve.flags&1048576?`N${Ca(ve)},${Ca(rn)},${(O?1:0)|(U?2:0)}`:void 0;return ON(xe)??MN(xe,Al(ve,rn,O,U))}function Al(ve,rn,O,U){if(!O){if(ve===rn)return Lt;if(U)return ka(ve,Wn=>!$p(Wn,rn));let fn=Gf(ve,rn,!0,!1);return ka(ve,Wn=>!dT(Wn,fn))}if(ve.flags&3||ve===rn)return rn;let xe=U?$p:ng,He=ve.flags&1048576?zN(ve):void 0,mn=Fa(rn,fn=>{let Wn=He&&al(fn,He),Pt=Wn&&GN(ve,Wn),ur=Fa(Pt||ve,U?Tr=>$p(Tr,fn)?Tr:$p(fn,Tr)?fn:Lt:Tr=>YC(Tr,fn)?Tr:YC(fn,Tr)?fn:ng(Tr,fn)?Tr:ng(fn,Tr)?fn:Lt);return ur.flags&131072?Fa(ve,Tr=>vo(Tr,465829888)&&xe(fn,xa(Tr)||Mr)?Mi([Tr,fn]):Lt):ur});return mn.flags&131072?ng(rn,ve)?rn:Ui(ve,rn)?ve:Ui(rn,ve)?rn:Mi([ve,rn]):mn}function b_(ve,rn,O){if(d3(rn,t)){let U=O||!Gv(rn)?hN(rn):void 0,xe=U&&Ic(U);if(xe&&xe.kind===1)return Nn(ve,xe,rn,O)}if(XN(ve)&&Us(t)&&Ti(rn.expression)){let U=rn.expression;if(ss(t.expression,Ly(U.expression))&&Sn(U.name)&&U.name.text==="hasOwnProperty"&&rn.arguments.length===1){let xe=rn.arguments[0];if(_u(xe)&&eg(t)===xe.text)return Hu(ve,O?524288:65536)}}return ve}function Qa(ve,rn,O){switch(rn.kind){case 89:if(!ss(t,rn)&&b<5){let xe=lc(rn).valueDeclaration;if(xe&&xo(xe)&&!xe.type&&xe.initializer){b++;let He=Qa(ve,xe.initializer,O);return b--,He}}case 71:case 286:case 281:return ls(ve,rn,O);case 272:return b_(ve,rn,O);case 289:return Qa(ve,rn.expression,O);case 269:return Dt(ve,rn,O);case 298:if(rn.operator===55)return Qa(ve,rn.operand,!O);break}return ve}function sk(ve,rn,O){if(ss(t,rn))return gT(ve,O?2097152:262144);let U=go(rn,ve);return U?oi(ve,U,xe=>Hu(xe,O?2097152:262144)):ve}}function $N(t){return $c(t)||Vr(t)}function Yie(t){return!!er(t.parent,o=>$N(o)&&!!(Wt(o).flags&131072))}function xJ(t){switch(t.kind){case 89:if(Vd(t)){let o=lc(t);if(bw(o)&&o.lastAssignmentPos!==Number.MAX_VALUE){let s=er(t,$N),l=er(o.valueDeclaration,$N);o.lastAssignmentPos=s===l?Xie(t,o.valueDeclaration):Number.MAX_VALUE}}return}Zo(t)||No(t,xJ)}function Xie(t,o){let s=t.pos;for(;t&&t.pos>o.pos;){switch(t.kind){case 242:case 247:case 253:case 245:case 246:case 243:case 244:case 256:s=t.end}t=t.parent}return s}function bJ(t,o){let s=er(t.valueDeclaration,$N);if(!s)return!1;let l=Wt(s);return l.flags&131072||(l.flags|=131072,Yie(s)||xJ(s)),!t.lastAssignmentPos||o&&t.lastAssignmentPos<o.pos}function Zie(t){return!0}function bw(t){let o=t.valueDeclaration&&t.valueDeclaration;return!!o&&(_o(o)||xo(o)&&Zie(o))}function Qp(t){return ip(t)?rt(t):void 0}function eoe(t){for(;t.parent.kind===286;)t=t.parent;return t.parent.kind===280}function noe(t){if(ql(t))return Qp(t.parent);for(;L9(t);)t=t.parent;if(eoe(t)){let o=0;t.parent.kind===280?o=hm(t)?788968:111551:o=1920,o|=2097152;let s=Ks(t)?Il(t,o,!0):void 0;if(s)return s}if(t.parent.kind===220)return TM(t.parent);if(t.parent.kind===148&&t.parent.parent.kind===224){let o=zq(t.parent);return o&&o.symbol}if(fm(t)){if(Da(t))return;let o=er(t,vv(Hv,MH,BH)),s=o?901119:ao(t.parent)&&t.parent.expression===t?16:iI(t.parent)?16:111551;if(t.kind===89){let l=Il(t,s,!0,!0,oS(t));if(!l&&o)debugger;return l}else if(t.kind===286||t.kind===146){let l=Wt(t);return l.resolvedSymbol||(t.kind===286?(cC(t,0),l.resolvedSymbol||(l.resolvedSymbol=toe(Ds(t.expression,128),Ay(t.name)))):v3(t,0),!l.resolvedSymbol&&o&&hl(t)&&E.fail("TODO - Implement me - getSymbolOfNameOrPropertyAccessExpression")),l.resolvedSymbol}debugger}else if(CJ(t)){let o=t.parent.kind===166?788968:1920,s=Il(t,o,!1,!0);return s&&s!==ko?s:GP(t)}if(t.parent.kind===167)return Il(t,1)}function CJ(t){for(;t.parent.kind===146;)t=t.parent;return t.parent.kind===166}function Ay(t){if(Yc(t))return Lt;if(yu(t)||hg(t))return ba(ni(t));if(ps(t))return ba(jN(t));let o=Rg(t);return o!==void 0?Au(o):Tc(t)?ba(ni(t)):Lt}function toe(t,o){let s=nC(t,o);if(s.length&&t.members){let l=QN(Wu(t).members);if(s===za(t))return l;if(l){let d=at(l),p=Ei(s,x=>x.declaration),h=Yn(p,ys).join(",");if(d.filteredIndexSymbolCache||(d.filteredIndexSymbolCache=new Map),d.filteredIndexSymbolCache.has(h))return d.filteredIndexSymbolCache.get(h);{let x=Fo(131072,"__index");return x.declarations=Ei(s,I=>I.declaration),x.parent=t.aliasSymbol?t.aliasSymbol:t.symbol?t.symbol:Fl(x.declarations[0].parent),d.filteredIndexSymbolCache.set(h,x),x}}}}function QN(t){return t.get("__index")}function roe(t,o){if($P(t.parent)){let s=ioe(t.parent);if(s)return Or(s,t,o,void 0,!0)}}function ioe(t){if(er(t,d=>Rx(d)||d.flags&16777216?jd(d):"quit"))return;let s=zD(t);s&&(Kx(s)||dd(s))&&br(s.parent.parent)&&es(s.parent.parent)===6&&rt(s.parent.parent.left)&&console.debug("todo - getAssignmentDeclarationLocation");let l=NF(t);if(l&&Ji(l)){let d=rt(l);return d&&d.valueDeclaration}}function Il(t,o,s,l,d){if(Da(t))return;let p=1920|(wr(t)?o&111551:0),h;if(t.kind===89){let x=o3(wg(t)),I=wr(t)&&!Zi(t)?roe(t,o):void 0;if(h=kt(Or(d||t,t,o,s||I?void 0:x,!0,!1)),!h)return kt(I)}else if(t.kind===146||t.kind===286){let x=t.kind===146?t.left:t.expression,I=t.kind===146?t.right:t.name,B=Il(x,p,s,!1,d);if(!B||Da(I))return;if(B===ko)return B;if(B.valueDeclaration&&wr(B.valueDeclaration)&&xo(B.valueDeclaration)&&B.valueDeclaration.initializer,h=kt(WS(by(B),I.text,o)),!h&&B.flags&2097152&&(h=kt(WS(by(cu(B)),I.text,o))),!h){if(!s){let z=Cw(B),re=Fs(I),pe=hl(t)&&ooe(t);if(k&&o&788968&&pe&&aoe(pe)){hn(pe,N._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0,Wd(pe));return}debugger}return}}else E.assertNever(t,"Unknown entity name kind.");return h.flags&o||l?h:cu(h)}function Cw(t,o){return t.parent?Cw(t.parent,o)+"."+Qi(t):Qi(t,o,void 0,36)}function ooe(t){for(;hl(t.parent);)t=t.parent;return t}function aoe(t){let o=wg(t),s=Or(o,o,111551,void 0,!0);if(s){for(;hl(o.parent);){let l=Xt(s);if(s=qo(l,o.parent.right.text),!s)return;o=o.parent}return s}}function DJ(t,o){for(let s of t)switch(s.kind){case 176:case 236:case 240:case 243:case 244:NJ(s,o);break;case 270:case 169:case 283:case 154:s.body&&NJ(s,o);break;case 271:case 156:case 241:case 151:case 158:soe(s,o);break;default:E.assertNever(s,"Node should not have been registered for unused identifiers check")}}function soe(t,o){let s=rt(t).declarations;if(!s||ta(s)!==t)return;let l=hx(t),d=new Set;for(let p of l){if(!EJ(p))continue;let h=ra(p.name),{parent:x}=p;if(x.kind!==259&&x.typeParameters.every(EJ)){if(gg(d,x)){let I=Mc(x),B=wc(x)?WF(x):UF(I,x.typeParameters),re=x.typeParameters.length===1?[N._0_is_declared_but_its_value_is_never_read,h]:[N.All_type_parameters_are_unused];o(p,1,sd(I,B.pos,B.end-B.pos,...re))}}else o(p,1,wi(p,N._0_is_declared_but_its_value_is_never_read,h))}}function EJ(t){return!(kt(t.symbol).isReferenced&262144)&&!XC(t.name)}function u_e(t,o){for(let s of t.members)switch(s.kind){case 154:case 152:let l=rt(s);!l.isReferenced&&(ap(s,2)||pl(s)&&Yc(s.name))&&!(s.flags&33554432)&&o(s,0,wi(s.name,N._0_is_declared_but_its_value_is_never_read,Qi(l)));break;case 150:break;default:E.fail("Unexpected class member")}}function XC(t){return Sn(t)&&ra(t).charCodeAt(0)===95}function coe(t){return(To(t)||xo(t)&&bg(t.parent.parent))&&XC(t.name)}function PJ(t,o,s,l){let d=String(l(o)),p=t.get(d);p?p[1].push(s):t.set(d,[o,[s]])}function loe(t){return Wo(t,_o)}function uoe(t,o,s){let l=ci(t)||t,d=N._0_is_declared_but_its_value_is_never_read;s(t,0,wi(l,d,o))}function NJ(t,o){let s=new Map,l=new Map;t.locals.forEach(d=>{if(!(d.flags&262144?!(d.flags&3&&!(d.isReferenced&3)):d.isReferenced||d.exportSymbol)&&d.declarations){for(let p of d.declarations)if(!coe(p))if(xo(p)){let h=OC(p)&1,x=ci(p);(!x||!XC(x))&&PJ(l,p.parent,p,ys)}else{let h=d.valueDeclaration&&loe(d.valueDeclaration),x=d.valueDeclaration&&ci(d.valueDeclaration);h&&x?XC(x)||(To(p)&&hS(p.parent)?PJ(s,p.parent,p,ys):o(h,1,wi(x,N._0_is_declared_but_its_value_is_never_read,Ws(d)))):uoe(p,Ws(d),o)}}}),l.forEach(([d,p])=>{if(d.declarations?.length===p?.length)o(d,0,p.length===1?wi(Uo(p).name,N._0_is_declared_but_its_value_is_never_read,Dw(Uo(p).name)):wi(d.parent.kind===242?d.parent:d,N.All_variables_are_unused));else for(let h of p)o(h,0,wi(h,N._0_is_declared_but_its_value_is_never_read,Dw(h.name)))})}function Dw(t){switch(t.kind){case 89:return ra(t);case 265:return Dw(Xa(Uo(t.elements),To).name);default:return E.assertNever(t)}}function ZC(t,o,s){let l=Wt(t),d=l.resolvedSignature;if(d&&d!==bs&&!o)return d;let p=ce;d||(ce=ue.length),l.resolvedSignature=bs;let h=aae(t,o,s||0);return ce=p,h!==bs&&(l.resolvedSignature!==bs&&(h=l.resolvedSignature),l.resolvedSignature=Ve===et?h:d),h}function doe(t,o){let s=new Set,l=[];nW(o,()=>YN(t,l,void 0,0));for(let d of l)s.add(d);l.length=0,jw(o,()=>YN(t,l,void 0,0));for(let d of l)s.add(d);return oo(s)}function YN(t,o,s,l){let d=Io(t,Cg);xn=s;let p=d?ZC(d,o,l):void 0;return xn=void 0,p}function Ms(t){return t&&(t.flags&1)!==0}function eD(t,o){return Ew(t,o)&o}function Yp(t){return t.flags&524288?Y0(Wu(t)):t.flags&67108864?!0:t.flags&1048576?Pn(t.types,Yp):t.flags&2097152?yi(t.types,Yp):!1}function Ew(t,o){t.flags&467927040&&(t=xa(t)||Mr);let s=t.flags;if(s&268435460)return G?16317953:16776705;if(s&134217856){let l=s&128&&t.value==="";return G?l?12123649:7929345:l?12582401:16776705}if(s&4096)return G?16317953:16776705;if(s&40)return G?16317698:16776450;if(s&256){let l=t.value===0;return G?l?12123394:7929090:l?12582146:16776450}if(s&2048){let l=t.value===0;return G?l?12122884:7928580:l?12581636:16775940}return s&16?G?16316168:16774920:s&524288?o&(G?83427327:83886079)?dt(t)&16&&Yp(t)?G?83427327:83886079:G?7888800:16736160:0:s&16384?9830144:s&32768?26607360:s&65536?42917664:s&67108864?G?7888800:16736160:s&131072?0:s&1048576?Bl(t.types,(l,d)=>l|Ew(d,o),0):s&2097152?foe(t,o):83886079}function foe(t,o){let s=vo(t,402784188),l=0,d=134217727;for(let p of t.types)if(!(s&&p.flags&524288)){let h=Ew(p,o);l|=h,d&=h}return l&8256|d&134209471}function kJ(t,o,s){if(G&&t.flags&2){if(Ks(o)){let d=Wd(o);if(d.length<100)return hn(o,N._0_is_of_type_unknown,d),Gn}return hn(o,N.Object_is_of_type_unknown),Gn}let l=eD(t,50331648);if(l&50331648){s(o,l);let d=t;return d.flags&229376?Gn:d}return t}function poe(t,o){hn(t,o&16777216?o&33554432?N.Cannot_invoke_an_object_which_is_possibly_null_or_undefined:N.Cannot_invoke_an_object_which_is_possibly_undefined:N.Cannot_invoke_an_object_which_is_possibly_null)}function moe(t){return t.expression.kind===89&&t.expression.text==="$"}function vJ(t,o){if(o&2){let s=tT(t);s.flags|=4}}function goe(t){return!!(t.typeParameters&&SJ($i(t)))}function yoe(t,o,s,l){return Ms(t)||Ms(o)&&!!(t.flags&262144)||!s&&!l&&!(o.flags&1048576)&&!(Nl(o).flags&131072)&&Ui(t,j)}function hoe(t,o,s){if(moe(t)&&de===1&&er(t,Kl))return pi;let l,d=ni(t.expression,void 0,void 0,16);if(Gv(t)?console.debug("todo - call chain"):l=0,d=kJ(d,t.expression,poe),d===Br)return _d;let p=Ha(d);if(da(p))return ak(t);let h=ro(p,0),x=ro(p,1).length;if(yoe(d,p,h.length,x))return!da(d)&&t.typeArguments&&hn(t,N.Untyped_function_calls_may_not_accept_type_arguments),_N(t);if(!h.length){if(x)hn(t,N.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,_t(d));else{let I;if(t.arguments.length===1){let B=$t(t).text;ds(B.charCodeAt(eo(B,t.expression.end,!0)-1))&&(I=wi(t.expression,N.Are_you_missing_a_semicolon))}iae(t.expression,p,0,I)}return ak(t)}return s&8&&!t.typeArguments&&h.some(goe)?(vJ(t,s),bs):h.some(I=>wr(I.declaration)&&!!hO(I.declaration))?(hn(t,N.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,_t(d)),ak(t)):ZJ(t,h,o,s,l)}function Toe(t,o,s){let l=DC(t),d=ro(l,0);return ZJ(t,d,o,s,0)}function FJ(t=0){return t&848330095}function _t(t,o,s=1064960,l=bh("")){let p=Pe.typeToTypeNode(t,o,FJ(s)|70221824|0);if(p===void 0)return console.warn("expected a type node but didn't get one"),"<never>";let h=t!==zs?zg():tz(),x=o&&$t(o);h.writeNode(4,p,x,l);let I=l.getText(),B=UD*2;return B&&I&&I.length>=B?I.substr(0,B-3)+"...":I}function Soe(t,o,s){let l,d,p=0,h,x=-1,I;E.assert(!o.length);for(let B of t){let z=B.declaration&&rt(B.declaration),re=B.declaration&&B.declaration.parent;!d||z===d?l&&re===l?h=h+1:(l=re,h=p):(h=p=o.length,l=re),d=z,$H(B)||Afe(B)?(x++,I=x,p++):I=h,o.splice(I,0,B)}}function __(t){let o=$t(t),s=Wt(o);s.flags&1?E.assert(!s.deferredNodes,"A type-checked file should have no deferred nodes."):(s.deferredNodes||(s.deferredNodes=new Set),s.deferredNodes.add(t))}function _oe(t,o,s,l,d){return E.assert(o.length>0),__(t),l||o.length===1||o.some(p=>!!p.typeParameters)?boe(t,o,s,d):Noe(o)}function xoe(t,o){let s=-1,l=-1;for(let d=0;d<t.length;d++){let p=t[d],h=qc(p);if(kd(p)||h>=o)return d;h>l&&(l=h,s=d)}return s}function boe(t,o,s,l){let d=xoe(o,xn===void 0?s.length:xn),p=o[d],{typeParameters:h}=p;if(!h)return p;let x=x4(t)?t.typeArguments:void 0,I=x?ok(p,Coe(x,h,wr(t))):Doe(t,h,p,s,l);return o[d]=I,I}function Coe(t,o,s){let l=t.map(xt);for(;l.length>o.length;)l.pop();for(;l.length<o.length;)l.push(Gm(o[l.length])||dc(o[l.length])||r0(s));return l}function Doe(t,o,s,l,d){let p=rD(o,s,wr(t)?2:0),h=kw(t,s,l,d|4|8,p);return ok(s,h)}function IJ(t,o){return LJ(t,vt(o,2))}function LJ(t,o){return Bm(Uo(t),o)}function Eoe(t){let o=t.parameters.length;return Sl(t)?o-1:o}function Poe(t){if(Sl(t)){let s=Xt(t.parameters[t.parameters.length-1]);return s&&Nd(s,Ht)}}function Noe(t){let o=Ei(t,I=>I.thisParameter),s;o.length&&(s=IJ(o,o.map(hC)));let{min:l,max:d}=Y9(t,Eoe),p=[];for(let I=0;I<d;I++){let B=Ei(t,z=>Sl(z)?I<z.parameters.length-1?z.parameters[I]:ta(z.parameters):I<z.parameters.length?z.parameters[I]:void 0);E.assert(B.length!==0),p.push(IJ(B,Ei(t,z=>hy(z,I))))}let h=Ei(t,I=>Sl(I)?ta(I.parameters):void 0),x=1024;if(h.length!==0){let I=Na(vt(Ei(t,Poe),2));p.push(LJ(h,I)),x|=1}return t.some($H)&&(x|=2),df(t[0].declaration,void 0,s,p,Mi(t.map($i)),void 0,l,x)}function koe(t,o,s){let l=s.flags;return l&2097152?AJ(t,o,s.types):(lu(s)?o&16777216||(o|=16777216,t.set(s.id.toString(),s)):(l&3?(s===la&&(o|=8388608),da(s)&&(o|=1073741824)):(G||!(l&98304))&&(s===ki&&(o|=262144,s=fr),t.has(s.id.toString())||(s.flags&101280&&o&101280&&(o|=67108864),t.set(s.id.toString(),s))),o|=l&473694143),o)}function AJ(t,o,s){for(let l of s)o=koe(t,o,ba(l));return o}function voe(t,o){let s=t.length;for(;s>0;){s--;let l=t[s];(l.flags&4&&o&402653312||l.flags&8&&o&256||l.flags&64&&o&2048||l.flags&4096&&o&8192||l.flags&16384&&o&32768||lu(l)&&o&470302652)&&pg(t,s)}}function Foe(t,o){for(let s of t)if(!vl(s.types,o)){if(o===ki)return vl(s.types,fr);if(o===fr)return vl(s.types,ki);let l=o.flags&128?Er:o.flags&288?Ht:o.flags&2048?Xr:void 0;if(!l||!vl(s.types,l))return!1}return!0}function Ioe(t){let o,s=zc(t,h=>!!(dt(h)&32768));if(s<0)return!1;let l=s+1;for(;l<t.length;){let h=t[l];dt(h)&32768?((o||(o=[t[s]])).push(h),pg(t,l)):l++}if(!o)return!1;let d=[],p=[];for(let h of o)for(let x of h.types)if(jC(d,x)&&Foe(o,x)){if(x===fr&&p.length&&p[0]===ki)continue;if(x===ki&&p.length&&p[0]===fr){p[0]=ki;continue}jC(p,x)}return t[s]=qS(p,32768),!0}function XN(t){return t===ki||!!(t.flags&1048576)&&t.types[0]===ki}function wJ(t,o){for(let s=0;s<t.length;s++)t[s]=ka(t[s],l=>!(l.flags&o))}function RJ(t){return Bl(t,(o,s)=>s.flags&1048576?o*s.types.length:s.flags&131072?0:o,1)}function OJ(t){let o=RJ(t);return o>=1e5?(In?.instant(In.Phase.CheckTypes,"checkCrossProductUnion_DepthLimit",{typeIds:t.map(s=>s.id),size:o}),hn(v,N.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1):!0}function Loe(t,o){let s=RJ(t),l=[];for(let d=0;d<s;d++){let p=t.slice(),h=d;for(let I=t.length-1;I>=0;I--)if(t[I].flags&1048576){let B=t[I].types,z=B.length;p[I]=B[h%z],h=Math.floor(h/z)}let x=Mi(p,o);x.flags&131072||l.push(x)}return l}function MJ(t){return!(t.flags&3145728)||t.aliasSymbol?1:t.flags&1048576&&t.origin?MJ(t.origin):Pw(t.types)}function Pw(t){return Bl(t,(o,s)=>o+MJ(s),0)}function Aoe(t,o,s,l){let d=Ut(2097152);return d.objectFlags=o|Qt(t,98304),d.types=t,d.aliasSymbol=s,d.aliasTypeArguments=l,d}function BJ(t){return!!(t.flags&402653184)}function Mi(t,o=0,s,l){let d=new Map,p=AJ(d,0,t),h=oo(d.values()),x=0;if(p&131072)return Gr(h,Br)?Br:Lt;if(G&&p&98304&&p&84410368||p&67108864&&p&402783164||p&402653316&&p&67238712||p&2344&&p&469889684||p&64&&p&469889684||p&49152&&p&469842876)return Lt;if(p&1)return p&8388608?la:p&1073741824?Gn:wt;if(!G&&p&98304)return p&16777216?Lt:p&32768?fr:De;if((p&4&&p&402653312||p&8&&p&256||p&64&&p&2048||p&4096&&p&8192||p&16384&&p&32768||p&16777216&&p&470302652)&&(o&1||voe(h,p)),p&262144&&(h[h.indexOf(fr)]=ki),h.length===0)return Mr;if(h.length===1)return h[0];if(h.length===2&&!(o&2)){let z=h[0].flags&8650752?0:1,re=h[z],pe=h[1-z];if(re.flags&8650752&&(pe.flags&469893052&&!BJ(pe)||p&16777216)){let _e=xa(re);if(_e&&Vc(_e,on=>!!(on.flags&469893052)||lu(on))){if(YC(_e,pe))return re;if(!(_e.flags&1048576&&Id(_e,on=>YC(on,pe)))&&!YC(pe,_e))return Lt;x=67108864}}}let I=uc(h)+(o&2?"*":Py(s,l)),B=ca.get(I);if(!B){if(p&1048576)if(Ioe(h))B=Mi(h,o,s,l);else if(yi(h,z=>!!(z.flags&1048576&&z.types[0].flags&32768))){let z=Pn(h,XN)?ki:fr;wJ(h,32768),B=vt([Mi(h,o),z],1,s,l)}else if(yi(h,z=>!!(z.flags&1048576&&(z.types[0].flags&65536||z.types[1].flags&65536))))wJ(h,65536),B=vt([Mi(h,o),De],1,s,l);else if(h.length>=4){let z=Math.floor(h.length/2);B=Mi([Mi(h.slice(0,z),o),Mi(h.slice(z),o)],o,s,l)}else{if(!OJ(h))return Gn;let z=Loe(h,o),re=Pn(z,pe=>!!(pe.flags&2097152))&&Pw(z)>Pw(h)?C(2097152,h):void 0;B=vt(z,1,s,l,re)}else B=Aoe(h,x,s,l);ca.set(I,B)}return B}function ZN(t){if(Sl(t)){let o=Xt(t.parameters[t.parameters.length-1]);if(!Bi(o))return Ms(o)?Oi:o;if(o.target.combinedFlags&12)return S_(o,o.target.fixedLength)}}function x_(t){let o=ZN(t);return o&&!va(o)&&!Ms(o)?o:void 0}function Nw(t){return t=$o(t),t}function rg(t){return va(t)||!(t.flags&98304)&&Ui(t,Hr)}function jJ(t){return t.flags&1048576?Fa(t,jJ):t.flags&1||nD(xa(t)||t)?t:Bi(t)?mf(vy(t),t.target.elementFlags,!1,t.target.labeledElementDeclarations):mf([t],[8])}function JJ(t){return t&&t.mapper}function WJ(t){return{typeParameter:t.typeParameter,candidates:t.candidates&&t.candidates.slice(),contraCandidates:t.contraCandidates&&t.contraCandidates.slice(),inferredType:t.inferredType,priority:t.priority,topLevel:t.topLevel,isFixed:t.isFixed,impliedArity:t.impliedArity}}function woe(t,o=0){return t&&ww(Yn(t.inferences,WJ),t.signature,t.flags|o,t.compareTypes)}function wy(t){return!!(t.candidates||t.contraCandidates)}function Roe(t){let o=Ar(t.inferences,wy);return o.length?ww(Yn(o,WJ),t.signature,t.flags,t.compareTypes):void 0}function kw(t,o,s,l,d){let p=yi(o.typeParameters,z=>!!Gm(z)),h=iu(t,p?8:0);if(h){let z=$i(o);if(Bu(z)){let re=tT(t);if(!(!p&&iu(t,8)!==h)){let pn=JJ(woe(re,1)),Kn=or(h,pn),Nn=Up(Kn),it=Nn&&Nn.typeParameters?RC(Mw(Nn,Nn.typeParameters)):Kn;Mp(d.inferences,it,z,128)}let _e=rD(o.typeParameters,o,d.flags),on=or(h,re&&re.returnMapper);Mp(_e.inferences,on,z),d.returnMapper=Pn(_e.inferences,wy)?JJ(Roe(_e)):void 0}}let x=x_(o),I=x?Math.min(qc(o)-1,s.length):s.length;if(x&&x.flags&262144){let z=Sr(d.inferences,re=>re.typeParameter===x);z&&(z.impliedArity=zc(s,ek,I)<0?s.length-I:void 0)}let B=Pl(o);B&&Bu(B)&&console.debug("todo - inferTypeArguments thisType");for(let z=0;z<I;z++){let re=s[z];if(re.kind!==297){let pe=vd(o,z);if(Bu(pe)){let _e=SC(re,pe,d,l);Mp(d.inferences,_e,pe)}}}if(x&&Bu(x)){let z=vw(s,I,s.length,x,d,l);Mp(d.inferences,z,x)}return G6(d)}function vw(t,o,s,l,d,p){if(o>=s-1){let z=t[s-1];if(ek(z)){let re=SC(z.expression,l,d,p);return rg(re)?jJ(re):Na(Gp(33,re,fr,z.kind===294?z.expression:z),!1)}else return cs(z)}let x=[],I=[],B=[];for(let z=o;z<s;z++){let re=t[z];if(ek(re)){let pe=ni(re.expression);rg(pe)?(x.push(pe),I.push(8)):(x.push(Gp(33,pe,fr,re.kind===294?re.expression:re)),I.push(4))}else{let pe=ou(l,rl(z-o),256),_e=SC(re,pe,d,p),on=vo(pe,406978492);x.push(on?ba(_e):Sy(_e)),I.push(1)}re.kind===275&&re.tupleNameSource?B.push(re.tupleNameSource):B.push(void 0)}return mf(x,I,!1,B)}function mf(t,o,s=!1,l=[]){let d=Fw(o||Yn(t,p=>1),s,l);return d===As?Bo:t.length?UA(d,t):d}function Fw(t,o,s){if(t.length===1&&t[0]&4)return o?Ue:Y;let l=Yn(t,p=>p&1?"#":p&2?"?":p&4?".":"*").join()+(o?"R":"")+(Pn(s,p=>!!p)?","+Yn(s,p=>p?ys(p):"_").join(","):""),d=Ko.get(l);return d||Ko.set(l,d=Ooe(t,o,s)),d}function Ooe(t,o,s){let l=t.length,d=Zf(t,re=>!!(re&9)),p,h=[],x=0;if(l){p=new Array(l);for(let re=0;re<l;re++){let pe=p[re]=kl(),_e=t[re];if(x|=_e,!(x&12)){let on=Fo(4|(_e&2?16777216:0),""+re,o?8:0);on.links.tupleLabelDeclaration=s?.[re],on.links.type=pe,h.push(on)}}}let I=h.length,B=Fo(4,"length",o?8:0);if(x&12)B.links.type=Ht;else{let re=[];for(let pe=d;pe<=l;pe++)re.push(rl(pe));B.links.type=vt(re)}h.push(B);let z=Ku(12);return z.typeParameters=p,z.outerTypeParameters=void 0,z.localTypeParameters=p,z.instantiations=new Map,z.instantiations.set(uc(z.typeParameters),z),z.target=z,z.resolvedTypeArguments=z.typeParameters,z.thisType=kl(),z.thisType.isThisType=!0,z.thisType.constraint=z,z.declaredProperties=h,z.declaredCallSignatures=Re,z.declaredConstructSignatures=Re,z.declaredIndexInfos=Re,z.elementFlags=t,z.minLength=d,z.fixedLength=I,z.hasRestElement=!!(x&12),z.combinedFlags=x,z.readonly=o,z.labeledElementDeclarations=s,z}function Moe(t){return nD(t)||!(t.flags&98305)&&Ui(t,Oi)}function nD(t){return va(t)&&!yT(t)||Bi(t)&&!t.target.readonly}function Bi(t){return!!(dt(t)&4&&t.target.objectFlags&8)}function Boe(t,o,s,l){let d=DE.createSyntheticExpression(o,s,l);return Ea(d,t),xc(d,t),d}function tD(t,o,s,l,d,p,h,x){let I={errors:void 0,skipLogging:!0},B=jZ(s),z=N.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1,re=x_(s),pe=re?Math.min(qc(s)-1,o.length):o.length;for(let on=0;on<pe;on++){let pn=o[on],Kn=vd(s,on),Nn=SC(pn,Kn,void 0,d),it=d&4?UC(Nn):Nn,lt=x?or(it,x.nonFixingMapper):it,Qn=Nw(pn);if(!w4(lt,Kn,l,p?Qn:void 0,Qn,z,h,I))return E.assert(!p||!!I.errors,"parameter should have errors when reporting errors"),_e(pn,lt,Kn),I.errors||Re}if(re){let on=vw(o,pe,o.length,re,void 0,d),pn=o.length-pe,Kn=p?pn===0?t:pn===1?Nw(o[pe]):ns(Boe(t,on),o[pe].pos,o[o.length-1].end):void 0;if(!Zm(on,re,l,Kn,z,void 0,I))return E.assert(!p||!!I.errors,"rest parameter should have errors when reporting errors"),_e(Kn,on,re),I.errors||Re}return;function _e(on,pn,Kn){on&&p&&I.errors&&I.errors.length}}function joe(t){return Md(t)?Ti(t.expression)?t.expression.name:t.expression:t}function ek(t){return!!t&&t.kind===294}function Iw(t){return zc(t,ek)}function nk(t,o,...s){if(ao(t)){let{sourceFile:l,start:d,length:p}=eW(t);return"message"in o?sd(l,d,p,o,...s):MO(l,o)}else return"message"in o?wi(t,o,...s):_h($t(t),t,o)}function UJ(t,o,s,l){let d=Iw(s);if(d>-1)return wi(s[d],N.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);let p=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,B;for(let _e of o){let on=Ju(_e),pn=qc(_e);on<p&&(p=on,B=_e),h=Math.max(h,pn),on<s.length&&on>x&&(x=on),s.length<pn&&pn<I&&(I=pn)}let z=Pn(o,kd),re=z?p:p<h?p+"-"+h:p,pe=z?N.Expected_at_least_0_arguments_but_got_1:N.Expected_0_arguments_but_got_1;if(p<s.length&&s.length<h){if(l){let _e=Pi(void 0,N.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments,s.length,x,I);return _e=Pi(_e,l),nk(t,_e)}return nk(t,N.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments,s.length,x,I)}else if(s.length<p){let _e;if(l){let pn=Pi(void 0,pe,re,s.length);pn=Pi(pn,l),_e=nk(t,pn)}else _e=nk(t,pe,re,s.length);let on=B?.declaration?.parameters[B.thisParameter?s.length+1:s.length];if(on&&!(on.flags&4)){let pn=Po(on.name)?[N.An_argument_matching_this_binding_pattern_was_not_provided]:AD(on)?[N.Arguments_for_the_rest_parameter_0_were_not_provided,ra(wg(on.name))]:[N.An_argument_for_0_was_not_provided,on.name?ra(wg(on.name)):s.length],Kn=wi(on,...pn);return ia(_e,Kn)}return _e}else if(s.length){let _e=Ge.createNodeArray(s.slice(h)),on=Mc(Uo(_e)),pn=Uo(_e).pos,Kn=ta(_e).end;if(Kn===pn&&Kn++,ns(_e,pn,Kn),l){let Nn=Pi(void 0,pe,re,s.length);return Nn=Pi(Nn,l),iE(on,_e,Nn)}return oE(on,_e,pe,re,s.length)}}function KJ(t,o,s,l){let d=wr(t.declaration),p=t.typeParameters,h=Vm(Yn(o,rr),p,lf(p),d),x;for(let I=0;I<o.length;I++){E.assert(p[I]!==void 0,"Should not call checkTypeArguments with too many type arguments");let B=dc(p[I]);if(B){let z=s&&l?()=>Pi(void 0,N.Type_0_does_not_satisfy_the_constraint_1):void 0,re=l||N.Type_0_does_not_satisfy_the_constraint_1;x||(x=ws(p,h));let pe=h[I];if(!Wp(pe,Xm(or(B,x),pe),s?o[I]:void 0,re,z))return}}return h}function qJ(t,o){let s=gr(t.typeParameters),l=lf(t.typeParameters);return!Pn(o)||o.length>=l&&o.length<=s}function Joe(t){return!!(t.flags&49155)}function tk(t,o,s,l=!1){let d,p=!1,h=qc(s),x=Ju(s);if(t.arguments){d=l?o.length+1:o.length,p=!t.arguments.isComplete;let I=Iw(o);if(I>=0)return I>=Ju(s)&&(kd(s)||I<qc(s))}else return E.assert(t.kind===276),Ju(s)===0;if(!kd(s)&&d>h)return!1;if(p||d>=x)return!0;for(let I=d;I<x;I++){let B=vd(s,I);if(ka(B,wr(t)&&!G?Joe:j6).flags&131072)return!1}return!0}function Woe(t){return t.typeParameters?t.implementationSignatureCache||(t.implementationSignatureCache=Uoe(t)):t}function Uoe(t){return t.typeParameters?sT(t,ws([],[])):t}function Lw(t){return{typeParameter:t,candidates:void 0,contraCandidates:void 0,inferredType:void 0,priority:void 0,topLevel:!0,isFixed:!1,impliedArity:void 0}}function rD(t,o,s,l){return ww(t.map(Lw),o,s,l||tu)}function Aw(t){return!!(dt(t)&16512)}function Koe(t){if(t.length>1){let o=Ar(t,Aw);if(o.length){let s=vt(o,2);return Zr(Ar(t,l=>!Aw(l)),[s])}}return t}function ww(t,o,s,l){let d={inferences:t,signature:o,flags:s,compareTypes:l,mapper:nf,nonFixingMapper:nf};return d.mapper=Zoe(d),d.nonFixingMapper=Yoe(d),d}function qoe(t){let o;for(let s of t)if(!(s.flags&131072)){let l=qu(s);if(o??(o=l),l===s||l!==o)return!1}return!0}function VJ(t){return Uu(t,50331648)}function HJ(t,o){let s=o&~t.flags&98304;return s===0?t:s===32768?vt([t,fr]):s===65536?vt([t,De]):vt([t,fr,De])}function zJ(t){return Bl(t,(o,s)=>o|(s.flags&1048576?zJ(s.types):s.flags),0)}function GJ(t){return Bl(t.symbol?.declarations,(o,s)=>o|Df(s),0)&49152}function Voe(t){if(t.length===1)return t[0];let o=G?Za(t,l=>ka(l,d=>!(d.flags&98304))):t,s=qoe(o)?vt(o):Bl(o,(l,d)=>ng(l,d)?d:l);return o===t?s:HJ(s,zJ(t)&98304)}function $J(t){return QJ(t,at(t).typeParameters)}function QJ(t,o=Re){let s=at(t);if(!s.variances){In?.push(In.Phase.CheckTypes,"getVariancesWorker",{arity:o.length,id:Ca(as(t))});let l=Ee,d=ce;Ee||(Ee=!0,ce=ue.length),s.variances=Re;let p=[];for(let h of o){let x=GJ(h),I=x&32768?x&16384?0:1:x&16384?2:void 0;if(I===void 0){let B=!1,z=!1,re=F;F=on=>on?z=!0:B=!0;let pe=KC(t,h,bd),_e=KC(t,h,Cd);I=(Ui(_e,pe)?1:0)|(Ui(pe,_e)?2:0),I===3&&Ui(KC(t,h,xp),pe)&&(I=4),F=re,(B||z)&&(B&&(I|=8),z&&(I|=16))}p.push(I)}l||(Ee=!1,ce=d),s.variances=p,In?.pop({variances:p.map(E.formatVariance)})}return s.variances}function Hoe(t){let o=dc(t);return!!o&&vo(o.flags&16777216?W3(o):o,406978492)}function zoe(t,o){let s=Ic(t);return s?!!s.type&&a_(s.type,o):a_($i(t),o)}function Goe(t,o){let s=Koe(t.candidates),l=Hoe(t.typeParameter),d=!l&&t.topLevel&&(t.isFixed||!zoe(o,t.typeParameter)),p=l?Za(s,ba):d?Za(s,Sy):s,h=t.priority&416?vt(p,2):Voe(p);return sl(h)}function $oe(t){return t.priority&416?Mi(t.contraCandidates):Qoe(t.contraCandidates)}function Qoe(t){return Bl(t,(o,s)=>ng(s,o)?s:o)}function dc(t){return JN(t)?l_(t):void 0}function Rw(t,o){let s=t.inferences[o];if(!s.inferredType){let l,d;if(t.signature){let h=s.candidates?Goe(s,t.signature):void 0,x=s.contraCandidates?$oe(s):void 0;if(h||x){let I=h&&(!x||!(h.flags&131073)&&Pn(s.contraCandidates,B=>Ui(h,B))&&yi(t.inferences,B=>B!==s&&dc(B.typeParameter)!==s.typeParameter||yi(B.candidates,z=>Ui(z,h))));l=I?h:x,d=I?x:h}else if(t.flags&1)l=Br;else{let I=Gm(s.typeParameter);I&&(l=or(I,wZ(AZ(t,o),t.nonFixingMapper)))}}else l=YJ(s);s.inferredType=l||r0(!!(t.flags&2));let p=dc(s.typeParameter);if(p){let h=or(p,t.nonFixingMapper);(!l||!t.compareTypes(l,Xm(h,l)))&&(s.inferredType=d&&t.compareTypes(d,Xm(h,d))?d:h)}}return s.inferredType}function YJ(t){return t.candidates?vt(t.candidates,2):t.contraCandidates?Mi(t.contraCandidates):void 0}function Ow(t,o){return E.attachDebugPrototypeIfDebug({kind:2,sources:t,targets:o})}function Yoe(t){return Ow(Yn(t.inferences,o=>o.typeParameter),Yn(t.inferences,(o,s)=>()=>Rw(t,s)))}function Xoe(t){if(t.intraExpressionInferenceSites){for(let{node:o,type:s}of t.intraExpressionInferenceSites)iu(o,2)&&E.fail("implement me");t.intraExpressionInferenceSites=void 0}}function rk(t){for(let o of t)o.isFixed||(o.inferredType=void 0)}function Zoe(t){return Ow(Yn(t.inferences,o=>o.typeParameter),Yn(t.inferences,(o,s)=>()=>(o.isFixed||(Xoe(t),rk(t.inferences),o.isFixed=!0),Rw(t,s))))}function ik(t,o,s,l){let d=Mw(t,Vm(o,t.typeParameters,lf(t.typeParameters),s));if(l){let p=XJ($i(d));if(p){let h=yC(p);h.typeParameters=l;let x=yC(d);return x.resolvedReturnType=RC(h),x}}return d}function Mw(t,o){let s=t.instantiations||(t.instantiations=new Map),l=uc(o),d=s.get(l);return d||s.set(l,d=ok(t,o)),d}function ok(t,o){return sT(t,eae(t,o),!0)}function eae(t,o){return ws(Za(t.typeParameters,s=>s.mapper?or(s,s.mapper):s),o)}function XJ(t){return u_(t,0,!1)||u_(t,1,!1)}function ZJ(t,o,s,l,d,p){let B=!W&&!s,z;Gq(t)||(z=t.typeArguments,t.expression.kind!==71&&Bn(z,Bt));let re=s||[];Soe(o,re,d),E.assert(re.length,"Revert #54442 and add a testcase with whatever triggered this");let pe=gN(t),_e=re.length===1&&!re[0].typeParameters,on=!_e&&Pn(pe,ol)?4:0,pn,Kn,Nn,it,lt=!!(l&16)&&t.kind===272&&t.arguments.hasTrailingComma;if(re.length>1&&(it=Ct(re,Dl,_e,lt)),it||(it=Ct(re,sc,_e,lt)),it)return it;if(it=_oe(t,re,pe,!!s,l),Wt(t).resolvedSignature=it,B)if(pn)if(pn.length===1||pn.length>3){let Rt=pn[pn.length-1],Fr;pn.length>3&&(Fr=Pi(Fr,N.The_last_overload_gave_the_following_error),Fr=Pi(Fr,N.No_overload_matches_this_call)),p&&(Fr=Pi(Fr,p));let Wr=tD(t,pe,Rt,sc,0,!0,()=>Fr,void 0);if(Wr)for(let jo of Wr)Rt.declaration&&pn.length>3&&ia(jo,wi(Rt.declaration,N.The_last_overload_is_declared_here)),Qn(Rt,jo),Zn.add(jo);else E.fail("No error for last overload signature")}else{let Rt=[],Fr=0,Wr=Number.MAX_VALUE,jo=0,go=0;for(let $a of pn){let je=tD(t,pe,$a,sc,0,!0,()=>Pi(void 0,N.Overload_0_of_1_2_gave_the_following_error,go+1,re.length,d_($a)),void 0);je?(je.length<=Wr&&(Wr=je.length,jo=go),Fr=Math.max(Fr,je.length),Rt.push(je)):E.fail("No error for 3 or fewer overload signatures"),go++}let oi=Fr>1?Rt[jo]:mu(Rt);E.assert(oi.length>0,"No errors reported for 3 or fewer overload signatures");let So=Pi(Yn(oi,X9),N.No_overload_matches_this_call);p&&(So=Pi(So,p));let Ir=[...Oo(oi,$a=>$a.relatedInformation)],ls;if(yi(oi,$a=>$a.start===oi[0].start&&$a.length===oi[0].length&&$a.file===oi[0].file)){let{file:$a,start:an,length:je}=oi[0];ls={file:$a,start:an,length:je,code:So.code,category:So.category,messageText:So,relatedInformation:Ir}}else ls=_h($t(t),joe(t),So,Ir);Qn(pn[0],ls),Zn.add(ls)}else if(Kn)Zn.add(UJ(t,[Kn],pe,p));else if(Nn)KJ(Nn,t.typeArguments,!0,p);else{let Rt=Ar(o,Fr=>qJ(Fr,z));Rt.length===0?Zn.add(nae(t,o,z,p)):Zn.add(UJ(t,Rt,pe,p))}return it;function Qn(Rt,Fr){let Wr=pn,jo=Kn,go=Nn,oi=Rt.declaration?.symbol?.declarations||Re,Ir=oi.length>1?Sr(oi,ls=>$c(ls)&&lm(ls.body)):void 0;if(Ir){let ls=to(Ir),$a=!ls.typeParameters;Ct([ls],sc,$a)&&ia(Fr,wi(Ir,N.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible))}pn=Wr,Kn=jo,Nn=go}function Ct(Rt,Fr,Wr,jo=!1){if(pn=void 0,Kn=void 0,Nn=void 0,Wr){let go=Rt[0];if(Pn(z)||!tk(t,pe,go,jo))return;if(tD(t,pe,go,Fr,0,!1,void 0,void 0)){pn=[go];return}return go}for(let go=0;go<Rt.length;go++){let oi=Rt[go];if(!qJ(oi,z)||!tk(t,pe,oi,jo))continue;let So,Ir;if(oi.typeParameters){let $a=oi.typeParameters[0].symbol.declarations?.[0]?.parent||(oi.declaration&&vh(oi.declaration)?oi.declaration.parent:oi.declaration);$a&&er(t,je=>je===$a)&&(oi=Woe(oi));let an;if(Pn(z)){if(an=KJ(oi,z,!1),!an){Nn=oi;continue}}else Ir=rD(oi.typeParameters,oi,wr(t)?2:0),an=au(kw(t,oi,pe,on|8,Ir),Ir.nonFixingMapper),on|=Ir.flags&4?8:0;if(So=ik(oi,an,wr(oi.declaration),Ir&&Ir.inferredTypeParameters),x_(oi)&&!tk(t,pe,So,jo)){Kn=So;continue}}else So=oi;if(tD(t,pe,So,Fr,on,!1,void 0,Ir)){(pn||(pn=[])).push(So);continue}if(on){if(on=0,Ir){let ls=au(kw(t,oi,pe,on,Ir),Ir.mapper);if(So=ik(oi,ls,wr(oi.declaration),Ir.inferredTypeParameters),x_(oi)&&!tk(t,pe,So,jo)){Kn=So;continue}}if(tD(t,pe,So,Fr,on,!1,void 0,Ir)){(pn||(pn=[])).push(So);continue}}return Rt[go]=So,So}}}function nae(t,o,s,l){let d=s.length;if(o.length===1){let x=o[0],I=lf(x.typeParameters),B=gr(x.typeParameters);if(l){let z=Pi(void 0,N.Expected_0_type_arguments_but_got_1,I<B?I+"-"+B:I,d);return z=Pi(z,l),iE($t(t),s,z)}return oE($t(t),s,N.Expected_0_type_arguments_but_got_1,I<B?I+"-"+B:I,d)}let p=-1/0,h=1/0;for(let x of o){let I=lf(x.typeParameters),B=gr(x.typeParameters);I>d?h=Math.min(h,I):B<d&&(p=Math.max(p,B))}if(p!==-1/0&&h!==1/0){if(l){let x=Pi(void 0,N.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments,d,p,h);return x=Pi(x,l),iE($t(t),s,x)}return oE($t(t),s,N.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments,d,p,h)}if(l){let x=Pi(void 0,N.Expected_0_type_arguments_but_got_1,p===-1/0?h:p,d);return x=Pi(x,l),iE($t(t),s,x)}return oE($t(t),s,N.Expected_0_type_arguments_but_got_1,p===-1/0?h:p,d)}function tae(t,o,s){let l,d=s===0;if(o.flags&1048576){let h=o.types,x=!1;for(let I of h)if(ro(I,s).length!==0){if(x=!0,l)break}else if(l||(l=Pi(l,d?N.Type_0_has_no_call_signatures:N.Type_0_has_no_construct_signatures,_t(I)),l=Pi(l,d?N.Not_all_constituents_of_type_0_are_callable:N.Not_all_constituents_of_type_0_are_constructable,_t(o))),x)break;x||(l=Pi(void 0,d?N.No_constituent_of_type_0_is_callable:N.No_constituent_of_type_0_is_constructable,_t(o))),l||(l=Pi(l,d?N.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:N.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other,_t(o)))}else l=Pi(l,d?N.Type_0_has_no_call_signatures:N.Type_0_has_no_construct_signatures,_t(o));let p=d?N.This_expression_is_not_callable:N.This_expression_is_not_constructable;return{messageChain:Pi(l,p),relatedMessage:void 0}}function eW(t){let o=Mc(t),{start:s,length:l}=gF(o,Ti(t.expression)?t.expression.name:t.expression);return{start:s,length:l,sourceFile:o}}function rae(t,o,s){t.symbol}function iae(t,o,s,l){let{messageChain:d,relatedMessage:p}=tae(t,o,s),h=_h(Mc(t),t,d);if(p&&ia(h,wi(t,p)),ao(t.parent)){let{start:x,length:I}=eW(t.parent);h.start=x,h.length=I}Zn.add(h),rae(o,s,l?ia(h,l):h)}function Bw(t,o){if(t.flags&3670016){let s=Wu(t);return o===0?s.callSignatures:s.constructSignatures}return Re}function Ry(t,o){return t.flags&1048576?Bn(t.types,o):o(t)}function Id(t,o){return t.flags&1048576?Pn(t.types,o):o(t)}function Vc(t,o){return t.flags&1048576?yi(t.types,o):o(t)}function d_e(t,o){return t.flags&3145728?yi(t.types,o):o(t)}function oae(t){return!t||!Y.symbol||!Ue.symbol?!1:!!zm(t,Y.symbol)||!!zm(t,Ue.symbol)}function ro(t,o){let s=Bw(Mm(t),o);if(o===0&&!gr(s)&&t.flags&1048576){if(t.arrayFallbackSignatures)return t.arrayFallbackSignatures;let l;Vc(t,d=>!!d.symbol?.parent&&oae(d.symbol.parent)&&(l?l===d.symbol.name:(l=d.symbol.name,!0)))&&E.fail("TODO - implement me - getSignaturesOfType"),t.arrayFallbackSignatures=s}return s||Re}function ak(t){return _N(t),Wc}function aae(t,o,s){switch(t.kind){case 272:return hoe(t,o,s);case 276:return sae(t,o,s);case 283:return Toe(t,o,s);case 269:E.fail("implement me")}E.assertNever(t,"Branch in 'resolveSignature' should be unreachable.")}function sae(t,o,s){let l=t.expression&&Tc(t.expression)?Qm(t.expression):wt;if(l===Br)return _d;if(l=Ha(l),da(l))return ak(t);if(Ms(l))return t.typeArguments&&hn(t,N.Untyped_function_calls_may_not_accept_type_arguments),_N(t);console.debug("TODO - implement me - resolveNewExpression")}function cae(t){if(t&&t.kind===175)return Il(t.name,2208703)}function nW(t,o){let s=er(t,Cg);if(s){let d=t;do Wt(d).skipDirectInference=!0,d=d.parent;while(d&&d!==s)}W=!0;let l=jw(t,o);if(W=!1,s){let d=t;do Wt(d).skipDirectInference=void 0,d=d.parent;while(d&&d!==s)}return l}function jw(t,o){if(t=er(t,pO),t){let s=[],l=[];for(;t;){let p=Wt(t);if(s.push([p,p.resolvedSignature]),p.resolvedSignature=void 0,MD(t)){let h=at(rt(t)),x=h.type;l.push([h,x]),h.type=void 0}t=er(t.parent,pO)}let d=o();for(let[p,h]of s)p.resolvedSignature=h;for(let[p,h]of l)p.type=h;return d}return o()}}var i2=class{};function ys(e){return e.id||(e.id=VH,VH++),e.id}function nz(){this.flags=0}function so(e){return e.id||(e.id=qH,qH++),e.id}function GH(e){if(e.parent)switch(e.parent.kind){default:return ql(e)}}var vI=class e{constructor(n,r,i){this.moduleResolverHost=void 0;this.inner=void 0;this.disableTrackSymbol=!1;for(;r instanceof e;)r=r.inner;this.inner=r,this.moduleResolverHost=i,this.context=n,this.canTrackSymbol=!!this.inner?.trackSymbol}trackSymbol(n,r,i){var a;if(this.inner?.trackSymbol&&!this.disableTrackSymbol){if(this.inner.trackSymbol(n,r,i))return this.onDiagnosticReported(),!0;n.flags&262144||((a=this.context).trackedSymbols??(a.trackedSymbols=[])).push([n,r,i])}return!1}reportInaccessibleThisError(){this.inner?.reportInaccessibleThisError&&(this.onDiagnosticReported(),this.inner.reportInaccessibleThisError())}reportPrivateInBaseOfClassExpression(n){this.inner?.reportPrivateInBaseOfClassExpression&&(this.onDiagnosticReported(),this.inner.reportPrivateInBaseOfClassExpression(n))}reportInaccessibleUniqueSymbolError(){this.inner?.reportInaccessibleUniqueSymbolError&&(this.onDiagnosticReported(),this.inner.reportInaccessibleUniqueSymbolError())}reportCyclicStructureError(){this.inner?.reportCyclicStructureError&&(this.onDiagnosticReported(),this.inner.reportCyclicStructureError())}reportLikelyUnsafeImportRequiredError(n){this.inner?.reportLikelyUnsafeImportRequiredError&&(this.onDiagnosticReported(),this.inner.reportLikelyUnsafeImportRequiredError(n))}reportTruncationError(){this.inner?.reportTruncationError&&(this.onDiagnosticReported(),this.inner.reportTruncationError())}reportNonlocalAugmentation(n,r,i){this.inner?.reportNonlocalAugmentation&&(this.onDiagnosticReported(),this.inner.reportNonlocalAugmentation(n,r,i))}reportNonSerializableProperty(n){this.inner?.reportNonSerializableProperty&&(this.onDiagnosticReported(),this.inner.reportNonSerializableProperty(n))}onDiagnosticReported(){this.context.reportedDiagnostic=!0}reportInferenceFallback(n){this.inner?.reportInferenceFallback&&this.inner.reportInferenceFallback(n)}};function Ife(e){return{getCommonSourceDirectory:e.getCommonSourceDirectory?()=>e.getCommonSourceDirectory():()=>"",getCurrentDirectory:()=>e.getCurrentDirectory(),useCaseSensitiveFileNames:Ta(e,e.useCaseSensitiveFileNames),fileExists:n=>e.fileExists(n),getFileIncludeReasons:()=>e.getFileIncludeReasons(),readFile:e.readFile?n=>e.readFile(n):void 0}}function Sl(e){return!!(e.flags&1)}var Lfe=new Map(Object.entries({string:256,number:512,bigint:1024,boolean:2048,symbol:4096,undefined:524288,object:8192,function:16384}));function $H(e){return!!(e.flags&2)}function Afe(e){return!!(e.flags&16)}var Mo="/",wfe="\\",az="://",Rfe=/\\/g;function Ofe(e){return e===47||e===92}function vs(e){return wI(e)>0}function AI(e){let n=wI(e);return n>0&&n===e.length}function LM(e){return wI(e)!==0}function dh(e){return/^\.\.?($|[\\/])/.test(e)}function bm(e){return hs(e).includes(".")}function qs(e,n){return E.assertIsDefined(e),e.length>n.length&&Ps(e,n)}function oI(e,n){for(let r of n)if(qs(e,r))return!0;return!1}function s2(e){return e.length>0&&Ofe(e.charCodeAt(e.length-1))}function sz(e){return e>=97&&e<=122||e>=65&&e<=90}function Mfe(e,n){let r=e.charCodeAt(n);if(r===58)return n+1;if(r===37&&e.charCodeAt(n+1)===51){let i=e.charCodeAt(n+2);if(i===97||i===65)return n+3}return-1}function wI(e){if(!e)return 0;let n=e.charCodeAt(0);if(n===47||n===92){if(e.charCodeAt(1)!==n)return 1;let i=e.indexOf(n===47?Mo:wfe,2);return i<0?e.length:i+1}if(sz(n)&&e.charCodeAt(1)===58){let i=e.charCodeAt(2);if(i===47||i===92)return 3;if(e.length===2)return 2}let r=e.indexOf(az);if(r!==-1){let i=r+az.length,a=e.indexOf(Mo,i);if(a!==-1){let c=e.slice(0,r),u=e.slice(i,a);if(c==="file"&&(u===""||u==="localhost")&&sz(e.charCodeAt(a+1))){let f=Mfe(e,a+2);if(f!==-1){if(e.charCodeAt(f)===47)return~(f+1);if(f===e.length)return~f}}return~(a+1)}return~e.length}return 0}function Eu(e){let n=wI(e);return n<0?~n:n}function ei(e){e=Cc(e);let n=Eu(e);return n===e.length?e:(e=Cm(e),e.slice(0,Math.max(n,e.lastIndexOf(Mo))))}function hs(e,n,r){if(e=Cc(e),Eu(e)===e.length)return"";e=Cm(e);let a=e.slice(Math.max(Eu(e),e.lastIndexOf(Mo)+1)),c=n!==void 0&&r!==void 0?EE(a,n,r):void 0;return c?a.slice(0,a.length-c.length):a}function cz(e,n,r){if(Eo(n,".")||(n="."+n),e.length>=n.length&&e.charCodeAt(e.length-n.length)===46){let i=e.slice(e.length-n.length);if(r(i,n))return i}}function Bfe(e,n,r){if(typeof n=="string")return cz(e,n,r)||"";for(let i of n){let a=cz(e,i,r);if(a)return a}return""}function EE(e,n,r){if(n)return Bfe(Cm(e),n,r?bf:cg);let i=hs(e),a=i.lastIndexOf(".");return a>=0?i.substring(a):""}function jfe(e,n){let r=e.substring(0,n),i=e.substring(n).split(Mo);return i.length&&!Vo(i)&&i.pop(),[r,...i]}function ku(e,n=""){return e=fi(n,e),jfe(e,Eu(e))}function lb(e,n){return e.length===0?"":(e[0]&&Lf(e[0]))+e.slice(1,n).join(Mo)}function Cc(e){return e.includes("\\")?e.replace(Rfe,Mo):e}function Ih(e){if(!Pn(e))return[];let n=[e[0]];for(let r=1;r<e.length;r++){let i=e[r];if(i&&i!=="."){if(i===".."){if(n.length>1){if(n[n.length-1]!==".."){n.pop();continue}}else if(n[0])continue}n.push(i)}}return n}function fi(e,...n){e&&(e=Cc(e));for(let r of n)r&&(r=Cc(r),!e||Eu(r)!==0?e=r:e=Lf(e)+r);return e}function mp(e,...n){return Qr(Pn(n)?fi(e,...n):Cc(e))}function Zx(e,n){return Ih(ku(e,n))}function Di(e,n){return lb(Zx(e,n))}function Qr(e){if(e=Cc(e),!LI.test(e))return e;let n=e.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(n!==e&&(e=n,!LI.test(e)))return e;let r=lb(Ih(ku(e)));return r&&s2(e)?Lf(r):r}function Jfe(e){return e.length===0?"":e.slice(1).join(Mo)}function c2(e,n){return Jfe(Zx(e,n))}function Aa(e,n,r){let i=vs(e)?Qr(e):Di(e,n);return r(i)}function Cm(e){return s2(e)?e.substr(0,e.length-1):e}function Lf(e){return s2(e)?e:e+Mo}var LI=/(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/;function Wfe(e,n,r){if(e===n)return 0;if(e===void 0)return-1;if(n===void 0)return 1;let i=e.substring(0,Eu(e)),a=n.substring(0,Eu(n)),c=W1(i,a);if(c!==0)return c;let u=e.substring(i.length),f=n.substring(a.length);if(!LI.test(u)&&!LI.test(f))return r(u,f);let m=Ih(ku(e)),y=Ih(ku(n)),g=Math.min(m.length,y.length);for(let S=1;S<g;S++){let _=r(m[S],y[S]);if(_!==0)return _}return io(m.length,y.length)}function eb(e,n,r,i){return typeof r=="string"?(e=fi(r,e),n=fi(r,n)):typeof r=="boolean"&&(i=r),Wfe(e,n,Q_(i))}function fp(e,n,r,i){if(typeof r=="string"?(e=fi(r,e),n=fi(r,n)):typeof r=="boolean"&&(i=r),e===void 0||n===void 0)return!1;if(e===n)return!0;let a=Ih(ku(e)),c=Ih(ku(n));if(c.length<a.length)return!1;let u=i?bf:cg;for(let f=0;f<a.length;f++)if(!(f===0?bf:u)(a[f],c[f]))return!1;return!0}function lz(e,n,r,i){let a=Ih(ku(e)),c=Ih(ku(n)),u;for(u=0;u<a.length&&u<c.length;u++){let y=i(a[u]),g=i(c[u]);if(!(u===0?bf:r)(y,g))break}if(u===0)return c;let f=c.slice(u),m=[];for(;u<a.length;u++)m.push("..");return["",...m,...f]}function AE(e,n,r){E.assert(Eu(e)>0==Eu(n)>0,"Paths must either both be absolute or both be relative");let c=lz(e,n,(typeof r=="boolean"?r:!1)?bf:cg,typeof r=="function"?r:Ci);return lb(c)}function l2(e,n,r){return vs(e)?RI(n,e,n,r,!1):e}function RI(e,n,r,i,a){let c=lz(mp(r,e),mp(r,n),cg,i),u=c[0];if(a&&vs(u)){let f=u.charAt(0)===Mo?"file://":"file:///";c[0]=f+u}return lb(c)}function CI(e,n){for(;;){let r=n(e);if(r!==void 0)return r;let i=ei(e);if(i===e)return;e=i}}function wE(e){return Ps(e,"/node_modules")}function jc(e,n,r,i){if(e===void 0)return e;let a=n(e),c;if(a!==void 0)return Nr(a)?c=(i||Kfe)(a):c=a,E.assertNode(c,r),c}function Vg(e,n,r,i,a){if(e===void 0)return e;let c=e.length;(i===void 0||i<0)&&(i=0),(a===void 0||a>c-i)&&(a=c-i);let u,f=-1,m=-1;i>0||a<c?u=e.hasTrailingComma&&i+a===c:(f=e.pos,m=e.end,u=e.hasTrailingComma);let y=Ufe(e,n,r,i,a);if(y!==e){let g=Ge.createNodeArray(y,u);return ns(g,f,m),g}return e}function Ufe(e,n,r,i,a){let c,u=e.length;(i>0||a<u)&&(c=[]);for(let f=0;f<a;f++){let m=e[f+i],y=m!==void 0?n?n(m):m:void 0;if((c!==void 0||y===void 0||y!==m)&&(c===void 0&&(c=e.slice(0,f),E.assertEachNode(c,r)),y))if(Nr(y))for(let g of y)E.assertNode(g,r),c.push(g);else E.assertNode(y,r),c.push(y)}return c||(E.assertEachNode(e,r),e)}function Kfe(e){return E.assert(e.length<=1,"Too many nodes written to output."),AT(e)}function Hg(e,n,r=ub,i=Vg,a,c=jc){if(e===void 0)return;let u=void 0;return u===void 0?e:u(e,n,r,i,c,a)}var qfe=/^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/,Vfe=/^\s*(\/\/[@#] .*)?$/;function OI(e,n){return{getLineCount:()=>n.length,getLineText:r=>e.substring(n[r],n[r+1])}}function fz(e){for(let n=e.getLineCount()-1;n>=0;n--){let r=e.getLineText(n),i=qfe.exec(r);if(i)return i[1].trimEnd();if(!r.match(Vfe))break}}function Hfe(e){return typeof e=="string"||e===null}function zfe(e){return e!==null&&typeof e=="object"&&e.version===3&&typeof e.file=="string"&&typeof e.mappings=="string"&&Nr(e.sources)&&yi(e.sources,gi)&&(e.sourceRoot===void 0||e.sourceRoot===null||typeof e.sourceRoot=="string")&&(e.sourcesContent===void 0||e.sourcesContent===null||Nr(e.sourcesContent)&&yi(e.sourcesContent,Hfe))&&(e.names===void 0||e.names===null||Nr(e.names)&&yi(e.names,gi))}function pz(e){try{let n=JSON.parse(e);if(zfe(n))return n}catch{}}function Gfe(e){let n=!1,r=0,i=0,a=0,c=0,u=0,f=0,m=0,y;return{get pos(){return r},get error(){return y},get state(){return g(!0,!0)},next(){for(;!n&&r<e.length;){let F=e.charCodeAt(r);if(F===59){i++,a=0,r++;continue}if(F===44){r++;continue}let M=!1,J=!1;if(a+=W(),v())return S();if(a<0)return b("Invalid generatedCharacter found");if(!T()){if(M=!0,c+=W(),v())return S();if(c<0)return b("Invalid sourceIndex found");if(T())return b("Unsupported Format: No entries after sourceIndex");if(u+=W(),v())return S();if(u<0)return b("Invalid sourceLine found");if(T())return b("Unsupported Format: No entries after sourceLine");if(f+=W(),v())return S();if(f<0)return b("Invalid sourceCharacter found");if(!T()){if(J=!0,m+=W(),v())return S();if(m<0)return b("Invalid nameIndex found");if(!T())return b("Unsupported Error Format: Entries after nameIndex")}}return{value:g(M,J),done:n}}return S()},[Symbol.iterator](){return this}};function g(F,M){return{generatedLine:i,generatedCharacter:a,sourceIndex:F?c:void 0,sourceLine:F?u:void 0,sourceCharacter:F?f:void 0,nameIndex:M?m:void 0}}function S(){return n=!0,{value:void 0,done:!0}}function _(F){y===void 0&&(y=F)}function b(F){return _(F),S()}function v(){return y!==void 0}function T(){return r===e.length||e.charCodeAt(r)===44||e.charCodeAt(r)===59}function W(){let F=!0,M=0,J=0;for(;F;r++){if(r>=e.length)return _("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;let A=Qfe(e.charCodeAt(r));if(A===-1)return _("Invalid character in VLQ"),-1;F=(A&32)!==0,J=J|(A&31)<<M,M+=5}return J&1?(J=J>>1,J=-J):J=J>>1,J}}function $fe(e){return e.sourceIndex!==void 0&&e.sourceLine!==void 0&&e.sourceCharacter!==void 0}function Qfe(e){return e>=65&&e<=90?e-65:e>=97&&e<=122?e-97+26:e>=48&&e<=57?e-48+52:e===43?62:e===47?63:-1}function uz(e){return e.sourceIndex!==void 0&&e.sourcePosition!==void 0}function dz(e,n){return e.generatedPosition===n.generatedPosition&&e.sourceIndex===n.sourceIndex&&e.sourcePosition===n.sourcePosition}function Yfe(e,n){return E.assert(e.sourceIndex===n.sourceIndex),io(e.sourcePosition,n.sourcePosition)}function Xfe(e,n){return io(e.generatedPosition,n.generatedPosition)}function Zfe(e){return e.sourcePosition}function epe(e){return e.generatedPosition}function mz(e,n,r){let i=ei(r),a=n.sourceRoot?Di(n.sourceRoot,i):i,c=Di(n.file,i),u=e.getSourceFileLike(c),f=n.sources.map(M=>Di(M,a)),m=new Map(f.map((M,J)=>[e.getCanonicalFileName(M),J])),y,g,S;return{getSourcePosition:F,getGeneratedPosition:W};function _(M){let J=u!==void 0?Kv(u,M.generatedLine,M.generatedCharacter,!0):-1,A,V;if($fe(M)){let ue=e.getSourceFileLike(f[M.sourceIndex]);A=n.sources[M.sourceIndex],V=ue!==void 0?Kv(ue,M.sourceLine,M.sourceCharacter,!0):-1}return{generatedPosition:J,source:A,sourceIndex:M.sourceIndex,sourcePosition:V,nameIndex:M.nameIndex}}function b(){if(y===void 0){let M=Gfe(n.mappings),J=oo(M,_);M.error!==void 0?(e.log&&e.log(`Encountered error while decoding sourcemap: ${M.error}`),y=Re):y=J}return y}function v(M){if(S===void 0){let J=[];for(let A of b()){if(!uz(A))continue;let V=J[A.sourceIndex];V||(J[A.sourceIndex]=V=[]),V.push(A)}S=J.map(A=>wT(A,Yfe,dz))}return S[M]}function T(){if(g===void 0){let M=[];for(let J of b())M.push(J);g=wT(M,Xfe,dz)}return g}function W(M){let J=m.get(e.getCanonicalFileName(M.fileName));if(J===void 0)return M;let A=v(J);if(!Pn(A))return M;let V=kT(A,M.pos,Zfe,io);V<0&&(V=~V);let ue=A[V];return ue===void 0||ue.sourceIndex!==J?M:{fileName:c,pos:ue.generatedPosition}}function F(M){let J=T();if(!Pn(J))return M;let A=kT(J,M.pos,epe,io);A<0&&(A=~A);let V=J[A];return V===void 0||!uz(V)?M:{fileName:f[V.sourceIndex],pos:V.sourcePosition}}}var u2={getSourcePosition:Ci,getGeneratedPosition:Ci};var Pm={ConfigFile:"Config file",ExtendedConfigFile:"Extended config file",SourceFile:"Source file",MissingFile:"Missing file",WildcardDirectory:"Wild card directory",FailedLookupLocations:"Failed Lookup Locations",AffectingFileLocation:"File location affecting resolution",TypeRoots:"Type roots",ConfigFileOfReferencedProject:"Config file of referened project",ExtendedConfigOfReferencedProject:"Extended config file of referenced project",WildcardDirectoryOfReferencedProject:"Wild card directory of referenced project",PackageJson:"package.json file",ClosedScriptInfo:"Closed Script info",ConfigFileForInferredRoot:"Config file for the inferred project root",NodeModules:"node_modules for closed script infos and package.jsons affecting module specifier cache",MissingSourceMapFile:"Missing source map file",NoopConfigFileForInferredRoot:"Noop Config file for the inferred project root",MissingGeneratedFile:"Missing generated file",NodeModulesForModuleSpecifierCache:"node_modules for module specifier cache invalidation",TypingInstallerLocationFile:"File location for typing installer",TypingInstallerLocationDirectory:"Directory location for typing installer"};function RE(e,n){let r=gi(e)?e:e.fileName;return n?n(r):r}function gz(e,n){let r=e.getFileIncludeReasons(),i=a=>l2(a,e.getCurrentDirectory(),e.getCanonicalFileName);for(let a of e.getSourceFiles())n(`${RE(a,i)}`),r.get(a.path)?.forEach(c=>n(` ${m2(e,c,i).messageText}`)),d2(a,i)?.forEach(c=>n(` ${c.messageText}`))}var db={close:Vi},OE=()=>db;function d2(e,n){let r;if(e.path!==e.resolvedPath&&(r??(r=[])).push(Pi(void 0,N.File_is_output_of_project_reference_source_0,RE(e.originalFileName,n))),yF(e))switch(e.impliedNodeFormat){}return r}function f2(e,n){let r=e.getCompilerOptions().configFile;if(!r?.configFileSpecs?.validatedFilesSpec)return;let i=e.getCanonicalFileName(n),a=ei(Di(r.fileName,e.getCurrentDirectory())),c=zc(r.configFileSpecs.validatedFilesSpec,u=>e.getCanonicalFileName(Di(u,a))===i);return c!==-1?r.configFileSpecs.validatedFilesSpecBeforeSubstitution[c]:void 0}function p2(e,n){let r=e.getCompilerOptions().configFile;if(!r?.configFileSpecs?.validatedIncludeSpecs)return;if(r.configFileSpecs.isDefaultIncludeSpec)return!0;let i=qs(n,".json"),a=ei(Di(r.fileName,e.getCurrentDirectory())),c=e.useCaseSensitiveFileNames(),u=zc(r?.configFileSpecs?.validatedIncludeSpecs,f=>{if(i&&!Ps(f,".json"))return!1;let m=Jq(f,a,"files");return!!m&&vg(`(${m})$`,c).test(n)});return u!==-1?r.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[u]:void 0}function m2(e,n,r){let i=e.getCompilerOptions();if(gp(n)){let a=SS(e,n),c=Lh(a)?a.file.text.substring(a.pos,a.end):`"${a.text}"`,u;switch(E.assert(Lh(a)||n.kind===4,"Only synthetic references are imports"),n.kind){case 4:Lh(a)?u=N.Imported_via_0_from_file_1:u=N.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions;break;case 5:E.assert(!a.packageId),u=N.Referenced_via_0_from_file_1;break;case 6:case 8:E.assert(!a.packageId),u=N.Library_referenced_via_0_from_file_1;break;default:E.assertNever(n)}return Pi(void 0,u,c,RE(a.file,r),a.packageId&&Ig(a.packageId))}switch(n.kind){case 0:if(!i.configFile?.configFileSpecs)return Pi(void 0,N.Root_file_specified_for_compilation);let a=Di(e.getRootFileNames()[n.index],e.getCurrentDirectory());if(f2(e,a))return Pi(void 0,N.Part_of_files_list_in_lpcconfig_json);let u=p2(e,a);return gi(u)?Pi(void 0,N.Matched_by_include_pattern_0_in_1,u,RE(i.configFile,r)):Pi(void 0,u?N.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:N.Root_file_specified_for_compilation);case 2:case 3:let f=n.kind===3,m=E.checkDefined(e.getResolvedProjectReferences()?.[n.index]);return Pi(void 0,i.outFile?f?N.Output_from_referenced_project_0_included_because_1_specified:N.Source_from_referenced_project_0_included_because_1_specified:f?N.Output_from_referenced_project_0_included_because_module_is_specified_as_none:N.Source_from_referenced_project_0_included_because_module_is_specified_as_none,RE(m.sourceFile.fileName,r),i.outFile?"--outFile":"--out");case 7:{if(n.index!==void 0)return Pi(void 0,N.Library_0_specified_in_compilerOptions,i.lib[n.index]);let y=YF(Hl(i)),g=y?[N.Default_library_for_target_0,y]:[N.Default_library];return Pi(void 0,...g)}default:E.fail("Unknown include kind")}}var i7e=ho?{getCurrentDirectory:()=>ho.getCurrentDirectory(),getNewLine:()=>ho.newLine,getCanonicalFileName:na(ho.useCaseSensitiveFileNames)}:void 0;function ME(e){let n=e?.fallbackPolling;return{watchFile:n!==void 0?n:1}}function Nm(e){e.watcher.close()}function g2(e,n,r){if(!e.getDirectories||!e.readDirectory)return;let i=new Map,a=na(r);return{useCaseSensitiveFileNames:r,fileExists:b,readFile:(ye,he)=>e.readFile(ye,he),directoryExists:e.directoryExists&&v,getDirectories:W,readDirectory:F,createDirectory:e.createDirectory&&T,writeFile:e.writeFile&&_,addOrDeleteFileOrDirectory:J,addOrDeleteFile:A,clearCache:ue,realpath:e.realpath&&M};function c(ye){return Aa(ye,n,a)}function u(ye){return i.get(Lf(ye))}function f(ye){let he=u(ei(ye));return he&&(he.sortedAndCanonicalizedFiles||(he.sortedAndCanonicalizedFiles=he.files.map(a).sort(),he.sortedAndCanonicalizedDirectories=he.directories.map(a).sort()),he)}function m(ye){return hs(Qr(ye))}function y(ye,he){if(!e.realpath||Lf(c(e.realpath(ye)))===he){let ce={files:Yn(e.readDirectory(ye,void 0,void 0,["*.*"]),m)||[],directories:e.getDirectories(ye)||[]};return i.set(Lf(he),ce),ce}if(e.directoryExists?.(ye))return i.set(he,!1),!1}function g(ye,he){he=Lf(he);let ce=u(he);if(ce)return ce;try{return y(ye,he)}catch{E.assert(!i.has(Lf(he)));return}}function S(ye,he){return Rd(ye,he,Ci,ul)>=0}function _(ye,he,ce){let Ee=c(ye),Fe=f(Ee);return Fe&&V(Fe,m(ye),!0),e.writeFile(ye,he,ce)}function b(ye){let he=c(ye),ce=f(he);return ce&&S(ce.sortedAndCanonicalizedFiles,a(m(ye)))||e.fileExists(ye)}function v(ye){let he=c(ye);return i.has(Lf(he))||e.directoryExists(ye)}function T(ye){let he=c(ye),ce=f(he);if(ce){let Ee=m(ye),Fe=a(Ee),be=ce.sortedAndCanonicalizedDirectories;Xf(be,Fe,ul)&&ce.directories.push(Ee)}e.createDirectory(ye)}function W(ye){let he=c(ye),ce=g(ye,he);return ce?ce.directories.slice():e.getDirectories(ye)}function F(ye,he,ce,Ee,Fe){let be=c(ye),de=g(ye,be),Ae;if(de!==void 0)return RF(ye,he,ce,Ee,r,n,Fe,G,M);return e.readDirectory(ye,he,ce,Ee,Fe);function G(me){let Se=c(me);if(Se===be)return de||Qe(me,Se);let _n=g(me,Se);return _n!==void 0?_n||Qe(me,Se):DF}function Qe(me,Se){if(Ae&&Se===be)return Ae;let _n={files:Yn(e.readDirectory(me,void 0,void 0,["*.*"]),m)||Re,directories:e.getDirectories(me)||Re};return Se===be&&(Ae=_n),_n}}function M(ye){return e.realpath?e.realpath(ye):ye}function J(ye,he){if(u(he)!==void 0){ue();return}let Ee=f(he);if(!Ee)return;if(!e.directoryExists){ue();return}let Fe=m(ye),be={fileExists:e.fileExists(ye),directoryExists:e.directoryExists(ye)};return be.directoryExists||S(Ee.sortedAndCanonicalizedDirectories,a(Fe))?ue():V(Ee,Fe,be.fileExists),be}function A(ye,he,ce){if(ce===1)return;let Ee=f(he);Ee&&V(Ee,m(ye),ce===0)}function V(ye,he,ce){let Ee=ye.sortedAndCanonicalizedFiles,Fe=a(he);if(ce)Xf(Ee,Fe,ul)&&ye.files.push(he);else{let be=Rd(Ee,Fe,Ci,ul);if(be>=0){Ee.splice(be,1);let de=ye.files.findIndex(Ae=>a(Ae)===Fe);ye.files.splice(de,1)}}}function ue(){i.clear()}}function yz(e,n,r){$O(n,e.getMissingFilePaths(),{createNewValue:r,onDeleteValue:gm})}function hz(e,n,r){n?$O(e,new Map(Object.entries(n)),{createNewValue:i,onDeleteValue:Nm,onExistingValue:a}):Og(e,Nm);function i(c,u){return{watcher:r(c,u),flags:u}}function a(c,u,f){c.flags!==u&&(c.watcher.close(),e.set(f,i(f,u)))}}function Tz({watchedDirPath:e,fileOrDirectory:n,fileOrDirectoryPath:r,configFileName:i,options:a,program:c,extraFileExtensions:u,currentDirectory:f,useCaseSensitiveFileNames:m,writeLog:y,toPath:g,getScriptKind:S}){let _=h2(r);if(!_)return y(`Project: ${i} Detected ignored path: ${n}`),!0;if(r=_,r===e)return!1;if(bm(r)&&!(iq(n,a,u)||F()))return y(`Project: ${i} Detected file add/remove of non supported extension: ${n}`),!0;if(UV(n,a.configFile.configFileSpecs,Di(ei(i),f),m,f))return y(`Project: ${i} Detected excluded file: ${n}`),!0;if(!c)return!1;let b=bu(r),v=Nr(c)?void 0:ipe(c)?c.getProgramOrUndefined():c,T=!v&&!Nr(c)?c:void 0;if(W(b+".lpc")||W(b+".h"))return y(`Project: ${i} Detected output file: ${n}`),!0;return!1;function W(M){return v?!!v.getSourceFileByPath(M):T?T.getState().fileInfos.has(M):!!Sr(c,J=>g(J)===M)}function F(){if(!S)return!1;switch(S(n)){case 1:return!0;case 0:return!1}}}function ipe(e){return!!e.getState}function Sz(e,n,r,i){xz(n===2?r:Vi);let a={watchFile:(T,W,F,M)=>e.watchFile(T,W,F,M),watchDirectory:(T,W,F,M)=>e.watchDirectory(T,W,(F&1)!==0,M)},c=n!==0?{watchFile:b("watchFile"),watchDirectory:b("watchDirectory")}:void 0,u=n===2?{watchFile:S,watchDirectory:_}:c||a,f=n===2?g:OE;return{watchFile:m("watchFile"),watchDirectory:m("watchDirectory")};function m(T){return(W,F,M,J,A,V)=>KV(W,T==="watchFile"?J?.excludeFiles:J?.excludeDirectories,y(),e.getCurrentDirectory?.()||"")?f(W,M,J,A,V):u[T].call(void 0,W,F,M,J,A,V)}function y(){return typeof e.useCaseSensitiveFileNames=="boolean"?e.useCaseSensitiveFileNames:e.useCaseSensitiveFileNames()}function g(T,W,F,M,J){return r(`ExcludeWatcher:: Added:: ${v(T,W,F,M,J,i)}`),{close:()=>r(`ExcludeWatcher:: Close:: ${v(T,W,F,M,J,i)}`)}}function S(T,W,F,M,J,A){r(`FileWatcher:: Added:: ${v(T,F,M,J,A,i)}`);let V=c.watchFile(T,W,F,M,J,A);return{close:()=>{r(`FileWatcher:: Close:: ${v(T,F,M,J,A,i)}`),V.close()}}}function _(T,W,F,M,J,A){let V=`DirectoryWatcher:: Added:: ${v(T,F,M,J,A,i)}`;r(V);let ue=Ki(),ye=c.watchDirectory(T,W,F,M,J,A),he=Ki()-ue;return r(`Elapsed:: ${he}ms ${V}`),{close:()=>{let ce=`DirectoryWatcher:: Close:: ${v(T,F,M,J,A,i)}`;r(ce);let Ee=Ki();ye.close();let Fe=Ki()-Ee;r(`Elapsed:: ${Fe}ms ${ce}`)}}}function b(T){return(W,F,M,J,A,V)=>a[T].call(void 0,W,(...ue)=>{let ye=`${T==="watchFile"?"FileWatcher":"DirectoryWatcher"}:: Triggered with ${ue[0]} ${ue[1]!==void 0?ue[1]:""}:: ${v(W,M,J,A,V,i)}`;r(ye);let he=Ki();F.call(void 0,...ue);let ce=Ki()-he;r(`Elapsed:: ${ce}ms ${ye}`)},M,J,A,V)}function v(T,W,F,M,J,A){return`WatchInfo: ${T} ${W} ${JSON.stringify(F)} ${A?A(M,J):J===void 0?M:`${M} ${J}`}`}}function _z(e,n){n.forEach(r=>{r.projects.delete(e)&&r.close()})}function Jpe(e){let n=5381;for(let r=0;r<e.length;r++)n=(n<<5)+n+e.charCodeAt(r);return n.toString()}function rG(){Error.stackTraceLimit<100&&(Error.stackTraceLimit=100)}var HI=(i=>(i[i.High=2e3]="High",i[i.Medium=500]="Medium",i[i.Low=250]="Low",i))(HI||{}),oc=new Date(0);function J2(e,n){return e.getModifiedTime(n)||oc}function W2(e){return{250:e.Low,500:e.Medium,2e3:e.High}}var qI={Low:32,Medium:64,High:256},VI=W2(qI),j2=W2(qI);function Wpe(e){if(!e.getEnvironmentVariable)return;let n=a("TSC_WATCH_POLLINGINTERVAL",HI);VI=c("TSC_WATCH_POLLINGCHUNKSIZE",qI)||VI,j2=c("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS",qI)||j2;function r(u,f){return e.getEnvironmentVariable(`${u}_${f.toUpperCase()}`)}function i(u){let f;return m("Low"),m("Medium"),m("High"),f;function m(y){let g=r(u,y);g&&((f||(f={}))[y]=Number(g))}}function a(u,f){let m=i(u);if(m)return y("Low"),y("Medium"),y("High"),!0;return!1;function y(g){f[g]=m[g]||f[g]}}function c(u,f){let m=i(u);return(n||m)&&W2(m?{...f,...m}:f)}}function iG(e,n,r,i,a){let c=r;for(let f=n.length;i&&f;u(),f--){let m=n[r];if(m){if(m.isClosed){n[r]=void 0;continue}}else continue;i--;let y=Vpe(m,J2(e,m.fileName));if(m.isClosed){n[r]=void 0;continue}a?.(m,r,y),n[r]&&(c<r&&(n[c]=m,n[r]=void 0),c++)}return r;function u(){r++,r===n.length&&(c<r&&(n.length=c),r=0,c=0)}}function Upe(e){let n=[],r=[],i=f(250),a=f(500),c=f(2e3);return u;function u(W,F,M){let J={fileName:W,callback:F,unchangedPolls:0,mtime:J2(e,W)};return n.push(J),_(J,M),{close:()=>{J.isClosed=!0,Y_(n,J)}}}function f(W){let F=[];return F.pollingInterval=W,F.pollIndex=0,F.pollScheduled=!1,F}function m(W,F){F.pollIndex=g(F,F.pollingInterval,F.pollIndex,VI[F.pollingInterval]),F.length?T(F.pollingInterval):(E.assert(F.pollIndex===0),F.pollScheduled=!1)}function y(W,F){g(r,250,0,r.length),m(W,F),!F.pollScheduled&&r.length&&T(250)}function g(W,F,M,J){return iG(e,W,M,J,A);function A(V,ue,ye){ye?(V.unchangedPolls=0,W!==r&&(W[ue]=void 0,b(V))):V.unchangedPolls!==j2[F]?V.unchangedPolls++:W===r?(V.unchangedPolls=1,W[ue]=void 0,_(V,250)):F!==2e3&&(V.unchangedPolls++,W[ue]=void 0,_(V,F===250?500:2e3))}}function S(W){switch(W){case 250:return i;case 500:return a;case 2e3:return c}}function _(W,F){S(F).push(W),v(F)}function b(W){r.push(W),v(250)}function v(W){S(W).pollScheduled||T(W)}function T(W){S(W).pollScheduled=e.setTimeout(W===250?y:m,W,W===250?"pollLowPollingIntervalQueue":"pollPollingIntervalQueue",S(W))}}function Kpe(e,n,r,i){let a=Js(),c=i?new Map:void 0,u=new Map,f=na(n);return m;function m(g,S,_,b){let v=f(g);a.add(v,S).length===1&&c&&c.set(v,r(g)||oc);let T=ei(v)||".",W=u.get(T)||y(ei(g)||".",T,b);return W.referenceCount++,{close:()=>{W.referenceCount===1?(W.close(),u.delete(T)):W.referenceCount--,a.remove(v,S)}}}function y(g,S,_){let b=e(g,1,(v,T)=>{if(!gi(T))return;let W=Di(T,g),F=f(W),M=W&&a.get(F);if(M){let J,A=1;if(c){let V=c.get(F);if(v==="change"&&(J=r(W)||oc,J.getTime()===V.getTime()))return;J||(J=r(W)||oc),c.set(F,J),V===oc?A=0:J===oc&&(A=2)}for(let V of M)V(W,A,J)}},!1,500,_);return b.referenceCount=0,u.set(S,b),b}}function qpe(e){let n=[],r=0,i;return a;function a(f,m){let y={fileName:f,callback:m,mtime:J2(e,f)};return n.push(y),u(),{close:()=>{y.isClosed=!0,Y_(n,y)}}}function c(){i=void 0,r=iG(e,n,r,VI[250]),u()}function u(){!n.length||i||(i=e.setTimeout(c,2e3,"pollQueue"))}}function nG(e,n,r,i,a){let u=na(n)(r),f=e.get(u);return f?f.callbacks.push(i):e.set(u,{watcher:a((m,y,g)=>e.get(u)?.callbacks.slice().forEach(S=>S(m,y,g))),callbacks:[i]}),{close:()=>{let m=e.get(u);m&&(!X_(m.callbacks,i)||m.callbacks.length||(e.delete(u),Nm(m)))}}}function Vpe(e,n){let r=e.mtime.getTime(),i=n.getTime();return r!==i?(e.mtime=n,e.callback(e.fileName,Hpe(r,i),n),!0):!1}function Hpe(e,n){return e===0?0:n===0?2:1}var U2=["/node_modules/.","/.git","/.#"],oG=Vi;function KI(e){return oG(e)}function xz(e){oG=e}function zpe({watchDirectory:e,useCaseSensitiveFileNames:n,getCurrentDirectory:r,getAccessibleSortedChildDirectories:i,fileSystemEntryExists:a,realpath:c,setTimeout:u,clearTimeout:f}){let m=new Map,y=Js(),g=new Map,S,_=Q_(!n),b=na(n);return(he,ce,Ee,Fe)=>Ee?v(he,Fe,ce):e(he,ce,Ee,Fe);function v(he,ce,Ee,Fe){let be=b(he),de=m.get(be);de?de.refCount++:(de={watcher:e(he,G=>{ue(G,ce)||(ce?.synchronousWatchDirectory?(m.get(be)?.targetWatcher||T(he,be,G),V(he,be,ce)):W(he,be,G,ce))},!1,ce),refCount:1,childWatches:Re,targetWatcher:void 0,links:void 0},m.set(be,de),V(he,be,ce)),Fe&&(de.links??(de.links=new Set)).add(Fe);let Ae=Ee&&{dirName:he,callback:Ee};return Ae&&y.add(be,Ae),{dirName:he,close:()=>{let G=E.checkDefined(m.get(be));Ae&&y.remove(be,Ae),Fe&&G.links?.delete(Fe),G.refCount--,!G.refCount&&(m.delete(be),G.links=void 0,Nm(G),A(G),G.childWatches.forEach(gm))}}}function T(he,ce,Ee,Fe){let be,de;gi(Ee)?be=Ee:de=Ee,y.forEach((Ae,G)=>{if(!(de&&de.get(G)===!0)&&(G===ce||Eo(ce,G)&&ce[G.length]===Mo))if(de)if(Fe){let Qe=de.get(G);Qe?Qe.push(...Fe):de.set(G,Fe.slice())}else de.set(G,!0);else Ae.forEach(({callback:Qe})=>Qe(be))}),m.get(ce)?.links?.forEach(Ae=>{let G=Qe=>fi(Ae,AE(he,Qe,b));de?T(Ae,b(Ae),de,Fe?.map(G)):T(Ae,b(Ae),G(be))})}function W(he,ce,Ee,Fe){let be=m.get(ce);if(be&&a(he,1)){F(he,ce,Ee,Fe);return}T(he,ce,Ee),A(be),J(be)}function F(he,ce,Ee,Fe){let be=g.get(ce);be?be.fileNames.push(Ee):g.set(ce,{dirName:he,options:Fe,fileNames:[Ee]}),S&&(f(S),S=void 0),S=u(M,1e3,"timerToUpdateChildWatches")}function M(){S=void 0,KI(`sysLog:: onTimerToUpdateChildWatches:: ${g.size}`);let he=Ki(),ce=new Map;for(;!S&&g.size;){let Fe=g.entries().next();E.assert(!Fe.done);let{value:[be,{dirName:de,options:Ae,fileNames:G}]}=Fe;g.delete(be);let Qe=V(de,be,Ae);m.get(be)?.targetWatcher||T(de,be,ce,Qe?void 0:G)}KI(`sysLog:: invokingWatchers:: Elapsed:: ${Ki()-he}ms:: ${g.size}`),y.forEach((Fe,be)=>{let de=ce.get(be);de&&Fe.forEach(({callback:Ae,dirName:G})=>{Nr(de)?de.forEach(Ae):Ae(G)})});let Ee=Ki()-he;KI(`sysLog:: Elapsed:: ${Ee}ms:: onTimerToUpdateChildWatches:: ${g.size} ${S}`)}function J(he){if(!he)return;let ce=he.childWatches;he.childWatches=Re;for(let Ee of ce)Ee.close(),J(m.get(b(Ee.dirName)))}function A(he){he?.targetWatcher&&(he.targetWatcher.close(),he.targetWatcher=void 0)}function V(he,ce,Ee){let Fe=m.get(ce);if(!Fe)return!1;let be=Qr(c(he)),de,Ae;return _(be,he)===0?de=OK(a(he,1)?Ei(i(he),me=>{let Se=Di(me,he);return!ue(Se,Ee)&&_(Se,Qr(c(Se)))===0?Se:void 0}):Re,Fe.childWatches,(me,Se)=>_(me,Se.dirName),G,gm,Qe):Fe.targetWatcher&&_(be,Fe.targetWatcher.dirName)===0?(de=!1,E.assert(Fe.childWatches===Re)):(A(Fe),Fe.targetWatcher=v(be,Ee,void 0,he),Fe.childWatches.forEach(gm),de=!0),Fe.childWatches=Ae||Re,de;function G(me){let Se=v(me,Ee);Qe(Se)}function Qe(me){(Ae||(Ae=[])).push(me)}}function ue(he,ce){return Pn(U2,Ee=>ye(he,Ee))||aG(he,ce,n,r)}function ye(he,ce){return he.includes(ce)?!0:n?!1:b(he).includes(ce)}}function Gpe(e){return(n,r,i)=>e(r===1?"change":"rename","",i)}function $pe(e,n,r){return(i,a,c)=>{i==="rename"?(c||(c=r(e)||oc),n(e,c!==oc?0:2,c)):n(e,1,c)}}function aG(e,n,r,i){return!1}function tG(e,n,r,i,a){return(c,u)=>{if(c==="rename"){let f=u?Qr(fi(e,u)):e;(!u||!aG(f,r,i,a))&&n(f)}}}function Qpe({pollingWatchFileWorker:e,getModifiedTime:n,setTimeout:r,clearTimeout:i,fsWatchWorker:a,fileSystemEntryExists:c,useCaseSensitiveFileNames:u,getCurrentDirectory:f,fsSupportsRecursiveFsWatch:m,getAccessibleSortedChildDirectories:y,realpath:g,tscWatchFile:S,useNonPollingWatchers:_,tscWatchDirectory:b,inodeWatching:v,fsWatchWithTimestamp:T,sysLog:W}){let F=new Map,M=new Map,J=new Map,A,V,ue,ye,he=!1;return{watchFile:ce,watchDirectory:Ae};function ce(Pe,gn,$e,Ln){Ln=be(Ln,_);let Vt=E.checkDefined(Ln.watchFile);switch(Vt){case 0:return me(Pe,gn,250,void 0);case 1:return me(Pe,gn,$e,void 0);case 2:return Ee()(Pe,gn,$e,void 0);case 3:return Fe()(Pe,gn,void 0,void 0);case 4:return Se(Pe,0,$pe(Pe,gn,n),!1,$e,ME(Ln));case 5:return ue||(ue=Kpe(Se,u,n,T)),ue(Pe,gn,$e,ME(Ln));default:E.assertNever(Vt)}}function Ee(){return A||(A=Upe({getModifiedTime:n,setTimeout:r}))}function Fe(){return V||(V=qpe({getModifiedTime:n,setTimeout:r}))}function be(Pe,gn){if(Pe&&Pe.watchFile!==void 0)return Pe;switch(S){case"PriorityPollingInterval":return{watchFile:1};case"DynamicPriorityPolling":return{watchFile:2};case"UseFsEvents":return de(4,1,Pe);case"UseFsEventsWithFallbackDynamicPolling":return de(4,2,Pe);case"UseFsEventsOnParentDirectory":gn=!0;default:return gn?de(5,1,Pe):{watchFile:4}}}function de(Pe,gn,$e){let Ln=$e?.fallbackPolling;return{watchFile:Pe,fallbackPolling:Ln===void 0?gn:Ln}}function Ae(Pe,gn,$e,Ln){return m?Se(Pe,1,tG(Pe,gn,Ln,u,f),$e,500,ME(Ln)):(ye||(ye=zpe({useCaseSensitiveFileNames:u,getCurrentDirectory:f,fileSystemEntryExists:c,getAccessibleSortedChildDirectories:y,watchDirectory:G,realpath:g,setTimeout:r,clearTimeout:i})),ye(Pe,gn,$e,Ln))}function G(Pe,gn,$e,Ln){E.assert(!$e);let Vt=Qe(Ln),Hn=E.checkDefined(Vt.watchDirectory);switch(Hn){case 1:return me(Pe,()=>gn(Pe),500,void 0);case 2:return Ee()(Pe,()=>gn(Pe),500,void 0);case 3:return Fe()(Pe,()=>gn(Pe),void 0,void 0);case 0:return Se(Pe,1,tG(Pe,gn,Ln,u,f),$e,500,ME(Vt));default:E.assertNever(Hn)}}function Qe(Pe){if(Pe&&Pe.watchDirectory!==void 0)return Pe;switch(b){case"RecursiveDirectoryUsingFsWatchFile":return{watchDirectory:1};case"RecursiveDirectoryUsingDynamicPriorityPolling":return{watchDirectory:2};default:let gn=Pe?.fallbackPolling;return{watchDirectory:0,fallbackPolling:gn!==void 0?gn:void 0}}}function me(Pe,gn,$e,Ln){return nG(F,u,Pe,gn,Vt=>e(Pe,Vt,$e,Ln))}function Se(Pe,gn,$e,Ln,Vt,Hn){return nG(Ln?J:M,u,Pe,$e,Ye=>_n(Pe,gn,Ye,Ln,Vt,Hn))}function _n(Pe,gn,$e,Ln,Vt,Hn){let Ye,se;v&&(Ye=Pe.substring(Pe.lastIndexOf(Mo)),se=Ye.slice(Mo.length));let jn=c(Pe,gn)?Xn():Et();return{close:()=>{jn&&(jn.close(),jn=void 0)}};function wn(At){jn&&(W(`sysLog:: ${Pe}:: Changing watcher to ${At===Xn?"Present":"Missing"}FileSystemEntryWatcher`),jn.close(),jn=At())}function Xn(){if(he)return W(`sysLog:: ${Pe}:: Defaulting to watchFile`),Ft();try{let At=(gn===1||!T?a:tt)(Pe,Ln,v?ft:$e);return At.on("error",()=>{$e("rename",""),wn(Et)}),At}catch(At){return he||(he=At.code==="ENOSPC"),W(`sysLog:: ${Pe}:: Changing to watchFile`),Ft()}}function ft(At,xn){let It;if(xn&&Ps(xn,"~")&&(It=xn,xn=xn.slice(0,xn.length-1)),At==="rename"&&(!xn||xn===se||Ps(xn,Ye))){let pr=n(Pe)||oc;It&&$e(At,It,pr),$e(At,xn,pr),v?wn(pr===oc?Et:Xn):pr===oc&&wn(Et)}else It&&$e(At,It),$e(At,xn)}function Ft(){return ce(Pe,Gpe($e),Vt,Hn)}function Et(){return ce(Pe,(At,xn,It)=>{xn===0&&(It||(It=n(Pe)||oc),It!==oc&&($e("rename","",It),wn(Xn)))},Vt,Hn)}}function tt(Pe,gn,$e){let Ln=n(Pe)||oc;return a(Pe,gn,(Vt,Hn,Ye)=>{Vt==="change"&&(Ye||(Ye=n(Pe)||oc),Ye.getTime()===Ln.getTime())||(Ln=Ye||n(Pe)||oc,$e(Vt,Hn,Ln))})}}function Ype(e){let n=e.writeFile;e.writeFile=(r,i,a)=>K2(r,i,!!a,(c,u,f)=>n.call(e,c,u,f),c=>e.createDirectory(c),c=>e.directoryExists(c))}var ho=(()=>{let e="\uFEFF";function n(){let i=/^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/,a=require("fs"),c=require("path"),u=require("os"),f;try{f=require("crypto")}catch{f=void 0}let m,y="./profile.cpuprofile",g=process.platform==="darwin",S=process.platform==="linux"||g,_=u.platform(),b=ce(),v=a.realpathSync.native?process.platform==="win32"?Pe:a.realpathSync.native:a.realpathSync,T=__filename.endsWith("sys.js")?c.join(c.dirname(__dirname),"__fake__.js"):__filename,W=process.platform==="win32"||g,F=gc(()=>process.cwd()),{watchFile:M,watchDirectory:J}=Qpe({pollingWatchFileWorker:Fe,getModifiedTime:$e,setTimeout,clearTimeout,fsWatchWorker:be,useCaseSensitiveFileNames:b,getCurrentDirectory:F,fileSystemEntryExists:me,fsSupportsRecursiveFsWatch:W,getAccessibleSortedChildDirectories:Ye=>G(Ye).directories,realpath:gn,tscWatchFile:process.env.TSC_WATCHFILE,useNonPollingWatchers:!!process.env.TSC_NONPOLLING_WATCHER,tscWatchDirectory:process.env.TSC_WATCHDIRECTORY,inodeWatching:S,fsWatchWithTimestamp:g,sysLog:KI}),A={args:process.argv.slice(2),newLine:u.EOL,useCaseSensitiveFileNames:b,write(Ye){process.stdout.write(Ye)},getWidthOfTerminal(){return process.stdout.columns},writeOutputIsTTY(){return process.stdout.isTTY},readFile:de,writeFile:Ae,watchFile:()=>db,watchDirectory:()=>db,preferNonRecursiveWatch:!W,resolvePath:Ye=>c.resolve(Ye),fileExists:Se,directoryExists:_n,getAccessibleFileSystemEntries:G,createDirectory(Ye){if(!A.directoryExists(Ye))try{a.mkdirSync(Ye)}catch(se){if(se.code!=="EEXIST")throw se}},getExecutingFilePath(){return T},getCurrentDirectory:F,getDirectories:tt,getEnvironmentVariable(Ye){return process.env[Ye]||""},readDirectory:Qe,getModifiedTime:$e,setModifiedTime:Ln,deleteFile:Vt,createHash:f?Hn:Jpe,createSHA256Hash:f?Hn:void 0,getMemoryUsage(){return global.gc&&global.gc(),process.memoryUsage().heapUsed},getFileSize(Ye){try{let se=V(Ye);if(se?.isFile())return se.size}catch{}return 0},exit(Ye){he(()=>process.exit(Ye))},enableCPUProfiler:ue,disableCPUProfiler:he,cpuProfilingEnabled:()=>!!m||Gr(process.execArgv,"--cpu-prof")||Gr(process.execArgv,"--prof"),realpath:gn,debugMode:!!process.env.NODE_INSPECTOR_IPC||!!process.env.VSCODE_INSPECTOR_OPTIONS||Pn(process.execArgv,Ye=>/^--(inspect|debug)(-brk)?(=\d+)?$/i.test(Ye))||!!process.recordreplay,tryEnableSourceMapsForHost(){try{eG().install()}catch{}},setTimeout,clearTimeout,clearScreen:()=>{process.stdout.write("\x1Bc")},setBlocking:()=>{let Ye=process.stdout?._handle;Ye&&Ye.setBlocking&&Ye.setBlocking(!0)},base64decode:Ye=>Buffer.from(Ye,"base64").toString("utf8"),base64encode:Ye=>Buffer.from(Ye).toString("base64"),require:(Ye,se)=>{try{E.fail("implement me")}catch(jn){return{module:void 0,modulePath:void 0,error:jn}}}};return A;function V(Ye){return a.statSync(Ye,{throwIfNoEntry:!1})}function ue(Ye,se){if(m)return se(),!1;let jn=require("inspector");if(!jn||!jn.Session)return se(),!1;let wn=new jn.Session;return wn.connect(),wn.post("Profiler.enable",()=>{wn.post("Profiler.start",()=>{m=wn,y=Ye,se()})}),!0}function ye(Ye){let se=0,jn=new Map,wn=Cc(c.dirname(T)),Xn=`file://${Eu(wn)===1?"":"/"}${wn}`;for(let ft of Ye.nodes)if(ft.callFrame.url){let Ft=Cc(ft.callFrame.url);fp(Xn,Ft,b)?ft.callFrame.url=RI(Xn,Ft,Xn,na(b),!0):i.test(Ft)||(ft.callFrame.url=(jn.has(Ft)?jn:jn.set(Ft,`external${se}.js`)).get(Ft),se++)}return Ye}function he(Ye){if(m&&m!=="stopping"){let se=m;return m.post("Profiler.stop",(jn,{profile:wn})=>{if(!jn){try{V(y)?.isDirectory()&&(y=c.join(y,`${new Date().toISOString().replace(/:/g,"-")}+P${process.pid}.cpuprofile`))}catch{}try{a.mkdirSync(c.dirname(y),{recursive:!0})}catch{}a.writeFileSync(y,JSON.stringify(ye(wn)))}m=void 0,se.disconnect(),Ye()}),m="stopping",!0}else return Ye(),!1}function ce(){return _==="win32"||_==="win64"?!1:!Se(Ee(__filename))}function Ee(Ye){return Ye.replace(/\w/g,se=>{let jn=se.toUpperCase();return se===jn?se.toLowerCase():jn})}function Fe(Ye,se,jn){a.watchFile(Ye,{persistent:!0,interval:jn},Xn);let wn;return{close:()=>a.unwatchFile(Ye,Xn)};function Xn(ft,Ft){let Et=+Ft.mtime==0||wn===2;if(+ft.mtime==0){if(Et)return;wn=2}else if(Et)wn=0;else{if(+ft.mtime==+Ft.mtime)return;wn=1}se(Ye,wn,ft.mtime)}}function be(Ye,se,jn){return a.watch(Ye,W?{persistent:!0,recursive:!!se}:{persistent:!0},jn)}function de(Ye,se){let jn;try{jn=a.readFileSync(Ye)}catch{return}let wn=jn.length;if(wn>=2&&jn[0]===254&&jn[1]===255){wn&=-2;for(let Xn=0;Xn<wn;Xn+=2){let ft=jn[Xn];jn[Xn]=jn[Xn+1],jn[Xn+1]=ft}return jn.toString("utf16le",2)}return wn>=2&&jn[0]===255&&jn[1]===254?jn.toString("utf16le",2):wn>=3&&jn[0]===239&&jn[1]===187&&jn[2]===191?jn.toString("utf8",3):jn.toString("utf8")}function Ae(Ye,se,jn){jn&&(se=e+se);let wn;try{wn=a.openSync(Ye,"w"),a.writeSync(wn,se,void 0,"utf8")}finally{wn!==void 0&&a.closeSync(wn)}}function G(Ye){try{let se=a.readdirSync(Ye||".",{withFileTypes:!0}),jn=[],wn=[];for(let Xn of se){let ft=typeof Xn=="string"?Xn:Xn.name;if(ft==="."||ft==="..")continue;let Ft;if(typeof Xn=="string"||Xn.isSymbolicLink()){let Et=fi(Ye,ft);try{if(Ft=V(Et),!Ft)continue}catch{continue}}else Ft=Xn;Ft.isFile()?jn.push(ft):Ft.isDirectory()&&wn.push(ft)}return jn.sort(),wn.sort(),{files:jn,directories:wn}}catch{return DF}}function Qe(Ye,se,jn,wn,Xn){return RF(Ye,se,jn,wn,b,process.cwd(),Xn,G,gn)}function me(Ye,se){let jn=Error.stackTraceLimit;Error.stackTraceLimit=0;try{let wn=V(Ye);if(!wn)return!1;switch(se){case 0:return wn.isFile();case 1:return wn.isDirectory();default:return!1}}catch{return!1}finally{Error.stackTraceLimit=jn}}function Se(Ye){return me(Ye,0)}function _n(Ye){return me(Ye,1)}function tt(Ye){return G(Ye).directories.slice()}function Pe(Ye){return Ye.length<260?a.realpathSync.native(Ye):a.realpathSync(Ye)}function gn(Ye){try{return v(Ye)}catch{return Ye}}function $e(Ye){let se=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return V(Ye)?.mtime}catch{return}finally{Error.stackTraceLimit=se}}function Ln(Ye,se){try{a.utimesSync(Ye,se,se)}catch{return}}function Vt(Ye){try{return a.unlinkSync(Ye)}catch{return}}function Hn(Ye){let se=f.createHash("sha256");return se.update(Ye),se.digest("hex")}}let r;return Pv()&&(r=n()),r&&Ype(r),r})();ho&&ho.getEnvironmentVariable&&(Wpe(ho),E.setAssertionLevel(/^development$/i.test(ho.getEnvironmentVariable("NODE_ENV"))?1:0));ho&&ho.debugMode&&(E.isDebugging=!0);function q2(e,n,r,i,a){let c=Nr(e)?Xpe(e,n,r,i,a):e,{rootNames:u,options:f,configFileParsingDiagnostics:m,projectReferences:y,typeScriptVersion:g}=c,{oldProgram:S}=c,_,b,v,T,W,F,M=new Map,J=Js(),A,V,ue,ye={},he={};var ce=S?.masterIncludeApply;let Ee,Fe,be,de,Ae,G,Qe,me,Se,_n=typeof f.maxNodeModuleJsDepth=="number"?f.maxNodeModuleJsDepth:0,tt=0,Pe=new Map,gn=new Map;po.mark("beforeProgram");let $e=c.host||dG(f),Ln="TODO",Vt=HD(),Hn=[],Ye=$e.getCurrentDirectory(),se=new Map,jn,wn,Xn=f.noLib,ft=gc(()=>$e.getDefaultLibFileName(f)),Ft,Et=new Map,At=new Map,xn=$e.useCaseSensitiveFileNames()?new Map:void 0,It=Js(),pr,tn,ot=$e.hasInvalidatedResolutions||jl;$e.resolveModuleNameLiterals?(tn=$e.resolveModuleNameLiterals.bind($e),pr=$e.getModuleResolutionCache?.()):(pr=xI(Ye,Mr,f),tn=(D,k,j,Y,Be)=>ome(D,k,j,Y,Be,$e,pr,cme));let Zn=Ph({fileExists:D=>ho.fileExists(D),readFile:D=>ge(D),getCurrentDirectory:()=>ho.getCurrentDirectory(),getIncludeDirs:H,getCompilerOptions:()=>f}),zt,Yt,Cr,{fileExists:xi,directoryExists:Ie}=$e,Oe=$e.readFile.bind($e),Je=tme(S,f);if(S&&$e.onAllFilesNeedReparse&&ZF(S.getCompilerOptions(),f)){let D=S.getSourceFiles().filter(k=>!k.isDefaultLib).map(k=>k.fileName);$e.onAllFilesNeedReparse(D)}let Z=$e.hasInvalidatedLibResolutions||jl,fe,Ce=!!$e.useSourceOfProjectReferenceRedirect?.()&&!f.disableSourceOfProjectReferenceRedirect,ne;if(In?.push(In.Phase.Program,"tryReuseStructureFromOldProgram",{}),ne=Gi(),In?.pop(),ne!==2){if(_=[],b=[],y&&(zt||(zt=y.map(qa)),u.length),Ft=w(f),u.length&&!Xn){let k=ft();if(!f.lib&&k){let j=Le(k,!0,{kind:7});if(j&&j.parsedMacros){f.configDefines=f.configDefines||{};let Y=j.parsedMacros;for(let[Be,Ue]of Y)f.configDefines[Be]||(f.configDefines[Be]=Ue)}}}Ft=w(f);let D=-1;if(xi(f.masterFile)&&f.driverType===1){D=u.indexOf(f.masterFile),In?.push(In.Phase.Program,"processMasterFile");let k=Le(f.masterFile,!1,{kind:1,index:D}),j=Bq(k);ce=j?Qy(j):void 0,In?.pop()}if(In?.push(In.Phase.Program,"processRootFiles",{count:u.length}),Bn(u,(k,j)=>Co(k,!1,!1,{kind:0,index:j})),In?.pop(),u.length&&!Xn){let k=ft();!f.lib&&k?Co(k,!0,!1,{kind:7}):Bn(f.lib,(j,Y)=>{Co(ke(j),!0,!1,{kind:7,index:Y})})}v=xf(_,nu).concat(b),_=void 0,b=void 0,A=void 0}if(S&&$e.onReleaseOldSourceFile){let D=S.getSourceFiles();for(let k of D){let j=fr(k.resolvedPath);(Je||!j||k.resolvedPath===k.path&&j.resolvedPath!==k.path)&&$e.onReleaseOldSourceFile(k,S.getCompilerOptions(),!!fr(k.path),j)}$e.getParsedCommandLine||S.forEachResolvedProjectReference(k=>{yt(k.sourceFile.path)||$e.onReleaseOldSourceFile(k.sourceFile,S.getCompilerOptions(),!1,void 0)})}S&&$e.onReleaseParsedCommandLine&&zI(S.getProjectReferences(),S.getResolvedProjectReferences(),(D,k,j)=>{let Y=k?.commandLine.projectReferences[j]||S.getProjectReferences()[j],Be=KE(Y);Yt?.has(ga(Be))||$e.onReleaseParsedCommandLine(Be,D,S.getCompilerOptions())}),S=void 0,G=void 0;let sn={getRootFileNames:()=>u,getDriverType:()=>f.driverType,getSourceFile:qn,getSourceFileByPath:fr,getSourceFiles:()=>v,getMissingFilePaths:()=>At,getModuleResolutionCache:()=>{},getFilesByNameMap:()=>Et,getCompilerOptions:()=>f,getSyntacticDiagnostics:Dr,getOptionsDiagnostics:Er,getGlobalDiagnostics:xl,getSemanticDiagnostics:Gt,getSuggestionDiagnostics:Rn,getDeclarationDiagnostics:yn,getTypeChecker:nn,getCommonSourceDirectory:()=>Ye,getCurrentDirectory:()=>Ye,getNodeCount:()=>nn().getNodeCount(),getIdentifierCount:()=>nn().getIdentifierCount(),getSymbolCount:()=>nn().getSymbolCount(),getTypeCount:()=>nn().getTypeCount(),getInstantiationCount:()=>nn().getInstantiationCount(),getRelationCacheSizes:()=>nn().getRelationCacheSizes(),getFileProcessingDiagnostics:()=>Ee,isSourceFileFromExternalLibrary:kn,isSourceFileDefaultLibrary:On,getSourceFileFromReference:Sd,resolvedModules:Ae,resolvedLibReferences:be,getResolvedModule:dn,getResolvedModuleFromModuleSpecifier:Q,getResolvedTypeReferenceDirectiveFromTypeReferenceDirective:Te,forEachResolvedModule:zo,getCurrentPackagesMap:()=>Se,getConfigFileParsingDiagnostics:q,getProjectReferences:qe,getResolvedProjectReferences:te,getResolvedProjectReferenceToRedirect:mo,getResolvedProjectReferenceByPath:yt,forEachResolvedProjectReference:Lo,isSourceOfProjectReferenceRedirect:Ve,fileExists:xi,readFile:Oe,directoryExists:Ie,realpath:$e.realpath?.bind($e),useCaseSensitiveFileNames:()=>$e.useCaseSensitiveFileNames(),getCanonicalFileName:Mr,getFileIncludeReasons:()=>J,structureIsReused:ne,getIncludeDirs:H,masterIncludeApply:ce,getConfigDefines:()=>Ft};return po.mark("afterProgram"),po.measure("Program","beforeProgram","afterProgram"),In?.pop(),sn;function H(D){let k=f?.libIncludeDirs??Re;if(ce){let j=f.rootDir??ei(f.configFilePath),Y=AE(j,D,$e.getCanonicalFileName),Be=Qr(Y),Ue=Yn(ce(Be),$n=>$n!=":DEFAULT:"?mp(j,"."+$n):$n);if(Ue&&Ue.length){let $n=Ue.indexOf(":DEFAULT:");$n>=0?k=Ue.slice(0,$n).concat(k,Ue.slice($n+1)):k=Ue}}return k}function ge(D){return $e.getSourceTextFromSnapshot(D)??ho.readFile(D)}function qn(D){return fr(ga(D))}function kn(D){return!!gn.get(D.path)}function On(D){if(!D.isDeclarationFile)return!1;if(D.hasNoDefaultLib)return!0;if(!f.noLib)return!1;let k=$e.useCaseSensitiveFileNames()?cg:bf;return f.lib?Pn(f.lib,j=>k(D.fileName,be.get(j).actual)):k(D.fileName,ft())}function nn(){return W||(W=ez(sn))}function Dr(D,k){return Li(D,zi,k)}function Gt(D,k){return Li(D,Rr,k)}function Rr(D,k){return Zr(rme(et(D,k),f),Jn(D))}function zi(D){return D.parseDiagnostics?.slice()}function zo(D,k){sa(Ae,D,k)}function sa(D,k,j){j?D?.get(j.path)?.forEach((Y,Be,Ue)=>k(Y,Be,Ue,j.path)):D?.forEach((Y,Be)=>Y.forEach((Ue,$n,di)=>k(Ue,$n,di,Be)))}function mo(D){Cr===void 0&&(Cr=new Map,Lo(j=>{ga(f.configFilePath)!==j.sourceFile.path&&j.commandLine.fileNames.forEach(Y=>Cr.set(ga(Y),j.sourceFile.path))}));let k=Cr.get(ga(D));return k&&yt(k)}function Ve(D){return Ce&&!!mo(D)}function et(D,k){return kr(D,k,ye,ln)}function Le(D,k,j){let Y=De(D,k,void 0,$e,f,Ft);return Y.reportParsedDefines=!0,$e.getSourceFile(D,Y,Ue=>ki(void 0,j,N.Cannot_read_file_0_Colon_1,[D,Ue]),Je)}function Q(D,k){return k??(k=$t(D)),E.assertIsDefined(k,"`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."),dn(k,D.text,nl(k,D))}function ie(D,k,j){return Qe?.get(D.path)?.get(k,j)}function Te(D,k){return ie(k,D.fileName,k.impliedNodeFormat)}function te(){return zt}function q(){return m||Re}function qe(){return y}function dn(D,k,j){return E.assertIsDefined(D),k?Ae?.get(D.path)?.get(nM(k),j):void 0}function Jn(D){if($x(D,f,sn))return Re;let k=Gn().getDiagnostics(D.fileName);return D.commentDirectives?.length?St(D,D.commentDirectives,k).diagnostics:k}function ke(D){let k=be?.get(D);if(k)return k.actual;let j=We(D);return(be??(be=new Map)).set(D,j),j.actual}function We(D){let k=de?.get(D);if(k)return k;if(ne!==0&&S&&!Z(D)){let $n=S.resolvedLibReferences?.get(D);if($n){if($n.resolution&&Dm(f,$e)){let di=cG(D),nr=lG(f,Ye,D);Pa($e,$n.resolution.resolvedModule?$n.resolution.resolvedModule.packageId?N.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:N.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:N.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved,di,Di(nr,Ye),$n.resolution.resolvedModule?.resolvedFileName,$n.resolution.resolvedModule?.packageId&&Ig($n.resolution.resolvedModule.packageId))}return(de??(de=new Map)).set(D,$n),$n}}let j=cG(D),Y=lG(f,Ye,D);In?.push(In.Phase.Program,"resolveLibrary",{resolveFrom:Y}),po.mark("beforeResolveLibrary");let Be=fe(j,Y,f,D);po.mark("afterResolveLibrary"),po.measure("ResolveLibrary","beforeResolveLibrary","afterResolveLibrary"),In?.pop();let Ue={resolution:Be,actual:Be.resolvedModule?Be.resolvedModule.resolvedFileName:fi(Ln,D)};return(de??(de=new Map)).set(D,Ue),Ue}function ln(D,k){return Or(()=>{if($x(D,f,sn))return Re;let j=nn();E.assert(!!D.bindDiagnostics);let Y=D.scriptKind!==1,Be=D.bindDiagnostics,Ue=j.getDiagnostics(D,k);return zn(D,!Y,Be,Ue,D.jsDocDiagnostics)})}function zn(D,k,...j){let Y=mu(j);if(!k||!D.commentDirectives?.length)return Y;let{diagnostics:Be,directives:Ue}=St(D,D.commentDirectives,Y);for(let $n of Ue.getUnusedExpectations())Be.push(tV(D,$n.range,N.Unused_lpc_expect_error_directive));return Be}function St(D,k,j){let Y=rV(D,k);return{diagnostics:j.filter(Ue=>ct(Ue,Y)===-1),directives:Y}}function ct(D,k){let{file:j,start:Y}=D;if(!j)return-1;let Be=yc(j),Ue=xg(Be,Y).line-1;for(;Ue>=0;){if(k.markUsed(Ue))return Ue;let $n=j.text.slice(Be[Ue],Be[Ue+1]).trim();if($n!==""&&!/^(\s*)\/\/(.*)$/.test($n))return-1;Ue--}return-1}function kr(D,k,j,Y){let Be=D?j.perFile?.get(D.path):j.allDiagnostics;if(Be)return Be;let Ue=Y(D,k);return D?(j.perFile||(j.perFile=new Map)).set(D.path,Ue):j.allDiagnostics=Ue,Ue}function Or(D){try{return D()}catch(k){throw k instanceof Sg&&(W=void 0),k}}function Rn(D,k){return Or(()=>nn().getSuggestionDiagnostics(D,k))}function Li(D,k,j){return D?GT(k(D,j)):GT(Oo(sn.getSourceFiles(),Y=>(j&&j.throwIfCancellationRequested(),k(Y,j))))}function yt(D){if(Yt)return Yt.get(D)||void 0}function Lo(D){return GI(zt,D)}function Ko(D){let k=ue?.get(D);return k===void 0&&(ue??(ue=new Map)).set(D,k=eu(D)??!1),k||void 0}function Ua(){if(jn===void 0){let D=ca();jn=D&&Wo(D.initializer,ms)||!1}return jn||void 0}function ca(){return wn===void 0&&(wn=_E(hM(f.configFile),"compilerOptions",Ci)||!1),wn||void 0}function wt(D,k){let j=Ua();return j&&Uq(j,D,k)}function Jc(D,k){return _E(Ua(),D,k)}function vn(D,k){return Jc(D,j=>ji(j.initializer)&&j.initializer.text===k?j.initializer:void 0)}function eu(D){if(gp(D)){let Y=SS(sn,D),Be;switch(D.kind){case 4:Be=N.File_is_included_via_import_here;break;case 5:Be=N.File_is_included_via_reference_here;break;case 6:Be=N.File_is_included_via_type_library_reference_here;break;case 8:Be=N.File_is_included_via_library_reference_here;break;default:E.assertNever(D)}return Lh(Y)?sd(Y.file,Y.pos,Y.end-Y.pos,Be):void 0}if(!f.configFile)return;let k,j;switch(D.kind){case 0:if(!f.configFile.configFileSpecs)return;let Y=Di(u[D.index],Ye),Be=f2(sn,Y);if(Be){k=SM(f.configFile,"files",Be),j=N.File_is_matched_by_files_list_specified_here;break}let Ue=p2(sn,Y);if(!Ue||!gi(Ue))return;k=SM(f.configFile,"include",Ue),j=N.File_is_matched_by_include_pattern_specified_here;break;case 2:case 3:let $n=E.checkDefined(zt?.[D.index]),di=zI(y,zt,(vi,Oi,Hr)=>vi===$n?{sourceFile:Oi?.sourceFile||f.configFile,index:Hr}:void 0);if(!di)return;let{sourceFile:nr,index:Lr}=di,Mt=Gx(nr,"references",vi=>cS(vi.initializer)?vi.initializer:void 0);return Mt&&Mt.elements.length>Lr?gl(nr,Mt.elements[Lr],D.kind===3?N.File_is_output_from_referenced_project_specified_here:N.File_is_source_from_referenced_project_specified_here):void 0;case 9:if(!f.types)return;k=wt("types",D.typeReference),j=N.File_is_entry_point_of_type_library_specified_here;break;case 7:if(D.index!==void 0){k=wt("lib",f.lib[D.index]),j=N.File_is_library_specified_here;break}let hr=YF(Hl(f));k=hr?vn("target",hr):void 0,j=N.File_is_default_library_for_target_specified_here;break;case 1:k=vn("masterFile",f.masterFile),j=N.File_is_master_file_specified_here;break;default:E.assertNever(D)}return k&&gl(f.configFile,k,j)}function la(D,k,j,Y){let Be,Ue=D&&J.get(D.path),$n,di,nr=gp(k)?k:void 0,Lr,Mt,hr=D&&V?.get(D.path),vi;hr?(hr.fileIncludeReasonDetails?(Be=new Set(Ue),Ue?.forEach(Bo)):Ue?.forEach(ii),Mt=hr.redirectInfo):(Ue?.forEach(ii),Mt=D&&d2(D)),k&&ii(k);let Oi=Be?.size!==Ue?.length;nr&&Be?.size===1&&(Be=void 0),Be&&hr&&(hr.details&&!Oi?vi=Pi(hr.details,j,...Y||Re):hr.fileIncludeReasonDetails&&(Oi?no()?$n=$r(hr.fileIncludeReasonDetails.next.slice(0,Ue.length),$n[0]):$n=[...hr.fileIncludeReasonDetails.next,$n[0]]:no()?$n=hr.fileIncludeReasonDetails.next.slice(0,Ue.length):Lr=hr.fileIncludeReasonDetails)),vi||(Lr||(Lr=Be&&Pi($n,N.The_file_is_in_the_program_because_Colon)),vi=Pi(Mt?Lr?[Lr,...Mt]:Mt:Lr,j,...Y||Re)),D&&(hr?(!hr.fileIncludeReasonDetails||!Oi&&Lr)&&(hr.fileIncludeReasonDetails=Lr):(V??(V=new Map)).set(D.path,hr={fileIncludeReasonDetails:Lr,redirectInfo:Mt}),!hr.details&&!Oi&&(hr.details=vi.next));let Hr=nr&&SS(sn,nr);return Hr&&Lh(Hr)?xF(Hr.file,Hr.pos,Hr.end-Hr.pos,vi,di):jq(vi,di);function ii(pi){Be?.has(pi)||((Be??(Be=new Set)).add(pi),($n??($n=[])).push(m2(sn,pi)),Bo(pi))}function Bo(pi){!nr&&gp(pi)?nr=pi:nr!==pi&&(di=$r(di,Ko(pi)))}function no(){return hr.fileIncludeReasonDetails.next?.length!==Ue?.length}}function Jt({reason:D}){let{file:k,pos:j,end:Y}=SS(sn,D),Be=k.libReferenceDirectives[D.index],Ue=ume(Be),$n=mg(U1(Ue,"lib."),".d.ts"),di=fg($n,yI,Ci);return sd(k,E.checkDefined(j),E.checkDefined(Y)-j,di?N.Cannot_find_lib_definition_for_0_Did_you_mean_1:N.Cannot_find_lib_definition_for_0,Ue,di)}function Gn(){return Hn&&(Ee?.forEach(D=>{switch(D.kind){case 1:return Vt.add(la(D.file&&fr(D.file),D.fileProcessingReason,D.diagnostic,D.args||Re));case 0:return Vt.add(Jt(D));case 2:return D.diagnostics.forEach(k=>Vt.add(k));default:E.assertNever(D)}}),Hn.forEach(({file:D,diagnostic:k,args:j})=>Vt.add(la(D,void 0,k,j))),Hn=void 0,V=void 0,ue=void 0),Vt}function Br(){if(!f.configFile)return Re;let D=Gn().getDiagnostics(f.configFile.fileName);return Lo(k=>{D=Zr(D,Gn().getDiagnostics(k.sourceFile.fileName))}),D}function Er(){return GT(Zr(Gn().getGlobalDiagnostics(),Br()))}function xl(){return u.length?GT(nn().getGlobalDiagnostics().slice()):Re}function Sd(D,k){return xs(sG(k.fileName,D.fileName),qn)}function Pr(D){if(fp(Ln,D.fileName,!1)){let k=hs(D.fileName);if(k==="lib.d.ts"||k==="lib.es6.d.ts")return 0;let j=mg(U1(k,"lib."),".d.ts"),Y=yI.indexOf(j);if(Y!==-1)return Y+1}return yI.length+2}function nu(D,k){return io(Pr(D),Pr(k))}function Co(D,k,j,Y){Lt(Qr(D),k,j,void 0,Y)}function Xr(D,k,j,Y,Be){In?.push(In.Phase.Program,"findSourceFile",{fileName:D,isDefaultLib:k||void 0,fileIncludeKind:jv[Y.kind]});let Ue=Gs(D,k,j,Y,Be);return In?.pop(),Ue}function Lt(D,k,j,Y,Be){xs(D,Ue=>Xr(Ue,k,j,Be,Y),(Ue,...$n)=>ki(void 0,Be,Ue,$n),Be)}function ki(D,k,j,Y){(Ee||(Ee=[])).push({kind:1,file:D&&D.path,fileProcessingReason:k,diagnostic:j,args:Y})}function Mr(D){return $e.getCanonicalFileName(D)}function ga(D){return Aa(D,Ye,Mr)}function zs(D,k,j){return D&&(!j||!gp(k)||!A?.has(k.file))?(J.add(D.path,k),!0):!1}function Gs(D,k,j,Y,Be){let Ue=ga(D),$n=D;if(Et.has(Ue)){let Mt=Et.get(Ue),hr=zs(Mt||void 0,Y,!0);if(Mt&&hr&&f.forceConsistentCasingInFileNames!==!1){let vi=Mt.fileName,Oi=$e.useCaseSensitiveFileNames()?D:ug(D);ga(vi)!==ga(Oi)&&E.fail("implement me");let ii=c2(vi,Ye),Bo=c2(D,Ye);ii!==Bo&&Pc(D,Mt,Y)}return Mt&&gn.get(Mt.path)&&tt===0?(gn.set(Mt.path,!1),f.noResolve||As(Mt,k),f.noLib||void 0,Pe.set(Mt.path,!1),el(Mt)):Mt&&Pe.get(Mt.path)&&tt<_n&&(Pe.set(Mt.path,!1),el(Mt)),Mt||void 0}let di,nr=De(D,k,void 0,$e,f,Ft),Lr=$e.getSourceFile(D,nr,Mt=>ki(void 0,Y,N.Cannot_read_file_0_Colon_1,[D,Mt]),Je);if(co(Lr,Ue,D,di),Lr){if(gn.set(Ue,tt>0),Lr.fileName=D,Lr.path=Ue,Lr.resolvedPath=ga(D),Lr.originalFileName=$n,zs(Lr,Y,!1),$e.useCaseSensitiveFileNames()){let Mt=ug(Ue),hr=xn.get(Mt);hr?Pc(D,hr,Y):xn.set(Mt,Lr)}Xn=Xn||Lr.hasNoDefaultLib&&!j,f.noResolve||As(Lr,k),f.noLib||void 0,el(Lr),k?(Lr.isDefaultLib=!0,_.push(Lr)):b.push(Lr),(A??(A=new Set)).add(Lr.path)}return Lr}function Pc(D,k,j){!gp(j)&&Pn(J.get(k.path),gp)?ki(k,j,N.Already_included_file_name_0_differs_from_file_name_1_only_in_casing,[k.fileName,D]):ki(k,j,N.File_name_0_differs_from_already_included_file_name_1_only_in_casing,[D,k.fileName])}function fr(D){return Et.get(D)||void 0}function w(D){let k=new Map;D.playerFile&&k.set("__LPC_CONFIG_LIBFILES_PLAYER",`"${Mg(D.playerFile,D)}"`),D.masterFile&&k.set("__LPC_CONFIG_LIBFILES_MASTER",`"${Mg(D.masterFile,D)}"`),D.sefunFile&&k.set("__LPC_CONFIG_LIBFILES_SEFUN",`"${Mg(D.sefunFile,D)}"`);for(let j in D.configDefines||$_)k.set(j,D.configDefines[j]);return k.set("__LANG_SVC__","1"),k}function De(D,k,j,Y,Be,Ue){return{languageVersion:1,globalIncludes:(k||Be.resolvedGlobalIncludeFiles?.some($n=>$n==D)?void 0:Be.globalIncludeFiles)||Re,fileHandler:Zn,configDefines:Ue}}function yn(D,k){let j=sn.getCompilerOptions();return Li(D,bt,k)}function bt(D,k){return D.isDeclarationFile?[]:ri(D,k)}function ri(D,k){return kr(D,k,he,ai)}function ai(D,k){return Or(()=>{let j=nn().getEmitResolver(D,k);return hG(li(Vi),j,D)||Re})}function yr(D,k,j,Y,Be,Ue){$e.writeFile(D,k,j,Y,Be,Ue)}function Ht(D){return se.has(ga(D))}function li(D){return{getCanonicalFileName:Mr,getCommonSourceDirectory:sn.getCommonSourceDirectory,getCompilerOptions:sn.getCompilerOptions,getCurrentDirectory:()=>Ye,getSourceFile:sn.getSourceFile,getSourceFileByPath:sn.getSourceFileByPath,getSourceFiles:sn.getSourceFiles,isSourceFileFromExternalLibrary:()=>!1,writeFile:D||yr,isEmitBlocked:Ht,readFile:k=>$e.readFile(k),fileExists:k=>{let j=ga(k);return fr(j)?!0:At.has(j)?!1:$e.fileExists(k)},realpath:Ta($e,$e.realpath),useCaseSensitiveFileNames:()=>$e.useCaseSensitiveFileNames(),getBuildInfo:()=>sn.getBuildInfo?.(),getSourceFileFromReference:(k,j)=>sn.getSourceFileFromReference(k,j),redirectTargetsMap:It,getFileIncludeReasons:sn.getFileIncludeReasons,createHash:Ta($e,$e.createHash),getModuleResolutionCache:()=>sn.getModuleResolutionCache(),trace:Ta($e,$e.trace)}}function co(D,k,j,Y){Y?(ua(j,Y,D),ua(j,k,D||!1)):ua(j,k,D)}function ua(D,k,j){Et.set(k,j),j!==void 0?At.delete(k):At.set(k,D)}function rs(D){D.resolutionDiagnostics?.length&&(Ee??(Ee=[])).push({kind:2,diagnostics:D.resolutionDiagnostics})}function _s(D,k,j,Y){if($e.resolveModuleNameLiterals||!$e.resolveModuleNames)return rs(j);if(!pr)return;let Be=Di(D.originalFileName,Ye),Ue=ei(Be),di=pr.getFromNonRelativeNameCache(k,Y,Ue,void 0);di&&rs(di)}function el(D){if(is(D),D.imports.length>0){let k=uG(D),j=G?.get(D.path)||Nc(k,D);j.length!==k.length&&console.warn("Not all modules resolved",j.length,k.length);let Y=f,Be=ob();(Ae??(Ae=new Map)).set(D.path,Be);for(let Ue=0;Ue<k.length;Ue++){if(!j[Ue]||!k[Ue]?.text)continue;let $n=j[Ue].resolvedModule,di=nM(k[Ue].text),nr=1;if(Be.set(di,nr,j[Ue]),_s(D,di,j[Ue],nr),!$n)continue;let Lr=$n.isExternalLibraryImport,Mt=!1,hr=!1,vi=$n.resolvedFileName;Lr&&tt++;let Oi=hr&&tt>_n,Hr=vi&&!a2(Y,$n,D)&&!Y.noResolve&&Ue<D.imports.length&&!Oi;Oi?Pe.set(D.path,!0):Hr&&Xr(vi,!1,!1,{kind:4,file:D.path,index:Ue},$n.packageId),Lr&&tt--}}}function Nc(D,k){if(ne===0&&!k.ambientModuleNames?.length)return ui(D,k,void 0);let j,Y,Be,Ue=ime,$n=S&&S.getSourceFile(k.fileName);for(let Mt=0;Mt<D.length;Mt++){let hr=D[Mt];if(k===$n&&!ot(k.path)){let Oi=S?.getResolvedModule(k,hr.text,nl(k,hr));if(Oi?.resolvedModule){Dm(f,$e)&&Pa($e,Oi.resolvedModule.packageId?N.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:N.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2,hr.text,Di(k.originalFileName,Ye),Oi.resolvedModule.resolvedFileName,Oi.resolvedModule.packageId&&Ig(Oi.resolvedModule.packageId)),(Y??(Y=new Array(D.length)))[Mt]=Oi,(Be??(Be=[])).push(hr);continue}}let vi=!1;Gr(k.ambientModuleNames,hr.text)?(vi=!0,Dm(f,$e)&&Pa($e,N.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1,hr.text,Di(k.originalFileName,Ye))):vi=Lr(hr),vi?(Y||(Y=new Array(D.length)))[Mt]=Ue:(j??(j=[])).push(hr)}let di=j&&j.length?ui(j,k,Be):Re;if(!Y)return E.assert(di.length===D.length),di;let nr=0;for(let Mt=0;Mt<Y.length;Mt++)Y[Mt]||(Y[Mt]=di[nr],nr++);return E.assert(nr===di.length),Y;function Lr(Mt){let hr=S?.getResolvedModule(k,Mt.text,nl(k,Mt))?.resolvedModule,vi=hr&&S.getSourceFile(hr.resolvedFileName);if(hr&&vi)return!1;let Oi=M.get(Mt.text);return Oi?(Dm(f,$e)&&Pa($e,N.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified,Mt.text,Oi),!0):!1}}function ui(D,k,j){if(!D.length)return Re;let Y=Di(k.originalFileName,Ye),Be=void 0;In?.push(In.Phase.Program,"resolveModuleNamesWorker",{containingFileName:Y}),po.mark("beforeResolveModule");let Ue=tn(D,Y,Be,f,k,j);return po.mark("afterResolveModule"),po.measure("ResolveModule","beforeResolveModule","afterResolveModule"),In?.pop(),Ue}function nl(D,k){return 1}function is(D){if(D.imports)return;let k=dI(D),j=new Set,Y,Be,Ue,$n=D.pragmas?.get("this-object")??D.pragmas?.get("this_object");if($n){let Hr=XF(D,$n);Hr&&Hr.text?.length&&(Y=$r(Y,Hr))}for(let Hr of D.importCandidates)nr(D,Hr,!1);D.imports=Y||Re,D.ambientModuleNames=Ue||Re;return;function di(Hr){j.has(Hr.text)||(j.add(Hr.text),Y=$r(Y,Hr))}function nr(Hr,ii,Bo){if(SH(ii)&&ii.arguments?.length>=1&&ji(ii.arguments[0]))up(ii,!1),di(ii.arguments[0]);else if(DI(ii))if(ji(ii.inheritClause))up(ii,!1),di(ii.inheritClause);else{let no=Mt(ii.inheritClause),pi=Ge.createStringLiteral(no.join(""));pi.flags&=-17,Ea(pi,ii.inheritClause),di(pi)}else if(kh(ii)){if(ii.fileName){let no=Ge.createStringLiteral(ii.fileName);ns(no,ii.content.pos,ii.content.end),no.flags&=-17,no.parent=ii,di(no)}}else if(dme(ii)){let no=ii.typeExpression,pi=no?Jd(no)?no:no.type&&qg(no.type)?no.type.type:no.type:void 0;if(pi){let Wc=Lr(pi)||Re;Bn(Wc,bs=>{if(ji(bs))di(bs);else if(br(bs)){let _d=Mt(bs);if(_d.length){let Ao=Ge.createStringLiteral(_d.join(""));Ao.flags&=-17,Ao.parent=ii,di(Ao)}}})}}else if(Ti(ii)){let no=Mt(ii.expression);if(no.length){let pi=Ge.createStringLiteral(no.join(""));pi.flags&=-17,pi.parent=ii,di(pi)}}else if(Em(ii)&&!ii.expression&&ii.arguments?.length){let no=Uo(ii.arguments),pi=Mt(no);if(pi.length){let Wc=Ge.createStringLiteral(pi.join(""));Wc.flags&=-17,Wc.parent=ii,di(Wc)}}else if(ao(ii)&&Sn(ii.expression)&&ii.expression.text==="base_name"){let no=Mg(Hr.fileName,f),pi=Ge.createStringLiteral(no);pi.flags&=-17,pi.parent=ii,di(pi)}}function Lr(Hr){if(hu(Hr)&&ji(Hr.literal))return[Hr.literal];if(hu(Hr)&&br(Hr.literal))return[Hr.literal];if((tx(Hr)||_H(Hr))&&Hr.types.length)return Oo(Hr.types,Lr);if(Zu(Hr)&&Hr.elementType)return Lr(Hr.elementType)}function Mt(Hr){let ii=[];return ji(Hr)&&ii.push(Hr.text),nS(Hr,Bo=>{ji(Bo)&&ii.push(Bo.text)}),ii}function hr(Hr){}function vi(Hr){return!xh(Hr)||Rx(Hr)}function Oi(Hr,ii){let Bo=Hr,no=pi=>{if(vi(pi)&&pi.pos<=ii&&(ii<pi.end||ii===pi.end&&pi.kind===1))return pi};for(;;){let pi=nc(Bo)&&Bn(Bo.jsDoc,no)||No(Bo,no);if(!pi)return Bo;Bo=pi}}}function bl(D){}function As(D,k){Bn(D.referencedFiles,(j,Y)=>{Lt(sG(j.fileName,D.fileName),k,!1,void 0,{kind:5,file:D.path,index:Y})})}function xs(D,k,j,Y){if(bm(D)){let Be=$e.getCanonicalFileName(D),Ue=k(D);return j&&(Ue?gp(Y)&&Be===$e.getCanonicalFileName(fr(Y.file).fileName)&&j(N.A_file_cannot_have_a_reference_to_itself):j(N.File_0_not_found,D)),Ue}else throw"implement this"}function Cn(D,k){return D.fileName===k.fileName}function Ka(D,k){return D.kind===89?k.kind===89&&D.text===k.text:k.kind===16&&D.text===k.text}function pt(){return!zI(S.getProjectReferences(),S.getResolvedProjectReferences(),(D,k,j)=>{let Y=(k?k.commandLine.projectReferences:y)[j],Be=qa(Y);return D?!Be||Be.sourceFile!==D.sourceFile||!pu(D.commandLine.fileNames,Be.commandLine.fileNames):Be!==void 0},(D,k)=>{let j=k?yt(k.sourceFile.path).commandLine.projectReferences:y;return!pu(D,j,gM)})}function Gi(){if(!S)return 0;let D=S.getCompilerOptions();if(Kq(D,f))return 0;let k=S.getRootFileNames();if(!pu(k,u))return 0;if(!pt())return 0;y&&(zt=y.map(qa));let j=[],Y=[];if(ne=2,bc(S.getMissingFilePaths(),nr=>$e.fileExists(nr)))return 0;let Be=S.getSourceFiles(),Ue;(Mt=>(Mt[Mt.Exists=0]="Exists",Mt[Mt.Modified=1]="Modified"))(Ue||(Ue={}));let $n=new Map;for(let nr of Be){let Lr=De(nr.fileName,!1,pr,$e,f,S.getConfigDefines()),Mt=$e.getSourceFileByPath?$e.getSourceFileByPath(nr.fileName,nr.resolvedPath,Lr,void 0,Je):$e.getSourceFile(nr.fileName,Lr,void 0,Je);if(!Mt)return 0;let hr;if(hr=Mt!==nr,Mt.path=nr.path,Mt.originalFileName=nr.originalFileName,Mt.resolvedPath=nr.resolvedPath,Mt.fileName=nr.fileName,hr)nr.impliedNodeFormat!==Mt.impliedNodeFormat?ne=1:pu(nr.libReferenceDirectives,Mt.libReferenceDirectives,Cn)?nr.hasNoDefaultLib!==Mt.hasNoDefaultLib?ne=1:pu(nr.referencedFiles,Mt.referencedFiles,Cn)?(is(Mt),pu(nr.imports,Mt.imports,Ka)?pu(nr.typeReferenceDirectives,Mt.typeReferenceDirectives,Cn)||(ne=1):ne=1):ne=1:ne=1,Y.push(Mt);else if(ot(nr.path))ne=1,Y.push(Mt);else for(let vi of nr.ambientModuleNames)M.set(vi,nr.fileName);j.push(Mt)}if(ne!==2)return ne;for(let nr of Y){let Lr=uG(nr),Mt=Nc(Lr,nr);(G??(G=new Map)).set(nr.path,Mt),qq(Lr,Mt,Hr=>S.getResolvedModule(nr,Hr.text,nl(nr,Hr)),Vq)&&(ne=1);let vi=nr.typeReferenceDirectives;(me??(me=new Map)).set(nr.path,void 0)}if(ne!==2)return ne;if(Hq(D,f))return 1;if(S.resolvedLibReferences&&bc(S.resolvedLibReferences,(nr,Lr)=>We(Lr).actual!==nr.actual))return 1;At=S.getMissingFilePaths(),E.assert(j.length===S.getSourceFiles().length);for(let nr of j)Et.set(nr.path,nr);return S.getFilesByNameMap().forEach((nr,Lr)=>{if(!nr){Et.set(Lr,nr);return}if(nr.path===Lr){S.isSourceFileFromExternalLibrary(nr)&&gn.set(nr.path,!0);return}Et.set(Lr,Et.get(nr.path))}),v=j,J=S.getFileIncludeReasons(),Ee=S.getFileProcessingDiagnostics(),Ae=S.resolvedModules,be=S.resolvedLibReferences,Se=S.getCurrentPackagesMap(),Ft=S.getConfigDefines(),2}function qa(D){E.fail("implement me")}}function Xpe(e,n,r,i,a,c){return{rootNames:e,options:n,host:r,oldProgram:i,configFileParsingDiagnostics:a,typeScriptVersion:c}}function dG(e,n){return Zpe(e,n)}function Zpe(e,n,r=ho){let i=na(r.useCaseSensitiveFileNames);function a(){return ei(Qr(r.getExecutingFilePath()))}let c=Nf(e),u=r.realpath&&(m=>r.realpath(m)),f={getSourceFile:eme(m=>f.readFile(m),n,e.driverType),getDefaultLibLocation:a,getDefaultLibFileName:m=>nI(m),getSourceTextFromSnapshot:m=>r.readFile(m),writeFile:nme((m,y,g)=>r.writeFile(m,y,g),m=>(f.createDirectory||r.createDirectory)(m),m=>!0),getCurrentDirectory:gc(()=>r.getCurrentDirectory()),useCaseSensitiveFileNames:()=>r.useCaseSensitiveFileNames,getCanonicalFileName:i,getNewLine:()=>c,fileExists:m=>r.fileExists(m),readFile:m=>r.readFile(m),trace:m=>r.write(m+c),directoryExists:m=>r.directoryExists(m),getEnvironmentVariable:m=>r.getEnvironmentVariable?r.getEnvironmentVariable(m):"",getDirectories:m=>r.getDirectories(m),realpath:u,readDirectory:(m,y,g,S,_)=>r.readDirectory(m,y,g,S,_),createDirectory:m=>r.createDirectory(m),createHash:Ta(r,r.createHash),onAllFilesNeedReparse:m=>Vi};return f}function eme(e,n,r){return(i,a,c)=>{let u;try{po.mark("beforeIORead"),u=e(i),po.mark("afterIORead"),po.measure("I/O Read","beforeIORead","afterIORead")}catch(f){c&&c(f.message),u=""}return u!==void 0?rb(i,u,a,n,1,r):void 0}}function nme(e,n,r){return(i,a,c,u)=>{try{po.mark("beforeIOWrite"),K2(i,a,c,e,n,r),po.mark("afterIOWrite"),po.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(f){u&&u(f.message)}}}function K2(e,n,r,i,a,c){try{i(e,n,r)}catch{fG(ei(Qr(e)),a,c),i(e,n,r)}}function fG(e,n,r){if(e.length>Eu(e)&&!r(e)){let i=ei(e);fG(i,n,r),n(e)}}function gp(e){switch(e?.kind){case 4:case 5:case 6:case 8:return!0;default:return!1}}function sG(e,n){let r=ei(n),i=vs(e)?e:fi(r,e);return Qr(i)}function tme(e,n){if(!e)return!1;let r=e.getCompilerOptions();return EF(r,n,YV)||ZF(r,n)}function GI(e,n){return zI(void 0,e,(r,i)=>r&&n(r,i))}function zI(e,n,r,i){let a;return c(e,n,void 0);function c(u,f,m){if(i){let y=i(u,m);if(y)return y}return Bn(f,(y,g)=>{if(y&&a?.has(y.sourceFile.path))return;let S=r(y,m,g);return S||!y?S:((a||(a=new Set)).add(y.sourceFile.path),c(y.commandLine.projectReferences,y.references,y))})}}function Gg(e,n,r=0){if(gi(e))return e;if(e===void 0)return"";let i="";if(r){i+=n;for(let a=0;a<r;a++)i+=" "}if(i+=e.messageText,r++,e.next)for(let a of e.next)i+=Gg(a,n,r);return i}function rme(e,n){return Ar(e,r=>!r.skippedOn||!n[r.skippedOn])}function pG(e,n,r){let i;return Bn(e,c=>{let u=Zx(c,n);if(u.pop(),!i){i=u;return}let f=Math.min(i.length,u.length);for(let m=0;m<f;m++)if(r(i[m])!==r(u[m])){if(m===0)return!0;i.length=m;break}u.length<i.length&&(i.length=u.length)})?"":i?lb(i):n}function cG(e){return"efuns/"+(e.endsWith("ldmud.h")?"ldmud/":"fluffos/")+e}function lG(e,n,r){let i=e.configFilePath?ei(e.configFilePath):n;return fi(i,`__lib_node_modules_lookup_${r}__.ts`)}function a2(e,{extension:n},{isDeclarationFile:r}){switch(n){case".lpc":case".c":case".h":return;default:return i()}function i(){return r||e.allowArbitraryExtensions?void 0:N.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set}}function uG({imports:e}){return e.map(r=>r)}var ime={resolvedModule:void 0,resolvedTypeReferenceDirective:void 0};function ome(e,n,r,i,a,c,u,f){if(e.length===0)return Re;let m=[],y=new Map,g=f(n,r,i,c,u);for(let S of e){let _=g.nameAndMode.getName(S),b=g.nameAndMode.getMode(S,a,r?.commandLine.options||i),v=kE(_,b),T=y.get(v);T||y.set(v,T=g.resolve(_,b)),m.push(T)}return m}function ame(e,n,r){return 1}function sme(e){return e.text}var V2={getName:sme,getMode:(e,n,r)=>ame(n,e,r)};function cme(e,n,r,i,a){return{nameAndMode:V2,resolve:(c,u)=>bI(c,e,r,i,a,n,u)}}function mG(e,n,r,i){return 1}function SS(e,n){let r=E.checkDefined(e.getSourceFileByPath(n.file)),{kind:i,index:a}=n,c,u,f;switch(i){case 4:let m=lme(r,a);if(f=e.getResolvedModuleFromModuleSpecifier(m,r)?.resolvedModule?.packageId,m.pos===-1)return{file:r,packageId:f,text:m.text};c=eo(r.text,m.pos),u=m.end;break;case 5:({pos:c,end:u}=r.referencedFiles[a]);break;case 6:({pos:c,end:u}=r.typeReferenceDirectives[a]),f=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(r.typeReferenceDirectives[a],r)?.resolvedTypeReferenceDirective?.packageId;break;case 8:({pos:c,end:u}=r.libReferenceDirectives[a]);break;default:return E.assertNever(i)}return{file:r,pos:c,end:u,packageId:f}}function lme({imports:e},n){if(n<e.length)return e[n];let r=e.length;E.fail("should never ask for module name at index higher than possible module name")}function Lh(e){return e.pos!==void 0}function KE(e){return H2(e.path)}function gG(e,n,r){let i;return i=Ro(i,e.getConfigFileParsingDiagnostics()),i=Ro(i,e.getOptionsDiagnostics(r)),i=Ro(i,e.getSyntacticDiagnostics(n,r)),i=Ro(i,e.getGlobalDiagnostics(r)),i=Ro(i,e.getSemanticDiagnostics(n,r)),GT(i||Re)}function ume(e){return ug(e.fileName)}function yG(e,n,r,i,a,c,u,f,m,y){if(!e||f?.()||!pu(e.getRootFileNames(),n))return!1;let g;if(!pu(e.getProjectReferences(),y,T)||e.getSourceFiles().some(b))return!1;let S=e.getMissingFilePaths();if(S&&bc(S,a))return!1;let _=e.getCompilerOptions();if(!yM(_,r)||e.resolvedLibReferences&&bc(e.resolvedLibReferences,(F,M)=>u(M)))return!1;if(_.configFile&&r.configFile)return _.configFile.text===r.configFile.text;return!0;function b(F){return!v(F)||c(F.path)}function v(F){return F.version===i(F.resolvedPath,F.fileName)}function T(F,M,J){return gM(F,M)&&W(e.getResolvedProjectReferences()[J],F)}function W(F,M){if(F){if(Gr(g,F))return!0;let A=KE(M),V=m(A);return!V||F.commandLine.options.configFile!==V.options.configFile||!pu(F.commandLine.fileNames,V.fileNames)?!1:((g||(g=[])).push(F),!Bn(F.references,(ue,ye)=>!W(ue,F.commandLine.projectReferences[ye])))}let J=KE(M);return!m(J)}}function dme(e){switch(e.kind){case 220:case 227:case 225:case 223:case 228:case 221:return!0;default:return!1}}function Rh(e,n){return n}function DS(e,n,r){r(e,n)}function TG(e,n,r,i,a,c,u){let f=new Array(302),m,y,g,S=0,_=[],b=[],v=[],T=[],W=0,F=!1,M=[],J=0,A,V,ue=Rh,ye=DS,he=0,ce=[],Ee={factory:r,getCompilerOptions:()=>i,getEmitResolver:()=>e,getEmitHost:()=>n,startLexicalEnvironment:Ln,suspendLexicalEnvironment:Vt,resumeLexicalEnvironment:Hn,endLexicalEnvironment:Ye,setLexicalEnvironmentFlags:se,getLexicalEnvironmentFlags:jn,hoistVariableDeclaration:Pe,hoistFunctionDeclaration:gn,addInitializationStatement:$e,startBlockScope:wn,endBlockScope:Xn,addBlockScopedVariable:ft,requestEmitHelper:Ft,readEmitHelpers:Et,enableSubstitution:G,enableEmitNotification:Se,isSubstitutionEnabled:Qe,isEmitNotificationEnabled:_n,get onSubstituteNode(){return ue},set onSubstituteNode(xn){E.assert(he<1,"Cannot modify transformation hooks after initialization has completed."),E.assert(xn!==void 0,"Value must not be 'undefined'"),ue=xn},get onEmitNode(){return ye},set onEmitNode(xn){E.assert(he<1,"Cannot modify transformation hooks after initialization has completed."),E.assert(xn!==void 0,"Value must not be 'undefined'"),ye=xn},addDiagnostic(xn){ce.push(xn)}};for(let xn of a)PM($t(Io(xn)));po.mark("beforeTransform");let Fe=c.map(xn=>xn(Ee)),be=xn=>{for(let It of Fe)xn=It(xn);return xn};he=1;let de=[];for(let xn of a)In?.push(In.Phase.Emit,"transformNodes",xn.kind===176?{path:xn.path}:{kind:xn.kind,pos:xn.pos,end:xn.end}),de.push((u?be:Ae)(xn)),In?.pop();return he=2,po.mark("afterTransform"),po.measure("transformTime","beforeTransform","afterTransform"),{transformed:de,substituteNode:me,emitNodeWithNotification:tt,isEmitNotificationEnabled:_n,dispose:At,diagnostics:ce};function Ae(xn){return xn&&(!Vr(xn)||!xn.isDeclarationFile)?be(xn):xn}function G(xn){E.assert(he<2,"Cannot modify the transformation context after transformation has completed."),f[xn]|=1}function Qe(xn){return(f[xn.kind]&1)!==0&&(bo(xn)&8)===0}function me(xn,It){return E.assert(he<3,"Cannot substitute a node after the result is disposed."),It&&Qe(It)&&ue(xn,It)||It}function Se(xn){E.assert(he<2,"Cannot modify the transformation context after transformation has completed."),f[xn]|=2}function _n(xn){return(f[xn.kind]&2)!==0||(bo(xn)&4)!==0}function tt(xn,It,pr){E.assert(he<3,"Cannot invoke TransformationResult callbacks after the result is disposed."),It&&(_n(It)?ye(xn,It,pr):pr(xn,It))}function Pe(xn){E.assert(he>0,"Cannot modify the lexical environment during initialization."),E.assert(he<2,"Cannot modify the lexical environment after transformation has completed.");let It=gs(r.createVariableDeclaration(xn),128);m?m.push(It):m=[It],S&1&&(S|=2)}function gn(xn){E.assert(he>0,"Cannot modify the lexical environment during initialization."),E.assert(he<2,"Cannot modify the lexical environment after transformation has completed."),gs(xn,2097152),y?y.push(xn):y=[xn]}function $e(xn){E.assert(he>0,"Cannot modify the lexical environment during initialization."),E.assert(he<2,"Cannot modify the lexical environment after transformation has completed."),gs(xn,2097152),g?g.push(xn):g=[xn]}function Ln(){E.assert(he>0,"Cannot modify the lexical environment during initialization."),E.assert(he<2,"Cannot modify the lexical environment after transformation has completed."),E.assert(!F,"Lexical environment is suspended."),_[W]=m,b[W]=y,v[W]=g,T[W]=S,W++,m=void 0,y=void 0,g=void 0,S=0}function Vt(){E.assert(he>0,"Cannot modify the lexical environment during initialization."),E.assert(he<2,"Cannot modify the lexical environment after transformation has completed."),E.assert(!F,"Lexical environment is already suspended."),F=!0}function Hn(){E.assert(he>0,"Cannot modify the lexical environment during initialization."),E.assert(he<2,"Cannot modify the lexical environment after transformation has completed."),E.assert(F,"Lexical environment is not suspended."),F=!1}function Ye(){E.assert(he>0,"Cannot modify the lexical environment during initialization."),E.assert(he<2,"Cannot modify the lexical environment after transformation has completed."),E.assert(!F,"Lexical environment is suspended.");let xn;if(m||y||g){if(y&&(xn=[...y]),m){let It=r.createVariableStatement(void 0,void 0,r.createVariableDeclarationList(m));gs(It,2097152),xn?xn.push(It):xn=[It]}g&&(xn?xn=[...xn,...g]:xn=[...g])}return W--,m=_[W],y=b[W],g=v[W],S=T[W],W===0&&(_=[],b=[],v=[],T=[]),xn}function se(xn,It){S=It?S|xn:S&~xn}function jn(){return S}function wn(){E.assert(he>0,"Cannot start a block scope during initialization."),E.assert(he<2,"Cannot start a block scope after transformation has completed."),M[J]=A,J++,A=void 0}function Xn(){E.assert(he>0,"Cannot end a block scope during initialization."),E.assert(he<2,"Cannot end a block scope after transformation has completed.");let xn=Pn(A)?[r.createVariableStatement(void 0,void 0,r.createVariableDeclarationList(A.map(It=>r.createVariableDeclaration(It)),1))]:void 0;return J--,A=M[J],J===0&&(M=[]),xn}function ft(xn){E.assert(J>0,"Cannot add a block scoped variable outside of an iteration body."),(A||(A=[])).push(xn)}function Ft(xn){if(E.assert(he>0,"Cannot modify the transformation context during initialization."),E.assert(he<2,"Cannot modify the transformation context after transformation has completed."),E.assert(!xn.scoped,"Cannot request a scoped emit helper."),xn.dependencies)for(let It of xn.dependencies)Ft(It);V=$r(V,xn)}function Et(){E.assert(he>0,"Cannot modify the transformation context during initialization."),E.assert(he<2,"Cannot modify the transformation context after transformation has completed.");let xn=V;return V=void 0,xn}function At(){if(he<3){for(let xn of a)PM($t(Io(xn)));m=void 0,_=void 0,y=void 0,b=void 0,ue=void 0,ye=void 0,V=void 0,he=3}}}var ub={factory:Ge,getCompilerOptions:()=>({}),getEmitResolver:ep,getEmitHost:ep,startLexicalEnvironment:Vi,resumeLexicalEnvironment:Vi,suspendLexicalEnvironment:Vi,endLexicalEnvironment:Yy,setLexicalEnvironmentFlags:Vi,getLexicalEnvironmentFlags:()=>0,hoistVariableDeclaration:Vi,hoistFunctionDeclaration:Vi,addInitializationStatement:Vi,startBlockScope:Vi,endBlockScope:Yy,addBlockScopedVariable:Vi,requestEmitHelper:Vi,readEmitHelpers:ep,enableSubstitution:Vi,enableEmitNotification:Vi,isSubstitutionEnabled:ep,isEmitNotificationEnabled:ep,onSubstituteNode:Rh,onEmitNode:DS,addDiagnostic:Vi};function hG(e,n,r){let i=e.getCompilerOptions(),a=Ar(oq(e,r),sq);return TG(n,e,Ge,i,r?Gr(a,r)?[r]:Re:a,[],!1).diagnostics}var SG=fme();var tz=gc(()=>vm({})),zg=gc(()=>vm({removeComments:!0})),rz=gc(()=>vm({removeComments:!0,neverAsciiEscape:!0})),iz=gc(()=>vm({removeComments:!0,omitTrailingSemicolon:!0}));function vm(e={},n={}){var{hasGlobalName:r,onEmitNode:i=DS,isEmitNotificationEnabled:a,substituteNode:c=Rh,onBeforeEmitNode:u,onAfterEmitNode:f,onBeforeEmitNodeArray:m,onAfterEmitNodeArray:y,onBeforeEmitToken:g,onAfterEmitToken:S}=n,_=!!e.extendedDiagnostics,b=!!e.omitBraceSourceMapPositions,v=Nf(e),T=1,W=new Map,F,M,J,A,V,ue,ye,he,ce,Ee,Fe,be,de,Ae,G,Qe=e.preserveSourceNewlines,me,Se,_n,tt=eu,Pe,gn=!0,$e,Ln,Vt=-1,Hn,Ye=-1,se=-1,jn=-1,wn=-1,Xn,ft,Ft=!1,Et=!!e.removeComments,At,xn,{enter:It,exit:pr}=po.createTimerIf(_,"commentTime","beforeComment","afterComment"),tn=Ge.parenthesizer,ot={select:L=>L===0?tn.parenthesizeLeadingTypeArgument:void 0},Zn=ie();return kn(),{printNode:zt,printList:Yt,printFile:xi,printBundle:Cr,writeNode:Ie,writeList:Oe,writeFile:Z,writeBundle:Je};function zt(L,ae,ze){switch(L){case 0:E.assert(Vr(ae),"Expected a SourceFile node.");break;case 2:E.assert(Sn(ae),"Expected an Identifier node.");break;case 1:E.assert(Tc(ae),"Expected an Expression node.");break}switch(ae.kind){case 176:return xi(ae);case 177:return Cr(ae)}return Ie(L,ae,ze,fe()),Ce()}function Yt(L,ae,ze){return Oe(L,ae,ze,fe()),Ce()}function Cr(L){return Je(L,fe(),void 0),Ce()}function xi(L){return Z(L,fe(),void 0),Ce()}function Ie(L,ae,ze,un){let Ut=Se;qn(un,void 0),ne(L,ae,ze),kn(),Se=Ut}function Oe(L,ae,ze,un){let Ut=Se;qn(un,void 0),ze&&sn(ze),We(void 0,ae,L),kn(),Se=Ut}function Je(L,ae,ze){Pe=!1;let un=Se;qn(ae,ze),console.warn("todo - implment me - writeBundle"),ca(L);for(let Ut of L.sourceFiles)ne(0,Ut,Ut);kn(),Se=un}function Z(L,ae,ze){console.warn("todo - implment me - writeFile"),Pe=!0;let un=Se;qn(ae,ze),ca(L),ne(0,L,L),kn(),Se=un}function fe(){return _n||(_n=bh(v))}function Ce(){let L=_n.getText();return _n.clear(),L}function ne(L,ae,ze){ze&&sn(ze),zo(L,ae,void 0)}function sn(L){F=L,Xn=void 0,ft=void 0,L&&H(L)}function H(L){if(!gn){if(Ln=L,L===Hn){Vt=Ye;return}ge(L)||(Vt=$e.addSource(L.fileName),e.inlineSources&&$e.setSourceContent(Vt,L.text),Hn=L,Ye=Vt)}}function ge(L){return qs(L.fileName,".json")}function qn(L,ae){L&&e.omitTrailingSemicolon&&(L=yE(L)),Se=L,$e=ae,gn=!Se||!$e}function kn(){M=[],J=[],A=[],V=new Set,ue=[],ye=new Map,he=[],ce=0,Ee=[],Fe=0,be=[],de=void 0,Ae=[],G=void 0,F=void 0,Xn=void 0,ft=void 0,qn(void 0,void 0)}function On(){return Xn||(Xn=yc(E.checkDefined(F)))}function nn(L,ae){L!==void 0&&zo(4,L,ae)}function Dr(L){L!==void 0&&zo(2,L,void 0)}function Gt(L,ae){L!==void 0&&zo(1,L,ae)}function Rr(L){Qe&&nE(L)&4&&(Qe=!1)}function zi(L){Qe=L}function zo(L,ae,ze){xn=ze,Te(0,L,ae)(L,ae),xn=void 0}function sa(L){return!Et&&!Vr(L)}function mo(L){return!gn&&!Vr(L);}function Ve(L,ae){let ze=dn(1,L,ae);E.assertIsDefined(At),ae=At,At=void 0,ze(L,ae)}function et(L,ae){let ze=dn(2,L,ae),un=se,Ut=jn,jr=wn;Le(ae),ze(L,ae),Q(ae,un,Ut,jr)}function Le(L){console.warn("todo - implment me - emitCommentsBeforeNode")}function Q(L,ae,ze,un){console.warn("todo - implment me - emitCommentsAfterNode")}function ie(){return pS(L,ae,ze,un,Ut,void 0);function L(kt,vr){if(vr){vr.stackIndex++,vr.preserveSourceNewlinesStack[vr.stackIndex]=Qe,vr.containerPosStack[vr.stackIndex]=se,vr.containerEndStack[vr.stackIndex]=jn,vr.declarationListContainerEndStack[vr.stackIndex]=wn;let cr=vr.shouldEmitCommentsStack[vr.stackIndex]=sa(kt),P=vr.shouldEmitSourceMapsStack[vr.stackIndex]=mo(kt);u?.(kt),cr&&Le(kt),P&&q(kt),Rr(kt)}else vr={stackIndex:0,preserveSourceNewlinesStack:[void 0],containerPosStack:[-1],containerEndStack:[-1],declarationListContainerEndStack:[-1],shouldEmitCommentsStack:[!1],shouldEmitSourceMapsStack:[!1]};return vr}function ae(kt,vr,cr){return jr(kt,cr,"left")}function ze(kt,vr,cr){let P=kt.kind!==27,ee=w(cr,cr.left,kt),Ke=w(cr,kt,cr.right);bt(ee,P),ct(kt.pos),zs(kt,kt.kind===103?Br:Er),zn(kt.end,!0),bt(Ke,!0)}function un(kt,vr,cr){return jr(kt,cr,"right")}function Ut(kt,vr){let cr=w(kt,kt.left,kt.operatorToken),P=w(kt,kt.operatorToken,kt.right);if(ri(cr,P),vr.stackIndex>0){let ee=vr.preserveSourceNewlinesStack[vr.stackIndex],Ke=vr.containerPosStack[vr.stackIndex],En=vr.containerEndStack[vr.stackIndex],xt=vr.declarationListContainerEndStack[vr.stackIndex],rt=vr.shouldEmitCommentsStack[vr.stackIndex],sr=vr.shouldEmitSourceMapsStack[vr.stackIndex];zi(ee),sr&&void 0,rt&&Q(kt,Ke,En,xt),f?.(kt),vr.stackIndex--}}function jr(kt,vr,cr){let P=cr==="left"?tn.getParenthesizeLeftSideOfBinaryForOperator(vr.operatorToken.kind):tn.getParenthesizeRightSideOfBinaryForOperator(vr.operatorToken.kind),ee=Te(0,1,kt);if(ee===Ve&&(E.assertIsDefined(At),kt=P(Xa(At,Tc)),ee=dn(1,1,kt),At=void 0),(ee===et||ee===te||ee===ke)&&br(kt))return kt;xn=P,ee(1,kt)}}function Te(L,ae,ze){switch(L){case 0:if(i!==DS&&(!a||a(ze)))return Jn;case 1:if(c!==Rh&&(At=c(ae,ze)||ze)!==ze)return xn&&(At=xn(At)),Ve;case 2:if(sa(ze))return et;case 3:if(mo(ze))return te;case 4:return ke;default:return E.assertNever(L)}}function te(L,ae){let ze=dn(3,L,ae);q(ae),ze(L,ae)}function q(L){console.warn("todo - implment me - emitSourceMapsBeforeNode")}function qe(L){}function dn(L,ae,ze){return Te(L+1,ae,ze)}function Jn(L,ae){let ze=dn(0,L,ae);i(L,ae,ze)}function ke(L,ae){if(u?.(ae),Qe){let ze=Qe;Rr(ae),wt(L,ae),zi(ze)}else wt(L,ae);f?.(ae),xn=void 0}function We(L,ae,ze,un,Ut,jr){St(nn,L,ae,ze|(L&&bo(L)&2?65536:0),un,Ut,jr)}function ln(L,ae,ze,un,Ut,jr){St(Gt,L,ae,ze,un,Ut,jr)}function zn(L,ae,ze){Et||(It(),console.warn("todo - implment me - emitTrailingCommentsOfPosition"),pr())}function St(L,ae,ze,un,Ut,jr=0,kt=ze?ze.length-jr:0){if(ze===void 0&&un&16384)return;let cr=ze===void 0||jr>=ze.length||kt===0;if(cr&&un&32768){m?.(ze),y?.(ze);return}un&4209664&&(Jt(_G(un)),cr&&ze&&zn(ze.pos,!0)),m?.(ze),cr?un&1&&!(Qe&&(!ae||F&&lp(ae,F)))?Xr():un&256&&!(un&524288)&&Pr():Rn(L,ae,ze,un,Ut,jr,kt,ze.hasTrailingComma,ze),y?.(ze),un&4209664&&(cr&&ze&&ct(ze.end),Jt(xG(un)))}function ct(L){Et||L===-1||console.warn("todo - implment me - emitLeadingCommentsOfPosition")}function kr(L,ae,ze){if(ze&2||Qe){if(ze&65536)return 1;if(ae===void 0)return!L||F&&lp(L,F)?0:1;if(ae.pos===me)return 0;if(F&&L&&!ec(L.pos)&&!Zi(ae)&&(!ae.parent||ks(ae.parent)===ks(L)))return Qe?fr(un=>oM(ae.pos,L.pos,F,un)):aS(L,ae,F)?0:1;if(Or(ae,ze))return 1}return ze&1?1:0}function Or(L,ae){if(Zi(L)){let ze=fS(L);return ze===void 0?(ae&65536)!==0:ze}return(ae&65536)!==0}function Rn(L,ae,ze,un,Ut,jr,kt,vr,cr){let P=(un&262144)===0,ee=P,Ke=kr(ae,ze[jr],un);Ke?(Xr(Ke),ee=!1):un&256&&Pr(),un&128&&Lt();let En=bG(L,Ut),xt,rt=!1;for(let wo=0;wo<kt;wo++){let kc=ze[jr+wo];if(un&32)Xr(),Ua(un);else if(xt){un&60&&xt.end!==(ae?ae.end:-1)&&(bo(xt)&2048||ct(xt.end)),Ua(un);let tu=yt(xt,kc,un);if(tu>0){if((un&131)===0&&(Lt(),rt=!0),ee&&un&60&&!ec(kc.pos)){let Oa=bE(kc);zn(Oa.pos,!!(un&512),!0)}Xr(tu),ee=!1}else xt&&un&512&&Pr()}if(ee){let tu=bE(kc);zn(tu.pos)}else ee=P;me=kc.pos,En(kc,L,Ut,wo),rt&&(ki(),rt=!1),xt=kc}let sr=xt?bo(xt):0,at=Et||!!(sr&2048),hi=vr&&un&64&&un&16;hi&&(xt&&!at?Va(27,xt.end,Jt,xt):Jt(",")),xt&&(ae?ae.end:-1)!==xt.end&&un&60&&!at&&ct(hi&&cr?.end?cr.end:xt.end),un&128&&ki();let hn=Ko(ae,ze[jr+kt-1],un,cr);hn?Xr(hn):un&2097408&&Pr()}function Li(L,ae){if(ae.pos<L.end)return!1;L=ks(L),ae=ks(ae);let ze=L.parent;if(!ze||ze!==ae.parent)return!1;let un=aM(L),Ut=un?.indexOf(L);return Ut!==void 0&&Ut>-1&&un.indexOf(ae)===Ut+1}function yt(L,ae,ze){if(ze&2||Qe){if(L===void 0||ae===void 0)return 0;if(F&&!Zi(L)&&!Zi(ae))return Qe&&Li(L,ae)?fr(un=>tE(L,ae,F,un)):!Qe&&Lo(L,ae)?Bx(L,ae,F)?0:1:ze&65536?1:0;if(Or(L,ze)||Or(ae,ze))return 1}else if(fS(ae))return 1;return ze&1?1:0}function Lo(L,ae){return L=ks(L),L.parent&&L.parent===ks(ae).parent}function Ko(L,ae,ze,un){if(ze&2||Qe){if(ze&65536)return 1;if(ae===void 0)return!L||F&&lp(L,F)?0:1;if(F&&L&&!ec(L.pos)&&!Zi(ae)&&(!ae.parent||ae.parent===L)){if(Qe){let Ut=un&&!ec(un.end)?un.end:ae.end;return fr(jr=>cM(Ut,L.end,F,jr))}return sM(L,ae,F)?0:1}if(Or(ae,ze))return 1}return ze&1&&!(ze&131072)?1:0}function Ua(L){switch(L&60){case 0:break;case 16:Jt(",");break;case 4:Pr(),Jt("|");break;case 32:Pr(),Jt("*"),Pr();break;case 8:Pr(),Jt("&");break}}function ca(L){if(Vr(L)){let ae=ux(L.text);if(ae)return Sd(ae),Xr(),!0}else for(let ae of L.sourceFiles)if(ca(ae))return!0}function wt(L,ae,ze=!0){if(L===2)return ua(Xa(ae,Sn));if(L===4){switch(ae.kind){case 89:return ua(ae);case 163:return j(ae);case 242:return Hr(ae);case 149:return vi(ae);case 158:return Oi(ae);case 169:return Bo(ae);case 237:return Qs(ae);case 238:return Dp(ae);case 151:return sc(ae);case 248:return Hh(ae);case 240:return ry(ae);case 161:return ii(ae);case 257:return zh(ae);case 157:return Gh(ae);case 166:return Na(ae);case 256:return Ys(ae);case 251:return bp(ae);case 250:return tf(ae);case 247:return Dd(ae);case 299:return Ed(ae);case 301:return $h(ae)}if(Tc(ae)&&(L=1,c!==Rh)){let un=c(L,ae)||ae;un!==ae&&(ae=un,xn&&(ae=xn(ae)))}}if(L===1)switch(ae.kind){case 16:return Ht(ae);case 11:case 13:return yr(ae);case 89:return ua(ae);case 290:return li(ae);case 269:return Zn(ae);case 272:return xp(ae);case 281:return bd(ae);case 286:return Cd(ae)}if(Qc(ae.kind))return zs(ae,Br);if(Vv(ae.kind))return zs(ae,Jt);console.warn("todo - implment me - pipelineEmitWithHintWorker "+E.formatSyntaxKind(ae.kind))}function Jc(L){Se.writeLiteral(L)}function vn(L){Se.writeStringLiteral(L)}function eu(L){Se.write(L)}function la(L,ae){Se.writeSymbol(L,ae)}function Jt(L){Se.writePunctuation(L)}function Gn(){Se.writeTrailingSemicolon(";")}function Br(L){Se.writeKeyword(L)}function Er(L){Se.writeOperator(L)}function xl(L){Se.writeParameter(L)}function Sd(L){Se.writeComment(L)}function Pr(){Se.writeSpace(" ")}function nu(L){Se.writeProperty(L)}function Co(L){Se.nonEscapingWrite?Se.nonEscapingWrite(L):Se.write(L)}function Xr(L=1){for(let ae=0;ae<L;ae++)Se.writeLine(ae>0)}function Lt(){Se.increaseIndent()}function ki(){Se.decreaseIndent()}function Mr(L,ae,ze,un,Ut){return Ut(ae,ze,un)}function ga(L,ae,ze,un){return gn?Gs(L,ze,ae):Mr(un,L,ze,ae,Gs)}function zs(L,ae){g&&g(L),ae(Ai(L.kind)),S&&S(L)}function Gs(L,ae,ze){let un=Ai(L);return ae(un),ze<0?ze:ze+un.length}function Pc(L){for(;L.kind===289&&Zi(L);)L=L.expression;return L}function fr(L){E.assert(!!Qe);let ae=L(!0);return ae===0?L(!1):ae}function w(L,ae,ze){return bo(L)&262144?0:(L=Pc(L),ae=Pc(ae),ze=Pc(ze),fS(ze)?1:F&&!Zi(L)&&!Zi(ae)&&!Zi(ze)?Qe?fr(un=>tE(ae,ze,F,un)):Bx(ae,ze,F)?0:1:0)}function De(L,ae,ze){if(bo(L)&1)Pr();else if(Qe){let un=w(L,ae,ze);un?Xr(un):Pr()}else Xr()}function yn(L){let ae=L.split(/\r\n?|\n/g),ze=lO(ae);for(let un of ae){let Ut=ze?un.slice(ze):un;Ut.length&&(Xr(),tt(Ut))}}function bt(L,ae){L?(Lt(),Xr(L)):ae&&Pr()}function ri(L,ae){L&&ki(),ae&&ki()}function ai(L,ae){if(ji(L)&&L.textSourceNode)return ai(L.textSourceNode,ae);let ze=F,un=!!ze&&!!L.parent&&!Zi(L);if(Dg(L)){if(!un||$t(L)!==ks(ze))return ra(L)}else if(E.assertNode(L,zT),!un)return L.text;return np(ze,L,ae)}function yr(L){Ht(L)}function Ht(L){let ae=co(L,e.neverAsciiEscape);(e.sourceMap||e.inlineSourceMap)&&L.kind===16?Jc(ae):vn(ae)}function li(L){let ae=L.elements,ze=L.multiLine?65536:0;ln(L,ae,4195026|ze,tn.parenthesizeExpressionForDisallowedComma)}function co(L,ae){if(L.kind===16&&L.textSourceNode){let un=L.textSourceNode;if(Sn(un)||Yc(un)||Ud(un)){let Ut=Ud(un)?un.text:ai(un);return ae||bo(L)&16777216?`"${sp(Ut)}"`:`"${QF(Ut)}"`}else return co(un,ae)}let ze=(ae?1:0)|(e.terminateUnterminatedLiterals?4:0)|(e.target&&e.target>=1?8:0);return mM(L,F,ze)}function ua(L){(L.symbol?la:tt)(ai(L,!1),L.symbol),We(L,jg(L),53776)}function rs(L){he.push(ce),ce=0,Ae.push(G),!(L&&bo(L)&1048576)&&(Ee.push(Fe),Fe=0,ue.push(ye),ye=void 0,be.push(de))}function _s(L){ce=he.pop(),G=Ae.pop(),!(L&&bo(L)&1048576)&&(Fe=Ee.pop(),ye=ue.pop(),de=be.pop())}function el(L){if(L)switch(L.kind){case 174:case 175:case 152:Nc(L.name);break}}function Nc(L){L&&(am(L)?k(L):Po(L)&&ui(L))}function ui(L){if(L)switch(L.kind){case 236:Bn(L.statements,ui);break;case 245:case 246:ui(L.statement);break;case 253:ui(L.thenStatement),ui(L.elseStatement);break;case 243:ui(L.initializer),ui(L.statement);case 244:ui(L.expression),ui(L.statement);break;case 256:ui(L.caseBlock);break;case 240:Bn(L.clauses,ui);break;case 299:case 301:Bn(L.statements,ui);break;case 255:ui(L.block);break;case 242:ui(L.declarationList);break;case 238:Bn(L.declarations,ui);break;case 237:case 149:case 266:Nc(L.name);break;case 169:Nc(L.name),bo(L)&1048576&&(Bn(L.parameters,ui),ui(L.body));break;case 265:Bn(L.elements,ui);break}}function nl(L,ae){let ze,un;if(ae?(ze=G,un=Ae):(ze=de,un=be),ze?.has(L))return!0;for(let Ut=un.length-1;Ut>=0;Ut--)if(ze!==un[Ut]&&(ze=un[Ut],ze?.has(L)))return!0;return!1}function is(L,ae){return bl(L,ae)&&!nl(L,ae)&&!V.has(L)}function bl(L,ae){return F?KO(F,L,r):!0}function As(L,ae=is,ze,un,Ut,jr,kt){if(L.length>0&&L.charCodeAt(0)===35&&(L=L.slice(1)),jr.length>0&&jr.charCodeAt(0)===35&&(jr=jr.slice(1)),ze){let cr=fd(Ut,jr,L,kt);if(ae(cr,Ut))return un?Gi(cr):V.add(cr),cr}L.charCodeAt(L.length-1)!==95&&(L+="_");let vr=1;for(;;){let cr=fd(Ut,jr,L+vr,kt);if(ae(cr,Ut))return un?Gi(cr):V.add(cr),cr;vr++}}function xs(L,ae,ze,un,Ut){switch(L.kind){case 89:return As(ai(L),is,!!(ze&16),!!(ze&8),ae,un,Ut);case 169:{E.assert(!un&&!Ut&&!ae);let jr=L.name;if(jr&&!am(jr))return xs(jr,!1,ze,un,Ut);E.fail("shouldn't be here")}case 274:E.fail("implement me");case 147:return qa(0,!0,ae,un,Ut);default:return qa(0,!1,ae,un,Ut)}}function Cn(L,ae,ze,un,Ut){let jr=ys(L),kt=ae?J:M;return kt[jr]||(kt[jr]=xs(L,ae,ze??0,pp(un,k),pp(Ut)))}function Ka(L){switch(L){case"":return Fe;case"#":return ce;default:return ye?.get(L)??0}}function pt(L,ae){switch(L){case"":Fe=ae;break;case"#":ce=ae;break;default:ye??(ye=new Map),ye.set(L,ae);break}}function Gi(L){(!de||de===Vo(be))&&(de=new Set),de.add(L)}function qa(L,ae,ze,un,Ut){un.length>0&&un.charCodeAt(0)===35&&(un=un.slice(1));let jr=fd(ze,un,"",Ut),kt=Ka(jr);if(L&&!(kt&L)){let cr=fd(ze,un,L===268435456?"_i":"_n",Ut);if(is(cr,ze))return kt|=L,ae&&Gi(cr),pt(jr,kt),cr}for(;;){let vr=kt&268435455;if(kt++,vr!==8&&vr!==13){let cr=vr<26?"_"+String.fromCharCode(97+vr):"_"+(vr-26),P=fd(ze,un,cr,Ut);if(is(P,ze))return ae&&Gi(P),pt(jr,kt),P}}}function D(L){let ae=L.emitNode.autoGenerate,ze=pp(ae.prefix,k),un=pp(ae.suffix);switch(ae.flags&7){case 1:return qa(0,!!(ae.flags&8),Yc(L),ze,un);case 2:return E.assertNode(L,Sn),qa(268435456,!!(ae.flags&8),!1,ze,un);case 3:return As(ra(L),ae.flags&32?bl:is,!!(ae.flags&16),!!(ae.flags&8),Yc(L),ze,un)}return E.fail(`Unsupported GeneratedIdentifierKind: ${E.formatEnum(ae.flags&7,JT,!0)}.`)}function k(L){let ae=L.emitNode.autoGenerate;if((ae.flags&7)===4)return Cn(FM(L),Yc(L),ae.flags,ae.prefix,ae.suffix);{let ze=ae.id;return A[ze]||(A[ze]=D(L))}}function j(L){rs(L),Bn(L.members,el),Jt("{");let ae=bo(L)&1?768:32897;We(L,L.members,ae|524288),Jt("}"),_s(L)}function Y(L,ae){We(L,ae,2359808);let ze=Vo(ae);return ze&&!ec(ze.end)?ze.end:L.pos}function Be(L,ae,ze){return ae?.length?Y(L,ae):L.pos}function Ue(L,ae,ze){let un=bo(L)&131072;un&&Lt(),rs(L),Bn(L.parameters,ui),ae(L),ze(L),_s(L),un&&ki()}function $n(L,ae){let ze=AT(ae);return ze&&ze.pos===L.pos&&zd(L)&&!L.type&&!Pn(L.modifiers)&&!Pn(ze.modifiers)&&!ze.dotDotDotToken&&!ze.type&&!ze.initializer&&Sn(ze.name)}function di(L,ae){We(L,ae,2576)}function nr(L,ae){$n(L,ae)?We(L,ae,528):di(L,ae)}function Lr(L){nr(L,L.parameters),Pr(),Jt("=>")}function Mt(L){Pr(),nn(L.type)}function hr(L,ae){if(!L)return;let ze=tt;tt=ae,nn(L),tt=ze}function vi(L){Be(L,L.modifiers,!0),Om(L.type),hr(L.name,xl),nn(L.dotDotDotToken),Qh(L.initializer,L.type?L.type.end:L.name?L.name.end:L.modifiers?L.modifiers.end:L.pos,L,tn.parenthesizeExpressionForDisallowedComma)}function Oi(L){Ue(L,Lr,Mt)}function Hr(L){Be(L,L.modifiers,!1),Om(L.type),nn(L.declarationList),Gn()}function ii(L){nn(L.elementType,tn.parenthesizeNonArrayTypeOfPostfixType),Jt("*")}function Bo(L){no(L)}function no(L){Be(L,L.modifiers,!1),Om(L.type),nn(L.asteriskToken),Pr(),Dr(L.name),Ue(L,Cp,pi)}function pi(L){let ae=L.body;ae?Wc(ae):Gn()}function Wc(L){ui(L),u?.(L),Pr(),Jt("{"),Lt();let ae=Dl(L)?bs:_d;tl(L,L.statements,ae),ki(),ga(19,L.statements.end,Jt,L),f?.(L)}function bs(L){_d(L,!0)}function _d(L,ae){let ze=vu(L.statements),un=Se.getTextPos();Zd(L),ze===0&&un===Se.getTextPos()&&ae?(ki(),We(L,L.statements,768),Lt()):We(L,L.statements,1,void 0,ze)}function Ao(L){let ae=kM(L);return ae&&xf(ae,EM)}function Zd(L){let ae=!1,ze=L.kind===177?L:void 0;if(ze&&T===0)return;let un=ze?ze.sourceFiles.length:1;for(let Ut=0;Ut<un;Ut++){let jr=ze?ze.sourceFiles[Ut]:L,kt=Vr(jr)?jr:F,vr=e.noEmitHelpers||!!kt&&IM(kt),cr=Vr(jr)&&!Pe,P=Ao(jr);if(P)for(let ee of P){if(ee.scoped){if(ze)continue}else{if(vr)continue;if(cr){if(W.get(ee.name))continue;W.set(ee.name,!0)}}typeof ee.text=="string"?yn(ee.text):yn(ee.text(_p)),ae=!0}}return ae}function _p(L){return As(L,bl,!0,!1,!1,"","")}function vu(L,ae,ze){let un=!!ae;for(let Ut=0;Ut<L.length;Ut++){let jr=L[Ut];if(dE(jr))(ze?!ze.has(jr.expression.text):!0)&&(un&&(un=!1,sn(ae)),Xr(),nn(jr),ze&&ze.add(jr.expression.text));else return Ut}return L.length}function ko(L){let ae=F&&fM(F.text,On(),Se,Rm,L,v,Et);ae&&(ft?ft.push(ae):ft=[ae])}function wm(L,ae){return e.onlyPrintJsDocStyle?fI(L,ae)||Hx(L,ae):!0}function Rm(L,ae,ze,un,Ut,jr){!F||!wm(F.text,un)||(Fu(un),TE(L,ae,ze,un,Ut,jr),Fu(Ut))}function Fu(L){if(gn||ec(L)||ge(Ln))return;let{line:ae,character:ze}=ma(Ln,L);$e.addMapping(Se.getLine(),Se.getColumn(),Vt,ae,ze,void 0)}function tl(L,ae,ze){It();let{pos:un,end:Ut}=ae,jr=bo(L),kt=un<0||(jr&1024)!==0,vr=Et||Ut<0||(jr&2048)!==0;kt||ko(ae),pr(),jr&4096&&!Et?(Et=!0,ze(L),Et=!1):ze(L),It(),vr||(lo(ae.end,!0),Ft&&!Se.isAtStartOfLine()&&Se.writeLine()),pr()}function lo(L,ae){Ft=!1,ae?_a(L,Cl):L===0&&console.debug("todo - emitLeadingComments")}function Cl(L,ae,ze,un,Ut){!F||!wm(F.text,L)||(Ft||(pM(On(),Se,Ut,L),Ft=!0),Fu(L),TE(F.text,On(),Se,L,ae,v),Fu(ae),un?Se.writeLine():ze===3&&Se.writeSpace(" "))}function $s(L){if(!F)return;let ae=ta(ft).detachedCommentEndPos;ft.length-1?ft.pop():ft=void 0,vD(F.text,ae,L,ae)}function _a(L,ae){F&&(se===-1||L!==se)&&(ef(L)?$s(ae):vD(F.text,L,ae,L))}function ef(L){return ft!==void 0&&ta(ft).nodePos===L}function Dl(L){if(bo(L)&1)return!0;if(L.multiLine||!Zi(L)&&F&&!lp(L,F)||kr(L,ha(L.statements),2)||Ko(L,Vo(L.statements),2,L.statements))return!1;let ae;for(let ze of L.statements){if(yt(ae,ze,2)>0)return!1;ae=ze}return!0}function Qs(L){L.type&&Zu(L.type)&&Jt("*"),nn(L.name),Qh(L.initializer,L.type?.end??L.name.emitNode?.typeNode?.end??L.name.end,L,tn.parenthesizeExpressionForDisallowedComma)}function sc(L){Ue(L,Cp,Pl)}function wa(L){return L.kind===2||!!L.hasTrailingNewLine}function Ra(L){if(!F)return!1;let ae=Su(F.text,L.pos);if(ae){let ze=Io(L);if(ze&&Hd(ze.parent))return!0}return Pn(ae,wa)||Pn(cI(L),wa)?!0:FE(L)?L.pos!==L.expression.pos&&Pn(rp(F.text,L.expression.pos),wa)?!0:Ra(L.expression):!1}function xd(L){if(!Et&&FE(L)&&Ra(L)){let ae=Io(L);if(ae&&Hd(ae)){let ze=Ge.createParenthesizedExpression(L.expression);return Gd(ze,L),Ea(ze,ae),ze}return Ge.createParenthesizedExpression(L)}return L}function nf(L,ae){L&&(Pr(),Gt(L,ae))}function bd(L){Gt(L.expression,tn.parenthesizeLeftSideOfAccess),Va(22,L.expression.end,Jt,L),Gt(L.argumentExpression),Va(23,L.argumentExpression.end,Jt,L)}function Cd(L){Gt(L.expression,tn.parenthesizeLeftSideOfAccess);let ae=ns(Ge.createToken(40),L.expression.end,L.name.pos),ze=w(L,L.expression,ae),un=w(L,ae,L.name);bt(ze,!1),Va(ae.kind,L.expression.end,Jt,L),bt(un,!1),nn(L.name),ri(ze,un)}function xp(L){let ae=nE(L)&16;ae&&(Jt("("),Jc("0"),Jt(","),Pr()),Gt(L.expression,tn.parenthesizeLeftSideOfAccess),ae&&Jt(")"),ln(L,L.arguments,2576,tn.parenthesizeExpressionForDisallowedComma)}function Hh(L){Va(116,L.pos,Br,L),nf(L.expression&&xd(L.expression),xd),Gn()}function Ys(L){let ae=Va(117,L.pos,Br,L);Pr(),Va(20,ae,Jt,L),Gt(L.expression),Va(21,L.expression.end,Jt,L),Pr(),nn(L.caseBlock)}function ty(L){L&&(Pr(),nn(L))}function El(L,ae){We(L,ae,53776,ot)}function Na(L){nn(L.typeName),El(L,L.typeArguments)}function zh(L){Gt(L.literal)}function Gh(L){We(L,L.types,516,tn.parenthesizeConstituentTypeOfUnionType)}function ry(L){Va(17,L.pos,Jt,L),We(L,L.clauses,129),Va(19,L.clauses.end,Jt,L,!0)}function bp(L){Va(121,L.pos,Br,L),ty(L.label),Gn()}function tf(L){Va(106,L.pos,Br,L),ty(L.label),Gn()}function Dd(L){Gt(L.expression,tn.parenthesizeExpressionOfExpressionStatement),(!F||!Ch(F)||Zi(L.expression))&&Gn()}function Cp(L){di(L,L.parameters)}function Ed(L){Va(113,L.pos,Br,L),Pr(),Gt(L.expression,tn.parenthesizeExpressionForDisallowedComma),iy(L,L.statements,L.expression.end)}function $h(L){let ae=Va(114,L.pos,Br,L);iy(L,L.statements,ae)}function iy(L,ae,ze){let un=ae.length===1&&(!F||Zi(L)||Zi(ae[0])||aS(L,ae[0],F)),Ut=163969;un?(ga(61,ze,Jt,L),Pr(),Ut&=-130):Va(61,ze,Jt,L),We(L,ae,Ut)}function Pl(L){Gn()}function Dp(L){We(L,L.declarations,528)}function Om(L){L&&(nn(L),Pr())}function Qh(L,ae,ze,un){L&&(Pr(),Va(74,ae,Er,ze),Pr(),Gt(L,un))}function Va(L,ae,ze,un,Ut){let jr=Io(un),kt=jr&&jr.kind===un.kind,vr=ae;if(kt&&F&&(ae=eo(F.text,ae)),kt&&un.pos!==vr){let cr=Ut&&F&&!Du(vr,ae,F);cr&&Lt(),ct(vr),cr&&ki()}return!b&&(L===17||L===19)?ae=ga(L,ae,ze,un):ae=Gs(L,ze,ae),kt&&un.end!==ae&&zn(ae,!1,!1),ae}}function fme(){let e=[];return e[1024]=["{","}"],e[2048]=["(",")"],e[4096]=["<",">"],e[8192]=["[","]"],e[4194304]=["({","})"],e}function _G(e){return SG[e&4209664][0]}function xG(e){return SG[e&4209664][1]}function cV(e,n,r,i,a){let c;return e.rootDir?(c=Di(e.rootDir,r),a?.(e.rootDir)):c=pG(n(),r,i),c&&c[c.length-1]!==Mo&&(c+=Mo),c}function pme(e,n,r,i){n(e)}function mme(e,n,r,i){n(e,r.select(i))}function gme(e,n,r,i){n(e,r)}function bG(e,n){return e.length===1?pme:typeof n=="object"?mme:gme}function lV(e,n){let r={removeComments:!0,newLine:1,target:2},i=yme(r,{hasGlobalName:()=>!1});var a=Nf(r),c=bh(a);return i.writeNode(4,e,n,c),c.getText()}function yme(e={},n={}){var{hasGlobalName:r,onEmitNode:i=DS,isEmitNotificationEnabled:a,substituteNode:c=Rh,onBeforeEmitNode:u,onAfterEmitNode:f,onBeforeEmitNodeArray:m,onAfterEmitNodeArray:y,onBeforeEmitToken:g,onAfterEmitToken:S}=n,_=!!e.extendedDiagnostics,b=!!e.omitBraceSourceMapPositions,v=Nf(e),T=1,W=new Map,F,M,J,A,V,ue,ye,he,ce,Ee,Fe,be,de,Ae,G,Qe=e.preserveSourceNewlines,me,Se,_n,tt=eu,Pe,gn=!0,$e,Ln,Vt=-1,Hn,Ye=-1,se=-1,jn=-1,wn=-1,Xn,ft,Ft=!1,Et=!!e.removeComments,At,xn,{enter:It,exit:pr}=po.createTimerIf(_,"commentTime","beforeComment","afterComment"),tn=Ge.parenthesizer,ot={select:P=>P===0?tn.parenthesizeLeadingTypeArgument:void 0},Zn=ie();return kn(),{printNode:zt,printList:Yt,printFile:xi,printBundle:Cr,writeNode:Ie,writeList:Oe,writeFile:Z,writeBundle:Je};function zt(P,ee,Ke){switch(P){case 0:E.assert(Vr(ee),"Expected a SourceFile node.");break;case 2:E.assert(Sn(ee),"Expected an Identifier node.");break;case 1:E.assert(Tc(ee),"Expected an Expression node.");break}switch(ee.kind){case 176:return xi(ee);case 177:return Cr(ee)}return Ie(P,ee,Ke,fe()),Ce()}function Yt(P,ee,Ke){return Oe(P,ee,Ke,fe()),Ce()}function Cr(P){return Je(P,fe(),void 0),Ce()}function xi(P){return Z(P,fe(),void 0),Ce()}function Ie(P,ee,Ke,En){let xt=Se;qn(En,void 0),ne(P,ee,Ke),kn(),Se=xt}function Oe(P,ee,Ke,En){let xt=Se;qn(En,void 0),Ke&&sn(Ke),We(void 0,ee,P),kn(),Se=xt}function Je(P,ee,Ke){Pe=!1;let En=Se;qn(ee,Ke),console.warn("todo - implment me - writeBundle"),ca(P);for(let xt of P.sourceFiles)ne(0,xt,xt);kn(),Se=En}function Z(P,ee,Ke){console.warn("todo - implment me - writeFile"),Pe=!0;let En=Se;qn(ee,Ke),ca(P),ne(0,P,P),kn(),Se=En}function fe(){return _n||(_n=bh(v))}function Ce(){let P=_n.getText();return _n.clear(),P}function ne(P,ee,Ke){Ke&&sn(Ke),zo(P,ee,void 0)}function sn(P){F=P,Xn=void 0,ft=void 0,P&&H(P)}function H(P){if(!gn){if(Ln=P,P===Hn){Vt=Ye;return}ge(P)||(Vt=$e.addSource(P.fileName),e.inlineSources&&$e.setSourceContent(Vt,P.text),Hn=P,Ye=Vt)}}function ge(P){return qs(P.fileName,".json")}function qn(P,ee){P&&e.omitTrailingSemicolon&&(P=yE(P)),Se=P,$e=ee,gn=!Se||!$e}function kn(){M=[],J=[],A=[],V=new Set,ue=[],ye=new Map,he=[],ce=0,Ee=[],Fe=0,be=[],de=void 0,Ae=[],G=void 0,F=void 0,Xn=void 0,ft=void 0,qn(void 0,void 0)}function On(){return Xn||(Xn=yc(E.checkDefined(F)))}function nn(P,ee){P!==void 0&&zo(4,P,ee)}function Dr(P){P!==void 0&&zo(2,P,void 0)}function Gt(P,ee){P!==void 0&&zo(1,P,ee)}function Rr(P){Qe&&nE(P)&4&&(Qe=!1)}function zi(P){Qe=P}function zo(P,ee,Ke){xn=Ke,Te(0,P,ee)(P,ee),xn=void 0}function sa(P){return!Et&&!Vr(P)}function mo(P){return!gn&&!Vr(P);}function Ve(P,ee){let Ke=dn(1,P,ee);E.assertIsDefined(At),ee=At,At=void 0,Ke(P,ee)}function et(P,ee){let Ke=dn(2,P,ee),En=se,xt=jn,rt=wn;Le(ee),Ke(P,ee),Q(ee,En,xt,rt)}function Le(P){console.warn("todo - implment me - emitCommentsBeforeNode")}function Q(P,ee,Ke,En){console.warn("todo - implment me - emitCommentsAfterNode")}function ie(){return pS(P,ee,Ke,En,xt,void 0);function P(sr,at){if(at){at.stackIndex++,at.preserveSourceNewlinesStack[at.stackIndex]=Qe,at.containerPosStack[at.stackIndex]=se,at.containerEndStack[at.stackIndex]=jn,at.declarationListContainerEndStack[at.stackIndex]=wn;let hi=at.shouldEmitCommentsStack[at.stackIndex]=sa(sr),hn=at.shouldEmitSourceMapsStack[at.stackIndex]=mo(sr);u?.(sr),hi&&Le(sr),hn&&q(sr),Rr(sr)}else at={stackIndex:0,preserveSourceNewlinesStack:[void 0],containerPosStack:[-1],containerEndStack:[-1],declarationListContainerEndStack:[-1],shouldEmitCommentsStack:[!1],shouldEmitSourceMapsStack:[!1]};return at}function ee(sr,at,hi){return rt(sr,hi,"left")}function Ke(sr,at,hi){let hn=sr.kind!==27,wo=w(hi,hi.left,sr),kc=w(hi,sr,hi.right);bt(wo,hn),ct(sr.pos),zs(sr,sr.kind===103?Br:Er),zn(sr.end,!0),bt(kc,!0)}function En(sr,at,hi){return rt(sr,hi,"right")}function xt(sr,at){let hi=w(sr,sr.left,sr.operatorToken),hn=w(sr,sr.operatorToken,sr.right);if(ri(hi,hn),at.stackIndex>0){let wo=at.preserveSourceNewlinesStack[at.stackIndex],kc=at.containerPosStack[at.stackIndex],tu=at.containerEndStack[at.stackIndex],Oa=at.declarationListContainerEndStack[at.stackIndex],Ep=at.shouldEmitCommentsStack[at.stackIndex],oy=at.shouldEmitSourceMapsStack[at.stackIndex];zi(wo),oy&&void 0,Ep&&Q(sr,kc,tu,Oa),f?.(sr),at.stackIndex--}}function rt(sr,at,hi){let hn=hi==="left"?tn.getParenthesizeLeftSideOfBinaryForOperator(at.operatorToken.kind):tn.getParenthesizeRightSideOfBinaryForOperator(at.operatorToken.kind),wo=Te(0,1,sr);if(wo===Ve&&(E.assertIsDefined(At),sr=hn(Xa(At,Tc)),wo=dn(1,1,sr),At=void 0),(wo===et||wo===te||wo===ke)&&br(sr))return sr;xn=hn,wo(1,sr)}}function Te(P,ee,Ke){switch(P){case 0:if(i!==DS&&(!a||a(Ke)))return Jn;case 1:if(c!==Rh&&(At=c(ee,Ke)||Ke)!==Ke)return xn&&(At=xn(At)),Ve;case 2:if(sa(Ke))return et;case 3:if(mo(Ke))return te;case 4:return ke;default:return E.assertNever(P)}}function te(P,ee){let Ke=dn(3,P,ee);q(ee),Ke(P,ee)}function q(P){console.warn("todo - implment me - emitSourceMapsBeforeNode")}function qe(P){}function dn(P,ee,Ke){return Te(P+1,ee,Ke)}function Jn(P,ee){let Ke=dn(0,P,ee);i(P,ee,Ke)}function ke(P,ee){if(u?.(ee),Qe){let Ke=Qe;Rr(ee),wt(P,ee),zi(Ke)}else wt(P,ee);f?.(ee),xn=void 0}function We(P,ee,Ke,En,xt,rt){St(nn,P,ee,Ke|(P&&bo(P)&2?65536:0),En,xt,rt)}function ln(P,ee,Ke,En,xt,rt){St(Gt,P,ee,Ke,En,xt,rt)}function zn(P,ee,Ke){Et||(It(),console.warn("todo - implment me - emitTrailingCommentsOfPosition"),pr())}function St(P,ee,Ke,En,xt,rt=0,sr=Ke?Ke.length-rt:0){if(Ke===void 0&&En&16384)return;let hi=Ke===void 0||rt>=Ke.length||sr===0;if(hi&&En&32768){m?.(Ke),y?.(Ke);return}En&4209664&&(Jt(_G(En)),hi&&Ke&&zn(Ke.pos,!0)),m?.(Ke),hi?En&1&&!(Qe&&(!ee||F&&lp(ee,F)))?Xr():En&256&&!(En&524288)&&Pr():Rn(P,ee,Ke,En,xt,rt,sr,Ke.hasTrailingComma,Ke),y?.(Ke),En&4209664&&(hi&&Ke&&ct(Ke.end),Jt(xG(En)))}function ct(P){Et||P===-1||console.warn("todo - implment me - emitLeadingCommentsOfPosition")}function kr(P,ee,Ke){if(Ke&2||Qe){if(Ke&65536)return 1;if(ee===void 0)return!P||F&&lp(P,F)?0:1;if(ee.pos===me)return 0;if(F&&P&&!ec(P.pos)&&!Zi(ee)&&(!ee.parent||ks(ee.parent)===ks(P)))return Qe?fr(En=>oM(ee.pos,P.pos,F,En)):aS(P,ee,F)?0:1;if(Or(ee,Ke))return 1}return Ke&1?1:0}function Or(P,ee){if(Zi(P)){let Ke=fS(P);return Ke===void 0?(ee&65536)!==0:Ke}return(ee&65536)!==0}function Rn(P,ee,Ke,En,xt,rt,sr,at,hi){let hn=(En&262144)===0,wo=hn,kc=kr(ee,Ke[rt],En);kc?(Xr(kc),wo=!1):En&256&&Pr(),En&128&&Lt();let tu=bG(P,xt),Oa,Ep=!1;for(let os=0;os<sr;os++){let qo=Ke[rt+os];if(En&32)Xr(),Ua(En);else if(Oa){En&60&&Oa.end!==(ee?ee.end:-1)&&(bo(Oa)&2048||ct(Oa.end)),Ua(En);let Go=yt(Oa,qo,En);if(Go>0){if((En&131)===0&&(Lt(),Ep=!0),wo&&En&60&&!ec(qo.pos)){let ay=bE(qo);zn(ay.pos,!!(En&512),!0)}Xr(Go),wo=!1}else Oa&&En&512&&Pr()}if(wo){let Go=bE(qo);zn(Go.pos)}else wo=hn;me=qo.pos,tu(qo,P,xt,os),Ep&&(ki(),Ep=!1),Oa=qo}let oy=Oa?bo(Oa):0,Pd=Et||!!(oy&2048),Pp=at&&En&64&&En&16;Pp&&(Oa&&!Pd?cr(27,Oa.end,Jt,Oa):Jt(",")),Oa&&(ee?ee.end:-1)!==Oa.end&&En&60&&!Pd&&ct(Pp&&hi?.end?hi.end:Oa.end),En&128&&ki();let zb=Ko(ee,Ke[rt+sr-1],En,hi);zb?Xr(zb):En&2097408&&Pr()}function Li(P,ee){if(ee.pos<P.end)return!1;P=ks(P),ee=ks(ee);let Ke=P.parent;if(!Ke||Ke!==ee.parent)return!1;let En=aM(P),xt=En?.indexOf(P);return xt!==void 0&&xt>-1&&En.indexOf(ee)===xt+1}function yt(P,ee,Ke){if(Ke&2||Qe){if(P===void 0||ee===void 0)return 0;if(F&&!Zi(P)&&!Zi(ee))return Qe&&Li(P,ee)?fr(En=>tE(P,ee,F,En)):!Qe&&Lo(P,ee)?Bx(P,ee,F)?0:1:Ke&65536?1:0;if(Or(P,Ke)||Or(ee,Ke))return 1}else if(fS(ee))return 1;return Ke&1?1:0}function Lo(P,ee){return P=ks(P),P.parent&&P.parent===ks(ee).parent}function Ko(P,ee,Ke,En){if(Ke&2||Qe){if(Ke&65536)return 1;if(ee===void 0)return!P||F&&lp(P,F)?0:1;if(F&&P&&!ec(P.pos)&&!Zi(ee)&&(!ee.parent||ee.parent===P)){if(Qe){let xt=En&&!ec(En.end)?En.end:ee.end;return fr(rt=>cM(xt,P.end,F,rt))}return sM(P,ee,F)?0:1}if(Or(ee,Ke))return 1}return Ke&1&&!(Ke&131072)?1:0}function Ua(P){switch(P&60){case 0:break;case 16:Jt(",");break;case 4:Pr(),Jt("|");break;case 32:Pr(),Jt("*"),Pr();break;case 8:Pr(),Jt("&");break}}function ca(P){if(Vr(P)){let ee=ux(P.text);if(ee)return Sd(ee),Xr(),!0}else for(let ee of P.sourceFiles)if(ca(ee))return!0}function wt(P,ee,Ke=!0){if(P===2)return ua(Xa(ee,Sn));if(P===4)switch(ee.kind){case 89:return ua(ee);case 163:return j(ee);case 161:return pi(ee);case 242:return no(ee);case 149:return vi(ee);case 158:return Oi(ee);case 169:return Wc(ee);case 237:return Ra(ee);case 238:return jr(ee);case 151:return xd(ee);case 248:return Dd(ee);case 240:return Dp(ee);case 236:return ii(ee);case 256:return iy(ee);case 251:return Om(ee);case 250:return Qh(ee);case 247:return Va(ee);case 253:return $h(ee);case 299:return ae(ee);case 301:return ze(ee);case 261:return Ed(ee)}if(P===1)switch(ee.kind){case 16:return Ht(ee);case 11:case 13:return yr(ee);case 89:return ua(ee);case 290:return li(ee);case 269:return bp(ee);case 272:return tf(ee);case 281:return ry(ee);case 289:return Gh(ee);case 282:return zh(ee);case 298:return ty(ee)}if(Qc(ee.kind))return zs(ee,Br);if(Vv(ee.kind))return zs(ee,Jt);console.warn("todo - implment me - pipelineEmitWithHintWorker "+E.formatSyntaxKind(ee.kind))}function Jc(P){Se.writeLiteral(P)}function vn(P){Se.writeStringLiteral(P)}function eu(P){Se.write(P)}function la(P,ee){Se.writeSymbol(P,ee)}function Jt(P){Se.writePunctuation(P)}function Gn(){Se.writeTrailingSemicolon(";")}function Br(P){Se.writeKeyword(P)}function Er(P){Se.writeOperator(P)}function xl(P){Se.writeParameter(P)}function Sd(P){Se.writeComment(P)}function Pr(){Se.writeSpace(" ")}function nu(P){Se.writeProperty(P)}function Co(P){Se.nonEscapingWrite?Se.nonEscapingWrite(P):Se.write(P)}function Xr(P=1){for(let ee=0;ee<P;ee++)Se.writeLine(ee>0)}function Lt(){Se.increaseIndent()}function ki(){Se.decreaseIndent()}function Mr(P,ee,Ke,En,xt){return xt(ee,Ke,En)}function ga(P,ee,Ke,En){return gn?Gs(P,Ke,ee):Mr(En,P,Ke,ee,Gs)}function zs(P,ee){g&&g(P),ee(Ai(P.kind)),S&&S(P)}function Gs(P,ee,Ke){let En=Ai(P);return ee(En),Ke<0?Ke:Ke+En.length}function Pc(P){for(;P.kind===289&&Zi(P);)P=P.expression;return P}function fr(P){E.assert(!!Qe);let ee=P(!0);return ee===0?P(!1):ee}function w(P,ee,Ke){return bo(P)&262144?0:(P=Pc(P),ee=Pc(ee),Ke=Pc(Ke),fS(Ke)?1:F&&!Zi(P)&&!Zi(ee)&&!Zi(Ke)?Qe?fr(En=>tE(ee,Ke,F,En)):Bx(ee,Ke,F)?0:1:0)}function De(P,ee,Ke){if(bo(P)&1)Pr();else if(Qe){let En=w(P,ee,Ke);En?Xr(En):Pr()}else Xr()}function yn(P){let ee=P.split(/\r\n?|\n/g),Ke=lO(ee);for(let En of ee){let xt=Ke?En.slice(Ke):En;xt.length&&(Xr(),tt(xt))}}function bt(P,ee){P?(Lt(),Xr(P)):ee&&Pr()}function ri(P,ee){P&&ki(),ee&&ki()}function ai(P,ee){if(ji(P)&&P.textSourceNode)return ai(P.textSourceNode,ee);let Ke=F,En=!!Ke&&!!P.parent&&!Zi(P);if(Dg(P)){if(!En||$t(P)!==ks(Ke))return ra(P)}else if(E.assertNode(P,zT),!En)return P.text;return np(Ke,P,ee)}function yr(P){Ht(P)}function Ht(P){let ee=co(P,e.neverAsciiEscape);(e.sourceMap||e.inlineSourceMap)&&P.kind===16?Jc(ee):vn(ee)}function li(P){let ee=P.elements,Ke=P.multiLine?65536:0;ln(P,ee,8914|Ke,tn.parenthesizeExpressionForDisallowedComma)}function co(P,ee){if(P.kind===16&&P.textSourceNode){let En=P.textSourceNode;if(Sn(En)||Yc(En)||Ud(En)){let xt=Ud(En)?En.text:ai(En);return ee||bo(P)&16777216?`"${sp(xt)}"`:`"${QF(xt)}"`}else return co(En,ee)}let Ke=(ee?1:0)|(e.terminateUnterminatedLiterals?4:0)|(e.target&&e.target>=1?8:0);return mM(P,F,Ke)}function ua(P){(P.symbol?la:tt)(ai(P,!1),P.symbol),We(P,jg(P),53776)}function rs(P){he.push(ce),ce=0,Ae.push(G),!(P&&bo(P)&1048576)&&(Ee.push(Fe),Fe=0,ue.push(ye),ye=void 0,be.push(de))}function _s(P){ce=he.pop(),G=Ae.pop(),!(P&&bo(P)&1048576)&&(Fe=Ee.pop(),ye=ue.pop(),de=be.pop())}function el(P){if(P)switch(P.kind){case 174:case 175:case 152:Nc(P.name);break}}function Nc(P){P&&(am(P)?k(P):Po(P)&&ui(P))}function ui(P){if(P)switch(P.kind){case 236:Bn(P.statements,ui);break;case 245:case 246:ui(P.statement);break;case 253:ui(P.thenStatement),ui(P.elseStatement);break;case 243:ui(P.initializer),ui(P.statement);case 244:ui(P.expression),ui(P.statement);break;case 256:ui(P.caseBlock);break;case 240:Bn(P.clauses,ui);break;case 299:case 301:Bn(P.statements,ui);break;case 255:ui(P.block);break;case 242:ui(P.declarationList);break;case 238:Bn(P.declarations,ui);break;case 237:case 149:case 266:Nc(P.name);break;case 169:Nc(P.name),bo(P)&1048576&&(Bn(P.parameters,ui),ui(P.body));break;case 265:Bn(P.elements,ui);break}}function nl(P,ee){let Ke,En;if(ee?(Ke=G,En=Ae):(Ke=de,En=be),Ke?.has(P))return!0;for(let xt=En.length-1;xt>=0;xt--)if(Ke!==En[xt]&&(Ke=En[xt],Ke?.has(P)))return!0;return!1}function is(P,ee){return bl(P,ee)&&!nl(P,ee)&&!V.has(P)}function bl(P,ee){return F?KO(F,P,r):!0}function As(P,ee=is,Ke,En,xt,rt,sr){if(P.length>0&&P.charCodeAt(0)===35&&(P=P.slice(1)),rt.length>0&&rt.charCodeAt(0)===35&&(rt=rt.slice(1)),Ke){let hi=fd(xt,rt,P,sr);if(ee(hi,xt))return En?Gi(hi):V.add(hi),hi}P.charCodeAt(P.length-1)!==95&&(P+="_");let at=1;for(;;){let hi=fd(xt,rt,P+at,sr);if(ee(hi,xt))return En?Gi(hi):V.add(hi),hi;at++}}function xs(P,ee,Ke,En,xt){switch(P.kind){case 89:return As(ai(P),is,!!(Ke&16),!!(Ke&8),ee,En,xt);case 169:{E.assert(!En&&!xt&&!ee);let rt=P.name;if(rt&&!am(rt))return xs(rt,!1,Ke,En,xt);E.fail("shouldn't be here")}case 274:E.fail("implement me");case 147:return qa(0,!0,ee,En,xt);default:return qa(0,!1,ee,En,xt)}}function Cn(P,ee,Ke,En,xt){let rt=ys(P),sr=ee?J:M;return sr[rt]||(sr[rt]=xs(P,ee,Ke??0,pp(En,k),pp(xt)))}function Ka(P){switch(P){case"":return Fe;case"#":return ce;default:return ye?.get(P)??0}}function pt(P,ee){switch(P){case"":Fe=ee;break;case"#":ce=ee;break;default:ye??(ye=new Map),ye.set(P,ee);break}}function Gi(P){(!de||de===Vo(be))&&(de=new Set),de.add(P)}function qa(P,ee,Ke,En,xt){En.length>0&&En.charCodeAt(0)===35&&(En=En.slice(1));let rt=fd(Ke,En,"",xt),sr=Ka(rt);if(P&&!(sr&P)){let hi=fd(Ke,En,P===268435456?"_i":"_n",xt);if(is(hi,Ke))return sr|=P,ee&&Gi(hi),pt(rt,sr),hi}for(;;){let at=sr&268435455;if(sr++,at!==8&&at!==13){let hi=at<26?"_"+String.fromCharCode(97+at):"_"+(at-26),hn=fd(Ke,En,hi,xt);if(is(hn,Ke))return ee&&Gi(hn),pt(rt,sr),hn}}}function D(P){let ee=P.emitNode.autoGenerate,Ke=pp(ee.prefix,k),En=pp(ee.suffix);switch(ee.flags&7){case 1:return qa(0,!!(ee.flags&8),Yc(P),Ke,En);case 2:return E.assertNode(P,Sn),qa(268435456,!!(ee.flags&8),!1,Ke,En);case 3:return As(ra(P),ee.flags&32?bl:is,!!(ee.flags&16),!!(ee.flags&8),Yc(P),Ke,En)}return E.fail(`Unsupported GeneratedIdentifierKind: ${E.formatEnum(ee.flags&7,JT,!0)}.`)}function k(P){let ee=P.emitNode.autoGenerate;if((ee.flags&7)===4)return Cn(FM(P),Yc(P),ee.flags,ee.prefix,ee.suffix);{let Ke=ee.id;return A[Ke]||(A[Ke]=D(P))}}function j(P){rs(P),Bn(P.members,el),Jt("{");let ee=bo(P)&1?768:32897;We(P,P.members,ee|524288),Jt("}"),_s(P)}function Y(P,ee){We(P,ee,2359808);let Ke=Vo(ee);return Ke&&!ec(Ke.end)?Ke.end:P.pos}function Be(P,ee,Ke){return ee?.length?Y(P,ee):P.pos}function Ue(P,ee,Ke){let En=bo(P)&131072;En&&Lt(),rs(P),Bn(P.parameters,ui),ee(P),Ke(P),_s(P),En&&ki()}function $n(P,ee){let Ke=AT(ee);return Ke&&Ke.pos===P.pos&&zd(P)&&!P.type&&!Pn(P.modifiers)&&!Pn(Ke.modifiers)&&!Ke.dotDotDotToken&&!Ke.type&&!Ke.initializer&&Sn(Ke.name)}function di(P,ee){We(P,ee,2576)}function nr(P,ee){$n(P,ee)?We(P,ee,528):di(P,ee)}function Lr(P){nr(P,P.parameters),Pr(),Jt("=>")}function Mt(P){Pr(),nn(P.type)}function hr(P,ee){if(!P)return;let Ke=tt;tt=ee,nn(P),tt=Ke}function vi(P){Be(P,P.modifiers,!0),hr(P.name,xl),nn(P.dotDotDotToken),vr(P.initializer,P.type?P.type.end:P.name?P.name.end:P.modifiers?P.modifiers.end:P.pos,P,tn.parenthesizeExpressionForDisallowedComma)}function Oi(P){Ue(P,Lr,Mt)}function Hr(P){return P.statements.length===0&&(!F||Bx(P,P,F))}function ii(P){Bo(P,!P.multiLine&&Hr(P))}function Bo(P,ee){cr(17,P.pos,Jt,P);let Ke=ee||bo(P)&1?768:129;We(P,P.statements,Ke),cr(19,P.statements.end,Jt,P,!!(Ke&1))}function no(P){Be(P,P.modifiers,!1),nn(P.declarationList),Gn()}function pi(P){nn(P.elementType,tn.parenthesizeNonArrayTypeOfPostfixType),Jt("*")}function Wc(P){bs(P)}function bs(P){Be(P,P.modifiers,!1),Br("function"),nn(P.asteriskToken),Pr(),Dr(P.name),Ue(P,L,_d)}function _d(P){let ee=P.body;ee?Ao(ee):Gn()}function Ao(P){ui(P),u?.(P),Pr(),Jt("{"),Lt();let ee=wa(P)?Zd:_p;$s(P,P.statements,ee),ki(),ga(19,P.statements.end,Jt,P),f?.(P)}function Zd(P){_p(P,!0)}function _p(P,ee){let Ke=Rm(P.statements),En=Se.getTextPos();ko(P),Ke===0&&En===Se.getTextPos()&&ee?(ki(),We(P,P.statements,768),Lt()):We(P,P.statements,1,void 0,Ke)}function vu(P){let ee=kM(P);return ee&&xf(ee,EM)}function ko(P){let ee=!1,Ke=P.kind===177?P:void 0;if(Ke&&T===0)return;let En=Ke?Ke.sourceFiles.length:1;for(let xt=0;xt<En;xt++){let rt=Ke?Ke.sourceFiles[xt]:P,sr=Vr(rt)?rt:F,at=e.noEmitHelpers||!!sr&&IM(sr),hi=Vr(rt)&&!Pe,hn=vu(rt);if(hn)for(let wo of hn){if(wo.scoped){if(Ke)continue}else{if(at)continue;if(hi){if(W.get(wo.name))continue;W.set(wo.name,!0)}}typeof wo.text=="string"?yn(wo.text):yn(wo.text(wm)),ee=!0}}return ee}function wm(P){return As(P,bl,!0,!1,!1,"","")}function Rm(P,ee,Ke){let En=!!ee;for(let xt=0;xt<P.length;xt++){let rt=P[xt];if(dE(rt))(Ke?!Ke.has(rt.expression.text):!0)&&(En&&(En=!1,sn(ee)),Xr(),nn(rt),Ke&&Ke.add(rt.expression.text));else return xt}return P.length}function Fu(P){let ee=F&&fM(F.text,On(),Se,lo,P,v,Et);ee&&(ft?ft.push(ee):ft=[ee])}function tl(P,ee){return e.onlyPrintJsDocStyle?fI(P,ee)||Hx(P,ee):!0}function lo(P,ee,Ke,En,xt,rt){!F||!tl(F.text,En)||(Cl(En),TE(P,ee,Ke,En,xt,rt),Cl(xt))}function Cl(P){if(gn||ec(P)||ge(Ln))return;let{line:ee,character:Ke}=ma(Ln,P);$e.addMapping(Se.getLine(),Se.getColumn(),Vt,ee,Ke,void 0)}function $s(P,ee,Ke){It();let{pos:En,end:xt}=ee,rt=bo(P),sr=En<0||(rt&1024)!==0,at=Et||xt<0||(rt&2048)!==0;sr||Fu(ee),pr(),rt&4096&&!Et?(Et=!0,Ke(P),Et=!1):Ke(P),It(),at||(_a(ee.end,!0),Ft&&!Se.isAtStartOfLine()&&Se.writeLine()),pr()}function _a(P,ee){Ft=!1,ee?Qs(P,ef):P===0&&console.debug("todo - emitLeadingComments")}function ef(P,ee,Ke,En,xt){!F||!tl(F.text,P)||(Ft||(pM(On(),Se,xt,P),Ft=!0),Cl(P),TE(F.text,On(),Se,P,ee,v),Cl(ee),En?Se.writeLine():Ke===3&&Se.writeSpace(" "))}function Dl(P){if(!F)return;let ee=ta(ft).detachedCommentEndPos;ft.length-1?ft.pop():ft=void 0,vD(F.text,ee,P,ee)}function Qs(P,ee){F&&(se===-1||P!==se)&&(sc(P)?Dl(ee):vD(F.text,P,ee,P))}function sc(P){return ft!==void 0&&ta(ft).nodePos===P}function wa(P){if(bo(P)&1)return!0;if(P.multiLine||!Zi(P)&&F&&!lp(P,F)||kr(P,ha(P.statements),2)||Ko(P,Vo(P.statements),2,P.statements))return!1;let ee;for(let Ke of P.statements){if(yt(ee,Ke,2)>0)return!1;ee=Ke}return!0}function Ra(P){nn(P.name),vr(P.initializer,P.type?.end??P.name.emitNode?.typeNode?.end??P.name.end,P,tn.parenthesizeExpressionForDisallowedComma)}function xd(P){Ue(P,L,Ut)}function nf(P){return P.kind===2||!!P.hasTrailingNewLine}function bd(P){if(!F)return!1;let ee=Su(F.text,P.pos);if(ee){let Ke=Io(P);if(Ke&&Hd(Ke.parent))return!0}return Pn(ee,nf)||Pn(cI(P),nf)?!0:FE(P)?P.pos!==P.expression.pos&&Pn(rp(F.text,P.expression.pos),nf)?!0:bd(P.expression):!1}function Cd(P){if(!Et&&FE(P)&&bd(P)){let ee=Io(P);if(ee&&Hd(ee)){let Ke=Ge.createParenthesizedExpression(P.expression);return Gd(Ke,P),Ea(Ke,ee),Ke}return Ge.createParenthesizedExpression(P)}return P}function xp(P,ee){P&&(Pr(),Gt(P,ee))}function Hh(P,ee){let Ke=Qe&&kr(ee,P,0);return Ke&&bt(Ke,!1),!!Ke}function Ys(P,ee){let Ke=Qe&&Ko(ee,P,0,void 0);Ke&&Xr(Ke)}function ty(P){Gs(P.operator,Er),El(P)&&Pr(),Gt(P.operand,tn.parenthesizeOperandOfPrefixUnary)}function El(P){let ee=P.operand;return ee.kind===298&&(P.operator===41&&(ee.operator===41||ee.operator===47)||P.operator===42&&(ee.operator===42||ee.operator===48))}function Na(P){Yx(P)&&P.operator===29?(Jt("'<"),Gt(P.operand),Jt("'")):Gt(P)}function zh(P){Jt("{ start: "),Na(P.left),Jt(", end: "),Na(P.right),Jt("}")}function Gh(P){let ee=cr(20,P.pos,Jt,P),Ke=Hh(P.expression,P);Gt(P.expression,void 0),Ys(P.expression,P),ri(Ke),cr(21,P.expression?P.expression.end:ee,Jt,P)}function ry(P){Br("__lpcIndexAccessHelper"),Jt("("),Gt(P.expression,tn.parenthesizeLeftSideOfAccess),Jt(","),Gt(P.argumentExpression),Jt(")")}function bp(P){let ee=P.operatorToken.kind;if(qd(ee))switch(Gt(P.left),Er(Ai(74)),ee){case 75:ee=41;break;case 76:ee=42;break;case 77:ee=43;break;case 79:ee=45;break;case 74:ee=74;break;default:E.fail("Unknown compound assignment operator "+E.formatSyntaxKind(ee))}Br("__lpcBinaryHelper"),Jt("("),Gt(P.left),Jt(","),Gt(P.right),Jt(","),Jt('"'),Er(Ai(ee)),Jt('"'),Jt(")")}function tf(P){let ee=nE(P)&16;ee&&(Jt("("),Jc("0"),Jt(","),Pr()),Gt(P.expression,tn.parenthesizeLeftSideOfAccess),ee&&Jt(")"),ln(P,P.arguments,2576,tn.parenthesizeExpressionForDisallowedComma)}function Dd(P){cr(116,P.pos,Br,P),xp(P.expression&&Cd(P.expression),Cd),Gn()}function Cp(P,ee){_c(ee)||bo(P)&1||Qe&&!kr(P,ee,0)?(Pr(),nn(ee)):(Xr(),Lt(),RH(ee)?zo(5,ee):nn(ee),ki())}function Ed(P){nn(P.objectType,tn.parenthesizeNonArrayTypeOfPostfixType),Jt("["),nn(P.indexType),Jt("]")}function $h(P){let ee=cr(115,P.pos,Br,P);Pr(),cr(20,ee,Jt,P),Gt(P.expression),cr(21,P.expression.end,Jt,P),Cp(P,P.thenStatement),P.elseStatement&&(De(P,P.thenStatement,P.elseStatement),cr(110,P.thenStatement.end,Br,P),P.elseStatement.kind===253?(Pr(),nn(P.elseStatement)):Cp(P,P.elseStatement))}function iy(P){let ee=cr(117,P.pos,Br,P);Pr(),cr(20,ee,Jt,P),Gt(P.expression),cr(21,P.expression.end,Jt,P),Pr(),nn(P.caseBlock)}function Pl(P){P&&(Pr(),nn(P))}function Dp(P){cr(17,P.pos,Jt,P),We(P,P.clauses,129),cr(19,P.clauses.end,Jt,P,!0)}function Om(P){cr(121,P.pos,Br,P),Pl(P.label),Gn()}function Qh(P){cr(106,P.pos,Br,P),Pl(P.label),Gn()}function Va(P){Gt(P.expression,tn.parenthesizeExpressionOfExpressionStatement),(!F||!Ch(F)||Zi(P.expression))&&Gn()}function L(P){di(P,P.parameters)}function ae(P){cr(113,P.pos,Br,P),Pr(),Gt(P.expression,tn.parenthesizeExpressionForDisallowedComma),un(P,P.statements,P.expression.end)}function ze(P){let ee=cr(114,P.pos,Br,P);un(P,P.statements,ee)}function un(P,ee,Ke){let En=ee.length===1&&(!F||Zi(P)||Zi(ee[0])||aS(P,ee[0],F)),xt=163969;En?(ga(61,Ke,Jt,P),Pr(),xt&=-130):cr(61,Ke,Jt,P),We(P,ee,xt)}function Ut(P){Gn()}function jr(P){Br("let"),Pr(),We(P,P.declarations,528)}function kt(P){P&&(nn(P),Pr())}function vr(P,ee,Ke,En){P&&(Pr(),cr(74,ee,Er,Ke),Pr(),Gt(P,En))}function cr(P,ee,Ke,En,xt){let rt=Io(En),sr=rt&&rt.kind===En.kind,at=ee;if(sr&&F&&(ee=eo(F.text,ee)),sr&&En.pos!==at){let hi=xt&&F&&!Du(at,ee,F);hi&&Lt(),ct(at),hi&&ki()}return!b&&(P===17||P===19)?ee=ga(P,ee,Ke,En):ee=Gs(P,Ke,ee),sr&&En.end!==ee&&zn(ee,!1,!1),ee}}function CG(e,n,r){let i,a,c,u=Js(),f=new Set,m=new Set,y=new Map,g=new Map,S=!1,_,b,v,T,W,F=!1,M=gc(()=>e.getCurrentDirectory()),J=e.getCachedDirectoryStructureHost(),A=new Map,V=xI(M(),e.getCanonicalFileName,e.getCompilationSettings()),ue=new Map,ye=new Map,he=hme(n,M),ce=e.toPath(he),Ee=ku(ce),Fe=new Map,be=new Map,de=new Map;return{rootDirForResolution:n,resolvedModuleNames:A,resolvedFileToResolution:y,getModuleResolutionCache:()=>V,startRecordingFilesWithChangedResolutions:me,finishRecordingFilesWithChangedResolutions:Se,startCachingPerDirectoryResolution:Pe,finishCachingPerDirectoryResolution:$e,resolveModuleNameLiterals:Ye,removeResolutionsFromProjectReferenceRedirects:Yt,removeResolutionsOfFile:Cr,invalidateResolutionOfFile:Ie,invalidateResolutionsOfFailedLookupLocations:Z,createHasInvalidatedResolutions:tt,clear:G,onChangesAffectModuleResolution:Qe};function Ae(H){return H.resolvedModule}function G(){Fe.clear(),be.clear(),u.clear(),sn(),A.clear(),y.clear(),f.clear(),m.clear(),v=void 0,T=void 0,W=void 0,b=void 0,_=void 0,F=!1,g.clear(),S=!1}function Qe(){F=!0,V.clearAllExceptPackageJsonInfoCache(),V.update(e.getCompilationSettings())}function me(){i=[]}function Se(){let H=i;return i=void 0,H}function _n(H){if(!c)return!1;let ge=c.get(H);return!!ge&&!!ge.length}function tt(H,ge){Z();let qn=a;return a=void 0,{hasInvalidatedResolutions:kn=>H(kn)||F||!!qn?.has(kn)||_n(kn),hasInvalidatedLibResolutions:kn=>ge(kn)}}function Pe(){u.forEach(Et),u.clear(),Fe.clear()}function gn(H){}function $e(H,ge){c=void 0,F=!1,u.forEach(Et),u.clear(),H!==ge&&H?.getSourceFiles().forEach(qn=>{let On=g.get(qn.resolvedPath)??Re;for(let nn=On.length;nn<0;nn++);if(On.length>0)for(let nn=0;nn<On.length;nn++)ye.get(On[nn]).files--;else g.delete(qn.resolvedPath)}),ue.forEach(Ln),ye.forEach(Vt),V.isReadonly=!0,Fe.clear()}function Ln(H,ge){H.refCount===0&&(ue.delete(ge),H.watcher.close())}function Vt(H,ge){H.files===0&&H.resolutions===0&&!H.symlinks?.size&&(ye.delete(ge),H.watcher.close())}function Hn({entries:H,containingFile:ge,containingSourceFile:qn,redirectedReference:kn,options:On,perFileCache:nn,reusedNames:Dr,loader:Gt,getResolutionWithResolvedFileName:Rr,deferWatchingNonRelativeResolution:zi,shouldRetryResolution:zo,logChanges:sa}){let mo=e.toPath(ge),Ve=nn.get(mo)||nn.set(mo,ob()).get(mo),et=[],Le=sa&&_n(mo),Q=e.getCurrentProgram(),ie=Q&&Q.getResolvedProjectReferenceToRedirect(ge),Te=ie?!kn||kn.sourceFile.path!==ie.sourceFile.path:!!kn,te=ob();for(let qe of H){let dn=Gt.nameAndMode.getName(qe),Jn=Gt.nameAndMode.getMode(qe,qn,kn?.commandLine.options||On),ke=Ve.get(dn,Jn);if(!te.has(dn,Jn)&&(F||Te||!ke||ke.isInvalidated||Le&&!Ul(dn)&&zo(ke))){let We=ke;ke=Gt.resolve(dn,Jn),e.onDiscoveredSymlink&&Sme(ke)&&e.onDiscoveredSymlink(),Ve.set(dn,Jn,ke),ke!==We&&(jn(dn,ke,mo,Rr,zi),We&&tn(We,mo,Rr)),sa&&i&&!q(We,ke)&&(i.push(mo),sa=!1)}else{let We=DG(e);if(Dm(On,We)&&!te.has(dn,Jn)){let ln=Rr(ke);Pa(We,nn===A?ln?.resolvedFileName?ln.packageId?N.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:N.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:N.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:ln?.resolvedFileName?ln.packageId?N.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:N.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:N.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,dn,ge,ln?.resolvedFileName,ln?.packageId&&Ig(ln.packageId))}}E.assert(ke!==void 0&&!ke.isInvalidated),te.set(dn,Jn,!0),et.push(ke)}return Dr?.forEach(qe=>te.set(Gt.nameAndMode.getName(qe),Gt.nameAndMode.getMode(qe,qn,kn?.commandLine.options||On),!0)),Ve.size()!==te.size()&&Ve.forEach((qe,dn,Jn)=>{te.has(dn,Jn)||(tn(qe,mo,Rr),Ve.delete(dn,Jn))}),et;function q(qe,dn){if(qe===dn)return!0;if(!qe||!dn)return!1;let Jn=Rr(qe),ke=Rr(dn);return Jn===ke?!0:!Jn||!ke?!1:Jn.resolvedFileName===ke.resolvedFileName}}function Ye(H,ge,qn,kn,On,nn){return Hn({entries:H,containingFile:ge,containingSourceFile:On,redirectedReference:qn,options:kn,reusedNames:nn,perFileCache:A,loader:_me(ge,qn,kn,e,V),getResolutionWithResolvedFileName:Ae,shouldRetryResolution:Dr=>!Dr.resolvedModule||!$F(Dr.resolvedModule.extension),logChanges:r,deferWatchingNonRelativeResolution:!0})}function se(H){return Ps(H,"/node_modules/@types")}function jn(H,ge,qn,kn,On){if(ge.refCount)ge.refCount++,E.assertIsDefined(ge.files);else{ge.refCount=1,E.assert(!ge.files?.size),!On||Ul(H)?Xn(ge):u.add(H,ge);let nn=kn(ge);if(nn&&nn.resolvedFileName){let Dr=e.toPath(nn.resolvedFileName),Gt=y.get(Dr);Gt||y.set(Dr,Gt=new Set),Gt.add(ge)}}(ge.files??(ge.files=new Set)).add(qn)}function wn(H,ge){let qn=e.toPath(H);return ge}function Xn(H){E.assert(!!H.refCount);let{failedLookupLocations:ge,affectingLocations:qn,alternateResult:kn}=H;if(!ge?.length&&!qn?.length&&!kn)return;(ge?.length||kn)&&f.add(H);let On=!1;if(ge)for(let nn of ge)On=wn(nn,On);kn&&(On=wn(kn,On)),On&&xn(he,ce,void 0,void 0,!0),ft(H,!ge?.length&&!kn)}function ft(H,ge){E.assert(!!H.refCount);let{affectingLocations:qn}=H;if(qn?.length){ge&&m.add(H);for(let kn of qn);}}function Ft(H,ge){}function Et(H,ge){}function At(H,ge,qn,kn,On){E.assert(!On);let nn=Fe.get(kn)}function xn(H,ge,qn,kn,On){!kn||!e.realpath?It(H,ge,On):At(H,ge,qn,kn,On)}function It(H,ge,qn){let kn=ue.get(ge);return kn?(E.assert(!!qn==!!kn.nonRecursive),kn.refCount++):ue.set(ge,kn={watcher:Zn(H,ge,qn),refCount:1,nonRecursive:qn}),kn}function pr(H,ge,qn){let kn=e.toPath(H);return ge}function tn(H,ge,qn,kn){if(E.checkDefined(H.files).delete(ge),H.refCount--,H.refCount)return;let On=qn(H);if(On&&On.resolvedFileName){let Rr=e.toPath(On.resolvedFileName),zi=y.get(Rr);zi?.delete(H)&&!zi.size&&y.delete(Rr)}let{failedLookupLocations:nn,affectingLocations:Dr,alternateResult:Gt}=H;if(f.delete(H)){let Rr=!1;if(nn)for(let zi of nn)Rr=pr(zi,Rr,kn);Gt&&(Rr=pr(Gt,Rr,kn)),Rr&&ot(ce,kn)}else Dr?.length&&m.delete(H);if(Dr)for(let Rr of Dr);}function ot(H,ge){let qn=ue.get(H);qn.refCount--,ge&&Ln(qn,H)}function Zn(H,ge,qn){return e.watchDirectoryOfFailedLookupLocation(H,kn=>{let On=e.toPath(kn);J&&J.addOrDeleteFileOrDirectory(kn,On),Oe(On,ge===On)},qn?0:1)}function zt(H,ge,qn,kn){let On=H.get(ge);On&&(On.forEach(nn=>tn(nn,ge,qn,kn)),H.delete(ge))}function Yt(H){if(!qs(H,".json"))return;let ge=e.getCurrentProgram();if(!ge)return;let qn=ge.getResolvedProjectReferenceByPath(H);qn&&qn.commandLine.fileNames.forEach(kn=>Cr(e.toPath(kn)))}function Cr(H,ge){zt(A,H,Ae,ge)}function xi(H,ge){if(!H)return!1;let qn=!1;return H.forEach(kn=>{kn.isInvalidated||!ge(kn)||(kn.isInvalidated=qn=!0)}),qn}function Ie(H){Cr(H);let ge=S;xi(y.get(H),Nv)&&S&&!ge&&e.onChangedAutomaticTypeDirectiveNames()}function Oe(H,ge){if(ge)(W||(W=new Set)).add(H);else{let qn=h2(H);if(!qn||(H=qn,e.fileIsOpen(H)))return!1;let kn=ei(H);if(se(H)||wE(H)||se(kn)||wE(kn))(v||(v=new Set)).add(H),(T||(T=new Set)).add(H);else{if(qs(H,".map"))return!1;(v||(v=new Set)).add(H)}}e.scheduleInvalidateResolutionsOfFailedLookupLocations()}function Je(){}function Z(){if(F)return _=void 0,v=void 0,T=void 0,W=void 0,b=void 0,!0;let H=!1;return _&&(_=void 0),!v&&!T&&!W&&!b||(H=xi(f,fe)||H,v=void 0,T=void 0,W=void 0,H=xi(m,ne)||H,b=void 0),H}function fe(H){return ne(H)?!0:!v&&!T&&!W?!1:H.failedLookupLocations?.some(ge=>Ce(e.toPath(ge)))||!!H.alternateResult&&Ce(e.toPath(H.alternateResult))}function Ce(H){return v?.has(H)||_D(T?.keys()||[],ge=>Eo(H,ge)?!0:void 0)||_D(W?.keys()||[],ge=>H.length>ge.length&&Eo(H,ge)&&(AI(ge)||H[ge.length]===Mo)?!0:void 0)}function ne(H){return!!b&&H.affectingLocations?.some(ge=>b.has(ge))}function sn(){Og(de,gm)}}function hme(e,n){let r=Di(e,n());return AI(r)?r:Cm(r)}function h2(e){return Ps(e,"/node_modules/.staging")?mg(e,"/.staging"):Pn(U2,n=>e.includes(n))?void 0:e}function G2(e,n){if(n===void 0&&(n=e.length),n<=2)return!1;let r=Tme(e,n);return n>r+1}function Tme(e,n){if(n<=1)return 1;let r=1,i=e[0].search(/[a-zA-Z]:/)===0;if(e[0]!==Mo&&!i&&e[1].search(/[a-zA-Z]\$$/)===0){if(n===2)return 2;r=2,i=!0}return i&&!e[r].match(/^users$/i)?r:e[r].match(/^workspaces$/i)?r+1:r+2}function Sme(e){return!!(e.resolvedModule?.originalPath||e.resolvedTypeReferenceDirective?.originalPath)}function DG(e){return e.getCompilerHost?.()||e}function _me(e,n,r,i,a){return{nameAndMode:V2,resolve:(c,u)=>xme(i,a,c,e,r,n,u)}}function xme(e,n,r,i,a,c,u){let f=DG(e),m=bI(r,i,a,f,n,c,u);if(!e.getGlobalCache)return m;let y=e.getGlobalCache();if(y!==void 0&&!Ul(r)&&!(m.resolvedModule&&dM(m.resolvedModule.extension))){let{resolvedModule:g,failedLookupLocations:S,affectingLocations:_,resolutionDiagnostics:b}=TH(E.checkDefined(e.globalCacheResolutionModuleName)(r),e.projectName,a,f,y,n);if(g)return m.resolvedModule=g,m.failedLookupLocations=yS(m.failedLookupLocations,S),m.affectingLocations=yS(m.affectingLocations,_),m.resolutionDiagnostics=yS(m.resolutionDiagnostics,b),m}return m}function H2(e){return qs(e,".json")?e:fi(e,"lpc-config.json")}function oz(e,n){return{typeFromExpression:v,serializeTypeOfDeclaration:c,serializeReturnTypeForSignature:u,serializeTypeOfExpression:a};function i(be,de){return be!==void 0&&(!de||be&&ce(be))?!0:void 0}function a(be,de,Ae,G){return v(be,de,!1,Ae,G)??S(be,de)}function c(be,de){switch(be.kind){case 153:return i(tc(be));case 149:return m(be,de);case 237:return f(be,de);case 152:return y(be,de);case 266:return g(be,de);case 286:case 281:case 269:return i(tc(be))||g(be,de);case 174:return v(be.initializer,de)||g(be,de);default:E.assertNever(be,`Node needs to be an inferrable node, found ${E.formatSyntaxKind(be.kind)}`)}}function u(be,de){switch(be.kind){case 154:case 169:case 156:case 150:case 158:case 270:case 271:case 202:return Ee(be,de);default:E.assertNever(be,`Node needs to be an inferrable node, found ${E.formatSyntaxKind(be.kind)}`)}}function f(be,de){let Ae=tc(be);if(Ae)return i(Ae);let G;return be.initializer&&(n.isExpandoFunctionDeclaration(be)||(G=v(be.initializer,de,void 0,void 0,!1))),G??g(be,de)}function m(be,de){let Ae=be.parent,G=tc(be),Qe=n.requiresAddingImplicitUndefined(be),me;return G?me=i(G,Qe):be.initializer&&Sn(be.name)&&(me=v(be.initializer,de,void 0,Qe)),me??g(be,de)}function y(be,de){let Ae=tc(be);if(Ae)return i(Ae);let G;return be.initializer&&(G=v(be.initializer,de,void 0,void 0,!1)),G??g(be,de)}function g(be,de){return de.tracker.reportInferenceFallback(be),!1}function S(be,de){return de.tracker.reportInferenceFallback(be),!1}function _(be,de){return de.tracker.reportInferenceFallback(be),!1}function b(be,de,Ae,G){return G&&!ce(de)&&Ae.tracker.reportInferenceFallback(de),i(de)}function v(be,de,Ae=!1,G=!1,Qe=!1){switch(be.kind){case 289:return xm(be)?b(be.expression,mS(be),de,G):v(be.expression,de,Ae,G);case 89:if(n.isUndefinedIdentifierExpression(be))return!0;break;case 137:return!0;case 271:case 270:return T(be,de);case 279:let me=be;return b(me.expression,me.type,de,G);case 298:let Se=be;if(iM(Se)&&(Se.operand.kind===13||Se.operand.kind===11))return he();break;case 11:return he();case 16:return he();case 13:return he();case 136:case 135:return he();case 290:return F(be,de,Ae);case 291:E.fail("todo - mapping literal");case 293:return J(be,de,Ae);case 274:return S(be,de)}}function T(be,de){let Ae=i(be.type)??Ee(be,de),G=void 0,Qe=be.parameters.every(me=>V(me,de));return Ae&&G&&Qe}function W(be,de,Ae){if(!Ae)return de.tracker.reportInferenceFallback(be),!1;for(let G of be.elements)if(G.kind===294)return de.tracker.reportInferenceFallback(G),!1;return!0}function F(be,de,Ae){if(!W(be,de,Ae))return!1;let G=!0;for(let Qe of be.elements)E.assert(Qe.kind!==294),Qe.kind!==297&&(G=(v(Qe,de,Ae)??S(Qe,de))&&G);return!0}function M(be,de){let Ae=!0;for(let G of be.properties)if(G.flags&262144){Ae=!1;break}else if(G.name.flags&262144){Ae=!1;break}else if(G.name.kind===147){let Qe=G.name.expression;!iM(Qe,!1)&&!n.isDefinitelyReferenceToGlobalSymbolObject(Qe)&&(de.tracker.reportInferenceFallback(G.name),Ae=!1)}return Ae}function J(be,de,Ae){if(!M(be,de))return!1;let G=!0;for(let Qe of be.properties){E.assert(!ud(Qe)&&!ab(Qe));let me=Qe.name;switch(Qe.kind){case 174:G=!!A(Qe,me,de,Ae)&&G;break}}return G}function A(be,de,Ae,G){return v(be.initializer,Ae,G)??g(be,Ae)}function V(be,de){return m(be,de)}function ue(be){return be?.every(de=>i(de.constraint)&&i(de.default))??!0}function ye(be,de,Ae){let G=Ee(be,Ae),Qe=!0,me=be.parameters.every(Se=>V(Se,Ae));return G&&Qe&&me}function he(){return!0}function ce(be){return!0}function Ee(be,de){let Ae,G=Vl(be);return G&&(Ae=i(G)),!Ae&&zF(be)&&(Ae=Fe(be,de)),Ae??_(be,de)}function Fe(be,de){let Ae;if(be&&!Da(be.body)){if(yl(be)&3)return;let G=be.body;G&&_c(G)?cp(G,Qe=>{if(!Ae)Ae=Qe.expression;else return Ae=void 0,!0}):Ae=G}if(Ae)return v(Ae,de)}}var LE={};cl(LE,{countPathComponents:()=>bme});function bme(e){let n=0;for(let r=Eo(e,"./")?2:0;r<e.length;r++)e.charCodeAt(r)===47&&n++;return n}var Qg={};var $I;(r=>{class e{constructor(a){this.text=a}getText(a,c){return a===0&&c===this.text.length?this.text:this.text.substring(a,c)}getLength(){return this.text.length}getChangeRange(){}}function n(i){return new e(i)}r.fromString=n})($I||($I={}));var ES=(ce=>(ce[ce.aliasName=0]="aliasName",ce[ce.className=1]="className",ce[ce.enumName=2]="enumName",ce[ce.fieldName=3]="fieldName",ce[ce.interfaceName=4]="interfaceName",ce[ce.keyword=5]="keyword",ce[ce.lineBreak=6]="lineBreak",ce[ce.numericLiteral=7]="numericLiteral",ce[ce.stringLiteral=8]="stringLiteral",ce[ce.localName=9]="localName",ce[ce.methodName=10]="methodName",ce[ce.moduleName=11]="moduleName",ce[ce.operator=12]="operator",ce[ce.parameterName=13]="parameterName",ce[ce.propertyName=14]="propertyName",ce[ce.punctuation=15]="punctuation",ce[ce.space=16]="space",ce[ce.text=17]="text",ce[ce.typeParameterName=18]="typeParameterName",ce[ce.enumMemberName=19]="enumMemberName",ce[ce.functionName=20]="functionName",ce[ce.regularExpressionLiteral=21]="regularExpressionLiteral",ce[ce.link=22]="link",ce[ce.linkName=23]="linkName",ce[ce.linkText=24]="linkText",ce))(ES||{});var EG=[".",'"',"'","`","/","@","<"," ",">"];var Cme=/^\/\/\/\s*</;function vG(e){return e.kind===147?Bc(e.expression)?e.expression.text:void 0:gh(e)}function Fm(e){return e.getText(0,e.getLength())}function eB(e){let n=e.declarations?ha(e.declarations):void 0;return!!er(n,r=>_o(r)?!0:To(r)||hS(r)?!1:"quit")}function md(e,n,r){return Sc(e.getStart(n),(r||e).getEnd())}function XI(e){return!!((e.kind===290||e.kind===293)&&(e.parent.kind===269&&e.parent.left===e&&e.parent.operatorToken.kind===74||e.parent.kind===244&&e.parent.initializer===e||XI(e.parent.kind===174?e.parent.parent:e.parent)))}function nB(e,n,r,i,a){let c=i?Eme(e):tB(e);return a&&(c=Pg(c)),!!c&&!!c.parent&&n(c.parent)&&r(c.parent)===c}function Sb(e){return Wo(e.parent,Ti)?.name===e}function tB(e){return Sb(e)?e.parent:e}function Dme(e){return Wo(e.parent,rc)?.argumentExpression===e}function Eme(e){return Sb(e)||Dme(e)?e.parent:e}function rB(e){return e.expression&&Zo(e.expression)?void 0:e.expression}function FG(e,n=!1,r=!1){return nB(e,Md,rB,n,r)}function ZI(e){return Sn(e)&&Wo(e.parent,Ji)?.name===e}function eL(e,n=!1,r=!1){return nB(e,Em,rB,n,r)}var $2=Pme();function Pme(){let e=UD*10,n,r,i,a;g();let c=S=>f(S,17);return{displayParts:()=>{let S=n.length&&n[n.length-1].text;return a>e&&S&&S!=="..."&&(Tu(S.charCodeAt(S.length-1))||n.push(Ts(" ",16)),n.push(Ts("...",15))),n},writeKeyword:S=>f(S,5),writeOperator:S=>f(S,12),writePunctuation:S=>f(S,15),writeTrailingSemicolon:S=>f(S,15),writeSpace:S=>f(S,16),writeStringLiteral:S=>f(S,8),writeParameter:S=>f(S,13),writeProperty:S=>f(S,14),writeLiteral:S=>f(S,8),writeSymbol:m,writeLine:y,write:c,writeComment:c,getText:()=>"",getTextPos:()=>0,getColumn:()=>0,getLine:()=>0,isAtStartOfLine:()=>!1,hasTrailingWhitespace:()=>!1,hasTrailingComment:()=>!1,rawWrite:ep,getIndent:()=>i,increaseIndent:()=>{i++},decreaseIndent:()=>{i--},clear:g};function u(){if(!(a>e)&&r){let S=kF(i);S&&(a+=S.length,n.push(Ts(S,16))),r=!1}}function f(S,_){a>e||(u(),a+=S.length,n.push(Ts(S,_)))}function m(S,_){a>e||(u(),a+=S.length,n.push(Nme(S,_)))}function y(){a>e||(a+=1,n.push(Oh()),r=!0)}function g(){n=[],r=!0,i=0,a=0}}function Oh(){return Ts(`
64
+ `,6)}function Ts(e,n){return{text:e,kind:ES[n]}}function PS(e,n,r,i,a=0){return wf(c=>{e.writeSymbol(n,r,i,a|8,c)})}function Nme(e,n){return Ts(e,r(n));function r(i){let a=i.flags;return a&3?eB(i)?13:9:a&4?14:a&32768?14:a&65536?14:a&8?19:a&16?20:a&32?1:a&64?4:a&384?2:a&1536?11:a&8192?10:a&262144?18:a&524288?0:a&2097152?0:17}}function wf(e){try{return e($2),$2.displayParts()}finally{$2.clear()}}function VE(e,n,r,i=0){return wf(a=>{e.writeType(n,r,i|1024|16384,a)})}function NS(e){for(jd(e)&&(e=e.parent.parent);;){if(e=e.parent,!e)return;switch(e.kind){case 176:case 169:case 270:return e}}}function Ja(){return Ts(" ",16)}function HE(e){return Ts(Ai(e),5)}function Ec(e){return Ts(Ai(e),15)}function IG(e){return Ts(Ai(e),12)}function LG(e){return Ts(e,13)}function AG(e){return Ts(e,14)}function iB(e){let n=tp(e);return n===void 0?ac(e):HE(n)}function ac(e){return Ts(e,17)}function zE(e){return!!(uO(e)&65536)}function GE(e,n=0){let r=[],i=ad(e)?uO(e)&~n:0;return i&2&&r.push("private"),i&4&&r.push("protected"),i&1&&r.push("public"),i&2048&&r.push("export"),i&65536&&r.push("deprecated"),e.flags&33554432&&r.push("declare"),r.length>0?r.join(","):""}function wG(e,n,r,i=0){return i|=25632,wf(a=>{e.writeSignature(n,r,i,void 0,a)})}function RG(e,n,r,i=0){i|=25632;let a=e.getReturnTypeOfSignature(n);return wf(c=>{e.writeType(a,r,i,c)})}function oB(e){return OG(e,!1)}function OG(e,n){let{parent:r}=e;if(sm(e)&&n?Qx(r)&&Gr(r.modifiers,e):e.kind===133?sb(r)||vE(e):e.kind===138&&(Is(r)||fs(e))){let i=Gme(r,n);if(i)return i}if(!n){if(e.kind===145&&Em(r)&&r.expression)return Pg(r.expression);if(e.kind===103&&br(r)&&r.operatorToken===e)return Pg(r.right)}return e}function nL(e){switch(e.kind){case 237:return 1;case 149:case 266:case 152:case 174:case 175:case 169:case 270:case 283:case 255:return 1;case 148:case 163:return 2;case 225:return e.name===void 0?3:2;case 176:return 5}return 7}function kS(e){e=oB(e);let n=e.parent;return e.kind===176?1:ql(e)?nL(n):Pu(n)?(E.assert(wc(n.parent)),2):hu(n)?3:1}function aB(e,n){return PF(e,n.getScriptKind&&n.getScriptKind(e))}function $E(e,n,r){let{fileName:i,textSpan:a}=e,c=hb({fileName:i,pos:a.start},n,r);if(!c)return;let u=hb({fileName:i,pos:a.start+a.length},n,r),f=u?u.pos-c.pos:a.length;return{fileName:c.fileName,textSpan:{start:c.pos,length:f},originalFileName:e.fileName,originalTextSpan:e.textSpan,contextSpan:sB(e,n,r),originalContextSpan:e.contextSpan}}function hb(e,n,r){let i=n.tryGetSourcePosition(e);return i&&(!r||r(Qr(i.fileName))?i:void 0)}function sB(e,n,r){let i=e.contextSpan&&hb({fileName:e.fileName,pos:e.contextSpan.start},n,r),a=e.contextSpan&&hb({fileName:e.fileName,pos:e.contextSpan.start+e.contextSpan.length},n,r);return i&&a?{start:i.pos,length:a.pos-i.pos}:void 0}function QE(e){switch(e.kind){case 176:return"script";case 274:return"class";case 217:case 225:return"type";case 237:return n(e);case 266:return n(e);case 169:case 270:return"function";case 174:let{initializer:r}=e;return Ji(r)?"method":"property";case 152:case 175:return"property";case 150:return"index";case 148:return"type parameter";case 149:return xu(e,167)?"property":"parameter";case 179:return"define";case 171:return"alias";case 269:let i=es(e),{right:a}=e;switch(i){case 7:case 8:case 9:case 0:return"";case 1:case 2:let c=QE(a);return c===""?"const":c;case 3:return fs(a)?"method":"property";case 4:return"property";case 5:return fs(a)?"method":"property";case 6:return"local class";default:return""}case 89:return"";default:return""}function n(r){return fq(r)?"const":pq(r)?"let":"var"}}function vS(e){return Sc(e.pos,e.end)}var cB=[97,135,137,92,93,104,99,101,140,94,136,105,96,102];function YE(e){return Gr(cB,e)}function lB(e){return Sn(e)&&Wo(e.parent,px)?.label===e}function uB(e,n){for(;e;){if(console.log("TODO - getTargetLabel"),e.kind===249&&e.label.text===n)return e.label;e=e.parent}}function MG(e){return Sn(e)&&Wo(e.parent,PI)?.label===e}function _b(){let e=[];return n=>{let r=ys(n);return!e[r]&&(e[r]=!0)}}function BG(e,n,r=Vs(n,e)){return!!r&&r.kind===21&&ao(r.parent)}function hp(e,n,r=Vs(n,e)){if(r&&Zv(r)){let i=r.getStart(e),a=r.getEnd();if(i<n&&n<a)return!0;if(n===a)return!!r.isUnterminated}return!1}function kme(e,n){return!!e&&!!n&&e.start===n.start&&e.length===n.length}function dB(e,n,r){return(r?cg:bf)(e.fileName,n.fileName)&&kme(e.textSpan,n.textSpan)}function jG(e){return(n,r)=>dB(n,r,e)}function JG(e){return Wo(e.parent,ah)?.tagName===e}function XE(e,n){if(e.flags&16777216)return;let r=ZE(e,n);if(r)return r;let i=vme(e);return i&&n.getTypeAtLocation(i)}function vme(e){let n;return er(e,r=>(Zo(r)&&(n=r),!hl(r.parent)&&!Zo(r.parent)&&!$T(r.parent))),n}function ZE(e,n,r){let i=Dh(e.parent);switch(i.kind){case 276:return n.getContextualType(i,r);case 269:{let{left:a,operatorToken:c,right:u}=i;return tL(c.kind)?n.getTypeAtLocation(e===u?a:u):n.getContextualType(e,r)}case 299:return fB(i,n);default:return n.getContextualType(e,r)}}function tL(e){switch(e){case 37:case 35:case 38:case 36:return!0;default:return!1}}function fB(e,n){return n.getTypeAtLocation(e.parent.parent.expression)}function WG(e,n){return Fme(e,n,!1)}function Fme(e,n,r){let i=Xg(e,n,void 0);return!!i&&r===Cme.test(e.text.substring(i.pos,i.end))}function Xg(e,n,r){return Hs.getRangeOfEnclosingComment(e,n,void 0,r)}function Tb(e,n){return e.pos<n&&n<e.end}function Qd(e,n){return UG(e,n,!0,void 0,!1)}function UG(e,n,r,i,a){let c=e,u,f=0;e:for(;;){f++>100&&console.warn("Bailed out of getTokenAtPositionWorker loop");let y=c.getChildren(e),g=kT(y,n,(S,_)=>_,(S,_)=>{let b=y[S].getEnd();if(b<n)return-1;let v=r?y[S].getFullStart():y[S].getStart(e,!0);return v>n?1:m(y[S],v,b)?y[S-1]&&m(y[S-1])?1:0:i&&v===n&&y[S-1]&&y[S-1].getEnd()===n&&m(y[S-1])?1:-1});if(u)return u;if(g>=0&&y[g]){c=y[g];continue e}return c}function m(y,g,S){if(S??(S=y.getEnd()),S<n||(g??(g=r?y.getFullStart():y.getStart(e,!0)),g>n))return!1;if(n<S||n===S&&(y.kind===1||a))return!0;if(i&&S===n){let _=Vs(n,e,y);if(_&&i(_))return u=_,!0}return!1}}function xb(e){return OG(e,!0)}function $l(e,n){return eP(e,n,r=>Fg(r)||Qc(r.kind))}function eP(e,n,r){return UG(e,n,!1,r,!1)}function KG(e){return VT(e)}function qG(e,n){return TS(e)&&!e._children?!1:e.kind===1?!!e.jsDoc:e.getWidth(n)!==0}function X2(e,n,r,i){for(let a=n-1;a>=0;a--){let c=e[a];if(qG(e[a],r))return e[a]}}function Vs(e,n,r,i){return c(r||n);function c(u){if(KG(u)&&u.kind!==1)return u;let f=u.getChildren(n),m=kT(f,e,(g,S)=>S,(g,S)=>e<f[g].end?!f[g-1]||e>=f[g-1].end?0:1:-1);if(m>=0&&f[m]){let g=f[m];if(e<g.end)if(g.getStart(n,!i)>=e||!qG(g,n)){let b=X2(f,m,n,u.kind);return b?!i&&zv(b)&&b.getChildren(n).length?c(b):Z2(b,n):void 0}else return c(g)}let y=X2(f,f.length,n,u.kind);return y&&Z2(y,n)}}function Z2(e,n){if(KG(e))return e;let r=e.getChildren(n);if(r.length===0)return e;let i=X2(r,r.length,n,e.kind);return i&&Z2(i,n)}function FS(e,n){return 1}function VG(e){switch(e){case 0:return"'";case 1:return'"';default:return E.assertNever(e)}}function HG(e){return!1}function zG(e){return Nr(e)?rS(um(e[0]),e.slice(1)):um(e)}function bb(e,n){return e.pos<=n&&n<=e.end}function PG(e){return Ts(e,22)}function Q2(e){return Ts(e,24)}function Ime(e,n){return{text:e,kind:ES[23],target:{fileName:$t(n).fileName,textSpan:md(n)}}}function Lme(e,n){let r=e;for(;Ame(r)||ym(r)&&r.links.target;)ym(r)&&r.links.target?r=r.links.target:r=cd(r,n);return r}function Ame(e){return(e.flags&2097152)!==0}function GG(e,n){let r=EH(e)?"link":PH(e)?"linkcode":"linkplain",i=[PG(`{@${r} `)];if(!e.name)e.text&&i.push(Q2(e.text));else{let a=n?.getSymbolAtLocation(e.name),c=a&&n?Lme(a,n):void 0,u=Rme(e.text),f=ml(e.name)+e.text.slice(0,u),m=wme(e.text.slice(u)),y=c?.valueDeclaration||c?.declarations?.[0];if(y)i.push(Ime(f,y)),m&&i.push(Q2(m));else{let g=u===0||e.text.charCodeAt(u)===124&&f.charCodeAt(f.length-1)!==32?" ":"";i.push(Q2(f+g+m))}}return i.push(PG("}")),i}function wme(e){let n=0;if(e.charCodeAt(n++)===124){for(;n<e.length&&e.charCodeAt(n)===32;)n++;return e.slice(n)}return e}function Rme(e){let n=e.indexOf("://");if(n===0){for(;n<e.length&&e.charCodeAt(n)!==124;)n++;return n}if(e.indexOf("()")===0)return 2;if(e.charAt(0)==="<"){let r=0,i=0;for(;i<e.length;)if(e[i]==="<"&&r++,e[i]===">"&&r--,i++,!r)return i}return 0}function pB(e,n){if(e){for(let r=0;r<e.length;r++)if(e.indexOf(e[r])===r){let i=n(e[r],r);if(i)return i}}}function Ql(e,n){let r=yc(n),i=n.getLineAndCharacterOfPosition(e).line;return r[i]}function $G(e){return Ts(e,0)}function QG(e){return Ts(e,18)}function mB(e,n){return{span:e,newText:n}}function YG(e){return dp(e.start,e.start+e.length)}function XG(e,n){for(;Tu(e.charCodeAt(n));)n+=1;return n}function nP({options:e},n){let r=!e.semicolons||e.semicolons==="ignore",i=e.semicolons==="remove"||r&&!Mme(n);return{...e,semicolons:i?"remove":"ignore"}}function Cb(e){return e===`
65
+ `?1:0}var Ome=`
66
+ `;function Mh(e,n){return n?.newLineCharacter||e.getNewLine?.()||Ome}function Mme(e){let n=0,r=0,i=5;return No(e,function a(c){if(hB(c.kind))c.getLastToken(e)?.kind===26?n++:r++;else if(yB(c.kind)){let u=c.getLastToken(e);if(u?.kind===26)n++;else if(u&&u.kind!==27){let f=ma(e,u.getStart(e)).line,m=ma(e,ph(e,u.end).start).line;f!==m&&r++}}return n+r>=i?!0:No(c,a)}),n===0&&r<=1?!0:n/r>1/i}function gB(e,n,r){let i=er(n,a=>a.end!==e?"quit":Bme(a.kind));return!!i&&jme(i,r)}function yB(e){return e===150||e===153}function ZG(e){return e===169}function e$(e){return!1}function hB(e){return e===242||e===247||e===251||e===250||e===248||e===152||e===172}var Bme=vv(yB,ZG,e$,hB);function jme(e,n){let r=e.getLastToken(n);if(r&&r.kind===26)return!1;if(yB(e.kind)){if(r&&r.kind===27)return!1}else if(e$(e.kind)){let f=ta(e.getChildren(n));if(f&&DH(f))return!1}else if(ZG(e.kind)){let f=ta(e.getChildren(n));if(f&&Ng(f))return!1}else if(!hB(e.kind))return!1;if(e.kind===245)return!0;let i=er(e,f=>!f.parent),a=rP(e,i,n);if(!a||a.kind===19)return!0;let c=n.getLineAndCharacterOfPosition(e.getEnd()).line,u=n.getLineAndCharacterOfPosition(a.getStart(n)).line;return c!==u}function n$(e,n){for(;n>-1&&Jl(e.charCodeAt(n));)n-=1;return n+1}function t$(e,n){return Tb(e,n.pos)&&Tb(e,n.end)}function r$(e,n,r){let i=n.length;if(i+r>e.length)return!1;for(let a=0;a<i;a++)if(n.charCodeAt(a)!==e.charCodeAt(a+r))return!1;return!0}function i$(e,n,r){return e.pos<=n&&e.end>=r}function o$(e,n){let r=Qd(e,n);return!1}function TB(e,n,r){let i=FS(e,n),a=JSON.stringify(r);return i===0?`'${zl(a).replace(/'/g,()=>"\\'").replace(/\\"/g,'"')}'`:a}function a$(e,n){let r=Qd(e,n);return!!er(r,Oc)}function SB(e,n){return{fileExists:r=>e.fileExists(r),getCurrentDirectory:()=>n.getCurrentDirectory(),readFile:Ta(n,n.readFile),useCaseSensitiveFileNames:Ta(n,n.useCaseSensitiveFileNames),getFileIncludeReasons:()=>e.getFileIncludeReasons(),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function tP(e,n){let r=new Set,i=new Set,a=new Set;for(let f of n)if(!rx(f)){let m=$o(f.expression);if(zT(m))switch(m.kind){case 16:r.add(m.text);break;case 10:i.add(parseInt(m.text));break}else{let y=e.getSymbolAtLocation(f.expression)}}return{addValue:c,hasValue:u};function c(f){switch(typeof f){case"string":r.add(f);break;case"number":i.add(f)}}function u(f){switch(typeof f){case"string":return r.has(f);case"number":return i.has(f)}}}function s$(e){Jme(e),Wme(e)}function Jme(e){_B(e,1024,Ume)}function Wme(e){_B(e,2048,Pq)}function _B(e,n,r){SV(e,n);let i=r(e);i&&_B(i,n,r)}function Ume(e){return e.forEachChild(n=>n)}function rL(e,n=!0){let r=e&&c$(e);return r&&!n&&s$(r),up(r,!1)}function c$(e,n){let r=n?c=>l$(c,!0,n):rL,a=Hg(e,r,void 0,n?c=>c&&Kme(c,!0,n):c=>c&&qme(c),r);if(a===e){let c=ji(e)?Gd(Ge.createStringLiteralFromNode(e),e):yu(e)?Gd(Ge.createIntLiteral(e.text,e.numericLiteralFlags),e):hg(e)?Gd(Ge.createFloatLiteral(e.text,e.numericLiteralFlags),e):Ge.cloneNode(e);return Ea(c,e)}return a.parent=void 0,a}function l$(e,n,r){let i=r(e);return i?Gd(i,e):i=c$(e,r),i&&!n&&s$(i),i}function Kme(e,n,r){return Ge.createNodeArray(e.map(i=>l$(i,n,r)),e.hasTrailingComma)}function qme(e,n=!0){if(e){let r=Ge.createNodeArray(e.map(i=>rL(i,n)),e.hasTrailingComma);return Ea(r,e),r}return e}function u$(e,n){return{...SB(e,n),getCommonSourceDirectory:()=>e.getCommonSourceDirectory()}}function d$(e){switch(e.kind){case 16:return!0;default:return!1}}function f$(e,n,r){return n<e.end||!pd(e,r)}function QI(e,n,r){let i=e.getChildren(r);if(i.length){let a=ta(i);if(a.kind===n)return!0;if(a.kind===26&&i.length!==1)return i[i.length-2].kind===n}return!1}function pd(e,n){if(e===void 0||Da(e))return!1;switch(e.kind){case 170:case 293:case 163:case 236:case 240:return QI(e,19,n);case 255:return pd(e.block,n);case 276:if(!e.arguments)return!0;case 272:case 289:case 165:return QI(e,21,n);case 169:case 270:case 154:case 156:case 271:return e.body?pd(e.body,n):e.type?pd(e.type,n):YI(e,21,n);case 253:return e.elseStatement?pd(e.elseStatement,n):pd(e.thenStatement,n);case 247:return pd(e.expression,n)||YI(e,26,n);case 290:case 265:case 281:case 147:return QI(e,23,n);case 150:return e.type?pd(e.type,n):YI(e,23,n);case 299:case 301:return!1;case 243:case 244:case 246:return pd(e.statement,n);case 245:return YI(e,118,n)?QI(e,21,n):pd(e.statement,n);case 294:return pd(e.expression,n);case 298:return pd(e.operand,n);case 269:return pd(e.right,n);case 267:return pd(e.whenFalse,n);default:return!0}}function YI(e,n,r){return!!Yl(e,n,r)}function iL(e,n){if(e)switch(e.kind){case 16:return xB(e,n);default:return md(e)}}function xB(e,n){let r=e.getEnd()-1;if(e.isUnterminated){if(e.getStart()===r)return;r=Math.min(n,e.getEnd())}return Sc(e.getStart()+1,r)}function p$(e,n){if(Vme(e)){let r=Hme(e);if(r)return r;let i=kG(NG(e),n,!1),a=kG(NG(e),n,!0);return i===a?i:[i,a]}return e.name}function Vme(e){return!(e.flags&33554432)&&(e.name==="export="||e.name==="default")}function Hme(e){return Ns(e.declarations,n=>Wo(ci(n),Sn)?.text)}function NG(e){return E.checkDefined(e.parent,`Symbol parent was undefined. Flags: ${E.formatSymbolFlags(e.flags)}. Declarations: ${e.declarations?.map(n=>{let r=E.formatSyntaxKind(n.kind),i=!1,{expression:a}=n;return(i?"[JS]":"")+r+(a?` (expression: ${E.formatSyntaxKind(a.kind)})`:"")}).join(", ")}.`)}function kG(e,n,r){return zme(bu(zl(e.name)),n,r)}function zme(e,n,r){let i=hs(mg(e,"/index")),a="",c=!0,u=i.charCodeAt(0);fl(u,n)?(a+=String.fromCharCode(u),r&&(a=a.toUpperCase())):c=!1;for(let f=1;f<i.length;f++){let m=i.charCodeAt(f),y=nd(m,n);if(y){let g=String.fromCharCode(m);c||(g=g.toUpperCase()),a+=g}c=y}return vq(a)?`_${a}`:a||"_"}function m$(e,n){if(n.text.lastIndexOf("<",e?e.pos:n.text.length)===-1)return;let r=e,i=0,a=0,c=0;for(;r;){if(c++>100){console.warn("Bailed out of matching token serach");break}switch(r.kind){case 29:if(r=Vs(r.getFullStart(),n),r&&r.kind===28&&(r=Vs(r.getFullStart(),n)),!r||!Sn(r))return;if(!i)return ql(r)?void 0:{called:r,nTypeArguments:a};i--;break;case 51:i=3;break;case 50:i=2;break;case 32:i++;break;case 19:if(r=Y2(r,17,n),!r)return;break;case 21:if(r=Y2(r,20,n),!r)return;break;case 23:if(r=Y2(r,22,n),!r)return;break;case 27:a++;break;case 39:case 89:case 16:case 10:case 11:case 13:case 136:case 135:case 24:case 53:case 60:case 61:break;default:if(Zo(r))break;return}r=Vs(r.getFullStart(),n)}}function Y2(e,n,r){let i=Ai(e.kind),a=Ai(n),c=e.getFullStart(),u=r.text.lastIndexOf(a,c);if(u===-1)return;if(r.text.lastIndexOf(i,c-1)<u){let g=Vs(u+1,r);if(g&&g.kind===n)return g}let f=e.kind,m=0,y=0;for(;;){let g=Vs(e.getFullStart(),r);if(!g)return;if(e=g,e.kind===n){if(m===0)return e;m--}else e.kind===f&&m++;if(y++>100){console.warn("bailed out of matching token search");break}}}function g$(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()}function y$(e){return e.isTypeParameter()&&e.getConstraint()||e}function h$(e,n=!1,r=!1){return nB(e,ao,rB,n,r)}function Gme(e,n){if(!n)switch(e.kind){case 170:case 274:return $me(e);case 169:case 270:return Qme(e)}if(pl(e))return e.name}function $me(e){if(pl(e))return e.name;if(sb(e),vE(e)){let n=Sr(e.getChildren(),Xme);if(n)return n}}function Qme(e){if(pl(e))return e.name;if(Is(e),fs(e)){let n=Sr(e.getChildren(),Yme);if(n)return n}}function Yme(e){return e.kind===138}function Xme(e){return e.kind===133}function T$(e,n){let r=Qd(e,n);return VT(r)&&n>r.getStart(e)&&n<r.getEnd()?r:Vs(n,e)}function S$(e,n,r){let i=r.getTypeAtLocation(e);return(Em(e.parent)?i.getConstructSignatures():i.getCallSignatures()).filter(c=>!!c.typeParameters&&c.typeParameters.length>=n)}var iP=(i=>(i[i.Named=0]="Named",i[i.Default=1]="Default",i[i.ExportEquals=2]="ExportEquals",i))(iP||{}),bB=(r=>(r[r.Import=0]="Import",r[r.Export=1]="Export",r))(bB||{});function CB(e,n,r){let i=[],a=e.getTypeChecker();for(let c of n){let u=r.valueDeclaration;if(u?.kind===176){for(let f of c.referencedFiles)e.getSourceFileFromReference(c,f)===u&&i.push({kind:"reference",referencingFile:c,ref:f});for(let f of c.typeReferenceDirectives){let m=e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(f,c)?.resolvedTypeReferenceDirective;m!==void 0&&m.resolvedFileName===u.fileName&&i.push({kind:"reference",referencingFile:c,ref:f})}}_$(c,(f,m)=>{a.getSymbolAtLocation(m)===r&&i.push(Zi(f)?{kind:"implicit",literal:m,referencingFile:c}:{kind:"import",literal:m})})}return i}function _$(e,n){Zme(e,r=>{switch(r.kind){case 252:let i=r;i.inheritClause&&ji(i.inheritClause)&&n(i,i.inheritClause);break}})}function Zme(e,n){return Bn(e.kind===176?e.statements:[],r=>n(r))}function oL(e,n,r,i){let a=ege(e,r,i);return(c,u,f)=>{let{directImports:m,indirectUsers:y}=nge(e,n,a,u,r,i);return{indirectUsers:y,...tge(m,c,u.exportKind,r,f)}}}function ege(e,n,r){let i=new Map;for(let a of e)r&&r.throwIfCancellationRequested(),_$(a,(c,u)=>{let f=n.getSymbolAtLocation(u);if(f){let m=so(f).toString(),y=i.get(m);y||i.set(m,y=[]),y.push(c)}});return i}function nge(e,n,r,{exportingModuleSymbol:i,exportKind:a},c,u){let f=_b(),m=_b(),y=[],g=!!i.globalExports,S=g?void 0:[];return v(i),{directImports:y,indirectUsers:_()};function _(){if(g)return e;if(i.declarations)for(let J of i.declarations);return S.map($t)}function b(J){let A=J.getSourceFile();F(A,!!W(J,!0))}function v(J){let A=M(J);if(A){for(let V of A)if(f(V))switch(u&&u.throwIfCancellationRequested(),V.kind){case 273:b(V);break;case 272:if(!g){let ue=V.parent;if(a===2&&ue.kind===237){let{name:ye}=ue;if(ye.kind===89){y.push(ye);break}}}break;case 89:break;case 252:T(V);break;default:E.failBadSyntaxKind(V,"Unexpected import kind.")}}}function T(J){let A=J.getSourceFile();F(A,!!W(J,!0))}function W(J,A=!1){return!1}function F(J,A=!1){if(E.assert(!g),!m(J)||(S.push(J),!A))return;let ue=c.getMergedSymbol(J.symbol);if(!ue)return;E.assert(!!(ue.flags&1536));let ye=M(ue);if(ye)for(let he of ye)F(rge(he),!0)}function M(J){return r.get(so(J).toString())}}function tge(e,n,r,i,a){let c=[],u=[];function f(S,_){c.push([S,_])}if(e)for(let S of e)m(S);return{importSearches:c,singleReferences:u};function m(S){if(S.kind,252,S.kind===89){y(S);return}let{name:_,namedBindings:b}={name:void 0,namedBindings:void 0};if(_&&(r===1||r===2)&&(!a||_.escapedText===n)){let v=i.getSymbolAtLocation(_);f(_,v)}}function y(S){r===2&&(!a||g(S.text))&&f(S,i.getSymbolAtLocation(S))}function g(S){return S===n.name||r!==0&&S==="default"}}function rge(e){if(e.kind===272)return e.getSourceFile();let{parent:n}=e;if(n.kind===176)return n;E.fail("Expected SourceFile parent for import declaration.")}function ige(e,n,r,i){console.log("todo - getImportOrExportSymbol")}function b$(e,n,r,i,a){let c=Ki();n.getPackageJsonAutoImportProvider?.();let u=n.getCachedExportInfoMap?.()||DB({getCurrentProgram:()=>r,getPackageJsonAutoImportProvider:()=>n.getPackageJsonAutoImportProvider?.(),getGlobalTypingsCacheLocation:()=>n.getGlobalTypingsCacheLocation?.()});if(u.isUsableByFile(e.path))return n.log?.("getExportInfoMap: cache hit"),u;n.log?.("getExportInfoMap: cache miss or empty; calculating new results");let f=0;try{oge(r,n,i,!0,(m,y,g,S)=>{++f%100===0&&a?.throwIfCancellationRequested();let _=new Map,b=g.getTypeChecker(),v=age(m,b);v&&sge(v.symbol,b)&&u.add(e.path,v.symbol,v.exportKind===1?"default":"export=",m,y,v.exportKind,S,b)})}catch(m){throw u.clear(),m}return n.log?.(`getExportInfoMap: done in ${Ki()-c} ms`),u}function oge(e,n,r,i,a){let c=qx(n),u=r.autoImportFileExcludePatterns&&Ei(r.autoImportFileExcludePatterns,m=>{let y=wF(m,"","exclude");return y?vg(y,c):void 0});x$(e.getTypeChecker(),e.getSourceFiles(),u,n,(m,y)=>a(m,y,e,!1));let f=i&&n.getPackageJsonAutoImportProvider?.();if(f){let m=Ki(),y=e.getTypeChecker();x$(f.getTypeChecker(),f.getSourceFiles(),u,n,(g,S)=>{(S&&!e.getSourceFile(S.fileName)||!S&&!y.resolveName(g.name,void 0,1536,!1))&&a(g,S,f,!0)}),n.log?.(`forEachExternalModuleToImportFrom autoImportProvider: ${Ki()-m}`)}}function x$(e,n,r,i,a){for(let c of n);}function DB(e){let n=1,r=Js(),i=new Map,a=new Map,c,u={isUsableByFile:b=>b===c,isEmpty:()=>!r.size,clear:()=>{r.clear(),i.clear(),c=void 0},add:(b,v,T,W,F,M,J,A)=>{b!==c&&(u.clear(),c=b);let V,ye=M===1&&Fx(v)||v,he=p$(ye,void 0),ce=typeof he=="string"?he:he[0],Ee=typeof he=="string"?void 0:he[1],Fe=zl(W.name),be=n++,de=cd(v,A),Ae=v.flags&33554432?void 0:v,G=W.flags&33554432?void 0:W;(!Ae||!G)&&i.set(be,[v,W]),r.add(m(ce,v,Ul(Fe)?void 0:Fe,A),{id:be,symbolTableKey:T,symbolName:ce,capitalizedSymbolName:Ee,moduleName:Fe,moduleFile:F,moduleFileName:F?.fileName,packageName:V,exportKind:M,targetFlags:de.flags,isFromPackageJson:J,symbol:Ae,moduleSymbol:G})},get:(b,v)=>b!==c?void 0:r.get(v)?.map(f),search:(b,v,T,W)=>{if(b===c)return bc(r,(F,M)=>{let{symbolName:J,ambientModuleName:A}=y(M),V=v&&F[0].capitalizedSymbolName||J;if(T(V,F[0].targetFlags)){let ye=F.map(f).filter((he,ce)=>_(he,F[ce].packageName));if(ye.length){let he=W(ye,V,!!A,M);if(he!==void 0)return he}}})},releaseSymbols:()=>{i.clear()},onFileChanged:(b,v,T)=>g(b)&&g(v)?!1:c&&c!==v.path||!S(b,v)?(u.clear(),!0):(c=v.path,!1)};return E.isDebugging&&Object.defineProperty(u,"__cache",{value:r}),u;function f(b){if(b.symbol&&b.moduleSymbol)return b;let{id:v,exportKind:T,targetFlags:W,isFromPackageJson:F,moduleFileName:M}=b,[J,A]=i.get(v)||Re;if(J&&A)return{symbol:J,moduleSymbol:A,moduleFileName:M,exportKind:T,targetFlags:W,isFromPackageJson:F};let V=(F?e.getPackageJsonAutoImportProvider():e.getCurrentProgram()).getTypeChecker(),ue=b.moduleSymbol||A||E.checkDefined(b.moduleFile?V.getMergedSymbol(b.moduleFile.symbol):void 0),ye=b.symbol||J||E.checkDefined(T===2?V.resolveExternalModuleSymbol(ue):(void 0)`Could not find symbol '${b.symbolName}' by key '${b.symbolTableKey}' in module ${ue.name}`);return i.set(v,[ye,ue]),{symbol:ye,moduleSymbol:ue,moduleFileName:M,exportKind:T,targetFlags:W,isFromPackageJson:F}}function m(b,v,T,W){let F=T||"";return`${b.length} ${so(cd(v,W))} ${b} ${F}`}function y(b){let v=b.indexOf(" "),T=b.indexOf(" ",v+1),W=parseInt(b.substring(0,v),10),F=b.substring(T+1),M=F.substring(0,W),J=F.substring(W+1);return{symbolName:M,ambientModuleName:J===""?void 0:J}}function g(b){return!1}function S(b,v){if(!pu(b.ambientModuleNames,v.ambientModuleNames))return!1;let T=-1,W=-1;return!0}function _(b,v){if(!v||!b.moduleFileName)return!0;let T=e.getGlobalTypingsCacheLocation();if(T&&Eo(b.moduleFileName,T))return!0;let W=a.get(v);return!W||Eo(b.moduleFileName,W)}}function age(e,n){let r=n.resolveExternalModuleSymbol(e);if(r!==e)return{symbol:r,exportKind:2}}function sge(e,n){return!n.isUndefinedSymbol(e)&&!n.isUnknownSymbol(e)&&!Eh(e)}function aL(e){return!!e.sourceFile}function C$(e,n,r){return PB(e,n,r)}function PB(e,n="",r,i){let a=new Map,c=na(!!e);function u(){let W=oo(a.keys()).filter(F=>F&&F.charAt(0)==="_").map(F=>{let M=a.get(F),J=[];return M.forEach((A,V)=>{aL(A)?J.push({name:V,scriptKind:A.sourceFile.scriptKind,refCount:A.languageServiceRefCount}):A.forEach((ue,ye)=>J.push({name:V,scriptKind:ye,refCount:ue.languageServiceRefCount}))}),J.sort((A,V)=>V.refCount-A.refCount),{bucket:F,sourceFiles:J}});return JSON.stringify(W,void 0,2)}function f(W){return W&&typeof W.getCompilationSettings=="function"?W.getCompilationSettings():W}function m(W,F,M,J,A,V){let ue=Aa(W,n,c),ye=sL(f(F));return y(W,ue,F,ye,M,J,A,V)}function y(W,F,M,J,A,V,ue,ye){return b(W,F,M,J,A,V,!0,ue,ye)}function g(W,F,M,J,A,V){let ue=Aa(W,n,c),ye=sL(f(F));return S(W,ue,F,ye,M,J,A,V)}function S(W,F,M,J,A,V,ue,ye){return b(W,F,f(M),J,A,V,!1,ue,ye)}function _(W,F){let M=aL(W)?W:W.get(E.checkDefined(F,"If there are more than one scriptKind's for same document the scriptKind should be provided"));return E.assert(F===void 0||!M||M.sourceFile.scriptKind===F,`Script kind should match provided ScriptKind:${F} and sourceFile.scriptKind: ${M?.sourceFile.scriptKind}, !entry: ${!M}`),M}function b(W,F,M,J,A,V,ue,ye,he){ye=PF(W,ye);let ce=f(M),Ee=M===ce?void 0:M,Fe=1,be=ce?.driverType,de=typeof he=="object"?he:{languageVersion:Fe,impliedNodeFormat:1,setExternalModuleIndicator:()=>!0,jsDocParsingMode:r,globalIncludes:ce?.globalIncludeFiles??Re,fileHandler:Ph({readFile:Ee.readFile,getCurrentDirectory:Ee.getCurrentDirectory,getIncludeDirs:()=>ce?.libIncludeDirs??Re,fileExists:Ee.fileExists,getCompilerOptions:()=>ce})};de.languageVersion=Fe,E.assertEqual(r,de.jsDocParsingMode);let Ae=a.size,G=EB(J,de.impliedNodeFormat),Qe=LT(a,G,()=>new Map);if(In){a.size>Ae&&In.instant(In.Phase.Session,"createdDocumentRegistryBucket",{configFilePath:ce.configFilePath,key:G});let tt=!Jg(F)&&bc(a,(Pe,gn)=>gn!==G&&Pe.has(F)&&gn);tt&&In.instant(In.Phase.Session,"documentRegistryBucketOverlap",{path:F,key1:tt,key2:G})}let me=Qe.get(F),Se=me&&_(me,ye);if(!Se&&i){let tt=i.getDocument(G,F);tt&&tt.scriptKind===ye&&tt.text===Fm(A)&&(E.assert(ue),Se={sourceFile:tt,languageServiceRefCount:0},_n())}if(Se)Se.sourceFile.version!==V&&(Se.sourceFile=NB(Se.sourceFile,de.globalIncludes,de.configDefines,de.fileHandler,A,V,A.getChangeRange(Se.sourceFile.scriptSnapshot),be,de.reportParsedDefines),i&&i.setDocument(G,F,Se.sourceFile)),ue&&Se.languageServiceRefCount++;else{let tt=cL(W,A,de,V,!1,be,ye);i&&i.setDocument(G,F,tt),Se={sourceFile:tt,languageServiceRefCount:1},_n()}return E.assert(Se.languageServiceRefCount!==0),Se.sourceFile;function _n(){if(!me)Qe.set(F,Se);else if(aL(me)){let tt=new Map;tt.set(me.sourceFile.scriptKind,me),tt.set(ye,Se),Qe.set(F,tt)}else me.set(ye,Se)}}function v(W,F,M,J){let A=Aa(W,n,c),V=sL(F);return T(A,V,M,J)}function T(W,F,M,J=1){let A=E.checkDefined(a.get(EB(F,J))),V=A.get(W),ue=_(V,M);ue.languageServiceRefCount--,E.assert(ue.languageServiceRefCount>=0),ue.languageServiceRefCount===0&&(aL(V)?A.delete(W):(V.delete(M),V.size===1&&A.set(W,_D(V.values(),Ci))))}return{acquireDocument:m,acquireDocumentWithKey:y,updateDocument:g,updateDocumentWithKey:S,releaseDocument:v,releaseDocumentWithKey:T,getKeyForCompilationSettings:sL,getDocumentRegistryBucketKeyWithMode:EB,reportStats:u,getBuckets:()=>a}}function sL(e){return"default"}function EB(e,n){return e}var cge=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/;function E$(e){let n=na(e.useCaseSensitiveFileNames()),r=e.getCurrentDirectory(),i=new Map,a=new Map;return{tryGetSourcePosition:f,tryGetGeneratedPosition:m,toLineColumnOffset:_,clearCache:b,documentPositionMappers:a};function c(v){return Aa(v,r,n)}function u(v,T){let W=c(v),F=a.get(W);if(F)return F;let M;if(e.getDocumentPositionMapper)M=e.getDocumentPositionMapper(v,T);else if(e.readFile){let J=S(v);M=J&&P$({getSourceFileLike:S,getCanonicalFileName:n,log:A=>e.log(A)},v,OI(J.text,yc(J)),A=>!e.fileExists||e.fileExists(A)?e.readFile(A):void 0)}return a.set(W,M||u2),M||u2}function f(v){if(!v.fileName||!Jg(v.fileName)||!y(v.fileName))return;let W=u(v.fileName).getSourcePosition(v);return!W||W===v?void 0:f(W)||W}function m(v){if(Jg(v.fileName))return;let T=y(v.fileName);if(!T)return;let W=e.getProgram();if(W.isSourceOfProjectReferenceRedirect(T.fileName))return;let M=W.getCompilerOptions().outFile,J=M?bu(M)+".h":lq(v.fileName,W.getCompilerOptions(),W);if(J===void 0)return;let A=u(J,v.fileName).getGeneratedPosition(v);return A===v?void 0:A}function y(v){let T=e.getProgram();if(!T)return;let W=c(v),F=T.getSourceFileByPath(W);return F&&F.resolvedPath===W?F:void 0}function g(v){let T=c(v),W=i.get(T);if(W!==void 0)return W||void 0;if(!e.readFile||e.fileExists&&!e.fileExists(v)){i.set(T,!1);return}let F=e.readFile(v),M=F?lge(F):!1;return i.set(T,M),M||void 0}function S(v){return e.getSourceFileLike?e.getSourceFileLike(v):y(v)||g(v)}function _(v,T){return S(v).getLineAndCharacterOfPosition(T)}function b(){i.clear(),a.clear()}}function P$(e,n,r,i){let a=fz(r);if(a){let f=cge.exec(a);if(f){if(f[1]){let m=f[1];return D$(e,cq(ho,m),n)}a=void 0}}let c=[];a&&c.push(a),c.push(n+".map");let u=a&&Di(a,ei(n));for(let f of c){let m=Di(f,ei(n)),y=i(m,u);if(gi(y))return D$(e,y,m);if(y!==void 0)return y||void 0}}function D$(e,n,r){let i=pz(n);if(!(!i||!i.sources||!i.file||!i.mappings)&&!(i.sourcesContent&&i.sourcesContent.some(gi)))return mz(e,i,r)}function lge(e,n){return{text:e,fileName:void 0,lineMap:n,getLineAndCharacterOfPosition(r){return xg(yc(this),r)}}}function N$(e,n,r,i){return{spans:uge(e,r,i,n),endOfLineState:0}}function uge(e,n,r,i){let a=[],c=(u,f,m)=>{a.push(u.getStart(n),u.getWidth(n),(f+1<<8)+m)};if(e&&n){dge(e,n,r,c,i);for(let u of n.inactiveCodeRanges)yO(r,u.pos,u.end-u.pos)&&a.push(u.pos,u.end-u.pos,3328)}return a}function dge(e,n,r,i,a){let c=e.getTypeChecker();c.runWithCurrentFile(n,()=>{f(n)});function u(m){return Vr(m)||!xh(m)}function f(m){switch(m.kind){case 170:case 169:case 274:case 270:case 271:a.throwIfCancellationRequested()}if(!(!m||!u(m)||!yO(r,m.pos,m.getFullWidth())||m.getFullWidth()===0)){if(Sn(m)&&!gge(m)&&!HF(m.text)){let y=c.getSymbolAtLocation(m);if(y){y.flags&2097152&&(y=c.getAliasedSymbol(y));let g=fge(y,kS(m));if(g!==void 0){let S=0;m.parent&&(To(m.parent)||F$.get(m.parent.kind)===g)&&m.parent.name===m&&(S=1),g===6&&v$(m)&&(g=9),g=pge(c,m,g);let _=y.valueDeclaration;if(_){let b=ih(_),v=rm(_);b&256&&(S|=2),g!==0&&g!==2&&(b&8192||y.getFlags()&8)&&(S|=8),(g===7||g===10)&&mge(_,n)&&(S|=32),e.isSourceFileDefaultLibrary(_.getSourceFile())&&(S|=16)}else y.declarations&&y.declarations.some(b=>e.isSourceFileDefaultLibrary(b.getSourceFile()))&&(S|=16);i(m,g,S)}}}No(m,f)}}}function fge(e,n){let r=e.getFlags();if(r&32)return 0;if(r&384)return 1;if(r&524288)return 5;if(r&64){if(n&2)return 2}else if(r&262144)return 4;let i=e.valueDeclaration||e.declarations&&e.declarations[0];return i&&To(i)&&(i=k$(i)),i&&F$.get(i.kind)}function pge(e,n,r){if(r===7||r===9||r===6){let i=e.getTypeAtLocation(n);if(i){let a=c=>c(i)||i.isUnion()&&i.types.some(c);if(r!==6&&a(c=>c.getConstructSignatures().length>0))return 0;if(a(c=>c.getCallSignatures().length>0)&&!a(c=>c.getProperties().length>0)||yge(n))return r===9?11:10}}return r}function mge(e,n){return To(e)&&(e=k$(e)),xo(e)?!Vr(e.parent.parent.parent):Is(e)?!Vr(e.parent)&&e.getSourceFile()===n:!1}function k$(e){for(;;)if(To(e.parent.parent))e=e.parent.parent;else return e.parent.parent}function gge(e){return!1}function yge(e){for(;v$(e);)e=e.parent;return ao(e.parent)&&e.parent.expression===e}function v$(e){return hl(e.parent)&&e.parent.right===e||Ti(e.parent)&&e.parent.name===e}var F$=new Map([[237,7],[149,6],[152,9],[170,0],[154,11],[169,10],[270,10],[156,11],[153,9],[239,5],[148,4],[174,9],[175,9]]);var Tge=new Map;function I$(e,n,r){n.getSemanticDiagnostics(e,r);let i=[],a=n.getTypeChecker();return Tge.clear(),c(e),Ro(i,e.bindSuggestionDiagnostics),Ro(i,n.getSuggestionDiagnostics(e,r)),i.sort((u,f)=>u.start-f.start);function c(u){Sge(u)&&void 0,u.forEachChild(c)}}function Sge(e){switch(e.kind){case 169:case 154:case 270:case 271:return!0;default:return!1}}var Yd=KT(1,!0,!0);function _ge(){return{getNodeConstructor:()=>aP,getTokenConstructor:()=>dL,getIdentifierConstructor:()=>uL,getSourceFileConstructor:()=>vB,getSymbolConstructor:()=>FB,getTypeConstructor:()=>IB,getSignatureConstructor:()=>LB}}var lL=class{constructor(n,r,i){this.pos=r,this.end=i,this.kind=n,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}getSourceFile(){return $t(this)}getStart(n,r){return mh(this,n,r)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(n){return this.getEnd()-this.getStart(n)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(n){return this.getStart(n)-this.pos}getFullText(n){return(n||this.getSourceFile()).text.substring(this.pos,this.end)}getText(n){return n||(n=this.getSourceFile(),E.assertIsDefined(n)),n.text.substring(this.getStart(n),this.getEnd())}getChildCount(){return this.getChildren().length}getChildAt(n){return this.getChildren()[n]}getChildren(){return this.kind===1?this.jsDoc||Re:Re}getFirstToken(){}getLastToken(){}forEachChild(){}},uL=class extends lL{constructor(n,r,i){super(n,r,i)}},dL=class extends lL{constructor(n,r,i){super(n,r,i)}};function L$(e,n,r,i){let a=fx(e)?new aP(e,n,r):e===89?new uL(89,n,r):new dL(e,n,r);return a.parent=i,a.flags=i.flags&34332768,a}var aP=class{constructor(n,r,i){this.pos=r,this.end=i,this.kind=n,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}assertHasRealPosition(n){E.assert(!ec(this.pos)&&!ec(this.end),n||"Node must have a real position for this operation")}getSourceFile(){return $t(this)}getStart(n,r){return this.assertHasRealPosition(),mh(this,n,r)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(n){return this.assertHasRealPosition(),this.getEnd()-this.getStart(n)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(n){return this.assertHasRealPosition(),this.getStart(n)-this.pos}getFullText(n){return this.assertHasRealPosition(),(n||this.getSourceFile()).text.substring(this.pos,this.end)}getText(n){return this.assertHasRealPosition(),n||(n=this.getSourceFile()),n.text.substring(this.getStart(n),this.getEnd())}getChildCount(n){return this.getChildren(n).length}getChildAt(n,r){return this.getChildren(r)[n]}getChildren(n=$t(this)){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),tI(this,n)??TV(this,n,xge(this,n))}getFirstToken(n){this.assertHasRealPosition();let r=this.getChildren(n);if(!r.length)return;let i=Sr(r,a=>a.kind<188||a.kind>231);return i.kind<146?i:i.getFirstToken(n)}getLastToken(n){this.assertHasRealPosition();let r=this.getChildren(n),i=Vo(r);if(i)return i.kind<146?i:i.getLastToken(n)}forEachChild(n,r){return No(this,n,r)}};function xge(e,n){let r=[];if(zv(e))return e.forEachChild(u=>{r.push(u)}),r;Yd.setText((n||e.getSourceFile()).text);let i=e.pos;E.assertIsDefined(i);let a=u=>{oP(r,i,u.pos,e,n.inactiveCodeRanges),r.push(u),i=u.end,E.assertIsDefined(i)},c=u=>{oP(r,i,u.pos,e,n.inactiveCodeRanges),mI(r,bge(u,e,n.inactiveCodeRanges)),i=u.end??0,E.assertIsDefined(i)};return Bn(e.jsDoc,a),i=e.pos,e.forEachChild(a,c),i>=0&&oP(r,i,e.end,e,n.inactiveCodeRanges),Yd.setText(void 0),r}var vB=class extends aP{constructor(n,r,i){super(n,r,i)}update(n,r){E.fail("not implemented")}getLineAndCharacterOfPosition(n){return ma(this,n)}getLineStarts(){return yc(this)}getPositionOfLineAndCharacter(n,r,i){return ND(yc(this),n,r,this.text,i)}getLineEndOfPosition(n){let{line:r}=this.getLineAndCharacterOfPosition(n),i=this.getLineStarts(),a;r+1>=i.length&&(a=this.getEnd()),a||(a=i[r+1]-1);let c=this.getFullText();return c[a]===`
67
+ `&&c[a-1]==="\r"?a-1:a}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let n=Js();return this.forEachChild(c),n;function r(u){let f=a(u);f&&n.add(f,u)}function i(u){let f=n.get(u);return f||n.set(u,f=[]),f}function a(u){let f=ID(u);return f&&(ps(f)&&Ti(f.expression)?f.expression.name.text:om(f)?vG(f):void 0)}function c(u){switch(u.kind){case 169:case 270:let f=u,m=a(f);if(m){let y=i(m),g=Vo(y);g&&f.parent===g.parent&&f.symbol===g.symbol?f.body&&!g.body&&(y[y.length-1]=f):y.push(f)}No(u,c);break;case 274:case 163:r(u),No(u,c);break;case 149:if(!xu(u,167))break;case 237:case 266:{let y=u;if(Po(y.name)){No(y.name,c);break}y.initializer&&c(y.initializer)}case 152:r(u);break;case 269:es(u)!==0&&r(u);default:No(u,c)}}}};function oP(e,n,r,i,a){let c=0;for(;c<a.length-1&&a[c].end<n;)c++;for(a.length==0&&(c=-1),Yd.resetTokenState(n,!0);n<r;){let u=Yd.scan(),f=Yd.getTokenEnd();if(u===179){for(u=Yd.scan();u!==1&&u!==4;)u=Yd.scan();n=Yd.getTokenEnd();continue}if(Kg(i)&&n>=i.range?.pos){n=i.range.end;continue}if(u===178?(u=Yd.scan(),u===29&&(u=Yd.reScanLessThanTokenAsStringLiteral()),f=Yd.getTokenEnd()):u===29&&kh(i)&&(u=Yd.reScanLessThanTokenAsStringLiteral(),f=Yd.getTokenEnd()),f<=r){for(;c>=0&&a[c].end<f&&c<a.length-1;)c++;if(c>=0&&f>=a[c].pos&&f<=a[c].end){if(u===1)break;continue}if(u===89){if(Oq(i))continue;console.warn(`Did not expect ${E.formatSyntaxKind(i.kind)} to have an Identifier in its trivia`);break}e.push(L$(u,n,f,i))}if(n=f,u===1)break}}function bge(e,n,r){let i=L$(232,e.pos,e.end,n),a=[],c=e.pos;for(let u of e)oP(a,c,u.pos,n,r),a.push(u),c=u.end;return oP(a,c,e.end,n,r),i._children=a,i}var FB=class{constructor(n,r){this.flags=n,this.name=r,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.lastAssignmentPos=void 0,this.links=void 0}getFlags(){return this.flags}getEscapedName(){return this.name}getName(){return this.name}getDeclarations(){return this.declarations}getDocumentationComment(n){return this.documentationComment||(this.documentationComment=Re,this.documentationComment=j$(this.declarations,n)),this.documentationComment}getContextualDocumentationComment(n,r){return this.getDocumentationComment(r)}getJsDocTags(n){return this.tags===void 0&&(this.tags=Re,this.tags=R$(this.declarations,n)),this.tags}getContextualJsDocTags(n,r){return this.getJsDocTags(r)}};function A$(e,n,r){let i=n.parent;if(!i)return;let a=!1;return Ns(cE(i),c=>{let u=e.getTypeAtLocation(c),f=a&&u.symbol?e.getTypeOfSymbol(u.symbol):u,m=e.getPropertyOfType(f,n.symbol.name);return m?r(m):void 0})}function w$(e){return cm(e).some(n=>n.tagName.text==="inheritDoc"||n.tagName.text==="inheritdoc")}function R$(e,n){if(!e)return Re;let r=Xd.getJsDocTagsFromDeclarations(e,n);if(n&&(r.length===0||e.some(w$))){let i=new Set;for(let a of e){let c=A$(n,a,u=>{if(!i.has(u))return i.add(u),u.declarations?.length===1?u.getJsDocTags(n):void 0});c&&(r=[...c,...r])}}return r}var IB=class{constructor(n,r){this.flags=r,this.checker=n}isClassOrInterface(){return!!(dt(this)&3)}isClass(){return!!(dt(this)&1)}getFlags(){return this.flags}getSymbol(){return this.symbol}getProperties(){return this.checker.getPropertiesOfType(this)}getProperty(n){return this.checker.getPropertyOfType(this,n)}getApparentProperties(){return this.checker.getAugmentedPropertiesOfType(this)}getCallSignatures(){return this.checker.getSignaturesOfType(this,0)}getConstructSignatures(){return this.checker.getSignaturesOfType(this,1)}getStringIndexType(){return this.checker.getIndexTypeOfType(this,0)}getNumberIndexType(){return this.checker.getIndexTypeOfType(this,1)}getBaseTypes(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0}isNullableType(){return this.checker.isNullableType(this)}getNonNullableType(){return this.checker.getNonNullableType(this)}getNonOptionalType(){return this.checker.getNonOptionalType(this)}getConstraint(){return this.checker.getBaseConstraintOfType(this)}getDefault(){return this.checker.getDefaultFromTypeParameter(this)}isUnion(){return!!(this.flags&1048576)}isUnionOrIntersection(){return!!(this.flags&3145728)}isLiteral(){return!!(this.flags&2432)}isStringLiteral(){return!!(this.flags&128)}isIntLiteral(){return!!(this.flags&256)}isFloatLiteral(){return!!(this.flags&2048)}isTypeParameter(){return!!(this.flags&262144)}isIndexType(){return!!(this.flags&4194304)}},LB=class{constructor(n,r){this.flags=r,this.checker=n}getDeclaration(){return this.declaration}getTypeParameters(){return this.typeParameters}getParameters(){return this.parameters}getReturnType(){return this.checker.getReturnTypeOfSignature(this)}getDocumentationComment(){return this.documentationComment||(this.documentationComment=j$(IT(this.declaration),this.checker))}getJsDocTags(){return this.jsDocTags||(this.jsDocTags=R$(IT(this.declaration),this.checker))}},Cge={isCancellationRequested:jl,throwIfCancellationRequested:Vi};function Dge(){return{libIncludeDirs:["/sys","/include"]}}function O$(e,n,r=C$(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory(),e.jsDocParsingMode),i){let a;i===void 0?a=0:typeof i=="boolean"?a=i?2:0:a=i;let c=new AB(e),u,f,m=0,y=Cge;function g(Hn){e.log&&e.log(Hn)}let S=e.getCurrentDirectory(),_=qx(e),b=na(_),v=E$({useCaseSensitiveFileNames:()=>_,getCurrentDirectory:()=>S,getProgram:F,fileExists:Ta(e,e.fileExists),readFile:Ta(e,e.readFile),getDocumentPositionMapper:Ta(e,e.getDocumentPositionMapper),getSourceFileLike:Ta(e,e.getSourceFileLike),log:g});return{getEncodedSemanticClassifications:Se,getDefinitionAtPosition:Ae,getQuickInfoAtPosition:_n,getSignatureHelpItems:me,cleanupSemanticCache:A,getCompilerOptionsDiagnostics:he,getProgram:F,getCurrentProgram:()=>u,getSuggestionDiagnostics:ye,getSyntacticDiagnostics:V,getSemanticDiagnostics:ue,getSourceMapper:()=>v,toLineColumnOffset:Ee,getNavigationTree:M,findReferences:ce,updateIsDefinitionOfReferencedSymbols:J,findRenameLocations:tt,getRenameInfo:Pe,getCompletionsAtPosition:Vt,getCompletionEntryDetails:Ln,getDocCommentTemplateAtPosition:$e,dispose:W};function W(){A(),e=void 0}function F(){if(a===2){E.assert(u===void 0);return}return Fe(),u}function M(Hn){return yL.getNavigationTree(c.getCurrentSourceFile(Hn),y)}function J(Hn,Ye){let se=u.getTypeChecker(),jn=wn();if(!jn)return!1;for(let ft of Hn)for(let Ft of ft.references){let Et=Xn(Ft);if(E.assertIsDefined(Et),Ye.has(Ft)||Xl.isDeclarationOfSymbol(Et,jn)){Ye.add(Ft),Ft.isDefinition=!0;let At=$E(Ft,v,Ta(e,e.fileExists));At&&Ye.add(At)}else Ft.isDefinition=!1}return!0;function wn(){for(let ft of Hn)for(let Ft of ft.references){if(Ye.has(Ft)){let At=Xn(Ft);return E.assertIsDefined(At),se.getSymbolAtLocation(At)}let Et=$E(Ft,v,Ta(e,e.fileExists));if(Et&&Ye.has(Et)){let At=Xn(Et);if(At)return se.getSymbolAtLocation(At)}}}function Xn(ft){let Ft=u.getSourceFile(ft.fileName);if(!Ft)return;let Et=$l(Ft,ft.textSpan.start);return Xl.Core.getAdjustedNode(Et,{use:Xl.FindReferencesUse.References})}}function A(){if(u){let Hn=r.getKeyForCompilationSettings(u.getCompilerOptions());Bn(u.getSourceFiles(),Ye=>r.releaseDocumentWithKey(Ye.resolvedPath,Hn,Ye.scriptKind,Ye.impliedNodeFormat)),u=void 0}}function V(Hn){return Fe(),u.getSyntacticDiagnostics(de(Hn),y).slice()}function ue(Hn){Fe();let Ye=de(Hn),se=u.getSemanticDiagnostics(Ye,y),jn=u.getDeclarationDiagnostics(Ye,y);return[...se,...jn]}function ye(Hn){return Fe(),I$(de(Hn),u,y)}function he(){return Fe(),[...u.getOptionsDiagnostics(y),...u.getGlobalDiagnostics(y)]}function ce(Hn,Ye){return Fe(),Xl.findReferencedSymbols(u,y,u.getSourceFiles(),de(Hn),Ye)}function Ee(Hn,Ye){return Ye===0?{line:0,character:0}:v.toLineColumnOffset(Hn,Ye)}function Fe(){e.updateFromProject&&!e.updateFromProjectInProgress?e.updateFromProject():be()}function be(){if(E.assert(a!==2),e.getProjectVersion){let fe=e.getProjectVersion();if(fe){if(f===fe)return;f=fe}}let Hn=e.getScriptFileNames().slice(),Ye=e.getCompilationSettings()||Dge(),se=e.hasInvalidatedResolutions||jl,jn=Ta(e,e.hasInvalidatedLibResolutions)||jl,wn=Ta(e,e.hasChangedAutomaticTypeDirectiveNames),Xn=e.getProjectReferences?.(),ft,Ft=qx(e),Et=na(Ft),At=r.getKeyForCompilationSettings(Ye),xn=new Set,It=e.getCurrentDirectory(),pr={getSourceFile:Zn,getSourceFileByPath:Z,getSourceTextFromSnapshot:Je,getCancellationToken:()=>y,getCanonicalFileName:Et,useCaseSensitiveFileNames:()=>!0,getNewLine:()=>Nf(Ye),getDefaultLibFileName:fe=>e.getDefaultLibFileName(fe),writeFile:Vi,getCurrentDirectory:()=>It,fileExists:fe=>e.fileExists(fe),readFile:fe=>e.readFile&&e.readFile(fe),realpath:Ta(e,e.realpath),directoryExists:fe=>Ox(fe,e),getDirectories:fe=>e.getDirectories?e.getDirectories(fe):[],readDirectory:(fe,Ce,ne,sn,H)=>(E.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(fe,Ce,ne,sn,H)),onReleaseOldSourceFile:Oe,onReleaseParsedCommandLine:Ie,onAllFilesNeedReparse:xi,hasInvalidatedResolutions:se,hasInvalidatedLibResolutions:jn,trace:Ta(e,e.trace),resolveModuleNames:Ta(e,e.resolveModuleNames),getModuleResolutionCache:Ta(e,e.getModuleResolutionCache),createHash:Ta(e,e.createHash),resolveModuleNameLiterals:Ta(e,e.resolveModuleNameLiterals),resolveLibrary:Ta(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:Ta(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:zt,jsDocParsingMode:e.jsDocParsingMode};e.setCompilerHost?.(pr);let tn={useCaseSensitiveFileNames:Ft,fileExists:fe=>pr.fileExists(fe),readFile:fe=>pr.readFile(fe),directoryExists:fe=>pr.directoryExists(fe),getDirectories:fe=>pr.getDirectories(fe),realpath:pr.realpath,readDirectory:(...fe)=>pr.readDirectory(...fe),trace:pr.trace,getCurrentDirectory:pr.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:Vi};if(yG(u,Hn,Ye,(fe,Ce)=>e.getScriptVersion(Ce),fe=>pr.fileExists(fe),se,jn,wn,zt,Xn)){pr=void 0,ft=void 0,xn=void 0;return}u=q2({rootNames:Hn,options:Ye,host:pr,oldProgram:u,projectReferences:Xn}),pr=void 0,ft=void 0,xn=void 0,v.clearCache(),u.getRootFileNames().length&&u.getTypeChecker();return;function Zn(fe,Ce,ne,sn){return Z(fe,Aa(fe,It,Et),Ce,ne,sn)}function zt(fe){let Ce=Aa(fe,It,Et),ne=ft?.get(Ce);if(ne!==void 0)return ne||void 0;let sn=e.getParsedCommandLine?e.getParsedCommandLine(fe):Yt(fe);return(ft||(ft=new Map)).set(Ce,sn||!1),sn}function Yt(fe){let Ce=Zn(fe,3);if(Ce)return Ce.path=Aa(fe,It,Et),Ce.resolvedPath=Ce.path,Ce.originalFileName=Ce.fileName,sH(Ce,tn,Di(ei(fe),It),void 0,Di(fe,It))}function Cr(fe,Ce){let ne=r.getKeyForCompilationSettings(Ce);r.releaseDocumentWithKey(fe.resolvedPath,ne,fe.scriptKind,1)}function xi(fe){e.onAllFilesNeedReparse&&e.onAllFilesNeedReparse(fe)}function Ie(fe,Ce,ne){e.getParsedCommandLine?e.onReleaseParsedCommandLine?.(fe,Ce,ne):Ce&&Oe(Ce.sourceFile,ne)}function Oe(fe,Ce,ne,sn){Cr(fe,Ce),ne&&e.onReleaseOldSourceFile?.(fe,Ce,ne,sn)}function Je(fe){let Ce=e.getScriptSnapshot(fe);if(Ce)return Fm(Ce)}function Z(fe,Ce,ne,sn,H){E.assert(pr,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");let ge=e.getScriptSnapshot(fe);if(!ge)return;let qn=aB(fe,e),kn=e.getScriptVersion(fe);if(!H){let On=u&&u.getSourceFileByPath(Ce);if(On){if(qn===On.scriptKind||xn.has(On.resolvedPath))return r.updateDocumentWithKey(fe,Ce,e,At,ge,kn,qn,ne);r.releaseDocumentWithKey(On.resolvedPath,r.getKeyForCompilationSettings(u.getCompilerOptions()),On.scriptKind,On.impliedNodeFormat),xn.add(On.resolvedPath)}}return r.acquireDocumentWithKey(fe,Ce,e,At,ge,kn,qn,ne)}}function de(Hn){let Ye=u.getSourceFile(Hn);if(!Ye){let se=new Error(`Could not find source file: '${Hn}'.`);throw se.ProgramFiles=u.getSourceFiles().map(jn=>jn.fileName),se}return Ye}function Ae(Hn,Ye,se,jn){return Fe(),Db.getDefinitionAtPosition(u,de(Hn),Ye,se,jn)}function G(Hn){return Hn.parent&&Em(Hn.parent)&&Hn.pos===Hn.parent.pos?Hn.parent.expression:Hn}function Qe(Hn,Ye,se){switch(Ye.kind){case 89:return!0;case 286:case 146:return!Xg(Hn,se);case 71:return!0;default:return!1}}function me(Hn,Ye,{triggerReason:se}=Qg){Fe();let jn=de(Hn);return Bh.getSignatureHelpItems(u,jn,Ye,se,y)}function Se(Hn,Ye){return Fe(),N$(u,y,de(Hn),Ye)}function _n(Hn,Ye){Fe();let se=de(Hn),jn=$l(se,Ye);if(jn===se)return;let wn=u.getTypeChecker(),Xn=G(jn),ft=Ege(Xn,wn);if(!ft||wn.isUnknownSymbol(ft)&&Xn){let It=Xn&&Qe(se,Xn,Ye)?wn.getTypeAtLocation(Xn):void 0;return It&&{kind:"",kindModifiers:"",textSpan:md(Xn,se),displayParts:wn.runWithCancellationToken(y,pr=>VE(pr,It,NS(Xn))),documentation:It.symbol?It.symbol.getDocumentationComment(wn):void 0,tags:It.symbol?It.symbol.getJsDocTags(wn):void 0}}let{symbolKind:Ft,displayParts:Et,documentation:At,tags:xn}=wn.runWithCancellationToken(y,It=>Xc.getSymbolDisplayPartsDocumentationAndSymbolKind(It,ft,se,NS(Xn),Xn));return{kind:Ft,kindModifiers:Xc.getSymbolModifiers(wn,ft),textSpan:md(Xn,se),displayParts:Et,documentation:At,tags:xn}}function tt(Hn,Ye,se,jn,wn){Fe();let Xn=de(Hn),ft=xb($l(Xn,Ye));if(!sP.nodeIsEligibleForRename(ft))return;let Ft=FS(Xn,wn??Qg),Et=typeof wn=="boolean"?wn:wn?.providePrefixAndSuffixTextForRename;return gn(ft,Ye,{findInStrings:se,findInComments:jn,providePrefixAndSuffixTextForRename:Et,use:Xl.FindReferencesUse.Rename},(At,xn,It)=>Xl.toRenameLocation(At,xn,It,Et||!1,Ft))}function Pe(Hn,Ye,se){return Fe(),sP.getRenameInfo(u,de(Hn),Ye,se||{})}function gn(Hn,Ye,se,jn){Fe();let wn=se&&se.use===Xl.FindReferencesUse.Rename?u.getSourceFiles().filter(Xn=>!u.isSourceFileDefaultLibrary(Xn)):u.getSourceFiles();return Xl.findReferenceOrRenameEntries(u,y,wn,Hn,Ye,se,jn)}function $e(Hn,Ye,se,jn){let wn=jn?Hs.getFormatContext(jn,e).options:void 0;return Xd.getDocCommentTemplateAtPosition(Mh(e,wn),c.getCurrentSourceFile(Hn),Ye,se)}function Ln(Hn,Ye,se,jn,wn,Xn=Qg,ft){return Fe(),Zg.getCompletionEntryDetails(u,g,de(Hn),Ye,{name:se,source:wn,data:ft},e,jn&&Hs.getFormatContext(jn,e),Xn,y)}function Vt(Hn,Ye,se=Qg,jn){let wn={...se,includeCompletionsForModuleExports:se.includeCompletionsForModuleExports||se.includeExternalModuleExports,includeCompletionsWithInsertText:se.includeCompletionsWithInsertText||se.includeInsertTextCompletions};return Fe(),Zg.getCompletionsAtPosition(e,u,g,de(Hn),Ye,wn,se.triggerCharacter,se.triggerKind,y,jn&&Hs.getFormatContext(jn,e),se.includeSymbol)}}k9(_ge());function M$(e,n,r){e.version=r,e.scriptSnapshot=n}function cL(e,n,r,i,a,c,u){let f=rb(e,Fm(n),r,a,u,c);return M$(f,n,i),f}function NB(e,n,r,i,a,c,u,f,m,y){if(u&&c!==e.version){let S,_=u.span.start!==0?e.text.substr(0,u.span.start):"",b=rd(u.span)!==e.text.length?e.text.substr(rd(u.span)):"";if(u.newLength===0)S=_&&b?_+b:_||b;else{let T=a.getText(u.span.start,u.span.start+u.newLength);S=_&&b?_+T+b:_?_+T:T+b}let v=vV(e,S,n,r,i,u,y,f);return M$(v,a,c),v.nameTable=void 0,e!==v&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),v}let g={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator,jsDocParsingMode:e.jsDocParsingMode,globalIncludes:n,fileHandler:i,reportParsedDefines:m,configDefines:r};return cL(e.fileName,a,g,c,!0,f,e.scriptKind)}function Ege(e,n){if(e.flags&64){let i=e.getSourceFile()?.nodeMacroMap.get(e);return i&&n.resolveName(i,e.parent,268435456,!1)}return n.getSymbolAtLocation(e)}var fL=class{constructor(n,r=20){this.hostCancellationToken=n;this.throttleWaitMilliseconds=r;this.lastCancellationCheckTime=0}isCancellationRequested(){let n=Ki();return Math.abs(n-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds?(this.lastCancellationCheckTime=n,this.hostCancellationToken.isCancellationRequested()):!1}throwIfCancellationRequested(){if(this.isCancellationRequested())throw In?.instant(In.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new Sg}};function mL(e){return e?Yn(e,n=>n.text).join(""):""}function B$(e){return{indentSize:2,tabSize:2,newLineCharacter:e||`
68
+ `,convertTabsToSpaces:!0,indentStyle:2,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:"ignore",trimTrailingWhitespace:!0,indentSwitchCase:!0}}var AB=class{constructor(n){this.host=n}getCurrentSourceFile(n){let r=this.host.getScriptSnapshot(n);if(!r)throw new Error("Could not find file: '"+n+"'.");let i=this.host.getCompilationSettings(),a=aB(n,this.host),c=this.host.getScriptVersion(n),u=this.host.getCompilationSettings()?.driverType,f=i?.globalIncludeFiles||Re,m,y={languageVersion:1,impliedNodeFormat:mG(Aa(n,this.host.getCurrentDirectory(),this.host.getCompilerHost?.()?.getCanonicalFileName||uq(this.host)),this.host.getCompilerHost?.()?.getModuleResolutionCache?.()?.getPackageJsonInfoCache(),this.host,i),setExternalModuleIndicator:dq(this.host.getCompilationSettings()),jsDocParsingMode:0,globalIncludes:f,fileHandler:Ph({fileExists:g=>ho.fileExists(g),readFile:g=>ho.readFile(g),getCurrentDirectory:()=>ho.getCurrentDirectory(),getIncludeDirs:()=>this.host.getIncludeDirs(),getCompilerOptions:()=>this.host.getCompilationSettings()})};if(this.currentFileName!==n)m=cL(n,r,y,c,!0,u,a);else if(this.currentFileVersion!==c){let g=r.getChangeRange(this.currentFileScriptSnapshot);m=NB(this.currentSourceFile,y.globalIncludes,y.configDefines,y.fileHandler,r,c,g,u,!1)}return m&&(this.currentFileVersion=c,this.currentFileName=n,this.currentFileScriptSnapshot=r,this.currentSourceFile=m),this.currentSourceFile}};function gL(e){return e.nameTable||Pge(e),e.nameTable}function Pge(e){let n=e.nameTable=new Map;e.forEachChild(function r(i){if(Sn(i)&&!JG(i)&&i.text||Bc(i)&&Nge(i)){let a=BF(i);n.set(a,n.get(a)===void 0?i.pos:-1)}if(No(i,r),nc(i))for(let a of i.jsDoc)No(a,r)})}function Nge(e){return ql(e)||sE(e)}function Yl(e,n,r){return Sr(e.getChildren(r),i=>i.kind===n)}function kge(e,n){return e.kind===1?!!e.jsDoc:e.getWidth(n)!==0}function rP(e,n,r){return i(n);function i(a){return VT(a)&&a.pos===e.end?a:Ns(a.getChildren(r),c=>(c.pos<=e.pos&&c.end>e.end||c.pos===e.end)&&kge(c,r)?i(c):void 0)}}function j$(e,n){if(!e)return Re;let r=Xd.getJsDocCommentsFromDeclarations(e,n);if(n&&(r.length===0||e.some(w$))){let i=new Set;for(let a of e){let c=A$(n,a,u=>{if(!i.has(u))return i.add(u),u.getDocumentationComment(n)});c&&(r=r.length===0?c.slice():c.concat(Oh(),r))}}return r}var Zg={};cl(Zg,{CompletionKind:()=>WB,CompletionSource:()=>z$,SortText:()=>Wa,StringCompletions:()=>Pb,SymbolOriginInfoKind:()=>G$,createCompletionDetails:()=>Eb,createCompletionDetailsForSymbol:()=>DL,getCompletionEntriesFromSymbols:()=>CL,getCompletionEntryDetails:()=>nye,getCompletionEntrySymbol:()=>rye,getCompletionsAtPosition:()=>Mge,getPropertiesForObjectExpression:()=>aQ,moduleSpecifierResolutionCacheAttemptLimit:()=>H$,moduleSpecifierResolutionLimit:()=>MB});var MB=100,H$=1e3,Wa={LocalDeclarationPriority:"10",LocationPriority:"11",OptionalMember:"12",MemberDeclaredBySpreadAssignment:"13",SuggestedClassMembers:"14",GlobalsOrKeywords:"15",AutoImportSuggestions:"16",ClassMemberSnippets:"17",JavascriptIdentifiers:"18",Deprecated(e){return"z"+e},ObjectLiteralProperty(e,n){return`${e}\0${n}\0`},SortBelow(e){return e+"1"}},z$=(u=>(u.ThisProperty="ThisProperty/",u.ClassMemberSnippet="ClassMemberSnippet/",u.TypeOnlyAlias="TypeOnlyAlias/",u.ObjectLiteralMethodSnippet="ObjectLiteralMethodSnippet/",u.SwitchCases="SwitchCases/",u.ObjectLiteralMemberWithComma="ObjectLiteralMemberWithComma/",u))(z$||{}),G$=(_=>(_[_.ThisType=1]="ThisType",_[_.SymbolMember=2]="SymbolMember",_[_.Export=4]="Export",_[_.Promise=8]="Promise",_[_.Nullable=16]="Nullable",_[_.ResolvedExport=32]="ResolvedExport",_[_.TypeOnlyAlias=64]="TypeOnlyAlias",_[_.ObjectLiteralMethod=128]="ObjectLiteralMethod",_[_.Ignore=256]="Ignore",_[_.ComputedPropertyName=512]="ComputedPropertyName",_[_.SymbolMemberNoExport=2]="SymbolMemberNoExport",_[_.SymbolMemberExport=6]="SymbolMemberExport",_))(G$||{});function vge(e){return!!(e.kind&1)}function Fge(e){return!!(e.kind&2)}function lP(e){return!!(e&&e.kind&4)}function IS(e){return!!(e&&e.kind===32)}function Ige(e){return lP(e)||IS(e)||BB(e)}function Lge(e){return(lP(e)||IS(e))&&!!e.isFromPackageJson}function Age(e){return!!(e.kind&8)}function wge(e){return!!(e.kind&16)}function $$(e){return!!(e&&e.kind&128)}function Rge(e){return!!(e&&e.kind&256)}function BB(e){return!!(e&&e.kind&512)}function Oge(e,n,r,i,a,c,u,f,m){let y=Ki(),g=u,S=!1,_=0,b=0,v=0,T=0,W=m({tryResolve:M,skippedAny:()=>S,resolvedAny:()=>b>0,resolvedBeyondLimit:()=>b>MB}),F=T?` (${(v/T*100).toFixed(1)}% hit rate)`:"";return n.log?.(`${e}: resolved ${b} module specifiers, plus ${_} ambient and ${v} from cache${F}`),n.log?.(`${e}: response is ${S?"incomplete":"complete"}`),n.log?.(`${e}: ${Ki()-y}`),W;function M(J,A){if(A){let he=r.getModuleSpecifierForBestExportInfo(J,a,f);return he&&_++,he||"failed"}let V=g||c.allowIncompleteCompletions&&b<MB,ue=!V&&c.allowIncompleteCompletions&&T<H$,ye=V||ue?r.getModuleSpecifierForBestExportInfo(J,a,f,ue):void 0;return(!V&&!ue||ue&&!ye)&&(S=!0),b+=ye?.computedWithoutCacheCount||0,v+=J.length-(ye?.computedWithoutCacheCount||0),ue&&T++,ye||(g?"failed":"skipped")}}function Mge(e,n,r,i,a,c,u,f,m,y,g=!1){let{previousToken:S}=EL(a,i);if(u&&!BG(i,a,S)&&!hp(i,a,S)&&!hye(i,u,S,a))return;if(u===" ")return c.includeCompletionsForImportStatements&&c.includeCompletionsWithInsertText?{isGlobalCompletion:!0,isMemberCompletion:!1,isNewIdentifierLocation:!0,isIncomplete:!0,entries:[]}:void 0;let _=n.getCompilerOptions(),b=n.getTypeChecker(),v=c.allowIncompleteCompletions?e.getIncompleteCompletionsCache?.():void 0;if(v&&f===3&&S&&Sn(S)){let F=Bge(v,i,S,n,e,c,m,a);if(F)return F}else v?.clear();let T=Pb.getStringLiteralCompletions(i,a,S,_,e,n,r,c,g);if(T)return T;if(S&&S.parent&&px(S.parent)&&(S.kind===106||S.kind===121||S.kind===89))return Zge(S.parent);let W=rQ(n,r,i,_,a,c,void 0,e,y,m);if(W)switch(W.kind){case 0:let F=Uge(i,e,n,_,r,W,c,y,a,g);return F?.isIncomplete&&v?.set(F),F;case 1:return wB([...Xd.getJSDocTagNameCompletions(),...J$(i,a,b,_,c,!0)]);case 2:return wB([...Xd.getJSDocTagCompletions(),...J$(i,a,b,_,c,!1)]);case 3:return wB(Xd.getJSDocParameterNameCompletions(W.tag));case 4:return Jge(W.keywordCompletions,W.isNewIdentifierLocation);default:return E.assertNever(W)}}function TL(e,n){let r=xD(e.sortText,n.sortText);return r===0&&(r=xD(e.name,n.name)),r===0&&e.data?.moduleSpecifier&&n.data?.moduleSpecifier&&(r=kq(e.data.moduleSpecifier,n.data.moduleSpecifier)),r===0?-1:r}function Q$(e){return!!e?.moduleSpecifier}function Bge(e,n,r,i,a,c,u,f){let m=e.get();if(!m)return;let y=$l(n,f),g=r.text.toLowerCase(),S=b$(n,a,i,c,u),_=Oge("continuePreviousIncompleteResponse",a,Nb.createImportSpecifierResolver(n,i,a,c),i,r.getStart(),c,!1,hF(r),b=>{let v=Ei(m.entries,T=>{if(!T.hasAction||!T.source||!T.data||Q$(T.data))return T;if(!Cye(T.name,g))return;let{origin:W}=E.checkDefined(iQ(T.name,T.data,i,a)),F=S.get(n.path,T.data.exportMapKey),M=F&&b.tryResolve(F,!Ul(zl(W.moduleSymbol.name)));if(M==="skipped")return T;if(!M||M==="failed"){a.log?.(`Unexpected failure resolving auto import for '${T.name}' from '${T.source}'`);return}let J={...W,kind:32,moduleSpecifier:M.moduleSpecifier};return T.data=nQ(J),T.source=JB(J),T.sourceDisplay=[ac(J.moduleSpecifier)],T});return b.skippedAny()||(m.isIncomplete=void 0),v});return m.entries=_,m.flags=(m.flags||0)|4,m.optionalReplacementSpan=Y$(y),m}function wB(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:e}}function J$(e,n,r,i,a,c){let u=Qd(e,n);if(!ah(u)&&!Oc(u))return[];let f=Oc(u)?u:u.parent;if(!Oc(f))return[];let m=f.parent;if(!Ji(m))return[];let y=!1,g=a.includeCompletionsWithSnippetText||void 0,S=Zf(f.tags,_=>hc(_)&&_.getEnd()<=n);return Ei(m.parameters,_=>{if(!yx(_).length){if(Sn(_.name)){let b={tabstop:1},v=_.name.text,T=cP(v,_.initializer,_.dotDotDotToken,y,!1,!1,r,i,a),W=g?cP(v,_.initializer,_.dotDotDotToken,y,!1,!0,r,i,a,b):void 0;return c&&(T=T.slice(1),W&&(W=W.slice(1))),{name:T,kind:"parameter",sortText:Wa.LocationPriority,insertText:g?W:void 0,isSnippet:g}}else if(_.parent.parameters.indexOf(_)===S){let b=`param${S}`,v=W$(b,_.name,_.initializer,_.dotDotDotToken,y,!1,r,i,a),T=g?W$(b,_.name,_.initializer,_.dotDotDotToken,y,!0,r,i,a):void 0,W=v.join(Nf(i)+"* "),F=T?.join(Nf(i)+"* ");return c&&(W=W.slice(1),F&&(F=F.slice(1))),{name:W,kind:"parameter",sortText:Wa.LocationPriority,insertText:g?F:void 0,isSnippet:g}}}})}function W$(e,n,r,i,a,c,u,f,m){if(!a)return[cP(e,r,i,a,!1,c,u,f,m,{tabstop:1})];return y(e,n,r,i,{tabstop:1});function y(S,_,b,v,T){return[cP(S,b,v,a,!1,c,u,f,m,T)]}function g(S,_,b){if(!_.propertyName&&Sn(_.name)||Sn(_.name)){let v=_.propertyName?uE(_.propertyName):_.name.text;if(!v)return;let T=`${S}.${v}`;return[cP(T,_.initializer,_.dotDotDotToken,a,!1,c,u,f,m,b)]}else if(_.propertyName){let v=uE(_.propertyName);return v&&y(`${S}.${v}`,_.name,_.initializer,_.dotDotDotToken,b)}}}function cP(e,n,r,i,a,c,u,f,m,y){if(c&&E.assertIsDefined(y),n&&(e=jge(e,n)),c&&(e=ZO(e)),i){let g="*";if(a)E.assert(!r,"Cannot annotate a rest parameter with type 'Object'."),g="Object";else{if(n){let b=u.getTypeAtLocation(n.parent);if(!(b.flags&16385)){let v=n.getSourceFile(),W=FS(v,m)===0?268435456:0,F=u.typeToTypeNode(b,er(n,Ji),W);if(F){let M=c?bL({removeComments:!0,module:f.module,target:f.target}):vm({removeComments:!0,module:f.module,target:f.target});gs(F,1),g=M.printNode(4,F,v)}}}c&&g==="*"&&(g=`\${${y.tabstop++}:${g}}`)}let S=!a&&r?"...":"",_=c?`\${${y.tabstop++}}`:"";return`@param {${S}${g}} ${e} ${_}`}else{let g=c?`\${${y.tabstop++}}`:"";return`@param ${e} ${g}`}}function jge(e,n){let r=n.getText().trim();return r.includes(`
69
+ `)||r.length>80?`[${e}]`:`[${e}=${r}]`}function Jge(e,n){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:n,entries:e.slice()}}function Wge(e,n,r){return{kind:4,keywordCompletions:cye(e,n),isNewIdentifierLocation:r}}function Y$(e){return e?.kind===89?md(e):void 0}function Uge(e,n,r,i,a,c,u,f,m,y){let{symbols:g,contextToken:S,completionKind:_,isInSnippetScope:b,isNewIdentifierLocation:v,location:T,propertyAccessToConvert:W,keywordFilters:F,symbolToOriginInfoMap:M,recommendedCompletion:J,isTypeOnlyLocation:A,isRightOfDotOrQuestionDot:V,importStatementCompletion:ue,insideJsDocTagTypeExpression:ye,symbolToSortTextMap:he,hasUnresolvedAutoImports:ce}=c,Ee=c.literals,Fe=r.getTypeChecker(),be=er(S,n2);if(be&&(FH(S)||Ux(S,be.expression))){let me=tP(Fe,be.parent.clauses);Ee=Ee.filter(Se=>!me.hasValue(Se))}let de=Z_(),Ae=X$(e,i);if(Ae&&!v&&(!g||g.length===0)&&F===0)return;let G=CL(g,de,void 0,S,T,m,e,n,r,Hl(i),a,_,u,i,f,A,W,ue,J,M,he,y);for(let me of dye(S,m))G.has(me.name)||(G.add(me.name),Xf(de,me,TL,void 0,!0));for(let me of Ee){let Se=Vge(e,u,me);G.add(Se.name),Xf(de,Se,TL,void 0,!0)}Ae||qge(e,T.pos,G,Hl(i),de);let Qe;if(u.includeCompletionsWithInsertText&&S&&!V&&(Qe=er(S,vH))){let me=Z$(Qe,e,u,i,n,r,f);me&&de.push(me.entry)}return{flags:c.flags,isGlobalCompletion:b,isIncomplete:u.allowIncompleteCompletions&&ce?!0:void 0,isMemberCompletion:Kge(_),isNewIdentifierLocation:v,optionalReplacementSpan:Y$(T),entries:de}}function X$(e,n){return!0}function Z$(e,n,r,i,a,c,u){let f=e.clauses,m=c.getTypeChecker(),y=m.getTypeAtLocation(e.parent.expression);if(y&&y.isUnion()&&yi(y.types,g=>g.isLiteral())){let g=tP(m,f),S=Hl(i),_=FS(n,r),b=[];for(let A of y.types)if(!g.hasValue(A.value))switch(typeof A.value){case"number":b.push(A.value<0?Ge.createPrefixUnaryExpression(42,Ge.createIntLiteral(-A.value)):Ge.createIntLiteral(A.value));break;case"string":b.push(Ge.createStringLiteral(A.value,_===0));break}if(b.length===0)return;let v=Yn(b,A=>Ge.createCaseClause(A,[])),T=Mh(a,u?.options),W=bL({removeComments:!0,module:i.module,newLine:Cb(T)}),F=u?A=>W.printAndFormatNode(4,A,n,u):A=>W.printNode(4,A,n),M=Yn(v,(A,V)=>r.includeCompletionsWithSnippetText?`${F(A)}$${V+1}`:`${F(A)}`).join(T);return{entry:{name:`${W.printNode(4,v[0],n)} ...`,kind:"",sortText:Wa.GlobalsOrKeywords,insertText:M,hasAction:void 0,source:"SwitchCases/",isSnippet:r.includeCompletionsWithSnippetText?!0:void 0}}}}function Kge(e){switch(e){case 0:case 3:case 2:return!0;default:return!1}}function qge(e,n,r,i,a){gL(e).forEach((c,u)=>{if(c===n)return;let f=u;!r.has(f)&&tm(f,i)&&(r.add(f),Xf(a,{name:f,kind:"warning",kindModifiers:"",sortText:Wa.JavascriptIdentifiers,isFromUncheckedFile:!0},TL))})}function jB(e,n,r){return gi(r)?TB(e,n,r):JSON.stringify(r)}function Vge(e,n,r){return{name:jB(e,n,r),kind:"string",kindModifiers:"",sortText:Wa.LocationPriority}}function Hge(e,n,r,i,a,c,u,f,m,y,g,S,_,b,v,T,W,F,M,J,A){let V,ue,ye=iL(r,c),he,ce,Ee=JB(S),Fe,be,de;E.assertIsDefined(y);let Ae=m.getTypeChecker(),G=S&&wge(S),Qe=S&&Fge(S)||g;if(S&&vge(S))V=g?`this${G?"?.":""}[${U$(u,F,y)}]`:`this${G?"?.":"."}${y}`;else if((Qe||G)&&b){V=Qe?g?`[${U$(u,F,y)}]`:`[${y}]`:y;let Se=Yl(b,24,u)||Yl(b,28,u);if(!Se)return;let _n=Eo(y,b.name.text)?b.name.end:Se.end;ye=Sc(Se.getStart(u),_n)}if(S&&Age(S)&&b){V===void 0&&(V=y);let Se=Vs(b.pos,u),_n="";Se&&gB(Se.end,Se.parent,u)&&(_n=";"),_n+=`(await ${b.expression.getText()})`,V=g?`${_n}${V}`:`${_n}${G?"?.":"."}${V}`;let tt=b.expression;ye=Sc(tt.getStart(u),b.end)}if(IS(S)&&(Fe=[ac(S.moduleSpecifier)]),S?.kind===64&&(be=!0),M===0&&i&&Vs(i.pos,u,i)?.kind!==27&&(cb(i.parent.parent)||ab(i.parent)||er(i.parent,dd)?.getLastToken(u)===i||ud(i.parent)&&ma(u,i.getEnd()).line!==ma(u,c).line)&&(Ee="ObjectLiteralMemberWithComma/",be=!0),F.includeCompletionsWithClassMemberSnippets&&F.includeCompletionsWithInsertText&&M===3&&zge(e,a,u)){let Se,_n=eQ(f,m,W,F,y,e,a,c,i,J);if(_n)({insertText:V,filterText:ue,isSnippet:ce}=_n),(Se?.hasFixes()||_n.eraseRange)&&(be=!0,Ee="ClassMemberSnippet/");else return}if(S&&$$(S)&&({insertText:V,isSnippet:ce,labelDetails:de}=S,F.useLabelDetailsInCompletionEntries||(y=y+de.detail,de=void 0),Ee="ObjectLiteralMethodSnippet/",n=Wa.SortBelow(n)),V!==void 0&&!F.includeCompletionsWithInsertText)return;(lP(S)||IS(S))&&(he=nQ(S),be=!v);let me=er(a,Eq);return{name:y,kind:Xc.getSymbolKind(Ae,e,a),kindModifiers:Xc.getSymbolModifiers(Ae,e),sortText:n,source:Ee,hasAction:be?!0:void 0,isRecommended:Xge(e,_,Ae)||void 0,insertText:V,filterText:ue,replacementSpan:ye,sourceDisplay:Fe,labelDetails:de,isSnippet:ce,isPackageJsonImport:Lge(S)||void 0,isImportStatementCompletion:!!v||void 0,data:he,...A?{symbol:e}:void 0}}function zge(e,n,r){if(wr(n))return!1;let i=106500;return!!(e.flags&i)&&(Sa(n)||n.parent&&n.parent.parent&&QT(n.parent)&&n===n.parent.name&&n.parent.getLastToken(r)===n.parent.name&&Sa(n.parent.parent)||n.parent&&TS(n)&&Sa(n.parent))}function eQ(e,n,r,i,a,c,u,f,m,y){if(!er(u,Sa))return;let S,_=a,b=a,v=n.getTypeChecker(),T=u.getSourceFile(),W=bL({removeComments:!0,module:r.module,omitTrailingSemicolon:!1,newLine:Cb(Mh(e,y?.options))}),F;if(i.includeCompletionsWithSnippetText){S=!0;let ue=Ge.createEmptyStatement();F=Ge.createBlock([ue],!0),NM(ue,{kind:0,order:0})}else F=Ge.createBlock([],!0);let M=0,{modifiers:J,range:A}=Gge(m,T,f),V=!1;return{insertText:_,filterText:b,isSnippet:S,eraseRange:A}}function Gge(e,n,r){if(!e||ma(n,r).line>ma(n,e.getEnd()).line)return{modifiers:0};let i=0,a,c={pos:r,end:r};if(Tl(e.parent)&&(a=$ge(e))){e.parent.modifiers&&(i|=EO(e.parent.modifiers)&67559,c.pos=Math.min(...e.parent.modifiers.map(f=>f.getStart(n))));let u=lh(a);i&u||(i|=u,c.pos=Math.min(c.pos,e.getStart(n))),e.parent.name!==e&&(c.end=e.parent.name.getStart(n))}return{modifiers:i,range:c.pos<c.end?c:void 0}}function $ge(e){if(sm(e))return e.kind;if(Sn(e)){let n=LD(e);if(n&&sh(n))return n}}function Qge(e,n,r,i,a,c){let u=e.getDeclarations();if(!(u&&u.length))return;let f=i.getTypeChecker(),m=u[0],y=rL(ci(m),!1),g=f.getWidenedType(f.getTypeOfSymbolAtLocation(e,n)),S=FS(r,c),_=33554432|(S===0?268435456:0);switch(m.kind){case 153:case 152:case 156:case 154:{let b=g.flags&1048576&&g.types.length<10?f.getUnionType(g.types,2):g;if(b.flags&1048576){let F=Ar(b.types,M=>f.getSignaturesOfType(M,0).length>0);if(F.length===1)b=F[0];else return}if(f.getSignaturesOfType(b,0).length!==1)return;let T=f.typeToTypeNode(b,n,_,Nb.getNoopSymbolTrackerWithResolver({program:i,host:a}));if(!T||!kg(T))return;let W;if(c.includeCompletionsWithSnippetText){let F=Ge.createEmptyStatement();W=Ge.createBlock([F],!0),NM(F,{kind:0,order:0})}else W=Ge.createBlock([],!0);return}default:return}}function bL(e){let n,r=Tp.createWriter(Nf(e)),i=vm(e,r),a={...r,write:_=>c(_,()=>r.write(_)),nonEscapingWrite:r.write,writeLiteral:_=>c(_,()=>r.writeLiteral(_)),writeStringLiteral:_=>c(_,()=>r.writeStringLiteral(_)),writeSymbol:(_,b)=>c(_,()=>r.writeSymbol(_,b)),writeParameter:_=>c(_,()=>r.writeParameter(_)),writeComment:_=>c(_,()=>r.writeComment(_)),writeProperty:_=>c(_,()=>r.writeProperty(_))};return{printSnippetList:u,printAndFormatSnippetList:m,printNode:y,printAndFormatNode:S};function c(_,b){let v=ZO(_);if(v!==_){let T=r.getTextPos();b();let W=r.getTextPos();n=$r(n||(n=[]),{newText:v,span:{start:T,length:W-T}})}else b()}function u(_,b,v){let T=f(_,b,v);return n?Tp.applyChanges(T,n):T}function f(_,b,v){return n=void 0,a.clear(),i.writeList(_,b,v,a),a.getText()}function m(_,b,v,T){let W={text:f(_,b,v),fileName:v.fileName,getLineAndCharacterOfPosition(A){return ma(this,A)}},F=nP(T,v),M=Oo(b,A=>{let V=Tp.assignPositionsToNode(A);return Hs.formatNodeGivenIndentation(V,W,v.languageVariant,0,0,{...T,options:F})}),J=n?xf(Zr(M,n),(A,V)=>V1(A.span,V.span)):M;return Tp.applyChanges(W.text,J)}function y(_,b,v){let T=g(_,b,v);return n?Tp.applyChanges(T,n):T}function g(_,b,v){return n=void 0,a.clear(),i.writeNode(_,b,v,a),a.getText()}function S(_,b,v,T){let W={text:g(_,b,v),fileName:v.fileName,getLineAndCharacterOfPosition(V){return ma(this,V)}},F=nP(T,v),M=Tp.assignPositionsToNode(b),J=Hs.formatNodeGivenIndentation(M,W,v.languageVariant,0,0,{...T,options:F}),A=n?xf(Zr(J,n),(V,ue)=>V1(V.span,ue.span)):J;return Tp.applyChanges(W.text,A)}}function nQ(e){let n=e.fileName?void 0:zl(e.moduleSymbol.name),r=e.isFromPackageJson?!0:void 0;return IS(e)?{exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,ambientModuleName:n,fileName:e.fileName,isPackageJsonImport:r}:{exportName:e.exportName,exportMapKey:e.exportMapKey,fileName:e.fileName,ambientModuleName:e.fileName?void 0:zl(e.moduleSymbol.name),isPackageJsonImport:e.isFromPackageJson?!0:void 0}}function Yge(e,n,r){let i=e.exportName==="default",a=!!e.isPackageJsonImport;return Q$(e)?{kind:32,exportName:e.exportName,exportMapKey:e.exportMapKey,moduleSpecifier:e.moduleSpecifier,symbolName:n,fileName:e.fileName,moduleSymbol:r,isDefaultExport:i,isFromPackageJson:a}:{kind:4,exportName:e.exportName,exportMapKey:e.exportMapKey,symbolName:n,fileName:e.fileName,moduleSymbol:r,isDefaultExport:i,isFromPackageJson:a}}function U$(e,n,r){return/^\d+$/.test(r)?r:TB(e,n,r)}function Xge(e,n,r){return e===n}function JB(e){if(lP(e))return zl(e.moduleSymbol.name);if(IS(e))return e.moduleSpecifier;if(e?.kind===1)return"ThisProperty/";if(e?.kind===64)return"TypeOnlyAlias/"}function CL(e,n,r,i,a,c,u,f,m,y,g,S,_,b,v,T,W,F,M,J,A,V=!1){let ue=Ki(),ye=xye(i,a),he=!0,ce=m.getTypeChecker(),Ee=new Map;for(let de=0;de<e.length;de++){let Ae=e[de],G=J?.[de],Qe=SL(Ae,y,G,S);if(!Qe||Ee.get(Qe.name)&&(!G||!$$(G))||S===1&&A&&!Fe(Ae,A)||!T&&wr(u)&&be(Ae))continue;let{name:me,needsConvertPropertyAccess:Se}=Qe,_n=A?.[so(Ae)]??Wa.LocationPriority,tt=bye(Ae,ce)?Wa.Deprecated(_n):_n,Pe=Hge(Ae,tt,r,i,a,c,u,f,m,me,Se,G,M,W,F,he,b,_,S,v,V);if(!Pe)continue;let gn=(!G||cQ(G))&&!(Ae.parent===void 0&&!Pn(Ae.declarations,$e=>$e.getSourceFile()===a.getSourceFile()));Ee.set(me,gn),Xf(n,Pe,TL,void 0,!0)}return g("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+(Ki()-ue)),{has:de=>Ee.has(de),add:de=>Ee.set(de,!0)};function Fe(de,Ae){let G=de.flags;if(!Vr(a)){if(Wo(ye,xo)&&de.valueDeclaration===ye)return!1;let Qe=de.valueDeclaration??de.declarations?.[0];if(ye&&Qe&&(Pu(ye)&&Pu(Qe)||_o(ye)&&_o(Qe))){let Se=Qe.pos,_n=_o(ye)?ye.parent.parameters:void 0;if(Se>=ye.pos&&_n&&Se<_n.end)return!1}let me=cd(de,ce);if(u.externalModuleIndicator&&Ae[so(de)]===Wa.GlobalsOrKeywords&&(Ae[so(me)]===Wa.AutoImportSuggestions||Ae[so(me)]===Wa.LocationPriority))return!1;if(G|=Lg(me),T)return sQ(de,ce)}return!!(G&268547007)}function be(de){let Ae=Lg(cd(de,ce));return!(Ae&268547007)&&(!wr(de.declarations?.[0])||!!(Ae&788968))}}function Zge(e){let n=eye(e);if(n.length)return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:n}}function eye(e){let n=[],r=new Map,i=e;for(;i&&!Ji(i);){if(PI(i)){let a=i.label.text;r.has(a)||(r.set(a,!0),n.push({name:a,kindModifiers:"",kind:"label",sortText:Wa.LocationPriority}))}i=i.parent}return n}function tQ(e,n,r,i,a,c,u){if(a.source==="SwitchCases/")return{type:"cases"};if(a.data){let M=iQ(a.name,a.data,e,c);if(M){let{contextToken:J,previousToken:A}=EL(i,r);return{type:"symbol",symbol:M.symbol,location:$l(r,i),previousToken:A,contextToken:J,isTypeOnlyLocation:!1,origin:M.origin}}}let f=e.getCompilerOptions(),m=rQ(e,n,r,f,i,{includeCompletionsForModuleExports:!0,includeCompletionsWithInsertText:!0},a,c,void 0);if(!m)return{type:"none"};if(m.kind!==0)return{type:"request",request:m};let{symbols:y,literals:g,location:S,completionKind:_,symbolToOriginInfoMap:b,contextToken:v,previousToken:T,isTypeOnlyLocation:W}=m,F=Sr(g,M=>jB(r,u,M)===a.name);return F!==void 0?{type:"literal",literal:F}:Ns(y,(M,J)=>{let A=b[J],V=SL(M,Hl(f),A,_);return V&&V.name===a.name&&(a.source==="ClassMemberSnippet/"&&M.flags&106500||a.source==="ObjectLiteralMethodSnippet/"&&M.flags&8196||JB(A)===a.source||a.source==="ObjectLiteralMemberWithComma/")?{type:"symbol",symbol:M,location:S,origin:A,contextToken:v,previousToken:T,isTypeOnlyLocation:W}:void 0})||{type:"none"}}function nye(e,n,r,i,a,c,u,f,m){let y=e.getTypeChecker(),g=e.getCompilerOptions(),{name:S,source:_,data:b}=a,{previousToken:v,contextToken:T}=EL(i,r);if(hp(r,i,v))return Pb.getStringLiteralCompletionDetails(S,r,i,v,e,c,m,f);let W=tQ(e,n,r,i,a,c,f);switch(W.type){case"request":{let{request:F}=W;switch(F.kind){case 1:return Xd.getJSDocTagNameCompletionDetails(S);case 2:return Xd.getJSDocTagCompletionDetails(S);case 3:return Xd.getJSDocParameterNameCompletionDetails(S);case 4:return Pn(F.keywordCompletions,M=>M.name===S)?RB(S,"keyword",5):void 0;default:return E.assertNever(F)}}case"symbol":{let{symbol:F,location:M,contextToken:J,origin:A,previousToken:V}=W,{codeActions:ue,sourceDisplay:ye}=tye(S,M,J,A,F,e,c,g,r,i,V,u,f,b,_,m),he=BB(A)?A.symbolName:F.name;return DL(F,he,y,r,M,m,ue,ye)}case"literal":{let{literal:F}=W;return RB(jB(r,f,F),"string",typeof F=="string"?8:7)}case"cases":{let F=Z$(T.parent,r,f,e.getCompilerOptions(),c,e,void 0);return{name:S,kind:"",kindModifiers:"",displayParts:[],sourceDisplay:void 0}}case"none":return oQ().some(F=>F.name===S)?RB(S,"keyword",5):void 0;default:E.assertNever(W)}}function RB(e,n,r){return Eb(e,"",n,[Ts(e,r)])}function DL(e,n,r,i,a,c,u,f){let{displayParts:m,documentation:y,symbolKind:g,tags:S}=r.runWithCancellationToken(c,_=>Xc.getSymbolDisplayPartsDocumentationAndSymbolKind(_,e,i,a,a,7));return Eb(n,Xc.getSymbolModifiers(r,e),g,m,y,S,u,f)}function Eb(e,n,r,i,a,c,u,f){return{name:e,kindModifiers:n,kind:r,displayParts:i,documentation:a,tags:c,codeActions:u,source:f,sourceDisplay:f}}function tye(e,n,r,i,a,c,u,f,m,y,g,S,_,b,v,T){if(v==="ClassMemberSnippet/"){let{eraseRange:W}=eQ(u,c,f,_,e,a,n,y,r,S)}if(cQ(i),v==="ObjectLiteralMemberWithComma/"&&r){let W=Tp.ChangeTracker.with({host:u,formatContext:S,preferences:_},F=>F.insertText(m,r.end,","));if(W)return{sourceDisplay:void 0,codeActions:[{changes:W,description:zG([N.Add_missing_comma_for_object_member_completion_0,e])}]}}if(!i||!(lP(i)||IS(i)))return{codeActions:void 0,sourceDisplay:void 0}}function rye(e,n,r,i,a,c,u){let f=tQ(e,n,r,i,a,c,u);return f.type==="symbol"?f.symbol:void 0}var WB=(u=>(u[u.ObjectPropertyDeclaration=0]="ObjectPropertyDeclaration",u[u.Global=1]="Global",u[u.PropertyAccess=2]="PropertyAccess",u[u.MemberLike=3]="MemberLike",u[u.String=4]="String",u[u.None=5]="None",u))(WB||{});function iye(e,n,r){return Ns(n&&(n.isUnion()?n.types:[n]),i=>{let a=i&&i.symbol;return a&&a.flags&424?UB(a,e,r):void 0})}function oye(e,n,r,i){let{parent:a}=e;switch(e.kind){case 89:return ZE(e,i);case 74:switch(a.kind){case 237:return i.getContextualType(a.initializer);case 269:return i.getTypeAtLocation(a.left);default:return}case 145:return i.getContextualType(a);case 113:let c=Wo(a,n2);return c?fB(c,i):void 0;default:let u=Bh.getArgumentInfoForCompletions(e,n,r,i);return u?i.getContextualTypeForArgumentAtIndex(u.invocation,u.argumentIndex):tL(e.kind)&&br(a)&&tL(a.operatorToken.kind)?i.getTypeAtLocation(a.left):i.getContextualType(e,4)||i.getContextualType(e)}}function UB(e,n,r){let i=r.getAccessibleSymbolChain(e,n,-1,!1);return i?Uo(i):e.parent&&(aye(e.parent)?e:UB(e.parent,n,r))}function aye(e){return!1}function rQ(e,n,r,i,a,c,u,f,m,y){let g=e.getTypeChecker(),S=X$(r,i),_=Ki(),b=Qd(r,a);n("getCompletionData: Get current token: "+(Ki()-_)),_=Ki();let v=Xg(r,a,b);n("getCompletionData: Is inside comment: "+(Ki()-_));let T=!1,W=!1,F=!1;if(v){if(a$(r,a)){if(r.text.charCodeAt(a-1)===64)return{kind:1};{let et=Ql(a,r);if(!/[^*|\s(/)]/.test(r.text.substring(et,a)))return{kind:2}}}let Ve=fye(b,a);if(Ve){if(Ve.tagName&&Ve.tagName.pos<=a&&a<=Ve.tagName.end)return{kind:1};if(kH(Ve))W=!0;else{let et=wn(Ve);if(et&&(b=Qd(r,a),(!b||!ql(b)&&(b.parent.kind!==227||b.parent.name!==b))&&(T=mo(et))),!T&&hc(Ve)&&(Da(Ve.name)||Ve.name.pos<=a&&a<=Ve.name.end))return{kind:3,tag:Ve}}}if(!T&&!W){n("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.");return}}_=Ki();let M=!T&&!W&&!1,J=EL(a,r),A=J.previousToken,V=J.contextToken;n("getCompletionData: Get previous token: "+(Ki()-_));let ue=b,ye,he=!1,ce=!1,Ee,Fe=$l(r,a),be=0,de=!1,Ae=0;if(V){let Ve=V.parent;if(V.kind===24||V.kind===28||V.kind===40)switch(he=V.kind===24||V.kind===40,ce=V.kind===28,Ve.kind){case 286:ye=Ve,ue=ye.expression;let et=Dq(ye);if(Da(et)||(ao(ue)||Ji(ue))&&ue.end===V.pos&&ue.getChildCount(r)&&ta(ue.getChildren(r)).kind!==21)return;break;case 146:ue=Ve.left;break;default:return}else Ee||Ve&&Ve.kind===286&&(V=Ve,Ve=Ve.parent)}let G=Ki(),Qe=5,me=!1,Se=[],_n,tt=[],Pe=[],gn=new Map,$e=Zn(),Ln=Qy(Ve=>SB(Ve?f.getPackageJsonAutoImportProvider():e,f));if(he||ce)ft();else{Xn();let Ve=!_c(Fe)&&Fe?.parent?.parent&&Vr(Fe.parent.parent);if(Ve||!xn())return be=Ve?1:5,be?Wge(be,M,de):void 0}n("getCompletionData: Semantic work: "+(Ki()-G));let Vt=A&&oye(A,a,r,g),Ye=!Wo(A,_u)?Ei(Vt&&(Vt.isUnion()?Vt.types:[Vt]),Ve=>Ve.isLiteral()&&!(Ve.flags&1024)?Ve.value:void 0):[],se=A&&Vt&&iye(A,Vt,g);return{kind:0,symbols:Se,completionKind:Qe,isInSnippetScope:F,propertyAccessToConvert:ye,isNewIdentifierLocation:de,location:Fe,keywordFilters:be,literals:Ye,symbolToOriginInfoMap:tt,recommendedCompletion:se,previousToken:A,contextToken:V,insideJsDocTagTypeExpression:T,symbolToSortTextMap:Pe,isTypeOnlyLocation:$e,isRightOfDotOrQuestionDot:he||ce,importStatementCompletion:Ee,hasUnresolvedAutoImports:me,flags:Ae};function jn(Ve){switch(Ve.kind){case 220:case 227:case 221:case 223:case 225:case 229:case 230:return!0;case 224:return!!Ve.constraint;default:return!1}}function wn(Ve){if(jn(Ve)){let et=wc(Ve)?Ve.constraint:Ve.typeExpression;return et&&et.kind===188?et:void 0}}function Xn(){let Ve=$t(ue);Vr(Ve)&&Ve.statements&&Bn(Ve.statements,et=>{Kg(et)&&mI(Se,g.getSymbolAtLocation(et))})}function ft(){Qe=2;let Ve=!1,et=hm(ue.parent);if(oh(ue)||Ve||Ti(ue)){let Q=g.getSymbolAtLocation(ue);Q&&(Q=cd(Q,g))}if(!et||SE(ue)){let Le;if(!oh(ue)&&F9(ue)?Le=g.getTypeOfPropertyAccessExpr(ue.parent):(g.tryGetThisTypeAt(ue,!1),Le=g.getTypeAtLocation(ue).getNonOptionalType()),et)Ft(Le.getNonNullableType(),!1,!1);else{let Q=!1;if(Le.isNullableType()){let ie=he&&!ce&&c.includeAutomaticOptionalChainCompletions!==!1;(ie||ce)&&(Le=Le.getNonNullableType(),ie&&(Q=!0))}Ft(Le,!!(ue.flags&65536),Q)}}}function Ft(Ve,et,Le){de=!!Ve.getStringIndexType(),ce&&Pn(Ve.getCallSignatures())&&(de=!0);let Q=ue.parent;if(S)for(let ie of Ve.getApparentProperties())!(ie.flags&8388608)&&g.isValidPropertyAccessForCompletions(Q,Ve,ie)&&At(ie,!1,Le);else Se.push(...Ar(OB(Ve,g),ie=>g.isValidPropertyAccessForCompletions(Q,Ve,ie)))}function Et(Ve){return Sn(Ve)?Ve:Ti(Ve)?Et(Ve.expression):void 0}function At(Ve,et,Le){let Q=Ns(Ve.declarations,q=>Wo(ci(q),ps));if(Q){let q=Et(Q.expression),qe=q&&g.getSymbolAtLocation(q),dn=qe&&UB(qe,V,g),Jn=dn&&so(dn);if(Jn&&Sm(gn,Jn)){let ke=Se.length;Se.push(dn);let We=dn.parent;console.debug("todo - completions - property from module");let ln=void 0,{moduleSpecifier:zn}=(_n||(_n=Nb.createImportSpecifierResolver(r,e,f,c))).getModuleSpecifierForBestExportInfo([{exportKind:0,moduleFileName:ln,isFromPackageJson:!1,moduleSymbol:We,symbol:dn,targetFlags:cd(dn,g).flags}],a,hF(Fe))||{};if(zn){let St={kind:te(6),moduleSymbol:We,isDefaultExport:!1,symbolName:dn.name,exportName:dn.name,fileName:ln,moduleSpecifier:zn};tt[ke]=St}}else if(c.includeCompletionsWithInsertText){if(Jn&&gn.has(Jn))return;Te(Ve),ie(Ve),Se.push(Ve)}}else Te(Ve),ie(Ve),Se.push(Ve);function ie(q){Sye(q)&&(Pe[so(q)]=Wa.LocalDeclarationPriority)}function Te(q){c.includeCompletionsWithInsertText&&(et&&Sm(gn,so(q))?tt[Se.length]={kind:te(8)}:Le&&(tt[Se.length]={kind:16}))}function te(q){return Le?q|16:q}}function xn(){return(Ce()||ne()||It()||sn()||(pr(),1))===1}function It(){return Ee?(de=!0,1):0}function pr(){be=ge(V)?5:1,Qe=1,de=Z(),A!==V&&E.assert(!!A,"Expected 'contextToken' to be defined when different from 'previousToken'.");let Ve=A!==V?A.getStart():a,et=Oe(V,Ve,r)||r;F=ot(et);let Le=($e?0:111551)|788968|1920|2097152,Q=A&&!hF(A);Se=Zr(Se,g.getSymbolsInScope(et,Le)),E.assertEachIsDefined(Se,"getSymbolsInScope() should all be defined");for(let ie=0;ie<Se.length;ie++){let Te=Se[ie];!g.isArgumentsSymbol(Te)&&!Pn(Te.declarations,te=>te.getSourceFile()===r)&&(Pe[so(Te)]=Wa.GlobalsOrKeywords)}c.includeCompletionsWithInsertText&&(et.kind,176),$e&&(be=V&&RD(V.parent)?6:7)}function tn(){return!1}function ot(Ve){switch(Ve.kind){case 176:case 236:return!0;default:return im(Ve)}}function Zn(){return T||W||!zt(V)&&(Fe.parent&&hm(Fe)||Yt(V))}function zt(Ve){return!1}function Yt(Ve){if(Ve){let et=Ve.parent.kind;switch(Ve.kind){case 61:return et===152||et===153||et===149||et===237||th(et);case 74:return et===148;case 29:return et===166}}return!1}function Cr(Ve,et){let Le=so(Ve);Pe[Le]!==Wa.GlobalsOrKeywords&&(tt[Se.length]=et,Pe[Le]=Ee?Wa.LocationPriority:Wa.AutoImportSuggestions,Se.push(Ve))}function xi(Ve,et){wr(Fe)||Ve.forEach(Le=>{if(!Ie(Le))return;let Q=SL(Le,Hl(i),void 0,0);if(!Q)return;let{name:ie}=Q,Te=Eye(Le,ie,et,e,f,i,c,m);if(!Te)return;let te={kind:128,...Te};Ae|=32,tt[Se.length]=te,Se.push(Le)})}function Ie(Ve){return!!(Ve.flags&8196)}function Oe(Ve,et,Le){let Q=Ve;for(;Q&&!f$(Q,et,Le);)Q=Q.parent;return Q}function Je(Ve){let et=Ki(),Le=fe(Ve)||kn(Ve)||nn(Ve);return n("getCompletionsAtPosition: isCompletionListBlocker: "+(Ki()-et)),Le}function Z(){if(V){let Ve=V.parent.kind,et=hL(V);switch(et){case 27:return Ve===272||Ve===276||Ve===290||Ve===269||Ve===293;case 20:return Ve===272||Ve===276||Ve===289||Ve===165;case 22:return Ve===290||Ve===150||Ve===147;case 24:return!1;case 17:return!1;case 74:return Ve===237||Ve===269;case 40:return Ve===286||Ve===272;case 43:return Ve===169}if(xL(et))return!0}return!1}function fe(Ve){return Zv(Ve)&&(Tb(Ve,a)||a===Ve.end&&!!Ve.isUnterminated)}function Ce(){let Ve=gye(V);if(!Ve)return 0;let Le=!1||Ve,Q=void 0;if(!Q)return 0;let ie=g.getTypeFromTypeNode(Le),Te=OB(Q,g),te=OB(ie,g),q=new Set;return te.forEach(qe=>q.add(qe.name)),Se=Zr(Se,Ar(Te,qe=>!q.has(qe.name))),Qe=0,de=!0,1}function ne(){if(V?.kind===25)return 0;let Ve=Se.length,et=sye(V,a,r);if(!et)return 0;Qe=0;let Le,Q;if(et.kind===293){let ie=_ye(et,g);if(ie===void 0)return 0;let Te=g.getContextualType(et,4),te=(Te||ie).getStringIndexType(),q=(Te||ie).getNumberIndexType();if(de=!!te||!!q,Le=aQ(ie,Te,et,g),Q=et.properties,Le.length===0&&!q)return 0}if(Le&&Le.length>0){let ie=Gt(Le,E.checkDefined(Q));Se=Zr(Se,ie),Rr(),et.kind===293&&c.includeCompletionsWithObjectLiteralMethodSnippets&&c.includeCompletionsWithInsertText&&(zo(Ve),xi(ie,et))}return 1}function sn(){let Ve=r;if(!Ve||!V)return 0;if(Qe=3,de=!0,be=V.kind===43?0:Sa(Ve)?2:3,!Vr(Ve))return 1;let et=V.kind===26?V.parent.parent:V.parent;if(!et)return 0;let Le=QT(et)?Df(et):0;if(V.kind===89&&!mo(V))switch(V.getText()){case"private":Le=Le|2;break;case"static":Le=Le|256;break}if(!(Le&2)&&Ve.symbol){let Q=g.getSymbolAtLocation(Ve),ie=g.getTypeOfSymbol(Q),Te=g.resolveBaseTypesOfClass(ie),te=[...Te],q=new Set(Te);for(;te.length>0;){let Jn=te.pop();Jn&&g.resolveBaseTypesOfClass(Jn).forEach(We=>{q.has(We)||(te.push(We),q.add(We))})}let qe=ie.members?Object.values(ie.members):void 0,dn=Oo(oo(q.values()),Jn=>{let ke=Jn.declaredProperties,We=(Jn.symbol?.members&&oo(Jn.symbol?.members.values()))??Re;return Zr(ke??Re,We)});Se=Zr(Se,sa(dn,qe??Re,Le)),Bn(Se,(Jn,ke)=>{let We=Jn?.valueDeclaration;if(We&&QT(We)&&We.name&&ps(We.name)){let ln={kind:512,symbolName:g.symbolToString(Jn)};tt[ke]=ln}})}return 0}function H(Ve){return!!Ve.parent&&_o(Ve.parent)&&vh(Ve.parent.parent)&&(eF(Ve.kind)||ql(Ve))}function ge(Ve){if(Ve){let et,Le=er(Ve.parent,Q=>Sa(Q)?"quit":$c(Q)&&et===Q.body?!0:(et=Q,!1));return Le&&Le}}function qn(Ve,et){return r.getLineEndOfPosition(Ve.getEnd())<et}function kn(Ve){let et=Ve.parent,Le=et.kind;switch(Ve.kind){case 27:return Le===237||Dr(Ve)||Le===242||Le===265;case 24:return Le===265;case 61:return Le===266;case 22:return Le===265;case 20:return Le===255;case 17:return!1;case 29:return th(Le);case 125:return Le===152&&!Sa(et.parent);case 25:return Le===149||!!et.parent&&et.parent.kind===265;case 124:case 122:case 123:return Le===149&&!vh(et.parent);case 89:{if(er(Ve.parent,xo)&&qn(Ve,a))return!1;break}case 138:return!0;case 43:return Ji(Ve.parent)&&!Is(Ve.parent)}if(xL(hL(Ve))&&yye(Ve)||H(Ve)&&(!Sn(Ve)||eF(hL(Ve))||mo(Ve)))return!1;switch(hL(Ve)){case 138:case 122:case 123:case 124:case 125:return!0;case 119:return Tl(Ve.parent)}if(er(Ve.parent,Sa)&&Ve===A&&On(Ve,a))return!1;let ie=pm(Ve.parent,152);if(ie&&Ve!==A&&Sa(A.parent.parent)&&a<=A.end){if(On(Ve,A.end))return!1;if(Ve.kind!==74&&(Nq(ie)||gx(ie)))return!0}return ql(Ve)&&!ud(Ve.parent)&&!((Sa(Ve.parent)||Pu(Ve.parent))&&(Ve!==A||a>A.end))}function On(Ve,et){return Ve.kind!==74&&(Ve.kind===26||!Du(Ve.end,et,r))}function nn(Ve){if(Ve.kind===10){let et=Ve.getFullText();return et.charAt(et.length-1)==="."}return!1}function Dr(Ve){return Ve.parent.kind===238}function Gt(Ve,et){if(et.length===0)return Ve;let Le=new Set,Q=new Set;for(let Te of et){if(Te.kind!==174&&Te.kind!==175&&Te.kind!==266||mo(Te))continue;let te;if(To(Te)&&Te.propertyName)Te.propertyName.kind===89&&(te=Te.propertyName.text);else{let q=ci(Te);te=q&&Fg(q)?BF(q):void 0}te!==void 0&&Q.add(te)}let ie=Ve.filter(Te=>!Q.has(Te.name));return zi(Le,ie),ie}function Rr(){Se.forEach(Ve=>{if(Ve.flags&16777216){let et=so(Ve);Pe[et]=Pe[et]??Wa.OptionalMember}})}function zi(Ve,et){if(Ve.size!==0)for(let Le of et)Ve.has(Le.name)&&(Pe[so(Le)]=Wa.MemberDeclaredBySpreadAssignment)}function zo(Ve){for(let et=Ve;et<Se.length;et++){let Le=Se[et],Q=so(Le),ie=tt?.[et],Te=Hl(i),te=SL(Le,Te,ie,0);if(te){let q=Pe[Q]??Wa.LocationPriority,{name:qe}=te;Pe[Q]=Wa.ObjectLiteralProperty(q,qe)}}}function sa(Ve,et,Le){let Q=new Set;for(let ie of et){if(ie.kind!==152||mo(ie)||ap(ie,2)||sS(ie)!==!!(Le&256))continue;let Te=Rg(ie.name);Te&&Q.add(Te)}return Ve.filter(ie=>!Q.has(ie.name)&&!!ie.declarations&&!(Cu(ie)&2))}function mo(Ve){return Ve.getStart(r)<=a&&a<=Ve.getEnd()}}function sye(e,n,r){if(e){let{parent:i}=e;switch(e.kind){case 17:case 27:if(ms(i))return i;break;case 43:return cb(i)?Wo(i.parent,ms):void 0;case 119:return Wo(i.parent,ms);case 89:if(e.text==="async"&&ud(e.parent))return e.parent.parent;{if(ms(e.parent.parent)&&(ab(e.parent)||ud(e.parent)&&ma(r,e.getEnd()).line!==ma(r,n).line))return e.parent.parent;let c=er(i,dd);if(c?.getLastToken(r)===e&&ms(c.parent))return c.parent}break;default:if(i.parent?.parent&&cb(i.parent)&&ms(i.parent.parent))return i.parent.parent;if(ab(i)&&ms(i.parent))return i.parent;let a=er(i,dd);if(e.kind!==61&&a?.getLastToken(r)===e&&ms(a.parent))return a.parent}}}function EL(e,n){let r=Vs(e,n);return r&&e<=r.end&&(Dg(r)||Qc(r.kind))?{contextToken:Vs(r.getFullStart(),n,void 0),previousToken:r}:{contextToken:r,previousToken:r}}function iQ(e,n,r,i){let a=n.isPackageJsonImport?i.getPackageJsonAutoImportProvider():r,c=a.getTypeChecker(),u=n.fileName?c.getMergedSymbol(E.checkDefined(a.getSourceFile(n.fileName)).symbol):void 0;if(!u)return;let f=c.resolveExternalModuleSymbol(u);return f?(f=n.exportName==="default"&&Fx(f)||f,{symbol:f,origin:Yge(n,e,u)}):void 0}function SL(e,n,r,i){if(Rge(r))return;let a=Ige(r)?r.symbolName:e.name;if(a===void 0||e.flags&1536&&vF(a.charCodeAt(0))||Eh(e))return;let c={name:a,needsConvertPropertyAccess:!1};if(tm(a,n,2))return c;switch(i){case 3:return BB(r)?{name:r.symbolName,needsConvertPropertyAccess:!1}:void 0;case 0:return{name:JSON.stringify(a),needsConvertPropertyAccess:!1};case 2:case 1:return a.charCodeAt(0)===32?void 0:{name:a,needsConvertPropertyAccess:!0};case 5:case 4:return c;default:E.assertNever(i)}}var _L=[],oQ=gc(()=>{let e=[];for(let n=92;n<=145;n++){let r=Ai(n);120,r&&e.push({name:Ai(n),kind:"keyword",kindModifiers:"",sortText:Wa.GlobalsOrKeywords})}return e});function cye(e,n){if(!n)return K$(e);let r=e+8+1;return _L[r]||(_L[r]=K$(e).filter(i=>!lye(tp(i.name))))}function K$(e){return _L[e]||(_L[e]=oQ().filter(n=>{let r=tp(n.name);switch(e){case 0:return!1;case 1:return q$(r)||YE(r)&&r!==96;case 5:return q$(r);case 2:return xL(r);case 3:return uye(r);case 7:return YE(r);default:return E.fail("Unknown keyword filter")}}))}function lye(e){switch(e){case 97:case 92:case 93:case 140:case 101:case 99:case 104:case 122:case 123:case 124:case 94:case 102:return!0;default:return!1}}function uye(e){return!1}function xL(e){switch(e){case 119:return!0;default:return F5(e)}}function q$(e){return e===119||e===120||e===179||e===178||!eM(e)&&!xL(e)}function hL(e){return Sn(e)?LD(e)??0:e.kind}function dye(e,n){let r=[];if(e){let i=e.getSourceFile(),a=e.parent,c=i.getLineAndCharacterOfPosition(e.end).line,u=i.getLineAndCharacterOfPosition(n).line}return r}function fye(e,n){return er(e,r=>ah(r)&&bb(r,n)?!0:Oc(r)?"quit":!1)}function aQ(e,n,r,i){let a=n&&n!==e,c=a&&!(n.flags&3)?i.getUnionType([e,n]):e,u=pye(c,r,i);return a?Ar(u,f):u;function f(m){return gr(m.declarations)?Pn(m.declarations,y=>y.parent!==r):!0}}function pye(e,n,r){return e.isUnion()?r.getAllPossiblePropertiesOfTypes(Ar(e.types,i=>!(i.flags&402784188||r.isArrayLikeType(i)||r.isTypeInvalidDueToUnionDiscriminant(i,n)||r.typeHasCallOrConstructSignatures(i)||i.isClass()&&mye(i.getApparentProperties())))):e.getApparentProperties()}function mye(e){return Pn(e,n=>!!(Cu(n)&6))}function OB(e,n){return e.isUnion()?E.checkEachDefined(n.getAllPossiblePropertiesOfTypes(e.types),"getAllPossiblePropertiesOfTypes() should all be defined"):E.checkEachDefined(e.getApparentProperties(),"getApparentProperties() should all be defined")}function gye(e){if(!e)return;let n=e.parent;switch(e.kind){case 17:if(Bd(n))return n;break;case 26:case 27:case 89:if(n.kind===153&&Bd(n.parent))return n.parent;break}}function yye(e){return!1}function hye(e,n,r,i){switch(n){case".":case"@":return!0;case'"':case"'":case"`":return!!r&&d$(r)&&i===r.getStart(e)+1;case"<":return!!r&&r.kind===29&&(!br(r.parent)||Tye(r.parent));case"/":return!!r&&(_u(r)?!!lE(r):!1);case" ":return!!r&&DI(r)&&r.parent.kind===176;case">":return!!r&&Ti(r);default:return E.assertNever(n)}}function Tye({left:e}){return Da(e)}function Sye(e){return!!(e.valueDeclaration&&Df(e.valueDeclaration)&256&&Sa(e.valueDeclaration.parent))}function _ye(e,n){let r=n.getContextualType(e);if(r)return r;let i=Dh(e.parent);if(br(i)&&i.operatorToken.kind===74&&e===i.left)return n.getTypeAtLocation(i);if(Tc(i))return n.getContextualType(i)}function xye(e,n){if(!e)return;let r=er(e,a=>Ng(a)||V$(a)||Po(a)?"quit":_o(a)||Pu(a)),i=er(n,a=>Ng(a)||V$(a)||Po(a)?"quit":xo(a));return r||i}function V$(e){return e.parent&&zd(e.parent)&&(e.parent.body===e||e.kind===39)}function sQ(e,n,r=new Map){return i(e)||i(cd(e.exportSymbol||e,n));function i(a){return!!(a.flags&788968)||n.isUnknownSymbol(a)||!!(a.flags&1536)&&Sm(r,so(a))&&n.getExportsOfModule(a).some(c=>sQ(c,n,r))}}function bye(e,n){let r=cd(e,n).declarations;return!!gr(r)&&yi(r,zE)}function Cye(e,n){if(n.length===0)return!0;let r=!1,i,a=0,c=e.length;for(let u=0;u<c;u++){let f=e.charCodeAt(u),m=n.charCodeAt(a);if((f===m||f===Dye(m))&&(r||(r=i===void 0||97<=i&&i<=122&&65<=f&&f<=90||i===95&&f!==95),r&&a++,a===n.length))return!0;i=f}return!1}function Dye(e){return 97<=e&&e<=122?e-32:e}function cQ(e){return!!(e&&e.kind&64)}function Eye(e,n,r,i,a,c,u,f){let m=u.includeCompletionsWithSnippetText||void 0,y=n,g=r.getSourceFile(),S=Qge(e,r,g,i,a,u);if(!S)return;let _=bL({removeComments:!0,module:c.module,target:c.target,omitTrailingSemicolon:!1,newLine:Cb(Mh(a,f?.options))});f?y=_.printAndFormatSnippetList(80,Ge.createNodeArray([S],!0),g,f):y=_.printSnippetList(80,Ge.createNodeArray([S],!0),g);let b=vm({removeComments:!0,module:c.module,target:c.target,omitTrailingSemicolon:!0}),v=Ge.createMethodSignature(void 0,"",S.questionToken,void 0,S.parameters,S.type),T={detail:b.printNode(4,v,g)};return{isSnippet:m,insertText:y,labelDetails:T}}var Pb={};cl(Pb,{getStringLiteralCompletionDetails:()=>Iye,getStringLiteralCompletions:()=>Pye});function Pye(e,n,r,i,a,c,u,f,m){if(hp(e,n,r)){if(!r||!_u(r))return;let y=dQ(e,r,n,c,a,f);return kye(y,r,e,a,c,u,i,f,n,m)}}function Nye(e){return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:!0,entries:e.map(({name:a,kind:c,span:u,extension:f})=>({name:a,kind:c,kindModifiers:uQ(f),sortText:Wa.LocationPriority,replacementSpan:u}))}}function uQ(e){switch(e){case".c":return".c";case".h":return".h";case".lpc":return".lpc";case".json":return".json";case void 0:return"";default:return E.assertNever(e)}}function kye(e,n,r,i,a,c,u,f,m,y){if(e===void 0)return;let g=xB(n,m);switch(e.kind){case 0:return Nye(e.paths);case 1:{let S=Z_();return CL(e.symbols,S,n,n,r,m,r,i,a,1,c,4,f,u,void 0,void 0,void 0,void 0,void 0,void 0,void 0,y),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:e.hasIndexSignature,optionalReplacementSpan:g,entries:S}}case 2:{let S=Eo(ml(n),"'")?39:34,_=e.types.map(b=>({name:sp(b.value,S),kindModifiers:"",kind:"string",sortText:Wa.LocationPriority,replacementSpan:iL(n,m)}));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:e.isNewIdentifier,optionalReplacementSpan:g,entries:_}}default:return E.assertNever(e)}}function KB(e){switch(e.kind){case 165:return AF(e);case 289:return Dh(e);default:return e}}function dQ(e,n,r,i,a,c){let u=i.getTypeChecker(),f=KB(n.parent);switch(f.kind){case 257:{let v=KB(f.parent);return m(v)}case 174:return ms(f.parent)&&f.name===n?void 0:y()||y(0);case 281:{let{expression:v,argumentExpression:T}=f;return n===$o(T)?lQ(u.getTypeAtLocation(v)):void 0}case 272:case 276:let g=Bh.getArgumentInfoForCompletions(n,r,e,u);return g&&vye(g.invocation,n,g,u)||y(0);case 299:let S=tP(u,f.parent.clauses),_=y();return _?{kind:2,types:_.types.filter(v=>!S.hasValue(v.value)),isNewIdentifier:!1}:void 0;default:return y()||y(0)}function m(g){switch(g.kind){case 261:let{indexType:S,objectType:_}=g;return bb(S,r)?lQ(u.getTypeFromTypeNode(_)):void 0;case 157:{let b=m(KB(g.parent));if(!b)return;let v=Fye(g,f);return b.kind===1?{kind:1,symbols:b.symbols.filter(T=>!Gr(v,T.name)),hasIndexSignature:b.hasIndexSignature}:{kind:2,types:b.types.filter(T=>!Gr(v,T.value)),isNewIdentifier:!1}}default:return}}function y(g=4){let S=fQ(ZE(n,u,g));if(S.length)return{kind:2,types:S,isNewIdentifier:!1}}}function fQ(e,n=new Map){return e?(e=y$(e),e.isUnion()?Oo(e.types,r=>fQ(r,n)):e.isStringLiteral()&&!(e.flags&1024)&&Sm(n,e.value)?[e]:Re):Re}function lQ(e){return e&&{kind:1,symbols:Ar(e.getApparentProperties(),n=>!0),hasIndexSignature:g$(e)}}function vye(e,n,r,i){let a=!1,c=new Map,u=n,f=i.getCandidateSignaturesForStringLiteralCompletions(e,u),m=[];return gr(m)?{kind:2,types:m,isNewIdentifier:a}:void 0}function Fye(e,n){return Ei(e.types,r=>r!==n&&hu(r)&&ji(r.literal)?r.literal.text:void 0)}function Iye(e,n,r,i,a,c,u,f){if(!i||!_u(i))return;let m=dQ(n,i,r,a,c,f);return m&&Lye(e,i,m,n,a.getTypeChecker(),u)}function Lye(e,n,r,i,a,c){switch(r.kind){case 0:{let u=Sr(r.paths,f=>f.name===e);return u&&Eb(e,uQ(u.extension),u.kind,[ac(e)])}case 1:{let u=Sr(r.symbols,f=>f.name===e);return u&&DL(u,u.name,a,i,n,c)}case 2:return Sr(r.types,u=>u.value===e)?Eb(e,"","string",[ac(e)]):void 0;default:return E.assertNever(r)}}var Xl={};cl(Xl,{Core:()=>LS,DefinitionKind:()=>pQ,EntryKind:()=>mQ,ExportKind:()=>iP,FindReferencesUse:()=>SQ,ImportExport:()=>bB,createImportTracker:()=>oL,findModuleReferences:()=>CB,findReferenceOrRenameEntries:()=>Wye,findReferencedSymbols:()=>jye,getContextNode:()=>Jh,getImportOrExportSymbol:()=>ige,getTextSpanOfEntry:()=>qB,isContextWithStartAndEndNode:()=>PL,isDeclarationOfSymbol:()=>TQ,isWriteAccessForReference:()=>hQ,toContextSpan:()=>VB,toReferenceEntry:()=>gQ,toRenameLocation:()=>Uye});var pQ=(u=>(u[u.Symbol=0]="Symbol",u[u.Label=1]="Label",u[u.Keyword=2]="Keyword",u[u.This=3]="This",u[u.String=4]="String",u[u.TripleSlashReference=5]="TripleSlashReference",u))(pQ||{}),mQ=(c=>(c[c.Span=0]="Span",c[c.Node=1]="Node",c[c.StringLiteral=2]="StringLiteral",c[c.SearchedLocalFoundProperty=3]="SearchedLocalFoundProperty",c[c.SearchedPropertyFoundLocal=4]="SearchedPropertyFoundLocal",c))(mQ||{});function jh(e,n=1){return{kind:n,node:e.name||e,context:Aye(e)}}function PL(e){return e&&e.kind===void 0}function qB(e){return e.kind===0?e.textSpan:dP(e.node,e.node.getSourceFile())}function Jh(e){if(e)switch(e.kind){case 237:return!EI(e.parent)||e.parent.declarations.length!==1?e:ld(e.parent.parent)?e.parent.parent:bg(e.parent.parent)?Jh(e.parent.parent):e.parent;case 266:return Jh(e.parent.parent);case 269:return xE(e.parent)?e.parent:e;case 244:return{start:e.initializer,end:e.expression};case 174:case 175:return XI(e.parent)?Jh(er(e.parent,n=>br(n)||bg(n))):e;case 256:return{start:Sr(e.getChildren(e.getSourceFile()),n=>n.kind===117),end:e.caseBlock};default:return e}}function Aye(e){if(ad(e))return Jh(e);if(e.parent){if(!ad(e.parent)){if(px(e.parent))return e.parent;if(ji(e))return console.warn("TODO implement me - isStringLiteral import lookup"),e;let n=er(e,ps);return n?Jh(n.parent):void 0}if(e.parent.name===e)return Jh(e.parent)}}function dP(e,n,r){let i=e.getStart(n),a=(r||e).getEnd();return ji(e)&&a-i>2&&(E.assert(r===void 0),i+=1,a-=1),r?.kind===240&&(a=r.getFullStart()),Sc(i,a)}function VB(e,n,r){if(!r)return;let i=PL(r)?dP(r.start,n,r.end):dP(r,n);return i.start!==e.start||i.length!==e.length?{contextSpan:i}:void 0}function wye(e){return e.kind===114||!!aE(e)||sE(e)}function Rye(e,n){let r=gQ(e);return n?{...r,isDefinition:e.kind!==0&&TQ(e.node,n)}:r}function gQ(e){let n=yQ(e);if(e.kind===0)return{...n,isWriteAccess:!1};let{kind:r,node:i}=e;return{...n,isWriteAccess:hQ(i),isInString:r===2?!0:void 0}}function yQ(e){if(e.kind===0)return{textSpan:e.textSpan,fileName:e.fileName};{let n=e.node.getSourceFile(),r=dP(e.node,n);return{textSpan:r,fileName:n.fileName,...VB(r,n,e.context)}}}function hQ(e){let n=aE(e);return!!n&&Oye(n)||e.kind===114||Lx(e)}function Oye(e){if(e.flags&33554432)return!0;switch(e.kind){case 269:case 266:case 274:case 114:case 171:case 217:case 225:case 149:case 175:case 148:return!0;case 174:return!XI(e.parent);case 169:case 270:return!!e.body;case 237:case 152:return!!e.initializer;case 227:case 220:return!1;default:return E.failBadSyntaxKind(e)}}function TQ(e,n){if(!n)return!1;let r=aE(e)||(e.kind===114?e.parent:sE(e)?e.parent.parent:void 0),i=r&&br(r)?r.left:void 0;return!!(r&&n.declarations?.some(a=>a===r||a===i))}function uP(e){let n=e.getSourceFile();return{sourceFile:n,textSpan:dP(ps(e)?e.expression:e,n)}}function Mye(e,n,r){let i=LS.getIntersectingMeaningFromDeclarations(r,e),a=e.declarations&&ha(e.declarations)||r,{displayParts:c,symbolKind:u}=Xc.getSymbolDisplayPartsDocumentationAndSymbolKind(n,e,a.getSourceFile(),a,a,i);return{displayParts:c,kind:u}}function Bye(e,n,r){let i=(()=>{switch(e.type){case 0:{let{symbol:g}=e,{displayParts:S,kind:_}=Mye(g,n,r),b=S.map(W=>W.text).join(""),v=g.declarations&&ha(g.declarations),T=v?ci(v)||v:r;return{...uP(T),name:b,kind:_,displayParts:S,context:Jh(v)}}case 1:{let{node:g}=e;return{...uP(g),name:g.text,kind:"label",displayParts:[Ts(g.text,17)]}}case 2:{let{node:g}=e,S=Ai(g.kind);return{...uP(g),name:S,kind:"keyword",displayParts:[{text:S,kind:"keyword"}]}}case 3:{let{node:g}=e,S=n.getSymbolAtLocation(g),_=S&&Xc.getSymbolDisplayPartsDocumentationAndSymbolKind(n,S,g.getSourceFile(),NS(g),g).displayParts||[ac("this")];return{...uP(g),name:"this",kind:"var",displayParts:_}}case 4:{let{node:g}=e;return{...uP(g),name:g.text,kind:"var",displayParts:[Ts(ml(g),8)]}}default:return E.assertNever(e)}})(),{sourceFile:a,textSpan:c,name:u,kind:f,displayParts:m,context:y}=i;return{containerKind:"",containerName:"",fileName:a.fileName,kind:f,name:u,textSpan:c,displayParts:m,...VB(c,a,y)}}function jye(e,n,r,i,a){let c=$l(i,a),u={use:1},f=LS.getReferencedSymbolsForNode(a,c,e,r,n,u),m=e.getTypeChecker(),y=LS.getAdjustedNode(c,u),g=wye(y)?m.getSymbolAtLocation(y):void 0;return!f||!f.length?void 0:Ei(f,({definition:S,references:_})=>S&&{definition:m.runWithCancellationToken(n,b=>Bye(S,b,c)),references:_.map(b=>Rye(b,g))})}var SQ=(i=>(i[i.Other=0]="Other",i[i.References=1]="References",i[i.Rename=2]="Rename",i))(SQ||{}),LS;(xi=>{function e(Ie,Oe,Je,Z,fe,Ce={},ne=new Set(Z.map(sn=>sn.fileName))){if(Oe=n(Oe,Ce),Vr(Oe)){let nn=Db.getReferenceAtPosition(Oe,Ie,Je);if(!nn?.file)return;let Dr=Je.getTypeChecker().getMergedSymbol(nn.file.symbol);return Dr?m(Je,Dr,!1,Z,ne):(Je.getFileIncludeReasons(),void 0)}if(!Ce.implementations){let nn=g(Oe,Z,fe);if(nn)return nn}let sn=Je.getTypeChecker(),H=sn.getSymbolAtLocation(Oe);if(!H)return!Ce.implementations&&ji(Oe)?ft(Oe,Z,sn,fe):void 0;if(H.name==="export=")return m(Je,H.parent,!1,Z,ne);let ge=c(H,Je,Z,fe,Ce,ne);if(ge&&!(H.flags&33554432))return ge;let qn=void 0,kn=qn&&c(qn,Je,Z,fe,Ce,ne),On=S(H,Oe,Z,ne,sn,fe,Ce);return u(Je,ge,On,kn)}xi.getReferencedSymbolsForNode=e;function n(Ie,Oe){return Oe.use===1?Ie=oB(Ie):Oe.use===2&&(Ie=xb(Ie)),Ie}xi.getAdjustedNode=n;function r(Ie,Oe,Je,Z=new Set(Je.map(fe=>fe.fileName))){let fe=Oe.getSourceFile(Ie)?.symbol;if(fe)return m(Oe,fe,!1,Je,Z)[0]?.references||Re;let Ce=Oe.getFileIncludeReasons(),ne=Oe.getSourceFile(Ie);return ne&&Ce&&i(ne,Ce,Oe)||Re}xi.getReferencesForFileName=r;function i(Ie,Oe,Je){let Z,fe=Oe.get(Ie.path)||Re;for(let Ce of fe)if(gp(Ce)){let ne=Je.getSourceFileByPath(Ce.file),sn=SS(Je,Ce);Lh(sn)&&(Z=$r(Z,{kind:0,fileName:ne.fileName,textSpan:vS(sn)}))}return Z}function a(Ie,Oe,Je){}function c(Ie,Oe,Je,Z,fe,Ce){let ne=Ie.flags&1536&&Ie.declarations&&Sr(Ie.declarations,Vr);if(!ne)return;let sn=Ie.exports.get("export="),H=m(Oe,Ie,!!sn,Je,Ce);if(!sn||!Ce.has(ne.fileName))return H;let ge=Oe.getTypeChecker();return Ie=cd(sn,ge),u(Oe,H,S(Ie,void 0,Je,Ce,ge,Z,fe))}function u(Ie,...Oe){let Je;for(let Z of Oe)if(!(!Z||!Z.length)){if(!Je){Je=Z;continue}for(let fe of Z){if(!fe.definition||fe.definition.type!==0){Je.push(fe);continue}let Ce=fe.definition.symbol,ne=zc(Je,H=>!!H.definition&&H.definition.type===0&&H.definition.symbol===Ce);if(ne===-1){Je.push(fe);continue}let sn=Je[ne];Je[ne]={definition:sn.definition,references:sn.references.concat(fe.references).sort((H,ge)=>{let qn=f(Ie,H),kn=f(Ie,ge);if(qn!==kn)return io(qn,kn);let On=qB(H),nn=qB(ge);return On.start!==nn.start?io(On.start,nn.start):io(On.length,nn.length)})}}}return Je}function f(Ie,Oe){let Je=Oe.kind===0?Ie.getSourceFile(Oe.fileName):Oe.node.getSourceFile();return Ie.getSourceFiles().indexOf(Je)}function m(Ie,Oe,Je,Z,fe){E.assert(!!Oe.valueDeclaration);let Ce=Ei(CB(Ie,Z,Oe),sn=>{if(sn.kind==="import"){let H=sn.literal.parent;return hu(H)&&E.fail("TODO implement me - isLiteralTypeNode"),jh(sn.literal)}else if(sn.kind==="implicit")E.fail("TODO implement me - implicit");else return{kind:0,fileName:sn.referencingFile.fileName,textSpan:vS(sn.ref)}});if(Oe.declarations)for(let sn of Oe.declarations)switch(sn.kind){case 176:break;default:E.assert(!!(Oe.flags&33554432),"Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.")}let ne=Oe.exports.get("export=");if(ne?.declarations)for(let sn of ne.declarations){let H=sn.getSourceFile();if(fe.has(H.fileName)){let ge=br(sn)&&Ti(sn.left)?sn.left.expression:ci(sn)||sn;Ce.push(jh(ge))}}return Ce.length?[{definition:{type:0,symbol:Oe},references:Ce}]:Re}function y(Ie){return!1}function g(Ie,Oe,Je){if(YE(Ie.kind))return Ie.kind===105&&CH(Ie.parent)?void 0:Qe(Oe,Ie.kind,Je,void 0);if(lB(Ie)){let Z=uB(Ie.parent,Ie.text);return Z&&Ae(Z.parent,Z)}else if(MG(Ie))return Ae(Ie.parent,Ie);if(Ie.kind===71)return wn(Ie)}function S(Ie,Oe,Je,Z,fe,Ce,ne){let sn=Oe&&v(Ie,Oe,fe,!Cr(ne))||Ie,H=Oe?tn(Oe,sn):7,ge=[],qn=new F(Je,Z,Oe?b(Oe):0,fe,Ce,H,ne,ge),kn=qn.createSearch(Oe,sn,void 0,{allSearchSymbols:Oe?Et(sn,Oe,fe,ne.use===2,!!ne.providePrefixAndSuffixTextForRename,!!ne.implementations):[sn]});return _(sn,qn,kn),ge}function _(Ie,Oe,Je){let Z=ye(Ie);if(Z)Se(Z,Z.getSourceFile(),Je,Oe,!(Vr(Z)&&!Gr(Oe.sourceFiles,Z)));else for(let fe of Oe.sourceFiles)Oe.cancellationToken.throwIfCancellationRequested(),ue(fe,Je,Oe)}function b(Ie){switch(Ie.kind){case 89:default:return 0}}function v(Ie,Oe,Je,Z){let{parent:fe}=Oe;return Ns(Ie.declarations,Ce=>{if(!Ce.parent){if(Ie.flags&33554432)return;E.fail(`Unexpected symbol at ${E.formatSyntaxKind(Oe.kind)}: ${E.formatSymbol(Ie)}`)}return Bd(Ce.parent)&&tx(Ce.parent.parent)?Je.getPropertyOfType(Je.getTypeFromTypeNode(Ce.parent.parent),Ie.name):void 0})}let T;(Z=>(Z[Z.None=0]="None",Z[Z.Constructor=1]="Constructor",Z[Z.Class=2]="Class"))(T||(T={}));function W(Ie){if(!(Ie.flags&33555968))return;let Oe=Ie.declarations&&Sr(Ie.declarations,Je=>!Vr(Je));return Oe&&Oe.symbol}class F{constructor(Oe,Je,Z,fe,Ce,ne,sn,H){this.sourceFiles=Oe;this.sourceFilesSet=Je;this.specialSearchKind=Z;this.checker=fe;this.cancellationToken=Ce;this.searchMeaning=ne;this.options=sn;this.result=H;this.inheritsFromCache=new Map;this.markSeenContainingTypeReference=_b();this.markSeenReExportRHS=_b();this.symbolIdToReferences=[];this.sourceFileToSeenSymbols=[]}includesSourceFile(Oe){return this.sourceFilesSet.has(Oe.fileName)}getImportSearches(Oe,Je){return this.importTracker||(this.importTracker=oL(this.sourceFiles,this.sourceFilesSet,this.checker,this.cancellationToken)),this.importTracker(Oe,Je,this.options.use===2)}createSearch(Oe,Je,Z,fe={}){let{text:Ce=zl(Ws(Fx(Je)||W(Je)||Je)),allSearchSymbols:ne=[Je]}=fe,sn=Ce,H=this.options.implementations&&Oe?Yt(Oe,Je,this.checker):void 0;return{symbol:Je,comingFrom:Z,text:Ce,escapedText:sn,parents:H,allSearchSymbols:ne,includes:ge=>Gr(ne,ge)}}referenceAdder(Oe){let Je=so(Oe),Z=this.symbolIdToReferences[Je];return Z||(Z=this.symbolIdToReferences[Je]=[],this.result.push({definition:{type:0,symbol:Oe},references:Z})),(fe,Ce)=>Z.push(jh(fe,Ce))}addStringOrCommentReference(Oe,Je){this.result.push({definition:void 0,references:[{kind:0,fileName:Oe,textSpan:Je}]})}markSearchedSymbols(Oe,Je){let Z=ys(Oe),fe=this.sourceFileToSeenSymbols[Z]||(this.sourceFileToSeenSymbols[Z]=new Set),Ce=!1;for(let ne of Je)Ce=gg(fe,so(ne))||Ce;return Ce}}function M(Ie,Oe,Je,Z){let{importSearches:fe,singleReferences:Ce,indirectUsers:ne}=Z.getImportSearches(Oe,Je);if(Ce.length){let sn=Z.referenceAdder(Oe);for(let H of Ce)A(H,Z)&&sn(H)}for(let[sn,H]of fe)me(sn.getSourceFile(),Z.createSearch(sn,H,1),Z);if(ne.length){let sn;switch(Je.exportKind){case 0:sn=Z.createSearch(Ie,Oe,1);break;case 1:sn=Z.options.use===2?void 0:Z.createSearch(Ie,Oe,1,{text:Oe.name});break;case 2:break}if(sn)for(let H of ne)ue(H,sn,Z)}}function J(Ie,Oe,Je,Z,fe,Ce,ne,sn){let H=oL(Ie,new Set(Ie.map(On=>On.fileName)),Oe,Je),{importSearches:ge,indirectUsers:qn,singleReferences:kn}=H(Z,{exportKind:ne?1:0,exportingModuleSymbol:fe},!1);for(let[On]of ge)sn(On);for(let On of kn);for(let On of qn)for(let nn of be(On,ne?"default":Ce));}xi.eachExportReference=J;function A(Ie,Oe){return _n(Ie,Oe)?Oe.options.use!==2?!0:(Sn(Ie),!1):!1}function V(Ie,Oe){if(Ie.declarations)for(let Je of Ie.declarations){let Z=Je.getSourceFile();me(Z,Oe.createSearch(Je,Ie,0),Oe,Oe.includesSourceFile(Z))}}function ue(Ie,Oe,Je){gL(Ie).get(Oe.text)!==void 0&&me(Ie,Oe,Je)}function ye(Ie){let{declarations:Oe,flags:Je,parent:Z,valueDeclaration:fe}=Ie;if(fe&&(fe.kind===270||fe.kind===274))return fe;if(!Oe)return;if(Je&8196){let sn=Sr(Oe,H=>ap(H,2));return sn?pm(sn,176):void 0}let Ce=Z&&!(Ie.flags&262144),ne;for(let sn of Oe){let H=NS(sn);if(ne&&ne!==H||!H||H.kind===176)return;if(ne=H,fs(ne)){let ge;for(;ge=QO(ne);)ne=ge}}return Ce?ne.getSourceFile():ne}function he(Ie,Oe,Je,Z=Je){return ce(Ie,Oe,Je,()=>!0,Z)||!1}xi.isSymbolReferencedInFile=he;function ce(Ie,Oe,Je,Z,fe=Je){let Ce=Oe.getSymbolAtLocation(Ie);if(Ce)for(let ne of be(Je,Ce.name,fe)){if(!Sn(ne)||ne===Ie||ne.text!==Ie.text)continue;if(Oe.getSymbolAtLocation(ne)===Ce||Oe.getShorthandAssignmentValueSymbol(ne.parent)===Ce){let H=Z(ne);if(H)return H}}}xi.eachSymbolReferenceInFile=ce;function Ee(Ie,Oe){return Ar(be(Oe,Ie),fe=>!!aE(fe)).reduce((fe,Ce)=>{let ne=Z(Ce);return!Pn(fe.declarationNames)||ne===fe.depth?(fe.declarationNames.push(Ce),fe.depth=ne):ne<fe.depth&&(fe.declarationNames=[Ce],fe.depth=ne),fe},{depth:1/0,declarationNames:[]}).declarationNames;function Z(fe){let Ce=0;for(;fe;)fe=NS(fe),Ce++;return Ce}}xi.getTopMostDeclarationNamesInFile=Ee;function Fe(Ie,Oe,Je,Z){if(!Ie.name||!Sn(Ie.name))return!1;let fe=E.checkDefined(Je.getSymbolAtLocation(Ie.name));for(let Ce of Oe)for(let ne of be(Ce,fe.name)){if(!Sn(ne)||ne===Ie.name||ne.text!==Ie.name.text)continue;let sn=tB(ne),H=ao(sn.parent)&&sn.parent.expression===sn?sn.parent:void 0,ge=Je.getSymbolAtLocation(ne);if(ge&&Je.getRootSymbols(ge).some(qn=>qn===fe)&&Z(ne,H))return!0}return!1}xi.someSignatureUsage=Fe;function be(Ie,Oe,Je=Ie){return Ei(de(Ie,Oe,Je),Z=>{let fe=$l(Ie,Z);return fe===Ie?void 0:fe})}function de(Ie,Oe,Je=Ie){let Z=[];if(!Oe||!Oe.length)return Z;let fe=Ie.text,Ce=fe.length,ne=Oe.length,sn=fe.indexOf(Oe,Je.pos);for(;sn>=0&&!(sn>Je.end);){let H=sn+ne;(sn===0||!nd(fe.charCodeAt(sn-1),1))&&(H===Ce||!nd(fe.charCodeAt(H),1))&&Z.push(sn),sn=fe.indexOf(Oe,sn+ne+1)}return Z}function Ae(Ie,Oe){let Je=Ie.getSourceFile(),Z=Oe.text,fe=Ei(be(Je,Z,Ie),Ce=>Ce===Oe||lB(Ce)&&uB(Ce,Z)===Oe?jh(Ce):void 0);return[{definition:{type:1,node:Oe},references:fe}]}function G(Ie,Oe){switch(Ie.kind){case 89:return Ie.text?.length===Oe.length;case 16:return!1;case 10:return!1;case 114:return Oe.length===7;default:return!1}}function Qe(Ie,Oe,Je,Z){let fe=Oo(Ie,Ce=>(Je.throwIfCancellationRequested(),Ei(be(Ce,Ai(Oe),Ce),ne=>{if(ne.kind===Oe&&(!Z||Z(ne)))return jh(ne)})));return fe.length?[{definition:{type:2,node:fe[0].node},references:fe}]:void 0}function me(Ie,Oe,Je,Z=!0){return Je.cancellationToken.throwIfCancellationRequested(),Se(Ie,Ie,Oe,Je,Z)}function Se(Ie,Oe,Je,Z,fe){if(Z.markSearchedSymbols(Oe,Je.allSearchSymbols))for(let Ce of de(Oe,Je.text,Ie))tt(Oe,Ce,Je,Z,fe)}function _n(Ie,Oe){return!!(kS(Ie)&Oe.searchMeaning)}function tt(Ie,Oe,Je,Z,fe){let Ce=$l(Ie,Oe);if(!G(Ce,Je.text)){!Z.options.implementations&&(Z.options.findInStrings&&hp(Ie,Oe)||Z.options.findInComments&&WG(Ie,Oe))&&Z.addStringOrCommentReference(Ie.fileName,Rc(Oe,Je.text.length));return}if(!_n(Ce,Z))return;let ne=Ce.getSourceFile();Z.checker.getDiagnostics(ne);let sn=Z.checker.getSymbolAtLocation(Ce);if(!sn)return;let H=Ce.parent;if(Eg(H)&&H.isNameFirst&&H.typeExpression&&Jd(H.typeExpression.type)&&H.typeExpression.type.jsDocPropertyTags&&gr(H.typeExpression.type.jsDocPropertyTags)){Pe(H.typeExpression.type.jsDocPropertyTags,Ce,Je,Z);return}let ge=pr(Je,sn,Ce,Z);if(!ge){$e(sn,Je,Z);return}switch(Z.specialSearchKind){case 0:fe&&Ln(Ce,ge,Z);break;default:E.fail("special serach kind")}wr(Ce)&&To(Ce.parent)&&Ix(Ce.parent.parent.parent)&&(sn=Ce.parent.symbol,!sn)||gn(Ce,sn,Je,Z)}function Pe(Ie,Oe,Je,Z){let fe=Z.referenceAdder(Je.symbol);Ln(Oe,Je.symbol,Z),Bn(Ie,Ce=>{hl(Ce.name)&&fe(Ce.name.left)})}function gn(Ie,Oe,Je,Z){let fe=Oe.parent?.exports&&Oe.parent.exports.has(Oe.name),Ce=!1,ne=Oe;Ce&&!Cr(Z.options)?V(ne,Z):fe&&M(Ie,ne,{exportKind:1,exportingModuleSymbol:ne.parent},Z)}function $e({flags:Ie,valueDeclaration:Oe},Je,Z){let fe=Z.checker.getShorthandAssignmentValueSymbol(Oe),Ce=Oe&&ci(Oe);!(Ie&33554432)&&Ce&&Je.includes(fe)&&Ln(Ce,fe,Z)}function Ln(Ie,Oe,Je){let{kind:Z,symbol:fe}="kind"in Oe?Oe:{kind:void 0,symbol:Oe};if(Je.options.use===2&&Ie.kind===114)return;let Ce=Je.referenceAdder(fe);Je.options.implementations?Ye(Ie,Ce,Je):Ce(Ie,Z)}function Vt(Ie,Oe,Je){}function Hn(Ie){return Ie.members&&Ie.members.get("__constructor")}function Ye(Ie,Oe,Je){if(ql(Ie)&&ot(Ie.parent)){Oe(Ie);return}if(Ie.kind!==89)return;Ie.parent.kind===175&&Zn(Ie,Je.checker,Oe);let Z=er(Ie,ne=>!hl(ne.parent)&&!Zo(ne.parent)&&!$T(ne.parent)),fe=Z.parent;if(gx(fe)&&fe.type===Z&&Je.markSeenContainingTypeReference(fe)){if(op(fe))Ce(fe.initializer);else if(Ji(fe)&&fe.body){let ne=fe.body;ne.kind===236?cp(ne,sn=>{sn.expression&&Ce(sn.expression)}):Ce(ne)}}function Ce(ne){se(ne)&&Oe(ne)}}function se(Ie){switch(Ie.kind){case 289:return se(Ie.expression);case 270:case 293:case 274:case 290:return!0;default:return!1}}function jn(Ie,Oe,Je,Z){if(Ie===Oe)return!0;let fe=so(Ie)+","+so(Oe),Ce=Je.get(fe);if(Ce!==void 0)return Ce;Je.set(fe,!1);let ne=!!Ie.declarations&&Ie.declarations.some(sn=>cE(sn).some(H=>{let ge=Z.getTypeAtLocation(H);return!!ge&&!!ge.symbol&&jn(ge.symbol,Oe,Je,Z)}));return Je.set(fe,ne),ne}function wn(Ie){let Oe=YO(Ie,!1);if(!Oe)return;let Je=256;switch(Oe.kind){case 152:Je&=PO(Oe),Oe=Oe.parent;break;default:return}let Z=Oe.getSourceFile(),fe=Ei(be(Z,"super",Oe),Ce=>{if(Ce.kind!==71)return;let ne=YO(Ce,!1);return ne&&sS(ne)===!!Je&&ne.parent.symbol===Oe.symbol?jh(Ce):void 0});return[{definition:{type:0,symbol:Oe.symbol},references:fe}]}function Xn(Ie){return Ie.kind===89&&Ie.parent.kind===149&&Ie.parent.name===Ie}function ft(Ie,Oe,Je,Z){let fe=XE(Ie,Je),Ce=Oo(Oe,ne=>(Z.throwIfCancellationRequested(),Ei(be(ne,Ie.text),sn=>{if(ji(sn)&&sn.text===Ie.text)if(fe){let H=XE(sn,Je);if(fe!==Je.getStringType()&&(fe===H||Ft(sn,Je)))return jh(sn,2)}else return NI(sn)&&!lp(sn,ne)?void 0:jh(sn,2)})));return[{definition:{type:4,node:Ie},references:Ce}]}function Ft(Ie,Oe){if(Ff(Ie.parent))return Oe.getPropertyOfType(Oe.getTypeAtLocation(Ie.parent.parent),Ie.text)}function Et(Ie,Oe,Je,Z,fe,Ce){let ne=[];return At(Ie,Oe,Je,Z,!(Z&&fe),(sn,H,ge)=>{ge&&It(Ie)!==It(ge)&&(ge=void 0),ne.push(ge||H||sn)},()=>!Ce),ne}function At(Ie,Oe,Je,Z,fe,Ce,ne){let sn=void 0,H=void 0;if(H){let On=Ce(H,void 0,void 0,1);if(On)return On}let ge=kn(Ie);if(ge)return ge;if(!Z){let On;return On=void 0,On&&kn(On,4)}if(E.assert(Z),fe)return;function kn(On,nn){return Ns(Je.getRootSymbols(On),Dr=>Ce(On,Dr,void 0,nn)||(Dr.parent&&Dr.parent.flags&96&&ne(Dr)?xn(Dr.parent,Dr.name,Je,Gt=>Ce(On,Dr,Gt,nn)):void 0))}}function xn(Ie,Oe,Je,Z){let fe=new Map;return Ce(Ie);function Ce(ne){if(!(!(ne.flags&96)||!Sm(fe,so(ne))))return Ns(ne.declarations,sn=>Ns(cE(sn),H=>{let ge=Je.getTypeAtLocation(H),qn=ge&&ge.symbol&&Je.getPropertyOfType(ge,Oe);return ge&&qn&&(Ns(Je.getRootSymbols(qn),Z)||Ce(ge.symbol))}))}}function It(Ie){return Ie.valueDeclaration?!!(Df(Ie.valueDeclaration)&256):!1}function pr(Ie,Oe,Je,Z){let{checker:fe}=Z;return At(Oe,Je,fe,!1,Z.options.use!==2||!!Z.options.providePrefixAndSuffixTextForRename,(Ce,ne,sn,H)=>(sn&&It(Oe)!==It(sn)&&(sn=void 0),Ie.includes(sn||ne||Ce)?{symbol:ne&&!(oa(Ce)&6)?ne:Ce,kind:H}:void 0),Ce=>!(Ie.parents&&!Ie.parents.some(ne=>jn(Ce.parent,ne,Z.inheritsFromCache,fe))))}function tn(Ie,Oe){let Je=kS(Ie),{declarations:Z}=Oe;if(Z){let fe;do{fe=Je;for(let Ce of Z){let ne=nL(Ce);ne&Je&&(Je|=ne)}}while(Je!==fe)}return Je}xi.getIntersectingMeaningFromDeclarations=tn;function ot(Ie){return Ie.flags&33554432?jx(Ie)?op(Ie):$c(Ie)?!!Ie.body:Sa(Ie):void 0}function Zn(Ie,Oe,Je){let Z=Oe.getSymbolAtLocation(Ie),fe=Oe.getShorthandAssignmentValueSymbol(Z.valueDeclaration);if(fe)for(let Ce of fe.getDeclarations())nL(Ce)&1&&Je(Ce)}xi.getReferenceEntriesForShorthandPropertyAssignment=Zn;function zt(Ie,Oe,Je){No(Ie,Z=>{Z.kind===Oe&&Je(Z),zt(Z,Oe,Je)})}function Yt(Ie,Oe,Je){let Z=Sb(Ie)?Ie.parent:void 0,fe=Z&&Je.getTypeAtLocation(Z.expression),Ce=Ei(fe&&(fe.isUnionOrIntersection()?fe.types:fe.symbol===Oe.parent?void 0:[fe]),ne=>ne.symbol&&ne.symbol.flags&96?ne.symbol:void 0);return Ce.length===0?void 0:Ce}function Cr(Ie){return Ie.use===2&&Ie.providePrefixAndSuffixTextForRename}})(LS||(LS={}));function Jye(e){return e&&Oo(e,n=>n.references)}function Wye(e,n,r,i,a,c,u){return Yn(Jye(LS.getReferencedSymbolsForNode(a,i,e,r,n,c)),f=>u(f,i,e.getTypeChecker()))}function Uye(e,n,r,i,a){return{...yQ(e),...i&&Kye(e,n,r,a)}}function Kye(e,n,r,i){if(e.kind!==0&&(Sn(n)||_u(n))){let{node:a,kind:c}=e,u=a.parent,f=n.text,m=ud(u);if(m){let y={prefixText:f+": "},g={suffixText:": "+f};if(c===3)return y;if(c===4)return g;if(m){let S=u.parent;return g}else return y}}if(e.kind!==0&&Ud(e.node)&&Us(e.node.parent)){let a=VG(i);return{prefixText:a,suffixText:a}}return Qg}var Db={};cl(Db,{createDefinitionInfo:()=>kb,getDefinitionAtPosition:()=>qye,getReferenceAtPosition:()=>bQ});function qye(e,n,r,i,a){let c=bQ(n,r,e),u=c&&[zB(c.reference.fileName,c.fileName,c.unverified)]||Re;if(c?.file)return u;let f=$l(n,r);if(f===n)return;let{parent:m}=f,y=e.getTypeChecker();switch(gG(e,n),f.kind){case 116:let T=er(f.parent,A=>$c(A));return T?[xQ(y,T)]:void 0;case 114:if(!rx(f.parent))break;case 113:let W=er(f.parent,xH);if(W)return[$ye(W,n)];break;case 16:let F=er(f,kh);if(F){let A=F.fileName;return[zB(A,A,!1)]}case 178:let J=f.fileName;return[zB(J,J,!1)]}let{symbol:g,failedAliasResolution:S}=Yye(f,y,a),_=f;if(i&&S&&E.fail("implement me"),!g)return Zr(u,void 0);if(i&&yi(g.declarations,T=>T.getSourceFile().fileName===n.fileName))return;let b=Vye(y,f);if(b){let T=xQ(y,b,S);if(y.getRootSymbols(g).some(W=>zye(W,b)))return[T];{let W=_Q(y,g,f,S,b)||Re;return f.kind===71?[T,...W]:[...W,T]}}if(f.parent.kind===175){let T=y.getShorthandAssignmentValueSymbol(g.valueDeclaration),W=T?.declarations?T.declarations.map(F=>kb(F,y,T,f,!1,S)):Re;return Zr(W,[])}let v=[];return Zr(u,v.length?v:_Q(y,g,f,S))}function Vye(e,n){let r=Hye(n),i=r&&e.getResolvedSignature(r);return Wo(i&&i.declaration,a=>Ji(a))}function Hye(e){let n=er(e,i=>!Sb(i)),r=n?.parent;return r&&Cg(r)&&Mx(r)===n?r:void 0}function zye(e,n){return e===n.symbol||e===n.symbol.parent||Pf(n.parent)||!Cg(n.parent)&&e===Wo(n.parent,ip)?.symbol}function _Q(e,n,r,i,a){let c=Ar(n.declarations,_=>_!==a),u=y()||g();if(u)return u;let f=Ar(c,_=>!0);let m=Pn(f)?f:c;return Yn(m,_=>kb(_,e,n,r,!1,i));function y(){n.flags&32&&!(n.flags&19)&&eL(r)}function g(){return FG(r)||ZI(r)?S(c,!1):void 0}function S(_,b){if(!_)return;let v=_.filter(Ji),T=v.filter(W=>!!W.body);return v.length?T.length!==0?T.map(W=>kb(W,e,n,r)):[kb(ta(v),e,n,r,!1,i)]:void 0}}function HB(e,n){return Sr(e,r=>N5(r,n))}function bQ(e,n,r){let i=HB(e.referencedFiles,n);if(i){let u=r.getSourceFileFromReference(e,i);return u&&{reference:i,fileName:u.fileName,file:u,unverified:!1}}let a=HB(e.typeReferenceDirectives,n);if(a){let u=r.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(a,e)?.resolvedTypeReferenceDirective,f=u&&r.getSourceFile(u.resolvedFileName);return f&&{reference:a,fileName:f.fileName,file:f,unverified:!1}}if(HB(e.libReferenceDirectives,n)&&console.warn("TODO - implement me - getReferenceAtPosition - lib"),e.imports.length){let u=eP(e,n),f;if(ji(u)&&(f=r.getResolvedModuleFromModuleSpecifier(u,e))){let m=f.resolvedModule?.resolvedFileName,y=m||mp(ei(e.fileName),u.text);return{file:r.getSourceFile(y),fileName:y,reference:{pos:u.getStart(),end:u.getEnd(),fileName:u.text},unverified:!m}}}}function zB(e,n,r){return{fileName:n,textSpan:Sc(0,0),kind:"script",name:e,containerName:void 0,containerKind:void 0,unverified:r}}function kb(e,n,r,i,a,c){let u=n.symbolToString(r),f=Xc.getSymbolKind(n,r,i),m=r.parent?n.symbolToString(r.parent,i):"";return Gye(n,e,f,u,m,a,c)}function xQ(e,n,r){return kb(n,e,n.symbol,n,!1,r)}function Gye(e,n,r,i,a,c,u,f){let m=n.getSourceFile(),y=(xh(n)?Mc(n).fileName:void 0)||m.fileName;if(!f){let g=ci(n)||n;f=md(g,m)}return{fileName:y,textSpan:f,kind:r,name:i,containerKind:void 0,containerName:a,...Xl.toContextSpan(f,m,Xl.getContextNode(n)),isLocal:!GB(e,n),isAmbient:!!(n.flags&33554432),unverified:c,failedAliasResolution:u}}function GB(e,n){if(e.isDeclarationVisible(n))return!0;if(!n.parent)return!1;if(op(n.parent)&&n.parent.initializer===n)return GB(e,n.parent);switch(n.kind){case 152:if(ap(n,2))return!1;case 174:case 175:case 293:case 274:case 283:case 270:return GB(e,n.parent);default:return!1}}function $ye(e,n){let r=Xl.getContextNode(e),i=md(PL(r)?r.start:r,n);return{fileName:n.fileName,textSpan:i,kind:"keyword",name:"switch",containerKind:void 0,containerName:"",...Xl.toContextSpan(i,n,r),isLocal:!0,isAmbient:!1,unverified:!1,failedAliasResolution:void 0}}function Qye(e,n){return e.kind!==89&&e.kind!==16?!1:(e.parent===n,!0)}function Yye(e,n,r){let i=n.getSymbolAtLocation(e),a=!1;if(i?.declarations&&i.flags&2097152&&!r&&Qye(e,i.declarations[0])){let c=n.getAliasedSymbol(i);if(c.declarations)return{symbol:c};a=!0}return{symbol:i,failedAliasResolution:a}}var sP={};cl(sP,{getRenameInfo:()=>Xye,nodeIsEligibleForRename:()=>DQ});function Xye(e,n,r,i){let a=xb($l(n,r));if(DQ(a)){let c=Zye(a,e.getTypeChecker(),n,e,i);if(c)return c}return NL(N.You_cannot_rename_this_element)}function Zye(e,n,r,i,a){let c=n.getSymbolAtLocation(e);if(!c){if(_u(e)){let _=XE(e,n);if(_&&(_.flags&128||_.flags&1048576&&yi(_.types,b=>!!(b.flags&128))))return CQ(e.text,e.text,"string","",e,r)}return}let{declarations:u}=c;if(!u||u.length===0)return;if(u.some(_=>ehe(i,_)))return NL(N.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library);if(Sn(e)&&e.text==="default"&&c.parent&&c.parent.flags&1536)return;if(_u(e)&&lE(e))return a.allowRenameOfImportPath?rhe(e,r,c):void 0;let f=nhe(r,c,n,a);if(f)return NL(f);let m=Xc.getSymbolKind(n,c,e),y=HG(e)||Bc(e)&&e.parent.kind===147?zl(gh(e)):void 0,g=y||n.symbolToString(c),S=y||n.getFullyQualifiedName(c);return CQ(g,S,m,Xc.getSymbolModifiers(n,c),e,r)}function ehe(e,n){let r=n.getSourceFile();return e.isSourceFileDefaultLibrary(r)&&qs(r.fileName,".h")}function nhe(e,n,r,i){!i.providePrefixAndSuffixTextForRename&&n.flags&2097152;let{declarations:a}=n;!a||the(e.path)}function the(e){let n=ku(e),r=n.lastIndexOf("node_modules");if(r!==-1)return n.slice(0,r+2)}function rhe(e,n,r){if(!Ul(e.text))return NL(N.You_cannot_rename_a_module_via_a_global_import);let i=r.declarations&&Sr(r.declarations,Vr);if(!i)return;let a=Ps(e.text,"/index")||Ps(e.text,"/index.js")?void 0:HK(bu(i.fileName),"/index"),c=a===void 0?i.fileName:a,u=a===void 0?"module":"directory",f=e.text.lastIndexOf("/")+1,m=Rc(e.getStart(n)+1+f,e.text.length-f);return{canRename:!0,fileToRename:c,kind:u,displayName:c,fullDisplayName:e.text,kindModifiers:"",triggerSpan:m}}function CQ(e,n,r,i,a,c){return{canRename:!0,fileToRename:void 0,kind:r,displayName:e,fullDisplayName:n,kindModifiers:i,triggerSpan:ihe(a,c)}}function NL(e){return{canRename:!1,localizedErrorMessage:um(e)}}function ihe(e,n){let r=e.getStart(n),i=e.getWidth(n);return _u(e)&&(r+=1,i-=2),Rc(r,i)}function DQ(e){switch(e.kind){case 89:case 16:return!0;default:return!1}}var Xc={};cl(Xc,{getSymbolDisplayPartsDocumentationAndSymbolKind:()=>ahe,getSymbolKind:()=>NQ,getSymbolModifiers:()=>she});var ohe=70246400;function NQ(e,n,r){let i=kQ(e,n,r);if(i!=="")return i;let a=Lg(n);return a&32?kf(n,274)?"local class":"class":a&268435456?"define":a&384?"enum":a&524288?"type":a&64?"interface":a&262144?"type parameter":a&8?"enum member":a&2097152?"alias":a&1536?"module":i}function kQ(e,n,r){let i=e.getRootSymbols(n);if(i.length===1&&Uo(i).flags&8192&&e.getTypeOfSymbolAtLocation(n,r).getCallSignatures().length!==0)return"method";let a=Lg(n);if(a&3)return eB(n)?"parameter":EQ(n)?"local var":"var";if(a&16)return EQ(n)?"local function":"function";if(a&32768)return"getter";if(a&65536)return"setter";if(a&8192)return"method";if(a&16384)return"constructor";if(a&131072)return"index";if(a&4){if(a&33554432&&n.links.checkFlags&6){let c=Bn(e.getRootSymbols(n),u=>{if(u.getFlags()&98311)return"property"});return c||(e.getTypeOfSymbolAtLocation(n,r).getCallSignatures().length?"method":"property")}return"property"}return""}function EQ(e){return e.parent?!1:Bn(e.declarations,n=>{if(n.kind===270)return!0;if(n.kind!==237&&n.kind!==169)return!1;for(let r=n.parent;!Ng(r);r=r.parent)if(r.kind===176)return!1;return!0})}function ahe(e,n,r,i,a,c=kS(a),u){return vQ(e,n,r,i,a,void 0,c,u)}function vQ(e,n,r,i,a,c,u,f){let m=[],y=[],g=[],S=Lg(n),_=u&1?kQ(e,n,a):"",b=!1,v=!1,T,W,F=!1;if(S&268435456){let de=n.declarations?.[0];if(de){let Ae=Mc(de),G=np(Ae,de,!1);m.push(ac(G)),g=n.getContextualJsDocTags(de,e)}}if(_!==""||S&32||S&2097152){if(_==="getter"||_==="setter"){let G=Sr(n.declarations,Qe=>Qe.name===a);if(G)switch(G.kind){case 152:_="accessor";break;default:E.assertNever(G)}else _="property"}let de;if(c??(c=v?e.getTypeAtLocation(a):e.getTypeOfSymbolAtLocation(n,a)),a.parent&&a.parent.kind===286){let G=a.parent.name;(G===a||G&&G.getFullWidth()===0)&&(a=a.parent)}let Ae;if(Md(a)?Ae=a:(h$(a)||eL(a))&&(Ae=a.parent),Ae){de=e.getResolvedSignature(Ae);let G=Ae.kind===276||ao(Ae)&&Ae.expression.kind===71,Qe=G?c.getConstructSignatures():c.getCallSignatures();if(de&&!Gr(Qe,de.target)&&!Gr(Qe,de)&&(de=Qe.length?Qe[0]:void 0),de){switch(G&&S&32?(_="constructor",ye(c.symbol,_)):S&2097152?(_="alias",he(_),m.push(Ja()),G&&(m.push(HE(145)),m.push(Ja())),ue(n)):ye(n,_,de),_){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":m.push(Ec(61)),m.push(Ja()),!(dt(c)&16)&&c.symbol&&(Ro(m,PS(e,c.symbol,i,void 0,5)),m.push(Oh())),G&&(m.push(HE(145)),m.push(Ja())),Ee(de,Qe,262144);break;default:Ee(de,Qe)}b=!0,F=Qe.length>1}}else if(ZI(a)&&!(S&98304)){let G=a.parent;if(n.declarations&&Sr(n.declarations,me=>me===G)){let me=c.getNonNullableType().getCallSignatures();de=e.getSignatureFromDeclaration(G),ye(n,_),de&&Ee(de,me),b=!0,F=me.length>1}}}if(S&32&&!b&&!v&&(A(),kf(n,274)&&he("local class"),m.push(Ja()),ue(n),be(n,r)),n.flags&2097152){if(J(),!b||y.length===0&&g.length===0){let de=e.getAliasedSymbol(n);if(de!==n&&de.declarations&&de.declarations.length>0){let Ae=de.declarations[0],G=ci(Ae);if(G&&!b){let me=n.name!=="default"&&!0,Se=vQ(e,de,$t(Ae),i,G,c,u,me?n:de);m.push(...Se.displayParts),m.push(Oh()),T=Se.documentation,W=Se.tags}else T=de.getContextualDocumentationComment(Ae,e),W=de.getJsDocTags(e)}}m.push(Ja()),ue(n)}if(!b)if(_!==""){if(c&&(ye(n,_,void 0,!0),m.push(Ja()),(_==="property"||_==="accessor"||_==="JSX attribute"||S&3||_==="local var"||_==="index"||_==="using"||_==="await using"||v)&&(m.push(Ja()),Ro(m,VE(e,c,i)),m.push(Ja())),ue(n),S&16||S&8192||S&16384||S&131072||S&98304||_==="method")){let de=c.getNonNullableType().getCallSignatures();de.length&&(Ee(de[0],de),F=de.length>1)}}else _=NQ(e,n,a);if(y.length===0&&!F&&(y=n.getContextualDocumentationComment(i,e)),y.length===0&&S&4&&n.parent&&n.declarations&&Bn(n.parent.declarations,de=>de.kind===176))for(let de of n.declarations){if(!de.parent||de.parent.kind!==269)continue;let Ae=e.getSymbolAtLocation(de.parent.right);if(Ae&&(y=Ae.getDocumentationComment(e),g=Ae.getJsDocTags(e),y.length>0))break}if(y.length===0&&Sn(a)&&n.valueDeclaration&&To(n.valueDeclaration)){let de=n.valueDeclaration,Ae=de.parent,G=de.propertyName||de.name}return g.length===0&&!F&&(g=n.getContextualJsDocTags(i,e)),y.length===0&&T&&(y=T),g.length===0&&W&&(g=W),{displayParts:m,documentation:y,symbolKind:_,tags:g.length===0?void 0:g};function M(){return zg()}function J(){A()}function A(){f&&(he("alias"),m.push(Ja()))}function V(){m.push(Ja()),m.push(HE(103)),m.push(Ja())}function ue(de,Ae){let G;f&&de===n&&(de=f);let Qe=[];de.flags&131072&&G?(de.parent&&(Qe=PS(e,de.parent)),Qe.push(Ec(22)),G.forEach((me,Se)=>{Qe.push(...VE(e,me.keyType)),Se!==G.length-1&&(Qe.push(Ja()),Qe.push(Ec(53)),Qe.push(Ja()))}),Qe.push(Ec(23))):Qe=PS(e,de,Ae||r,void 0,7),Ro(m,Qe),n.flags&16777216&&m.push(Ec(60))}function ye(de,Ae,G,Qe){J(),Ae&&(he(Ae),G&&(m.push(Ja()),ce(G)),de&&!Qe&&!Pn(de.declarations,me=>Kl(me)||fs(me)&&!me.name)&&(m.push(Ja()),ue(de)))}function he(de){switch(de){case"var":case"function":case"let":case"const":case"constructor":case"using":case"await using":m.push(iB(de));return;default:m.push(Ec(20)),m.push(iB(de)),m.push(Ec(21));return}}function ce(de,Ae=0){Ro(m,RG(e,de,i,Ae|32))}function Ee(de,Ae,G=0){Ro(m,wG(e,de,i,G|32)),Fe(de,Ae,G)}function Fe(de,Ae,G=0){Ae.length>1&&(m.push(Ja()),m.push(Ec(20)),m.push(IG(41)),m.push(Ts((Ae.length-1).toString(),7)),m.push(Ja()),m.push(ac(Ae.length===2?"overload":"overloads")),m.push(Ec(21))),y=de.getDocumentationComment(e),g=de.getJsDocTags(),Ae.length>1&&y.length===0&&g.length===0&&(y=Ae[0].getDocumentationComment(e),g=Ae[0].getJsDocTags().filter(Qe=>Qe.name!=="deprecated"))}function be(de,Ae){let G=wf(Qe=>{let me=e.symbolToTypeParameterDeclarations(de,Ae,ohe);M().writeList(53776,me,$t(Io(Ae)),Qe)});Ro(m,G)}}function PQ(e){if(e.declarations&&e.declarations.length){let[n,...r]=e.declarations,i=gr(r)&&zE(n)&&Pn(r,c=>!zE(c))?65536:0,a=GE(n,i);if(a)return a.split(",")}return[]}function she(e,n){if(!n)return"";let r=new Set(PQ(n));if(n.flags&2097152){let i=e.getAliasedSymbol(n);i!==n&&Bn(PQ(i),a=>{r.add(a)})}return n.flags&16777216&&r.add("optional"),r.size>0?oo(r.values()).join(","):""}var Hs={};cl(Hs,{FormattingContext:()=>$B,FormattingRequestKind:()=>QB,RuleAction:()=>kL,RuleFlags:()=>YB,SmartIndenter:()=>nj,anyContext:()=>vb,formatDocument:()=>Ihe,formatNodeGivenIndentation:()=>Lhe,getAllRules:()=>XB,getFormatContext:()=>bhe,getRangeOfEnclosingComment:()=>Fhe});var QB=(u=>(u[u.FormatDocument=0]="FormatDocument",u[u.FormatSelection=1]="FormatSelection",u[u.FormatOnEnter=2]="FormatOnEnter",u[u.FormatOnSemicolon=3]="FormatOnSemicolon",u[u.FormatOnOpeningCurlyBrace=4]="FormatOnOpeningCurlyBrace",u[u.FormatOnClosingCurlyBrace=5]="FormatOnClosingCurlyBrace",u))(QB||{}),$B=class{constructor(n,r,i){this.sourceFile=n;this.formattingRequestKind=r;this.options=i}updateContext(n,r,i,a,c){this.currentTokenSpan=E.checkDefined(n),this.currentTokenParent=E.checkDefined(r),this.nextTokenSpan=E.checkDefined(i),this.nextTokenParent=E.checkDefined(a),this.contextNode=E.checkDefined(c),this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0}ContextNodeAllOnSameLine(){return this.contextNodeAllOnSameLine===void 0&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine}NextNodeAllOnSameLine(){return this.nextNodeAllOnSameLine===void 0&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine}TokensAreOnSameLine(){if(this.tokensAreOnSameLine===void 0){let n=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,r=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=n===r}return this.tokensAreOnSameLine}ContextNodeBlockIsOnOneLine(){return this.contextNodeBlockIsOnOneLine===void 0&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine}NextNodeBlockIsOnOneLine(){return this.nextNodeBlockIsOnOneLine===void 0&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine}NodeIsOnOneLine(n){let r=this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line,i=this.sourceFile.getLineAndCharacterOfPosition(n.getEnd()).line;return r===i}BlockIsOnOneLine(n){let r=Yl(n,17,this.sourceFile),i=Yl(n,19,this.sourceFile);if(r&&i){let a=this.sourceFile.getLineAndCharacterOfPosition(r.getEnd()).line,c=this.sourceFile.getLineAndCharacterOfPosition(i.getStart(this.sourceFile)).line;return a===c}return!1}};var vb=Re,kL=(S=>(S[S.None=0]="None",S[S.StopProcessingSpaceActions=1]="StopProcessingSpaceActions",S[S.StopProcessingTokenActions=2]="StopProcessingTokenActions",S[S.InsertSpace=4]="InsertSpace",S[S.InsertNewLine=8]="InsertNewLine",S[S.DeleteSpace=16]="DeleteSpace",S[S.DeleteToken=32]="DeleteToken",S[S.InsertTrailingSemicolon=64]="InsertTrailingSemicolon",S[S.StopAction=3]="StopAction",S[S.ModifySpaceAction=28]="ModifySpaceAction",S[S.ModifyTokenAction=96]="ModifyTokenAction",S))(kL||{}),YB=(r=>(r[r.None=0]="None",r[r.CanDeleteNewLines=1]="CanDeleteNewLines",r))(YB||{});function XB(){let e=[];for(let V=0;V<=145;V++)V!==1&&e.push(V);function n(...V){return{tokens:e.filter(ue=>!V.some(ye=>ye===ue)),isSpecific:!1}}let r={tokens:e,isSpecific:!1},i=wS([...e,3]),a=wS([...e,1]),c=IQ(92,145),u=IQ(29,88),f=[103],m=[47,48,57,55],y=[10,11,13,89,20,22,17,145],g=[89,20,145],S=[89,21,23,145],_=[89,20,145],b=[89,21,23,145],v=[2,3],T=[89,...cB],W=i,F=wS([89,32,3]),M=wS([21,3,109,110]),J=[aa("IgnoreBeforeComment",r,v,vb,1),aa("IgnoreAfterLineComment",2,r,vb,1),aa("NotSpaceBeforeColon",r,61,[Ls,vL,LQ],16),aa("SpaceAfterColon",61,r,[Ls,vL,She],4),aa("NoSpaceBeforeQuestionMark",r,60,[Ls,vL,LQ],16),aa("SpaceAfterQuestionMarkInConditionalOperator",60,r,[Ls,dhe],4),aa("NoSpaceAfterQuestionMark",60,r,[Ls,uhe],16),aa("NoSpaceBeforeDot",r,[24,28],[Ls,xhe],16),aa("NoSpaceAfterDot",[24,28],r,[Ls],16),aa("NoSpaceAfterUnaryPrefixOperator",m,y,[Ls,vL],16),aa("NoSpaceAfterUnaryPreincrementOperator",47,g,[Ls],16),aa("NoSpaceAfterUnaryPredecrementOperator",48,_,[Ls],16),aa("NoSpaceBeforeUnaryPostincrementOperator",S,47,[Ls,RQ],16),aa("NoSpaceBeforeUnaryPostdecrementOperator",b,48,[Ls,RQ],16),aa("SpaceAfterPostincrementWhenFollowedByAdd",47,41,[Ls,AS],4),aa("SpaceAfterAddWhenFollowedByUnaryPlus",41,41,[Ls,AS],4),aa("SpaceAfterAddWhenFollowedByPreincrement",41,47,[Ls,AS],4),aa("SpaceAfterPostdecrementWhenFollowedBySubtract",48,42,[Ls,AS],4),aa("SpaceAfterSubtractWhenFollowedByUnaryMinus",42,42,[Ls,AS],4),aa("SpaceAfterSubtractWhenFollowedByPredecrement",42,48,[Ls,AS],4),aa("NoSpaceAfterCloseBrace",19,[27,26],[Ls],16),aa("NewLineBeforeCloseBraceInBlockContext",i,19,[AQ],8),aa("SpaceAfterCloseBrace",19,n(21),[Ls,yhe],4),aa("SpaceBetweenCloseBraceAndElse",19,110,[Ls],4),aa("SpaceBetweenCloseBraceAndWhile",19,118,[Ls],4),aa("NoSpaceBetweenEmptyBraceBrackets",17,19,[Ls,The],16),aa("SpaceAfterConditionalClosingParen",21,22,[hhe],4),aa("NoSpaceBetweenFunctionKeywordAndStar",138,43,[wQ],16),aa("SpaceAfterStarInGeneratorDeclaration",43,89,[wQ],4),aa("SpaceAfterFunctionInFuncDecl",138,r,[mhe],4),aa("NewLineAfterOpenBraceInBlockContext",17,r,[AQ],8)],A=[];return[...J,...A]}function aa(e,n,r,i,a,c=0){return{leftTokenRange:FQ(n),rightTokenRange:FQ(r),rule:{debugName:e,context:i,action:a,flags:c}}}function wS(e){return{tokens:e,isSpecific:!0}}function FQ(e){return typeof e=="number"?wS([e]):Nr(e)?wS(e):e}function IQ(e,n,r=[]){let i=[];for(let a=e;a<=n;a++)Gr(r,a)||i.push(a);return wS(i)}function AS(e){switch(e.contextNode.kind){case 269:return e.contextNode.operatorToken.kind!==27;case 267:case 168:case 171:case 157:return!0;case 266:case 237:case 149:case 152:case 153:return e.currentTokenSpan.kind===74||e.nextTokenSpan.kind===74;case 148:return e.currentTokenSpan.kind===103||e.nextTokenSpan.kind===103||e.currentTokenSpan.kind===74||e.nextTokenSpan.kind===74;case 244:return e.currentTokenSpan.kind===103||e.nextTokenSpan.kind===61}return!1}function vL(e){return!AS(e)}function LQ(e){return!che(e)}function che(e){let n=e.contextNode.kind;return n===152||n===153||n===149||n===237||th(n)}function lhe(e){return!1}function uhe(e){return!lhe(e)}function dhe(e){return e.contextNode.kind===267||e.contextNode.kind===168}function AQ(e){return fhe(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())}function fhe(e){return phe(e.contextNode)}function phe(e){if(ghe(e))return!0;switch(e.kind){case 236:case 240:case 293:return!0}return!1}function mhe(e){switch(e.contextNode.kind){case 169:case 270:return!0}return!1}function wQ(e){return e.contextNode.kind===169||e.contextNode.kind===270}function ghe(e){switch(e.kind){case 274:case 163:case 172:return!0}return!1}function yhe(e){switch(e.currentTokenParent.kind){case 255:case 256:return!0;case 236:{let n=e.currentTokenParent.parent;if(!n||n.kind!==270)return!0}}return!1}function hhe(e){switch(e.contextNode.kind){case 253:case 256:case 243:case 244:case 246:case 245:case 255:return!0;default:return!1}}function The(e){return e.contextNode.kind===293}function Ls(e){return e.TokensAreOnSameLine()}function She(e){return!0}function RQ(e){return!_he(e)}function _he(e){switch(e.contextNode.kind){case 253:case 243:case 244:case 245:case 246:return!0;default:return!1}}function xhe(e){return!Ti(e.contextNode)||!Ud(e.contextNode.expression)||e.contextNode.expression.getText().includes(".")}function bhe(e,n){return{options:e,getRules:Che(),host:n}}var ZB;function Che(){return ZB===void 0&&(ZB=Ehe(XB())),ZB}function Dhe(e){let n=0;return e&1&&(n|=28),e&2&&(n|=96),e&28&&(n|=28),e&96&&(n|=96),n}function Ehe(e){let n=Phe(e);return r=>{let i=n[OQ(r.currentTokenSpan.kind,r.nextTokenSpan.kind)];if(i){let a=[],c=0;for(let u of i){let f=~Dhe(c);u.action&f&&yi(u.context,m=>m(r))&&(a.push(u),c|=u.action)}if(a.length)return a}}}function Phe(e){let n=new Array(ej*ej),r=new Array(n.length);for(let i of e){let a=i.leftTokenRange.isSpecific&&i.rightTokenRange.isSpecific;for(let c of i.leftTokenRange.tokens)for(let u of i.rightTokenRange.tokens){let f=OQ(c,u),m=n[f];m===void 0&&(m=n[f]=[]),Nhe(m,i.rule,a,r,f)}}return n}function OQ(e,n){return E.assert(e<=145&&n<=145,"Must compute formatting context from tokens"),e*ej+n}var RS=5,FL=31,ej=146,Fb=(u=>(u[u.StopRulesSpecific=0]="StopRulesSpecific",u[u.StopRulesAny=RS*1]="StopRulesAny",u[u.ContextRulesSpecific=RS*2]="ContextRulesSpecific",u[u.ContextRulesAny=RS*3]="ContextRulesAny",u[u.NoContextRulesSpecific=RS*4]="NoContextRulesSpecific",u[u.NoContextRulesAny=RS*5]="NoContextRulesAny",u))(Fb||{});function Nhe(e,n,r,i,a){let c=n.action&3?r?0:Fb.StopRulesAny:n.context!==vb?r?Fb.ContextRulesSpecific:Fb.ContextRulesAny:r?Fb.NoContextRulesSpecific:Fb.NoContextRulesAny,u=i[a]||0;e.splice(khe(u,c),0,n),i[a]=vhe(u,c)}function khe(e,n){let r=0;for(let i=0;i<=n;i+=RS)r+=e&FL,e>>=RS;return r}function vhe(e,n){let r=(e>>n&FL)+1;return E.assert((r&FL)===r,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),e&~(FL<<n)|r<<n}function Fhe(e,n,r,i=Qd(e,n)){let a=er(i,Oc);if(a&&(i=a.parent),i.getStart(e)<=n&&n<i.getEnd())return;r=r===null?void 0:r===void 0?Vs(n,e):r;let u=r&&rp(e.text,r.end),f=yq(i,e),m=Zr(u,f);return m&&Sr(m,y=>Tb(y,n)||n===y.end&&(y.kind===2||n===e.getFullWidth()))}function Ihe(e,n){let r={pos:0,end:e.text.length};return[{span:{start:0,length:e.text.length},newText:e.text}]}function Lhe(e,n,r,i,a,c){let u={pos:e.pos,end:e.end};return[{span:{start:u.pos,length:u.end-u.pos},newText:n.text.slice(u.pos,u.end)}]}var nj;(_=>{let e;(v=>v[v.Unknown=-1]="Unknown")(e||(e={}));function n(b,v,T,W=!1){return r(T)}_.getIndentation=n;function r(b){return b.baseIndentSize||0}_.getBaseIndentation=r;function i(b,v){return b.parent&&a(b.getStart(v),b.getEnd(),b.parent,v)}_.getContainingList=i;function a(b,v,T,W){switch(T.kind){case 166:return F(T.typeArguments);case 293:return F(T.properties);case 290:return F(T.elements);case 163:return F(T.members);case 169:case 270:case 271:case 154:case 156:return F(T.parameters);case 276:case 272:return F(T.arguments);case 238:return F(T.declarations);case 265:return F(T.elements)}function F(M){return M&&i$(c(T,M,W),b,v)?M:void 0}}function c(b,v,T){let W=b.getChildren(T);for(let F=1;F<W.length-1;F++)if(W[F].pos===v.pos&&W[F].end===v.end)return{pos:W[F-1].end,end:W[F+1].getStart(T)};return v}function u(b,v,T,W){let F=0,M=0;for(let J=b;J<v;J++){let A=T.text.charCodeAt(J);if(!Jl(A))break;A===9?M+=W.tabSize+M%W.tabSize:M++,F++}return{column:M,character:F}}_.findFirstNonWhitespaceCharacterAndColumn=u;function f(b,v,T,W){return u(b,v,T,W).column}_.findFirstNonWhitespaceColumn=f;function m(b,v,T,W,F){let M=T?T.kind:0;switch(v.kind){case 247:case 170:case 274:case 290:case 236:case 293:case 163:case 264:case 289:case 286:case 272:case 276:case 242:case 248:case 267:case 265:case 156:case 149:case 165:case 171:case 152:case 299:case 301:return!0;case 240:return b.indentSwitchCase??!0;case 237:case 174:case 269:if(!b.indentMultiLineObjectLiteralBeginningOnBlankLine&&W&&M===293)return S(W,T);if(v.kind!==269)return!0;break;case 245:case 246:case 244:case 243:case 253:case 169:case 270:case 154:return M!==236;case 271:return W&&M===289?S(W,T):M!==236;case 157:if(M===163||M===264)return!1;break}return F}_.nodeWillIndentChild=m;function y(b,v){switch(b){case 248:case 251:case 250:return v.kind!==236;default:return!1}}function g(b,v,T,W,F=!1){return m(b,v,T,W,!1)&&!(F&&T&&y(T.kind,v))}_.shouldIndentChildNode=g;function S(b,v){let T=eo(b.text,v.pos),W=b.getLineAndCharacterOfPosition(T).line,F=b.getLineAndCharacterOfPosition(v.end).line;return W===F}})(nj||(nj={}));var Xd={};cl(Xd,{getDocCommentTemplateAtPosition:()=>Khe,getJSDocParameterNameCompletionDetails:()=>Uhe,getJSDocParameterNameCompletions:()=>Whe,getJSDocTagCompletionDetails:()=>KQ,getJSDocTagCompletions:()=>Jhe,getJSDocTagNameCompletionDetails:()=>jhe,getJSDocTagNameCompletions:()=>Bhe,getJsDocCommentsFromDeclarations:()=>Ahe,getJsDocTagsFromDeclarations:()=>Ohe});var jQ=["abstract","access","alias","argument","async","augments","author","borrows","callback","class","classdesc","constant","constructor","constructs","copyright","default","deprecated","description","emits","enum","event","example","exports","extends","external","field","file","fileoverview","fires","function","generator","global","hideconstructor","host","ignore","implements","import","inheritdoc","inner","instance","interface","kind","lends","license","link","linkcode","linkplain","listens","member","memberof","method","mixes","module","name","namespace","overload","override","package","param","private","prop","property","protected","public","readonly","requires","returns","satisfies","see","since","static","summary","template","this","throws","todo","tutorial","type","typedef","var","variation","version","virtual","yields"],MQ,BQ;function Ahe(e,n){let r=[];return pB(e,i=>{for(let a of Rhe(i)){let c=Oc(a)&&a.tags&&Sr(a.tags,f=>f.kind===206&&(f.tagName.text==="inheritDoc"||f.tagName.text==="inheritdoc"));if(a.comment===void 0&&!c||Oc(a)&&i.kind!==225&&i.kind!==217&&a.tags&&a.tags.some(f=>f.kind===225||f.kind===217)&&!a.tags.some(f=>f.kind===220||f.kind===221))continue;let u=a.comment?Wh(a.comment,n):[];c&&c.comment&&(u=u.concat(Wh(c.comment,n))),Gr(r,u,whe)||r.push(u)}}),mu(Av(r,[Oh()]))}function whe(e,n){return Lv(e,n,(r,i)=>r.kind===i.kind&&r.text===i.text)}function Rhe(e){switch(e.kind){case 220:case 227:return[e];case 217:case 225:return[e,e.parent];case 202:if(uh(e.parent))return[e.parent.parent];default:return rF(e)}}function Ohe(e,n){let r=[];return pB(e,i=>{let a=cm(i);if(!(a.some(c=>c.kind===225||c.kind===217)&&!a.some(c=>c.kind===220||c.kind===221)))for(let c of a)r.push({name:c.tagName.text,text:UQ(c,n)}),r.push(...JQ(WQ(c),n))}),r}function JQ(e,n){return Oo(e,r=>Zr([{name:r.tagName.text,text:UQ(r,n)}],JQ(WQ(r),n)))}function WQ(e){return Eg(e)&&e.isNameFirst&&e.typeExpression&&e.typeExpression.type&&Jd(e.typeExpression.type)?e.typeExpression.type.jsDocPropertyTags:void 0}function Wh(e,n){return typeof e=="string"?[ac(e)]:Oo(e,r=>NH(r)?[ac(r.text)]:GG(r,n))}function UQ(e,n){let{comment:r,kind:i}=e,a=Mhe(i),c=[];switch(i){case 229:let m=e.typeExpression;return m?u(m):r===void 0?void 0:Wh(r,n);case 208:return u(e.class);case 207:return u(e.class);case 224:let y=e;if(y.constraint&&c.push(ac(y.constraint.getText())),gr(y.typeParameters)){gr(c)&&c.push(Ja());let S=y.typeParameters[y.typeParameters.length-1];Bn(y.typeParameters,_=>{c.push(a(_.getText())),S!==_&&c.push(Ec(27),Ja())})}return r&&c.push(Ja(),...Wh(r,n)),c;case 223:case 230:return u(e.typeExpression);case 225:case 217:case 227:case 220:case 226:let{name:g}=e;return g?c.push(...u(g)):r&&c.push(...Wh(r,n)),c;default:return r===void 0?void 0:Wh(r,n)}function u(m){return f(m.getText())}function f(m){return r?m.match(/^https?$/)?[ac(m),...Wh(r,n)]:[a(m),Ja(),...Wh(r,n)]:[ac(m)]}}function Mhe(e){switch(e){case 220:return LG;case 227:return AG;case 224:return QG;case 225:case 217:return $G;default:return ac}}function Bhe(){return MQ||(MQ=Yn(jQ,e=>({name:e,kind:"keyword",kindModifiers:"",sortText:Zg.SortText.LocationPriority})))}var jhe=KQ;function Jhe(){return BQ||(BQ=Yn(jQ,e=>({name:`@${e}`,kind:"keyword",kindModifiers:"",sortText:Zg.SortText.LocationPriority})))}function KQ(e){return{name:e,kind:"",kindModifiers:"",displayParts:[ac(e)],documentation:Re,tags:void 0,codeActions:void 0}}function Whe(e){if(!Sn(e.name))return Re;let n=e.name.text,r=e.parent,i=r.parent;return Ji(i)?Ei(i.parameters,a=>{if(!Sn(a.name))return;let c=a.name.text;if(!(r.tags.some(u=>u!==e&&hc(u)&&Sn(u.name)&&u.name.text===c)||n!==void 0&&!Eo(c,n)))return{name:c,kind:"parameter",kindModifiers:"",sortText:Zg.SortText.LocationPriority}}):[]}function Uhe(e){return{name:e,kind:"parameter",kindModifiers:"",displayParts:[ac(e)],documentation:Re,tags:void 0,codeActions:void 0}}function Khe(e,n,r,i){let a=Qd(n,r),c=er(a,Oc);if(c&&(c.comment!==void 0||gr(c.tags)))return;let u=a.getStart(n);if(!c&&u<r)return;let f=zhe(a,i);if(!f)return;let{commentOwner:m,parameters:y,hasReturn:g}=f,S=nc(m)&&m.jsDoc?m.jsDoc:void 0,_=Vo(S);if(m.getStart(n)<r||_&&c&&_!==c)return;let b=qhe(n,r),T=(y?Vhe(y||[],!1,b,e):"")+(g?Hhe(b,e):""),W="/**",F=" */",M=gr(cm(m))>0;if(T&&!M){let J=W+e+b+" * ",A=u===r?e+b:"";return{newText:J+e+T+b+F+A,caretOffset:J.length}}return{newText:W+F,caretOffset:3}}function qhe(e,n){let{text:r}=e,i=Ql(n,e),a=i;for(;a<=n&&Jl(r.charCodeAt(a));a++);return r.slice(i,a)}function Vhe(e,n,r,i){return e.map(({name:a,dotDotDotToken:c},u)=>{let f=a.kind===89?a.text:"param"+u;return`${r} * @param ${n?c?"{...any} ":"{any} ":""}${f}${i}`}).join("")}function Hhe(e,n){return`${e} * @returns${n}`}function zhe(e,n){return bq(e,r=>tj(r,n))}function tj(e,n){if(e)switch(e.kind){case 169:case 270:case 154:case 156:let r=e;return{commentOwner:e,parameters:r.parameters,hasReturn:IL(r,n)};case 174:return tj(e.initializer,n);case 153:return{commentOwner:e};case 242:{let c=e.declarationList.declarations,u=c.length===1&&c[0].initializer?Ghe(c[0].initializer):void 0;return u?{commentOwner:e,parameters:u.parameters,hasReturn:IL(u,n)}:{commentOwner:e}}case 176:return"quit";case 247:return tj(e.expression,n);case 269:{let a=e;return es(a)===0?"quit":Ji(a.right)?{commentOwner:e,parameters:a.right.parameters,hasReturn:IL(a.right,n)}:{commentOwner:e}}case 152:let i=e.initializer;if(i&&(fs(i)||zd(i)))return{commentOwner:e,parameters:i.parameters,hasReturn:IL(i,n)}}}function IL(e,n){return!!n?.generateReturnInDocTemplate&&(kg(e)||zd(e)&&Tc(e.body)||$c(e)&&e.body&&_c(e.body)&&!!cp(e.body,r=>r))}function Ghe(e){for(;e.kind===289;)e=e.expression;switch(e.kind){case 270:case 271:return e;case 274:E.fail("todo - class expression")}}var Tp={};cl(Tp,{ChangeTracker:()=>aj,LeadingTriviaOption:()=>HQ,TrailingTriviaOption:()=>zQ,applyChanges:()=>sj,assignPositionsToNode:()=>RL,createWriter:()=>$Q,deleteNode:()=>Im,isThisTypeAnnotatable:()=>Qhe,isValidLocationToAddComment:()=>QQ});function qQ(e){let n=e.__pos;return E.assert(typeof n=="number"),n}function rj(e,n){E.assert(typeof n=="number"),e.__pos=n}function VQ(e){let n=e.__end;return E.assert(typeof n=="number"),n}function ij(e,n){E.assert(typeof n=="number"),e.__end=n}var HQ=(a=>(a[a.Exclude=0]="Exclude",a[a.IncludeAll=1]="IncludeAll",a[a.JSDoc=2]="JSDoc",a[a.StartLine=3]="StartLine",a))(HQ||{}),zQ=(i=>(i[i.Exclude=0]="Exclude",i[i.ExcludeWhitespace=1]="ExcludeWhitespace",i[i.Include=2]="Include",i))(zQ||{});function GQ(e,n){return eo(e,n,!1,!0)}function $he(e,n){let r=n;for(;r<e.length;){let i=e.charCodeAt(r);if(Jl(i)){r++;continue}return i===47}return!1}var Ib={leadingTriviaOption:0,trailingTriviaOption:0};function Lb(e,n,r,i){return{pos:Lm(e,n,i),end:Uh(e,r,i)}}function Lm(e,n,r,i=!1){let{leadingTriviaOption:a}=r;if(a===0)return n.getStart(e);if(a===3){let S=n.getStart(e),_=Ql(S,e);return bb(n,_)?_:S}if(a===2){let S=jF(n,e.text);if(S?.length)return Ql(S[0].pos,e)}let c=n.getFullStart(),u=n.getStart(e);if(c===u)return u;let f=Ql(c,e);if(Ql(u,e)===f)return a===1?c:u;if(i){let S=Su(e.text,c)?.[0]||rp(e.text,c)?.[0];if(S)return eo(e.text,S.end,!0,!0)}let y=c>0?1:0,g=JF(Vx(e,f)+y,e);return g=GQ(e.text,g),JF(Vx(e,g),e)}function oj(e,n,r){let{end:i}=n,{trailingTriviaOption:a}=r;if(a===2){let c=rp(e.text,i);if(c){let u=Vx(e,n.end);for(let f of c){if(f.kind===2||Vx(e,f.pos)>u)break;if(Vx(e,f.end)>u)return eo(e.text,f.end,!0,!0)}}}}function Uh(e,n,r){let{end:i}=n,{trailingTriviaOption:a}=r;if(a===0)return i;if(a===1){let f=Zr(rp(e.text,i),Su(e.text,i)),m=f?.[f.length-1]?.end;return m||i}let c=oj(e,n,r);if(c)return c;let u=eo(e.text,i,!0);return u!==i&&(a===2||ds(e.text.charCodeAt(u-1)))?u:i}function AL(e,n){return!!n&&!!e.parent&&(n.kind===27||n.kind===26&&e.parent.kind===293)}function Qhe(e){return fs(e)||Is(e)}var aj=class e{constructor(n,r){this.newLineCharacter=n;this.formatContext=r;this.changes=[];this.classesWithNodesInsertedAtStart=new Map;this.deletedNodes=[]}static fromContext(n){return new e(Mh(n.host,n.formatContext.options),n.formatContext)}static with(n,r){let i=e.fromContext(n);return r(i),i.getChanges(n)}pushRaw(n,r){E.assertEqual(n.fileName,r.fileName);for(let i of r.textChanges)this.changes.push({kind:3,sourceFile:n,text:i.newText,range:YG(i.span)})}deleteRange(n,r){this.changes.push({kind:0,sourceFile:n,range:r})}delete(n,r){this.deletedNodes.push({sourceFile:n,node:r})}deleteNode(n,r,i={leadingTriviaOption:1}){this.deleteRange(n,Lb(n,r,r,i))}deleteNodes(n,r,i={leadingTriviaOption:1},a){for(let c of r){let u=Lm(n,c,i,a),f=Uh(n,c,i);this.deleteRange(n,{pos:u,end:f}),a=!!oj(n,c,i)}}deleteModifier(n,r){this.deleteRange(n,{pos:r.getStart(n),end:eo(n.text,r.end,!0)})}deleteNodeRange(n,r,i,a={leadingTriviaOption:1}){let c=Lm(n,r,a),u=Uh(n,i,a);this.deleteRange(n,{pos:c,end:u})}deleteNodeRangeExcludingEnd(n,r,i,a={leadingTriviaOption:1}){let c=Lm(n,r,a),u=i===void 0?n.text.length:Lm(n,i,a);this.deleteRange(n,{pos:c,end:u})}replaceRange(n,r,i,a={}){this.changes.push({kind:1,sourceFile:n,range:r,options:a,node:i})}replaceNode(n,r,i,a=Ib){this.replaceRange(n,Lb(n,r,r,a),i,a)}replaceNodeRange(n,r,i,a,c=Ib){this.replaceRange(n,Lb(n,r,i,c),a,c)}replaceRangeWithNodes(n,r,i,a={}){this.changes.push({kind:2,sourceFile:n,range:r,options:a,nodes:i})}replaceNodeWithNodes(n,r,i,a=Ib){this.replaceRangeWithNodes(n,Lb(n,r,r,a),i,a)}replaceNodeWithText(n,r,i){this.replaceRangeWithText(n,Lb(n,r,r,Ib),i)}replaceNodeRangeWithNodes(n,r,i,a,c=Ib){this.replaceRangeWithNodes(n,Lb(n,r,i,c),a,c)}nodeHasTrailingComment(n,r,i=Ib){return!!oj(n,r,i)}nextCommaToken(n,r){let i=rP(r,r.parent,n);return i&&i.kind===27?i:void 0}replacePropertyAssignment(n,r,i){let a=this.nextCommaToken(n,r)?"":","+this.newLineCharacter;this.replaceNode(n,r,i,{suffix:a})}insertNodeAt(n,r,i,a={}){this.replaceRange(n,dp(r),i,a)}insertNodesAt(n,r,i,a={}){this.replaceRangeWithNodes(n,dp(r),i,a)}insertNodeAtTopOfFile(n,r,i){this.insertAtTopOfFile(n,r,i)}insertNodesAtTopOfFile(n,r,i){this.insertAtTopOfFile(n,r,i)}insertAtTopOfFile(n,r,i){let a=iTe(n),c={prefix:a===0?void 0:this.newLineCharacter,suffix:(ds(n.text.charCodeAt(a))?"":this.newLineCharacter)+(i?this.newLineCharacter:"")};Nr(r)?this.insertNodesAt(n,a,r,c):this.insertNodeAt(n,a,r,c)}insertNodesAtEndOfFile(n,r,i){this.insertAtEndOfFile(n,r,i)}insertAtEndOfFile(n,r,i){let a=n.end+1,c={prefix:this.newLineCharacter,suffix:this.newLineCharacter+(i?this.newLineCharacter:"")};this.insertNodesAt(n,a,r,c)}insertStatementsInNewFile(n,r,i){this.newFileChanges||(this.newFileChanges=Js()),this.newFileChanges.add(n,{oldFile:i,statements:r})}insertFirstParameter(n,r,i){let a=ha(r);a?this.insertNodeBefore(n,a,i):this.insertNodeAt(n,r.pos,i)}insertNodeBefore(n,r,i,a=!1,c={}){this.insertNodeAt(n,Lm(n,r,c),i,this.getOptionsForInsertNodeBefore(r,i,a))}insertNodesBefore(n,r,i,a=!1,c={}){this.insertNodesAt(n,Lm(n,r,c),i,this.getOptionsForInsertNodeBefore(r,Uo(i),a))}insertModifierAt(n,r,i,a={}){this.insertNodeAt(n,r,Ge.createToken(i),a)}insertModifierBefore(n,r,i){return this.insertModifierAt(n,i.getStart(n),r,{suffix:" "})}insertCommentBeforeLine(n,r,i,a){let c=JF(r,n),u=XG(n.text,c),f=QQ(n,u),m=eP(n,f?u:i),y=n.text.slice(c,u),g=`${f?"":this.newLineCharacter}//${a}${this.newLineCharacter}${y}`;this.insertText(n,m.getStart(n),g)}insertJsdocCommentBefore(n,r,i){let a=r.getStart(n);if(r.jsDoc)for(let f of r.jsDoc)this.deleteRange(n,{pos:Ql(f.getStart(n),n),end:Uh(n,f,{})});let c=n$(n.text,a-1),u=n.text.slice(c,a);this.insertNodeAt(n,a,i,{suffix:this.newLineCharacter+u})}createJSDocText(n,r){let i=Oo(r.jsDoc,c=>gi(c.comment)?Ge.createJSDocText(c.comment):c.comment),a=AT(r.jsDoc);return a&&Du(a.pos,a.end,n)&&gr(i)===0?void 0:Ge.createNodeArray(Av(i,Ge.createJSDocText(`
70
+ `)))}replaceJSDocComment(n,r,i){this.insertJsdocCommentBefore(n,Yhe(r),Ge.createJSDocComment(this.createJSDocText(n,r),Ge.createNodeArray(i)))}addJSDocTags(n,r,i){let a=vT(r.jsDoc,u=>u.tags),c=i.filter(u=>!a.some((f,m)=>{let y=Xhe(f,u);return y&&(a[m]=y),!!y}));this.replaceJSDocComment(n,r,[...a,...c])}filterJSDocTags(n,r,i){this.replaceJSDocComment(n,r,Ar(vT(r.jsDoc,a=>a.tags),i))}replaceRangeWithText(n,r,i){this.changes.push({kind:3,sourceFile:n,range:r,text:i})}insertText(n,r,i){this.replaceRangeWithText(n,dp(r),i)}tryInsertTypeAnnotation(n,r,i){let a;if(Ji(r)){if(a=Yl(r,21,n),!a){if(!zd(r))return!1;a=Uo(r.parameters)}}else a=r.name;return this.insertNodeAt(n,a.end,i,{prefix:": "}),!0}tryInsertThisTypeAnnotation(n,r,i){let a=Yl(r,20,n).getStart(n)+1,c=r.parameters.length?", ":"";this.insertNodeAt(n,a,i,{prefix:"this: ",suffix:c})}insertTypeParameters(n,r,i){let a=(Yl(r,20,n)||Uo(r.parameters)).getStart(n);this.insertNodesAt(n,a,i,{prefix:"<",suffix:">",joiner:", "})}getOptionsForInsertNodeBefore(n,r,i){return im(n)?{suffix:i?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:xo(n)?{suffix:", "}:_o(n)?_o(r)?{suffix:", "}:{}:E.failBadSyntaxKind(n)}insertNodeAtEndOfScope(n,r,i){let a=Lm(n,r.getLastToken(),{});this.insertNodeAt(n,a,i,{prefix:ds(n.text.charCodeAt(r.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})}insertMemberAtStart(n,r,i){this.insertNodeAtStartWorker(n,r,i)}insertNodeAtObjectStart(n,r,i){this.insertNodeAtStartWorker(n,r,i)}insertNodeAtStartWorker(n,r,i){let a=this.guessIndentationFromExistingMembers(n,r)??this.computeIndentationForNewMember(n,r);this.insertNodeAt(n,LL(r).pos,i,this.getInsertNodeAtStartInsertOptions(n,r,a))}guessIndentationFromExistingMembers(n,r){let i,a=r;for(let c of LL(r)){if(aS(a,c,n))return;let u=c.getStart(n),f=Hs.SmartIndenter.findFirstNonWhitespaceColumn(Ql(u,n),u,n,this.formatContext.options);if(i===void 0)i=f;else if(f!==i)return;a=c}return i}computeIndentationForNewMember(n,r){let i=r.getStart(n);return Hs.SmartIndenter.findFirstNonWhitespaceColumn(Ql(i,n),i,n,this.formatContext.options)+(this.formatContext.options.indentSize??4)}getInsertNodeAtStartInsertOptions(n,r,i){let c=LL(r).length===0,u=Sm(this.classesWithNodesInsertedAtStart,ys(r),{node:r,sourceFile:n}),f=ms(r)&&(!Ch(n)||!c),m=ms(r)&&Ch(n)&&c&&!u;return{indentation:i,prefix:(m?",":"")+this.newLineCharacter,suffix:f?",":""}}insertNodeAfterComma(n,r,i){let a=this.insertNodeAfterWorker(n,this.nextCommaToken(n,r)||r,i);this.insertNodeAt(n,a,i,this.getInsertNodeAfterOptions(n,r))}insertNodeAfter(n,r,i){let a=this.insertNodeAfterWorker(n,r,i);this.insertNodeAt(n,a,i,this.getInsertNodeAfterOptions(n,r))}insertNodeAtEndOfList(n,r,i){this.insertNodeAt(n,r.end,i,{prefix:", "})}insertNodesAfter(n,r,i){let a=this.insertNodeAfterWorker(n,r,Uo(i));this.insertNodesAt(n,a,i,this.getInsertNodeAfterOptions(n,r))}insertNodeAfterWorker(n,r,i){return oTe(r,i)&&n.text.charCodeAt(r.end-1)!==59&&this.replaceRange(n,dp(r.end),Ge.createToken(26)),Uh(n,r,{})}getInsertNodeAfterOptions(n,r){let i=this.getInsertNodeAfterOptionsWorker(r);return{...i,prefix:r.end===n.end&&im(r)?i.prefix?`
71
+ ${i.prefix}`:`
72
+ `:i.prefix}}getInsertNodeAfterOptionsWorker(n){switch(n.kind){case 170:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 237:case 16:case 89:return{prefix:", "};case 174:return{suffix:","+this.newLineCharacter};case 149:return{};default:return E.assert(im(n)||mO(n)),{suffix:this.newLineCharacter}}}insertName(n,r,i){E.assert(!r.name);let a=Yl(r,r.kind===270?138:133,n).end;this.insertNodeAt(n,a,Ge.createIdentifier(i),{prefix:" "})}insertExportModifier(n,r){this.insertText(n,r.getStart(n),"export ")}insertNodeInListAfter(n,r,i,a=Hs.SmartIndenter.getContainingList(r,n)){if(!a){E.fail("node is not a list element");return}let c=Wx(a,r);if(c<0)return;let u=r.getEnd();if(c!==a.length-1){let f=Qd(n,r.end);if(f&&AL(r,f)){let m=a[c+1],y=GQ(n.text,m.getFullStart()),g=`${Ai(f.kind)}${n.text.substring(f.end,y)}`;this.insertNodesAt(n,y,[i],{suffix:g})}}else{let f=r.getStart(n),m=Ql(f,n),y,g=!1;if(a.length===1)y=27;else{let S=Vs(r.pos,n);y=AL(r,S)?S.kind:27,g=Ql(a[c-1].getStart(n),n)!==m}if(($he(n.text,r.end)||!Du(a.pos,a.end,n))&&(g=!0),g){this.replaceRange(n,dp(u),Ge.createToken(y));let S=Hs.SmartIndenter.findFirstNonWhitespaceColumn(m,f,n,this.formatContext.options),_=eo(n.text,u,!0,!1);for(;_!==u&&ds(n.text.charCodeAt(_-1));)_--;this.replaceRange(n,dp(_),i,{indentation:S,prefix:this.newLineCharacter})}else this.replaceRange(n,dp(u),i,{prefix:`${Ai(y)} `})}}parenthesizeExpression(n,r){this.replaceRange(n,WF(r),Ge.createParenthesizedExpression(r))}finishClassesWithNodesInsertedAtStart(){this.classesWithNodesInsertedAtStart.forEach(({node:n,sourceFile:r})=>{let[i,a]=eTe(n,r);if(i!==void 0&&a!==void 0){let c=LL(n).length===0,u=Du(i,a,r);c&&u&&i!==a-1&&this.deleteRange(r,dp(i,a-1)),u&&this.insertText(r,a-1,this.newLineCharacter)}})}finishDeleteDeclarations(){let n=new Set;for(let{sourceFile:r,node:i}of this.deletedNodes)this.deletedNodes.some(a=>a.sourceFile===r&&t$(a.node,i))||(Nr(i)?this.deleteRange(r,UF(r,i)):cj.deleteDeclaration(this,n,r,i));n.forEach(r=>{let i=r.getSourceFile(),a=Hs.SmartIndenter.getContainingList(r,i);if(r!==ta(a))return;let c=bD(a,u=>!n.has(u),a.length-2);c!==-1&&this.deleteRange(i,{pos:a[c].end,end:lj(i,a[c+1])})})}getChanges(n,r){let c=n.host.getCompilationSettings()?.driverType;this.finishDeleteDeclarations(),this.finishClassesWithNodesInsertedAtStart();let u=wL.getTextChangesFromChanges(this.changes,this.newLineCharacter,this.formatContext,r);return this.newFileChanges&&this.newFileChanges.forEach((f,m)=>{u.push(wL.newFileChanges(m,f,this.newLineCharacter,this.formatContext,c))}),u}createNewFile(n,r,i){this.insertStatementsInNewFile(r,i,n)}};function Yhe(e){if(e.kind!==271)return e;let n=e.parent.kind===152?e.parent:e.parent.parent;return n.jsDoc=e.jsDoc,n}function Xhe(e,n){if(e.kind===n.kind)switch(e.kind){case 220:{let r=e,i=n;return Sn(r.name)&&Sn(i.name)&&r.name.text===i.name.text?Ge.createJSDocParameterTag(void 0,i.name,!1,i.typeExpression,i.isNameFirst,r.comment):void 0}case 221:return Ge.createJSDocReturnTag(void 0,n.typeExpression,e.comment);case 223:return Ge.createJSDocTypeTag(void 0,n.typeExpression,e.comment)}}function lj(e,n){return eo(e.text,Lm(e,n,{leadingTriviaOption:1}),!1,!0)}function Zhe(e,n,r,i){let a=lj(e,i);if(r===void 0||Du(Uh(e,n,{}),a,e))return a;let c=Vs(i.getStart(e),e);if(AL(n,c)){let u=Vs(n.getStart(e),e);if(AL(r,u)){let f=eo(e.text,c.getEnd(),!0,!0);if(Du(u.getStart(e),c.getStart(e),e))return ds(e.text.charCodeAt(f-1))?f-1:f;if(ds(e.text.charCodeAt(f)))return f}}return a}function eTe(e,n){let r=Yl(e,17,n),i=Yl(e,19,n);return[r?.end,i?.end]}function LL(e){return ms(e)?e.properties:e.members}var wL;(u=>{function e(f,m,y,g){return Ei(zK(f,S=>S.sourceFile.path),S=>{let _=S[0].sourceFile,b=xf(S,(T,W)=>T.range.pos-W.range.pos||T.range.end-W.range.end);for(let T=0;T<b.length-1;T++)E.assert(b[T].range.end<=b[T+1].range.pos,"Changes overlap",()=>`${JSON.stringify(b[T].range)} and ${JSON.stringify(b[T+1].range)}`);let v=Ei(b,T=>{let W=vS(T.range),F=T.kind===1?$t(ks(T.node))??T.sourceFile:T.kind===2?$t(ks(T.nodes[0]))??T.sourceFile:T.sourceFile,M=i(T,F,_,m,y,g);if(!(W.length===M.length&&r$(F.text,M,W.start)))return mB(W,M)});return v.length>0?{fileName:_.fileName,textChanges:v}:void 0})}u.getTextChangesFromChanges=e;function n(f,m,y,g,S){let _=r(Cq(f),S,m,y,g);return{fileName:f,textChanges:[mB(Rc(0,0),_)],isNewFile:!0}}u.newFileChanges=n;function r(f,m,y,g,S){let _=Oo(y,T=>T.statements.map(W=>W===4?"":c(W,T.oldFile,g).text)).join(g),b=rb("any file name",_,{languageVersion:1,jsDocParsingMode:1,fileHandler:void 0},!0,f,m),v=Hs.formatDocument(b,S);return sj(_,v)+g}u.newFileChangesWorker=r;function i(f,m,y,g,S,_){if(f.kind===0)return"";if(f.kind===3)return f.text;let{options:b={},range:{pos:v}}=f,T=M=>a(M,m,y,v,b,g,S,_),W=f.kind===2?f.nodes.map(M=>mg(T(M),g)).join(f.options?.joiner||g):T(f.node),F=b.indentation!==void 0||Ql(v,m)===v?W:W.replace(/^\s+/,"");return(b.prefix||"")+F+(!b.suffix||Ps(F,b.suffix)?"":b.suffix)}function a(f,m,y,g,{indentation:S,prefix:_,delta:b},v,T,W){let{node:F,text:M}=c(f,m,v);W&&W(F,M);let J=nP(T,m),A=S!==void 0?S:Hs.SmartIndenter.getIndentation(g,y,J,_===v||Ql(g,m)===g);b===void 0&&(b=Hs.SmartIndenter.shouldIndentChildNode(J,f)&&J.indentSize||0);let V={text:M,fileName:void 0,getLineAndCharacterOfPosition(ye){return ma(this,ye)}},ue=Hs.formatNodeGivenIndentation(F,V,m.languageVariant,A,b,{...T,options:J});return sj(M,ue)}function c(f,m,y){let g=$Q(y),S=Cb(y);return vm({newLine:S,neverAsciiEscape:!0,preserveSourceNewlines:!0,terminateUnterminatedLiterals:!0},g).writeNode(4,f,m,g),{text:g.getText(),node:RL(f)}}u.getNonformattedText=c})(wL||(wL={}));function sj(e,n){for(let r=n.length-1;r>=0;r--){let{span:i,newText:a}=n[r];e=`${e.substring(0,i.start)}${a}${e.substring(rd(i))}`}return e}function nTe(e){return eo(e,0)===e.length}var tTe={...ub,factory:nb(ub.factory.flags|1,ub.factory.baseFactory)};function RL(e){let n=Hg(e,RL,tTe,rTe,RL),r=Zi(n)?n:Object.create(n);return ns(r,qQ(e),VQ(e)),r}function rTe(e,n,r,i,a){let c=Vg(e,n,r,i,a);if(!c)return c;E.assert(e);let u=c===e?Ge.createNodeArray(c.slice(0)):c;return ns(u,qQ(e),VQ(e)),u}function $Q(e){let n=0,r=bh(e),i=me=>{me&&rj(me,n)},a=me=>{me&&ij(me,n)},c=me=>{me&&rj(me,n)},u=me=>{me&&ij(me,n)},f=me=>{me&&rj(me,n)},m=me=>{me&&ij(me,n)};function y(me,Se){if(Se||!nTe(me)){n=r.getTextPos();let _n=0;for(;Tu(me.charCodeAt(me.length-_n-1));)_n++;n-=_n}}function g(me){r.write(me),y(me,!1)}function S(me){r.writeComment(me)}function _(me){r.writeKeyword(me),y(me,!1)}function b(me){r.writeOperator(me),y(me,!1)}function v(me){r.writePunctuation(me),y(me,!1)}function T(me){r.writeTrailingSemicolon(me),y(me,!1)}function W(me){r.writeParameter(me),y(me,!1)}function F(me){r.writeProperty(me),y(me,!1)}function M(me){r.writeSpace(me),y(me,!1)}function J(me){r.writeStringLiteral(me),y(me,!1)}function A(me,Se){r.writeSymbol(me,Se),y(me,!1)}function V(me){r.writeLine(me)}function ue(){r.increaseIndent()}function ye(){r.decreaseIndent()}function he(){return r.getText()}function ce(me){r.rawWrite(me),y(me,!1)}function Ee(me){r.writeLiteral(me),y(me,!0)}function Fe(){return r.getTextPos()}function be(){return r.getLine()}function de(){return r.getColumn()}function Ae(){return r.getIndent()}function G(){return r.isAtStartOfLine()}function Qe(){r.clear(),n=0}return{onBeforeEmitNode:i,onAfterEmitNode:a,onBeforeEmitNodeArray:c,onAfterEmitNodeArray:u,onBeforeEmitToken:f,onAfterEmitToken:m,write:g,writeComment:S,writeKeyword:_,writeOperator:b,writePunctuation:v,writeTrailingSemicolon:T,writeParameter:W,writeProperty:F,writeSpace:M,writeStringLiteral:J,writeSymbol:A,writeLine:V,increaseIndent:ue,decreaseIndent:ye,getText:he,rawWrite:ce,writeLiteral:Ee,getTextPos:Fe,getLine:be,getColumn:de,getIndent:Ae,isAtStartOfLine:G,hasTrailingComment:()=>r.hasTrailingComment(),hasTrailingWhitespace:()=>r.hasTrailingWhitespace(),clear:Qe}}function iTe(e){let n;for(let y of e.statements)if(dE(y))n=y;else break;let r=0,i=e.text;if(n)return r=n.end,m(),r;let a=ux(i);a!==void 0&&(r=a.length,m());let c=Su(i,r);if(!c)return r;let u,f;for(let y of c){if(y.kind===3&&Hx(i,y.pos)){u={range:y,pinnedOrTripleSlash:!0};continue}if(u){if(u.pinnedOrTripleSlash)break;let g=e.getLineAndCharacterOfPosition(y.pos).line,S=e.getLineAndCharacterOfPosition(u.range.end).line;if(g>=S+2)break}if(e.statements.length){f===void 0&&(f=e.getLineAndCharacterOfPosition(e.statements[0].getStart()).line);let g=e.getLineAndCharacterOfPosition(y.end).line;if(f<g+2)break}u={range:y,pinnedOrTripleSlash:!1}}return u&&(r=u.range.end,m()),r;function m(){if(r<i.length){let y=i.charCodeAt(r);ds(y)&&(r++,r<i.length&&y===13&&i.charCodeAt(r)===10&&r++)}}}function QQ(e,n){return!Xg(e,n)&&!hp(e,n)&&!o$(e,n)}function oTe(e,n){return(Ff(e)||Tl(e))&&mO(n)||wD(e)&&wD(n)}var cj;(r=>{function e(i,a,c,u){switch(u.kind){case 149:{let y=u.parent;zd(y)&&y.parameters.length===1&&!Yl(y,20,c)?i.replaceNodeWithText(c,u,"()"):fP(i,a,c,u);break}case 266:let f=u.parent;f.kind===265&&u!==ta(f.elements)?Im(i,c,u):fP(i,a,c,u);break;case 237:n(i,a,c,u);break;case 148:fP(i,a,c,u);break;case 26:Im(i,c,u,{trailingTriviaOption:0});break;case 138:Im(i,c,u,{leadingTriviaOption:0});break;case 170:case 169:Im(i,c,u,{leadingTriviaOption:nc(u)?2:3});break;default:u.parent&&ao(u.parent)&&Gr(u.parent.arguments,u)?fP(i,a,c,u):Im(i,c,u)}}r.deleteDeclaration=e;function n(i,a,c,u){let{parent:f}=u;if(f.declarations.length!==1){fP(i,a,c,u);return}let m=f.parent;switch(m.kind){case 244:break;case 243:Im(i,c,f);break;case 242:Im(i,c,m,{leadingTriviaOption:nc(m)?2:3});break;default:E.assertNever(m)}}})(cj||(cj={}));function Im(e,n,r,i={leadingTriviaOption:1}){let a=Lm(n,r,i),c=Uh(n,r,i);e.deleteRange(n,{pos:a,end:c})}function fP(e,n,r,i){let a=E.checkDefined(Hs.SmartIndenter.getContainingList(i,r)),c=Wx(a,i);if(E.assert(c!==-1),a.length===1){Im(e,r,i);return}E.assert(!n.has(i),"Deleting a node twice"),n.add(i),e.deleteRange(r,{pos:lj(r,i),end:c===a.length-1?Uh(r,i,{}):Zhe(r,i,a[c-1],a[c+1])})}var Nb={};cl(Nb,{createImportSpecifierResolver:()=>aTe,getNoopSymbolTrackerWithResolver:()=>cTe});function aTe(e,n,r,i){let a=YQ(n.getTypeChecker(),e,n.getCompilerOptions());return{getModuleSpecifierForBestExportInfo:c};function c(u,f,m,y){let{fixes:g,computedWithoutCacheCount:S}=sTe(u,f,m,!1,n,e,r,i,a,y),_=void 0;return _&&{..._,computedWithoutCacheCount:S}}}function YQ(e,n,r){let i;for(let a of n.imports){let c=Tq(a);if(Sq(c.parent)){let u=e.resolveExternalModuleName(a);u&&(i||(i=Js())).add(so(u),c.parent)}}return{getImportsForExportInfo:({moduleSymbol:a,exportKind:c,targetFlags:u,symbol:f})=>{let m=i?.get(so(a));if(!m)return Re;let y=1;return m.map(g=>({declaration:g,importKind:y,symbol:f,targetFlags:u}))}}}function sTe(e,n,r,i,a,c,u,f,m=hq(c)?YQ(a.getTypeChecker(),c,a.getCompilerOptions()):void 0,y){return{computedWithoutCacheCount:0,fixes:Re}}function cTe(e){return{trackSymbol:()=>!1,moduleResolverHost:u$(e.program,e.host)}}var Bh={};cl(Bh,{findContainingList:()=>dj,getArgumentInfoForCompletions:()=>lTe,getSignatureHelpItems:()=>yTe,rangeContainsRange:()=>OL,startEndContainsRange:()=>nY});function lTe(e,n,r,i){let a=XQ(e,n,r,i);return!a||a.isTypeParameterList||a.invocation.kind!==0?void 0:{invocation:a.invocation.node,argumentCount:a.argumentCount,argumentIndex:a.argumentIndex}}function XQ(e,n,r,i){let{parent:a}=e;if(Md(a)){let c=a,u=ZQ(e,n,r,i);if(!u)return;let{list:f,argumentIndex:m,argumentCount:y,argumentsSpan:g}=u,S=!1;return{isTypeParameterList:S,invocation:{kind:0,node:c},argumentsSpan:g,argumentIndex:m,argumentCount:y}}else{if(NI(e))return;{let c=m$(e,r);if(c){let{called:u,nTypeArguments:f}=c,m={kind:1,called:u},y=Sc(u.getStart(r),e.end);return{isTypeParameterList:!0,invocation:m,argumentsSpan:y,argumentIndex:f,argumentCount:f+1}}return}}}function ZQ(e,n,r,i){let a=uTe(e,r,i);if(!a)return;let{list:c,argumentIndex:u}=a,f=fTe(i,c),m=pTe(c,r);return{list:c,argumentIndex:u,argumentCount:f,argumentsSpan:m}}function uTe(e,n,r){if(e.kind===29||e.kind===20)return{list:mTe(e.parent,e,n),argumentIndex:0};{let i=dj(e);return i&&{list:i,argumentIndex:dTe(r,i,e)}}}function dTe(e,n,r){return eY(e,n,r)}function fTe(e,n){return eY(e,n,void 0)}function eY(e,n,r){let i=n.getChildren(),a=0,c=!1;for(let u of i){if(r&&u===r)return!c&&u.kind===27&&a++,a;if(kI(u)){a+=gTe(u,e),c=!0;continue}if(u.kind!==27){a++,c=!0;continue}if(c){c=!1;continue}a++}return r?a:i.length&&ta(i).kind===27?a+1:a}function pTe(e,n){let r=e.getFullStart(),i=eo(n.text,e.getEnd(),!1);return Rc(r,i-r)}function mTe(e,n,r){let i=e.getChildren(r),a=i.indexOf(n);return E.assert(a>=0&&i.length>a+1),i[a+1]}function dj(e){return TS(e)?e:Sr(e.parent.getChildren(),r=>TS(r)&&OL(r,e))}function OL(e,n){return nY(e.pos,e.end,n)}function nY(e,n,r){return e<=r.pos&&n>=r.end}function gTe(e,n){let r=n.getTypeAtLocation(e.expression);return 0}function yTe(e,n,r,i,a){let c=e.getTypeChecker(),u=T$(n,r);if(!u)return;let f=!!i&&i.kind==="characterTyped";if(f&&(hp(n,r,u)||Xg(n,r)))return;let m=!!i&&i.kind==="invoked",y=bTe(u,r,n,c,m);if(!y)return;a.throwIfCancellationRequested();let g=DTe(y,c,n,u,f);return a.throwIfCancellationRequested(),g?c.runWithCancellationToken(a,S=>g.kind===0?aY(g.candidates,g.resolvedSignature,y,n,S):PTe(g.symbol,y,n,S)):ETe(y,e,a)}function hTe(e,n,r,i){let a=STe(e);if(a===void 0)return;let c=_Te(a,r,n,i);if(c===void 0)return;let{contextualType:u,argumentIndex:f,argumentCount:m,argumentsSpan:y}=c,g=u.getNonNullableType(),S=g.symbol;if(S===void 0)return;let _=Vo(g.getCallSignatures());return _===void 0?void 0:{isTypeParameterList:!1,invocation:{kind:2,signature:_,node:e,symbol:TTe(S)},argumentsSpan:y,argumentIndex:f,argumentCount:m}}function TTe(e){return e.name==="__type"&&Ns(e.declarations,n=>kg(n)?Wo(n.parent,ip)?.symbol:void 0)||e}function STe(e){switch(e.kind){case 20:case 27:return e;default:return er(e.parent,n=>_o(n)?!0:To(n)||hS(n)?!1:"quit")}}function _Te(e,n,r,i){let{parent:a}=e;switch(a.kind){case 289:case 154:case 270:case 271:let c=ZQ(e,r,n,i);if(!c)return;let{argumentIndex:u,argumentCount:f,argumentsSpan:m}=c,y=cb(a)?i.getContextualTypeForObjectLiteralElement(a):i.getContextualType(a);return y&&{contextualType:y,argumentIndex:u,argumentCount:f,argumentsSpan:m};case 269:{let g=tY(a),S=i.getContextualType(g),_=e.kind===20?0:uj(a)-1,b=uj(g);return S&&{contextualType:S,argumentIndex:_,argumentCount:b,argumentsSpan:md(a)}}default:return}}function xTe(e,n,r,i){return hTe(e,n,r,i)||XQ(e,n,r,i)}function tY(e){return br(e.parent)?tY(e.parent):e}function uj(e){return br(e.left)?uj(e.left)+1:2}function bTe(e,n,r,i,a){for(let c=e;!Vr(c)&&(a||!_c(c));c=c.parent){E.assert(OL(c.parent,c),"Not a subspan",()=>`Child: ${E.formatSyntaxKind(c.kind)}, parent: ${E.formatSyntaxKind(c.parent.kind)}`);let u=xTe(c,n,r,i);if(u)return u}}function rY(e,n,r){let i=e.getFullStart(),a=e.parent;for(;a;){let c=Vs(i,n,a,!0);if(c)return OL(r,c);a=a.parent}return E.fail("Could not find preceding token")}function CTe(e,n,r){if(!Md(n))return!1;let i=n.getChildren(r);switch(e.kind){case 20:return Gr(i,e);case 27:{let a=dj(e);return!!a&&Gr(i,a)}case 29:return rY(e,r,n.expression);default:return!1}}function DTe({invocation:e,argumentCount:n},r,i,a,c){switch(e.kind){case 0:{if(c&&!CTe(a,e.node,i))return;let u=[],f=r.getResolvedSignatureForSignatureHelp(e.node,u,n);return u.length===0?void 0:{kind:0,candidates:u,resolvedSignature:f}}case 1:{let{called:u}=e;if(c&&!rY(a,i,Sn(u)?u.parent:u))return;let f=S$(u,n,r);if(f.length!==0)return{kind:0,candidates:f,resolvedSignature:Uo(f)};let m=r.getSymbolAtLocation(u);return m&&{kind:1,symbol:m}}case 2:return{kind:0,candidates:[e.signature],resolvedSignature:e.signature};default:return E.assertNever(e)}}function iY(e){return e.kind===0?Mx(e.node):e.called}function oY(e){return e.kind===0?e.node:e.kind===1?e.called:e.node}function ETe(e,n,r){if(e.invocation.kind===2)return;let i=iY(e.invocation),a=i&&Ti(i)?i.name.text:void 0,c=n.getTypeChecker();return a===void 0?void 0:Ns(n.getSourceFiles(),u=>Ns(u.getNamedDeclarations().get(a),f=>{let m=f.symbol&&c.getTypeOfSymbolAtLocation(f.symbol,f),y=m&&m.getCallSignatures();if(y&&y.length)return c.runWithCancellationToken(r,g=>aY(y,y[0],e,u,g,!0))}))}var pP=70246400;function aY(e,n,{isTypeParameterList:r,argumentCount:i,argumentsSpan:a,invocation:c,argumentIndex:u},f,m,y){let g=oY(c),S=c.kind===2?c.symbol:m.getSymbolAtLocation(iY(c))||y&&n.declaration?.symbol,_=S?PS(m,S,y?f:void 0,void 0):Re,b=Yn(e,M=>kTe(M,_,r,m,g,f)),v=0,T=0;for(let M=0;M<b.length;M++){let J=b[M];if(e[M]===n&&(v=T,J.length>1)){let A=0;for(let V of J){if(V.isVariadic||V.parameters.length>=i){v=T+A;break}A++}}T+=J.length}E.assert(v!==-1);let W={items:vT(b,Ci),applicableSpan:a,selectedItemIndex:v,argumentIndex:u,argumentCount:i},F=W.items[v];if(F.isVariadic){let M=zc(F.parameters,J=>!!J.isRest);-1<M&&M<F.parameters.length-1?W.argumentIndex=F.parameters.length:W.argumentIndex=Math.min(W.argumentIndex,F.parameters.length-1)}return W}function PTe(e,{argumentCount:n,argumentsSpan:r,invocation:i,argumentIndex:a},c,u){let f=u.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e);return f?{items:[NTe(e,f,u,oY(i),c)],applicableSpan:r,selectedItemIndex:0,argumentIndex:a,argumentCount:n}:void 0}function NTe(e,n,r,i,a){let c=PS(r,e),u=zg(),f=n.map(S=>cY(S,r,i,a,u)),m=e.getDocumentationComment(r),y=e.getJsDocTags(r);return{isVariadic:!1,prefixDisplayParts:[...c,Ec(29)],suffixDisplayParts:[Ec(32)],separatorDisplayParts:sY,parameters:f,documentation:m,tags:y}}var sY=[Ec(27),Ja()];function kTe(e,n,r,i,a,c){let u=(r?LTe:vTe)(e,i,a,c);return Yn(u,({isVariadic:f,parameters:m,prefix:y,suffix:g})=>{let S=[...n,...y],_=[...g,...ITe(e,a,i)],b=e.getDocumentationComment(i),v=e.getJsDocTags();return{isVariadic:f,prefixDisplayParts:S,suffixDisplayParts:_,separatorDisplayParts:sY,parameters:m,documentation:b,tags:v}})}function vTe(e,n,r,i){let a=zg(),c=wf(m=>{if(e.typeParameters&&e.typeParameters.length){let y=Ge.createNodeArray(e.typeParameters.map(g=>n.typeParameterToDeclaration(g,r,pP)));a.writeList(53776,y,i,m)}}),u=n.getExpandedParameters(e),f=n.hasEffectiveRestParameter(e)?u.length===1?m=>!0:m=>!!(m.length&&Wo(m[m.length-1],ym)?.links.checkFlags&32768):m=>!1;return u.map(m=>({isVariadic:f(m),parameters:m.map(y=>FTe(y,n,r,i,a)),prefix:[...c,Ec(20)],suffix:[Ec(21)]}))}function FTe(e,n,r,i,a){let c=wf(m=>{let y=n.symbolToParameterDeclaration(e,r,pP);a.writeNode(4,y,i,m)}),u=n.isOptionalParameter(e.valueDeclaration),f=ym(e)&&!!(e.links.checkFlags&32768);return{name:e.name,documentation:e.getDocumentationComment(n),displayParts:c,isOptional:u,isRest:f}}function ITe(e,n,r){return wf(i=>{i.writePunctuation(":"),i.writeSpace(" ");let a=r.getTypePredicateOfSignature(e);a?r.writeTypePredicate(a,n,void 0,i):r.writeType(r.getReturnTypeOfSignature(e),n,void 0,i)})}function cY(e,n,r,i,a){let c=wf(u=>{let f=n.typeParameterToDeclaration(e,r,pP);a.writeNode(4,f,i,u)});return{name:e.symbol.name,documentation:e.symbol.getDocumentationComment(n),displayParts:c,isOptional:!1,isRest:!1}}function LTe(e,n,r,i){let a=(e.target||e).typeParameters,c=zg(),u=(a||Re).map(m=>cY(m,n,r,i,c)),f=e.thisParameter?[n.symbolToParameterDeclaration(e.thisParameter,r,pP)]:[];return n.getExpandedParameters(e).map(m=>{let y=Ge.createNodeArray([...f,...Yn(m,S=>n.symbolToParameterDeclaration(S,r,pP))]),g=wf(S=>{c.writeList(2576,y,i,S)});return{isVariadic:!1,parameters:u,prefix:[Ec(29)],suffix:[Ec(32),...g]}})}var yL={};cl(yL,{getNavigationBarItems:()=>wTe,getNavigationTree:()=>RTe});var ATe=/\s+/g,pj=150,WL,Rb,mP=[],gd,pY=[],wb,mj=[];function wTe(e,n){WL=n,Rb=e;try{return Yn(UTe(yY(e)),KTe)}finally{mY()}}function RTe(e,n){WL=n,Rb=e;try{return TY(yY(e))}finally{mY()}}function mY(){Rb=void 0,WL=void 0,mP=[],gd=void 0,mj=[]}function gP(e){return Ab(e.getText(Rb))}function jL(e){return e.node.kind}function gY(e,n){e.children?e.children.push(n):e.children=[n]}function yY(e){E.assert(!mP.length);let n={node:e,name:void 0,additionalNodes:void 0,parent:void 0,children:void 0,indent:0};gd=n;for(let r of e.statements)yP(r);return UL(),E.assert(!gd&&!mP.length),n}function fj(e,n){gY(gd,hY(e,n))}function hY(e,n){return{node:e,name:n||(ad(e)||Tc(e)?ci(e):void 0),additionalNodes:void 0,parent:gd,children:void 0,indent:gd.indent+1}}function OTe(e){wb||(wb=new Map),wb.set(e,!0)}function Tj(e,n){let r=hY(e,n);gY(gd,r),mP.push(gd),pY.push(wb),wb=void 0,gd=r}function UL(){gd.children&&(JL(gd.children,gd),Sj(gd.children)),gd=mP.pop(),wb=pY.pop()}function BL(e,n,r){Tj(e,r),yP(n),UL()}function lY(e){e.initializer&&qTe(e.initializer)?(Tj(e),No(e.initializer,yP),UL()):BL(e,e.initializer)}function MTe(e){let n=ci(e);if(n===void 0)return!1;if(ps(n)){let r=n.expression;return Ks(r)||yu(r)||hg(r)||Bc(r)}return!!n}function yP(e){if(WL.throwIfCancellationRequested(),!(!e||VT(e)))switch(e.kind){case 152:MTe(e)&&lY(e);break;case 175:BL(e,e.name);break;case 266:case 174:case 237:{let r=e;Po(r.name)?yP(r.name):lY(r);break}case 169:let n=e.name;n&&Sn(n)&&OTe(n.text),BL(e,e.body);break;case 283:case 270:BL(e,e.body);break;case 274:Tj(e),console.warn("TOdo - class expr inherits"),UL();break;case 171:case 150:case 239:fj(e);break;case 179:fj(e);break;case 272:case 269:default:nc(e)&&Bn(e.jsDoc,r=>{Bn(r.tags,i=>{jd(i)&&fj(i)})}),No(e,yP)}}function JL(e,n){let r=new Map;Iv(e,(i,a)=>{let c=i.name||ci(i.node),u=c&&gP(c);if(!u)return!0;let f=r.get(u);if(!f)return r.set(u,i),!0;if(f instanceof Array){for(let m of f)if(uY(m,i,a,n))return!1;return f.push(i),!0}else{let m=f;return uY(m,i,a,n)?!1:(r.set(u,[m,i]),!0)}})}var ML={5:!0,3:!0,7:!0,9:!0,0:!1,1:!1,2:!1,8:!1,6:!0,4:!1};function BTe(e,n,r,i){function a(f){return fs(f)||Is(f)||xo(f)}let c=br(n.node)||ao(n.node)?es(n.node):0,u=br(e.node)||ao(e.node)?es(e.node):0;if(ML[c]&&ML[u]||a(e.node)&&ML[c]||a(n.node)&&ML[u]){let f=e.additionalNodes&&Vo(e.additionalNodes)||e.node;!sb(e.node)&&!sb(n.node)||a(e.node)||a(n.node)?(E.fail("no class decl"),(a(e.node)?e.node:a(n.node)?n.node:void 0)!==void 0?E.fail("no ctor"):(e.children||n.children)&&(e.children=Zr(e.children||[{...e}],n.children||[n]),e.children&&(JL(e.children,e),Sj(e.children)))):(e.children=Zr(e.children,n.children),e.children&&JL(e.children,e));let m=n.node;return i.children[r-1].node.end===f.end?Ea(f,{pos:f.pos,end:m.end}):E.fail("no class decl"),!0}return c!==0}function uY(e,n,r,i){return BTe(e,n,r,i)?!0:jTe(e.node,n.node,i)?(JTe(e,n),!0):!1}function jTe(e,n,r){if(e.kind!==n.kind||e.parent!==n.parent&&!(dY(e,r)&&dY(n,r)))return!1;switch(e.kind){case 152:default:return!0}}function dY(e,n){let r=e.parent;return r===n.node||Gr(n.additionalNodes,r)}function JTe(e,n){e.additionalNodes=e.additionalNodes||[],e.additionalNodes.push(n.node),n.additionalNodes&&e.additionalNodes.push(...n.additionalNodes),e.children=Zr(e.children,n.children),e.children&&(JL(e.children,e),Sj(e.children))}function Sj(e){e.sort(WTe)}function WTe(e,n){return xD(fY(e.node),fY(n.node))||io(jL(e),jL(n))}function fY(e){let n=ci(e);if(n&&om(n)){let r=Rg(n);return r&&r}switch(e.kind){case 270:case 274:case 283:return _Y(e);default:return}}function gj(e,n){if(n){let r=Sn(n)?n.text:rc(n)?`[${gP(n.argumentExpression)}]`:gP(n);if(r.length>0)return Ab(r)}switch(e.kind){case 176:let r=e;return dI(r)?`"${sp(hs(bu(Qr(r.fileName))))}"`:"<global>";case 179:return e.name.text;case 283:let i=S9(e.parent);if(i&&ao(i)){let a=_j(i.expression);return a?`${a}() callback (::)`:"<anonymous>"}case 169:case 270:case 274:return _Y(e);case 151:return"()";case 150:return"[]";default:return"<unknown>"}}function UTe(e){let n=[];function r(a){if(i(a)&&(n.push(a),a.children))for(let c of a.children)r(c)}return r(e),n;function i(a){if(a.children)return!0;switch(jL(a)){case 274:case 176:case 225:case 217:case 179:return!0;case 169:case 270:return c(a);default:return!1}function c(u){if(!u.node.body)return!1;switch(jL(u.parent)){case 176:return!0;default:return!1}}}}function TY(e){return{text:gj(e.node,e.name),kind:QE(e.node),kindModifiers:SY(e.node),spans:yj(e),nameSpan:e.name&&hj(e.name),childItems:Yn(Ar(e.children,n=>!xh(n.node)&&n.node.pos<n.node.end),TY)}}function KTe(e){return{text:gj(e.node,e.name),kind:QE(e.node),kindModifiers:SY(e.node),spans:yj(e),childItems:Yn(e.children,n)||mj,indent:e.indent,bolded:!1,grayed:!1};function n(r){return{text:gj(r.node,r.name),kind:QE(r.node),kindModifiers:GE(r.node),spans:yj(r),childItems:mj,indent:0,bolded:!1,grayed:!1}}}function yj(e){let n=[hj(e.node)];if(e.additionalNodes)for(let r of e.additionalNodes)n.push(hj(r));return n}function hj(e){return e.kind===176?vS(e):md(e,Rb)}function SY(e){return e.parent&&e.parent.kind===237&&(e=e.parent),GE(e)}function _Y(e){let{parent:n}=e;if(e.name&&kx(e.name)>0)return Ab(Fs(e.name));if(n&&xo(n))return Ab(Fs(n.name));if(n&&br(n)&&n.operatorToken.kind===74)return gP(n.left).replace(ATe,"");if(n&&dd(n))return gP(n.name);if(Kl(e))return"(: :)";if(Sa(e))return"<class>";if(n&&ao(n)){let r=_j(n.expression);if(r!==void 0){if(r=Ab(r),r.length>pj)return`${r} callback`;let i=Ab(Ei(n.arguments,a=>ji(a)?a.getText(Rb):void 0).join(", "));return`${r}(${i}) callback`}}return"<function>"}function _j(e){if(Sn(e))return e.text;if(Ti(e)){let n=_j(e.expression),r=e.name.text;return n===void 0?r:`${n}.${r}`}else return}function qTe(e){switch(e.kind){case 270:case 274:case 283:return!0;default:return!1}}function Ab(e){return e=e.length>pj?e.substring(0,pj)+"...":e,e.replace(/\\?(\r?\n|\r|\u2028|\u2029)/g,"")}var Ob=(a=>(a[a.terse=0]="terse",a[a.normal=1]="normal",a[a.requestTime=2]="requestTime",a[a.verbose=3]="verbose",a))(Ob||{}),KL=(i=>(i.Err="Err",i.Info="Info",i.Perf="Perf",i))(KL||{}),Sp=Z_();function OS(e,n,r){let i=vs(e)?e:Di(e,n);return r(i)}function Ho(e){return Qr(e)}var yd;(i=>{function e(){throw new Error("No Project.")}i.ThrowNoProject=e;function n(){throw new Error("The project's language service is disabled.")}i.ThrowProjectLanguageServiceDisabled=n;function r(a,c){throw new Error(`Project '${c.getProjectName()}' does not contain document '${a}'`)}i.ThrowProjectDoesNotContainDocument=r})(yd||(yd={}));function xj(e){return e}function bj(e){return`/dev/null/auxiliaryProject${e}*`}var hP=class e{constructor(n,r){this.host=n;this.pendingTimeouts=new Map;this.logger=r.hasLevel(3)?r:void 0}schedule(n,r,i){let a=this.pendingTimeouts.get(n);a&&this.host.clearTimeout(a),this.pendingTimeouts.set(n,this.host.setTimeout(e.run,r,n,this,i)),this.logger&&this.logger.info(`Scheduled: ${n}${a?", Cancelled earlier one":""}`)}cancel(n){let r=this.pendingTimeouts.get(n);return r?(this.host.clearTimeout(r),this.pendingTimeouts.delete(n)):!1}static run(n,r,i){r.pendingTimeouts.delete(n),r.logger&&r.logger.info(`Running: ${n}`),i()}},TP=class e{constructor(n,r,i){this.host=n;this.delay=r;this.logger=i}scheduleCollect(){!this.host.gc||this.timerId!==void 0||(this.timerId=this.host.setTimeout(e.run,this.delay,this))}static run(n){n.timerId=void 0;let r=n.logger.hasLevel(2),i=r&&n.host.getMemoryUsage();if(n.host.gc(),r){let a=n.host.getMemoryUsage();n.logger.perftrc(`GC::before ${i}, after ${a}`)}}};function Cj(e,n){let r;function i(a,c){let{files:u,directories:f}=n(a);r??(r=Sr(u,m=>m==="lpc-config.json")),r?r=fi(a,r):Bn(f,m=>(i(fi(a,m),c===void 0?void 0:c+1),!!r))}return i(e,0),r?Ho(r):void 0}function VTe(){let e=new Date;return`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}.${e.getMilliseconds().toString().padStart(3,"0")}`}var xY=`
73
+ `;function Mb(e){return xY+e.replace(/\n/g,xY)}function Bb(e){return Mb(JSON.stringify(e,void 0,2))}var VL={};cl(VL,{CommandTypes:()=>qL,IndentStyle:()=>bY});var qL=(vn=>(vn.LinkedEditingRange="linkedEditingRange",vn.Brace="brace",vn.BraceFull="brace-full",vn.BraceCompletion="braceCompletion",vn.GetSpanOfEnclosingComment="getSpanOfEnclosingComment",vn.Change="change",vn.Close="close",vn.Completions="completions",vn.CompletionInfo="completionInfo",vn.CompletionsFull="completions-full",vn.CompletionDetails="completionEntryDetails",vn.CompletionDetailsFull="completionEntryDetails-full",vn.CompileOnSaveAffectedFileList="compileOnSaveAffectedFileList",vn.CompileOnSaveEmitFile="compileOnSaveEmitFile",vn.Configure="configure",vn.Definition="definition",vn.DefinitionFull="definition-full",vn.DefinitionAndBoundSpan="definitionAndBoundSpan",vn.DefinitionAndBoundSpanFull="definitionAndBoundSpan-full",vn.Implementation="implementation",vn.ImplementationFull="implementation-full",vn.EmitOutput="emit-output",vn.Exit="exit",vn.FileReferences="fileReferences",vn.FileReferencesFull="fileReferences-full",vn.Format="format",vn.Formatonkey="formatonkey",vn.FormatFull="format-full",vn.FormatonkeyFull="formatonkey-full",vn.FormatRangeFull="formatRange-full",vn.Geterr="geterr",vn.GeterrForProject="geterrForProject",vn.SemanticDiagnosticsSync="semanticDiagnosticsSync",vn.SyntacticDiagnosticsSync="syntacticDiagnosticsSync",vn.SuggestionDiagnosticsSync="suggestionDiagnosticsSync",vn.NavBar="navbar",vn.NavBarFull="navbar-full",vn.Navto="navto",vn.NavtoFull="navto-full",vn.NavTree="navtree",vn.NavTreeFull="navtree-full",vn.DocumentHighlights="documentHighlights",vn.DocumentHighlightsFull="documentHighlights-full",vn.Open="open",vn.Quickinfo="quickinfo",vn.QuickinfoFull="quickinfo-full",vn.References="references",vn.ReferencesFull="references-full",vn.Reload="reload",vn.Rename="rename",vn.RenameInfoFull="rename-full",vn.RenameLocationsFull="renameLocations-full",vn.Saveto="saveto",vn.SignatureHelp="signatureHelp",vn.SignatureHelpFull="signatureHelp-full",vn.FindSourceDefinition="findSourceDefinition",vn.Status="status",vn.TypeDefinition="typeDefinition",vn.ProjectInfo="projectInfo",vn.ReloadProjects="reloadProjects",vn.Unknown="unknown",vn.OpenExternalProject="openExternalProject",vn.OpenExternalProjects="openExternalProjects",vn.CloseExternalProject="closeExternalProject",vn.SynchronizeProjectList="synchronizeProjectList",vn.ApplyChangedToOpenFiles="applyChangedToOpenFiles",vn.UpdateOpen="updateOpen",vn.EncodedSyntacticClassificationsFull="encodedSyntacticClassifications-full",vn.EncodedSemanticClassificationsFull="encodedSemanticClassifications-full",vn.Cleanup="cleanup",vn.GetOutliningSpans="getOutliningSpans",vn.GetOutliningSpansFull="outliningSpans",vn.TodoComments="todoComments",vn.Indentation="indentation",vn.DocCommentTemplate="docCommentTemplate",vn.CompilerOptionsDiagnosticsFull="compilerOptionsDiagnostics-full",vn.NameOrDottedNameSpan="nameOrDottedNameSpan",vn.BreakpointStatement="breakpointStatement",vn.CompilerOptionsForInferredProjects="compilerOptionsForInferredProjects",vn.GetCodeFixes="getCodeFixes",vn.GetCodeFixesFull="getCodeFixes-full",vn.GetCombinedCodeFix="getCombinedCodeFix",vn.GetCombinedCodeFixFull="getCombinedCodeFix-full",vn.ApplyCodeActionCommand="applyCodeActionCommand",vn.GetSupportedCodeFixes="getSupportedCodeFixes",vn.GetApplicableRefactors="getApplicableRefactors",vn.GetEditsForRefactor="getEditsForRefactor",vn.GetMoveToRefactoringFileSuggestions="getMoveToRefactoringFileSuggestions",vn.GetPasteEdits="getPasteEdits",vn.GetEditsForRefactorFull="getEditsForRefactor-full",vn.OrganizeImports="organizeImports",vn.OrganizeImportsFull="organizeImports-full",vn.GetEditsForFileRename="getEditsForFileRename",vn.GetEditsForFileRenameFull="getEditsForFileRename-full",vn.ConfigurePlugin="configurePlugin",vn.SelectionRange="selectionRange",vn.SelectionRangeFull="selectionRange-full",vn.ToggleLineComment="toggleLineComment",vn.ToggleLineCommentFull="toggleLineComment-full",vn.ToggleMultilineComment="toggleMultilineComment",vn.ToggleMultilineCommentFull="toggleMultilineComment-full",vn.CommentSelection="commentSelection",vn.CommentSelectionFull="commentSelection-full",vn.UncommentSelection="uncommentSelection",vn.UncommentSelectionFull="uncommentSelection-full",vn.PrepareCallHierarchy="prepareCallHierarchy",vn.ProvideCallHierarchyIncomingCalls="provideCallHierarchyIncomingCalls",vn.ProvideCallHierarchyOutgoingCalls="provideCallHierarchyOutgoingCalls",vn.ProvideInlayHints="provideInlayHints",vn.WatchChange="watchChange",vn.MapCode="mapCode",vn))(qL||{}),bY=(i=>(i.None="None",i.Block="Block",i.Smart="Smart",i))(bY||{});var HL=class{constructor(n,r,i){this.host=n;this.info=r;this.isOpen=!1;this.ownFileText=!1;this.pendingReloadFromDisk=!1;this.version=i||0}getVersion(){return this.svc?`SVC-${this.version}-${this.svc.getSnapshotVersion()}`:`Text-${this.version}`}hasScriptVersionCache_TestOnly(){return this.svc!==void 0}resetSourceMapInfo(){this.info.sourceFileLike=void 0,this.info.closeSourceMapFileWatcher(),this.info.sourceMapFilePath=void 0,this.info.declarationInfoPath=void 0,this.info.sourceInfos=void 0,this.info.documentPositionMapper=void 0}useText(n){this.svc=void 0,this.text=n,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo(),this.version++}edit(n,r,i){this.switchToScriptVersionCache().edit(n,r-n,i),this.ownFileText=!1,this.text=void 0,this.textSnapshot=void 0,this.lineMap=void 0,this.fileSize=void 0,this.resetSourceMapInfo()}reload(n){return E.assert(n!==void 0),this.pendingReloadFromDisk=!1,!this.text&&this.svc&&(this.text=Fm(this.svc.getSnapshot())),this.text!==n?(this.useText(n),this.ownFileText=!1,!0):!1}reloadWithFileText(n){let{text:r,fileSize:i}=n||!this.info.isDynamicOrHasMixedContent()?this.getFileTextAndSize(n):{text:"",fileSize:void 0},a=this.reload(r);return this.fileSize=i,this.ownFileText=!n||n===this.info.fileName,this.ownFileText&&this.info.mTime===oc.getTime()&&(this.info.mTime=(this.host.getModifiedTime(this.info.fileName)||oc).getTime()),a}scheduleReloadIfNeeded(){return!this.pendingReloadFromDisk&&!this.ownFileText?this.pendingReloadFromDisk=!0:!1}delayReloadFromFileIntoText(){this.pendingReloadFromDisk=!0}getTelemetryFileSize(){return this.fileSize?this.fileSize:this.text?this.text.length:this.svc?this.svc.getSnapshot().getLength():this.getSnapshot().getLength()}getSnapshot(){return this.tryUseScriptVersionCache()?.getSnapshot()||(this.textSnapshot??(this.textSnapshot=$I.fromString(E.checkDefined(this.text))))}getAbsolutePositionAndLineText(n){let r=this.tryUseScriptVersionCache();if(r)return r.getAbsolutePositionAndLineText(n);let i=this.getLineMap();return n<=i.length?{absolutePosition:i[n-1],lineText:this.text.substring(i[n-1],i[n])}:{absolutePosition:this.text.length,lineText:void 0}}lineToTextSpan(n){let r=this.tryUseScriptVersionCache();if(r)return r.lineToTextSpan(n);let i=this.getLineMap(),a=i[n],c=n+1<i.length?i[n+1]:this.text.length;return Sc(a,c)}lineOffsetToPosition(n,r,i){let a=this.tryUseScriptVersionCache();return a?a.lineOffsetToPosition(n,r):ND(this.getLineMap(),n-1,r-1,this.text,i)}positionToLineOffset(n){let r=this.tryUseScriptVersionCache();if(r)return r.positionToLineOffset(n);let{line:i,character:a}=xg(this.getLineMap(),n);return{line:i+1,offset:a+1}}getFileTextAndSize(n){let r,i=n||this.info.fileName,a=()=>r===void 0?r=this.host.readFile(i)||"":r;if(!qO(this.info.fileName)){let c=this.host.getFileSize?this.host.getFileSize(i):a().length;if(c>zL)return E.assert(!!this.info.containingProjects.length),this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${i} for info ${this.info.fileName}: fileSize: ${c}`),this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(i,c),{text:"",fileSize:c}}return{text:a()}}switchToScriptVersionCache(){return(!this.svc||this.pendingReloadFromDisk)&&(this.svc=jb.fromString(this.getOrLoadText()),this.textSnapshot=void 0,this.version++),this.svc}tryUseScriptVersionCache(){return(!this.svc||this.pendingReloadFromDisk)&&this.getOrLoadText(),this.isOpen?(!this.svc&&!this.textSnapshot&&(this.svc=jb.fromString(E.checkDefined(this.text)),this.textSnapshot=void 0),this.svc):this.svc}getOrLoadText(){return(this.text===void 0||this.pendingReloadFromDisk)&&(E.assert(!this.svc||this.pendingReloadFromDisk,"ScriptVersionCache should not be set when reloading from disk"),this.reloadWithFileText()),this.text}getLineMap(){return E.assert(!this.svc,"ScriptVersionCache should not be set"),this.lineMap||(this.lineMap=nh(E.checkDefined(this.text)))}getLineInfo(){let n=this.tryUseScriptVersionCache();if(n)return{getLineCount:()=>n.getLineCount(),getLineText:i=>n.getAbsolutePositionAndLineText(i+1).lineText};let r=this.getLineMap();return OI(this.text,r)}},SP=class{constructor(n,r,i,a,c,u){this.host=n;this.fileName=r;this.scriptKind=i;this.hasMixedContent=a;this.path=c;this.containingProjects=[];this.textStorage=new HL(n,this,u),(a||this.isDynamic)&&(this.realpath=this.path),this.scriptKind=i||1}isDynamicOrHasMixedContent(){return this.hasMixedContent||this.isDynamic}isScriptOpen(){return this.textStorage.isOpen}open(n){this.textStorage.isOpen=!0,n!==void 0&&this.textStorage.reload(n)&&this.markContainingProjectsAsDirty()}close(n=!0){this.textStorage.isOpen=!1,n&&this.textStorage.scheduleReloadIfNeeded()&&this.markContainingProjectsAsDirty()}getSnapshot(){return this.textStorage.getSnapshot()}incrementVersion(){this.textStorage.version++}ensureRealPath(){if(this.realpath===void 0&&(this.realpath=this.path,this.host.realpath)){E.assert(!!this.containingProjects.length);let n=this.containingProjects[0],r=this.host.realpath(this.path);r&&(this.realpath=n.toPath(r),this.realpath!==this.path&&n.projectService.realpathToScriptInfos.add(this.realpath,this))}}getRealpathIfDifferent(){return this.realpath&&this.realpath!==this.path?this.realpath:void 0}isSymlink(){return this.realpath&&this.realpath!==this.path}getFormatCodeSettings(){return this.formatSettings}attachToProject(n){let r=!this.isAttached(n);return r&&(this.containingProjects.push(n),this.ensureRealPath(),n.onFileAddedOrRemoved(this.isSymlink())),r}isAttached(n){switch(this.containingProjects.length){case 0:return!1;case 1:return this.containingProjects[0]===n;case 2:return this.containingProjects[0]===n||this.containingProjects[1]===n;default:return Gr(this.containingProjects,n)}}detachFromProject(n){switch(this.containingProjects.length){case 0:return;case 1:this.containingProjects[0]===n&&(n.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;case 2:this.containingProjects[0]===n?(n.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects[0]=this.containingProjects.pop()):this.containingProjects[1]===n&&(n.onFileAddedOrRemoved(this.isSymlink()),this.containingProjects.pop());break;default:X_(this.containingProjects,n)&&n.onFileAddedOrRemoved(this.isSymlink());break}}detachAllProjects(){for(let n of this.containingProjects){Rf(n)&&n.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName,this.path,2);let r=n.getRootFilesMap().get(this.path);n.removeFile(this,!1,!1),n.onFileAddedOrRemoved(this.isSymlink()),r&&!Jb(n)&&n.addMissingFileRoot(r.fileName)}FT(this.containingProjects)}getDefaultProject(){switch(this.containingProjects.length){case 0:return yd.ThrowNoProject();default:return bP(this.containingProjects[0])||_P(this.containingProjects[0])?yd.ThrowNoProject():this.containingProjects[0]}}registerFileUpdate(){for(let n of this.containingProjects)n.registerFileUpdate(this.path)}setOptions(){}getLatestVersion(){return this.textStorage.getSnapshot(),this.textStorage.getVersion()}saveTo(n){this.host.writeFile(n,Fm(this.textStorage.getSnapshot()))}delayReloadNonMixedContentFile(){E.assert(!this.isDynamicOrHasMixedContent()),this.textStorage.delayReloadFromFileIntoText(),this.markContainingProjectsAsDirty()}reloadFromFile(n){return this.textStorage.reloadWithFileText(n)?(this.markContainingProjectsAsDirty(),!0):!1}editContent(n,r,i){this.textStorage.edit(n,r,i),this.markContainingProjectsAsDirty()}getPreferences(){return this.preferences}markContainingProjectsAsDirty(){for(let n of this.containingProjects)n.markFileAsDirty(this.path)}isOrphan(){return this.deferredDelete||!Bn(this.containingProjects,n=>!n.isOrphan())}isContainedByBackgroundProject(){return Pn(this.containingProjects,_P)}lineToTextSpan(n){return this.textStorage.lineToTextSpan(n)}lineOffsetToPosition(n,r,i){return this.textStorage.lineOffsetToPosition(n,r,i)}positionToLineOffset(n){zTe(n);let r=this.textStorage.positionToLineOffset(n);return GTe(r),r}closeSourceMapFileWatcher(){this.sourceMapFilePath&&!gi(this.sourceMapFilePath)&&(Nm(this.sourceMapFilePath),this.sourceMapFilePath=void 0)}};function zTe(e){E.assert(typeof e=="number",`Expected position ${e} to be a number.`),E.assert(e>=0,"Expected position to be non-negative.")}function GTe(e){E.assert(typeof e.line=="number",`Expected line ${e.line} to be a number.`),E.assert(typeof e.offset=="number",`Expected offset ${e.offset} to be a number.`),E.assert(e.line>0,`Expected line to be non-${e.line===0?"zero":"negative"}`),E.assert(e.offset>0,`Expected offset to be non-${e.offset===0?"zero":"negative"}`)}function xP(e){return e[0]==="^"||(e.includes("walkThroughSnippet:/")||e.includes("untitled:/"))&&hs(e)[0]==="^"||e.includes(":^")&&!e.includes(Mo)}var MS=(c=>(c[c.Inferred=0]="Inferred",c[c.Configured=1]="Configured",c[c.External=2]="External",c[c.AutoImportProvider=3]="AutoImportProvider",c[c.Auxiliary=4]="Auxiliary",c))(MS||{}),Wb=class{constructor(n,r,i,a,c,u,f,m,y,g,S){this.projectKind=r;this.projectService=i;this.documentRegistry=a;this.compilerOptions=f;this.compileOnSaveEnabled=m;this.watchOptions=y;this.rootFilesMap=new Map;this.cachedUnresolvedImportsPerFile=new Map;this.hasAddedorRemovedFiles=!1;this.hasAddedOrRemovedSymlinks=!1;this.lastReportedVersion=0;this.projectProgramVersion=0;this.projectStateVersion=0;this.isInitialLoadPending=jl;this.dirty=!1;this.typingFiles=Sp;this.updateFromProjectInProgress=!1;this.projectName=n,this.currentDirectory=this.projectService.getNormalizedAbsolutePath(S),this.directoryStructureHost=g,this.getCanonicalFileName=this.projectService.toCanonicalFileName,this.jsDocParsingMode=this.projectService.jsDocParsingMode,this.cancellationToken=new fL(this.projectService.cancellationToken,this.projectService.throttleWaitMilliseconds);let _=this.projectService.host;this.realpath=Ta(_,_.realpath),this.resolutionCache=CG(this,this.currentDirectory,!0);let b=this.fileHandler=Ph({getCurrentDirectory:this.getCurrentDirectory,fileExists:this.fileExists,readFile:this.readFile,getIncludeDirs:v=>this.program.getIncludeDirs(v),getCompilerOptions:()=>this.compilerOptions});this.languageService=O$(this,b,this.documentRegistry,this.projectService.serverMode),u&&this.disableLanguageService(u),this.markAsDirty(),_P(this)||(this.projectService.pendingEnsureProjectForOpenFiles=!0),this.projectService.onProjectCreation(this)}getResolvedProjectReferenceToRedirect(n){}resolveModuleNameLiterals(n,r,i,a,c,u){return this.resolutionCache.resolveModuleNameLiterals(n,r,i,a,c,u)}getModuleResolutionCache(){return this.resolutionCache.getModuleResolutionCache()}disableLanguageService(n){this.languageServiceEnabled&&(E.assert(this.projectService.serverMode!==2),this.languageService.cleanupSemanticCache(),this.languageServiceEnabled=!1,this.cleanupProgram(),this.lastFileExceededProgramSize=n,this.projectService.verifyDocumentRegistry(),this.projectService.onUpdateLanguageServiceStateForProject(this,!1))}fileIsOpen(n){return this.projectService.openFiles.has(n)}scheduleInvalidateResolutionsOfFailedLookupLocations(){this.projectService.throttledOperations.schedule(`${this.getProjectName()}FailedLookupInvalidation`,1e3,()=>{this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)})}getIncludeDirs(){return this.compilerOptions?.libIncludeDirs||[]}onChangedAutomaticTypeDirectiveNames(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}getAllProjectErrors(){return this.projectErrors||Sp}getConfigFilePath(){return this.getProjectName()}getCompilationSettings(){return this.compilerOptions}getCompilerOptions(){return this.getCompilationSettings()}getNewLine(){return`
74
+ `}getProjectVersion(){return this.projectStateVersion.toString()}getScriptInfo(n){return this.projectService.getScriptInfo(n)}getRootScriptInfos(){return oo(Xy(this.rootFilesMap.values(),n=>n.info))}getProjectReferences(){}getProjectName(){return this.projectName}markAutoImportProviderAsDirty(){console.debug("todo - markAutoImportProviderAsDirty")}watchTypeRootsDirectory(n,r,i){return this.projectService.watchFactory.watchDirectory(n,r,i,this.projectService.getWatchOptions(this),Pm.TypeRoots,this)}watchDirectoryOfFailedLookupLocation(n,r,i){return this.projectService.watchFactory.watchDirectory(n,r,i,this.projectService.getWatchOptions(this),Pm.FailedLookupLocations,this)}onAllFilesNeedReparse(n){this.writeLog(`Reparse ${n.length} files triggered for project: ${this.getProjectName()}`),n.forEach(r=>{this.getScriptInfo(r)?.incrementVersion()})}getScriptFileNames(){if(!this.rootFilesMap.size)return Re;let n;return this.rootFilesMap.forEach(r=>{(this.languageServiceEnabled||r.info&&r.info.isScriptOpen())&&(n||(n=[])).push(r.fileName)}),Ro(n,this.typingFiles)||Re}isClosed(){return this.rootFilesMap===void 0}hasRoots(){return!!this.rootFilesMap?.size}getCurrentProgram(){return this.program}toPath(n){return Aa(n,this.currentDirectory,this.projectService.toCanonicalFileName)}markAsDirty(){this.dirty||(this.projectStateVersion++,this.dirty=!0)}setTypeAcquisition(n){}onInvalidatedResolution(){this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)}enableLanguageService(){this.languageServiceEnabled||this.projectService.serverMode===2||(this.languageServiceEnabled=!0,this.lastFileExceededProgramSize=void 0,this.projectService.onUpdateLanguageServiceStateForProject(this,!0))}addRoot(n,r){E.assert(!this.isRoot(n)),this.rootFilesMap.set(n.path,{fileName:r||n.fileName,info:n}),n.attachToProject(this),this.markAsDirty()}getCachedExportInfoMap(){return this.exportMapCache||(this.exportMapCache=DB(this))}clearCachedExportInfoMap(){this.exportMapCache?.clear()}clearSourceMapperCache(){}getPackageJsonAutoImportProvider(){console.debug("todo - getPackageJsonAutoImportProvider")}getGlobalTypingsCacheLocation(){console.debug("todo - getGlobalTypingsCacheLocation")}getLanguageService(n=!0){return n&&Zl(this),this.languageService}getSourceMapper(){return this.getLanguageService().getSourceMapper()}setCompilerOptions(n){if(n){let r=this.compilerOptions;this.compilerOptions=n,this.cachedUnresolvedImportsPerFile.clear(),this.lastCachedUnresolvedImportsList=void 0,this.markAsDirty()}}setWatchOptions(n){this.watchOptions=n}getWatchOptions(){return this.watchOptions}watchAffectingFileLocation(n,r){return this.projectService.watchFactory.watchFile(n,r,2e3,this.projectService.getWatchOptions(this),Pm.AffectingFileLocation,this)}hasConfigFile(n){if(this.program&&this.languageServiceEnabled){let r=this.program.getCompilerOptions().configFile;if(r&&n===r.fileName)return!0}return!1}getRootFiles(){return this.rootFilesMap&&oo(Xy(this.rootFilesMap.values(),n=>n.info?.fileName))}getFileNames(n,r){if(!this.program)return[];if(!this.languageServiceEnabled){let a=this.getRootFiles();return this.compilerOptions,a}let i=[];for(let a of this.program.getSourceFiles())i.push(a.fileName);if(!r){let a=this.program.getCompilerOptions().configFile;a&&i.push(a.fileName)}return i}getOrCreateScriptInfoAndAttachToProject(n){let r=this.projectService.getOrCreateScriptInfoNotOpenedByClient(n,this.currentDirectory,this.directoryStructureHost,!1);if(r){let i=this.rootFilesMap.get(r.path);i&&i.info!==r&&(i.info=r),r.attachToProject(this)}return r}getScriptKind(n){let r=this.projectService.getScriptInfoForPath(this.toPath(n));return r&&r.scriptKind}getScriptVersion(n){let r=this.projectService.getOrCreateScriptInfoNotOpenedByClient(n,this.currentDirectory,this.directoryStructureHost,!1);return r&&r.getLatestVersion()}getScriptSnapshot(n){let r=this.getOrCreateScriptInfoAndAttachToProject(n);if(r)return r.getSnapshot()}getCancellationToken(){return this.cancellationToken}getCurrentDirectory(){return this.currentDirectory}getDefaultLibFileName(){let n=ei(Qr(this.projectService.getExecutingFilePath()));return nI(this.compilerOptions)}useCaseSensitiveFileNames(){return this.projectService.host.useCaseSensitiveFileNames}readDirectory(n,r,i,a,c){return this.directoryStructureHost.readDirectory(n,r,i,a,c)}readFile(n){return this.projectService.host.readFile(n)}writeFile(n,r){return this.projectService.host.writeFile(n,r)}fileExists(n){let r=this.toPath(n);return!this.isWatchedMissingFile(r)&&this.directoryStructureHost.fileExists(n)}getGlobalProjectErrors(){return Ar(this.projectErrors,n=>!n.file)||Sp}setProjectErrors(n){this.projectErrors=n}isWatchedMissingFile(n){return!!this.missingFilesMap&&this.missingFilesMap.has(n)}invalidateResolutionsOfFailedLookupLocations(){this.clearInvalidateResolutionOfFailedLookupTimer()&&this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()&&(this.markAsDirty(),this.projectService.delayEnsureProjectForOpenFiles())}clearInvalidateResolutionOfFailedLookupTimer(){return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`)}onFileAddedOrRemoved(n){this.hasAddedorRemovedFiles=!0,n&&(this.hasAddedOrRemovedSymlinks=!0)}getCachedDirectoryStructureHost(){}getRootFilesMap(){return this.rootFilesMap}isRoot(n){return this.rootFilesMap?.get(n.path)?.info===n}removeRoot(n){this.rootFilesMap.delete(n.path)}removeFile(n,r,i){this.isRoot(n)&&this.removeRoot(n),r?this.resolutionCache.removeResolutionsOfFile(n.path):this.resolutionCache.invalidateResolutionOfFile(n.path),this.cachedUnresolvedImportsPerFile.delete(n.path),i&&n.detachFromProject(this),this.markAsDirty()}addMissingFileRoot(n){let r=this.projectService.toPath(n);this.rootFilesMap.set(r,{fileName:n}),this.markAsDirty()}updateFromProject(){Zl(this)}getTypeAcquisition(){return this.typeAcquisition||{}}updateGraph(){In?.push(In.Phase.Session,"updateGraph",{name:this.projectName,kind:MS[this.projectKind]}),this.resolutionCache.startRecordingFilesWithChangedResolutions();let n=this.updateGraphWorker(),r=this.hasAddedorRemovedFiles;this.hasAddedorRemovedFiles=!1,this.hasAddedOrRemovedSymlinks=!1;let i=this.resolutionCache.finishRecordingFilesWithChangedResolutions()||Sp;for(let c of i)this.cachedUnresolvedImportsPerFile.delete(c);this.languageServiceEnabled&&this.projectService.serverMode===0&&!this.isOrphan()?(n||i.length)&&(this.lastCachedUnresolvedImportsList=QTe(this.program,this.cachedUnresolvedImportsPerFile)):this.lastCachedUnresolvedImportsList=void 0;let a=this.projectProgramVersion===0&&n;return n&&this.projectProgramVersion++,r&&this.markAutoImportProviderAsDirty(),In?.pop(),!n}close(){this.cleanupProgram(),Bn(this.externalFiles,n=>this.detachScriptInfoIfNotRoot(n)),this.rootFilesMap.forEach(n=>n.info?.detachFromProject(this)),this.projectService.pendingEnsureProjectForOpenFiles=!0,this.rootFilesMap=void 0,this.externalFiles=void 0,this.program=void 0,this.resolutionCache.clear(),this.resolutionCache=void 0,this.cachedUnresolvedImportsPerFile=void 0,this.directoryStructureHost=void 0,this.exportMapCache=void 0,this.projectErrors=void 0,this.missingFilesMap&&(Og(this.missingFilesMap,gm),this.missingFilesMap=void 0),this.clearInvalidateResolutionOfFailedLookupTimer(),this.languageService.dispose(),this.languageService=void 0}forEachResolvedProjectReference(n){return this.getCurrentProgram()?.forEachResolvedProjectReference(n)}updateGraphWorker(){let n=this.languageService.getCurrentProgram();E.assert(n===this.program),E.assert(!this.isClosed(),"Called update graph worker of closed project"),this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`);let r=Ki(),{hasInvalidatedResolutions:i,hasInvalidatedLibResolutions:a}=this.resolutionCache.createHasInvalidatedResolutions(jl,jl);this.hasInvalidatedResolutions=i,this.hasInvalidatedLibResolutions=a,this.resolutionCache.startCachingPerDirectoryResolution(),this.dirty=!1,this.updateFromProjectInProgress=!0,this.program=this.languageService.getProgram(),this.updateFromProjectInProgress=!1,In?.push(In.Phase.Session,"finishCachingPerDirectoryResolution"),this.resolutionCache.finishCachingPerDirectoryResolution(this.program,n),In?.pop(),E.assert(n===void 0||this.program!==void 0);let c=!1;if(this.program&&(!n||this.program!==n&&this.program.structureIsReused!==2)){if(c=!0,n){for(let f of n.getSourceFiles()){let m=this.program.getSourceFileByPath(f.resolvedPath);(!m||f.resolvedPath===f.path&&m.resolvedPath!==f.path)&&this.detachScriptInfoFromProject(f.fileName,!!this.program.getSourceFileByPath(f.path),!0)}n.forEachResolvedProjectReference(f=>{this.program.getResolvedProjectReferenceByPath(f.sourceFile.path)||this.detachScriptInfoFromProject(f.sourceFile.fileName,void 0,!0)})}this.rootFilesMap.forEach((f,m)=>{let y=this.program.getSourceFileByPath(m),g=f.info;!y||f.info?.path===y.resolvedPath||(f.info=this.projectService.getScriptInfo(y.fileName),E.assert(f.info.isAttached(this)),g?.detachFromProject(this))}),yz(this.program,this.missingFilesMap||(this.missingFilesMap=new Map),(f,m)=>this.addMissingFileWatcher(f,m)),this.languageServiceEnabled&&(this.projectService.serverMode,0)}this.projectService.verifyProgram(this),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.exportMapCache.releaseSymbols(),this.hasAddedorRemovedFiles||n&&!this.program.structureIsReused?this.exportMapCache.clear():this.changedFilesForExportMapCache&&n&&this.program&&OF(this.changedFilesForExportMapCache,f=>{let m=n.getSourceFileByPath(f),y=this.program.getSourceFileByPath(f);return!m||!y?(this.exportMapCache.clear(),!0):this.exportMapCache.onFileChanged(m,y,!!this.getTypeAcquisition().enable)})),this.changedFilesForExportMapCache&&this.changedFilesForExportMapCache.clear(),(this.hasAddedOrRemovedSymlinks||this.program&&!this.program.structureIsReused&&this.getCompilerOptions()?.preserveSymlinks)&&console.debug("todo - implement symlinks support");let u=Ki()-r;return this.sendPerformanceEvent("UpdateGraph",u),this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${c}${this.program?` structureIsReused:: ${ED[this.program.structureIsReused]}`:""} Elapsed: ${u}ms`),this.projectService.logger.isTestLogger?this.program!==n?this.print(!0,this.hasAddedorRemovedFiles,!0):this.writeLog("Same program as before"):this.hasAddedorRemovedFiles?this.print(!0,!0,!1):this.program!==n&&this.writeLog("Different program with same set of files"),this.projectService.verifyDocumentRegistry(),c}sendPerformanceEvent(n,r){this.projectService.sendPerformanceEvent(n,r)}addMissingFileWatcher(n,r){if(Rf(this)&&this.projectService.configFileExistenceInfoCache.get(n)?.config?.projects.has(this.canonicalConfigFilePath))return db;let i=this.projectService.watchFactory.watchFile(Di(r,this.currentDirectory),(a,c)=>{Rf(this)&&this.getCachedDirectoryStructureHost().addOrDeleteFile(a,n,c),c===0&&this.missingFilesMap.has(n)&&(this.missingFilesMap.delete(n),i.close(),this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this))},500,void 0,Pm.MissingFile,this);return i}registerFileUpdate(n){(this.updatedFileNames||(this.updatedFileNames=new Set)).add(n)}markFileAsDirty(n){this.markAsDirty(),this.exportMapCache&&!this.exportMapCache.isEmpty()&&(this.changedFilesForExportMapCache||(this.changedFilesForExportMapCache=new Set)).add(n)}isOrphan(){return!1}containsScriptInfo(n){if(this.isRoot(n))return!0;if(!this.program)return!1;let r=this.program.getSourceFileByPath(n.path);return!!r&&r.resolvedPath===n.path}isSourceOfProjectReferenceRedirect(n){return!1}writeLog(n){this.projectService.logger.info(n)}filesToString(n){return this.filesToStringWorker(n,!0,!1)}filesToStringWorker(n,r,i){if(this.isInitialLoadPending())return` Files (0) InitialLoadPending
75
+ `;if(!this.program)return` Files (0) NoProgram
76
+ `;let a=this.program.getSourceFiles(),c=` Files (${a.length})
77
+ `;if(n){for(let u of a)c+=` ${u.fileName}${i?` ${u.version} ${JSON.stringify(u.text)}`:""}
78
+ `;r&&(c+=`
79
+
80
+ `,gz(this.program,u=>c+=` ${u}
81
+ `))}return c}print(n,r,i){this.writeLog(`Project '${this.projectName}' (${MS[this.projectKind]})`),this.writeLog(this.filesToStringWorker(n&&this.projectService.logger.hasLevel(3),r&&this.projectService.logger.hasLevel(3),i&&this.projectService.logger.hasLevel(3))),this.writeLog("-----------------------------------------------")}detachScriptInfoIfNotRoot(n){let r=this.projectService.getScriptInfo(n);r&&!this.isRoot(r)&&r.detachFromProject(this)}detachScriptInfoFromProject(n,r,i){let a=this.projectService.getScriptInfo(n);a&&(a.detachFromProject(this),r||this.resolutionCache.removeResolutionsOfFile(a.path,i))}containsFile(n,r){let i=this.projectService.getScriptInfoForNormalizedPath(n);return i&&(i.isScriptOpen()||!r)?this.containsScriptInfo(i):!1}getScriptInfoForNormalizedPath(n){let r=this.projectService.getScriptInfoForPath(this.toPath(n));return r&&!r.isAttached(this)?yd.ThrowProjectDoesNotContainDocument(n,this):r}cleanupProgram(){if(this.program){for(let n of this.program.getSourceFiles())this.detachScriptInfoIfNotRoot(n.fileName);this.program.forEachResolvedProjectReference(n=>this.detachScriptInfoFromProject(n.sourceFile.fileName)),this.program=void 0}}},CP=class extends Wb{constructor(r,i,a,c,u,f){super(r,1,a,c,!1,void 0,{},!1,void 0,u,ei(r));this.canonicalConfigFilePath=i;this.openFileWatchTriggered=new Map;this.canConfigFileJsonReportNoInputFiles=!1;this.isInitialLoadPending=Nv;this.pendingUpdateLevel=2,this.pendingUpdateReason=f}setCompilerHost(r){this.compilerHost=r}getProjectReferences(){return this.projectReferences}getAllProjectErrors(){return this.projectErrors||Sp}updateGraph(){if(this.deferredClose)return!1;let r=this.dirty;this.isInitialLoadPending=jl;let i=this.pendingUpdateLevel;this.pendingUpdateLevel=0;let a;switch(i){case 1:this.openFileWatchTriggered.clear(),a=this.projectService.reloadFileNamesOfConfiguredProject(this);break;case 2:this.openFileWatchTriggered.clear();let c=E.checkDefined(this.pendingUpdateReason);this.projectService.reloadConfiguredProject(this,c),a=!0;break;default:a=super.updateGraph()}return this.compilerHost=void 0,i===2||a&&(!r||!this.triggerFileForConfigFileDiag||this.getCurrentProgram().structureIsReused===2)?this.triggerFileForConfigFileDiag=void 0:this.triggerFileForConfigFileDiag||this.projectService.sendConfigFileDiagEvent(this,void 0,!1),a}getCachedDirectoryStructureHost(){return this.directoryStructureHost}updateErrorOnNoInputFiles(r){lH(r,this.getConfigFilePath(),this.getCompilerOptions().configFile.configFileSpecs,this.projectErrors,this.canConfigFileJsonReportNoInputFiles)}updateReferences(r){this.projectReferences=r,this.potentialProjectReferences=void 0}setPotentialProjectReference(r){E.assert(this.isInitialLoadPending()),(this.potentialProjectReferences||(this.potentialProjectReferences=new Set)).add(r)}isSolution(){return this.getRootFilesMap().size===0&&!this.canConfigFileJsonReportNoInputFiles}isOrphan(){return!!this.deferredClose}markAsDirty(){this.deferredClose||super.markAsDirty()}releaseParsedConfig(r){this.projectService.stopWatchingWildCards(r,this),this.projectService.releaseParsedConfig(r,this)}close(){this.projectService.configFileExistenceInfoCache.forEach((r,i)=>this.releaseParsedConfig(i)),this.projectErrors=void 0,this.openFileWatchTriggered.clear(),this.compilerHost=void 0,super.close()}getGlobalProjectErrors(){return Ar(this.projectErrors,r=>!r.file)||Sp}setProjectErrors(r){this.projectErrors=r}};function Rf(e){return e.projectKind===1}function bP(e){return Rf(e)&&!!e.deferredClose}function Jb(e){return e.projectKind===0}function _P(e){return e.projectKind===3&&E.fail("not implemented"),e.projectKind===4}var Dj=class extends Wb{constructor(n,r,i,a){super(n.newAuxiliaryProjectName(),4,n,r,!1,void 0,i,!1,void 0,n.host,a)}isOrphan(){return!0}scheduleInvalidateResolutionsOfFailedLookupLocations(){}},DP=class extends Wb{constructor(n,r,i,a,c,u,f){super(n.newInferredProjectName(),0,n,r,void 0,void 0,i,!1,a,n.host,u),this.projectRootPath=c&&n.toCanonicalFileName(c),!c&&!n.useSingleInferredProject&&(this.canonicalCurrentDirectory=n.toCanonicalFileName(this.currentDirectory))}isProjectWithSingleRoot(){return!this.projectRootPath&&!this.projectService.useSingleInferredProject||this.getRootScriptInfos().length===1}isOrphan(){return!this.hasRoots()}addRoot(n){E.assert(n.isScriptOpen()),this.projectService.startWatchingConfigFilesForInferredProjectRoot(n),super.addRoot(n)}removeRoot(n){this.projectService.stopWatchingConfigFilesForScriptInfo(n),super.removeRoot(n)}close(){Bn(this.getRootScriptInfos(),n=>this.projectService.stopWatchingConfigFilesForScriptInfo(n)),super.close()}};function QTe(e,n){let r=e.getSourceFiles();In?.push(In.Phase.Session,"getUnresolvedImports",{count:r.length});let i=wT(Oo(r,a=>YTe(e,a,n)));return In?.pop(),i}function YTe(e,n,r){return LT(r,n.path,()=>{let i;return e.forEachResolvedModule(({resolvedModule:a},c)=>{(!a||!$F(a.extension))&&!Ul(c)&&(i=$r(i,hH(c).packageName))},n),i||Sp})}function Ej(e){return e.projectKind===2}var ZTe=20*1024*1024,zL=4*1024*1024,vY="projectsUpdatedInBackground",eSe="projectLoadingStart",nSe="projectLoadingFinish",FY="largeFileReferenced",IY="configFileDiag",LY="projectLanguageServiceState",tSe="projectInfo",rSe="openFileInfo",AY="createFileWatcher",wY="createDirectoryWatcher",RY="closeFileWatcher",iSe="*ensureProjectForOpenFiles*",Pj={close:Vi},EP=class{constructor(n){this.filenameToScriptInfo=new Map;this.pendingEnsureProjectForOpenFiles=!1;this.pendingProjectUpdates=new Map;this.sharedExtendedConfigFileWatchers=new Map;this.projectToSizeMap=new Map;this.configuredProjects=new Map;this.inferredProjects=[];this.configFileExistenceInfoCache=new Map;this.newInferredProjectName=NY(WY);this.newAuxiliaryProjectName=NY(bj);this.openFiles=new Map;this.configFileForOpenFiles=new Map;this.rootOfInferredProjects=new Set;this.filenameToScriptInfoVersion=new Map;this.openFilesWithNonRootedDiskPath=new Map;this.compilerOptionsForInferredProjectsPerProjectRoot=new Map;this.watchOptionsForInferredProjectsPerProjectRoot=new Map;this.typeAcquisitionForInferredProjectsPerProjectRoot=new Map;this.onProjectCreation=Vi;this.verifyProgram=Vi;this.verifyDocumentRegistry=Vi;this.host=n.host,this.logger=n.logger,this.cancellationToken=n.cancellationToken,this.useSingleInferredProject=n.useSingleInferredProject,this.useInferredProjectPerProjectRoot=n.useInferredProjectPerProjectRoot,this.throttleWaitMilliseconds=n.throttleWaitMilliseconds,this.eventHandler=n.eventHandler,this.suppressDiagnosticEvents=n.suppressDiagnosticEvents,this.session=n.session,this.jsDocParsingMode=n.jsDocParsingMode,n.serverMode!==void 0?this.serverMode=n.serverMode:this.serverMode=0,this.host.realpath&&(this.realpathToScriptInfos=Js()),this.currentDirectory=Ho(n.projectRootFolder||this.host.getCurrentDirectory()),this.toCanonicalFileName=na(this.host.useCaseSensitiveFileNames),this.throttledOperations=new hP(this.host,this.logger),this.hostConfiguration={formatCodeOptions:B$(this.host.newLine),preferences:Qg,hostInfo:"Unknown host",extraFileExtensions:[]},this.documentRegistry=PB(this.host.useCaseSensitiveFileNames,this.currentDirectory,this.jsDocParsingMode,this);let r=this.logger.hasLevel(3)?2:this.logger.loggingEnabled()?1:0;this.watchFactory=this.serverMode!==0?{watchFile:OE,watchDirectory:OE}:Sz(aSe(this,n.canUseWatchEvents)||this.host,r,console.log,sSe)}getExecutingFilePath(){return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath())}getNormalizedAbsolutePath(n){return Di(n,this.host.getCurrentDirectory())}setDocument(n,r,i){let a=E.checkDefined(this.getScriptInfoForPath(r));a.cacheSourceFile={key:n,sourceFile:i}}getDocument(n,r){let i=this.getScriptInfoForPath(r);return i&&i.cacheSourceFile&&i.cacheSourceFile.key===n?i.cacheSourceFile.sourceFile:void 0}sendLargeFileReferencedEvent(n,r){if(!this.eventHandler)return;let i={eventName:FY,data:{file:n,fileSize:r,maxFileSize:zL}};this.eventHandler(i)}getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(n,r,i,a,c,u){if(vs(n)||xP(n))return this.getOrCreateScriptInfoWorker(n,r,!1,void 0,i,!!a,c,u);let f=this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(n));if(f)return f}fileExists(n){return!!this.getScriptInfoForNormalizedPath(n)||this.host.fileExists(n)}getScriptInfoEnsuringProjectsUptoDate(n){return this.ensureProjectStructuresUptoDate(),this.getScriptInfo(n)}getSymlinkedProjects(n){let r;if(this.realpathToScriptInfos){let a=n.getRealpathIfDifferent();a&&Bn(this.realpathToScriptInfos.get(a),i),Bn(this.realpathToScriptInfos.get(n.path),i)}return r;function i(a){if(a!==n)for(let c of a.containingProjects)c.languageServiceEnabled&&!c.isOrphan()&&!c.getCompilerOptions().preserveSymlinks&&!n.isAttached(c)&&(r?bc(r,(u,f)=>f===a.path?!1:Gr(u,c))||r.add(a.path,c):(r=Js(),r.add(a.path,c)))}}getPreferences(n){let r=this.getScriptInfoForNormalizedPath(n);return{...this.hostConfiguration.preferences,...r&&r.getPreferences()}}loadAncestorProjectTree(n){n=n||KK(this.configuredProjects,(i,a)=>a.isInitialLoadPending()?void 0:[i,!0]);let r=new Set;for(let i of oo(this.configuredProjects.values()))jY(i,a=>n.has(a))&&Zl(i),this.ensureProjectChildren(i,n,r)}ensureProjectChildren(n,r,i){if(!gg(i,n.canonicalConfigFilePath))return;let a=n.getCurrentProgram()?.getResolvedProjectReferences();if(a)for(let c of a){if(!c)continue;let u=GI(c.references,y=>r.has(y.sourceFile.path)?y:void 0);if(!u)continue;let f=Ho(c.sourceFile.fileName),m=this.findConfiguredProjectByProjectName(f)??this.createConfiguredProject(f,`Creating project referenced by : ${n.projectName} as it references project ${u.sourceFile.fileName}`);Zl(m),this.ensureProjectChildren(m,r,i)}}forEachProject(n){this.configuredProjects.forEach(n),this.inferredProjects.forEach(n)}forEachEnabledProject(n){this.forEachProject(r=>{!r.isOrphan()&&r.languageServiceEnabled&&n(r)})}getOriginalLocationEnsuringConfiguredProject(n,r){let i=n.isSourceOfProjectReferenceRedirect(r.fileName),a=i?r:n.getSourceMapper().tryGetSourcePosition(r);if(!a)return;let{fileName:c}=a,u=this.getScriptInfo(c);if(!u&&!this.host.fileExists(c))return;let f={fileName:Ho(c),path:this.toPath(c)},m=this.getConfigFileNameForFile(f,!1);if(!m)return;let y=this.findConfiguredProjectByProjectName(m);if(!y){if(n.getCompilerOptions().disableReferencedProjectLoad)return i?r:u?.containingProjects.length?a:r;y=this.createConfiguredProject(m,`Creating project for original file: ${f.fileName}${r!==a?" for location: "+r.fileName:""}`)}Zl(y);let g=b=>{let v=this.getScriptInfo(c);return v&&b.containsScriptInfo(v)&&!b.isSourceOfProjectReferenceRedirect(v.path)};if(y.isSolution()||!g(y)){if(y=JY(y,c,b=>g(b)?b:void 0,1,`Creating project referenced in solution ${y.projectName} to find possible configured project for original file: ${f.fileName}${r!==a?" for location: "+r.fileName:""}`),!y)return;if(y===n)return a}_(y);let S=this.getScriptInfo(c);if(!S||!S.containingProjects.length)return;return S.containingProjects.forEach(b=>{Rf(b)&&_(b)}),a;function _(b){(n.originalConfiguredProjects??(n.originalConfiguredProjects=new Set)).add(b.canonicalConfigFilePath)}}getOrCreateScriptInfoWorker(n,r,i,a,c,u,f,m){E.assert(a===void 0||i,"ScriptInfo needs to be opened by client to be able to set its user defined content");let y=OS(n,r,this.toCanonicalFileName),g=this.filenameToScriptInfo.get(y);if(g){if(g.deferredDelete){if(E.assert(!g.isDynamic),!i&&!(f||this.host).fileExists(n))return m?g:void 0;g.deferredDelete=void 0}}else{let S=xP(n);if(E.assert(vs(n)||S||i,"",()=>`${JSON.stringify({fileName:n,currentDirectory:r,hostCurrentDirectory:this.currentDirectory,openKeys:oo(this.openFilesWithNonRootedDiskPath.keys())})}
82
+ Script info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`),E.assert(!vs(n)||this.currentDirectory===r||!this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(n)),"",()=>`${JSON.stringify({fileName:n,currentDirectory:r,hostCurrentDirectory:this.currentDirectory,openKeys:oo(this.openFilesWithNonRootedDiskPath.keys())})}
83
+ Open script files with non rooted disk path opened with current directory context cannot have same canonical names`),E.assert(!S||this.currentDirectory===r||this.useInferredProjectPerProjectRoot,"",()=>`${JSON.stringify({fileName:n,currentDirectory:r,hostCurrentDirectory:this.currentDirectory,openKeys:oo(this.openFilesWithNonRootedDiskPath.keys())})}
84
+ Dynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`),!i&&!S&&!(f||this.host).fileExists(n))return;g=new SP(this.host,n,c,u,y,this.filenameToScriptInfoVersion.get(y)),this.filenameToScriptInfo.set(g.path,g),this.filenameToScriptInfoVersion.delete(g.path),i?!vs(n)&&(!S||this.currentDirectory!==r)&&this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(n),g):this.watchClosedScriptInfo(g)}return i&&(this.stopWatchingScriptInfo(g),g.open(a),u&&g.registerFileUpdate()),g}stopWatchingWildCards(n,r){let i=this.configFileExistenceInfoCache.get(n);!i.config||!i.config.projects.get(r.canonicalConfigFilePath)||(i.config.projects.set(r.canonicalConfigFilePath,!1),!bc(i.config.projects,Ci)&&(i.config.watchedDirectories&&(Og(i.config.watchedDirectories,Nm),i.config.watchedDirectories=void 0),i.config.watchedDirectoriesStale=void 0))}releaseParsedConfig(n,r){let i=this.configFileExistenceInfoCache.get(n);i.config?.projects.delete(r.canonicalConfigFilePath)&&(i.config?.projects.size||(i.config=void 0,_z(n,this.sharedExtendedConfigFileWatchers),E.checkDefined(i.watcher),i.openFilesImpactedByConfigFile?.size?i.inferredProjectRoots?G2(ku(ei(n)))||(i.watcher.close(),i.watcher=Pj):(i.watcher.close(),i.watcher=void 0):(i.watcher.close(),this.configFileExistenceInfoCache.delete(n))))}stopWatchingScriptInfo(n){n.fileWatcher&&(n.fileWatcher.close(),n.fileWatcher=void 0)}watchClosedScriptInfo(n){if(E.assert(!n.fileWatcher),!n.isDynamicOrHasMixedContent()&&(!this.globalCacheLocationDirectoryPath||!Eo(n.path,this.globalCacheLocationDirectoryPath))){let r=n.fileName.indexOf("/node_modules/");!this.host.getModifiedTime||r===-1?n.fileWatcher=this.watchFactory.watchFile(n.fileName,(i,a)=>this.onSourceFileChanged(n,a),500,this.hostConfiguration.watchOptions,Pm.ClosedScriptInfo):E.fail("not supported")}}delayUpdateProjectGraph(n){if(bP(n))return;n.markAsDirty();let r=n.getProjectName();this.pendingProjectUpdates.set(r,n),this.throttledOperations.schedule(r,250,()=>{this.pendingProjectUpdates.delete(r)&&Zl(n)})}getWatchOptions(n){return this.getWatchOptionsFromProjectWatchOptions(n.getWatchOptions(),n.getCurrentDirectory())}getWatchOptionsFromProjectWatchOptions(n,r){let i=this.hostConfiguration.watchOptions;return n&&i?{...i,...n}:n||i}getScriptInfoForPath(n){let r=OS(Ho(n),void 0,this.toCanonicalFileName),i=this.filenameToScriptInfo.get(r);return!i||!i.deferredDelete?i:void 0}toPath(n){return Aa(n,this.currentDirectory,this.toCanonicalFileName)}getOrCreateScriptInfoNotOpenedByClient(n,r,i,a){return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(Ho(n),r,void 0,void 0,i,a)}delayEnsureProjectForOpenFiles(){this.openFiles.size&&(this.pendingEnsureProjectForOpenFiles=!0,this.throttledOperations.schedule(iSe,2500,()=>{this.pendingProjectUpdates.size!==0?this.delayEnsureProjectForOpenFiles():this.pendingEnsureProjectForOpenFiles&&(this.ensureProjectForOpenFiles(),this.sendProjectsUpdatedInBackgroundEvent())}))}sendProjectsUpdatedInBackgroundEvent(){if(!this.eventHandler)return;let n={eventName:vY,data:{openFiles:oo(this.openFiles.keys(),r=>this.getScriptInfoForPath(r).fileName)}};this.eventHandler(n)}delayUpdateProjectGraphs(n,r){if(n.length){for(let i of n)r&&i.clearSourceMapperCache(),this.delayUpdateProjectGraph(i);this.delayEnsureProjectForOpenFiles()}}deleteScriptInfo(n){E.assert(!n.isScriptOpen()),this.filenameToScriptInfo.delete(n.path),this.filenameToScriptInfoVersion.set(n.path,n.textStorage.version),this.stopWatchingScriptInfo(n);let r=n.getRealpathIfDifferent();r&&this.realpathToScriptInfos.remove(r,n),n.closeSourceMapFileWatcher()}handleDeletedFile(n,r){E.assert(!n.isScriptOpen()),this.delayUpdateProjectGraphs(n.containingProjects,!1),this.handleSourceMapProjects(n),n.detachAllProjects(),r?(n.delayReloadNonMixedContentFile(),n.deferredDelete=!0):this.deleteScriptInfo(n)}getModifiedTime(n){return(this.host.getModifiedTime(n.fileName)||oc).getTime()}onSourceFileChanged(n,r){E.assert(!n.isScriptOpen()),r===2?this.handleDeletedFile(n,!0):(n.deferredDelete&&(n.deferredDelete=void 0),n.delayReloadNonMixedContentFile(),this.delayUpdateProjectGraphs(n.containingProjects,!1),this.handleSourceMapProjects(n))}handleSourceMapProjects(n){console.warn("todo - implement me - handleSourceMapProjects")}findAndOpenLpcConfig(n){return Cj(n,this.host.getAccessibleFileSystemEntries)}getScriptInfoOrConfig(n){let r=Ho(n),i=this.getScriptInfoForNormalizedPath(r);if(i)return i;let a=this.configuredProjects.get(this.toPath(n));return a&&a.getCompilerOptions().configFile}cleanupConfiguredProjects(n,r,i){this.getOrphanConfiguredProjects(n,i,r).forEach(a=>this.removeProject(a))}removeProject(n){switch(this.logger.info("`remove Project::"),n.print(!0,!0,!1),n.close(),E.shouldAssert(1)&&this.filenameToScriptInfo.forEach(r=>E.assert(!r.isAttached(n),"Found script Info still attached to project",()=>`${n.projectName}: ScriptInfos still attached: ${JSON.stringify(oo(Xy(this.filenameToScriptInfo.values(),i=>i.isAttached(n)?{fileName:i.fileName,projects:i.containingProjects.map(a=>a.projectName),hasMixedContent:i.hasMixedContent}:void 0)),void 0," ")}`)),this.pendingProjectUpdates.delete(n.getProjectName()),n.projectKind){case 2:console.debug("todo - implement me - removeProject - ProjectKind.External");break;case 1:this.configuredProjects.delete(n.canonicalConfigFilePath),this.projectToSizeMap.delete(n.canonicalConfigFilePath);break;case 0:Y_(this.inferredProjects,n);break}}getOrphanConfiguredProjects(n,r,i){let a=new Set(this.configuredProjects.values()),c=y=>{y.originalConfiguredProjects&&(Rf(y)||!y.isOrphan())&&y.originalConfiguredProjects.forEach((g,S)=>{let _=this.getConfiguredProjectByCanonicalConfigFilePath(S);return _&&m(_)})};return n?.forEach(m),this.inferredProjects.forEach(c),this.openFiles.forEach((y,g)=>{if(r?.has(g))return;let S=this.getScriptInfoForPath(g);if(Sr(S.containingProjects,Ej))return;let _=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(S,0);_?.defaultProject&&_?.seenProjects.forEach(m)}),this.configuredProjects.forEach(y=>{a.has(y)&&(f(y)||kY(y,u))&&m(y)}),a;function u(y){return!a.has(y)||f(y)}function f(y){return(y.deferredClose||y.projectService.hasPendingProjectUpdate(y))&&!!y.projectService.configFileExistenceInfoCache.get(y.canonicalConfigFilePath)?.openFilesImpactedByConfigFile?.size}function m(y){a.delete(y)&&(c(y),kY(y,m))}}hasPendingProjectUpdate(n){return this.pendingProjectUpdates.has(n.getProjectName())}cleanupProjectsAndScriptInfos(n,r,i){this.cleanupConfiguredProjects(n,i,r)}printProjects(){this.logger.hasLevel(1)&&(this.logger.startGroup(),this.configuredProjects.forEach(EY),this.inferredProjects.forEach(EY),this.logger.info("Open files: "),this.openFiles.forEach((n,r)=>{let i=this.getScriptInfoForPath(r);this.logger.info(` FileName: ${i.fileName} ProjectRootPath: ${n}`),this.logger.info(` Projects: ${i.containingProjects.map(a=>a.getProjectName())}`)}),this.logger.endGroup())}openClientFileWithNormalizedPath(n,r,i,a,c){let u=this.getOrCreateOpenScriptInfo(n,r,i,a,c),{retainProjects:f,...m}=this.assignProjectToOpenedScriptInfo(u);return this.cleanupProjectsAndScriptInfos(f,new Set([u.path]),void 0),this.printProjects(),m}sendPerformanceEvent(n,r){this.performanceEventHandler&&this.performanceEventHandler({kind:n,durationMs:r})}tryFindDefaultConfiguredProjectForOpenScriptInfo(n,r,i,a){let c=this.getConfigFileNameForFile(n,r===0);if(!c)return;let u=this.findCreateOrReloadConfiguredProject(c,r,DY(n),i,n.fileName,a);if(!u)return;let f=new Set,m=new Set(u.sentConfigFileDiag?[u.project]:void 0),y,g;return S(u.project),{defaultProject:y??g,sentConfigDiag:m,seenProjects:f};function S(v){return _(v)?y:void 0}function _(v){if(!gg(f,v))return;let T=v.containsScriptInfo(n);if(T&&!v.isSourceOfProjectReferenceRedirect(n.path))return y=v;g??(g=T?v:void 0)}function b(v){}}clearSemanticCache(n){n.originalConfiguredProjects=void 0,n.resolutionCache.clear(),n.getLanguageService(!1).cleanupSemanticCache(),n.cleanupProgram(),n.markAsDirty()}reloadConfiguredProjectClearingSemanticCache(n,r,i){return gg(i,n)?(this.clearSemanticCache(n),this.reloadConfiguredProject(n,Nj(r)),!0):!1}reloadConfiguredProject(n,r){n.isInitialLoadPending=jl,n.pendingUpdateReason=void 0,n.pendingUpdateLevel=0,n.getCachedDirectoryStructureHost().clearCache(),this.loadConfiguredProject(n,r),MY(n,n.triggerFileForConfigFileDiag??n.getConfigFilePath(),!0)}loadConfiguredProject(n,r){In?.push(In.Phase.Session,"loadConfiguredProject",{configFilePath:n.canonicalConfigFilePath});let i=Qr(n.getConfigFilePath()),a=this.ensureParsedConfigUptoDate(i,n.canonicalConfigFilePath,this.configFileExistenceInfoCache.get(n.canonicalConfigFilePath),n),c=a.config.parsedCommandLine;E.assert(!!c.fileNames);let u=c.options;n.setProjectErrors(c.options.configFile.parseDiagnostics),n.updateReferences(c.projectReferences),n.setCompilerOptions(u),n.setWatchOptions(c.watchOptions),n.enableLanguageService(),this.watchWildcards(i,a,n);let f=c.fileNames;this.updateRootAndOptionsOfNonInferredProject(n,f,PY,u,c.typeAcquisition,c.compileOnSave,c.watchOptions),In?.pop()}updateRootAndOptionsOfNonInferredProject(n,r,i,a,c,u,f){n.setCompilerOptions(a),n.setWatchOptions(f),u!==void 0&&(n.compileOnSaveEnabled=u),this.addFilesToNonInferredProject(n,r,i,c)}addFilesToNonInferredProject(n,r,i,a){this.updateNonInferredProjectFiles(n,r,i),n.setTypeAcquisition(a),n.markAsDirty()}watchWildcards(n,{exists:r,config:i},a){if(i.projects.set(a.canonicalConfigFilePath,!0),r){if(i.watchedDirectories&&!i.watchedDirectoriesStale)return;i.watchedDirectoriesStale=!1,hz(i.watchedDirectories||(i.watchedDirectories=new Map),i.parsedCommandLine.wildcardDirectories,(c,u)=>this.watchWildcardDirectory(c,u,n,i))}else{if(i.watchedDirectoriesStale=!1,!i.watchedDirectories)return;Og(i.watchedDirectories,Nm),i.watchedDirectories=void 0}}tryGetDefaultProjectForFile(n){let r=gi(n)?this.getScriptInfoForNormalizedPath(n):n;return r&&!r.isOrphan()?r.getDefaultProject():void 0}watchWildcardDirectory(n,r,i,a){let c=this.watchFactory.watchDirectory(n,f=>{let m=this.toPath(f),y=a.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(f,m);if(hs(m)==="package.json"&&(y&&y.fileExists||!y&&this.host.fileExists(f))){let S=this.getNormalizedAbsolutePath(f);this.logger.info(`Config: ${i} Detected new package.json: ${S}`)}let g=this.findConfiguredProjectByProjectName(i);Tz({watchedDirPath:this.toPath(n),fileOrDirectory:f,fileOrDirectoryPath:m,configFileName:i,extraFileExtensions:this.hostConfiguration.extraFileExtensions,currentDirectory:this.currentDirectory,options:a.parsedCommandLine.options,program:g?.getCurrentProgram()||a.parsedCommandLine.fileNames,useCaseSensitiveFileNames:this.host.useCaseSensitiveFileNames,writeLog:S=>this.logger.info(S),toPath:S=>this.toPath(S),getScriptKind:g?S=>g.getScriptKind(S):void 0})||(a.updateLevel!==2&&(a.updateLevel=1),a.projects.forEach((S,_)=>{if(!S)return;let b=this.getConfiguredProjectByCanonicalConfigFilePath(_);if(!b)return;let v=g===b?1:0;if(!(b.pendingUpdateLevel>v))if(this.openFiles.has(m))if(E.checkDefined(this.getScriptInfoForPath(m)).isAttached(b)){let W=Math.max(v,b.openFileWatchTriggered.get(m)||0);b.openFileWatchTriggered.set(m,W)}else b.pendingUpdateLevel=v,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(b);else b.pendingUpdateLevel=v,this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(b)}))},r,this.getWatchOptionsFromProjectWatchOptions(a.parsedCommandLine.watchOptions,ei(i)),Pm.WildcardDirectory,i),u={packageJsonWatches:void 0,close(){c&&(c.close(),c=void 0,u.packageJsonWatches?.forEach(f=>{f.projects.delete(u),f.close()}),u.packageJsonWatches=void 0)}};return u}onUpdateLanguageServiceStateForProject(n,r){if(!this.eventHandler)return;let i={eventName:LY,data:{project:n,languageServiceEnabled:r}};this.eventHandler(i)}reloadFileNamesOfConfiguredProject(n){let r=this.reloadFileNamesOfParsedConfig(n.getConfigFilePath(),this.configFileExistenceInfoCache.get(n.canonicalConfigFilePath).config);return n.updateErrorOnNoInputFiles(r),this.updateNonInferredProjectFiles(n,r,PY),n.markAsDirty(),n.updateGraph()}ensureParsedConfigUptoDate(n,r,i,a){if(i.config){if(!i.config.updateLevel)return i;if(i.config.updateLevel===1)return this.reloadFileNamesOfParsedConfig(n,i.config),i}let c=i.config?.cachedDirectoryStructureHost||g2(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),u=RV(n,_=>this.host.readFile(_)),f=pI(n,gi(u)?u:""),m=f.parseDiagnostics;gi(u)||m.push(u);let y=ei(n),g=UM(f,c,y,void 0,n,void 0,this.hostConfiguration?.extraFileExtensions);g.errors.length&&m.push(...g.errors),this.logger.info(`Config: ${n} : ${JSON.stringify({rootNames:g.fileNames?.length,options:g.options,watchOptions:g.watchOptions,projectReferences:g.projectReferences},void 0," ")}`);let S=i.config?.parsedCommandLine;return i.config?(i.config.parsedCommandLine=g,i.config.watchedDirectoriesStale=!0,i.config.updateLevel=void 0):i.config={parsedCommandLine:g,cachedDirectoryStructureHost:c,projects:new Map},!S&&!MF(this.getWatchOptionsFromProjectWatchOptions(void 0,y),this.getWatchOptionsFromProjectWatchOptions(g.watchOptions,y))&&(i.watcher?.close(),i.watcher=void 0),this.createConfigFileWatcherForParsedConfig(n,r,a),i}updateNonInferredProjectFiles(n,r,i){let a=n.getRootFilesMap(),c=new Map;for(let u of r){let f=i.getFileName(u),m=Ho(f),y=xP(m),g;if(!y&&!n.fileExists(f)){g=OS(m,this.currentDirectory,this.toCanonicalFileName);let S=a.get(g);S?(S.info?.path===g&&(n.removeFile(S.info,!1,!0),S.info=void 0),S.fileName=m):a.set(g,{fileName:m})}else{let S=i.getScriptKind(u,this.hostConfiguration.extraFileExtensions),_=i.hasMixedContent(u,this.hostConfiguration.extraFileExtensions),b=E.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(m,n.currentDirectory,S,_,n.directoryStructureHost,!1));g=b.path;let v=a.get(g);!v||v.info!==b?(n.addRoot(b,m),b.isScriptOpen()&&this.removeRootOfInferredProjectIfNowPartOfOtherProject(b)):v.fileName=m}c.set(g,!0)}a.size>c.size&&a.forEach((u,f)=>{c.has(f)||(u.info?n.removeFile(u.info,n.fileExists(u.info.fileName),!0):a.delete(f))})}removeRootOfInferredProjectIfNowPartOfOtherProject(n){E.assert(n.containingProjects.length>0);let r=n.containingProjects[0];!r.isOrphan()&&Jb(r)&&r.isRoot(n)&&Bn(n.containingProjects,i=>i!==r&&!i.isOrphan())&&r.removeFile(n,!0,!0)}reloadFileNamesOfParsedConfig(n,r){if(r.updateLevel===void 0)return r.parsedCommandLine.fileNames;E.assert(r.updateLevel===1);let i=r.parsedCommandLine.options.configFile.configFileSpecs,a=hI(i,ei(n),r.parsedCommandLine.options,r.cachedDirectoryStructureHost,this.hostConfiguration.extraFileExtensions);return r.parsedCommandLine={...r.parsedCommandLine,fileNames:a},a}findCreateOrReloadConfiguredProject(n,r,i,a,c,u,f,m){let y=this.findConfiguredProjectByProjectName(n,a),g=!1;switch(r){case 0:if(!y)return;break;case 1:y??(y=this.createConfiguredProject(n,i)),g=!f&&BY(y,c);break;case 2:y??(y=this.createConfiguredProject(n,Nj(i))),g=!m&&this.reloadConfiguredProjectClearingSemanticCache(y,i,u),m&&!m.has(y)&&!u.has(y)&&(y.pendingUpdateLevel=2,y.pendingUpdateReason=Nj(i),m.add(y));break;default:E.assertNever(r)}return{project:y,sentConfigFileDiag:g}}tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(n,r,i,a){let c=r===0,u=this.tryFindDefaultConfiguredProjectForOpenScriptInfo(n,r,c,i);if(!u)return;let{defaultProject:f,seenProjects:m}=u;return u}assignProjectToOpenedScriptInfo(n){let r,i,c,u;if(this.serverMode===0){let f=this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(n,1);f&&(c=f.seenProjects,u=f.sentConfigDiag,f.defaultProject&&(r=f.defaultProject.getConfigFilePath(),i=f.defaultProject.getAllProjectErrors()))}return n.containingProjects.forEach(Zl),n.isOrphan()&&(c?.forEach(f=>{u.has(f)||this.sendConfigFileDiagEvent(f,n.fileName,!0)}),E.assert(this.openFiles.has(n.path)),this.assignOrphanScriptInfoToInferredProject(n,this.openFiles.get(n.path))),E.assert(!n.isOrphan()),{configFileName:r,configFileErrors:i,retainProjects:c}}assignOrphanScriptInfoToInferredProject(n,r){E.assert(n.isOrphan());let i=this.getOrCreateInferredProjectForProjectRootPathIfEnabled(n,r)||this.getOrCreateSingleInferredProjectIfEnabled()||this.getOrCreateSingleInferredWithoutProjectRoot(n.isDynamic?r||this.currentDirectory:ei(vs(n.fileName)?n.fileName:Di(n.fileName,r?this.getNormalizedAbsolutePath(r):this.currentDirectory)));if(i.addRoot(n),n.containingProjects[0]!==i&&(X_(n.containingProjects,i),n.containingProjects.unshift(i)),i.updateGraph(),!this.useSingleInferredProject&&!i.projectRootPath)for(let a of this.inferredProjects){if(a===i||a.isOrphan())continue;let c=a.getRootScriptInfos();E.assert(c.length===1||!!a.projectRootPath),c.length===1&&Bn(c[0].containingProjects,u=>u!==c[0].containingProjects[0]&&!u.isOrphan())&&a.removeFile(c[0],!0,!0)}return i}getOrCreateInferredProjectForProjectRootPathIfEnabled(n,r){if(!this.useInferredProjectPerProjectRoot||n.isDynamic&&r===void 0)return;if(r){let a=this.toCanonicalFileName(r);for(let c of this.inferredProjects)if(c.projectRootPath===a)return c;return this.createInferredProject(r,!1,r)}let i;for(let a of this.inferredProjects)a.projectRootPath&&fp(a.projectRootPath,n.path,this.host.getCurrentDirectory(),!this.host.useCaseSensitiveFileNames)&&(i&&i.projectRootPath.length>a.projectRootPath.length||(i=a));return i}getOrCreateSingleInferredProjectIfEnabled(){if(this.useSingleInferredProject)return this.inferredProjects.length>0&&this.inferredProjects[0].projectRootPath===void 0?this.inferredProjects[0]:this.createInferredProject("",!0)}getOrCreateSingleInferredWithoutProjectRoot(n){E.assert(!this.useSingleInferredProject);let r=this.toCanonicalFileName(this.getNormalizedAbsolutePath(n));for(let i of this.inferredProjects)if(!i.projectRootPath&&i.isOrphan()&&i.canonicalCurrentDirectory===r)return i;return this.createInferredProject(n)}setCompilerOptionsForInferredProjects(n,r){E.assert(r===void 0||this.useInferredProjectPerProjectRoot,"Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled");let i=KY(n),a=qY(n,r),c=VY(n);i.allowNonTsExtensions=!0;let u=r&&this.toCanonicalFileName(r);u?(this.compilerOptionsForInferredProjectsPerProjectRoot.set(u,i),this.watchOptionsForInferredProjectsPerProjectRoot.set(u,a||!1),this.typeAcquisitionForInferredProjectsPerProjectRoot.set(u,c)):(this.compilerOptionsForInferredProjects=i,this.watchOptionsForInferredProjects=a,this.typeAcquisitionForInferredProjects=c);for(let f of this.inferredProjects)(u?f.projectRootPath===u:!f.projectRootPath||!this.compilerOptionsForInferredProjectsPerProjectRoot.has(f.projectRootPath))&&(f.setCompilerOptions(i),f.setTypeAcquisition(c),f.setWatchOptions(a?.watchOptions),f.setProjectErrors(a?.errors),f.compileOnSaveEnabled=i.compileOnSave,f.markAsDirty(),this.delayUpdateProjectGraph(f));this.delayEnsureProjectForOpenFiles()}createInferredProject(n,r,i){let a=i&&this.compilerOptionsForInferredProjectsPerProjectRoot.get(i)||this.compilerOptionsForInferredProjects,c,u;i&&(c=this.watchOptionsForInferredProjectsPerProjectRoot.get(i),u=this.typeAcquisitionForInferredProjectsPerProjectRoot.get(i)),c===void 0&&(c=this.watchOptionsForInferredProjects),u===void 0&&(u=this.typeAcquisitionForInferredProjects),c=c||void 0;let f=new DP(this,this.documentRegistry,a,c?.watchOptions,i,n,u);return f.setProjectErrors(c?.errors),r?this.inferredProjects.unshift(f):this.inferredProjects.push(f),f}getOrCreateOpenScriptInfo(n,r,i,a,c){let u=this.getOrCreateScriptInfoWorker(n,c?this.getNormalizedAbsolutePath(c):this.currentDirectory,!0,r,i,!!a,void 0,!0);return this.openFiles.set(u.path,c),u}sendConfigFileDiagEvent(n,r,i){if(!this.eventHandler||this.suppressDiagnosticEvents)return!1;let a=n.getLanguageService().getCompilerOptionsDiagnostics();return a.push(...n.getAllProjectErrors()),!i&&a.length===(n.configDiagDiagnosticsReported??0)?!1:(n.configDiagDiagnosticsReported=a.length,this.eventHandler({eventName:IY,data:{configFileName:n.getConfigFilePath(),diagnostics:a,triggerFile:r??n.getConfigFilePath()}}),!0)}findConfiguredProjectByProjectName(n,r){let i=this.toCanonicalFileName(n),a=this.getConfiguredProjectByCanonicalConfigFilePath(i);return r?a:a?.deferredClose?void 0:a}getConfiguredProjectByCanonicalConfigFilePath(n){return this.configuredProjects.get(n)}findProject(n){if(n!==void 0)return this.findConfiguredProjectByProjectName(Ho(n))}getScriptInfoForNormalizedPath(n){return!vs(n)&&this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(n))||this.getScriptInfoForPath(OS(n,this.currentDirectory,this.toCanonicalFileName))}configFileExists(n,r,i){let a=this.configFileExistenceInfoCache.get(r),c;if(this.openFiles.has(i.path)&&!GL(i)&&(a?(a.openFilesImpactedByConfigFile??(a.openFilesImpactedByConfigFile=new Set)).add(i.path):(c=new Set).add(i.path)),a)return a.exists;let u=this.host.fileExists(n);return this.configFileExistenceInfoCache.set(r,{exists:u,openFilesImpactedByConfigFile:c}),u}getConfigFileNameForFile(n,r){let i=this.getConfigFileNameForFileFromCache(n,r);if(i!==void 0)return i||void 0;if(r)return;let a=this.forEachConfigFileLocation(n,(c,u)=>this.configFileExists(u,c,n));return this.logger.info(`getConfigFileNameForFile:: File: ${n.fileName} ProjectRootPath: ${this.openFiles.get(n.path)}:: Result: ${a}`),this.setConfigFileNameForFileInCache(n,a),a}getScriptInfo(n){return this.getScriptInfoForNormalizedPath(Ho(n))}tryGetDefaultProjectForEnsuringConfiguredProjectForFile(n){let r=gi(n)?this.getScriptInfoForNormalizedPath(n):n;if(r)return this.pendingOpenFileProjectUpdates?.delete(r.path)&&(this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(r,1),r.isOrphan()&&this.assignOrphanScriptInfoToInferredProject(r,this.openFiles.get(r.path))),this.tryGetDefaultProjectForFile(r)}ensureProjectStructuresUptoDate(){let n=this.pendingEnsureProjectForOpenFiles;this.pendingProjectUpdates.clear();let r=i=>{n=Zl(i)||n};this.configuredProjects.forEach(r),this.inferredProjects.forEach(r),n&&this.ensureProjectForOpenFiles()}ensureProjectForOpenFiles(){this.logger.info("Before ensureProjectForOpenFiles:"),this.printProjects();let n=this.pendingOpenFileProjectUpdates;this.pendingOpenFileProjectUpdates=void 0,n?.forEach((r,i)=>this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(i),1)),this.openFiles.forEach((r,i)=>{let a=this.getScriptInfoForPath(i);a.isOrphan()?this.assignOrphanScriptInfoToInferredProject(a,r):this.removeRootOfInferredProjectIfNowPartOfOtherProject(a)}),this.pendingEnsureProjectForOpenFiles=!1,this.inferredProjects.forEach(Zl),this.logger.info("After ensureProjectForOpenFiles:"),this.printProjects()}doEnsureDefaultProjectForFile(n){this.ensureProjectStructuresUptoDate();let r=gi(n)?this.getScriptInfoForNormalizedPath(n):n;return r?r.getDefaultProject():(this.logErrorForScriptInfoNotFound(gi(n)?n:n.fileName),yd.ThrowNoProject())}logErrorForScriptInfoNotFound(n){let r=oo(Xy(this.filenameToScriptInfo.entries(),i=>i[1].deferredDelete?void 0:i),([i,a])=>({path:i,fileName:a.fileName}));this.logger.msg(`Could not find file ${JSON.stringify(n)}.
85
+ All files are: ${JSON.stringify(r)}`,"Err")}ensureDefaultProjectForFile(n){return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(n)||this.doEnsureDefaultProjectForFile(n)}forEachConfigFileLocation(n,r){if(this.serverMode!==0)return;E.assert(!oSe(n)||this.openFiles.has(n.path));let i=this.openFiles.get(n.path);if(E.checkDefined(this.getScriptInfo(n.path)).isDynamic)return;let c=ei(n.fileName),u=()=>fp(i,c,this.currentDirectory,!this.host.useCaseSensitiveFileNames),f=!i||!u(),m=!GL(n);do{if(m){let g=OS(c,this.currentDirectory,this.toCanonicalFileName),S=fi(c,"lpc-config.json");if(r(fi(g,"lpc-config.json"),S))return S;if(wE(g))break}let y=ei(c);if(y===c)break;c=y,m=!0}while(f||u())}setConfigFileNameForFileInCache(n,r){this.openFiles.has(n.path)&&(GL(n)||this.configFileForOpenFiles.set(n.path,r||!1))}getConfigFileNameForFileFromCache(n,r){if(r){let i=CY(n,this.pendingOpenFileProjectUpdates);if(i!==void 0)return i}return CY(n,this.configFileForOpenFiles)}getFormatCodeOptions(n){let r=this.getScriptInfoForNormalizedPath(n);return r&&r.getFormatCodeSettings()||this.hostConfiguration.formatCodeOptions}createConfiguredProject(n,r){In?.instant(In.Phase.Session,"createConfiguredProject",{configFilePath:n}),this.logger.info(`Creating configuration project ${n}`);let i=this.toCanonicalFileName(n),a=this.configFileExistenceInfoCache.get(i);a?a.exists=!0:this.configFileExistenceInfoCache.set(i,a={exists:!0}),a.config||(a.config={cachedDirectoryStructureHost:g2(this.host,this.host.getCurrentDirectory(),this.host.useCaseSensitiveFileNames),projects:new Map,updateLevel:2});let c=new CP(n,i,this,this.documentRegistry,a.config.cachedDirectoryStructureHost,r);return E.assert(!this.configuredProjects.has(i)),this.configuredProjects.set(i,c),this.createConfigFileWatcherForParsedConfig(n,i,c),c}createConfigFileWatcherForParsedConfig(n,r,i){let a=this.configFileExistenceInfoCache.get(r);(!a.watcher||a.watcher===Pj)&&(a.watcher=this.watchFactory.watchFile(n,(u,f)=>this.onConfigFileChanged(n,r,f),2e3,this.getWatchOptionsFromProjectWatchOptions(a?.config?.parsedCommandLine?.watchOptions,ei(n)),Pm.ConfigFile,i));let c=a.config.projects;c.set(i.canonicalConfigFilePath,c.get(i.canonicalConfigFilePath)||!1)}onConfigFileChanged(n,r,i){let a=this.configFileExistenceInfoCache.get(r),c=this.getConfiguredProjectByCanonicalConfigFilePath(r),u=c?.deferredClose;i===2?(a.exists=!1,c&&(c.deferredClose=!0)):(a.exists=!0,u&&(c.deferredClose=void 0,c.markAsDirty())),this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(r,"Change in config file detected");let f=new Set(c?[c]:void 0);this.openFiles.forEach((m,y)=>{let g=this.configFileForOpenFiles.get(y);if(!a.openFilesImpactedByConfigFile?.has(y))return;this.configFileForOpenFiles.delete(y);let S=this.getScriptInfoForPath(y),_=this.getConfigFileNameForFile(S,!1);if(!_)return;let b=this.findConfiguredProjectByProjectName(_)??this.createConfiguredProject(_,`Change in config file ${n} detected, ${DY(S)}`);this.pendingOpenFileProjectUpdates?.has(y)||(this.pendingOpenFileProjectUpdates??(this.pendingOpenFileProjectUpdates=new Map)).set(y,g),gg(f,b)&&b.isInitialLoadPending()&&this.delayUpdateProjectGraph(b)}),this.delayEnsureProjectForOpenFiles()}delayUpdateProjectsFromParsedConfigOnConfigFileChange(n,r){let i=this.configFileExistenceInfoCache.get(n);if(!i?.config)return!1;let a=!1;return i.config.updateLevel=2,i.config.projects.forEach((c,u)=>{let f=this.getConfiguredProjectByCanonicalConfigFilePath(u);if(f)if(a=!0,u===n){if(f.isInitialLoadPending())return;f.pendingUpdateLevel=2,f.pendingUpdateReason=r,this.delayUpdateProjectGraph(f),f.markAutoImportProviderAsDirty()}else{let m=this.toPath(n);f.resolutionCache.removeResolutionsFromProjectReferenceRedirects(m),this.delayUpdateProjectGraph(f),this.getHostPreferences().includeCompletionsForModuleExports&&Sr(f.getCurrentProgram()?.getResolvedProjectReferences(),y=>y?.sourceFile.path===m)&&f.markAutoImportProviderAsDirty()}}),a}getHostPreferences(){return this.hostConfiguration.preferences}closeClientFile(n,r){let i=this.getScriptInfoForNormalizedPath(Ho(n)),a=i?this.closeOpenFile(i,r):!1;return r||this.printProjects(),a}stopWatchingConfigFilesForScriptInfo(n){if(this.serverMode!==0)return;let r=this.rootOfInferredProjects.delete(n),i=n.isScriptOpen();i&&!r||this.forEachConfigFileLocation(n,a=>{let c=this.configFileExistenceInfoCache.get(a);if(c){if(i){if(!c?.openFilesImpactedByConfigFile?.has(n.path))return}else if(!c.openFilesImpactedByConfigFile?.delete(n.path))return;r&&(c.inferredProjectRoots--,c.watcher&&!c.config&&!c.inferredProjectRoots&&(c.watcher.close(),c.watcher=void 0)),!c.openFilesImpactedByConfigFile?.size&&!c.config&&(E.assert(!c.watcher),this.configFileExistenceInfoCache.delete(a))}})}startWatchingConfigFilesForInferredProjectRoot(n){this.serverMode===0&&(E.assert(n.isScriptOpen()),this.rootOfInferredProjects.add(n),this.forEachConfigFileLocation(n,(r,i)=>{let a=this.configFileExistenceInfoCache.get(r);a?a.inferredProjectRoots=(a.inferredProjectRoots??0)+1:(a={exists:this.host.fileExists(i),inferredProjectRoots:1},this.configFileExistenceInfoCache.set(r,a)),(a.openFilesImpactedByConfigFile??(a.openFilesImpactedByConfigFile=new Set)).add(n.path),a.watcher||(a.watcher=G2(ku(ei(r)))?this.watchFactory.watchFile(i,(c,u)=>this.onConfigFileChanged(i,r,u),2e3,this.hostConfiguration.watchOptions,Pm.ConfigFileForInferredRoot):Pj)}))}closeOpenFile(n,r){let i=n.isDynamic?!1:this.host.fileExists(n.fileName);n.close(i),this.stopWatchingConfigFilesForScriptInfo(n);let a=this.toCanonicalFileName(n.fileName);this.openFilesWithNonRootedDiskPath.get(a)===n&&this.openFilesWithNonRootedDiskPath.delete(a);let c=!1;for(let u of n.containingProjects){if(Rf(u)){n.hasMixedContent&&n.registerFileUpdate();let f=u.openFileWatchTriggered.get(n.path);f!==void 0&&(u.openFileWatchTriggered.delete(n.path),u.pendingUpdateLevel<f&&(u.pendingUpdateLevel=f,u.markFileAsDirty(n.path)))}else Jb(u)&&u.isRoot(n)&&(u.isProjectWithSingleRoot()&&(c=!0),u.removeFile(n,i,!0));u.languageServiceEnabled||u.markAsDirty()}return this.openFiles.delete(n.path),this.configFileForOpenFiles.delete(n.path),this.pendingOpenFileProjectUpdates?.delete(n.path),E.assert(!this.rootOfInferredProjects.has(n)),!r&&c&&this.assignOrphanScriptInfosToInferredProject(),i?this.watchClosedScriptInfo(n):this.handleDeletedFile(n,!1),c}applyChangesInOpenFiles(n,r,i){let a,c=!1;if(n)for(let f of n){let m=this.getOrCreateOpenScriptInfo(Ho(f.fileName),f.content,1,f.hasMixedContent,f.projectRootPath?Ho(f.projectRootPath):void 0);(a||(a=[])).push(m)}if(r)for(let f of r){let m=this.getScriptInfo(f.fileName);E.assert(!!m),this.applyChangesToFile(m,f.changes)}if(i)for(let f of i)c=this.closeClientFile(f,!0)||c;let u;a?.forEach(f=>this.assignProjectToOpenedScriptInfo(f).retainProjects?.forEach(m=>(u??(u=new Set)).add(m))),c&&this.assignOrphanScriptInfosToInferredProject(),a?(this.cleanupProjectsAndScriptInfos(u,new Set(a.map(f=>f.path)),void 0),this.printProjects()):gr(i)&&this.printProjects()}applyChangesToFile(n,r){for(let i of r)n.editContent(i.span.start,i.span.start+i.span.length,i.newText)}assignOrphanScriptInfosToInferredProject(){this.openFiles.forEach((n,r)=>{this.getScriptInfoForPath(r).isOrphan()&&console.debug("todo - implement me - assignOrphanScriptInfosToInferredProject")})}delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(n){this.delayUpdateProjectGraph(n),this.delayEnsureProjectForOpenFiles()}};function Zl(e){return e.invalidateResolutionsOfFailedLookupLocations(),e.dirty&&!e.updateGraph()}var OY=(i=>(i[i.Find=0]="Find",i[i.Create=1]="Create",i[i.Reload=2]="Reload",i))(OY||{});function GL(e){return!!e.configFileInfo}function CY(e,n){if(!(!n||GL(e)))return n.get(e.path)}function oSe(e){return!!e.containingProjects}function DY(e){return`Creating possible configured project for ${e.fileName} to open`}function EY(e){e.print(!1,!1,!1)}function MY(e,n,r){if(!r&&(e.invalidateResolutionsOfFailedLookupLocations(),!e.dirty))return!1;e.triggerFileForConfigFileDiag=n;let i=e.pendingUpdateLevel;if(e.updateGraph(),!e.triggerFileForConfigFileDiag&&!r)return i===2;let a=e.projectService.sendConfigFileDiagEvent(e,n,r);return e.triggerFileForConfigFileDiag=void 0,a}function BY(e,n){if(n){if(MY(e,n,!1))return!0}else Zl(e);return!1}function Nj(e){return`User requested reload projects: ${e}`}var PY={getFileName:e=>e,getScriptKind:(e,n)=>{let r;if(n){let i=EE(e);i&&Pn(n,a=>a.extension===i?(r=a.scriptKind,!0):!1)}return r},hasMixedContent:(e,n)=>Pn(n,r=>r.isMixedContent&&qs(e,r.extension))};function kj(){return{idToCallbacks:new Map,pathToId:new Map}}function aSe(e,n){if(!n||!e.eventHandler||!e.session)return;let r=kj(),i=kj(),a=kj(),c=1;return console.debug("todo - tie watch chnage to service events"),{watchFile:u,watchDirectory:f,getCurrentDirectory:()=>e.host.getCurrentDirectory(),useCaseSensitiveFileNames:e.host.useCaseSensitiveFileNames};function u(b,v){return m(r,b,v,T=>({eventName:AY,data:{id:T,path:b}}))}function f(b,v,T){return m(T?a:i,b,v,W=>({eventName:wY,data:{id:W,path:b,recursive:!!T,ignoreUpdate:b.endsWith("/node_modules")?void 0:!0}}))}function m({pathToId:b,idToCallbacks:v},T,W,F){let M=e.toPath(T),J=b.get(M);J||b.set(M,J=c++);let A=v.get(J);return A||(v.set(J,A=new Set),e.eventHandler(F(J))),A.add(W),{close(){let V=v.get(J);V?.delete(W)&&(V.size||(v.delete(J),b.delete(M),e.eventHandler({eventName:RY,data:{id:J}})))}}}function y(b){Nr(b)?b.forEach(g):g(b)}function g({id:b,created:v,deleted:T,updated:W}){S(b,v,0),S(b,T,2),S(b,W,1)}function S(b,v,T){v?.length&&(_(r,b,v,(W,F)=>W(F,T)),_(i,b,v,(W,F)=>W(F)),_(a,b,v,(W,F)=>W(F)))}function _(b,v,T,W){b.idToCallbacks.get(v)?.forEach(F=>{T.forEach(M=>W(F,Cc(M)))})}}function sSe(e,n){return`${gi(n)?`Config: ${n} `:n?`Project: ${n.getProjectName()} `:""}WatchType: ${e}`}function jY(e,n){return e.potentialProjectReferences&&OF(e.potentialProjectReferences,n)}function JY(e,n,r,i,a,c,u,f){let m=e.getCurrentProgram()?.getResolvedProjectReferences();if(!m)return;let y=n?e.getResolvedProjectReferenceToRedirect(n):void 0;if(y){let _=Ho(y.sourceFile.fileName),b=e.projectService.findConfiguredProjectByProjectName(_,c);if(b){let v=S(b);if(v)return v}else if(i!==0){let v=Fj(m,e.getCompilerOptions(),(T,W)=>y===T?g(T,W):void 0,i,e.projectService);if(v)return v}}return Fj(m,e.getCompilerOptions(),(_,b)=>y!==_?g(_,b):void 0,i,e.projectService);function g(_,b){let v=e.projectService.findCreateOrReloadConfiguredProject(Ho(_.sourceFile.fileName),b,a,c,u,f);return v&&(b===i?r(v.project,v.sentConfigFileDiag):S(v.project))}function S(_){let b=!1;switch(i){case 1:b=BY(_,u);break;case 2:b=_.projectService.reloadConfiguredProjectClearingSemanticCache(_,a,f);break;case 0:break;default:E.assertNever(i)}let v=r(_,b);if(v)return v}}function Fj(e,n,r,i,a,c){let u=n.disableReferencedProjectLoad?0:i;return Bn(e,f=>{if(!f)return;let m=Ho(f.sourceFile.fileName),y=a.toCanonicalFileName(m),g=c?.get(y);if(g!==void 0&&g>=u)return;let S=r(f,u);return S||((c||(c=new Map)).set(y,u),f.references&&Fj(f.references,f.commandLine.options,r,u,a,c))})}function Ij(e){let{lazyConfiguredProjectsFromExternalProject:n,...r}=e;return r}function NY(e){let n=1;return()=>e(n++)}function WY(e){return`/dev/null/inferredProject${e}*`}function kY(e,n){return cSe(e,r=>vj(e,n,r.sourceFile.path),r=>vj(e,n,e.toPath(KE(r))),r=>vj(e,n,r))}function cSe(e,n,r,i){return e.getCurrentProgram()?e.forEachResolvedProjectReference(n):e.isInitialLoadPending()?jY(e,i):Bn(e.getProjectReferences(),r)}function vj(e,n,r){let i=r&&e.projectService.configuredProjects.get(r);return i&&n(i)}function Lj(e){switch(e){case"LPC":return 1;default:return 0}}function UY(e){let n=new Map;for(let r of e)if(typeof r.type=="object"){let i=r.type;i.forEach(a=>{E.assert(typeof a=="number")}),n.set(r.name,i)}return n}var lSe=UY(Ug),uSe=UY(zM),udn=new Map(Object.entries({none:0,block:1,smart:2}));function KY(e){return lSe.forEach((n,r)=>{let i=e[r];gi(i)&&(e[r]=n.get(i.toLowerCase()))}),e}function qY(e,n){let r,i;return zM.forEach(a=>{let c=e[a.name];if(c===void 0)return;let u=uSe.get(a.name);(r||(r={}))[a.name]=u?gi(c)?u.get(c.toLowerCase()):c:Wg(a,c,n||"",i||(i=[]))}),r&&{watchOptions:r,errors:i}}function VY(e){let n;return cH.forEach(r=>{let i=e[r.name];i!==void 0&&((n||(n={}))[r.name]=i)}),n}var dSe={isCancellationRequested:()=>!1,setRequest:()=>{},resetRequest:()=>{}},Aj=class e{constructor(n){this.changeSeq=0;this.regionDiagLineCountThreshold=500;this.handlers=new Map(Object.entries({change:n=>(this.change(n.arguments),this.notRequired()),close:n=>{let r=n.arguments;return this.closeClientFile(r.file),this.notRequired()},open:n=>(this.openClientFile(Ho(n.arguments.file),n.arguments.fileContent,Lj(n.arguments.scriptKindName),n.arguments.projectRootPath?Ho(n.arguments.projectRootPath):void 0),this.notRequired()),updateOpen:n=>{let r=this.updateOpenWorker(n.arguments);return this.requiredResponse(r)},geterr:n=>(this.errorCheck.startNew(r=>this.getDiagnostics(r,n.arguments.delay,n.arguments.files)),this.notRequired()),completionInfo:n=>this.requiredResponse(this.getCompletions(n.arguments,"completionInfo")),completionEntryDetails:n=>this.requiredResponse(this.getCompletionEntryDetails(n.arguments,!1)),definition:n=>this.requiredResponse(this.getDefinition(n.arguments,!0)),signatureHelp:n=>this.requiredResponse(this.getSignatureHelpItems(n.arguments,!0)),quickinfo:n=>this.requiredResponse(this.getQuickInfoWorker(n.arguments,!1)),"encodedSemanticClassifications-full":n=>this.requiredResponse(this.getEncodedSemanticClassifications(n.arguments)),projectInfo:n=>this.requiredResponse(this.getProjectInfo(n.arguments)),docCommentTemplate:n=>this.requiredResponse(this.getDocCommentTemplate(n.arguments)),references:n=>this.requiredResponse(this.getReferences(n.arguments,!0)),navtree:n=>this.requiredResponse(this.getNavigationTree(n.arguments,!0))}));this.host=n.host,this.cancellationToken=n.cancellationToken,this.byteLength=n.byteLength,this.hrtime=n.hrtime,this.logger=n.logger,this.canUseEvents=n.canUseEvents,this.suppressDiagnosticEvents=n.suppressDiagnosticEvents,this.noGetErrOnBackgroundUpdate=n.noGetErrOnBackgroundUpdate;let{throttleWaitMilliseconds:r}=n,i={executeWithRequestId:(c,u)=>this.executeWithRequestId(c,u),getCurrentRequestId:()=>this.currentRequestId,getServerHost:()=>this.host,logError:(c,u)=>this.logError(c,u),sendRequestCompletedEvent:c=>this.sendRequestCompletedEvent(c),isCancellationRequested:()=>this.cancellationToken.isCancellationRequested()};this.errorCheck=new wj(i);let a={host:this.host,logger:this.logger,cancellationToken:this.cancellationToken,useSingleInferredProject:n.useSingleInferredProject,useInferredProjectPerProjectRoot:n.useInferredProjectPerProjectRoot,globalPlugins:n.globalPlugins,pluginProbeLocations:n.pluginProbeLocations,allowLocalPluginLoads:n.allowLocalPluginLoads,typesMapLocation:n.typesMapLocation,throttleWaitMilliseconds:r,serverMode:n.serverMode,session:this,projectRootFolder:n.projectRootFolder};switch(this.projectService=new EP(a),this.gcTimer=new TP(this.host,7e3,this.logger),this.projectService.serverMode){case 0:break;case 1:nX.forEach(c=>this.handlers.set(c,u=>{throw new Error(`Request: ${u.command} not allowed in LanguageServiceMode.PartialSemantic`)}));break;case 2:NSe.forEach(c=>this.handlers.set(c,u=>{throw new Error(`Request: ${u.command} not allowed in LanguageServiceMode.Syntactic`)}));break;default:E.assertNever(this.projectService.serverMode)}}exit(){}send(n){if(n.type==="event"&&!this.canUseEvents){this.logger.hasLevel(3)&&this.logger.info(`Session does not support events: ignored event: ${Bb(n)}`);return}this.writeMessage(n)}writeMessage(n){let r=$Y(n,this.logger,this.byteLength,this.host.newLine);this.host.write(r)}event(n,r){this.send(GY(r,n))}sendRequestCompletedEvent(n){this.event({request_seq:n},"requestCompleted")}setCurrentRequest(n){E.assert(this.currentRequestId===void 0),this.currentRequestId=n,this.cancellationToken.setRequest(n)}resetCurrentRequest(n){E.assert(this.currentRequestId===n),this.currentRequestId=void 0,this.cancellationToken.resetRequest(n)}executeWithRequestId(n,r){try{return this.setCurrentRequest(n),r()}finally{this.resetCurrentRequest(n)}}logError(n,r){this.logErrorWorker(n,r)}logErrorWorker(n,r,i){let a="Exception on executing command "+r;if(n.message&&(a+=`:
86
+ `+Mb(n.message),n.stack&&(a+=`
87
+ `+Mb(n.stack))),this.logger.hasLevel(3)){if(i)try{let{file:c,project:u}=this.getFileAndProject(i),f=u.getScriptInfoForNormalizedPath(c);if(f){let m=Fm(f.getSnapshot());a+=`
88
+
89
+ File text of ${i.file}:${Mb(m)}
90
+ `}}catch{}if(n.ProgramFiles){a+=`
91
+
92
+ Program files: ${JSON.stringify(n.ProgramFiles)}
93
+ `,a+=`
94
+
95
+ Projects::
96
+ `;let c=0,u=f=>{a+=`
97
+ Project '${f.projectName}' (${MS[f.projectKind]}) ${c}
98
+ `,a+=f.filesToString(!0),a+=`
99
+ -----------------------------------------------
100
+ `,c++};this.projectService.configuredProjects.forEach(u),this.projectService.inferredProjects.forEach(u)}}this.logger.msg(a,"Err")}getFileAndProject(n){return this.getFileAndProjectWorker(n.file,n.projectFileName)}getFileAndLanguageServiceForSyntacticOperation(n){let{file:r,project:i}=this.getFileAndProject(n);return{file:r,languageService:i.getLanguageService(!1)}}getProject(n){return n===void 0?void 0:this.projectService.findProject(n)}getFileAndProjectWorker(n,r){let i=Ho(n),a=this.getProject(r)||this.projectService.ensureDefaultProjectForFile(i);return{file:i,project:a}}getProjectInfo(n){return this.getProjectInfoWorker(n.file,n.projectFileName,n.needFileNameList,!1)}openClientFile(n,r,i,a){this.projectService.openClientFileWithNormalizedPath(n,r,i,!1,a)}openFile(n){return this.openClientFile(Ho(n.file),n.fileContent,1,n.projectRootPath?Ho(n.projectRootPath):void 0),n}getPosition(n,r){return n.position!==void 0?n.position:r.lineOffsetToPosition(n.line,n.offset)}mapDisplayParts(n,r){return n?n.map(i=>i):[]}updateOpenWorker(n){this.changeSeq++;let r=n.openFiles&&q1(n.openFiles,a=>({fileName:a.file,content:a.fileContent,projectRootPath:a.projectRootPath})),i=n.changedFiles&&q1(n.changedFiles,a=>({fileName:a.fileName,changes:Xy(BK(a.textChanges),c=>{let u=E.checkDefined(this.projectService.getScriptInfo(a.fileName)),f=u.lineOffsetToPosition(c.start.line,c.start.offset),m=u.lineOffsetToPosition(c.end.line,c.end.offset);return f>=0?{span:{start:f,length:m-f},newText:c.newText}:void 0})}));return this.projectService.applyChangesInOpenFiles(r,i,n.closedFiles),!0}closeClientFile(n){if(!n)return;let r=Qr(n);this.projectService.closeClientFile(r)}change(n){let r=this.projectService.getScriptInfo(n.file);E.assert(!!r),r.textStorage.switchToScriptVersionCache();let i=r.lineOffsetToPosition(n.line,n.offset),a=r.lineOffsetToPosition(n.endLine,n.endOffset);if(r.registerFileUpdate(),i>=0&&(this.changeSeq++,this.projectService.applyChangesToFile(r,QK({span:{start:i,length:a-i},newText:n.insertString})),r.fileName.endsWith(".h"))){let c=0;r.containingProjects.forEach(u=>{u.resolutionCache.resolvedFileToResolution.get(r.path)?.forEach(m=>{m.files.forEach(y=>{this.projectService.getScriptInfoForPath(y)?.incrementVersion(),c++})})})}}getDiagnostics(n,r,i){this.suppressDiagnosticEvents||i.length>0&&this.updateErrorCheck(n,i,r)}toPendingErrorCheck(n){let r=Ho(n),i=this.projectService.tryGetDefaultProjectForFile(r);return i&&{fileName:r,project:i}}setCompilerOptionsForInferredProjects(n){this.projectService.setCompilerOptionsForInferredProjects(n.options,n.projectRootPath)}updateErrorCheck(n,r,i,a=!0){E.assert(!this.suppressDiagnosticEvents);let c=this.changeSeq,u=Math.min(i,200),f=0,m=()=>{f++,r.length>f&&n.delay("checkOne",u,y)},y=()=>{if(this.changeSeq!==c)return;let g=r[f];if(gi(g)&&(g=this.toPendingErrorCheck(g),!g)){m();return}let{fileName:S,project:_}=g,b=[];if(Zl(_),!_.containsFile(S,a))return;let v=this.syntacticCheck(S,_);if(b.push(...v),this.changeSeq!==c){this.sendAllDiagnostics(b,S,_);return}if(_.projectService.serverMode!==0){this.sendAllDiagnostics(b,S,_),m();return}n.immediate("semanticCheck",()=>{let T=this.semanticCheck(S,_);if(_.getCompilerOptions()?.diagnostics&&b.push(...T),this.changeSeq!==c){this.sendAllDiagnostics(b,S,_);return}if(this.getPreferences(S).disableSuggestions){this.sendAllDiagnostics(b,S,_),m();return}n.immediate("suggestionCheck",()=>{_.getCompilerOptions()?.diagnostics&&b.push(...this.suggestionCheck(S,_)),n.immediate("sendAllDiags",()=>{this.sendAllDiagnostics(b,S,_),m()})})})};r.length>f&&this.changeSeq===c&&n.delay("checkOne",i,y)}sendAllDiagnostics(n,r,i){this.sendDiagnosticsEvent(r,i,n,"allDiag")}semanticCheck(n,r){In?.push(In.Phase.Session,"semanticCheck",{file:n,configFilePath:r.canonicalConfigFilePath});let i=r.getLanguageService().getSemanticDiagnostics(n).filter(a=>!!a.file);return this.sendDiagnosticsEvent(n,r,i,"semanticDiag"),In?.pop(),i}syntacticCheck(n,r){In?.push(In.Phase.Session,"syntacticCheck",{file:n,configFilePath:r.canonicalConfigFilePath});let i=r.getLanguageService().getSyntacticDiagnostics(n);return this.sendDiagnosticsEvent(n,r,i,"syntaxDiag"),In?.pop(),i}suggestionCheck(n,r){In?.push(In.Phase.Session,"suggestionCheck",{file:n,configFilePath:r.canonicalConfigFilePath});let i=r.getLanguageService().getSuggestionDiagnostics(n);return this.sendDiagnosticsEvent(n,r,i,"suggestionDiag"),In?.pop(),i}getConfigFileAndProject(n){let r=this.getProject(n.projectFileName),i=Ho(n.file);return{configFile:r&&r.hasConfigFile(i)?i:void 0,project:r}}getConfigFileDiagnostics(n,r,i){let a=r.getAllProjectErrors(),c=r.getLanguageService().getCompilerOptionsDiagnostics(),u=Ar(Zr(a,c),f=>!!f.file&&f.file.fileName===n);return i?this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(u):Yn(u,f=>QY(f,!1))}convertToDiagnosticsWithLinePositionFromDiagnosticFile(n){return n.map(r=>({message:Gg(r.messageText,this.host.newLine),start:r.start,length:r.length,category:Zy(r),code:r.code,source:r.source,startLocation:r.file&&Kb(ma(r.file,r.start)),endLocation:r.file&&Kb(ma(r.file,r.start+r.length)),reportsUnnecessary:r.reportsUnnecessary,reportsDeprecated:r.reportsDeprecated,relatedInformation:Yn(r.relatedInformation,$L)}))}getFormatOptions(n){return this.projectService.getFormatCodeOptions(n)}getDocCommentTemplate(n){let{file:r,languageService:i}=this.getFileAndLanguageServiceForSyntacticOperation(n),a=this.getPositionInFile(n,r);return i.getDocCommentTemplateAtPosition(r,a,this.getPreferences(r),this.getFormatOptions(r))}getSemanticDiagnosticsSync(n){let{configFile:r,project:i}=this.getConfigFileAndProject(n);return r?this.getConfigFileDiagnostics(r,i,!!n.includeLinePosition):this.getDiagnosticsWorker(n,!0,(a,c)=>a.getLanguageService().getSemanticDiagnostics(c).filter(u=>!!u.file),!!n.includeLinePosition)}getDiagnosticsWorker(n,r,i,a){let{project:c,file:u}=this.getFileAndProject(n),f=c.getScriptInfoForNormalizedPath(u),m=i(c,u);return a?this.convertToDiagnosticsWithLinePosition(m,f):m.map(y=>zY(u,c,y))}convertToDiagnosticsWithLinePosition(n,r){return n.map(i=>({message:Gg(i.messageText,this.host.newLine),start:i.start,length:i.length,category:Zy(i),code:i.code,source:i.source,startLocation:r&&r.positionToLineOffset(i.start),endLocation:r&&r.positionToLineOffset(i.start+i.length),reportsUnnecessary:i.reportsUnnecessary,reportsDeprecated:i.reportsDeprecated,relatedInformation:Yn(i.relatedInformation,$L)}))}sendDiagnosticsEvent(n,r,i,a){try{this.event({file:n,diagnostics:i.map(c=>zY(n,r,c))},a)}catch(c){this.logError(c,a)}}getDiagnosticsForFiles(n){this.errorCheck.startNew(r=>this.getDiagnostics(r,n.delay,n.files))}getDiagnosticsForProject(n){this.errorCheck.startNew(r=>this.getDiagnosticsForProjectWorker(r,n.delay,n.file))}getEncodedSemanticClassifications(n){let{file:r,project:i}=this.getFileAndProject(n);if(i.getCurrentProgram())return i.getLanguageService().getEncodedSemanticClassifications(r,n)}getSignatureHelpItems(n,r){let{file:i,project:a}=this.getFileAndProject(n),c=this.projectService.getScriptInfoForNormalizedPath(i),u=this.getPosition(n,c),f=a.getLanguageService().getSignatureHelpItems(i,u,n),m=!!this.getPreferences(i).displayPartsForJSDoc;if(f&&r){let y=f.applicableSpan;return{...f,applicableSpan:{start:c.positionToLineOffset(y.start),end:c.positionToLineOffset(y.start+y.length)},items:this.mapSignatureHelpItems(f.items,a,m)}}else return m||!f?f:{...f,items:f.items.map(y=>({...y,tags:this.mapJSDocTagInfo(y.tags,a,!1)}))}}mapSignatureHelpItems(n,r,i){return n.map(a=>({...a,documentation:this.mapDisplayParts(a.documentation,r),parameters:a.parameters.map(c=>({...c,documentation:this.mapDisplayParts(c.documentation,r)})),tags:this.mapJSDocTagInfo(a.tags,r,i)}))}getQuickInfoWorker(n,r){let{file:i,project:a}=this.getFileAndProject(n),c=this.projectService.getScriptInfoForNormalizedPath(i),u=a.getLanguageService().getQuickInfoAtPosition(i,this.getPosition(n,c));if(!u)return;let f=!1;if(r){let m=mL(u.displayParts);return{kind:u.kind,kindModifiers:u.kindModifiers,start:c.positionToLineOffset(u.textSpan.start),end:c.positionToLineOffset(rd(u.textSpan)),displayString:m,documentation:f?this.mapDisplayParts(u.documentation,a):mL(u.documentation),tags:this.mapJSDocTagInfo(u.tags,a,f)}}else return f?u:{...u,tags:this.mapJSDocTagInfo(u.tags,a,!1)}}getProjectInfoWorker(n,r,i,a){let{project:c}=this.getFileAndProjectWorker(n,r);Zl(c);let f=c.getCompilerOptions()?.driverType==1?"FluffOS":"LDMud";return{configFileName:c.getProjectName(),languageServiceDisabled:!c.languageServiceEnabled,fileNames:i?c.getFileNames(!1,a):void 0,driverType:f}}getDiagnosticsForProjectWorker(n,r,i){if(this.suppressDiagnosticEvents)return;let{fileNames:a,languageServiceDisabled:c}=this.getProjectInfoWorker(i,void 0,!0,!0);if(c)return;let u=a.filter(T=>!T.includes("lib.d.ts"));if(u.length===0)return;let f=[],m=[],y=[],g=[],S=Ho(i),_=this.projectService.ensureDefaultProjectForFile(S);for(let T of u)this.getCanonicalFileName(T)===this.getCanonicalFileName(i)?f.push(T):this.projectService.getScriptInfo(T).isScriptOpen()?m.push(T):Jg(T)?g.push(T):y.push(T);let v=[...f,...m,...y,...g].map(T=>({fileName:T,project:_}));this.updateErrorCheck(n,v,r,!1)}getCanonicalFileName(n){let r=this.host.useCaseSensitiveFileNames?n:ug(n);return Qr(r)}mapJSDocTagInfo(n,r,i){return n?n.map(a=>({...a,text:i?this.mapDisplayParts(a.text,r):a.text?.map(c=>c.text).join("")})):[]}getPositionInFile(n,r){let i=this.projectService.getScriptInfoForNormalizedPath(r);return this.getPosition(n,i)}mapDefinitionInfoLocations(n,r){return n.map(i=>{let a=ySe(i,r);return a?{...a,containerKind:i.containerKind,containerName:i.containerName,kind:i.kind,name:i.name,failedAliasResolution:i.failedAliasResolution,...i.unverified&&{unverified:i.unverified}}:i})}toFileSpan(n,r,i){let a=i.getLanguageService(),c=a.toLineColumnOffset(n,r.start),u=a.toLineColumnOffset(n,rd(r));return{file:n,start:{line:c.line+1,offset:c.character+1},end:{line:u.line+1,offset:u.character+1}}}toFileSpanWithContext(n,r,i,a){let c=this.toFileSpan(n,r,a),u=i&&this.toFileSpan(n,i,a);return u?{...c,contextStart:u.start,contextEnd:u.end}:c}mapDefinitionInfo(n,r){return n.map(i=>({...this.toFileSpanWithContext(i.fileName,i.textSpan,i.contextSpan,r),...i.unverified&&{unverified:i.unverified}}))}getDefinition(n,r){let{file:i,project:a}=this.getFileAndProject(n),c=this.getPositionInFile(n,i),u=this.mapDefinitionInfoLocations(a.getLanguageService().getDefinitionAtPosition(i,c)||Re,a);return r?this.mapDefinitionInfo(u,a):u.map(e.mapToOriginalLocation)}toLocationNavigationTree(n,r){return{text:n.text,kind:n.kind,kindModifiers:n.kindModifiers,spans:n.spans.map(i=>BS(i,r)),nameSpan:n.nameSpan&&BS(n.nameSpan,r),childItems:Yn(n.childItems,i=>this.toLocationNavigationTree(i,r))}}getNavigationTree(n,r){let{file:i,languageService:a}=this.getFileAndLanguageServiceForSyntacticOperation(n),c=a.getNavigationTree(i);return c?r?this.toLocationNavigationTree(c,this.projectService.getScriptInfoForNormalizedPath(i)):c:void 0}static mapToOriginalLocation(n){return n.originalFileName?(E.assert(n.originalTextSpan!==void 0,"originalTextSpan should be present if originalFileName is"),{...n,fileName:n.originalFileName,textSpan:n.originalTextSpan,targetFileName:n.fileName,targetTextSpan:n.textSpan,contextSpan:n.originalContextSpan,targetContextSpan:n.contextSpan}):n}getRenameLocations(n,r){let i=Ho(n.file),a=this.getPositionInFile(n,i),c=this.getProjects(n),u=this.getDefaultProject(n),f=this.getPreferences(i),m=this.mapRenameInfo(u.getLanguageService().getRenameInfo(i,a,f),E.checkDefined(this.projectService.getScriptInfo(i)));if(!m.canRename)return r?{info:m,locs:[]}:[];let y=DSe(c,u,{fileName:n.file,pos:a},!!n.findInStrings,!!n.findInComments,f,this.host.useCaseSensitiveFileNames);return r?{info:m,locs:this.toSpanGroups(y)}:y}mapRenameInfo(n,r){if(n.canRename){let{canRename:i,fileToRename:a,displayName:c,fullDisplayName:u,kind:f,kindModifiers:m,triggerSpan:y}=n;return{canRename:i,fileToRename:a,displayName:c,fullDisplayName:u,kind:f,kindModifiers:m,triggerSpan:BS(y,r)}}else return n}toSpanGroups(n){let r=new Map;for(let{fileName:i,textSpan:a,contextSpan:c,originalContextSpan:u,originalTextSpan:f,originalFileName:m,...y}of n){let g=r.get(i);g||r.set(i,g={file:i,locs:[]});let S=E.checkDefined(this.projectService.getScriptInfo(i));g.locs.push({...ZY(a,c,S),...y})}return oo(r.values())}getProjects(n,r,i){let a,c;if(n.projectFileName){let u=this.getProject(n.projectFileName);u&&(a=[u])}else{let u=r?this.projectService.getScriptInfoEnsuringProjectsUptoDate(n.file):this.projectService.getScriptInfo(n.file);if(u)r||this.projectService.ensureDefaultProjectForFile(u);else return i?Re:(this.projectService.logErrorForScriptInfoNotFound(n.file),yd.ThrowNoProject());a=u.containingProjects,c=this.projectService.getSymlinkedProjects(u)}return a=Ar(a,u=>u.languageServiceEnabled&&!u.isOrphan()),!i&&(!a||!a.length)&&!c?(this.projectService.logErrorForScriptInfoNotFound(n.file??n.projectFileName),yd.ThrowNoProject()):c?{projects:a,symLinkedProjects:c}:a}getDefaultProject(n){if(n.projectFileName){let i=this.getProject(n.projectFileName);if(i)return i;if(!n.file)return yd.ThrowNoProject()}return this.projectService.getScriptInfo(n.file).getDefaultProject()}getReferences(n,r){let i=Ho(n.file),a=this.getProjects(n),c=this.getPositionInFile(n,i),u=_Se(a,this.getDefaultProject(n),{fileName:n.file,pos:c},this.host.useCaseSensitiveFileNames,this.logger);if(!r)return u;let f=this.getPreferences(i),m=this.getDefaultProject(n),y=m.getScriptInfoForNormalizedPath(i),g=m.getLanguageService().getQuickInfoAtPosition(i,c),S=g?mL(g.displayParts):"",_=g&&g.textSpan,b=_?y.positionToLineOffset(_.start).offset:0,v=_?y.getSnapshot().getText(_.start,rd(_)):"";return{refs:Oo(u,W=>W.references.map(F=>bSe(this.projectService,F,f))),symbolName:v,symbolStartOffset:b,symbolDisplayString:S}}getPreferences(n){return this.projectService.getPreferences(n)}getCompletions(n,r){let{file:i,project:a}=this.getFileAndProject(n),c=this.projectService.getScriptInfoForNormalizedPath(i),u=this.getPosition(n,c),f=a.getLanguageService().getCompletionsAtPosition(i,u,{...Ij(this.getPreferences(i)),triggerCharacter:n.triggerCharacter,triggerKind:n.triggerKind,includeExternalModuleExports:n.includeExternalModuleExports,includeInsertTextCompletions:n.includeInsertTextCompletions},a.projectService.getFormatCodeOptions(i));if(f===void 0)return;if(r==="completions-full")return f;let m=n.prefix||"",y=Ei(f.entries,S=>{if(f.isMemberCompletion||S.name&&Eo(S.name.toLowerCase(),m.toLowerCase())){let{name:_,kind:b,kindModifiers:v,sortText:T,insertText:W,filterText:F,replacementSpan:M,hasAction:J,source:A,sourceDisplay:V,labelDetails:ue,isSnippet:ye,isRecommended:he,isPackageJsonImport:ce,isImportStatementCompletion:Ee,data:Fe}=S,be=M?BS(M,c):void 0;return{name:_,kind:b,kindModifiers:v,sortText:T,insertText:W,filterText:F,replacementSpan:be,isSnippet:ye,hasAction:J||void 0,source:A,sourceDisplay:V,labelDetails:ue,isRecommended:he,isPackageJsonImport:ce,isImportStatementCompletion:Ee,data:Fe}}});return r==="completions"?(f.metadata&&(y.metadata=f.metadata),y):{...f,optionalReplacementSpan:f.optionalReplacementSpan&&BS(f.optionalReplacementSpan,c),entries:y}}getCompletionEntryDetails(n,r){let{file:i,project:a}=this.getFileAndProject(n),c=this.projectService.getScriptInfoForNormalizedPath(i),u=this.getPosition(n,c),f=a.projectService.getFormatCodeOptions(i),m=!!this.getPreferences(i).displayPartsForJSDoc,y=Ei(n.entryNames,g=>{let{name:S,source:_,data:b}=typeof g=="string"?{name:g,source:void 0,data:void 0}:g;return a.getLanguageService().getCompletionEntryDetails(i,u,S,f,_,this.getPreferences(i),b?Xa(b,ESe):void 0)});return r?m?y:y.map(g=>({...g,tags:this.mapJSDocTagInfo(g.tags,a,!1)})):y.map(g=>({...g,codeActions:Yn(g.codeActions,S=>this.mapCodeAction(S)),documentation:this.mapDisplayParts(g.documentation,a),tags:this.mapJSDocTagInfo(g.tags,a,m)}))}mapCodeAction({description:n,changes:r,commands:i}){return{description:n,changes:this.mapTextChangesToCodeEdits(r),commands:i}}mapTextChangesToCodeEdits(n){return n.map(r=>this.mapTextChangeToCodeEdit(r))}mapTextChangeToCodeEdit(n){let r=this.projectService.getScriptInfoOrConfig(n.fileName);return!!n.isNewFile==!!r&&(r||this.projectService.logErrorForScriptInfoNotFound(n.fileName),E.fail("Expected isNewFile for (only) new files. "+JSON.stringify({isNewFile:!!n.isNewFile,hasScriptInfo:!!r}))),r?{fileName:n.fileName,textChanges:n.textChanges.map(i=>fSe(i,r))}:mSe(n)}convertTextChangeToCodeEdit(n,r){return{start:r.positionToLineOffset(n.span.start),end:r.positionToLineOffset(n.span.start+n.span.length),newText:n.newText?n.newText:""}}requiredResponse(n){return{response:n,responseRequired:!0}}notRequired(){return{responseRequired:!1}}executeCommand(n){let r=this.handlers.get(n.command);return r?this.executeWithRequestId(n.seq,()=>r(n)):(this.logger.msg(`Unrecognized JSON command:${Bb(n)}`,"Err"),{responseRequired:!1})}toStringMessage(n){return n}onMessage(n){this.gcTimer.scheduleCollect(),this.performanceData=void 0;let r;this.logger.hasLevel(2)&&(r=this.hrtime(),this.logger.hasLevel(3)&&this.logger.info(`request:${Bb(n)}`));let i;try{i=n.arguments&&n.arguments.file?n.arguments:void 0,In?.instant(In.Phase.Session,"request",{seq:n.seq,command:n.command}),yg?.logStartCommand(""+n.command,JSON.stringify(n).substring(0,100)),In?.push(In.Phase.Session,"executeCommand",{seq:n.seq,command:n.command},!0);let{response:a,responseRequired:c}=this.executeCommand(n);if(In?.pop(),this.logger.hasLevel(2)){let u=PSe(this.hrtime(r)).toFixed(4);c?this.logger.perftrc(`${n.seq}::${n.command}: elapsed time (in milliseconds) ${u}`):this.logger.perftrc(`${n.seq}::${n.command}: async elapsed time (in milliseconds) ${u}`)}if(yg?.logStopCommand(""+n.command,"Success"),In?.instant(In.Phase.Session,"response",{seq:n.seq,command:n.command,success:!!a}),a)return a;if(c)return}catch(a){if(In?.popAll(),a instanceof Sg){yg?.logStopCommand(""+(n&&n.command),"Canceled: "+a),In?.instant(In.Phase.Session,"commandCanceled",{seq:n?.seq,command:n?.command});return}this.logErrorWorker(a,JSON.stringify(n),i),yg?.logStopCommand(""+(n&&n.command),"Error: "+a),In?.instant(In.Phase.Session,"commandError",{seq:n?.seq,command:n?.command,message:a.message});return}}};function fSe(e,n){return{start:HY(n,e.span.start),end:HY(n,rd(e.span)),newText:e.newText}}function HY(e,n){return eX(e)?pSe(e.getLineAndCharacterOfPosition(n)):e.positionToLineOffset(n)}function pSe(e){return{line:e.line+1,offset:e.character+1}}function mSe(e){E.assert(e.textChanges.length===1);let n=Uo(e.textChanges);return E.assert(n.span.start===0&&n.span.length===0),{fileName:e.fileName,textChanges:[{start:{line:0,offset:0},end:{line:0,offset:0},newText:n.newText}]}}var wj=class{constructor(n){this.operationHost=n}startNew(n){this.complete(),this.requestId=this.operationHost.getCurrentRequestId(),this.executeAction(n)}complete(){this.requestId!==void 0&&(this.operationHost.sendRequestCompletedEvent(this.requestId),this.requestId=void 0),this.setTimerHandle(void 0),this.setImmediateId(void 0)}immediate(n,r){let i=this.requestId;E.assert(i===this.operationHost.getCurrentRequestId(),"immediate: incorrect request id"),this.setImmediateId(this.operationHost.getServerHost().setImmediate(()=>{this.immediateId=void 0,this.operationHost.executeWithRequestId(i,()=>this.executeAction(r))},n))}delay(n,r,i){let a=this.requestId;E.assert(a===this.operationHost.getCurrentRequestId(),"delay: incorrect request id"),this.setTimerHandle(this.operationHost.getServerHost().setTimeout(()=>{this.timerHandle=void 0,this.operationHost.executeWithRequestId(a,()=>this.executeAction(i))},r,n))}executeAction(n){let r=!1;try{this.operationHost.isCancellationRequested()?(r=!0,In?.instant(In.Phase.Session,"stepCanceled",{seq:this.requestId,early:!0})):(In?.push(In.Phase.Session,"stepAction",{seq:this.requestId}),n(this),In?.pop())}catch(i){In?.popAll(),r=!0,i instanceof Sg?In?.instant(In.Phase.Session,"stepCanceled",{seq:this.requestId}):(In?.instant(In.Phase.Session,"stepError",{seq:this.requestId,message:i.message}),this.operationHost.logError(i,`delayed processing of request ${this.requestId}`))}(r||!this.hasPendingWork())&&this.complete()}setTimerHandle(n){this.timerHandle!==void 0&&this.operationHost.getServerHost().clearTimeout(this.timerHandle),this.timerHandle=n}setImmediateId(n){this.immediateId!==void 0&&this.operationHost.getServerHost().clearImmediate(this.immediateId),this.immediateId=n}hasPendingWork(){return!!this.timerHandle||!!this.immediateId}};function GY(e,n){return{seq:0,type:"event",event:e,body:n}}function $Y(e,n,r,i){let a=n.hasLevel(3),c=JSON.stringify(e);return a&&n.info(`${e.type}:${Bb(e)}`),`Content-Length: ${1+r(c,"utf8")}\r
101
+ \r
102
+ ${c}${i}`}function zY(e,n,r){let i=n.getScriptInfoForNormalizedPath(e);return{start:i.positionToLineOffset(r.start),end:i.positionToLineOffset(r.start+r.length),text:Gg(r.messageText,`
103
+ `),code:r.code,category:Zy(r),reportsUnnecessary:r.reportsUnnecessary,reportsDeprecated:r.reportsDeprecated,source:r.source,relatedInformation:Yn(r.relatedInformation,$L)}}function $L(e){return e.file?{span:{start:Kb(ma(e.file,e.start)),end:Kb(ma(e.file,e.start+e.length)),file:e.file.fileName},message:Gg(e.messageText,`
104
+ `),category:Zy(e),code:e.code}:{message:Gg(e.messageText,`
105
+ `),category:Zy(e),code:e.code}}function Kb(e){return{line:e.line+1,offset:e.character+1}}function QY(e,n){let r=e.file&&Kb(ma(e.file,e.start)),i=e.file&&Kb(ma(e.file,e.start+e.length)),a=Gg(e.messageText,`
106
+ `),{code:c,source:u}=e,f=Zy(e),m={start:r,end:i,text:a,code:c,category:f,reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated,source:u,relatedInformation:Yn(e.relatedInformation,$L)};return n?{...m,fileName:e.file&&e.file.fileName}:m}function gSe(e){return Rf(e)?e.canonicalConfigFilePath:e.getProjectName()}function Ub({fileName:e,textSpan:n}){return{fileName:e,pos:n.start}}function Rj(e,n){return hb(e,n.getSourceMapper(),r=>n.projectService.fileExists(r))}function ySe(e,n){return $E(e,n.getSourceMapper(),r=>n.projectService.fileExists(r))}function hSe(e,n){return sB(e,n.getSourceMapper(),r=>n.projectService.fileExists(r))}function BS(e,n){return{start:n.positionToLineOffset(e.start),end:n.positionToLineOffset(rd(e))}}function TSe(e,n,r){for(let i of Nr(e)?e:e.projects)r(i,n);!Nr(e)&&e.symLinkedProjects&&e.symLinkedProjects.forEach((i,a)=>{for(let c of i)r(c,a)})}function SSe(e,n,r){let i=e.getLanguageService().getDefinitionAtPosition(n.fileName,n.pos,!1,r),a=i&&ha(i);return a&&!a.isLocal?{fileName:a.fileName,pos:a.textSpan.start}:void 0}function YY(e,n){if(!n)return!1;let r=e.getLanguageService().getProgram();if(!r)return!1;let i=r.getSourceFile(n.fileName);return!!i&&i.resolvedPath!==i.path&&i.resolvedPath!==e.toPath(n.fileName)}function XY(e,n,r,i,a,c){let u=new Map,f=UK();f.enqueue({project:n,location:r}),TSe(e,r.fileName,(T,W)=>{let F={fileName:W,pos:r.pos};f.enqueue({project:T,location:F})});let m=n.projectService,y=n.getCancellationToken(),g=SSe(n,r,i),S=gc(()=>n.isSourceOfProjectReferenceRedirect(g.fileName)?g:n.getLanguageService().getSourceMapper().tryGetGeneratedPosition(g)),_=gc(()=>n.isSourceOfProjectReferenceRedirect(g.fileName)?g:n.getLanguageService().getSourceMapper().tryGetSourcePosition(g)),b=new Set;e:for(;!f.isEmpty();){for(;!f.isEmpty();){if(y.isCancellationRequested())break e;let{project:T,location:W}=f.dequeue();if(u.has(T)||YY(T,W)||(Zl(T),!T.containsFile(Ho(W.fileName))))continue;let F=v(T,W);u.set(T,F??Re),b.add(gSe(T))}g&&(m.loadAncestorProjectTree(b),m.forEachEnabledProject(T=>{if(y.isCancellationRequested()||u.has(T))return;let W=CSe(g,T,S,_);W&&f.enqueue({project:T,location:W})}))}if(u.size===1)return qK(u.values());return u;function v(T,W){let F=a(T,W);if(F){for(let M of F)c(M,J=>{let A=m.getOriginalLocationEnsuringConfiguredProject(T,J);if(!A)return;let V=m.getScriptInfo(A.fileName);for(let ye of V.containingProjects)!ye.isOrphan()&&!u.has(ye)&&f.enqueue({project:ye,location:A});let ue=m.getSymlinkedProjects(V);ue&&ue.forEach((ye,he)=>{for(let ce of ye)!ce.isOrphan()&&!u.has(ce)&&f.enqueue({project:ce,location:{fileName:he,pos:A.pos}})})});return F}}}function _Se(e,n,r,i,a){let c=XY(e,n,r,!1,(y,g)=>(a.info(`Finding references to ${g.fileName} position ${g.pos} in project ${y.getProjectName()}`),y.getLanguageService().findReferences(g.fileName,g.pos)),(y,g)=>{g(Ub(y.definition));for(let S of y.references)g(Ub(S))});if(Nr(c))return c;let u=c.get(n);if(u?.[0]?.references[0]?.isDefinition===void 0)c.forEach(y=>{for(let g of y)for(let S of g.references)delete S.isDefinition});else{let y=Oj(i);for(let S of u)for(let _ of S.references)if(_.isDefinition){y.add(_);break}let g=new Set;for(;;){let S=!1;if(c.forEach((_,b)=>{if(g.has(b))return;b.getLanguageService().updateIsDefinitionOfReferencedSymbols(_,y)&&(g.add(b),S=!0)}),!S)break}c.forEach((S,_)=>{if(!g.has(_))for(let b of S)for(let v of b.references)v.isDefinition=!1})}let f=[],m=Oj(i);return c.forEach((y,g)=>{for(let S of y){let _=Rj(Ub(S.definition),g),b=_===void 0?S.definition:{...S.definition,textSpan:Rc(_.pos,S.definition.textSpan.length),fileName:_.fileName,contextSpan:hSe(S.definition,g)},v=Sr(f,T=>dB(T.definition,b,i));v||(v={definition:b,references:[]},f.push(v));for(let T of S.references)!m.has(T)&&!Rj(Ub(T),g)&&(m.add(T),v.references.push(T))}}),f.filter(y=>y.references.length!==0)}function ZY(e,n,r){let i=BS(e,r),a=n&&BS(n,r);return a?{...i,contextStart:a.start,contextEnd:a.end}:i}function xSe(e,n){let r=e.lineToTextSpan(n.start.line-1);return e.getSnapshot().getText(r.start,rd(r)).replace(/\r|\n/g,"")}function bSe(e,{fileName:n,textSpan:r,contextSpan:i,isWriteAccess:a,isDefinition:c},{disableLineTextInReferences:u}){let f=E.checkDefined(e.getScriptInfo(n)),m=ZY(r,i,f),y=u?void 0:xSe(f,m);return{file:n,...m,lineText:y,isWriteAccess:a,isDefinition:c}}function CSe(e,n,r,i){if(n.containsFile(Ho(e.fileName))&&!YY(n,e))return e;let a=r();if(a&&n.containsFile(Ho(a.fileName)))return a;let c=i();return c&&n.containsFile(Ho(c.fileName))?c:void 0}function Oj(e){return VK(({textSpan:n})=>n.start+100003*n.length,jG(e))}function DSe(e,n,r,i,a,c,u){let f=XY(e,n,r,!0,(g,S)=>g.getLanguageService().findRenameLocations(S.fileName,S.pos,i,a,c),(g,S)=>S(Ub(g)));if(Nr(f))return f;let m=[],y=Oj(u);return f.forEach((g,S)=>{for(let _ of g)!y.has(_)&&!Rj(Ub(_),S)&&(m.push(_),y.add(_))}),m}function ESe(e){return e===void 0||e&&typeof e=="object"&&typeof e.exportName=="string"&&(e.fileName===void 0||typeof e.fileName=="string")&&(e.ambientModuleName===void 0||typeof e.ambientModuleName=="string"&&(e.isPackageJsonImport===void 0||typeof e.isPackageJsonImport=="boolean"))}function eX(e){return e.kind!==void 0}function PSe(e){let n=e[0],r=e[1];return(1e9*n+r)/1e6}var nX=["openExternalProject","openExternalProjects","closeExternalProject","synchronizeProjectList","emit-output","compileOnSaveAffectedFileList","compileOnSaveEmitFile","compilerOptionsDiagnostics-full","encodedSemanticClassifications-full","semanticDiagnosticsSync","suggestionDiagnosticsSync","geterrForProject","reload","reloadProjects","getCodeFixes","getCodeFixes-full","getCombinedCodeFix","getCombinedCodeFix-full","applyCodeActionCommand","getSupportedCodeFixes","getApplicableRefactors","getMoveToRefactoringFileSuggestions","getEditsForRefactor","getEditsForRefactor-full","organizeImports","organizeImports-full","getEditsForFileRename","getEditsForFileRename-full","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","getPasteEdits"],NSe=[...nX,"definition","definition-full","definitionAndBoundSpan","definitionAndBoundSpan-full","typeDefinition","implementation","implementation-full","references","references-full","rename","renameLocations-full","rename-full","quickinfo","quickinfo-full","completionInfo","completions","completions-full","completionEntryDetails","completionEntryDetails-full","signatureHelp","signatureHelp-full","navto","navto-full","documentHighlights","documentHighlights-full"];var Kh=4,tX=(u=>(u[u.PreStart=0]="PreStart",u[u.Start=1]="Start",u[u.Entire=2]="Entire",u[u.Mid=3]="Mid",u[u.End=4]="End",u[u.PostEnd=5]="PostEnd",u))(tX||{}),Mj=class{constructor(){this.goSubtree=!0;this.lineIndex=new jS;this.endBranch=[];this.state=2;this.initialText="";this.trailingText="";this.lineIndex.root=new ey,this.startPath=[this.lineIndex.root],this.stack=[this.lineIndex.root]}get done(){return!1}insertLines(n,r){r&&(this.trailingText=""),n?n=this.initialText+n+this.trailingText:n=this.initialText+this.trailingText;let a=jS.linesFromText(n).lines;a.length>1&&a[a.length-1]===""&&a.pop();let c,u;for(let m=this.endBranch.length-1;m>=0;m--)this.endBranch[m].updateCounts(),this.endBranch[m].charCount()===0&&(u=this.endBranch[m],m>0?c=this.endBranch[m-1]:c=this.branchNode);u&&c.remove(u);let f=this.startPath[this.startPath.length-1];if(a.length>0)if(f.text=a[0],a.length>1){let m=new Array(a.length-1),y=f;for(let _=1;_<a.length;_++)m[_-1]=new qb(a[_]);let g=this.startPath.length-2;for(;g>=0;){let _=this.startPath[g];m=_.insertAt(y,m),g--,y=_}let S=m.length;for(;S>0;){let _=new ey;_.add(this.lineIndex.root),m=_.insertAt(this.lineIndex.root,m),S=m.length,this.lineIndex.root=_}this.lineIndex.root.updateCounts()}else for(let m=this.startPath.length-2;m>=0;m--)this.startPath[m].updateCounts();else{this.startPath[this.startPath.length-2].remove(f);for(let y=this.startPath.length-2;y>=0;y--)this.startPath[y].updateCounts()}return this.lineIndex}post(n,r,i){i===this.lineCollectionAtBranch&&(this.state=4),this.stack.pop()}pre(n,r,i,a,c){let u=this.stack[this.stack.length-1];this.state===2&&c===1&&(this.state=1,this.branchNode=u,this.lineCollectionAtBranch=i);let f;function m(y){return y.isLeaf()?new qb(""):new ey}switch(c){case 0:this.goSubtree=!1,this.state!==4&&u.add(i);break;case 1:this.state===4?this.goSubtree=!1:(f=m(i),u.add(f),this.startPath.push(f));break;case 2:this.state!==4?(f=m(i),u.add(f),this.startPath.push(f)):i.isLeaf()||(f=m(i),u.add(f),this.endBranch.push(f));break;case 3:this.goSubtree=!1;break;case 4:this.state!==4?this.goSubtree=!1:i.isLeaf()||(f=m(i),u.add(f),this.endBranch.push(f));break;case 5:this.goSubtree=!1,this.state!==1&&u.add(i);break}this.goSubtree&&this.stack.push(f)}leaf(n,r,i){this.state===1?this.initialText=i.text.substring(0,n):this.state===2?(this.initialText=i.text.substring(0,n),this.trailingText=i.text.substring(n+r)):this.trailingText=i.text.substring(n+r)}},Bj=class{constructor(n,r,i){this.pos=n;this.deleteLen=r;this.insertedText=i}getTextChangeRange(){return Yv(Rc(this.pos,this.deleteLen),this.insertedText?this.insertedText.length:0)}},hd=class hd{constructor(){this.changes=[];this.versions=new Array(hd.maxVersions);this.minVersion=0;this.currentVersion=0}versionToIndex(n){if(!(n<this.minVersion||n>this.currentVersion))return n%hd.maxVersions}currentVersionToIndex(){return this.currentVersion%hd.maxVersions}edit(n,r,i){this.changes.push(new Bj(n,r,i)),(this.changes.length>hd.changeNumberThreshold||r>hd.changeLengthThreshold||i&&i.length>hd.changeLengthThreshold)&&this.getSnapshot()}getSnapshot(){return this._getSnapshot()}_getSnapshot(){let n=this.versions[this.currentVersionToIndex()];if(this.changes.length>0){let r=n.index;for(let i of this.changes)r=r.edit(i.pos,i.deleteLen,i.insertedText);n=new QL(this.currentVersion+1,this,r,this.changes),this.currentVersion=n.version,this.versions[this.currentVersionToIndex()]=n,this.changes=[],this.currentVersion-this.minVersion>=hd.maxVersions&&(this.minVersion=this.currentVersion-hd.maxVersions+1)}return n}getSnapshotVersion(){return this._getSnapshot().version}getAbsolutePositionAndLineText(n){return this._getSnapshot().index.lineNumberToInfo(n)}lineOffsetToPosition(n,r){return this._getSnapshot().index.absolutePositionOfStartOfLine(n)+(r-1)}positionToLineOffset(n){return this._getSnapshot().index.positionToLineOffset(n)}lineToTextSpan(n){let r=this._getSnapshot().index,{lineText:i,absolutePosition:a}=r.lineNumberToInfo(n+1),c=i!==void 0?i.length:r.absolutePositionOfStartOfLine(n+2)-a;return Rc(a,c)}getTextChangesBetweenVersions(n,r){if(n<r)if(n>=this.minVersion){let i=[];for(let a=n+1;a<=r;a++){let c=this.versions[this.versionToIndex(a)];for(let u of c.changesSincePreviousVersion)i.push(u.getTextChangeRange())}return v5(i)}else return;else return Xv}getLineCount(){return this._getSnapshot().index.getLineCount()}static fromString(n){let r=new hd,i=new QL(0,r,new jS);r.versions[r.currentVersion]=i;let a=jS.linesFromText(n);return i.index.load(a.lines),r}};hd.changeNumberThreshold=8,hd.changeLengthThreshold=256,hd.maxVersions=8;var jb=hd,QL=class e{constructor(n,r,i,a=Sp){this.version=n;this.cache=r;this.index=i;this.changesSincePreviousVersion=a}getText(n,r){return this.index.getText(n,r-n)}getLength(){return this.index.getLength()}getChangeRange(n){if(n instanceof e&&this.cache===n.cache)return this.version<=n.version?Xv:this.cache.getTextChangesBetweenVersions(n.version,this.version)}},jS=class e{constructor(){this.checkEdits=!1}absolutePositionOfStartOfLine(n){return this.lineNumberToInfo(n).absolutePosition}positionToLineOffset(n){let{oneBasedLine:r,zeroBasedColumn:i}=this.root.charOffsetToLineInfo(1,n);return{line:r,offset:i+1}}positionToColumnAndLineText(n){return this.root.charOffsetToLineInfo(1,n)}getLineCount(){return this.root.lineCount()}lineNumberToInfo(n){let r=this.getLineCount();if(n<=r){let{position:i,leaf:a}=this.root.lineNumberToInfo(n,0);return{absolutePosition:i,lineText:a&&a.text}}else return{absolutePosition:this.root.charCount(),lineText:void 0}}load(n){if(n.length>0){let r=[];for(let i=0;i<n.length;i++)r[i]=new qb(n[i]);this.root=e.buildTreeFromBottom(r)}else this.root=new ey}walk(n,r,i){this.root.walk(n,r,i)}getText(n,r){let i="";return r>0&&n<this.root.charCount()&&this.walk(n,r,{goSubtree:!0,done:!1,leaf:(a,c,u)=>{i=i.concat(u.text.substring(a,a+c))}}),i}getLength(){return this.root.charCount()}every(n,r,i){i||(i=this.root.charCount());let a={goSubtree:!0,done:!1,leaf(c,u,f){n(f,c,u)||(this.done=!0)}};return this.walk(r,i-r,a),!a.done}edit(n,r,i){if(this.root.charCount()===0)return E.assert(r===0),i!==void 0?(this.load(e.linesFromText(i).lines),this):void 0;{let a;if(this.checkEdits){let f=this.getText(0,this.root.charCount());a=f.slice(0,n)+i+f.slice(n+r)}let c=new Mj,u=!1;if(n>=this.root.charCount()){n=this.root.charCount()-1;let f=this.getText(n,1);i?i=f+i:i=f,r=0,u=!0}else if(r>0){let f=n+r,{zeroBasedColumn:m,lineText:y}=this.positionToColumnAndLineText(f);m===0&&(r+=y.length,i=i?i+y:y)}if(this.root.walk(n,r,c),c.insertLines(i,u),this.checkEdits){let f=c.lineIndex.getText(0,c.lineIndex.getLength());E.assert(a===f,"buffer edit mismatch")}return c.lineIndex}}static buildTreeFromBottom(n){if(n.length<Kh)return new ey(n);let r=new Array(Math.ceil(n.length/Kh)),i=0;for(let a=0;a<r.length;a++){let c=Math.min(i+Kh,n.length);r[a]=new ey(n.slice(i,c)),i=c}return this.buildTreeFromBottom(r)}static linesFromText(n){let r=nh(n);if(r.length===0)return{lines:[],lineMap:r};let i=new Array(r.length),a=r.length-1;for(let u=0;u<a;u++)i[u]=n.substring(r[u],r[u+1]);let c=n.substring(r[a]);return c.length>0?i[a]=c:i.pop(),{lines:i,lineMap:r}}},ey=class e{constructor(n=[]){this.children=n;this.totalChars=0;this.totalLines=0;n.length&&this.updateCounts()}isLeaf(){return!1}updateCounts(){this.totalChars=0,this.totalLines=0;for(let n of this.children)this.totalChars+=n.charCount(),this.totalLines+=n.lineCount()}execWalk(n,r,i,a,c){return i.pre&&i.pre(n,r,this.children[a],this,c),i.goSubtree?(this.children[a].walk(n,r,i),i.post&&i.post(n,r,this.children[a],this,c)):i.goSubtree=!0,i.done}skipChild(n,r,i,a,c){a.pre&&!a.done&&(a.pre(n,r,this.children[i],this,c),a.goSubtree=!0)}walk(n,r,i){let a=0,c=this.children[a].charCount(),u=n;for(;u>=c;)this.skipChild(u,r,a,i,0),u-=c,a++,c=this.children[a].charCount();if(u+r<=c){if(this.execWalk(u,r,i,a,2))return}else{if(this.execWalk(u,c-u,i,a,1))return;let f=r-(c-u);a++;let m=this.children[a];for(E.assertIsDefined(m),c=m.charCount();f>c;){if(this.execWalk(0,c,i,a,3))return;f-=c,a++,c=this.children[a].charCount()}if(f>0&&this.execWalk(0,f,i,a,4))return}if(i.pre){let f=this.children.length;if(a<f-1)for(let m=a+1;m<f;m++)this.skipChild(0,0,m,i,5)}}charOffsetToLineInfo(n,r){if(this.children.length===0)return{oneBasedLine:n,zeroBasedColumn:r,lineText:void 0};for(let c of this.children){if(c.charCount()>r)return c.isLeaf()?{oneBasedLine:n,zeroBasedColumn:r,lineText:c.text}:c.charOffsetToLineInfo(n,r);r-=c.charCount(),n+=c.lineCount()}let i=this.lineCount();if(i===0)return{oneBasedLine:1,zeroBasedColumn:0,lineText:void 0};let a=E.checkDefined(this.lineNumberToInfo(i,0).leaf);return{oneBasedLine:i,zeroBasedColumn:a.charCount(),lineText:void 0}}lineNumberToInfo(n,r){for(let i of this.children){let a=i.lineCount();if(a>=n)return i.isLeaf()?{position:r,leaf:i}:i.lineNumberToInfo(n,r);n-=a,r+=i.charCount()}return{position:r,leaf:void 0}}splitAfter(n){let r,i=this.children.length;n++;let a=n;if(n<i){for(r=new e;n<i;)r.add(this.children[n]),n++;r.updateCounts()}return this.children.length=a,r}remove(n){let r=this.findChildIndex(n),i=this.children.length;if(r<i-1)for(let a=r;a<i-1;a++)this.children[a]=this.children[a+1];this.children.pop()}findChildIndex(n){let r=this.children.indexOf(n);return E.assert(r!==-1),r}insertAt(n,r){let i=this.findChildIndex(n),a=this.children.length,c=r.length;if(a<Kh&&i===a-1&&c===1)return this.add(r[0]),this.updateCounts(),[];{let u=this.splitAfter(i),f=0;for(i++;i<Kh&&f<c;)this.children[i]=r[f],i++,f++;let m=[],y=0;if(f<c){y=Math.ceil((c-f)/Kh),m=new Array(y);let g=0;for(let _=0;_<y;_++)m[_]=new e;let S=m[0];for(;f<c;)S.add(r[f]),f++,S.children.length===Kh&&(g++,S=m[g]);for(let _=m.length-1;_>=0;_--)m[_].children.length===0&&m.pop()}u&&m.push(u),this.updateCounts();for(let g=0;g<y;g++)m[g].updateCounts();return m}}add(n){this.children.push(n),E.assert(this.children.length<=Kh)}charCount(){return this.totalChars}lineCount(){return this.totalLines}},qb=class{constructor(n){this.text=n}isLeaf(){return!0}walk(n,r,i){i.leaf(n,r,this)}charCount(){return this.text.length}lineCount(){return 1}};var Td={};cl(Td,{AuxiliaryProject:()=>Dj,CharRangeSection:()=>tX,CloseFileWatcherEvent:()=>RY,ConfigFileDiagEvent:()=>IY,ConfiguredProject:()=>CP,ConfiguredProjectLoadKind:()=>OY,CreateDirectoryWatcherEvent:()=>wY,CreateFileWatcherEvent:()=>AY,Errors:()=>yd,GcTimer:()=>TP,InferredProject:()=>DP,LargeFileReferencedEvent:()=>FY,LineIndex:()=>jS,LineLeaf:()=>qb,LineNode:()=>ey,LogLevel:()=>Ob,Msg:()=>KL,OpenFileInfoTelemetryEvent:()=>rSe,Project:()=>Wb,ProjectInfoTelemetryEvent:()=>tSe,ProjectKind:()=>MS,ProjectLanguageServiceStateEvent:()=>LY,ProjectLoadingFinishEvent:()=>nSe,ProjectLoadingStartEvent:()=>eSe,ProjectService:()=>EP,ProjectsUpdatedInBackgroundEvent:()=>vY,ScriptInfo:()=>SP,ScriptVersionCache:()=>jb,Session:()=>Aj,TextStorage:()=>HL,ThrottledOperations:()=>hP,asNormalizedPath:()=>xj,convertCompilerOptions:()=>KY,convertScriptKindName:()=>Lj,convertTypeAcquisition:()=>VY,convertUserPreferences:()=>Ij,convertWatchOptions:()=>qY,emptyArray:()=>Sp,findLpcConfig:()=>Cj,forEachResolvedProjectReferenceProject:()=>JY,formatDiagnosticToProtocol:()=>QY,formatMessage:()=>$Y,indent:()=>Mb,isBackgroundProject:()=>_P,isConfigFile:()=>eX,isConfiguredProject:()=>Rf,isDynamicFileName:()=>xP,isExternalProject:()=>Ej,isInferredProject:()=>Jb,isProjectDeferredClose:()=>bP,makeAuxiliaryProjectName:()=>bj,makeInferredProjectName:()=>WY,maxFileSize:()=>zL,maxProgramSizeForNonTsFiles:()=>ZTe,normalizedPathToPath:()=>OS,nowString:()=>VTe,nullCancellationToken:()=>dSe,protocol:()=>VL,stringifyIndented:()=>Bb,toEvent:()=>GY,toNormalizedPath:()=>Ho,updateProjectIfDirty:()=>Zl});typeof console<"u"&&(E.loggingHost={log(e,n){switch(e){case 1:return console.error(n);case 2:return console.warn(n);case 3:return console.log(n);case 4:return console.log(n)}}});var YL=ig(require("fs"));var XL=class e{constructor(n,r,i){this.logFilename=n;this.traceToConsole=r;this.level=i;this.seq=0;this.inGroup=!1;this.firstInGroup=!0;this.fd=-1;if(this.logFilename)try{this.fd=YL.default.openSync(this.logFilename,"w")}catch{}}static padStringRight(n,r){return(n+r).slice(0,r.length)}close(){this.fd>=0&&(YL.default.close(this.fd,Vi),this.fd=-1)}getLogFileName(){return this.logFilename}perftrc(n){this.msg(n,Td.Msg.Perf)}info(n){this.msg(n,Td.Msg.Info)}err(n){this.msg(n,Td.Msg.Err)}startGroup(){this.inGroup=!0,this.firstInGroup=!0}endGroup(){this.inGroup=!1}loggingEnabled(){return!!this.logFilename||this.traceToConsole}hasLevel(n){return this.loggingEnabled()&&this.level>=n}msg(n,r=Td.Msg.Err){this.canWrite()&&(n=`[${Td.nowString()}] ${n}
107
+ `,(!this.inGroup||this.firstInGroup)&&(n=e.padStringRight(r+" "+this.seq.toString()," ")+n),this.write(n,r),this.inGroup||this.seq++)}canWrite(){return this.fd>=0||this.traceToConsole}write(n,r){if(this.fd>=0){let i=Buffer.from(n);YL.default.writeSync(this.fd,i,0,i.length,null)}this.traceToConsole&&console.debug(n)}};var vSe=function(e,n,r){if(r||arguments.length===2)for(var i=0,a=n.length,c;i<a;i++)(c||!(i in n))&&(c||(c=Array.prototype.slice.call(n,0,i)),c[i]=n[i]);return e.concat(c||Array.prototype.slice.call(n))},iX=function(){function e(n,r,i,a){this._uri=n,this._languageId=r,this._version=i,this._content=a,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(n){if(n){var r=this.offsetAt(n.start),i=this.offsetAt(n.end);return this._content.substring(r,i)}return this._content},e.prototype.update=function(n,r){for(var i=0,a=n;i<a.length;i++){var c=a[i];if(e.isIncremental(c)){var u=aX(c.range),f=this.offsetAt(u.start),m=this.offsetAt(u.end);this._content=this._content.substring(0,f)+c.text+this._content.substring(m,this._content.length);var y=Math.max(u.start.line,0),g=Math.max(u.end.line,0),S=this._lineOffsets,_=oX(c.text,!1,f);if(g-y===_.length)for(var b=0,v=_.length;b<v;b++)S[b+y+1]=_[b];else _.length<1e4?S.splice.apply(S,vSe([y+1,g-y],_,!1)):this._lineOffsets=S=S.slice(0,y+1).concat(_,S.slice(g+1));var T=c.text.length-(m-f);if(T!==0)for(var b=y+1+_.length,v=S.length;b<v;b++)S[b]=S[b]+T}else if(e.isFull(c))this._content=c.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=r},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=oX(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var r=this.getLineOffsets(),i=0,a=r.length;if(a===0)return{line:0,character:n};for(;i<a;){var c=Math.floor((i+a)/2);r[c]>n?a=c:i=c+1}var u=i-1;return{line:u,character:n-r[u]}},e.prototype.offsetAt=function(n){var r=this.getLineOffsets();if(n.line>=r.length)return this._content.length;if(n.line<0)return 0;var i=r[n.line],a=n.line+1<r.length?r[n.line+1]:this._content.length;return Math.max(Math.min(i+n.character,a),i)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e.isIncremental=function(n){var r=n;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")},e.isFull=function(n){var r=n;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0},e}(),ZL;(function(e){function n(a,c,u,f){return new iX(a,c,u,f)}e.create=n;function r(a,c,u){if(a instanceof iX)return a.update(c,u),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function i(a,c){for(var u=a.getText(),f=jj(c.map(FSe),function(v,T){var W=v.range.start.line-T.range.start.line;return W===0?v.range.start.character-T.range.start.character:W}),m=0,y=[],g=0,S=f;g<S.length;g++){var _=S[g],b=a.offsetAt(_.range.start);if(b<m)throw new Error("Overlapping edit");b>m&&y.push(u.substring(m,b)),_.newText.length&&y.push(_.newText),m=a.offsetAt(_.range.end)}return y.push(u.substr(m)),y.join("")}e.applyEdits=i})(ZL||(ZL={}));function jj(e,n){if(e.length<=1)return e;var r=e.length/2|0,i=e.slice(0,r),a=e.slice(r);jj(i,n),jj(a,n);for(var c=0,u=0,f=0;c<i.length&&u<a.length;){var m=n(i[c],a[u]);m<=0?e[f++]=i[c++]:e[f++]=a[u++]}for(;c<i.length;)e[f++]=i[c++];for(;u<a.length;)e[f++]=a[u++];return e}function oX(e,n,r){r===void 0&&(r=0);for(var i=n?[r]:[],a=0;a<e.length;a++){var c=e.charCodeAt(a);(c===13||c===10)&&(c===13&&a+1<e.length&&e.charCodeAt(a+1)===10&&a++,i.push(r+a+1))}return i}function aX(e){var n=e.start,r=e.end;return n.line>r.line||n.line===r.line&&n.character>r.character?{start:r,end:n}:e}function FSe(e){var n=aX(e.range);return n!==e.range?{newText:e.newText,range:n}:e}var Am=require("vscode-uri"),mX=ig(require("events"));var Ss=ig(G_());var Hi=ig(G_());var aA=require("vscode-uri");var Ni=class{};Ni.alias="alias",Ni.callSignature="call",Ni.class="class",Ni.const="const",Ni.constructorImplementation="constructor",Ni.constructSignature="construct",Ni.directory="directory",Ni.enum="enum",Ni.define="define",Ni.enumMember="enum member",Ni.externalModuleName="external module name",Ni.function="function",Ni.indexSignature="index",Ni.interface="interface",Ni.keyword="keyword",Ni.let="let",Ni.localFunction="local function",Ni.localVariable="local var",Ni.method="method",Ni.memberGetAccessor="getter",Ni.memberSetAccessor="setter",Ni.memberVariable="property",Ni.module="module",Ni.primitiveType="primitive type",Ni.script="script",Ni.type="type",Ni.variable="var",Ni.warning="warning",Ni.string="string",Ni.parameter="parameter",Ni.typeParameter="type parameter";var Zc=class Zc{};Zc.optional="optional",Zc.deprecated="deprecated",Zc.color="color",Zc.dtsFile=".d.ts",Zc.tsFile=".ts",Zc.tsxFile=".tsx",Zc.jsFile=".js",Zc.jsxFile=".jsx",Zc.jsonFile=".json",Zc.fileExtensionKindModifiers=[Zc.dtsFile,Zc.tsFile,Zc.tsxFile,Zc.jsFile,Zc.jsxFile,Zc.jsonFile];var qh=Zc;function LSe(e,n){switch(e.name){case"augments":case"extends":case"param":case"template":{let a=ASe(e,n);if(a?.length===3){let c=a[1],u=a[2],f=`*@${e.name}* \`${c}\``;return u?f+(u.match(/\r\n|\n/g)?`
108
+ `+PP(u):` \u2014 ${PP(u)}`):f}break}case"return":case"returns":{if(!e.text?.length)return;break}}let r=`*@${e.name}*`,i=RSe(e,n);return i?r+(i.match(/\r\n|\n/g)?`
109
+ `+i:` \u2014 ${i}`):r}function ASe(e,n){if(e.name==="template"){let r=e.text;if(r&&typeof r!="string"){let i=r.filter(c=>c.kind==="typeParameterName").map(c=>c.text).join(", "),a=r.filter(c=>c.kind==="text").map(c=>eA(c.text.replace(/^\s*-?\s*/,""),n)).join(" ");return i?["",i,a]:void 0}}return eA(e.text,n).split(/^(\S+)\s*-?\s*/)}function eA(e,n){if(!e)return"";if(typeof e=="string")return e;let r=[],i;for(let a of e)switch(a.kind){case"link":if(i){if(i.target)E.fail("todo");else{let c=i.text??i.name;if(c)if(/^https?:/.test(c)){let u=c.split(" ");if(u.length===1)r.push(`<${u[0]}>`);else if(u.length>1){let f=u.slice(1).join(" ");r.push(`[${i.linkcode?"`"+sX(f)+"`":f}](${u[0]})`)}}else r.push(sX(c))}i=void 0}else i={linkcode:a.text==="{@linkcode "};break;case"linkName":i&&(i.name=a.text);break;case"linkText":i&&(i.text=a.text);break;default:r.push(a.text);break}return PP(r.join(""))}function PP(e){return wSe(e)}function sX(e){return e.replace(/`/g,"\\$&")}function wSe(e){return e.replace(/\{@(link|linkplain|linkcode) (https?:\/\/[^ |}]+?)(?:[| ]([^{}\n]+?))?\}/gi,(n,r,i,a)=>{switch(r){case"linkcode":return`[\`${a?a.trim():i}\`](${i})`;default:return`[${a?a.trim():i}](${i})`}})}function RSe(e,n){if(!e.text)return;function r(a){return/^\s*[~`]{3}/m.test(a)?a:"```\n"+a+"\n```"}let i=eA(e.text,n);switch(e.name){case"example":{i=OSe(e.text);let a=i.match(/<caption>(.*?)<\/caption>\s*(\r\n|\n)/);return a&&a.index===0?a[1]+`
110
+ `+r(i.substr(a[0].length)):r(i)}case"author":{let a=i.match(/(.+)\s<([-.\w]+@[-.\w]+)>/);return a===null?i:`${a[1]} ${a[2]}`}case"default":return r(i)}return PP(i)}function OSe(e){return typeof e=="string"?e:e.map(n=>n.text).join("")}function Jj(e,n){return e.map(r=>LSe(r,n)).join(`
111
+
112
+ `)}function Vb(e,n){return PP(eA(e,n))}function MSe(e,n,r){let i="";if(e&&(i+=Vb(e,r)),n){let a=Jj(n,r);a&&(i+=`
113
+
114
+ `+a)}return i}function Wj(e,n,r,i){return MSe(e,n,r)}var Of;(c=>(c.fromTextSpan=u=>(0,c.fromLocations)(u.start,u.end),c.toTextSpan=u=>({start:nA.toLocation(u.start),end:nA.toLocation(u.end)}),c.fromLocations=(u,f)=>Hi.Range.create(Math.max(0,u.line-1),Math.max(u.offset-1,0),Math.max(0,f.line-1),Math.max(0,f.offset-1)),c.toFileRangeRequestArgs=(u,f)=>({file:u,startLine:f.start.line+1,startOffset:f.start.character+1,endLine:f.end.line+1,endOffset:f.end.character+1}),c.toFormattingRequestArgs=(u,f)=>({file:u,line:f.start.line+1,offset:f.start.character+1,endLine:f.end.line+1,endOffset:f.end.character+1})))(Of||(Of={}));var nA;(i=>(i.fromLocation=a=>Hi.Position.create(a.line-1,a.offset-1),i.toLocation=a=>({line:a.line+1,offset:a.character+1}),i.toFileLocationRequestArgs=(a,c)=>({file:a,line:c.line+1,offset:c.character+1})))(nA||(nA={}));var NP;(r=>{r.fromTextSpan=(i,a)=>Hi.Location.create(i.toString(),Of.fromTextSpan(a));function n(i){return Hi.Location.create(aA.URI.file(i.file).toString(),Of.fromTextSpan(i))}r.fromFileSpan=n})(NP||(NP={}));var tA;(n=>{function e(r,i){let a={changes:{}};for(let c of r){let u=aA.URI.file(c.file).toString();for(let f of c.locs)a.changes[u]=a.changes[u]||[],a.changes[u].push(Hi.TextEdit.replace(Of.fromTextSpan(f),i))}return a}n.fromRenames=e})(tA||(tA={}));var Hb;(i=>{function e(a){switch(a){case"primitive type":case"keyword":return Hi.CompletionItemKind.Keyword;case"alias":case"parameter":return Hi.CompletionItemKind.Variable;case"define":return Hi.CompletionItemKind.Enum;case"property":return Hi.CompletionItemKind.Field;case"function":case"local function":return Hi.CompletionItemKind.Function;case"call":case"index":return Hi.CompletionItemKind.Method;case"class":case"type":return Hi.CompletionItemKind.Class;case"interface":return Hi.CompletionItemKind.Interface;case"warning":return Hi.CompletionItemKind.Text;case"script":return Hi.CompletionItemKind.File;case"directory":return Hi.CompletionItemKind.Folder;case"string":return Hi.CompletionItemKind.Constant;default:return Hi.CompletionItemKind.Property}}i.fromKind=e;function n(a){if(!a.kindModifiers||a.kind!=="script")return;let c=r(a.kindModifiers);for(let u of qh.fileExtensionKindModifiers)if(c.has(u))return a.name.toLowerCase().endsWith(u)?a.name:a.name+u}i.getDetails=n;function r(a){return new Set(a.split(/,|\s+/g))}i.parseKindModifier=r})(Hb||(Hb={}));var rA;(n=>{function e(r,i){let a=Hi.CompletionItem.create(r.name);return a.detail=r.displayParts.map(c=>c.text).join(""),a.documentation={kind:"markdown",value:kP.documentationToMarkdown(r.documentation,r.tags,i)},a}n.convert=e})(rA||(rA={}));var kP;(n=>{function e(r,i,a){let c="";if(gi(r)?c+=r:r&&(c+=r.map(u=>u.text).join("")),i){let f=Jj(i,{toResource:m=>aA.URI.file(m)});c+=`
115
+
116
+ `+f}return c}n.documentationToMarkdown=e})(kP||(kP={}));var iA;(n=>{function e(r,i){let a=Hi.SignatureInformation.create(Vb(r.prefixDisplayParts,this.client),Wj(r.documentation,r.tags.filter(f=>f.name!=="param"),this.client,i)),c=a.label.length,u=Vb(r.separatorDisplayParts,this.client);for(let f=0;f<r.parameters.length;++f){let m=r.parameters[f],y=Vb(m.displayParts,this.client);a.parameters.push(Hi.ParameterInformation.create([c,c+y.length],Wj(m.documentation,[],this.client,i))),c+=y.length,a.label+=y,f!==r.parameters.length-1&&(a.label+=u,c+=u.length)}return a.label+=Vb(r.suffixDisplayParts,this.client),a}n.convertSignature=e})(iA||(iA={}));var oA;(i=>{function e(a){switch(a){case"error":return Hi.DiagnosticSeverity.Error;case"warning":return Hi.DiagnosticSeverity.Warning;case"suggestion":return Hi.DiagnosticSeverity.Information;case"message":return Hi.DiagnosticSeverity.Hint;default:return Hi.DiagnosticSeverity.Error}}i.severityFromCategory=e;function n(a){let c=Hi.Diagnostic.create(Of.fromTextSpan(a),a.text,e(a.category),a.code.toString(),B1,a.relatedInformation?.map(r)),u=[];return a.reportsUnnecessary&&u.push(Hi.DiagnosticTag.Unnecessary),a.reportsDeprecated&&u.push(Hi.DiagnosticTag.Deprecated),c.tags=u,c}i.fromDiagnostic=n;function r(a){return Hi.DiagnosticRelatedInformation.create(a.span?NP.fromFileSpan(a.span):Hi.Location.create("",Hi.Range.create(0,0,0,0)),a.message)}i.fromRelatedInformation=r})(oA||(oA={}));var BSe=e=>{switch(e){case Ni.module:return Ss.SymbolKind.Module;case Ni.class:return Ss.SymbolKind.Class;case Ni.enum:return Ss.SymbolKind.Enum;case Ni.define:return Ss.SymbolKind.Enum;case Ni.interface:return Ss.SymbolKind.Interface;case Ni.method:return Ss.SymbolKind.Method;case Ni.memberVariable:return Ss.SymbolKind.Property;case Ni.memberGetAccessor:return Ss.SymbolKind.Property;case Ni.memberSetAccessor:return Ss.SymbolKind.Property;case Ni.variable:return Ss.SymbolKind.Variable;case Ni.const:return Ss.SymbolKind.Variable;case Ni.localVariable:return Ss.SymbolKind.Variable;case Ni.function:return Ss.SymbolKind.Function;case Ni.localFunction:return Ss.SymbolKind.Function;case Ni.constructSignature:return Ss.SymbolKind.Constructor;case Ni.constructorImplementation:return Ss.SymbolKind.Constructor}return Ss.SymbolKind.Variable};function jSe(e){return new Set(e.split(/,|\s+/g))}function JSe(e,n){return!(n.start.line<e.start.line||n.end.line<e.start.line||n.start.line>e.end.line||n.end.line>e.end.line||n.start.line===e.start.line&&n.start.character<e.start.character||n.end.line===e.end.line&&n.end.character>e.end.character)}function WSe(e,n){let r=e.start.line,i=e.start.character,a=e.end.line,c=e.end.character,u=n.start.line,f=n.start.character,m=n.end.line,y=n.end.character;return r<u?(r=u,i=f):r===u&&(i=Math.max(i,f)),a>m?(a=m,c=y):a===m&&(c=Math.min(c,y)),r>a||r===a&&i>c?null:Ss.Range.create(r,i,a,c)}function USe(e){return e.kind==="alias"?!1:!!(e.text&&e.text!=="<function>"&&e.text!=="<class>")}function KSe(e,n){let r=e.nameSpan?Of.fromTextSpan(e.nameSpan):n,i=e.text,a=Ss.DocumentSymbol.create(i,"",BSe(e.kind),n,JSe(n,r)?r:n);return jSe(e.kindModifiers).has(qh.deprecated)&&(a.tags=[Ss.SymbolTag.Deprecated]),a}function Uj(e,n,r){let i=USe(r);if(!i&&!r.childItems?.length)return!1;let a=new Set(r.childItems||[]);for(let c of r.spans){let u=Of.fromTextSpan(c),f=KSe(r,u);for(let m of a)if(m.spans.some(y=>!!WSe(u,Of.fromTextSpan(y)))){f.children??(f.children=[]);let y=Uj(e,f.children,m);i=i||y,a.delete(m)}i&&n.push(f)}return i}var gX=require("v8"),Mf=new XL("lpc-server.log",!0,Td.LogLevel.normal),HSe=0,zSe={textDocumentSync:JS.TextDocumentSyncKind.Incremental,completionProvider:{resolveProvider:!0,triggerCharacters:EG},renameProvider:!0,hoverProvider:!0,definitionProvider:!0,signatureHelpProvider:{triggerCharacters:["(",","]},referencesProvider:!0},GSe={textDocumentSync:JS.TextDocumentSyncKind.Incremental,documentSymbolProvider:!0},Kj=class extends Td.Session{constructor(){super(...arguments);this.onOutput=new mX.default}writeMessage(r){if(Mf.hasLevel(Td.LogLevel.verbose)){let a=JSON.stringify(r);Mf.info(`${r.type}:${Td.indent(a)}`)}this.onOutput.emit("message",r)}exit(){this.logger.info("Exiting..."),process.exit(0)}};function qj(e){return xM(e,ho.args)}function pX(){return qj("--locale")}function $Se(){let e=qj("--serverMode");if(e)switch(e.toLowerCase()){case"semantic":return 0;case"partialsemantic":return 1;case"syntactic":return 2;default:return 0}}function yX(e,n,r){let i=$Se()??0,a=i===2?"Syntactic: ":"";Mf.info(`${a}Starting LPC Server`),Mf.info(`${a}Arguments: ${r.join(" ")}`),Mf.info(`${a}Platform: ${n} NodeVersion: ${process.version} CaseSensitive: ${ho.useCaseSensitiveFileNames}`),Mf.info(`${a}ServerMode: ${i}`);let c=pX();Mf.info(`${a}Locale: ${pX()}`),c&&W5(c,ho);try{Mf.info(`${a}Heap Limit: ${Math.round((0,gX.getHeapStatistics)().heap_size_limit/1024/1024)} MB`)}catch{}i===2&&(Mf.info("No further log entries will be generated for syntactic server"),Mf.close()),rG(),E.isDebugging&&E.enableDebugInfo(),ho.tryEnableSourceMapsForHost&&/^development$/i.test(ho.getEnvironmentVariable("NODE_ENV"))&&ho.tryEnableSourceMapsForHost();let u=na(ho.useCaseSensitiveFileNames),f=new JS.TextDocuments(ZL),m=0,y;try{y=(fX(),hae(dX))(ho.args)}catch{y=Td.nullCancellationToken}function g(S){return S.startsWith("file://")?Am.URI.parse(S).fsPath:S}e.onInitialize(S=>{let _=S.capabilities,b=Qr(g(S.workspaceFolders[0].uri)),v=ho;v.setTimeout=setTimeout,v.clearTimeout=clearTimeout,v.setImmediate=setImmediate,v.clearImmediate=clearImmediate;let T=new Kj({host:ho,cancellationToken:y,byteLength:Buffer.byteLength,useSingleInferredProject:!0,useInferredProjectPerProjectRoot:!1,logger:Mf,canUseEvents:!0,hrtime:process.hrtime,projectRootFolder:b,serverMode:i}),W={},F=qj("--driverType");W.driverType=F==="fluffos"?1:0,T.setCompilerOptionsForInferredProjects({options:W}),T.onOutput.on("message",V=>{if(V.type==="event"){let ue=V;switch(ue.event){case"allDiag":if(ue.body){let{file:ye,diagnostics:he}=ue.body,ce=Am.URI.file(ye).toString(),Ee=f.get(ce),Fe=he.map(be=>oA.fromDiagnostic(be));Ee&&Fe&&e.sendDiagnostics({uri:ce,diagnostics:Fe})}break}}}),this.hasConfigurationCapability=!!(_.workspace&&_.workspace.configuration),this.hasWorkspaceFolderCapability=!!(_.workspace&&_.workspace.workspaceFolders),this.hasDiagnosticRelatedInformationCapability=!!(_.textDocument&&_.textDocument.publishDiagnostics&&_.textDocument.publishDiagnostics.relatedInformation);let M={capabilities:i===0?zSe:GSe};return this.hasWorkspaceFolderCapability&&(M.capabilities.workspace={workspaceFolders:{supported:!0}}),f.onDidOpen(V=>{let ue=g(V.document.uri),ye=A(Am.URI.parse(V.document.uri))?.fsPath;J("open",{file:ue,fileContent:V.document.getText(),scriptKindName:"LPC",projectRootPath:ye}),i!==2&&J("geterr",{delay:0,files:[ue]})}),f.onDidClose(V=>{let ue=g(V.document.uri);J("close",{file:ue})}),e.onDidChangeWatchedFiles(V=>{if(V.changes.length>0&&i!==2){let ue=f.all().map(ce=>g(ce.uri)),ye=new Set(ue),he=Array.from(ye);J("geterr",{delay:2550,files:he})}}),e.onDidChangeTextDocument(V=>{try{let ue=g(V.textDocument.uri),ye=V.contentChanges,he=[],ce;for(let Ee of ye){let Fe=0,be=0,de=0,Ae=0;ny.TextDocumentContentChangeEvent.isIncremental(Ee)?(Fe=Ee.range.start.line+1,be=Ee.range.start.character+1,de=Ee.range.end.line+1,Ae=Ee.range.end.character+1):(Fe=1,be=1,de=1,Ae=1),he.push(ce),J("change",{file:ue,line:Fe,offset:be,endLine:de,endOffset:Ae,insertString:Ee.text})}if(i!==2){let Ee=f.all().map(de=>g(de.uri)),Fe=new Set(Ee);Fe.add(ue);let be=Array.from(Fe);J("geterr",{delay:HSe,files:be})}}catch(ue){console.error(ue);debugger}}),e.onShutdown(V=>{T.exit()}),e.onDocumentSymbol(V=>{let ue=Am.URI.parse(V.textDocument.uri),ye={file:g(V.textDocument.uri)},he=J("navtree",ye),ce=[];try{if(he?.childItems)for(let Ee of he.childItems)Uj(ue,ce,Ee)}catch(Ee){console.error(Ee)}return ce}),e.onReferences(V=>{let ue={file:g(V.textDocument.uri),...Vh(V)},ye=J("references",ue),he=[];try{for(let ce of ye?.refs??Re){let Ee=NP.fromTextSpan(Am.URI.file(ce.file),ce);he.push(Ee)}}catch(ce){console.error(ce);debugger}return he}),e.onPrepareRename(V=>{let ue={file:g(V.textDocument.uri),...Vh(V)},ye=T.getRenameLocations(ue,!0);if(!ye)return;let he=ye.info;if(he.canRename)return Of.fromTextSpan(he.triggerSpan)}),e.onRenameRequest(V=>{let ue={file:g(V.textDocument.uri),...Vh(V),findInStrings:!1,findInComments:!1},ye=T.getRenameLocations(ue,!0);if(!ye)return;let he=ye.info;if(he.canRename)return he.fileToRename&&E.fail("todo - file rename"),tA.fromRenames(ye.locs,V.newName)}),e.onRequest("compilerOptionsForInferredProjects",V=>{T.setCompilerOptionsForInferredProjects(V)}),e.onRequest("projectInfo",V=>{let ue={...V.arguments,file:g(V.arguments.file)};return J("projectInfo",ue)}),e.onRequest("docCommentTemplate",V=>{let ue={...V.arguments,file:g(V.arguments.file)};return J("docCommentTemplate",ue)}),e.onRequest("encodedSemanticClassifications-full",V=>{let ue={...V.arguments,file:g(V.arguments.file)};return J("encodedSemanticClassifications-full",ue)}),e.onHover(V=>{let ue={file:g(V.textDocument.uri),...Vh(V)},ye=J("quickinfo",ue);if(ye)try{let ce="```lpc\n"+(ye?.displayParts?.map(Fe=>Fe.text)??[]).join("")+"\n```",Ee=kP.documentationToMarkdown(ye.documentation,ye.tags,void 0);return ce+=`
117
+ `+Ee,{contents:{kind:JS.MarkupKind.Markdown,value:ce}}}catch(he){console.error(he);debugger}}),e.onSignatureHelp(V=>{let ue={file:g(V.textDocument.uri),...Vh(V)},ye=J("signatureHelp",ue);if(ye)try{let Ee=function(Fe){let be=Fe.items[Fe.selectedItemIndex];return be?.isVariadic?Math.min(Fe.argumentIndex,be.parameters.length-1):Fe.argumentIndex},he=Am.URI.file(ue.file);return{signatures:ye.items.map(Fe=>iA.convertSignature(Fe,he)),activeParameter:Ee(ye),activeSignature:ye.selectedItemIndex}}catch(he){console.error(he);debugger}}),e.onDefinition(V=>{let ue=J("definition",{file:g(V.textDocument.uri),...Vh(V)});try{let ye=ue?.at(0);return!ye||!ye.file?[]:[ny.LocationLink.create(Am.URI.file(ye.file).toString(),{start:sA(ye.start),end:sA(ye.end)},{start:sA(ye.start),end:sA(ye.end)})]}catch(ye){console.error("onDefinition error",ye)}}),e.onCompletion(V=>{let ue={file:g(V.textDocument.uri),...Vh(V),prefix:V.context.triggerCharacter};try{let ye=J("completionInfo",ue);if(!ye)return[];let he=[];for(let ce of ye.entries){if(ce.kindModifiers===void 0){console.warn("todo - kind Modifiers shouldnt be undefined");continue}let Ee=Hb.parseKindModifier(ce.kindModifiers),Fe={label:ce.name||(ce.insertText??""),kind:Hb.fromKind(ce.kind),detail:Hb.getDetails(ce),sortText:ce.sortText,insertText:ce.insertText,insertTextFormat:ce.isSnippet?ny.InsertTextFormat.Snippet:ny.InsertTextFormat.PlainText};Ee.has(qh.deprecated)&&(Fe.tags=[ny.CompletionItemTag.Deprecated]),Fe.data={uri:V.textDocument.uri,entryName:ce.name,position:V.position},he.push(Fe)}return he}catch(ye){console.error(ye);debugger}}),e.onCompletionResolve(V=>{try{let ue=V.data,ye=Vh(ue),he={entryNames:[ue.entryName],file:g(ue.uri),line:ye.line,offset:ye.offset},ce=J("completionEntryDetails",he),Ee=ha(ce);return Ee?rA.convert(Ee,Am.URI.parse(V.data.uri)):void 0}catch(ue){console.error(ue);debugger}}),M;function J(V,ue){return T.onMessage({seq:m++,type:"request",command:V,arguments:ue})}function A(V){if(V.fsPath.startsWith(b))return Am.URI.file(b)}}),e.onInitialized(()=>{e.workspace.onDidChangeWorkspaceFolders(S=>{Mf.info("Workspace folders changed")}),e.sendNotification("lpc/initialized")}),f.listen(e),e.listen()}function Vh(e){let{position:n}=e;return{line:n.line+1,offset:n.character+1}}function sA(e){return{line:e.line-1,character:e.offset-1}}console.info("Starting LPC Language Server");process.title="lpc-language-server-2";var QSe=(0,cA.createConnection)(cA.ProposedFeatures.all);yX(QSe,require("os").platform(),process.argv);
118
+ //!some(node.name.elements, not(isOmittedExpression));
119
+ //!!declaration && hasSyntacticModifier(declaration, ModifierFlags.Abstract);
120
+ //!isInJsonFile(node);
121
+ //!isExpandoDeclaration(d));
122
+ //!!parent.typeArguments && parent.typeArguments.pos === list.pos;
123
+ /*!this.hostConfiguration.beforeSubstitution ? this.hostConfiguration.watchOptions :
124
+ handleWatchOptionsConfigDirTemplateSubstitution(
125
+ this.hostConfiguration.beforeSubstitution,
126
+ basePath,
127
+ );*/
128
+ //!!this.getPreferences(file).displayPartsForJSDoc;
129
+ //# sourceMappingURL=server.js.map