scip-query 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/CHANGELOG.md +257 -0
  2. package/README.md +11 -0
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/by-kind-XI2CSWEY.js +2 -0
  5. package/dist/call-graph-UONR6JR5.js +2 -0
  6. package/dist/{chunk-FGNCOQUX.js → chunk-2E7CX53V.js} +2 -2
  7. package/dist/chunk-2GRUZAQF.js +43 -0
  8. package/dist/{chunk-DPWKKNKI.js → chunk-2LDBDR6J.js} +2 -2
  9. package/dist/{chunk-JHH5SCZ3.js → chunk-2OOY75BW.js} +2 -2
  10. package/dist/{chunk-XGGBK66W.js → chunk-2R3V3PSD.js} +2 -2
  11. package/dist/chunk-2WC2OEDO.js +4 -0
  12. package/dist/{chunk-57N6LN2A.js → chunk-3AF4TUFK.js} +2 -2
  13. package/dist/{chunk-2RE5OCHZ.js → chunk-3D3QG236.js} +2 -2
  14. package/dist/{chunk-D2MVJSP4.js → chunk-3FHOF22C.js} +2 -2
  15. package/dist/{chunk-7XZGZBSQ.js → chunk-3JKSW6LJ.js} +2 -2
  16. package/dist/chunk-3L2ZBPEX.js +133 -0
  17. package/dist/{chunk-NVSZNESQ.js → chunk-3PJABJSU.js} +2 -2
  18. package/dist/{chunk-WOOAY3PA.js → chunk-3SVF22I5.js} +2 -2
  19. package/dist/{chunk-YAGYMBEX.js → chunk-3WR4E3A3.js} +2 -2
  20. package/dist/chunk-4FTZ4P5G.js +2 -0
  21. package/dist/{chunk-F24G5NBE.js → chunk-4ILJCCXV.js} +2 -2
  22. package/dist/chunk-4UX2F3JX.js +2 -0
  23. package/dist/chunk-4WNW27SX.js +2 -0
  24. package/dist/chunk-5ENOG4VP.js +61 -0
  25. package/dist/{chunk-RHHCLWQ6.js → chunk-64BFSI5I.js} +2 -2
  26. package/dist/chunk-66DVSJQG.js +455 -0
  27. package/dist/{chunk-ISWFRGJ6.js → chunk-6HFCYNYE.js} +2 -2
  28. package/dist/{chunk-Y2VM4CJC.js → chunk-6I6L7Z62.js} +2 -2
  29. package/dist/{chunk-CKRWA452.js → chunk-6PQNKL3G.js} +2 -2
  30. package/dist/{chunk-GPGRZJ3R.js → chunk-6V5CNXL6.js} +2 -2
  31. package/dist/chunk-6VVV4WRR.js +4 -0
  32. package/dist/{chunk-BDGTPN27.js → chunk-7BWFZPPZ.js} +2 -2
  33. package/dist/{chunk-25GWKRUZ.js → chunk-7CYG22FH.js} +2 -2
  34. package/dist/chunk-7F45LJKI.js +2 -0
  35. package/dist/{chunk-4TQU4TX2.js → chunk-7IWV2EG3.js} +2 -2
  36. package/dist/{chunk-UDY7MIAW.js → chunk-AFHTBORT.js} +2 -2
  37. package/dist/chunk-AVRYW5OZ.js +2 -0
  38. package/dist/chunk-B3PYOSCX.js +2 -0
  39. package/dist/{chunk-RNKPYYYE.js → chunk-B5D7QPBE.js} +2 -2
  40. package/dist/{chunk-FFJQZG6J.js → chunk-BBCIS4DX.js} +2 -2
  41. package/dist/chunk-BDUVI7TO.js +3 -0
  42. package/dist/{chunk-BVFYEEBH.js → chunk-BE7ZZTMC.js} +2 -2
  43. package/dist/{chunk-NEIQPFBI.js → chunk-BHVUJOCQ.js} +2 -2
  44. package/dist/chunk-BKVWUP7Y.js +2 -0
  45. package/dist/{chunk-IJMD6BRI.js → chunk-BQGB4HBD.js} +2 -2
  46. package/dist/{chunk-ERCYGVAM.js → chunk-BRV7PIFF.js} +2 -2
  47. package/dist/chunk-CEEZJXEF.js +2 -0
  48. package/dist/{chunk-BTVKZGWT.js → chunk-CIYLO6SI.js} +2 -2
  49. package/dist/chunk-CJZXN4NU.js +2 -0
  50. package/dist/{chunk-VXJJTQYE.js → chunk-CNO7TOKL.js} +2 -2
  51. package/dist/{chunk-ZZ3Z7D56.js → chunk-COF23M5F.js} +2 -2
  52. package/dist/{chunk-ZGW4HLPD.js → chunk-CWFP7GM5.js} +2 -2
  53. package/dist/chunk-D2DHWI3D.js +2 -0
  54. package/dist/{chunk-Q55NF3ZG.js → chunk-D4N5SQ2M.js} +2 -2
  55. package/dist/{chunk-LXQUF2RP.js → chunk-DBRSYFXR.js} +2 -2
  56. package/dist/{chunk-PXXYQK55.js → chunk-DHUIOLDT.js} +2 -2
  57. package/dist/{chunk-KZYID5KV.js → chunk-DIRJWYBM.js} +2 -2
  58. package/dist/{chunk-IKVNEGTW.js → chunk-DIUFNHRJ.js} +2 -2
  59. package/dist/{chunk-CLG6DWVS.js → chunk-DTZCKZEU.js} +2 -2
  60. package/dist/{chunk-Z2PZVKPR.js → chunk-DULC3QFP.js} +2 -2
  61. package/dist/{chunk-AYPDH2LU.js → chunk-DYGHBZ2N.js} +2 -2
  62. package/dist/{chunk-JJ62MTQH.js → chunk-E5R6AQ73.js} +2 -2
  63. package/dist/{chunk-BWVQP3LB.js → chunk-E73UNJTF.js} +2 -2
  64. package/dist/{chunk-GVOMSPGL.js → chunk-EG2CPZMJ.js} +2 -2
  65. package/dist/{chunk-56NQAEPJ.js → chunk-EKV5HX33.js} +2 -2
  66. package/dist/{chunk-GDRJB3SB.js → chunk-EQHFIL6T.js} +2 -2
  67. package/dist/{chunk-EWWY2ZFL.js → chunk-ESIQ66Z7.js} +2 -2
  68. package/dist/chunk-EVFUMY4R.js +3 -0
  69. package/dist/{chunk-ZYM4HOFA.js → chunk-F7DY272B.js} +2 -2
  70. package/dist/chunk-FBN2FGXG.js +2 -0
  71. package/dist/{chunk-AZS7YPCB.js → chunk-FDLOBR6P.js} +2 -2
  72. package/dist/chunk-FESCRNVV.js +5 -0
  73. package/dist/{chunk-URSGGIZX.js → chunk-FFRKR4EQ.js} +2 -2
  74. package/dist/chunk-FGA2U4OR.js +8 -0
  75. package/dist/{chunk-7YQOCABQ.js → chunk-FIQRSHVM.js} +2 -2
  76. package/dist/{chunk-KFVSJX25.js → chunk-FPYLNQPT.js} +2 -2
  77. package/dist/{chunk-FELGD32K.js → chunk-FRUSVINH.js} +2 -2
  78. package/dist/chunk-GAS2LJMP.js +3 -0
  79. package/dist/{chunk-OTSPRVNW.js → chunk-GSP44ENC.js} +2 -2
  80. package/dist/{chunk-K3XFWJI2.js → chunk-GUFSG5TX.js} +2 -2
  81. package/dist/chunk-GYIZ4NXB.js +2 -0
  82. package/dist/{chunk-2OXVP5U5.js → chunk-GZIUDL6G.js} +2 -2
  83. package/dist/chunk-HCXEQRFF.js +18 -0
  84. package/dist/{chunk-LO5JSW2C.js → chunk-HEHOQQKH.js} +2 -2
  85. package/dist/{chunk-U2N2KE7A.js → chunk-HKGFPJ4T.js} +2 -2
  86. package/dist/chunk-HLZTEXRA.js +2 -0
  87. package/dist/{chunk-EELPBR7E.js → chunk-HOENASQM.js} +2 -2
  88. package/dist/{chunk-VTCIYFEK.js → chunk-HVF5VBG6.js} +2 -2
  89. package/dist/{chunk-TH6IC56G.js → chunk-HYO3NP5Q.js} +2 -2
  90. package/dist/{chunk-OPSAW5DT.js → chunk-I55I7XXP.js} +2 -2
  91. package/dist/{chunk-DEAB5TGT.js → chunk-IDFEUFKS.js} +2 -2
  92. package/dist/{chunk-DJAO2OZJ.js → chunk-IHGQTTVW.js} +2 -2
  93. package/dist/{chunk-XU75YQN4.js → chunk-IICPE7B2.js} +2 -2
  94. package/dist/{chunk-GY7CCCEZ.js → chunk-IL676XCC.js} +2 -2
  95. package/dist/{chunk-4HE7MVWD.js → chunk-ILTDAWEF.js} +2 -2
  96. package/dist/chunk-IZDPJ2QI.js +2 -0
  97. package/dist/{chunk-5YRQIE2B.js → chunk-J66VOFW6.js} +2 -2
  98. package/dist/{chunk-SB25YMEQ.js → chunk-JFMEXGFE.js} +2 -2
  99. package/dist/{chunk-QLBSG7U5.js → chunk-JGKUET5J.js} +2 -2
  100. package/dist/{chunk-VZ7NXSHV.js → chunk-JS4PGXMV.js} +2 -2
  101. package/dist/{chunk-ZAZGGSM3.js → chunk-JTQVMR42.js} +2 -2
  102. package/dist/chunk-JWTGMPIT.js +80 -0
  103. package/dist/{chunk-5ZMBRQFC.js → chunk-JYR66JN5.js} +2 -2
  104. package/dist/chunk-KLFEXGQA.js +2 -0
  105. package/dist/chunk-KYSDI3GE.js +5 -0
  106. package/dist/{chunk-MSR2QRUE.js → chunk-L6PJPETJ.js} +2 -2
  107. package/dist/{chunk-VU6LIWHT.js → chunk-LDVT66YM.js} +2 -2
  108. package/dist/chunk-LEECKFCJ.js +2 -0
  109. package/dist/{chunk-H7CG6LOE.js → chunk-LMZ5PRUV.js} +2 -2
  110. package/dist/{chunk-ZPASRBLF.js → chunk-LQRQN2XA.js} +2 -2
  111. package/dist/{chunk-HISEUIL2.js → chunk-LXABEJX3.js} +2 -2
  112. package/dist/{chunk-WHADK6OS.js → chunk-M2O5NY6W.js} +2 -2
  113. package/dist/{chunk-Y334QQU5.js → chunk-MNV5FSBW.js} +2 -2
  114. package/dist/{chunk-RYOYJMGF.js → chunk-MPQ4OTBM.js} +2 -2
  115. package/dist/{chunk-6NC3YSPY.js → chunk-MV3CDXPI.js} +2 -2
  116. package/dist/{chunk-NRBNAECH.js → chunk-MWN53KRN.js} +2 -2
  117. package/dist/chunk-N2ZSIIGR.js +117 -0
  118. package/dist/chunk-N5B2NILC.js +5 -0
  119. package/dist/{chunk-Q6T2CAJL.js → chunk-NJITK2GP.js} +2 -2
  120. package/dist/{chunk-ENWQWA2R.js → chunk-NOGJXYFO.js} +2 -2
  121. package/dist/{chunk-V4NG5OMS.js → chunk-NOYBFVJA.js} +106 -106
  122. package/dist/chunk-NWQXSFFU.js +3 -0
  123. package/dist/chunk-ODDUPDP7.js +13 -0
  124. package/dist/{chunk-A77SCPW2.js → chunk-OLIWTZI3.js} +2 -2
  125. package/dist/{chunk-XFMVKFSF.js → chunk-OLNV6I6U.js} +2 -2
  126. package/dist/{chunk-QKT4UI2Y.js → chunk-OR2E3AGZ.js} +2 -2
  127. package/dist/chunk-OSR2GEHQ.js +2 -0
  128. package/dist/{chunk-5H5WTJSD.js → chunk-OSSESPDX.js} +2 -2
  129. package/dist/{chunk-KQHJEU6V.js → chunk-OWOOWNJ5.js} +2 -2
  130. package/dist/{chunk-GRX7JOXQ.js → chunk-P42EIXTA.js} +2 -2
  131. package/dist/{chunk-AQ2PORIO.js → chunk-PJFGPYTU.js} +2 -2
  132. package/dist/{chunk-LRI5OMPE.js → chunk-PP7KNN7L.js} +2 -2
  133. package/dist/{chunk-PLJUQFQN.js → chunk-PU7T5QYQ.js} +2 -2
  134. package/dist/{chunk-JUN5DOAK.js → chunk-PWWAJSKV.js} +2 -2
  135. package/dist/{chunk-7IQXARSQ.js → chunk-PZL5T7SU.js} +2 -2
  136. package/dist/{chunk-UAQ4T73O.js → chunk-QBE3YX64.js} +2 -2
  137. package/dist/{chunk-3TJY6M3B.js → chunk-QGVTFRY2.js} +2 -2
  138. package/dist/chunk-QOJONDS7.js +2 -0
  139. package/dist/chunk-QU5XRYB5.js +4 -0
  140. package/dist/{chunk-2KVU55CW.js → chunk-QUU5OBVK.js} +2 -2
  141. package/dist/{chunk-Q5TA4OY4.js → chunk-RBLQNW26.js} +2 -2
  142. package/dist/chunk-RTQ7NEKG.js +81 -0
  143. package/dist/{chunk-F24QUEQP.js → chunk-SQXRS7BG.js} +2 -2
  144. package/dist/chunk-SSK6LDPC.js +2 -0
  145. package/dist/chunk-SZHGTCPP.js +7 -0
  146. package/dist/chunk-T4N4P2K5.js +16 -0
  147. package/dist/chunk-TA3QKLLU.js +2 -0
  148. package/dist/chunk-TEBQMNVI.js +43 -0
  149. package/dist/{chunk-NK3JMP22.js → chunk-TPFHAQ2G.js} +2 -2
  150. package/dist/chunk-TQPCBMWT.js +5 -0
  151. package/dist/{chunk-HG722PO7.js → chunk-TRNAEQ6P.js} +2 -2
  152. package/dist/chunk-TY7CRN3Z.js +2 -0
  153. package/dist/{chunk-7XA3OM44.js → chunk-UHFYCMZO.js} +2 -2
  154. package/dist/{chunk-ARVO6TTW.js → chunk-UICY4GTQ.js} +2 -2
  155. package/dist/{chunk-SWK4XPUS.js → chunk-UVGEWT4Y.js} +2 -2
  156. package/dist/{chunk-GIQ6CSL4.js → chunk-UXW33INU.js} +2 -2
  157. package/dist/{chunk-RDULNRSJ.js → chunk-VMPRET3I.js} +2 -2
  158. package/dist/{chunk-I6UTXNHU.js → chunk-VNLGKHS6.js} +2 -2
  159. package/dist/{chunk-44T4DUAA.js → chunk-VQILFTEH.js} +2 -2
  160. package/dist/{chunk-N7FP5H5U.js → chunk-VUPHCS7Y.js} +8 -8
  161. package/dist/{chunk-JAT6C3VX.js → chunk-VVZSBTSU.js} +2 -2
  162. package/dist/{chunk-FBCVASUG.js → chunk-VZRNID6A.js} +2 -2
  163. package/dist/{chunk-TUQIPUDS.js → chunk-W5OXRYGE.js} +2 -2
  164. package/dist/chunk-W6STWDQI.js +57 -0
  165. package/dist/chunk-W7CXK74K.js +2 -0
  166. package/dist/chunk-WB3WYIRE.js +4 -0
  167. package/dist/{chunk-C76O5MDS.js → chunk-WDNVY4E7.js} +2 -2
  168. package/dist/{chunk-TAYD3AE7.js → chunk-WIWY3CRX.js} +2 -2
  169. package/dist/chunk-WK46TNUM.js +3 -0
  170. package/dist/chunk-WNTFFKAX.js +12 -0
  171. package/dist/{chunk-JFQBRL3J.js → chunk-WOIKCX6A.js} +2 -2
  172. package/dist/{chunk-PIFTZEEM.js → chunk-WUN6KBHV.js} +2 -2
  173. package/dist/chunk-WYCTJDVR.js +2 -0
  174. package/dist/chunk-WYPL7GF7.js +2 -0
  175. package/dist/{chunk-XN22RGSR.js → chunk-XBGWL66K.js} +2 -2
  176. package/dist/{chunk-R6M456QG.js → chunk-XDQMU3BT.js} +2 -2
  177. package/dist/{chunk-XJX6LGHL.js → chunk-XFA4SSO3.js} +2 -2
  178. package/dist/{chunk-2YC7YNKT.js → chunk-XGZEP6GR.js} +2 -2
  179. package/dist/chunk-XPDPNWTQ.js +368 -0
  180. package/dist/chunk-XRYABF57.js +8 -0
  181. package/dist/{chunk-YIHNPKWD.js → chunk-YBGKCQIS.js} +2 -2
  182. package/dist/{chunk-2XCGSDIT.js → chunk-YEN6CYC7.js} +2 -2
  183. package/dist/{chunk-VMWUV6WB.js → chunk-YF5IB2LF.js} +2 -2
  184. package/dist/{chunk-TNG2FYS5.js → chunk-YI2AWIHC.js} +2 -2
  185. package/dist/{chunk-EELG7D3Q.js → chunk-YPWBKGFU.js} +2 -2
  186. package/dist/{chunk-GQIDEID3.js → chunk-YPWHBBIS.js} +2 -2
  187. package/dist/{chunk-TKDNDQA7.js → chunk-YSH6U3L4.js} +2 -2
  188. package/dist/{chunk-BUTEIZKP.js → chunk-YU5DZUZI.js} +2 -2
  189. package/dist/chunk-YWO5DDRC.js +16 -0
  190. package/dist/{chunk-6HRZQLOI.js → chunk-Z4CDXYNQ.js} +2 -2
  191. package/dist/{chunk-XSWYJCAK.js → chunk-ZF5KHH7C.js} +2 -2
  192. package/dist/chunk-ZOHS7AQV.js +21 -0
  193. package/dist/{chunk-7U2YQSDE.js → chunk-ZTI4SBFV.js} +2 -2
  194. package/dist/cli-main.js +2 -2
  195. package/dist/code-MI6F2TTU.js +2 -0
  196. package/dist/code-result-json-FXALY4HE.js +2 -0
  197. package/dist/{command-descriptors-ORNTVNYV.js → command-descriptors-P34VABY5.js} +136 -135
  198. package/dist/dataflow-4KEMJPC6.js +2 -0
  199. package/dist/dependence-slice-R7FPWD5M.js +2 -0
  200. package/dist/deps-7EMQUYUT.js +2 -0
  201. package/dist/direct-navigation-6YO234F2.js +3 -0
  202. package/dist/entry-map-KOOLR26E.js +2 -0
  203. package/dist/files-OPIPJIGZ.js +2 -0
  204. package/dist/hierarchy-QPD2CAER.js +2 -0
  205. package/dist/imports-M6HUXRXC.js +2 -0
  206. package/dist/index.js +1 -1
  207. package/dist/members-I5MEFOCT.js +2 -0
  208. package/dist/methods-5JYGGHXA.js +2 -0
  209. package/dist/output-continuation-command-UPQAAKBP.js +3 -0
  210. package/dist/postinstall.js +1 -1
  211. package/dist/project-reindex-UKKQ5PLS.js +3 -0
  212. package/dist/queries/affected.js +1 -1
  213. package/dist/queries/anchors.js +1 -1
  214. package/dist/queries/architecture.js +1 -1
  215. package/dist/queries/bottlenecks.js +1 -1
  216. package/dist/queries/by-kind.js +1 -1
  217. package/dist/queries/call-graph.js +1 -1
  218. package/dist/queries/change-surface.js +1 -1
  219. package/dist/queries/cleanup-plan.js +1 -1
  220. package/dist/queries/co-change.js +1 -1
  221. package/dist/queries/code.js +1 -1
  222. package/dist/queries/complexity-hotspots.js +1 -1
  223. package/dist/queries/complexity.js +1 -1
  224. package/dist/queries/context.js +1 -1
  225. package/dist/queries/convergence.js +1 -1
  226. package/dist/queries/coupling.js +1 -1
  227. package/dist/queries/cycles.js +1 -1
  228. package/dist/queries/dataflow.js +1 -1
  229. package/dist/queries/dead.js +1 -1
  230. package/dist/queries/decorative-checkers.js +1 -1
  231. package/dist/queries/deep-chains.js +1 -1
  232. package/dist/queries/dependence-slice.js +1 -1
  233. package/dist/queries/dependency-depth.js +1 -1
  234. package/dist/queries/deps.js +1 -1
  235. package/dist/queries/diff-impact.d.ts +9 -0
  236. package/dist/queries/diff-impact.js +1 -1
  237. package/dist/queries/doc-drift.js +1 -1
  238. package/dist/queries/drift.js +1 -1
  239. package/dist/queries/duplicate-bodies.js +1 -1
  240. package/dist/queries/entry-map.js +1 -1
  241. package/dist/queries/evidence.js +1 -1
  242. package/dist/queries/extract-candidates.js +1 -1
  243. package/dist/queries/fan.js +1 -1
  244. package/dist/queries/files.js +1 -1
  245. package/dist/queries/health.js +1 -1
  246. package/dist/queries/hierarchy.js +1 -1
  247. package/dist/queries/hotspots.js +1 -1
  248. package/dist/queries/imports.js +1 -1
  249. package/dist/queries/incomplete-migration.js +1 -1
  250. package/dist/queries/index.js +1 -1
  251. package/dist/queries/isolated.js +1 -1
  252. package/dist/queries/locality-candidates.js +1 -1
  253. package/dist/queries/members.js +1 -1
  254. package/dist/queries/methods.js +1 -1
  255. package/dist/queries/not-implemented.js +1 -1
  256. package/dist/queries/outline.js +1 -1
  257. package/dist/queries/passthrough-candidates.js +1 -1
  258. package/dist/queries/plan-context.js +1 -1
  259. package/dist/queries/react-component-duplicates.js +1 -1
  260. package/dist/queries/react-hook-candidates.js +1 -1
  261. package/dist/queries/react-large-component-pressure.js +1 -1
  262. package/dist/queries/recent-duplicates.js +1 -1
  263. package/dist/queries/redundant-reexports.js +1 -1
  264. package/dist/queries/reference-neighborhood.js +1 -1
  265. package/dist/queries/reference-reachability.js +1 -1
  266. package/dist/queries/refs.js +1 -1
  267. package/dist/queries/self-audit.js +1 -1
  268. package/dist/queries/similar-chains.js +1 -1
  269. package/dist/queries/similar-files.js +1 -1
  270. package/dist/queries/similar-signatures.js +1 -1
  271. package/dist/queries/similar.js +1 -1
  272. package/dist/queries/slice.js +1 -1
  273. package/dist/queries/source-inspection.js +1 -1
  274. package/dist/queries/source-search.js +1 -1
  275. package/dist/queries/stale-abstractions.js +1 -1
  276. package/dist/queries/surface.js +1 -1
  277. package/dist/queries/symbols.js +1 -1
  278. package/dist/queries/system-map.js +1 -1
  279. package/dist/queries/system.js +1 -1
  280. package/dist/queries/test-quality.js +1 -1
  281. package/dist/queries/trace.js +1 -1
  282. package/dist/queries/twin-ab.js +1 -1
  283. package/dist/queries/twin-drift.js +1 -1
  284. package/dist/queries/unused-imports.js +1 -1
  285. package/dist/queries/unused-params.js +1 -1
  286. package/dist/queries/value-flow.js +1 -1
  287. package/dist/queries/vue-component-duplicates.js +1 -1
  288. package/dist/queries/vue-composable-candidates.js +1 -1
  289. package/dist/queries/vue-large-view-pressure.js +1 -1
  290. package/dist/queries/wrapper-candidates.js +1 -1
  291. package/dist/query-service-server.js +3 -3
  292. package/dist/refs-PSU4JZZW.js +2 -0
  293. package/dist/refs-pagination-JG6CJMRC.js +2 -0
  294. package/dist/reindex-worker.js +25 -25
  295. package/dist/reindex.d.ts +3 -2
  296. package/dist/reindex.js +35 -35
  297. package/dist/runtime.d.ts +34 -2
  298. package/dist/runtime.js +4 -4
  299. package/dist/rust-semantic-session-server.js +1 -1
  300. package/dist/rust-semantic-session-worker.js +1 -1
  301. package/dist/rust-semantic-worker.js +1 -1
  302. package/dist/{scip-cli-H-n59izO.d.ts → scip-cli-DOerTq-R.d.ts} +42 -4
  303. package/dist/slice-HYRATV64.js +2 -0
  304. package/dist/surface-VTGDYWF5.js +2 -0
  305. package/dist/symbol-resolution-WD5EU5JE.js +2 -0
  306. package/dist/system-LRQNFOR2.js +2 -0
  307. package/dist/trace-F4B6OLL4.js +2 -0
  308. package/dist/typescript-mailbox-worker.js +1 -1
  309. package/dist/value-flow-VRPZY72V.js +2 -0
  310. package/dist/watch-server.js +3 -3
  311. package/package.json +1 -1
  312. package/dist/by-kind-4IYG2SKW.js +0 -2
  313. package/dist/call-graph-WQNXMNNN.js +0 -2
  314. package/dist/chunk-2BTJALUS.js +0 -454
  315. package/dist/chunk-3QXC54FQ.js +0 -3
  316. package/dist/chunk-42W3LFUK.js +0 -13
  317. package/dist/chunk-4GAQ6FI4.js +0 -43
  318. package/dist/chunk-6VEFRPTD.js +0 -5
  319. package/dist/chunk-7C26EKLZ.js +0 -4
  320. package/dist/chunk-7JYHQAH2.js +0 -22
  321. package/dist/chunk-7KSO2OAP.js +0 -2
  322. package/dist/chunk-AK3PYTIK.js +0 -5
  323. package/dist/chunk-AMIMMNA4.js +0 -11
  324. package/dist/chunk-AUY5BL74.js +0 -2
  325. package/dist/chunk-BDHFVH2M.js +0 -18
  326. package/dist/chunk-BECZLYNU.js +0 -8
  327. package/dist/chunk-BYDAFMSR.js +0 -57
  328. package/dist/chunk-BZYSGZRK.js +0 -2
  329. package/dist/chunk-C7IJMOFP.js +0 -134
  330. package/dist/chunk-CBBHFNLX.js +0 -2
  331. package/dist/chunk-D35XIZGN.js +0 -2
  332. package/dist/chunk-DKM723YF.js +0 -79
  333. package/dist/chunk-E44IVWIJ.js +0 -367
  334. package/dist/chunk-EDMB6SSO.js +0 -7
  335. package/dist/chunk-EETGXQY7.js +0 -3
  336. package/dist/chunk-FKGQOTKD.js +0 -2
  337. package/dist/chunk-GH5YSGZL.js +0 -5
  338. package/dist/chunk-HCVJR2V4.js +0 -3
  339. package/dist/chunk-HXOU4XNH.js +0 -3
  340. package/dist/chunk-IMKZEXZG.js +0 -2
  341. package/dist/chunk-ISIQLPJ2.js +0 -61
  342. package/dist/chunk-IXESDH3J.js +0 -2
  343. package/dist/chunk-JT6XX7QY.js +0 -8
  344. package/dist/chunk-MHIEP7EG.js +0 -4
  345. package/dist/chunk-OJNK5ALA.js +0 -2
  346. package/dist/chunk-OXYAWIEA.js +0 -2
  347. package/dist/chunk-OZETODHH.js +0 -2
  348. package/dist/chunk-PBUH2P5S.js +0 -3
  349. package/dist/chunk-PLYUVM4F.js +0 -2
  350. package/dist/chunk-Q7GBK5T7.js +0 -81
  351. package/dist/chunk-QWKHW6VZ.js +0 -2
  352. package/dist/chunk-RPL3ARU7.js +0 -16
  353. package/dist/chunk-SVHTMVA4.js +0 -4
  354. package/dist/chunk-T6QD2ZQB.js +0 -43
  355. package/dist/chunk-TD7VKJ2Y.js +0 -117
  356. package/dist/chunk-TUSPIVZ3.js +0 -4
  357. package/dist/chunk-UT7TADJX.js +0 -2
  358. package/dist/chunk-VUSKPCUB.js +0 -2
  359. package/dist/chunk-WN3TCGJ4.js +0 -2
  360. package/dist/chunk-WSLEJSFR.js +0 -2
  361. package/dist/chunk-WYZIHUPZ.js +0 -16
  362. package/dist/chunk-XE33FV5W.js +0 -2
  363. package/dist/chunk-Z2AWCTN6.js +0 -2
  364. package/dist/chunk-ZOXKSQQB.js +0 -2
  365. package/dist/code-EQJFDT6I.js +0 -2
  366. package/dist/code-result-json-7UWIWBOO.js +0 -2
  367. package/dist/dataflow-6VL54GX5.js +0 -2
  368. package/dist/dependence-slice-DT2NUHD2.js +0 -2
  369. package/dist/deps-DB7H5IKC.js +0 -2
  370. package/dist/direct-navigation-O3LUAYWQ.js +0 -3
  371. package/dist/entry-map-6K62RV3D.js +0 -2
  372. package/dist/files-MSLD7MO6.js +0 -2
  373. package/dist/hierarchy-IVBXAKFA.js +0 -2
  374. package/dist/imports-FRAVZ3Y2.js +0 -2
  375. package/dist/members-KJOJDYGO.js +0 -2
  376. package/dist/methods-2AYABBT3.js +0 -2
  377. package/dist/output-continuation-command-JHMPH6NC.js +0 -3
  378. package/dist/project-reindex-HYO4WD7Z.js +0 -3
  379. package/dist/refs-ARMA6XUJ.js +0 -2
  380. package/dist/refs-pagination-VUGIWN6U.js +0 -2
  381. package/dist/slice-YOB5YFAM.js +0 -2
  382. package/dist/surface-VY5EFWTW.js +0 -2
  383. package/dist/symbol-resolution-DGQN4XIV.js +0 -2
  384. package/dist/system-2KQ3QD2P.js +0 -2
  385. package/dist/trace-HTIPTXAE.js +0 -2
  386. package/dist/value-flow-5FV3VQI7.js +0 -2
