scip-query 0.22.0 → 0.24.0

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 (470) hide show
  1. package/CHANGELOG.md +500 -0
  2. package/README.md +13 -0
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/by-kind-H3P6BR5G.js +2 -0
  5. package/dist/call-graph-VTG2CUOQ.js +2 -0
  6. package/dist/call-graph-evidence-BociKRpF.d.ts +19 -0
  7. package/dist/chunk-2BMSSRBH.js +2 -0
  8. package/dist/{chunk-TAYD3AE7.js → chunk-2GJSD5GY.js} +2 -2
  9. package/dist/{chunk-TUQIPUDS.js → chunk-2M2LSIMY.js} +3 -3
  10. package/dist/{chunk-GIQ6CSL4.js → chunk-2N6WBNDC.js} +2 -2
  11. package/dist/{chunk-JHH5SCZ3.js → chunk-2OOY75BW.js} +2 -2
  12. package/dist/{chunk-EELPBR7E.js → chunk-2USA3S3P.js} +2 -2
  13. package/dist/chunk-2VAHDDLM.js +133 -0
  14. package/dist/chunk-2XWIUW5Z.js +455 -0
  15. package/dist/{chunk-57N6LN2A.js → chunk-3AF4TUFK.js} +2 -2
  16. package/dist/chunk-3D4BOXW6.js +20 -0
  17. package/dist/{chunk-FFJQZG6J.js → chunk-3LO4FST5.js} +2 -2
  18. package/dist/{chunk-HXOU4XNH.js → chunk-3WTY4LP2.js} +2 -2
  19. package/dist/{chunk-DPWKKNKI.js → chunk-3Z5AMSK6.js} +2 -2
  20. package/dist/{chunk-F24G5NBE.js → chunk-44IETFOU.js} +2 -2
  21. package/dist/chunk-4FR6GQIT.js +2 -0
  22. package/dist/chunk-4KBTHJLP.js +2 -0
  23. package/dist/chunk-5BIKR67W.js +2 -0
  24. package/dist/{chunk-DJAO2OZJ.js → chunk-5PROPLHI.js} +2 -2
  25. package/dist/chunk-5V7EPTII.js +2 -0
  26. package/dist/{chunk-VZ7NXSHV.js → chunk-62LPZCBQ.js} +2 -2
  27. package/dist/{chunk-LXQUF2RP.js → chunk-64O2JHQA.js} +2 -2
  28. package/dist/chunk-6D4F5VWG.js +10 -0
  29. package/dist/{chunk-NEIQPFBI.js → chunk-6ERFBC3X.js} +2 -2
  30. package/dist/{chunk-4HE7MVWD.js → chunk-6ILKOOGH.js} +2 -2
  31. package/dist/chunk-6MFXCMZC.js +2 -0
  32. package/dist/chunk-6O7FACKB.js +2 -0
  33. package/dist/{chunk-R6M456QG.js → chunk-6TS3KOXR.js} +2 -2
  34. package/dist/{chunk-7U2YQSDE.js → chunk-76QOU4PK.js} +2 -2
  35. package/dist/{chunk-25GWKRUZ.js → chunk-7DUI77BN.js} +2 -2
  36. package/dist/chunk-7F45LJKI.js +2 -0
  37. package/dist/{chunk-DEAB5TGT.js → chunk-7F7T6DCR.js} +2 -2
  38. package/dist/chunk-7H6VHWWJ.js +2 -0
  39. package/dist/chunk-7HXT6YLU.js +5 -0
  40. package/dist/{chunk-KZYID5KV.js → chunk-7R4V5ES6.js} +4 -4
  41. package/dist/chunk-7RIRIADH.js +7 -0
  42. package/dist/chunk-7ZLWLOGT.js +2 -0
  43. package/dist/{chunk-WHADK6OS.js → chunk-A4WEAK35.js} +2 -2
  44. package/dist/chunk-AADQLOQ4.js +38 -0
  45. package/dist/{chunk-XFMVKFSF.js → chunk-AN76MGUE.js} +2 -2
  46. package/dist/chunk-ANLNLY66.js +2 -0
  47. package/dist/chunk-ATXPTSEI.js +81 -0
  48. package/dist/{chunk-EELG7D3Q.js → chunk-AX7IDVFT.js} +2 -2
  49. package/dist/chunk-B3PYOSCX.js +2 -0
  50. package/dist/chunk-B7MPDEAK.js +3 -0
  51. package/dist/chunk-BBB5FBX4.js +2 -0
  52. package/dist/{chunk-Y2VM4CJC.js → chunk-BHKK5RJY.js} +2 -2
  53. package/dist/chunk-BJWFVAA5.js +2 -0
  54. package/dist/chunk-BKVWUP7Y.js +2 -0
  55. package/dist/{chunk-7XA3OM44.js → chunk-BKZYTLGE.js} +2 -2
  56. package/dist/chunk-BL6DCHQP.js +2 -0
  57. package/dist/chunk-BOW7SSQH.js +43 -0
  58. package/dist/{chunk-KQHJEU6V.js → chunk-C4RHHCKL.js} +2 -2
  59. package/dist/chunk-C7C6AKAT.js +117 -0
  60. package/dist/chunk-CD6M6LS2.js +16 -0
  61. package/dist/chunk-CFE6PSG6.js +2 -0
  62. package/dist/{chunk-GPGRZJ3R.js → chunk-CFNIGQMT.js} +2 -2
  63. package/dist/{chunk-K3XFWJI2.js → chunk-CKBUBRYD.js} +2 -2
  64. package/dist/chunk-CZW5MZ5B.js +2 -0
  65. package/dist/chunk-DBBZ63ZX.js +2 -0
  66. package/dist/chunk-DBN7DMJB.js +18 -0
  67. package/dist/{chunk-CKRWA452.js → chunk-DUULLZHZ.js} +2 -2
  68. package/dist/{chunk-6HRZQLOI.js → chunk-DV5Y5NOS.js} +2 -2
  69. package/dist/chunk-DZOIKCTM.js +3 -0
  70. package/dist/chunk-E4PKTOL3.js +2 -0
  71. package/dist/{chunk-GVOMSPGL.js → chunk-E65ELFKU.js} +2 -2
  72. package/dist/{chunk-VXJJTQYE.js → chunk-E7QR35ST.js} +2 -2
  73. package/dist/{chunk-2RE5OCHZ.js → chunk-EFSXAINW.js} +2 -2
  74. package/dist/{chunk-GY7CCCEZ.js → chunk-EHVEIEQN.js} +2 -2
  75. package/dist/{chunk-BVFYEEBH.js → chunk-EHYDXE3Z.js} +2 -2
  76. package/dist/{chunk-HISEUIL2.js → chunk-EP63Y6LD.js} +2 -2
  77. package/dist/chunk-EPX6NQN6.js +4 -0
  78. package/dist/chunk-ETC674NS.js +5 -0
  79. package/dist/{chunk-5H5WTJSD.js → chunk-F5GSBHC6.js} +2 -2
  80. package/dist/chunk-FH3DGXC6.js +2 -0
  81. package/dist/{chunk-2XCGSDIT.js → chunk-FI7VGOR4.js} +2 -2
  82. package/dist/chunk-FJF6VO2P.js +2 -0
  83. package/dist/{chunk-FELGD32K.js → chunk-FLMTCX5R.js} +2 -2
  84. package/dist/chunk-FVFDOIM3.js +2 -0
  85. package/dist/{chunk-AQ2PORIO.js → chunk-G2HU5WRN.js} +2 -2
  86. package/dist/{chunk-7YQOCABQ.js → chunk-G4ALYS4J.js} +2 -2
  87. package/dist/{chunk-SWK4XPUS.js → chunk-G56I7K4W.js} +2 -2
  88. package/dist/{chunk-JFQBRL3J.js → chunk-GC4DG2V5.js} +2 -2
  89. package/dist/chunk-GG45PK4S.js +4 -0
  90. package/dist/{chunk-XN22RGSR.js → chunk-GHNPACNP.js} +2 -2
  91. package/dist/{chunk-XU75YQN4.js → chunk-GINH3YQU.js} +2 -2
  92. package/dist/chunk-GTZZVLKJ.js +2 -0
  93. package/dist/chunk-GXXW5ZHH.js +2 -0
  94. package/dist/{chunk-RNKPYYYE.js → chunk-HAXXKRTD.js} +2 -2
  95. package/dist/chunk-HEZWBAZY.js +2 -0
  96. package/dist/chunk-HMEWLMML.js +2 -0
  97. package/dist/{chunk-2KVU55CW.js → chunk-HOBOVYPO.js} +2 -2
  98. package/dist/{chunk-2YC7YNKT.js → chunk-HRFQ6GW5.js} +2 -2
  99. package/dist/{chunk-RYOYJMGF.js → chunk-HX4X7KG3.js} +2 -2
  100. package/dist/{chunk-AZS7YPCB.js → chunk-HYT2R7LX.js} +2 -2
  101. package/dist/chunk-IKQVBVQL.js +40 -0
  102. package/dist/chunk-J6GLBBRK.js +4 -0
  103. package/dist/{chunk-TNG2FYS5.js → chunk-J7A4PWFX.js} +2 -2
  104. package/dist/chunk-JCSAZ35V.js +2 -0
  105. package/dist/{chunk-EWWY2ZFL.js → chunk-JDU2IV3A.js} +2 -2
  106. package/dist/{chunk-SB25YMEQ.js → chunk-JFMEXGFE.js} +2 -2
  107. package/dist/chunk-JFMI5SGB.js +4 -0
  108. package/dist/chunk-JJP37RGX.js +57 -0
  109. package/dist/chunk-JZ2A7LDM.js +5 -0
  110. package/dist/chunk-KNLQGXVH.js +80 -0
  111. package/dist/chunk-KVQCECPR.js +2 -0
  112. package/dist/{chunk-F24QUEQP.js → chunk-KXXORBZ2.js} +2 -2
  113. package/dist/{chunk-IKVNEGTW.js → chunk-L5KYH6U3.js} +2 -2
  114. package/dist/chunk-L6XHYJPZ.js +21 -0
  115. package/dist/chunk-L7KTFEAV.js +43 -0
  116. package/dist/{chunk-UAQ4T73O.js → chunk-LDXHR5EL.js} +2 -2
  117. package/dist/chunk-LEECKFCJ.js +2 -0
  118. package/dist/{chunk-LO5JSW2C.js → chunk-MHGDSBFX.js} +2 -2
  119. package/dist/{chunk-JUN5DOAK.js → chunk-MLQVVDG3.js} +2 -2
  120. package/dist/chunk-MOKUWRHO.js +3 -0
  121. package/dist/{chunk-44T4DUAA.js → chunk-MPYAPMNE.js} +2 -2
  122. package/dist/{chunk-ARVO6TTW.js → chunk-MV6SPXCR.js} +2 -2
  123. package/dist/{chunk-NRBNAECH.js → chunk-MWN53KRN.js} +2 -2
  124. package/dist/{chunk-TH6IC56G.js → chunk-MZPXPSUJ.js} +2 -2
  125. package/dist/{chunk-FBCVASUG.js → chunk-N55KIE46.js} +2 -2
  126. package/dist/{chunk-VMWUV6WB.js → chunk-NB4D3BNM.js} +2 -2
  127. package/dist/{chunk-JAT6C3VX.js → chunk-NGKBOT6G.js} +2 -2
  128. package/dist/{chunk-Q6T2CAJL.js → chunk-NJGKXKQF.js} +2 -2
  129. package/dist/chunk-NJQISBL4.js +8 -0
  130. package/dist/chunk-NJT3ZEKY.js +16 -0
  131. package/dist/{chunk-KFVSJX25.js → chunk-NKMKZP6A.js} +2 -2
  132. package/dist/chunk-NODFZ6ED.js +2 -0
  133. package/dist/{chunk-ERCYGVAM.js → chunk-NSM5IEVW.js} +2 -2
  134. package/dist/{chunk-YAGYMBEX.js → chunk-NTGUVNR2.js} +2 -2
  135. package/dist/{chunk-N7FP5H5U.js → chunk-NU3KFF2O.js} +8 -8
  136. package/dist/chunk-NWLVNU66.js +557 -0
  137. package/dist/{chunk-Q55NF3ZG.js → chunk-NYKZMCRC.js} +2 -2
  138. package/dist/{chunk-I6UTXNHU.js → chunk-O6BUXZEH.js} +2 -2
  139. package/dist/chunk-ODPDP7A4.js +3 -0
  140. package/dist/{chunk-ZAZGGSM3.js → chunk-OHIV323X.js} +2 -2
  141. package/dist/chunk-OIAPEKMT.js +3 -0
  142. package/dist/chunk-OIOC5EHF.js +3 -0
  143. package/dist/{chunk-YIHNPKWD.js → chunk-ONPPQM4G.js} +2 -2
  144. package/dist/{chunk-RHHCLWQ6.js → chunk-OUHEZBYI.js} +2 -2
  145. package/dist/{chunk-MSR2QRUE.js → chunk-OVGYW7UD.js} +2 -2
  146. package/dist/{chunk-OPSAW5DT.js → chunk-OYKU4B3Y.js} +2 -2
  147. package/dist/{chunk-5YRQIE2B.js → chunk-POBJ6FR2.js} +2 -2
  148. package/dist/{chunk-ZGW4HLPD.js → chunk-PSZPMMWN.js} +2 -2
  149. package/dist/chunk-PXTRBKRK.js +3 -0
  150. package/dist/{chunk-U2N2KE7A.js → chunk-Q5JRIHT3.js} +2 -2
  151. package/dist/{chunk-GRX7JOXQ.js → chunk-Q7ATHARX.js} +2 -2
  152. package/dist/{chunk-5ZMBRQFC.js → chunk-Q7CSKIDM.js} +2 -2
  153. package/dist/{chunk-HG722PO7.js → chunk-QBQE7ZJ5.js} +2 -2
  154. package/dist/{chunk-Z2PZVKPR.js → chunk-QH22UIXP.js} +2 -2
  155. package/dist/chunk-QXCKQTKR.js +60 -0
  156. package/dist/chunk-RBAD4GJ2.js +13 -0
  157. package/dist/chunk-RMDPFPNW.js +2 -0
  158. package/dist/chunk-ROPJDEJZ.js +4 -0
  159. package/dist/{chunk-56NQAEPJ.js → chunk-RVZC6TJE.js} +2 -2
  160. package/dist/{chunk-XJX6LGHL.js → chunk-S4QZBKSR.js} +2 -2
  161. package/dist/chunk-SCPMZ73U.js +2 -0
  162. package/dist/{chunk-7IQXARSQ.js → chunk-SIAP5RGI.js} +2 -2
  163. package/dist/{chunk-4TQU4TX2.js → chunk-SIX4RFR3.js} +2 -2
  164. package/dist/{chunk-AYPDH2LU.js → chunk-SKKXTABJ.js} +2 -2
  165. package/dist/{chunk-ZYM4HOFA.js → chunk-SSRFUQBD.js} +2 -2
  166. package/dist/chunk-SYVJEEUJ.js +3 -0
  167. package/dist/chunk-T3CZAZSI.js +8 -0
  168. package/dist/chunk-T3I6NHBH.js +2 -0
  169. package/dist/{chunk-GDRJB3SB.js → chunk-T6DWDI5E.js} +2 -2
  170. package/dist/chunk-T6HRIROJ.js +7 -0
  171. package/dist/{chunk-OTSPRVNW.js → chunk-TAA7HXHE.js} +2 -2
  172. package/dist/{chunk-IJMD6BRI.js → chunk-TJ2JQYT3.js} +2 -2
  173. package/dist/chunk-TULNMD5T.js +368 -0
  174. package/dist/chunk-U2FPY5XA.js +3 -0
  175. package/dist/chunk-U3SXIMII.js +38 -0
  176. package/dist/{chunk-ENWQWA2R.js → chunk-U6KCHXJ4.js} +2 -2
  177. package/dist/chunk-UH3XSKS5.js +9 -0
  178. package/dist/{chunk-UDY7MIAW.js → chunk-UIFUZVCC.js} +2 -2
  179. package/dist/{chunk-BDGTPN27.js → chunk-UXKURIVI.js} +2 -2
  180. package/dist/{chunk-FGNCOQUX.js → chunk-V2RBODHL.js} +2 -2
  181. package/dist/chunk-VBKUWB6N.js +2 -0
  182. package/dist/{chunk-PIFTZEEM.js → chunk-VBV6ALJE.js} +2 -2
  183. package/dist/{chunk-2OXVP5U5.js → chunk-VDGFWCQV.js} +2 -2
  184. package/dist/chunk-VDSDOEWF.js +2 -0
  185. package/dist/{chunk-C76O5MDS.js → chunk-VZPWVCLN.js} +2 -2
  186. package/dist/chunk-WDSFQDPN.js +2 -0
  187. package/dist/{chunk-BTVKZGWT.js → chunk-WFA35BGR.js} +2 -2
  188. package/dist/{chunk-H7CG6LOE.js → chunk-WLMP3OCW.js} +2 -2
  189. package/dist/{chunk-WOOAY3PA.js → chunk-WSA52GOR.js} +2 -2
  190. package/dist/chunk-WYPL7GF7.js +2 -0
  191. package/dist/{chunk-RDULNRSJ.js → chunk-X3YVZAKZ.js} +2 -2
  192. package/dist/chunk-X6OGVFIT.js +2 -0
  193. package/dist/{chunk-ISWFRGJ6.js → chunk-XKXTR6ZI.js} +2 -2
  194. package/dist/chunk-Y5DFAW5W.js +4 -0
  195. package/dist/chunk-YSYPDRD5.js +3 -0
  196. package/dist/chunk-ZFVPWH62.js +5 -0
  197. package/dist/chunk-ZGIHTH27.js +2 -0
  198. package/dist/{chunk-QKT4UI2Y.js → chunk-ZGIQN2SX.js} +2 -2
  199. package/dist/chunk-ZHG4WAHR.js +12 -0
  200. package/dist/{chunk-CLG6DWVS.js → chunk-ZKB2XUEN.js} +2 -2
  201. package/dist/chunk-ZLMXIQLC.js +21 -0
  202. package/dist/chunk-ZMCQIHI4.js +2 -0
  203. package/dist/cli-main.js +2 -2
  204. package/dist/code-TAVIKWJI.js +2 -0
  205. package/dist/code-result-json-5FEFQCAQ.js +2 -0
  206. package/dist/command-descriptors-7BKH53Y3.js +343 -0
  207. package/dist/dataflow-GFBTVDH3.js +2 -0
  208. package/dist/dependence-slice-GWGQCODG.js +2 -0
  209. package/dist/deps-4QHVDPYA.js +2 -0
  210. package/dist/direct-navigation-4UBC6HNW.js +3 -0
  211. package/dist/entry-map-QCTF4RVY.js +2 -0
  212. package/dist/files-M2UBF5HJ.js +2 -0
  213. package/dist/frontend-profile-roles-D7eCum8P.d.ts +10 -0
  214. package/dist/{health-CPp2Jf1Z.d.ts → health-BI2a9WPy.d.ts} +60 -2
  215. package/dist/hierarchy-2UIHRLW4.js +2 -0
  216. package/dist/imports-WIE3YZOB.js +2 -0
  217. package/dist/index.d.ts +1 -1
  218. package/dist/index.js +1 -1
  219. package/dist/members-YKD636DA.js +2 -0
  220. package/dist/methods-VDF4IMYG.js +2 -0
  221. package/dist/output-continuation-command-4UMDOOLO.js +3 -0
  222. package/dist/output-pagination-2GME6OPY.js +19 -0
  223. package/dist/postinstall.js +1 -1
  224. package/dist/project-reindex-XEQTRCV5.js +3 -0
  225. package/dist/queries/affected.js +1 -1
  226. package/dist/queries/anchors.d.ts +1 -1
  227. package/dist/queries/anchors.js +1 -1
  228. package/dist/queries/architecture.js +1 -1
  229. package/dist/queries/bottlenecks.js +1 -1
  230. package/dist/queries/by-kind.js +1 -1
  231. package/dist/queries/call-graph.d.ts +2 -0
  232. package/dist/queries/call-graph.js +1 -1
  233. package/dist/queries/change-surface.js +1 -1
  234. package/dist/queries/cleanup-plan.js +1 -1
  235. package/dist/queries/co-change.d.ts +20 -2
  236. package/dist/queries/co-change.js +1 -1
  237. package/dist/queries/code.js +1 -1
  238. package/dist/queries/complexity-hotspots.js +1 -1
  239. package/dist/queries/complexity.js +1 -1
  240. package/dist/queries/context.js +1 -1
  241. package/dist/queries/convergence.js +1 -1
  242. package/dist/queries/coupling.js +1 -1
  243. package/dist/queries/cycles.js +1 -1
  244. package/dist/queries/dataflow.js +1 -1
  245. package/dist/queries/dead.d.ts +2 -0
  246. package/dist/queries/dead.js +1 -1
  247. package/dist/queries/decorative-checkers.js +1 -1
  248. package/dist/queries/deep-chains.js +1 -1
  249. package/dist/queries/dependence-slice.js +1 -1
  250. package/dist/queries/dependency-depth.js +1 -1
  251. package/dist/queries/deps.js +1 -1
  252. package/dist/queries/diff-impact.d.ts +9 -0
  253. package/dist/queries/diff-impact.js +1 -1
  254. package/dist/queries/doc-drift.js +1 -1
  255. package/dist/queries/drift.js +1 -1
  256. package/dist/queries/duplicate-bodies.d.ts +28 -1
  257. package/dist/queries/duplicate-bodies.js +1 -1
  258. package/dist/queries/entry-map.d.ts +1 -1
  259. package/dist/queries/entry-map.js +1 -1
  260. package/dist/queries/evidence.js +1 -1
  261. package/dist/queries/extract-candidates.d.ts +50 -23
  262. package/dist/queries/extract-candidates.js +1 -1
  263. package/dist/queries/fan.js +1 -1
  264. package/dist/queries/files.js +1 -1
  265. package/dist/queries/health.d.ts +1 -1
  266. package/dist/queries/health.js +1 -1
  267. package/dist/queries/hierarchy.js +1 -1
  268. package/dist/queries/hotspots.js +1 -1
  269. package/dist/queries/imports.js +1 -1
  270. package/dist/queries/incomplete-migration.js +1 -1
  271. package/dist/queries/index.d.ts +4 -3
  272. package/dist/queries/index.js +1 -1
  273. package/dist/queries/isolated.js +1 -1
  274. package/dist/queries/locality-candidates.js +1 -1
  275. package/dist/queries/members.js +1 -1
  276. package/dist/queries/methods.js +1 -1
  277. package/dist/queries/not-implemented.js +1 -1
  278. package/dist/queries/outline.js +1 -1
  279. package/dist/queries/passthrough-candidates.d.ts +9 -1
  280. package/dist/queries/passthrough-candidates.js +1 -1
  281. package/dist/queries/plan-context.js +1 -1
  282. package/dist/queries/react-component-duplicates.d.ts +19 -3
  283. package/dist/queries/react-component-duplicates.js +1 -1
  284. package/dist/queries/react-hook-candidates.d.ts +22 -3
  285. package/dist/queries/react-hook-candidates.js +1 -1
  286. package/dist/queries/react-large-component-pressure.d.ts +17 -3
  287. package/dist/queries/react-large-component-pressure.js +1 -1
  288. package/dist/queries/recent-duplicates.js +1 -1
  289. package/dist/queries/redundant-reexports.js +1 -1
  290. package/dist/queries/reference-neighborhood.js +1 -1
  291. package/dist/queries/reference-reachability.js +1 -1
  292. package/dist/queries/refs.js +1 -1
  293. package/dist/queries/self-audit.d.ts +7 -1
  294. package/dist/queries/self-audit.js +1 -1
  295. package/dist/queries/similar-chains.js +1 -1
  296. package/dist/queries/similar-files.js +1 -1
  297. package/dist/queries/similar-signatures.js +1 -1
  298. package/dist/queries/similar.js +1 -1
  299. package/dist/queries/slice.js +1 -1
  300. package/dist/queries/source-inspection.js +1 -1
  301. package/dist/queries/source-search.js +1 -1
  302. package/dist/queries/stale-abstractions.js +1 -1
  303. package/dist/queries/surface.js +1 -1
  304. package/dist/queries/symbols.js +1 -1
  305. package/dist/queries/system-map.d.ts +1 -1
  306. package/dist/queries/system-map.js +1 -1
  307. package/dist/queries/system.js +1 -1
  308. package/dist/queries/test-quality.js +1 -1
  309. package/dist/queries/trace.js +1 -1
  310. package/dist/queries/twin-ab.js +1 -1
  311. package/dist/queries/twin-drift.d.ts +22 -6
  312. package/dist/queries/twin-drift.js +1 -1
  313. package/dist/queries/unused-imports.js +1 -1
  314. package/dist/queries/unused-params.js +1 -1
  315. package/dist/queries/value-flow.js +1 -1
  316. package/dist/queries/vue-component-duplicates.js +1 -1
  317. package/dist/queries/vue-composable-candidates.js +1 -1
  318. package/dist/queries/vue-large-view-pressure.js +1 -1
  319. package/dist/queries/wrapper-candidates.d.ts +16 -1
  320. package/dist/queries/wrapper-candidates.js +1 -1
  321. package/dist/query-service-fastpath.js +5 -5
  322. package/dist/query-service-server.js +3 -3
  323. package/dist/refs-JNK5CLM7.js +2 -0
  324. package/dist/refs-pagination-6BLRYGMV.js +2 -0
  325. package/dist/reindex-worker.js +25 -25
  326. package/dist/reindex.d.ts +3 -2
  327. package/dist/reindex.js +35 -35
  328. package/dist/runtime.d.ts +34 -2
  329. package/dist/runtime.js +4 -4
  330. package/dist/rust-semantic-session-server.js +1 -1
  331. package/dist/rust-semantic-session-worker.js +1 -1
  332. package/dist/rust-semantic-worker.js +1 -1
  333. package/dist/{scip-cli-H-n59izO.d.ts → scip-cli-DOerTq-R.d.ts} +42 -4
  334. package/dist/slice-PHPVNCWX.js +2 -0
  335. package/dist/surface-MQX5MPIV.js +2 -0
  336. package/dist/symbol-resolution-DBLVXLBC.js +2 -0
  337. package/dist/system-JOPKV4OG.js +2 -0
  338. package/dist/trace-I2P2YFH4.js +2 -0
  339. package/dist/typescript-mailbox-worker.js +1 -1
  340. package/dist/value-flow-JJVMF7NP.js +2 -0
  341. package/dist/watch-server.js +3 -3
  342. package/docs/COMMAND_REFERENCE.md +2 -2
  343. package/docs/DETECTOR_GUIDE.md +51 -12
  344. package/docs/accuracy-audit-checklist.md +36 -13
  345. package/docs/locality-analyzer-design.md +9 -9
  346. package/package.json +2 -2
  347. package/skills/conductor/SKILL.md +110 -0
  348. package/skills/conductor/agents/openai.yaml +4 -0
  349. package/skills/principal-maintainability-review/SKILL.md +273 -0
  350. package/skills/principal-maintainability-review/agents/openai.yaml +4 -0
  351. package/skills/scip-calibrate/SKILL.md +102 -0
  352. package/skills/scip-calibrate/agents/openai.yaml +4 -0
  353. package/skills/scip-claim-audit/SKILL.md +113 -0
  354. package/skills/scip-claim-audit/agents/openai.yaml +4 -0
  355. package/skills/scip-probe-reachability/SKILL.md +93 -0
  356. package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
  357. package/skills/scip-root-cause/SKILL.md +160 -0
  358. package/skills/scip-root-cause/agents/openai.yaml +4 -0
  359. package/skills/scip-system-compression/SKILL.md +252 -0
  360. package/skills/scip-system-compression/agents/openai.yaml +4 -0
  361. package/skills/scip-system-compression/references/compression-atlas.md +116 -0
  362. package/skills/scip-system-compression/references/compression-patterns.md +87 -0
  363. package/skills/scip-twin-drift/SKILL.md +109 -0
  364. package/skills/scip-twin-drift/agents/openai.yaml +4 -0
  365. package/dist/by-kind-4IYG2SKW.js +0 -2
  366. package/dist/call-graph-WQNXMNNN.js +0 -2
  367. package/dist/call-graph-evidence-lZa2dwQA.d.ts +0 -11
  368. package/dist/chunk-2BTJALUS.js +0 -454
  369. package/dist/chunk-3QXC54FQ.js +0 -3
  370. package/dist/chunk-3TJY6M3B.js +0 -7
  371. package/dist/chunk-42W3LFUK.js +0 -13
  372. package/dist/chunk-4GAQ6FI4.js +0 -43
  373. package/dist/chunk-6NC3YSPY.js +0 -38
  374. package/dist/chunk-6VEFRPTD.js +0 -5
  375. package/dist/chunk-7C26EKLZ.js +0 -4
  376. package/dist/chunk-7JYHQAH2.js +0 -22
  377. package/dist/chunk-7KSO2OAP.js +0 -2
  378. package/dist/chunk-7XZGZBSQ.js +0 -2
  379. package/dist/chunk-A77SCPW2.js +0 -3
  380. package/dist/chunk-AK3PYTIK.js +0 -5
  381. package/dist/chunk-AMIMMNA4.js +0 -11
  382. package/dist/chunk-AUY5BL74.js +0 -2
  383. package/dist/chunk-BDHFVH2M.js +0 -18
  384. package/dist/chunk-BECZLYNU.js +0 -8
  385. package/dist/chunk-BUTEIZKP.js +0 -10
  386. package/dist/chunk-BWVQP3LB.js +0 -38
  387. package/dist/chunk-BYDAFMSR.js +0 -57
  388. package/dist/chunk-BZYSGZRK.js +0 -2
  389. package/dist/chunk-C7IJMOFP.js +0 -134
  390. package/dist/chunk-CBBHFNLX.js +0 -2
  391. package/dist/chunk-D2MVJSP4.js +0 -21
  392. package/dist/chunk-D35XIZGN.js +0 -2
  393. package/dist/chunk-DKM723YF.js +0 -79
  394. package/dist/chunk-DRENNWRG.js +0 -2
  395. package/dist/chunk-E44IVWIJ.js +0 -367
  396. package/dist/chunk-EDMB6SSO.js +0 -7
  397. package/dist/chunk-EETGXQY7.js +0 -3
  398. package/dist/chunk-FKGQOTKD.js +0 -2
  399. package/dist/chunk-GH5YSGZL.js +0 -5
  400. package/dist/chunk-GQIDEID3.js +0 -2
  401. package/dist/chunk-HCVJR2V4.js +0 -3
  402. package/dist/chunk-IMKZEXZG.js +0 -2
  403. package/dist/chunk-ISIQLPJ2.js +0 -61
  404. package/dist/chunk-IXESDH3J.js +0 -2
  405. package/dist/chunk-JJ62MTQH.js +0 -40
  406. package/dist/chunk-JT6XX7QY.js +0 -8
  407. package/dist/chunk-KFOYCQAJ.js +0 -9
  408. package/dist/chunk-LRI5OMPE.js +0 -2
  409. package/dist/chunk-MHIEP7EG.js +0 -4
  410. package/dist/chunk-NK3JMP22.js +0 -2
  411. package/dist/chunk-NVSZNESQ.js +0 -2
  412. package/dist/chunk-OJNK5ALA.js +0 -2
  413. package/dist/chunk-OXYAWIEA.js +0 -2
  414. package/dist/chunk-OZETODHH.js +0 -2
  415. package/dist/chunk-PBUH2P5S.js +0 -3
  416. package/dist/chunk-PLJUQFQN.js +0 -2
  417. package/dist/chunk-PLYUVM4F.js +0 -2
  418. package/dist/chunk-PXXYQK55.js +0 -2
  419. package/dist/chunk-Q5TA4OY4.js +0 -20
  420. package/dist/chunk-Q7GBK5T7.js +0 -81
  421. package/dist/chunk-QLBSG7U5.js +0 -3
  422. package/dist/chunk-QWKHW6VZ.js +0 -2
  423. package/dist/chunk-RPL3ARU7.js +0 -16
  424. package/dist/chunk-SVHTMVA4.js +0 -4
  425. package/dist/chunk-T6QD2ZQB.js +0 -43
  426. package/dist/chunk-TD7VKJ2Y.js +0 -117
  427. package/dist/chunk-TKDNDQA7.js +0 -3
  428. package/dist/chunk-TQZV7KV4.js +0 -2
  429. package/dist/chunk-TUSPIVZ3.js +0 -4
  430. package/dist/chunk-URSGGIZX.js +0 -2
  431. package/dist/chunk-UT7TADJX.js +0 -2
  432. package/dist/chunk-V4NG5OMS.js +0 -554
  433. package/dist/chunk-VTCIYFEK.js +0 -2
  434. package/dist/chunk-VU6LIWHT.js +0 -2
  435. package/dist/chunk-VUSKPCUB.js +0 -2
  436. package/dist/chunk-WN3TCGJ4.js +0 -2
  437. package/dist/chunk-WSLEJSFR.js +0 -2
  438. package/dist/chunk-WYZIHUPZ.js +0 -16
  439. package/dist/chunk-XE33FV5W.js +0 -2
  440. package/dist/chunk-XGGBK66W.js +0 -4
  441. package/dist/chunk-XSWYJCAK.js +0 -2
  442. package/dist/chunk-Y334QQU5.js +0 -3
  443. package/dist/chunk-Z2AWCTN6.js +0 -2
  444. package/dist/chunk-ZOXKSQQB.js +0 -2
  445. package/dist/chunk-ZPASRBLF.js +0 -2
  446. package/dist/chunk-ZZ3Z7D56.js +0 -2
  447. package/dist/code-EQJFDT6I.js +0 -2
  448. package/dist/code-result-json-7UWIWBOO.js +0 -2
  449. package/dist/command-descriptors-ORNTVNYV.js +0 -342
  450. package/dist/dataflow-6VL54GX5.js +0 -2
  451. package/dist/dependence-slice-DT2NUHD2.js +0 -2
  452. package/dist/deps-DB7H5IKC.js +0 -2
  453. package/dist/direct-navigation-O3LUAYWQ.js +0 -3
  454. package/dist/entry-map-6K62RV3D.js +0 -2
  455. package/dist/files-MSLD7MO6.js +0 -2
  456. package/dist/hierarchy-IVBXAKFA.js +0 -2
  457. package/dist/imports-FRAVZ3Y2.js +0 -2
  458. package/dist/members-KJOJDYGO.js +0 -2
  459. package/dist/methods-2AYABBT3.js +0 -2
  460. package/dist/output-continuation-command-JHMPH6NC.js +0 -3
  461. package/dist/output-pagination-3OFL2MJV.js +0 -19
  462. package/dist/project-reindex-HYO4WD7Z.js +0 -3
  463. package/dist/refs-ARMA6XUJ.js +0 -2
  464. package/dist/refs-pagination-VUGIWN6U.js +0 -2
  465. package/dist/slice-YOB5YFAM.js +0 -2
  466. package/dist/surface-VY5EFWTW.js +0 -2
  467. package/dist/symbol-resolution-DGQN4XIV.js +0 -2
  468. package/dist/system-2KQ3QD2P.js +0 -2
  469. package/dist/trace-HTIPTXAE.js +0 -2
  470. package/dist/value-flow-5FV3VQI7.js +0 -2
