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
@@ -0,0 +1,3 @@
1
+ import{a as He}from"./chunk-7R4V5ES6.js";import{b as Pe}from"./chunk-7H6VHWWJ.js";import{c as je}from"./chunk-ZGIQN2SX.js";import{d as Te}from"./chunk-Y5DFAW5W.js";import{i as We}from"./chunk-NU3KFF2O.js";import{e as E}from"./chunk-BOJ5SVE2.js";import{c as Ue}from"./chunk-2BMSSRBH.js";import{b as ge}from"./chunk-U3SXIMII.js";import{d as Ke,e as Be,f as ze}from"./chunk-SKKXTABJ.js";import{a as x,b as U}from"./chunk-FLMTCX5R.js";import{C as qe,d as te,k as oe,v as be}from"./chunk-C7C6AKAT.js";import{A as Xe,n as Q}from"./chunk-RBAD4GJ2.js";import{K as $e}from"./chunk-ZLMXIQLC.js";import{j as Re,k as we}from"./chunk-ETC674NS.js";import{d as Ge}from"./chunk-JZ2A7LDM.js";var Ye=4,bn=3,gn=12,Sn=48,vn=64,J=10,V=6,An=24,Mn=320,Ie=6,Dn=12,Ln=1,Cn=4,Rn=7,wn=12,_e="source-construct:",Tn=96,Pn=32,Qe=4,In=32,xn=8,Ve=new Set(["a","an","and","are","as","at","be","become","becomes","by","can","does","for","from","how","in","into","is","it","its","of","on","or","that","the","their","then","this","through","to","what","when","where","which","with"]);function Bt(e,n,i={}){let a=En(n),r=bt(n);if(a.length===0)throw new Error("Anchor discovery requires at least one non-trivial repository term.");let o=i.limit??Ye,t=i.full===!0;if(!Number.isSafeInteger(o)||o<=0)throw new RangeError(`anchor group limit must be a positive safe integer; received ${o}`);let s=new Ue(e),m=s.scopedDefinitions(i.scope).filter(g=>!oe(g.symbol)),l=[...m],c=new Map(l.map(g=>[g.symbol,g])),d=new Map;for(let g of m)Ze(d,g,a);let u=je(e,{scope:i.scope});for(let g of u.files){let fe=be(e,g.relativePath).filter(O=>!oe(O.symbol));if(fe.length===0)continue;let ne=Re(g.text);for(let O=0;O<ne.length;O+=1){let pe=T(ne[O]??""),ae=a.filter(N=>pe.has(N));if(ae.length===0)continue;let L=qe(fe,O);if(!(!L||oe(L.symbol)))for(let N of ae)le(d,L,N,"source",g.relativePath,O)}}let h=Je(d),y=[...d.values()].map(g=>Se(g,h,r)).sort(R),b=kn(u.files,y,a),v=-1;for(let g of b){let z=be(e,g.relativePath),fe=z.filter(L=>!oe(L.symbol)),ne=Q(e,g.relativePath)?.callables??[],O=new Map,pe=L=>{let N=`${L.startLine}\0${L.endLine}\0${L.name}`,Y=O.get(N);if(Y)return Y;let G=Fn(g.relativePath,z,L,()=>v--);return G?(O.set(N,G),l.push(G),c.set(G.symbol,G),Ze(d,G,a),G):null};for(let L of ne){let N=T(L.name);a.some(Y=>N.has(Y))&&pe(L)}if(ne.length===0)continue;let ae=Re(g.text);for(let L=0;L<ae.length;L+=1){let N=T(ae[L]??""),Y=a.filter(Ce=>N.has(Ce));if(Y.length===0)continue;let G=$e(ne,L),ce=G?pe(G):null;if(!ce)continue;let Ne=en(fe,L);if(en(Ne?[Ne,ce]:[ce],L)?.symbol===ce.symbol)for(let Ce of Y)le(d,ce,Ce,"source",g.relativePath,L)}}let S=Je(d),M=new Map(u.files.map(g=>[g.relativePath,g.text.split(/\r?\n/u)]));for(let g of d.values()){let z=M.get(g.definition.relativePath);z&&(g.sourceCharacters=z.slice(g.definition.startLine,g.definition.endLine+1).join(`
2
+ `).length)}let f=[...d.values()].map(g=>Se(g,S,r)).sort(R),C=Math.min(f.length,Math.max(gn,o*bn)),A=t?f:re([...f.slice(0,C),...[...f].sort(Ee).slice(0,Math.max(Sn,C)),...mt(f,a),...dt(f,a,S)]),P=A.length,I=A.map(g=>c.get(g.symbol)).filter(g=>g?.isFunctionLike===!0),H=_n(l),F=On(e,s,A,I,c,H,new Set(d.keys()),i.semantic!==!1),B=$n(F,A,d,S,c),k=Xn(B,S,a),q=et(e,s,F,d,S,l,c,i.semantic!==!1),D=[...Kn(e,s,B,c,S,i.semantic!==!1),...k,...B,...q].map(g=>({...g,queryPathMatches:ht(g)})).sort((g,z)=>Z(g,z,S)),_=t?D:yt(D,o,S),p=a.filter(g=>S.has(g)),w=a.filter(g=>!S.has(g)),ee=Math.max(0,f.length-P),ye=Math.max(0,D.length-_.length)+ee,pn=t?f.length:Math.min(f.length,o+Ye);return{query:n,queryPathFragments:r,normalizedTerms:a,matchedTerms:p,unmatchedTerms:w,groups:_,candidateRoots:f,candidateRootCount:f.length,analyzedRootCount:P,omittedRootCount:ee,omittedGroupCount:ye,scannedFiles:u.files.length,scannedBytes:u.scannedBytes,recoveryCommand:ye===0?null:`scip-query anchors ${De(n)}${i.scope?` --scope ${De(i.scope)}`:""} --limit ${pn}`}}function En(e){let n=Le(e).filter(i=>!Ve.has(i.toLocaleLowerCase())).map(Oe).filter(i=>i.length>=3&&!Ve.has(i));return[...new Set(n)]}function Ze(e,n,i){let a=T(n.leaf),r=T(n.relativePath),o=T(n.documentation??"");for(let s of i)a.has(s)&&le(e,n,s,"symbol"),r.has(s)&&le(e,n,s,"path"),o.has(s)&&le(e,n,s,"documentation");let t=e.get(n.symbol);t&&(t.symbolPhraseLength=St(n.leaf,i))}function le(e,n,i,a,r,o){let t=e.get(n.symbol)??{definition:n,matches:new Map,symbolPhraseLength:0},s=t.matches.get(i)??{sources:new Set,locations:new Map};s.sources.add(a),r!==void 0&&o!==void 0&&s.locations.set(`${r}\0${o}`,{file:r,line:o}),t.matches.set(i,s),e.set(n.symbol,t)}function Je(e){let n=new Map;for(let i of e.values())for(let a of i.matches.keys())n.set(a,(n.get(a)??0)+1);return n}function Fn(e,n,i,a){let r=n[0]?.documentId;if(r===void 0||n.find(s=>s.isFunctionLike&&s.leaf===i.name&&s.startLine===i.startLine&&s.endLine===i.endLine))return null;let t=a();return{documentId:r,symbolId:t,symbol:`${_e}${e}:${i.startLine}:${i.endLine}:${i.name}`,relativePath:e,startLine:i.startLine,startChar:0,endLine:i.endLine,endChar:0,leaf:i.name,parentTypeName:null,isFunctionLike:!0,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null}}function kn(e,n,i){let a=new Set(n.slice(0,Tn).map(t=>t.file)),r=new Set(i),o=e.map(t=>{let s=T(t.relativePath),m=t.relativePath.slice(t.relativePath.lastIndexOf("/")+1).replace(/\.[^.]+$/u,""),l=T(m),c=[...s].filter(u=>r.has(u)).length,d=[...l].filter(u=>r.has(u)).length;return{file:t,score:d*4+c}}).filter(t=>t.score>0).sort((t,s)=>s.score-t.score||x(U(t.file.relativePath))-x(U(s.file.relativePath))||t.file.relativePath.localeCompare(s.file.relativePath)).slice(0,Pn);for(let t of o)a.add(t.file.relativePath);return e.filter(t=>a.has(t.relativePath))}function _n(e){let n=new Map;for(let i of e){if(!$(i))continue;let a=`${i.relativePath}\0${E(i.leaf)}`,r=n.get(a)??[];r.push(i),n.set(a,r)}return n}function en(e,n){return e.filter(i=>i.startLine<=n&&i.endLine>=n).sort((i,a)=>i.endLine-i.startLine-(a.endLine-a.startLine)||Number($(a))-Number($(i))||i.startLine-a.startLine||i.symbol.localeCompare(a.symbol))[0]}function $(e){return e.symbol.startsWith(_e)}function W(e){return $(e)?e.leaf:te(e.symbol)}function Se(e,n,i=[]){let a=e.definition,r=[...e.matches.entries()].map(([l,c])=>({term:l,sources:[...c.sources].sort(vt),locations:[...c.locations.values()].sort(fn).slice(0,3)})).sort((l,c)=>l.term.localeCompare(c.term)),o=r.filter(l=>l.sources.some(c=>c!=="source")).map(l=>l.term),t=r.filter(l=>l.sources.includes("symbol")).map(l=>l.term),s=r.reduce((l,c)=>l+1/Math.max(1,n.get(c.term)??1),0),m=r.filter(l=>l.sources.includes("symbol")).reduce((l,c)=>l+1/Math.max(1,n.get(c.term)??1),0);return{symbol:a.symbol,label:W(a),leaf:a.leaf,file:a.relativePath,line:a.startLine,endLine:a.endLine,kind:a.isFunctionLike?"callable":a.isTypeLike?"type":"symbol",fileKind:U(a.relativePath),matches:r,focusLocations:Dt(e,n),matchedTerms:r.map(l=>l.term),symbolMatchedTerms:t,symbolPhraseLength:e.symbolPhraseLength,identityMatchedTerms:o,rarity:s,symbolRarity:m,queryPathMatches:gt(a.relativePath,i),...e.sourceCharacters===void 0?{}:{sourceCharacters:e.sourceCharacters}}}function On(e,n,i,a,r,o,t,s){let m=a.filter(b=>!$(b)),l=n.calleeMap(m,{additive:!1,semantic:s}),c=new Map,d=new Map;for(let b of i){let v=r.get(b.symbol),S=v?$(v)?nn(e,v,r,o,1):ve(e,v,l.get(v.symbolId)??[],r,1,t):[];c.set(b.symbol,S);for(let M of S){let f=r.get(M.toSymbol);f?.isFunctionLike&&(!v||!$(v)||$(f))&&d.set(f.symbol,f)}}let u=[...d.values()],h=n.calleeMap(u.filter(b=>!$(b)),{additive:!1,semantic:s}),y=new Map;for(let b of u)y.set(b.symbol,$(b)?nn(e,b,r,o,2):ve(e,b,h.get(b.symbolId)??[],r,2,t));return i.map(b=>{let v=c.get(b.symbol)??[],S=v.flatMap(f=>y.get(f.toSymbol)??[]),M=K([...v,...S]);return{root:b,relations:M,nodeSymbols:new Set([b.symbol,...M.flatMap(f=>[f.fromSymbol,f.toSymbol])])}})}function ve(e,n,i,a,r,o=new Set){let t=new Map;for(let s of i){let m=a.get(s.symbol);if(!m?.isFunctionLike||m.symbol===n.symbol||s.source==="ast-callsite"&&!Gn(e,n,m,s.callsiteLine))continue;let l=t.get(m.symbol);(!l||pt(s,l)<0)&&t.set(m.symbol,s)}return[...t.entries()].map(([s,m])=>{let l=a.get(s);return{kind:"call",fromSymbol:n.symbol,fromLabel:te(n.symbol),fromFile:n.relativePath,toSymbol:l.symbol,toLabel:te(l.symbol),toFile:l.relativePath,depth:r,strength:ke(m.source),evidence:m.source,callsiteLine:m.callsiteLine??Nn(e,n,l)}}).sort((s,m)=>Number(o.has(m.toSymbol))-Number(o.has(s.toSymbol))||X(s,m)).slice(0,vn)}function nn(e,n,i,a,r){let o=ge(e,n.relativePath,n.startLine,n.endLine).targets.flatMap(t=>{let s=i.get(t.definition.symbol)??t.definition;return!s.isFunctionLike||s.symbol===n.symbol?[]:[{kind:"call",fromSymbol:n.symbol,fromLabel:W(n),fromFile:n.relativePath,toSymbol:s.symbol,toLabel:W(s),toFile:s.relativePath,depth:r,strength:"exact",evidence:"scip-occurrence-callsite",callsiteLine:t.sourceLine}]});for(let t of Pe(e,n.relativePath,{ranges:[{startLine:n.startLine,endLine:n.endLine}],excludeIndexedTargets:!1}).targets){let s=[...a.get(`${t.targetFile}\0${E(t.calleeLeaf)}`)??[],...be(e,t.targetFile).filter(m=>m.isFunctionLike&&E(m.leaf)===t.calleeLeaf)].find(m=>m.startLine===t.targetStartLine&&m.endLine===t.targetEndLine);!s||s.symbol===n.symbol||o.push({kind:"call",fromSymbol:n.symbol,fromLabel:W(n),fromFile:n.relativePath,toSymbol:s.symbol,toLabel:W(s),toFile:s.relativePath,depth:r,strength:t.strength==="exact"?"exact":"derived",evidence:"ast-member-import-candidate",callsiteLine:t.line})}for(let t of Q(e,n.relativePath)?.callSites??[]){if(t.line<n.startLine||t.line>n.endLine||t.memberAccess)continue;let s=(a.get(`${n.relativePath}\0${E(t.calleeLeaf)}`)??[]).filter(l=>l.symbol!==n.symbol);if(s.length!==1)continue;let m=s[0];o.push({kind:"call",fromSymbol:n.symbol,fromLabel:W(n),fromFile:n.relativePath,toSymbol:m.symbol,toLabel:W(m),toFile:m.relativePath,depth:r,strength:"derived",evidence:"ast-callsite",callsiteLine:t.line})}return K(o).sort(X)}function Nn(e,n,i){let a=E(i.leaf);return Q(e,n.relativePath)?.callSites.find(r=>r.line>=n.startLine&&r.line<=n.endLine&&E(r.calleeLeaf)===a)?.line??null}function Gn(e,n,i,a){if(a===void 0)return!1;let r=E(i.leaf);return Q(e,n.relativePath)?.callSites.some(o=>{if(o.line!==a)return!1;if(E(o.calleeLeaf)===r)return!0;let t=Xe(e,n.relativePath,o.calleeLeaf);return t!==null&&E(t.importedName)===r&&Ge(t.sourcePath,i.relativePath)})??!1}function $n(e,n,i,a,r){let o=new Map(n.map((c,d)=>[c.symbol,d])),t=n.map((c,d)=>d),s=c=>{let d=c;for(;t[d]!==d;)d=t[d];for(;t[c]!==c;){let u=t[c];t[c]=d,c=u}return d},m=(c,d)=>{let u=s(c),h=s(d);u!==h&&(t[h]=u)};for(let c of e){let d=o.get(c.root.symbol);if(d!==void 0)for(let u of c.nodeSymbols){let h=o.get(u);h!==void 0&&m(d,h)}}let l=new Map;for(let c=0;c<n.length;c+=1){let d=s(c),u=l.get(d)??[];u.push(n[c]),l.set(d,u)}return[...l.values()].map((c,d)=>{let u=new Set(c.map(f=>f.symbol)),h=K(e.filter(f=>u.has(f.root.symbol)).flatMap(f=>f.relations)).sort(X),y=new Map(c.map(f=>[f.symbol,f]));for(let f of new Set(h.flatMap(C=>[C.fromSymbol,C.toSymbol]))){let C=i.get(f);if(C)y.has(f)||y.set(f,Se(C,a));else{let A=r.get(f);A&&y.set(f,hn(A))}}let b=at(c,h,y),v=c.filter(f=>h.some(C=>C.fromSymbol===f.symbol)).length,S=[...new Set(c.flatMap(f=>f.matchedTerms))].sort(),M=it(h,b,u,y);return{id:`anchor-set:${d+1}:${de(c[0])}`,kind:"connected-flow",roots:[...c].sort(R),keyAnchors:b,candidateOwnerCount:b.length,omittedCandidateOwners:[],ownerRecoveryCommands:[],upstreamEntries:[],matchedTerms:S,relations:M,relationCount:h.length,orchestrationRootCount:v,omittedRelations:Math.max(0,h.length-J),systemMapCommand:he(b,h,S)}})}function Xn(e,n,i){let a=new Map(i.map((o,t)=>[o,t])),r=[];for(let o=0;o<e.length;o+=1){let t=e[o],s=tn(t);if(s.size!==0)for(let m=o+1;m<e.length;m+=1){let l=e[m],c=tn(l),d=[...s].filter(A=>c.has(A));if(d.length===0||![...s].some(A=>!c.has(A))||![...c].some(A=>!s.has(A)))continue;let u=qn(t,l);if(u.length<2)continue;let h=K([...t.relations,...l.relations]).sort(X),y=h.slice(0,J),b=re([...t.roots,...l.roots]).sort(R),v=[...new Set([...t.matchedTerms,...l.matchedTerms])].sort(),S=d.sort((A,P)=>(a.get(A)??Number.MAX_SAFE_INTEGER)-(a.get(P)??Number.MAX_SAFE_INTEGER)||A.localeCompare(P)),M=+(t.relationCount>0)+ +(l.relationCount>0),f=+((t.orchestrationRootCount??0)>0)+ +((l.orchestrationRootCount??0)>0),C=Math.min(...S.map(A=>n.get(A)??Number.MAX_SAFE_INTEGER));r.push({sharedOrder:Math.min(...S.map(A=>a.get(A)??Number.MAX_SAFE_INTEGER)),sharedFrequency:C,connectedSides:M,orchestrationSides:f,group:{id:`parallel-paths:${de(t.roots[0])}:${de(l.roots[0])}`,kind:"parallel-paths",roots:b,keyAnchors:u,candidateOwnerCount:u.length,omittedCandidateOwners:[],ownerRecoveryCommands:[],upstreamEntries:[...t.upstreamEntries,...l.upstreamEntries],matchedTerms:v,relations:y,relationCount:h.length,parallelConnectedSides:M,parallelOrchestrationSides:f,parallelSharedPathTerms:S,parallelSharedPathFrequency:C,orchestrationRootCount:(t.orchestrationRootCount??0)+(l.orchestrationRootCount??0),omittedRelations:Math.max(0,h.length-y.length),systemMapCommand:he(u,h,v)}})}}return r.sort((o,t)=>o.sharedFrequency-t.sharedFrequency||t.orchestrationSides-o.orchestrationSides||t.connectedSides-o.connectedSides||o.sharedOrder-t.sharedOrder||t.group.matchedTerms.length-o.group.matchedTerms.length||Z(o.group,t.group,n)).slice(0,wn).map(o=>o.group)}function tn(e){return new Set(e.roots.flatMap(n=>n.matches.filter(i=>i.sources.includes("path")).map(i=>i.term)))}function qn(e,n){return re([on(e),on(n)].filter(i=>i!==void 0))}function on(e){let n=new Set(e.keyAnchors.map(a=>a.symbol)),i=new Map;for(let a of e.relations)!n.has(a.fromSymbol)||!n.has(a.toSymbol)||i.set(a.fromSymbol,(i.get(a.fromSymbol)??0)+1);return[...e.keyAnchors].sort((a,r)=>+((i.get(r.symbol)??0)>0)-+((i.get(a.symbol)??0)>0)||rn(r)-rn(a)||r.identityMatchedTerms.length-a.identityMatchedTerms.length||r.symbolMatchedTerms.length-a.symbolMatchedTerms.length||(i.get(r.symbol)??0)-(i.get(a.symbol)??0)||R(a,r))[0]}function rn(e){return e.matchedTerms.length+e.identityMatchedTerms.length*2+(e.queryPathMatches?.length??0)*4}function Kn(e,n,i,a,r,o){let t=We(e);if(!t||t.links.length===0||i.length<2)return[];let s=new Map(t.observations.map(h=>[h.id,h])),m=new Map,l=new Map,c=[...i].sort((h,y)=>Z(h,y,r)).slice(0,Dn),d=t.links.filter(h=>h.strength!=="candidate").sort((h,y)=>j(y.strength)-j(h.strength)||y.matchedKeyParts.length-h.matchedKeyParts.length||h.id.localeCompare(y.id));for(let h of c)for(let y of d){let b=s.get(y.from),v=s.get(y.to);if(!b||!v||!Bn(h,b,a))continue;let S=zn(h,b,a);if(!S)continue;let M=m.get(v.id)??jn(e,n,v,a,o,Cn);if(m.set(v.id,M),M.reachedSymbols.size===0)continue;let f=i.filter(D=>D.id!==h.id&&Un(D).some(_=>M.reachedSymbols.has(_))&&xe(S,D)>=2).sort((D,_)=>xe(S,_)-xe(S,D)||Z(D,_,r)).slice(0,Ln);if(f.length===0)continue;let C=[h.id,b.id,...f.map(D=>D.id).sort()].join("\0");if(l.has(C))continue;let A=new Set(f.flatMap(ue)),P=Zn(me(v),A,M.relations);if(P.length===0)continue;let I=Vn(b,v,y.joinRule,y.matchedKeyParts,y.strength),H=K([I,...M.relations,...h.relations,...f.flatMap(D=>D.relations)]),F=Jn([I,...P],H,h,f),B=re([S,...f.flatMap(D=>D.roots)]).sort(R),k=re([S,...f.flatMap(D=>D.keyAnchors)]).slice(0,Rn),q=[...new Set([...S.matchedTerms,...f.flatMap(D=>D.matchedTerms)])].sort(),ie=Wn(e,n,S,a,o);B.length===0||k.length<2||l.set(C,{id:`cross-boundary-set:${de(S)}:${l.size+1}`,kind:"cross-boundary-flow",roots:B,keyAnchors:k,candidateOwnerCount:k.length,omittedCandidateOwners:[],ownerRecoveryCommands:[],upstreamEntries:ie,matchedTerms:q,relations:F,relationCount:H.length,omittedRelations:Math.max(0,H.length-F.length),systemMapCommand:he(k,H,q)})}let u=new Map;for(let[h,y]of l){let b=h.slice(0,h.indexOf("\0")),v=u.get(b);(!v||Z(y,v,r)<0)&&u.set(b,y)}return[...u.values()]}function Bn(e,n,i){let a=new Set(ue(e));return n.owner.symbol&&a.has(n.owner.symbol)?!0:[...a].map(r=>i.get(r)).some(r=>r?.relativePath===n.source.file&&r.startLine<=n.source.startLine&&r.endLine>=n.source.endLine)}function zn(e,n,i){let a=re([...e.roots,...e.keyAnchors]);if(n.owner.symbol){let r=a.find(o=>o.symbol===n.owner.symbol);if(r)return r}return a.find(r=>{let o=i.get(r.symbol);return o?.relativePath===n.source.file&&o.startLine<=n.source.startLine&&o.endLine>=n.source.endLine})??null}function ue(e){return[...new Set([...e.roots.map(n=>n.symbol),...e.keyAnchors.map(n=>n.symbol),...e.relations.flatMap(n=>[n.fromSymbol,n.toSymbol])])]}function Un(e){return[...new Set([...e.roots,...e.keyAnchors].map(n=>n.symbol))]}function xe(e,n){let i=T(e.leaf),a=[...n.roots,...n.keyAnchors].map(o=>T(o.leaf)),r=0;for(let o of a){let t=0;for(let s of i)o.has(s)&&(t+=1);r=Math.max(r,t)}return r}function Wn(e,n,i,a,r){let o=a.get(i.symbol);if(!o?.isFunctionLike)return[];let t=n.callerFileMap([o],{semantic:r,sourceFallback:!0}).get(o.symbolId);if(!t)return[];let s=T(i.leaf);return[...t].filter(m=>m!==i.file&&U(m)!=="test").flatMap(m=>{let l=Q(e,m);return(l?.callSites??[]).filter(c=>E(c.calleeLeaf)===E(i.leaf)).flatMap(c=>{let d=(l?.callables??[]).filter(h=>h.startLine<=c.line&&h.endLine>=c.line).sort((h,y)=>h.endLine-h.startLine-(y.endLine-y.startLine)||h.startLine-y.startLine)[0];if(!d)return[];let u=[...T(d.name)].filter(h=>s.has(h)).length;return u>=2?[{name:d.name,file:m,line:d.startLine,endLine:d.endLine,callsiteLine:c.line,overlap:u}]:[]})}).sort((m,l)=>l.overlap-m.overlap||m.file.localeCompare(l.file)||m.line-l.line).slice(0,1).map(({name:m,file:l,line:c,endLine:d,callsiteLine:u})=>({name:m,file:l,line:c,endLine:d,callsiteLine:u}))}function jn(e,n,i,a,r,o){let t=Hn(e,i,a),s=t.map(({definition:u,evidence:h,line:y})=>({kind:"call",fromSymbol:me(i),fromLabel:Ae(i),fromFile:i.source.file,toSymbol:u.symbol,toLabel:te(u.symbol),toFile:u.relativePath,depth:1,strength:h==="scip-occurrence-callsite"?"exact":"derived",evidence:h,callsiteLine:y})),m=Yn(e,i);s.push(...m.relations);let l=un([...t.map(u=>u.definition),...m.definitions]),c=l,d=new Set(c.map(u=>u.symbol));for(let u=2;u<=o+1&&c.length>0;u+=1){let h=n.calleeMap(c,{additive:!1,semantic:r}),y=new Map;for(let b of c){let v=ve(e,b,h.get(b.symbolId)??[],a,u);s.push(...v);for(let S of v){let M=a.get(S.toSymbol);M?.isFunctionLike&&!d.has(M.symbol)&&y.set(M.symbol,M)}}c=[...y.values()];for(let b of c)d.add(b.symbol)}return{entryDefinitions:l,relations:K(s),reachedSymbols:new Set([...l.map(u=>u.symbol),...s.flatMap(u=>[u.fromSymbol,u.toSymbol])])}}function Hn(e,n,i){let a=n.owner.symbol?i.get(n.owner.symbol):void 0;if(a?.isFunctionLike&&!oe(a.symbol))return[{definition:a,evidence:"scip-occurrence-callsite",line:n.source.startLine}];let r=we(e,n.source.file),o=Te(e,n.source.file,0,Math.max(0,r.length-1),[n.source.startLine]),t=ge(e,n.source.file,o.startLine,o.endLine).targets.map(c=>({definition:c.definition,evidence:"scip-occurrence-callsite",line:c.sourceLine})),s=Q(e,n.source.file),m=ze(e),l=(s?.callSites??[]).flatMap(c=>{if(c.line<o.startLine||c.line>o.endLine)return[];let d=Ke(n.source.file,m.get(c.calleeLeaf)??[]),u=Be(e,n.source.file,d,c.memberAccess,c.calleeQualifier),h=u?i.get(u.symbol):void 0;return h?.isFunctionLike?[{definition:h,evidence:"ast-callsite",line:c.line}]:[]});return Qn([...t,...l])}function Yn(e,n){let i=we(e,n.source.file),a=Te(e,n.source.file,0,Math.max(0,i.length-1),[n.source.startLine]),r=Pe(e,n.source.file,{ranges:[a],excludeIndexedTargets:!1}).targets,o=[],t=[];for(let s of r){let m=`source-construct:${s.targetFile}:${s.targetStartLine}:${s.targetEndLine}:${s.calleeLeaf}`;t.push({kind:"call",fromSymbol:me(n),fromLabel:Ae(n),fromFile:n.source.file,toSymbol:m,toLabel:s.calleeLeaf,toFile:s.targetFile,depth:1,strength:"derived",evidence:"ast-member-import-candidate",callsiteLine:s.line});let l=ge(e,s.targetFile,s.targetStartLine,s.targetEndLine).targets;for(let c of l)o.push(c.definition),t.push({kind:"call",fromSymbol:m,fromLabel:s.calleeLeaf,fromFile:s.targetFile,toSymbol:c.definition.symbol,toLabel:te(c.definition.symbol),toFile:c.definition.relativePath,depth:2,strength:"exact",evidence:"scip-occurrence-callsite",callsiteLine:c.sourceLine})}return{definitions:un(o),relations:K(t)}}function Qn(e){return[...new Map(e.map(n=>[n.definition.symbol,n])).values()]}function un(e){return[...new Map(e.map(n=>[n.symbol,n])).values()]}function me(e){return e.owner.symbol??e.id}function Ae(e){return e.owner.name??`${e.source.file}:${e.source.startLine+1}`}function Vn(e,n,i,a,r){return{kind:"runtime-boundary",fromSymbol:me(e),fromLabel:Ae(e),fromFile:e.source.file,toSymbol:me(n),toLabel:Ae(n),toFile:n.source.file,depth:1,strength:r,evidence:`runtime-boundary:${i}`,callsiteLine:e.source.startLine,runtimeBoundaryKey:a.map(o=>`${o.name}=${o.value}`).join(" ")}}function Zn(e,n,i){let a=new Map;for(let t of i){let s=a.get(t.fromSymbol)??[];s.push(t),a.set(t.fromSymbol,s)}let r=[{symbol:e,path:[]}],o=new Set([e]);for(;r.length>0;){let t=r.shift();if(t.path.length>0&&n.has(t.symbol))return t.path;for(let s of(a.get(t.symbol)??[]).sort(X))o.has(s.toSymbol)||(o.add(s.toSymbol),r.push({symbol:s.toSymbol,path:[...t.path,s]}))}return[]}function Jn(e,n,i,a){let r=K(e),o=new Set([i,...a].flatMap(t=>[...ue(t),...t.keyAnchors.map(s=>s.symbol)]));for(let t of n){if(r.length>=J)break;!o.has(t.fromSymbol)&&!o.has(t.toSymbol)||r.some(s=>s.fromSymbol===t.fromSymbol&&s.toSymbol===t.toSymbol)||r.push(t)}return r.slice(0,J)}function et(e,n,i,a,r,o,t,s){let m=i.filter(c=>!c.root.symbol.startsWith(_e)).map(c=>({root:c.root,relations:c.relations.filter(d=>d.depth===1&&d.fromSymbol===c.root.symbol)}));return nt(m).flatMap((c,d)=>{let u=new Set(c.map(p=>p.root.symbol)),h=new Map;for(let p of c)for(let w of new Set(p.relations.map(ee=>ee.toSymbol)))h.set(w,(h.get(w)??0)+1);let y=[...h].filter(([,p])=>p>=2).sort(([p,w],[ee,ye])=>ye-w||tt(p,ee,a,r,t)).map(([p])=>t.get(p)).filter(p=>p?.isFunctionLike===!0).slice(0,An);if(y.length===0)return[];let b=n.callerFileMap(y,{semantic:s,sourceFallback:!0}),v=new Set;for(let p of y){v.add(p.relativePath);for(let w of b.get(p.symbolId)??[])v.add(w)}let S=o.filter(p=>p.isFunctionLike&&v.has(p.relativePath)).sort(ot).slice(0,Mn),M=n.calleeMap(S,{additive:!1,semantic:s}),f=new Set(y.map(p=>p.symbol)),C=K(S.flatMap(p=>ve(e,p,M.get(p.symbolId)??[],t,1,f).filter(w=>f.has(w.toSymbol)))),A=new Map;for(let p of C){let w=A.get(p.fromSymbol)??new Set;w.add(p.toSymbol),A.set(p.fromSymbol,w)}let P=new Set([...A].filter(([p,w])=>w.size>=2||u.has(p)).map(([p])=>p)),I=C.filter(p=>P.has(p.fromSymbol));if(P.size<2||I.length===0)return[];let F=[...new Set(I.map(p=>p.toSymbol))].map(p=>Me(p,a,r,t)).filter(p=>p!==null).sort(R),B=[...P].map(p=>Me(p,a,r,t)).filter(p=>p!==null),k=rt(B,I),q=k.slice(0,Ie),ie=k.slice(Ie);if(F.length===0||q.length===0)return[];let D=[...new Set([...F.flatMap(p=>p.matchedTerms),...c.flatMap(p=>p.root.matchedTerms)])].sort(),_=st(I,q);return[{id:`effect-owner-set:${d+1}:${de(F[0])}`,kind:"shared-callee-owners",roots:F,keyAnchors:q,candidateOwnerCount:k.length,omittedCandidateOwners:ie,ownerRecoveryCommands:Lt(ie,Ie),upstreamEntries:[],matchedTerms:D,relations:_,relationCount:I.length,omittedRelations:Math.max(0,I.length-_.length),systemMapCommand:he(q,I,D)}]})}function nt(e){let n=e.map((t,s)=>s),i=t=>{for(;n[t]!==t;)n[t]=n[n[t]],t=n[t];return t},a=(t,s)=>{let m=i(t),l=i(s);m!==l&&(n[l]=m)},r=e.map(t=>new Set(t.relations.map(s=>s.toSymbol)));for(let t=0;t<e.length;t+=1)for(let s=t+1;s<e.length;s+=1){let m=0;for(let l of r[t]??[])if((r[s]??new Set).has(l)&&(m+=1),m>=2)break;m>=2&&a(t,s)}let o=new Map;for(let t=0;t<e.length;t+=1){let s=i(t),m=o.get(s)??[];m.push(e[t]),o.set(s,m)}return[...o.values()].filter(t=>t.length>=2)}function tt(e,n,i,a,r){let o=Me(e,i,a,r),t=Me(n,i,a,r);return o?t?R(o,t):-1:t?1:e.localeCompare(n)}function ot(e,n){return x(U(e.relativePath))-x(U(n.relativePath))||e.relativePath.localeCompare(n.relativePath)||e.startLine-n.startLine}function Me(e,n,i,a){let r=n.get(e);if(r)return Se(r,i);let o=a.get(e);return o?hn(o):null}function rt(e,n){let i=new Map;for(let r of n){let o=i.get(r.toSymbol)??new Set;o.add(r.fromSymbol),i.set(r.toSymbol,o)}let a=new Map;for(let r of n){let o=i.get(r.toSymbol)?.size??1;a.set(r.fromSymbol,(a.get(r.fromSymbol)??0)+o*o)}return[...e].sort((r,o)=>Number(r.leaf.startsWith("#"))-Number(o.leaf.startsWith("#"))||o.identityMatchedTerms.length-r.identityMatchedTerms.length||(a.get(o.symbol)??0)-(a.get(r.symbol)??0)||R(r,o))}function st(e,n){let i=new Map(n.map((t,s)=>[t.symbol,s])),a=n.map(t=>e.filter(s=>s.fromSymbol===t.symbol).sort(X)),r=[],o=0;for(;r.length<J&&a.some(t=>o<t.length);){for(let t of a){let s=t[o];if(s&&r.push(s),r.length>=J)break}o+=1}return r.sort((t,s)=>i.get(t.fromSymbol)-i.get(s.fromSymbol)||X(t,s))}function it(e,n,i,a){let r=new Map(n.map((s,m)=>[s.symbol,m])),o=new Map;for(let s of e)o.set(s.fromSymbol,(o.get(s.fromSymbol)??0)+1);return[...e].sort((s,m)=>{let l=c=>{let d=0;return r.has(c.fromSymbol)&&(d+=100),i.has(c.toSymbol)&&(d+=60),d+=Math.min(40,(o.get(c.toSymbol)??0)*8),(a.get(c.toSymbol)?.matchedTerms.length??0)>0&&(d+=25),c.fromFile!==c.toFile&&(d+=15),c.strength==="exact"&&(d+=5),d};return l(m)-l(s)||X(s,m)}).slice(0,J).sort((s,m)=>(r.get(s.fromSymbol)??V)-(r.get(m.fromSymbol)??V)||s.depth-m.depth||(s.callsiteLine??Number.MAX_SAFE_INTEGER)-(m.callsiteLine??Number.MAX_SAFE_INTEGER)||X(s,m))}function hn(e){return{symbol:e.symbol,label:W(e),leaf:e.leaf,file:e.relativePath,line:e.startLine,endLine:e.endLine,kind:e.isFunctionLike?"callable":e.isTypeLike?"type":"symbol",fileKind:U(e.relativePath),matches:[],focusLocations:[],matchedTerms:[],symbolMatchedTerms:[],symbolPhraseLength:0,identityMatchedTerms:[],rarity:0,symbolRarity:0}}function at(e,n,i){let a=[...e].sort(R),r=[],o=new Map;for(let c of n)o.set(c.fromSymbol,(o.get(c.fromSymbol)??0)+1);let t=new Set,s=new Set,m=c=>{if(!(!c||r.some(d=>d.symbol===c.symbol))){r.push(c);for(let d of c.matchedTerms)t.add(d);for(let d of c.symbolMatchedTerms)s.add(d)}},l=a.filter(c=>c.symbolPhraseLength>=2&&(o.get(c.symbol)??0)>=2);for(;r.length<Math.min(2,V);){let c=l.filter(d=>!r.some(u=>u.symbol===d.symbol)).sort((d,u)=>u.symbolMatchedTerms.filter(h=>!s.has(h)).length-d.symbolMatchedTerms.filter(h=>!s.has(h)).length||u.symbolPhraseLength-d.symbolPhraseLength||(o.get(u.symbol)??0)-(o.get(d.symbol)??0)||Ee(d,u))[0];if(!c||r.length>0&&c.symbolMatchedTerms.every(d=>s.has(d)))break;m(c)}if(m(a[0]),r.length>=2){let c=ct(r[0].symbol,r[1].symbol,n,i);for(let d of c?.slice(1,-1)??[]){if(r.length>=V)break;m(i.get(d))}if(r.length<V){let d=new Set(r.map(y=>y.symbol)),u=new Set(n.filter(y=>y.depth===1&&d.has(y.fromSymbol)&&d.has(y.toSymbol)).map(y=>y.fromSymbol)),h=n.filter(y=>y.depth===1&&u.has(y.fromSymbol)&&!d.has(y.toSymbol)).map(y=>({relation:y,candidate:i.get(y.toSymbol)})).filter(y=>y.candidate!==void 0&&y.candidate.symbolPhraseLength>=2&&y.candidate.symbolMatchedTerms.length>=2).sort((y,b)=>(o.get(y.relation.fromSymbol)??0)-(o.get(b.relation.fromSymbol)??0)||Ee(y.candidate,b.candidate))[0]?.candidate;m(h)}}else for(;r.length<Math.min(3,V);){let c=a.filter(d=>!r.some(u=>u.symbol===d.symbol)).sort((d,u)=>u.matchedTerms.filter(h=>!t.has(h)).length-d.matchedTerms.filter(h=>!t.has(h)).length||R(d,u))[0];if(!c||c.matchedTerms.every(d=>t.has(d)))break;m(c)}for(;r.length>=2&&r.length<V;){let c=new Set(r.map(u=>u.symbol)),d=[...i.values()].filter(u=>!c.has(u.symbol)&&(o.get(u.symbol)??0)>0&&n.some(h=>c.has(h.fromSymbol)&&h.toSymbol===u.symbol)).sort((u,h)=>h.identityMatchedTerms.length-u.identityMatchedTerms.length||h.symbolMatchedTerms.length-u.symbolMatchedTerms.length||h.matchedTerms.length-u.matchedTerms.length||(o.get(h.symbol)??0)-(o.get(u.symbol)??0)||R(u,h))[0];if(!d)break;m(d)}if(r.length<2){let c=r[0],d=c?a.filter(u=>u.symbol!==c.symbol).map(u=>({root:u,path:lt(u.symbol,c.symbol,n)})).filter(u=>u.path!==null).sort((u,h)=>+(h.root.file!==c.file)-+(u.root.file!==c.file)||u.path.length-h.path.length||R(u.root,h.root))[0]?.root:void 0;m(d)}return r}function ct(e,n,i,a){let r=new Map;for(let s of i){let m=r.get(s.fromSymbol)??new Set;m.add(s.toSymbol),r.set(s.fromSymbol,m);let l=r.get(s.toSymbol)??new Set;l.add(s.fromSymbol),r.set(s.toSymbol,l)}let o=[{path:[e],cost:0}],t=new Map([[e,0]]);for(;o.length>0;){o.sort((c,d)=>c.cost-d.cost||c.path.length-d.path.length);let{path:s,cost:m}=o.shift(),l=s.at(-1);if(l===n)return s;for(let c of r.get(l)??[]){let d=a.get(c),u=c===n?1:!d||d.matchedTerms.length===0?9:d.symbolPhraseLength>=2?1:d.identityMatchedTerms.length>=2?2:4,h=m+u;h>=(t.get(c)??Number.POSITIVE_INFINITY)||(t.set(c,h),o.push({path:[...s,c],cost:h}))}}return null}function lt(e,n,i){let a=new Map;for(let t of i){let s=a.get(t.fromSymbol)??[];s.push(t.toSymbol),a.set(t.fromSymbol,s)}let r=[[e]],o=new Set([e]);for(;r.length>0;){let t=r.shift(),s=t.at(-1);if(s===n)return t;for(let m of a.get(s)??[])o.has(m)||(o.add(m),r.push([...t,m]))}return null}function R(e,n){return(n.queryPathMatches?.length??0)-(e.queryPathMatches?.length??0)||n.identityMatchedTerms.length-e.identityMatchedTerms.length||n.matchedTerms.length-e.matchedTerms.length||n.rarity-e.rarity||se(e.kind)-se(n.kind)||x(e.fileKind)-x(n.fileKind)||e.file.localeCompare(n.file)||e.line-n.line}function Ee(e,n){return n.symbolPhraseLength-e.symbolPhraseLength||n.symbolMatchedTerms.length-e.symbolMatchedTerms.length||se(e.kind)-se(n.kind)||n.symbolRarity-e.symbolRarity||R(e,n)}function mt(e,n){return n.flatMap(i=>{let a=e.filter(t=>t.matchedTerms.includes(i)).sort((t,s)=>ut(t,s,i)),r=[],o=new Set;for(let t of a)if(!o.has(t.file)&&(r.push(t),o.add(t.file),r.length>=Qe))return r;for(let t of a)if(!r.some(s=>s.symbol===t.symbol)&&(r.push(t),r.length>=Qe))break;return r})}function dt(e,n,i){let a=new Set(n),r=new Map;for(let o of e){if(o.kind!=="callable")continue;let t=o.file.slice(o.file.lastIndexOf("/")+1).replace(/\.[^.]+$/u,"");if(![...T(t)].some(m=>a.has(m)))continue;let s=r.get(o.file)??[];s.push(o),r.set(o.file,s)}return[...r.entries()].map(([o,t])=>{let s=o.slice(o.lastIndexOf("/")+1).replace(/\.[^.]+$/u,""),m=[...T(s)].filter(l=>a.has(l));return{file:o,fileCandidates:t,sharedFrequency:Math.min(...m.map(l=>i.get(l)??Number.MAX_SAFE_INTEGER))}}).sort((o,t)=>x(o.fileCandidates[0].fileKind)-x(t.fileCandidates[0].fileKind)||o.sharedFrequency-t.sharedFrequency||o.file.localeCompare(t.file)).flatMap(({fileCandidates:o})=>[...o].sort(R).slice(0,xn)).slice(0,In)}function ut(e,n,i){return sn(e,i)-sn(n,i)||x(e.fileKind)-x(n.fileKind)||n.symbolPhraseLength-e.symbolPhraseLength||se(e.kind)-se(n.kind)||R(e,n)}function sn(e,n){let i=e.matches.find(a=>a.term===n)?.sources??[];return Math.min(...i.map(Fe),Number.MAX_SAFE_INTEGER)}function re(e){return[...new Map(e.map(n=>[n.symbol,n])).values()]}function Z(e,n,i){let a=new Set(e.roots.flatMap(o=>o.symbolMatchedTerms)),r=new Set(n.roots.flatMap(o=>o.symbolMatchedTerms));return(n.queryPathMatches?.length??0)-(e.queryPathMatches?.length??0)||mn(e.kind)-mn(n.kind)||cn(e)-cn(n)||ln(e)-ln(n)||(e.kind==="parallel-paths"&&n.kind==="parallel-paths"?(e.parallelSharedPathFrequency??Number.MAX_SAFE_INTEGER)-(n.parallelSharedPathFrequency??Number.MAX_SAFE_INTEGER)||(n.parallelOrchestrationSides??0)-(e.parallelOrchestrationSides??0)||(n.parallelSharedPathTerms?.length??0)-(e.parallelSharedPathTerms?.length??0):0)||an(n,i)-an(e,i)||n.matchedTerms.length-e.matchedTerms.length||Math.max(...n.roots.map(o=>o.symbolPhraseLength))-Math.max(...e.roots.map(o=>o.symbolPhraseLength))||r.size-a.size||R(e.roots[0],n.roots[0])||n.roots.length-e.roots.length||e.relationCount-n.relationCount||e.id.localeCompare(n.id)}function an(e,n){return e.matchedTerms.reduce((i,a)=>i+1/Math.max(1,n.get(a)??1),0)}function ht(e){return[...new Set(e.roots.flatMap(n=>n.queryPathMatches??[]))].sort()}function cn(e){let n=e.keyAnchors.length>0?e.keyAnchors:e.roots;return Math.max(...n.map(i=>x(i.fileKind)))}function ln(e){return e.kind==="parallel-paths"?2-(e.parallelConnectedSides??0):e.kind!=="connected-flow"||e.relationCount>0?0:1}function yt(e,n,i){let a=e.slice(0,n);if(n<2||a.some(o=>o.kind==="shared-callee-owners"))return a;let r=e.filter(o=>o.kind==="shared-callee-owners");for(let o of a){if(o.kind==="shared-callee-owners"||o.kind==="parallel-paths")continue;let t=new Set(ue(o)),s=r.map(l=>({group:l,overlap:ft(l,t)})).filter(({overlap:l})=>l>0).sort(({group:l,overlap:c},{group:d,overlap:u})=>u-c||Z(l,d,i))[0]?.group;if(!s)continue;let m=a.length-1;for(;m>=0&&a[m]===o;)m-=1;return m<0?a:(a[m]=s,[...a].sort((l,c)=>Z(l,c,i)))}return a}function ft(e,n){return ue(e).filter(i=>n.has(i)).length}function mn(e){switch(e){case"cross-boundary-flow":return 0;case"parallel-paths":case"connected-flow":return 1;case"shared-callee-owners":return 2}}function X(e,n){return e.depth-n.depth||j(n.strength)-j(e.strength)||e.fromLabel.localeCompare(n.fromLabel)||e.toLabel.localeCompare(n.toLabel)||(e.callsiteLine??Number.MAX_SAFE_INTEGER)-(n.callsiteLine??Number.MAX_SAFE_INTEGER)}function pt(e,n){return j(ke(n.source))-j(ke(e.source))||(e.callsiteLine??Number.MAX_SAFE_INTEGER)-(n.callsiteLine??Number.MAX_SAFE_INTEGER)||e.symbol.localeCompare(n.symbol)}function K(e){let n=new Map;for(let i of e){let a=`${i.fromSymbol}\0${i.toSymbol}`,r=n.get(a);(!r||X(i,r)<0)&&n.set(a,i)}return[...n.values()]}function Le(e){return e.replace(/([\p{Ll}\d])([\p{Lu}])/gu,"$1 $2").replace(/([\p{Lu}]+)([\p{Lu}][\p{Ll}])/gu,"$1 $2").match(/[\p{L}\d]+/gu)??[]}function bt(e){let n=e.match(/[\p{L}\d_.-]+(?:\/[\p{L}\d_.-]+)+/gu)??[];return[...new Set(n.map(i=>i.replace(/[.;:!?]+$/gu,"").toLocaleLowerCase()))]}function gt(e,n){let i=e.replace(/\\/gu,"/").toLocaleLowerCase();return n.filter(a=>{let r=i.indexOf(a);if(r<0)return!1;let o=r===0?"/":i[r-1],t=i[r+a.length];return o==="/"&&(t===void 0||t==="/")})}function St(e,n){let i=Le(e).map(Oe),a=0;for(let r=0;r<i.length;r+=1)for(let o=0;o<n.length;o+=1){let t=0;for(;r+t<i.length&&o+t<n.length&&i[r+t]===n[o+t];)t+=1;a=Math.max(a,t)}return a}function T(e){return new Set(Le(e).flatMap(yn).filter(n=>n.length>=3))}function yn(e){let n=Oe(e);return n.length>4&&n.endsWith("e")?[n,n.slice(0,-1)]:[n]}function Oe(e){let n=e.toLocaleLowerCase();return n.length>5&&n.endsWith("ies")?`${n.slice(0,-3)}y`:n.length>4&&n.endsWith("ied")?`${n.slice(0,-3)}y`:n.length>4&&n.endsWith("ed")?dn(n.slice(0,-2)):n.length>5&&n.endsWith("ing")?dn(n.slice(0,-3)):n.length>4&&n.endsWith("ers")||n.length>3&&n.endsWith("s")&&!n.endsWith("ss")?n.slice(0,-1):n}function dn(e){if(e.length<2)return e;let n=e.at(-1),i=e.at(-2);return n===i&&!"aeiou".includes(n)?e.slice(0,-1):e}function vt(e,n){return Fe(e)-Fe(n)}function Fe(e){switch(e){case"symbol":return 0;case"path":return 1;case"documentation":return 2;case"source":return 3}}function se(e){return e==="callable"?0:e==="type"?1:2}function ke(e){return e==="semantic-callee"||e==="scip-chunk"||e==="scip-occurrence"?"exact":"derived"}function j(e){return e==="exact"?2:1}function fn(e,n){return e.file.localeCompare(n.file)||e.line-n.line}function de(e){return`${e.file}:${e.line+1}`}function he(e,n=[],i=[]){let a=e.map(t=>`--symbol ${De(`${t.file}:${t.line+1}-${t.endLine+1}`)}`),r=new Set(e.map(t=>t.symbol)),o=e.flatMap(t=>(t.sourceCharacters??0)>He?At(t,n,i,r).map(s=>`--focus-at ${De(`${s.file}:${s.line+1}`)}`):[]);return`scip-query system-map ${[...a,...o,"--relation call","--relation runtime-boundary"].join(" ")}`}function At(e,n,i,a){let r=new Set(i),o=n.filter(l=>l.fromSymbol===e.symbol&&l.callsiteLine!==null&&l.callsiteLine>=e.line&&l.callsiteLine<=e.endLine).map(l=>({file:e.file,line:l.callsiteLine,connectsAnchor:a.has(l.toSymbol),overlap:new Set(Le(Mt(l.toLabel)).flatMap(yn).filter(c=>r.has(c))).size,strength:l.strength})).filter(l=>l.overlap>0).sort((l,c)=>Number(c.connectsAnchor)-Number(l.connectsAnchor)||c.overlap-l.overlap||l.line-c.line||j(c.strength)-j(l.strength)),t=o.filter(l=>l.connectsAnchor),s=[...t.length>0?t:o,...t.length>0?[]:e.focusLocations.map(l=>({...l,connectsAnchor:!1,overlap:0,strength:"derived"}))],m=[];for(let l of s)if(!m.some(c=>c.file===l.file&&c.line===l.line)&&(m.push({file:l.file,line:l.line}),m.length>=3))break;return m}function Mt(e){return e.slice(Math.max(e.lastIndexOf(":"),e.lastIndexOf("."))+1)}function Dt(e,n){let i=new Map;for(let[o,t]of e.matches)for(let s of t.locations.values()){if(s.file!==e.definition.relativePath||s.line<e.definition.startLine||s.line>e.definition.endLine)continue;let m=`${s.file}\0${s.line}`,l=i.get(m)??{...s,matchedTerms:new Set};l.matchedTerms.add(o),i.set(m,l)}let a=[...i.values()].sort((o,t)=>t.matchedTerms.size-o.matchedTerms.size||[...t.matchedTerms].reduce((s,m)=>s+1/Math.max(1,n.get(m)??1),0)-[...o.matchedTerms].reduce((s,m)=>s+1/Math.max(1,n.get(m)??1),0)||fn(o,t)),r=[];for(let o of a)if(!r.some(t=>t.file===o.file&&Math.abs(t.line-o.line)<8)&&(r.push(o),r.length>=3))break;return r.map(o=>({file:o.file,line:o.line,matchedTerms:[...o.matchedTerms].sort()}))}function Lt(e,n){let i=[];for(let a=0;a<e.length;a+=n)i.push(he(e.slice(a,a+n)));return i}function De(e){return`'${e.replaceAll("'",`'"'"'`)}'`}export{Bt as a,En as b};
3
+ //# sourceMappingURL=chunk-DZOIKCTM.js.map
@@ -0,0 +1,2 @@
1
+ import{a as N}from"./chunk-VBV6ALJE.js";import{c as _}from"./chunk-2BMSSRBH.js";import{a as v}from"./chunk-BGBBVSH4.js";import{a as $}from"./chunk-U3SXIMII.js";import{d as m}from"./chunk-C7C6AKAT.js";import{k as A}from"./chunk-ETC674NS.js";var F=3,B=8,j=.75,G=2,U=.5,P=2,k=5,O=2,M=2;function ge(e,r={}){let{scope:i,minLoc:n=10,minCallees:s=6,limit:o=20,scanLimit:a}=r,t=new _(e);return N({candidates:()=>t.productionCallableDefinitions({scope:i,minLoc:n,excludeTypesFiles:!0,requireFunctionLikeSymbol:!0,sortByLocDesc:!0}),scanLimit:a,profile:{name:"extract-candidates"},prepare:c=>({callees:t.calleeMap(c,{semantic:r.semantic!==!1})}),evaluate:(c,u)=>K(c,u.callees.get(c.symbolId)??[],s,X(e,c.relativePath)),orderResults:(c,u)=>L(c.actionTier)-L(u.actionTier)||u.regions[0].lines-c.regions[0].lines||u.loc-c.loc,limit:o})}function L(e){return e==="signal"?0:1}function X(e,r){let i=$(e,r)?.locals??[];return{available:i.length>0,occurrences:i,lines:A(e,r)}}function K(e,r,i,n){let{uses:s,unpositioned:o}=J(e,r);if(s.length<i)return null;let a=v(e),t=[],c=[];for(let l of s){let d=Math.min(...l.lines),p=Math.max(...l.lines);l.lines.length>=2&&p-d+1>=U*a?t.push(l):c.push({symbol:l.symbol,min:d,max:p,render:l.render})}let u=new Set(s.flatMap(l=>l.lines)),f=q(Y(c),n.lines,z(e,n.lines)).map(l=>Z(l,e,n.lines,u)),h=f.filter(l=>te(l,c.length,a)).map(l=>se(e,l,t,n)).sort((l,d)=>d.lines-l.lines||l.startLine-d.startLine);if(h.length===0)return null;let x=new Set(s.flatMap(l=>l.lines)),b=[...h].sort((l,d)=>{let p=L(w(l,n.available,R(n.lines,l,x)).tier),D=L(w(d,n.available,R(n.lines,d,x)).tier);return p-D||d.lines-l.lines||l.startLine-d.startLine})[0],g=[`${s.length} callees placed on call lines across ${a} lines`+(o>0?`; ${o} callee row(s) without a call line ignored`:"")];t.length>0&&g.push(`${t.length} ambient callee(s) used across the body: ${t.map(l=>m(l.symbol)).join(", ")}`);for(let l of h)g.push(`lines ${l.startLine+1}-${l.endLine+1} (${l.lines} lines) use ${l.callees.length} callees exclusively`+(n.available?`; ${l.inboundLocals.length} local(s) in, ${l.outboundLocals.length} out`:"; local data flow unknown"));g.push(`${c.length-re(f,b)} callee(s) stay outside the largest region`);let I=R(n.lines,b,x),S=w(b,n.available,I);return g.push(S.reason),{symbol:e.symbol,shortName:m(e.symbol),relativePath:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:a,totalCallees:s.length,unpositionedCallees:o,ambientCallees:t.map(l=>m(l.symbol)),localsAvailable:n.available,extractionKind:b.kind,actionTier:S.tier,tierReason:S.reason,ownReturnsInRegion:I,evidenceReasons:g,recommendation:ae(b,n.available),regions:h}}function J(e,r){let i=new Map,n=new Set;for(let o of r){if(o.symbol===e.symbol)continue;let a=o.callsiteLine;if(a===void 0||a<e.startLine||a>e.endLine){n.add(o.symbol);continue}let t=i.get(o.symbol);t?(t.lines.includes(a)||t.lines.push(a),t.render||=o.kind==="jsx-render"):i.set(o.symbol,{symbol:o.symbol,lines:[a],render:o.kind==="jsx-render"})}let s=0;for(let o of n)i.has(o)||(s+=1);return{uses:[...i.values()],unpositioned:s}}function Y(e){let r=[...e].sort((n,s)=>n.min-s.min||n.max-s.max),i=[];for(let n of r){let s=i[i.length-1];s&&n.min<=s.end?(s.end=Math.max(s.end,n.max),s.members.push(n)):i.push({start:n.min,end:n.max,members:[n]})}return i}function q(e,r,i){let n=[];for(let s of e){let o=n[n.length-1],a=o!==void 0&&!E(o)&&!E(s)&&!H(r,o.end,s.start,i);o&&(s.start-o.end<=P||a)?(o.end=s.end,o.members.push(...s.members)):n.push({start:s.start,end:s.end,members:[...s.members]})}return n}function E(e){return e.members.some(r=>r.render)}function z(e,r){for(let i=e.startLine+1;i<e.endLine;i+=1){let n=r[i]??"";if(n.trim().length>0)return y(n)}return 0}function H(e,r,i,n){for(let s=r+1;s<i;s+=1){let o=e[s]??"";if(o.trim().length!==0&&y(o)===n)return!0}return!1}function Z(e,r,i,n){let s=e.start,o=e.end;for(let a=0;a<M;a+=1){let t=s-1;if(t<=r.startLine||n.has(t)||!ee(i[t]??""))break;s=t}for(let a=0;a<M;a+=1){let t=o+1;if(t>=r.endLine||n.has(t)||!ne(i[t]??""))break;o=t}if(E(e)){let a=C(i,s,o);for(let t=0;a>0&&t<T&&o+1<r.endLine;t+=1)o+=1,a=C(i,s,o);for(let t=0;a<0&&t<T&&s-1>r.startLine&&!/^\s*return\b/.test(i[s-1]??"");t+=1)s-=1,a=C(i,s,o)}return{start:s,end:o,members:e.members}}var T=40,V=/<([A-Za-z][\w.:-]*)(?=[\s/>])/g,Q=/<\/[A-Za-z][\w.:-]*\s*>/g,W=/\/>/g;function C(e,r,i){let n=0;for(let s=r;s<=i;s+=1){let o=e[s]??"";n+=(o.match(V)??[]).length,n-=(o.match(Q)??[]).length,n-=(o.match(W)??[]).length}return n}function ee(e){let r=e.trim();return r.length>0&&/(?:\{|\(|\[|=>|:)$/u.test(r)&&!/^(?:\/\/|\*|\/\*)/u.test(r)}function ne(e){return/^[\s)\]}>;,]+$/u.test(e)&&e.trim().length>0}function te(e,r,i){let n=e.end-e.start+1;return e.members.length>=F&&n>=B&&n<=j*i&&r-e.members.length>=G}function re(e,r){return e.find(i=>i.start===r.startLine&&i.end===r.endLine)?.members.length??0}function se(e,r,i,n){let s=[...r.members].sort((t,c)=>t.min-c.min),o=s.filter(t=>t.render).length,a=oe(e,r,n);return{startLine:r.start,endLine:r.end,lines:r.end-r.start+1,kind:o*2>s.length?"render-region":"call-region",callees:s.map(t=>m(t.symbol)),renderCallees:o,inboundLocals:a.inbound,outboundLocals:a.outbound,ambientCallees:i.filter(t=>t.lines.some(c=>c>=r.start&&c<=r.end)).map(t=>m(t.symbol))}}function oe(e,r,i){if(!i.available)return{inbound:[],outbound:[]};let n=new Map;for(let t of i.occurrences){if(t.line<e.startLine||t.line>e.endLine)continue;let c=n.get(t.symbol);c||(c={declaredAt:null,name:"",uses:[],writes:[]},n.set(t.symbol,c)),t.definition?(c.declaredAt=t.line,c.name=ie(i.lines,t)):(c.uses.push(t.line),t.write&&c.writes.push(t.line))}let s=t=>t>=r.start&&t<=r.end,o=new Set,a=new Set;for(let t of n.values()){if(t.declaredAt===null||t.name==="")continue;let c=s(t.declaredAt),u=t.uses.some(f=>f>r.end);!c&&t.declaredAt<r.start&&t.uses.some(s)&&o.add(t.name),c&&u&&a.add(t.name),!c&&t.writes.some(s)&&u&&a.add(t.name)}return{inbound:[...o].sort(),outbound:[...a].sort()}}function ie(e,r){return r.endLine!==r.line?"":e[r.line]?.slice(r.startChar,r.endChar).trim()??""}function w(e,r,i){if(i>0)return{tier:"support",reason:`support tier: the largest region holds ${i} return statement(s) of the function itself, so it is the function's control flow rather than a helper`};if(!r)return{tier:"signal",reason:"signal tier: local data flow unknown, interface cost not assessed"};let n=e.inboundLocals.length,s=e.outboundLocals.length;return n<=k&&s<=O?{tier:"signal",reason:`signal tier: the largest region takes ${n} local(s) in and hands ${s} back`}:{tier:"support",reason:`support tier: the largest region would take ${n} local(s) in and hand ${s} back, more than ${k} in or ${O} out`}}function R(e,r,i){let n=Number.POSITIVE_INFINITY;for(let o=r.startLine;o<=r.endLine;o+=1)i.has(o)&&(n=Math.min(n,y(e[o]??"")));if(!Number.isFinite(n))return 0;let s=0;for(let o=r.startLine;o<=r.endLine;o+=1){let a=e[o]??"";/^\s*return\b/u.test(a)&&y(a)<=n&&(s+=1)}return s}function y(e){return e.length-e.trimStart().length}function ae(e,r){let i=`${e.startLine+1}-${e.endLine+1}`,n=r?`; an extraction would take ${e.inboundLocals.length} local(s) in`+(e.inboundLocals.length>0?` (${e.inboundLocals.join(", ")})`:"")+` and hand ${e.outboundLocals.length} back`+(e.outboundLocals.length>0?` (${e.outboundLocals.join(", ")})`:""):"; local data flow is unknown because the indexer emitted no local symbols for this file";return e.kind==="render-region"?`Review lines ${i} as a child component: its ${e.callees.length} rendered or called names appear nowhere else in this component${n}. Extract only if the new name states what the subtree shows.`:`Review lines ${i} as a helper: its ${e.callees.length} callees are used nowhere else in this function${n}. Extract only if the new name states what the region does.`}export{ge as a};
2
+ //# sourceMappingURL=chunk-E4PKTOL3.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ERCYGVAM.js";import{a as t}from"./chunk-4GAQ6FI4.js";function a(e,o){let r=i(e,o);return r?t(e,"forward",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}function p(e,o){let r=i(e,o);return r?t(e,"reverse",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}export{a,p as b};
2
- //# sourceMappingURL=chunk-GVOMSPGL.js.map
1
+ import{a as i}from"./chunk-NSM5IEVW.js";import{a as t}from"./chunk-BOW7SSQH.js";function a(e,o){let r=i(e,o);return r?t(e,"forward",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}function p(e,o){let r=i(e,o);return r?t(e,"reverse",[r]).filter(s=>!e.isIgnored(s)).map(s=>({relativePath:s,edgeBasis:"symbol-references",evidence:"cross-file SCIP references plus resolved source imports"})):[]}export{a,p as b};
2
+ //# sourceMappingURL=chunk-E65ELFKU.js.map
@@ -1,2 +1,2 @@
1
- import{C as s}from"./chunk-7JYHQAH2.js";var p=new Set(["componentDidCatch","componentDidMount","componentDidUpdate","componentWillUnmount","getDerivedStateFromError","getDerivedStateFromProps","getSnapshotBeforeUpdate","render","shouldComponentUpdate","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate"]);function l(i,t){if(!t.parentTypeName||!/\.[cm]?[jt]sx?$/.test(t.relativePath))return!1;let r=s(i,t.relativePath);if(!r)return!1;let n=r.rootNode.descendantsOfType("method_definition").find(a=>a.startPosition.row<=t.startLine&&a.endPosition.row>=t.endLine);if(!n)return!1;if(/\boverride\b/.test(n.text.slice(0,Math.max(0,n.text.indexOf("{")))))return!0;let e=n.parent;for(;e&&e.type!=="class_declaration"&&e.type!=="class";)e=e.parent;if(!e)return!1;let o=e.text.slice(0,Math.max(0,e.text.indexOf("{")));return/\bimplements\b/.test(o)||/\bextends\b/.test(o)?!0:p.has(t.leaf)&&/\bextends\s+(?:React\.)?(?:Component|PureComponent)\b/.test(o)}export{l as a};
2
- //# sourceMappingURL=chunk-VXJJTQYE.js.map
1
+ import{E as s}from"./chunk-ZLMXIQLC.js";var p=new Set(["componentDidCatch","componentDidMount","componentDidUpdate","componentWillUnmount","getDerivedStateFromError","getDerivedStateFromProps","getSnapshotBeforeUpdate","render","shouldComponentUpdate","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate"]);function l(i,t){if(!t.parentTypeName||!/\.[cm]?[jt]sx?$/.test(t.relativePath))return!1;let r=s(i,t.relativePath);if(!r)return!1;let n=r.rootNode.descendantsOfType("method_definition").find(a=>a.startPosition.row<=t.startLine&&a.endPosition.row>=t.endLine);if(!n)return!1;if(/\boverride\b/.test(n.text.slice(0,Math.max(0,n.text.indexOf("{")))))return!0;let e=n.parent;for(;e&&e.type!=="class_declaration"&&e.type!=="class";)e=e.parent;if(!e)return!1;let o=e.text.slice(0,Math.max(0,e.text.indexOf("{")));return/\bimplements\b/.test(o)||/\bextends\b/.test(o)?!0:p.has(t.leaf)&&/\bextends\s+(?:React\.)?(?:Component|PureComponent)\b/.test(o)}export{l as a};
2
+ //# sourceMappingURL=chunk-E7QR35ST.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-PIFTZEEM.js";import{c as d}from"./chunk-PLYUVM4F.js";import{b as c}from"./chunk-AYPDH2LU.js";import{d as p}from"./chunk-TD7VKJ2Y.js";import{m as o}from"./chunk-42W3LFUK.js";import{z as u}from"./chunk-7JYHQAH2.js";function F(r,a={}){let{scope:l,limit:s=30,scanLimit:b}=a,f=new d(r);return g({candidates:()=>f.productionCallableDefinitions({scope:l,files:a.files,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}),filterCandidate:e=>y(e.relativePath),scanLimit:b,profile:{name:"unused-params"},evaluate:e=>{let n=o(r,e.relativePath)?.callables.find(t=>t.startLine===e.startLine&&t.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(t=>!t.simple)||n.paramsEndLine>=n.endLine)return null;let L=c(r,e.relativePath),m=[];for(let t=n.params.length-1;t>=0;t--){let i=n.params[t];if(i.name===""||i.name.startsWith("_")||h(L.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function y(r){let a=u(r);return a==="typescript"||a==="tsx"||a==="javascript"}function h(r,a,l){return r?r.some(s=>s>a&&s<=l):!1}export{F as a};
2
- //# sourceMappingURL=chunk-2RE5OCHZ.js.map
1
+ import{a as g}from"./chunk-VBV6ALJE.js";import{c as d}from"./chunk-2BMSSRBH.js";import{b as c}from"./chunk-SKKXTABJ.js";import{d as p}from"./chunk-C7C6AKAT.js";import{n as o}from"./chunk-RBAD4GJ2.js";import{A as u}from"./chunk-ZLMXIQLC.js";function F(r,a={}){let{scope:l,limit:s=30,scanLimit:b}=a,f=new d(r);return g({candidates:()=>f.productionCallableDefinitions({scope:l,files:a.files,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}),filterCandidate:e=>y(e.relativePath),scanLimit:b,profile:{name:"unused-params"},evaluate:e=>{let n=o(r,e.relativePath)?.callables.find(t=>t.startLine===e.startLine&&t.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(t=>!t.simple)||n.paramsEndLine>=n.endLine)return null;let L=c(r,e.relativePath),m=[];for(let t=n.params.length-1;t>=0;t--){let i=n.params[t];if(i.name===""||i.name.startsWith("_")||h(L.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function y(r){let a=u(r);return a==="typescript"||a==="tsx"||a==="javascript"}function h(r,a,l){return r?r.some(s=>s>a&&s<=l):!1}export{F as a};
2
+ //# sourceMappingURL=chunk-EFSXAINW.js.map
@@ -1,4 +1,4 @@
1
- import{d as S}from"./chunk-OTSPRVNW.js";import{c as m}from"./chunk-PLYUVM4F.js";import{f as y}from"./chunk-PBUH2P5S.js";import{b as h}from"./chunk-Q6T2CAJL.js";import{x as p}from"./chunk-42W3LFUK.js";import{a as g}from"./chunk-7JYHQAH2.js";import f from"path";function W(e,t){let{scope:i,minDeviation:r=5,limit:n=50}=t??{},a=t?.semantic!==!1,u=t?.includePatternDeviations===!0,o=new m(e).fileDependencyGraph(i),l=S(e,{scope:i}),c=x([...D(e,o,{scope:i,semantic:a}),...R(l.forbiddenEdges),...u?E(o,r):[]]);return t?.includeArchitecture===!0&&(c.architecture=l),n<=0||c.results.length<=n?c:{...c,results:c.results.slice(0,n),totalResults:c.results.length}}function D(e,t,i){let r=_(e,i.scope),n=[],a=new Set;for(let[s,o]of t){if(d(s))continue;let l=r.get(s)??new Set;for(let c of o)d(c)||l.has(c)||v(e,s,c,i)||(n.push({file:s,dep:c}),a.add(s))}a.size>0&&w(e,r,{paths:[...a]});let u=[];for(let{file:s,dep:o}of n)(r.get(s)??new Set).has(o)||u.push({file:s,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o,actionTier:"direct",evidenceReasons:[`dependency edge exists from ${s} to ${o}`,"no semantic, source, type-only, side-effect, or Vue-template usage survived the conservative skip gates"],recommendation:"Remove the unused import or dependency edge after running the project checks."});return u}function v(e,t,i,r){return C(e,t,i)||M(e,t,i)||O(i)||P(e,t,i)||N(i)?!0:r.semantic&&A(e,t,i)}function R(e){return e.flatMap(t=>{let i=t.examples[0];return i?[{file:i.fromFile,kind:"architecture-violation",description:`${t.from} depends on forbidden boundary ${t.to} through ${t.fileEdgeCount} file edge(s)`,dep:i.toFile,detail:`${t.from} may not depend on ${t.to}`,actionTier:"direct",policyBasis:"explicit",architecture:{fromBoundary:t.from,toBoundary:t.to,fileEdgeCount:t.fileEdgeCount,importerCount:t.importerCount,importedFileCount:t.importedFileCount,examples:t.examples},evidenceReasons:[`configured dependency row for ${t.from} does not allow ${t.to}`,`${t.fileEdgeCount} file edge(s) connect ${t.importerCount} importer(s) to ${t.importedFileCount} imported file(s)`,...t.examples.map(r=>`${r.fromFile} imports ${r.toFile}`)],recommendation:"Move the dependency behind an allowed boundary, reverse the dependency through an owned interface, or deliberately update the project architecture rule."}]:[]})}function E(e,t){let i=[];for(let[r,n]of k(e)){let a=n.filter(s=>!d(s));if(a.length<t)continue;let u=I(e,a);for(let s of a)for(let o of e.get(s)??[])d(o)||(u.get(o)??0)===1&&f.dirname(o)!==r&&f.dirname(o)!==f.dirname(r)&&i.push({file:s,kind:"pattern-deviation",description:`Only file in ${r}/ that depends on ${o}`,dep:o,actionTier:"signal",evidenceReasons:[`${a.length} sibling file(s) in ${r}/ were compared`,`${s} is the only non-skipped sibling depending on ${o}`],recommendation:"Review sibling ownership before changing this import; unique dependency shape can be intentional specialization."})}return i}function x(e){let t=e.filter(i=>i.kind==="architecture-violation").length;return{results:e,unusedImports:e.filter(i=>i.kind==="unused-import").length,architectureViolations:t,layerViolations:t,patternDeviations:e.filter(i=>i.kind==="pattern-deviation").length}}function k(e){let t=new Map;for(let i of e.keys()){let r=f.dirname(i),n=t.get(r);n||(n=[],t.set(r,n)),n.push(i)}return t}function I(e,t){let i=new Map;for(let r of t)for(let n of e.get(r)??[])d(n)||i.set(n,(i.get(n)??0)+1);return i}function _(e,t){let i=new Map;return $(e,i,t),i}function $(e,t,i){for(let r of F(e,i))b(e,t,r.from_file,r.to_file)}function F(e,t){let i=t?"AND d1.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
1
+ import{d as S}from"./chunk-TAA7HXHE.js";import{c as m}from"./chunk-2BMSSRBH.js";import{g as y}from"./chunk-YSYPDRD5.js";import{b as h}from"./chunk-FLMTCX5R.js";import{y as p}from"./chunk-RBAD4GJ2.js";import{a as g}from"./chunk-ZLMXIQLC.js";import f from"path";function W(e,t){let{scope:i,minDeviation:r=5,limit:n=50}=t??{},a=t?.semantic!==!1,u=t?.includePatternDeviations===!0,o=new m(e).fileDependencyGraph(i),l=S(e,{scope:i}),c=x([...D(e,o,{scope:i,semantic:a}),...R(l.forbiddenEdges),...u?E(o,r):[]]);return t?.includeArchitecture===!0&&(c.architecture=l),n<=0||c.results.length<=n?c:{...c,results:c.results.slice(0,n),totalResults:c.results.length}}function D(e,t,i){let r=_(e,i.scope),n=[],a=new Set;for(let[s,o]of t){if(d(s))continue;let l=r.get(s)??new Set;for(let c of o)d(c)||l.has(c)||v(e,s,c,i)||(n.push({file:s,dep:c}),a.add(s))}a.size>0&&w(e,r,{paths:[...a]});let u=[];for(let{file:s,dep:o}of n)(r.get(s)??new Set).has(o)||u.push({file:s,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o,actionTier:"direct",evidenceReasons:[`dependency edge exists from ${s} to ${o}`,"no semantic, source, type-only, side-effect, or Vue-template usage survived the conservative skip gates"],recommendation:"Remove the unused import or dependency edge after running the project checks."});return u}function v(e,t,i,r){return C(e,t,i)||M(e,t,i)||O(i)||P(e,t,i)||N(i)?!0:r.semantic&&A(e,t,i)}function R(e){return e.flatMap(t=>{let i=t.examples[0];return i?[{file:i.fromFile,kind:"architecture-violation",description:`${t.from} depends on forbidden boundary ${t.to} through ${t.fileEdgeCount} file edge(s)`,dep:i.toFile,detail:`${t.from} may not depend on ${t.to}`,actionTier:"direct",policyBasis:"explicit",architecture:{fromBoundary:t.from,toBoundary:t.to,fileEdgeCount:t.fileEdgeCount,importerCount:t.importerCount,importedFileCount:t.importedFileCount,examples:t.examples},evidenceReasons:[`configured dependency row for ${t.from} does not allow ${t.to}`,`${t.fileEdgeCount} file edge(s) connect ${t.importerCount} importer(s) to ${t.importedFileCount} imported file(s)`,...t.examples.map(r=>`${r.fromFile} imports ${r.toFile}`)],recommendation:"Move the dependency behind an allowed boundary, reverse the dependency through an owned interface, or deliberately update the project architecture rule."}]:[]})}function E(e,t){let i=[];for(let[r,n]of k(e)){let a=n.filter(s=>!d(s));if(a.length<t)continue;let u=I(e,a);for(let s of a)for(let o of e.get(s)??[])d(o)||(u.get(o)??0)===1&&f.dirname(o)!==r&&f.dirname(o)!==f.dirname(r)&&i.push({file:s,kind:"pattern-deviation",description:`Only file in ${r}/ that depends on ${o}`,dep:o,actionTier:"signal",evidenceReasons:[`${a.length} sibling file(s) in ${r}/ were compared`,`${s} is the only non-skipped sibling depending on ${o}`],recommendation:"Review sibling ownership before changing this import; unique dependency shape can be intentional specialization."})}return i}function x(e){let t=e.filter(i=>i.kind==="architecture-violation").length;return{results:e,unusedImports:e.filter(i=>i.kind==="unused-import").length,architectureViolations:t,layerViolations:t,patternDeviations:e.filter(i=>i.kind==="pattern-deviation").length}}function k(e){let t=new Map;for(let i of e.keys()){let r=f.dirname(i),n=t.get(r);n||(n=[],t.set(r,n)),n.push(i)}return t}function I(e,t){let i=new Map;for(let r of t)for(let n of e.get(r)??[])d(n)||i.set(n,(i.get(n)??0)+1);return i}function _(e,t){let i=new Map;return $(e,i,t),i}function $(e,t,i){for(let r of F(e,i))b(e,t,r.from_file,r.to_file)}function F(e,t){let i=t?"AND d1.relative_path LIKE ?":"",r=t?[`%${t}%`]:[];return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
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
@@ -15,4 +15,4 @@ import{d as S}from"./chunk-OTSPRVNW.js";import{c as m}from"./chunk-PLYUVM4F.js";
15
15
  AND m.role != 1
16
16
  ${e.pathExclusionsFor("d1","d2")}
17
17
  ${i}`,...r)}function w(e,t,i={}){new m(e).scanSourceReferences({paths:i.paths??g(e,{includeIgnored:!1}),includeRustAttributeNames:!0,identifierResolution:"permissive"},n=>{n.target.relativePath!==n.sourceFile&&(e.isIgnored(n.target.relativePath)||b(e,t,n.sourceFile,n.target.relativePath))})}function b(e,t,i,r){if(e.isIgnored(i)||e.isIgnored(r))return;let n=t.get(i);n||(n=new Set,t.set(i,n)),n.add(r)}function O(e){return e.includes("types")||e.endsWith(".d.ts")}function A(e,t,i){return y(e,t).filter(n=>n.sourcePath===i).some(n=>n.isUsed)}function C(e,t,i){return p(e,t).filter(n=>n.sourcePath===i).some(n=>n.used)}function M(e,t,i){let r=p(e,t).filter(n=>n.sourcePath===i);return r.length>0&&r.every(n=>n.isTypeOnly===!0)}function N(e){return e.endsWith(".vue")}function P(e,t,i){let r=p(e,t).filter(n=>n.sourcePath===i);return r.length===0?!1:r.every(n=>n.kind==="side-effect"||n.kind==="namespace"&&n.usedMembers.length===0&&!n.used)}function d(e){let t=h(e);return!!(t==="entry"||t==="barrel"||t==="test"||t==="worker"||T(f.basename(e)))}function T(e){return!!(e==="index.ts"||e==="index.js"||e==="cli.ts"||e==="main.ts"||e==="main.rs"||e.includes("worker.")||e.includes("postinstall.")||e==="health.ts"||e==="health.js")}export{W as a};
18
- //# sourceMappingURL=chunk-GY7CCCEZ.js.map
18
+ //# sourceMappingURL=chunk-EHVEIEQN.js.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-K3XFWJI2.js";import{b as l,e as n,i as c}from"./chunk-H5EXS3HM.js";import{a as d}from"./chunk-SB25YMEQ.js";import{h as u}from"./chunk-AK3PYTIK.js";import{join as o}from"path";var L=6,q=1e4,y="watch.lock",m="watch-state.json",b="watch-activity.json",S="watch-refresh-requests";function C(t){return{lockPath:o(t,y),statePath:o(t,m),activityPath:o(t,b),refreshRequestsPath:o(t,S)}}function j(t){try{return g(JSON.parse(u(t,"watch service state")))}catch{return null}}function g(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!r(e.startedAt)||!r(e.heartbeatAt)||!r(e.lastActivityAt)||!h(e.watcher)||e.idleDeadlineAt!==void 0&&!r(e.idleDeadlineAt))return null;if(e.processIdentity!==void 0){let i=d(e.processIdentity);if(!i||i.pid!==e.pid)return null;e.processIdentity=i}return e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!R(e.lastError)||e.lastRefresh!==void 0&&!A(e.lastRefresh)||e.reindexActivity!==void 0&&!v(e.reindexActivity)||e.refreshRequests!==void 0&&!E(e.refreshRequests)||e.typescriptSemantic!==void 0&&!w(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!T(e.typescriptIndex)?null:e}function r(t){return l(t)}function h(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return s(e.changedFiles)&&s(e.reindexAt);case"indexing":return s(e.startedAt);case"cooldown":return s(e.until)&&typeof e.dirty=="boolean";case"budget-paused":return s(e.until)&&typeof e.dirty=="boolean"&&typeof e.reason=="string"&&n(e.rebuilt)&&n(e.estimatedWriteBytes);case"draining":return s(e.startedAt)&&typeof e.reason=="string";default:return!1}}function R(t){if(!t||typeof t!="object")return!1;let e=t;return r(e.at)&&typeof e.message=="string"}function A(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&r(e.startedAt)&&r(e.completedAt)&&s(e.durationMs)}function v(t){if(!t||typeof t!="object")return!1;let e=t;return e.confidence!==void 0&&e.confidence!=="complete"&&e.confidence!=="partial"&&e.confidence!=="unavailable"||e.recordsRead!==void 0&&!n(e.recordsRead)||e.invalidRecords!==void 0&&!n(e.invalidRecords)||e.skippedRecords!==void 0&&!n(e.skippedRecords)||e.readErrors!==void 0&&!n(e.readErrors)||e.ignoredPartialTailBytes!==void 0&&!n(e.ignoredPartialTailBytes)||!r(e.windowStartedAt)||!r(e.windowEndedAt)||!n(e.runs)||!n(e.rebuilt)||e.fullRebuilds!==void 0&&!n(e.fullRebuilds)||!n(e.reused)||!n(e.failed)||!n(e.suppressed)||!s(e.estimatedLogicalOutputBytes)||e.estimatedWriteBytes!==void 0&&!n(e.estimatedWriteBytes)||e.reflinkedBytes!==void 0&&!n(e.reflinkedBytes)||e.fallbackCopiedBytes!==void 0&&!n(e.fallbackCopiedBytes)||e.oldestRebuildAt!==void 0&&!r(e.oldestRebuildAt)||e.oldestWriteAt!==void 0&&!r(e.oldestWriteAt)||e.languageAttribution!==void 0&&e.languageAttribution!=="complete"&&e.languageAttribution!=="partial"&&e.languageAttribution!=="unavailable"||e.attributedRuns!==void 0&&!n(e.attributedRuns)||e.unattributedRuns!==void 0&&!n(e.unattributedRuns)||e.invalidLanguageDetails!==void 0&&!n(e.invalidLanguageDetails)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"||Array.isArray(e.byTrigger)||e.byLanguage!==void 0&&!x(e.byLanguage)?!1:Object.values(e.byTrigger).every(i=>i===void 0||n(i))}function x(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let[e,i]of Object.entries(t)){if(!f.includes(e)||!i||typeof i!="object")return!1;let a=i;if(!n(a.runs)||!n(a.rebuilt)||!n(a.reused)||!n(a.producedOutputBytes)||!c(a.durationMs)||a.rebuilt+a.reused!==a.runs)return!1}return!0}function E(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.claimed)&&n(e.completed)&&n(e.expired)&&n(e.invalid)&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function w(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&s(e.requests)&&s(e.sessionsCreated)&&s(e.sessionsReused)&&s(e.sessionsRefreshed)&&s(e.sessionsReplaced)&&s(e.projectsCreated)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function T(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&n(e.requests)&&n(e.sessionsCreated)&&n(e.sessionsReplaced)&&(e.sessionsEvicted===void 0||n(e.sessionsEvicted))&&(e.activeSessions===void 0||n(e.activeSessions))&&(e.maxActiveSessions===void 0||n(e.maxActiveSessions))&&(e.heapUsedBytes===void 0||n(e.heapUsedBytes))&&(e.heapLimitBytes===void 0||n(e.heapLimitBytes))&&(e.softMemoryLimitBytes===void 0||n(e.softMemoryLimitBytes))&&(e.retireRequested===void 0||typeof e.retireRequested=="boolean")&&n(e.initializations)&&n(e.programUpdates)&&n(e.documentsEmitted)&&n(e.documentsRemoved)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastDurationMs===void 0||s(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function p(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.inflight)&&n(e.responses)&&n(e.deadLetters)&&n(e.invalid)&&n(e.totalItems)&&s(e.totalBytes)&&e.totalBytes>=0&&e.totalItems===e.pending+e.inflight+e.responses+e.deadLetters&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function s(t){return typeof t=="number"&&Number.isFinite(t)}export{L as a,q as b,C as c,j as d,r as e};
2
- //# sourceMappingURL=chunk-BVFYEEBH.js.map
1
+ import{a as f}from"./chunk-CKBUBRYD.js";import{b as l,e as n,i as c}from"./chunk-H5EXS3HM.js";import{a as d}from"./chunk-JFMEXGFE.js";import{h as u}from"./chunk-7F45LJKI.js";import{join as o}from"path";var L=6,q=1e4,y="watch.lock",m="watch-state.json",b="watch-activity.json",S="watch-refresh-requests";function C(t){return{lockPath:o(t,y),statePath:o(t,m),activityPath:o(t,b),refreshRequestsPath:o(t,S)}}function j(t){try{return g(JSON.parse(u(t,"watch service state")))}catch{return null}}function g(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!r(e.startedAt)||!r(e.heartbeatAt)||!r(e.lastActivityAt)||!h(e.watcher)||e.idleDeadlineAt!==void 0&&!r(e.idleDeadlineAt))return null;if(e.processIdentity!==void 0){let i=d(e.processIdentity);if(!i||i.pid!==e.pid)return null;e.processIdentity=i}return e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!R(e.lastError)||e.lastRefresh!==void 0&&!A(e.lastRefresh)||e.reindexActivity!==void 0&&!v(e.reindexActivity)||e.refreshRequests!==void 0&&!E(e.refreshRequests)||e.typescriptSemantic!==void 0&&!w(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!T(e.typescriptIndex)?null:e}function r(t){return l(t)}function h(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return s(e.changedFiles)&&s(e.reindexAt);case"indexing":return s(e.startedAt);case"cooldown":return s(e.until)&&typeof e.dirty=="boolean";case"budget-paused":return s(e.until)&&typeof e.dirty=="boolean"&&typeof e.reason=="string"&&n(e.rebuilt)&&n(e.estimatedWriteBytes);case"draining":return s(e.startedAt)&&typeof e.reason=="string";default:return!1}}function R(t){if(!t||typeof t!="object")return!1;let e=t;return r(e.at)&&typeof e.message=="string"}function A(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&r(e.startedAt)&&r(e.completedAt)&&s(e.durationMs)}function v(t){if(!t||typeof t!="object")return!1;let e=t;return e.confidence!==void 0&&e.confidence!=="complete"&&e.confidence!=="partial"&&e.confidence!=="unavailable"||e.recordsRead!==void 0&&!n(e.recordsRead)||e.invalidRecords!==void 0&&!n(e.invalidRecords)||e.skippedRecords!==void 0&&!n(e.skippedRecords)||e.readErrors!==void 0&&!n(e.readErrors)||e.ignoredPartialTailBytes!==void 0&&!n(e.ignoredPartialTailBytes)||!r(e.windowStartedAt)||!r(e.windowEndedAt)||!n(e.runs)||!n(e.rebuilt)||e.fullRebuilds!==void 0&&!n(e.fullRebuilds)||!n(e.reused)||!n(e.failed)||!n(e.suppressed)||!s(e.estimatedLogicalOutputBytes)||e.estimatedWriteBytes!==void 0&&!n(e.estimatedWriteBytes)||e.reflinkedBytes!==void 0&&!n(e.reflinkedBytes)||e.fallbackCopiedBytes!==void 0&&!n(e.fallbackCopiedBytes)||e.oldestRebuildAt!==void 0&&!r(e.oldestRebuildAt)||e.oldestWriteAt!==void 0&&!r(e.oldestWriteAt)||e.languageAttribution!==void 0&&e.languageAttribution!=="complete"&&e.languageAttribution!=="partial"&&e.languageAttribution!=="unavailable"||e.attributedRuns!==void 0&&!n(e.attributedRuns)||e.unattributedRuns!==void 0&&!n(e.unattributedRuns)||e.invalidLanguageDetails!==void 0&&!n(e.invalidLanguageDetails)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"||Array.isArray(e.byTrigger)||e.byLanguage!==void 0&&!x(e.byLanguage)?!1:Object.values(e.byTrigger).every(i=>i===void 0||n(i))}function x(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let[e,i]of Object.entries(t)){if(!f.includes(e)||!i||typeof i!="object")return!1;let a=i;if(!n(a.runs)||!n(a.rebuilt)||!n(a.reused)||!n(a.producedOutputBytes)||!c(a.durationMs)||a.rebuilt+a.reused!==a.runs)return!1}return!0}function E(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.claimed)&&n(e.completed)&&n(e.expired)&&n(e.invalid)&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function w(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&s(e.requests)&&s(e.sessionsCreated)&&s(e.sessionsReused)&&s(e.sessionsRefreshed)&&s(e.sessionsReplaced)&&s(e.projectsCreated)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function T(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&n(e.requests)&&n(e.sessionsCreated)&&n(e.sessionsReplaced)&&(e.sessionsEvicted===void 0||n(e.sessionsEvicted))&&(e.activeSessions===void 0||n(e.activeSessions))&&(e.maxActiveSessions===void 0||n(e.maxActiveSessions))&&(e.heapUsedBytes===void 0||n(e.heapUsedBytes))&&(e.heapLimitBytes===void 0||n(e.heapLimitBytes))&&(e.softMemoryLimitBytes===void 0||n(e.softMemoryLimitBytes))&&(e.retireRequested===void 0||typeof e.retireRequested=="boolean")&&n(e.initializations)&&n(e.programUpdates)&&n(e.documentsEmitted)&&n(e.documentsRemoved)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastDurationMs===void 0||s(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function p(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.inflight)&&n(e.responses)&&n(e.deadLetters)&&n(e.invalid)&&n(e.totalItems)&&s(e.totalBytes)&&e.totalBytes>=0&&e.totalItems===e.pending+e.inflight+e.responses+e.deadLetters&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function s(t){return typeof t=="number"&&Number.isFinite(t)}export{L as a,q as b,C as c,j as d,r as e};
2
+ //# sourceMappingURL=chunk-EHYDXE3Z.js.map
@@ -1,2 +1,2 @@
1
- import{c as t}from"./chunk-2OXVP5U5.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
- //# sourceMappingURL=chunk-HISEUIL2.js.map
1
+ import{c as t}from"./chunk-VDGFWCQV.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
+ //# sourceMappingURL=chunk-EP63Y6LD.js.map
@@ -0,0 +1,4 @@
1
+ import{a as C}from"./chunk-VBV6ALJE.js";import{c as M}from"./chunk-NJT3ZEKY.js";import{b as f,c as I}from"./chunk-2BMSSRBH.js";import{e as d}from"./chunk-YSYPDRD5.js";import{d as h}from"./chunk-MTDBHTSF.js";import{d as g}from"./chunk-C7C6AKAT.js";import{n as y}from"./chunk-RBAD4GJ2.js";var x=new Set(h());function N(e,n){let{scope:o,minLoc:r=10,limit:i=30,scanLimit:t}=n??{},s=new I(e);return C({candidates:()=>s.productionCallableDefinitions({scope:o,minLoc:r,requireFunctionLikeSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof t=="number"&&t>0}),scanLimit:t,filterCandidate:S,profile:{name:"complexity-hotspots"},prepare:a=>{let l=B(e,a),m=n?.semantic!==!1,c=m?d(e):null;c?.materializeReferences(a,{prefetchCallees:!0});let u=s.crossFileCallerMap(a,{semantic:!1});return{callerMap:c?f(u,c.callerMap(a)):u,calleeMap:s.calleeMap(a,{semantic:m}),languageByFile:l,clojureCallableIds:D(e,a,l),branchEstimates:M(e,a)}},evaluate:(a,l)=>L(a,l,r),orderResults:(a,l)=>l.score-a.score||l.loc-a.loc,limit:i})}function S(e){return e.symbol.startsWith("rust-analyzer ")?typeof e.kind=="number"&&x.has(e.kind):!0}function L(e,n,o){if(n.languageByFile.get(e.relativePath)==="clojure"&&!n.clojureCallableIds.has(e.symbolId))return null;let r=e.endLine-e.startLine+1;if(r<o)return null;let i=n.callerMap.get(e.symbolId)?.size??0,t=n.calleeMap.get(e.symbolId)??[],s=new Set,a=new Set;for(let p of t){let b=`${p.symbol}|${p.file}`;s.add(b),p.file!==e.relativePath&&a.add(b)}let l=a.size,m=s.size,c=n.branchEstimates.get(e.symbolId)??{branches:0,estimateBasis:"regex-fallback"},u=c.branches+1;return{symbol:e.symbol,shortName:g(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:r,fanIn:i,fanOut:l,calleeCount:m,branches:c.branches,estimateBasis:c.estimateBasis,score:Math.round(r/50*(i/5)*Math.max(l/5,1)*Math.max(u/5,1)*100)/100}}function B(e,n){let o=[...new Set(n.map(t=>t.relativePath))];if(o.length===0)return new Map;let r=o.map(()=>"?").join(", "),i=e.all(`SELECT relative_path, language
2
+ FROM documents
3
+ WHERE relative_path IN (${r})`,...o);return new Map(i.map(t=>[t.relative_path,t.language?.toLowerCase()??null]))}function D(e,n,o){let r=new Set,i=new Map;for(let t of n){if(o.get(t.relativePath)!=="clojure")continue;let s=i.get(t.relativePath);s||(s=new Set((y(e,t.relativePath)?.callables??[]).map(a=>`${a.name}:${a.startLine}`)),i.set(t.relativePath,s)),s.has(`${t.leaf}:${t.startLine}`)&&r.add(t.symbolId)}return r}export{N as a};
4
+ //# sourceMappingURL=chunk-EPX6NQN6.js.map
@@ -0,0 +1,5 @@
1
+ import{c as g,j as k,k as E,l as w,m as T,n as j,o as b,p as x,v as h,w as v,y}from"./chunk-KNLQGXVH.js";import{Ba as m,Ca as P}from"./chunk-JZ2A7LDM.js";function M(e){return typeof e=="object"&&e!==null}function R(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")?e:null}var F=[r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),r("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"}),p("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"}),p("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"}),p("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"}),p("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"}),p("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 N(e){let t=new Map;return{kind:e.kind,read(n,i,s){let o=!1,d=0,a;if(h()){let c=k(n);if(c){let l=`${c}\0${i}\0${s}`;a=t.get(l),a||(a=v(["evidence-product-file-read-v1",e.kind,c,i,s]),t.set(l,a))}}return y("evidence-product.file.read",()=>{let c=E(n,e.kind,i,s);if(c===null)return null;d=c.length;try{let l=e.deserialize(c);return o=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:o,payloadBytes:d}))},has(n,i,s){return w(n,e.kind,i,s)},write(n,i,s,o){T(n,e.kind,i,s,e.serialize(o))},writeBatch(n,i){j(n,i.map(s=>({kind:e.kind,relativePath:s.relativePath,contentHash:s.contentHash,payload:e.serialize(s.value)})))}}}function B(e){let t=new Map;return{kind:e.kind,read(n,i,s){let o=!1,d=0,a;if(h()){let c=`${s}\0${i}`;a=t.get(c),a||(a=v(["evidence-product-project-read-v1",e.kind,s,i]),t.set(c,a))}return y("evidence-product.project.read",()=>{let c=b(n,e.kind,i,s);if(c===null)return null;d=c.length;try{let l=e.deserialize(c);return o=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:o,payloadBytes:d}))},write(n,i,s,o){x(n,e.kind,i,s,e.serialize(o))}}}function U(e){let t=F.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function r(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function p(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}var u=null;function f(e){u?.(e)}function L(e,t){let n=u;u=e;try{return t()}finally{u=n}}var S=g("source-text",{clearGroups:["whole-project","source-file"]}),V=g("source-lines",{clearGroups:["whole-project","source-file"]});function C(e,t){let n=t.replace(/\\/g,"/");return f(n),S.get(e,n,()=>I(e,n))}function I(e,t){let n=t.replace(/\\/g,"/");f(n);try{return m(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(i){if(P(i))return"";throw i}}function Y(e){if(e.length===0)return[];let t=e.split(`
2
+ `);return e.endsWith(`
3
+ `)&&t.pop(),t}function D(e,t){let n=t.replace(/\\/g,"/");return V.get(e,n,()=>{let i=C(e,n);return i?i.split(`
4
+ `):[]})}var H=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function K(e){let t=H.exec(e);return t?t[1]??"":null}function Z(e,t,n){return O(e,t,n).length>0}function ee(e,t,n,i){let s=i.toLowerCase();return O(e,t,n).some(o=>o.toLowerCase()===s)}function O(e,t,n){if(n<=0)return[];let i=D(e,t);if(i.length===0)return[];let s=[];for(let o=n-1;o>=0&&o>=n-5;o-=1){let d=(i[o]??"").trim();if(d==="")continue;let a=K(d);if(a!==null){s.push(a);continue}if(!d.startsWith("//")&&!d.startsWith("*")&&!d.startsWith("/*")&&!d.startsWith("@")&&!d.startsWith("#"))return s}return s}export{M as a,R as b,N as c,B as d,U as e,f,L as g,C as h,I as i,Y as j,D as k,K as l,Z as m,ee as n};
5
+ //# sourceMappingURL=chunk-ETC674NS.js.map
@@ -1,3 +1,3 @@
1
- import{B as M,c as N,d as _,e as w,g as k,h as A,i as z,n as f,o as S,r as R}from"./chunk-TD7VKJ2Y.js";import{b as B}from"./chunk-7JYHQAH2.js";import{c as O}from"./chunk-Q7GBK5T7.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{D as M,c as N,d as _,e as w,i as k,j as A,k as z,p as f,q as S,t as R}from"./chunk-C7C6AKAT.js";import{b as B}from"./chunk-ZLMXIQLC.js";import{c as O}from"./chunk-KNLQGXVH.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-5H5WTJSD.js.map
3
+ //# sourceMappingURL=chunk-F5GSBHC6.js.map
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-NSM5IEVW.js";import{A as e}from"./chunk-C7C6AKAT.js";function l(t,s){let o=r(t,s);return e(t,o).map(({relativePath:n,...a})=>a)}export{l as a};
2
+ //# sourceMappingURL=chunk-FH3DGXC6.js.map
@@ -1,4 +1,4 @@
1
- import{a as z}from"./chunk-WRQXLNYE.js";import{d as y}from"./chunk-EELPBR7E.js";import{c as v}from"./chunk-BJT7LSPK.js";import{B as L,I as R,R as O,Y as $,h as p,m as A,n as F,o as T}from"./chunk-C7IJMOFP.js";import{b as E,d as b}from"./chunk-DRENNWRG.js";import{c as h,d as k}from"./chunk-IW5XQG5G.js";import{B as P,D as g}from"./chunk-AK3PYTIK.js";function _e(e,n){let t=B(e);return t?n.filter(r=>B(r.file)===t):n}function xe(e,n,t,r,i){let o=R(e,n);if(r){let f=i?.match(/^[A-Za-z_$][\w$]*/u)?.[0];if(!f)return null;let d=new Set(o.filter(u=>u.localName===f||u.importedName===f).map(u=>u.sourcePath).filter(u=>!!u));for(let u of t)for(let S of d)if(g(S,u.file))return u;if(f==="this"||f==="self"||f==="cls"){let u=t.filter(S=>S.file===n&&E(S.symbol)!==null);if(u.length===1)return u[0]}let m=X(p(e,n)??"",f);if(m.size===0)return null;let V=new Set(o.filter(u=>m.has(u.localName??u.importedName)).map(u=>u.sourcePath).filter(u=>!!u)),D=t.filter(u=>m.has(E(u.symbol)??"")&&(u.file===n||[...V].some(S=>g(S,u.file))));return D.length===1?D[0]:null}let s=t.filter(f=>E(f.symbol)===null),c=s.find(f=>f.file===n);if(c)return c;let a=b(t[0].symbol),l=o.filter(f=>f.kind!=="namespace"&&f.kind!=="side-effect"&&(f.localName===a||f.localName===null&&f.importedName===a));if(l.length>0){let f=s.filter(d=>l.some(m=>m.sourcePath!==null&&g(m.sourcePath,d.file)));return f.length===1?f[0]:null}return s.length===1?s[0]:null}function X(e,n){let t=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),r=new Set,i=[new RegExp(`\\b${t}\\s*:\\s*([A-Za-z_$][\\w$]*)`,"gu"),new RegExp(`\\b${t}\\s*=\\s*(?:new\\s+)?([A-Za-z_$][\\w$]*)\\s*\\(`,"gu")];for(let o of i)for(let s of e.matchAll(o))r.add(s[1]);return r.size===1?r:new Set}function B(e){let n=T(e);return n?n==="typescript"||n==="tsx"||n==="javascript"?"javascript-family":n:null}var q=k("global-leaf-index",{clearGroups:["whole-project"]});function N(e){return q.get(e,()=>{let n=e.all(`SELECT gs.id, gs.symbol,
1
+ import{a as z}from"./chunk-WRQXLNYE.js";import{d as y}from"./chunk-2USA3S3P.js";import{c as v}from"./chunk-BJT7LSPK.js";import{C as L,K as R,T as O,_ as $,i as p,n as A,o as F,p as T}from"./chunk-2VAHDDLM.js";import{b as E,d as b}from"./chunk-BL6DCHQP.js";import{c as h,d as k}from"./chunk-IW5XQG5G.js";import{n as P,p as g}from"./chunk-7HXT6YLU.js";function _e(e,n){let t=B(e);return t?n.filter(r=>B(r.file)===t):n}function xe(e,n,t,r,i){let o=R(e,n);if(r){let f=i?.match(/^[A-Za-z_$][\w$]*/u)?.[0];if(!f)return null;let d=new Set(o.filter(u=>u.localName===f||u.importedName===f).map(u=>u.sourcePath).filter(u=>!!u));for(let u of t)for(let S of d)if(g(S,u.file))return u;if(f==="this"||f==="self"||f==="cls"){let u=t.filter(S=>S.file===n&&E(S.symbol)!==null);if(u.length===1)return u[0]}let m=X(p(e,n)??"",f);if(m.size===0)return null;let V=new Set(o.filter(u=>m.has(u.localName??u.importedName)).map(u=>u.sourcePath).filter(u=>!!u)),D=t.filter(u=>m.has(E(u.symbol)??"")&&(u.file===n||[...V].some(S=>g(S,u.file))));return D.length===1?D[0]:null}let s=t.filter(f=>E(f.symbol)===null),c=s.find(f=>f.file===n);if(c)return c;let a=b(t[0].symbol),l=o.filter(f=>f.kind!=="namespace"&&f.kind!=="side-effect"&&(f.localName===a||f.localName===null&&f.importedName===a));if(l.length>0){let f=s.filter(d=>l.some(m=>m.sourcePath!==null&&g(m.sourcePath,d.file)));return f.length===1?f[0]:null}return s.length===1?s[0]:null}function X(e,n){let t=n.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),r=new Set,i=[new RegExp(`\\b${t}\\s*:\\s*([A-Za-z_$][\\w$]*)`,"gu"),new RegExp(`\\b${t}\\s*=\\s*(?:new\\s+)?([A-Za-z_$][\\w$]*)\\s*\\(`,"gu")];for(let o of i)for(let s of e.matchAll(o))r.add(s[1]);return r.size===1?r:new Set}function B(e){let n=T(e);return n?n==="typescript"||n==="tsx"||n==="javascript"?"javascript-family":n:null}var q=k("global-leaf-index",{clearGroups:["whole-project"]});function N(e){return q.get(e,()=>{let n=e.all(`SELECT gs.id, gs.symbol,
2
2
  COALESCE(der_doc.relative_path, mention_doc.relative_path) AS relative_path
3
3
  FROM global_symbols gs
4
4
  LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
@@ -13,4 +13,4 @@ import{a as z}from"./chunk-WRQXLNYE.js";import{d as y}from"./chunk-EELPBR7E.js";
13
13
  ) mention_doc ON mention_doc.symbol_id = gs.id
14
14
  WHERE 1 = 1
15
15
  ${e.symbolNoiseFor("gs")}`),t=new Map;for(let r of n){if(!r.relative_path||e.isIgnored(r.relative_path))continue;let i=b(r.symbol);if(!i)continue;let o=t.get(i);o||(o=[],t.set(i,o)),o.some(s=>s.symbolId===r.id)||o.push({symbol:r.symbol,symbolId:r.id,file:r.relative_path})}return t})}function _(e,n,t,r={}){if(!t)return[];let i=p(e,n);return i?i.indexOf(t)===-1?[]:(M(e,n).get(t)??[]).filter(s=>!K(s,r)):[]}function K(e,n){return typeof n.excludeStartLine=="number"&&typeof n.excludeEndLine=="number"&&e>=n.excludeStartLine&&e<=n.excludeEndLine}var Q=h("file-identifiers",{clearGroups:["whole-project","source-file"]});function j(e,n){let t=L(e,n);return t?t.fileIdentifiers:Q.get(e,n,()=>new Set(M(e,n).keys()))}var ee=h("file-ident-lines",{clearGroups:["whole-project","source-file"]});function M(e,n){let t=L(e,n);return t?t.identifierLineMap:ee.get(e,n,()=>ne(e,n))}var te=h("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function De(e,n){let t=L(e,n);return t?t.identifiersByLine:te.get(e,n,()=>{let r=M(e,n),i=0;for(let s of r.values()){let c=s[s.length-1];c!==void 0&&c>i&&(i=c)}let o=new Array(i+1);for(let s=0;s<=i;s+=1)o[s]=new Set;for(let[s,c]of r)for(let a of c)o[a].add(s);return o})}function ne(e,n){let t=new Map,r=(c,a)=>{let l=t.get(c);if(!l){t.set(c,[a]);return}l[l.length-1]!==a&&l.push(a)},i=p(e,n);if(!i)return t;let o=F(i).split(/\r?\n/),s=/\b([A-Za-z_$][\w$]*)\b/g;for(let c=0;c<o.length;c+=1){let a=o[c]??"";for(let l of a.matchAll(s))l[1]&&r(l[1],c)}return t}var G=/[A-Za-z_$][A-Za-z0-9_$]*/g,Z=/^[A-Za-z_$][A-Za-z0-9_$]*$/,re=512;function C(e){let n=[],t=!1;for(let r of e)r&&(t=!0,Z.test(r)||n.push(r));return{candidateNames:e,hasUsableCandidate:t,nonIdentifierNames:n}}function H(e,n){let t=ie(n)?n:C(n);if(t.candidateNames.size===0||!t.hasUsableCandidate)return!0;if(t.candidateNames.size<=re){for(let i of t.candidateNames)if(i){if(Z.test(i)){if(oe(i).test(e))return!0;continue}if(e.includes(i))return!0}return!1}G.lastIndex=0;let r;for(;(r=G.exec(e))!==null;)if(t.candidateNames.has(r[0]))return!0;for(let i of t.nonIdentifierNames)if(e.includes(i))return!0;return!1}function ie(e){return"candidateNames"in e}function oe(e){return new RegExp(`(?<![A-Za-z_$0-9])${A(e)}(?![A-Za-z_$0-9])`)}var se=h("source-import-paths-by-local-name",{clearGroups:["whole-project","source-file"]});function J(e,n){let t=P(n);return se.get(e,t,()=>ae(e,t))}function ae(e,n){let t=new Map;for(let r of R(e,n)){if(!r.sourcePath)continue;let i=r.localName??r.importedName;if(i&&U(t,i,r.sourcePath),r.kind==="namespace")for(let o of r.usedMembers)U(t,o,r.sourcePath)}return t}function U(e,n,t){let r=e.get(n);r||(r=new Set,e.set(n,r)),r.add(t)}function w(e,n,t){let r=N(e).get(t);if(!r||r.length===0)return[];if(r.length===1)return[I(r[0])];let i=r.filter(a=>a.file===n);if(i.length>0)return i.map(I);let o=J(e,n),s=o.get(t);if(s)for(let a of s){let l=r.filter(f=>g(a,f.file));if(l.length>0)return l.map(I)}let c=new Set;for(let a of o.values())for(let l of a)c.add(l);for(let a of c){let l=r.filter(f=>g(a,f.file));if(l.length>0&&l.length===r.length)return l.map(I)}return[]}function Ve(e,n,t){let r=w(e,n,t);if(r.length>0)return r;let i=N(e).get(t);return!i||i.length===0?[]:i.map(I)}function Y(e,n,t={}){let r=ce(e,n);if(!r)return[];let i=y(e,n);if(t.semantic!==!1&&t.semanticEvidence){let s=t.semanticEvidence.references(e,{...i,leaf:r.identifier,parentTypeName:null,isFunctionLike:!1,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null});if(s.length>0){let c=new Map;for(let a of s){let l=c.get(a.file)??[];l.push(a.line),c.set(a.file,l)}return x(e,c)}}let o=new Map;for(let s of v(e)){let c=le(e,r,s);c.length>0&&o.set(s,c)}return x(e,o)}function ce(e,n){let t=y(e,n);if(!t)return null;let r=b(t.symbol);return r?{symbolId:t.symbolId,relativePath:t.relativePath,startLine:t.startLine,endLine:t.endLine,identifier:r}:null}function le(e,n,t){let r=p(e,t);return!r||r.indexOf(n.identifier)===-1?[]:t!==n.relativePath&&!w(e,t,n.identifier).some(o=>o.symbolId===n.symbolId)?[]:_(e,t,n.identifier,t===n.relativePath?{excludeStartLine:n.startLine,excludeEndLine:n.endLine}:{})}function Xe(e,n,t={}){let r=new Map;for(let a of n){if(!a.leaf)continue;let l=r.get(a.leaf)??[];l.push(a),r.set(a.leaf,l)}if(r.size===0)return new Map;let i=new Set(n.map(a=>a.symbolId)),o=new Set(r.keys()),s=C(o),c=new Map;for(let a of v(e)){if(t.skipPath?.(a)||!H(p(e,a),s))continue;let l=j(e,a);if(l.size!==0){for(let f of l)if(r.has(f))for(let d of w(e,a,f)){if(!i.has(d.symbolId)||a===d.relativePath)continue;let m=c.get(d.symbolId);m||(m=new Set,c.set(d.symbolId,m)),m.add(a)}}}return c}function I(e){return{symbolId:e.symbolId,symbol:e.symbol,relativePath:e.file}}function x(e,n){let t=[],r=new Set;for(let[i,o]of n){let s=O(e,i);for(let c of o){let a=$(s,c),l=`${i}|${c}|${a?.symbol??""}`;r.has(l)||(r.add(l),t.push({file:i,line:c,enclosingSymbol:a?.symbol??null}))}}return t}function fe(e,n){return ue(e,[n]).get(n.symbolId)??[]}function ue(e,n){let t=n.map(o=>({symbolId:o.symbolId,prelude:Se(e,o)})).filter(o=>o.prelude!==null),r=pe(e,t.map(o=>o.symbolId)),i=new Map;for(let{symbolId:o,prelude:s}of t){let c=de(e,r.get(o)??new Map,s.match,s.identifier);i.set(o,x(e,c))}return i}function rt(e,n,t={}){return me(e,n,t).map(r=>({file:r.file,line:r.line,enclosingSymbol:r.enclosingSymbol}))}function me(e,n,t={}){let r=Y(e,n,{semantic:t.semantic,semanticEvidence:t.semanticEvidence}),i=r.length>0?W(r,"source-attribution"):W(fe(e,n),"scip-reference-chunk");return t.includeIgnored===!0?i:i.filter(o=>!e.isIgnored(o.file))}function W(e,n){return e.map(t=>({...t,provenance:n}))}function de(e,n,t,r){let i=new Map;for(let[o,s]of n)i.set(o,ge(e,o,s,t,r));return i}function pe(e,n){let t=new Map;for(let r of z(e,n)){if(e.isIgnored(r.relative_path))continue;let i=t.get(r.symbol_id);i||(i=new Map,t.set(r.symbol_id,i));let o=i.get(r.relative_path);o||(o=[],i.set(r.relative_path,o)),o.push({start_line:r.chunk_start,end_line:r.chunk_end})}return t}function ge(e,n,t,r,i){let o=n===r.relativePath?{excludeStartLine:r.startLine,excludeEndLine:r.endLine}:{},s=i?_(e,n,i,o):[];return t.flatMap(c=>be(s,c))}function be(e,n){let t=e.filter(r=>r>=n.start_line&&r<=n.end_line);return t.length>0?t:[n.start_line]}function Se(e,n){let t=y(e,n);return t?{match:t,identifier:b(t.symbol)||null}:null}export{_ as a,M as b,De as c,_e as d,xe as e,N as f,C as g,H as h,w as i,Ve as j,ce as k,le as l,Xe as m,fe as n,ue as o,rt as p,me as q};
16
- //# sourceMappingURL=chunk-2XCGSDIT.js.map
16
+ //# sourceMappingURL=chunk-FI7VGOR4.js.map
@@ -0,0 +1,2 @@
1
+ import{r as d}from"./chunk-ZLMXIQLC.js";import{d as m}from"./chunk-KNLQGXVH.js";import{Ba as f,Ca as p,c as l}from"./chunk-JZ2A7LDM.js";import{existsSync as g,readdirSync as h,statSync as D}from"fs";import{join as c}from"path";var y="components.json",K=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),U=3,b=/(?:^|\/)components\/ui$/i,A=m("ui-kit-surface",{clearGroups:["whole-project"]});function N(r){return A.get(r,()=>E(r))}function x(r,i){let n=l(i),t=n.lastIndexOf("/");if(t<0)return null;let e=n.slice(0,t);for(let o of N(r).directories)if(e===o.directory)return o;return b.test(e)?{directory:e,source:"ui-directory-convention"}:null}function P(r,i){return x(r,i)!==null}function E(r){let i=new Map;for(let n of _(r.config.projectRoot)){let t=I(r,n);t&&!i.has(t)&&i.set(t,{directory:t,source:"shadcn-components-manifest",manifest:n})}return{directories:[...i.values()].sort((n,t)=>n.directory.localeCompare(t.directory))}}function _(r){let i=[],n=(t,e)=>{let o=t?c(r,t):r,s=t?`${t}/${y}`:y;if(g(c(r,s))&&i.push(s),e>=U)return;let a;try{a=h(o,{withFileTypes:!0})}catch{return}for(let u of a)!u.isDirectory()||K.has(u.name)||u.name.startsWith(".")||n(t?`${t}/${u.name}`:u.name,e+1)};return n("",0),i}function I(r,i){let n;try{n=JSON.parse(f(r.config.projectRoot,i,{inputKind:"components manifest"}))}catch(a){return a instanceof Error&&p(a),null}if(!S(n))return null;let t=n.aliases;if(!S(t))return null;let e=typeof t.ui=="string"?t.ui:null,o=typeof t.components=="string"?t.components:null,s=e??(o?`${o}/ui`:null);return s?M(r,i,s):null}function M(r,i,n){let t=i.includes("/")?i.slice(0,i.lastIndexOf("/")):"",e=[];if(n.startsWith("./")||n.startsWith("../")||n.startsWith("/"))e.push(l(c(t,n)));else{let o=d(r,i,n);o&&e.push(o);let s=n.replace(/^[@~]\//,"");e.push(l(c(t,"src",s)),l(c(t,s)))}for(let o of e){let s=c(r.config.projectRoot,o);if(g(s)&&D(s).isDirectory())return o.replace(/\/+$/,"")}return null}function S(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}export{x as a,P as b};
2
+ //# sourceMappingURL=chunk-FJF6VO2P.js.map
@@ -1,2 +1,2 @@
1
- import{C as r}from"./chunk-AK3PYTIK.js";function _(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function a(t){let s=r(t);return i(s)?"test":n(s)?"worker":u(s)?"entry":f(s)?"barrel":"source"}function i(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function n(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function u(t){let s=t.split("/"),e=s[s.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:s.length<=2:!1}function f(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{_ as a,a as b};
2
- //# sourceMappingURL=chunk-FELGD32K.js.map
1
+ import{c as r}from"./chunk-JZ2A7LDM.js";function _(t){switch(t){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}function a(t){let s=r(t);return i(s)?"test":n(s)?"worker":u(s)?"entry":f(s)?"barrel":"source"}function i(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function n(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function u(t){let s=t.split("/"),e=s[s.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:s.length<=2:!1}function f(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}export{_ as a,a as b};
2
+ //# sourceMappingURL=chunk-FLMTCX5R.js.map
@@ -0,0 +1,2 @@
1
+ import{c as p}from"./chunk-T3I6NHBH.js";import{realpathSync as F}from"fs";import{createRequire as b}from"module";import{dirname as h,resolve as M}from"path";var g=b(import.meta.url),u,d;function x(){if(u!==void 0)return u;try{u=g("ts-morph")}catch{u=null}return u}function O(){if(d)return d;let r=x();if(!r)return"ts-morph:unavailable";let n="unknown";try{n=g("ts-morph/package.json").version??"unknown"}catch{}return d=`ts-morph:${n}:typescript:${r.ts.version}`,d}function D(r,n,e={}){return n.map(t=>j(r,t,e))}function j(r,n,e){let t=null,o,i,s=()=>(o===void 0&&(o=C(r,n)),o),c=()=>{if(i===void 0){let l=e.fileBudget??p(),f=s();i=(f===null?0:Math.ceil(f.size/2))>l*P?"file-closure":"project"}return i};return{tsconfigPath:n,get project(){return t??=new r.Project({tsConfigFilePath:n,skipFileDependencyResolution:!0,...c()==="file-closure"?{skipAddingFilesFromTsConfig:!0}:{}}),t},get loaded(){return t!==null},get fileNames(){return s()},get scope(){return c()}}}var P=1.35,k="TypeScript project-wide semantics are unavailable: a compiler project is file-scoped because its tsconfig lists more files than the worker heap can hold.";function z(r){return r.some(n=>n.scope==="file-closure")}function C(r,n){try{let e=r.ts,t=e.readConfigFile(n,e.sys.readFile);if(t.error||!t.config)return null;let o=e.parseJsonConfigFileContent(t.config,e.sys,h(n),void 0,n),i=new Set;for(let s of o.fileNames){let c=M(s);i.add(c);try{i.add(F(c))}catch{}}return i}catch{return null}}function A(r,n,e){return{language:"typescript",availability:()=>({available:!1,reason:r,tsconfigPath:n,tsconfigPaths:e}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}var T=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function _(r){let n=r.toLowerCase();return T.some(e=>n.endsWith(e))}function K(r,n){let e=I(r);for(let t of n.values())e.add(t);return e.finish()}function I(r){let n=new Map(r.map(t=>[t.symbol,t])),e=new Map(r.map(t=>[t.symbolId,[]]));return{add(t){for(let o of t){let i=n.get(o.targetSymbol);i&&e.get(i.symbolId).push(o.location)}},finish(){for(let[t,o]of e)e.set(t,v(o));return e}}}function J(r,n,e){let t=S(r,n),o=S(r,e),i=[...t].filter(a=>!o.has(a)).sort(),s=[...o].filter(a=>!t.has(a)).sort(),c=y(r,n),l=y(r,e),f=[...c].filter(a=>!l.has(a)).sort(),m=[...l].filter(a=>!c.has(a)).sort();return{passed:i.length===0&&s.length===0,expectedCount:t.size,actualCount:o.size,missing:i,extra:s,callerFiles:{passed:f.length===0&&m.length===0,expectedCount:c.size,actualCount:l.size,missing:f,extra:m}}}function y(r,n){let e=new Set;for(let t of r)for(let o of n.get(t.symbolId)??[])o.file!==t.relativePath&&e.add(`${t.symbol}\0${o.file}`);return e}function U(r,n,e){let t=new Set(e),o=new Map(e.map(i=>[i,[]]));for(let i of r)for(let s of n.get(i.symbolId)??[])t.has(s.file)&&o.get(s.file).push({targetSymbol:i.symbol,location:s});for(let[i,s]of o)o.set(i,w(s));return o}function S(r,n){let e=new Set;for(let t of r)for(let o of n.get(t.symbolId)??[])e.add(`${t.symbol}\0${o.file}\0${o.line}\0${o.column}`);return e}function v(r){let n=new Map;for(let e of r)n.set(`${e.file}\0${e.line}\0${e.column}`,e);return[...n.values()].sort(R)}function w(r){let n=new Map;for(let e of r){let{location:t}=e;n.set(`${e.targetSymbol}\0${t.file}\0${t.line}\0${t.column}`,e)}return[...n.values()].sort((e,t)=>e.targetSymbol.localeCompare(t.targetSymbol)||R(e.location,t.location))}function R(r,n){return r.file.localeCompare(n.file)||r.line-n.line||r.column-n.column}export{T as a,_ as b,x as c,O as d,D as e,k as f,z as g,A as h,K as i,I as j,J as k,U as l};
2
+ //# sourceMappingURL=chunk-FVFDOIM3.js.map
@@ -1,2 +1,2 @@
1
- import{b as i}from"./chunk-6VEFRPTD.js";function l(n,o,s,t={}){let e=i(n,o,s,t);return e?{symbolA:e.symbolA,symbolB:e.symbolB,similarity:e.similarity,sharedCallees:e.sharedEvidence,uniqueToA:e.uniqueToA,uniqueToB:e.uniqueToB,consolidationStrategy:e.consolidationStrategy}:null}export{l as a};
2
- //# sourceMappingURL=chunk-AQ2PORIO.js.map
1
+ import{b as i}from"./chunk-ZFVPWH62.js";function l(n,o,s,t={}){let e=i(n,o,s,t);return e?{symbolA:e.symbolA,symbolB:e.symbolB,similarity:e.similarity,sharedCallees:e.sharedEvidence,uniqueToA:e.uniqueToA,uniqueToB:e.uniqueToB,consolidationStrategy:e.consolidationStrategy}:null}export{l as a};
2
+ //# sourceMappingURL=chunk-G2HU5WRN.js.map
@@ -1,2 +1,2 @@
1
- import{d as m,f as y}from"./chunk-K3XFWJI2.js";import{g as d,i as x,k as p,l as b}from"./chunk-JT6XX7QY.js";import{h as l}from"./chunk-AK3PYTIK.js";import{createHash as S}from"crypto";import{dirname as R,join as f}from"path";var c=5,T=4,E=2,P="typescript-index";function _(t){let e=f(t,P),n=x(e);return{...n,requestDir:n.legacyRequestDir}}function F(t){let e=JSON.parse(t),n=e.protocolVersion,r=n===E,i=n===T,o=e.request,s=(r||i)&&o&&typeof o=="object"&&!Array.isArray(o)?{...o,removedFiles:o.removedFiles??[]}:o;if(!r&&!i&&n!==c||typeof e.id!="string"||!e.id||typeof e.baseGeneration!="string"||!e.baseGeneration||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||!q(s)||!r&&(e.mailboxVersion!==d||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==b(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript index service received an invalid mailbox request.");if(!r){let a=e,g=p(i?"typescript-index-v4":"typescript-index-v5",{baseGeneration:a.baseGeneration,request:o});if(a.operationKey!==g)throw new Error("TypeScript index service received a mismatched mailbox operation identity.");return{...a,protocolVersion:c,request:s}}let I=p("typescript-index-v2",{id:e.id,baseGeneration:e.baseGeneration,request:o});return{protocolVersion:c,mailboxVersion:d,id:e.id,operationKey:I,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,baseGeneration:e.baseGeneration,request:s}}function D(t){try{let e=y(m(l(f(R(t),"meta.json"),"reindex metadata")));return e?S("sha256").update(e).digest("hex"):null}catch{return null}}function q(t){if(!t||typeof t!="object")return!1;let e=t,n=u(e.modifiedFiles)?e.modifiedFiles:null,r=u(e.removedFiles)?e.removedFiles:null,i=u(e.affectedFiles)?e.affectedFiles:null;return e.kind==="emit-documents"&&typeof e.tsconfigPath=="string"&&!!e.tsconfigPath&&typeof e.projectArgument=="string"&&!!e.projectArgument&&typeof e.projectIdentity=="string"&&!!e.projectIdentity&&typeof e.producerIdentity=="string"&&!!e.producerIdentity&&n!==null&&new Set(n).size===n.length&&r!==null&&new Set(r).size===r.length&&i!==null&&(i.length>0||r.length>0)&&new Set(i).size===i.length}function u(t){return Array.isArray(t)&&t.every(e=>typeof e=="string"&&e.length>0)}export{c as a,_ as b,F as c,D as d};
2
- //# sourceMappingURL=chunk-7YQOCABQ.js.map
1
+ import{d as m,f as y}from"./chunk-CKBUBRYD.js";import{f as d,h as x,j as p,k as b}from"./chunk-T3CZAZSI.js";import{h as l}from"./chunk-7F45LJKI.js";import{createHash as S}from"crypto";import{dirname as R,join as f}from"path";var c=5,T=4,E=2,P="typescript-index";function _(t){let e=f(t,P),n=x(e);return{...n,requestDir:n.legacyRequestDir}}function F(t){let e=JSON.parse(t),n=e.protocolVersion,r=n===E,i=n===T,o=e.request,s=(r||i)&&o&&typeof o=="object"&&!Array.isArray(o)?{...o,removedFiles:o.removedFiles??[]}:o;if(!r&&!i&&n!==c||typeof e.id!="string"||!e.id||typeof e.baseGeneration!="string"||!e.baseGeneration||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||!q(s)||!r&&(e.mailboxVersion!==d||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==b(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript index service received an invalid mailbox request.");if(!r){let a=e,g=p(i?"typescript-index-v4":"typescript-index-v5",{baseGeneration:a.baseGeneration,request:o});if(a.operationKey!==g)throw new Error("TypeScript index service received a mismatched mailbox operation identity.");return{...a,protocolVersion:c,request:s}}let I=p("typescript-index-v2",{id:e.id,baseGeneration:e.baseGeneration,request:o});return{protocolVersion:c,mailboxVersion:d,id:e.id,operationKey:I,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,baseGeneration:e.baseGeneration,request:s}}function D(t){try{let e=y(m(l(f(R(t),"meta.json"),"reindex metadata")));return e?S("sha256").update(e).digest("hex"):null}catch{return null}}function q(t){if(!t||typeof t!="object")return!1;let e=t,n=u(e.modifiedFiles)?e.modifiedFiles:null,r=u(e.removedFiles)?e.removedFiles:null,i=u(e.affectedFiles)?e.affectedFiles:null;return e.kind==="emit-documents"&&typeof e.tsconfigPath=="string"&&!!e.tsconfigPath&&typeof e.projectArgument=="string"&&!!e.projectArgument&&typeof e.projectIdentity=="string"&&!!e.projectIdentity&&typeof e.producerIdentity=="string"&&!!e.producerIdentity&&n!==null&&new Set(n).size===n.length&&r!==null&&new Set(r).size===r.length&&i!==null&&(i.length>0||r.length>0)&&new Set(i).size===i.length}function u(t){return Array.isArray(t)&&t.every(e=>typeof e=="string"&&e.length>0)}export{c as a,_ as b,F as c,D as d};
2
+ //# sourceMappingURL=chunk-G4ALYS4J.js.map
@@ -1,4 +1,4 @@
1
- import{a as d}from"./chunk-Z2AWCTN6.js";import{b as l}from"./chunk-BWVQP3LB.js";import{d as r,u as m}from"./chunk-TD7VKJ2Y.js";function u(o,t={}){let{limit:i=30,scope:e}=t,n=e?"AND def_d.relative_path LIKE ?":"",f=e?[`%${e}%`]:[],c=o.all(`SELECT
1
+ import{a as d}from"./chunk-BJWFVAA5.js";import{g as l}from"./chunk-U3SXIMII.js";import{d as r,w as m}from"./chunk-C7C6AKAT.js";function u(o,t={}){let{limit:i=30,scope:e}=t,n=e?"AND def_d.relative_path LIKE ?":"",f=e?[`%${e}%`]:[],c=o.all(`SELECT
2
2
  gs.symbol,
3
3
  COUNT(*) AS ref_count,
4
4
  COUNT(DISTINCT ref_d.id) AS file_count,
@@ -23,4 +23,4 @@ import{a as d}from"./chunk-Z2AWCTN6.js";import{b as l}from"./chunk-BWVQP3LB.js";
23
23
  GROUP BY gs.id
24
24
  ORDER BY ref_count DESC
25
25
  LIMIT ?`,...f,i).filter(s=>!o.isIgnored(s.defined_in)).map(s=>({symbol:s.symbol,shortName:r(s.symbol),refCount:s.ref_count,fileCount:s.file_count,definedIn:s.defined_in,basis:"scip-cross-file-mentions",countUnit:"reference-occurrences"}));return c.length>0?c:a(o,e,i)}function C(o,t={}){return u(o,t)}function a(o,t,i){return m(o,{scope:t}).filter(e=>!o.isIgnored(e.relativePath)).map(e=>p(o,e)).filter(e=>e.refCount>0).sort((e,n)=>n.refCount-e.refCount||n.fileCount-e.fileCount).slice(0,i)}function p(o,t){let e=l(o,t,{limit:500,semanticEvidence:d}).filter(n=>n.file!==t.relativePath);return{symbol:t.symbol,shortName:r(t.symbol),refCount:e.length,fileCount:new Set(e.map(n=>n.file)).size,definedIn:t.relativePath,basis:"source-backed-incoming-evidence",countUnit:"distinct-incoming-evidence-rows"}}export{u as a,C as b};
26
- //# sourceMappingURL=chunk-SWK4XPUS.js.map
26
+ //# sourceMappingURL=chunk-G56I7K4W.js.map
@@ -1,2 +1,2 @@
1
- import{t as c}from"./chunk-TD7VKJ2Y.js";import{w as a}from"./chunk-42W3LFUK.js";var D=4;function m(e,i,t,r={}){return p(e,i,t,r.maxReexportDepth??D,0,new Set)}function p(e,i,t,r,s,o){let f=`${i}\0${t}`;if(o.has(f)||s>r)return[];o.add(f);let u=c(e,i).filter(n=>n.leaf===t);return u.length>0?u:a(e,i).flatMap(n=>n.sourcePath?n.kind==="named"&&!n.names.includes(t)?[]:p(e,n.sourcePath,t,r,s+1,new Set(o)):[])}export{m as a};
2
- //# sourceMappingURL=chunk-JFQBRL3J.js.map
1
+ import{v as c}from"./chunk-C7C6AKAT.js";import{x as a}from"./chunk-RBAD4GJ2.js";var D=4;function m(e,i,t,r={}){return p(e,i,t,r.maxReexportDepth??D,0,new Set)}function p(e,i,t,r,s,o){let f=`${i}\0${t}`;if(o.has(f)||s>r)return[];o.add(f);let u=c(e,i).filter(n=>n.leaf===t);return u.length>0?u:a(e,i).flatMap(n=>n.sourcePath?n.kind==="named"&&!n.names.includes(t)?[]:p(e,n.sourcePath,t,r,s+1,new Set(o)):[])}export{m as a};
2
+ //# sourceMappingURL=chunk-GC4DG2V5.js.map
@@ -0,0 +1,4 @@
1
+ import{g as H,h as S}from"./chunk-OIOC5EHF.js";import{b as V}from"./chunk-BOJ5SVE2.js";import{a as j}from"./chunk-BGBBVSH4.js";import{c as Z,j as G}from"./chunk-NJQISBL4.js";import{b as _}from"./chunk-FLMTCX5R.js";import{d as W}from"./chunk-MTDBHTSF.js";import{d as B,i as F,l as N,w as k}from"./chunk-C7C6AKAT.js";import{b as L,t as z,x as I,y as R}from"./chunk-RBAD4GJ2.js";import{n as v}from"./chunk-ETC674NS.js";import{y}from"./chunk-KNLQGXVH.js";import{d as T}from"./chunk-JZ2A7LDM.js";var ie=new Set(W());function Qe(e,t={}){let{includeHomonyms:n=!1,limit:r}=t,s=se(e,t).filter(i=>i.relationship==="divergent"||n&&i.relationship==="homonym");return r?s.slice(0,r):s}function se(e,t={}){let{scope:n,minSimilarity:r=.3,scanLimit:s}=t,i=ce(e,{scope:n,scanLimit:s});return oe(i,{minSimilarity:r,isDelegatePair:Be(e)}).filter(a=>!a.members.some(o=>v(e,o.file,o.startLine,"twin")))}function oe(e,t={}){let n=t.minSimilarity??.3,r=t.isDelegatePair,s=e.filter(c=>!re(c.leaf)&&!Se(c.leaf)&&!Q(c.symbol,c.leaf)&&!X(c.file,c.leaf)&&_(c.file)!=="test"&&!N(c.symbol)&&!J(c.symbol)&&!ee(c.symbol,c.leaf)),{recordsByLeaf:i,recordOrder:a}=y("twin-drift.group-by-leaf",()=>ae(s),()=>({records:s.length})),o=y("twin-drift.cluster-leaf-names",()=>q([...i.keys()]),()=>({leaves:i.size}));return y("twin-drift.compare-clusters",()=>{let c=[];for(let l of o){let m=le(l,i,a),b=new Set(m.filter(u=>m.some(g=>g!==u&&g.file!==u.file&&r?.(u,g,m))).map(u=>u.symbol)),h=m.filter(u=>!b.has(u.symbol));if(h.length<2||new Set(h.map(u=>u.file)).size<2)continue;let w=null,x=!1,E=!1,D=new Set;for(let u=0;u<h.length;u+=1)for(let g=u+1;g<h.length;g+=1){let d=h[u],p=h[g];if(d.file===p.file||!xe(d,p)||r?.(d,p,h)||r?.(p,d,h)||K(d,p)||K(p,d))continue;if(x=!0,D.add(d.symbol),D.add(p.symbol),d.normalizedBody===p.normalizedBody){E=!0;continue}let O=ye(d.tokens,p.tokens);(!w||O>w.similarity)&&(w={a:d,b:p,similarity:O})}if(!x)continue;let P=h.filter(u=>D.has(u.symbol)).sort((u,g)=>u.file.localeCompare(g.file)||u.startLine-g.startLine).map(we);if(!w){c.push({leaf:Y(l),relationship:E?"identical":"homonym",maxDivergence:0,members:P});continue}let $=w.similarity>=n?"divergent":"homonym";c.push({leaf:Y(l),relationship:$,maxDivergence:Math.round((1-w.similarity)*1e3)/1e3,members:P,...$==="divergent"?{firstDivergentTokens:be(w.a.tokens,w.b.tokens)}:{}})}return c},()=>({clusters:o.length,records:s.length})).sort((c,l)=>l.members.length-c.members.length||l.maxDivergence-c.maxDivergence||c.leaf.localeCompare(l.leaf))}function ae(e){let t=new Map,n=new Map;for(let[r,s]of e.entries()){let i=t.get(s.leaf)??[];i.push(s),t.set(s.leaf,i),n.set(s,r)}return{recordsByLeaf:t,recordOrder:n}}function le(e,t,n){let r=[...e].flatMap(s=>t.get(s)??[]);return e.size>1&&r.sort((s,i)=>(n.get(s)??0)-(n.get(i)??0)),r}function ce(e,t){let n=y("twin-drift.load-definitions",()=>k(e,{scope:t.scope}).filter(i=>fe(i)&&!e.isIgnored(i.relativePath)).filter(i=>!Z(i.relativePath)));y("twin-drift.sort-definitions",()=>n.sort((i,a)=>i.relativePath.localeCompare(a.relativePath)||i.startLine-a.startLine),()=>({definitions:n.length}));let r=V(n,t.scanLimit),s=y("twin-drift.select-candidates",()=>ue(r),()=>({scanned:r.length}));return y("twin-drift.build-records",()=>{let i=[];for(let a of s){let o=me(e,a);o&&i.push(o)}return i},()=>({candidates:s.length,scanned:r.length}))}function fe(e){return e.isFunctionLike?e.symbol.startsWith("rust-analyzer ")?typeof e.kind=="number"&&ie.has(e.kind):!0:!1}function ue(e){let t=e.filter(i=>i.leaf&&!re(i.leaf)&&!Q(i.symbol,i.leaf)&&!X(i.relativePath,i.leaf)&&!N(i.symbol)&&!J(i.symbol)&&!ee(i.symbol,i.leaf)),n=new Map;for(let i of t){let a=n.get(i.leaf)??[];a.push(i),n.set(i.leaf,a)}let r=q([...n.keys()]),s=new Set;for(let i of r){let a=[...i].flatMap(o=>n.get(o)??[]);if(!(a.length<2)&&!(new Set(a.map(o=>o.relativePath)).size<2)&&!a.every(o=>_(o.relativePath)==="test"))for(let o of a)s.add(o)}return e.filter(i=>s.has(i))}function me(e,t){if(!t.leaf)return null;let n=H(e,t);if(!n||!F(t.symbol)&&!pe(n,t.leaf)||ge(n,t.leaf))return null;let r=L(S(n)),s=r.replace(/\s+/g,"");if(!s||s.length<8)return null;let i=r.match(he)??[];return i.length===0?null:{leaf:t.leaf,symbol:t.symbol,shortName:B(t.symbol),file:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:j(t),normalizedBody:s,tokens:i,isThinForwarder:A(r),forwardTargetLeaf:de(r)}}function ge(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=e.split(`
2
+ `).slice(0,2).join(`
3
+ `);return new RegExp(`\\b(?:abstract|override)\\b[^\\n]*\\b${n}\\s*[(<]`).test(r)}function de(e){if(!A(e))return null;let t=M(e.trim()),n=C(t[t.length-1]),r=/^([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\(/.exec(n)?.[1];return r?r.split(".").pop()??null:null}function K(e,t){let n=e.forwardTargetLeaf;return typeof n=="string"&&n!==e.leaf&&n!==t.leaf&&!t.isThinForwarder}function pe(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`\\b(?:const|let|var)\\s+${n}(?:\\s*:[^=]+)?\\s*=\\s*(?:async\\s*)?(?:\\([^)]*\\)|[A-Za-z_$][\\w$]*)\\s*=>`,"s").test(e)}var he=/[A-Za-z_$][A-Za-z0-9_$]*|\d+(?:\.\d+)?|[^\sA-Za-z0-9_$]/g;function we(e){return{symbol:e.symbol,shortName:e.shortName,file:e.file,startLine:e.startLine,endLine:e.endLine,loc:e.loc}}function ye(e,t){let n=new Set(e),r=new Set(t);if(n.size===0&&r.size===0)return 1;if(n.size===0||r.size===0)return 0;let s=0;for(let a of n)r.has(a)&&(s+=1);let i=n.size+r.size-s;return i===0?0:s/i}function be(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;let s=e.slice(r,r+6).join(" "),i=t.slice(r,r+6).join(" ");return!s&&!i?"(bodies differ only in trailing length)":`A: ${s||"(end)"} | B: ${i||"(end)"}`}function q(e){let t=new Map;for(let a of e)t.set(a,a);let n=a=>{let o=a;for(;t.get(o)!==o;)o=t.get(o);let f=a;for(;t.get(f)!==o;){let c=t.get(f);t.set(f,o),f=c}return o},r=(a,o)=>{let f=n(a),c=n(o);f!==c&&t.set(f,c)},s=new Map;for(let a of e){let o=a.slice(0,2).toLowerCase(),f=s.get(o)??[];f.push(a),s.set(o,f)}for(let a of s.values())for(let o=0;o<a.length;o+=1)for(let f=o+1;f<a.length;f+=1)Te(a[o],a[f])&&r(a[o],a[f]);let i=new Map;for(let a of e){let o=n(a),f=i.get(o)??new Set;f.add(a),i.set(o,f)}return[...i.values()]}function Te(e,t){if(e===t||e.toLowerCase()===t.toLowerCase())return!0;if(e.length<8||t.length<8||Math.abs(e.length-t.length)>2)return!1;let[n,r]=e.length<=t.length?[e,t]:[t,e];return r.length>n.length&&r.startsWith(n)&&/^[A-Z]/.test(r.slice(n.length))||Le(e.toLowerCase(),t.toLowerCase())/Math.max(e.length,t.length)<.8?!1:Ee(e.toLowerCase(),t.toLowerCase(),2)}function Le(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}function Se(e){return/^[A-Z][A-Z0-9_]*$/.test(e)||/^__[^_].*__$/.test(e)||De.has(e.toLowerCase())}var De=new Set(["main","row"]),Re=new Set(["close","connect","count","create","delete","destroy","disconnect","dispose","execute","exists","find","findAll","findById","findOne","get","getAll","getById","handle","init","initialize","list","load","open","patch","process","read","remove","reset","run","save","shutdown","start","stop","toJSON","toString","update","upsert"]),Ne=/#(?:`[^`]+`|[^#/`]+)\(\)\.$/,_e=/^(?:get|find|list|load|fetch|count|delete|remove|update|upsert)(?:By|For)[A-Z]\w*$/;function Q(e,t){return(Re.has(t)||_e.test(t))&&Ne.test(e)}var Ae=/^(?:handler|handle(?:Get|Post|Put|Patch|Delete|Options|Head|Request)|(?:get|post|put|patch|delete|options|head|route|request)Handler|generateMetadata|generateStaticParams|generateViewport|generateSitemaps|loader|action|clientLoader|clientAction|middleware|config|default|load|actions|[A-Z][A-Za-z0-9]*(?:Page|Layout|Loading|Template|Route|Screen))$/;function X(e,t){return Ae.test(t)&&G(e.replace(/\\/g,"/"))}var Ce=new Set(["app","component","components","feature","features","impl","index","lib","route","routes","shared","src","tsx","typescript","ui"]);function J(e){return e.startsWith("rust-analyzer ")&&/\/(?:tests?|benches?)\//.test(e)}var Me=new Set(["default","new","reset"]);function ee(e,t){return e.startsWith("rust-analyzer ")&&Me.has(t.toLowerCase())}function xe(e,t){if(e.leaf.toLowerCase()!==t.leaf.toLowerCase()||e.leaf.length>4)return!0;let n=U(e);return[...U(t)].some(r=>n.has(r))}function U(e){let t=e.leaf.toLowerCase();return new Set(`${e.file}/${e.shortName}`.replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(n=>n.length>2&&n!==t&&!Ce.has(n)))}function Ee(e,t,n){if(Math.abs(e.length-t.length)>n)return!1;let r=Array.from({length:t.length+1},(s,i)=>i);for(let s=1;s<=e.length;s+=1){let i=[s],a=i[0];for(let o=1;o<=t.length;o+=1){let f=e[s-1]===t[o-1]?0:1,c=Math.min(r[o]+1,i[o-1]+1,r[o-1]+f);i.push(c),a=Math.min(a,c)}if(a>n)return!1;r=i}return r[t.length]<=n}function Xe(e){return A(L(S(e)))}function Je(e){let t=L(S(e)).trim();if(!t||te.test(t))return!1;let n=M(t);if(n.length!==1)return!1;let r=C(n[0]),s=Pe.exec(r);if(!s)return!1;let i=s[1].replace(/\[\s*\]|\{\s*\}/g,"");return!$e.test(i)}var Pe=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[[^[\]]*\])*\(([\s\S]*)\)$/,$e=/[()[\]{}]|=>|\b(?:await|new|function)\b/;function A(e){let t=e.trim();if(!t||te.test(t))return!1;let n=M(t);return n.length===0||n.length>2?!1:ve(n[n.length-1])}var te=/\b(?:if|else|for|while|switch|try|catch|do)\b/,Oe=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[[^[\]]*\])*\((?:[^()]|\([^()]*\))*\)$/;function ve(e){return Oe.test(C(e))}function C(e){return ze(e.trim().replace(/^return\s+/,"").replace(/^await\s+/,"").replace(/;\s*$/,"").trim())}function ze(e){let t=e.indexOf("<");if(t<0||!/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.test(e.slice(0,t)))return e;let n=0;for(let r=t;r<e.length;r+=1){let s=e[r];if(s==="<")n+=1;else if(s===">"&&(n-=1,n===0))return e[r+1]==="("?e.slice(0,t)+e.slice(r+1):e}return e}function M(e){let t=[],n=0,r="";for(let s of e){if(s==="("||s==="["||s==="{"?n+=1:(s===")"||s==="]"||s==="}")&&(n=Math.max(0,n-1)),s===";"&&n===0){t.push(r),r="";continue}r+=s}return r.trim()&&t.push(r),t.map(s=>s.trim()).filter(s=>s.length>0)}var Ie=3;function Be(e){let t=new Map;return(n,r,s)=>{let i=`${n.symbol}\0${r.symbol}`,a=t.get(i);if(a!==void 0)return a;let o=ne(e,n,r,s,Ie,new Set);return t.set(i,o),o}}function ne(e,t,n,r,s,i){if(s<=0||i.has(t.symbol))return!1;i.add(t.symbol);let a=R(e,t.file),o=new Set;for(let l of a)l.importedName===n.leaf&&l.localName&&l.localName!==n.leaf&&o.add(l.localName);o.size===0&&o.add(n.leaf);let f=(z(e,t.file)??[]).filter(l=>l.line>=t.startLine&&l.line<=t.endLine&&o.has(l.calleeLeaf));if(f.length===0)return!1;for(let l of f){if(!l.calleeQualifier)continue;let m=a.find(b=>b.localName===l.calleeQualifier&&b.sourcePath);if(m?.sourcePath){if(T(m.sourcePath,n.file))return!0;for(let b of R(e,m.sourcePath))if(b.sourcePath&&T(b.sourcePath,n.file))return!0}}let c=new Set(a.filter(l=>l.sourcePath&&(l.kind!=="namespace"||l.usedMembers.includes(n.leaf))).map(l=>l.sourcePath));for(let l of[...c])for(let m of I(e,l))m.sourcePath&&c.add(m.sourcePath);if([...c].some(l=>T(l,n.file)))return!0;for(let l of r)if(!(l.symbol===t.symbol||l.symbol===n.symbol||!l.isThinForwarder)&&[...c].some(m=>T(m,l.file))&&ne(e,l,n,r,s-1,i))return!0;return!1}function re(e){return e.startsWith("<")&&e.endsWith(">")}function Y(e){return[...e].sort()[0]}export{Qe as a,se as b,oe as c,Xe as d,Je as e,M as f};
4
+ //# sourceMappingURL=chunk-GG45PK4S.js.map
@@ -1,3 +1,3 @@
1
- import{k as s,m as o}from"./chunk-C7IJMOFP.js";import{d as i}from"./chunk-DRENNWRG.js";function u(r,e){let t=s(r,e.relativePath);if(t.length===0)return!1;let n=i(e.symbol);if(!n)return!1;let c=t.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
1
+ import{l as s,n as o}from"./chunk-2VAHDDLM.js";import{d as i}from"./chunk-BL6DCHQP.js";function u(r,e){let t=s(r,e.relativePath);if(t.length===0)return!1;let n=i(e.symbol);if(!n)return!1;let c=t.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
2
2
  `),a=o(n);return new RegExp(`^\\s*export\\s+(?:default\\s+)?(?:(?:async\\s+)?function\\s+${a}\\b|(?:abstract\\s+)?class\\s+${a}\\b|(?:interface|type|enum|namespace|module)\\s+${a}\\b|(?:const|let|var)\\s+${a}\\b)`,"m").test(c)?!0:p(t,n)}function p(r,e){if(!e)return!1;let t=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${o(e)}\\b`);return r.some(n=>t.test(n))}export{u as a};
3
- //# sourceMappingURL=chunk-XN22RGSR.js.map
3
+ //# sourceMappingURL=chunk-GHNPACNP.js.map
@@ -1,4 +1,4 @@
1
- import{n as l,s as d,v as u}from"./chunk-ISIQLPJ2.js";import{f as c}from"./chunk-GH5YSGZL.js";import h from"better-sqlite3";var m=["busy_timeout = 5000","query_only = ON","temp_store = MEMORY","cache_size = -64000","mmap_size = 268435456"],o=class{constructor(t,e){this.connection=t;this.releaseGenerationReader=e}connection;releaseGenerationReader;active=!0;initialize(t){try{for(let e of m)this.connection.pragma(e);t(this.connection)}catch(e){try{this.close()}catch(n){throw new AggregateError([e,n],"SQLite initialization and rollback both failed.",{cause:n})}throw e}}close(){if(!this.active)return;this.active=!1;let t,e;try{this.connection.close()}catch(n){t=n}try{this.releaseGenerationReader()}catch(n){e=n}if(t!==void 0&&e!==void 0)throw new AggregateError([t,e],"SQLite connection close and generation-reader release both failed.");if(t!==void 0)throw t;if(e!==void 0)throw e}},b=["node_modules",".git","dist","build","out","coverage","target",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs",".scipquery-cache","__pycache__",".venv","venv"],p=class{db;config;generation;pathFilter;connection;connectionOwnership;statementCache=new Map;constructor(t,e){this.config=t,this.pathFilter=e??null;let n=S(t),i=new o(n.db,n.release);try{i.initialize(y),this.generation=n.generation,this.connection=n.db,this.connectionOwnership=i,this.db=g(n.db)}catch(r){try{i.close()}catch(s){throw new AggregateError([r,s],"SQLite construction and rollback both failed.",{cause:s})}throw r}}isIgnored(t){return this.pathFilter?.isIgnored(t)??!1}get localSymbolPredicate(){return`(
1
+ import{o as l,t as d,w as u}from"./chunk-SYVJEEUJ.js";import{f as c}from"./chunk-JZ2A7LDM.js";import h from"better-sqlite3";var m=["busy_timeout = 5000","query_only = ON","temp_store = MEMORY","cache_size = -64000","mmap_size = 268435456"],o=class{constructor(t,e){this.connection=t;this.releaseGenerationReader=e}connection;releaseGenerationReader;active=!0;initialize(t){try{for(let e of m)this.connection.pragma(e);t(this.connection)}catch(e){try{this.close()}catch(n){throw new AggregateError([e,n],"SQLite initialization and rollback both failed.",{cause:n})}throw e}}close(){if(!this.active)return;this.active=!1;let t,e;try{this.connection.close()}catch(n){t=n}try{this.releaseGenerationReader()}catch(n){e=n}if(t!==void 0&&e!==void 0)throw new AggregateError([t,e],"SQLite connection close and generation-reader release both failed.");if(t!==void 0)throw t;if(e!==void 0)throw e}},b=["node_modules",".git","dist","build","out","coverage","target",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs",".scipquery-cache","__pycache__",".venv","venv"],p=class{db;config;generation;pathFilter;connection;connectionOwnership;statementCache=new Map;constructor(t,e){this.config=t,this.pathFilter=e??null;let n=S(t),i=new o(n.db,n.release);try{i.initialize(y),this.generation=n.generation,this.connection=n.db,this.connectionOwnership=i,this.db=g(n.db)}catch(r){try{i.close()}catch(s){throw new AggregateError([r,s],"SQLite construction and rollback both failed.",{cause:s})}throw r}}isIgnored(t){return this.pathFilter?.isIgnored(t)??!1}get localSymbolPredicate(){return`(
2
2
  EXISTS (
3
3
  SELECT 1
4
4
  FROM defn_enclosing_ranges local_der
@@ -17,4 +17,4 @@ import{n as l,s as d,v as u}from"./chunk-ISIQLPJ2.js";import{f as c}from"./chunk
17
17
  )
18
18
  )`}get pathExclusions(){return this.pathExclusionsFor("d")}get symbolNoise(){return this.symbolNoiseFor("gs")}pathExclusionsFor(...t){return t.flatMap(e=>b.flatMap(n=>[`AND ${e}.relative_path NOT LIKE '${n}/%'`,`AND ${e}.relative_path NOT LIKE '%/${n}/%'`])).join(`
19
19
  `)}symbolNoiseFor(t){return`AND ${t}.symbol NOT LIKE '%().(%' AND ${t}.symbol NOT LIKE '%typeLiteral%'`}all(t,...e){return this.statement(t).all(...e)}get(t,...e){return this.statement(t).get(...e)}close(){this.statementCache.clear(),this.connectionOwnership.close()}statement(t){let e=this.statementCache.get(t);return e||(e=this.connection.prepare(t),this.statementCache.set(t,e)),e}};function g(a){return Object.freeze({prepare(t){let e=a.prepare(t);if(!e.readonly||!e.reader)throw new Error("ScipDatabase.db only permits read-only statements that return rows.");return f(e)}})}function f(a){let t={get:(...e)=>a.get(...e),all:(...e)=>a.all(...e),iterate:(...e)=>a.iterate(...e),pluck(e){return e===void 0?a.pluck():a.pluck(e),t},expand(e){return e===void 0?a.expand():a.expand(e),t},raw(e){return e===void 0?a.raw():a.raw(e),t},bind(...e){return a.bind(...e),t},columns:()=>a.columns(),safeIntegers(e){return e===void 0?a.safeIntegers():a.safeIntegers(e),t}};return Object.freeze(t)}function y(a){if(!a.prepare("SELECT 1 AS present FROM sqlite_master WHERE type = 'table' AND name = 'documents'").get())return;let e=a.prepare("SELECT relative_path FROM documents").iterate();for(let n of e)c(n.relative_path)}function S(a){for(let t=0;t<4;t+=1){let e=l(a),n=e.generation,i;try{i=new h(n.databasePath,{readonly:!0,fileMustExist:!0})}catch(r){throw e.release(),r}if(n.source==="immutable")return{db:i,generation:n,release:e.release};try{let r=d(a);if(n.databaseFileIdentity===u(n.databasePath)&&r.source==="legacy"&&r.identity===n.identity&&r.databaseFileIdentity===n.databaseFileIdentity&&r.metadataRaw===n.metadataRaw)return{db:i,generation:n,release:e.release}}catch(r){throw i.close(),e.release(),r}i.close(),e.release()}throw new Error("SQLite index publication changed repeatedly while opening a coherent generation.")}export{p as a};
20
- //# sourceMappingURL=chunk-XU75YQN4.js.map
20
+ //# sourceMappingURL=chunk-GINH3YQU.js.map
@@ -0,0 +1,2 @@
1
+ import{i as I}from"./chunk-YSYPDRD5.js";import{a as p,e as g}from"./chunk-C7C6AKAT.js";import{A as v}from"./chunk-ZLMXIQLC.js";import{c as E,e as x}from"./chunk-ETC674NS.js";import{c as b,i as D,j as F,v as _,y}from"./chunk-KNLQGXVH.js";import{spawnSync as O}from"child_process";import{createHash as U}from"crypto";import{existsSync as k}from"fs";import{dirname as L,join as T}from"path";import{fileURLToPath as j}from"url";var N=b("definition-consumer-file-usage",{clearGroups:["whole-project","source-file"]}),M=E({kind:"consumer-file-usage",invalidation:x("consumer-file-usage"),serialize:W,deserialize:X});function Me(e,n){return{forDefinitions(t,r){return V(e,n,t,r)}}}function Re(e){let n=new Map;for(let[t,r]of e)n.set(t,new Set(r.files.map(i=>i.file)));return n}function Ne(e,n,t){return w(e,n,t).partition}function V(e,n,t,r){let i=h(t.length),s=_()?F(e):null,a=s?B(t,r,s):void 0,o=a?{workIdentity:a,workOutcome:"computed"}:{};return y("consumer-evidence.product",()=>{let l=y("consumer-evidence.provenance",()=>Y(e,n,t,r),()=>({...o,definitions:t.length,semantic:r.semantic,sourceFallback:r.sourceFallback!==!1})),u=new Map;i={...i,...l.counters};let c=z(t,l.sources);return y("consumer-evidence.classify",()=>{let f=q(e,t,l.sources,c);for(let d of t){let m=f.get(d.symbolId)??H();i.realFiles+=m.partition.realConsumers.length,i.reexportOnlyFiles+=m.partition.barrelConsumers,i.importOnlyFiles+=m.partition.importOnlyConsumers,u.set(d.symbolId,{definition:d,files:m.files,...m.partition})}},()=>({...o,...c,realFiles:i.realFiles,reexportOnlyFiles:i.reexportOnlyFiles,importOnlyFiles:i.importOnlyFiles})),u},()=>({...o,...i}))}function B(e,n,t){let r=U("sha256").update("consumer-evidence-v1\0").update(t).update("\0").update(n.semantic?"semantic\0":"indexed\0").update(n.sourceFallback===!1?"no-source-fallback":"source-fallback");for(let i of e.map(s=>s.symbol).sort())r.update("\0").update(i);return r.digest("hex").slice(0,24)}function h(e){return{definitions:e,indexedFiles:0,semanticFiles:0,fallbackFiles:0,totalFiles:0,realFiles:0,reexportOnlyFiles:0,importOnlyFiles:0}}function Y(e,n,t,r){let i=h(t.length),s=new Map;return S(s,i,"indexed",n.crossFileCallerMap(t,{semantic:!1})),r.semantic&&S(s,i,"semantic",I(e,t)),r.sourceFallback!==!1&&S(s,i,"source-fallback",n.sourceFallbackCallerFiles(t)),i.totalFiles=[...s.values()].reduce((a,o)=>a+o.size,0),{sources:s,counters:i}}function z(e,n){return{definitions:e.length,consumerFiles:[...n.values()].reduce((t,r)=>t+r.size,0),nativeAttempted:!1,nativeUsed:!1,nativeReason:"not-attempted"}}function S(e,n,t,r){let i=0;for(let[s,a]of r){let o=e.get(s);o||(o=new Map,e.set(s,o));for(let l of a){i++;let u=o.get(l)??new Set;u.add(t),o.set(l,u)}}t==="indexed"?n.indexedFiles+=i:t==="semantic"?n.semanticFiles+=i:n.fallbackFiles+=i}function q(e,n,t,r){let i=se(e,n,t,r);return i||$(e,n,t)}function $(e,n,t){let r=new Map;for(let i of n){let s=t.get(i.symbolId)??new Map;r.set(i.symbolId,w(e,i,[...s.keys()],s))}return r}function w(e,n,t,r=new Map){let i=[],s=0,a=0,o=g(n.symbol),l=[];for(let u of t){let c;Z(e,u,n.relativePath,o)?(s++,c="reexport-only"):J(e,u,o)?(a++,c="import-only"):(i.push(u),c="real"),l.push({file:u,sources:[...r.get(u)??[]],classification:c})}return{partition:{realConsumers:i,barrelConsumers:s,importOnlyConsumers:a},files:l}}function H(){return{partition:{realConsumers:[],barrelConsumers:0,importOnlyConsumers:0},files:[]}}function J(e,n,t){if(!t)return!1;let r=v(n);if(!r)return!1;let i=N.get(e,n,()=>A(e,n,r));return i.importedLeaves.has(t)&&!i.usedLeaves.has(t)}function A(e,n,t){let r=p(e).forFile(n,{text:!0}).text;if(!r)return Q();let i=D(e,n,r),s=M.read(e,n,i);if(s)return s;let a=G(p(e).forFile(n,{ast:!0}).ast,t);return M.write(e,n,i,a),a}var K=new Set(["identifier","type_identifier","property_identifier","field_identifier"]);function G(e,n){let t=new Set,r=new Set;if(!e)return{importedLeaves:t,usedLeaves:r};let i=n==="rust"?new Set(["use_declaration"]):n==="python"?new Set(["import_statement","import_from_statement"]):new Set(["import_statement"]),s=e.walk(),a=0,o=!1;for(;!o;){let l=s.nodeType,u=i.has(l);if(u&&(a+=1),K.has(l)&&(a>0?t:r).add(s.nodeText),!s.gotoFirstChild())for(u&&(a-=1);!s.gotoNextSibling();){if(!s.gotoParent()){o=!0;break}i.has(s.nodeType)&&(a-=1)}}return{importedLeaves:t,usedLeaves:r}}function Q(){return{importedLeaves:new Set,usedLeaves:new Set}}function W(e){return JSON.stringify({importedLeaves:[...e.importedLeaves],usedLeaves:[...e.usedLeaves]})}function X(e){try{let n=JSON.parse(e);return!Array.isArray(n.importedLeaves)||!Array.isArray(n.usedLeaves)?null:{importedLeaves:new Set(n.importedLeaves.filter(t=>typeof t=="string")),usedLeaves:new Set(n.usedLeaves.filter(t=>typeof t=="string"))}}catch{return null}}function Z(e,n,t,r){if(!r)return!1;let i=p(e).forFile(n,{lines:!0,reexports:!0}),s=i.lines??[];if(s.length===0)return!1;let a=i.reexports??[];return P(s,a,r)}function P(e,n,t){if(e.length===0||n.length===0)return!1;let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`\\b${r}\\b`),s=0;for(let a=0;a<e.length;a++){if(!i.test(e[a]??""))continue;if(s++,!n.find(l=>l.startLine<=a&&a<=l.endLine))return!1}return s>0}var ee="SCIP_QUERY_NATIVE_CONSUMER_CLASSIFY",ne="SCIP_QUERY_NATIVE_KERNELS_BIN",ie="SCIP_QUERY_NATIVE_CONSUMER_CLASSIFY_MIN_FILES",R=1e3,re=5e3,te=64*1024*1024,C;function se(e,n,t,r){let i=process.env[ee]?.toLowerCase();if(i!=="1"&&i!=="true")return r.nativeReason=i==="0"||i==="false"?"disabled":"opt-in-required",null;if(r.consumerFiles<me())return r.nativeReason="below-threshold",null;let s=de();if(!s)return r.nativeReason="binary-missing",null;r.nativeAttempted=!0;let a=oe(e,n,t),o=O(s,["consumer-classify"],{input:JSON.stringify(a),encoding:"utf8",timeout:re,maxBuffer:te});if(o.status!==0||o.error)return r.nativeReason=o.error?`spawn-error:${o.error.message}`:`exit-${o.status??"null"}`,null;try{let l=JSON.parse(o.stdout),u=le(l,n);return u?(r.nativeUsed=!0,r.nativeReason="used",u):(r.nativeReason="invalid-response",null)}catch{return r.nativeReason="invalid-json",null}}function oe(e,n,t){let r=new Map,i=[];for(let o of n){let l=g(o.symbol),c=[...(t.get(o.symbolId)??new Map).entries()].map(([f,d])=>{let m=r.get(f)??new Set;return l&&m.add(l),r.set(f,m),{file:f,sources:[...d]}});i.push({symbol_id:o.symbolId,leaf:l,consumer_files:c})}let s={},a={};for(let[o,l]of r){let u=v(o);if(u){let f=N.get(e,o,()=>A(e,o,u));s[o]={imported_leaves:[...f.importedLeaves],used_leaves:[...f.usedLeaves]}}let c=ae(e,o,l);c.length>0&&(a[o]=c)}return{definitions:i,file_usages:s,reexport_only_leaves:a}}function ae(e,n,t){if(t.size===0)return[];let r=p(e).forFile(n,{lines:!0,reexports:!0}),i=r.lines??[],s=r.reexports??[];return i.length===0||s.length===0?[]:[...t].filter(a=>P(i,s,a))}function le(e,n){if(!Array.isArray(e.entries)||e.entries.length!==n.length)return null;let t=new Set(n.map(i=>i.symbolId)),r=new Map;for(let i of e.entries){let s=ue(i);if(!s||!t.has(s.symbol_id))return null;r.set(s.symbol_id,{partition:{realConsumers:s.real_consumers,barrelConsumers:s.barrel_consumers,importOnlyConsumers:s.import_only_consumers},files:s.files})}for(let i of t)if(!r.has(i))return null;return r}function ue(e){if(!e||typeof e!="object")return null;let n=e;if(typeof n.symbol_id!="number"||!Array.isArray(n.real_consumers)||typeof n.barrel_consumers!="number"||typeof n.import_only_consumers!="number"||!Array.isArray(n.files)||!n.real_consumers.every(r=>typeof r=="string"))return null;let t=[];for(let r of n.files){if(!r||typeof r!="object")return null;let i=r;if(typeof i.file!="string"||!Array.isArray(i.sources)||!i.sources.every(ce)||!fe(i.classification))return null;t.push({file:i.file,sources:i.sources,classification:i.classification})}return{symbol_id:n.symbol_id,real_consumers:n.real_consumers,barrel_consumers:n.barrel_consumers,import_only_consumers:n.import_only_consumers,files:t}}function ce(e){return e==="indexed"||e==="semantic"||e==="source-fallback"}function fe(e){return e==="real"||e==="reexport-only"||e==="import-only"}function me(){let e=process.env[ie];if(!e)return R;let n=Number(e);return Number.isFinite(n)&&n>=0?n:R}function de(){if(C!==void 0)return C;let e=process.env[ne],n=process.platform==="win32"?"scip-query-kernels.exe":"scip-query-kernels";return C=[...e?[e]:[],...pe().map(r=>T(r,"target","release",n))].find(r=>k(r))??null,C}function pe(){let e=new Set,n=L(j(import.meta.url));for(let t=0;t<5;t++)e.add(n),n=L(n);return[...e]}export{Me as a,Re as b,Ne as c,J as d};
2
+ //# sourceMappingURL=chunk-GTZZVLKJ.js.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-O6BUXZEH.js";var e=t;export{e as a};
2
+ //# sourceMappingURL=chunk-GXXW5ZHH.js.map