@@ -1,4 +1,4 @@
1
- import{a as _}from"./chunk-P5XHIJHI.js";import{d as P,w as E,y as M}from"./chunk-Q7GBK5T7.js";import{execFileSync as U}from"child_process";var L=2e3,S=50,J=64,Y=8,V=3,W=2160*60*60,X=/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i,Z=3,Q=/#\d+|\b[A-Z][A-Z0-9]+-\d+\b/g,q=/^([a-z][a-z0-9-]+)(?:\([^)]+\))?!?:/i;function tt(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r)=>{let o=r??H(i.config.projectRoot);if(!o)return null;let s=e.has(i)?e.get(i,()=>({head:"",value:null})):null;return s&&s.head===o?s.value:(e.invalidate(i),e.get(i,()=>({head:o,value:n(i.config.projectRoot,o)})).value)}}function F(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r,o)=>{let s=o??H(i.config.projectRoot);if(!s)return null;let c=e.has(i)?e.get(i,()=>({head:"",values:new Map})):null;(!c||c.head!==s)&&e.invalidate(i);let l=e.get(i,()=>({head:s,values:new Map}));if(l.values.has(n))return l.values.get(n)??null;let d=r(i.config.projectRoot,s);return l.values.set(n,d),d}}var et=F("git-commit-history");function nt(t,e={}){let i=e.historyMode??"bounded",n=e.head;return{capability:r=>it(t,r,n),commitHistory:()=>x(t,i,n),fileChurn:()=>st(t,i,n),changeAmplification:()=>at(t,i,n),trackedFiles:()=>lt(t,n),fileAddRecords:()=>dt(t,i,n),coChangePairs:(r={})=>bt(t,r,i,n),coChangePairsForFiles:(r,o={})=>z(t,r,o,i,n),directionalCoChangePairsForFiles:(r,o={})=>yt(t,r,o,i,n)}}function x(t,e="bounded",i){return et(t,y(e),(n,r)=>rt(n,r,e),i)}function it(t,e,i){let n=i??H(t.config.projectRoot);return n?{slot:e,available:!0,head:n}:{slot:e,available:!1,head:null,reason:"git history is unavailable for this project"}}function H(t){try{return C(t,["rev-parse","HEAD"]).trim()||null}catch{return null}}function C(t,e){return U("git",["-C",t,...e],{encoding:"utf-8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"})}function rt(t,e,i){let n;try{n=C(t,["log","--no-merges","--name-only",...R(i),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}return{head:e,...w(n,S)}}function ot(t){return X.test(t.subject)}function st(t,e,i){let n=x(t,e,i);if(!n)return null;let r=new Map;for(let o of n.commits){let s=ot(o);for(let c of o.files){let l=r.get(c)??{changes:0,fixChanges:0,lastChangedAt:0};l.changes+=1,s&&(l.fixChanges+=1),o.timestamp>l.lastChangedAt&&(l.lastChangedAt=o.timestamp),r.set(c,l)}}return r}function at(t,e,i){let n=x(t,e,i);if(!n||n.commits.length===0)return null;let r=n.commits.map(o=>o.files.length).filter(o=>o>0).sort((o,s)=>o-s);return r.length===0?null:{medianFilesPerCommit:O(r,.5),p90FilesPerCommit:O(r,.9),commitsAnalyzed:r.length}}function O(t,e){let i=Math.min(t.length-1,Math.floor(t.length*e));return t[i]}var ct=tt("git-tracked-files");function lt(t,e){return ct(t,i=>{try{let n=C(i,["ls-files"]);return new Set(n.split(`
1
+ import{a as _}from"./chunk-P5XHIJHI.js";import{c as E,e as M}from"./chunk-FESCRNVV.js";import{d as P}from"./chunk-JWTGMPIT.js";import{execFileSync as U}from"child_process";var L=2e3,S=50,J=64,Y=8,V=3,W=2160*60*60,X=/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i,Z=3,Q=/#\d+|\b[A-Z][A-Z0-9]+-\d+\b/g,q=/^([a-z][a-z0-9-]+)(?:\([^)]+\))?!?:/i;function tt(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r)=>{let o=r??H(i.config.projectRoot);if(!o)return null;let s=e.has(i)?e.get(i,()=>({head:"",value:null})):null;return s&&s.head===o?s.value:(e.invalidate(i),e.get(i,()=>({head:o,value:n(i.config.projectRoot,o)})).value)}}function F(t){let e=P(t,{clearGroups:["whole-project"]});return(i,n,r,o)=>{let s=o??H(i.config.projectRoot);if(!s)return null;let c=e.has(i)?e.get(i,()=>({head:"",values:new Map})):null;(!c||c.head!==s)&&e.invalidate(i);let l=e.get(i,()=>({head:s,values:new Map}));if(l.values.has(n))return l.values.get(n)??null;let d=r(i.config.projectRoot,s);return l.values.set(n,d),d}}var et=F("git-commit-history");function nt(t,e={}){let i=e.historyMode??"bounded",n=e.head;return{capability:r=>it(t,r,n),commitHistory:()=>x(t,i,n),fileChurn:()=>st(t,i,n),changeAmplification:()=>at(t,i,n),trackedFiles:()=>lt(t,n),fileAddRecords:()=>dt(t,i,n),coChangePairs:(r={})=>bt(t,r,i,n),coChangePairsForFiles:(r,o={})=>z(t,r,o,i,n),directionalCoChangePairsForFiles:(r,o={})=>yt(t,r,o,i,n)}}function x(t,e="bounded",i){return et(t,y(e),(n,r)=>rt(n,r,e),i)}function it(t,e,i){let n=i??H(t.config.projectRoot);return n?{slot:e,available:!0,head:n}:{slot:e,available:!1,head:null,reason:"git history is unavailable for this project"}}function H(t){try{return C(t,["rev-parse","HEAD"]).trim()||null}catch{return null}}function C(t,e){return U("git",["-C",t,...e],{encoding:"utf-8",maxBuffer:64*1024*1024,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"})}function rt(t,e,i){let n;try{n=C(t,["log","--no-merges","--name-only",...R(i),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}return{head:e,...w(n,S)}}function ot(t){return X.test(t.subject)}function st(t,e,i){let n=x(t,e,i);if(!n)return null;let r=new Map;for(let o of n.commits){let s=ot(o);for(let c of o.files){let l=r.get(c)??{changes:0,fixChanges:0,lastChangedAt:0};l.changes+=1,s&&(l.fixChanges+=1),o.timestamp>l.lastChangedAt&&(l.lastChangedAt=o.timestamp),r.set(c,l)}}return r}function at(t,e,i){let n=x(t,e,i);if(!n||n.commits.length===0)return null;let r=n.commits.map(o=>o.files.length).filter(o=>o>0).sort((o,s)=>o-s);return r.length===0?null:{medianFilesPerCommit:O(r,.5),p90FilesPerCommit:O(r,.9),commitsAnalyzed:r.length}}function O(t,e){let i=Math.min(t.length-1,Math.floor(t.length*e));return t[i]}var ct=tt("git-tracked-files");function lt(t,e){return ct(t,i=>{try{let n=C(i,["ls-files"]);return new Set(n.split(`
2
2
  `).map(r=>r.trim()).filter(r=>r!==""))}catch{return null}},e)}var ut=F("git-file-adds"),D="__git__/file-adds",k=E({kind:"git-file-adds",invalidation:M("git-file-adds"),serialize:gt,deserialize:ft});function _t(t){return nt(t).fileAddRecords()}function dt(t,e,i){let n=y(e);return ut(t,n,(r,o)=>mt(t,r,o,e),i)}function mt(t,e,i,n){let r=k.read(t,I(n),i);if(r)return r;let o=ht(e,n);return o&&k.write(t,I(n),i,o),o}function gt(t){return JSON.stringify([...t.entries()])}function ft(t){if(!t)return null;try{let e=JSON.parse(t);if(!Array.isArray(e))return null;let i=new Map;for(let n of e){if(!Array.isArray(n)||n.length!==2||typeof n[0]!="string")return null;let r=n[1];if(!r||typeof r.commitsAgo!="number"||!Number.isFinite(r.commitsAgo)||typeof r.addedAt!="number"||!Number.isFinite(r.addedAt))return null;i.set(n[0],{commitsAgo:r.commitsAgo,addedAt:r.addedAt})}return i}catch{return null}}function ht(t,e){let i;try{i=C(t,["log","--no-merges","--find-renames","--name-status",...R(e),"--pretty=format:%x01%H%x00%ct%x00%s"])}catch{return null}let n=new Map,r=new Map,o=-1;for(let s of i.split("")){if(s.trim()==="")continue;o+=1;let c=s.indexOf(`
3
3
  `),l=c>=0?s.slice(0,c):s,[,d]=l.split("\0"),f=Number(d)||0;if(!(c<0))for(let u of s.slice(c+1).split(`
4
4
  `)){let a=pt(u);if(!a)continue;if(a.status==="R"&&a.from&&a.to){let p=r.get(a.to)??new Set([a.to]);r.set(a.from,p);continue}if(a.status!=="A"||!a.to)continue;let m={commitsAgo:o,addedAt:f};n.set(a.to,m);for(let p of r.get(a.to)??[])n.set(p,m)}}return n}function pt(t){let e=t.trim().split(" "),i=e[0]??"";if(!i)return null;let n=i[0]??"";if(n==="R"){let o=e[1],s=e[2];return o&&s?{status:n,from:o,to:s}:null}let r=e[1];return r?{status:n,to:r}:null}var j=F("git-co-change-pairs"),Ct=F("git-directional-co-change-pairs");function bt(t,e,i,n){let r=`all\0${y(i)}\0${T(e)}`,o=j(t,r,()=>{let s=x(t,i,n);return s?G(s,e):null},n);return o&&[...o]}function z(t,e,i,n,r){if(e.size===0)return[];let o=`files\0${y(n)}\0${N(e)}\0${T(i)}`,s=j(t,o,()=>{let c=x(t,n,r);return c?G(c,i,e):null},r);return s&&[...s]}function yt(t,e,i,n,r){if(e.size===0)return[];let o=i.maxFilesPerCommit??S;if(e.size>J)return z(t,e,i,n,r);let s=`directional\0${y(n)}\0${N(e)}\0${T({...i,maxFilesPerCommit:o})}`,c=Ct(t,s,(l,d)=>{let f=At(l,d,e,o,n);return f?G(f,i,e):null},r);return c&&[...c]}function T(t){let e=t.minTogether??4,i=t.minConfidence??.6,n=t.maxFilesPerCommit??S;return`${e}\0${i}\0${n}`}function N(t){return[...t].sort().join("\0")}function G(t,e,i){let{minTogether:n=4,minConfidence:r=.6,maxFilesPerCommit:o=S}=e,s=new Map,c=new Map,l=t.newestAnalyzedAt??0;for(let u of t.commits){let a=[...new Set(u.files)].sort();if(a.length>o)continue;t.newestAnalyzedAt===void 0&&u.timestamp>l&&(l=u.timestamp);let m=Ft(a),p=i===void 0||a.some(g=>i.has(g));for(let g of a)s.set(g,(s.get(g)??0)+1);if(p)for(let g=0;g<a.length;g++)for(let b=g+1;b<a.length;b++){if(i&&!i.has(a[g])&&!i.has(a[b]))continue;let A=`${a[g]}\0${a[b]}`,h=c.get(A)??{together:0,focusedTogether:0,broadTogether:0,lastTogetherAt:0,timestamps:[],subjects:[]};h.together+=1,m?h.broadTogether+=1:h.focusedTogether+=1,u.timestamp>h.lastTogetherAt&&(h.lastTogetherAt=u.timestamp),h.timestamps.push(u.timestamp),h.subjects.push(u.subject),c.set(A,h)}}let d=[],f=l-W;for(let[u,a]of c){let m=a.together;if(m<n)continue;let[p,g]=u.split("\0"),b=s.get(p)??m,A=s.get(g)??m,h=Math.max(m/b,m/A);if(h<r)continue;let $=a.broadTogether/m,v=a.timestamps.filter(K=>K>=f).length;d.push({fileA:p,fileB:g,together:m,confidence:h,changesA:b,changesB:A,focusedTogether:a.focusedTogether,broadTogether:a.broadTogether,broadCommitRatio:$,lastTogetherAt:a.lastTogetherAt,recentTogether:v,commitScope:Pt(a.broadTogether,m),recency:v>0?"recent":"stale",subjectContext:Ht(a.subjects)})}return d.sort((u,a)=>a.together-u.together||a.confidence-u.confidence||u.fileA.localeCompare(a.fileA)),d}function At(t,e,i,n,r){let o;try{o=xt(t,r)}catch{return null}if(o.length===0)return{head:e,commits:[],skippedBulkCommits:0,newestAnalyzedAt:0};let s;try{s=C(t,["log","--no-merges","--format=%H",...R(r),"--",...[...i].sort()])}catch{return null}let c=new Set(o.map(a=>a.hash)),l=s.split(`
@@ -6,4 +6,4 @@ import{a as _}from"./chunk-P5XHIJHI.js";import{d as P,w as E,y as M}from"./chunk
6
6
  `).map(n=>n.trim()).filter(n=>n!=="").map(n=>{let[r,o]=n.split("\0");return{hash:r??"",timestamp:Number(o)||0}}).filter(n=>n.hash!=="")}function R(t){return t==="full"?[]:["-n",String(B())]}function B(){return _(process.env.SCIP_QUERY_GIT_HISTORY_MAX_COMMITS)??L}function y(t){return t==="full"?"full":`bounded:${B()}`}function I(t){let e=y(t);return e===`bounded:${L}`?D:`${D}:${e}`}function St(t,e,i){for(let r=0;r<e.length;r+=20){let o=e.slice(r,r+20),s;try{s=C(t,["show","--no-walk=unsorted","--name-only","--pretty=format:%x01%H%x00%ct%x00%s",...o.map(l=>l.hash)])}catch{return e[0]?.timestamp??0}let c=w(s,i);if(c.commits.length>0)return c.commits[0].timestamp}return 0}function w(t,e){let i=[],n=0;for(let r of t.split("")){if(r.trim()==="")continue;let o=r.indexOf(`
7
7
  `),s=o>=0?r.slice(0,o):r,[c,l,d]=s.split("\0");if(!c||!l)continue;let f=o>=0?r.slice(o+1).split(`
