codebaseiq 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. package/CHANGELOG.md +59 -2
  2. package/README.md +1 -1
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/{chunk-WH5SYOMD.js → chunk-2E6OUPCF.js} +2 -2
  5. package/dist/chunk-2I2UHZET.js +2 -0
  6. package/dist/{chunk-CSZOQ7YO.js → chunk-2OMXFE64.js} +2 -2
  7. package/dist/{chunk-57KFVPVZ.js → chunk-2XBJRZEM.js} +2 -2
  8. package/dist/{chunk-PFPHS4NO.js → chunk-2Z7K66D7.js} +2 -2
  9. package/dist/{chunk-5WXOEJ4G.js → chunk-356EZBIP.js} +2 -2
  10. package/dist/{chunk-DLC6JDN7.js → chunk-3H2H5ODK.js} +2 -2
  11. package/dist/{chunk-HBQGKMM3.js → chunk-3LQJRS4I.js} +2 -2
  12. package/dist/{chunk-H3CKAL6P.js → chunk-3ON3A2QV.js} +2 -2
  13. package/dist/{chunk-MTMF4N7F.js → chunk-3VJ3OCRE.js} +2 -2
  14. package/dist/{chunk-QMGWSEPL.js → chunk-4GWN76B2.js} +2 -2
  15. package/dist/{chunk-IBM3F2BJ.js → chunk-4LK5OIPW.js} +2 -2
  16. package/dist/{chunk-6SDEQTVY.js → chunk-53ELMZRF.js} +2 -2
  17. package/dist/{chunk-OJFLPVBP.js → chunk-57OPIQFM.js} +2 -2
  18. package/dist/{chunk-2E6BTWER.js → chunk-5CR4U5X2.js} +2 -2
  19. package/dist/{chunk-IYBIBMPF.js → chunk-5FWR5HLG.js} +2 -2
  20. package/dist/{chunk-HHBBGWES.js → chunk-5LL4KEHO.js} +2 -2
  21. package/dist/{chunk-NTRW52UR.js → chunk-5MPBSFZH.js} +2 -2
  22. package/dist/chunk-5T44HG5Y.js +88 -0
  23. package/dist/chunk-5TZNHP4T.js +8 -0
  24. package/dist/{chunk-L3YSDLNB.js → chunk-5YBDBY5L.js} +2 -2
  25. package/dist/{chunk-YFQPWKHR.js → chunk-5ZI2PPI7.js} +2 -2
  26. package/dist/{chunk-WO47BIPY.js → chunk-6EYESTJM.js} +2 -2
  27. package/dist/{chunk-PHPQ24UG.js → chunk-6FXXYYQM.js} +2 -2
  28. package/dist/chunk-6O3KXIDL.js +2 -0
  29. package/dist/{chunk-PLZXWZHY.js → chunk-7GAK2F3H.js} +2 -2
  30. package/dist/{chunk-W3FK73MD.js → chunk-7UCDGXRW.js} +2 -2
  31. package/dist/{chunk-U2XX3BT4.js → chunk-AGGR2BKS.js} +2 -2
  32. package/dist/{chunk-ZB3V5QM7.js → chunk-ALOEHWJS.js} +2 -2
  33. package/dist/{chunk-NDGTJHQN.js → chunk-AXQCHG77.js} +2 -2
  34. package/dist/{chunk-X5I2BQGX.js → chunk-BFANZRQ5.js} +2 -2
  35. package/dist/{chunk-VVCBMH5O.js → chunk-BGGB5N53.js} +2 -2
  36. package/dist/{chunk-PARCKE3Q.js → chunk-BGYRF5YX.js} +2 -2
  37. package/dist/{chunk-CIVYHK7U.js → chunk-BIADXGC3.js} +2 -2
  38. package/dist/{chunk-NK76RSB6.js → chunk-BPKNP3KZ.js} +2 -2
  39. package/dist/{chunk-ZOEDRCR4.js → chunk-BRQL7AFJ.js} +2 -2
  40. package/dist/{chunk-KDYQQJ6X.js → chunk-BWL3PMPT.js} +2 -2
  41. package/dist/{chunk-M7LAIM77.js → chunk-C6WKPKCF.js} +2 -2
  42. package/dist/{chunk-37TKC6MB.js → chunk-CB5AVJMM.js} +2 -2
  43. package/dist/{chunk-BX2U3QQV.js → chunk-CCIYWXX6.js} +2 -2
  44. package/dist/{chunk-3AC56WAR.js → chunk-CIYA2KZN.js} +2 -2
  45. package/dist/{chunk-6OVNYYY4.js → chunk-CJTKGAGH.js} +2 -2
  46. package/dist/{chunk-FIXYHQ3W.js → chunk-CLPCFGRT.js} +2 -2
  47. package/dist/{chunk-LY2NB5XR.js → chunk-CSPDQLLU.js} +2 -2
  48. package/dist/{chunk-CMXW7MFV.js → chunk-CYJS33YX.js} +2 -2
  49. package/dist/{chunk-ACZDU5GK.js → chunk-D7DOB27N.js} +7 -7
  50. package/dist/{chunk-XUJM6474.js → chunk-DDRA3QKN.js} +2 -2
  51. package/dist/{chunk-3NUZVLR7.js → chunk-DECN422G.js} +2 -2
  52. package/dist/{chunk-RRPK327J.js → chunk-DJKOXMNG.js} +2 -2
  53. package/dist/{chunk-SJZQ2PTZ.js → chunk-DWBAESVW.js} +2 -2
  54. package/dist/{chunk-S5SKXCND.js → chunk-EHPOTEQX.js} +2 -2
  55. package/dist/chunk-EIBGSU2R.js +2 -0
  56. package/dist/{chunk-DVYG3JTA.js → chunk-ELYMY5S2.js} +2 -2
  57. package/dist/chunk-EOKVZXNF.js +355 -0
  58. package/dist/chunk-EQNMD62X.js +51 -0
  59. package/dist/{chunk-YIOQJ45A.js → chunk-F3QSL4W2.js} +2 -2
  60. package/dist/{chunk-VG55NFXF.js → chunk-F5CJO5JN.js} +2 -2
  61. package/dist/{chunk-JOALNFY3.js → chunk-F74LZWCE.js} +2 -2
  62. package/dist/chunk-G7GVV2TV.js +27 -0
  63. package/dist/{chunk-U24M5RQM.js → chunk-GQLDYCWS.js} +2 -2
  64. package/dist/{chunk-B2E3HZ2A.js → chunk-GV2CEZCW.js} +2 -2
  65. package/dist/{chunk-AM5SUGHF.js → chunk-GVAF222T.js} +2 -2
  66. package/dist/{chunk-T3YFIJ5P.js → chunk-HJTM3C4Y.js} +2 -2
  67. package/dist/{chunk-FY5V4V4F.js → chunk-HNXRVGMY.js} +2 -2
  68. package/dist/{chunk-UWB5WMC2.js → chunk-I3OK27P7.js} +2 -2
  69. package/dist/{chunk-RVYLJDXC.js → chunk-ICUL7XRT.js} +2 -2
  70. package/dist/{chunk-QVHZB75Z.js → chunk-IHSLIIL3.js} +2 -2
  71. package/dist/chunk-ILGTMRMZ.js +2 -0
  72. package/dist/{chunk-XNUWRTYM.js → chunk-IZDPGOZR.js} +2 -2
  73. package/dist/{chunk-BH5CE4LN.js → chunk-J7AMBVWF.js} +2 -2
  74. package/dist/chunk-JAFDMV5I.js +2 -0
  75. package/dist/{chunk-YXJ4IAHH.js → chunk-JCMFBF4Z.js} +2 -2
  76. package/dist/{chunk-BLKYYQ7C.js → chunk-JNXI6NQ7.js} +95 -95
  77. package/dist/{chunk-DKJXK3HA.js → chunk-JSB43EX6.js} +2 -2
  78. package/dist/chunk-JYRJYXUV.js +2 -0
  79. package/dist/chunk-K4S2VH42.js +82 -0
  80. package/dist/{chunk-QLTFXVUI.js → chunk-K6FNTQQW.js} +2 -2
  81. package/dist/{chunk-JYX5UZSZ.js → chunk-KEJ2HLRW.js} +2 -2
  82. package/dist/{chunk-VCWAJPXQ.js → chunk-KFTHI2R6.js} +2 -2
  83. package/dist/chunk-KLX6NSWT.js +3 -0
  84. package/dist/{chunk-DFPAZXLU.js → chunk-KPZGTB2O.js} +2 -2
  85. package/dist/{chunk-T55YPJGB.js → chunk-KUKKLWJD.js} +2 -2
  86. package/dist/{chunk-RWKEXCHU.js → chunk-KUKWHP4R.js} +2 -2
  87. package/dist/{chunk-ZJZQ7Q2Q.js → chunk-KWRQVLPX.js} +2 -2
  88. package/dist/{chunk-FQA3KIFX.js → chunk-L37EQYAX.js} +2 -2
  89. package/dist/{chunk-PNVZIJ57.js → chunk-LCW3PSGL.js} +2 -2
  90. package/dist/{chunk-7Z7HCZ7J.js → chunk-LKUTSP4G.js} +2 -2
  91. package/dist/{chunk-HIEXRDJF.js → chunk-LMTSB3TB.js} +2 -2
  92. package/dist/{chunk-SF34QLK2.js → chunk-LQHYYIOB.js} +2 -2
  93. package/dist/{chunk-EXMVF3JR.js → chunk-LSZYMN2A.js} +3 -3
  94. package/dist/{chunk-RCPZOPV6.js → chunk-M2Y6PCFE.js} +2 -2
  95. package/dist/chunk-MC46AL7B.js +343 -0
  96. package/dist/{chunk-SRY26ITJ.js → chunk-MDFT325O.js} +2 -2
  97. package/dist/{chunk-WJOQC4P7.js → chunk-MEUHIDI3.js} +2 -2
  98. package/dist/{chunk-FLLXYUOL.js → chunk-MQW6SJ4P.js} +2 -2
  99. package/dist/{chunk-57KEZDPT.js → chunk-MSI3K7PJ.js} +2 -2
  100. package/dist/{chunk-27PHVDKL.js → chunk-MZNMASFM.js} +2 -2
  101. package/dist/{chunk-VYZQZ4ZN.js → chunk-N2XDMNVI.js} +2 -2
  102. package/dist/{chunk-JN5LIBT3.js → chunk-NDKOVQFG.js} +2 -2
  103. package/dist/{chunk-W6C6QTXJ.js → chunk-NEWHKGVD.js} +2 -2
  104. package/dist/chunk-NNG6M6XD.js +3 -0
  105. package/dist/chunk-O2KWU34K.js +278 -0
  106. package/dist/{chunk-HBXZAGY6.js → chunk-O2M3VNDY.js} +2 -2
  107. package/dist/{chunk-FPDL2TUB.js → chunk-OBC7HSSO.js} +2 -2
  108. package/dist/{chunk-J24VICI5.js → chunk-OKAF4OQS.js} +2 -2
  109. package/dist/{chunk-I5FCDTK2.js → chunk-OP6BUIV6.js} +2 -2
  110. package/dist/{chunk-2DMVFAY7.js → chunk-OQ3DK7FW.js} +2 -2
  111. package/dist/{chunk-FEBLLMTL.js → chunk-OQUCBKOI.js} +2 -2
  112. package/dist/chunk-OT5ISJSR.js +2 -0
  113. package/dist/{chunk-N3Q3AWGW.js → chunk-OWJWOEDU.js} +96 -96
  114. package/dist/{chunk-M4EVGA5S.js → chunk-PIFYOWS4.js} +3 -3
  115. package/dist/{chunk-35YYZD3D.js → chunk-PTR3EOXC.js} +2 -2
  116. package/dist/{chunk-5XEVXVTK.js → chunk-PUVNH4PO.js} +2 -2
  117. package/dist/{chunk-I645ZF75.js → chunk-QEOWONKY.js} +2 -2
  118. package/dist/{chunk-JXHLB7TP.js → chunk-QMOZZ2VX.js} +2 -2
  119. package/dist/{chunk-NIO346UL.js → chunk-QY7QB7I6.js} +2 -2
  120. package/dist/{chunk-YYFV32WR.js → chunk-R4OJGTMP.js} +2 -2
  121. package/dist/{chunk-2VKB5CMA.js → chunk-RCIGX23V.js} +2 -2
  122. package/dist/{chunk-TUTSO7UZ.js → chunk-RIO3JXHM.js} +2 -2
  123. package/dist/{chunk-4IFISPQW.js → chunk-SA7G6GJX.js} +2 -2
  124. package/dist/{chunk-OMBRP7BB.js → chunk-SB53KPWA.js} +2 -2
  125. package/dist/chunk-SB7NASHU.js +2 -0
  126. package/dist/{chunk-3XFJUWJE.js → chunk-SGMNWYTH.js} +2 -2
  127. package/dist/{chunk-A7XQT7MH.js → chunk-SUE7SHZL.js} +2 -2
  128. package/dist/{chunk-IOVPAZWP.js → chunk-SX72EVMY.js} +2 -2
  129. package/dist/{chunk-OVKZM2XI.js → chunk-SZ4P7MF7.js} +2 -2
  130. package/dist/{chunk-EM5UHLAM.js → chunk-T2M5HWBQ.js} +2 -2
  131. package/dist/{chunk-CZEIHYMP.js → chunk-T6MQNNAC.js} +2 -2
  132. package/dist/chunk-T75DS2E6.js +21 -0
  133. package/dist/{chunk-57GCCPLS.js → chunk-TEANKHUU.js} +2 -2
  134. package/dist/{chunk-MT5W4DUG.js → chunk-TEMM2FEL.js} +2 -2
  135. package/dist/{chunk-I2KP4AGR.js → chunk-TJWVT4DO.js} +2 -2
  136. package/dist/{chunk-77GHPR2R.js → chunk-TLTSESB4.js} +2 -2
  137. package/dist/{chunk-KM4QRWI5.js → chunk-TNJGTQWO.js} +2 -2
  138. package/dist/{chunk-EFFMFK7C.js → chunk-TOTWJZIX.js} +2 -2
  139. package/dist/{chunk-54K6556S.js → chunk-U33PMPNW.js} +2 -2
  140. package/dist/{chunk-GXVDTHFC.js → chunk-U7NUXDQO.js} +2 -2
  141. package/dist/chunk-UC2FD2PS.js +4 -0
  142. package/dist/{chunk-MRGTCMDK.js → chunk-UIAUPFBJ.js} +2 -2
  143. package/dist/{chunk-LAGDJXFY.js → chunk-UJIXCI3L.js} +2 -2
  144. package/dist/{chunk-IVJJNVSX.js → chunk-UMEPSVKT.js} +2 -2
  145. package/dist/{chunk-4O52YNKL.js → chunk-UQYQBLJX.js} +2 -2
  146. package/dist/{chunk-JUO3Z644.js → chunk-UW6KD57C.js} +2 -2
  147. package/dist/{chunk-TAJ6UGCO.js → chunk-V4NGDIEA.js} +3 -3
  148. package/dist/{chunk-VLTUX4IF.js → chunk-VGWZ4MOY.js} +2 -2
  149. package/dist/{chunk-KNV5VFDV.js → chunk-VSGOIZMQ.js} +2 -2
  150. package/dist/{chunk-K5G7SPAG.js → chunk-W7QDASTN.js} +4 -4
  151. package/dist/{chunk-IWAMYGPN.js → chunk-W7YLRXZE.js} +2 -2
  152. package/dist/{chunk-QKVTWODE.js → chunk-WK2IQJPK.js} +2 -2
  153. package/dist/{chunk-HYKSLTAR.js → chunk-WO6OFKUC.js} +2 -2
  154. package/dist/{chunk-S64NCE2Z.js → chunk-WWCV4E6J.js} +2 -2
  155. package/dist/{chunk-2F5ERMNI.js → chunk-XJBK3QDV.js} +2 -2
  156. package/dist/{chunk-IGYAZPRX.js → chunk-XN3EKMLI.js} +2 -2
  157. package/dist/{chunk-FWY2PRIF.js → chunk-XQAVQVIL.js} +2 -2
  158. package/dist/{chunk-NJA4MMBD.js → chunk-XUPFA6GH.js} +2 -2
  159. package/dist/{chunk-4AOOSCZ7.js → chunk-YHPG3S2U.js} +2 -2
  160. package/dist/{chunk-CDWSLAPN.js → chunk-YPBKBYPS.js} +2 -2
  161. package/dist/{chunk-5BDK6QC3.js → chunk-YRKP7PM7.js} +2 -2
  162. package/dist/{chunk-4NHWNAWQ.js → chunk-YT4DVWUV.js} +2 -2
  163. package/dist/{chunk-5NJPH3QZ.js → chunk-YTJHCGYB.js} +2 -2
  164. package/dist/{chunk-ZNQCR656.js → chunk-Z66XYVLZ.js} +2 -2
  165. package/dist/{chunk-A67HT5FR.js → chunk-ZB4C5TTR.js} +2 -2
  166. package/dist/chunk-ZMA5HWXY.js +3 -0
  167. package/dist/{chunk-CWMHWD56.js → chunk-ZNH33XIB.js} +2 -2
  168. package/dist/{cli-context-XEPPF4RX.js → cli-context-FJL2JHOE.js} +2 -2
  169. package/dist/{cli-context-TSADTXLB.js → cli-context-PQNWHMCQ.js} +2 -2
  170. package/dist/{cli-program-KJGQEM72.js → cli-program-SCHOHOQE.js} +2 -2
  171. package/dist/cli.js +1 -1
  172. package/dist/{code-CDe-mIjx.d.ts → code-DfX3xeWy.d.ts} +1 -1
  173. package/dist/{code-viewer-ZCTHXQ5C.js → code-viewer-AMRXV444.js} +2 -2
  174. package/dist/{code-viewer-YGDON6SY.js → code-viewer-EXI5SFFR.js} +2 -2
  175. package/dist/{command-descriptors-5VAB2MZX.js → command-descriptors-H6A4UY72.js} +129 -129
  176. package/dist/{command-descriptors-EAHKIRAG.js → command-descriptors-ROIOTCCW.js} +130 -130
  177. package/dist/{db-DmRNdCtm.d.ts → db-BoG_PWYH.d.ts} +1 -1
  178. package/dist/direct-navigation-3JOYP2MO.js +3 -0
  179. package/dist/direct-navigation-SJMJLBY7.js +2 -0
  180. package/dist/{graph-evidence-Bs54NWws.d.ts → graph-evidence-D1jx1Cql.d.ts} +1 -1
  181. package/dist/{health-BnzbSLCE.d.ts → health-DkYBS5BI.d.ts} +1 -1
  182. package/dist/index.d.ts +1 -1
  183. package/dist/index.js +1 -1
  184. package/dist/invocation-command-descriptors-GMZX3UAD.js +2 -0
  185. package/dist/invocation-command-descriptors-HNMKDEF6.js +3 -0
  186. package/dist/{scip-cli-BRFKkHQn.d.ts → maintenance-types-CdL5eQii.d.ts} +1 -20
  187. package/dist/output-continuation-command-5NWVDQT7.js +2 -0
  188. package/dist/output-continuation-command-RNEHNYPU.js +3 -0
  189. package/dist/postinstall.js +1 -1
  190. package/dist/project-reindex-MIW5CYEG.js +3 -0
  191. package/dist/project-reindex-VQ23LWDA.js +2 -0
  192. package/dist/queries/affected.d.ts +1 -1
  193. package/dist/queries/affected.js +1 -1
  194. package/dist/queries/anchors.d.ts +1 -1
  195. package/dist/queries/anchors.js +1 -1
  196. package/dist/queries/architecture.d.ts +1 -1
  197. package/dist/queries/architecture.js +1 -1
  198. package/dist/queries/bottlenecks.d.ts +1 -1
  199. package/dist/queries/bottlenecks.js +1 -1
  200. package/dist/queries/by-kind.d.ts +1 -1
  201. package/dist/queries/by-kind.js +1 -1
  202. package/dist/queries/call-graph.d.ts +1 -1
  203. package/dist/queries/call-graph.js +1 -1
  204. package/dist/queries/change-surface.d.ts +1 -1
  205. package/dist/queries/change-surface.js +1 -1
  206. package/dist/queries/cleanup-plan.d.ts +1 -1
  207. package/dist/queries/cleanup-plan.js +1 -1
  208. package/dist/queries/co-change.d.ts +1 -1
  209. package/dist/queries/co-change.js +1 -1
  210. package/dist/queries/code.d.ts +2 -2
  211. package/dist/queries/code.js +1 -1
  212. package/dist/queries/complexity-hotspots.d.ts +1 -1
  213. package/dist/queries/complexity-hotspots.js +1 -1
  214. package/dist/queries/complexity.d.ts +1 -1
  215. package/dist/queries/complexity.js +1 -1
  216. package/dist/queries/context.d.ts +1 -1
  217. package/dist/queries/context.js +1 -1
  218. package/dist/queries/convergence.d.ts +1 -1
  219. package/dist/queries/convergence.js +1 -1
  220. package/dist/queries/coupling.d.ts +1 -1
  221. package/dist/queries/coupling.js +1 -1
  222. package/dist/queries/cycles.d.ts +1 -1
  223. package/dist/queries/cycles.js +1 -1
  224. package/dist/queries/dataflow.d.ts +1 -1
  225. package/dist/queries/dataflow.js +1 -1
  226. package/dist/queries/dead.d.ts +1 -1
  227. package/dist/queries/dead.js +1 -1
  228. package/dist/queries/decorative-checkers.d.ts +1 -1
  229. package/dist/queries/decorative-checkers.js +1 -1
  230. package/dist/queries/deep-chains.d.ts +1 -1
  231. package/dist/queries/deep-chains.js +1 -1
  232. package/dist/queries/dependence-slice.d.ts +2 -2
  233. package/dist/queries/dependence-slice.js +1 -1
  234. package/dist/queries/dependency-depth.d.ts +1 -1
  235. package/dist/queries/dependency-depth.js +1 -1
  236. package/dist/queries/deps.d.ts +1 -1
  237. package/dist/queries/deps.js +1 -1
  238. package/dist/queries/diff-impact.d.ts +1 -1
  239. package/dist/queries/diff-impact.js +1 -1
  240. package/dist/queries/doc-drift.d.ts +1 -1
  241. package/dist/queries/doc-drift.js +1 -1
  242. package/dist/queries/drift.d.ts +1 -1
  243. package/dist/queries/drift.js +1 -1
  244. package/dist/queries/duplicate-bodies.d.ts +1 -1
  245. package/dist/queries/duplicate-bodies.js +1 -1
  246. package/dist/queries/entry-map.d.ts +1 -1
  247. package/dist/queries/entry-map.js +1 -1
  248. package/dist/queries/evidence.d.ts +2 -2
  249. package/dist/queries/evidence.js +1 -1
  250. package/dist/queries/extract-candidates.d.ts +1 -1
  251. package/dist/queries/extract-candidates.js +1 -1
  252. package/dist/queries/fan.d.ts +1 -1
  253. package/dist/queries/fan.js +1 -1
  254. package/dist/queries/files.d.ts +1 -1
  255. package/dist/queries/files.js +1 -1
  256. package/dist/queries/health.d.ts +2 -2
  257. package/dist/queries/health.js +1 -1
  258. package/dist/queries/hierarchy.d.ts +1 -1
  259. package/dist/queries/hierarchy.js +1 -1
  260. package/dist/queries/hotspots.d.ts +1 -1
  261. package/dist/queries/hotspots.js +1 -1
  262. package/dist/queries/imports.d.ts +1 -1
  263. package/dist/queries/imports.js +1 -1
  264. package/dist/queries/incomplete-migration.d.ts +1 -1
  265. package/dist/queries/incomplete-migration.js +1 -1
  266. package/dist/queries/index.d.ts +4 -4
  267. package/dist/queries/index.js +1 -1
  268. package/dist/queries/isolated.d.ts +1 -1
  269. package/dist/queries/isolated.js +1 -1
  270. package/dist/queries/locality-candidates.d.ts +1 -1
  271. package/dist/queries/locality-candidates.js +1 -1
  272. package/dist/queries/members.d.ts +1 -1
  273. package/dist/queries/members.js +1 -1
  274. package/dist/queries/methods.d.ts +1 -1
  275. package/dist/queries/methods.js +1 -1
  276. package/dist/queries/not-implemented.d.ts +1 -1
  277. package/dist/queries/not-implemented.js +1 -1
  278. package/dist/queries/outline.d.ts +1 -1
  279. package/dist/queries/outline.js +1 -1
  280. package/dist/queries/passthrough-candidates.d.ts +1 -1
  281. package/dist/queries/passthrough-candidates.js +1 -1
  282. package/dist/queries/plan-context.d.ts +1 -1
  283. package/dist/queries/plan-context.js +1 -1
  284. package/dist/queries/react-component-duplicates.d.ts +1 -1
  285. package/dist/queries/react-component-duplicates.js +1 -1
  286. package/dist/queries/react-hook-candidates.d.ts +1 -1
  287. package/dist/queries/react-hook-candidates.js +1 -1
  288. package/dist/queries/react-large-component-pressure.d.ts +1 -1
  289. package/dist/queries/react-large-component-pressure.js +1 -1
  290. package/dist/queries/recent-duplicates.d.ts +1 -1
  291. package/dist/queries/recent-duplicates.js +1 -1
  292. package/dist/queries/redundant-reexports.d.ts +1 -1
  293. package/dist/queries/redundant-reexports.js +1 -1
  294. package/dist/queries/reference-neighborhood.d.ts +1 -1
  295. package/dist/queries/reference-neighborhood.js +1 -1
  296. package/dist/queries/reference-reachability.d.ts +1 -1
  297. package/dist/queries/reference-reachability.js +1 -1
  298. package/dist/queries/refs.d.ts +1 -1
  299. package/dist/queries/refs.js +1 -1
  300. package/dist/queries/self-audit.d.ts +1 -1
  301. package/dist/queries/self-audit.js +1 -1
  302. package/dist/queries/similar-chains.d.ts +1 -1
  303. package/dist/queries/similar-chains.js +1 -1
  304. package/dist/queries/similar-files.d.ts +1 -1
  305. package/dist/queries/similar-files.js +1 -1
  306. package/dist/queries/similar-signatures.d.ts +1 -1
  307. package/dist/queries/similar-signatures.js +1 -1
  308. package/dist/queries/similar.d.ts +1 -1
  309. package/dist/queries/similar.js +1 -1
  310. package/dist/queries/slice.d.ts +1 -1
  311. package/dist/queries/slice.js +1 -1
  312. package/dist/queries/source-inspection.d.ts +3 -3
  313. package/dist/queries/source-inspection.js +1 -1
  314. package/dist/queries/source-search.d.ts +1 -1
  315. package/dist/queries/source-search.js +1 -1
  316. package/dist/queries/stale-abstractions.d.ts +1 -1
  317. package/dist/queries/stale-abstractions.js +1 -1
  318. package/dist/queries/stats.d.ts +1 -1
  319. package/dist/queries/surface.d.ts +1 -1
  320. package/dist/queries/surface.js +1 -1
  321. package/dist/queries/symbols.d.ts +1 -1
  322. package/dist/queries/symbols.js +1 -1
  323. package/dist/queries/system-map.d.ts +1 -1
  324. package/dist/queries/system-map.js +1 -1
  325. package/dist/queries/system.d.ts +1 -1
  326. package/dist/queries/system.js +1 -1
  327. package/dist/queries/test-quality.d.ts +1 -1
  328. package/dist/queries/test-quality.js +1 -1
  329. package/dist/queries/trace.d.ts +1 -1
  330. package/dist/queries/trace.js +1 -1
  331. package/dist/queries/twin-ab.d.ts +1 -1
  332. package/dist/queries/twin-ab.js +1 -1
  333. package/dist/queries/twin-drift.d.ts +1 -1
  334. package/dist/queries/twin-drift.js +1 -1
  335. package/dist/queries/unused-imports.d.ts +1 -1
  336. package/dist/queries/unused-imports.js +1 -1
  337. package/dist/queries/unused-params.d.ts +1 -1
  338. package/dist/queries/unused-params.js +1 -1
  339. package/dist/queries/value-flow.d.ts +2 -2
  340. package/dist/queries/value-flow.js +1 -1
  341. package/dist/queries/vue-component-duplicates.d.ts +1 -1
  342. package/dist/queries/vue-component-duplicates.js +1 -1
  343. package/dist/queries/vue-composable-candidates.d.ts +1 -1
  344. package/dist/queries/vue-composable-candidates.js +1 -1
  345. package/dist/queries/vue-large-view-pressure.d.ts +1 -1
  346. package/dist/queries/vue-large-view-pressure.js +1 -1
  347. package/dist/queries/wrapper-candidates.d.ts +1 -1
  348. package/dist/queries/wrapper-candidates.js +1 -1
  349. package/dist/reindex-worker.js +2 -2
  350. package/dist/reindex.d.ts +2 -4
  351. package/dist/reindex.js +71 -32
  352. package/dist/runtime.d.ts +1 -2
  353. package/dist/runtime.js +3 -3
  354. package/dist/rust-semantic-session-server.js +1 -1
  355. package/dist/rust-semantic-session-worker.js +1 -1
  356. package/dist/rust-semantic-worker.js +1 -1
  357. package/dist/sentinel-ensure-command-H66AZ3VE.js +2 -0
  358. package/dist/sentinel-ensure-command-R4YAUCJB.js +3 -0
  359. package/dist/sentinel-worker.js +1 -1
  360. package/dist/typescript-mailbox-worker.js +1 -1
  361. package/dist/watch-server.js +2 -2
  362. package/docs/INDEX_GENERATIONS.md +2 -2
  363. package/docs/NPM_RELEASE.md +323 -0
  364. package/docs/schemas/npm-release-state.schema.json +4 -13
  365. package/package.json +3 -11
  366. package/dist/chunk-2Q2LW5JW.js +0 -14
  367. package/dist/chunk-327YK6TB.js +0 -4
  368. package/dist/chunk-347TXATM.js +0 -2
  369. package/dist/chunk-36WRYYTE.js +0 -3
  370. package/dist/chunk-5IO2APSS.js +0 -2
  371. package/dist/chunk-6OAHRI2D.js +0 -6
  372. package/dist/chunk-6URCE5QY.js +0 -2
  373. package/dist/chunk-6ZV5EDUT.js +0 -5
  374. package/dist/chunk-7R64XY4Y.js +0 -12
  375. package/dist/chunk-CANBLFVQ.js +0 -15
  376. package/dist/chunk-CCRZLRWJ.js +0 -2
  377. package/dist/chunk-G2XUZCF2.js +0 -88
  378. package/dist/chunk-H5QXP63L.js +0 -2
  379. package/dist/chunk-HCMQZPEO.js +0 -2
  380. package/dist/chunk-IEL6Q5W3.js +0 -308
  381. package/dist/chunk-IGQQUENU.js +0 -109
  382. package/dist/chunk-K2O7SBAU.js +0 -2
  383. package/dist/chunk-QVWDQTMG.js +0 -2
  384. package/dist/chunk-RJWAB4VR.js +0 -345
  385. package/dist/chunk-VCL7FK3E.js +0 -3
  386. package/dist/chunk-WOOTEWQT.js +0 -239
  387. package/dist/chunk-XYLV727H.js +0 -21
  388. package/dist/chunk-YMGZZEW4.js +0 -2
  389. package/dist/direct-navigation-B3SGOOBW.js +0 -2
  390. package/dist/direct-navigation-ZL362KXF.js +0 -3
  391. package/dist/invocation-command-descriptors-CSUGUHTT.js +0 -2
  392. package/dist/invocation-command-descriptors-PPVZOIE5.js +0 -3
  393. package/dist/output-continuation-command-FTVVBVSN.js +0 -2
  394. package/dist/output-continuation-command-ITPRC3YV.js +0 -3
  395. package/dist/project-reindex-7HZSLLLY.js +0 -3
  396. package/dist/project-reindex-NGM3DYBN.js +0 -2
  397. package/dist/sentinel-ensure-command-KYYULCFU.js +0 -2
  398. package/dist/sentinel-ensure-command-RIZA3RY7.js +0 -3
  399. package/docs/WINDOWS_SIDECAR_RELEASE.md +0 -424
  400. package/docs/schemas/windows-sidecar-provenance.schema.json +0 -137
  401. package/scripts/build-codebaseiq-windows.mjs +0 -197
  402. package/scripts/codebaseiq-windows-provenance.mjs +0 -364
  403. package/scripts/verify-codebaseiq-windows.mjs +0 -29