@@ -1,7 +1,7 @@
1
- import{a as z}from"./chunk-XN22RGSR.js";import{b as C}from"./chunk-7KSO2OAP.js";import{c as W}from"./chunk-56NQAEPJ.js";import{b as U}from"./chunk-5YRQIE2B.js";import{d as D}from"./chunk-6NC3YSPY.js";import{a as _}from"./chunk-RYOYJMGF.js";import{a as k,b as j,e as A}from"./chunk-EELPBR7E.js";import{B as I,I as O,R as h,W as T,h as F,j as M,k as B}from"./chunk-C7IJMOFP.js";import{c as S,d as w,l as $}from"./chunk-DRENNWRG.js";import{A as P}from"./chunk-AK3PYTIK.js";import{basename as me,extname as K}from"path";var oe=12,se=280;function y(n,e,t,o){let i=ae(n,e,t,o);if(i.size===0)return ce();let r=[],a=new Set,u=(l,d,c,f)=>{if(d===e&&c<=o&&f>=t)return;let m=`${d}:${c}:${f}:${l}`;a.has(m)||(a.add(m),r.push({name:l,relativePath:d,startLine:c,endLine:f}))};for(let l of h(n,e))i.has(l.leaf)&&u(l.leaf,l.relativePath,l.startLine,l.endLine);for(let l of O(n,e)){let d=l.localName;if(!d||!i.has(d)||!l.sourcePath||l.kind==="namespace")continue;let c=l.importedName==="default"?d:l.importedName;for(let f of _(n,l.sourcePath,c,{maxReexportDepth:3}))u(d,f.relativePath,f.startLine,f.endLine)}r.sort(H);let s=r.map(l=>{let d=le(n,l);return d?{...l,source:d}:null}).filter(l=>l!==null).slice(0,oe);return x(s)}function X(n,e=[]){return x(ue(n.flatMap(t=>t?.inline??[]),e))}function ae(n,e,t,o){let i=I(n,e),r=new Set;if(!i)return r;for(let a=t;a<=o;a+=1)for(let u of i.identifiersByLine[a]??[])r.add(u);return r}function le(n,e){if(e.startLine!==e.endLine)return null;let t=(B(n,e.relativePath)[e.startLine]??"").trim();if(!t||t.length>se)return null;let o=t.indexOf("=");if(o<0||t[o+1]===">")return null;let i=t.slice(o+1).replace(/(?:\/\/|#).*$/u,"").trim();if(!i||i.includes("${")||/\b(?:function|class|struct|interface|trait|enum|lambda)\b/u.test(i))return null;let a=i.replace(/(['"`])(?:\\.|(?!\1).)*\1/gu,"").replace(/\b(?:0[xX][\dA-Fa-f_]+|0[bB][01_]+|0[oO][0-7_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d+)?)n?\b/gu,""),u=new Set(["true","false","null","undefined","None","True","False"]);return(a.match(/[A-Za-z_][A-Za-z0-9_]*/gu)??[]).some(l=>!u.has(l))?null:t}function ue(n,e){let t=new Map;for(let o of n){if(de(o,e))continue;let i=`${o.relativePath}:${o.startLine}:${o.endLine}:${o.name}`;t.has(i)||t.set(i,{...o})}return[...t.values()].sort(H)}function de(n,e){return e.some(t=>t.relativePath===n.relativePath&&t.startLine<=n.startLine&&t.endLine>=n.endLine)}function H(n,e){return n.relativePath.localeCompare(e.relativePath)||n.startLine-e.startLine||n.name.localeCompare(e.name)}function x(n){return{coverage:"indexed-project-literal-values",inline:n}}function ce(){return x([])}function G(n,e){let t=W(n,e);if(!t)return[];let o=T(n,[t],{sort:!0});if(o.length===0)return[];let i=Math.max(0,M(F(n,t)).length-1),r=o.map(s=>({symbol:s.symbol,shortName:s.shortName,startLine:s.startLine,endLine:Math.min(s.endLine,i),signature:s.signature,children:[]})),a=new Map;for(let s of r)a.set(s.symbol,s);let u=[];for(let s=0;s<o.length;s++){let l=o[s],d=r[s];if(l.enclosingSymbol&&a.has(l.enclosingSymbol)){a.get(l.enclosingSymbol).children.push(d);continue}let c=null,f=1/0;for(let m of r)if(m!==d&&m.startLine<=d.startLine&&m.endLine>=d.endLine){if(m.startLine===d.startLine&&m.endLine===d.endLine&&!$(m.symbol,d.symbol))continue;let g=m.endLine-m.startLine;g<f&&(f=g,c=m)}c?c.children.push(d):u.push(d)}return u}function Je(n,e,t={}){let{context:o=0}=t,i=ie(e);if(i)return re(n,i.filePath,i.startLine,i.endLine,o);let r=ne(n,e);if(r)return Y(n,r);let a=k(n,e);return a?p(n,a,o):null}function Qe(n,e,t={}){if(e.length===0)throw new RangeError("code requires at least one selector.");if(e.length>24)throw new RangeError(`code accepts at most ${24} selectors per complete packet; received ${e.length}.`);let o=t.context??0,i=t.members??"exported",r=e.map(s=>ge(n,s,o,i)),a=r.flatMap(s=>s.results),u=a.map(s=>({relativePath:s.relativePath,startLine:s.startLine,endLine:s.endLine}));return{requested:e.length,matched:r.filter(s=>s.status==="matched").length,ambiguous:r.filter(s=>s.status==="ambiguous").length,missing:r.filter(s=>s.status==="missing").length,entries:r,bindingClosure:X(a.map(s=>s.bindingClosure),u)}}function ge(n,e,t,o){let i=ie(e);if(i){let d=re(n,i.filePath,i.startLine,i.endLine,t);return d?he(n,e,d,t):R(n,e,"definition-source-unreadable")}let r=ne(n,e);if(r)return be(n,e,r,t,o);let a=j(n,e);if(!a.match)return R(n,e,"definition-not-found");let u=Ne(n,a),s=u.map(te);if(a.total>1){let d=a.total<=4&&u.length===a.total;return{selector:e,status:"ambiguous",kind:"source",totalCandidates:a.total,results:d?u.flatMap(c=>{let f=p(n,c,t);return f?[f]:[]}):[],definitions:[],candidates:s,omittedCandidates:Math.max(0,a.total-s.length),suggestions:[]}}let l=p(n,a.match,t);return l?Re(e,l):R(n,e,"definition-source-unreadable")}function he(n,e,t,o){let i=h(n,t.relativePath).filter(l=>!Z(l,t.relativePath)),r=pe(n,t,i),a=V(r.map(l=>p(n,l,o)).filter(l=>l!==null)).filter(l=>!ee(t,l)),u=new Set(a.map(l=>l.symbol)),s=r.filter(l=>!u.has(l.symbol)&&!(t.startLine<=l.startLine&&t.endLine>=l.endLine)).map(te);return{selector:e,status:"matched",kind:"source",totalCandidates:1,results:[t,...a],definitions:[],candidates:[],omittedCandidates:0,suggestions:[],rangeCoverage:{basis:"requested-range-and-same-file-call-closure",referencedDefinitions:r.length,returnedDefinitions:r.length-s.length,returnedBodies:a.length,omittedDefinitions:s.length,omittedLedger:s}}}function pe(n,e,t){if(!b(e.freshness))return[];if(t.length===0)return[];let o=D(n,t,{additive:!1,semantic:!1}),i=new Map;for(let a of t){let u=i.get(a.symbol)??[];u.push(a),i.set(a.symbol,u)}let r=new Map;for(let a of t)if(!(a.endLine<e.startLine||a.startLine>e.endLine)){for(let u of o.get(a.symbolId)??[])if(u.file===e.relativePath&&!(u.source==="ast-callsite"&&(u.chunkId<e.startLine||u.chunkId>e.endLine)))for(let s of i.get(u.symbol)??[])r.set(s.symbolId,s)}return Q(n,[...r.values()],t)}function be(n,e,t,o,i){let r=t.relativePath,a=ye(n,r),u=b(t.freshness)?h(n,r).filter(g=>!Z(g,r)):[],s=u.filter(g=>z(n,g)),l=s.length>0?s:Ce(a,u),d=i==="all"?[]:Q(n,l,u),c=i==="all"||u.length===0?[Y(n,t)]:V(d.map(g=>p(n,g,o)).filter(g=>g!==null)),f=ve(a,c),m=Se(r,a,c),v=De(a);return{selector:e,status:"matched",kind:"file-source",totalCandidates:1,results:c,definitions:[],candidates:[],omittedCandidates:0,suggestions:[],fileCoverage:{members:i,basis:i==="all"||u.length===0?"complete-file-source":s.length>0?"explicit-exports-and-same-file-reference-closure":"top-level-and-same-file-reference-closure",totalDefinitions:v,returnedDefinitions:f,returnedBodies:c.length,omittedDefinitions:Math.max(0,v-f),omittedLedger:m}}}function Ce(n,e){let t=new Set(n.map(o=>o.symbol));return e.filter(o=>t.has(o.symbol))}function ye(n,e){return G(n,e).flatMap(t=>Le(t,e)?t.children:[t])}function Z(n,e){return J(e).has(n.leaf)}function Le(n,e){return J(e).has(w(n.symbol))}function J(n){let e=me(n);return new Set([e,e.slice(0,Math.max(0,e.length-K(e).length))])}function Q(n,e,t){if(e.length===0)return[];let o=D(n,t,{additive:!0,semantic:!1}),i=new Map;for(let u of t){let s=i.get(u.symbol)??[];s.push(u),i.set(u.symbol,s)}let r=new Map,a=[...e];for(;a.length>0;){let u=a.shift();if(!r.has(u.symbolId)){r.set(u.symbolId,u);for(let s of o.get(u.symbolId)??[])for(let l of i.get(s.symbol)??[])r.has(l.symbolId)||a.push(l)}}return[...r.values()].sort(xe)}function V(n){let e=[...n].sort((o,i)=>o.relativePath.localeCompare(i.relativePath)||o.startLine-i.startLine||i.endLine-o.endLine),t=[];for(let o of e)t.some(i=>ee(i,o))||t.push(o);return t}function Y(n,e){let t=e.text.split(`
2
- `);return{symbol:e.relativePath,shortName:e.relativePath,relativePath:e.relativePath,startLine:0,endLine:Math.max(0,t.length-1),language:n.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath)?.language??E(e.relativePath),source:e.text,freshness:e.freshness,...b(e.freshness)?{bindingClosure:y(n,e.relativePath,0,Math.max(0,t.length-1))}:{}}}function ve(n,e){return L(n).filter(t=>e.some(o=>N(t,o))).length}function Se(n,e,t){let o=[];return q(o,n,e,t,0),o}function q(n,e,t,o,i){for(let r of t){if(o.some(u=>N(r,u)))continue;let a=L(r.children).filter(u=>!o.some(s=>N(u,s))).length;n.push({symbol:r.symbol,shortName:r.shortName,relativePath:e,startLine:r.startLine,endLine:r.endLine,signature:r.signature,depth:i,nestedDefinitions:a}),q(n,e,r.children,o,i+1)}}function L(n){return n.flatMap(e=>[e,...L(e.children)])}function De(n){return L(n).length}function N(n,e){return e.startLine<=n.startLine&&e.endLine>=n.endLine}function ee(n,e){return n.relativePath===e.relativePath&&n.startLine<=e.startLine&&n.endLine>=e.endLine}function xe(n,e){return n.startLine-e.startLine||e.endLine-n.endLine||n.symbol.localeCompare(e.symbol)}function Re(n,e){return{selector:n,status:"matched",kind:"source",totalCandidates:1,results:[e],definitions:[],candidates:[],omittedCandidates:0,suggestions:[]}}function R(n,e,t){return{selector:e,status:"missing",kind:"source",totalCandidates:0,results:[],definitions:[],candidates:[],omittedCandidates:0,suggestions:A(n,e,5),reason:t}}function ne(n,e){try{return C(n,e)}catch(t){if(t instanceof P)return null;throw t}}function Ne(n,e){if(!e.match)return[];let t=[e.match];for(let i of e.candidates){let r=h(n,i.relativePath).find(a=>a.symbol===i.symbol&&a.startLine===i.startLine);r&&t.push(r)}let o=new Set;return t.filter(i=>{let r=`${i.relativePath}:${i.startLine}:${i.endLine}:${i.symbol}`;return o.has(r)?!1:(o.add(r),!0)})}function te(n){return{symbol:n.symbol,shortName:S(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine}}function ie(n){let e=n.match(/^(.+):(\d+)-(\d+)$/);if(!e)return null;let t=Number(e[2]),o=Number(e[3]);if(!Number.isSafeInteger(t)||t<1)throw new RangeError(`Source range start line must be a positive integer, got "${e[2]}".`);if(!Number.isSafeInteger(o)||o<t)throw new RangeError(`Source range end line must be an integer at or after ${t}, got "${e[3]}".`);return{filePath:e[1],startLine:t,endLine:o}}function p(n,e,t){let o=n.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),i=C(n,e.relativePath);if(!i)return null;let a=i.text.split(`
1
+ import{a as z}from"./chunk-GHNPACNP.js";import{b as C}from"./chunk-6MFXCMZC.js";import{c as W}from"./chunk-RVZC6TJE.js";import{b as U}from"./chunk-POBJ6FR2.js";import{h as D}from"./chunk-AADQLOQ4.js";import{a as _}from"./chunk-HX4X7KG3.js";import{a as k,b as j,e as A}from"./chunk-2USA3S3P.js";import{C as I,K as O,T as p,Y as T,i as F,k as M,l as B}from"./chunk-2VAHDDLM.js";import{c as S,d as w,l as $}from"./chunk-BL6DCHQP.js";import{m as P}from"./chunk-7HXT6YLU.js";import{basename as me,extname as K}from"path";var oe=12,se=280;function y(n,e,t,o){let i=ae(n,e,t,o);if(i.size===0)return ce();let r=[],a=new Set,u=(l,d,c,f)=>{if(d===e&&c<=o&&f>=t)return;let m=`${d}:${c}:${f}:${l}`;a.has(m)||(a.add(m),r.push({name:l,relativePath:d,startLine:c,endLine:f}))};for(let l of p(n,e))i.has(l.leaf)&&u(l.leaf,l.relativePath,l.startLine,l.endLine);for(let l of O(n,e)){let d=l.localName;if(!d||!i.has(d)||!l.sourcePath||l.kind==="namespace")continue;let c=l.importedName==="default"?d:l.importedName;for(let f of _(n,l.sourcePath,c,{maxReexportDepth:3}))u(d,f.relativePath,f.startLine,f.endLine)}r.sort(H);let s=r.map(l=>{let d=le(n,l);return d?{...l,source:d}:null}).filter(l=>l!==null).slice(0,oe);return x(s)}function X(n,e=[]){return x(ue(n.flatMap(t=>t?.inline??[]),e))}function ae(n,e,t,o){let i=I(n,e),r=new Set;if(!i)return r;for(let a=t;a<=o;a+=1)for(let u of i.identifiersByLine[a]??[])r.add(u);return r}function le(n,e){if(e.startLine!==e.endLine)return null;let t=(B(n,e.relativePath)[e.startLine]??"").trim();if(!t||t.length>se)return null;let o=t.indexOf("=");if(o<0||t[o+1]===">")return null;let i=t.slice(o+1).replace(/(?:\/\/|#).*$/u,"").trim();if(!i||i.includes("${")||/\b(?:function|class|struct|interface|trait|enum|lambda)\b/u.test(i))return null;let a=i.replace(/(['"`])(?:\\.|(?!\1).)*\1/gu,"").replace(/\b(?:0[xX][\dA-Fa-f_]+|0[bB][01_]+|0[oO][0-7_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d+)?)n?\b/gu,""),u=new Set(["true","false","null","undefined","None","True","False"]);return(a.match(/[A-Za-z_][A-Za-z0-9_]*/gu)??[]).some(l=>!u.has(l))?null:t}function ue(n,e){let t=new Map;for(let o of n){if(de(o,e))continue;let i=`${o.relativePath}:${o.startLine}:${o.endLine}:${o.name}`;t.has(i)||t.set(i,{...o})}return[...t.values()].sort(H)}function de(n,e){return e.some(t=>t.relativePath===n.relativePath&&t.startLine<=n.startLine&&t.endLine>=n.endLine)}function H(n,e){return n.relativePath.localeCompare(e.relativePath)||n.startLine-e.startLine||n.name.localeCompare(e.name)}function x(n){return{coverage:"indexed-project-literal-values",inline:n}}function ce(){return x([])}function G(n,e){let t=W(n,e);if(!t)return[];let o=T(n,[t],{sort:!0});if(o.length===0)return[];let i=Math.max(0,M(F(n,t)).length-1),r=o.map(s=>({symbol:s.symbol,shortName:s.shortName,startLine:s.startLine,endLine:Math.min(s.endLine,i),signature:s.signature,children:[]})),a=new Map;for(let s of r)a.set(s.symbol,s);let u=[];for(let s=0;s<o.length;s++){let l=o[s],d=r[s];if(l.enclosingSymbol&&a.has(l.enclosingSymbol)){a.get(l.enclosingSymbol).children.push(d);continue}let c=null,f=1/0;for(let m of r)if(m!==d&&m.startLine<=d.startLine&&m.endLine>=d.endLine){if(m.startLine===d.startLine&&m.endLine===d.endLine&&!$(m.symbol,d.symbol))continue;let g=m.endLine-m.startLine;g<f&&(f=g,c=m)}c?c.children.push(d):u.push(d)}return u}function Je(n,e,t={}){let{context:o=0}=t,i=ie(e);if(i)return re(n,i.filePath,i.startLine,i.endLine,o);let r=ne(n,e);if(r)return Y(n,r);let a=k(n,e);return a?h(n,a,o):null}function Qe(n,e,t={}){if(e.length===0)throw new RangeError("code requires at least one selector.");if(e.length>24)throw new RangeError(`code accepts at most ${24} selectors per complete packet; received ${e.length}.`);let o=t.context??0,i=t.members??"exported",r=e.map(s=>ge(n,s,o,i)),a=r.flatMap(s=>s.results),u=a.map(s=>({relativePath:s.relativePath,startLine:s.startLine,endLine:s.endLine}));return{requested:e.length,matched:r.filter(s=>s.status==="matched").length,ambiguous:r.filter(s=>s.status==="ambiguous").length,missing:r.filter(s=>s.status==="missing").length,entries:r,bindingClosure:X(a.map(s=>s.bindingClosure),u)}}function ge(n,e,t,o){let i=ie(e);if(i){let d=re(n,i.filePath,i.startLine,i.endLine,t);return d?pe(n,e,d,t):R(n,e,"definition-source-unreadable")}let r=ne(n,e);if(r)return be(n,e,r,t,o);let a=j(n,e);if(!a.match)return R(n,e,"definition-not-found");let u=Ne(n,a),s=u.map(te);if(a.total>1){let d=a.total<=4&&u.length===a.total;return{selector:e,status:"ambiguous",kind:"source",totalCandidates:a.total,results:d?u.flatMap(c=>{let f=h(n,c,t);return f?[f]:[]}):[],definitions:[],candidates:s,omittedCandidates:Math.max(0,a.total-s.length),suggestions:[]}}let l=h(n,a.match,t);return l?Re(e,l):R(n,e,"definition-source-unreadable")}function pe(n,e,t,o){let i=p(n,t.relativePath).filter(l=>!Z(l,t.relativePath)),r=he(n,t,i),a=V(r.map(l=>h(n,l,o)).filter(l=>l!==null)).filter(l=>!ee(t,l)),u=new Set(a.map(l=>l.symbol)),s=r.filter(l=>!u.has(l.symbol)&&!(t.startLine<=l.startLine&&t.endLine>=l.endLine)).map(te);return{selector:e,status:"matched",kind:"source",totalCandidates:1,results:[t,...a],definitions:[],candidates:[],omittedCandidates:0,suggestions:[],rangeCoverage:{basis:"requested-range-and-same-file-call-closure",referencedDefinitions:r.length,returnedDefinitions:r.length-s.length,returnedBodies:a.length,omittedDefinitions:s.length,omittedLedger:s}}}function he(n,e,t){if(!b(e.freshness))return[];if(t.length===0)return[];let o=D(n,t,{additive:!1,semantic:!1}),i=new Map;for(let a of t){let u=i.get(a.symbol)??[];u.push(a),i.set(a.symbol,u)}let r=new Map;for(let a of t)if(!(a.endLine<e.startLine||a.startLine>e.endLine)){for(let u of o.get(a.symbolId)??[])if(u.file===e.relativePath&&!((u.source==="ast-callsite"||u.source==="scip-occurrence")&&(u.chunkId<e.startLine||u.chunkId>e.endLine)))for(let s of i.get(u.symbol)??[])r.set(s.symbolId,s)}return Q(n,[...r.values()],t)}function be(n,e,t,o,i){let r=t.relativePath,a=ye(n,r),u=b(t.freshness)?p(n,r).filter(g=>!Z(g,r)):[],s=u.filter(g=>z(n,g)),l=s.length>0?s:Ce(a,u),d=i==="all"?[]:Q(n,l,u),c=i==="all"||u.length===0?[Y(n,t)]:V(d.map(g=>h(n,g,o)).filter(g=>g!==null)),f=ve(a,c),m=Se(r,a,c),v=De(a);return{selector:e,status:"matched",kind:"file-source",totalCandidates:1,results:c,definitions:[],candidates:[],omittedCandidates:0,suggestions:[],fileCoverage:{members:i,basis:i==="all"||u.length===0?"complete-file-source":s.length>0?"explicit-exports-and-same-file-reference-closure":"top-level-and-same-file-reference-closure",totalDefinitions:v,returnedDefinitions:f,returnedBodies:c.length,omittedDefinitions:Math.max(0,v-f),omittedLedger:m}}}function Ce(n,e){let t=new Set(n.map(o=>o.symbol));return e.filter(o=>t.has(o.symbol))}function ye(n,e){return G(n,e).flatMap(t=>Le(t,e)?t.children:[t])}function Z(n,e){return J(e).has(n.leaf)}function Le(n,e){return J(e).has(w(n.symbol))}function J(n){let e=me(n);return new Set([e,e.slice(0,Math.max(0,e.length-K(e).length))])}function Q(n,e,t){if(e.length===0)return[];let o=D(n,t,{additive:!0,semantic:!1}),i=new Map;for(let u of t){let s=i.get(u.symbol)??[];s.push(u),i.set(u.symbol,s)}let r=new Map,a=[...e];for(;a.length>0;){let u=a.shift();if(!r.has(u.symbolId)){r.set(u.symbolId,u);for(let s of o.get(u.symbolId)??[])for(let l of i.get(s.symbol)??[])r.has(l.symbolId)||a.push(l)}}return[...r.values()].sort(xe)}function V(n){let e=[...n].sort((o,i)=>o.relativePath.localeCompare(i.relativePath)||o.startLine-i.startLine||i.endLine-o.endLine),t=[];for(let o of e)t.some(i=>ee(i,o))||t.push(o);return t}function Y(n,e){let t=e.text.split(`
2
+ `);return{symbol:e.relativePath,shortName:e.relativePath,relativePath:e.relativePath,startLine:0,endLine:Math.max(0,t.length-1),language:n.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath)?.language??E(e.relativePath),source:e.text,freshness:e.freshness,...b(e.freshness)?{bindingClosure:y(n,e.relativePath,0,Math.max(0,t.length-1))}:{}}}function ve(n,e){return L(n).filter(t=>e.some(o=>N(t,o))).length}function Se(n,e,t){let o=[];return q(o,n,e,t,0),o}function q(n,e,t,o,i){for(let r of t){if(o.some(u=>N(r,u)))continue;let a=L(r.children).filter(u=>!o.some(s=>N(u,s))).length;n.push({symbol:r.symbol,shortName:r.shortName,relativePath:e,startLine:r.startLine,endLine:r.endLine,signature:r.signature,depth:i,nestedDefinitions:a}),q(n,e,r.children,o,i+1)}}function L(n){return n.flatMap(e=>[e,...L(e.children)])}function De(n){return L(n).length}function N(n,e){return e.startLine<=n.startLine&&e.endLine>=n.endLine}function ee(n,e){return n.relativePath===e.relativePath&&n.startLine<=e.startLine&&n.endLine>=e.endLine}function xe(n,e){return n.startLine-e.startLine||e.endLine-n.endLine||n.symbol.localeCompare(e.symbol)}function Re(n,e){return{selector:n,status:"matched",kind:"source",totalCandidates:1,results:[e],definitions:[],candidates:[],omittedCandidates:0,suggestions:[]}}function R(n,e,t){return{selector:e,status:"missing",kind:"source",totalCandidates:0,results:[],definitions:[],candidates:[],omittedCandidates:0,suggestions:A(n,e,5),reason:t}}function ne(n,e){try{return C(n,e)}catch(t){if(t instanceof P)return null;throw t}}function Ne(n,e){if(!e.match)return[];let t=[e.match];for(let i of e.candidates){let r=p(n,i.relativePath).find(a=>a.symbol===i.symbol&&a.startLine===i.startLine);r&&t.push(r)}let o=new Set;return t.filter(i=>{let r=`${i.relativePath}:${i.startLine}:${i.endLine}:${i.symbol}`;return o.has(r)?!1:(o.add(r),!0)})}function te(n){return{symbol:n.symbol,shortName:S(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine}}function ie(n){let e=n.match(/^(.+):(\d+)-(\d+)$/);if(!e)return null;let t=Number(e[2]),o=Number(e[3]);if(!Number.isSafeInteger(t)||t<1)throw new RangeError(`Source range start line must be a positive integer, got "${e[2]}".`);if(!Number.isSafeInteger(o)||o<t)throw new RangeError(`Source range end line must be an integer at or after ${t}, got "${e[3]}".`);return{filePath:e[1],startLine:t,endLine:o}}function h(n,e,t){let o=n.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),i=C(n,e.relativePath);if(!i)return null;let a=i.text.split(`
3
3
  `),u=e.endLine<=e.startLine?U(n,e.relativePath,e.startLine,Number.MAX_SAFE_INTEGER):null,s=u?.unitType?u.unitStartLine:e.startLine,l=u?.unitType?u.unitEndLine:e.endLine,d=Math.max(0,s-t),c=Math.min(a.length-1,l+t),f=a.slice(d,c+1).join(`
4
4
  `);return{symbol:e.symbol,shortName:S(e.symbol),relativePath:e.relativePath,startLine:d,endLine:c,language:o?.language??E(e.relativePath),source:f,freshness:i.freshness,...b(i.freshness)?{bindingClosure:y(n,e.relativePath,d,c)}:{}}}function re(n,e,t,o,i){let r=C(n,e);if(!r)return null;let a=n.get("SELECT language FROM documents WHERE relative_path = ?",r.relativePath),s=r.text.split(`
5
5
  `);if(t>s.length)return null;let l=Math.max(0,t-1-i),d=Math.min(s.length-1,o-1+i),c=s.slice(l,d+1).join(`
6
6
  `);return{symbol:`${r.relativePath}:${t}-${o}`,shortName:`${r.relativePath}:${t}-${o}`,relativePath:r.relativePath,startLine:l,endLine:d,language:a?.language??E(r.relativePath),source:c,freshness:r.freshness,...b(r.freshness)?{bindingClosure:y(n,r.relativePath,l,d)}:{}}}function b(n){return!!(n&&n.semantic.state!=="stale"&&n.semantic.basis!=="no-compiler-document")}function E(n){switch(K(n).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{G as a,Je as b,Qe as c};
7
- //# sourceMappingURL=chunk-TUQIPUDS.js.map
7
+ //# sourceMappingURL=chunk-2M2LSIMY.js.map
@@ -1,4 +1,4 @@
1
- import{b as a}from"./chunk-ERCYGVAM.js";import{c as l}from"./chunk-PLYUVM4F.js";import{d as o,g as i}from"./chunk-TD7VKJ2Y.js";function _(e,t){let r=a(e,t);return r.length===0?[]:u([...c(e,r),...f(e,r)]).filter(s=>!e.isIgnored(s.relative_path)).map(d)}function R(e,t){let r=a(e,t);return r.length===0?[]:u(c(e,r)).filter(s=>!e.isIgnored(s.relative_path)).map(s=>({...d(s),basis:"external-reference"}))}function c(e,t){let r=t.map(()=>"?").join(", ");return e.all(`SELECT DISTINCT d1.relative_path, gs.symbol
1
+ import{b as a}from"./chunk-RVZC6TJE.js";import{e as l}from"./chunk-JFMI5SGB.js";import{c as o,f as i}from"./chunk-BL6DCHQP.js";function _(e,t){let r=a(e,t);return r.length===0?[]:u([...c(e,r),...f(e,r)]).filter(s=>!e.isIgnored(s.relative_path)).map(d)}function R(e,t){let r=a(e,t);return r.length===0?[]:u(c(e,r)).filter(s=>!e.isIgnored(s.relative_path)).map(s=>({...d(s),basis:"external-reference"}))}function c(e,t){let r=t.map(()=>"?").join(", ");return e.all(`SELECT DISTINCT d1.relative_path, gs.symbol
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d1 ON c.document_id = d1.id
@@ -26,4 +26,4 @@ import{b as a}from"./chunk-ERCYGVAM.js";import{c as l}from"./chunk-PLYUVM4F.js";
26
26
  AND ${e.localSymbolPredicate}
27
27
  ${e.pathExclusionsFor("d1")}
28
28
  ORDER BY d1.relative_path`,...t,...t,...t)}function f(e,t){let r=new l(e);return t.flatMap(s=>r.definitionsForFile(s).filter(n=>i(n.symbol)).map(n=>({relative_path:s,symbol:n.symbol})))}function u(e){let t=new Set;return e.filter(r=>{let s=`${r.relative_path}|${r.symbol}`;return t.has(s)?!1:(t.add(s),!0)})}function d(e){return{consumer:e.relative_path,symbol:e.symbol,shortName:o(e.symbol)}}export{_ as a,R as b};
29
- //# sourceMappingURL=chunk-GIQ6CSL4.js.map
29
+ //# sourceMappingURL=chunk-2N6WBNDC.js.map
@@ -1,2 +1,2 @@
1
- import{b as f,c as m}from"./chunk-SB25YMEQ.js";import{execFileSync as b}from"child_process";import{platform as S}from"os";var w=1e3,T=2*1024*1024,I=25;function N(e,n,r=M){let t=r.readIdentity(e),o=new Map;return t&&o.set(e,t),{rootPid:e,rootIdentity:t,ownsProcessGroup:n,knownMembers:o}}async function k(e,n,r=M){if(!e.rootIdentity){let a=await l(e,n.gracefulMs+n.forceMs,r);return{reaped:a,reason:a?"terminated":"identity-unavailable",detail:a?void 0:`Could not establish the birth identity of process ${e.rootPid}.`}}let t=h(e,r);if(t==="mismatch")return{reaped:!1,reason:"identity-mismatch",detail:`Process ${e.rootPid} no longer has the identity owned by this runner.`};if(t==="exited"&&!g(e,r))return{reaped:!0,reason:"terminated"};if(r.platform==="win32"){try{r.terminateWindowsTree(e.rootPid)}catch(u){let c=await l(e,n.forceMs,r);return{reaped:c,reason:c?"terminated":"signal-failed",detail:c?void 0:p(u)}}let a=await l(e,n.forceMs,r);return{reaped:a,reason:a?"terminated":"deadline"}}let o=P(e,"SIGTERM",r);if(await l(e,n.gracefulMs,r))return{reaped:!0,reason:"terminated"};let s=P(e,"SIGKILL",r);return await l(e,n.forceMs,r)?{reaped:!0,reason:"terminated"}:s?{reaped:!1,reason:s.reason,detail:s.detail}:o?{reaped:!1,reason:o.reason,detail:o.detail}:{reaped:!1,reason:"deadline",detail:`Process tree ${e.rootPid} did not exit before its termination deadline.`}}function h(e,n){let r=n.readIdentity(e.rootPid);if(!r)return"exited";if(!e.rootIdentity||!f(e.rootIdentity,r))return"mismatch";e.knownMembers.set(e.rootPid,r);for(let t of n.listDescendantPids(e.rootPid)){let o=n.readIdentity(t);o&&e.knownMembers.set(t,o)}return"owned"}function P(e,n,r){let t=h(e,r);if(t==="mismatch")return{reason:"identity-mismatch",detail:`Process ${e.rootPid} changed identity before ${n}.`};if(t==="owned"&&e.ownsProcessGroup)try{return r.signal(-e.rootPid,n),null}catch(i){if(!y(i))return{reason:"signal-failed",detail:p(i)}}let o=null;for(let i of e.knownMembers.values()){let s=r.readIdentity(i.pid);if(!(!s||!f(i,s)))try{r.signal(i.pid,n)}catch(d){!y(d)&&o===null&&(o=p(d))}}return o===null?null:{reason:"signal-failed",detail:o}}async function l(e,n,r){let t=r.now()+n;for(;g(e,r);){if(r.now()>=t)return!1;await r.sleep(Math.min(I,Math.max(1,t-r.now())))}return!0}function g(e,n){if(!e.rootIdentity&&n.isProcessAlive(e.rootPid))return!0;for(let r of e.knownMembers.values()){let t=n.readIdentity(r.pid);if(t&&f(r,t))return!0}return!!(e.ownsProcessGroup&&n.isProcessGroupAlive(e.rootPid))}function x(e){let n=R(!1),r=new Map;for(let s of n.split(/\r?\n/)){let d=/^\s*(\d+)\s+(\d+)\s*$/.exec(s);if(!d)continue;let a=Number(d[1]),u=Number(d[2]),c=r.get(u)??[];c.push(a),r.set(u,c)}let t=[],o=[...r.get(e)??[]],i=new Set;for(;o.length>0;){let s=o.pop();i.has(s)||(i.add(s),t.push(s),o.push(...r.get(s)??[]))}return t}function R(e){return b("ps",["-axo",e?"pid=,ppid=,rss=":"pid=,ppid="],{encoding:"utf8",timeout:w,maxBuffer:T,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}function y(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ESRCH"}function p(e){return e instanceof Error?e.message:String(e)}var M={platform:S(),now:Date.now,readIdentity:m,isProcessAlive(e){try{return process.kill(e,0),!0}catch(n){return typeof n=="object"&&n!==null&&"code"in n&&n.code==="EPERM"}},isProcessGroupAlive(e){if(this.platform==="win32")return!1;try{return process.kill(-e,0),!0}catch(n){return typeof n=="object"&&n!==null&&"code"in n&&n.code==="EPERM"}},listDescendantPids(e){if(this.platform==="win32")return[];try{return x(e)}catch{return[]}},signal(e,n){process.kill(e,n)},terminateWindowsTree(e){b("taskkill.exe",["/PID",String(e),"/T","/F"],{timeout:w,maxBuffer:T,stdio:"ignore",windowsHide:!0})},async sleep(e){await new Promise(n=>setTimeout(n,e))}};export{N as a,k as b};
2
- //# sourceMappingURL=chunk-JHH5SCZ3.js.map
1
+ import{b as f,c as m}from"./chunk-JFMEXGFE.js";import{execFileSync as b}from"child_process";import{platform as S}from"os";var w=1e3,T=2*1024*1024,I=25;function N(e,n,r=M){let t=r.readIdentity(e),o=new Map;return t&&o.set(e,t),{rootPid:e,rootIdentity:t,ownsProcessGroup:n,knownMembers:o}}async function k(e,n,r=M){if(!e.rootIdentity){let a=await l(e,n.gracefulMs+n.forceMs,r);return{reaped:a,reason:a?"terminated":"identity-unavailable",detail:a?void 0:`Could not establish the birth identity of process ${e.rootPid}.`}}let t=h(e,r);if(t==="mismatch")return{reaped:!1,reason:"identity-mismatch",detail:`Process ${e.rootPid} no longer has the identity owned by this runner.`};if(t==="exited"&&!g(e,r))return{reaped:!0,reason:"terminated"};if(r.platform==="win32"){try{r.terminateWindowsTree(e.rootPid)}catch(u){let c=await l(e,n.forceMs,r);return{reaped:c,reason:c?"terminated":"signal-failed",detail:c?void 0:p(u)}}let a=await l(e,n.forceMs,r);return{reaped:a,reason:a?"terminated":"deadline"}}let o=P(e,"SIGTERM",r);if(await l(e,n.gracefulMs,r))return{reaped:!0,reason:"terminated"};let s=P(e,"SIGKILL",r);return await l(e,n.forceMs,r)?{reaped:!0,reason:"terminated"}:s?{reaped:!1,reason:s.reason,detail:s.detail}:o?{reaped:!1,reason:o.reason,detail:o.detail}:{reaped:!1,reason:"deadline",detail:`Process tree ${e.rootPid} did not exit before its termination deadline.`}}function h(e,n){let r=n.readIdentity(e.rootPid);if(!r)return"exited";if(!e.rootIdentity||!f(e.rootIdentity,r))return"mismatch";e.knownMembers.set(e.rootPid,r);for(let t of n.listDescendantPids(e.rootPid)){let o=n.readIdentity(t);o&&e.knownMembers.set(t,o)}return"owned"}function P(e,n,r){let t=h(e,r);if(t==="mismatch")return{reason:"identity-mismatch",detail:`Process ${e.rootPid} changed identity before ${n}.`};if(t==="owned"&&e.ownsProcessGroup)try{return r.signal(-e.rootPid,n),null}catch(i){if(!y(i))return{reason:"signal-failed",detail:p(i)}}let o=null;for(let i of e.knownMembers.values()){let s=r.readIdentity(i.pid);if(!(!s||!f(i,s)))try{r.signal(i.pid,n)}catch(d){!y(d)&&o===null&&(o=p(d))}}return o===null?null:{reason:"signal-failed",detail:o}}async function l(e,n,r){let t=r.now()+n;for(;g(e,r);){if(r.now()>=t)return!1;await r.sleep(Math.min(I,Math.max(1,t-r.now())))}return!0}function g(e,n){if(!e.rootIdentity&&n.isProcessAlive(e.rootPid))return!0;for(let r of e.knownMembers.values()){let t=n.readIdentity(r.pid);if(t&&f(r,t))return!0}return!!(e.ownsProcessGroup&&n.isProcessGroupAlive(e.rootPid))}function x(e){let n=R(!1),r=new Map;for(let s of n.split(/\r?\n/)){let d=/^\s*(\d+)\s+(\d+)\s*$/.exec(s);if(!d)continue;let a=Number(d[1]),u=Number(d[2]),c=r.get(u)??[];c.push(a),r.set(u,c)}let t=[],o=[...r.get(e)??[]],i=new Set;for(;o.length>0;){let s=o.pop();i.has(s)||(i.add(s),t.push(s),o.push(...r.get(s)??[]))}return t}function R(e){return b("ps",["-axo",e?"pid=,ppid=,rss=":"pid=,ppid="],{encoding:"utf8",timeout:w,maxBuffer:T,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}function y(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ESRCH"}function p(e){return e instanceof Error?e.message:String(e)}var M={platform:S(),now:Date.now,readIdentity:m,isProcessAlive(e){try{return process.kill(e,0),!0}catch(n){return typeof n=="object"&&n!==null&&"code"in n&&n.code==="EPERM"}},isProcessGroupAlive(e){if(this.platform==="win32")return!1;try{return process.kill(-e,0),!0}catch(n){return typeof n=="object"&&n!==null&&"code"in n&&n.code==="EPERM"}},listDescendantPids(e){if(this.platform==="win32")return[];try{return x(e)}catch{return[]}},signal(e,n){process.kill(e,n)},terminateWindowsTree(e){b("taskkill.exe",["/PID",String(e),"/T","/F"],{timeout:w,maxBuffer:T,stdio:"ignore",windowsHide:!0})},async sleep(e){await new Promise(n=>setTimeout(n,e))}};export{N as a,k as b};
2
+ //# sourceMappingURL=chunk-2OOY75BW.js.map
@@ -1,3 +1,3 @@
1
- import{M as f,N as S,Q as R,Z as M}from"./chunk-C7IJMOFP.js";import{b as B}from"./chunk-YXPUP5G2.js";import{b as N,c as _,d as w,f as k,g as A,h as z}from"./chunk-DRENNWRG.js";import{c as O}from"./chunk-IW5XQG5G.js";var T=O("symbol-resolution",{clearGroups:[]});function he(e,n){return G(e,n).match}function G(e,n){return T.get(e,n,()=>{let t=W(e,n.trim()).filter(i=>!e.isIgnored(i.relative_path));if(t.length>0)return L(e,t);let o=P(e,n);if(o&&!e.isIgnored(o.relative_path))return L(e,[o]);let r=H(e,n);if(r.length>0)return L(e,r);let s=U(e,n);return s.length>0?L(e,s):J(e,n)})}function H(e,n){let t=n.trim().replace(/\(\)$/u,""),o=t.lastIndexOf(":");if(o<=0||o===t.length-1||t.startsWith("local:"))return[];let r=t.slice(o+1);if(!/^[\p{L}_$][\p{L}\p{N}_$]*$/u.test(r))return[];let s=[`/${r}().`,`/${r}.`,`/${r}#`,`#${r}().`,`#${r}.`,`/${r}/`],i=`gs.display_name = ? OR ${s.map(()=>"instr(gs.symbol, ?) > 0").join(" OR ")}`,a=[r,...s],l=f(e,{where:i,params:a,orderBy:"d.relative_path, der.start_line",limit:200}),u=l.length>0?[]:S(e,{where:i,params:a,orderBy:"d.relative_path, start_line",limit:200}),p=R(l,u).filter(m=>!e.isIgnored(m.relative_path)).filter(m=>_(m.symbol).replace(/\(\)$/u,"")===t);return[...new Map(p.map(m=>[`${m.symbol}\0${m.relative_path}`,m])).values()]}function U(e,n){let t=Q(n),o=E(t);if(!o)return[];let r=`%${o.path}%`,s=o.leaf;return X(e,r,s,t)}function X(e,n,t,o){let r=R([],[...Y(e,n,t),...Z(e,n,t)]).filter(s=>!e.isIgnored(s.relative_path)).filter(s=>C(s,o)>1);return r.sort((s,i)=>C(i,o)-C(s,o)||s.end_line-s.start_line-(i.end_line-i.start_line)||s.start_line-i.start_line||s.symbol.localeCompare(i.symbol)),r}function Y(e,n,t){return f(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function Z(e,n,t){return S(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function J(e,n){let t=Q(n),o=ae(n),r=oe(e,o),s=se(r,n,t).filter(a=>!e.isIgnored(a.relative_path));if(s.length>0)return L(e,s);let i=[];for(let a of r){if(e.isIgnored(a.relative_path))continue;let l=re(a,n,t,o);l<=0||i.push({row:a,score:l})}return i.sort((a,l)=>l.score-a.score||a.row.end_line-a.row.start_line-(l.row.end_line-l.row.start_line)||a.row.relative_path.localeCompare(l.row.relative_path)||a.row.symbol.localeCompare(l.row.symbol)),L(e,i.map(a=>a.row))}function L(e,n){let t=n.map(r=>M(e,r)),o=t[0]??null;return{match:o,candidates:o?V(t,o):[],total:t.length}}function V(e,n){let t=new Set([`${n.symbolId}:${n.relativePath}:${n.startLine}`]),o=[];for(let r of e){let s=`${r.symbolId}:${r.relativePath}:${r.startLine}`;if(!t.has(s)&&(t.add(s),o.push({symbol:r.symbol,shortName:_(r.symbol),relativePath:r.relativePath,startLine:r.startLine}),o.length>=5))break}return o}function P(e,n){let t=n.match(/^(.+):(\d+)(?:-(\d+))?$/);if(!t)return;let[,o,r,s]=t,i=B(e,o,{allowMultiple:!1,requirePathMatch:!0})[0]?.relativePath;if(!i)return;let a=Math.max(0,parseInt(r,10)-1),l=s?Math.max(a,parseInt(s,10)-1):a;return ee(e,i,a,l)??te(e,i,a,l)}function ee(e,n,t,o){return f(e,{where:"d.relative_path = ? AND der.start_line <= ? AND der.end_line >= ?",params:[n,t,o],orderBy:"(der.end_line - der.start_line) ASC",limit:1})[0]}function te(e,n,t,o){return S(e,{where:"d.relative_path = ? AND c.start_line <= ? AND c.end_line >= ?",params:[n,t,o],orderBy:"(MAX(c.end_line) - MIN(c.start_line)) ASC",limit:1})[0]}function be(e,n){let t=W(e,n).find(o=>!e.isIgnored(o.relative_path));return t?M(e,t):null}function W(e,n){let t=f(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, der.start_line"}),o=t.length>0?[]:S(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, start_line"});return R(t,o)}function Se(e,n){if("symbol"in n&&"relativePath"in n)return n;let t=ne(e,n.symbolId)[0];return t?M(e,t):null}function ne(e,n){let t=f(e,{where:"gs.id = ?",params:[n],orderBy:"der.start_line, der.end_line"}),o=S(e,{where:"gs.id = ?",params:[n],orderBy:"start_line, end_line"});return R(t,o)}function oe(e,n){let t=n.map(()=>"(gs.symbol LIKE ? OR d.relative_path LIKE ? OR COALESCE(gs.display_name, '') LIKE ?)"),o=n.flatMap(a=>{let l=`%${a}%`;return[l,l,l]}),r=t.join(`
1
+ import{$ as M,O as f,P as S,S as R}from"./chunk-2VAHDDLM.js";import{b as B}from"./chunk-YXPUP5G2.js";import{b as N,c as _,d as w,f as k,g as A,h as z}from"./chunk-BL6DCHQP.js";import{c as O}from"./chunk-IW5XQG5G.js";var T=O("symbol-resolution",{clearGroups:[]});function he(e,n){return G(e,n).match}function G(e,n){return T.get(e,n,()=>{let t=W(e,n.trim()).filter(i=>!e.isIgnored(i.relative_path));if(t.length>0)return L(e,t);let o=P(e,n);if(o&&!e.isIgnored(o.relative_path))return L(e,[o]);let r=H(e,n);if(r.length>0)return L(e,r);let s=U(e,n);return s.length>0?L(e,s):J(e,n)})}function H(e,n){let t=n.trim().replace(/\(\)$/u,""),o=t.lastIndexOf(":");if(o<=0||o===t.length-1||t.startsWith("local:"))return[];let r=t.slice(o+1);if(!/^[\p{L}_$][\p{L}\p{N}_$]*$/u.test(r))return[];let s=[`/${r}().`,`/${r}.`,`/${r}#`,`#${r}().`,`#${r}.`,`/${r}/`],i=`gs.display_name = ? OR ${s.map(()=>"instr(gs.symbol, ?) > 0").join(" OR ")}`,a=[r,...s],l=f(e,{where:i,params:a,orderBy:"d.relative_path, der.start_line",limit:200}),u=l.length>0?[]:S(e,{where:i,params:a,orderBy:"d.relative_path, start_line",limit:200}),p=R(l,u).filter(m=>!e.isIgnored(m.relative_path)).filter(m=>_(m.symbol).replace(/\(\)$/u,"")===t);return[...new Map(p.map(m=>[`${m.symbol}\0${m.relative_path}`,m])).values()]}function U(e,n){let t=Q(n),o=E(t);if(!o)return[];let r=`%${o.path}%`,s=o.leaf;return X(e,r,s,t)}function X(e,n,t,o){let r=R([],[...Y(e,n,t),...Z(e,n,t)]).filter(s=>!e.isIgnored(s.relative_path)).filter(s=>C(s,o)>1);return r.sort((s,i)=>C(i,o)-C(s,o)||s.end_line-s.start_line-(i.end_line-i.start_line)||s.start_line-i.start_line||s.symbol.localeCompare(i.symbol)),r}function Y(e,n,t){return f(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function Z(e,n,t){return S(e,{where:"d.relative_path LIKE ? AND (gs.display_name = ? OR gs.symbol LIKE ?)",params:[n,t,`%/${t}.%`]})}function J(e,n){let t=Q(n),o=ae(n),r=oe(e,o),s=se(r,n,t).filter(a=>!e.isIgnored(a.relative_path));if(s.length>0)return L(e,s);let i=[];for(let a of r){if(e.isIgnored(a.relative_path))continue;let l=re(a,n,t,o);l<=0||i.push({row:a,score:l})}return i.sort((a,l)=>l.score-a.score||a.row.end_line-a.row.start_line-(l.row.end_line-l.row.start_line)||a.row.relative_path.localeCompare(l.row.relative_path)||a.row.symbol.localeCompare(l.row.symbol)),L(e,i.map(a=>a.row))}function L(e,n){let t=n.map(r=>M(e,r)),o=t[0]??null;return{match:o,candidates:o?V(t,o):[],total:t.length}}function V(e,n){let t=new Set([`${n.symbolId}:${n.relativePath}:${n.startLine}`]),o=[];for(let r of e){let s=`${r.symbolId}:${r.relativePath}:${r.startLine}`;if(!t.has(s)&&(t.add(s),o.push({symbol:r.symbol,shortName:_(r.symbol),relativePath:r.relativePath,startLine:r.startLine}),o.length>=5))break}return o}function P(e,n){let t=n.match(/^(.+):(\d+)(?:-(\d+))?$/);if(!t)return;let[,o,r,s]=t,i=B(e,o,{allowMultiple:!1,requirePathMatch:!0})[0]?.relativePath;if(!i)return;let a=Math.max(0,parseInt(r,10)-1),l=s?Math.max(a,parseInt(s,10)-1):a;return ee(e,i,a,l)??te(e,i,a,l)}function ee(e,n,t,o){return f(e,{where:"d.relative_path = ? AND der.start_line <= ? AND der.end_line >= ?",params:[n,t,o],orderBy:"(der.end_line - der.start_line) ASC",limit:1})[0]}function te(e,n,t,o){return S(e,{where:"d.relative_path = ? AND c.start_line <= ? AND c.end_line >= ?",params:[n,t,o],orderBy:"(MAX(c.end_line) - MIN(c.start_line)) ASC",limit:1})[0]}function be(e,n){let t=W(e,n).find(o=>!e.isIgnored(o.relative_path));return t?M(e,t):null}function W(e,n){let t=f(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, der.start_line"}),o=t.length>0?[]:S(e,{where:"gs.symbol = ?",params:[n],orderBy:"d.relative_path, start_line"});return R(t,o)}function Se(e,n){if("symbol"in n&&"relativePath"in n)return n;let t=ne(e,n.symbolId)[0];return t?M(e,t):null}function ne(e,n){let t=f(e,{where:"gs.id = ?",params:[n],orderBy:"der.start_line, der.end_line"}),o=S(e,{where:"gs.id = ?",params:[n],orderBy:"start_line, end_line"});return R(t,o)}function oe(e,n){let t=n.map(()=>"(gs.symbol LIKE ? OR d.relative_path LIKE ? OR COALESCE(gs.display_name, '') LIKE ?)"),o=n.flatMap(a=>{let l=`%${a}%`;return[l,l,l]}),r=t.join(`
2
2
  AND `),s=f(e,{where:r,params:o,limit:200}),i=S(e,{where:r,params:o,limit:200});return R(s,i)}function re(e,n,t,o){let r=n.trim(),s=t,i=s.replace(/\(\)$/,""),a=n.toLowerCase(),l=t.toLowerCase(),u=l.replace(/\(\)$/,""),p=e.symbol,m=_(e.symbol),y=w(e.symbol),g=e.display_name??"",$=e.symbol.toLowerCase(),d=m.toLowerCase(),h=y.toLowerCase(),x=g.toLowerCase(),b=e.relative_path.toLowerCase(),j=/[/:.]/.test(t),I=E(t),v=I?.leaf.toLowerCase(),c=0;return(p===r||p===s)&&(c+=1150),(m===r||m===s)&&(c+=1100),g===i&&(c+=1180),y===i&&(c+=1160),(`${y}()`===r||`${y}()`===s)&&(c+=955),($===a||$===l)&&(c+=1e3),(d===a||d===l)&&(c+=950),(b===a||b===l)&&(c+=925),(b.endsWith(`/${l}`)||b.endsWith(`/${a}`))&&(c+=875),x===u&&(c+=850),h===u&&(c+=825),(`${h}()`===a||`${h}()`===l)&&(c+=820),(d.endsWith(`:${l}`)||d.endsWith(`:${u}`)||d.endsWith(`:${u}()`))&&(c+=800),$.includes(l)&&(c+=120),d.includes(l)&&(c+=140),b.includes(l)&&(c+=140),x.includes(l)&&(c+=110),o.every(q=>{let D=q.toLowerCase();return $.includes(D)||d.includes(D)||b.includes(D)||x.includes(D)})&&(c+=100+o.length*15),I&&b.includes(I.path.toLowerCase())&&(c+=360,v&&(h===v||`${h}()`===v||`${h}()`==`${v}()`)&&(c+=700),k(e.symbol)&&(c+=180)),A(e.symbol)&&h===u&&(c+=60),!j&&z(e.symbol)&&(c-=160),c-=Math.min(50,Math.max(0,e.end_line-e.start_line)),c}function E(e){let n=e.trim().replace(/\\/g,"/"),t=n.lastIndexOf("/");if(t<=0||t===n.length-1)return null;let o=n.slice(t+1).replace(/\(\)$/,"");return!o||o.includes(".")?null:{path:n.slice(0,t),leaf:o}}function Q(e){return e.trim().replace(/\(\)$/,"").replace(/\(.*$/,"")}function ae(e){let n=Q(e),t=n.split(/[^A-Za-z0-9_]+/).map(o=>o.trim()).filter(o=>o.length>0);return t.length>0?[...new Set(t)]:[n]}function se(e,n,t){let o=n.trim(),r=e.filter(a=>{let l=_(a.symbol),u=w(a.symbol),p=(a.display_name??"").trim();return a.symbol===o||l===o||l===t||u===o||u===t||`${u}()`===o||p===o||p===t||`${p}()`===o||C(a,t)>1||a.relative_path===o});if(r.length===0)return[];let s=t.replace(/\(\)$/u,""),i=r.filter(a=>w(a.symbol)===s);if(i.length>0){i.sort((l,u)=>F(l,u,t));let a=i.filter(l=>A(l.symbol));return a.length>0?a:i}return r.sort((a,l)=>F(a,l,t)),r}function F(e,n,t){return C(n,t)-C(e,t)||e.end_line-e.start_line-(n.end_line-n.start_line)||e.relative_path.localeCompare(n.relative_path)||e.symbol.localeCompare(n.symbol)}function C(e,n){let t=E(n);if(!t)return 0;let o=e.relative_path.toLowerCase(),r=w(e.symbol).toLowerCase(),s=t.path.toLowerCase(),i=t.leaf.toLowerCase();return o.includes(s)?r!==i?1:k(e.symbol)?N(e.symbol)===null?5:4:N(e.symbol)===null?3:2:0}function ge(e,n,t=5){let o=K(n);if(!o)return[];let r=f(e,{where:"1 = 1",orderBy:"d.relative_path, der.start_line",limit:5e3}),s=new Map;for(let i of r){if(e.isIgnored(i.relative_path))continue;let a=_(i.symbol),l=w(i.symbol),u=i.display_name??l,p=[a,l,u].filter(g=>g.trim().length>0),m=Math.min(...p.map(g=>ie(K(g),o))),y=s.get(a);(!y||m<y.distance)&&s.set(a,{shortName:a,distance:m})}return[...s.values()].sort((i,a)=>i.distance-a.distance||i.shortName.localeCompare(a.shortName)).slice(0,t).map(i=>i.shortName)}function K(e){return Q(e).toLowerCase().replace(/[^a-z0-9_]+/g,"")}function ie(e,n){if(e===n)return 0;if(e.length===0)return n.length;if(n.length===0)return e.length;let t=Array.from({length:n.length+1},(o,r)=>r);for(let o=0;o<e.length;o++){let r=[o+1];for(let s=0;s<n.length;s++){let i=e[o]===n[s]?0:1;r[s+1]=Math.min(r[s]+1,t[s+1]+1,t[s]+i)}t=r}return t[n.length]}export{he as a,G as b,be as c,Se as d,ge as e};
3
- //# sourceMappingURL=chunk-EELPBR7E.js.map
3
+ //# sourceMappingURL=chunk-2USA3S3P.js.map
@@ -0,0 +1,133 @@
1
+ import{a as be}from"./chunk-YXPUP5G2.js";import{b as z,c as on,d as an,e as we,g as ut}from"./chunk-BL6DCHQP.js";import{b as Yt,c as U,d as xe,f as Zt,g as en,h as tn,i as nn,j as rn,k as sn,q as de}from"./chunk-ATXPTSEI.js";import{a as Gt,c as N,d as ue,e as Xt,f as pe}from"./chunk-IW5XQG5G.js";import{a as at,b as ct,e as lt}from"./chunk-HGFDYOVB.js";import{$ as Re,aa as ve,o as b}from"./chunk-7HXT6YLU.js";import{h as De}from"./chunk-7F45LJKI.js";var Ae=null;function Ne(e){Ae?.(e)}function pc(e,t){let n=Ae;Ae=e;try{return t()}finally{Ae=n}}var Or=N("source-text",{clearGroups:["whole-project","source-file"]}),Mr=N("source-lines",{clearGroups:["whole-project","source-file"]});function _(e,t){let n=t.replace(/\\/g,"/");return Ne(n),Or.get(e,n,()=>$r(e,n))}function $r(e,t){let n=t.replace(/\\/g,"/");Ne(n);try{return Re(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(r){if(ve(r))return"";throw r}}function yc(e){if(e.length===0)return[];let t=e.split(`
2
+ `);return e.endsWith(`
3
+ `)&&t.pop(),t}function pt(e,t){let n=t.replace(/\\/g,"/");return Mr.get(e,n,()=>{let r=_(e,n);return r?r.split(`
4
+ `):[]})}var Br=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function Vr(e){let t=Br.exec(e);return t?t[1]??"":null}function hc(e,t,n){return Wr(e,t,n).length>0}function Wr(e,t,n){if(n<=0)return[];let r=pt(e,t);if(r.length===0)return[];let i=[];for(let s=n-1;s>=0&&s>=n-5;s-=1){let o=(r[s]??"").trim();if(o==="")continue;let a=Vr(o);if(a!==null){i.push(a);continue}if(!o.startsWith("//")&&!o.startsWith("*")&&!o.startsWith("/*")&&!o.startsWith("@")&&!o.startsWith("#"))return i}return i}import{extname as cn}from"path";var Ur={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb",".clj":"clojure",".cljs":"clojure",".cljc":"clojure"};function H(e){return Ur[cn(e).toLowerCase()]??null}function q(e){return cn(e).toLowerCase()===".vue"}var zr=[S("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),S("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),S("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),S("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),S("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),S("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),S("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),S("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),S("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),S("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),S("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),S("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),S("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),S("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),S("runtime-boundary-http-roles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/http-summaries.ts"}),S("runtime-boundary-source-hashes",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),S("runtime-boundary-direct-extraction",{dependsOn:["content-hash","direct-deps-digest","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),_e("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),_e("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),_e("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),_e("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"}),_e("typescript-hierarchy-targets",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","definitionSet","projectFingerprint","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/typescript/ts-morph-provider.ts"})];function Y(e){let t=new Map;return{kind:e.kind,read(n,r,i){let s=!1,o=0,a;if(at()){let c=xe(n);if(c){let l=`${c}\0${r}\0${i}`;a=t.get(l),a||(a=ct(["evidence-product-file-read-v1",e.kind,c,r,i]),t.set(l,a))}}return lt("evidence-product.file.read",()=>{let c=Zt(n,e.kind,r,i);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return s=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:s,payloadBytes:o}))},has(n,r,i){return en(n,e.kind,r,i)},write(n,r,i,s){tn(n,e.kind,r,i,e.serialize(s))},writeBatch(n,r){nn(n,r.map(i=>({kind:e.kind,relativePath:i.relativePath,contentHash:i.contentHash,payload:e.serialize(i.value)})))}}}function Ec(e){let t=new Map;return{kind:e.kind,read(n,r,i){let s=!1,o=0,a;if(at()){let c=`${i}\0${r}`;a=t.get(c),a||(a=ct(["evidence-product-project-read-v1",e.kind,i,r]),t.set(c,a))}return lt("evidence-product.project.read",()=>{let c=rn(n,e.kind,r,i);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return s=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:s,payloadBytes:o}))},write(n,r,i,s){sn(n,e.kind,r,i,e.serialize(s))}}}function Z(e){let t=zr.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function S(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function _e(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}import{createRequire as Jr}from"module";import{setFlagsFromString as ln}from"v8";import{runInNewContext as Hr}from"vm";var ee;function qr(){if(ee!==void 0)return ee;let e=globalThis.gc;if(typeof e=="function")return ee=e,ee;try{ln("--expose_gc");let t=Hr("gc");ln("--no-expose_gc"),ee=typeof t=="function"?t:null}catch{ee=null}return ee}function Kr(){let e=qr();return e?(e(),!0):!1}var Qr=512*1024*1024,dt=0;function un(e,t=Kr){!Number.isFinite(e)||e<=0||(dt+=e,!(dt<Qr)&&(dt=0,t()))}var I=Jr(import.meta.url),je=null,pn=!1;function Gr(){if(pn)return null;if(je)return je;try{return je=I("tree-sitter"),je}catch{return pn=!0,null}}var dn=new Map,Oe=new Set;function Xr(e){if(Oe.has(e))return null;let t=dn.get(e);if(t)return t;let n;try{switch(e){case"rust":n=I("tree-sitter-rust");break;case"typescript":n=I("tree-sitter-typescript").typescript;break;case"tsx":n=I("tree-sitter-typescript").tsx;break;case"javascript":n=I("tree-sitter-javascript");break;case"python":n=I("tree-sitter-python");break;case"java":n=I("tree-sitter-java");break;case"kotlin":n=I("tree-sitter-kotlin");break;case"scala":n=I("tree-sitter-scala");break;case"ruby":n=I("tree-sitter-ruby");break;case"c":n=I("tree-sitter-c");break;case"cpp":n=I("tree-sitter-cpp");break;case"csharp":n=I("tree-sitter-c-sharp");break;case"php":n=I("tree-sitter-php").php;break;case"vb":{let r=I("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return Oe.add(e),null}}catch{return Oe.add(e),null}return dn.set(e,n),n}var fn=new Map;function Yr(e){let t=fn.get(e);if(t)return t;let n=Xr(e);if(!n)return null;let r=Gr();if(!r)return null;let i=new r;try{i.setLanguage(n)}catch{return Oe.add(e),null}return fn.set(e,i),i}function Zr(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}var ei=24;function Ie(e,t){let n=Yr(e);if(!n)return null;try{let r=Zr(n,t);return un(t.length*ei),r}catch{return null}}import{createRequire as ti}from"module";import{posix as ft}from"path";var Oc=Xt("vue-sfc-units"),ni=ti(import.meta.url),ri;function ii(){return ri??=ni("@vue/compiler-sfc")}function si(...e){return ii().parse(...e)}function oi(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function ai(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function yn(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let i;try{i=si(n,{filename:t})}catch(o){return r.errors.push(gn(o)),r}r.errors.push(...i.errors.map(gn));let{descriptor:s}=i;return s.template&&(r.template=Me(e,t,"template",s.template)),s.script&&r.scripts.push(mn(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push(mn(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(o=>Me(e,t,"style",o)),r.customBlocks=s.customBlocks.map(o=>Me(e,t,"custom",o)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(o=>o?.errors??[])),r}function mn(e,t,n,r){let i=Me(e,t,"script",n);return{...i,kind:"script",setup:r,astLanguage:ai(i.lang)}}function Me(e,t,n,r){let i=li(r.attrs),s=typeof i.lang=="string"?i.lang:null,o=typeof i.src=="string"?i.src:typeof r.src=="string"?r.src:void 0;if(o){let c=ci(t,o);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:o,attrs:i,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${o}`]};let l=_(e,c),u=l?Math.max(0,l.split(`
5
+ `).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:o,attrs:i,lang:s,body:l,startLine:0,endLine:u,errors:l?[]:[`Vue ${n} block source not found: ${c}`]}}let a=Math.max(0,r.loc.start.line-1);return{kind:n,ownerPath:t,sourcePath:t,external:!1,attrs:i,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function ci(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=oi(ft.normalize(ft.join(ft.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function li(e){return{...e}}function gn(e){return e instanceof Error?e.message:String(e)}function Ce(e,t,n){let i=yn(e,t,n).scripts.filter(o=>o.astLanguage&&o.body.length>0),s=i[0]?.astLanguage;return s?{body:i.map(o=>`${`
6
+ `.repeat(o.startLine)}${o.body}`).join(`
7
+ `),startLine:0,language:s}:null}var $e=pe("ast-trees",{clearGroups:["whole-project","source-file"]});function O(e,t){if(q(t))return ui(e,t);let n=H(t);if(!n)return null;let r=_(e,t);return r?$e.get(e,t,r,()=>Ie(n,r)):null}function Be(e,t,n){if(q(t))return $e.get(e,t,n,()=>{let i=Ce(e,t,n);return i?Ie(i.language,`
8
+ `.repeat(i.startLine)+i.body):null});let r=H(t);return r?$e.get(e,t,n,()=>Ie(r,n)):null}function ui(e,t){let n=_(e,t);return n?$e.get(e,t,n,()=>{let r=Ce(e,t,n);if(!r)return null;let i=`
9
+ `.repeat(r.startLine)+r.body;return Ie(r.language,i)}):null}var pi=new Set(["if_statement","conditional_expression","ternary_expression","for_statement","for_in_statement","for_of_statement","while_statement","do_statement","switch_case","case_statement","catch_clause","except_clause","elif_clause","match_arm"]);function hn(e){return pi.has(e.type)?1:e.type==="binary_expression"&&e.parent?.type!=="binary_expression"&&(e.text.includes("&&")||e.text.includes("||"))?di(e.text):0}function di(e){return(e.match(/&&|\|\|/g)??[]).length}function Ee(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var Cn=["function_declaration","generator_function_declaration","method_definition","method_signature","function_signature"],fi=new Set(Cn),mi=[...Cn,"variable_declarator","public_field_definition"],gi=["function_item","function_signature_item"],yi=["function_definition"],hi=[],Sn=new Set(["arrow_function","function_expression","generator_function"]);function En(e){return e==="rust"?gi:e==="python"?yi:e==="typescript"||e==="tsx"||e==="javascript"?mi:hi}function Ve(e,t){let n=xi(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:_n(n.functionNode),params:xn(n.functionNode),paramsEndLine:bn(n.functionNode),isLiteralPassthrough:In(n.functionNode,t),branches:0};if(!Si(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(i=>i.type==="identifier"||i.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:_n(e),params:xn(e),paramsEndLine:bn(e),isLiteralPassthrough:In(e,t),branches:0}:null}function kn(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function xn(e){let t=kn(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(Ee(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let i=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),s=r.childForFieldName("pattern");if(!i&&s&&s.type==="identifier"){n.push({name:s.text,simple:!0});continue}let o=r.namedChildren.find(a=>a.type==="identifier");n.push({name:s?.type==="identifier"?s.text:o?.text??"",simple:!1})}return n}function bn(e){let t=kn(e);return t?t.endPosition.row:e.startPosition.row}function Si(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?fi.has(e):!1}function xi(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let i=Nn(r);return i?{name:n.text,definitionNode:e,functionNode:i}:null}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let i=Nn(r);return i?{name:n.text,definitionNode:e,functionNode:i}:null}return null}function Nn(e){if(Sn.has(e.type))return e;if(e.type!=="call_expression"||(e.childForFieldName("function")??e.namedChild(0))?.type!=="call_expression")return null;let r=((e.childForFieldName("arguments")??e.namedChildren.find(i=>i.type==="arguments"))?.namedChildren??[]).filter(i=>Sn.has(i.type));return r.length===1?r[0]:null}function _n(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return 0;let n=0;for(let r of t.namedChildren)Ee(r)||(n+=1);return n}function In(e,t){let n=e.namedChildren.find(d=>d.type==="block"||d.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(d=>!Ee(d));if(r.length!==1)return!1;let i=r[0],s=null;if(i.type==="return_statement"||i.type==="expression_statement"?s=i.namedChild(0)??null:t==="rust"&&(i.type==="call_expression"||i.type==="macro_invocation")&&(s=i),!s)return!1;let o=t==="python"?"call":"call_expression";if(s.type!==o)return!1;let a=s.childForFieldName("function")??s.namedChild(0);if(a&&(a.type===o||a.type==="call_expression"))return!1;let c=s.namedChildren.find(d=>d.type==="arguments"||d.type==="argument_list");if(!c)return!1;let l=c.namedChildren.filter(d=>!Ee(d)),u=e.namedChildren.find(d=>d.type==="parameters"||d.type==="formal_parameters");if(!u)return!1;let p=[];for(let d of u.namedChildren){if(d.type==="identifier"){p.push(d.text);continue}let f=d.namedChildren.find(m=>m.type==="identifier");f&&p.push(f.text)}if(l.length!==p.length)return!1;for(let d=0;d<p.length;d+=1){let f=l[d];if(f.type!=="identifier"||f.text!==p[d])return!1}return!0}function Gc(e,t){return e.filter(n=>n.startLine<=t&&n.endLine>=t).sort((n,r)=>n.endLine-n.startLine-(r.endLine-r.startLine)||n.startLine-r.startLine)[0]??null}function Tn(e,t){let n=_i(e,t);if(!n)return null;let r=te(n);if(!r)return null;let i=Ei(n);return{kind:bi(e),calleeLeaf:r,calleeQualifier:i?Ni(n):void 0,calleeText:n.text,memberAccess:i,line:e.startPosition.row}}function bi(e){return Ln.has(e.type)?"jsx-render":e.type==="new_expression"?"new":"call"}var Ln=new Set(["jsx_opening_element","jsx_self_closing_element"]);function Ni(e){return(e.childForFieldName("object")??e.childForFieldName("value")??e.namedChild(0)??void 0)?.text||void 0}function _i(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return Pn(e.childForFieldName("function")??e.namedChild(0));if(e.type==="new_expression")return Pn(e.childForFieldName("constructor")??e.namedChild(0));if(Ln.has(e.type))return Ci(e)}return null}var Ii=new Set(["await_expression","parenthesized_expression","non_null_expression","as_expression","satisfies_expression"]);function Pn(e){let t=e;for(;t&&Ii.has(t.type);){let n=t.namedChild(0);if(!n)return t;t=n}return t}function Ci(e){let t=e.childForFieldName("name")??e.namedChild(0);return t&&(t.type==="member_expression"||t.type==="nested_identifier"||(t.type==="identifier"||t.type==="jsx_identifier")&&/^[A-Z]/.test(t.text))?t:null}function Ei(e){switch(e.type){case"field_expression":case"member_expression":case"nested_identifier":case"attribute":return!0;default:return!1}}function te(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"private_property_identifier":case"shorthand_property_identifier":return e.text.replace(/^#/u,"");case"field_expression":case"member_expression":case"nested_identifier":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?te(t):null}case"jsx_identifier":return e.text;case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?te(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?te(t):null}case"super":case"self":case"this":return null;default:return null}}var ki=new Set(["identifier","type_identifier","field_identifier"]),Pi=new Set(["identifier"]),Ti=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),Li=new Set(["rust","python"]),Fi=/\{([^{}]*)\}/g,Di=/\b([A-Za-z_][\w]*)\b/g;function Fn(e,t){return Ri(t).has(e.type)}function Dn(e,t){return Li.has(t)&&e.type==="string_content"}function mt(e){let t=0;for(let r of e.values()){let i=r[r.length-1];i!==void 0&&i>t&&(t=i)}let n=new Array(t+1);for(let r=0;r<=t;r+=1)n[r]=new Set;for(let[r,i]of e)for(let s of i)n[s].add(r);return n}function Ri(e){return e==="rust"?ki:e==="python"?Pi:Ti}function Rn(e,t){let n=e.startPosition.row;for(let r of e.text.matchAll(Fi)){let i=r[1]??"";for(let s of i.matchAll(Di))s[1]&&t(s[1],n)}}var vi=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],wi=/^#!?\[\s*serde\s*\(/,Ai=/^#!?\[\s*schemars\s*\(/,ji=/^#!?\[\s*validate\s*\(/,Oi=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function vn(e,t,n){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let r=e.childForFieldName("function")??e.namedChild(0);if(!r)return;let i=te(r);if(!i||!Oi.has(i))return;let s=e.namedChildren.find(c=>c.type==="arguments");if(!s)return;let o=s.namedChild(0);if(!o||o.type!=="string")return;let a=o.namedChildren.find(c=>c.type==="string_fragment");a&&n.add(a.text)}function wn(e,t){let n=wi.test(e),r=Ai.test(e),i=ji.test(e);if(!(!n&&!r&&!i))for(let s of vi){s.lastIndex=0;let o;for(;(o=s.exec(e))!==null;){let a=o[1],c=a.split("::").pop()??a;c==="is_none"&&/\bOption\b/.test(a)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(a)||c&&t.add(c)}}}function An(e,t){let n=new Map,r=(o,a)=>{if(o===a)return;let c=n.get(o);c||(c=new Set,n.set(o,c)),c.add(a)},i=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),s=(o,a)=>{let c=l=>{i.has(l.type)&&l.text!==a&&r(l.text,a);for(let u of l.children)c(u)};for(let l of o.children)c(l)};if(t==="rust")for(let o of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let a=o.namedChildren.find(l=>l.type==="type_identifier")?.text;if(!a)continue;let c=o.namedChildren.find(l=>l.type==="field_declaration_list"||l.type==="enum_variant_list"||l.type==="ordered_field_declaration_list");c&&s(c,a),o.type==="type_item"&&s(o,a)}else if(t==="python")for(let o of e.rootNode.descendantsOfType("class_definition")){let a=o.namedChildren.find(u=>u.type==="identifier")?.text;if(!a)continue;let c=o.childForFieldName("superclasses");c&&s(c,a);let l=o.namedChildren.find(u=>u.type==="block");if(l)for(let u of l.descendantsOfType("type"))for(let p of u.descendantsOfType("identifier"))p.text!==a&&r(p.text,a)}else for(let o of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let a=o.namedChildren.find(c=>c.type==="type_identifier")?.text;a&&s(o,a)}return n}var Mi=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),gt=new Set(["catch","comment","def","defprotocol","defrecord","deftype","defmethod","defmacro","defmacro-","defn","defn-","do","doseq","dotimes","fn","for","if","let","loop","ns","quote","recur","throw","try","extend-protocol","extend-type","when","when-let","when-not"]);function jn(e){let t=[],n=[],r=[],i=new Map,s=[],o=0,a=0,c=(l,u)=>{let p=i.get(l);if(!p){i.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)};for(;a<e.length;){let l=e[a];if(l===`
10
+ `){o+=1,a+=1;continue}if(/\s|,/.test(l)){a+=1;continue}if(l===";"){a=Ue(e,a);continue}if(l==='"'){let m=Pe(e,a,o);o=m.line,a=m.index;continue}if(l==="("||l==="["||l==="{"){s.push({kind:l,startLine:o,endLine:o,headTokens:[],tokens:[],children:[]}),a+=1;continue}if(l===")"||l==="]"||l==="}"){let m=s.pop();m&&(m.endLine=o,$i(m,{callables:t,callSites:n,clojureMembers:r,recordIdentifier:c}),s[s.length-1]?.children.push(m)),a+=1;continue}if(yt(l)){a+=1;continue}let u=o,p=a;for(;a<e.length&&!ht(e[a]);)a+=1;let d=e.slice(p,a);if(!d)continue;let f={text:d,line:u};Bi(s[s.length-1],f),c(L(d),u)}return{language:"clojure",callables:t,callSites:n,clojureMembers:r,typeContainerMap:new Map,identifierLineMap:i,identifiersByLine:Hi(i),fileIdentifiers:new Set(i.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function $i(e,t){if(e.kind!=="("||e.headTokens.length===0)return;let n=e.headTokens[0],r=L(n.text),i=Mi.get(n.text);if(i){let o=e.headTokens[1];if(o){let a=L(o.text);t.recordIdentifier(a,o.line),t.callables.push({name:a,startLine:e.startLine,endLine:e.endLine,paramCount:0,params:[],paramsEndLine:o.line,isLiteralPassthrough:!1,clojureKind:i})}}if(Vi(e,t),!r||gt.has(n.text)||gt.has(r)||r.startsWith(":"))return;let s=zi(n.text);t.callSites.push({calleeLeaf:s.leaf,calleeQualifier:s.qualifier,calleeText:s.text,memberAccess:!1,line:n.line})}function Bi(e,t){e&&(e.headTokens.length<2&&e.headTokens.push(t),e.tokens.length<200&&e.tokens.push(t))}function Vi(e,t){let n=L(e.tokens[0]?.text??"");if(n==="defprotocol"){let r=L(e.tokens[1]?.text??"");if(!r)return;for(let i of We(e))ke(t,r,"protocol",i,"protocol-method");return}if(n==="defrecord"||n==="deftype"){let r=L(e.tokens[1]?.text??"");if(!r)return;let i=n==="defrecord"?"record":"type",s=n==="defrecord"?"record-method":"type-method";for(let o of We(e))ke(t,r,i,o,s);return}if(n==="extend-type"){let r=L(e.tokens[1]?.text??"");if(!r)return;for(let i of We(e))ke(t,r,"extension",i,"extension-method");return}if(n==="extend-protocol"){let r=L(e.tokens[1]?.text??"");for(let i of We(e)){r&&ke(t,r,"extension",i,"extension-method");let s=Ui(e,i.startLine);s&&s!==r&&ke(t,s,"extension",i,"extension-method")}}}function We(e){return e.children.filter(Wi)}function Wi(e){if(e.kind!=="(")return!1;let t=L(e.tokens[0]?.text??"");return!!(t&&!gt.has(t)&&!t.startsWith(":"))}function ke(e,t,n,r,i){let s=r.tokens[0],o=L(s?.text??"");!s||!o||(e.recordIdentifier(o,s.line),e.clojureMembers.push({ownerName:t,ownerKind:n,memberName:o,memberKind:i,startLine:r.startLine,endLine:r.endLine}))}function Ui(e,t){let n=null;for(let r=2;r<e.tokens.length;r+=1){let i=e.tokens[r];if(i.line>t)break;let s=L(i.text);s&&!s.startsWith(":")&&(n=s)}return n}function L(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function zi(e){let t=e.replace(/^#?['`~@]+/,""),n=t.lastIndexOf("/"),r=L(t);if(n<=0)return{leaf:r,text:t};let i=t.slice(0,n);return{leaf:r,qualifier:i,text:t}}function Ue(e,t){let n=t;for(;n<e.length&&e[n]!==`
11
+ `;)n+=1;return n}function Pe(e,t,n){let r=t+1,i=n;for(;r<e.length;){let s=e[r];if(s==="\\"){r+=2;continue}if(s===`
12
+ `&&(i+=1),r+=1,s==='"')break}return{index:r,line:i}}function yt(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function ht(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function Hi(e){let t=[];for(let[n,r]of e)for(let i of r)t[i]??=new Set,t[i].add(n);return t}var On=9,Ki=pe("source-facts",{clearGroups:["whole-project","source-file"]}),St=Y({kind:"source-facts",invalidation:Z("source-facts"),serialize:Gi,deserialize:Xi});function fe(e,t){return xt(e,t).facts}function xt(e,t){let n=_(e,t);if(!n)return{facts:null};let r=Qi(e,t,n);return r?Ki.get(e,t,n,()=>Ji(e,t,r,n)):{facts:null}}function Qi(e,t,n){return q(t)?Ce(e,t,n)?.language??null:H(t)}function Ji(e,t,n,r){let i=U(e,t,r),s=St.read(e,t,i);if(s&&s.language===n)return{facts:s};if(n==="clojure"){let c=jn(r);return St.write(e,t,i,c),{facts:c}}let o=O(e,t);if(!o)return{facts:null,unavailable:{language:n,reason:"parser-unavailable"}};let a=Yi(o,n);return St.write(e,t,i,a),{facts:a}}function Gi(e){let t={version:On,language:e.language,callables:e.callables,callSites:e.callSites,clojureMembers:e.clojureMembers,typeContainerMap:[...e.typeContainerMap.entries()].map(([n,r])=>[n,[...r]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function Xi(e){try{let t=JSON.parse(e);if(t.version!==On||t.language==="clojure"&&(t.clojureMembers===void 0||t.callSites.some(r=>r.calleeText===void 0)))return null;let n=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,clojureMembers:t.clojureMembers??[],typeContainerMap:new Map(t.typeContainerMap.map(([r,i])=>[r,new Set(i)])),identifierLineMap:n,identifiersByLine:mt(n),fileIdentifiers:new Set(n.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function Yi(e,t){let n=[],r=[],i=new Set,s=new Set,o=new Map,a=(u,p)=>{let d=o.get(u);if(!d){o.set(u,[p]);return}d[d.length-1]!==p&&d.push(p)},c=[],l=u=>{let p=Ve(u,t);p&&(p.branches=0,n.push(p),c.push(p));let d=hn(u);if(d>0)for(let m of c)m.branches=(m.branches??0)+d;let f=Tn(u,t);f&&r.push(f),vn(u,t,s),t==="rust"&&(u.type==="attribute_item"||u.type==="inner_attribute_item")&&wn(u.text,i),Fn(u,t)&&a(u.text,u.startPosition.row),Dn(u,t)&&Rn(u,a);for(let m of u.children)l(m);p&&c.pop()};return l(e.rootNode),{language:t,callables:n,callSites:r,clojureMembers:[],typeContainerMap:An(e,t),identifierLineMap:o,identifiersByLine:mt(o),fileIdentifiers:new Set(o.keys()),rustAttrReferencedNames:i,crossLanguageDispatchNames:s}}var Mn=new WeakMap,$n=new Set(["call_expression","call","decorator","pair","string","string_literal","template_string","variable_declarator"]);function Zi(e,t){let n=Array.isArray(t)?t:[t];if(!n.every(s=>$n.has(s)))return e.descendantsOfType(t);let r=es(e);return n.length===1?r.get(n[0])??[]:n.flatMap(s=>r.get(s)??[]).sort((s,o)=>s.startIndex-o.startIndex)}function bt(e,t){let n=e.walk(),r=0,i=!1;for(;!i;){if(t(n),n.gotoFirstChild()){r+=1;continue}for(;;){if(r===0){i=!0;break}if(n.gotoNextSibling())break;n.gotoParent(),r-=1}}}function es(e){let t=Mn.get(e);if(t)return t;let n=new Map;return bt(e,r=>{let i=r.nodeType;if(!$n.has(i))return;let s=n.get(i);s?s.push(r.currentNode):n.set(i,[r.currentNode])}),Mn.set(e,n),n}function Vn(e,t){t(e);for(let n of e.namedChildren)Vn(n,t)}var ts=/(?:function|method|lambda)/u,Bn=new WeakMap;function ns(e){let t=Bn.get(e);if(t)return t;let n=[];return bt(e,r=>{if(!r.nodeIsNamed)return;let i=r.nodeType;(i==="arrow_function"||ts.test(i))&&n.push(r.currentNode)}),Bn.set(e,n),n}function rs(e,t,n){let r=null;for(let i of ns(e))i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i);return r}function Wn(e,t,n){if(e.startPosition.row>t||e.endPosition.row<n)return null;for(let r of e.namedChildren){let i=Wn(r,t,n);if(i)return i}return e}function is(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function Nt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?Nt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function ss(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(Nt)??[]}var Un=new Set(["rust","typescript","tsx","javascript","python","clojure"]),os=new Set(["rust","typescript","tsx","javascript","python"]);function _t(e,t){let n=fe(e,t);return!n||!Un.has(n.language)?null:n.callables.map(r=>({name:r.name,startLine:r.startLine,endLine:r.endLine}))}function as(e,t){if(!os.has(t))return null;let n=[];for(let r of e.descendantsOfType([...En(t)])){let i=Ve(r,t);i&&n.push({name:i.name,startLine:i.startLine,endLine:i.endLine})}return n}function cs(e,t){let n=fe(e,t);return!n||!Un.has(n.language)?null:n.callSites}function zn(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}import{createRequire as xs}from"module";import{existsSync as ie}from"fs";import{basename as qn,dirname as k,extname as M,join as F,relative as ne,resolve as x,sep as bs}from"path";import{existsSync as Ct,readdirSync as ls,statSync as us}from"fs";import{join as me,relative as ps}from"path";function Hn(e){let t=ds(e)??ys(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let i of t)for(let s of hs(e,i)){if(r.has(s))continue;r.add(s);let o=Ss(e,s);o&&n.push(o)}return n}function ds(e){let t=me(e,"pnpm-workspace.yaml");if(!Ct(t))return null;try{return fs(De(t,"pnpm workspace manifest"))}catch{return null}}function fs(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let i=ms(r);if(!n){/^packages\s*:\s*$/.test(i.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(i);if(s){let o=gs(s[1].trim());o&&t.push(o);continue}if(i.trim()!=="")break}return t}function ms(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function gs(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function ys(e){let t=me(e,"package.json");if(!Ct(t))return null;try{let n=JSON.parse(De(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function hs(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let o=me(e,t);return It(o)?[o]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),i=t.slice(n+1).replace(/^\//,""),s=me(e,r||".");return It(s)?ls(s).map(o=>me(s,o,i)).filter(It):[]}function It(e){try{return us(e).isDirectory()}catch{return!1}}function Ss(e,t){let n=me(t,"package.json");if(!Ct(n))return null;try{let r=JSON.parse(De(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:ps(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var Ns=ue("indexed-paths",{clearGroups:[]}),_s=ue("indexed-path-digest",{clearGroups:[]}),Is=N("tsconfig-alias-config",{clearGroups:["whole-project"]}),Cs=N("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),Es=xs(import.meta.url),Te;function ks(){if(Te!==void 0)return Te;try{Te=Es("typescript")}catch{Te=null}return Te}var Ps=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],Ts=ue("workspace-packages",{clearGroups:["whole-project"]}),re=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],ze=[".py",".pyi"],P=[".java",".scala",".kt",".kts"],He=[".rs"],qe=[".rb"],Ke=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],K=[".cs",".vb"],Qe=[".dart"],se=[".php"],ge=[".clj",".cljs",".cljc"],Ls=new Set(re),Et=new Set(ze),Kn=new Set(P),kt=new Set(He),Pt=new Set(qe),Qn=new Set(Ke),Jn=new Set(K),Tt=new Set(Qe),Gn=new Set(se),Xn=new Set(ge),Fs=[{extensions:re,lookup:Ls},{extensions:ze,lookup:Et},{extensions:P,lookup:Kn},{extensions:He,lookup:kt},{extensions:qe,lookup:Pt},{extensions:Ke,lookup:Qn},{extensions:K,lookup:Jn},{extensions:Qe,lookup:Tt},{extensions:se,lookup:Gn},{extensions:ge,lookup:Xn}];function $(e,t){return t.has(M(e).toLowerCase())}function Ds(e){return $(e,Et)}function Rs(e){return $(e,Kn)}function vs(e){return $(e,kt)}function ws(e){return $(e,Pt)}function As(e){return $(e,Qn)}function js(e){return $(e,Jn)}function Yn(e){return M(e).toLowerCase()===".vb"}function Os(e){return $(e,Tt)}function Ms(e){return $(e,Gn)}function $s(e){return $(e,Xn)}function Lt(e){let t=M(e).toLowerCase();for(let n of Fs)if(n.lookup.has(t))return n.extensions;return re}function Bs(e){return Rs(e)||js(e)||Ms(e)}function Q(e,t,n){return Ds(t)?ye(e,t,n):vs(t)?B(e,t,n):ws(t)?Je(e,t,n):As(t)?Ge(e,t,n):Bs(t)?y(e,n.replace(/\\/g,"."),Lt(t)):Os(t)?Xe(e,t,n):$s(t)?Ft(e,n):Vs(e,t,n)}function Vs(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return Ws(e,t,n)??zs(e,n);let r=k(F(e.config.projectRoot,t)),i=x(r,n),s=V(e);for(let o of Rt(i)){let a=b(ne(e.config.projectRoot,o));if(s.has(a)||ie(o))return a}return b(ne(e.config.projectRoot,i))}function Ws(e,t,n){let r=Gs(e,t);if(!r)return null;let i=V(e);for(let s of Us(r,n)){let o=x(r.baseUrl,s);for(let a of Rt(o)){let c=b(ne(e.config.projectRoot,a));if(i.has(c)||ie(a))return c}}return null}function Us(e,t){let n=[];for(let[r,i]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...i);continue}let o=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(o)||!t.endsWith(a)||t.length<o.length+a.length)continue;let c=t.slice(o.length,t.length-a.length);for(let l of i)n.push(l.includes("*")?l.replace("*",c):l)}return n}function zs(e,t){let n=qs(Hs(e),t);if(!n)return null;let r=V(e);for(let i of Ks(n)){let s=x(e.config.projectRoot,n.pkg.relativeDir,i);for(let o of Rt(s)){let a=b(ne(e.config.projectRoot,o));if(r.has(a)||ie(o))return a}}return null}function Hs(e){return Ts.get(e,()=>Hn(e.config.projectRoot))}function qs(e,t){let n=null;for(let r of e){let i=null;t===r.name?i="":t.startsWith(`${r.name}/`)&&(i=t.slice(r.name.length+1)),i!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:i})}return n}function Ks(e){let t=[],n=Qs(e.pkg.exports,e.subpath);if(n){let r=Js(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function Qs(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return Zn(e[n])}function Zn(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return null;let t=e;for(let n of["types","import","default","require","node"]){let r=Zn(t[n]);if(r)return r}return null}function Js(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function Gs(e,t){let n=b(k(t));return Cs.get(e,n,()=>Xs(e,n))}function Xs(e,t){let n=ks();if(!n)return null;let r=x(e.config.projectRoot),i=x(r,t);for(;i===r||i.startsWith(r+bs);){for(let o of Ps){let a=F(i,o);if(!ie(a))continue;let c=Is.get(e,a,()=>Ys(n,a));if(c)return c}let s=k(i);if(s===i)break;i=s}return null}function Ys(e,t){try{let n=e.readConfigFile(t,e.sys.readFile);if(n.error||!n.config)return null;let r=e.parseJsonConfigFileContent(n.config,e.sys,k(t)),i=r.options.paths;return!i||Object.keys(i).length===0?null:{baseUrl:r.options.baseUrl?x(k(t),r.options.baseUrl):k(t),paths:i}}catch{return null}}function ye(e,t,n){let r=V(e),i;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let o=s[1].length,a=s[2].replace(/^\./,""),c=k(F(e.config.projectRoot,t));for(let l=1;l<o;l++)c=k(c);i=a?x(c,a.replace(/\./g,"/")):c}else i=x(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of Zs(i)){let o=b(ne(e.config.projectRoot,s));if(r.has(o)||ie(s))return o}return null}function B(e,t,n){if(!n)return null;let r=n.replace(/\s+as\s+.+$/,"").trim();if(!r.startsWith("crate::")&&!r.startsWith("self::")&&!r.startsWith("super::"))return null;let i=k(F(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=x(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=x(i,r.slice(6).replace(/::/g,"/")):s=x(k(i),r.slice(7).replace(/::/g,"/")),Dt(e,eo(s))}function Je(e,t,n){let r=k(F(e.config.projectRoot,t)),i=x(r,n);return Dt(e,to(i))}function Ge(e,t,n){let r=k(F(e.config.projectRoot,t)),i=[x(r,n),x(e.config.projectRoot,n),x(e.config.projectRoot,"include",n),x(e.config.projectRoot,"src",n)];return Dt(e,i)}function y(e,t,n){let r=V(e),i=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=i.replace(/\./g,"/"),o=i.split(".").pop()??i;for(let c of n){let l=`${s}${c}`,u=[...r].find(p=>p.endsWith(l));if(u)return u}for(let c of n){let l=[...r].find(u=>qn(u)===`${o}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(M(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${o}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function Xe(e,t,n){let r=V(e);if(n.startsWith("package:")){let o=n.slice(8),a=o.indexOf("/");if(a<0)return null;let c=o.slice(a+1),l=b(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let i=k(F(e.config.projectRoot,t)),s=x(i,n);for(let o of no(s)){let a=b(ne(e.config.projectRoot,o));if(r.has(a)||ie(o))return a}return null}function Ft(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=V(e);for(let i of ge){let s=`${n}${i}`,o=[...r].find(a=>a.endsWith(s));if(o)return o}for(let i of ge){let s=[...r].find(o=>qn(o)===`${n.split("/").pop()}${i}`);if(s)return s}return null}function Zs(e){let t=M(e);return Et.has(t)?[e]:[`${e}.py`,`${e}.pyi`,F(e,"__init__.py"),F(e,"__init__.pyi")]}function Dt(e,t){let n=V(e);for(let r of t){let i=b(ne(e.config.projectRoot,r));if(n.has(i)||ie(r))return i}return null}function eo(e){let t=M(e);return kt.has(t)?[e]:[`${e}.rs`,F(e,"mod.rs")]}function to(e){let t=M(e);return Pt.has(t)?[e]:[`${e}.rb`,F(e,"index.rb")]}function no(e){let t=M(e);return Tt.has(t)?[e]:[`${e}.dart`,e]}function Rt(e){let t=M(e),n=new Set;if(t){n.add(e);for(let r of re)n.add(e.slice(0,-t.length)+r)}else for(let r of re)n.add(`${e}${r}`),n.add(F(e,`index${r}`));return[...n]}function V(e){return Ns.get(e,()=>new Set(be(e,{includeIgnored:!1}).map(b)))}function vt(e){return _s.get(e,()=>Yt([...V(e)].sort().join(`
13
+ `)))}function ro(e,t,n={}){let r=fe(e,t);if(!r)return[];let i=[];if(n.includeCrossLanguageDispatchNames)for(let s of r.crossLanguageDispatchNames)i.push({name:s,kind:"cross-language-dispatch",occurrences:1});if(n.includeRustAttributeNames&&r.language==="rust")for(let s of r.rustAttrReferencedNames)i.push({name:s,kind:"rust-attribute",occurrences:1});return i}import{basename as er}from"path";function A(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function io(e){return e.replace(/'''[\s\S]*?'''/g,J).replace(/"""[\s\S]*?"""/g,J).replace(/#.*$/gm,J).replace(/\/\/.*$/gm,J).replace(/\/\*[\s\S]*?\*\//g,J).replace(/`(?:\\[\s\S]|[^`])*`/g,J).replace(/'(?:\\.|[^'\\\r\n])*'/g,J).replace(/"(?:\\.|[^"\\\r\n])*"/g,J)}function J(e){return e.replace(/[^\r\n]/g," ")}var su=pe("stripped-lines",{clearGroups:["whole-project","source-file"]});Gt({name:"stripped-source-singleton",groups:["whole-project","source-file"],clearAll:()=>{Ye=null,Le=""},clearFile:()=>{Ye=null,Le=""}});var Ye=null,Le="";function so(e){return Ye===e||(Ye=e,Le=io(e)),Le}function G(e,t,n){let r=so(e);return`${r.slice(0,t)}${" ".repeat(n-t)}${r.slice(n)}`}function C(e,t){return new RegExp(`\\b${A(t)}\\b`,"m").test(e)}function he(e,t){let n=new Set,r=new RegExp(`\\b${A(t)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let i of e.matchAll(r)){let s=i[1];s&&n.add(s)}return[...n]}function wt(e){let t=0;for(let n of e)n==="("&&(t+=1),n===")"&&(t-=1);return t}var oo=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function E(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let s=e[i];(s==="{"||s==="["||s==="(")&&n++,(s==="}"||s==="]"||s===")")&&n--,s===","&&n===0&&(t.push(e.slice(r,i)),r=i+1)}return t.push(e.slice(r)),t}function T(e,t){for(let n of e.namedChildren)if(n.type===t)return n;return null}function h(e,t){let n=new Set,r=(i,s)=>{let o=s||t.has(i.type);!o&&oo.has(i.type)&&n.add(i.text);for(let a of i.children)r(a,o)};return r(e.rootNode,!1),n}function w(e,t,n,r,i,s,o){return{importedName:i,localName:s,sourcePath:o??y(e,r,Lt(t)),kind:"named",used:C(n,s),usedMembers:[]}}function g(e,t,n,r,i="named",s={}){return{importedName:e,localName:t,sourcePath:n,kind:i,used:r.has(t),usedMembers:[],isTypeOnly:s.isTypeOnly}}function W(e,t,n,r,i="named",s=[],o={}){return{importedName:e,localName:t,sourcePath:n,kind:i,used:r,usedMembers:s,isTypeOnly:o.isTypeOnly}}function oe(e,t){return{importedName:e,localName:null,sourcePath:t,kind:"side-effect",used:!0,usedMembers:[]}}function ae(e,t,n={}){return{importedName:e,localName:n.localName??null,sourcePath:t,kind:"namespace",used:n.used??!0,usedMembers:n.usedMembers??[],isTypeOnly:n.isTypeOnly}}function D(e,t,n){let r=[];for(let i of e.matchAll(t)){let s=i[0];if(!s||typeof i.index!="number")continue;let o=G(e,i.index,i.index+s.length);for(let a of n(i,o))r.push(a)}return r}function R(e,t,n,r,i){let s=Be(e,t,i);if(s){let o=n(s);if(o)return o}return r()}function Ze(e,t,n,r,i){let s=Be(e,t,i),o=H(t),a=o?n[o]:void 0;return s&&a?a(s):r()}function tr(e,t,n){return R(e,t,r=>co(e,t,r),()=>ao(e,t,n),n)}function ao(e,t,n){return D(n,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(r,i)=>{let s=r[1]?.trim();if(!s)return[];let o=er(s).replace(/\.[^.]+$/,"");return[W(s,o,Ge(e,t,s),C(i,o))]})}function co(e,t,n){let r=h(n,new Set(["preproc_include"])),i=[];for(let s of n.rootNode.descendantsOfType("preproc_include")){let o=null;for(let c of s.namedChildren){if(c.type==="system_lib_string"){o=c.text.replace(/^<|>$/g,"");break}if(c.type==="string_literal"){o=c.namedChildren.find(u=>u.type==="string_content")?.text??c.text.replace(/^"|"$/g,"");break}}if(!o)continue;let a=er(o).replace(/\.[^.]+$/,"");i.push(g(o,a,Ge(e,t,o),r))}return i}var lo=new Set([":require",":require-macros",":use"]),Ot=String.raw`A-Za-z0-9_$*+!?.<>=-`;function rr(e,t,n){let r=No(n);if(!r)return[];let i=bo(n,r.start,r.end),s=[];for(let o of r.children.slice(2)){if(o.type!=="list"||o.children.length===0)continue;let a=v(o.children[0]);if(a){if(lo.has(a)){for(let c of fo(o.children.slice(1)))s.push(...po(e,c,i));continue}if(a===":import")for(let c of go(o.children.slice(1)))s.push(c)}}return s}function uo(e){return e.type==="list"&&v(e.children[0])==="ns"}function po(e,t,n){let r=Ft(e,t.namespace),i=t.alias??t.namespace,s=ho(n,i),o=[{importedName:t.namespace,localName:i,sourcePath:r,kind:"namespace",used:t.refers.length>0||t.referAll||s.length>0||So(n,t.namespace),usedMembers:s}];t.referAll&&o.push({importedName:"*",localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]});for(let a of t.refers)o.push({importedName:a,localName:a,sourcePath:r,kind:"named",used:xo(n,a),usedMembers:[]});return o}function fo(e){return e.flatMap(t=>et(t,null))}function et(e,t){if(e.type==="atom")return e.text.startsWith(":")?[]:[{namespace:jt(t,e.text),alias:null,refers:[],referAll:!1}];if(e.type==="vector")return e.children.length>0&&v(e.children[0])===null?e.children.flatMap(n=>et(n,t)):mo(e,t);if(e.type==="list"&&e.children.length>0){let n=v(e.children[0]);return n?!n||n.startsWith(":")?[]:e.children.slice(1).flatMap(r=>et(r,jt(t,n))):e.children.flatMap(r=>et(r,t))}return[]}function mo(e,t){let n=v(e.children[0]);if(!n||n.startsWith(":"))return[];let r={namespace:jt(t,n),alias:null,refers:[],referAll:!1};for(let i=1;i<e.children.length;i+=1){let s=v(e.children[i]);if(!s?.startsWith(":"))continue;let o=e.children[i+1];if((s===":as"||s===":as-alias")&&o){r.alias=v(o),i+=1;continue}s===":refer"&&o&&(v(o)===":all"?r.referAll=!0:(o.type==="vector"||o.type==="list")&&r.refers.push(...o.children.map(v).filter(yo)),i+=1)}return[r]}function go(e){let t=[];for(let n of e){if(n.type==="atom"){let i=n.text.split(".").pop()??n.text;t.push(W(i,i,null,!0));continue}if(n.type!=="vector")continue;let r=v(n.children[0]);if(r)for(let i of n.children.slice(1)){let s=v(i);s&&t.push(W(`${r}.${s}`,s,null,!0))}}return t}function jt(e,t){return e?`${e}.${t}`:t}function v(e){return e?.type==="atom"?e.text:null}function yo(e){return!!(e&&!e.startsWith(":"))}function ho(e,t){let n=new Set,r=new RegExp(`${Mt()}${A(t)}\\s*/\\s*([${Ot}]+)`,"g");for(let i of e.matchAll(r)){let s=i[1];s&&n.add(s)}return[...n]}function So(e,t){return new RegExp(`${Mt()}${A(t)}\\s*/`,"m").test(e)}function xo(e,t){return new RegExp(`${Mt()}${A(t)}(?![${Ot}])`,"m").test(e)}function Mt(){return`(?<![${Ot}])`}function bo(e,t,n){let r="",i=0;for(;i<e.length;){if(i>=t&&i<n){r+=e[i]===`
14
+ `?`
15
+ `:" ",i+=1;continue}let s=e[i];if(s===";"){let o=Ue(e,i);r+=nr(e.slice(i,o)),i=o;continue}if(s==='"'){let o=Pe(e,i,0).index;r+=nr(e.slice(i,o)),i=o;continue}r+=s,i+=1}return r}function No(e){let t=0;for(;t<e.length&&(t=$t(e,t),!(t>=e.length));){let n=tt(e,t);if(!n){t+=1;continue}if(uo(n.form))return n.form;t=n.index}return null}function tt(e,t){let n=$t(e,t);if(e.startsWith("#?@",n)||e.startsWith("#?",n))return _o(e,n);if(e.startsWith("#_",n)){let i=tt(e,n+2);return i?{form:{type:"atom",text:"",start:n,end:i.index},index:i.index}:null}for(;yt(e[n]);)n+=1;let r=e[n];return r?r==="("?At(e,n,"list",")"):r==="["?At(e,n,"vector","]"):r==="{"?At(e,n,"map","}"):r==='"'?{form:{type:"atom",text:"",start:n,end:Pe(e,n,0).index},index:Pe(e,n,0).index}:Co(e,n):null}function _o(e,t){let n=e.startsWith("#?@",t)?3:2,r=tt(e,t+n);return r?{form:{type:"list",children:r.form.type==="list"||r.form.type==="vector"||r.form.type==="map"?Io(r.form.children):[],start:t,end:r.index},index:r.index}:null}function Io(e){let t=[];for(let n=0;n<e.length;n+=2){let r=v(e[n]),i=e[n+1];r?.startsWith(":")&&i&&t.push(i)}return t}function At(e,t,n,r){let i=[],s=t+1;for(;s<e.length;){if(s=$t(e,s),e[s]===r)return{form:{type:n,children:i,start:t,end:s+1},index:s+1};let o=tt(e,s);if(!o){s+=1;continue}o.form.type==="atom"&&o.form.text===""||i.push(o.form),s=o.index}return{form:{type:n,children:i,start:t,end:e.length},index:e.length}}function Co(e,t){let n=t;for(;n<e.length&&!ht(e[n]);)n+=1;return{form:{type:"atom",text:e.slice(t,n),start:t,end:n},index:n}}function $t(e,t){let n=t;for(;n<e.length;){let r=e[n];if(/\s|,/.test(r)){n+=1;continue}if(r===";"){n=Ue(e,n);continue}break}return n}function nr(e){return e.replace(/[^\r\n]/g," ")}function ir(e,t,n){let r=[];for(let i of n.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let s=i[1]?.trim(),o=i[2]?.trim()??null,a=i[0];if(!s||!a||typeof i.index!="number")continue;let c=G(n,i.index,i.index+a.length);r.push({importedName:s,localName:o,sourcePath:Xe(e,t,s),kind:o?"namespace":"side-effect",used:o?C(c,o):!0,usedMembers:o?he(c,o):[]})}return r}function sr(e,t,n){let r=[];for(let i of n.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let s=i[1]?.trim();s&&r.push({specifier:s,sourcePath:Xe(e,t,s)})}return r}function or(e,t,n){return Ze(e,t,{csharp:r=>ko(e,t,r),vb:r=>Eo(e,t,r)},()=>{let r=Yn(t)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return D(n,r,(i,s)=>{let o=i[1]?.trim();if(!o)return[];let[a,c]=o.split(/\s*=\s*/),l=!!c,u=(l?c:a)?.trim()??o,p=u.split(".").pop()??u,d=l?a?.trim()??p:p;return[w(e,t,s,u,p,d,y(e,u,K))]})},n)}function Eo(e,t,n){let r=h(n,new Set(["imports_statement"])),i=[];for(let s of n.rootNode.descendantsOfType("imports_statement")){let o=s.namedChildren.filter(d=>d.type==="namespace_name");if(o.length===0)continue;let a=o[o.length-1],c=o.length>1?o[0]:null,l=a.text,u=l.split(".").pop()??l,p=c?.text??u;i.push(g(u,p,y(e,l,K),r,c?"namespace":"named"))}return i}function ko(e,t,n){let r=h(n,new Set(["using_directive"])),i=[];for(let s of n.rootNode.descendantsOfType("using_directive")){let o=s.namedChildren;if(o.length===0)continue;let a=null,c;o.length>=2&&o[0].type==="identifier"&&(o[1].type==="qualified_name"||o[1].type==="identifier")?(a=o[0],c=o[1]):c=o[o.length-1];let l=c.text,u=l.split(".").pop()??l,p=a?.text??u;i.push(g(u,p,y(e,l,K),r,a?"namespace":"named"))}return i}var Po=N("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function ar(e,t){return Po.get(e,t,()=>{let n=new Set,r=_(e,t);if(!r)return n;let s=r.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,o=>o.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,o=>o.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,o=>o.replace(/[^\r\n]/g," "));for(let o of s.matchAll(/[A-Za-z_$][\w$]*/g))n.add(o[0]);return n})}function Bt(e,t,n){return R(e,t,r=>Lo(e,t,r),()=>To(e,t,n),n)}function To(e,t,n){return Bo(n).flatMap(r=>Vo(e,t,r.clause,r.specifier,r.start,r.end,n))}function Lo(e,t,n){let r=Fo(e,t,n),i=[];for(let s of n.rootNode.descendantsOfType("import_statement"))i.push(...Do(e,t,n,s,r));return i}function Fo(e,t,n){let r=h(n,new Set(["import_statement"]));if(q(t))for(let i of ar(e,t))r.add(i);return r}function Do(e,t,n,r,i){let s=jo(r);if(!s)return[];let o=Q(e,t,s),a=T(r,"import_clause");return a?Ro(n,a,o,i,Oo(r.text)):[oe("*",o)]}function Ro(e,t,n,r,i){let s=[];for(let o of t.namedChildren)if(o.type==="identifier")s.push(vo(o.text,n,r,i));else if(o.type==="namespace_import"){let a=wo(e,o,n,r,i);a&&s.push(a)}else o.type==="named_imports"&&s.push(...Ao(o,n,r,i));return s}function vo(e,t,n,r){return g("default",e,t,n,"default",{isTypeOnly:r})}function wo(e,t,n,r,i){let o=T(t,"identifier")?.text??"";if(!o)return null;let a=$o(e,o);return ae("*",n,{localName:o,usedMembers:a,isTypeOnly:i,used:a.length>0||r.has(o)})}function Ao(e,t,n,r){let i=[];for(let s of e.namedChildren){if(s.type!=="import_specifier")continue;let o=s.namedChild(0),a=s.namedChild(1);if(!o)continue;let c=o.text,l=a?.text??c;i.push(g(c,l,t,n,"named",{isTypeOnly:r||Mo(s.text)}))}return i}function jo(e){let t=T(e,"string");if(!t)return null;let n=T(t,"string_fragment");return n?n.text:null}function Oo(e){return/^\s*import\s+type\b/.test(e)}function Mo(e){return/^\s*type\b/.test(e.trim())}function $o(e,t){let n=new Set;for(let r of e.rootNode.descendantsOfType("member_expression")){let i=r.namedChild(0),s=r.namedChild(1);!i||!s||i.type!=="identifier"||i.text!==t||(s.type==="property_identifier"||s.type==="identifier")&&n.add(s.text)}return[...n]}function Bo(e){let t=[],n=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of e.matchAll(n)){let s=i[0],o=i[1],a=i[2];!s||!a||typeof i.index!="number"||t.push({clause:o,specifier:a,start:i.index,end:i.index+s.length})}let r=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of e.matchAll(r)){let s=i[0],o=i[1];!s||!o||typeof i.index!="number"||t.push({clause:null,specifier:o,start:i.index,end:i.index+s.length})}return t.sort((i,s)=>i.start-s.start)}function Vo(e,t,n,r,i,s,o){let a=Q(e,t,r),c=G(o,i,s);return n?Wo(n).map(u=>({...u,sourcePath:a})).map(u=>{if(u.kind==="namespace"){let p=he(c,u.localName);return ae(u.importedName,u.sourcePath,{localName:u.localName,usedMembers:p,used:p.length>0||C(c,u.localName),isTypeOnly:u.isTypeOnly})}return u.kind==="side-effect"?oe(u.importedName,u.sourcePath):W(u.importedName,u.localName??"",u.sourcePath,u.localName?C(c,u.localName):!1,u.kind,[],{isTypeOnly:u.isTypeOnly})}):[oe("*",a)]}function Wo(e){let t=e.trim(),n=/^type\b/.test(t),r=t.replace(/^type\s+/,""),[i,s]=Uo(r),o=[];return i&&o.push(...cr(i,n)),s&&o.push(...cr(s,n)),o}function cr(e,t){let n=e.trim();if(!n)return[];if(n.startsWith("{")){let r=n.slice(1,-1).trim();return r?E(r).map(i=>{let s=i.trim(),o=t||/^type\b/.test(s),a=s.replace(/^type\s+/,""),[c,l]=a.split(/\s+as\s+/);return{importedName:c.trim(),localName:(l??c).trim(),kind:"named",isTypeOnly:o}}):[]}return n.startsWith("* as ")?[{importedName:"*",localName:n.slice(5).trim(),kind:"namespace",isTypeOnly:t}]:[{importedName:"default",localName:n,kind:"default",isTypeOnly:t}]}function Uo(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==="{"&&t++,r==="}"&&t--,r===","&&t===0)return[e.slice(0,n).trim(),e.slice(n+1).trim()]}return[e.trim(),null]}function Vt(e,t,n){let r=O(e,t);return r?Jo(e,t,r):zo(e,t,n)}function zo(e,t,n){return[...Ho(e,t,n),...qo(e,t,n),...Ko(e,t,n)]}function Ho(e,t,n){let r=[],i=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[1]??"",a=s[2]??"",c=E(o).map(p=>Qo(p.trim())).filter(p=>!!p),l=Se(n,s.index),u=Se(n,s.index+s[0].length-1);r.push({kind:"named",sourcePath:Q(e,t,a),names:c,startLine:l,endLine:u})}return r}function qo(e,t,n){let r=[],i=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[2]??"",a=Se(n,s.index),c=Se(n,s.index+s[0].length-1);r.push({kind:"star-as",sourcePath:Q(e,t,o),names:s[1]?[s[1]]:[],startLine:a,endLine:c})}return r}function Ko(e,t,n){let r=[],i=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[1]??"",a=Se(n,s.index),c=Se(n,s.index+s[0].length-1);r.push({kind:"star",sourcePath:Q(e,t,o),names:[],startLine:a,endLine:c})}return r}function Qo(e){if(!e)return null;let t=e.replace(/^type\s+/,"").trim();if(!t)return null;let n=t.match(/^(\w+)\s+as\s+(\w+)$/);if(n)return n[2]??null;let r=t.match(/^(\w+)$/);return r?r[1]??null:null}function Se(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)e.charCodeAt(r)===10&&n++;return n}function Jo(e,t,n){let r=[];for(let i of n.rootNode.descendantsOfType("export_statement")){let s=Go(e,t,i);if(s===void 0)continue;let o=i.startPosition.row,a=i.endPosition.row,c=Xo(i,s,o,a);r.push(c)}return r}function Go(e,t,n){let r=T(n,"string");if(!r)return;let i=T(r,"string_fragment");if(i)return Q(e,t,i.text)}function Xo(e,t,n,r){let i=T(e,"export_clause");if(i){let o=[];for(let a of i.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),l=a.namedChild(1);c&&o.push((l??c).text)}return{kind:"named",sourcePath:t,names:o,startLine:n,endLine:r}}let s=T(e,"namespace_export");if(s){let o=s.namedChildren.find(a=>a.type==="identifier"||a.type==="type_identifier")?.text;return{kind:"star-as",sourcePath:t,names:o?[o]:[],startLine:n,endLine:r}}return{kind:"star",sourcePath:t,names:[],startLine:n,endLine:r}}function lr(e,t,n){return Ze(e,t,{java:r=>Yo(e,t,r),kotlin:r=>Zo(e,t,r),scala:r=>ea(e,t,r)},()=>D(n,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(r,i)=>{let s=r[1]?.trim();return s?ta(e,t,s,i):[]}),n)}function Yo(e,t,n){let r=h(n,new Set(["import_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("import_declaration")){let o=s.children.some(p=>p.type==="asterisk"),c=s.namedChildren.find(p=>p.type==="scoped_identifier")??s.namedChildren.find(p=>p.type==="identifier");if(!c)continue;let l=c.text;if(o){i.push(ae("*",y(e,l,P)));continue}let u=l.split(".").pop()??l;i.push(g(u,u,y(e,l,P),r))}return i}function Zo(e,t,n){let r=h(n,new Set(["import_header","import_list"])),i=[];for(let s of n.rootNode.descendantsOfType("import_header")){let o=s.namedChildren.find(f=>f.type==="identifier");if(!o)continue;let a=s.namedChildren.some(f=>f.type==="wildcard_import"),c=s.namedChildren.find(f=>f.type==="import_alias");if(a){i.push(ae("*",y(e,o.text,P)));continue}let l=o.text,u=l.split(".").pop()??l,d=c?.namedChild(0)?.text??u;i.push(g(u,d,y(e,l,P),r))}return i}function ea(e,t,n){let r=h(n,new Set(["import_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("import_declaration")){let o=s.namedChildren.find(p=>p.type==="namespace_selectors"||p.type==="namespace_wildcard"),a=s.namedChildren.filter(p=>p!==o&&(p.type==="identifier"||p.type==="stable_identifier")),c=a.map(p=>p.text).join(".");if(!c)continue;if(o?.type==="namespace_wildcard"){i.push(ae("*",y(e,c,P)));continue}if(o?.type==="namespace_selectors"){for(let p of o.namedChildren)if(p.type==="arrow_renamed_identifier"){let[d,f]=p.namedChildren;if(!d)continue;let m=d.text,ce=f?.text??m;if(m==="_")continue;i.push(g(m,ce,y(e,`${c}.${m}`,P),r))}else if(p.type==="identifier"){let d=p.text;i.push(g(d,d,y(e,`${c}.${d}`,P),r))}continue}let l=a[a.length-1]?.text??c,u=a.slice(0,-1).map(p=>p.text).join(".")||c;i.push(g(l,l,y(e,u&&a.length>1?`${u}.${l}`:c,P),r))}return i}function ta(e,t,n,r){if(n.includes("{")&&n.includes("}")){let i=n.slice(0,n.indexOf("{")).replace(/\.$/,"").trim(),s=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return E(s).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),u=c?.trim();if(!u||u==="_")return[];let p=(l??u.split(".").pop()??u).trim(),d=u==="_"?i:`${i}.${u}`.replace(/\.\./g,".");return[w(e,t,r,d,u,p)]})}return[w(e,t,r,n,n.split(".").pop()??n,n.split(".").pop()??n)]}function pr(e,t,n){return R(e,t,r=>na(e,t,r),()=>D(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,i)=>{let s=r[1]?.trim();return s?E(s).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.split(/\s+as\s+/i),u=c?.trim()??a,p=u.split("\\").pop()??u,d=(l??p).trim();return[w(e,t,i,u,p,d,y(e,u.replace(/\\/g,"."),se))]}):[]}),n)}function na(e,t,n){let r=h(n,new Set(["namespace_use_declaration"])),i=[],s=(o,a,c)=>{i.push(g(a,c,y(e,o.replace(/\\/g,"."),se),r))};for(let o of n.rootNode.descendantsOfType("namespace_use_declaration")){let a=o.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=o.namedChildren.find(l=>l.type==="namespace_name")?.text??"";for(let l of a.namedChildren){if(l.type!=="namespace_use_clause")continue;let{importedName:u,localName:p,qualified:d}=ur(l,c);u&&s(d,u,p)}continue}for(let c of o.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:l,localName:u,qualified:p}=ur(c,"");l&&s(p,l,u)}}return i}function ur(e,t){let n=e.namedChildren.find(l=>l.type==="qualified_name"),r=e.namedChildren.filter(l=>l.type==="name"),i="";n?i=n.text:r.length>=1&&(i=r[0].text);let s=n&&r.length>0?r[r.length-1]:null,o=i.split("\\").pop()??i,a=s?.text??o,c=t?`${t}\\${i}`:i;return{importedName:o,localName:a,qualified:c}}function fr(e,t,n){return R(e,t,r=>ra(e,t,r),()=>sa(n).flatMap(r=>aa(e,t,r,n)),n)}function ra(e,t,n){let r=h(n,new Set(["import_statement","import_from_statement"])),i=[];for(let s of n.rootNode.descendantsOfType("import_statement"))for(let o of s.namedChildren){let a=dr(o);if(!a)continue;let c=ye(e,t,a.qualifiedName);i.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:r.has(a.localName),usedMembers:[]})}for(let s of n.rootNode.descendantsOfType("import_from_statement")){let o=s.namedChild(0);if(!o)continue;let a=ia(o);if(a===null)continue;let c=ye(e,t,a);for(let l=1;l<s.namedChildCount;l+=1){let u=s.namedChild(l);if(u.type==="wildcard_import"){i.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let p=dr(u);p&&i.push({importedName:p.qualifiedName,localName:p.localName,sourcePath:c,kind:"named",used:r.has(p.localName),usedMembers:[]})}}return i}function dr(e){if(e.type==="aliased_import"){let t=e.namedChild(0),n=e.namedChild(1);return!t||!n?null:{qualifiedName:t.text,localName:n.text}}if(e.type==="dotted_name"){let t=e.text;return{qualifiedName:t,localName:t.split(".")[0]??t}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function ia(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let t=T(e,"import_prefix")?.text??"",n=T(e,"dotted_name")?.text??"";return`${t}${n}`}return null}function sa(e){let t=e.split(`
16
+ `),n=[],r=0;for(let i=0;i<t.length;i++){let s=t[i],o=s.trimStart(),a=r;if(r+=s.length+1,!o.startsWith("import ")&&!o.startsWith("from "))continue;let c=s,l=a+s.length,u=wt(s);for(;i+1<t.length&&(u>0||c.trimEnd().endsWith("\\"));){i++;let d=t[i];c+=`
17
+ ${d}`,l+=1+d.length,u+=wt(d),r+=d.length+1}let p=oa(c);p&&n.push({...p,start:a,end:l})}return n}function oa(e){let t=e.replace(/\\\s*\n/g," ").trim();if(t.startsWith("import "))return{kind:"import",module:null,clause:t.slice(7).trim()};let n=t.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!n)return null;let r=n[2].trim();return r.startsWith("(")&&r.endsWith(")")&&(r=r.slice(1,-1).trim()),{kind:"from",module:n[1],clause:r}}function aa(e,t,n,r){let i=G(r,n.start,n.end),s=n.clause.replace(/\n/g," ").trim();if(n.kind==="import")return E(s).flatMap(c=>{let l=c.trim().replace(/,$/,"");if(!l)return[];let[u,p]=l.split(/\s+as\s+/),d=u.trim(),f=(p??d.split(".")[0]??d).trim(),m=ye(e,t,d),ce=he(i,f);return[{importedName:d,localName:f,sourcePath:m,kind:"namespace",used:C(i,f)||ce.length>0,usedMembers:ce}]});let o=n.module?ye(e,t,n.module):null,a=[];for(let c of E(s)){let l=c.trim().replace(/,$/,"");if(!l)continue;if(l==="*"){a.push({importedName:"*",localName:null,sourcePath:o,kind:"side-effect",used:!0,usedMembers:[]});continue}let[u,p]=l.split(/\s+as\s+/),d=(p??u).trim();a.push({importedName:u.trim(),localName:d,sourcePath:o,kind:"named",used:C(i,d),usedMembers:[]})}return a}import{basename as ca}from"path";function mr(e,t,n){return R(e,t,r=>ua(e,t,r),()=>la(e,t,n),n)}function la(e,t,n){return D(n,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(r,i)=>{let s=r[1],o=r[2];if(!s||!o)return[];let a=s==="require_relative"?Je(e,t,o):null;if(a){let c=gr(o);return[W(c,c,a,C(i,c))]}return[oe(o,a)]})}function ua(e,t,n){let r=h(n,new Set([])),i=[],s=new Set(["require","require_relative","load"]);for(let o of n.rootNode.descendantsOfType("call")){let a=o.namedChild(0);if(!a||a.type!=="identifier"||!s.has(a.text))continue;let l=o.namedChildren.find(f=>f.type==="argument_list")?.namedChild(0);if(!l||l.type!=="string")continue;let p=l.namedChildren.find(f=>f.type==="string_content")?.text;if(!p)continue;let d=a.text==="require_relative"?Je(e,t,p):null;if(d){let f=gr(p);i.push(g(f,f,d,r))}else i.push(oe(p,d))}return i}function gr(e){return zn(ca(e).replace(/\.[^.]+$/,""),/_/)}function yr(e,t,n){return R(e,t,r=>pa(e,t,r),()=>D(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,i)=>{let s=r[1]?.trim();return s?da(e,t,s,i):[]}),n)}function pa(e,t,n){let r=h(n,new Set(["use_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("use_declaration")){let o=s.namedChild(0);if(o)for(let a of Fe(o,"")){if(!a.importedName||a.importedName==="*")continue;let c=B(e,t,a.qualifiedName)??B(e,t,a.qualifiedName.split("::").slice(0,-1).join("::"));i.push(g(a.importedName,a.localName,c,r))}}return i}function Fe(e,t){switch(e.type){case"identifier":case"super":case"crate":{let n=e.text;return[{qualifiedName:nt(t,n),importedName:n,localName:n}]}case"self":{let n=t.split("::").filter(Boolean).pop()??"self";return[{qualifiedName:t||"self",importedName:n,localName:n}]}case"scoped_identifier":{let n=e.text,r=n.split("::").pop()??n;return[{qualifiedName:nt(t,n),importedName:r,localName:r}]}case"scoped_use_list":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let i=nt(t,n.text),s=[];for(let o of r.namedChildren)s.push(...Fe(o,i));return s}case"use_list":{let n=[];for(let r of e.namedChildren)n.push(...Fe(r,t));return n}case"use_as_clause":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let i=Fe(n,t),s=r.text;return i.map(o=>({...o,localName:s}))}case"use_wildcard":{let n=e.namedChild(0),r=n?n.text:"";return[{qualifiedName:nt(t,`${r}::*`),importedName:"*",localName:"*"}]}default:return[]}}function nt(e,t){return e?t?`${e}::${t}`:e:t}function da(e,t,n,r){let i=n.trim();if(i.includes("{")&&i.includes("}")){let u=i.slice(0,i.indexOf("{")).replace(/::$/,"").trim(),p=i.slice(i.indexOf("{")+1,i.lastIndexOf("}")).trim();return E(p).flatMap(d=>{let f=d.trim();if(!f)return[];if(f==="self"){let ot=u.split("::").filter(Boolean).pop();return ot?[w(e,t,r,u,ot,ot)]:[]}let[m,ce]=f.split(/\s+as\s+/),le=m?.trim();if(!le)return[];let Ar=(ce??le.split("::").pop()??le).trim(),jr=`${u}::${le}`.replace(/::::/g,"::");return[w(e,t,r,jr,le.split("::").pop()??le,Ar,B(e,t,u))]})}let[s,o]=i.split(/\s+as\s+/),a=s?.trim()??i,c=(o??a.split("::").pop()??a).trim(),l=B(e,t,a)??B(e,t,a.split("::").slice(0,-1).join("::"));return[w(e,t,r,a,a.split("::").pop()??a,c,l)]}function hr(e,t,n){let r=O(e,t);if(r)return fa(e,t,r);let i=[];for(let s of n.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let o=s[1]?.trim();o&&i.push(...ga(e,t,o))}return i}function fa(e,t,n){let r=[];for(let i of n.rootNode.descendantsOfType("use_declaration")){if(!ma(i))continue;let s=i.namedChildren.find(o=>o.type!=="visibility_modifier");if(s)for(let o of Fe(s,""))o.importedName&&r.push(Wt(e,t,o.qualifiedName))}return r}function ma(e){for(let t of e.children)if(t.type==="visibility_modifier"&&t.text.startsWith("pub"))return!0;return!1}function ga(e,t,n){let r=n.trim();if(r.includes("{")&&r.includes("}")){let i=r.slice(0,r.indexOf("{")).replace(/::$/,"").trim(),s=r.slice(r.indexOf("{")+1,r.lastIndexOf("}")).trim();return E(s).flatMap(o=>{let a=o.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),l=`${i}::${c?.trim()??a}`.replace(/::::/g,"::");return[Wt(e,t,l)]})}return[Wt(e,t,r)]}function Wt(e,t,n){return{specifier:n,sourcePath:B(e,t,n)??B(e,t,n.split("::").slice(0,-1).join("::"))}}function X({language:e,extensions:t,imports:n,parseImports:r}){return{language:e,extensions:t,capabilities:{imports:n},parseImports:r}}function Sr(e,t){let n=t.toLowerCase();for(let r of e)for(let i of r.extensions)if(n.endsWith(i))return r;return null}var ya={language:"javascript",extensions:re,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:Bt,parseReExports:Vt},ha=X({language:"python",extensions:ze,imports:"ast-with-regex-fallback",parseImports:fr}),Sa=X({language:"jvm",extensions:P,imports:"ast-dispatch-with-regex-fallback",parseImports:lr}),xa={language:"rust",extensions:He,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:yr,parseExports:hr},ba=X({language:"ruby",extensions:qe,imports:"ast-with-regex-fallback",parseImports:mr}),Na=X({language:"c/cpp",extensions:Ke,imports:"ast-with-regex-fallback",parseImports:tr}),_a=X({language:"dotnet",extensions:K,imports:"ast-dispatch-with-regex-fallback",parseImports:or}),Ia={language:"dart",extensions:Qe,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:ir,parseExports:sr},Ca=X({language:"php",extensions:se,imports:"ast-with-regex-fallback",parseImports:pr}),Ea=X({language:"clojure",extensions:ge,imports:"regex-only",parseImports:rr}),ka=[ya,ha,Sa,xa,ba,Na,_a,Ia,Ca,Ea];function rt(e){return Sr(ka,e)}var Ut={clearGroups:["whole-project","source-file"]},Pa=N("source-imports",Ut),Rp=N("source-exports",Ut),Ta=N("source-reexports",Ut),xr=Y({kind:"source-imports",invalidation:Z("source-imports"),serialize:La,deserialize:Fa}),br=Y({kind:"source-reexports",invalidation:Z("source-reexports"),serialize:Da,deserialize:Ra});function Nr(e,t){let n=b(t);return Ta.get(e,n,()=>{let r=rt(n);if(!r?.parseReExports)return[];let i=_(e,n);if(!i)return[];let s=U(e,n,i),o=vt(e),a=br.read(e,n,s);if(a?.resolutionFingerprint===o)return a.reExports;let c=r.parseReExports(e,n,i);return br.write(e,n,s,{resolutionFingerprint:o,reExports:c}),c})}function zt(e,t){let n=b(t);return Pa.get(e,n,()=>{let r=rt(n);if(!r)return[];let i=_(e,n);return i?_r(e,n,i,r):[]})}function vp(e,t){let n=b(t),r=rt(n);if(!r)return[];let i;try{i=Re(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(s){if(ve(s))return[];throw s}return _r(e,n,i,r)}function _r(e,t,n,r){let i=U(e,t,n),s=vt(e),o=xr.read(e,t,i);if(o?.resolutionFingerprint===s)return o.imports;let a=r.parseImports(e,t,n);return xr.write(e,t,i,{parserVersion:2,resolutionFingerprint:s,imports:a}),a}function wp(e,t,n){let r=zt(e,t).filter(i=>i.kind==="named"&&i.isTypeOnly!==!0&&i.localName===n&&i.sourcePath!==null);return r.length===1?r[0]:null}function La(e){return JSON.stringify(e)}function Fa(e){try{let t=JSON.parse(e);return!de(t)||t.parserVersion!==2||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.imports)?null:{parserVersion:2,resolutionFingerprint:t.resolutionFingerprint,imports:t.imports}}catch{return null}}function Da(e){return JSON.stringify(e)}function Ra(e){try{let t=JSON.parse(e);return!de(t)||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.reExports)?null:{resolutionFingerprint:t.resolutionFingerprint,reExports:t.reExports}}catch{return null}}function jp(e,t){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
18
+ FROM global_symbols gs
19
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
20
+ JOIN documents d ON der.document_id = d.id
21
+ WHERE ${t.where}
22
+ ${e.pathExclusionsFor("d")}
23
+ ${Cr(t.orderBy)}
24
+ ${Er(t.limit)}`,...t.params??[])}function Op(e,t){return e.all(`SELECT
25
+ gs.id,
26
+ gs.symbol,
27
+ c.document_id,
28
+ MIN(c.start_line) AS start_line,
29
+ 0 AS start_char,
30
+ MAX(c.end_line) AS end_line,
31
+ 0 AS end_char,
32
+ d.relative_path,
33
+ gs.display_name,
34
+ gs.documentation
35
+ FROM global_symbols gs
36
+ JOIN mentions m ON m.symbol_id = gs.id
37
+ JOIN chunks c ON m.chunk_id = c.id
38
+ JOIN documents d ON c.document_id = d.id
39
+ WHERE m.role = 1
40
+ AND ${t.where}
41
+ ${e.pathExclusionsFor("d")}
42
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
43
+ ${Cr(t.orderBy)}
44
+ ${Er(t.limit)}`,...t.params??[])}function Cr(e){return e?`ORDER BY ${e}`:""}function Er(e){return typeof e=="number"?`LIMIT ${e}`:""}function kr(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function Pr(e){if(!e)return null;let t=Ir(e);if(t)return t.replace(/\n/g," ");let n=e.indexOf("|");if(n===-1)return e.replace(/\n/g," ");let r=e.slice(n+1);return(Ir(r)??r).replace(/\n/g," ")}function Ir(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function it(e){return{forFile(t,n){return Tr(e,t,n)},forFiles(t,n){let r=new Map;for(let i of t)r.set(i,Tr(e,i,n));return r}}}function Tr(e,t,n){let r={file:t},i=n.facts||n.identifiers;if(n.text&&(r.text=_(e,t)),n.lines&&(r.lines=pt(e,t)),n.ast&&(r.ast=O(e,t)),n.imports&&(r.imports=zt(e,t)),n.reexports&&(r.reexports=Nr(e,t)),i){let s=xt(e,t),o=s.facts;n.facts&&(r.facts=o),s.unavailable&&(r.sourceFactsUnavailable=s.unavailable),n.identifiers&&o&&(r.identifiers=o.fileIdentifiers,r.identifierLineMap=o.identifierLineMap)}return r}function va(e,t={}){if(z(e.symbol)!==null)return t.includeClassMemberFallbacks===!0;let i=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(i)}function Ht(e,t,n={}){let r=new Map;for(let s of t)e.length>0&&!va(s,{includeClassMemberFallbacks:n.includeClassMemberFallbacks})||r.set(s.id,s);for(let s of e)r.set(s.id,s);let i=[...r.values()];return n.sort?i.sort((s,o)=>s.start_line-o.start_line||s.end_line-o.end_line||s.symbol.localeCompare(o.symbol)):i}var wa=N("file-definitions",{clearGroups:["definition-catalog"]}),Aa=ue("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),ja=N("file-function-like-definitions",{clearGroups:["definition-catalog"]}),Lr=new WeakMap;function Kt(e,t,n={},r){return Ne(t),n.includeClassMemberFallbacks?qt(e,t,void 0,{includeClassMemberFallbacks:!0},r):wa.get(e,t,()=>{let i=j(r,"evidence-read",()=>vr(e,t));if(i)return i;let s=qt(e,t,void 0,n,r);return j(r,"evidence-write",()=>{let o=xe(e),a=it(e).forFile(t,{text:!0}).text;o&&a&&Rr.write(e,t,U(e,t,a),{projectFingerprint:o,definitions:s.map(c=>({...c}))})}),s})}function Oa(e,t){return ja.get(e,t,()=>{let n=vr(e,t);return n?n.filter(r=>r.isFunctionLike):qt(e,t,r=>r.isFunctionLike)})}var Rr=Y({kind:"file-definitions",invalidation:Z("file-definitions"),serialize:Ma,deserialize:$a});function vr(e,t){let n=xe(e);if(!n)return null;let r=it(e).forFile(t,{text:!0}).text;if(!r)return null;let i=Rr.read(e,t,U(e,t,r));return i?Ba(i,n,t):null}function Ma(e){return JSON.stringify(e)}function $a(e){try{let t=JSON.parse(e);return!de(t)||typeof t.projectFingerprint!="string"||!Array.isArray(t.definitions)?null:{projectFingerprint:t.projectFingerprint,definitions:t.definitions}}catch{return null}}function Ba(e,t,n){if(e.projectFingerprint!==t)return null;let r=[];for(let i of e.definitions){let s=Va(i,n);if(!s)return null;r.push(s)}return r}function Va(e,t){return!de(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.startChar!="number"&&e.startChar!==void 0||typeof e.endLine!="number"||typeof e.endChar!="number"&&e.endChar!==void 0||e.relativePath!==t||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function qt(e,t,n,r={},i){let s=j(i,"primary-rows",()=>Wa(e,t)),o=j(i,"fallback-rows",()=>Ua(e,t)),a=j(i,"merge-rows",()=>Ht(s,o,{sort:!0,includeClassMemberFallbacks:r.includeClassMemberFallbacks}).map(Qt));return n&&(a=a.filter(n)),j(i,"range-correction",()=>Jt(e,t,a,i,r.rangeCorrectionEvidence))}function j(e,t,n){return e?e(t,n):n()}function Wa(e,t){return e.all(`SELECT
45
+ gs.id,
46
+ gs.symbol,
47
+ der.document_id,
48
+ der.start_line,
49
+ der.start_char,
50
+ der.end_line,
51
+ der.end_char,
52
+ d.relative_path,
53
+ gs.display_name,
54
+ gs.kind,
55
+ gs.documentation,
56
+ gs.enclosing_symbol
57
+ FROM global_symbols gs
58
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
59
+ JOIN documents d ON der.document_id = d.id
60
+ WHERE d.relative_path = ?
61
+ ${e.symbolNoiseFor("gs")}
62
+ ORDER BY der.start_line, der.end_line`,t)}function Ua(e,t){return e.all(`SELECT
63
+ gs.id,
64
+ gs.symbol,
65
+ c.document_id,
66
+ MIN(c.start_line) AS start_line,
67
+ 0 AS start_char,
68
+ MAX(c.end_line) AS end_line,
69
+ 0 AS end_char,
70
+ d.relative_path,
71
+ gs.display_name,
72
+ gs.kind,
73
+ gs.documentation,
74
+ gs.enclosing_symbol
75
+ FROM global_symbols gs
76
+ JOIN mentions m ON m.symbol_id = gs.id
77
+ JOIN chunks c ON m.chunk_id = c.id
78
+ JOIN documents d ON c.document_id = d.id
79
+ WHERE d.relative_path = ?
80
+ AND m.role = 1
81
+ ${e.symbolNoiseFor("gs")}
82
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
83
+ ORDER BY start_line, end_line`,t)}function Qt(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:an(e.symbol),parentTypeName:z(e.symbol),isFunctionLike:ut(e.symbol),isTypeLike:we(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function sd(e,t={}){return za(e,t.scope)}function za(e,t){return be(e,{scope:t,includeIgnored:!1}).flatMap(n=>Kt(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function od(e,t){return be(e,{scope:t,includeIgnored:!1}).flatMap(n=>Oa(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function ad(e,t){let n=Aa.get(e,()=>new WeakMap),r=n.get(t.symbolMatches);r||(r=new Map,n.set(t.symbolMatches,r));let i=JSON.stringify({scope:t.scope??null,sqlPrefilter:t.sqlPrefilter??null}),s=r.get(i);if(s)return[...s];let o=Fr(Ha(e,t.scope,t.sqlPrefilter)),a=Fr(qa(e,t.scope,t.sqlPrefilter)),c=new Set([...o.keys(),...a.keys()]),l=[];for(let u of[...c].sort()){if(e.isIgnored(u))continue;let p=Ht(o.get(u)??[],a.get(u)??[],{sort:!0}).filter(d=>t.symbolMatches(d.symbol));p.length!==0&&l.push(...Jt(e,u,p.map(Qt)))}return r.set(i,l),[...l]}function Ha(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",i=n?`AND ${wr("gs",n)}`:"",s=t?[`%${t}%`]:[];return e.all(`SELECT
84
+ gs.id,
85
+ gs.symbol,
86
+ der.document_id,
87
+ der.start_line,
88
+ der.start_char,
89
+ der.end_line,
90
+ der.end_char,
91
+ d.relative_path,
92
+ gs.display_name,
93
+ gs.kind,
94
+ gs.documentation,
95
+ gs.enclosing_symbol
96
+ FROM global_symbols gs
97
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
98
+ JOIN documents d ON der.document_id = d.id
99
+ WHERE 1 = 1
100
+ ${e.pathExclusionsFor("d")}
101
+ ${r}
102
+ ${i}
103
+ ${e.symbolNoiseFor("gs")}
104
+ ORDER BY d.relative_path, der.start_line, der.end_line`,...s)}function qa(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",i=n?`AND ${wr("gs",n)}`:"",s=t?[`%${t}%`]:[];return e.all(`SELECT
105
+ gs.id,
106
+ gs.symbol,
107
+ c.document_id,
108
+ MIN(c.start_line) AS start_line,
109
+ 0 AS start_char,
110
+ MAX(c.end_line) AS end_line,
111
+ 0 AS end_char,
112
+ d.relative_path,
113
+ gs.display_name,
114
+ gs.kind,
115
+ gs.documentation,
116
+ gs.enclosing_symbol
117
+ FROM global_symbols gs
118
+ JOIN mentions m ON m.symbol_id = gs.id
119
+ JOIN chunks c ON m.chunk_id = c.id
120
+ JOIN documents d ON c.document_id = d.id
121
+ WHERE m.role = 1
122
+ AND NOT EXISTS (
123
+ SELECT 1
124
+ FROM defn_enclosing_ranges existing_der
125
+ WHERE existing_der.symbol_id = gs.id
126
+ )
127
+ ${e.pathExclusionsFor("d")}
128
+ ${r}
129
+ ${i}
130
+ ${e.symbolNoiseFor("gs")}
131
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
132
+ ORDER BY d.relative_path, start_line, end_line`,...s)}function Ka(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function wr(e,t){return t==="callable"?Ka(e):Qa(e)}function Qa(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function Fr(e){let t=new Map;for(let n of e){let r=t.get(n.relative_path);r?r.push(n):t.set(n.relative_path,[n])}return t}function cd(e,t,n={}){if(t.length===0)return[];let r=t.flatMap(i=>Kt(e,i)).filter(i=>!e.isIgnored(i.relativePath));return n.onlyDocumented&&(r=r.filter(i=>i.documentation!==null&&i.documentation!=="")),n.sort&&(r=r.sort((i,s)=>i.relativePath.localeCompare(s.relativePath)||i.startLine-s.startLine||i.endLine-s.endLine)),r.map(i=>({startLine:i.startLine,endLine:i.endLine,symbol:i.symbol,shortName:on(i.symbol),signature:kr(Pr(i.documentation)),relativePath:i.relativePath,enclosingSymbol:i.enclosingSymbol}))}function Ja(e){let t=new Map,n=e.map((r,i)=>({definition:r,index:i,span:r.endLine-r.startLine})).sort((r,i)=>r.span-i.span||r.index-i.index);for(let{definition:r}of n)for(let i=r.startLine;i<=r.endLine;i+=1)t.has(i)||t.set(i,r);return t}function ld(e,t){let n=Lr.get(e);return n||(n=Ja(e),Lr.set(e,n)),n.get(t)??null}function ud(e,t){let n=Kt(e,t.relative_path).find(r=>r.symbolId===t.id)??(z(t.symbol)===null||!ut(t.symbol)?void 0:Jt(e,t.relative_path,[Qt(t)])[0]);return n?{symbolId:n.symbolId,symbol:n.symbol,documentId:n.documentId,startLine:n.startLine,startChar:n.startChar,endLine:n.endLine,endChar:n.endChar,relativePath:n.relativePath}:{symbolId:t.id,symbol:t.symbol,documentId:t.document_id,startLine:t.start_line,startChar:t.start_char??0,endLine:t.end_line,endChar:t.end_char??0,relativePath:t.relative_path}}function Jt(e,t,n,r,i){let s=j(r,"range-correction.source-text",()=>i?i.source:it(e).forFile(t,{text:!0}).text),o=j(r,"range-correction.callable-sites",()=>i?i.callables:_t(e,t));return o?j(r,"range-correction.ast-correction",()=>tc(n,o,s)):s?j(r,"range-correction.regex-fallback",()=>Ga(n,s)):n}function Ga(e,t){let n=t.split(/\r?\n/),r=Xa(e,n),i=Ya(e,r),s=Za(i,n);return ec(e,s)}function Xa(e,t){let n=e.some(i=>st(i.symbol))?cc(t):null,r=new Map;for(let i of e)r.set(i.symbolId,ac(t,n,i));return r}function Ya(e,t){return e.filter(n=>st(n.symbol)).map(n=>({definition:n,startLine:t.get(n.symbolId)??n.startLine})).sort((n,r)=>n.startLine-r.startLine||n.definition.startLine-r.definition.startLine||n.definition.symbol.localeCompare(r.definition.symbol))}function Za(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let i=e[r],s=e[r+1],o=s?Math.max(i.startLine,s.startLine-1):t.length-1;n.set(i.definition.symbolId,{startLine:i.startLine,endLine:lc(t,i.definition,i.startLine,o)})}return n}function ec(e,t){return e.map(n=>{let r=t.get(n.symbolId);return r?{...n,startLine:r.startLine,endLine:r.endLine}:n})}function tc(e,t,n=null){let r=new Map;for(let i of t){let s=r.get(i.name);s?s.push(i):r.set(i.name,[i])}return e.map(i=>{if(!oc(i)||!i.leaf)return Dr(i,n);let s=r.get(i.leaf);if(!s||s.length===0)return Dr(i,n);let o=n?nc(i,s,n):null;if(o)return{...i,startLine:o.startLine,endLine:o.endLine};let a=s[0],c=Math.abs(a.startLine-i.startLine);for(let l=1;l<s.length;l+=1){let u=s[l],p=Math.abs(u.startLine-i.startLine);p<c&&(a=u,c=p)}return{...i,startLine:a.startLine,endLine:a.endLine}})}function nc(e,t,n){let r=rc(e.symbol);if(!r)return null;let i=n.split(/\r?\n/),s=new RegExp(`\\b${A(r)}\\b`);for(let o of t){let a=ic(i,o.startLine);if(a&&s.test(a))return o}return null}function rc(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function ic(e,t){for(let n=t;n>=0;n-=1){let r=e[n]?.trim()??"";if(r){if(/^impl\b/.test(r))return sc(e,n,t);if(/^(?:struct|enum|trait|mod)\b/.test(r))return null}}return null}function sc(e,t,n){let r=[];for(let i=t;i<=n;i+=1){let s=e[i]??"";if(r.push(s),s.includes("{"))break}return r.join(" ")}function oc(e){return st(e.symbol)?!0:we(e.symbol)==="term"&&z(e.symbol)===null}function Dr(e,t){if(!t||!e.leaf||we(e.symbol)!=="term"||z(e.symbol)!==null)return e;let n=A(e.leaf),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${n}\\b`),s=t.split(/\r?\n/).findIndex(o=>r.test(o));return s>=0?{...e,startLine:s,endLine:s}:e}function ac(e,t,n){if(!st(n.symbol))return n.startLine;let r=Math.max(0,Math.min(n.startLine,e.length-1));if(!t)return r;let i=t.get(n.leaf);if(!i||i.length===0)return r;let s=null;for(let o of i){let a=Math.abs(o-n.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??r}function cc(e){let t=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,n=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,r=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,i=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,o=(a,c)=>{let l=s.get(a);if(!l){s.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let u of c.matchAll(t))u[1]&&o(u[1],a);for(let u of c.matchAll(n))u[1]&&o(u[1],a);let l=c.match(r);l?.[1]&&o(l[1],a);for(let u of c.matchAll(i))u[1]&&o(u[1],a)}return s}function lc(e,t,n,r){let i=Math.max(n,Math.min(e.length-1,r)),s=Math.max(n,Math.min(i,t.endLine)),o=0,a=0,c=!1;for(let l=n;l<=i;l+=1){let u=uc(e[l]??"");for(let p of u)p==="{"?(o+=1,c=!0):p==="}"?o=Math.max(0,o-1):p==="("?a+=1:p===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=s)return l}return s}function uc(e){let t="",n=null,r=!1;for(let i=0;i<e.length;i+=1){let s=e[i],o=e[i+1];if(!n&&s==="/"&&o==="/"){t+=" ".repeat(e.length-i);break}if(n){if(r){r=!1,t+=" ";continue}if(s==="\\"){r=!0,t+=" ";continue}s===n&&(n=null),t+=" ";continue}if(s==='"'||s==="'"||s==="`"){n=s,t+=" ";continue}t+=s}return t}function st(e){return e.includes("().")}export{Kr as a,Y as b,Ec as c,Z as d,Hn as e,hs as f,Q as g,pc as h,_ as i,$r as j,yc as k,pt as l,hc as m,A as n,io as o,H as p,q,Zi as r,Vn as s,rs as t,Wn as u,is as v,Nt as w,ss as x,O as y,Be as z,te as A,Gc as B,fe as C,xt as D,_t as E,as as F,cs as G,ro as H,nt as I,Nr as J,zt as K,vp as L,wp as M,it as N,jp as O,Op as P,kr as Q,Pr as R,Ht as S,Kt as T,sd as U,za as V,od as W,ad as X,cd as Y,Ja as Z,ld as _,ud as $};
133
+ //# sourceMappingURL=chunk-2VAHDDLM.js.map