8
8
  `).map(u=>u.trim()).filter(u=>u!==""):[];if(f.length>e){n+=1;continue}i.push({hash:c,timestamp:Number(l)||0,subject:d??"",files:f})}return{commits:i,skippedBulkCommits:n}}function Ft(t){return t.length>=Y?!0:Rt(t).size>=V}function Rt(t){let e=new Set;for(let i of t){let n=i.indexOf("/");e.add(n>=0?i.slice(0,n):".")}return e}function Pt(t,e){return t===0?"focused":t/e>=.5?"broad-sweep":"mixed"}function Ht(t){let e=new Set,i=[],n=[];for(let r of t){!n.includes(r)&&n.length<Z&&n.push(r);for(let o of Tt(r))e.add(o);for(let o of r.match(Q)??[])i.includes(o)||i.push(o)}return{subjectLabels:[...e].sort(),issueRefs:i,sampleSubjects:n,externalIssueLabelStatus:"unavailable"}}function Tt(t){let e=new Set,i=q.exec(t)?.[1]?.toLowerCase();return i&&e.add(Gt(i)),/\b(?:feat|feature)\b/i.test(t)&&e.add("feature"),/\b(?:fix(?:es|ed)?|bug|regression|hotfix)\b/i.test(t)&&e.add("fix"),/\b(?:docs?|documentation|guide|readme)\b/i.test(t)&&e.add("docs"),/\brefactor(?:ing|ed)?\b/i.test(t)&&e.add("refactor"),/\btests?\b/i.test(t)&&e.add("test"),/\b(?:release|version|v\d+\.\d+)\b/i.test(t)&&e.add("release"),/\bchore\b/i.test(t)&&e.add("chore"),/\bbuild\b/i.test(t)&&e.add("build"),/\bci\b/i.test(t)&&e.add("ci"),/\bperf(?:ormance)?\b/i.test(t)&&e.add("perf"),[...e]}function Gt(t){return t==="feat"?"feature":t}export{nt as a,C as b,_t as c};
9
- //# sourceMappingURL=chunk-ISWFRGJ6.js.map
9
+ //# sourceMappingURL=chunk-6HFCYNYE.js.map
@@ -1,2 +1,2 @@
1
- import{c as r}from"./chunk-RDULNRSJ.js";function s(o,e,t={}){if(e.length===0)throw new Error("The source search pattern must not be empty.");return r(o,[e],t)[0]}export{s as a};
2
- //# sourceMappingURL=chunk-Y2VM4CJC.js.map
1
+ import{c as r}from"./chunk-VMPRET3I.js";function s(o,e,t={}){if(e.length===0)throw new Error("The source search pattern must not be empty.");return r(o,[e],t)[0]}export{s as a};
2
+ //# sourceMappingURL=chunk-6I6L7Z62.js.map
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{$b as s,Bb as E,Ib as I,Sb as x,Ub as V,dc as k,eb as S,ec as A,mc as b}from"./chunk-V4NG5OMS.js";import{Ba as h,_ as v}from"./chunk-2BTJALUS.js";var fe={defaultRole:"repository-observation"};function Ce(e,n=[]){return{defaultRole:e,...n.length>0?{rules:n}:{}}}function N(e,n){for(let t of e.rules??[]){if(t.when.kind==="option-present"){let r=n.options[t.when.name];if(r!==void 0&&r!==!1)return t.role;continue}if((t.when.kind==="argument"?n.args[t.when.index]:n.options[t.when.name])===t.when.equals)return t.role}return e.defaultRole}function ge(e){return[...new Set([e.defaultRole,...(e.rules??[]).map(n=>n.role)])]}function _(e){return e==="repository-observation"||e==="repository-preview"||e==="composite"}import{AsyncLocalStorage as ne}from"async_hooks";var W=1,G=1;var Y={policyId:"scip-query:unresolved-repository-policy",policyVersion:G,permission:"not-established",reasons:["No repository action policy was supplied for this claim."]};function L(e){return{schemaVersion:W,origin:e.contract.origin,coverage:X(e.coverage),producerValidation:e.contract.producerValidation,stateAuthority:S(e.receipt,e.receipt),repositoryPolicy:e.repositoryPolicy??Y,...e.contract.families?{families:e.contract.families}:{}}}function X(e){return e?e.complete===!0?{state:"complete",returned:e.returned,totalKnown:!0,total:e.total??e.returned,omitted:0}:e.totalKnown?{state:"partial",returned:e.returned,totalKnown:!0,...e.total===void 0?{}:{total:e.total},...e.omitted===void 0?{}:{omitted:e.omitted}}:{state:"unknown",returned:e.returned,totalKnown:!1}:{state:"unknown",returned:0,totalKnown:!1}}var z="scip-query-result";var Z=1,ee=1,M=1,P=1;function J(e){let n=e.resultSchemaVersion??ee;if(!h(n))throw new Error("CLI result schema version must be a positive safe integer.");let{producerVersion:t,...o}=e;return{kind:z,schemaVersion:Z,producer:{name:"scip-query",version:t},resultSchemaVersion:n,...o}}function T(e,n){return JSON.stringify(e,null,n?0:2)}var D=Symbol("option-value-source"),B=new Map,H=new Map,j=new Map,q=new ne;function _e(e,n){return q.run(e,n)}function Le(e){B=new Map(e)}function Me(e){H=new Map(e)}function Pe(e){j=new Map(e)}function f(e){return(...n)=>{let{args:t,opts:o}=K(n);I(r=>{b(r.generation.identity),e({db:r,args:t,opts:o})})}}function y(e,n){return f(t=>{let o=A(t.db,e,d(t.opts,"full"),{quiet:d(t.opts,"json")});n({...t,budget:o})})}function Je(e){return f(n=>c(n,e,{kind:"list"}))}function Te(e){return f(n=>c(n,e,{kind:"table",headers:e.headers,dashWidths:e.dashWidths}))}function De(e){return f(n=>c(n,e,{kind:"grouped",key:e.key}))}function te(e){return f(n=>R(n,e))}function Be(e){return te({commandName:e.commandName,query:e.query,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(n,t)=>s.sectionedReport(e.sections(n,t)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}function He(e,n,t){return(...o)=>{let{args:r,opts:i}=K(o),a=n({args:r,opts:i});if(!a)return t(...o);b(a.generationIdentity);let u={args:r,opts:i,observationReceipt:a.observationReceipt};R(u,{commandName:e.commandName,query:()=>a.result,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(l,m)=>s.sectionedReport(e.sections(l,m)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}}function oe(e,n){return y(e,t=>R(t,{...n,commandName:n.commandName??e}))}function je(e,n){return oe(e,{commandName:n.commandName??e,query:n.query,emptyMessage:n.emptyMessage,heuristicLabel:n.heuristicLabel,before:n.before,render:(t,o)=>s.sectionedReport(n.sections(t,o)),toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,after:n.after})}function qe(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"list"}))}function Qe(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"table",headers:n.headers,dashWidths:n.dashWidths}))}function Ke(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"grouped",key:n.key}))}function Ue(e,n){return String(e[n])}function Fe(e,n){let t=e[n];return typeof t=="string"?[t]:Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function $e(e,n){let t=e[n];return typeof t=="string"?t:void 0}function We(e,n){let t=e[n];return typeof t=="string"?t:void 0}function Q(e,n){let t=e[n];return typeof t=="number"?t:void 0}function d(e,n){return!!e[n]}function Ge(e,n){let t=e[n];return Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function Ye(e,n,t){return Q(e,n)??t}function Xe(e,n,t){let o=Q(e,n),r=o!==void 0&&re(e,n)!=="default";if(d(e,"full")){if(r)throw new Error("--full cannot be combined with --limit. Use --full for all findings, or --limit N for a capped report.");return Number.MAX_SAFE_INTEGER}return o??t}function re(e,n){return e[D]?.(n)}function c(e,n,t){R(e,{commandName:n.commandName,query:n.query,emptyMessage:(o,r)=>o.length===0&&n.emptyMessage?n.emptyMessage(r):void 0,heuristicLabel:n.heuristicLabel,render:(o,r)=>{t.kind==="list"?s.list(o,i=>n.format(i,r)):t.kind==="table"?s.table(t.headers,o.map(i=>n.format(i,r)),t.dashWidths):s.groupedByFile(o,i=>n.format(i,r),t.key?i=>t.key(i,r):void 0)},toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,before:n.before,after:n.after})}function R(e,n){let t=n.query(e);if(d(e.opts,"json")){if(!n.commandName)throw new Error("JSON output requires a command name so its result contract can be identified.");ae(n.commandName,e.args,e.opts,n.toJson?n.toJson(t,e):t,{analysisBudget:ie(e),coverage:n.coverage?.(t,e),agentResult:n.agentResult?.(t,e),observationReceipt:e.observationReceipt});return}let o=n.emptyMessage?.(t,e);if(o){s.empty(o);return}n.heuristicLabel&&k(n.heuristicLabel),n.before?.(t,e),n.render(t,e),n.after?.(t,e)}function ie(e){return e.budget?.analysisBudget}function ae(e,n,t,o,r={}){let i=B.get(e),a=H.get(e),u=j.get(e),l=a?N(a.operation,{args:n,options:t}):void 0,m=q.getStore();if(m!==void 0&&l!==void 0&&m!==l)throw new Error(`Command ${e} changed operation role during execution: selected ${m}, rendered ${l}.`);let O=m??l,w=me(o),C=r.coverage??ue(a,o,r.analysisBudget),p=C&&w&&!C.resolution?{...C,resolution:w}:C;p&&de(p);let g=d(t,"agentOutput"),U=g&&r.agentResult!==void 0?r.agentResult:o;if(d(t,"resultOnly")){let $=g&&r.agentResult!==void 0?r.agentResult:Object.hasOwn(r,"resultOnly")?r.resultOnly:o;x(JSON.stringify($,null,d(t,"compact")?0:2));return}let F=J({producerVersion:v,command:e,...O?{operationRole:O}:{},...i?{evidence:i}:{},...r.analysisBudget?{analysisBudget:r.analysisBudget}:{},args:ce(n),options:t,result:U,...g?{resultProjection:"agent"}:{},...p?{coverage:p}:{},...r.agentResult!==void 0&&!g?{agentResult:r.agentResult}:{},...se(O,i,r.analysisBudget,p,u,r.observationReceipt),...r.resultSchemaVersion===void 0?{}:{resultSchemaVersion:r.resultSchemaVersion}});x(T(F,d(t,"compact")))}function se(e,n,t,o,r,i){if(!e||!_(e))return{};let a=E(),u=i??(a?V({projectRoot:a.config.projectRoot,db:a,...r?{observedSourceKinds:r.observedSources}:{}}):void 0);return u?{evidenceContext:{schemaVersion:M,operationRole:e,receipt:u,analysisManifest:{schemaVersion:P,...n?{evidence:n}:{},...t?{analysisBudget:t}:{},...o?{coverage:o}:{},...r?{claimQualification:L({contract:r,receipt:u,...o?{coverage:o}:{}})}:{}}}}:{}}function de(e){if(!Number.isSafeInteger(e.returned)||e.returned<0)throw new Error("Invocation coverage returned count must be a non-negative safe integer.");if(e.complete!==!0&&e.complete!==!1&&e.complete!==null)throw new Error("Invocation coverage complete must be true, false, or null.");if(e.complete===!0){if(!e.totalKnown)throw new Error("Complete invocation coverage must know its total.");if(!Number.isSafeInteger(e.total)||e.total!==e.returned)throw new Error("Complete invocation coverage total must equal returned.");if(e.omitted!==0)throw new Error("Complete invocation coverage cannot omit results.");if(e.omittedIdentities!==void 0)throw new Error("Complete invocation coverage cannot name omitted identities.");if(e.continuation!==void 0)throw new Error("Complete invocation coverage cannot provide a continuation.")}else if(e.totalKnown){if(e.complete!==!1)throw new Error("Known incomplete invocation coverage must set complete to false.");if(!Number.isSafeInteger(e.total)||e.total<e.returned)throw new Error("Known invocation coverage total must be a safe integer at least as large as returned.");let n=e.total-e.returned;if(e.omitted!==n)throw new Error("Known invocation coverage omitted count must equal total minus returned.");if(n===0)throw new Error("Known incomplete invocation coverage must omit at least one result.");if(e.omittedIdentities&&e.omittedIdentities.length!==n)throw new Error("Omitted identity count must equal the disclosed omitted count.")}else{if(e.total!==void 0||e.omitted!==void 0)throw new Error("Unknown invocation coverage cannot claim a total or omitted count.");if(e.omittedIdentities!==void 0)throw new Error("Unknown invocation coverage cannot claim omitted identities.")}if(e.continuation&&(e.continuation.cursor.length===0||e.continuation.indexGeneration.length===0))throw new Error("Invocation coverage continuation requires a cursor and index generation.");if(e.resolution){if(!Number.isSafeInteger(e.resolution.totalCandidates)||e.resolution.totalCandidates<0)throw new Error("Invocation resolution candidate count must be a non-negative safe integer.");if(e.resolution.state==="exact"&&e.resolution.totalCandidates!==1)throw new Error("Exact invocation resolution must name exactly one candidate.");if(e.resolution.state==="missing"&&e.resolution.totalCandidates!==0)throw new Error("Missing invocation resolution cannot name candidates.");if(e.resolution.state==="ambiguous"&&e.resolution.totalCandidates<2)throw new Error("Ambiguous invocation resolution must name at least two candidates.")}}function ue(e,n,t){if(!e)return;let o=le(e,n);return e.coverage==="complete"?{complete:!0,totalKnown:!0,returned:o,total:o,omitted:0}:e.coverage==="sampled"?{complete:!1,totalKnown:!1,returned:o}:e.coverage==="bounded"&&t?{complete:!1,totalKnown:!1,returned:o}:{complete:null,totalKnown:!1,returned:o}}function le(e,n){let t=e.resultUnits??{kind:"report"};if(t.kind==="rows")return Array.isArray(n)?n.length:0;if(t.kind==="field"){if(!n||typeof n!="object")return 0;let o=n[t.field];return Array.isArray(o)?o.length:o==null?0:1}return n==null?0:1}function me(e){if(!e||typeof e!="object"||Array.isArray(e))return;let n=e;if(n.matched===!1)return{state:"missing",totalCandidates:0};if(n.matched!==!0||!Number.isSafeInteger(n.totalMatches))return;let t=n.totalMatches;return t<=0?{state:"missing",totalCandidates:0}:t===1?{state:"exact",totalCandidates:t}:{state:"ambiguous",totalCandidates:t}}function ce(e){return e.filter(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean")}function K(e){if(e.length===0)return{args:[],opts:{}};let n=e[e.length-1];return{args:e.slice(0,-1),opts:pe(n)}}function pe(e){if(!e||typeof e!="object")return{};let n=e,t=typeof n.optsWithGlobals=="function"?n.optsWithGlobals.bind(n):typeof n.opts=="function"?n.opts.bind(n):null;if(t){let o=t();return!o||typeof o!="object"?{}:(typeof n.getOptionValueSource=="function"&&Object.defineProperty(o,D,{value:r=>n.getOptionValueSource(r),enumerable:!1}),o)}return e}export{fe as a,Ce as b,N as c,ge as d,_e as e,Le as f,Me as g,Pe as h,f as i,y as j,Je as k,Te as l,De as m,te as n,Be as o,He as p,oe as q,je as r,qe as s,Qe as t,Ke as u,Ue as v,Fe as w,$e as x,We as y,Q as z,d as A,Ge as B,Ye as C,Xe as D,re as E,ae as F,K as G,pe as H};
3
- //# sourceMappingURL=chunk-CKRWA452.js.map
2
+ import{Bb as E,Ib as I,Tb as x,Vb as V,ac as s,eb as S,ec as k,fc as A,nc as b}from"./chunk-NOYBFVJA.js";import{Ba as h,_ as v}from"./chunk-66DVSJQG.js";var fe={defaultRole:"repository-observation"};function Ce(e,n=[]){return{defaultRole:e,...n.length>0?{rules:n}:{}}}function N(e,n){for(let t of e.rules??[]){if(t.when.kind==="option-present"){let r=n.options[t.when.name];if(r!==void 0&&r!==!1)return t.role;continue}if((t.when.kind==="argument"?n.args[t.when.index]:n.options[t.when.name])===t.when.equals)return t.role}return e.defaultRole}function ge(e){return[...new Set([e.defaultRole,...(e.rules??[]).map(n=>n.role)])]}function _(e){return e==="repository-observation"||e==="repository-preview"||e==="composite"}import{AsyncLocalStorage as ne}from"async_hooks";var W=1,G=1;var Y={policyId:"scip-query:unresolved-repository-policy",policyVersion:G,permission:"not-established",reasons:["No repository action policy was supplied for this claim."]};function L(e){return{schemaVersion:W,origin:e.contract.origin,coverage:X(e.coverage),producerValidation:e.contract.producerValidation,stateAuthority:S(e.receipt,e.receipt),repositoryPolicy:e.repositoryPolicy??Y,...e.contract.families?{families:e.contract.families}:{}}}function X(e){return e?e.complete===!0?{state:"complete",returned:e.returned,totalKnown:!0,total:e.total??e.returned,omitted:0}:e.totalKnown?{state:"partial",returned:e.returned,totalKnown:!0,...e.total===void 0?{}:{total:e.total},...e.omitted===void 0?{}:{omitted:e.omitted}}:{state:"unknown",returned:e.returned,totalKnown:!1}:{state:"unknown",returned:0,totalKnown:!1}}var z="scip-query-result";var Z=1,ee=1,M=1,P=1;function J(e){let n=e.resultSchemaVersion??ee;if(!h(n))throw new Error("CLI result schema version must be a positive safe integer.");let{producerVersion:t,...o}=e;return{kind:z,schemaVersion:Z,producer:{name:"scip-query",version:t},resultSchemaVersion:n,...o}}function T(e,n){return JSON.stringify(e,null,n?0:2)}var D=Symbol("option-value-source"),B=new Map,H=new Map,j=new Map,q=new ne;function _e(e,n){return q.run(e,n)}function Le(e){B=new Map(e)}function Me(e){H=new Map(e)}function Pe(e){j=new Map(e)}function f(e){return(...n)=>{let{args:t,opts:o}=K(n);I(r=>{b(r.generation.identity),e({db:r,args:t,opts:o})})}}function y(e,n){return f(t=>{let o=A(t.db,e,d(t.opts,"full"),{quiet:d(t.opts,"json")});n({...t,budget:o})})}function Je(e){return f(n=>c(n,e,{kind:"list"}))}function Te(e){return f(n=>c(n,e,{kind:"table",headers:e.headers,dashWidths:e.dashWidths}))}function De(e){return f(n=>c(n,e,{kind:"grouped",key:e.key}))}function te(e){return f(n=>R(n,e))}function Be(e){return te({commandName:e.commandName,query:e.query,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(n,t)=>s.sectionedReport(e.sections(n,t)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}function He(e,n,t){return(...o)=>{let{args:r,opts:i}=K(o),a=n({args:r,opts:i});if(!a)return t(...o);b(a.generationIdentity);let u={args:r,opts:i,observationReceipt:a.observationReceipt};R(u,{commandName:e.commandName,query:()=>a.result,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(l,m)=>s.sectionedReport(e.sections(l,m)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}}function oe(e,n){return y(e,t=>R(t,{...n,commandName:n.commandName??e}))}function je(e,n){return oe(e,{commandName:n.commandName??e,query:n.query,emptyMessage:n.emptyMessage,heuristicLabel:n.heuristicLabel,before:n.before,render:(t,o)=>s.sectionedReport(n.sections(t,o)),toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,after:n.after})}function qe(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"list"}))}function Qe(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"table",headers:n.headers,dashWidths:n.dashWidths}))}function Ke(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"grouped",key:n.key}))}function Ue(e,n){return String(e[n])}function Fe(e,n){let t=e[n];return typeof t=="string"?[t]:Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function $e(e,n){let t=e[n];return typeof t=="string"?t:void 0}function We(e,n){let t=e[n];return typeof t=="string"?t:void 0}function Q(e,n){let t=e[n];return typeof t=="number"?t:void 0}function d(e,n){return!!e[n]}function Ge(e,n){let t=e[n];return Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function Ye(e,n,t){return Q(e,n)??t}function Xe(e,n,t){let o=Q(e,n),r=o!==void 0&&re(e,n)!=="default";if(d(e,"full")){if(r)throw new Error("--full cannot be combined with --limit. Use --full for all findings, or --limit N for a capped report.");return Number.MAX_SAFE_INTEGER}return o??t}function re(e,n){return e[D]?.(n)}function c(e,n,t){R(e,{commandName:n.commandName,query:n.query,emptyMessage:(o,r)=>o.length===0&&n.emptyMessage?n.emptyMessage(r):void 0,heuristicLabel:n.heuristicLabel,render:(o,r)=>{t.kind==="list"?s.list(o,i=>n.format(i,r)):t.kind==="table"?s.table(t.headers,o.map(i=>n.format(i,r)),t.dashWidths):s.groupedByFile(o,i=>n.format(i,r),t.key?i=>t.key(i,r):void 0)},toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,before:n.before,after:n.after})}function R(e,n){let t=n.query(e);if(d(e.opts,"json")){if(!n.commandName)throw new Error("JSON output requires a command name so its result contract can be identified.");ae(n.commandName,e.args,e.opts,n.toJson?n.toJson(t,e):t,{analysisBudget:ie(e),coverage:n.coverage?.(t,e),agentResult:n.agentResult?.(t,e),observationReceipt:e.observationReceipt});return}let o=n.emptyMessage?.(t,e);if(o){s.empty(o);return}n.heuristicLabel&&k(n.heuristicLabel),n.before?.(t,e),n.render(t,e),n.after?.(t,e)}function ie(e){return e.budget?.analysisBudget}function ae(e,n,t,o,r={}){let i=B.get(e),a=H.get(e),u=j.get(e),l=a?N(a.operation,{args:n,options:t}):void 0,m=q.getStore();if(m!==void 0&&l!==void 0&&m!==l)throw new Error(`Command ${e} changed operation role during execution: selected ${m}, rendered ${l}.`);let O=m??l,w=me(o),C=r.coverage??ue(a,o,r.analysisBudget),p=C&&w&&!C.resolution?{...C,resolution:w}:C;p&&de(p);let g=d(t,"agentOutput"),U=g&&r.agentResult!==void 0?r.agentResult:o;if(d(t,"resultOnly")){let $=g&&r.agentResult!==void 0?r.agentResult:Object.hasOwn(r,"resultOnly")?r.resultOnly:o;x(JSON.stringify($,null,d(t,"compact")?0:2));return}let F=J({producerVersion:v,command:e,...O?{operationRole:O}:{},...i?{evidence:i}:{},...r.analysisBudget?{analysisBudget:r.analysisBudget}:{},args:ce(n),options:t,result:U,...g?{resultProjection:"agent"}:{},...p?{coverage:p}:{},...r.agentResult!==void 0&&!g?{agentResult:r.agentResult}:{},...se(O,i,r.analysisBudget,p,u,r.observationReceipt),...r.resultSchemaVersion===void 0?{}:{resultSchemaVersion:r.resultSchemaVersion}});x(T(F,d(t,"compact")))}function se(e,n,t,o,r,i){if(!e||!_(e))return{};let a=E(),u=i??(a?V({projectRoot:a.config.projectRoot,db:a,...r?{observedSourceKinds:r.observedSources}:{}}):void 0);return u?{evidenceContext:{schemaVersion:M,operationRole:e,receipt:u,analysisManifest:{schemaVersion:P,...n?{evidence:n}:{},...t?{analysisBudget:t}:{},...o?{coverage:o}:{},...r?{claimQualification:L({contract:r,receipt:u,...o?{coverage:o}:{}})}:{}}}}:{}}function de(e){if(!Number.isSafeInteger(e.returned)||e.returned<0)throw new Error("Invocation coverage returned count must be a non-negative safe integer.");if(e.complete!==!0&&e.complete!==!1&&e.complete!==null)throw new Error("Invocation coverage complete must be true, false, or null.");if(e.complete===!0){if(!e.totalKnown)throw new Error("Complete invocation coverage must know its total.");if(!Number.isSafeInteger(e.total)||e.total!==e.returned)throw new Error("Complete invocation coverage total must equal returned.");if(e.omitted!==0)throw new Error("Complete invocation coverage cannot omit results.");if(e.omittedIdentities!==void 0)throw new Error("Complete invocation coverage cannot name omitted identities.");if(e.continuation!==void 0)throw new Error("Complete invocation coverage cannot provide a continuation.")}else if(e.totalKnown){if(e.complete!==!1)throw new Error("Known incomplete invocation coverage must set complete to false.");if(!Number.isSafeInteger(e.total)||e.total<e.returned)throw new Error("Known invocation coverage total must be a safe integer at least as large as returned.");let n=e.total-e.returned;if(e.omitted!==n)throw new Error("Known invocation coverage omitted count must equal total minus returned.");if(n===0)throw new Error("Known incomplete invocation coverage must omit at least one result.");if(e.omittedIdentities&&e.omittedIdentities.length!==n)throw new Error("Omitted identity count must equal the disclosed omitted count.")}else{if(e.total!==void 0||e.omitted!==void 0)throw new Error("Unknown invocation coverage cannot claim a total or omitted count.");if(e.omittedIdentities!==void 0)throw new Error("Unknown invocation coverage cannot claim omitted identities.")}if(e.continuation&&(e.continuation.cursor.length===0||e.continuation.indexGeneration.length===0))throw new Error("Invocation coverage continuation requires a cursor and index generation.");if(e.resolution){if(!Number.isSafeInteger(e.resolution.totalCandidates)||e.resolution.totalCandidates<0)throw new Error("Invocation resolution candidate count must be a non-negative safe integer.");if(e.resolution.state==="exact"&&e.resolution.totalCandidates!==1)throw new Error("Exact invocation resolution must name exactly one candidate.");if(e.resolution.state==="missing"&&e.resolution.totalCandidates!==0)throw new Error("Missing invocation resolution cannot name candidates.");if(e.resolution.state==="ambiguous"&&e.resolution.totalCandidates<2)throw new Error("Ambiguous invocation resolution must name at least two candidates.")}}function ue(e,n,t){if(!e)return;let o=le(e,n);return e.coverage==="complete"?{complete:!0,totalKnown:!0,returned:o,total:o,omitted:0}:e.coverage==="sampled"?{complete:!1,totalKnown:!1,returned:o}:e.coverage==="bounded"&&t?{complete:!1,totalKnown:!1,returned:o}:{complete:null,totalKnown:!1,returned:o}}function le(e,n){let t=e.resultUnits??{kind:"report"};if(t.kind==="rows")return Array.isArray(n)?n.length:0;if(t.kind==="field"){if(!n||typeof n!="object")return 0;let o=n[t.field];return Array.isArray(o)?o.length:o==null?0:1}return n==null?0:1}function me(e){if(!e||typeof e!="object"||Array.isArray(e))return;let n=e;if(n.matched===!1)return{state:"missing",totalCandidates:0};if(n.matched!==!0||!Number.isSafeInteger(n.totalMatches))return;let t=n.totalMatches;return t<=0?{state:"missing",totalCandidates:0}:t===1?{state:"exact",totalCandidates:t}:{state:"ambiguous",totalCandidates:t}}function ce(e){return e.filter(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean")}function K(e){if(e.length===0)return{args:[],opts:{}};let n=e[e.length-1];return{args:e.slice(0,-1),opts:pe(n)}}function pe(e){if(!e||typeof e!="object")return{};let n=e,t=typeof n.optsWithGlobals=="function"?n.optsWithGlobals.bind(n):typeof n.opts=="function"?n.opts.bind(n):null;if(t){let o=t();return!o||typeof o!="object"?{}:(typeof n.getOptionValueSource=="function"&&Object.defineProperty(o,D,{value:r=>n.getOptionValueSource(r),enumerable:!1}),o)}return e}export{fe as a,Ce as b,N as c,ge as d,_e as e,Le as f,Me as g,Pe as h,f as i,y as j,Je as k,Te as l,De as m,te as n,Be as o,He as p,oe as q,je as r,qe as s,Qe as t,Ke as u,Ue as v,Fe as w,$e as x,We as y,Q as z,d as A,Ge as B,Ye as C,Xe as D,re as E,ae as F,K as G,pe as H};
3
+ //# sourceMappingURL=chunk-6PQNKL3G.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-D2MVJSP4.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
- //# sourceMappingURL=chunk-GPGRZJ3R.js.map
1
+ import{a as t}from"./chunk-3FHOF22C.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
+ //# sourceMappingURL=chunk-6V5CNXL6.js.map
@@ -0,0 +1,4 @@
1
+ import{b as ye}from"./chunk-NJITK2GP.js";import{i as I,n as W}from"./chunk-ODDUPDP7.js";import{D as O}from"./chunk-ZOHS7AQV.js";import{h as pe,k as G}from"./chunk-FESCRNVV.js";import{e as me}from"./chunk-JWTGMPIT.js";var Pe=12,Te=20,re=200,oe=800,Ae=.9,Oe=64,De=me("behavior-construct-ranges"),Se={if_statement:"branch",conditional_expression:"branch",ternary_expression:"branch",switch_statement:"branch",switch_expression:"branch",switch_case:"branch",case_statement:"branch",match_statement:"branch",match_expression:"branch",match_arm:"branch",for_statement:"loop",for_in_statement:"loop",for_of_statement:"loop",while_statement:"loop",do_statement:"loop",await_expression:"await",return_statement:"return",throw_statement:"throw",raise_statement:"throw",assignment_expression:"mutation",augmented_assignment_expression:"mutation",assignment:"mutation",pair:"shape",field_initializer:"shape",spread_element:"spread",dictionary_splat:"spread",catch_clause:"catch",except_clause:"catch",finally_clause:"finally"},Z=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],ge=[...Z,"lifecycle"],Ce=["loop","await","throw","mutation","spread","catch","finally","lifecycle"],Ie=new Set(["onBeforeMount","onBeforeUnmount","onMounted","onUnmounted","useEffect","useInsertionEffect","useLayoutEffect"]);var _e=new Set(["object","object_pattern","dictionary","field_declaration_list","struct_expression","struct_pattern"]);function mt(e,n,t,o,r=[],s={}){let a=O(e,n);if(!a)return null;let h=G(e,n),c=Ne(e,n,t,o,r),l=te(e,n,c.startLine,c.endLine),u=l?.startLine??t,p=l?.endLine??o,N=(l?D(a.rootNode,c.startLine,c.endLine):null)??I(a.rootNode,u,p);if(!N)return null;let b=Le(N,h,u,p,r);if(!b||b.lines.length===0||b.lines.some(S=>S.text.length>oe))return null;let m=tt(h,u,p),C=nt(b);if((s.requireSavings??!0)&&C>=m*Ae)return null;let v=Z.filter(S=>b.lines.some(x=>x.signals.includes(S)));return{...l?{callable:{name:l.name,startLine:l.startLine,endLine:l.endLine}}:{},representation:"outline",constructKind:b.constructKind,signature:b.signature,lines:b.lines,signals:v,testCases:ye(n)==="test"?st(h,u,p):[],coverage:{sourceStatements:b.sourceStatements,representedStatements:b.sourceStatements,copiedStatements:b.copiedStatements,omittedStatements:0},rawCharacters:m,outlineCharacters:C,candidateLines:b.sourceStatements,omittedLines:0}}function pt(e,n,t,o,r){if(r.length===0)return[];let s=O(e,n);if(!s)return[];let a=G(e,n),h=Ne(e,n,t,o,r),c=te(e,n,h.startLine,h.endLine),l=c?.startLine??t,u=c?.endLine??o,p=(c?D(s.rootNode,h.startLine,h.endLine):null)??I(s.rootNode,l,u);if(!p)return[];let N=Le(p,a,l,u,r);return N?N.lines.filter(b=>b.text.length<=oe&&b.signals.some(m=>["branch","loop","catch","finally"].includes(m))&&r.some(m=>m>=b.line&&m<=b.endLine)):[]}function yt(e,n,t,o){let r=O(e,n);if(!r)return null;let s=D(r.rootNode,t,o)??I(r.rootNode,t,o);if(!s)return null;let a=[],h=ae(s),c=[];return se(s,s,l=>{if(k.has(l.type)||ke.has(l.type)){$e(a,c,l);return}if(ee.has(l.type)){qe(a,c,l);return}if(z.has(l.type)){ze(a,c,l);return}j.has(l.type)&&je(a,l)}),{facts:Ue(a),terminals:we(h),unsupported:c}}function Ne(e,n,t,o,r=[]){let s=r.filter(u=>u>=t&&u<=o),a=De.get(e,n,pe(e,n)??"",()=>new Map),h=`${t}:${o}:${s.join(",")}`,c=a.get(h);if(c)return a.delete(h),a.set(h,c),{startLine:c[0],endLine:c[1]};let l=Me(e,n,t,o,s);if(a.set(h,[l.startLine,l.endLine]),a.size>Oe){let u=a.keys().next().value;u!==void 0&&a.delete(u)}return l}function Me(e,n,t,o,r){let s=O(e,n),a=[];if(r.length>0&&s){let u=[],p=r[0],N=p;for(let m of r)p=Math.min(p,m),N=Math.max(N,m);Ee(s.rootNode,p,N,m=>{Ve(m)&&m.startPosition.row>=t&&m.endPosition.row<=o&&r.every(C=>m.startPosition.row<=C&&m.endPosition.row>=C)&&u.push(m),P.has(m.type)&&m.startPosition.row>=t&&m.endPosition.row<=o&&r.every(C=>m.startPosition.row<=C&&m.endPosition.row>=C)&&a.push(m)});let b=u.sort((m,C)=>m.endPosition.row-m.startPosition.row-(C.endPosition.row-C.startPosition.row)||m.startPosition.row-C.startPosition.row)[0];if(b)return{startLine:b.startPosition.row,endLine:b.endPosition.row}}let h=te(e,n,t,o);if(h)return{startLine:h.startLine,endLine:h.endLine};if(r.length===0)return{startLine:t,endLine:o};let c=(W(e,n)?.callables??[]).filter(u=>u.startLine>=t&&u.endLine<=o&&r.every(p=>u.startLine<=p&&u.endLine>=p)).sort((u,p)=>u.endLine-u.startLine-(p.endLine-p.startLine)||u.startLine-p.startLine)[0];if(!s)return c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o};let l=a.sort((u,p)=>u.endPosition.row-u.startPosition.row-(p.endPosition.row-p.startPosition.row)||u.startPosition.row-p.startPosition.row)[0];return l?{startLine:l.startPosition.row,endLine:l.endPosition.row}:c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o}}function bt(e,n,t,o,r={}){if(o-t+1<(r.minimumBodyLines??Te))return null;let a=Re(e,n,t,o,[],!1);if(!a)return null;let h=a.candidates.map(S=>({...S,signals:S.signals.filter(x=>x!=="anchor"&&x!=="signature")})).filter(S=>S.signals.length>0);if(h.length===0)return null;let c=it(h),l=h.filter(S=>S.text.length<=re);if(l.length===0)return null;let u=Ce.filter(S=>(c[S]??0)>0),p=u.filter(S=>S!=="await"),N=a.shapes.reduce((S,x)=>S+x.fields.length,0);if(p.length===0&&!((c.await??0)>0&&N>0)&&N<3)return null;let b=at(l,c),m=new Map;for(let S of u){let x=b.find(f=>f.signals.includes(S));x&&m.set(x.line,x)}if(m.size===0){let S=b.find(x=>x.signals.includes("branch"));S&&m.set(S.line,S)}let C=Math.min(10,Math.max(1,r.maxLines??m.size)),v=new Map;for(let S of m.values()){if(v.size>=C)break;v.set(S.line,S)}return v.size>=h.length&&a.shapes.length===0?null:{owner:a.callable?.name??null,startLine:t,endLine:o,lines:[...v.values()].sort((S,x)=>S.line-x.line),shapes:a.shapes,signalCounts:c,candidateLines:h.length,omittedLines:h.length-v.size}}function St(e,n,t,o){let r=Re(e,n,t,o,[],!1);return r?new Map(r.candidates.map(s=>[s.line,s.signals.filter(a=>a!=="lifecycle")])):new Map}var P=new Set(["arrow_function","constructor_declaration","function_declaration","function_definition","function_expression","generator_function","generator_function_declaration","function_item","lambda","lambda_expression","method","method_declaration","method_definition"]),B=new Set(["block","body","compound_statement","declaration_list","statement_block"]),k=new Set(["if_expression","if_statement","unless","unless_statement"]),ke=new Set(["conditional_expression","ternary_expression"]),ee=new Set(["do_statement","enhanced_for_statement","for_expression","for_in_statement","for_of_statement","for_statement","loop_expression","while_statement"]),z=new Set(["match_expression","match_statement","switch_expression","switch_statement"]),ve=new Set(["case_statement","match_arm","switch_case","switch_default"]),j=new Set(["try_expression","try_statement"]),X=new Set(["catch_clause","except_clause","rescue"]),$=new Set(["ensure","finally_clause"]),Y=new Set(["else","else_clause"]),xe=new Set(["raise_statement","return_statement","throw_statement"]),Ye=new Set(["block_comment","comment","line_comment"]);function $e(e,n,t){let o=t.childForFieldName("condition")??le(t),r=t.childForFieldName("consequence")??t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),s=t.childForFieldName("alternative")??t.namedChildren.find(c=>Y.has(c.type));if(!o||!r){n.push(ce(t,"conditional-fields-unresolved"));return}let a=F(o,"predicate",o.text),h=F(r,be(r),"consequence");if(E(e,a,h,"predicate-consequence",{branchRole:"consequence"}),J(e,a,r,"consequence"),s){let c=F(s,be(s),"alternative");E(e,a,c,"predicate-alternative",{branchRole:"alternative"}),J(e,a,s,"alternative");return}E(e,a,ie(a,"otherwise continue"),"predicate-fallthrough",{branchRole:"fallthrough"})}function qe(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(a=>B.has(a.type));if(!o){n.push(ce(t,"loop-body-unresolved"));return}let r=t.childForFieldName("condition"),s=F(r??t,"predicate",r?.text??R(t,o));E(e,s,F(o,"outcome","iteration"),"loop-iteration",{branchRole:"iteration"}),J(e,s,o,"iteration"),E(e,s,ie(s,"loop exits"),"loop-exit",{branchRole:"exit"})}function ze(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),r=t.childForFieldName("value")??t.childForFieldName("condition")??t.childForFieldName("subject")??le(t),s=Ke(o??t);if(!r||s.length===0){n.push(ce(t,"switch-cases-unresolved"));return}let a=F(r,"predicate",r.text),h=!1;for(let c of s){let l=We(c);h||=l;let u=R(c,c.namedChildren.find(p=>Q(p)));E(e,a,F(c,"outcome",u||(l?"default":"case")),l?"predicate-default":"predicate-case",{branchRole:l?"default":"case"}),J(e,a,c,l?"default":"case")}h||E(e,a,ie(a,"no case matched"),"predicate-fallthrough",{branchRole:"fallthrough"})}function je(e,n){let t=F(n,"scope","try");for(let o of Ge(n)){let r=$.has(o.type),s=F(o,"handler",r?"finally":R(o,U(o)));E(e,t,s,r?"finally-cleanup":"exception-handler",{branchRole:r?"finally":"catch"}),He(e,s,o,r?"finally":"catch")}}function He(e,n,t,o){for(let r of ae(t)){let s=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,s==="throw"?"handler-throw":"handler-return",{branchRole:o,terminalKind:s})}}function J(e,n,t,o){for(let r of ae(t)){let s=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,s==="throw"?"predicate-throw":"predicate-return",{branchRole:o,terminalKind:s})}}function E(e,n,t,o,r){e.push({controller:n,outcome:t,subtype:o,attributes:r})}function F(e,n,t){return{kind:n,label:q(t).slice(0,oe),startLine:e.startPosition.row,endLine:e.endPosition.row,implicit:!1}}function ie(e,n){return{...e,kind:"outcome",label:n,implicit:!0}}function be(e){return xe.has(e.type)?"terminal":"outcome"}function ae(e){let n=[];return se(e,e,t=>{xe.has(t.type)&&n.push(F(t,"terminal",t.text))}),we(n)}function se(e,n,t){t(n);for(let o of n.namedChildren)o!==e&&P.has(o.type)||se(e,o,t)}function Ke(e){let n=[],t=o=>{for(let r of o.namedChildren)z.has(r.type)||(ve.has(r.type)?n.push(r):t(r))};return t(e),n}function Ge(e){let n=[],t=o=>{for(let r of o.namedChildren)j.has(r.type)||(X.has(r.type)||$.has(r.type)?n.push(r):P.has(r.type)||t(r))};return t(e),n}function We(e){let n=R(e,e.namedChildren.find(t=>Q(t))).trim();return e.type==="switch_default"||/^(?:default\b|_\s*=>)/u.test(n)}function ce(e,n){return{startLine:e.startPosition.row,endLine:e.endPosition.row,reason:n}}function Ue(e){let n=new Map;for(let t of e)n.set(`${t.controller.startLine}\0${t.controller.endLine}\0${t.outcome.startLine}\0${t.outcome.endLine}\0${t.subtype}\0${t.outcome.label}`,t);return[...n.values()]}function we(e){let n=new Map;for(let t of e)n.set(`${t.startLine}\0${t.endLine}\0${t.kind}\0${t.label}`,t);return[...n.values()]}function Ve(e){return P.has(e.type)||ee.has(e.type)||z.has(e.type)||j.has(e.type)||X.has(e.type)||$.has(e.type)}function Le(e,n,t,o,r){let a=D(e,t,o)??e,h=U(a),c=[],l=0,u=0,p=(i,d,y,g,w=!1,A=!0)=>{let K=w?y.trim():q(y);if(!K)return;let T=Math.max(t,i.startPosition.row),de=Math.min(o,i.endPosition.row);c.push({line:T,endLine:Math.max(T,de),depth:d,signals:Z.filter(he=>g.includes(he)||he==="anchor"&&r.some(fe=>fe>=T&&fe<=de)),text:K,copied:w}),A&&(l+=1,w&&(u+=1))},N=(i,d)=>{for(let y of i.namedChildren)_(y,d)},b=(i,d)=>{if(k.has(i.type)){m(i,d,"else if");return}if(Y.has(i.type)){let y=i.namedChildren.find(w=>k.has(w.type));if(y){m(y,d,"else if");return}p(i,d,"else",["branch"],!1,!1);let g=U(i)??i.namedChildren.find(w=>B.has(w.type));if(g)_(g,d+1);else for(let w of i.namedChildren)_(w,d+1);return}p(i,d,"else",["branch"],!1,!1),_(i,d+1)},m=(i,d,y=i.type.startsWith("unless")?"unless":"if")=>{let g=i.childForFieldName("condition")??le(i),w=i.childForFieldName("consequence")??i.childForFieldName("body")??i.namedChildren.find(T=>B.has(T.type)),A=i.childForFieldName("alternative")??i.namedChildren.find(T=>Y.has(T.type)),K=g?g.text:R(i,w);p(i,d,`${y} ${Ze(K)}`,M(g,["branch"])),w&&_(w,d+1),A&&b(A,d)},C=(i,d)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,d,R(i,y),M(i,["loop"])),y&&_(y,d+1)},v=(i,d)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,d,R(i,y),M(i,["branch"])),y&&_(y,d+1)},S=(i,d)=>{let y=i.namedChildren.find(g=>Q(g));p(i,d,R(i,y),["branch"],!1,!1);for(let g of i.namedChildren)(g===y||Q(g))&&_(g,d+1)},x=(i,d)=>{p(i,d,"try",[],!1);for(let y of i.namedChildren)B.has(y.type)?_(y,d+1):(X.has(y.type)||$.has(y.type))&&_(y,d)},f=(i,d,y)=>{let g=i.childForFieldName("body")??i.namedChildren.find(A=>B.has(A.type)),w=y==="finally"?"finally":R(i,g);p(i,d,w,[y],!1,!1),g&&_(g,d+1)},L=(i,d)=>{let y=U(i);p(i,d,R(i,y),M(i,["binding"])),y&&_(y,d+1)},_=(i,d)=>{if(i.startPosition.row>o||i.endPosition.row<t||Ye.has(i.type)||i.type==="empty_statement")return;if(B.has(i.type)){N(i,d);return}if(k.has(i.type)){m(i,d);return}if(ee.has(i.type)){C(i,d);return}if(z.has(i.type)){v(i,d);return}if(ve.has(i.type)){S(i,d);return}if(j.has(i.type)){x(i,d);return}if(X.has(i.type)){f(i,d,"catch");return}if($.has(i.type)){f(i,d,"finally");return}if(Y.has(i.type)){b(i,d);return}if(P.has(i.type)){L(i,d);return}let g=!Be(i)||et(i);p(i,d,i.text,M(i),g)};return _(h&&h!==a?h:a,0),l===0?null:{constructKind:Qe(a),signature:Je(a,h,n,t),lines:c,sourceStatements:l,copiedStatements:u}}function D(e,n,t){let o=e.namedChildren.filter(r=>r.startPosition.row<=n&&r.endPosition.row>=t);for(let r of o.sort(Xe)){let s=D(r,n,t);if(s)return s}return P.has(e.type)&&e.startPosition.row<=n&&e.endPosition.row>=t?e:null}function Xe(e,n){return e.endPosition.row-e.startPosition.row-(n.endPosition.row-n.startPosition.row)||e.startPosition.row-n.startPosition.row}function U(e){return e.childForFieldName("body")??e.childForFieldName("consequence")??e.namedChildren.find(n=>B.has(n.type))??null}function Je(e,n,t,o){let r=R(e,n);return r||(t[o]??e.text).trim()}function Qe(e){return e.type.includes("constructor")?"constructor":e.type.includes("method")||e.type==="method"?ne(e,new Set(["class_body","class_declaration","class_definition"]))?"class method":"object method":e.type==="arrow_function"||e.type==="function_expression"||e.type==="lambda"?ne(e,new Set(["object","pair"]))?"object member":"function value":e.type.includes("function")?ne(e,P)?"nested function":"module function":"source construct"}function ne(e,n){let t=e.parent;for(;t;){if(n.has(t.type))return!0;t=t.parent}return!1}function le(e){return e.namedChildren.find(n=>!B.has(n.type)&&!Y.has(n.type))??null}function R(e,n){if(!n)return q(e.text);let t=Math.max(0,n.startIndex-e.startIndex);return q(e.text.slice(0,t)).replace(/[:{]\s*$/u,"").trim()}function Ze(e){let n=q(e);return n.startsWith("(")&&n.endsWith(")")?n.slice(1,-1).trim():n}function q(e){return e.trim().replace(/\r?\n[\t ]*/gu," ")}function M(e,n=[]){let t=new Set(n);return e&&H(e,o=>{let r=Se[o.type];r&&t.add(r),o.type==="call_expression"&&(t.add("call"),Fe(o)&&t.add("shape")),ue.has(o.type)&&t.add("binding")}),Z.filter(o=>t.has(o))}function et(e){let n=!1;return H(e,t=>{n||!t.text.includes(`
2
+ `)||/(?:string|template|heredoc|raw_string)/u.test(t.type)&&(n=!0)}),n}function Q(e){return B.has(e.type)||k.has(e.type)||ee.has(e.type)||z.has(e.type)||j.has(e.type)||P.has(e.type)||Be(e)}function Be(e){return/(?:statement|declaration|expression|assignment|return|throw|raise|break|continue|yield|with_item)$/u.test(e.type)||ue.has(e.type)}function tt(e,n,t){let o=0;for(let r=n;r<=t;r+=1)o+=(e[r]?.length??0)+10;return o}function nt(e){return e.constructKind.length+e.signature.length+80+e.lines.reduce((n,t)=>n+t.text.length+t.depth*2+10,0)}function Re(e,n,t,o,r,s){let a=O(e,n);if(!a)return null;let h=G(e,n),c=te(e,n,t,o),l=s?c?.startLine??t:t,u=s?c?.endLine??o:o,N=(c?.startLine===l&&c.endLine===u?D(a.rootNode,l,u):null)??I(a.rootNode,l,u);if(!N)return null;let b=new Map,m=new Map,C=new Map,v=(f,L)=>{if(f<l||f>u)return;let _=b.get(f)??new Set;_.add(L),b.set(f,_)};c&&v(c.startLine,"signature");for(let f of r)v(f,"anchor");H(N,f=>{let L=Se[f.type];if(L&&v(f.startPosition.row,L),L==="shape"&&rt(m,f,N,l,u),f.type==="call_expression"){let i=(f.childForFieldName("function")??f.namedChild(0))?.text.split(".").at(-1);if(Fe(f)){v(f.startPosition.row,"shape");let d=V(f.text);d.length<=re&&C.set(f.startPosition.row,d)}if(i&&Ie.has(i)){v(f.startPosition.row,"lifecycle");let d=V(f.text);d.length<=re&&C.set(f.startPosition.row,d)}}ue.has(f.type)&&v(f.startPosition.row,"binding")});let S=W(e,n);for(let f of S?.callSites??[])f.line<l||f.line>u||(v(f.line,"call"),f.calleeLeaf==="catch"&&v(f.line,"catch"));let x=[...b.entries()].sort(([f],[L])=>f-L).map(([f,L])=>({line:f,signals:ge.filter(_=>L.has(_)),text:C.get(f)??V(h[f]??"")})).filter(f=>f.text.length>0||f.signals.includes("anchor"));return{...c?{callable:c}:{},rangeStart:l,rangeEnd:u,sourceLines:h,candidates:x,shapes:[...m.values()].sort((f,L)=>f.startLine-L.startLine)}}function rt(e,n,t,o,r){if(n.startPosition.row<o||n.endPosition.row>r)return;let s=n.childForFieldName("key")??n.childForFieldName("name")??n.namedChild(0),a=V(s?.text??"");if(!a||a.includes(`
3
+ `)||a.length>60)return;let h=ot(n,t);if(h.startPosition.row<o||h.endPosition.row>r)return;let c=`${h.startPosition.row}:${h.endPosition.row}`,l=e.get(c)??{startLine:h.startPosition.row,endLine:h.endPosition.row,fields:[]};l.fields.some(u=>u.name===a&&u.line===n.startPosition.row)||l.fields.push({name:a,line:n.startPosition.row}),e.set(c,l)}function ot(e,n){let t=e.parent;for(;t&&t!==n.parent;){if(_e.has(t.type))return t;if(t===n)break;t=t.parent}return e.parent??e}function te(e,n,t,o){return W(e,n)?.callables.filter(r=>r.startLine<=t&&r.endLine>=o).sort((r,s)=>r.endLine-r.startLine-(s.endLine-s.startLine)||r.startLine-s.startLine)[0]}function H(e,n){n(e);for(let t of e.namedChildren)H(t,n)}function Ee(e,n,t,o){o(e);for(let r of e.namedChildren)r.startPosition.row>n||r.endPosition.row<t||Ee(r,n,t,o)}function V(e){return e.trim().replace(/\s+/gu," ")}function Fe(e){if(e.type!=="call_expression")return!1;let n=e.childForFieldName("arguments")??e.namedChildren.find(o=>o.type==="arguments"||o.type==="argument_list");if(!n)return!1;let t=!1;return H(n,o=>{_e.has(o.type)&&(t=!0)}),t}function it(e){let n={};for(let t of ge){let o=e.filter(r=>r.signals.includes(t)).length;o>0&&(n[t]=o)}return n}function at(e,n){let t=new Map;for(let s of e){let a=s.signals.join(",");t.set(a,(t.get(a)??0)+1)}let o=new Set(Ce),r=s=>{let a=t.get(s.signals.join(","))??1,h=Math.min(...s.signals.map(u=>n[u]??1)),c=s.signals.some(u=>o.has(u))?3:1,l=Math.max(0,s.signals.length-1)*1e3;return c*(1e3/a+1e3/h)+l};return[...e].sort((s,a)=>r(a)-r(s)||a.line-s.line)}var ue=new Set(["lexical_declaration","variable_declarator","const_item","static_item","let_declaration","assignment"]);function st(e,n,t){let o=[],r=/\b(?:describe|it|test)(?:\.(?:only|skip|todo))?\s*\(\s*(['"`])([^'"`]+)\1/u;for(let s=n;s<=t;s+=1){let a=r.exec(e[s]??"")?.[2];if(!(!a||o.includes(a))&&(o.push(a),o.length>=Pe))break}return o}export{mt as a,pt as b,yt as c,Ne as d,bt as e,St as f};
4
+ //# sourceMappingURL=chunk-6VVV4WRR.js.map
@@ -1,2 +1,2 @@
1
- import{c as p}from"./chunk-PLYUVM4F.js";import{a as y}from"./chunk-Z2AWCTN6.js";import{a as h}from"./chunk-BWVQP3LB.js";import{o as u}from"./chunk-AYPDH2LU.js";import{a as S,c as b}from"./chunk-5H5WTJSD.js";import{A as d,d as m}from"./chunk-TD7VKJ2Y.js";function x(e,o,r={}){let{direction:c="backward",maxDepth:s=3}=r,l=S(e,o);return l?c==="backward"?k(e,l,s,{semantic:r.semantic!==!1}):D(e,l,{semantic:r.semantic!==!1}):null}function j(e,o,r={}){return x(e,o,r)}function k(e,o,r,c){let s=[],l=new Set([o.symbol]),t=[o];for(let n=1;n<=r&&t.length!==0;n++){let i=[];for(let g of t){let w=h(e,g,{semantic:c.semantic,semanticEvidence:y});for(let a of w){if(l.has(a.symbol))continue;l.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function D(e,o,r){let c=new Set,s=[],l=new p(e);for(let t of u(e,o,{semantic:r.semantic,semanticEvidence:y})){if(s.length>=30)break;let n=t.enclosingSymbol??d(l.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{x as a,j as b};
2
- //# sourceMappingURL=chunk-BDGTPN27.js.map
1
+ import{c as p}from"./chunk-CJZXN4NU.js";import{a as y}from"./chunk-W7CXK74K.js";import{a as h}from"./chunk-E73UNJTF.js";import{o as u}from"./chunk-DYGHBZ2N.js";import{a as S,c as b}from"./chunk-OSSESPDX.js";import{A as d,d as m}from"./chunk-N2ZSIIGR.js";function x(e,o,r={}){let{direction:c="backward",maxDepth:s=3}=r,l=S(e,o);return l?c==="backward"?k(e,l,s,{semantic:r.semantic!==!1}):D(e,l,{semantic:r.semantic!==!1}):null}function j(e,o,r={}){return x(e,o,r)}function k(e,o,r,c){let s=[],l=new Set([o.symbol]),t=[o];for(let n=1;n<=r&&t.length!==0;n++){let i=[];for(let g of t){let w=h(e,g,{semantic:c.semantic,semanticEvidence:y});for(let a of w){if(l.has(a.symbol))continue;l.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function D(e,o,r){let c=new Set,s=[],l=new p(e);for(let t of u(e,o,{semantic:r.semantic,semanticEvidence:y})){if(s.length>=30)break;let n=t.enclosingSymbol??d(l.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{x as a,j as b};
2
+ //# sourceMappingURL=chunk-7BWFZPPZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as d,b as m}from"./chunk-FGNCOQUX.js";import{c as u}from"./chunk-KMVGRIO2.js";import{b as c}from"./chunk-4GAQ6FI4.js";function y(t,e={}){let{minSimilarity:o=.5,limit:l=20,scope:n,filePattern:p}=e,r=e.minDeps??(p?1:3),{profiles:i,distinctiveDeps:f}=D(t,{scope:n,minDeps:r}),s=d(i,a=>a.deps);return m({profiles:i,limit:l,filePattern:p,overrunFactor:5,candidateIndex:s,profile:{name:"similar-files"},compare:(a,g)=>F(a,g,o,f)})}function D(t,e){let{scope:o,minDeps:l}=e,n=c(t,o),{universalDeps:p,distinctiveDeps:r}=S(n),i=[];for(let[f,s]of n)s.size>=l&&i.push({file:f,deps:new Set([...s].filter(a=>!p.has(a)))});return{profiles:i,distinctiveDeps:r}}function S(t){let e=new Set,o=new Set,l=t.size;if(l===0)return{universalDeps:e,distinctiveDeps:o};let n=new Map;for(let r of t.values())for(let i of r)n.set(i,(n.get(i)??0)+1);let p=Math.max(3,Math.ceil(l*.03));for(let[r,i]of n)i>=5&&i/l>.3?e.add(r):i<=p&&o.add(r);return{universalDeps:e,distinctiveDeps:o}}function F(t,e,o,l){let n=new Set;for(let s of t.deps)e.deps.has(s)&&n.add(s);if(n.size<3||t.deps.size<4||e.deps.size<4)return null;let p=0;for(let s of n)l.has(s)&&p++;if(p<2)return null;let r=u(t.deps,e.deps);if(r<o)return null;let i=[];for(let s of t.deps)e.deps.has(s)||i.push(s);let f=[];for(let s of e.deps)t.deps.has(s)||f.push(s);return{fileA:t.file,fileB:e.file,similarity:r,sharedDeps:[...n],uniqueToA:i,uniqueToB:f}}export{y as a};
2
- //# sourceMappingURL=chunk-25GWKRUZ.js.map
1
+ import{a as d,b as m}from"./chunk-2E7CX53V.js";import{c as u}from"./chunk-KMVGRIO2.js";import{b as c}from"./chunk-TEBQMNVI.js";function y(t,e={}){let{minSimilarity:o=.5,limit:l=20,scope:n,filePattern:p}=e,r=e.minDeps??(p?1:3),{profiles:i,distinctiveDeps:f}=D(t,{scope:n,minDeps:r}),s=d(i,a=>a.deps);return m({profiles:i,limit:l,filePattern:p,overrunFactor:5,candidateIndex:s,profile:{name:"similar-files"},compare:(a,g)=>F(a,g,o,f)})}function D(t,e){let{scope:o,minDeps:l}=e,n=c(t,o),{universalDeps:p,distinctiveDeps:r}=S(n),i=[];for(let[f,s]of n)s.size>=l&&i.push({file:f,deps:new Set([...s].filter(a=>!p.has(a)))});return{profiles:i,distinctiveDeps:r}}function S(t){let e=new Set,o=new Set,l=t.size;if(l===0)return{universalDeps:e,distinctiveDeps:o};let n=new Map;for(let r of t.values())for(let i of r)n.set(i,(n.get(i)??0)+1);let p=Math.max(3,Math.ceil(l*.03));for(let[r,i]of n)i>=5&&i/l>.3?e.add(r):i<=p&&o.add(r);return{universalDeps:e,distinctiveDeps:o}}function F(t,e,o,l){let n=new Set;for(let s of t.deps)e.deps.has(s)&&n.add(s);if(n.size<3||t.deps.size<4||e.deps.size<4)return null;let p=0;for(let s of n)l.has(s)&&p++;if(p<2)return null;let r=u(t.deps,e.deps);if(r<o)return null;let i=[];for(let s of t.deps)e.deps.has(s)||i.push(s);let f=[];for(let s of e.deps)t.deps.has(s)||f.push(s);return{fileA:t.file,fileB:e.file,similarity:r,sharedDeps:[...n],uniqueToA:i,uniqueToB:f}}export{y as a};
2
+ //# sourceMappingURL=chunk-7CYG22FH.js.map
@@ -0,0 +1,2 @@
1
+ import{closeSync as c,fstatSync as u,openSync as m,readFileSync as L,readSync as x}from"fs";import{createHash as R}from"crypto";var B=8*1024*1024,p=64*1024*1024,b=512*1024*1024,E=256*1024*1024,d=class extends Error{constructor(i,o,r,n,a){let s=r==="too-large"?`is ${n} bytes; the safety limit is ${a} bytes`:r==="not-regular"?"is not a regular file":"changed while it was being read";super(`${i} ${JSON.stringify(o)} ${s}`);this.inputKind=i;this.inputPath=o;this.reason=r;this.observedBytes=n;this.limitBytes=a;this.name="BoundedFileReadError"}inputKind;inputPath;reason;observedBytes;limitBytes;code="SCIP_QUERY_BOUNDED_FILE_READ"};function y(t,e){g(e.maxBytes);let i=String(t),o=m(t,"r");try{let r=u(o);A(r,e,i);let n=L(o),a=u(o);if(a.dev!==r.dev||a.ino!==r.ino||a.size!==r.size||n.byteLength!==r.size)throw new d(e.inputKind,i,"changed-during-read",a.size,e.maxBytes);return n}finally{c(o)}}function h(t,e,i="utf8"){return y(t,e).toString(i)}function _(t,e){return h(t,{maxBytes:B,inputKind:e})}function w(t,e){return h(t,{maxBytes:p,inputKind:e})}function S(t,e){g(e.maxBytes);let i=[],o=Buffer.allocUnsafe(64*1024),r=0;for(;;){let n=x(t,o,0,o.length,null);if(n===0)break;if(r+=n,!Number.isSafeInteger(r)||r>e.maxBytes)throw new d(e.inputKind,`file descriptor ${t}`,"too-large",r,e.maxBytes);i.push(Buffer.from(o.subarray(0,n)))}return Buffer.concat(i,r)}function F(t,e){let i=m(t,"r");try{return S(i,e)}finally{c(i)}}function P(t,e,i="utf8"){return F(t,e).toString(i)}function T(t,e,i){g(e.maxBytes);let o=String(t),r=m(t,"r");try{let n=u(r);A(n,e,o);let a=Buffer.allocUnsafe(Math.min(1024*1024,Math.max(1,n.size))),s=0;for(;s<n.size;){let l=x(r,a,0,Math.min(a.length,n.size-s),s);if(l===0)break;i(a.subarray(0,l)),s+=l}let f=u(r);if(f.dev!==n.dev||f.ino!==n.ino||f.size!==n.size||s!==n.size)throw new d(e.inputKind,o,"changed-during-read",f.size,e.maxBytes);return s}finally{c(r)}}function I(t,e){let i=R("sha256");return T(t,e,o=>i.update(o)),i.digest("hex")}function A(t,e,i){if(!t.isFile())throw new d(e.inputKind,i,"not-regular",Number(t.size),e.maxBytes);if(t.size>e.maxBytes)throw new d(e.inputKind,i,"too-large",Number(t.size),e.maxBytes)}function g(t){if(!Number.isSafeInteger(t)||t<0)throw new RangeError(`maxBytes must be a non-negative safe integer; received ${t}`)}function N(t,e,i,o){let r=0;for(;r<e.length;){let n=i.writeFile(t,e,r,e.length-r);if(!Number.isSafeInteger(n)||n<=0||n>e.length-r)throw new Error(`${o} write did not make valid forward progress`);r+=n}}function D(t,e){if(e!=="win32")return!1;let i=t.code;return i==="EACCES"||i==="EBADF"||i==="EINVAL"||i==="EISDIR"||i==="EPERM"}export{B as a,p as b,b as c,E as d,d as e,y as f,h as g,_ as h,w as i,P as j,T as k,I as l,g as m,N as n,D as o};
2
+ //# sourceMappingURL=chunk-7F45LJKI.js.map
@@ -1,3 +1,3 @@
1
- import{a as R}from"./chunk-Z2AWCTN6.js";import{o as h}from"./chunk-AYPDH2LU.js";import{a as g}from"./chunk-5H5WTJSD.js";import{h as d}from"./chunk-TD7VKJ2Y.js";import{a as m}from"./chunk-7JYHQAH2.js";import{B as p}from"./chunk-Q7GBK5T7.js";function D(t,r,n={}){let e=g(t,r);if(!e)return[];let l=!d(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=h(t,e,{semantic:n.semantic,semanticEvidence:R}).map(s=>({relativePath:s.file,line:s.line})),o=b(t,e),f=new Set,a=[];for(let s of[...l,...c,...o]){let u=`${s.relativePath}:${s.line}`;f.has(u)||(f.add(u),a.push(s))}return a}function b(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=S(r.symbol);if(n.length===0)return[];let e=[];for(let i of m(t,{extensions:[".rb"],includeIgnored:!1})){let l=p(t,i);if(!l)continue;let c=l.split(`
1
+ import{a as R}from"./chunk-W7CXK74K.js";import{o as h}from"./chunk-DYGHBZ2N.js";import{a as g}from"./chunk-OSSESPDX.js";import{h as d}from"./chunk-N2ZSIIGR.js";import{a as m}from"./chunk-ZOHS7AQV.js";import{h as p}from"./chunk-FESCRNVV.js";function D(t,r,n={}){let e=g(t,r);if(!e)return[];let l=!d(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=h(t,e,{semantic:n.semantic,semanticEvidence:R}).map(s=>({relativePath:s.file,line:s.line})),o=b(t,e),f=new Set,a=[];for(let s of[...l,...c,...o]){let u=`${s.relativePath}:${s.line}`;f.has(u)||(f.add(u),a.push(s))}return a}function b(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=S(r.symbol);if(n.length===0)return[];let e=[];for(let i of m(t,{extensions:[".rb"],includeIgnored:!1})){let l=p(t,i);if(!l)continue;let c=l.split(`
2
2
  `);for(let o=0;o<c.length;o++){let f=c[o]??"";n.some(a=>new RegExp(`@${a}\\b|\\b${a}:`).test(f))&&e.push({relativePath:i,line:o})}}return e}function S(t){let n=(t.split(":").pop()??t).replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^A-Za-z0-9_]+/g,"_").toLowerCase().replace(/^_+|_+$/g,""),e=n.split("_").filter(Boolean),i=new Set;return n&&i.add(n),e.length>=1&&i.add(e[e.length-1]),e.length>=2&&i.add(e.slice(-2).join("_")),[...i]}export{D as a};
3
- //# sourceMappingURL=chunk-4TQU4TX2.js.map
3
+ //# sourceMappingURL=chunk-7IWV2EG3.js.map
@@ -1,2 +1,2 @@
1
- import{d as y}from"./chunk-SVHTMVA4.js";import{b as h,e as b}from"./chunk-EELPBR7E.js";import{B as m,o as l}from"./chunk-C7IJMOFP.js";import{c as u,d as i,f as c}from"./chunk-DRENNWRG.js";import{basename as f}from"path";function g(t,o){let n=o.className,e=h(t,n);return e.match?e.total>1?{kind:"ambiguous",query:n,total:e.total,candidates:[p(e.match),...e.candidates]}:{kind:"matched",query:n,owner:L(e.match),methods:M(t,e.match)}:{kind:"missing",query:n,suggestions:b(t,n,5)}}function j(t,o){let n=g(t,{className:o});if(n.kind==="missing")throw new Error(`No class definition matched '${o}'.`);if(n.kind==="ambiguous"){let e=n.candidates.map(s=>`${s.relativePath}:${s.startLine+1}`).join(", ");throw new Error(`Class '${o}' is ambiguous across ${n.total} definitions (${e}). Qualify it with a path or exact SCIP symbol identity.`)}return n.methods}function M(t,o){let n=i(o.symbol),s=new y(t).definitionsForFile(o.relativePath).filter(r=>c(r.symbol)),a=s.filter(r=>r.parentTypeName===n||r.symbol.includes(n)),d=(a.length>0?a:S(f(o.relativePath))===n?s.filter(r=>r.symbol.includes("<invalid-global-code>")):[]).map(r=>({startLine:r.startLine,endLine:r.endLine,name:i(r.symbol)}));return l(o.relativePath)!=="clojure"?d:R(d,w(t,o))}function p(t){return{symbol:t.symbol,shortName:u(t.symbol),relativePath:t.relativePath,startLine:t.startLine}}function L(t){return{...p(t),endLine:t.endLine}}function S(t){return t.replace(/\.[^.]+$/,"")}function w(t,o){let n=i(o.symbol);return n?(m(t,o.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===n).map(e=>({startLine:e.startLine,endLine:e.endLine,name:e.memberName})):[]}function R(t,o){let n=new Map;for(let e of[...t,...o])n.set(`${e.name}:${e.startLine}:${e.endLine}`,e);return[...n.values()].sort((e,s)=>e.startLine-s.startLine||e.endLine-s.endLine)}export{g as a,j as b};
2
- //# sourceMappingURL=chunk-UDY7MIAW.js.map
1
+ import{e as y}from"./chunk-2WC2OEDO.js";import{b as h,e as b}from"./chunk-HOENASQM.js";import{C as m,p as l}from"./chunk-3L2ZBPEX.js";import{c as u,d as i,f as c}from"./chunk-DRENNWRG.js";import{basename as f}from"path";function g(t,o){let n=o.className,e=h(t,n);return e.match?e.total>1?{kind:"ambiguous",query:n,total:e.total,candidates:[p(e.match),...e.candidates]}:{kind:"matched",query:n,owner:L(e.match),methods:M(t,e.match)}:{kind:"missing",query:n,suggestions:b(t,n,5)}}function j(t,o){let n=g(t,{className:o});if(n.kind==="missing")throw new Error(`No class definition matched '${o}'.`);if(n.kind==="ambiguous"){let e=n.candidates.map(s=>`${s.relativePath}:${s.startLine+1}`).join(", ");throw new Error(`Class '${o}' is ambiguous across ${n.total} definitions (${e}). Qualify it with a path or exact SCIP symbol identity.`)}return n.methods}function M(t,o){let n=i(o.symbol),s=new y(t).definitionsForFile(o.relativePath).filter(r=>c(r.symbol)),a=s.filter(r=>r.parentTypeName===n||r.symbol.includes(n)),d=(a.length>0?a:S(f(o.relativePath))===n?s.filter(r=>r.symbol.includes("<invalid-global-code>")):[]).map(r=>({startLine:r.startLine,endLine:r.endLine,name:i(r.symbol)}));return l(o.relativePath)!=="clojure"?d:R(d,w(t,o))}function p(t){return{symbol:t.symbol,shortName:u(t.symbol),relativePath:t.relativePath,startLine:t.startLine}}function L(t){return{...p(t),endLine:t.endLine}}function S(t){return t.replace(/\.[^.]+$/,"")}function w(t,o){let n=i(o.symbol);return n?(m(t,o.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===n).map(e=>({startLine:e.startLine,endLine:e.endLine,name:e.memberName})):[]}function R(t,o){let n=new Map;for(let e of[...t,...o])n.set(`${e.name}:${e.startLine}:${e.endLine}`,e);return[...n.values()].sort((e,s)=>e.startLine-s.startLine||e.endLine-s.endLine)}export{g as a,j as b};
2
+ //# sourceMappingURL=chunk-AFHTBORT.js.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-VNLGKHS6.js";var e=t;export{e as a};
2
+ //# sourceMappingURL=chunk-AVRYW5OZ.js.map
@@ -0,0 +1,2 @@
1
+ function r(o){try{return process.kill(o,0),!0}catch(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EPERM"}}export{r as a};
2
+ //# sourceMappingURL=chunk-B3PYOSCX.js.map
@@ -1,4 +1,4 @@
1
- import{b as be}from"./chunk-FELGD32K.js";import{B as G,h as ye,k as O,t as M,x as P}from"./chunk-C7IJMOFP.js";import{e as pe}from"./chunk-IW5XQG5G.js";var Oe=12,De=20,oe=200,ie=800,Ie=.9,Me=64,ke=pe("behavior-construct-ranges"),ge={if_statement:"branch",conditional_expression:"branch",ternary_expression:"branch",switch_statement:"branch",switch_expression:"branch",switch_case:"branch",case_statement:"branch",match_statement:"branch",match_expression:"branch",match_arm:"branch",for_statement:"loop",for_in_statement:"loop",for_of_statement:"loop",while_statement:"loop",do_statement:"loop",await_expression:"await",return_statement:"return",throw_statement:"throw",raise_statement:"throw",assignment_expression:"mutation",augmented_assignment_expression:"mutation",assignment:"mutation",pair:"shape",field_initializer:"shape",spread_element:"spread",dictionary_splat:"spread",catch_clause:"catch",except_clause:"catch",finally_clause:"finally"},Z=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],Ce=[...Z,"lifecycle"],_e=["loop","await","throw","mutation","spread","catch","finally","lifecycle"],Ye=new Set(["onBeforeMount","onBeforeUnmount","onMounted","onUnmounted","useEffect","useInsertionEffect","useLayoutEffect"]);var Ne=new Set(["object","object_pattern","dictionary","field_declaration_list","struct_expression","struct_pattern"]);function Ct(e,n,t,o,r=[],a={}){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ee(e,n,t,o,r),u=ne(e,n,c.startLine,c.endLine),d=u?.startLine??t,p=u?.endLine??o,N=(u?I(s.rootNode,c.startLine,c.endLine):null)??M(s.rootNode,d,p);if(!N)return null;let b=Le(N,l,d,p,r);if(!b||b.lines.length===0||b.lines.some(S=>S.text.length>ie))return null;let h=ot(l,d,p),C=it(b);if((a.requireSavings??!0)&&C>=h*Ie)return null;let x=Z.filter(S=>b.lines.some(v=>v.signals.includes(S)));return{...u?{callable:{name:u.name,startLine:u.startLine,endLine:u.endLine}}:{},representation:"outline",constructKind:b.constructKind,signature:b.signature,lines:b.lines,signals:x,testCases:be(n)==="test"?ut(l,d,p):[],coverage:{sourceStatements:b.sourceStatements,representedStatements:b.sourceStatements,copiedStatements:b.copiedStatements,omittedStatements:0},rawCharacters:h,outlineCharacters:C,candidateLines:b.sourceStatements,omittedLines:0}}function _t(e,n,t,o,r){if(r.length===0)return[];let a=P(e,n);if(!a)return[];let s=O(e,n),l=ee(e,n,t,o,r),c=ne(e,n,l.startLine,l.endLine),u=c?.startLine??t,d=c?.endLine??o,p=(c?I(a.rootNode,l.startLine,l.endLine):null)??M(a.rootNode,u,d);if(!p)return[];let N=Le(p,s,u,d,r);return N?N.lines.filter(b=>b.text.length<=ie&&b.signals.some(h=>["branch","loop","catch","finally"].includes(h))&&r.some(h=>h>=b.line&&h<=b.endLine)):[]}function Nt(e,n,t,o){let r=P(e,n);if(!r)return null;let a=I(r.rootNode,t,o)??M(r.rootNode,t,o);if(!a)return null;let s=[],l=se(a),c=[];return ce(a,a,u=>{if(Y.has(u.type)||je.has(u.type)){ze(s,c,u);return}if(te.has(u.type)){He(s,c,u);return}if(z.has(u.type)){Ue(s,c,u);return}H.has(u.type)&&Ke(s,u)}),{facts:Je(s),terminals:we(l),unsupported:c}}function ee(e,n,t,o,r=[]){let a=r.filter(d=>d>=t&&d<=o),s=ke.get(e,n,ye(e,n)??"",()=>new Map),l=`${t}:${o}:${a.join(",")}`,c=s.get(l);if(c)return s.delete(l),s.set(l,c),{startLine:c[0],endLine:c[1]};let u=$e(e,n,t,o,a);if(s.set(l,[u.startLine,u.endLine]),s.size>Me){let d=s.keys().next().value;d!==void 0&&s.delete(d)}return u}function $e(e,n,t,o,r){let a=P(e,n),s=[];if(r.length>0&&a){let d=[],p=r[0],N=p;for(let h of r)p=Math.min(p,h),N=Math.max(N,h);Ee(a.rootNode,p,N,h=>{Qe(h)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&d.push(h),T.has(h.type)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&s.push(h)});let b=d.sort((h,C)=>h.endPosition.row-h.startPosition.row-(C.endPosition.row-C.startPosition.row)||h.startPosition.row-C.startPosition.row)[0];if(b)return{startLine:b.startPosition.row,endLine:b.endPosition.row}}let l=ne(e,n,t,o);if(l)return{startLine:l.startLine,endLine:l.endLine};if(r.length===0)return{startLine:t,endLine:o};let c=(G(e,n)?.callables??[]).filter(d=>d.startLine>=t&&d.endLine<=o&&r.every(p=>d.startLine<=p&&d.endLine>=p)).sort((d,p)=>d.endLine-d.startLine-(p.endLine-p.startLine)||d.startLine-p.startLine)[0];if(!a)return c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o};let u=s.sort((d,p)=>d.endPosition.row-d.startPosition.row-(p.endPosition.row-p.startPosition.row)||d.startPosition.row-p.startPosition.row)[0];return u?{startLine:u.startPosition.row,endLine:u.endPosition.row}:c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o}}function xt(e,n,t,o,r={}){if(o-t+1<(r.minimumBodyLines??De))return null;let s=Re(e,n,t,o,[],!1);if(!s)return null;let l=s.candidates.map(S=>({...S,signals:S.signals.filter(v=>v!=="anchor"&&v!=="signature")})).filter(S=>S.signals.length>0);if(l.length===0)return null;let c=ct(l),u=l.filter(S=>S.text.length<=oe);if(u.length===0)return null;let d=_e.filter(S=>(c[S]??0)>0),p=d.filter(S=>S!=="await"),N=s.shapes.reduce((S,v)=>S+v.fields.length,0);if(p.length===0&&!((c.await??0)>0&&N>0)&&N<3)return null;let b=lt(u,c),h=new Map;for(let S of d){let v=b.find(m=>m.signals.includes(S));v&&h.set(v.line,v)}if(h.size===0){let S=b.find(v=>v.signals.includes("branch"));S&&h.set(S.line,S)}let C=Math.min(10,Math.max(1,r.maxLines??h.size)),x=new Map;for(let S of h.values()){if(x.size>=C)break;x.set(S.line,S)}return x.size>=l.length&&s.shapes.length===0?null:{owner:s.callable?.name??null,startLine:t,endLine:o,lines:[...x.values()].sort((S,v)=>S.line-v.line),shapes:s.shapes,signalCounts:c,candidateLines:l.length,omittedLines:l.length-x.size}}function vt(e,n,t,o){let r=Re(e,n,t,o,[],!1);return r?new Map(r.candidates.map(a=>[a.line,a.signals.filter(s=>s!=="lifecycle")])):new Map}var T=new Set(["arrow_function","constructor_declaration","function_declaration","function_definition","function_expression","generator_function","generator_function_declaration","function_item","lambda","lambda_expression","method","method_declaration","method_definition"]),B=new Set(["block","body","compound_statement","declaration_list","statement_block"]),Y=new Set(["if_expression","if_statement","unless","unless_statement"]),je=new Set(["conditional_expression","ternary_expression"]),te=new Set(["do_statement","enhanced_for_statement","for_expression","for_in_statement","for_of_statement","for_statement","loop_expression","while_statement"]),z=new Set(["match_expression","match_statement","switch_expression","switch_statement"]),xe=new Set(["case_statement","match_arm","switch_case","switch_default"]),H=new Set(["try_expression","try_statement"]),X=new Set(["catch_clause","except_clause","rescue"]),j=new Set(["ensure","finally_clause"]),$=new Set(["else","else_clause"]),ve=new Set(["raise_statement","return_statement","throw_statement"]),qe=new Set(["block_comment","comment","line_comment"]);function ze(e,n,t){let o=t.childForFieldName("condition")??ue(t),r=t.childForFieldName("consequence")??t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),a=t.childForFieldName("alternative")??t.namedChildren.find(c=>$.has(c.type));if(!o||!r){n.push(le(t,"conditional-fields-unresolved"));return}let s=F(o,"predicate",o.text),l=F(r,Se(r),"consequence");if(E(e,s,l,"predicate-consequence",{branchRole:"consequence"}),J(e,s,r,"consequence"),a){let c=F(a,Se(a),"alternative");E(e,s,c,"predicate-alternative",{branchRole:"alternative"}),J(e,s,a,"alternative");return}E(e,s,ae(s,"otherwise continue"),"predicate-fallthrough",{branchRole:"fallthrough"})}function He(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(s=>B.has(s.type));if(!o){n.push(le(t,"loop-body-unresolved"));return}let r=t.childForFieldName("condition"),a=F(r??t,"predicate",r?.text??R(t,o));E(e,a,F(o,"outcome","iteration"),"loop-iteration",{branchRole:"iteration"}),J(e,a,o,"iteration"),E(e,a,ae(a,"loop exits"),"loop-exit",{branchRole:"exit"})}function Ue(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),r=t.childForFieldName("value")??t.childForFieldName("condition")??t.childForFieldName("subject")??ue(t),a=We(o??t);if(!r||a.length===0){n.push(le(t,"switch-cases-unresolved"));return}let s=F(r,"predicate",r.text),l=!1;for(let c of a){let u=Xe(c);l||=u;let d=R(c,c.namedChildren.find(p=>Q(p)));E(e,s,F(c,"outcome",d||(u?"default":"case")),u?"predicate-default":"predicate-case",{branchRole:u?"default":"case"}),J(e,s,c,u?"default":"case")}l||E(e,s,ae(s,"no case matched"),"predicate-fallthrough",{branchRole:"fallthrough"})}function Ke(e,n){let t=F(n,"scope","try");for(let o of Ve(n)){let r=j.has(o.type),a=F(o,"handler",r?"finally":R(o,W(o)));E(e,t,a,r?"finally-cleanup":"exception-handler",{branchRole:r?"finally":"catch"}),Ge(e,a,o,r?"finally":"catch")}}function Ge(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"handler-throw":"handler-return",{branchRole:o,terminalKind:a})}}function J(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"predicate-throw":"predicate-return",{branchRole:o,terminalKind:a})}}function E(e,n,t,o,r){e.push({controller:n,outcome:t,subtype:o,attributes:r})}function F(e,n,t){return{kind:n,label:q(t).slice(0,ie),startLine:e.startPosition.row,endLine:e.endPosition.row,implicit:!1}}function ae(e,n){return{...e,kind:"outcome",label:n,implicit:!0}}function Se(e){return ve.has(e.type)?"terminal":"outcome"}function se(e){let n=[];return ce(e,e,t=>{ve.has(t.type)&&n.push(F(t,"terminal",t.text))}),we(n)}function ce(e,n,t){t(n);for(let o of n.namedChildren)o!==e&&T.has(o.type)||ce(e,o,t)}function We(e){let n=[],t=o=>{for(let r of o.namedChildren)z.has(r.type)||(xe.has(r.type)?n.push(r):t(r))};return t(e),n}function Ve(e){let n=[],t=o=>{for(let r of o.namedChildren)H.has(r.type)||(X.has(r.type)||j.has(r.type)?n.push(r):T.has(r.type)||t(r))};return t(e),n}function Xe(e){let n=R(e,e.namedChildren.find(t=>Q(t))).trim();return e.type==="switch_default"||/^(?:default\b|_\s*=>)/u.test(n)}function le(e,n){return{startLine:e.startPosition.row,endLine:e.endPosition.row,reason:n}}function Je(e){let n=new Map;for(let t of e)n.set(`${t.controller.startLine}\0${t.controller.endLine}\0${t.outcome.startLine}\0${t.outcome.endLine}\0${t.subtype}\0${t.outcome.label}`,t);return[...n.values()]}function we(e){let n=new Map;for(let t of e)n.set(`${t.startLine}\0${t.endLine}\0${t.kind}\0${t.label}`,t);return[...n.values()]}function Qe(e){return T.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||X.has(e.type)||j.has(e.type)}function Le(e,n,t,o,r){let s=I(e,t,o)??e,l=W(s),c=[],u=0,d=0,p=(i,f,y,g,w=!1,D=!0)=>{let K=w?y.trim():q(y);if(!K)return;let A=Math.max(t,i.startPosition.row),fe=Math.min(o,i.endPosition.row);c.push({line:A,endLine:Math.max(A,fe),depth:f,signals:Z.filter(me=>g.includes(me)||me==="anchor"&&r.some(he=>he>=A&&he<=fe)),text:K,copied:w}),D&&(u+=1,w&&(d+=1))},N=(i,f)=>{for(let y of i.namedChildren)_(y,f)},b=(i,f)=>{if(Y.has(i.type)){h(i,f,"else if");return}if($.has(i.type)){let y=i.namedChildren.find(w=>Y.has(w.type));if(y){h(y,f,"else if");return}p(i,f,"else",["branch"],!1,!1);let g=W(i)??i.namedChildren.find(w=>B.has(w.type));if(g)_(g,f+1);else for(let w of i.namedChildren)_(w,f+1);return}p(i,f,"else",["branch"],!1,!1),_(i,f+1)},h=(i,f,y=i.type.startsWith("unless")?"unless":"if")=>{let g=i.childForFieldName("condition")??ue(i),w=i.childForFieldName("consequence")??i.childForFieldName("body")??i.namedChildren.find(A=>B.has(A.type)),D=i.childForFieldName("alternative")??i.namedChildren.find(A=>$.has(A.type)),K=g?g.text:R(i,w);p(i,f,`${y} ${nt(K)}`,k(g,["branch"])),w&&_(w,f+1),D&&b(D,f)},C=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["loop"])),y&&_(y,f+1)},x=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["branch"])),y&&_(y,f+1)},S=(i,f)=>{let y=i.namedChildren.find(g=>Q(g));p(i,f,R(i,y),["branch"],!1,!1);for(let g of i.namedChildren)(g===y||Q(g))&&_(g,f+1)},v=(i,f)=>{p(i,f,"try",[],!1);for(let y of i.namedChildren)B.has(y.type)?_(y,f+1):(X.has(y.type)||j.has(y.type))&&_(y,f)},m=(i,f,y)=>{let g=i.childForFieldName("body")??i.namedChildren.find(D=>B.has(D.type)),w=y==="finally"?"finally":R(i,g);p(i,f,w,[y],!1,!1),g&&_(g,f+1)},L=(i,f)=>{let y=W(i);p(i,f,R(i,y),k(i,["binding"])),y&&_(y,f+1)},_=(i,f)=>{if(i.startPosition.row>o||i.endPosition.row<t||qe.has(i.type)||i.type==="empty_statement")return;if(B.has(i.type)){N(i,f);return}if(Y.has(i.type)){h(i,f);return}if(te.has(i.type)){C(i,f);return}if(z.has(i.type)){x(i,f);return}if(xe.has(i.type)){S(i,f);return}if(H.has(i.type)){v(i,f);return}if(X.has(i.type)){m(i,f,"catch");return}if(j.has(i.type)){m(i,f,"finally");return}if($.has(i.type)){b(i,f);return}if(T.has(i.type)){L(i,f);return}let g=!Be(i)||rt(i);p(i,f,i.text,k(i),g)};return _(l&&l!==s?l:s,0),u===0?null:{constructKind:tt(s),signature:et(s,l,n,t),lines:c,sourceStatements:u,copiedStatements:d}}function I(e,n,t){let o=e.namedChildren.filter(r=>r.startPosition.row<=n&&r.endPosition.row>=t);for(let r of o.sort(Ze)){let a=I(r,n,t);if(a)return a}return T.has(e.type)&&e.startPosition.row<=n&&e.endPosition.row>=t?e:null}function Ze(e,n){return e.endPosition.row-e.startPosition.row-(n.endPosition.row-n.startPosition.row)||e.startPosition.row-n.startPosition.row}function W(e){return e.childForFieldName("body")??e.childForFieldName("consequence")??e.namedChildren.find(n=>B.has(n.type))??null}function et(e,n,t,o){let r=R(e,n);return r||(t[o]??e.text).trim()}function tt(e){return e.type.includes("constructor")?"constructor":e.type.includes("method")||e.type==="method"?re(e,new Set(["class_body","class_declaration","class_definition"]))?"class method":"object method":e.type==="arrow_function"||e.type==="function_expression"||e.type==="lambda"?re(e,new Set(["object","pair"]))?"object member":"function value":e.type.includes("function")?re(e,T)?"nested function":"module function":"source construct"}function re(e,n){let t=e.parent;for(;t;){if(n.has(t.type))return!0;t=t.parent}return!1}function ue(e){return e.namedChildren.find(n=>!B.has(n.type)&&!$.has(n.type))??null}function R(e,n){if(!n)return q(e.text);let t=Math.max(0,n.startIndex-e.startIndex);return q(e.text.slice(0,t)).replace(/[:{]\s*$/u,"").trim()}function nt(e){let n=q(e);return n.startsWith("(")&&n.endsWith(")")?n.slice(1,-1).trim():n}function q(e){return e.trim().replace(/\r?\n[\t ]*/gu," ")}function k(e,n=[]){let t=new Set(n);return e&&U(e,o=>{let r=ge[o.type];r&&t.add(r),o.type==="call_expression"&&(t.add("call"),Fe(o)&&t.add("shape")),de.has(o.type)&&t.add("binding")}),Z.filter(o=>t.has(o))}function rt(e){let n=!1;return U(e,t=>{n||!t.text.includes(`
1
+ import{b as be}from"./chunk-FRUSVINH.js";import{C as G,i as ye,l as O,u as M,y as P}from"./chunk-3L2ZBPEX.js";import{e as pe}from"./chunk-IW5XQG5G.js";var Oe=12,De=20,oe=200,ie=800,Ie=.9,Me=64,ke=pe("behavior-construct-ranges"),ge={if_statement:"branch",conditional_expression:"branch",ternary_expression:"branch",switch_statement:"branch",switch_expression:"branch",switch_case:"branch",case_statement:"branch",match_statement:"branch",match_expression:"branch",match_arm:"branch",for_statement:"loop",for_in_statement:"loop",for_of_statement:"loop",while_statement:"loop",do_statement:"loop",await_expression:"await",return_statement:"return",throw_statement:"throw",raise_statement:"throw",assignment_expression:"mutation",augmented_assignment_expression:"mutation",assignment:"mutation",pair:"shape",field_initializer:"shape",spread_element:"spread",dictionary_splat:"spread",catch_clause:"catch",except_clause:"catch",finally_clause:"finally"},Z=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],Ce=[...Z,"lifecycle"],_e=["loop","await","throw","mutation","spread","catch","finally","lifecycle"],Ye=new Set(["onBeforeMount","onBeforeUnmount","onMounted","onUnmounted","useEffect","useInsertionEffect","useLayoutEffect"]);var Ne=new Set(["object","object_pattern","dictionary","field_declaration_list","struct_expression","struct_pattern"]);function Ct(e,n,t,o,r=[],a={}){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ee(e,n,t,o,r),u=ne(e,n,c.startLine,c.endLine),d=u?.startLine??t,p=u?.endLine??o,N=(u?I(s.rootNode,c.startLine,c.endLine):null)??M(s.rootNode,d,p);if(!N)return null;let b=Le(N,l,d,p,r);if(!b||b.lines.length===0||b.lines.some(S=>S.text.length>ie))return null;let h=ot(l,d,p),C=it(b);if((a.requireSavings??!0)&&C>=h*Ie)return null;let x=Z.filter(S=>b.lines.some(v=>v.signals.includes(S)));return{...u?{callable:{name:u.name,startLine:u.startLine,endLine:u.endLine}}:{},representation:"outline",constructKind:b.constructKind,signature:b.signature,lines:b.lines,signals:x,testCases:be(n)==="test"?ut(l,d,p):[],coverage:{sourceStatements:b.sourceStatements,representedStatements:b.sourceStatements,copiedStatements:b.copiedStatements,omittedStatements:0},rawCharacters:h,outlineCharacters:C,candidateLines:b.sourceStatements,omittedLines:0}}function _t(e,n,t,o,r){if(r.length===0)return[];let a=P(e,n);if(!a)return[];let s=O(e,n),l=ee(e,n,t,o,r),c=ne(e,n,l.startLine,l.endLine),u=c?.startLine??t,d=c?.endLine??o,p=(c?I(a.rootNode,l.startLine,l.endLine):null)??M(a.rootNode,u,d);if(!p)return[];let N=Le(p,s,u,d,r);return N?N.lines.filter(b=>b.text.length<=ie&&b.signals.some(h=>["branch","loop","catch","finally"].includes(h))&&r.some(h=>h>=b.line&&h<=b.endLine)):[]}function Nt(e,n,t,o){let r=P(e,n);if(!r)return null;let a=I(r.rootNode,t,o)??M(r.rootNode,t,o);if(!a)return null;let s=[],l=se(a),c=[];return ce(a,a,u=>{if(Y.has(u.type)||je.has(u.type)){ze(s,c,u);return}if(te.has(u.type)){He(s,c,u);return}if(z.has(u.type)){Ue(s,c,u);return}H.has(u.type)&&Ke(s,u)}),{facts:Je(s),terminals:we(l),unsupported:c}}function ee(e,n,t,o,r=[]){let a=r.filter(d=>d>=t&&d<=o),s=ke.get(e,n,ye(e,n)??"",()=>new Map),l=`${t}:${o}:${a.join(",")}`,c=s.get(l);if(c)return s.delete(l),s.set(l,c),{startLine:c[0],endLine:c[1]};let u=$e(e,n,t,o,a);if(s.set(l,[u.startLine,u.endLine]),s.size>Me){let d=s.keys().next().value;d!==void 0&&s.delete(d)}return u}function $e(e,n,t,o,r){let a=P(e,n),s=[];if(r.length>0&&a){let d=[],p=r[0],N=p;for(let h of r)p=Math.min(p,h),N=Math.max(N,h);Ee(a.rootNode,p,N,h=>{Qe(h)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&d.push(h),T.has(h.type)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&s.push(h)});let b=d.sort((h,C)=>h.endPosition.row-h.startPosition.row-(C.endPosition.row-C.startPosition.row)||h.startPosition.row-C.startPosition.row)[0];if(b)return{startLine:b.startPosition.row,endLine:b.endPosition.row}}let l=ne(e,n,t,o);if(l)return{startLine:l.startLine,endLine:l.endLine};if(r.length===0)return{startLine:t,endLine:o};let c=(G(e,n)?.callables??[]).filter(d=>d.startLine>=t&&d.endLine<=o&&r.every(p=>d.startLine<=p&&d.endLine>=p)).sort((d,p)=>d.endLine-d.startLine-(p.endLine-p.startLine)||d.startLine-p.startLine)[0];if(!a)return c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o};let u=s.sort((d,p)=>d.endPosition.row-d.startPosition.row-(p.endPosition.row-p.startPosition.row)||d.startPosition.row-p.startPosition.row)[0];return u?{startLine:u.startPosition.row,endLine:u.endPosition.row}:c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o}}function xt(e,n,t,o,r={}){if(o-t+1<(r.minimumBodyLines??De))return null;let s=Re(e,n,t,o,[],!1);if(!s)return null;let l=s.candidates.map(S=>({...S,signals:S.signals.filter(v=>v!=="anchor"&&v!=="signature")})).filter(S=>S.signals.length>0);if(l.length===0)return null;let c=ct(l),u=l.filter(S=>S.text.length<=oe);if(u.length===0)return null;let d=_e.filter(S=>(c[S]??0)>0),p=d.filter(S=>S!=="await"),N=s.shapes.reduce((S,v)=>S+v.fields.length,0);if(p.length===0&&!((c.await??0)>0&&N>0)&&N<3)return null;let b=lt(u,c),h=new Map;for(let S of d){let v=b.find(m=>m.signals.includes(S));v&&h.set(v.line,v)}if(h.size===0){let S=b.find(v=>v.signals.includes("branch"));S&&h.set(S.line,S)}let C=Math.min(10,Math.max(1,r.maxLines??h.size)),x=new Map;for(let S of h.values()){if(x.size>=C)break;x.set(S.line,S)}return x.size>=l.length&&s.shapes.length===0?null:{owner:s.callable?.name??null,startLine:t,endLine:o,lines:[...x.values()].sort((S,v)=>S.line-v.line),shapes:s.shapes,signalCounts:c,candidateLines:l.length,omittedLines:l.length-x.size}}function vt(e,n,t,o){let r=Re(e,n,t,o,[],!1);return r?new Map(r.candidates.map(a=>[a.line,a.signals.filter(s=>s!=="lifecycle")])):new Map}var T=new Set(["arrow_function","constructor_declaration","function_declaration","function_definition","function_expression","generator_function","generator_function_declaration","function_item","lambda","lambda_expression","method","method_declaration","method_definition"]),B=new Set(["block","body","compound_statement","declaration_list","statement_block"]),Y=new Set(["if_expression","if_statement","unless","unless_statement"]),je=new Set(["conditional_expression","ternary_expression"]),te=new Set(["do_statement","enhanced_for_statement","for_expression","for_in_statement","for_of_statement","for_statement","loop_expression","while_statement"]),z=new Set(["match_expression","match_statement","switch_expression","switch_statement"]),xe=new Set(["case_statement","match_arm","switch_case","switch_default"]),H=new Set(["try_expression","try_statement"]),X=new Set(["catch_clause","except_clause","rescue"]),j=new Set(["ensure","finally_clause"]),$=new Set(["else","else_clause"]),ve=new Set(["raise_statement","return_statement","throw_statement"]),qe=new Set(["block_comment","comment","line_comment"]);function ze(e,n,t){let o=t.childForFieldName("condition")??ue(t),r=t.childForFieldName("consequence")??t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),a=t.childForFieldName("alternative")??t.namedChildren.find(c=>$.has(c.type));if(!o||!r){n.push(le(t,"conditional-fields-unresolved"));return}let s=F(o,"predicate",o.text),l=F(r,Se(r),"consequence");if(E(e,s,l,"predicate-consequence",{branchRole:"consequence"}),J(e,s,r,"consequence"),a){let c=F(a,Se(a),"alternative");E(e,s,c,"predicate-alternative",{branchRole:"alternative"}),J(e,s,a,"alternative");return}E(e,s,ae(s,"otherwise continue"),"predicate-fallthrough",{branchRole:"fallthrough"})}function He(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(s=>B.has(s.type));if(!o){n.push(le(t,"loop-body-unresolved"));return}let r=t.childForFieldName("condition"),a=F(r??t,"predicate",r?.text??R(t,o));E(e,a,F(o,"outcome","iteration"),"loop-iteration",{branchRole:"iteration"}),J(e,a,o,"iteration"),E(e,a,ae(a,"loop exits"),"loop-exit",{branchRole:"exit"})}function Ue(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),r=t.childForFieldName("value")??t.childForFieldName("condition")??t.childForFieldName("subject")??ue(t),a=We(o??t);if(!r||a.length===0){n.push(le(t,"switch-cases-unresolved"));return}let s=F(r,"predicate",r.text),l=!1;for(let c of a){let u=Xe(c);l||=u;let d=R(c,c.namedChildren.find(p=>Q(p)));E(e,s,F(c,"outcome",d||(u?"default":"case")),u?"predicate-default":"predicate-case",{branchRole:u?"default":"case"}),J(e,s,c,u?"default":"case")}l||E(e,s,ae(s,"no case matched"),"predicate-fallthrough",{branchRole:"fallthrough"})}function Ke(e,n){let t=F(n,"scope","try");for(let o of Ve(n)){let r=j.has(o.type),a=F(o,"handler",r?"finally":R(o,W(o)));E(e,t,a,r?"finally-cleanup":"exception-handler",{branchRole:r?"finally":"catch"}),Ge(e,a,o,r?"finally":"catch")}}function Ge(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"handler-throw":"handler-return",{branchRole:o,terminalKind:a})}}function J(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"predicate-throw":"predicate-return",{branchRole:o,terminalKind:a})}}function E(e,n,t,o,r){e.push({controller:n,outcome:t,subtype:o,attributes:r})}function F(e,n,t){return{kind:n,label:q(t).slice(0,ie),startLine:e.startPosition.row,endLine:e.endPosition.row,implicit:!1}}function ae(e,n){return{...e,kind:"outcome",label:n,implicit:!0}}function Se(e){return ve.has(e.type)?"terminal":"outcome"}function se(e){let n=[];return ce(e,e,t=>{ve.has(t.type)&&n.push(F(t,"terminal",t.text))}),we(n)}function ce(e,n,t){t(n);for(let o of n.namedChildren)o!==e&&T.has(o.type)||ce(e,o,t)}function We(e){let n=[],t=o=>{for(let r of o.namedChildren)z.has(r.type)||(xe.has(r.type)?n.push(r):t(r))};return t(e),n}function Ve(e){let n=[],t=o=>{for(let r of o.namedChildren)H.has(r.type)||(X.has(r.type)||j.has(r.type)?n.push(r):T.has(r.type)||t(r))};return t(e),n}function Xe(e){let n=R(e,e.namedChildren.find(t=>Q(t))).trim();return e.type==="switch_default"||/^(?:default\b|_\s*=>)/u.test(n)}function le(e,n){return{startLine:e.startPosition.row,endLine:e.endPosition.row,reason:n}}function Je(e){let n=new Map;for(let t of e)n.set(`${t.controller.startLine}\0${t.controller.endLine}\0${t.outcome.startLine}\0${t.outcome.endLine}\0${t.subtype}\0${t.outcome.label}`,t);return[...n.values()]}function we(e){let n=new Map;for(let t of e)n.set(`${t.startLine}\0${t.endLine}\0${t.kind}\0${t.label}`,t);return[...n.values()]}function Qe(e){return T.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||X.has(e.type)||j.has(e.type)}function Le(e,n,t,o,r){let s=I(e,t,o)??e,l=W(s),c=[],u=0,d=0,p=(i,f,y,g,w=!1,D=!0)=>{let K=w?y.trim():q(y);if(!K)return;let A=Math.max(t,i.startPosition.row),fe=Math.min(o,i.endPosition.row);c.push({line:A,endLine:Math.max(A,fe),depth:f,signals:Z.filter(me=>g.includes(me)||me==="anchor"&&r.some(he=>he>=A&&he<=fe)),text:K,copied:w}),D&&(u+=1,w&&(d+=1))},N=(i,f)=>{for(let y of i.namedChildren)_(y,f)},b=(i,f)=>{if(Y.has(i.type)){h(i,f,"else if");return}if($.has(i.type)){let y=i.namedChildren.find(w=>Y.has(w.type));if(y){h(y,f,"else if");return}p(i,f,"else",["branch"],!1,!1);let g=W(i)??i.namedChildren.find(w=>B.has(w.type));if(g)_(g,f+1);else for(let w of i.namedChildren)_(w,f+1);return}p(i,f,"else",["branch"],!1,!1),_(i,f+1)},h=(i,f,y=i.type.startsWith("unless")?"unless":"if")=>{let g=i.childForFieldName("condition")??ue(i),w=i.childForFieldName("consequence")??i.childForFieldName("body")??i.namedChildren.find(A=>B.has(A.type)),D=i.childForFieldName("alternative")??i.namedChildren.find(A=>$.has(A.type)),K=g?g.text:R(i,w);p(i,f,`${y} ${nt(K)}`,k(g,["branch"])),w&&_(w,f+1),D&&b(D,f)},C=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["loop"])),y&&_(y,f+1)},x=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["branch"])),y&&_(y,f+1)},S=(i,f)=>{let y=i.namedChildren.find(g=>Q(g));p(i,f,R(i,y),["branch"],!1,!1);for(let g of i.namedChildren)(g===y||Q(g))&&_(g,f+1)},v=(i,f)=>{p(i,f,"try",[],!1);for(let y of i.namedChildren)B.has(y.type)?_(y,f+1):(X.has(y.type)||j.has(y.type))&&_(y,f)},m=(i,f,y)=>{let g=i.childForFieldName("body")??i.namedChildren.find(D=>B.has(D.type)),w=y==="finally"?"finally":R(i,g);p(i,f,w,[y],!1,!1),g&&_(g,f+1)},L=(i,f)=>{let y=W(i);p(i,f,R(i,y),k(i,["binding"])),y&&_(y,f+1)},_=(i,f)=>{if(i.startPosition.row>o||i.endPosition.row<t||qe.has(i.type)||i.type==="empty_statement")return;if(B.has(i.type)){N(i,f);return}if(Y.has(i.type)){h(i,f);return}if(te.has(i.type)){C(i,f);return}if(z.has(i.type)){x(i,f);return}if(xe.has(i.type)){S(i,f);return}if(H.has(i.type)){v(i,f);return}if(X.has(i.type)){m(i,f,"catch");return}if(j.has(i.type)){m(i,f,"finally");return}if($.has(i.type)){b(i,f);return}if(T.has(i.type)){L(i,f);return}let g=!Be(i)||rt(i);p(i,f,i.text,k(i),g)};return _(l&&l!==s?l:s,0),u===0?null:{constructKind:tt(s),signature:et(s,l,n,t),lines:c,sourceStatements:u,copiedStatements:d}}function I(e,n,t){let o=e.namedChildren.filter(r=>r.startPosition.row<=n&&r.endPosition.row>=t);for(let r of o.sort(Ze)){let a=I(r,n,t);if(a)return a}return T.has(e.type)&&e.startPosition.row<=n&&e.endPosition.row>=t?e:null}function Ze(e,n){return e.endPosition.row-e.startPosition.row-(n.endPosition.row-n.startPosition.row)||e.startPosition.row-n.startPosition.row}function W(e){return e.childForFieldName("body")??e.childForFieldName("consequence")??e.namedChildren.find(n=>B.has(n.type))??null}function et(e,n,t,o){let r=R(e,n);return r||(t[o]??e.text).trim()}function tt(e){return e.type.includes("constructor")?"constructor":e.type.includes("method")||e.type==="method"?re(e,new Set(["class_body","class_declaration","class_definition"]))?"class method":"object method":e.type==="arrow_function"||e.type==="function_expression"||e.type==="lambda"?re(e,new Set(["object","pair"]))?"object member":"function value":e.type.includes("function")?re(e,T)?"nested function":"module function":"source construct"}function re(e,n){let t=e.parent;for(;t;){if(n.has(t.type))return!0;t=t.parent}return!1}function ue(e){return e.namedChildren.find(n=>!B.has(n.type)&&!$.has(n.type))??null}function R(e,n){if(!n)return q(e.text);let t=Math.max(0,n.startIndex-e.startIndex);return q(e.text.slice(0,t)).replace(/[:{]\s*$/u,"").trim()}function nt(e){let n=q(e);return n.startsWith("(")&&n.endsWith(")")?n.slice(1,-1).trim():n}function q(e){return e.trim().replace(/\r?\n[\t ]*/gu," ")}function k(e,n=[]){let t=new Set(n);return e&&U(e,o=>{let r=ge[o.type];r&&t.add(r),o.type==="call_expression"&&(t.add("call"),Fe(o)&&t.add("shape")),de.has(o.type)&&t.add("binding")}),Z.filter(o=>t.has(o))}function rt(e){let n=!1;return U(e,t=>{n||!t.text.includes(`
2
2
  `)||/(?:string|template|heredoc|raw_string)/u.test(t.type)&&(n=!0)}),n}function Q(e){return B.has(e.type)||Y.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||T.has(e.type)||Be(e)}function Be(e){return/(?:statement|declaration|expression|assignment|return|throw|raise|break|continue|yield|with_item)$/u.test(e.type)||de.has(e.type)}function ot(e,n,t){let o=0;for(let r=n;r<=t;r+=1)o+=(e[r]?.length??0)+10;return o}function it(e){return e.constructKind.length+e.signature.length+80+e.lines.reduce((n,t)=>n+t.text.length+t.depth*2+10,0)}function Re(e,n,t,o,r,a){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ne(e,n,t,o),u=a?c?.startLine??t:t,d=a?c?.endLine??o:o,N=(c?.startLine===u&&c.endLine===d?I(s.rootNode,u,d):null)??M(s.rootNode,u,d);if(!N)return null;let b=new Map,h=new Map,C=new Map,x=(m,L)=>{if(m<u||m>d)return;let _=b.get(m)??new Set;_.add(L),b.set(m,_)};c&&x(c.startLine,"signature");for(let m of r)x(m,"anchor");U(N,m=>{let L=ge[m.type];if(L&&x(m.startPosition.row,L),L==="shape"&&at(h,m,N,u,d),m.type==="call_expression"){let i=(m.childForFieldName("function")??m.namedChild(0))?.text.split(".").at(-1);if(Fe(m)){x(m.startPosition.row,"shape");let f=V(m.text);f.length<=oe&&C.set(m.startPosition.row,f)}if(i&&Ye.has(i)){x(m.startPosition.row,"lifecycle");let f=V(m.text);f.length<=oe&&C.set(m.startPosition.row,f)}}de.has(m.type)&&x(m.startPosition.row,"binding")});let S=G(e,n);for(let m of S?.callSites??[])m.line<u||m.line>d||(x(m.line,"call"),m.calleeLeaf==="catch"&&x(m.line,"catch"));let v=[...b.entries()].sort(([m],[L])=>m-L).map(([m,L])=>({line:m,signals:Ce.filter(_=>L.has(_)),text:C.get(m)??V(l[m]??"")})).filter(m=>m.text.length>0||m.signals.includes("anchor"));return{...c?{callable:c}:{},rangeStart:u,rangeEnd:d,sourceLines:l,candidates:v,shapes:[...h.values()].sort((m,L)=>m.startLine-L.startLine)}}function at(e,n,t,o,r){if(n.startPosition.row<o||n.endPosition.row>r)return;let a=n.childForFieldName("key")??n.childForFieldName("name")??n.namedChild(0),s=V(a?.text??"");if(!s||s.includes(`
3
3
  `)||s.length>60)return;let l=st(n,t);if(l.startPosition.row<o||l.endPosition.row>r)return;let c=`${l.startPosition.row}:${l.endPosition.row}`,u=e.get(c)??{startLine:l.startPosition.row,endLine:l.endPosition.row,fields:[]};u.fields.some(d=>d.name===s&&d.line===n.startPosition.row)||u.fields.push({name:s,line:n.startPosition.row}),e.set(c,u)}function st(e,n){let t=e.parent;for(;t&&t!==n.parent;){if(Ne.has(t.type))return t;if(t===n)break;t=t.parent}return e.parent??e}function ne(e,n,t,o){return G(e,n)?.callables.filter(r=>r.startLine<=t&&r.endLine>=o).sort((r,a)=>r.endLine-r.startLine-(a.endLine-a.startLine)||r.startLine-a.startLine)[0]}function U(e,n){n(e);for(let t of e.namedChildren)U(t,n)}function Ee(e,n,t,o){o(e);for(let r of e.namedChildren)r.startPosition.row>n||r.endPosition.row<t||Ee(r,n,t,o)}function V(e){return e.trim().replace(/\s+/gu," ")}function Fe(e){if(e.type!=="call_expression")return!1;let n=e.childForFieldName("arguments")??e.namedChildren.find(o=>o.type==="arguments"||o.type==="argument_list");if(!n)return!1;let t=!1;return U(n,o=>{Ne.has(o.type)&&(t=!0)}),t}function ct(e){let n={};for(let t of Ce){let o=e.filter(r=>r.signals.includes(t)).length;o>0&&(n[t]=o)}return n}function lt(e,n){let t=new Map;for(let a of e){let s=a.signals.join(",");t.set(s,(t.get(s)??0)+1)}let o=new Set(_e),r=a=>{let s=t.get(a.signals.join(","))??1,l=Math.min(...a.signals.map(d=>n[d]??1)),c=a.signals.some(d=>o.has(d))?3:1,u=Math.max(0,a.signals.length-1)*1e3;return c*(1e3/s+1e3/l)+u};return[...e].sort((a,s)=>r(s)-r(a)||s.line-a.line)}var de=new Set(["lexical_declaration","variable_declarator","const_item","static_item","let_declaration","assignment"]);function ut(e,n,t){let o=[],r=/\b(?:describe|it|test)(?:\.(?:only|skip|todo))?\s*\(\s*(['"`])([^'"`]+)\1/u;for(let a=n;a<=t;a+=1){let s=r.exec(e[a]??"")?.[2];if(!(!s||o.includes(s))&&(o.push(s),o.length>=Oe))break}return o}var dt=new Set(["arrow_function","class_declaration","constructor_declaration","field_definition","function_declaration","function_definition","function_expression","function_item","generator_function_declaration","generator_function","lexical_declaration","method","method_declaration","method_definition","object_method","variable_declaration"]);function ft(e,n,t){let o=P(e,n)?.rootNode??null,r=mt(o,t);if(!r)return null;let a=O(e,n);if(a.length===0)return null;let s=Math.max(0,r.startPosition.row),l=r.endPosition.column===0?r.endPosition.row-1:r.endPosition.row;return{type:r.type,startLine:s,endLine:Math.min(a.length-1,Math.max(s,l))}}function Et(e,n,t,o,r){let a=ee(e,n,o,r,[t]),s=a.startLine===a.endLine&&/(?:=>|\(|\{|\[|,)\s*$/u.test(O(e,n)[a.startLine]??"");if(!s&&(a.startLine>o||a.endLine<r))return a;let l=ft(e,n,t);return s&&l?{startLine:l.startLine,endLine:l.endLine}:l&&l.startLine>=o&&l.endLine<=r?{startLine:l.startLine,endLine:l.endLine}:{startLine:o,endLine:r}}function mt(e,n){if(!e||!Ae(e,n))return null;let t=Te(e,n);for(;t;){if(dt.has(t.type))return t;t=t.parent}return null}function Te(e,n){let t=e.namedChildren.filter(o=>Ae(o,n)).sort((o,r)=>Pe(o)-Pe(r));return t.length>0?Te(t[0],n):e}function Ae(e,n){return e.startPosition.row<=n&&e.endPosition.row>=n}function Pe(e){return e.endIndex-e.startIndex}export{Ct as a,_t as b,Nt as c,ee as d,xt as e,vt as f,ft as g,Et as h};
4
- //# sourceMappingURL=chunk-RNKPYYYE.js.map
4
+ //# sourceMappingURL=chunk-B5D7QPBE.js.map
@@ -1,4 +1,4 @@
1
- import{a as V,b as C}from"./chunk-BJT7LSPK.js";import{a as I}from"./chunk-NRBNAECH.js";import{a as v,b,g as m,ma as k}from"./chunk-AK3PYTIK.js";import Re from"better-sqlite3";import{existsSync as tn}from"fs";import{dirname as on,join as sn,resolve as Se}from"path";import H from"better-sqlite3";import{execFileSync as W}from"child_process";import{existsSync as B,readdirSync as G}from"fs";import{extname as R,join as U}from"path";function De(e={}){return{id:"auxiliary-documents",facts:["auxiliary-document"],run:n=>K({projectRoot:n.projectRoot,dbPath:n.dbPath,extensions:e.extensions,onStatus:n.onStatus})}}function K(e){let n=new Set((e.extensions??V).map(i=>i.toLowerCase()));if(n.size===0)return{scanned:0,inserted:0,existing:0};if(!B(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let r=I(e.projectRoot),t=J(e.projectRoot,n).filter(i=>!r.isIgnored(i)),o=new H(e.dbPath);try{let i=Y(o,t),s=o.prepare(`INSERT OR IGNORE INTO documents (language, relative_path, position_encoding, text)
1
+ import{a as V,b as C}from"./chunk-BJT7LSPK.js";import{a as I}from"./chunk-MWN53KRN.js";import{_ as k}from"./chunk-KYSDI3GE.js";import{a as v,b,g as m}from"./chunk-7F45LJKI.js";import Re from"better-sqlite3";import{existsSync as tn}from"fs";import{dirname as on,join as sn,resolve as Se}from"path";import H from"better-sqlite3";import{execFileSync as W}from"child_process";import{existsSync as B,readdirSync as G}from"fs";import{extname as R,join as U}from"path";function De(e={}){return{id:"auxiliary-documents",facts:["auxiliary-document"],run:n=>K({projectRoot:n.projectRoot,dbPath:n.dbPath,extensions:e.extensions,onStatus:n.onStatus})}}function K(e){let n=new Set((e.extensions??V).map(i=>i.toLowerCase()));if(n.size===0)return{scanned:0,inserted:0,existing:0};if(!B(e.dbPath))throw new Error(`SCIP SQLite database not found at ${e.dbPath}`);let r=I(e.projectRoot),t=J(e.projectRoot,n).filter(i=>!r.isIgnored(i)),o=new H(e.dbPath);try{let i=Y(o,t),s=o.prepare(`INSERT OR IGNORE INTO documents (language, relative_path, position_encoding, text)
2
2
  VALUES (?, ?, NULL, ?)`),u=o.transaction(l=>{let d=0;for(let f of l){if(i.has(f))continue;let p=k(e.projectRoot,f,{inputKind:"auxiliary source file"}),$=s.run(q(f),f,p);d+=Number($.changes)}return d})(t),c={scanned:t.length,inserted:u,existing:t.length-u};return e.onStatus?.(`Augmented SQLite documents with ${u} auxiliary source file${u===1?"":"s"} (${c.existing} already present).`),c}finally{o.close()}}function J(e,n){let r=X(e,n);if(r)return r;let t=[],o=i=>{let s=i?U(e,i):e,a;try{a=G(s,{withFileTypes:!0})}catch{return}for(let u of a){if(C.has(u.name))continue;let c=i?`${i}/${u.name}`:u.name;if(u.isDirectory()){o(c);continue}n.has(R(u.name).toLowerCase())&&t.push(c)}};return o(""),t.sort()}function X(e,n){try{return W("git",["-C",e,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:26214400,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}).split(`
3
3
  `).filter(t=>t&&n.has(R(t).toLowerCase())).sort()}catch{return null}}function Y(e,n){let r=new Set,t=500;for(let o=0;o<n.length;o+=t){let i=n.slice(o,o+t),s=e.prepare(`SELECT relative_path FROM documents WHERE relative_path IN (${i.map(()=>"?").join(",")})`).all(...i);for(let a of s)r.add(a.relative_path)}return r}function q(e){return R(e).toLowerCase()===".vue"?"vue":R(e).replace(/^\./,"").toLowerCase()||"source"}import{writeFileSync as _e}from"fs";function je(e,n){let r=performance.now(),t=e.run(n);return{stageId:e.id,facts:e.facts,durationMs:performance.now()-r,result:t}}async function $e(e,n){let r=performance.now(),t=await e.run(n);return{stageId:e.id,facts:e.facts,durationMs:performance.now()-r,result:t}}function z(){return{"missing-source-file":0,"missing-service-script":0,"no-definition":0,"same-file-definition":0,"unindexed-definition":0}}function S(){return{skippedReferences:0,skippedReferenceReasons:z(),skippedReferenceSamples:[]}}function F(e,n){e.skippedReferences+=n.skippedReferences;for(let r of Object.keys(e.skippedReferenceReasons)){e.skippedReferenceReasons[r]+=n.skippedReferenceReasons[r];for(let t of n.skippedReferenceSamples.filter(o=>o.reason===r))e.skippedReferenceSamples.filter(i=>i.reason===r&&i.sourceFile===t.sourceFile).length<2&&e.skippedReferenceSamples.push(t)}}import{createRequire as Q}from"module";import{existsSync as Z}from"fs";import{dirname as T,extname as ee,join as L,relative as ne,resolve as Ke}from"path";import{pathToFileURL as te}from"url";function E(e,n){let{vueCore:r,ts:t,volarTs:o}=re(e),{parsed:i,vueOptions:s}=oe(r,t,n),a=T(n),u=r.createVueLanguagePlugin(t,i.options,s,p=>p),c=ie(r,t,u),l=se(a,i),{languageServiceHost:d}=o.createLanguageServiceHost(t,t.sys,c,p=>p,l),f=t.createLanguageService(d);return{ts:t,language:c,languageService:f,fileNames:i.fileNames,configDir:a}}function re(e){let n=Q(te(L(e,"package.json")).href);return{vueCore:h(n,"@vue/language-core",e),ts:h(n,"typescript",e),volarTs:h(n,"@volar/typescript",e)}}function oe(e,n,r){let t=n.readConfigFile(r,n.sys.readFile);if(t.error||!t.config)throw new Error(`Failed to read ${r}`);let i=e.createParsedCommandLine(n,n.sys,r).vueOptions;return typeof e.createGlobalTypesWriter=="function"&&(i.globalTypesPath=e.createGlobalTypesWriter(i,n.sys.writeFile)),{parsed:n.parseJsonConfigFileContent(t.config,n.sys,T(r),void 0,r,void 0,e.getAllExtensions(i).map(s=>({extension:s.slice(1),isMixedContent:!0,scriptKind:n.ScriptKind.Deferred}))),vueOptions:i}}function ie(e,n,r){let t={},o=e.createLanguage([r],new Map,i=>{if(!Z(i))return;let s=m(i,{maxBytes:b,inputKind:"Vue language-service source file"});t.current?.scripts.set(i,n.ScriptSnapshot.fromString(s),r.getLanguageId(i)??le(i))});return t.current=o,o}function se(e,n){return{getCurrentDirectory:()=>e,getCompilationSettings:()=>n.options,getScriptFileNames:()=>n.fileNames,getProjectReferences:()=>n.projectReferences,getProjectVersion:()=>"0"}}function h(e,n,r){try{return e(n)}catch(t){throw(typeof t=="object"&&t!==null&&"code"in t?t.code:null)==="MODULE_NOT_FOUND"?new Error(`Vue augmentation requires ${n} to be installed in ${r}. Install Vue/Volar dependencies for that project, then rerun augment-vue.`,{cause:t}):t}}function A(e,n,r){let t=ae(e);return o=>{if(!o.name)return null;let i=g(n,o.fileName),s=r.get(o.fileName);if(!s)return null;let a=r.positionAt(s,o.textSpan.start),u=t.get(i);if(!u)return null;let c=u.starts.find(d=>d.line===a.line&&d.displayName===o.name);if(c)return c.symbolId;let l=u.containingByLine.get(a.line);return l&&l.displayName===o.name?l.symbolId:ue(u.starts,a.line,2,o.name)}}function ae(e){let n=e.prepare(`
4
4
  SELECT
@@ -13,4 +13,4 @@ import{a as V,b as C}from"./chunk-BJT7LSPK.js";import{a as I}from"./chunk-NRBNAE
13
13
  ORDER BY d.relative_path, (der.end_line - der.start_line) DESC
14
14
  `).all(),r=new Map;for(let t of n){let o=r.get(t.relativePath);o||(o={containingByLine:new Map,starts:[]},r.set(t.relativePath,o)),o.starts.push({line:t.startLine,symbolId:t.symbolId,displayName:t.displayName});for(let i=t.startLine;i<=t.endLine;i++)o.containingByLine.set(i,{symbolId:t.symbolId,displayName:t.displayName})}for(let t of r.values())t.starts.sort((o,i)=>o.line-i.line);return r}function ue(e,n,r,t){let o=0,i=e.length-1;for(;o<=i;){let a=Math.floor((o+i)/2);e[a].line<n?o=a+1:i=a-1}let s=null;for(let a of[i,o]){let u=e[a];if(!u||u.displayName!==t)continue;let c=Math.abs(u.line-n);c>r||(!s||c<s.distance)&&(s={distance:c,symbolId:u.symbolId})}return s?.symbolId??null}function P(e,n){let r=ge(n),t=e.prepare("SELECT id FROM global_symbols WHERE symbol = ?"),o=new Map;return{get(i){if(o.has(i))return o.get(i)??null;let s=fe(t,r,n,i);return o.set(i,s),s}}}function O(e,n,r,t,o){if(e.fileName.endsWith(".vue")){let i=t.language.scripts.get(e.fileName),s=i?.generated?.languagePlugin.typescript?.getServiceScript(i.generated.root)?.code;if(i&&s){let a=t.language.maps.get(s,i);if(y(a,e.textSpan.start)!==null)return r.get(e.fileName)}return e.fileName.startsWith(o)?r.get(e.fileName):null}return n(e)}function*w(e){let n=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,r=new Set(["script","setup","template","style","lang","scoped","true","false","null","undefined","const","let","var","import","from","export","return","if","else","for","while","function","class","type","interface","as","await","async"]),t;for(;t=n.exec(e);){let o=t[0];r.has(o)||(yield{text:o,start:t.index,end:t.index+o.length})}}function D(e,n){for(let[r]of e.toGeneratedLocation(n,t=>!!t.navigation))return r;return null}function y(e,n){let r=e;for(let[t]of r.toSourceLocation(n,o=>!!o.navigation))return t;return null}function ce(e,n){let r=0,t=e.lineStarts.length-1;for(;r<=t;){let i=Math.floor((r+t)/2);e.lineStarts[i]<=n?r=i+1:t=i-1}let o=Math.max(0,t);return{line:o,character:n-e.lineStarts[o]}}function N(e,n){return g(e,n).startsWith("node_modules/")}function g(e,n){return ne(e,n).replaceAll("\\","/")}function le(e){switch(ee(e)){case".vue":return"vue";case".tsx":return"typescriptreact";case".ts":case".mts":case".cts":return"typescript";case".jsx":return"javascriptreact";case".js":case".mjs":case".cjs":return"javascript";case".json":return"json";default:return"typescript"}}function M(){let e=new Map;return{get(n){if(e.has(n))return e.get(n)??null;try{let r=m(n,{maxBytes:b,inputKind:"Vue source file"}),t={text:r,lineStarts:de(r)};return e.set(n,t),t}catch{return e.set(n,null),null}},positionAt:ce}}function de(e){let n=[0];for(let r=0;r<e.length;r++)e.charCodeAt(r)===10&&n.push(r+1);return n}function ge(e){try{let n=JSON.parse(m(L(e,"package.json"),{maxBytes:v,inputKind:"project package manifest"}));return{name:n.name??"workspace",version:n.version??"0.0.0"}}catch{return{name:"workspace",version:"0.0.0"}}}function fe(e,n,r,t){let o=g(r,t),i=pe(n.name,n.version,o);return e.get(i)?.id??null}function pe(e,n,r){let t=r.split("/").map(o=>`\`${o.replaceAll("`","")}\``).join("/");return`scip-vue npm ${e} ${n} ${t}/default.`}function cn(e){let n=Se(e.projectRoot,e.tsconfig),r=new Re(e.dbPath,{readonly:!0});try{let t=be({db:r,projectRoot:e.projectRoot,configPath:n,vueSymbolLookup:P(r,e.projectRoot)});return he({vueFiles:e.vueFiles??[],tasks:e.tasks,...t})}finally{r.close()}}function be(e){let n=M();return{projectRoot:e.projectRoot,context:E(e.projectRoot,e.configPath),symbolLookup:A(e.db,e.projectRoot,n),vueSymbolLookup:e.vueSymbolLookup,sourceReader:n}}function he(e){let n=[],r=S(),t=e.tasks??e.vueFiles.map(o=>({fileName:o,startOffset:0,endOffset:Number.POSITIVE_INFINITY,countFileSkip:!0}));for(let o of t){let i=ye(e,o);n.push(...i.occurrences),F(r,i)}return{occurrences:n,...r}}function ye(e,n){let r=e.sourceReader.get(n.fileName);if(!r)return _(e.projectRoot,n,"missing-source-file");let t=e.context.language.scripts.get(n.fileName),o=t?.generated?.languagePlugin.typescript?.getServiceScript(t.generated.root)?.code;if(!t||!o)return _(e.projectRoot,n,"missing-service-script");let i=e.context.language.maps.get(o,t),s=g(e.projectRoot,n.fileName),a=[...w(r.text)],u={tokens:a.filter(c=>c.start>=n.startOffset&&c.start<n.endOffset),tokenByStart:new Map(a.map(c=>[c.start,c])),tokenTextCounts:Ce(a),processedStarts:new Set};return xe({...e,fileName:n.fileName,sourceInfo:r,sourceFile:s,map:i,tokenContext:u})}function xe(e){let n=[],r=S();for(let t of e.tokenContext.tokens){if(e.tokenContext.processedStarts.has(t.start)||ve(e.sourceInfo.text,t.start))continue;let o=D(e.map,t.start);if(o===null)continue;let s=(e.context.languageService.getDefinitionAtPosition(e.fileName,o+1)??[]).find(l=>!N(e.projectRoot,l.fileName));if(!s){x(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,"no-definition");continue}let a=g(e.projectRoot,s.fileName),u=ke(e.sourceFile,t.text,a);if(u){x(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,u);continue}let c=O(s,e.symbolLookup,e.vueSymbolLookup,e.context,e.projectRoot);if(c===null){x(r,e.sourceReader,e.sourceInfo,e.sourceFile,t,"unindexed-definition");continue}j(n,e.sourceReader,e.sourceInfo,e.sourceFile,t,a,c),e.tokenContext.processedStarts.add(t.start),Ve(n,e,t,o,a,c)}return{occurrences:n,...r}}function ve(e,n){let r=e.lastIndexOf(`
15
15
  `,n-1)+1,t=e.slice(r,n);return/\bfrom\s+['"][^'"]*$/.test(t)||/\bimport\s*\(\s*['"][^'"]*$/.test(t)}function ke(e,n,r){return r===e?"same-file-definition":r.endsWith(".vue")&&n!==r.split("/").at(-1)?.replace(/\.vue$/,"")?"unindexed-definition":null}function _(e,n,r){let t=S();return n.countFileSkip&&(t.skippedReferences=1,t.skippedReferenceReasons[r]=1,t.skippedReferenceSamples.push({sourceFile:g(e,n.fileName),sourceLine:0,sourceStartChar:0,sourceEndChar:0,token:"",reason:r})),{occurrences:[],...t}}function x(e,n,r,t,o,i){if(e.skippedReferences++,e.skippedReferenceReasons[i]++,e.skippedReferenceSamples.filter(a=>a.reason===i&&a.sourceFile===t).length>=2)return;let s=n.positionAt(r,o.start);e.skippedReferenceSamples.push({sourceFile:t,sourceLine:s.line,sourceStartChar:s.character,sourceEndChar:s.character+o.text.length,token:o.text,reason:i})}function Ve(e,n,r,t,o,i){if(!((n.tokenContext.tokenTextCounts.get(r.text)??0)<=1))for(let s of Ie(n.context.languageService,n.fileName,t+1,n.map,r,n.tokenContext.tokenByStart)){if(n.tokenContext.processedStarts.has(s))continue;let a=n.tokenContext.tokenByStart.get(s);a&&(j(e,n.sourceReader,n.sourceInfo,n.sourceFile,a,o,i),n.tokenContext.processedStarts.add(s))}}function j(e,n,r,t,o,i,s){let a=n.positionAt(r,o.start);e.push({sourceFile:t,sourceLine:a.line,sourceStartChar:a.character,sourceEndChar:a.character+o.text.length,sourceToken:o.text,definitionFile:i,symbolId:s})}function Ce(e){let n=new Map;for(let r of e)n.set(r.text,(n.get(r.text)??0)+1);return n}function Ie(e,n,r,t,o,i){let s=e.getDocumentHighlights?.(n,r,[n])??[],a=[];for(let u of s)if(u.fileName===n)for(let c of u.highlightSpans){let l=Fe(t,c.textSpan.start,i,o.text);l!==null&&a.push(l)}return a}function Fe(e,n,r,t){let o=r.get(n);if(o?.text===t)return o.start;let i=y(e,n);if(i===null)return null;let s=r.get(i);return s?.text===t?s.start:null}export{De as a,je as b,$e as c,cn as d};
16
- //# sourceMappingURL=chunk-FFJQZG6J.js.map
16
+ //# sourceMappingURL=chunk-BBCIS4DX.js.map
@@ -0,0 +1,3 @@
1
+ import{a as d}from"./chunk-ILMHV3KM.js";import{a as A,b as T,c as v,g as P,j as R}from"./chunk-OWOOWNJ5.js";import{d as g,e as L,f as p,g as M,h as k}from"./chunk-GAS2LJMP.js";import{$ as z,_ as I}from"./chunk-KYSDI3GE.js";import c from"process";import{existsSync as _}from"fs";import{dirname as h,join as J,resolve as b,sep as N}from"path";import{fileURLToPath as K}from"url";async function G(e){let n=e.includeReferences!==!1,r=e.includeCallees===!0,t=e.includeSignatures===!0,s={timeoutMs:e.requestTimeoutMs},o=Q(e),a=W(e),l=H(e),f=j(e),C=re(e.projectRoot,o),x=te(e.projectRoot,C),w=ne(C),u=new T(v(e.rustAnalyzerBinary,x),{requestTimeoutMs:e.requestTimeoutMs,configuration:w});try{let y=await u.initialize({processId:c.pid,rootUri:g(x,"."),capabilities:{textDocument:{references:{dynamicRegistration:!1},callHierarchy:{dynamicRegistration:!1},hover:{dynamicRegistration:!1}}},initializationOptions:w});if(n&&!y.capabilities.referencesProvider)return{available:!1,reason:"rust-analyzer initialized without textDocument/references support.",references:a.map(i=>[i.symbolId,[]]),...r?{callees:l.map(i=>[i.symbolId,[]])}:{}};if(r&&!y.capabilities.callHierarchyProvider)return{available:!1,reason:"rust-analyzer initialized without call hierarchy support.",references:a.map(i=>[i.symbolId,[]]),callees:l.map(i=>[i.symbolId,[]]),...t?{signatures:f.map(i=>[i.symbolId,null])}:{}};if(t&&!y.capabilities.hoverProvider)return{available:!1,reason:"rust-analyzer initialized without hover support.",references:a.map(i=>[i.symbolId,[]]),...r?{callees:l.map(i=>[i.symbolId,[]])}:{},signatures:f.map(i=>[i.symbolId,null])};let $=ie(u,e.projectRoot,o);await se(u,$,e.diagnosticsTimeoutMs??1e4),await R(e.settleDelayMs??5e3);let S=n?await d(a,e.concurrency??8,async i=>{let D=await E(u,p(e.projectRoot,i,!1),{requestTimeoutMs:e.requestTimeoutMs,retryTimeoutMs:e.referenceRetryTimeoutMs});return{symbolId:i.symbolId,references:k(M(e.projectRoot,D.locations)),complete:D.complete}}):a.map(i=>({symbolId:i.symbolId,references:[],complete:!0})),B=r?await d(l,e.concurrency??8,async i=>({symbolId:i.symbolId,callees:await ae(u,e.projectRoot,i,s)})):[],U=t?await d(f,e.concurrency??8,async i=>({symbolId:i.symbolId,signature:await V(u,e.projectRoot,i,s)})):[];return{available:!0,references:S.filter(i=>i.complete).map(i=>[i.symbolId,i.references]),incompleteReferenceSymbolIds:S.filter(i=>!i.complete).map(i=>i.symbolId),...r?{callees:B.map(i=>[i.symbolId,i.callees])}:{},...t?{signatures:U.map(i=>[i.symbolId,i.signature])}:{}}}finally{await u.shutdown().catch(()=>{})}}function W(e){return e.referenceDefinitions??e.definitions}function H(e){return e.calleeDefinitions??e.definitions}function j(e){return e.signatureDefinitions??e.definitions}function Q(e){return[...e.includeReferences!==!1?W(e):[],...e.includeCallees===!0?H(e):[],...e.includeSignatures===!0?j(e):[]]}async function V(e,n,r,t={}){let s=p(n,r,!1),o=await X(e,{textDocument:s.textDocument,position:s.position},t);return Y(o)}async function X(e,n,r={}){try{return await e.hover(n,r)}catch(t){if(m(t),!(t instanceof Error?t.message:String(t)).includes("content modified"))return null;await F(r.deadlineMs);try{return await e.hover(n,r)}catch(o){return m(o),null}}}function Y(e){if(!e)return null;let n=Z(e.contents),r=/```(?:rust)?\s*([\s\S]*?)```/i.exec(n),t=r?r[1]:n;for(let s of t.split(/\r?\n/)){let o=s.replace(/^`+|`+$/g,"").trim();if(o&&ee(o))return o}return null}function Z(e){return typeof e=="string"?e:Array.isArray(e)?e.map(q).join(`
2
+ `):"value"in e?e.value:""}function q(e){return typeof e=="string"?e:e.value}function ee(e){return/^(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?(?:const\s+)?(?:unsafe\s+)?(?:extern\s+(?:"[^"]+"\s+)?)?(?:fn|struct|enum|trait|type|const|static|mod)\b/.test(e)}function ne(e){return{...e.length>0?{linkedProjects:e}:{},references:{excludeImports:!1,excludeTests:!1}}}function te(e,n){return n.length===1?h(n[0]):b(e)}function re(e,n){let r=b(e),t=[],s=new Set;for(let o of n){let a=h(b(r,o.relativePath));for(;me(r,a);){let l=J(a,"Cargo.toml");if(_(l)){s.has(l)||(s.add(l),t.push(l));break}let f=h(a);if(f===a)break;a=f}}return t}function ie(e,n,r){let t=new Set,s=[];for(let o of r)if(!t.has(o.relativePath)){t.add(o.relativePath);try{let a=g(n,o.relativePath);e.didOpenTextDocument({uri:a,languageId:"rust",version:1,text:I(n,o.relativePath,{inputKind:"indexed Rust source file"})}),s.push(a)}catch(a){if(!z(a))throw a}}return s}async function se(e,n,r){await Promise.all(n.map(t=>e.waitForDiagnostics(t,r).catch(()=>!1)))}async function De(e,n){return(await E(e,n)).locations}async function E(e,n,r={}){try{return{locations:await e.references(n,{timeoutMs:r.requestTimeoutMs,deadlineMs:r.deadlineMs}),complete:!0}}catch(t){m(t);let s=t instanceof Error?t.message:String(t);if(O(t))return{locations:[],complete:!1};if(!s.includes("content modified"))return{locations:[],complete:!0};await F(r.deadlineMs);try{return{locations:await e.references(n,oe(r)),complete:!0}}catch(o){return m(o),{locations:[],complete:!O(o)}}}}function oe(e){return{...e.retryTimeoutMs&&e.retryTimeoutMs>0?{timeoutMs:e.retryTimeoutMs}:{},...e.deadlineMs!==void 0?{deadlineMs:e.deadlineMs}:{}}}function O(e){let n=e instanceof Error?e.message:String(e);return n.includes("rust-analyzer LSP request")&&n.includes("timed out after")}async function ae(e,n,r,t={}){let s=p(n,r,!1),o=await le(e,{textDocument:s.textDocument,position:s.position},t),a=(await Promise.all(o.map(l=>ce(e,l,t)))).flat();return fe(ue(n,a))}async function le(e,n,r={}){try{return await e.prepareCallHierarchy(n,r)}catch(t){return m(t),[]}}async function ce(e,n,r={}){try{return await e.outgoingCalls(n,r)}catch(t){return m(t),[]}}async function F(e){if(e===void 0){await R(1e3);return}await P(1e3,e)}function m(e){if(e instanceof A)throw e}function ue(e,n){return n.map(r=>({symbol:r.to.name,file:L(e,r.to.uri),line:r.to.selectionRange.start.line,...r.fromRanges[0]===void 0?{}:{callsiteLine:r.fromRanges[0].start.line}}))}function fe(e){let n=new Set,r=[];for(let t of e){let s=`${t.symbol}\0${t.file}\0${t.line}\0${t.callsiteLine??""}`;n.has(s)||(n.add(s),r.push(t))}return r.sort((t,s)=>t.file.localeCompare(s.file)||t.line-s.line||t.symbol.localeCompare(s.symbol))}function me(e,n){return n===e||n.startsWith(`${e}${N}`)}async function de(){return new Promise((e,n)=>{let r=[];c.stdin.on("data",t=>r.push(t)),c.stdin.on("error",n),c.stdin.on("end",()=>e(Buffer.concat(r).toString("utf8")))})}async function pe(){try{let e=JSON.parse(await de()),n=await G(e);c.stdout.write(JSON.stringify(n))}catch(e){let n={available:!1,reason:e instanceof Error?e.message:String(e),references:[]};c.stdout.write(JSON.stringify(n)),c.exitCode=1}}c.argv[1]&&K(import.meta.url)===c.argv[1]&&pe();export{G as a,W as b,H as c,j as d,Q as e,V as f,X as g,Y as h,ne as i,te as j,re as k,ie as l,se as m,De as n,E as o,ae as p};
3
+ //# sourceMappingURL=chunk-BDUVI7TO.js.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-K3XFWJI2.js";import{b as l,e as n,i as c}from"./chunk-H5EXS3HM.js";import{a as d}from"./chunk-SB25YMEQ.js";import{h as u}from"./chunk-AK3PYTIK.js";import{join as o}from"path";var L=6,q=1e4,y="watch.lock",m="watch-state.json",b="watch-activity.json",S="watch-refresh-requests";function C(t){return{lockPath:o(t,y),statePath:o(t,m),activityPath:o(t,b),refreshRequestsPath:o(t,S)}}function j(t){try{return g(JSON.parse(u(t,"watch service state")))}catch{return null}}function g(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!r(e.startedAt)||!r(e.heartbeatAt)||!r(e.lastActivityAt)||!h(e.watcher)||e.idleDeadlineAt!==void 0&&!r(e.idleDeadlineAt))return null;if(e.processIdentity!==void 0){let i=d(e.processIdentity);if(!i||i.pid!==e.pid)return null;e.processIdentity=i}return e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!R(e.lastError)||e.lastRefresh!==void 0&&!A(e.lastRefresh)||e.reindexActivity!==void 0&&!v(e.reindexActivity)||e.refreshRequests!==void 0&&!E(e.refreshRequests)||e.typescriptSemantic!==void 0&&!w(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!T(e.typescriptIndex)?null:e}function r(t){return l(t)}function h(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return s(e.changedFiles)&&s(e.reindexAt);case"indexing":return s(e.startedAt);case"cooldown":return s(e.until)&&typeof e.dirty=="boolean";case"budget-paused":return s(e.until)&&typeof e.dirty=="boolean"&&typeof e.reason=="string"&&n(e.rebuilt)&&n(e.estimatedWriteBytes);case"draining":return s(e.startedAt)&&typeof e.reason=="string";default:return!1}}function R(t){if(!t||typeof t!="object")return!1;let e=t;return r(e.at)&&typeof e.message=="string"}function A(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&r(e.startedAt)&&r(e.completedAt)&&s(e.durationMs)}function v(t){if(!t||typeof t!="object")return!1;let e=t;return e.confidence!==void 0&&e.confidence!=="complete"&&e.confidence!=="partial"&&e.confidence!=="unavailable"||e.recordsRead!==void 0&&!n(e.recordsRead)||e.invalidRecords!==void 0&&!n(e.invalidRecords)||e.skippedRecords!==void 0&&!n(e.skippedRecords)||e.readErrors!==void 0&&!n(e.readErrors)||e.ignoredPartialTailBytes!==void 0&&!n(e.ignoredPartialTailBytes)||!r(e.windowStartedAt)||!r(e.windowEndedAt)||!n(e.runs)||!n(e.rebuilt)||e.fullRebuilds!==void 0&&!n(e.fullRebuilds)||!n(e.reused)||!n(e.failed)||!n(e.suppressed)||!s(e.estimatedLogicalOutputBytes)||e.estimatedWriteBytes!==void 0&&!n(e.estimatedWriteBytes)||e.reflinkedBytes!==void 0&&!n(e.reflinkedBytes)||e.fallbackCopiedBytes!==void 0&&!n(e.fallbackCopiedBytes)||e.oldestRebuildAt!==void 0&&!r(e.oldestRebuildAt)||e.oldestWriteAt!==void 0&&!r(e.oldestWriteAt)||e.languageAttribution!==void 0&&e.languageAttribution!=="complete"&&e.languageAttribution!=="partial"&&e.languageAttribution!=="unavailable"||e.attributedRuns!==void 0&&!n(e.attributedRuns)||e.unattributedRuns!==void 0&&!n(e.unattributedRuns)||e.invalidLanguageDetails!==void 0&&!n(e.invalidLanguageDetails)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"||Array.isArray(e.byTrigger)||e.byLanguage!==void 0&&!x(e.byLanguage)?!1:Object.values(e.byTrigger).every(i=>i===void 0||n(i))}function x(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let[e,i]of Object.entries(t)){if(!f.includes(e)||!i||typeof i!="object")return!1;let a=i;if(!n(a.runs)||!n(a.rebuilt)||!n(a.reused)||!n(a.producedOutputBytes)||!c(a.durationMs)||a.rebuilt+a.reused!==a.runs)return!1}return!0}function E(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.claimed)&&n(e.completed)&&n(e.expired)&&n(e.invalid)&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function w(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&s(e.requests)&&s(e.sessionsCreated)&&s(e.sessionsReused)&&s(e.sessionsRefreshed)&&s(e.sessionsReplaced)&&s(e.projectsCreated)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function T(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&n(e.requests)&&n(e.sessionsCreated)&&n(e.sessionsReplaced)&&(e.sessionsEvicted===void 0||n(e.sessionsEvicted))&&(e.activeSessions===void 0||n(e.activeSessions))&&(e.maxActiveSessions===void 0||n(e.maxActiveSessions))&&(e.heapUsedBytes===void 0||n(e.heapUsedBytes))&&(e.heapLimitBytes===void 0||n(e.heapLimitBytes))&&(e.softMemoryLimitBytes===void 0||n(e.softMemoryLimitBytes))&&(e.retireRequested===void 0||typeof e.retireRequested=="boolean")&&n(e.initializations)&&n(e.programUpdates)&&n(e.documentsEmitted)&&n(e.documentsRemoved)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastDurationMs===void 0||s(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function p(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.inflight)&&n(e.responses)&&n(e.deadLetters)&&n(e.invalid)&&n(e.totalItems)&&s(e.totalBytes)&&e.totalBytes>=0&&e.totalItems===e.pending+e.inflight+e.responses+e.deadLetters&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function s(t){return typeof t=="number"&&Number.isFinite(t)}export{L as a,q as b,C as c,j as d,r as e};
2
- //# sourceMappingURL=chunk-BVFYEEBH.js.map
1
+ import{a as f}from"./chunk-GUFSG5TX.js";import{b as l,e as n,i as c}from"./chunk-H5EXS3HM.js";import{a as d}from"./chunk-JFMEXGFE.js";import{h as u}from"./chunk-7F45LJKI.js";import{join as o}from"path";var L=6,q=1e4,y="watch.lock",m="watch-state.json",b="watch-activity.json",S="watch-refresh-requests";function C(t){return{lockPath:o(t,y),statePath:o(t,m),activityPath:o(t,b),refreshRequestsPath:o(t,S)}}function j(t){try{return g(JSON.parse(u(t,"watch service state")))}catch{return null}}function g(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!r(e.startedAt)||!r(e.heartbeatAt)||!r(e.lastActivityAt)||!h(e.watcher)||e.idleDeadlineAt!==void 0&&!r(e.idleDeadlineAt))return null;if(e.processIdentity!==void 0){let i=d(e.processIdentity);if(!i||i.pid!==e.pid)return null;e.processIdentity=i}return e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!R(e.lastError)||e.lastRefresh!==void 0&&!A(e.lastRefresh)||e.reindexActivity!==void 0&&!v(e.reindexActivity)||e.refreshRequests!==void 0&&!E(e.refreshRequests)||e.typescriptSemantic!==void 0&&!w(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!T(e.typescriptIndex)?null:e}function r(t){return l(t)}function h(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return s(e.changedFiles)&&s(e.reindexAt);case"indexing":return s(e.startedAt);case"cooldown":return s(e.until)&&typeof e.dirty=="boolean";case"budget-paused":return s(e.until)&&typeof e.dirty=="boolean"&&typeof e.reason=="string"&&n(e.rebuilt)&&n(e.estimatedWriteBytes);case"draining":return s(e.startedAt)&&typeof e.reason=="string";default:return!1}}function R(t){if(!t||typeof t!="object")return!1;let e=t;return r(e.at)&&typeof e.message=="string"}function A(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&r(e.startedAt)&&r(e.completedAt)&&s(e.durationMs)}function v(t){if(!t||typeof t!="object")return!1;let e=t;return e.confidence!==void 0&&e.confidence!=="complete"&&e.confidence!=="partial"&&e.confidence!=="unavailable"||e.recordsRead!==void 0&&!n(e.recordsRead)||e.invalidRecords!==void 0&&!n(e.invalidRecords)||e.skippedRecords!==void 0&&!n(e.skippedRecords)||e.readErrors!==void 0&&!n(e.readErrors)||e.ignoredPartialTailBytes!==void 0&&!n(e.ignoredPartialTailBytes)||!r(e.windowStartedAt)||!r(e.windowEndedAt)||!n(e.runs)||!n(e.rebuilt)||e.fullRebuilds!==void 0&&!n(e.fullRebuilds)||!n(e.reused)||!n(e.failed)||!n(e.suppressed)||!s(e.estimatedLogicalOutputBytes)||e.estimatedWriteBytes!==void 0&&!n(e.estimatedWriteBytes)||e.reflinkedBytes!==void 0&&!n(e.reflinkedBytes)||e.fallbackCopiedBytes!==void 0&&!n(e.fallbackCopiedBytes)||e.oldestRebuildAt!==void 0&&!r(e.oldestRebuildAt)||e.oldestWriteAt!==void 0&&!r(e.oldestWriteAt)||e.languageAttribution!==void 0&&e.languageAttribution!=="complete"&&e.languageAttribution!=="partial"&&e.languageAttribution!=="unavailable"||e.attributedRuns!==void 0&&!n(e.attributedRuns)||e.unattributedRuns!==void 0&&!n(e.unattributedRuns)||e.invalidLanguageDetails!==void 0&&!n(e.invalidLanguageDetails)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"||Array.isArray(e.byTrigger)||e.byLanguage!==void 0&&!x(e.byLanguage)?!1:Object.values(e.byTrigger).every(i=>i===void 0||n(i))}function x(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let[e,i]of Object.entries(t)){if(!f.includes(e)||!i||typeof i!="object")return!1;let a=i;if(!n(a.runs)||!n(a.rebuilt)||!n(a.reused)||!n(a.producedOutputBytes)||!c(a.durationMs)||a.rebuilt+a.reused!==a.runs)return!1}return!0}function E(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.claimed)&&n(e.completed)&&n(e.expired)&&n(e.invalid)&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function w(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&s(e.requests)&&s(e.sessionsCreated)&&s(e.sessionsReused)&&s(e.sessionsRefreshed)&&s(e.sessionsReplaced)&&s(e.projectsCreated)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function T(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&n(e.requests)&&n(e.sessionsCreated)&&n(e.sessionsReplaced)&&(e.sessionsEvicted===void 0||n(e.sessionsEvicted))&&(e.activeSessions===void 0||n(e.activeSessions))&&(e.maxActiveSessions===void 0||n(e.maxActiveSessions))&&(e.heapUsedBytes===void 0||n(e.heapUsedBytes))&&(e.heapLimitBytes===void 0||n(e.heapLimitBytes))&&(e.softMemoryLimitBytes===void 0||n(e.softMemoryLimitBytes))&&(e.retireRequested===void 0||typeof e.retireRequested=="boolean")&&n(e.initializations)&&n(e.programUpdates)&&n(e.documentsEmitted)&&n(e.documentsRemoved)&&(e.lastRequestAt===void 0||r(e.lastRequestAt))&&(e.lastDurationMs===void 0||s(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||r(e.busyUntil))&&(e.mailbox===void 0||p(e.mailbox))}function p(t){if(!t||typeof t!="object")return!1;let e=t;return n(e.pending)&&n(e.inflight)&&n(e.responses)&&n(e.deadLetters)&&n(e.invalid)&&n(e.totalItems)&&s(e.totalBytes)&&e.totalBytes>=0&&e.totalItems===e.pending+e.inflight+e.responses+e.deadLetters&&(e.oldestPendingAt===void 0||r(e.oldestPendingAt))}function s(t){return typeof t=="number"&&Number.isFinite(t)}export{L as a,q as b,C as c,j as d,r as e};
2
+ //# sourceMappingURL=chunk-BE7ZZTMC.js.map
@@ -1,3 +1,3 @@
1
- import{b as I}from"./chunk-ISWFRGJ6.js";import{b as y}from"./chunk-BOJ5SVE2.js";import{b as w}from"./chunk-Q6T2CAJL.js";import{d as k}from"./chunk-42W3LFUK.js";import{N as R}from"./chunk-7JYHQAH2.js";import{B as b}from"./chunk-Q7GBK5T7.js";var C=60;function nt(t,s={}){let{scope:n,limit:e=30,scanLimit:i,rotDays:r=C}=s,c=y(R(t,{extensions:[".ts",".tsx",".js",".jsx",".mjs",".cjs"]}).filter(a=>w(a)==="test").filter(a=>!n||a.includes(n)).filter(a=>!t.isIgnored(a)).sort(),i),o=[],l=[],p=[];for(let a of c){let d=b(t,a);if(!d)continue;let x=k(d),h=K(d);for(let u of j(x,h))h.add(u);let O=P(x);for(let u of O){if(u.skip){l.push(H(t,a,u,r));continue}if(u.kind==="describe")continue;let S=F(d,u.argsStart),m=x.slice(u.argsStart,u.callEnd),M=d.slice(u.argsStart,u.callEnd);_(m,h)||o.push({file:a,startLine:f(d,u.callStart),endLine:f(d,u.callEnd),title:S,severity:/\bawait\b/.test(m)?"low":"high"});let A=B(m,M);A&&p.push({file:a,startLine:f(d,u.callStart),endLine:f(d,u.callEnd),title:S,echoedValue:A})}}return{assertionFree:e?o.slice(0,e):o,skipped:e?l.slice(0,e):l,mockEcho:e?p.slice(0,e):p}}var E=/(?<!\.)\b(?:x(it|test|describe)|(it|test|describe)(?:\.\s*(skip|only|todo|each\s*\([^)]*\)))?)\s*\(/g;function P(t){let s=[];E.lastIndex=0;let n;for(;n=E.exec(t);){let e=n[1],i=e??n[2];if(!i)continue;let r=n[3]?.split(/\s*\(/)[0],c=n.index,o=n.index+n[0].length-1,l=g(t,o);E.lastIndex=o+1,r!=="each"&&s.push({kind:i,skip:e!==void 0||r==="skip"||r==="todo",skipKind:r==="todo"?"todo":"skip",callStart:c,argsStart:o+1,callEnd:l+1})}return s}function g(t,s){let n=0;for(let e=s;e<t.length;e+=1){let i=t[e];if(i==="(")n+=1;else if(i===")"&&(n-=1,n===0))return e}return t.length-1}function f(t,s){let n=0;for(let e=0;e<s&&e<t.length;e+=1)t[e]===`
1
+ import{b as I}from"./chunk-6HFCYNYE.js";import{b as y}from"./chunk-BOJ5SVE2.js";import{b as w}from"./chunk-NJITK2GP.js";import{d as k}from"./chunk-ODDUPDP7.js";import{N as R}from"./chunk-ZOHS7AQV.js";import{h as b}from"./chunk-FESCRNVV.js";var C=60;function nt(t,s={}){let{scope:n,limit:e=30,scanLimit:i,rotDays:r=C}=s,c=y(R(t,{extensions:[".ts",".tsx",".js",".jsx",".mjs",".cjs"]}).filter(a=>w(a)==="test").filter(a=>!n||a.includes(n)).filter(a=>!t.isIgnored(a)).sort(),i),o=[],l=[],p=[];for(let a of c){let d=b(t,a);if(!d)continue;let x=k(d),h=K(d);for(let u of j(x,h))h.add(u);let O=P(x);for(let u of O){if(u.skip){l.push(H(t,a,u,r));continue}if(u.kind==="describe")continue;let S=F(d,u.argsStart),m=x.slice(u.argsStart,u.callEnd),M=d.slice(u.argsStart,u.callEnd);_(m,h)||o.push({file:a,startLine:f(d,u.callStart),endLine:f(d,u.callEnd),title:S,severity:/\bawait\b/.test(m)?"low":"high"});let A=B(m,M);A&&p.push({file:a,startLine:f(d,u.callStart),endLine:f(d,u.callEnd),title:S,echoedValue:A})}}return{assertionFree:e?o.slice(0,e):o,skipped:e?l.slice(0,e):l,mockEcho:e?p.slice(0,e):p}}var E=/(?<!\.)\b(?:x(it|test|describe)|(it|test|describe)(?:\.\s*(skip|only|todo|each\s*\([^)]*\)))?)\s*\(/g;function P(t){let s=[];E.lastIndex=0;let n;for(;n=E.exec(t);){let e=n[1],i=e??n[2];if(!i)continue;let r=n[3]?.split(/\s*\(/)[0],c=n.index,o=n.index+n[0].length-1,l=g(t,o);E.lastIndex=o+1,r!=="each"&&s.push({kind:i,skip:e!==void 0||r==="skip"||r==="todo",skipKind:r==="todo"?"todo":"skip",callStart:c,argsStart:o+1,callEnd:l+1})}return s}function g(t,s){let n=0;for(let e=s;e<t.length;e+=1){let i=t[e];if(i==="(")n+=1;else if(i===")"&&(n-=1,n===0))return e}return t.length-1}function f(t,s){let n=0;for(let e=0;e<s&&e<t.length;e+=1)t[e]===`
2
2
  `&&(n+=1);return n}function F(t,s){let n=t.slice(s,s+400),e=/^\s*(['"`])((?:\\.|(?!\1)[\s\S])*)\1/.exec(n);return e?e[2]:"(anonymous)"}var D=new Set(["vitest","chai","jest","@jest/globals","assert","node:assert","node:assert/strict","assert/strict","uvu/assert","expect","chai-as-promised"]),L=/import\s+(?:\*\s+as\s+(\w+)|\{([^}]*)\}|(\w+))\s+from\s+['"]([^'"]+)['"]/g;function K(t){let s=new Set(["expect","assert"]);L.lastIndex=0;let n;for(;n=L.exec(t);){let[,e,i,r,c]=n;if(!(!c||!D.has(c))&&(e&&s.add(e),r&&s.add(r),i))for(let o of i.split(",")){let l=o.trim().replace(/^type\s+/,"");if(!l)continue;let p=/^(\w+)\s+as\s+(\w+)$/.exec(l);s.add(p?p[2]:l)}}return s}function _(t,s){if(/\.should\b/.test(t)||/\bawait\s+(?:[\w$.]+\.)?findBy[A-Z]\w*\s*\(/.test(t)||/\bawait\s+\w*waitFor(?:Text|Value|Condition|Result|Event)\s*\(/.test(t)||/\bthrow\b/.test(t))return!0;for(let n of s){let e=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\b${e}\\s*(?:<[^<>]*>)?\\s*[.(]`).test(t))return!0}return!1}var v=/\bfunction\s+(\w+)\s*\(/g,V=/\b(?:const|let)\s+(\w+)\s*=\s*(?:async\s*)?\(/g,$=60;function j(t,s){let n=new Set;for(let e of[v,V]){e.lastIndex=0;let i;for(;i=e.exec(t);){let r=i[1],c=i.index+i[0].length-1,o=g(t,c),l=t.indexOf("{",o+1);if(l===-1||l-o>$)continue;let p=Q(t,l),a=t.slice(l+1,p);_(a,s)&&n.add(r)}}return n}function Q(t,s){let n=0;for(let e=s;e<t.length;e+=1){let i=t[e];if(i==="{")n+=1;else if(i==="}"&&(n-=1,n===0))return e}return t.length-1}var U=/\bmock(?:ReturnValue|ResolvedValue)(?:Once)?\s*\(/g,T=/\bexpect\s*\(/g,q=/^\s*\.\s*(?:toBe|toEqual|toStrictEqual)\s*\(/,N=/^(?:-?\d+(?:\.\d+)?|(['"`]).+\1)$/;function B(t,s){let n=G(t,s,U);if(n.length===0)return null;let e=Y(t,s);for(let i of e)if(n.includes(i))return i;return null}function G(t,s,n){let e=[];n.lastIndex=0;let i;for(;i=n.exec(t);){let r=i.index+i[0].length-1,c=g(t,r),o=s.slice(r+1,c).trim();N.test(o)&&e.push(o),n.lastIndex=c+1}return e}function Y(t,s){let n=[];T.lastIndex=0;let e;for(;e=T.exec(t);){let i=e.index+e[0].length-1,r=g(t,i),c=t.slice(r+1),o=q.exec(c);if(T.lastIndex=r+1,!o)continue;let l=r+1+o[0].length-1,p=g(t,l),a=s.slice(l+1,p).trim();N.test(a)&&n.push(a)}return n}function H(t,s,n,e){let i=b(t,s),r=F(i,n.argsStart),c=f(i,n.callStart),o=X(t.config.projectRoot,s,c),l=o===null?"unknown":o>=e?"rot":"workflow";return{file:s,startLine:c,title:r,skipKind:n.skipKind,blockKind:n.kind,ageDays:o,rot:l}}function X(t,s,n){let e=n+1;try{let i=I(t,["blame","-L",`${e},${e}`,"--porcelain","--",s]),r=/^author-time (\d+)$/m.exec(i);if(!r)return null;let c=Number(r[1]);return Number.isFinite(c)?Math.max(0,Math.round((Date.now()/1e3-c)/86400)):null}catch{return null}}export{nt as a};
3
- //# sourceMappingURL=chunk-NEIQPFBI.js.map
3
+ //# sourceMappingURL=chunk-BHVUJOCQ.js.map
@@ -0,0 +1,2 @@
1
+ function i(r){let e=r?.match(/--max[-_]old[-_]space[-_]size(?:=|\s+)(\d+)/u);if(!e)return;let n=Number.parseInt(e[1],10);return Number.isInteger(n)&&n>0?n:void 0}function t(r,e){return[(r??"").replace(/(?:^|\s)--max[-_]old[-_]space[-_]size(?:=|\s+)\d+/gu," ").trim(),`--max-old-space-size=${e}`].filter(Boolean).join(" ")}export{i as a,t as b};
2
+ //# sourceMappingURL=chunk-BKVWUP7Y.js.map
@@ -1,2 +1,2 @@
1
- import{a as F,b as A}from"./chunk-ZOXKSQQB.js";import{c as C}from"./chunk-PLYUVM4F.js";import{a as k}from"./chunk-5H5WTJSD.js";import{d as S}from"./chunk-TD7VKJ2Y.js";import{a as y}from"./chunk-7JYHQAH2.js";import{b as p}from"./chunk-GH5YSGZL.js";import{posix as h}from"path";var _=20,G=1,O=new Map([["app","app"],["apps","app"],["component","component"],["components","component"],["composable","composable"],["composables","composable"],["contract","contract"],["contracts","contract"],["domain","domain"],["domains","domain"],["feature","feature"],["features","feature"],["hook","hook"],["hooks","hook"],["lib","library"],["module","module"],["modules","module"],["package","package"],["packages","package"],["page","page"],["pages","page"],["route","route"],["routes","route"],["screen","screen"],["screens","screen"],["service","service"],["services","service"],["shared","shared"],["src","source-root"],["store","state"],["stores","state"],["test","test"],["tests","test"],["util","utility"],["utils","utility"],["view","view"],["views","view"]]),q=new Set(["components","contracts","hooks","lib","services","shared","stores","utils"]),Y=new Set(["access","api","auth","config","db","effect","errors","hooks","lib","middleware","permissions","routes","schemas","servicetasks","services","startup","store","stores","test-utils","repository","repositories","tests","types","ui","utils","workflow","workflows"]);function Ce(e,n={}){let t=L(n.limit,_),i=L(n.minConsumers,G),r=new C(e),s=r.fileDependencyGraph(n.scope),o=ge(y(e,{includeIgnored:!1})),a=pe(e.config.locality?.architecturalBoundarySegments,n.architecturalBoundarySegments);return(n.target?K(e,r,n.target):J(e,n.scope,n.scanLimit)).map(c=>Q(e,r,s,c,n,o,a)).filter(c=>c.consumerFiles.length>=i||n.target).sort(me).slice(0,t)}function K(e,n,t){let i=Z(e,t);if(i)return[I(i)];let r=k(e,t);if(!r)return[];let s=n.definitionsForFile(r.relativePath).find(o=>o.symbolId===r.symbolId);return s?[ee(s)]:[{unit:{kind:"symbol",file:r.relativePath,shortName:S(r.symbol),symbol:r.symbol,startLine:r.startLine,endLine:r.endLine}}]}function J(e,n,t){let i=y(e,{scope:n,includeIgnored:!1}),r=L(t,i.length);return i.slice(0,r).map(s=>I(s))}function Q(e,n,t,i,r,s,o){let a=i.definition?V(e,n,i.definition,r.semantic):X(t,i.unit.file),d=i.definition?a.length>0?"exact":"none":a.length>0?"file-level":"none",f=i.unit.file,c=l(h.dirname(f)),u=te(a),B=ne(c),W=w([...T(c),...u?T(u):[]]),b=ie(i.unit,c,u,a),g=re(b,i.unit,c,u,a,s,o),j=le(i.unit,d,u,a,c,g.whyNoSuggestedHome),z=ue(i.unit,c,u,a,g.suggestedHome,g.whyNoSuggestedHome);return{actionTier:"signal",sourceUnit:i.unit,candidatePath:f,currentDirectory:c,directoryAncestry:B,consumerFiles:a,consumerCoverage:d,nearestCommonOwner:u,boundaryMarkers:W,recommendedTier:b,suggestedHome:g.suggestedHome,destinationConfidence:g.confidence,whyNoSuggestedHome:g.whyNoSuggestedHome,counterevidence:j,reasons:z,recommendation:de(b,g.suggestedHome,d)}}function V(e,n,t,i){let r=A(F(e,n).forDefinitions([t],{semantic:i!==!1,sourceFallback:!0}));return E(r.get(t.symbolId)??[])}function X(e,n){let t=[];for(let[i,r]of e.entries())i!==n&&r.has(n)&&t.push(i);return E(t)}function Z(e,n){let t=p(n),i=y(e,{includeIgnored:!1}),r=i.find(o=>o===t);if(r)return r;let s=i.find(o=>o.endsWith(`/${t}`));return s||(i.find(o=>o.includes(t))??null)}function ee(e){return{definition:e,unit:{kind:"symbol",file:e.relativePath,shortName:S(e.symbol),symbol:e.symbol,startLine:e.startLine,endLine:e.endLine}}}function I(e){return{unit:{kind:"file",file:e,shortName:h.basename(e)}}}function ne(e){if(e===".")return[{path:".",depth:0,markers:[]}];let n=[],t=e.split("/").filter(Boolean);for(let i=0;i<t.length;i+=1){let r=t.slice(0,i+1).join("/");n.push({path:r,depth:i,markers:D(r)})}return n}function T(e){return e==="."?[]:$(e).map(({marker:n,prefix:t})=>`${n}: ${t}`)}function D(e){return w($(e).map(({marker:n})=>n))}function $(e){let n=e.split("/").filter(Boolean),t=[];for(let i=0;i<n.length;i+=1){let r=O.get(n[i]);r&&t.push({marker:r,prefix:n.slice(0,i+1).join("/")})}return t}function te(e){if(e.length===0)return null;let n=e.map(i=>l(h.dirname(i))),t=n[0].split("/").filter(Boolean);for(let i of n.slice(1)){let r=i.split("/").filter(Boolean),s=[],o=Math.min(t.length,r.length);for(let a=0;a<o&&t[a]===r[a];a+=1)s.push(t[a]);t=s}return t.length===0?".":t.join("/")}function ie(e,n,t,i){return t?e.kind==="symbol"&&i.length===1?i[0]===e.file?"same-file":"sibling-folder":t==="."||t==="src"?"repository-level-review":U(t,"package")?"package-level-shared":U(t,"app")?"app-level-shared":N(t,["feature","domain","module"])||N(n,["feature","domain","module"])?"feature-local-shared":"sibling-folder":"no-exact-consumers"}function re(e,n,t,i,r,s,o){let a=oe(e,i);if(a)return m(a);let d=fe(n.file),f=se(e,t,d,r,o);if(f)return f;let c=i;if(l(t)===l(c))return m(`${t} is already the nearest common owner for its consumers.`);let u=ae(c,t,d,o);return u||ce(c,t,d,s,o)}function oe(e,n){return n?e==="no-exact-consumers"||e==="repository-level-review"?"The inferred owner is too broad or unsupported for an exact destination.":null:"No consumer owner could be inferred from the current index."}function se(e,n,t,i,r){if(e==="same-file"){let s=i[0]??null;return s?v(s):m("No same-file consumer path was available.")}if(e==="sibling-folder"&&i.length===1){let s=l(h.dirname(i[0])),o=H(n,t,s,r);return o?m(o):v(s)}return null}function ae(e,n,t,i){return be(e)?P(e,n,t,i,`Nearest shared owner ${e} is outside source root ${t}.`):null}function ce(e,n,t,i,r){if(e===".")return m("The nearest common owner is the repository root.");let s=`${e}/shared`,o=P(s,n,t,r,`Proposed home ${s} is outside source root ${t}.`);return o.confidence==="withheld"||i.has(s)?o:m(`${s} does not exist in the indexed project.`)}function P(e,n,t,i,r){if(!M(e,t))return m(r);let s=H(n,t,e,i);return s?m(s):v(e)}function v(e){return{suggestedHome:e,confidence:"exact",whyNoSuggestedHome:null}}function m(e){return{suggestedHome:null,confidence:"withheld",whyNoSuggestedHome:e}}function le(e,n,t,i,r,s){let o=["Report-only signal; review ownership before moving files."];return n==="none"&&o.push("No consumers were found in the current index."),n==="file-level"&&o.push("File-level import evidence can hide which exported unit is actually used."),(t==="."||t==="src")&&o.push("Nearest common owner is broad, so this is not enough evidence for automatic placement."),i.length===1&&o.push("Only one consumer was found; inlining or same-folder placement may be better than shared extraction."),e.kind==="file"&&o.push("File targets describe module locality, not symbol-level usage."),t&&r.startsWith(`${t}/`)&&o.push("Candidate already lives under the nearest common owner."),s&&o.push(`No exact suggested home: ${s}`),o}function ue(e,n,t,i,r,s){let o=[];return o.push(`${e.shortName} currently lives in ${n}.`),t?o.push(`${i.length} consumer file(s) share ${t} as their nearest common owner.`):o.push("No consumer owner could be inferred from the current index."),r?o.push(`Suggested home is ${r}.`):s&&o.push(`No exact suggested home: ${s}`),o}function de(e,n,t){return e==="no-exact-consumers"?"Review references before moving; no consumers were found.":e==="repository-level-review"?"Keep this as a broad locality signal; the inferred owner is too general for automatic relocation.":n?`Review whether ${t==="exact"?"symbol usage":"module import"} supports moving or extracting toward ${n}.`:"Review ownership manually before changing structure."}function me(e,n){return R(n)-R(e)||e.candidatePath.localeCompare(n.candidatePath)}function R(e){let n=e.consumerFiles.length*10;return e.consumerCoverage==="exact"&&(n+=5),e.suggestedHome&&(n+=3),e.recommendedTier==="repository-level-review"&&(n*=.1),e.recommendedTier==="no-exact-consumers"&&(n*=.05),n}function ge(e){let n=new Set(["."]);for(let t of e){let i=l(h.dirname(t));for(;!n.has(i)&&(n.add(i),i!==".");)i=l(h.dirname(i))}return n}function fe(e){let n=x(e),t=n.indexOf("src");return t>=0?n.slice(0,t+1).join("/"):n.length<=1?".":n[0]}function M(e,n){let t=l(e),i=l(n);return i==="."||t===i||t.startsWith(`${i}/`)}function he(e,n,t){let i=x(e),r=x(n);return(M(e,n)?i.slice(r.length):i).some(o=>t.has(o.toLowerCase()))}function H(e,n,t,i){return l(e)===l(t)||!he(e,n,i)?null:`${e} is a named architectural boundary; an exact move to ${t} needs human design.`}function pe(...e){let n=new Set(Y);for(let t of e)for(let i of t??[]){let r=ye(i);r&&n.add(r)}return n}function ye(e){let n=e.trim().toLowerCase();return n===""?null:n}function U(e,n){return D(e).includes(n)}function N(e,n){let t=D(e);return n.some(i=>t.includes(i))}function be(e){let n=e.split("/").filter(Boolean),t=n[n.length-1];return t?q.has(t):!1}function l(e){let n=p(e);return n===""?".":n}function x(e){let n=p(e);return n==="."?[]:n.split("/").filter(Boolean)}function L(e,n){return!Number.isFinite(e)||e===void 0||e<1?n:Math.floor(e)}function E(e){return w([...e]).sort((n,t)=>n.localeCompare(t))}function w(e){return[...new Set(e)]}export{Ce as a};
2
- //# sourceMappingURL=chunk-IJMD6BRI.js.map
1
+ import{a as F,b as A}from"./chunk-HLZTEXRA.js";import{c as C}from"./chunk-CJZXN4NU.js";import{a as k}from"./chunk-OSSESPDX.js";import{d as S}from"./chunk-N2ZSIIGR.js";import{a as y}from"./chunk-ZOHS7AQV.js";import{b as p}from"./chunk-N5B2NILC.js";import{posix as h}from"path";var _=20,G=1,O=new Map([["app","app"],["apps","app"],["component","component"],["components","component"],["composable","composable"],["composables","composable"],["contract","contract"],["contracts","contract"],["domain","domain"],["domains","domain"],["feature","feature"],["features","feature"],["hook","hook"],["hooks","hook"],["lib","library"],["module","module"],["modules","module"],["package","package"],["packages","package"],["page","page"],["pages","page"],["route","route"],["routes","route"],["screen","screen"],["screens","screen"],["service","service"],["services","service"],["shared","shared"],["src","source-root"],["store","state"],["stores","state"],["test","test"],["tests","test"],["util","utility"],["utils","utility"],["view","view"],["views","view"]]),q=new Set(["components","contracts","hooks","lib","services","shared","stores","utils"]),Y=new Set(["access","api","auth","config","db","effect","errors","hooks","lib","middleware","permissions","routes","schemas","servicetasks","services","startup","store","stores","test-utils","repository","repositories","tests","types","ui","utils","workflow","workflows"]);function Ce(e,n={}){let t=L(n.limit,_),i=L(n.minConsumers,G),r=new C(e),s=r.fileDependencyGraph(n.scope),o=ge(y(e,{includeIgnored:!1})),a=pe(e.config.locality?.architecturalBoundarySegments,n.architecturalBoundarySegments);return(n.target?K(e,r,n.target):J(e,n.scope,n.scanLimit)).map(c=>Q(e,r,s,c,n,o,a)).filter(c=>c.consumerFiles.length>=i||n.target).sort(me).slice(0,t)}function K(e,n,t){let i=Z(e,t);if(i)return[I(i)];let r=k(e,t);if(!r)return[];let s=n.definitionsForFile(r.relativePath).find(o=>o.symbolId===r.symbolId);return s?[ee(s)]:[{unit:{kind:"symbol",file:r.relativePath,shortName:S(r.symbol),symbol:r.symbol,startLine:r.startLine,endLine:r.endLine}}]}function J(e,n,t){let i=y(e,{scope:n,includeIgnored:!1}),r=L(t,i.length);return i.slice(0,r).map(s=>I(s))}function Q(e,n,t,i,r,s,o){let a=i.definition?V(e,n,i.definition,r.semantic):X(t,i.unit.file),d=i.definition?a.length>0?"exact":"none":a.length>0?"file-level":"none",f=i.unit.file,c=l(h.dirname(f)),u=te(a),B=ne(c),W=w([...T(c),...u?T(u):[]]),b=ie(i.unit,c,u,a),g=re(b,i.unit,c,u,a,s,o),j=le(i.unit,d,u,a,c,g.whyNoSuggestedHome),z=ue(i.unit,c,u,a,g.suggestedHome,g.whyNoSuggestedHome);return{actionTier:"signal",sourceUnit:i.unit,candidatePath:f,currentDirectory:c,directoryAncestry:B,consumerFiles:a,consumerCoverage:d,nearestCommonOwner:u,boundaryMarkers:W,recommendedTier:b,suggestedHome:g.suggestedHome,destinationConfidence:g.confidence,whyNoSuggestedHome:g.whyNoSuggestedHome,counterevidence:j,reasons:z,recommendation:de(b,g.suggestedHome,d)}}function V(e,n,t,i){let r=A(F(e,n).forDefinitions([t],{semantic:i!==!1,sourceFallback:!0}));return E(r.get(t.symbolId)??[])}function X(e,n){let t=[];for(let[i,r]of e.entries())i!==n&&r.has(n)&&t.push(i);return E(t)}function Z(e,n){let t=p(n),i=y(e,{includeIgnored:!1}),r=i.find(o=>o===t);if(r)return r;let s=i.find(o=>o.endsWith(`/${t}`));return s||(i.find(o=>o.includes(t))??null)}function ee(e){return{definition:e,unit:{kind:"symbol",file:e.relativePath,shortName:S(e.symbol),symbol:e.symbol,startLine:e.startLine,endLine:e.endLine}}}function I(e){return{unit:{kind:"file",file:e,shortName:h.basename(e)}}}function ne(e){if(e===".")return[{path:".",depth:0,markers:[]}];let n=[],t=e.split("/").filter(Boolean);for(let i=0;i<t.length;i+=1){let r=t.slice(0,i+1).join("/");n.push({path:r,depth:i,markers:D(r)})}return n}function T(e){return e==="."?[]:$(e).map(({marker:n,prefix:t})=>`${n}: ${t}`)}function D(e){return w($(e).map(({marker:n})=>n))}function $(e){let n=e.split("/").filter(Boolean),t=[];for(let i=0;i<n.length;i+=1){let r=O.get(n[i]);r&&t.push({marker:r,prefix:n.slice(0,i+1).join("/")})}return t}function te(e){if(e.length===0)return null;let n=e.map(i=>l(h.dirname(i))),t=n[0].split("/").filter(Boolean);for(let i of n.slice(1)){let r=i.split("/").filter(Boolean),s=[],o=Math.min(t.length,r.length);for(let a=0;a<o&&t[a]===r[a];a+=1)s.push(t[a]);t=s}return t.length===0?".":t.join("/")}function ie(e,n,t,i){return t?e.kind==="symbol"&&i.length===1?i[0]===e.file?"same-file":"sibling-folder":t==="."||t==="src"?"repository-level-review":U(t,"package")?"package-level-shared":U(t,"app")?"app-level-shared":N(t,["feature","domain","module"])||N(n,["feature","domain","module"])?"feature-local-shared":"sibling-folder":"no-exact-consumers"}function re(e,n,t,i,r,s,o){let a=oe(e,i);if(a)return m(a);let d=fe(n.file),f=se(e,t,d,r,o);if(f)return f;let c=i;if(l(t)===l(c))return m(`${t} is already the nearest common owner for its consumers.`);let u=ae(c,t,d,o);return u||ce(c,t,d,s,o)}function oe(e,n){return n?e==="no-exact-consumers"||e==="repository-level-review"?"The inferred owner is too broad or unsupported for an exact destination.":null:"No consumer owner could be inferred from the current index."}function se(e,n,t,i,r){if(e==="same-file"){let s=i[0]??null;return s?v(s):m("No same-file consumer path was available.")}if(e==="sibling-folder"&&i.length===1){let s=l(h.dirname(i[0])),o=H(n,t,s,r);return o?m(o):v(s)}return null}function ae(e,n,t,i){return be(e)?P(e,n,t,i,`Nearest shared owner ${e} is outside source root ${t}.`):null}function ce(e,n,t,i,r){if(e===".")return m("The nearest common owner is the repository root.");let s=`${e}/shared`,o=P(s,n,t,r,`Proposed home ${s} is outside source root ${t}.`);return o.confidence==="withheld"||i.has(s)?o:m(`${s} does not exist in the indexed project.`)}function P(e,n,t,i,r){if(!M(e,t))return m(r);let s=H(n,t,e,i);return s?m(s):v(e)}function v(e){return{suggestedHome:e,confidence:"exact",whyNoSuggestedHome:null}}function m(e){return{suggestedHome:null,confidence:"withheld",whyNoSuggestedHome:e}}function le(e,n,t,i,r,s){let o=["Report-only signal; review ownership before moving files."];return n==="none"&&o.push("No consumers were found in the current index."),n==="file-level"&&o.push("File-level import evidence can hide which exported unit is actually used."),(t==="."||t==="src")&&o.push("Nearest common owner is broad, so this is not enough evidence for automatic placement."),i.length===1&&o.push("Only one consumer was found; inlining or same-folder placement may be better than shared extraction."),e.kind==="file"&&o.push("File targets describe module locality, not symbol-level usage."),t&&r.startsWith(`${t}/`)&&o.push("Candidate already lives under the nearest common owner."),s&&o.push(`No exact suggested home: ${s}`),o}function ue(e,n,t,i,r,s){let o=[];return o.push(`${e.shortName} currently lives in ${n}.`),t?o.push(`${i.length} consumer file(s) share ${t} as their nearest common owner.`):o.push("No consumer owner could be inferred from the current index."),r?o.push(`Suggested home is ${r}.`):s&&o.push(`No exact suggested home: ${s}`),o}function de(e,n,t){return e==="no-exact-consumers"?"Review references before moving; no consumers were found.":e==="repository-level-review"?"Keep this as a broad locality signal; the inferred owner is too general for automatic relocation.":n?`Review whether ${t==="exact"?"symbol usage":"module import"} supports moving or extracting toward ${n}.`:"Review ownership manually before changing structure."}function me(e,n){return R(n)-R(e)||e.candidatePath.localeCompare(n.candidatePath)}function R(e){let n=e.consumerFiles.length*10;return e.consumerCoverage==="exact"&&(n+=5),e.suggestedHome&&(n+=3),e.recommendedTier==="repository-level-review"&&(n*=.1),e.recommendedTier==="no-exact-consumers"&&(n*=.05),n}function ge(e){let n=new Set(["."]);for(let t of e){let i=l(h.dirname(t));for(;!n.has(i)&&(n.add(i),i!==".");)i=l(h.dirname(i))}return n}function fe(e){let n=x(e),t=n.indexOf("src");return t>=0?n.slice(0,t+1).join("/"):n.length<=1?".":n[0]}function M(e,n){let t=l(e),i=l(n);return i==="."||t===i||t.startsWith(`${i}/`)}function he(e,n,t){let i=x(e),r=x(n);return(M(e,n)?i.slice(r.length):i).some(o=>t.has(o.toLowerCase()))}function H(e,n,t,i){return l(e)===l(t)||!he(e,n,i)?null:`${e} is a named architectural boundary; an exact move to ${t} needs human design.`}function pe(...e){let n=new Set(Y);for(let t of e)for(let i of t??[]){let r=ye(i);r&&n.add(r)}return n}function ye(e){let n=e.trim().toLowerCase();return n===""?null:n}function U(e,n){return D(e).includes(n)}function N(e,n){let t=D(e);return n.some(i=>t.includes(i))}function be(e){let n=e.split("/").filter(Boolean),t=n[n.length-1];return t?q.has(t):!1}function l(e){let n=p(e);return n===""?".":n}function x(e){let n=p(e);return n==="."?[]:n.split("/").filter(Boolean)}function L(e,n){return!Number.isFinite(e)||e===void 0||e<1?n:Math.floor(e)}function E(e){return w([...e]).sort((n,t)=>n.localeCompare(t))}function w(e){return[...new Set(e)]}export{Ce as a};
2
+ //# sourceMappingURL=chunk-BQGB4HBD.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-5H5WTJSD.js";import{b as i}from"./chunk-7JYHQAH2.js";import{existsSync as h}from"fs";import{isAbsolute as p,join as g}from"path";function D(e,n){let t=l(e,n,{allowMultiple:!1})[0]?.relativePath;return t||d(e,n)}function P(e,n){return l(e,n,{allowMultiple:!0}).map(t=>t.relativePath)}function S(e,n){let t=l(e,n,{allowMultiple:!0});return t.length===1?t[0].relativePath:null}function I(e,n){let t=i(e,n,{allowMultiple:!0,requirePathMatch:!0});return t.length===1?t[0].relativePath:null}function d(e,n){if(!n)return null;let t=n.replace(/\\/g,"/").replace(/^\.\//,""),r=p(t)&&t.startsWith(e.config.projectRoot)?t.slice(e.config.projectRoot.length).replace(/^\/+/,""):t,o=g(e.config.projectRoot,r);return h(o)?r:null}function l(e,n,t){let r=d(e,n);if(r)return i(e,r,t).filter(a=>a.relativePath===r);let o=n.replace(/\\/g,"/").replace(/^\.\//,""),s=p(o)||o.includes("/"),c=i(e,n,{...t,requirePathMatch:s});if(c.length===0){if(s)return[];let a=u(e,n);return!a||e.isIgnored(a.relativePath)?[]:[{relativePath:a.relativePath,score:700}]}return c}export{D as a,P as b,S as c,I as d};
2
- //# sourceMappingURL=chunk-ERCYGVAM.js.map
1
+ import{a as u}from"./chunk-OSSESPDX.js";import{b as i}from"./chunk-ZOHS7AQV.js";import{existsSync as h}from"fs";import{isAbsolute as p,join as g}from"path";function D(e,n){let t=l(e,n,{allowMultiple:!1})[0]?.relativePath;return t||d(e,n)}function P(e,n){return l(e,n,{allowMultiple:!0}).map(t=>t.relativePath)}function S(e,n){let t=l(e,n,{allowMultiple:!0});return t.length===1?t[0].relativePath:null}function I(e,n){let t=i(e,n,{allowMultiple:!0,requirePathMatch:!0});return t.length===1?t[0].relativePath:null}function d(e,n){if(!n)return null;let t=n.replace(/\\/g,"/").replace(/^\.\//,""),r=p(t)&&t.startsWith(e.config.projectRoot)?t.slice(e.config.projectRoot.length).replace(/^\/+/,""):t,o=g(e.config.projectRoot,r);return h(o)?r:null}function l(e,n,t){let r=d(e,n);if(r)return i(e,r,t).filter(a=>a.relativePath===r);let o=n.replace(/\\/g,"/").replace(/^\.\//,""),s=p(o)||o.includes("/"),c=i(e,n,{...t,requirePathMatch:s});if(c.length===0){if(s)return[];let a=u(e,n);return!a||e.isIgnored(a.relativePath)?[]:[{relativePath:a.relativePath,score:700}]}return c}export{D as a,P as b,S as c,I as d};
2
+ //# sourceMappingURL=chunk-BRV7PIFF.js.map