@@ -1,2 +1,2 @@
1
- import{e as M}from"./chunk-CSZOQ7YO.js";import{b as $}from"./chunk-B75HZHUP.js";import{a as p}from"./chunk-BGBBVSH4.js";import{o as I}from"./chunk-VCL7FK3E.js";import{d as D}from"./chunk-SGX43S2L.js";import{d as b,j as h,p as x,q as y,u as L}from"./chunk-AM5SUGHF.js";import{a as g,e as S}from"./chunk-JOALNFY3.js";import{w as d}from"./chunk-PLZXWZHY.js";var B=new Set(D());function X(e,n={}){let{scope:s,minLoc:i=1,limit:r,scanLimit:c,maxShapeFrequency:a=12}=n,o=n.semantic!==!1,t=w(e,F(e,{scope:s,minLoc:i,scanLimit:c}),{semantic:o,maxShapeFrequency:a}),m=P(t);return r?m.slice(0,r):m}function F(e,n){let s=L(e,{scope:n.scope}).filter(i=>v(i)&&!e.isIgnored(i.relativePath)).filter(i=>p(i)>=n.minLoc);return typeof n.scanLimit=="number"&&n.scanLimit>0&&s.sort((i,r)=>p(r)-p(i)||i.relativePath.localeCompare(r.relativePath)),$(s,n.scanLimit)}function v(e){return!e.isFunctionLike||h(e.symbol)?!1:e.kind===null||B.has(e.kind)}function w(e,n,s){let i=[];for(let a of n){let o=G(e,a,s);o&&i.push({signature:o,definition:a,fn:z(a)})}let r=new Map;for(let a of i)r.set(a.signature,(r.get(a.signature)??0)+1);let c=new Map;for(let a of i){let o=C(a.fn.loc),t=(r.get(a.signature)??0)>s.maxShapeFrequency,m=t?M(e,a.definition):null;if(t&&!m)continue;let u=t?`${a.signature}\0body\0${m}`:`${a.signature}\0band\0${o}`,l=c.get(u)??{signature:a.signature,locBand:o,exactBody:t,functions:[]};l.functions.push(a.fn),c.set(u,l)}return[...c.values()]}function z(e){return{symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e)}}function P(e){let n=[];for(let s of e)s.functions.length>=2&&n.push(s);return n.sort((s,i)=>{let r=i.functions.length-s.functions.length;if(r!==0)return r;let c=s.functions.reduce((o,t)=>o+t.loc,0);return i.functions.reduce((o,t)=>o+t.loc,0)-c}),n}function C(e){return e<=5?"<=5":e<=20?"6-20":">20"}function G(e,n,s){if(s.semantic){let c=I(e,n);if(c)return c}let i=k(n.documentation),r=i?A(i):null;return r||E(N(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)}function k(e){return x(y(e))}function N(e,n,s,i,r){let c=d(e,n);if(!c)return null;let a=c.split(/\r?\n/),o=O(a,s,i,r);for(let t of o){let m=Math.min(a.length-1,Math.max(t,t+4)),u="";for(let l=t;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,q(u)))return u}if(u&&u.includes("("))return u}return null}function q(e){let n=e.replace(/\s+/g," ").trim();return!n.includes("(")||S(n)>0?!1:/[;{]$/.test(n)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(n)||/\)\s*As\s+.+$/i.test(n)}function A(e){if(!e||!e.trim())return null;let n=e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim(),s=n.indexOf("(");return s===-1||(n=n.slice(s),n=n.replace(/\s+/g,"").toLowerCase(),n.length<3)?null:n}function E(e,n){if(!e||!e.trim())return null;let s=e.replace(/\s+/g," ").trim(),i=s.indexOf("(");if(i===-1)return null;let r=s.slice(0,i),a=new RegExp(`\\b${g(n)}\\b`,"i").exec(r);a&&typeof a.index=="number"&&(r=r.slice(0,a.index)),r=r.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let o=R(s.slice(i)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!o.startsWith("("))return null;let t=`${r?`${r} `:""}${o}`.replace(/\s+/g,"").toLowerCase();return t.length>=3?t:null}function R(e){let n=0,s=0,i=0,r=0,c=null,a=!1;for(let o=0;o<e.length;o+=1){let t=e[o];if(c){if(a){a=!1;continue}if(t==="\\"){a=!0;continue}t===c&&(c=null);continue}if(t==='"'||t==="'"||t==="`"){c=t;continue}if(t==="(")n+=1;else if(t===")")n=Math.max(0,n-1);else if(t==="[")i+=1;else if(t==="]")i=Math.max(0,i-1);else if(t==="<")r+=1;else if(t===">")r=Math.max(0,r-1);else if(t==="{"){if(n===0&&i===0&&r===0)return e.slice(0,o);s+=1}else if(t==="}")s=Math.max(0,s-1);else if(t==="="&&e[o+1]===">"&&n===0&&s===0&&i===0&&r===0)return e.slice(0,o)}return e}function O(e,n,s,i){let r=g(i),c=new RegExp(`\\b${r}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${r}\\b`,"i"),o=[],t=new Set,m=Math.max(0,Math.min(n,e.length-1)),u=Math.max(m,Math.min(e.length-1,Math.max(s,n+4)));for(let l=m;l<=u;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}for(let l=0;l<e.length;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}return o}export{X as a};
2
- //# sourceMappingURL=chunk-T3YFIJ5P.js.map
1
+ import{e as M}from"./chunk-2OMXFE64.js";import{b as $}from"./chunk-B75HZHUP.js";import{a as p}from"./chunk-BGBBVSH4.js";import{o as I}from"./chunk-KLX6NSWT.js";import{d as D}from"./chunk-SGX43S2L.js";import{d as b,j as h,p as x,q as y,u as L}from"./chunk-GVAF222T.js";import{a as g,e as S}from"./chunk-F74LZWCE.js";import{w as d}from"./chunk-7GAK2F3H.js";var B=new Set(D());function X(e,n={}){let{scope:s,minLoc:i=1,limit:r,scanLimit:c,maxShapeFrequency:a=12}=n,o=n.semantic!==!1,t=w(e,F(e,{scope:s,minLoc:i,scanLimit:c}),{semantic:o,maxShapeFrequency:a}),m=P(t);return r?m.slice(0,r):m}function F(e,n){let s=L(e,{scope:n.scope}).filter(i=>v(i)&&!e.isIgnored(i.relativePath)).filter(i=>p(i)>=n.minLoc);return typeof n.scanLimit=="number"&&n.scanLimit>0&&s.sort((i,r)=>p(r)-p(i)||i.relativePath.localeCompare(r.relativePath)),$(s,n.scanLimit)}function v(e){return!e.isFunctionLike||h(e.symbol)?!1:e.kind===null||B.has(e.kind)}function w(e,n,s){let i=[];for(let a of n){let o=G(e,a,s);o&&i.push({signature:o,definition:a,fn:z(a)})}let r=new Map;for(let a of i)r.set(a.signature,(r.get(a.signature)??0)+1);let c=new Map;for(let a of i){let o=C(a.fn.loc),t=(r.get(a.signature)??0)>s.maxShapeFrequency,m=t?M(e,a.definition):null;if(t&&!m)continue;let u=t?`${a.signature}\0body\0${m}`:`${a.signature}\0band\0${o}`,l=c.get(u)??{signature:a.signature,locBand:o,exactBody:t,functions:[]};l.functions.push(a.fn),c.set(u,l)}return[...c.values()]}function z(e){return{symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e)}}function P(e){let n=[];for(let s of e)s.functions.length>=2&&n.push(s);return n.sort((s,i)=>{let r=i.functions.length-s.functions.length;if(r!==0)return r;let c=s.functions.reduce((o,t)=>o+t.loc,0);return i.functions.reduce((o,t)=>o+t.loc,0)-c}),n}function C(e){return e<=5?"<=5":e<=20?"6-20":">20"}function G(e,n,s){if(s.semantic){let c=I(e,n);if(c)return c}let i=k(n.documentation),r=i?A(i):null;return r||E(N(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)}function k(e){return x(y(e))}function N(e,n,s,i,r){let c=d(e,n);if(!c)return null;let a=c.split(/\r?\n/),o=O(a,s,i,r);for(let t of o){let m=Math.min(a.length-1,Math.max(t,t+4)),u="";for(let l=t;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,q(u)))return u}if(u&&u.includes("("))return u}return null}function q(e){let n=e.replace(/\s+/g," ").trim();return!n.includes("(")||S(n)>0?!1:/[;{]$/.test(n)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(n)||/\)\s*As\s+.+$/i.test(n)}function A(e){if(!e||!e.trim())return null;let n=e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim(),s=n.indexOf("(");return s===-1||(n=n.slice(s),n=n.replace(/\s+/g,"").toLowerCase(),n.length<3)?null:n}function E(e,n){if(!e||!e.trim())return null;let s=e.replace(/\s+/g," ").trim(),i=s.indexOf("(");if(i===-1)return null;let r=s.slice(0,i),a=new RegExp(`\\b${g(n)}\\b`,"i").exec(r);a&&typeof a.index=="number"&&(r=r.slice(0,a.index)),r=r.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let o=R(s.slice(i)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!o.startsWith("("))return null;let t=`${r?`${r} `:""}${o}`.replace(/\s+/g,"").toLowerCase();return t.length>=3?t:null}function R(e){let n=0,s=0,i=0,r=0,c=null,a=!1;for(let o=0;o<e.length;o+=1){let t=e[o];if(c){if(a){a=!1;continue}if(t==="\\"){a=!0;continue}t===c&&(c=null);continue}if(t==='"'||t==="'"||t==="`"){c=t;continue}if(t==="(")n+=1;else if(t===")")n=Math.max(0,n-1);else if(t==="[")i+=1;else if(t==="]")i=Math.max(0,i-1);else if(t==="<")r+=1;else if(t===">")r=Math.max(0,r-1);else if(t==="{"){if(n===0&&i===0&&r===0)return e.slice(0,o);s+=1}else if(t==="}")s=Math.max(0,s-1);else if(t==="="&&e[o+1]===">"&&n===0&&s===0&&i===0&&r===0)return e.slice(0,o)}return e}function O(e,n,s,i){let r=g(i),c=new RegExp(`\\b${r}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${r}\\b`,"i"),o=[],t=new Set,m=Math.max(0,Math.min(n,e.length-1)),u=Math.max(m,Math.min(e.length-1,Math.max(s,n+4)));for(let l=m;l<=u;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}for(let l=0;l<e.length;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}return o}export{X as a};
2
+ //# sourceMappingURL=chunk-HJTM3C4Y.js.map
@@ -1,2 +1,2 @@
1
- import{m as o}from"./chunk-CDWSLAPN.js";import{G as n}from"./chunk-4O52YNKL.js";async function i(t){if(typeof t!="string"||t.length===0)throw new Error("Output continuation requires a cursor.");await o(t,n)}var u={id:"continue",command:"continue <cursor>",hidden:!0,description:"Continue an immutable output snapshot",renderShape:"custom",handler:i};export{u as a};
2
- //# sourceMappingURL=chunk-FY5V4V4F.js.map
1
+ import{m as o}from"./chunk-YPBKBYPS.js";import{G as n}from"./chunk-UQYQBLJX.js";async function i(t){if(typeof t!="string"||t.length===0)throw new Error("Output continuation requires a cursor.");await o(t,n)}var u={id:"continue",command:"continue <cursor>",hidden:!0,description:"Continue an immutable output snapshot",renderShape:"custom",handler:i};export{u as a};
2
+ //# sourceMappingURL=chunk-HNXRVGMY.js.map
@@ -1,2 +1,2 @@
1
- import{b as j}from"./chunk-DKJXK3HA.js";import{d as D}from"./chunk-AM5SUGHF.js";var y=["execution","runtime","dataflow","state","temporal","contract","identity","ownership","dependencies"];import{createHash as ie}from"crypto";var Q=[{id:"general-interprocedural-value-flow",families:["dataflow"],capability:"Whole-program definition-use flow through arbitrary calls and returns is unavailable.",consequence:"Missing dataflow edges cannot establish that a value never crosses an unmodeled call.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"heap-aliasing",families:["dataflow","state"],capability:"Heap points-to and cross-instance alias analysis are unavailable.",consequence:"Missing field or state edges cannot establish that two references never reach the same object.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"exceptional-flow",families:["execution","dataflow","temporal"],capability:"Interprocedural exception propagation and finally completion flow are unavailable.",consequence:"Normal-path reachability and ordering do not establish behavior after a throw or rejection.",recoverWith:["dependence-slice","inspect","code"]},{id:"reflection",families:["execution","runtime","identity","dependencies"],capability:"Reflective lookup, dynamic loading, and name-computed invocation are unavailable without exact evidence.",consequence:"Missing static edges cannot establish that a construct is unreachable through reflection.",recoverWith:["search","inspect","code"]},{id:"generated-dispatch",families:["execution","runtime","identity"],capability:"Dispatch tables or names created only by generated or unavailable source are unavailable.",consequence:"Missing dispatch edges cannot establish that no generated consumer exists.",recoverWith:["search","inspect","code"]},{id:"unsupported-framework-adapters",families:["runtime","dataflow","state","temporal"],capability:"Framework runtime crossings without a registered source adapter are unavailable.",consequence:"Missing boundary edges cannot establish that no producer, consumer, state effect, or ordering exists.",recoverWith:["search","inspect","code"]}];function Z(e){let t=new Set(e);return Q.filter(n=>n.families.some(a=>t.has(a)))}function $(e){return Z(e).map(t=>`[${t.id}] ${t.capability} ${t.consequence} Recover selected paths with: ${t.recoverWith.map(n=>`codebaseiq ${n}`).join(", ")}.`)}var ee=["incoming","outgoing","both"];function h(e,t,n,a={}){return{family:e,subtype:t,...a.match?{match:a.match}:{},directions:ee,evidenceStrengths:a.strengths??["exact","derived","mixed"],supportCeiling:a.supportCeiling??"partial",establishes:n,nonClaims:a.nonClaims??[],recoverWith:a.recoverWith??["inspect","code"]}}var te=["predicate-consequence","predicate-alternative","predicate-fallthrough","predicate-case","predicate-default","predicate-return","predicate-throw","loop-iteration","loop-exit","exception-handler","finally-cleanup","handler-return","handler-throw"],ne=["captured-value-to-state","constant-to-state","expression-to-state","property-to-state","return-to-state","value-to-state"],re=["await-completion-before","awaits-completion","inside-lock-scope","lexical-successor"],oe=[{id:"indexed-program-identity",label:"SCIP/compiler identity and source ownership",requirements:["indexed-graph"],relations:[h("execution","call","The source construct may call the resolved target.",{nonClaims:["Static may-call reachability does not prove that an invocation occurred at runtime."],recoverWith:["call-graph","inspect","code"]}),h("execution","result-callback","The referenced callable can produce the result consumed by this path.",{nonClaims:["A callback relationship does not prove invocation order or runtime selection."],recoverWith:["call-graph","inspect","code"]}),h("contract","uses-contract-symbol","The source construct refers to the identified contract symbol.",{supportCeiling:"exact",nonClaims:["Contract identity does not prove runtime invocation or behavioral conformance."],recoverWith:["hierarchy","inspect","code"]}),h("identity","references","The occurrence resolves to the identified compiler-owned symbol.",{supportCeiling:"exact",nonClaims:["A reference does not establish execution or value transfer."],recoverWith:["refs","trace","inspect"]}),h("ownership","contains","The owner contains the identified program construct.",{supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),h("ownership","contains-","The owner contains the identified program construct.",{match:"prefix",supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),h("ownership","owns-","The owner owns the identified source or runtime observation.",{match:"prefix",supportCeiling:"exact",nonClaims:["Observation ownership does not establish singleton lifetime or exclusive ownership."],recoverWith:["inspect","code"]}),h("dependencies","imports","The source file or module statically imports the indexed target.",{nonClaims:["An import does not establish that imported code executes."],recoverWith:["imports","deps","code"]}),h("dependencies","imports-external","The source region statically imports an external package.",{nonClaims:["An external import does not establish which package behavior executes."],recoverWith:["imports","code"]})]},{id:"runtime-boundary-join",label:"source-grounded runtime-boundary joins",requirements:["indexed-graph","source-facts"],relations:[h("runtime","runtime-handoff","A producer and consumer share a source-grounded runtime rendezvous.",{strengths:["exact","derived","candidate","mixed"],nonClaims:["A candidate or unresolved join does not prove a runtime handoff."],recoverWith:["evidence","inspect","code"]}),h("runtime","discriminator-dispatch","A serialized discriminator selects the reported consumer.",{strengths:["exact","derived","mixed"],nonClaims:["The dispatch edge does not prove delivery, retry, or successful handling."],recoverWith:["evidence","inspect","code"]}),h("dataflow","serialized-discriminator-transfer","The producer serializes the discriminator consumed by dispatch.",{strengths:["exact","derived","mixed"],nonClaims:["This edge does not establish the flow of every payload field."],recoverWith:["value-flow","inspect","code"]}),h("temporal","enqueue-before-consume","The reported enqueue precedes a possible consume through the queue.",{strengths:["exact","derived","mixed"],nonClaims:["Queue order does not establish delivery time, uniqueness, retry count, or durability."],recoverWith:["evidence","inspect","code"]})]},{id:"parser-control-dependence",label:"parser-proved intraprocedural control dependence",requirements:["indexed-graph","source-facts"],relations:[...te.map(e=>h("execution",e,"The outcome is control-dependent on the reported predicate or handler.",{strengths:["exact"],nonClaims:["Local control dependence does not establish that the containing function executes."],recoverWith:["dependence-slice","inspect","code"]})),h("execution","returns","The selected construct contains the reported return terminal.",{strengths:["exact"],nonClaims:["A local return terminal does not establish that the containing callable executes."],recoverWith:["inspect","code"]}),h("execution","throws","The selected construct contains the reported throw terminal.",{strengths:["exact"],nonClaims:["A local throw terminal does not establish propagation, handling, or callable execution."],recoverWith:["inspect","code"]})]},{id:"bounded-static-value-flow",label:"compiler callsites and bounded static value evaluation",requirements:["indexed-graph","source-facts"],relations:[...["argument-to-parameter","constant-to-parameter","property-to-parameter","return-to-parameter","return-to-call-result"].map(e=>h("dataflow",e,"The reported value may reach the target through the evidenced callsite transfer.",{strengths:["exact","derived","mixed"],nonClaims:["This provider does not establish general local definition-use, alias, field, or heap flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}))]},{id:"typescript-local-dependence",label:"TypeScript compiler identities, control-flow graph, and reaching definitions",requirements:["typescript-semantic"],relations:[h("dataflow","definition-to-use","The definition reaches the reported read on a feasible local control-flow path.",{strengths:["exact"],nonClaims:["Local reaching definitions do not establish heap aliasing, exceptional flow, or the runtime order of closure invocation."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("dataflow","value-to-definition","The reported right-hand-side read supplies the assigned local definition.",{strengths:["exact"],nonClaims:["A local assignment edge does not establish field or heap points-to flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("dataflow","closure-capture","The nested callable reads the reported binding from an enclosing callable.",{strengths:["candidate"],supportCeiling:"candidate",nonClaims:["Closure capture does not establish whether or when the nested callable executes."],recoverWith:["call-graph","inspect","code"]}),h("dataflow","field-definition-to-use","The reported same-owner field definition can reach the field read.",{strengths:["exact","candidate"],nonClaims:["Field-name identity does not establish whole-program heap aliasing or cross-instance flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("execution","control-dependence","Execution of the reported statement depends on the outcome of the predicate.",{strengths:["exact"],nonClaims:["Intraprocedural control dependence does not establish that the containing callable executes."],recoverWith:["dependence-slice","inspect","code"]})]},{id:"parser-state-temporal",label:"parser-proved local state and temporal facts",requirements:["indexed-graph","source-facts"],relations:[...ne.map(e=>h("dataflow",e,"The reported source value is assigned into the identified state resource.",{strengths:["exact"],nonClaims:["The edge does not establish alias, heap, or later read flow."],recoverWith:["value-flow","inspect","code"]})),...["writes-resource","deletes-resource","reads-resource","enqueues-resource","consumes-resource"].map(e=>h("state",e,"The reported construct performs the named operation on the identified resource.",{strengths:["exact"],nonClaims:["A state operation does not establish transactionality, durability, or exclusive ownership."],recoverWith:["evidence","inspect","code"]})),...re.map(e=>h("temporal",e,"The reported source constructs have the named local ordering relationship.",{strengths:["exact"],nonClaims:["Local source order does not establish cross-process happens-before or durable completion."],recoverWith:["evidence","inspect","code"]}))]}];function q(e,t){let n=oe.flatMap(a=>a.relations.filter(r=>r.family===e&&(r.match==="prefix"?t.startsWith(r.subtype):t===r.subtype)).map(r=>({provider:a,relation:r})));if(n.length>1)throw new Error(`Ambiguous graph relation provider for ${e}/${t}: ${n.map(a=>a.provider.id).join(", ")}`);return n[0]??null}var Ne=["causal","structure","complete"],ae={causal:["execution","runtime","dataflow","state","temporal"],structure:["contract","identity","ownership","dependencies"],complete:y},se=2,ce=48,k=64,de=5e4;function We(e,t,n={}){let a=E([...t.symbols??[],...t.locations??[]]),r=E(t.searches??[]);if(a.length===0&&r.length===0)throw new Error("evidence requires at least one positional symbol, --symbol, --at, or --search selector.");let o=n.view??"causal",i=le(n.families,o),s=n.direction??"both",u=E(n.subtypes??[]),l=n.connecting??!1,c=n.inventoryOnly??!1,p=E(n.foldIds??[]),g=n.maxDepth??se,f=n.maxEdges??ce;if(!Number.isSafeInteger(g)||g<0)throw new RangeError(`Evidence depth must be a non-negative safe integer; received ${g}.`);if(!Number.isSafeInteger(f)||f<=0)throw new RangeError(`Evidence max edges must be a positive safe integer; received ${f}.`);if(!["incoming","outgoing","both"].includes(s))throw new Error(`Unsupported graph evidence direction: ${s}.`);if(c&&p.length>0)throw new Error("Evidence fold materialization cannot be combined with --inventory-only.");let m=j(e,{symbols:a,searches:r,maxDepth:g,maxTopologyCharacters:de,relations:pe(i)}),R=new Map(m.nodes.map(d=>[d.id,d])),b=m.edges.filter(d=>d.disposition==="emitted"||d.disposition==="folded").flatMap(d=>ue(d,R)),v=b.filter(d=>i.includes(d.family)).filter(d=>u.length===0||u.includes(d.subtype)),x=new Set(m.anchors.flatMap(d=>d.nodeIds));if(l&&x.size<2)throw new Error("Connecting evidence requires at least two resolved root nodes.");let S=new Set(v.map(d=>d.id)),_=A(b,x,"incoming").filter(d=>S.has(d.id)),F=A(b,x,"outgoing").filter(d=>S.has(d.id)),O=A(b,x,"both").filter(d=>S.has(d.id)),B=ve(i,u,_,F,O),M=s==="incoming"?_:s==="outgoing"?F:O,N=l?Re(M,[...x],s):M,z=Ce(N,x,s),w=[...N].sort((d,X)=>Te(d,X,z)),W=ye(w,f),Y=be(W,p),G=c?[]:p.length>0?w.filter(d=>Y.has(d.id)):w,C=p.length>0?G:G.slice(0,f),K=p.length>0||c?[]:W,T=Math.max(0,G.length-C.length),J=m.frontiers.filter(d=>d.disposition==="unsupported").length,I=m.coverage.status==="incomplete"?"incomplete":T>0?"bounded":"accounted";return{kind:"graph",view:n.families&&n.families.length>0?"custom":o,families:i,selection:{direction:s,subtypes:u,connecting:l,inventoryOnly:c,foldIds:p},targets:m.anchors.map(d=>({kind:d.kind,query:d.query,status:d.status,nodeIds:[...d.nodeIds],omittedCandidates:d.omittedCandidates})),inventory:B,edges:C,folds:K,coverage:{status:I,topologyStatus:m.coverage.status,scope:m.coverage.scope,maxDepth:g,maxEdges:f,matchedEdges:w.length,eligibleEdges:G.length,returnedEdges:C.length,omittedEdges:T,frontierGroups:m.frontiers.length,unsupportedFrontiers:J,blindSpots:E([...m.coverage.blindSpots,...$(i)]),explanation:c?`${w.length} relationship(s) match the explicit projection; only exact inventory counts were requested.`:p.length>0?`Every relationship in ${p.length} explicitly selected recoverable fold(s) was emitted.`:I==="accounted"?"Every selected relationship in the bounded topology was emitted.":I==="bounded"?`${T} selected relationship(s) were withheld by the explicit edge budget.`:m.coverage.explanation}}}function le(e,t){let n=e&&e.length>0?e:ae[t],a=n.filter(r=>!y.includes(r));if(a.length>0)throw new Error(`Unsupported graph evidence family: ${a.join(", ")}.`);return E(n)}function pe(e){return["call","contract-symbol","import","reference","runtime-boundary"]}function ue(e,t){let n=t.get(e.fromNodeId),a=t.get(e.toNodeId);return!n||!a?[]:(e.semantics??[]).flatMap((r,o)=>{let i=ge(r);if(!i)return[];let s=q(i,r.subtype);if(!s)throw new Error(`No graph relation provider contract is registered for ${i}/${r.subtype}.`);let u=fe(e);if(!s.relation.evidenceStrengths.includes(u))throw new Error(`Graph relation provider ${s.provider.id} does not admit ${u} evidence for ${i}/${r.subtype}.`);return[{id:`${e.id}:${o}:${i}`,family:i,semanticFamily:r.family,subtype:r.subtype,from:L(n),to:L(a),sourceKind:e.kind,providerId:s.provider.id,supportCeiling:s.relation.supportCeiling,establishes:s.relation.establishes,nonClaims:[...s.relation.nonClaims],recoverWith:[...s.relation.recoverWith],evidenceStrength:u,evidenceMethods:E(e.evidence.map(l=>l.method)),evidenceConstituents:he(e.evidence),context:r.context?{...r.context}:null,attributes:r.attributes?{...r.attributes}:null}]})}function he(e){let t=new Map;for(let n of e)t.set(`${n.method}\0${n.strength}`,n);return[...t.values()].map(({method:n,strength:a})=>({method:n,strength:a}))}function ge(e){switch(e.family){case"control":return e.context?.crossesRuntimeBoundary===!0||e.subtype==="runtime-handoff"?"runtime":"execution";case"data":return"dataflow";case"state":return"state";case"temporal":return"temporal";case"contract":return"contract";case"identity":return e.subtype.startsWith("contains")||e.subtype.startsWith("owns-")?"ownership":e.subtype.startsWith("import")?"dependencies":"identity"}}function L(e){let t=me(e);return{id:e.id,kind:e.kind,label:t?D(t):e.label,symbol:t,location:e.location?{...e.location}:null}}function me(e){return e.kind!=="symbol"||!e.id.startsWith("symbol:")?null:decodeURIComponent(e.id.slice(7))}function fe(e){let t=E(e.evidence.map(n=>n.strength));return t.length===1?t[0]:t.includes("exact")&&t.every(n=>n==="exact"||n==="derived")?"mixed":t.includes("candidate")?"candidate":t.includes("unknown")||t.length===0?"unknown":"mixed"}function A(e,t,n){let a=P(e,n),r=new Map,o=new Map,i=[...t].sort();for(let s of i)o.set(s,0);for(let s=0;s<i.length;s+=1){let u=i[s],l=o.get(u);for(let c of a.get(u)??[])r.set(c.edge.id,c.edge),!o.has(c.next)&&(o.set(c.next,l+1),i.push(c.next))}return[...r.values()]}function P(e,t){let n=new Map,a=(r,o,i)=>{let s=n.get(r)??[];s.push({edge:i,next:o}),n.set(r,s)};for(let r of e)t!=="incoming"&&a(r.from.id,r.to.id,r),t!=="outgoing"&&a(r.to.id,r.from.id,r);for(let r of n.values())r.sort((o,i)=>o.edge.id.localeCompare(i.edge.id)||o.next.localeCompare(i.next));return n}function ve(e,t,n,a,r){let o=new Set;for(let c of[...n,...a,...r])o.add(`${c.family}\0${c.subtype}`);if(t.length>0)for(let c of e)for(let p of t)o.add(`${c}\0${p}`);let i=c=>{let p=new Map;for(let g of c){let f=`${g.family}\0${g.subtype}`;p.set(f,(p.get(f)??0)+1)}return p},s=i(n),u=i(a),l=i(r);return[...o].map(c=>{let[p,g]=c.split("\0");return{family:p,subtype:g,incoming:s.get(c)??0,outgoing:u.get(c)??0,both:l.get(c)??0}}).sort((c,p)=>y.indexOf(c.family)-y.indexOf(p.family)||c.subtype.localeCompare(p.subtype))}function ye(e,t){let n=e.slice(t),a=new Map;for(let i of n){let s=Ee(i),u=`${i.family}\0${s}`,l=a.get(u)??[];l.push(i),a.set(u,l)}let r=new Map(e.map((i,s)=>[i.id,s+1])),o=[];for(let[i,s]of[...a].sort(([u],[l])=>u.localeCompare(l))){let[u,l]=i.split("\0"),c=[...s].sort((p,g)=>p.id.localeCompare(g.id));for(let p=0;p<c.length;p+=k){let g=c.slice(p,p+k),f=g.map(v=>v.id),m=E(g.map(v=>v.subtype)).sort(),R=m.length===1?m[0]:"mixed",b=[...new Set(g.flatMap(v=>[v.from.id,v.to.id]))].sort();o.push({id:Ge(u,m.join("\0"),f),mode:xe(g),family:u,subtype:R,subtypes:m,region:l,edgeCount:f.length,edgeIds:f,nodeIds:b,minimumMaxEdges:Math.max(...f.map(v=>r.get(v)??e.length))})}}return o.sort((i,s)=>y.indexOf(i.family)-y.indexOf(s.family)||(i.region??"").localeCompare(s.region??"")||i.id.localeCompare(s.id))}function Ee(e){let t=e.from.location?.file??`kind:${e.from.kind}`,n=e.to.location?.file??`kind:${e.to.kind}`;return t===n?t:`${t} -> ${n}`}function be(e,t){if(t.length===0)return new Set;let n=new Map(e.map(r=>[r.id,r])),a=t.filter(r=>!n.has(r));if(a.length>0){let r=e.map(o=>o.id).sort();throw new Error(`Unknown evidence fold ${a.join(", ")} for this projection. Available folds: ${r.join(", ")||"(none)"}.`)}return new Set(t.flatMap(r=>n.get(r).edgeIds))}function xe(e){let t=new Map,n=new Map,a=new Set;for(let o of e){a.add(o.from.id),a.add(o.to.id);let i=t.get(o.from.id)??new Set;i.add(o.to.id),t.set(o.from.id,i);let s=n.get(o.to.id)??new Set;s.add(o.from.id),n.set(o.to.id,s)}return we(a,t)?"scc":[...a].every(o=>(n.get(o)?.size??0)<=1&&(t.get(o)?.size??0)<=1)?"linear":"topology"}function we(e,t){let n=new Set,a=new Set,r=o=>{if(n.has(o))return!0;if(a.has(o))return!1;n.add(o);for(let i of t.get(o)??[])if(r(i))return!0;return n.delete(o),a.add(o),!1};return[...e].some(r)}function Ge(e,t,n){return`fold:${ie("sha256").update([e,t,...n].join("\0")).digest("hex").slice(0,16)}`}function Re(e,t,n){let a=new Map,r=[...new Set(t)].sort();for(let o=0;o<r.length;o+=1)for(let i=o+1;i<r.length;i+=1)for(let s of Se(e,r[o],r[i],n))a.set(s.id,s);return[...a.values()]}function Se(e,t,n,a){let r=P(e,a),o=new Map([[t,0]]),i=new Map,s=[t];for(let l=0;l<s.length;l+=1){let c=s[l],p=o.get(c);if(c!==n)for(let g of r.get(c)??[])o.has(g.next)||(o.set(g.next,p+1),i.set(g.next,{node:c,edge:g.edge}),s.push(g.next))}if(!o.has(n))return[];let u=[];for(let l=n;l!==t;){let c=i.get(l);if(!c)return[];u.push(c.edge),l=c.node}return u.reverse()}function Ce(e,t,n){let a=P(e,n),r=new Map,o=[...t];for(let i of t)r.set(i,0);for(let i=0;i<o.length;i+=1){let s=o[i],u=r.get(s);for(let{next:l}of a.get(s)??[])r.has(l)||(r.set(l,u+1),o.push(l))}return r}function Te(e,t,n){return H(e,n)-H(t,n)||U(e)-U(t)||V(e.evidenceStrength)-V(t.evidenceStrength)||y.indexOf(e.family)-y.indexOf(t.family)||e.from.label.localeCompare(t.from.label)||e.to.label.localeCompare(t.to.label)||e.subtype.localeCompare(t.subtype)||e.id.localeCompare(t.id)}function H(e,t){return Math.min(t.get(e.from.id)??Number.MAX_SAFE_INTEGER,t.get(e.to.id)??Number.MAX_SAFE_INTEGER)}function U(e){let t=[e.from,e.to].filter(n=>n.kind==="structural-region").length;return t===2?2:t}function V(e){switch(e){case"exact":return 0;case"mixed":return 1;case"derived":return 2;case"candidate":return 3;case"unknown":return 4}}function E(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))]}export{y as a,Ne as b,We as c};
2
- //# sourceMappingURL=chunk-UWB5WMC2.js.map
1
+ import{b as j}from"./chunk-JSB43EX6.js";import{d as D}from"./chunk-GVAF222T.js";var y=["execution","runtime","dataflow","state","temporal","contract","identity","ownership","dependencies"];import{createHash as ie}from"crypto";var Q=[{id:"general-interprocedural-value-flow",families:["dataflow"],capability:"Whole-program definition-use flow through arbitrary calls and returns is unavailable.",consequence:"Missing dataflow edges cannot establish that a value never crosses an unmodeled call.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"heap-aliasing",families:["dataflow","state"],capability:"Heap points-to and cross-instance alias analysis are unavailable.",consequence:"Missing field or state edges cannot establish that two references never reach the same object.",recoverWith:["value-flow","dependence-slice","inspect","code"]},{id:"exceptional-flow",families:["execution","dataflow","temporal"],capability:"Interprocedural exception propagation and finally completion flow are unavailable.",consequence:"Normal-path reachability and ordering do not establish behavior after a throw or rejection.",recoverWith:["dependence-slice","inspect","code"]},{id:"reflection",families:["execution","runtime","identity","dependencies"],capability:"Reflective lookup, dynamic loading, and name-computed invocation are unavailable without exact evidence.",consequence:"Missing static edges cannot establish that a construct is unreachable through reflection.",recoverWith:["search","inspect","code"]},{id:"generated-dispatch",families:["execution","runtime","identity"],capability:"Dispatch tables or names created only by generated or unavailable source are unavailable.",consequence:"Missing dispatch edges cannot establish that no generated consumer exists.",recoverWith:["search","inspect","code"]},{id:"unsupported-framework-adapters",families:["runtime","dataflow","state","temporal"],capability:"Framework runtime crossings without a registered source adapter are unavailable.",consequence:"Missing boundary edges cannot establish that no producer, consumer, state effect, or ordering exists.",recoverWith:["search","inspect","code"]}];function Z(e){let t=new Set(e);return Q.filter(n=>n.families.some(a=>t.has(a)))}function $(e){return Z(e).map(t=>`[${t.id}] ${t.capability} ${t.consequence} Recover selected paths with: ${t.recoverWith.map(n=>`codebaseiq ${n}`).join(", ")}.`)}var ee=["incoming","outgoing","both"];function h(e,t,n,a={}){return{family:e,subtype:t,...a.match?{match:a.match}:{},directions:ee,evidenceStrengths:a.strengths??["exact","derived","mixed"],supportCeiling:a.supportCeiling??"partial",establishes:n,nonClaims:a.nonClaims??[],recoverWith:a.recoverWith??["inspect","code"]}}var te=["predicate-consequence","predicate-alternative","predicate-fallthrough","predicate-case","predicate-default","predicate-return","predicate-throw","loop-iteration","loop-exit","exception-handler","finally-cleanup","handler-return","handler-throw"],ne=["captured-value-to-state","constant-to-state","expression-to-state","property-to-state","return-to-state","value-to-state"],re=["await-completion-before","awaits-completion","inside-lock-scope","lexical-successor"],oe=[{id:"indexed-program-identity",label:"SCIP/compiler identity and source ownership",requirements:["indexed-graph"],relations:[h("execution","call","The source construct may call the resolved target.",{nonClaims:["Static may-call reachability does not prove that an invocation occurred at runtime."],recoverWith:["call-graph","inspect","code"]}),h("execution","result-callback","The referenced callable can produce the result consumed by this path.",{nonClaims:["A callback relationship does not prove invocation order or runtime selection."],recoverWith:["call-graph","inspect","code"]}),h("contract","uses-contract-symbol","The source construct refers to the identified contract symbol.",{supportCeiling:"exact",nonClaims:["Contract identity does not prove runtime invocation or behavioral conformance."],recoverWith:["hierarchy","inspect","code"]}),h("identity","references","The occurrence resolves to the identified compiler-owned symbol.",{supportCeiling:"exact",nonClaims:["A reference does not establish execution or value transfer."],recoverWith:["refs","trace","inspect"]}),h("ownership","contains","The owner contains the identified program construct.",{supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),h("ownership","contains-","The owner contains the identified program construct.",{match:"prefix",supportCeiling:"exact",nonClaims:["Structural containment does not establish runtime lifetime or sharing scope."],recoverWith:["outline","inspect"]}),h("ownership","owns-","The owner owns the identified source or runtime observation.",{match:"prefix",supportCeiling:"exact",nonClaims:["Observation ownership does not establish singleton lifetime or exclusive ownership."],recoverWith:["inspect","code"]}),h("dependencies","imports","The source file or module statically imports the indexed target.",{nonClaims:["An import does not establish that imported code executes."],recoverWith:["imports","deps","code"]}),h("dependencies","imports-external","The source region statically imports an external package.",{nonClaims:["An external import does not establish which package behavior executes."],recoverWith:["imports","code"]})]},{id:"runtime-boundary-join",label:"source-grounded runtime-boundary joins",requirements:["indexed-graph","source-facts"],relations:[h("runtime","runtime-handoff","A producer and consumer share a source-grounded runtime rendezvous.",{strengths:["exact","derived","candidate","mixed"],nonClaims:["A candidate or unresolved join does not prove a runtime handoff."],recoverWith:["evidence","inspect","code"]}),h("runtime","discriminator-dispatch","A serialized discriminator selects the reported consumer.",{strengths:["exact","derived","mixed"],nonClaims:["The dispatch edge does not prove delivery, retry, or successful handling."],recoverWith:["evidence","inspect","code"]}),h("dataflow","serialized-discriminator-transfer","The producer serializes the discriminator consumed by dispatch.",{strengths:["exact","derived","mixed"],nonClaims:["This edge does not establish the flow of every payload field."],recoverWith:["value-flow","inspect","code"]}),h("temporal","enqueue-before-consume","The reported enqueue precedes a possible consume through the queue.",{strengths:["exact","derived","mixed"],nonClaims:["Queue order does not establish delivery time, uniqueness, retry count, or durability."],recoverWith:["evidence","inspect","code"]})]},{id:"parser-control-dependence",label:"parser-proved intraprocedural control dependence",requirements:["indexed-graph","source-facts"],relations:[...te.map(e=>h("execution",e,"The outcome is control-dependent on the reported predicate or handler.",{strengths:["exact"],nonClaims:["Local control dependence does not establish that the containing function executes."],recoverWith:["dependence-slice","inspect","code"]})),h("execution","returns","The selected construct contains the reported return terminal.",{strengths:["exact"],nonClaims:["A local return terminal does not establish that the containing callable executes."],recoverWith:["inspect","code"]}),h("execution","throws","The selected construct contains the reported throw terminal.",{strengths:["exact"],nonClaims:["A local throw terminal does not establish propagation, handling, or callable execution."],recoverWith:["inspect","code"]})]},{id:"bounded-static-value-flow",label:"compiler callsites and bounded static value evaluation",requirements:["indexed-graph","source-facts"],relations:[...["argument-to-parameter","constant-to-parameter","property-to-parameter","return-to-parameter","return-to-call-result"].map(e=>h("dataflow",e,"The reported value may reach the target through the evidenced callsite transfer.",{strengths:["exact","derived","mixed"],nonClaims:["This provider does not establish general local definition-use, alias, field, or heap flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}))]},{id:"typescript-local-dependence",label:"TypeScript compiler identities, control-flow graph, and reaching definitions",requirements:["typescript-semantic"],relations:[h("dataflow","definition-to-use","The definition reaches the reported read on a feasible local control-flow path.",{strengths:["exact"],nonClaims:["Local reaching definitions do not establish heap aliasing, exceptional flow, or the runtime order of closure invocation."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("dataflow","value-to-definition","The reported right-hand-side read supplies the assigned local definition.",{strengths:["exact"],nonClaims:["A local assignment edge does not establish field or heap points-to flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("dataflow","closure-capture","The nested callable reads the reported binding from an enclosing callable.",{strengths:["candidate"],supportCeiling:"candidate",nonClaims:["Closure capture does not establish whether or when the nested callable executes."],recoverWith:["call-graph","inspect","code"]}),h("dataflow","field-definition-to-use","The reported same-owner field definition can reach the field read.",{strengths:["exact","candidate"],nonClaims:["Field-name identity does not establish whole-program heap aliasing or cross-instance flow."],recoverWith:["value-flow","dependence-slice","inspect","code"]}),h("execution","control-dependence","Execution of the reported statement depends on the outcome of the predicate.",{strengths:["exact"],nonClaims:["Intraprocedural control dependence does not establish that the containing callable executes."],recoverWith:["dependence-slice","inspect","code"]})]},{id:"parser-state-temporal",label:"parser-proved local state and temporal facts",requirements:["indexed-graph","source-facts"],relations:[...ne.map(e=>h("dataflow",e,"The reported source value is assigned into the identified state resource.",{strengths:["exact"],nonClaims:["The edge does not establish alias, heap, or later read flow."],recoverWith:["value-flow","inspect","code"]})),...["writes-resource","deletes-resource","reads-resource","enqueues-resource","consumes-resource"].map(e=>h("state",e,"The reported construct performs the named operation on the identified resource.",{strengths:["exact"],nonClaims:["A state operation does not establish transactionality, durability, or exclusive ownership."],recoverWith:["evidence","inspect","code"]})),...re.map(e=>h("temporal",e,"The reported source constructs have the named local ordering relationship.",{strengths:["exact"],nonClaims:["Local source order does not establish cross-process happens-before or durable completion."],recoverWith:["evidence","inspect","code"]}))]}];function q(e,t){let n=oe.flatMap(a=>a.relations.filter(r=>r.family===e&&(r.match==="prefix"?t.startsWith(r.subtype):t===r.subtype)).map(r=>({provider:a,relation:r})));if(n.length>1)throw new Error(`Ambiguous graph relation provider for ${e}/${t}: ${n.map(a=>a.provider.id).join(", ")}`);return n[0]??null}var Ne=["causal","structure","complete"],ae={causal:["execution","runtime","dataflow","state","temporal"],structure:["contract","identity","ownership","dependencies"],complete:y},se=2,ce=48,k=64,de=5e4;function We(e,t,n={}){let a=E([...t.symbols??[],...t.locations??[]]),r=E(t.searches??[]);if(a.length===0&&r.length===0)throw new Error("evidence requires at least one positional symbol, --symbol, --at, or --search selector.");let o=n.view??"causal",i=le(n.families,o),s=n.direction??"both",u=E(n.subtypes??[]),l=n.connecting??!1,c=n.inventoryOnly??!1,p=E(n.foldIds??[]),g=n.maxDepth??se,f=n.maxEdges??ce;if(!Number.isSafeInteger(g)||g<0)throw new RangeError(`Evidence depth must be a non-negative safe integer; received ${g}.`);if(!Number.isSafeInteger(f)||f<=0)throw new RangeError(`Evidence max edges must be a positive safe integer; received ${f}.`);if(!["incoming","outgoing","both"].includes(s))throw new Error(`Unsupported graph evidence direction: ${s}.`);if(c&&p.length>0)throw new Error("Evidence fold materialization cannot be combined with --inventory-only.");let m=j(e,{symbols:a,searches:r,maxDepth:g,maxTopologyCharacters:de,relations:pe(i)}),R=new Map(m.nodes.map(d=>[d.id,d])),b=m.edges.filter(d=>d.disposition==="emitted"||d.disposition==="folded").flatMap(d=>ue(d,R)),v=b.filter(d=>i.includes(d.family)).filter(d=>u.length===0||u.includes(d.subtype)),x=new Set(m.anchors.flatMap(d=>d.nodeIds));if(l&&x.size<2)throw new Error("Connecting evidence requires at least two resolved root nodes.");let S=new Set(v.map(d=>d.id)),_=A(b,x,"incoming").filter(d=>S.has(d.id)),F=A(b,x,"outgoing").filter(d=>S.has(d.id)),O=A(b,x,"both").filter(d=>S.has(d.id)),B=ve(i,u,_,F,O),M=s==="incoming"?_:s==="outgoing"?F:O,N=l?Re(M,[...x],s):M,z=Ce(N,x,s),w=[...N].sort((d,X)=>Te(d,X,z)),W=ye(w,f),Y=be(W,p),G=c?[]:p.length>0?w.filter(d=>Y.has(d.id)):w,C=p.length>0?G:G.slice(0,f),K=p.length>0||c?[]:W,T=Math.max(0,G.length-C.length),J=m.frontiers.filter(d=>d.disposition==="unsupported").length,I=m.coverage.status==="incomplete"?"incomplete":T>0?"bounded":"accounted";return{kind:"graph",view:n.families&&n.families.length>0?"custom":o,families:i,selection:{direction:s,subtypes:u,connecting:l,inventoryOnly:c,foldIds:p},targets:m.anchors.map(d=>({kind:d.kind,query:d.query,status:d.status,nodeIds:[...d.nodeIds],omittedCandidates:d.omittedCandidates})),inventory:B,edges:C,folds:K,coverage:{status:I,topologyStatus:m.coverage.status,scope:m.coverage.scope,maxDepth:g,maxEdges:f,matchedEdges:w.length,eligibleEdges:G.length,returnedEdges:C.length,omittedEdges:T,frontierGroups:m.frontiers.length,unsupportedFrontiers:J,blindSpots:E([...m.coverage.blindSpots,...$(i)]),explanation:c?`${w.length} relationship(s) match the explicit projection; only exact inventory counts were requested.`:p.length>0?`Every relationship in ${p.length} explicitly selected recoverable fold(s) was emitted.`:I==="accounted"?"Every selected relationship in the bounded topology was emitted.":I==="bounded"?`${T} selected relationship(s) were withheld by the explicit edge budget.`:m.coverage.explanation}}}function le(e,t){let n=e&&e.length>0?e:ae[t],a=n.filter(r=>!y.includes(r));if(a.length>0)throw new Error(`Unsupported graph evidence family: ${a.join(", ")}.`);return E(n)}function pe(e){return["call","contract-symbol","import","reference","runtime-boundary"]}function ue(e,t){let n=t.get(e.fromNodeId),a=t.get(e.toNodeId);return!n||!a?[]:(e.semantics??[]).flatMap((r,o)=>{let i=ge(r);if(!i)return[];let s=q(i,r.subtype);if(!s)throw new Error(`No graph relation provider contract is registered for ${i}/${r.subtype}.`);let u=fe(e);if(!s.relation.evidenceStrengths.includes(u))throw new Error(`Graph relation provider ${s.provider.id} does not admit ${u} evidence for ${i}/${r.subtype}.`);return[{id:`${e.id}:${o}:${i}`,family:i,semanticFamily:r.family,subtype:r.subtype,from:L(n),to:L(a),sourceKind:e.kind,providerId:s.provider.id,supportCeiling:s.relation.supportCeiling,establishes:s.relation.establishes,nonClaims:[...s.relation.nonClaims],recoverWith:[...s.relation.recoverWith],evidenceStrength:u,evidenceMethods:E(e.evidence.map(l=>l.method)),evidenceConstituents:he(e.evidence),context:r.context?{...r.context}:null,attributes:r.attributes?{...r.attributes}:null}]})}function he(e){let t=new Map;for(let n of e)t.set(`${n.method}\0${n.strength}`,n);return[...t.values()].map(({method:n,strength:a})=>({method:n,strength:a}))}function ge(e){switch(e.family){case"control":return e.context?.crossesRuntimeBoundary===!0||e.subtype==="runtime-handoff"?"runtime":"execution";case"data":return"dataflow";case"state":return"state";case"temporal":return"temporal";case"contract":return"contract";case"identity":return e.subtype.startsWith("contains")||e.subtype.startsWith("owns-")?"ownership":e.subtype.startsWith("import")?"dependencies":"identity"}}function L(e){let t=me(e);return{id:e.id,kind:e.kind,label:t?D(t):e.label,symbol:t,location:e.location?{...e.location}:null}}function me(e){return e.kind!=="symbol"||!e.id.startsWith("symbol:")?null:decodeURIComponent(e.id.slice(7))}function fe(e){let t=E(e.evidence.map(n=>n.strength));return t.length===1?t[0]:t.includes("exact")&&t.every(n=>n==="exact"||n==="derived")?"mixed":t.includes("candidate")?"candidate":t.includes("unknown")||t.length===0?"unknown":"mixed"}function A(e,t,n){let a=P(e,n),r=new Map,o=new Map,i=[...t].sort();for(let s of i)o.set(s,0);for(let s=0;s<i.length;s+=1){let u=i[s],l=o.get(u);for(let c of a.get(u)??[])r.set(c.edge.id,c.edge),!o.has(c.next)&&(o.set(c.next,l+1),i.push(c.next))}return[...r.values()]}function P(e,t){let n=new Map,a=(r,o,i)=>{let s=n.get(r)??[];s.push({edge:i,next:o}),n.set(r,s)};for(let r of e)t!=="incoming"&&a(r.from.id,r.to.id,r),t!=="outgoing"&&a(r.to.id,r.from.id,r);for(let r of n.values())r.sort((o,i)=>o.edge.id.localeCompare(i.edge.id)||o.next.localeCompare(i.next));return n}function ve(e,t,n,a,r){let o=new Set;for(let c of[...n,...a,...r])o.add(`${c.family}\0${c.subtype}`);if(t.length>0)for(let c of e)for(let p of t)o.add(`${c}\0${p}`);let i=c=>{let p=new Map;for(let g of c){let f=`${g.family}\0${g.subtype}`;p.set(f,(p.get(f)??0)+1)}return p},s=i(n),u=i(a),l=i(r);return[...o].map(c=>{let[p,g]=c.split("\0");return{family:p,subtype:g,incoming:s.get(c)??0,outgoing:u.get(c)??0,both:l.get(c)??0}}).sort((c,p)=>y.indexOf(c.family)-y.indexOf(p.family)||c.subtype.localeCompare(p.subtype))}function ye(e,t){let n=e.slice(t),a=new Map;for(let i of n){let s=Ee(i),u=`${i.family}\0${s}`,l=a.get(u)??[];l.push(i),a.set(u,l)}let r=new Map(e.map((i,s)=>[i.id,s+1])),o=[];for(let[i,s]of[...a].sort(([u],[l])=>u.localeCompare(l))){let[u,l]=i.split("\0"),c=[...s].sort((p,g)=>p.id.localeCompare(g.id));for(let p=0;p<c.length;p+=k){let g=c.slice(p,p+k),f=g.map(v=>v.id),m=E(g.map(v=>v.subtype)).sort(),R=m.length===1?m[0]:"mixed",b=[...new Set(g.flatMap(v=>[v.from.id,v.to.id]))].sort();o.push({id:Ge(u,m.join("\0"),f),mode:xe(g),family:u,subtype:R,subtypes:m,region:l,edgeCount:f.length,edgeIds:f,nodeIds:b,minimumMaxEdges:Math.max(...f.map(v=>r.get(v)??e.length))})}}return o.sort((i,s)=>y.indexOf(i.family)-y.indexOf(s.family)||(i.region??"").localeCompare(s.region??"")||i.id.localeCompare(s.id))}function Ee(e){let t=e.from.location?.file??`kind:${e.from.kind}`,n=e.to.location?.file??`kind:${e.to.kind}`;return t===n?t:`${t} -> ${n}`}function be(e,t){if(t.length===0)return new Set;let n=new Map(e.map(r=>[r.id,r])),a=t.filter(r=>!n.has(r));if(a.length>0){let r=e.map(o=>o.id).sort();throw new Error(`Unknown evidence fold ${a.join(", ")} for this projection. Available folds: ${r.join(", ")||"(none)"}.`)}return new Set(t.flatMap(r=>n.get(r).edgeIds))}function xe(e){let t=new Map,n=new Map,a=new Set;for(let o of e){a.add(o.from.id),a.add(o.to.id);let i=t.get(o.from.id)??new Set;i.add(o.to.id),t.set(o.from.id,i);let s=n.get(o.to.id)??new Set;s.add(o.from.id),n.set(o.to.id,s)}return we(a,t)?"scc":[...a].every(o=>(n.get(o)?.size??0)<=1&&(t.get(o)?.size??0)<=1)?"linear":"topology"}function we(e,t){let n=new Set,a=new Set,r=o=>{if(n.has(o))return!0;if(a.has(o))return!1;n.add(o);for(let i of t.get(o)??[])if(r(i))return!0;return n.delete(o),a.add(o),!1};return[...e].some(r)}function Ge(e,t,n){return`fold:${ie("sha256").update([e,t,...n].join("\0")).digest("hex").slice(0,16)}`}function Re(e,t,n){let a=new Map,r=[...new Set(t)].sort();for(let o=0;o<r.length;o+=1)for(let i=o+1;i<r.length;i+=1)for(let s of Se(e,r[o],r[i],n))a.set(s.id,s);return[...a.values()]}function Se(e,t,n,a){let r=P(e,a),o=new Map([[t,0]]),i=new Map,s=[t];for(let l=0;l<s.length;l+=1){let c=s[l],p=o.get(c);if(c!==n)for(let g of r.get(c)??[])o.has(g.next)||(o.set(g.next,p+1),i.set(g.next,{node:c,edge:g.edge}),s.push(g.next))}if(!o.has(n))return[];let u=[];for(let l=n;l!==t;){let c=i.get(l);if(!c)return[];u.push(c.edge),l=c.node}return u.reverse()}function Ce(e,t,n){let a=P(e,n),r=new Map,o=[...t];for(let i of t)r.set(i,0);for(let i=0;i<o.length;i+=1){let s=o[i],u=r.get(s);for(let{next:l}of a.get(s)??[])r.has(l)||(r.set(l,u+1),o.push(l))}return r}function Te(e,t,n){return H(e,n)-H(t,n)||U(e)-U(t)||V(e.evidenceStrength)-V(t.evidenceStrength)||y.indexOf(e.family)-y.indexOf(t.family)||e.from.label.localeCompare(t.from.label)||e.to.label.localeCompare(t.to.label)||e.subtype.localeCompare(t.subtype)||e.id.localeCompare(t.id)}function H(e,t){return Math.min(t.get(e.from.id)??Number.MAX_SAFE_INTEGER,t.get(e.to.id)??Number.MAX_SAFE_INTEGER)}function U(e){let t=[e.from,e.to].filter(n=>n.kind==="structural-region").length;return t===2?2:t}function V(e){switch(e){case"exact":return 0;case"mixed":return 1;case"derived":return 2;case"candidate":return 3;case"unknown":return 4}}function E(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))]}export{y as a,Ne as b,We as c};
2
+ //# sourceMappingURL=chunk-I3OK27P7.js.map
@@ -1,4 +1,4 @@
1
- import{g as L,h as X,i as F,j as _e,k as Fe,l as Le,r as Pe,s as y,t as Ee,v as Ae,w as g,x as we}from"./chunk-PLZXWZHY.js";import{H,c as v}from"./chunk-327YK6TB.js";import{basename as Re}from"path";var It=L("indexed-document-paths",{clearGroups:["whole-project"]});function O(e,t={}){let n=Vt(t);return[...It.get(e,n,()=>{let o=t.scope?"AND relative_path LIKE ?":"",s=t.like?"AND relative_path LIKE ?":"",i=[...t.scope?[`%${t.scope}%`]:[],...t.like?[t.like]:[]],a=e.all(`SELECT relative_path
1
+ import{g as L,h as X,i as F,j as _e,k as Fe,l as Le,r as Pe,s as y,t as Ee,v as Ae,w as g,x as we}from"./chunk-7GAK2F3H.js";import{H,c as v}from"./chunk-UC2FD2PS.js";import{basename as Re}from"path";var It=L("indexed-document-paths",{clearGroups:["whole-project"]});function O(e,t={}){let n=Vt(t);return[...It.get(e,n,()=>{let o=t.scope?"AND relative_path LIKE ?":"",s=t.like?"AND relative_path LIKE ?":"",i=[...t.scope?[`%${t.scope}%`]:[],...t.like?[t.like]:[]],a=e.all(`SELECT relative_path
2
2
  FROM documents
3
3
  WHERE 1 = 1
4
4
  ${e.pathExclusionsFor("documents")}
@@ -18,4 +18,4 @@ import{g as L,h as X,i as F,j as _e,k as Fe,l as Le,r as Pe,s as y,t as Ee,v as
18
18
  `)))}var Eo=new Set(["in","key","of"]),Ao=new Set(["computed","defineEmits","defineProps","reactive","ref","watch","watchEffect"]),wo=F("vue-component-behavior-profiles");function At(e,t={}){let n=W(e,{extensions:[".vue"]}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).map(o=>Te(e,o)).filter(o=>(t.minTemplateTokens===void 0||o.templateTokens.size>=t.minTemplateTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function Te(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n),o=wo.get(e,n,r,()=>Ro(e,n,r));return Vo(o)}function Ro(e,t,n){let r=R(e,t),o=oe(e,t),s=re(r),i=$o(o),a=o.expressionIdentifiers.map(m=>m.name).filter(m=>!i.includes(m)).filter((m,C,$)=>$.indexOf(m)===C).sort(),c=o.componentTags.map(m=>m.normalized).filter((m,C,$)=>$.indexOf(m)===C).sort(),l=n?n.split(`
19
19
  `).length:0,p=E(r.template),u=s.lineCount,N=r.styles.reduce((m,C)=>m+E(C),0),B=r.customBlocks.reduce((m,C)=>m+E(C),0),{lines:ie,paths:ae}=Io(e,t,s);return{file:t,sfc:r,templateFacts:o,scriptFacts:s,templateTokens:new Set(o.structuralTokens),behaviorTokens:Bo(o,s,a),templateBindingNames:a,templateLocalNames:i,componentNames:c,sfcLines:l,totalLines:l+s.externalLineCount,templateLines:p,scriptLines:u,styleLines:N,externalScriptLines:s.externalLineCount,externalScriptPaths:s.externalScriptPaths,customBlockLines:B,delegatedComposableLines:ie,delegatedComposablePaths:ae}}function Io(e,t,n){let r=new Set;for(let i of n.composables){let a=n.imports.find(l=>l.local===i);if(!a)continue;let c=Pt(e,a.sourcePath,a.source);!c||c===t||r.add(c)}let o=[...r].sort();return{lines:o.reduce((i,a)=>{let c=g(e,a);return i+(c?c.split(`
20
20
  `).length:0)},0),paths:o}}function Vo(e){let t=jo(e.scriptFacts);return{...e,scriptFacts:t,templateTokens:new Set(e.templateTokens),behaviorTokens:new Set(e.behaviorTokens),templateBindingNames:[...e.templateBindingNames],templateLocalNames:[...e.templateLocalNames],componentNames:[...e.componentNames],externalScriptPaths:t.externalScriptPaths,delegatedComposablePaths:[...e.delegatedComposablePaths]}}function jo(e){return{...e,imports:e.imports.map(t=>({...t})),functions:e.functions.map(t=>({...t})),calls:e.calls.map(t=>({...t,categories:[...t.categories]})),composables:[...e.composables],stores:[...e.stores],reactivity:[...e.reactivity],lifecycle:[...e.lifecycle],requests:[...e.requests],macros:[...e.macros],externalScriptPaths:[...e.externalScriptPaths],unresolvedScripts:e.unresolvedScripts.map(t=>({...t}))}}function Bo(e,t,n){let r=new Set;for(let o of t.composables)r.add(`composable:${o}`);for(let o of t.stores)r.add(`store:${o}`);for(let o of t.reactivity)r.add(`reactivity:${o}`);for(let o of t.lifecycle)r.add(`lifecycle:${o}`);for(let o of t.requests)r.add(`request:${o}`);for(let o of t.macros)r.add(`macro:${o}`);for(let o of t.functions){if(Ao.has(o.name))continue;r.add(`function:${o.name}`);let s=/^[a-z]+/.exec(o.name)?.[0]??null;s&&s.length>2&&s!==o.name&&r.add(`function-verb:${s}`)}for(let o of e.events)r.add(`template-event:${o.name}`);for(let o of n)r.add(`template-binding:${o}`);return r}function $o(e){let t=new Set;for(let n of e.directives)if(n.name==="for"&&n.value)for(let r of Oo(n.value))t.add(r);for(let n of e.slots)if(n.value)for(let r of wt(n.value))t.add(r);return[...t].sort()}function Oo(e){let t=/^(.*?)\s+(?:in|of)\s+/.exec(e.trim());return t?wt(t[1]??""):[]}function wt(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];Eo.has(r)||t.push(r)}return t}function bi(e){return{capability:(t,n)=>Do(t,n),reactProfiles:(t={})=>et(e,t),reactProfilesForFile:t=>me(e,t),vueProfiles:(t={})=>At(e,t),vueProfileForFile:t=>Te(e,t),vueTemplateFacts:t=>oe(e,t),vueScriptFacts:t=>re(R(e,t))}}function Do(e,t){let n=e.startsWith("react-")?"react":"vue";if(t===void 0)return{slot:e,available:!0,framework:n};let r=t.replace(/\\/g,"/").toLowerCase();return n==="react"&&!r.endsWith(".tsx")&&!r.endsWith(".jsx")?{slot:e,available:!1,framework:n,reason:"React behavior profiles are only available for .tsx and .jsx files"}:n==="vue"&&!r.endsWith(".vue")?{slot:e,available:!1,framework:n,reason:"Vue behavior facts are only available for .vue files"}:{slot:e,available:!0,framework:n}}export{O as a,Mo as b,dt as c,Vr as d,q as e,ht as f,St as g,yt as h,xt as i,vt as j,Nt as k,Ct as l,bt as m,se as n,ai as o,oo as p,Pt as q,xo as r,vo as s,No as t,Co as u,bo as v,ko as w,To as x,ci as y,D as z,ce as A,pe as B,ze as C,as as D,Y as E,Q as F,it as G,ut as H,ds as I,Je as J,W as K,gs as L,bi as M};
21
- //# sourceMappingURL=chunk-RVYLJDXC.js.map
21
+ //# sourceMappingURL=chunk-ICUL7XRT.js.map
@@ -1,7 +1,7 @@
1
- import{b as B}from"./chunk-KDYQQJ6X.js";import{c as K}from"./chunk-I2KP4AGR.js";import{a as O}from"./chunk-ZOEDRCR4.js";import{a as M}from"./chunk-OANDYLJQ.js";import{A as R,d as I,i as P,t as _}from"./chunk-AM5SUGHF.js";import{f as E}from"./chunk-JOALNFY3.js";function re(e,n,t){let r=[],i=[],a=new Map;for(let l of[...e].sort(t)){let s=l.channel??"default",c=n[s]??Number.MAX_SAFE_INTEGER,u=a.get(s)??0;if(u>=c){i.push(l);continue}r.push(l),a.set(s,u+1)}return{selected:r,omitted:i}}function H(e,n,t,r,i=!1){let a=[...e],l=[],s=new Set,c=0;for(;a.length>0&&l.length<n;){let u=a.filter(h=>c+h.evidenceCharacters<=t||i&&l.length===0);if(u.length===0)break;let g=u.filter(h=>h.roles.includes("location")||h.roles.includes("definition")).sort(r);u.sort((h,S)=>N(S,s)-N(h,s)||r(h,S));let p=g[0]??u[0];l.push(p),c+=p.evidenceCharacters;for(let h of $(p))s.add(h.key);a.splice(a.indexOf(p),1)}return{selected:l,omitted:a.sort(r)}}function N(e,n){let t=$(e).reduce((a,l)=>a+(n.has(l.key)?0:l.weight),0),r=Math.max(0,8-e.priority)*20,i=Math.min(500,Math.ceil(e.evidenceCharacters/160));return t+r-i}function $(e){return[...e.reasons.map(X),...e.roles.map(n=>({key:`role:${n}`,weight:Y(n)})),{key:`file:${e.relativePath}`,weight:180},{key:`scope:${J(e.relativePath)}`,weight:120},{key:`kind:${e.fileKind}`,weight:40},...e.symbols.map(n=>({key:`symbol:${n}`,weight:100})),...e.behaviorSignals.map(n=>({key:`behavior:${n}`,weight:70}))]}function X(e){let n=e.indexOf(":"),t=n<0?e:e.slice(0,n);return t==="dependency"||t==="consumer"?{key:`reason:${t}`,weight:220}:{key:`reason:${e}`,weight:t==="location"||t==="definition"?1400:800}}function Y(e){switch(e){case"location":return 1200;case"definition":return 1100;case"reference":return 600;case"caller":case"callee":return 550;case"dependency":case"consumer":return 500;case"search":return 400;default:return 300}}function J(e){let n=e.lastIndexOf("/");return n<0?e:e.slice(0,n)}var j=64,A=12;function de(e,n,t={}){if(n.length===0)throw new Error("The source search pattern must not be empty.");let r=t.context??6;if(!Number.isSafeInteger(r)||r<0)throw new RangeError(`context must be a non-negative safe integer; received ${r}`);let i=t.limit??12;if(!Number.isSafeInteger(i)||i<=0)throw new RangeError(`limit must be a positive safe integer; received ${i}`);let a=t.regexp?M(n,"source search pattern",t.ignoreCase?"iu":"u"):null,l=t.ignoreCase?n.toLocaleLowerCase():n,s=K(e,{scope:t.scope}),c=[],u=[];for(let o of s.files){let m=o.relativePath,b=Z(o.text);if(b.length===0)continue;let z=o.freshness.semantic.state!=="stale"&&o.freshness.semantic.basis!=="no-compiler-document"?_(e,m):[],U=E(e,m)?.callables??[],C=0;for(let d=0;d<b.length;d+=1){let x=b[d]??"",w=x.endsWith("\r")?x.slice(0,-1):x;if(!(a?a.test(w):(t.ignoreCase?w.toLocaleLowerCase():w).includes(l)))continue;C+=1;let f=R(z,d),F=Q(U,d),y=f&&!P(f.symbol)?f:null,G=y?.startLine??F?.startLine??f?.startLine??d,q=y?.endLine??F?.endLine??f?.endLine??d,k=B(e,m,d,G,q);c.push({relativePath:m,focusLine:d,ownerSymbol:y?.symbol??null,ownerShort:y?I(y.symbol):F?.name??(f?I(f.symbol):null),ownerStartLine:k.startLine,ownerEndLine:k.endLine,fileKind:O(m),freshness:o.freshness})}C>0&&u.push({relativePath:m,matchingLines:C,returnedMatches:0,freshness:o.freshness})}c.sort(W);let g=c.length>j?D(c,j):c,p=i===Number.MAX_SAFE_INTEGER?c:t.ranking?D(c,i):c.slice(0,i),h=new Map(s.files.map(o=>[o.relativePath,o.text])),S=p.flatMap(o=>{let m=h.get(o.relativePath),b=m===void 0?null:V(o.relativePath,m,o.focusLine,r);return b?[{...b,...o}]:[]}),v=new Map;for(let o of S)v.set(o.relativePath,(v.get(o.relativePath)??0)+1);for(let o of u)o.returnedMatches=v.get(o.relativePath)??0;let T=ee(u);return{pattern:n,mode:t.regexp?"regexp":"literal",identities:c,...g.length<c.length?{identityManifest:g}:{},identityCoverage:{mode:g.length===c.length?"complete":"bounded",returned:g.length,total:c.length,omitted:c.length-g.length},matches:S,matchingLines:c.length,matchingFiles:u.length,omittedMatches:Math.max(0,c.length-S.length),fileCoverage:u,scopeHints:T.slice(0,A),omittedScopeHints:Math.max(0,T.length-A),scannedFiles:s.files.length,textCoverage:{basis:"current-project-text-files",candidateFiles:s.candidateFiles,scannedTextFiles:s.files.length,scannedBytes:s.scannedBytes,skippedBinaryPaths:s.skippedBinaryPaths,skippedUnreadablePaths:s.skippedUnreadablePaths,skippedOversizedPaths:s.skippedOversizedPaths,semanticFiles:{aligned:s.files.filter(o=>o.freshness.semantic.state==="aligned").length,stale:s.files.filter(o=>o.freshness.semantic.state==="stale").length,unavailable:s.files.filter(o=>o.freshness.semantic.state==="unavailable").length}}}}function Q(e,n){return e.filter(t=>t.startLine<=n&&t.endLine>=n).sort((t,r)=>t.endLine-t.startLine-(r.endLine-r.startLine)||t.startLine-r.startLine)[0]??null}function V(e,n,t,r){let i=n.split(`
1
+ import{b as B}from"./chunk-BWL3PMPT.js";import{c as K}from"./chunk-TJWVT4DO.js";import{a as O}from"./chunk-BRQL7AFJ.js";import{a as M}from"./chunk-OANDYLJQ.js";import{A as R,d as I,i as P,t as _}from"./chunk-GVAF222T.js";import{f as E}from"./chunk-F74LZWCE.js";function re(e,n,t){let r=[],i=[],a=new Map;for(let l of[...e].sort(t)){let s=l.channel??"default",c=n[s]??Number.MAX_SAFE_INTEGER,u=a.get(s)??0;if(u>=c){i.push(l);continue}r.push(l),a.set(s,u+1)}return{selected:r,omitted:i}}function H(e,n,t,r,i=!1){let a=[...e],l=[],s=new Set,c=0;for(;a.length>0&&l.length<n;){let u=a.filter(h=>c+h.evidenceCharacters<=t||i&&l.length===0);if(u.length===0)break;let g=u.filter(h=>h.roles.includes("location")||h.roles.includes("definition")).sort(r);u.sort((h,S)=>N(S,s)-N(h,s)||r(h,S));let p=g[0]??u[0];l.push(p),c+=p.evidenceCharacters;for(let h of $(p))s.add(h.key);a.splice(a.indexOf(p),1)}return{selected:l,omitted:a.sort(r)}}function N(e,n){let t=$(e).reduce((a,l)=>a+(n.has(l.key)?0:l.weight),0),r=Math.max(0,8-e.priority)*20,i=Math.min(500,Math.ceil(e.evidenceCharacters/160));return t+r-i}function $(e){return[...e.reasons.map(X),...e.roles.map(n=>({key:`role:${n}`,weight:Y(n)})),{key:`file:${e.relativePath}`,weight:180},{key:`scope:${J(e.relativePath)}`,weight:120},{key:`kind:${e.fileKind}`,weight:40},...e.symbols.map(n=>({key:`symbol:${n}`,weight:100})),...e.behaviorSignals.map(n=>({key:`behavior:${n}`,weight:70}))]}function X(e){let n=e.indexOf(":"),t=n<0?e:e.slice(0,n);return t==="dependency"||t==="consumer"?{key:`reason:${t}`,weight:220}:{key:`reason:${e}`,weight:t==="location"||t==="definition"?1400:800}}function Y(e){switch(e){case"location":return 1200;case"definition":return 1100;case"reference":return 600;case"caller":case"callee":return 550;case"dependency":case"consumer":return 500;case"search":return 400;default:return 300}}function J(e){let n=e.lastIndexOf("/");return n<0?e:e.slice(0,n)}var j=64,A=12;function de(e,n,t={}){if(n.length===0)throw new Error("The source search pattern must not be empty.");let r=t.context??6;if(!Number.isSafeInteger(r)||r<0)throw new RangeError(`context must be a non-negative safe integer; received ${r}`);let i=t.limit??12;if(!Number.isSafeInteger(i)||i<=0)throw new RangeError(`limit must be a positive safe integer; received ${i}`);let a=t.regexp?M(n,"source search pattern",t.ignoreCase?"iu":"u"):null,l=t.ignoreCase?n.toLocaleLowerCase():n,s=K(e,{scope:t.scope}),c=[],u=[];for(let o of s.files){let m=o.relativePath,b=Z(o.text);if(b.length===0)continue;let z=o.freshness.semantic.state!=="stale"&&o.freshness.semantic.basis!=="no-compiler-document"?_(e,m):[],U=E(e,m)?.callables??[],C=0;for(let d=0;d<b.length;d+=1){let x=b[d]??"",w=x.endsWith("\r")?x.slice(0,-1):x;if(!(a?a.test(w):(t.ignoreCase?w.toLocaleLowerCase():w).includes(l)))continue;C+=1;let f=R(z,d),F=Q(U,d),y=f&&!P(f.symbol)?f:null,G=y?.startLine??F?.startLine??f?.startLine??d,q=y?.endLine??F?.endLine??f?.endLine??d,k=B(e,m,d,G,q);c.push({relativePath:m,focusLine:d,ownerSymbol:y?.symbol??null,ownerShort:y?I(y.symbol):F?.name??(f?I(f.symbol):null),ownerStartLine:k.startLine,ownerEndLine:k.endLine,fileKind:O(m),freshness:o.freshness})}C>0&&u.push({relativePath:m,matchingLines:C,returnedMatches:0,freshness:o.freshness})}c.sort(W);let g=c.length>j?D(c,j):c,p=i===Number.MAX_SAFE_INTEGER?c:t.ranking?D(c,i):c.slice(0,i),h=new Map(s.files.map(o=>[o.relativePath,o.text])),S=p.flatMap(o=>{let m=h.get(o.relativePath),b=m===void 0?null:V(o.relativePath,m,o.focusLine,r);return b?[{...b,...o}]:[]}),v=new Map;for(let o of S)v.set(o.relativePath,(v.get(o.relativePath)??0)+1);for(let o of u)o.returnedMatches=v.get(o.relativePath)??0;let T=ee(u);return{pattern:n,mode:t.regexp?"regexp":"literal",identities:c,...g.length<c.length?{identityManifest:g}:{},identityCoverage:{mode:g.length===c.length?"complete":"bounded",returned:g.length,total:c.length,omitted:c.length-g.length},matches:S,matchingLines:c.length,matchingFiles:u.length,omittedMatches:Math.max(0,c.length-S.length),fileCoverage:u,scopeHints:T.slice(0,A),omittedScopeHints:Math.max(0,T.length-A),scannedFiles:s.files.length,textCoverage:{basis:"current-project-text-files",candidateFiles:s.candidateFiles,scannedTextFiles:s.files.length,scannedBytes:s.scannedBytes,skippedBinaryPaths:s.skippedBinaryPaths,skippedUnreadablePaths:s.skippedUnreadablePaths,skippedOversizedPaths:s.skippedOversizedPaths,semanticFiles:{aligned:s.files.filter(o=>o.freshness.semantic.state==="aligned").length,stale:s.files.filter(o=>o.freshness.semantic.state==="stale").length,unavailable:s.files.filter(o=>o.freshness.semantic.state==="unavailable").length}}}}function Q(e,n){return e.filter(t=>t.startLine<=n&&t.endLine>=n).sort((t,r)=>t.endLine-t.startLine-(r.endLine-r.startLine)||t.startLine-r.startLine)[0]??null}function V(e,n,t,r){let i=n.split(`
2
2
  `),a=n.endsWith(`
3
3
  `)?i.length-1:i.length;if(t<0||t>=a)return null;let l=Math.max(0,t-r),s=Math.min(a-1,t+r);return{relativePath:e,startLine:l,endLine:s,focusLine:t,source:i.slice(l,s+1).join(`
4
4
  `)}}function Z(e){if(e.length===0)return[];let n=e.split(`
5
5
  `);return e.endsWith(`
6
6
  `)&&n.pop(),n}function ee(e){let n=new Map;for(let t of e){let r=ne(t.relativePath),i=n.get(r)??{matchingLines:0,matchingFiles:0};i.matchingLines+=t.matchingLines,i.matchingFiles+=1,n.set(r,i)}return[...n.entries()].map(([t,r])=>({scope:t,...r})).sort((t,r)=>r.matchingLines-t.matchingLines||r.matchingFiles-t.matchingFiles||t.scope.localeCompare(r.scope))}function ne(e){let n=e.lastIndexOf("/");return n<0?e:e.slice(0,n)}function D(e,n){let t=e.map((i,a)=>({...i,priority:L(i.fileKind),sequence:a,evidenceCharacters:1,roles:["search"],reasons:["search"],symbols:i.ownerSymbol?[i.ownerSymbol]:[],behaviorSignals:[]})),r=[];for(let i of[0,1,2]){let a=n-r.length;if(a===0)break;let l=t.filter(s=>L(s.fileKind)===i);r.push(...H(l,a,Number.MAX_SAFE_INTEGER,W).selected)}return r.map(({priority:i,sequence:a,evidenceCharacters:l,roles:s,reasons:c,symbols:u,behaviorSignals:g,...p})=>p)}function W(e,n){return L(e.fileKind)-L(n.fileKind)||+(n.ownerSymbol!==null)-+(e.ownerSymbol!==null)||e.relativePath.localeCompare(n.relativePath)||e.focusLine-n.focusLine}function L(e){switch(e){case"entry":case"source":case"worker":return 0;case"barrel":return 1;case"test":return 2}}export{re as a,H as b,de as c};
7
- //# sourceMappingURL=chunk-QVHZB75Z.js.map
7
+ //# sourceMappingURL=chunk-IHSLIIL3.js.map
@@ -0,0 +1,2 @@
1
+ import{a as R}from"./chunk-3VJ3OCRE.js";import{N as U}from"./chunk-G7GVV2TV.js";import{d as G,e as K,f as X,m as z}from"./chunk-J7AMBVWF.js";import{c as V,t as A,u as q}from"./chunk-GVAF222T.js";import{f as k,j as C,k as E,p as P}from"./chunk-F74LZWCE.js";import{C as w}from"./chunk-ICUL7XRT.js";import{w as W}from"./chunk-7GAK2F3H.js";import{d as M}from"./chunk-UC2FD2PS.js";var Y=new WeakMap,H=new WeakMap,J=new WeakMap,ee=new WeakMap,te=new WeakMap;function Ze(t,e){let n=H.get(t);n||(n=new Map,H.set(t,n));let r=n.get(e);if(r)return r;let i=w(t,e)?.rootNode;if(!i)return n.set(e,[]),[];let o=new Set;I(i,l=>{if(l.type!=="call_expression")return;let p=l.childForFieldName("function")??l.namedChild(0),s=/^([A-Za-z_$][\w$]*(?:\.Service)?)\.of$/u.exec(p?.text.replace(/\s+/gu,"")??"");s&&o.add(s[1])});let m=P(t,e).filter(l=>!!l.sourcePath),f=new Set;for(let l of o){let p=/^([A-Za-z_$][\w$]*)\.Service$/u.exec(l);if(p){for(let s of m)s.localName===p[1]&&f.add(s.sourcePath);continue}if(l==="Service"){A(t,e).some(s=>s.leaf==="Service")&&f.add(e);for(let s of m)(s.localName??s.importedName)==="Service"&&f.add(s.sourcePath)}}let c=B([...f]).sort();return n.set(e,c),c}function Be(t,e,n={}){let i=E(t,e)?.filter(a=>!n.ranges||n.ranges.some(d=>a.line>=d.startLine&&a.line<=d.endLine));if(!i)return{targets:[],unresolvedCallsites:0};let o=P(t,e).filter(a=>!!a.sourcePath),m=$e(W(t,e)??""),f=w(t,e)?.rootNode??null,c=f?de(f):ne(),l=new Map,p=X(t),s=[],u=0;for(let a of i){if(!a.memberAccess)continue;let d=G(e,p.get(a.calleeLeaf)??[]);if(n.excludeIndexedTargets!==!1&&K(t,e,d,!0,a.calleeQualifier))continue;let h=a.calleeQualifier,L=we(t,e,a,o);if(L){s.push(L);continue}let b=fe(t,e,a,o,me(c,a.calleeQualifier,a.line));if(b.length>0){s.push(...b);continue}let S=pe(t,e,a);if(S.length>0){s.push(...S);continue}let y=h?m.get(h)??h:null,$=(y?B(o.filter(g=>(g.localName??g.importedName)===y).map(g=>g.sourcePath)):[]).flatMap(g=>{let v=l.get(g);return v||(v=C(t,g)??[],l.set(g,v)),v.filter(x=>x.name===a.calleeLeaf).map(x=>({file:g,callable:x}))});if($.length!==1){u+=1;continue}let F=$[0];s.push({calleeLeaf:a.calleeLeaf,line:a.line,sourceFile:e,targetFile:F.file,targetStartLine:F.callable.startLine,targetEndLine:F.callable.endLine,resolution:"direct-import-receiver",strength:"candidate"})}return{targets:s,unresolvedCallsites:u}}function fe(t,e,n,r,i){let o=n.calleeQualifier;if(!o||!/^[A-Za-z_$][\w$]*$/u.test(o))return[];if(i.size!==1)return[];let m=[...i][0],f=B(r.filter(p=>p.localName===m||p.importedName===m).map(p=>p.sourcePath));if(f.length!==1)return[];let c=f[0],l=Le(t,c,n.calleeLeaf);return l.map(p=>({calleeLeaf:p.name,line:n.line,sourceFile:e,targetFile:p.file,targetStartLine:p.startLine,targetEndLine:p.endLine,serviceFile:c,resolutionAlternativeCount:l.length,resolution:"imported-service-object-member",strength:"candidate"}))}function ne(){return{declarations:new Map,callbacks:[]}}function de(t){let e=ne();return I(t,n=>{if(n.type==="variable_declarator"){let c=n.childForFieldName("name")??n.namedChild(0),l=n.childForFieldName("value")??n.namedChild(1);if(c?.type!=="identifier"||!l)return;let p=new Set;if(I(l,s=>{if(s.type!=="member_expression")return;let u=s.childForFieldName("object")??s.namedChild(0),a=s.childForFieldName("property")??s.namedChild(1);u?.type==="identifier"&&a?.text==="Service"&&p.add(u.text)}),p.size===1){let s=e.declarations.get(c.text)??[];s.push({line:n.startPosition.row,alias:[...p][0]}),e.declarations.set(c.text,s)}return}if(!["arrow_function","function_expression","generator_function"].includes(n.type))return;let r=n.childForFieldName("parameters")??n.childForFieldName("parameter");if(!r)return;let i=n.parent;for(;i&&i.type!=="call_expression";)i=i.parent;if(!i)return;let o=i.childForFieldName("function")??i.namedChild(0),m=/^([A-Za-z_$][\w$]*)\.Service\.use$/u.exec(o?.text??"");if(!m)return;let f=new Set;I(r,c=>{c.type==="identifier"&&f.add(c.text)}),f.size!==0&&e.callbacks.push({startLine:n.startPosition.row,endLine:n.endPosition.row,receivers:f,alias:m[1]})}),e}function me(t,e,n){if(!e||!/^[A-Za-z_$][\w$]*$/u.test(e))return new Set;let r=new Set((t.declarations.get(e)??[]).filter(i=>i.line<=n).map(i=>i.alias));for(let i of t.callbacks)i.startLine<=n&&i.endLine>=n&&i.receivers.has(e)&&r.add(i.alias);return r}function pe(t,e,n){let r=n.calleeQualifier;if(!r||!/^[A-Za-z_$][\w$]*$/u.test(r))return[];let i=w(t,e)?.rootNode;if(!i)return[];let o=ge(t,e,i,n.line,n.calleeLeaf,r),m=o?ye(o,r):null;if(!m)return[];if(!he(m))return[];let f=(C(t,e)??[]).filter(a=>a.startLine<=m.startPosition.row&&a.endLine>=m.endPosition.row).sort((a,d)=>a.endLine-a.startLine-(d.endLine-d.startLine))[0];if(!f)return[];let c=A(t,e).filter(a=>a.isFunctionLike&&a.leaf===f.name);if(c.length!==1)return[];let l=c[0],p=ee.get(t);p||(p=new Map,ee.set(t,p));let s=`${l.symbol}\0${n.calleeLeaf}`,u=p.get(s);if(!u){let a=[];for(let d of z(t,l)){let h=w(t,d.file)?.rootNode;if(!h)continue;let L=h.descendantsOfType("call_expression").filter(y=>y.startPosition.row>d.line||y.endPosition.row<d.line?!1:(y.childForFieldName("function")??y.namedChild(0))?.text.replace(/\s+/gu,"").replace(/<[^<>]*>$/u,"").match(/[A-Za-z_$][\w$]*$/u)?.[0]===l.leaf);if(L.length!==1)continue;let S=L[0].childForFieldName("arguments")?.namedChildren.find(y=>T(y).type==="object");if(S)for(let y of T(S).namedChildren){if(y.type==="shorthand_property_identifier"&&y.text===n.calleeLeaf){a.push(...D(t,d.file,n.calleeLeaf,y,y));continue}if(y.type!=="pair")continue;let _=y.childForFieldName("key")??y.namedChild(0),$=y.childForFieldName("value")??y.namedChild(1);O(_?.text)!==n.calleeLeaf||!$||a.push(...D(t,d.file,n.calleeLeaf,$,y))}}u=a.filter((d,h,L)=>L.findIndex(b=>b.file===d.file&&b.startLine===d.startLine&&b.endLine===d.endLine&&b.name===d.name)===h),p.set(s,u)}return u.map(a=>({calleeLeaf:a.name,line:n.line,sourceFile:e,targetFile:a.file,targetStartLine:a.startLine,targetEndLine:a.endLine,resolutionAlternativeCount:u.length,resolution:"factory-callback-member",strength:u.length===1?"exact":"candidate"}))}function ge(t,e,n,r,i,o){let m=J.get(t);m||(m=new Map,J.set(t,m));let f=m.get(e);if(!f){f=new Map;for(let c of n.descendantsOfType("call_expression")){let l=c.childForFieldName("function")??c.namedChild(0),p=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(l?.text.replace(/\s+/gu,"")??"");if(p)for(let s=c.startPosition.row;s<=c.endPosition.row;s+=1){let u=`${s}\0${p[1]}\0${p[2]}`,a=f.get(u);(!a||c.endIndex-c.startIndex<a.endIndex-a.startIndex)&&f.set(u,c)}}m.set(e,f)}return f.get(`${r}\0${o}\0${i}`)??null}function he(t){return t.descendantsOfType("return_statement").some(e=>{let n=e.childForFieldName("argument")??e.namedChild(0);return!!(n&&T(n).type==="object")})}function ye(t,e){let n=t.parent;for(;n;){if(/(?:function|method|lambda)/u.test(n.type)||n.type==="arrow_function"){let r=n.childForFieldName("parameters")??n.childForFieldName("parameter"),i=!1;if(r&&I(r,o=>{o.type==="identifier"&&o.text===e&&(i=!0)}),i)return n}n=n.parent}return null}function D(t,e,n,r,i){if(r.type==="identifier")return(C(t,e)??[]).filter(c=>c.name===r.text).map(c=>({...c,file:e}));let o=j(t,e,r.text);if(o.length>0)return o;if(!Z(r))return[];let f=(C(t,e)??[]).filter(c=>c.startLine>=i.startPosition.row&&c.endLine<=i.endPosition.row&&(c.name===n||c.name.startsWith("source@"))).sort((c,l)=>c.endLine-c.startLine-(l.endLine-l.startLine))[0];return[f?{...f,file:e}:{name:n,file:e,startLine:i.startPosition.row,endLine:i.endPosition.row}]}function Le(t,e,n){let r=te.get(t);r||(r=new Map,te.set(t,r));let i=`${e}\0${n}`,o=r.get(i);if(o)return o;let m=xe(t,e).flatMap(f=>be(t,f,e,n));return r.set(i,m),m}function be(t,e,n,r){let i=w(t,e)?.rootNode,o=C(t,e)??[];if(!i)return[];let m=Ne(t,e,n);if(m.size===0)return[];let f=new Set,c=[],l=[],p=[];return I(i,u=>{if(Se(u,m)){if(u.type==="pair"){let a=u.childForFieldName("key")??u.namedChild(0),d=u.childForFieldName("value")??u.namedChild(1);if(O(a?.text)!==r||!d)return;if(d.type==="identifier")f.add(d.text);else if(Z(d))c.push({name:r,startLine:u.startPosition.row,endLine:u.endPosition.row});else{let h=Ce(t,e,d.text),L=j(t,e,d.text);if(h.length>0)p.push(...h);else if(L.length>0)p.push(...L);else{let b=ve(u);b&&l.push(b)}}return}u.type==="shorthand_property_identifier"&&u.text===r&&f.add(r)}}),[...o.filter(u=>f.has(u.name)).map(u=>({...u,file:e})),...c.map(u=>({...u,file:e})),...l.map(u=>({...u,file:e})),...p].filter((u,a,d)=>d.findIndex(h=>h.file===u.file&&h.name===u.name&&h.startLine===u.startLine&&h.endLine===u.endLine)===a)}function Se(t,e){let n=t,r=null;for(;n;){if(n.type==="object"&&(r=n),n.type==="call_expression"){if(!r)return!1;let i=n.childForFieldName("function")??n.namedChild(0);return i?e.has(i.text.replace(/\.of$/u,""))&&i.text.endsWith(".of"):!1}n=n.parent}return!1}function xe(t,e){let n=Y.get(t);n||(n=new Map,Y.set(t,n));let r=n.get(e);if(r)return r;let i=new Set([e]),o=A(t,e).filter(f=>f.leaf==="Service"&&f.isTypeLike);for(let f of o)for(let c of z(t,f))i.add(c.file);let m=[...i].sort();return n.set(e,m),m}function Ne(t,e,n){let r=new Set;M(e,n)&&r.add("Service");for(let i of P(t,e)){if(!i.sourcePath||!M(i.sourcePath,n))continue;if(i.kind==="namespace"&&i.localName){r.add(`${i.localName}.Service`);continue}(i.importedName==="default"?i.localName:i.importedName)==="Service"?r.add(i.localName??i.importedName):i.localName&&i.importedName!=="default"&&r.add(`${i.localName}.Service`)}return r}function j(t,e,n){let r=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(n.replace(/\s+/gu,""));if(!r)return[];let i=w(t,e)?.rootNode;if(!i)return[];let o=re(i,r[1]),m=o?ie(o):null;if(!m)return[];let f=m.childForFieldName("function")??m.namedChild(0),c=f?ae(t,e,f.text):[];if(c.length!==1)return[];let l=c[0],p=w(t,l.relativePath)?.rootNode;if(!p)return[];let s=se(p,l.startLine,l.endLine);if(!s)return[];let u=[];for(let a of s.descendantsOfType("return_statement")){let d=a.childForFieldName("argument")??a.namedChild(0);if(!d)continue;let h=T(d);if(h.type==="object")for(let L of h.namedChildren){if(L.type==="shorthand_property_identifier"&&L.text===r[2]){for(let y of C(t,l.relativePath)??[])y.name===r[2]&&u.push({...y,file:l.relativePath});continue}if(L.type!=="pair")continue;let b=L.childForFieldName("key")??L.namedChild(0),S=L.childForFieldName("value")??L.namedChild(1);if(!(O(b?.text)!==r[2]||!S))if(S.type==="identifier")for(let y of C(t,l.relativePath)??[])y.name===S.text&&u.push({...y,file:l.relativePath});else Z(S)&&u.push({name:r[2],startLine:L.startPosition.row,endLine:L.endPosition.row,file:l.relativePath})}}return u.filter((a,d,h)=>h.findIndex(L=>L.file===a.file&&L.name===a.name&&L.startLine===a.startLine&&L.endLine===a.endLine)===d)}function Ce(t,e,n){let r=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(n.replace(/\s+/gu,""));if(!r)return[];let i=w(t,e)?.rootNode;if(!i)return[];let o=re(i,r[1]),m=o?ie(o):null,f=m?.childForFieldName("function")??m?.namedChild(0),c=f?ae(t,e,f.text):[];if(c.length!==1||!m)return[];let l=c[0],p=w(t,l.relativePath)?.rootNode;if(!p)return[];let s=se(p,l.startLine,l.endLine);if(!s)return[];let u=new Set,a=s.childForFieldName("parameters")??s.childForFieldName("parameter");if(a&&I(a,g=>{g.type==="identifier"&&u.add(g.text)}),u.size===0)return[];let d=j(t,e,n);if(d.length===0)return[];let h=(C(t,l.relativePath)??[]).filter(g=>g.startLine>=l.startLine&&g.endLine<=l.endLine),L=(E(t,l.relativePath)??[]).filter(g=>g.line>=l.startLine&&g.line<=l.endLine),b=new Set,S=d.map(g=>({name:g.name,startLine:g.startLine,endLine:g.endLine})),y=new Set;for(;S.length>0&&y.size<32;){let g=S.shift(),v=`${g.name}\0${g.startLine}\0${g.endLine}`;if(!y.has(v)){y.add(v);for(let x of L.filter(N=>N.line>=g.startLine&&N.line<=g.endLine)){if(x.memberAccess&&x.calleeQualifier&&u.has(x.calleeQualifier)){b.add(x.calleeLeaf);continue}if(x.memberAccess)continue;let N=h.filter(ue=>ue.name===x.calleeLeaf);N.length===1&&S.push(N[0])}}}if(b.size===0)return[];let $=m.childForFieldName("arguments")?.namedChildren.find(g=>T(g).type==="object");if(!$)return[];let F=[];for(let g of T($).namedChildren){if(g.type==="shorthand_property_identifier"&&b.has(g.text)){F.push(...D(t,e,g.text,g,g));continue}if(g.type!=="pair")continue;let v=g.childForFieldName("key")??g.namedChild(0),x=g.childForFieldName("value")??g.namedChild(1),N=O(v?.text);!N||!b.has(N)||!x||F.push(...D(t,e,N,x,g))}return F.filter((g,v,x)=>x.findIndex(N=>N.file===g.file&&N.name===g.name&&N.startLine===g.startLine&&N.endLine===g.endLine)===v)}function re(t,e){for(let n of t.descendantsOfType("variable_declarator"))if((n.childForFieldName("name")??n.namedChild(0))?.text===e)return n.childForFieldName("value")??n.namedChild(1);return null}function ie(t){return t.type==="call_expression"?t:t.descendantsOfType("call_expression")[0]??null}function ae(t,e,n){let r=n.replace(/\s+/gu,"").replace(/<[^<>]*>$/u,""),i=/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)$/u.exec(r);if(i){let s=P(t,e).filter(d=>d.localName===i[1]&&d.sourcePath);if(s.length!==1||!s[0].sourcePath)return[];let u=s[0].sourcePath,a=R(t,u,i[2]).filter(d=>d.isFunctionLike);return a.length>0?a:(C(t,u)??[]).filter(d=>d.name===i[2]).map(d=>({...d,relativePath:u}))}if(!/^[A-Za-z_$][\w$]*$/u.test(r))return[];let o=A(t,e).filter(s=>s.leaf===r&&s.isFunctionLike);if(o.length>0)return o;let m=(C(t,e)??[]).filter(s=>s.name===r).map(s=>({...s,relativePath:e}));if(m.length>0)return m;let f=P(t,e).filter(s=>s.localName===r&&s.sourcePath&&s.kind!=="namespace");if(f.length!==1||!f[0].sourcePath)return[];let c=f[0].sourcePath,l=f[0].importedName==="default"?r:f[0].importedName,p=R(t,c,l).filter(s=>s.isFunctionLike);return p.length>0?p:(C(t,c)??[]).filter(s=>s.name===l).map(s=>({...s,relativePath:c}))}function se(t,e,n){let r=null;return I(t,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>e||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function Z(t){return["arrow_function","function_expression","generator_function"].includes(t.type)||t.descendantsOfType(["arrow_function","function_expression","generator_function"]).length>0}function ve(t){let e=t.parent;for(;e;){if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0);if(n?.type==="identifier")return{name:n.text,startLine:e.startPosition.row,endLine:e.endPosition.row}}e=e.parent}return null}function O(t){return t?t.replace(/^(?:['"])(.*)(?:['"])$/u,"$1"):null}function we(t,e,n,r){let i=/^this\.([A-Za-z_$][\w$]*)$/u.exec(n.calleeQualifier??"");if(!i)return null;let o=w(t,e)?.rootNode;if(!o)return null;let m=Ie(o,n.line);if(!m)return null;let f=new Set;if(I(m,h=>{if(h.type!=="assignment_expression")return;let L=h.childForFieldName("left")??h.namedChild(0),b=h.childForFieldName("right")??h.namedChild(h.namedChildCount-1);if(L?.text.replace(/\s+/gu,"")!==`this.${i[1]}`||!b)return;let S=T(b);if(S.type!=="new_expression")return;let _=(S.childForFieldName("constructor")??S.namedChild(0))?.text.match(/[A-Za-z_$][\w$]*$/u)?.[0];_&&f.add(_)}),f.size!==1)return null;let c=[...f][0],l=r.filter(h=>h.localName===c);if(l.length!==1)return null;let p=l[0].importedName==="default"?c:l[0].importedName,s=l[0].importedName==="default"?R(t,l[0].sourcePath,c):[],u=s.length===1?s[0].leaf:p,a=A(t,l[0].sourcePath).filter(h=>h.isFunctionLike&&h.leaf===n.calleeLeaf&&V(h.symbol)===u);if(a.length!==1)return null;let d=a[0];return{calleeLeaf:n.calleeLeaf,line:n.line,sourceFile:e,targetFile:d.relativePath,targetStartLine:d.startLine,targetEndLine:d.endLine,targetSymbol:d.symbol,resolution:"constructed-member-receiver",strength:"exact"}}function Ie(t,e){let n=[];return I(t,r=>{["class","class_declaration","class_definition"].includes(r.type)&&r.startPosition.row<=e&&r.endPosition.row>=e&&n.push(r)}),n.sort((r,i)=>r.endPosition.row-r.startPosition.row-(i.endPosition.row-i.startPosition.row))[0]??null}function T(t){let e=t;for(;["parenthesized_expression","as_expression","type_assertion","satisfies_expression"].includes(e.type)&&e.namedChildCount===1;)e=e.namedChild(0);return e}function I(t,e){e(t);for(let n of t.namedChildren)I(n,e)}function $e(t){let e=new Map,n=/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*([A-Za-z_$][\w$]*)\s*;/gu;for(let r of t.matchAll(n)){let i=r[1],o=r[2];i&&o&&e.set(i,o)}return e}function B(t){let e=[];for(let n of t)e.some(r=>M(r,n))||e.push(n);return e}var oe=new WeakMap;function Ke(t,e,n,r){let i=k(t,e),o=(i?.callSites??[]).filter(a=>a.line>=n&&a.line<=r);if(!i||o.length===0)return{available:!!i,targets:[],resolvedCallsites:0,unresolvedCallsites:0};let m=Q(t,e);if(!m)return{available:!1,targets:[],resolvedCallsites:0,unresolvedCallsites:o.length};let f=m.filter(a=>a.sourceLine>=n&&a.sourceLine<=r).map(a=>({...a,calleeLeaf:a.definition.leaf})),c=le(o.map(a=>({line:a.line,leaf:a.calleeLeaf}))),l=le(f.map(a=>({line:a.sourceLine,leaf:a.calleeLeaf}))),p=new Set([...c].flatMap(([a,d])=>l.get(a)===d?[a]:[])),s=f.filter(a=>p.has(ce(a.sourceLine,a.calleeLeaf))),u=[...p].reduce((a,d)=>a+(c.get(d)??0),0);return{available:!0,targets:s,resolvedCallsites:u,unresolvedCallsites:Math.max(0,o.length-u)}}function Xe(t,e,n,r){let i=Q(t,e);return i?{available:!0,targets:i.filter(o=>o.sourceLine>=n&&o.sourceLine<=r)}:{available:!1,targets:[]}}function Ue(t,e,n,r){let i=Q(t,e);return i?{available:!0,targets:i.filter(o=>o.sourceLine>=n&&o.sourceLine<=r&&Te(t,o.definition)).map(o=>({...o,calleeLeaf:o.definition.leaf}))}:{available:!1,targets:[]}}function Q(t,e){let n=_e(t);return n.byFile.has(e)||n.byFile.set(e,Fe(t,n,e)),n.byFile.get(e)??null}function _e(t){let e=oe.get(t);if(!e){let n=q(t);e={definitionBySymbol:new Map(n.map(r=>[r.symbol,r])),byFile:new Map},oe.set(t,e)}return e}function Fe(t,e,n){if(t.isIgnored(n))return[];let r=U(t,n);if(!r)return null;let i=[];for(let o of r){if((o.roles&1)!==0)continue;let m=e.definitionBySymbol.get(o.symbol);m&&i.push({sourceLine:o.range[0],definition:m})}return i}function Te(t,e){if(!e.isFunctionLike)return!1;let n=k(t,e.relativePath);return!n||n.callables.some(r=>r.name===e.leaf&&r.startLine===e.startLine&&r.endLine===e.endLine)?!0:Pe(e)}function Pe(t){let e=t.documentation;if(!e)return!1;let n=t.leaf.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");return new RegExp(`\\bfunction\\s+${n}\\s*(?:<[^>]*>)?\\s*\\(`,"u").test(e)||new RegExp(`\\b(?:const|let|var)\\s+${n}\\s*:\\s*(?:<[^>]*>\\s*)?\\([^\\n]*\\)\\s*=>`,"u").test(e)}function le(t){let e=new Map;for(let n of t){let r=ce(n.line,n.leaf);e.set(r,(e.get(r)??0)+1)}return e}function ce(t,e){return`${t}\0${e}`}export{Ze as a,Be as b,Ke as c,Xe as d,Ue as e,Te as f};
2
+ //# sourceMappingURL=chunk-ILGTMRMZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-35NLDRZC.js";import{c as p}from"./chunk-JN5LIBT3.js";import{a as u}from"./chunk-ZOEDRCR4.js";import{a as f}from"./chunk-B2E3HZ2A.js";function $(n,e={}){return C(n,e).cycles}function C(n,e={}){return b(n,e)}function w(n,e={}){return b(n,e).cycles}function b(n,e={}){let{scope:t,maxDepth:o=10,edgeBasis:r="symbol-references"}=e,s=f(n,t,r==="imports"?{scipEdges:"imports-only",sourceEdges:"imports-only"}:void 0),{components:a}=g(s),l=a.filter(i=>D(s,i)).map(i=>{let c=[...i].sort(),d=S(s,c),y=x(d);return{path:d,component:c,edgeBasis:r,witness:!0,classification:y==="real"?"dependency-cycle":"module-structure-candidate",kind:y}});return l.sort((i,c)=>i.kind!==c.kind?i.kind==="real"?-1:1:i.path.length-c.path.length),{cycles:l,truncated:!1,edgeBasis:r,maxDepth:o}}function D(n,e){if(e.length>1)return!0;let t=e[0];return t!==void 0&&n.get(t)?.has(t)===!0}function S(n,e){let t=e[0];if(!t)return[];let o=new Set(e);for(let r of[...n.get(t)??[]].filter(s=>o.has(s)).sort()){if(r===t)return[t,t];let s=B(n,r,t,o);if(s)return[t,...s]}throw new Error(`Cyclic component did not contain a witness path from ${t}.`)}function B(n,e,t,o){let r=[e],s=new Map([[e,null]]);for(let a=0;a<r.length;a+=1){let l=r[a];if(l===t){let i=[];for(let c=l;c!==null;c=s.get(c)??null)i.push(c);return i.reverse()}for(let i of[...n.get(l)??[]].filter(c=>o.has(c)).sort())s.has(i)||(s.set(i,l),r.push(i))}return null}function x(n){for(let o of n){let r=u(o);if(r==="test"||r==="barrel"||r==="entry")return"module-hierarchy"}if(n.length!==3)return"real";let[e,t]=n;return!e||!t?"real":p(e)||p(t)||m(e,t)||m(t,e)||h(e,t)||h(t,e)||u(e)==="entry"||u(t)==="entry"?"module-hierarchy":"real"}function m(n,e){if(!/\.rs$/.test(n)||!/\.rs$/.test(e))return!1;let t=e.replace(/\.rs$/,"/");return n.startsWith(t)?!n.slice(t.length).includes("/"):!1}function h(n,e){if(!/\.rs$/.test(n)||!/\.rs$/.test(e))return!1;let t=n.replace(/\.rs$/,""),o=e.replace(/\.rs$/,"");if(t===o+"_tests"||t===o+"/tests")return!0;let r=n.split("/"),s=e.split("/");if(r.length===s.length&&r.includes("tests")&&s.includes("src")){let a=r[r.length-1],l=s[s.length-1];if(a&&a===l)return!0}return!1}export{$ as a,C as b,w as c,b as d};
2
- //# sourceMappingURL=chunk-XNUWRTYM.js.map
1
+ import{a as g}from"./chunk-35NLDRZC.js";import{c as p}from"./chunk-NDKOVQFG.js";import{a as u}from"./chunk-BRQL7AFJ.js";import{a as f}from"./chunk-GV2CEZCW.js";function $(n,e={}){return C(n,e).cycles}function C(n,e={}){return b(n,e)}function w(n,e={}){return b(n,e).cycles}function b(n,e={}){let{scope:t,maxDepth:o=10,edgeBasis:r="symbol-references"}=e,s=f(n,t,r==="imports"?{scipEdges:"imports-only",sourceEdges:"imports-only"}:void 0),{components:a}=g(s),l=a.filter(i=>D(s,i)).map(i=>{let c=[...i].sort(),d=S(s,c),y=x(d);return{path:d,component:c,edgeBasis:r,witness:!0,classification:y==="real"?"dependency-cycle":"module-structure-candidate",kind:y}});return l.sort((i,c)=>i.kind!==c.kind?i.kind==="real"?-1:1:i.path.length-c.path.length),{cycles:l,truncated:!1,edgeBasis:r,maxDepth:o}}function D(n,e){if(e.length>1)return!0;let t=e[0];return t!==void 0&&n.get(t)?.has(t)===!0}function S(n,e){let t=e[0];if(!t)return[];let o=new Set(e);for(let r of[...n.get(t)??[]].filter(s=>o.has(s)).sort()){if(r===t)return[t,t];let s=B(n,r,t,o);if(s)return[t,...s]}throw new Error(`Cyclic component did not contain a witness path from ${t}.`)}function B(n,e,t,o){let r=[e],s=new Map([[e,null]]);for(let a=0;a<r.length;a+=1){let l=r[a];if(l===t){let i=[];for(let c=l;c!==null;c=s.get(c)??null)i.push(c);return i.reverse()}for(let i of[...n.get(l)??[]].filter(c=>o.has(c)).sort())s.has(i)||(s.set(i,l),r.push(i))}return null}function x(n){for(let o of n){let r=u(o);if(r==="test"||r==="barrel"||r==="entry")return"module-hierarchy"}if(n.length!==3)return"real";let[e,t]=n;return!e||!t?"real":p(e)||p(t)||m(e,t)||m(t,e)||h(e,t)||h(t,e)||u(e)==="entry"||u(t)==="entry"?"module-hierarchy":"real"}function m(n,e){if(!/\.rs$/.test(n)||!/\.rs$/.test(e))return!1;let t=e.replace(/\.rs$/,"/");return n.startsWith(t)?!n.slice(t.length).includes("/"):!1}function h(n,e){if(!/\.rs$/.test(n)||!/\.rs$/.test(e))return!1;let t=n.replace(/\.rs$/,""),o=e.replace(/\.rs$/,"");if(t===o+"_tests"||t===o+"/tests")return!0;let r=n.split("/"),s=e.split("/");if(r.length===s.length&&r.includes("tests")&&s.includes("src")){let a=r[r.length-1],l=s[s.length-1];if(a&&a===l)return!0}return!1}export{$ as a,C as b,w as c,b as d};
2
+ //# sourceMappingURL=chunk-IZDPGOZR.js.map
@@ -1,4 +1,4 @@
1
- import{d as O}from"./chunk-ELNRLMC5.js";import{d as S}from"./chunk-3XFJUWJE.js";import{A as T,c as A,e as b,t as F}from"./chunk-AM5SUGHF.js";import{a as D,b as P,f as h,p as I}from"./chunk-JOALNFY3.js";import{K as _,z as k}from"./chunk-RVYLJDXC.js";import{g,h as w,w as m}from"./chunk-PLZXWZHY.js";import{b as C,d as p}from"./chunk-327YK6TB.js";function L(e,n,t,r={}){if(!t)return[];let i=m(e,n);return i?i.indexOf(t)===-1?[]:(x(e,n).get(t)??[]).filter(s=>!Y(s,r)):[]}function Y(e,n){return typeof n.excludeStartLine=="number"&&typeof n.excludeEndLine=="number"&&e>=n.excludeStartLine&&e<=n.excludeEndLine}var W=g("file-identifiers",{clearGroups:["whole-project","source-file"]});function $(e,n){let t=h(e,n);return t?t.fileIdentifiers:W.get(e,n,()=>new Set(x(e,n).keys()))}var V=g("file-ident-lines",{clearGroups:["whole-project","source-file"]});function x(e,n){let t=h(e,n);return t?t.identifierLineMap:V.get(e,n,()=>q(e,n))}var X=g("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function he(e,n){let t=h(e,n);return t?t.identifiersByLine:X.get(e,n,()=>{let r=x(e,n),i=0;for(let s of r.values()){let a=s[s.length-1];a!==void 0&&a>i&&(i=a)}let o=new Array(i+1);for(let s=0;s<=i;s+=1)o[s]=new Set;for(let[s,a]of r)for(let c of a)o[c].add(s);return o})}function q(e,n){let t=new Map,r=(a,c)=>{let l=t.get(a);if(!l){t.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)},i=m(e,n);if(!i)return t;let o=P(i).split(/\r?\n/),s=/\b([A-Za-z_$][\w$]*)\b/g;for(let a=0;a<o.length;a+=1){let c=o[a]??"";for(let l of c.matchAll(s))l[1]&&r(l[1],a)}return t}function Ne(e,n){let t=z(e);return t?n.filter(r=>z(r.file)===t):n}function Me(e,n,t,r,i){let o=t.find(s=>s.file===n);if(o)return o;if(r){let s=i?.match(/^[A-Za-z_$][\w$]*/u)?.[0];if(!s)return null;let a=I(e,n),c=new Set(a.filter(f=>f.localName===s||f.importedName===s).map(f=>f.sourcePath).filter(f=>!!f));for(let f of t)for(let E of c)if(p(E,f.file))return f;let l=K(m(e,n)??"",s);if(l.size===0)return null;let u=new Set(a.filter(f=>l.has(f.localName??f.importedName)).map(f=>f.sourcePath).filter(f=>!!f)),d=t.filter(f=>l.has(A(f.symbol)??"")&&[...u].some(E=>p(E,f.file)));return d.length===1?d[0]:null}return t.length===1?t[0]:null}function K(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 z(e){let n=k(e);return n?n==="typescript"||n==="tsx"||n==="javascript"?"javascript-family":n:null}var Q=w("global-leaf-index",{clearGroups:["whole-project"]});function v(e){return Q.get(e,()=>{let n=e.all(`SELECT gs.id, gs.symbol,
1
+ import{d as O}from"./chunk-ELNRLMC5.js";import{d as S}from"./chunk-SGMNWYTH.js";import{A as T,c as A,e as b,t as F}from"./chunk-GVAF222T.js";import{a as D,b as P,f as h,p as I}from"./chunk-F74LZWCE.js";import{K as _,z as k}from"./chunk-ICUL7XRT.js";import{g,h as w,w as m}from"./chunk-7GAK2F3H.js";import{b as C,d as p}from"./chunk-UC2FD2PS.js";function L(e,n,t,r={}){if(!t)return[];let i=m(e,n);return i?i.indexOf(t)===-1?[]:(x(e,n).get(t)??[]).filter(s=>!Y(s,r)):[]}function Y(e,n){return typeof n.excludeStartLine=="number"&&typeof n.excludeEndLine=="number"&&e>=n.excludeStartLine&&e<=n.excludeEndLine}var W=g("file-identifiers",{clearGroups:["whole-project","source-file"]});function $(e,n){let t=h(e,n);return t?t.fileIdentifiers:W.get(e,n,()=>new Set(x(e,n).keys()))}var V=g("file-ident-lines",{clearGroups:["whole-project","source-file"]});function x(e,n){let t=h(e,n);return t?t.identifierLineMap:V.get(e,n,()=>q(e,n))}var X=g("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function he(e,n){let t=h(e,n);return t?t.identifiersByLine:X.get(e,n,()=>{let r=x(e,n),i=0;for(let s of r.values()){let a=s[s.length-1];a!==void 0&&a>i&&(i=a)}let o=new Array(i+1);for(let s=0;s<=i;s+=1)o[s]=new Set;for(let[s,a]of r)for(let c of a)o[c].add(s);return o})}function q(e,n){let t=new Map,r=(a,c)=>{let l=t.get(a);if(!l){t.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)},i=m(e,n);if(!i)return t;let o=P(i).split(/\r?\n/),s=/\b([A-Za-z_$][\w$]*)\b/g;for(let a=0;a<o.length;a+=1){let c=o[a]??"";for(let l of c.matchAll(s))l[1]&&r(l[1],a)}return t}function Ne(e,n){let t=z(e);return t?n.filter(r=>z(r.file)===t):n}function Me(e,n,t,r,i){let o=t.find(s=>s.file===n);if(o)return o;if(r){let s=i?.match(/^[A-Za-z_$][\w$]*/u)?.[0];if(!s)return null;let a=I(e,n),c=new Set(a.filter(f=>f.localName===s||f.importedName===s).map(f=>f.sourcePath).filter(f=>!!f));for(let f of t)for(let E of c)if(p(E,f.file))return f;let l=K(m(e,n)??"",s);if(l.size===0)return null;let u=new Set(a.filter(f=>l.has(f.localName??f.importedName)).map(f=>f.sourcePath).filter(f=>!!f)),d=t.filter(f=>l.has(A(f.symbol)??"")&&[...u].some(E=>p(E,f.file)));return d.length===1?d[0]:null}return t.length===1?t[0]:null}function K(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 z(e){let n=k(e);return n?n==="typescript"||n==="tsx"||n==="javascript"?"javascript-family":n:null}var Q=w("global-leaf-index",{clearGroups:["whole-project"]});function v(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{d as O}from"./chunk-ELNRLMC5.js";import{d as S}from"./chunk-3XFJUWJE.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})}var ee=g("source-import-paths-by-local-name",{clearGroups:["whole-project","source-file"]});function j(e,n){let t=C(n);return ee.get(e,t,()=>te(e,t))}function te(e,n){let t=new Map;for(let r of I(e,n)){if(!r.sourcePath)continue;let i=r.localName??r.importedName;if(i&&B(t,i,r.sourcePath),r.kind==="namespace")for(let o of r.usedMembers)B(t,o,r.sourcePath)}return t}function B(e,n,t){let r=e.get(n);r||(r=new Set,e.set(n,r)),r.add(t)}var G=/[A-Za-z_$][A-Za-z0-9_$]*/g,Z=/^[A-Za-z_$][A-Za-z0-9_$]*$/,ne=512;function N(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=re(n)?n:N(n);if(t.candidateNames.size===0||!t.hasUsableCandidate)return!0;if(t.candidateNames.size<=ne){for(let i of t.candidateNames)if(i){if(Z.test(i)){if(ie(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 re(e){return"candidateNames"in e}function ie(e){return new RegExp(`(?<![A-Za-z_$0-9])${D(e)}(?![A-Za-z_$0-9])`)}function M(e,n,t){let r=v(e).get(t);if(!r||r.length===0)return[];if(r.length===1)return[y(r[0])];let i=r.filter(c=>c.file===n);if(i.length>0)return i.map(y);let o=j(e,n),s=o.get(t);if(s)for(let c of s){let l=r.filter(u=>p(c,u.file));if(l.length>0)return l.map(y)}let a=new Set;for(let c of o.values())for(let l of c)a.add(l);for(let c of a){let l=r.filter(u=>p(c,u.file));if(l.length>0&&l.length===r.length)return l.map(y)}return[]}function Je(e,n,t){let r=M(e,n,t);if(r.length>0)return r;let i=v(e).get(t);return!i||i.length===0?[]:i.map(y)}function U(e,n,t={}){let r=oe(e,n);if(!r)return[];let i=S(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 a=new Map;for(let c of s){let l=a.get(c.file)??[];l.push(c.line),a.set(c.file,l)}return R(e,a)}}let o=new Map;for(let s of _(e)){let a=se(e,r,s);a.length>0&&o.set(s,a)}return R(e,o)}function oe(e,n){let t=S(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 se(e,n,t){let r=m(e,t);return!r||r.indexOf(n.identifier)===-1?[]:t!==n.relativePath&&!M(e,t,n.identifier).some(o=>o.symbolId===n.symbolId)?[]:L(e,t,n.identifier,t===n.relativePath?{excludeStartLine:n.startLine,excludeEndLine:n.endLine}:{})}function Ye(e,n,t={}){let r=new Map;for(let c of n){if(!c.leaf)continue;let l=r.get(c.leaf)??[];l.push(c),r.set(c.leaf,l)}if(r.size===0)return new Map;let i=new Set(n.map(c=>c.symbolId)),o=new Set(r.keys()),s=N(o),a=new Map;for(let c of _(e)){if(t.skipPath?.(c)||!H(m(e,c),s))continue;let l=$(e,c);if(l.size!==0){for(let u of l)if(r.has(u))for(let d of M(e,c,u)){if(!i.has(d.symbolId)||c===d.relativePath)continue;let f=a.get(d.symbolId);f||(f=new Set,a.set(d.symbolId,f)),f.add(c)}}}return a}function y(e){return{symbolId:e.symbolId,symbol:e.symbol,relativePath:e.file}}function R(e,n){let t=[],r=new Set;for(let[i,o]of n){let s=F(e,i);for(let a of o){let c=T(s,a),l=`${i}|${a}|${c?.symbol??""}`;r.has(l)||(r.add(l),t.push({file:i,line:a,enclosingSymbol:c?.symbol??null}))}}return t}function ae(e,n){return ce(e,[n]).get(n.symbolId)??[]}function ce(e,n){let t=n.map(o=>({symbolId:o.symbolId,prelude:pe(e,o)})).filter(o=>o.prelude!==null),r=ue(e,t.map(o=>o.symbolId)),i=new Map;for(let{symbolId:o,prelude:s}of t){let a=fe(e,r.get(o)??new Map,s.match,s.identifier);i.set(o,R(e,a))}return i}function et(e,n,t={}){return le(e,n,t).map(r=>({file:r.file,line:r.line,enclosingSymbol:r.enclosingSymbol}))}function le(e,n,t={}){let r=U(e,n,{semantic:t.semantic,semanticEvidence:t.semanticEvidence}),i=r.length>0?J(r,"source-attribution"):J(ae(e,n),"scip-reference-chunk");return t.includeIgnored===!0?i:i.filter(o=>!e.isIgnored(o.file))}function J(e,n){return e.map(t=>({...t,provenance:n}))}function fe(e,n,t,r){let i=new Map;for(let[o,s]of n)i.set(o,me(e,o,s,t,r));return i}function ue(e,n){let t=new Map;for(let r of O(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 me(e,n,t,r,i){let o=n===r.relativePath?{excludeStartLine:r.startLine,excludeEndLine:r.endLine}:{},s=i?L(e,n,i,o):[];return t.flatMap(a=>de(s,a))}function de(e,n){let t=e.filter(r=>r>=n.start_line&&r<=n.end_line);return t.length>0?t:[n.start_line]}function pe(e,n){let t=S(e,n);return t?{match:t,identifier:b(t.symbol)||null}:null}export{L as a,x as b,he as c,Ne as d,Me as e,v as f,N as g,H as h,j as i,M as j,Je as k,Ye as l,ae as m,ce as n,et as o,le as p};
16
- //# sourceMappingURL=chunk-BH5CE4LN.js.map
16
+ //# sourceMappingURL=chunk-J7AMBVWF.js.map
@@ -0,0 +1,2 @@
1
+ import{a as z}from"./chunk-P5XHIJHI.js";import{e as be,m as ge,u as he}from"./chunk-EQNMD62X.js";import{c as we,h as Ae}from"./chunk-LSZYMN2A.js";import{a as Ie,e as De,i as Me}from"./chunk-DRENNWRG.js";import{a as S,c as fe,d as M,e as p,f as X,h as Re,j,t as x,u as k,v as Ee,x as q,y as K,z as ke}from"./chunk-D7DOB27N.js";import{a as C,i as G,k as v}from"./chunk-R2NOK63J.js";import{a as A,c as me,d as ye,e as F}from"./chunk-6O3KXIDL.js";import{a as pe,b as E,g as w,ga as Se,m as J}from"./chunk-UQYQBLJX.js";import{createHash as cn}from"crypto";import{resolve as dn}from"path";var b=3;function V(e){return cn("sha256").update(x({kind:"codebaseiq-durable-rust-mailbox",protocolVersion:b,sessionDir:dn(e)})).digest("hex")}function pn(e,n){if(!S(e)||typeof e.id!="string"||!e.id)return T("Durable Rust semantic helper received an invalid mailbox request.");if(e.id!==n.claimRequestId)return T("Durable Rust semantic request identity does not match its mailbox path.");if(e.protocolVersion===void 0){if(e.mailboxVersion!==void 0||e.operationKey!==void 0||e.clientId!==void 0||e.enqueuedAtMs!==void 0||e.deadlineAtMs!==void 0||e.sessionIdentity!==void 0)return T("Durable Rust semantic helper received a partially versioned request without a protocol version.");let s=xe(e.request);if(!s)return T("Durable Rust semantic helper received an invalid legacy request kind or payload.");let i=n.nowMs+Math.max(1,s.timeoutMs);return{ok:!0,compatibility:"legacy-v2",value:{mailboxVersion:k,protocolVersion:b,id:e.id,operationKey:q("rust-semantic-v2",{id:e.id,request:s}),clientId:"legacy-v2",enqueuedAtMs:n.nowMs,deadlineAtMs:i,sessionIdentity:n.sessionIdentity,request:s}}}let t=fn(e,n);if(!t.ok)return t;if(e.protocolVersion!==b)return{ok:!1,code:"unsupported-protocol",error:`Durable Rust semantic helper does not support mailbox protocol ${String(e.protocolVersion)}.`,responseIdentity:t.responseIdentity};let r=xe(e.request);return r?t.operationKey!==q("rust-semantic-v3",r)?{ok:!1,code:"malformed-request",error:"Durable Rust semantic helper received a mismatched mailbox operation identity.",responseIdentity:t.responseIdentity}:t.deadlineAtMs-t.enqueuedAtMs!==r.timeoutMs?{ok:!1,code:"malformed-request",error:"Durable Rust semantic helper received a deadline that does not match the request timeout.",responseIdentity:t.responseIdentity}:t.deadlineAtMs<n.nowMs?{ok:!1,code:"expired-request",error:"Durable Rust semantic request expired before processing.",responseIdentity:t.responseIdentity}:{ok:!0,compatibility:t.priorSessionIdentity?"prior-v3":"current-v3",value:{mailboxVersion:k,protocolVersion:b,id:e.id,operationKey:t.operationKey,clientId:t.clientId,enqueuedAtMs:t.enqueuedAtMs,deadlineAtMs:t.deadlineAtMs,sessionIdentity:n.sessionIdentity,request:r}}:{ok:!1,code:"malformed-request",error:"Durable Rust semantic helper received an invalid request kind or payload.",responseIdentity:t.responseIdentity}}function te(e,n){return S(e)?e.protocolVersion!==b?Ce(e.protocolVersion===void 0?"helper wrote a prior uncorrelated response protocol":`helper wrote unsupported response protocol ${String(e.protocolVersion)}`):e.mailboxVersion!==k||e.id!==n.requestId||e.operationKey!==n.operationKey||e.sessionIdentity!==n.sessionIdentity||e.deadlineAtMs!==n.deadlineAtMs?Ce("helper wrote an incompatible response identity"):typeof e.completedAtMs!="number"||!Number.isFinite(e.completedAtMs)||e.completedAtMs>n.deadlineAtMs||n.nowMs>n.deadlineAtMs?{ok:!1,code:"expired-request",error:"helper response arrived after the durable request deadline"}:e.ok===!1?typeof e.error!="string"||!In(e.errorCode)?ee("helper wrote an invalid rejection response"):{ok:!1,code:e.errorCode,error:e.error}:e.ok!==!0||e.session!=="created"&&e.session!=="reused"&&e.session!=="invalidated"||!Sn(e.response,n.requestKind)?ee("helper wrote an invalid success response"):{ok:!0,session:e.session,response:e.response}:ee("helper wrote an invalid response object")}function fn(e,n){if(e.mailboxVersion!==k||typeof e.protocolVersion!="number"||!Number.isInteger(e.protocolVersion)||typeof e.operationKey!="string"||!ve(e.operationKey)||e.id!==K(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||e.deadlineAtMs<e.enqueuedAtMs||e.sessionIdentity!==void 0&&(typeof e.sessionIdentity!="string"||!ve(e.sessionIdentity))||e.sessionIdentity===void 0&&e.protocolVersion!==b)return T("Durable Rust semantic helper received an invalid mailbox lifecycle.");let t={id:n.claimRequestId,sessionIdentity:n.sessionIdentity,deadlineAtMs:e.deadlineAtMs};return e.sessionIdentity!==void 0&&e.sessionIdentity!==n.sessionIdentity?{ok:!1,code:"malformed-request",error:"Durable Rust semantic request belongs to a different mailbox session.",responseIdentity:t}:{ok:!0,responseIdentity:t,operationKey:e.operationKey,clientId:e.clientId,enqueuedAtMs:e.enqueuedAtMs,deadlineAtMs:e.deadlineAtMs,priorSessionIdentity:e.sessionIdentity===void 0}}function xe(e){return!S(e)||typeof e.identityKey!="string"||!e.identityKey||!X(e.timeoutMs)||e.workerEnvironment!==void 0&&!fe(e.workerEnvironment)?null:e.kind==="semantic"&&Rn(e.request)?{kind:"semantic",identityKey:e.identityKey,...e.workerEnvironment===void 0?{}:{workerEnvironment:e.workerEnvironment},request:e.request,timeoutMs:e.timeoutMs}:e.kind==="import-definitions"&&mn(e.request)?{kind:"import-definitions",identityKey:e.identityKey,...e.workerEnvironment===void 0?{}:{workerEnvironment:e.workerEnvironment},request:e.request,timeoutMs:e.timeoutMs}:null}function Rn(e){return!S(e)||!M(e.projectRoot)||!M(e.rustAnalyzerBinary)||!Te(e.definitions)?!1:Z(e.referenceDefinitions)&&Z(e.calleeDefinitions)&&Z(e.signatureDefinitions)&&I(e.requestTimeoutMs)&&I(e.readinessDeadlineMs)&&I(e.referenceRetryTimeoutMs)&&I(e.diagnosticsTimeoutMs)&&I(e.settleDelayMs)&&Pe(e.concurrency)&&ne(e.includeReferences)&&ne(e.includeCallees)&&ne(e.includeSignatures)}function mn(e){return!S(e)||!M(e.projectRoot)||!M(e.rustAnalyzerBinary)||!M(e.file)||!Array.isArray(e.positions)||!e.positions.every(n=>S(n)&&M(n.id)&&M(n.file)&&p(n.line)&&p(n.column))?!1:I(e.requestTimeoutMs)&&I(e.readinessDeadlineMs)&&I(e.diagnosticsTimeoutMs)&&I(e.settleDelayMs)&&Pe(e.concurrency)}function Te(e){return Array.isArray(e)&&e.every(yn)}function Z(e){return e===void 0||Te(e)}function yn(e){return S(e)&&p(e.symbolId)&&p(e.documentId)&&p(e.startLine)&&qe(e.startChar)&&p(e.endLine)&&qe(e.endChar)&&typeof e.symbol=="string"&&typeof e.relativePath=="string"&&typeof e.leaf=="string"&&(e.parentTypeName===null||typeof e.parentTypeName=="string")&&typeof e.isFunctionLike=="boolean"&&typeof e.isTypeLike=="boolean"&&(e.kind===null||Number.isSafeInteger(e.kind))&&(e.documentation===null||typeof e.documentation=="string")&&(e.enclosingSymbol===null||typeof e.enclosingSymbol=="string")}function Sn(e,n){return!S(e)||typeof e.available!="boolean"||e.available===!1&&(typeof e.reason!="string"||e.reason.length===0)||e.available===!0&&e.reason!==void 0?!1:n==="import-definitions"?Array.isArray(e.sourcePaths)&&e.sourcePaths.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&(t[1]===null||typeof t[1]=="string")):_e(e.references,bn)&&(e.incompleteReferenceSymbolIds===void 0||Array.isArray(e.incompleteReferenceSymbolIds)&&e.incompleteReferenceSymbolIds.every(t=>Number.isSafeInteger(t)))&&(e.callees===void 0||_e(e.callees,gn))&&(e.signatures===void 0||Array.isArray(e.signatures)&&e.signatures.every(t=>Array.isArray(t)&&t.length===2&&Number.isSafeInteger(t[0])&&(t[1]===null||typeof t[1]=="string")))}function _e(e,n){return Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.length===2&&Number.isSafeInteger(t[0])&&Array.isArray(t[1])&&t[1].every(n))}function bn(e){return S(e)&&typeof e.file=="string"&&p(e.line)&&p(e.column)}function gn(e){return S(e)&&typeof e.symbol=="string"&&typeof e.file=="string"&&p(e.line)&&(e.callsiteLine===void 0||p(e.callsiteLine))}function In(e){return e==="unsupported-protocol"||e==="malformed-request"||e==="expired-request"||e==="handler-error"}function T(e){return{ok:!1,code:"malformed-request",error:e}}function ee(e){return{ok:!1,code:"malformed-response",error:e}}function Ce(e){return{ok:!1,code:"incompatible-response",error:e}}function ve(e){return/^[a-f0-9]{64}$/.test(e)}function Pe(e){return e===void 0||X(e)}function qe(e){return e===void 0||p(e)}function I(e){return e===void 0||Re(e)}function ne(e){return e===void 0||typeof e=="boolean"}import{spawn as xn}from"child_process";import{createHash as _n,randomUUID as Cn}from"crypto";import{existsSync as $e,realpathSync as vn,rmSync as qn}from"fs";import{tmpdir as Tn}from"os";import{resolve as _}from"path";import{execFileSync as hn}from"child_process";var Be=new WeakMap,Dn="SCIP_RUST_SCIP_OCCURRENCE_REFERENCE_MODE";function yt(e,n){let t=new Map,r=H(),s=n.filter(u=>Oe(u,r));if(s.length===0)return t;let i=Ne(e,s.map(u=>u.symbol));for(let u of s){let l=i.get(u.symbol);l&&t.set(u.symbolId,l)}return t}function St(e,n){return Oe(n,H())?Ne(e,[n.symbol]).get(n.symbol)??null:null}function Oe(e,n="safe"){if(!e.symbol.startsWith("rust-analyzer ")||!e.relativePath.endsWith(".rs")||Me(e.symbol)||/impl#\[[^\]]+\]\[Default\]default\(\)\.$/.test(e.symbol))return!1;if(n==="all")return!0;let t=De(e.symbol);if(t==="method")return!0;if(t!=="term")return!1;let r=Ie(e.symbol);return"kind"in r?!1:!Mn(r)}function Mn(e){for(let n=0;n<e.descriptors.length-1;n+=1)if(e.descriptors[n]?.suffix==="type")return!0;return!1}function Ne(e,n){let t=Be.get(e);t||(t=new Map,Be.set(e,t));let r=[...new Set(n)].filter(s=>!t.has(s));if(r.length>0){let s=he(e,r);for(let i of r){let u=s?.get(i);t.set(i,u?Ae(u.filter(({relativePath:l})=>!e.isIgnored(l)).map(({relativePath:l,occurrence:d})=>({file:l,line:d.range[0],column:d.range[1]}))):null)}}return new Map(n.map(s=>[s,t.get(s)??null]))}function H(){return process.env[Dn]==="all"?"all":"safe"}function Ue(e){let n=ge(be,e),t=n.runnable;return t?{available:!0,dependencyAvailable:t,resolvedBinary:n.resolvedBinary??void 0,note:"rust-analyzer semantic reference queries are enabled."}:{available:!1,dependencyAvailable:t,resolvedBinary:n.resolvedBinary??void 0,reason:"rust-analyzer is not runnable; Rust semantic checks will use SCIP/source evidence only."}}var We=new Map;function re(e){let t=Ue(e).resolvedBinary??null;return{engine:"rust-analyzer",resolvedBinary:t,version:t?En(e,t):"unavailable"}}function Et(e){return{...re(e),scipOccurrenceReferenceMode:H()}}function En(e,n){let t=`${e}\0${n}`,r=We.get(t);if(r)return r;let s;try{s=hn(n,["--version"],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"],windowsHide:!0,timeout:2e3}).trim()}catch{s="unknown"}return We.set(t,s),s}import{createHash as kn}from"crypto";var wn=new Set(["Cargo.lock","Cargo.toml","rust-project.json","rust-toolchain","rust-toolchain.toml"]);function Le(e){let n=Se(e,{includePath:An});return kn("sha256").update(JSON.stringify(n)).digest("hex")}function An(e){let n=e.replaceAll("\\","/"),t=n.split("/").at(-1)??n;return n.endsWith(".rs")||wn.has(t)?!0:n===".cargo/config"||n===".cargo/config.toml"||n.endsWith("/.cargo/config")||n.endsWith("/.cargo/config.toml")}var Pn=5e3,Ye=10,Bn=3e4;function Fe(e,n,t,r=Ze){let s=r.engineIdentity(e),i={protocolVersion:b,projectRoot:r.canonicalProjectRoot(e),projectFingerprint:r.projectFingerprint(e),engine:{engine:s.engine,resolvedBinary:s.resolvedBinary,version:s.version},workerFingerprint:r.fileFingerprint(n),environment:Qe(r.environment())};return{key:ie(x(i)),...i}}var je=class{constructor(n,t=Un){this.createRequester=n;this.applyEnvironment=t}createRequester;applyEnvironment;requester=null;identityKey=null;semanticResponseCache=null;handle(n){this.applyEnvironment(n.workerEnvironment??{});let t;if(this.requester?this.identityKey!==n.identityKey?(this.semanticResponseCache=null,this.requester.shutdown(),this.requester=this.createRequester(),this.identityKey=n.identityKey,t="invalidated"):t="reused":(this.requester=this.createRequester(),this.identityKey=n.identityKey,t="created"),n.kind==="semantic"){let r=On(n.request),s=t==="reused"&&r!==null&&this.semanticResponseCache?.identityKey===n.identityKey&&this.semanticResponseCache.requestKey===r?this.semanticResponseCache.response:null;if(s)return Ke(!0,n.request.definitions.length),{session:t,response:s};let i=this.requester.requestSemantic(n.request,n.timeoutMs);return r!==null&&Nn(i)&&(this.semanticResponseCache={identityKey:n.identityKey,requestKey:r,response:i}),Ke(!1,n.request.definitions.length),{session:t,response:i}}return{session:t,response:this.requester.requestImportDefinitions(n.request,n.timeoutMs)}}shutdown(){this.requester?.shutdown(),this.requester=null,this.identityKey=null,this.semanticResponseCache=null}};function On(e){if(e.includeReferences===!1||e.includeCallees!==!0||e.includeSignatures===!0||(e.referenceDefinitions?.length??0)===0||(e.calleeDefinitions?.length??0)===0)return null;let{readinessDeadlineMs:n,...t}=e;return ie(x(t))}function Nn(e){return e.available&&Array.isArray(e.callees)&&(e.incompleteReferenceSymbolIds?.length??0)===0}function Ke(e,n){C()&&v({type:"span",name:"rust.semantic.durable-session.response-cache",durationMs:0,ok:!0,hit:e,definitions:n})}function P(e,n,t,r){if(e.protocolVersion!==b||!t(e.pid))return!1;if(!e.processIdentity)return!0;let s=r?.(e.pid);return s!=null&&ye(e.processIdentity,s)}function se(e,n,t){let r;try{r=J(n,{maxBytes:E,inputKind:"Rust semantic engine artifact"})}catch{r="missing"}let s=ie(x({projectRoot:_(e),serverPath:_(n),serverFingerprint:r})).slice(0,20);return _(t,`codebaseiq-rust-session-${s}`)}function ze(e){let n=e===void 0?Number.NaN:Number(e);return Number.isInteger(n)&&n>=0?n:0}function Qe(e){return Object.fromEntries(Object.entries(e).filter(([n])=>Xe(n)).sort(([n],[t])=>n.localeCompare(t)).map(([n,t])=>[n,t??null]))}function Je(e,n){let t=n.runtime??Kn,r=n.identityRuntime??Ze,s=se(e,n.serverPath,n.tempRoot??Tn()),i=!1,u=(l,d)=>{if(i)throw new Error("Durable Rust semantic session was already disposed.");return Ln(s,n.serverPath,n.semanticWorkerPath,l,d,t,n.mailboxLimits)};return{requestSemantic(l,d){let R=Fe(e,n.semanticWorkerPath,l,r),{readinessDeadlineMs:c,...o}=l;return u({kind:"semantic",identityKey:R.key,workerEnvironment:He(),request:{...o,referenceRetryTimeoutMs:Wn(process.env.SCIP_RUST_SEMANTIC_REFERENCE_RETRY_TIMEOUT_MS,l.referenceRetryTimeoutMs),settleDelayMs:process.env.SCIP_RUST_SEMANTIC_SETTLE_MS===void 0?l.settleDelayMs:ze(process.env.SCIP_RUST_SEMANTIC_SETTLE_MS)},timeoutMs:d},d)},requestImportDefinitions(l,d){let R=Fe(e,n.semanticWorkerPath,l,r),{readinessDeadlineMs:c,...o}=l;return u({kind:"import-definitions",identityKey:R.key,workerEnvironment:He(),request:{...o,settleDelayMs:process.env.SCIP_RUST_SEMANTIC_SETTLE_MS===void 0?l.settleDelayMs:ze(process.env.SCIP_RUST_SEMANTIC_SETTLE_MS)},timeoutMs:d},d)},shutdown(){i=!0}}}function Un(e){for(let n of Object.keys(process.env))Ge(n)&&delete process.env[n];for(let[n,t]of Object.entries(e))t!==null&&(process.env[n]=t)}function Wn(e,n){return n!==void 0?n:e===void 0?Bn:void 0}function Ln(e,n,t,r,s,i,u={}){let l=i.now(),d=l+s,R=(i.monotonicNow??A)(),c=R+s,o=q("rust-semantic-v3",r),a=K(o),f=Ee(e),m=V(e),y=ke(f,{mailboxVersion:k,protocolVersion:b,id:a,operationKey:o,clientId:i.randomId(),enqueuedAtMs:l,deadlineAtMs:d,sessionIdentity:m,request:r},{nowMs:l,limits:u});for(Ve(e,n,t,c,i);(i.monotonicNow??A)()<=c;){if($e(y.responsePath)){let D=Fn(w(y.responsePath,{maxBytes:u.maxItemBytes??E,inputKind:"durable Rust semantic mailbox response"}),{requestId:a,operationKey:o,sessionIdentity:m,deadlineAtMs:y.authoritativeDeadlineAtMs,requestKind:r.kind,nowMs:i.now()});if(!D.ok)throw new Error(D.error);return C()&&v({type:"span",name:"rust.semantic.durable-session.request",durationMs:(i.monotonicNow??A)()-R,ok:!0,session:D.session,kind:r.kind}),D.response}let h=B(e);(!h||!P(h,i.now(),i.isProcessAlive,i.readProcessIdentity))&&Ve(e,n,t,c,i),i.sleep(Ye)}throw new Error(`Durable Rust semantic session timed out after ${(s/1e3).toFixed(0)}s.`)}function Ve(e,n,t,r,s){let i=B(e);if(i&&P(i,s.now(),s.isProcessAlive,s.readProcessIdentity))return;qn(_(e,"server.json"),{force:!0}),s.spawnServer(n,e,t);let u=s.monotonicNow??A,l=Math.min(r,u()+Pn);for(;u()<=l;){let d=B(e);if(d&&P(d,s.now(),s.isProcessAlive,s.readProcessIdentity))return;s.sleep(Ye)}throw new Error("Durable Rust semantic session helper did not become ready within 5s.")}function B(e){try{let n=JSON.parse(w(_(e,"server.json"),{maxBytes:pe,inputKind:"durable Rust session state"}));if(typeof n.protocolVersion!="number"||n.sessionIdentity!==void 0&&(typeof n.sessionIdentity!="string"||n.sessionIdentity!==V(e))||typeof n.pid!="number"||typeof n.heartbeatAtMs!="number"||n.busyUntilMs!==void 0&&typeof n.busyUntilMs!="number"||n.mailbox!==void 0&&!jn(n.mailbox))return null;let t=n.processIdentity===void 0?null:me(n.processIdentity);return n.processIdentity!==void 0&&(!t||t.pid!==n.pid)?null:{protocolVersion:n.protocolVersion,...n.sessionIdentity===void 0?{}:{sessionIdentity:n.sessionIdentity},pid:n.pid,...t?{processIdentity:t}:{},heartbeatAtMs:n.heartbeatAtMs,...n.busyUntilMs===void 0?{}:{busyUntilMs:n.busyUntilMs},...n.mailbox===void 0?{}:{mailbox:n.mailbox}}}catch{return null}}function Fn(e,n){try{return te(JSON.parse(e),n)}catch(t){return{ok:!1,code:"malformed-response",error:`helper wrote malformed JSON: ${t instanceof Error?t.message:String(t)}`}}}function jn(e){if(!e||typeof e!="object")return!1;let n=e;return p(n.pending)&&p(n.inflight)&&p(n.responses)&&p(n.deadLetters)&&p(n.invalid)&&p(n.totalItems)&&typeof n.totalBytes=="number"&&Number.isFinite(n.totalBytes)&&n.totalBytes>=0&&(n.oldestPendingAt===void 0||Number.isFinite(Date.parse(n.oldestPendingAt)))}function He(){return Object.fromEntries(Object.entries(process.env).filter(([e])=>Ge(e)).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>[e,n??null]))}function Xe(e){return e==="HOME"||e==="PATH"||e.startsWith("CARGO_")||e.startsWith("RA_")||e.startsWith("RUST")}function Ge(e){return Xe(e)||e.startsWith("SCIP_RUST_")||e==="CODEBASEIQ_PROFILE"||e==="CODEBASEIQ_PROFILE_CACHE_STATE"||e==="CODEBASEIQ_PROFILE_COMMAND"||e==="CODEBASEIQ_PROFILE_OUT"||e==="CODEBASEIQ_PROFILE_RUN_ID"||e==="CODEBASEIQ_PROFILE_WORKLOAD_IDENTITY"||e==="CODEBASEIQ_PROFILE_WORKLOAD_IDENTITY_KIND"||e==="CODEBASEIQ_PROFILE_MIN_MS"}var Ze={canonicalProjectRoot(e){try{return vn(e)}catch{return _(e)}},projectFingerprint(e){return Le(e)},engineIdentity:re,fileFingerprint(e){return J(e,{maxBytes:E,inputKind:"Rust semantic engine artifact"})},environment(){return Qe(process.env)}},Kn={now:Date.now,monotonicNow:A,randomId:Cn,isProcessAlive:j,readProcessIdentity:F,spawnServer(e,n,t){if(!$e(e))throw new Error(`Durable Rust semantic session helper was not found at ${e}. Run npm run build first.`);xn(process.execPath,[e,n,t],{detached:!0,stdio:"ignore",windowsHide:!0}).unref()},sleep(e){let n=new Int32Array(new SharedArrayBuffer(4));Atomics.wait(n,0,0,e)}};function ie(e){return _n("sha256").update(e).digest("hex")}import{existsSync as zn,mkdtempSync as en,rmSync as ae}from"fs";import{tmpdir as ce}from"os";import{join as ue}from"path";import{fileURLToPath as L,pathToFileURL as Vn}from"url";import{SHARE_ENV as Hn,Worker as $n}from"worker_threads";function $(e,n,t=new Set){let r=new Map;for(let s of e)t.has(s.symbolId)||r.set(s.symbolId,n.get(s.symbolId)??[]);return r}function oe(e,n,t){let r=z(process.env.SCIP_RUST_SEMANTIC_BATCH_TIMEOUT_MS)??0;if(r>0)return r;let s=Math.max(1,Math.ceil(e/Math.max(1,t)));return Math.max(12e4,3e4+s*n)}var nn=15e3,tn=8,sn=5e3,Yn=64,Qn=96,de=class{constructor(n,t,r={}){this.projectRoot=n;this.status=t;this.opts=r;this.requester=r.requester??Zn(n,process.env.SCIP_RUST_SEMANTIC_DURABLE_SESSION)}projectRoot;status;opts;requester;referencesForDefinitions(n){let t=this.status(this.projectRoot);if(!t.available||!t.resolvedBinary)return{available:!1,resolvedBinary:t.resolvedBinary,reason:N(t),references:U(n)};try{let r=this.requestSession(t.resolvedBinary,n,{includeReferences:!0});return{...O(r),resolvedBinary:t.resolvedBinary,references:$(n,new Map(r.references),new Set(r.incompleteReferenceSymbolIds??[]))}}catch(r){return this.opts.fallbackReferenceResolver?.referencesForDefinitions(n)??{available:!1,resolvedBinary:t.resolvedBinary,reason:r instanceof Error?r.message:String(r),references:U(n)}}}calleesForDefinitions(n){let t=this.status(this.projectRoot);if(!t.available||!t.resolvedBinary)return{available:!1,resolvedBinary:t.resolvedBinary,reason:N(t),callees:W(n)};try{let r=this.requestSession(t.resolvedBinary,n,{includeReferences:!1,includeCallees:!0});return{...O(r),resolvedBinary:t.resolvedBinary,callees:le(n,new Map(r.callees??[]))}}catch(r){return this.opts.fallbackCalleeResolver?.calleesForDefinitions(n)??{available:!1,resolvedBinary:t.resolvedBinary,reason:r instanceof Error?r.message:String(r),callees:W(n)}}}referencesAndCalleesForDefinitions(n,t){let r=this.status(this.projectRoot);if(!r.available||!r.resolvedBinary)return{available:!1,resolvedBinary:r.resolvedBinary,reason:N(r),references:U(n),callees:W(t)};let s=[...n,...t];try{let i=this.requestSession(r.resolvedBinary,s,{includeReferences:n.length>0,includeCallees:t.length>0,referenceDefinitions:n,calleeDefinitions:t});return{...O(i),resolvedBinary:r.resolvedBinary,references:$(n,new Map(i.references),new Set(i.incompleteReferenceSymbolIds??[])),callees:le(t,new Map(i.callees??[]))}}catch(i){return this.fallbackReferencesAndCallees(r,n,t,i)}}signaturesForDefinitions(n){let t=this.status(this.projectRoot);if(!t.available||!t.resolvedBinary)return{available:!1,resolvedBinary:t.resolvedBinary,reason:N(t),signatures:rn(n)};try{let r=this.requestSession(t.resolvedBinary,n,{includeReferences:!1,includeCallees:!1,includeSignatures:!0});return{...O(r),resolvedBinary:t.resolvedBinary,signatures:st(n,new Map(r.signatures??[]))}}catch(r){return this.opts.fallbackSignatureResolver?.signaturesForDefinitions(n)??{available:!1,resolvedBinary:t.resolvedBinary,reason:r instanceof Error?r.message:String(r),signatures:rn(n)}}}importDefinitionsForFile(n,t){let r=this.status(this.projectRoot);if(t.length===0)return r.available?{available:!0,resolvedBinary:r.resolvedBinary,sourcePaths:new Map}:{available:!1,reason:r.reason,resolvedBinary:r.resolvedBinary,sourcePaths:new Map};if(!r.available||!r.resolvedBinary)return{available:!1,resolvedBinary:r.resolvedBinary,reason:N(r),sourcePaths:new Map(t.map(s=>[s.id,null]))};try{let s=this.requestImportDefinitions(r.resolvedBinary,n,t);return{...O(s),resolvedBinary:r.resolvedBinary,sourcePaths:new Map(s.sourcePaths)}}catch(s){return{available:!1,resolvedBinary:r.resolvedBinary,reason:s instanceof Error?s.message:String(s),sourcePaths:new Map(t.map(i=>[i.id,null]))}}}dispose(){this.requester.shutdown()}requestSession(n,t,r){let s=Y(process.env.SCIP_RUST_SEMANTIC_REQUEST_TIMEOUT_MS,nn),i=Q(process.env.SCIP_RUST_SEMANTIC_REFERENCE_RETRY_TIMEOUT_MS,0),u=Y(process.env.SCIP_RUST_SEMANTIC_CONCURRENCY,tn),l=Q(process.env.SCIP_RUST_SEMANTIC_DIAGNOSTICS_TIMEOUT_MS,Math.min(s,1e4)),d=r.referenceDefinitions?[...r.referenceDefinitions]:void 0,R=r.calleeDefinitions?[...r.calleeDefinitions]:void 0,c=r.signatureDefinitions?[...r.signatureDefinitions]:void 0,o=Jn(process.env.SCIP_RUST_SEMANTIC_SETTLE_MS,{definitionCount:t.length,...r}),a={projectRoot:this.projectRoot,rustAnalyzerBinary:n,definitions:[...t],...d?{referenceDefinitions:d}:{},...R?{calleeDefinitions:R}:{},...c?{signatureDefinitions:c}:{},requestTimeoutMs:s,...r.includeReferences!==!1&&i>0?{referenceRetryTimeoutMs:i}:{},diagnosticsTimeoutMs:l,settleDelayMs:o,concurrency:u,includeReferences:r.includeReferences,includeCallees:r.includeCallees,includeSignatures:r.includeSignatures},f=it(a);return G("rust.semantic.session.request",()=>this.requester.requestSemantic(a,oe(f,ot(s,a.referenceRetryTimeoutMs),u)),()=>({definitions:t.length,operationDefinitions:f,referenceDefinitions:a.referenceDefinitions?.length,calleeDefinitions:a.calleeDefinitions?.length,signatureDefinitions:a.signatureDefinitions?.length,references:a.includeReferences!==!1,callees:a.includeCallees===!0,signatures:a.includeSignatures===!0,referenceRetryTimeoutMs:a.referenceRetryTimeoutMs}))}fallbackReferencesAndCallees(n,t,r,s){let i=t.length===0?{available:!0,resolvedBinary:n.resolvedBinary,references:U(t)}:this.opts.fallbackReferenceResolver?.referencesForDefinitions(t),u=r.length===0?{available:!0,resolvedBinary:n.resolvedBinary,callees:W(r)}:this.opts.fallbackCalleeResolver?.calleesForDefinitions(r);if(i&&u){let l={resolvedBinary:i.resolvedBinary??u.resolvedBinary??n.resolvedBinary,references:$(t,i.references),callees:le(r,u.callees)};return i.available&&u.available?{available:!0,...l}:{available:!1,reason:(i.available?void 0:i.reason)??(u.available?void 0:u.reason)??"Rust semantic fallback was unavailable.",...l}}return{available:!1,resolvedBinary:n.resolvedBinary,reason:s instanceof Error?s.message:String(s),references:U(t),callees:W(r)}}requestImportDefinitions(n,t,r){let s=Y(process.env.SCIP_RUST_SEMANTIC_REQUEST_TIMEOUT_MS,nn),i=Y(process.env.SCIP_RUST_SEMANTIC_CONCURRENCY,tn),u=Q(process.env.SCIP_RUST_SEMANTIC_DIAGNOSTICS_TIMEOUT_MS,Math.min(s,1e4)),l=Q(process.env.SCIP_RUST_SEMANTIC_SETTLE_MS,sn),d={projectRoot:this.projectRoot,rustAnalyzerBinary:n,file:t,positions:[...r],requestTimeoutMs:s,diagnosticsTimeoutMs:u,settleDelayMs:l,concurrency:i};return G("rust.semantic.import-definitions.session.request",()=>this.requester.requestImportDefinitions(d,oe(r.length,s,i)),()=>({file:t,positions:r.length}))}};function O(e){return e.available?{available:!0}:{available:!1,reason:e.reason}}function N(e){return e.available?"rust-analyzer binary path is unavailable.":e.reason}function ur(e,n,t={}){return new de(e,n,t)}function Jn(e,n){let t=ln(e);if(t!==null)return t;let r=n.includeReferences!==!1;return r&&n.includeCallees!==!0&&n.includeSignatures!==!0&&n.definitionCount<=Yn||r&&n.includeCallees===!0&&n.includeSignatures!==!0&&n.definitionCount<=Qn?0:sn}function on(e){let n=e?.trim().toLowerCase(),t=n==="0"||n==="false"||n==="off"||n==="worker",r=n==="1"||n==="true"||n==="on"||n==="durable",s=n===void 0||n==="";return{transport:t||!s&&!r?"worker":"durable",source:s?"default":"environment",fallback:"worker",valid:s||t||r,optOut:"SCIP_RUST_SEMANTIC_DURABLE_SESSION=0"}}function Xn(e){return on(e).transport}function lr(e,n){let t=on(n);if(t.transport==="worker")return{...t,state:"per-command"};let r=L(un()),s=se(e,r,ce()),i=B(s);return i?{...t,state:P(i,Date.now(),j,F)?"live":"stale",pid:i.pid,heartbeatAtMs:i.heartbeatAtMs,...i.busyUntilMs===void 0?{}:{busyUntilMs:i.busyUntilMs}}:{...t,state:"stopped"}}function Gn(e,n){let t=null,r=!1,s=!1,i=!1,u=()=>t??=n(),l=()=>{s||(e.shutdown(),s=!0)},d=(c,o,a)=>{let f=rt(c);r=!0;try{l()}catch{}C()&&v({type:"span",name:"rust.semantic.durable-session.request",durationMs:a,ok:!1,kind:o,session:"worker-fallback",reason:f})},R=(c,o,a)=>{if(i)throw new Error("Rust semantic failover session was already disposed.");if(r)return a(u());let f=performance.now();try{return o(e)}catch(m){d(m,c,performance.now()-f)}return a(u())};return{requestSemantic(c,o){return R("semantic",a=>a.requestSemantic(c,o),a=>a.requestSemantic(c,o))},requestImportDefinitions(c,o){return R("import-definitions",a=>a.requestImportDefinitions(c,o),a=>a.requestImportDefinitions(c,o))},shutdown(){if(i)return;i=!0;let c=[];try{l()}catch(o){c.push(o)}try{t?.shutdown()}catch(o){c.push(o)}if(c.length>0)throw c[0]}}}function Zn(e,n,t={worker:()=>et(),durable:()=>Je(e,{serverPath:L(un()),semanticWorkerPath:L(an())})}){return Xn(n)==="durable"?Gn(t.durable(),t.worker):t.worker()}function et(e={}){let n=null,t=null,r=1,s=!1,i=null,u=null,l=o=>{o&&ae(o,{recursive:!0,force:!0})},d=()=>{if(i)return;let o=n,a=t;n=null,t=null;let f=o?o.terminate():Promise.resolve(0);i=Promise.allSettled([f,we(a,{gracefulMs:1e3,forceMs:1e3})]).then(([m,y])=>{let D=(y.status==="fulfilled"?y.value:[{reaped:!1,detail:String(y.reason)}]).filter(g=>!g.reaped);if(m.status==="rejected"||D.length>0){u=new Error(`Rust semantic worker cleanup did not complete; ownership evidence remains at ${a??"unknown"}.`);return}l(a)}).finally(()=>{i=null})},R=()=>{if(n)return n;if(i)throw new Error("The previous Rust semantic session worker is still terminating; retry the request.");if(u)throw u;let o=e.semanticWorkerPath?Vn(e.semanticWorkerPath):an();if(!zn(L(o)))throw new Error(`Rust semantic session worker was not found at ${L(o)}. Run npm run build before using built semantic Rust queries.`);return t=en(ue(ce(),"codebaseiq-rust-session-")),n=new $n(o,e.shareEnvironment?{env:Hn}:void 0),n.unref(),n},c=()=>{let o=t??en(ue(ce(),"codebaseiq-rust-session-"));return t=o,ue(o,`${r++}.json`)};return{requestSemantic(o,a){if(s)throw new Error("Rust semantic session was already disposed.");let f=R(),m=c(),y=new SharedArrayBuffer(4),h=new Int32Array(y);if(f.postMessage({kind:"semantic",request:o,responsePath:m,sharedBuffer:y}),Atomics.wait(h,0,0,a)==="timed-out")throw d(),new Error(`Rust semantic session worker timed out after ${(a/1e3).toFixed(0)}s`);try{let g=nt(w(m,{maxBytes:E,inputKind:"Rust semantic worker response"}));if(!g.ok)throw new Error(g.error);return g.response}finally{ae(m,{force:!0})}},requestImportDefinitions(o,a){if(s)throw new Error("Rust semantic session was already disposed.");let f=R(),m=c(),y=new SharedArrayBuffer(4),h=new Int32Array(y);if(f.postMessage({kind:"import-definitions",request:o,responsePath:m,sharedBuffer:y}),Atomics.wait(h,0,0,a)==="timed-out")throw d(),new Error(`Rust semantic import-definition session worker timed out after ${(a/1e3).toFixed(0)}s`);try{let g=tt(w(m,{maxBytes:E,inputKind:"Rust import-definition worker response"}));if(!g.ok)throw new Error(g.error);return g.response}finally{ae(m,{force:!0})}},shutdown(){if(s)return;if(s=!0,!n){l(t),t=null;return}let o=c(),a=new SharedArrayBuffer(4),f=new Int32Array(a);n.postMessage({kind:"shutdown",responsePath:o,sharedBuffer:a}),Atomics.wait(f,0,0,5e3),d()}}}function nt(e){let n=JSON.parse(e);if(!n||typeof n!="object")return{ok:!1,error:"Rust semantic session worker wrote a non-object response."};let t=n;return t.ok===!0&&"response"in t?{ok:!0,response:t.response}:{ok:!1,error:typeof n.error=="string"?n.error:"Rust semantic session worker failed."}}function tt(e){let n=JSON.parse(e);if(!n||typeof n!="object")return{ok:!1,error:"Rust semantic session worker wrote a non-object response."};let t=n;return t.ok===!0&&"response"in t?{ok:!0,response:t.response}:{ok:!1,error:typeof n.error=="string"?n.error:"Rust semantic session worker failed."}}function rt(e){let n=e instanceof Error?`${e.name} ${e.message}`.toLowerCase():String(e).toLowerCase();return n.includes("readiness")?"readiness":n.includes("timeout")||n.includes("timed out")?"timeout":n.includes("helper")?"helper":"request"}function U(e){return new Map(e.map(n=>[n.symbolId,[]]))}function W(e){return new Map(e.map(n=>[n.symbolId,[]]))}function rn(e){return new Map(e.map(n=>[n.symbolId,null]))}function le(e,n){return new Map(e.map(t=>[t.symbolId,n.get(t.symbolId)??[]]))}function st(e,n){return new Map(e.map(t=>[t.symbolId,n.get(t.symbolId)??null]))}function it(e){let n=0;return e.includeReferences!==!1&&(n+=(e.referenceDefinitions??e.definitions).length),e.includeCallees===!0&&(n+=(e.calleeDefinitions??e.definitions).length),e.includeSignatures===!0&&(n+=(e.signatureDefinitions??e.definitions).length),Math.max(1,n)}function ot(e,n){return n&&n>0?Math.max(e,n):e}function an(){return new URL("./rust-semantic-session-worker.js",import.meta.url)}function un(){return new URL("./rust-semantic-session-server.js",import.meta.url)}function Y(e,n){return z(e)??n}function Q(e,n){return ln(e)??n}function ln(e){if(!e)return null;let n=Number(e);return Number.isInteger(n)&&n>=0?n:null}export{yt as a,St as b,Ue as c,Et as d,b as e,V as f,pn as g,je as h,$ as i,oe as j,ur as k,Jn as l,lr as m,et as n,ot as o};
2
+ //# sourceMappingURL=chunk-JAFDMV5I.js.map
@@ -1,7 +1,7 @@
1
- import{d as j}from"./chunk-VLTUX4IF.js";import{a as k}from"./chunk-RCPZOPV6.js";import{a as _}from"./chunk-GXVDTHFC.js";import{b as C}from"./chunk-I2KP4AGR.js";import{a as T}from"./chunk-MTMF4N7F.js";import{g as S}from"./chunk-57KEZDPT.js";import{a as O,b as w,e as $}from"./chunk-3XFJUWJE.js";import{d as L,e as I,t as g}from"./chunk-AM5SUGHF.js";import{f as B,p as M}from"./chunk-JOALNFY3.js";import{x as P}from"./chunk-PLZXWZHY.js";import{a as F}from"./chunk-327YK6TB.js";import{basename as le,extname as U}from"path";var ee=12,ne=280;function y(n,e,t,o){let i=te(n,e,t,o);if(i.size===0)return se();let r=[],s=new Set,l=(a,d,c,f)=>{if(d===e&&c<=o&&f>=t)return;let b=`${d}:${c}:${f}:${a}`;s.has(b)||(s.add(b),r.push({name:a,relativePath:d,startLine:c,endLine:f}))};for(let a of g(n,e))i.has(a.leaf)&&l(a.leaf,a.relativePath,a.startLine,a.endLine);for(let a of M(n,e)){let d=a.localName;if(!d||!i.has(d)||!a.sourcePath||a.kind==="namespace")continue;let c=a.importedName==="default"?d:a.importedName;for(let f of T(n,a.sourcePath,c,{maxReexportDepth:3}))l(d,f.relativePath,f.startLine,f.endLine)}r.sort(W);let u=r.map(a=>{let d=ie(n,a);return d?{...a,source:d}:null}).filter(a=>a!==null).slice(0,ee);return D(u)}function A(n,e=[]){return D(re(n.flatMap(t=>t?.inline??[]),e))}function Ne(n){return n?n.inline.reduce((e,t)=>e+t.name.length+t.source.length+32,0):0}function te(n,e,t,o){let i=B(n,e),r=new Set;if(!i)return r;for(let s=t;s<=o;s+=1)for(let l of i.identifiersByLine[s]??[])r.add(l);return r}function ie(n,e){if(e.startLine!==e.endLine)return null;let t=(P(n,e.relativePath)[e.startLine]??"").trim();if(!t||t.length>ne)return null;let o=t.indexOf("=");if(o<0||t[o+1]===">")return null;let i=t.slice(o+1).replace(/(?:\/\/|#).*$/u,"").trim();if(!i||i.includes("${")||/\b(?:function|class|struct|interface|trait|enum|lambda)\b/u.test(i))return null;let s=i.replace(/(['"`])(?:\\.|(?!\1).)*\1/gu,"").replace(/\b(?:0[xX][\dA-Fa-f_]+|0[bB][01_]+|0[oO][0-7_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d+)?)n?\b/gu,""),l=new Set(["true","false","null","undefined","None","True","False"]);return(s.match(/[A-Za-z_][A-Za-z0-9_]*/gu)??[]).some(a=>!l.has(a))?null:t}function re(n,e){let t=new Map;for(let o of n){if(oe(o,e))continue;let i=`${o.relativePath}:${o.startLine}:${o.endLine}:${o.name}`;t.has(i)||t.set(i,{...o})}return[...t.values()].sort(W)}function oe(n,e){return e.some(t=>t.relativePath===n.relativePath&&t.startLine<=n.startLine&&t.endLine>=n.endLine)}function W(n,e){return n.relativePath.localeCompare(e.relativePath)||n.startLine-e.startLine||n.name.localeCompare(e.name)}function D(n){return{coverage:"indexed-project-literal-values",inline:n}}function se(){return D([])}function Ae(n,e,t={}){let{context:o=0}=t,i=Y(e);if(i)return q(n,i.filePath,i.startLine,i.endLine,o);let r=Q(n,e);if(r)return K(n,r);let s=O(n,e);return s?p(n,s,o):null}function We(n,e,t={}){if(e.length===0)throw new RangeError("code requires at least one selector.");if(e.length>24)throw new RangeError(`code accepts at most ${24} selectors per complete packet; received ${e.length}.`);let o=t.context??0,i=t.members??"exported",r=e.map(u=>ue(n,u,o,i)),s=r.flatMap(u=>u.results),l=s.map(u=>({relativePath:u.relativePath,startLine:u.startLine,endLine:u.endLine}));return{requested:e.length,matched:r.filter(u=>u.status==="matched").length,ambiguous:r.filter(u=>u.status==="ambiguous").length,missing:r.filter(u=>u.status==="missing").length,entries:r,bindingClosure:A(s.map(u=>u.bindingClosure),l)}}function ue(n,e,t,o){let i=Y(e);if(i){let d=q(n,i.filePath,i.startLine,i.endLine,t);return d?de(n,e,d,t):x(n,e,"definition-source-unreadable")}let r=Q(n,e);if(r)return fe(n,e,r,t,o);let s=w(n,e);if(!s.match)return x(n,e,"definition-not-found");let l=Le(n,s),u=l.map(V);if(s.total>1){let d=s.total<=4&&l.length===s.total;return{selector:e,status:"ambiguous",kind:"source",totalCandidates:s.total,results:d?l.flatMap(c=>{let f=p(n,c,t);return f?[f]:[]}):[],definitions:[],candidates:u,omittedCandidates:Math.max(0,s.total-u.length),suggestions:[]}}let a=p(n,s.match,t);return a?ve(e,a):x(n,e,"definition-source-unreadable")}function de(n,e,t,o){let i=g(n,t.relativePath).filter(a=>!X(a,t.relativePath)),r=ce(n,t,i),s=G(r.map(a=>p(n,a,o)).filter(a=>a!==null)).filter(a=>!J(t,a)),l=new Set(s.map(a=>a.symbol)),u=r.filter(a=>!l.has(a.symbol)&&!(t.startLine<=a.startLine&&t.endLine>=a.endLine)).map(V);return{selector:e,status:"matched",kind:"source",totalCandidates:1,results:[t,...s],definitions:[],candidates:[],omittedCandidates:0,suggestions:[],rangeCoverage:{basis:"requested-range-and-same-file-call-closure",referencedDefinitions:r.length,returnedDefinitions:r.length-u.length,returnedBodies:s.length,omittedDefinitions:u.length,omittedLedger:u}}}function ce(n,e,t){if(!h(e.freshness))return[];if(t.length===0)return[];let o=S(n,t,{additive:!1,semantic:!1}),i=new Map;for(let s of t){let l=i.get(s.symbol)??[];l.push(s),i.set(s.symbol,l)}let r=new Map;for(let s of t)if(!(s.endLine<e.startLine||s.startLine>e.endLine)){for(let l of o.get(s.symbolId)??[])if(l.file===e.relativePath&&!(l.source==="ast-callsite"&&(l.chunkId<e.startLine||l.chunkId>e.endLine)))for(let u of i.get(l.symbol)??[])r.set(u.symbolId,u)}return H(n,[...r.values()],t)}function fe(n,e,t,o,i){let r=t.relativePath,s=ge(n,r),l=h(t.freshness)?g(n,r).filter(m=>!X(m,r)):[],u=l.filter(m=>_(n,m)),a=u.length>0?u:me(s,l),d=i==="all"?[]:H(n,a,l),c=i==="all"||l.length===0?[K(n,t)]:G(d.map(m=>p(n,m,o)).filter(m=>m!==null)),f=he(s,c),b=be(r,s,c),N=Ce(s);return{selector:e,status:"matched",kind:"file-source",totalCandidates:1,results:c,definitions:[],candidates:[],omittedCandidates:0,suggestions:[],fileCoverage:{members:i,basis:i==="all"||l.length===0?"complete-file-source":u.length>0?"explicit-exports-and-same-file-reference-closure":"top-level-and-same-file-reference-closure",totalDefinitions:N,returnedDefinitions:f,returnedBodies:c.length,omittedDefinitions:Math.max(0,N-f),omittedLedger:b}}}function me(n,e){let t=new Set(n.map(o=>o.symbol));return e.filter(o=>t.has(o.symbol))}function ge(n,e){return k(n,e).flatMap(t=>pe(t,e)?t.children:[t])}function X(n,e){return z(e).has(n.leaf)}function pe(n,e){return z(e).has(I(n.symbol))}function z(n){let e=le(n);return new Set([e,e.slice(0,Math.max(0,e.length-U(e).length))])}function H(n,e,t){if(e.length===0)return[];let o=S(n,t,{additive:!0,semantic:!1}),i=new Map;for(let l of t){let u=i.get(l.symbol)??[];u.push(l),i.set(l.symbol,u)}let r=new Map,s=[...e];for(;s.length>0;){let l=s.shift();if(!r.has(l.symbolId)){r.set(l.symbolId,l);for(let u of o.get(l.symbolId)??[])for(let a of i.get(u.symbol)??[])r.has(a.symbolId)||s.push(a)}}return[...r.values()].sort(ye)}function G(n){let e=[...n].sort((o,i)=>o.relativePath.localeCompare(i.relativePath)||o.startLine-i.startLine||i.endLine-o.endLine),t=[];for(let o of e)t.some(i=>J(i,o))||t.push(o);return t}function K(n,e){let t=e.text.split(`
1
+ import{d as j}from"./chunk-VGWZ4MOY.js";import{a as k}from"./chunk-M2Y6PCFE.js";import{a as _}from"./chunk-U7NUXDQO.js";import{b as C}from"./chunk-TJWVT4DO.js";import{a as T}from"./chunk-3VJ3OCRE.js";import{g as S}from"./chunk-MSI3K7PJ.js";import{a as O,b as w,e as $}from"./chunk-SGMNWYTH.js";import{d as L,e as I,t as g}from"./chunk-GVAF222T.js";import{f as B,p as M}from"./chunk-F74LZWCE.js";import{x as P}from"./chunk-7GAK2F3H.js";import{a as F}from"./chunk-UC2FD2PS.js";import{basename as le,extname as U}from"path";var ee=12,ne=280;function y(n,e,t,o){let i=te(n,e,t,o);if(i.size===0)return se();let r=[],s=new Set,l=(a,d,c,f)=>{if(d===e&&c<=o&&f>=t)return;let b=`${d}:${c}:${f}:${a}`;s.has(b)||(s.add(b),r.push({name:a,relativePath:d,startLine:c,endLine:f}))};for(let a of g(n,e))i.has(a.leaf)&&l(a.leaf,a.relativePath,a.startLine,a.endLine);for(let a of M(n,e)){let d=a.localName;if(!d||!i.has(d)||!a.sourcePath||a.kind==="namespace")continue;let c=a.importedName==="default"?d:a.importedName;for(let f of T(n,a.sourcePath,c,{maxReexportDepth:3}))l(d,f.relativePath,f.startLine,f.endLine)}r.sort(W);let u=r.map(a=>{let d=ie(n,a);return d?{...a,source:d}:null}).filter(a=>a!==null).slice(0,ee);return D(u)}function A(n,e=[]){return D(re(n.flatMap(t=>t?.inline??[]),e))}function Ne(n){return n?n.inline.reduce((e,t)=>e+t.name.length+t.source.length+32,0):0}function te(n,e,t,o){let i=B(n,e),r=new Set;if(!i)return r;for(let s=t;s<=o;s+=1)for(let l of i.identifiersByLine[s]??[])r.add(l);return r}function ie(n,e){if(e.startLine!==e.endLine)return null;let t=(P(n,e.relativePath)[e.startLine]??"").trim();if(!t||t.length>ne)return null;let o=t.indexOf("=");if(o<0||t[o+1]===">")return null;let i=t.slice(o+1).replace(/(?:\/\/|#).*$/u,"").trim();if(!i||i.includes("${")||/\b(?:function|class|struct|interface|trait|enum|lambda)\b/u.test(i))return null;let s=i.replace(/(['"`])(?:\\.|(?!\1).)*\1/gu,"").replace(/\b(?:0[xX][\dA-Fa-f_]+|0[bB][01_]+|0[oO][0-7_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d+)?)n?\b/gu,""),l=new Set(["true","false","null","undefined","None","True","False"]);return(s.match(/[A-Za-z_][A-Za-z0-9_]*/gu)??[]).some(a=>!l.has(a))?null:t}function re(n,e){let t=new Map;for(let o of n){if(oe(o,e))continue;let i=`${o.relativePath}:${o.startLine}:${o.endLine}:${o.name}`;t.has(i)||t.set(i,{...o})}return[...t.values()].sort(W)}function oe(n,e){return e.some(t=>t.relativePath===n.relativePath&&t.startLine<=n.startLine&&t.endLine>=n.endLine)}function W(n,e){return n.relativePath.localeCompare(e.relativePath)||n.startLine-e.startLine||n.name.localeCompare(e.name)}function D(n){return{coverage:"indexed-project-literal-values",inline:n}}function se(){return D([])}function Ae(n,e,t={}){let{context:o=0}=t,i=Y(e);if(i)return q(n,i.filePath,i.startLine,i.endLine,o);let r=Q(n,e);if(r)return K(n,r);let s=O(n,e);return s?p(n,s,o):null}function We(n,e,t={}){if(e.length===0)throw new RangeError("code requires at least one selector.");if(e.length>24)throw new RangeError(`code accepts at most ${24} selectors per complete packet; received ${e.length}.`);let o=t.context??0,i=t.members??"exported",r=e.map(u=>ue(n,u,o,i)),s=r.flatMap(u=>u.results),l=s.map(u=>({relativePath:u.relativePath,startLine:u.startLine,endLine:u.endLine}));return{requested:e.length,matched:r.filter(u=>u.status==="matched").length,ambiguous:r.filter(u=>u.status==="ambiguous").length,missing:r.filter(u=>u.status==="missing").length,entries:r,bindingClosure:A(s.map(u=>u.bindingClosure),l)}}function ue(n,e,t,o){let i=Y(e);if(i){let d=q(n,i.filePath,i.startLine,i.endLine,t);return d?de(n,e,d,t):x(n,e,"definition-source-unreadable")}let r=Q(n,e);if(r)return fe(n,e,r,t,o);let s=w(n,e);if(!s.match)return x(n,e,"definition-not-found");let l=Le(n,s),u=l.map(V);if(s.total>1){let d=s.total<=4&&l.length===s.total;return{selector:e,status:"ambiguous",kind:"source",totalCandidates:s.total,results:d?l.flatMap(c=>{let f=p(n,c,t);return f?[f]:[]}):[],definitions:[],candidates:u,omittedCandidates:Math.max(0,s.total-u.length),suggestions:[]}}let a=p(n,s.match,t);return a?ve(e,a):x(n,e,"definition-source-unreadable")}function de(n,e,t,o){let i=g(n,t.relativePath).filter(a=>!X(a,t.relativePath)),r=ce(n,t,i),s=G(r.map(a=>p(n,a,o)).filter(a=>a!==null)).filter(a=>!J(t,a)),l=new Set(s.map(a=>a.symbol)),u=r.filter(a=>!l.has(a.symbol)&&!(t.startLine<=a.startLine&&t.endLine>=a.endLine)).map(V);return{selector:e,status:"matched",kind:"source",totalCandidates:1,results:[t,...s],definitions:[],candidates:[],omittedCandidates:0,suggestions:[],rangeCoverage:{basis:"requested-range-and-same-file-call-closure",referencedDefinitions:r.length,returnedDefinitions:r.length-u.length,returnedBodies:s.length,omittedDefinitions:u.length,omittedLedger:u}}}function ce(n,e,t){if(!h(e.freshness))return[];if(t.length===0)return[];let o=S(n,t,{additive:!1,semantic:!1}),i=new Map;for(let s of t){let l=i.get(s.symbol)??[];l.push(s),i.set(s.symbol,l)}let r=new Map;for(let s of t)if(!(s.endLine<e.startLine||s.startLine>e.endLine)){for(let l of o.get(s.symbolId)??[])if(l.file===e.relativePath&&!(l.source==="ast-callsite"&&(l.chunkId<e.startLine||l.chunkId>e.endLine)))for(let u of i.get(l.symbol)??[])r.set(u.symbolId,u)}return H(n,[...r.values()],t)}function fe(n,e,t,o,i){let r=t.relativePath,s=ge(n,r),l=h(t.freshness)?g(n,r).filter(m=>!X(m,r)):[],u=l.filter(m=>_(n,m)),a=u.length>0?u:me(s,l),d=i==="all"?[]:H(n,a,l),c=i==="all"||l.length===0?[K(n,t)]:G(d.map(m=>p(n,m,o)).filter(m=>m!==null)),f=he(s,c),b=be(r,s,c),N=Ce(s);return{selector:e,status:"matched",kind:"file-source",totalCandidates:1,results:c,definitions:[],candidates:[],omittedCandidates:0,suggestions:[],fileCoverage:{members:i,basis:i==="all"||l.length===0?"complete-file-source":u.length>0?"explicit-exports-and-same-file-reference-closure":"top-level-and-same-file-reference-closure",totalDefinitions:N,returnedDefinitions:f,returnedBodies:c.length,omittedDefinitions:Math.max(0,N-f),omittedLedger:b}}}function me(n,e){let t=new Set(n.map(o=>o.symbol));return e.filter(o=>t.has(o.symbol))}function ge(n,e){return k(n,e).flatMap(t=>pe(t,e)?t.children:[t])}function X(n,e){return z(e).has(n.leaf)}function pe(n,e){return z(e).has(I(n.symbol))}function z(n){let e=le(n);return new Set([e,e.slice(0,Math.max(0,e.length-U(e).length))])}function H(n,e,t){if(e.length===0)return[];let o=S(n,t,{additive:!0,semantic:!1}),i=new Map;for(let l of t){let u=i.get(l.symbol)??[];u.push(l),i.set(l.symbol,u)}let r=new Map,s=[...e];for(;s.length>0;){let l=s.shift();if(!r.has(l.symbolId)){r.set(l.symbolId,l);for(let u of o.get(l.symbolId)??[])for(let a of i.get(u.symbol)??[])r.has(a.symbolId)||s.push(a)}}return[...r.values()].sort(ye)}function G(n){let e=[...n].sort((o,i)=>o.relativePath.localeCompare(i.relativePath)||o.startLine-i.startLine||i.endLine-o.endLine),t=[];for(let o of e)t.some(i=>J(i,o))||t.push(o);return t}function K(n,e){let t=e.text.split(`
2
2
  `);return{symbol:e.relativePath,shortName:e.relativePath,relativePath:e.relativePath,startLine:0,endLine:Math.max(0,t.length-1),language:n.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath)?.language??E(e.relativePath),source:e.text,freshness:e.freshness,...h(e.freshness)?{bindingClosure:y(n,e.relativePath,0,Math.max(0,t.length-1))}:{}}}function he(n,e){return v(n).filter(t=>e.some(o=>R(t,o))).length}function be(n,e,t){let o=[];return Z(o,n,e,t,0),o}function Z(n,e,t,o,i){for(let r of t){if(o.some(l=>R(r,l)))continue;let s=v(r.children).filter(l=>!o.some(u=>R(l,u))).length;n.push({symbol:r.symbol,shortName:r.shortName,relativePath:e,startLine:r.startLine,endLine:r.endLine,signature:r.signature,depth:i,nestedDefinitions:s}),Z(n,e,r.children,o,i+1)}}function v(n){return n.flatMap(e=>[e,...v(e.children)])}function Ce(n){return v(n).length}function R(n,e){return e.startLine<=n.startLine&&e.endLine>=n.endLine}function J(n,e){return n.relativePath===e.relativePath&&n.startLine<=e.startLine&&n.endLine>=e.endLine}function ye(n,e){return n.startLine-e.startLine||e.endLine-n.endLine||n.symbol.localeCompare(e.symbol)}function ve(n,e){return{selector:n,status:"matched",kind:"source",totalCandidates:1,results:[e],definitions:[],candidates:[],omittedCandidates:0,suggestions:[]}}function x(n,e,t){return{selector:e,status:"missing",kind:"source",totalCandidates:0,results:[],definitions:[],candidates:[],omittedCandidates:0,suggestions:$(n,e,5),reason:t}}function Q(n,e){try{return C(n,e)}catch(t){if(t instanceof F)return null;throw t}}function Le(n,e){if(!e.match)return[];let t=[e.match];for(let i of e.candidates){let r=g(n,i.relativePath).find(s=>s.symbol===i.symbol&&s.startLine===i.startLine);r&&t.push(r)}let o=new Set;return t.filter(i=>{let r=`${i.relativePath}:${i.startLine}:${i.endLine}:${i.symbol}`;return o.has(r)?!1:(o.add(r),!0)})}function V(n){return{symbol:n.symbol,shortName:L(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine}}function Y(n){let e=n.match(/^(.+):(\d+)-(\d+)$/);if(!e)return null;let t=Number(e[2]),o=Number(e[3]);if(!Number.isSafeInteger(t)||t<1)throw new RangeError(`Source range start line must be a positive integer, got "${e[2]}".`);if(!Number.isSafeInteger(o)||o<t)throw new RangeError(`Source range end line must be an integer at or after ${t}, got "${e[3]}".`);return{filePath:e[1],startLine:t,endLine:o}}function p(n,e,t){let o=n.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),i=C(n,e.relativePath);if(!i)return null;let s=i.text.split(`
3
3
  `),l=e.endLine<=e.startLine?j(n,e.relativePath,e.startLine,Number.MAX_SAFE_INTEGER):null,u=l?.unitType?l.unitStartLine:e.startLine,a=l?.unitType?l.unitEndLine:e.endLine,d=Math.max(0,u-t),c=Math.min(s.length-1,a+t),f=s.slice(d,c+1).join(`
4
4
  `);return{symbol:e.symbol,shortName:L(e.symbol),relativePath:e.relativePath,startLine:d,endLine:c,language:o?.language??E(e.relativePath),source:f,freshness:i.freshness,...h(i.freshness)?{bindingClosure:y(n,e.relativePath,d,c)}:{}}}function q(n,e,t,o,i){let r=C(n,e);if(!r)return null;let s=n.get("SELECT language FROM documents WHERE relative_path = ?",r.relativePath),u=r.text.split(`
5
5
  `);if(t>u.length)return null;let a=Math.max(0,t-1-i),d=Math.min(u.length-1,o-1+i),c=u.slice(a,d+1).join(`
6
6
  `);return{symbol:`${r.relativePath}:${t}-${o}`,shortName:`${r.relativePath}:${t}-${o}`,relativePath:r.relativePath,startLine:a,endLine:d,language:s?.language??E(r.relativePath),source:c,freshness:r.freshness,...h(r.freshness)?{bindingClosure:y(n,r.relativePath,a,d)}:{}}}function h(n){return!!(n&&n.semantic.state!=="stale"&&n.semantic.basis!=="no-compiler-document")}function E(n){switch(U(n).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{y as a,A as b,Ne as c,Ae as d,We as e};
7
- //# sourceMappingURL=chunk-YXJ4IAHH.js.map
7
+ //# sourceMappingURL=chunk-JCMFBF4Z.js.map