scip-query 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +244 -1
- package/README.md +2 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-H3P6BR5G.js +2 -0
- package/dist/call-graph-VTG2CUOQ.js +2 -0
- package/dist/call-graph-evidence-BociKRpF.d.ts +19 -0
- package/dist/chunk-2BMSSRBH.js +2 -0
- package/dist/{chunk-WIWY3CRX.js → chunk-2GJSD5GY.js} +2 -2
- package/dist/{chunk-W5OXRYGE.js → chunk-2M2LSIMY.js} +3 -3
- package/dist/{chunk-2LDBDR6J.js → chunk-2N6WBNDC.js} +2 -2
- package/dist/{chunk-HOENASQM.js → chunk-2USA3S3P.js} +2 -2
- package/dist/chunk-2VAHDDLM.js +133 -0
- package/dist/chunk-2XWIUW5Z.js +455 -0
- package/dist/chunk-3D4BOXW6.js +20 -0
- package/dist/{chunk-BBCIS4DX.js → chunk-3LO4FST5.js} +2 -2
- package/dist/chunk-3WTY4LP2.js +3 -0
- package/dist/{chunk-UXW33INU.js → chunk-3Z5AMSK6.js} +2 -2
- package/dist/{chunk-4ILJCCXV.js → chunk-44IETFOU.js} +2 -2
- package/dist/chunk-4FR6GQIT.js +2 -0
- package/dist/chunk-4KBTHJLP.js +2 -0
- package/dist/{chunk-SSK6LDPC.js → chunk-5BIKR67W.js} +2 -2
- package/dist/{chunk-IHGQTTVW.js → chunk-5PROPLHI.js} +2 -2
- package/dist/{chunk-TA3QKLLU.js → chunk-5V7EPTII.js} +2 -2
- package/dist/{chunk-JS4PGXMV.js → chunk-62LPZCBQ.js} +2 -2
- package/dist/{chunk-DBRSYFXR.js → chunk-64O2JHQA.js} +2 -2
- package/dist/chunk-6D4F5VWG.js +10 -0
- package/dist/{chunk-BHVUJOCQ.js → chunk-6ERFBC3X.js} +2 -2
- package/dist/{chunk-ILTDAWEF.js → chunk-6ILKOOGH.js} +2 -2
- package/dist/chunk-6MFXCMZC.js +2 -0
- package/dist/chunk-6O7FACKB.js +2 -0
- package/dist/{chunk-XDQMU3BT.js → chunk-6TS3KOXR.js} +2 -2
- package/dist/{chunk-YI2AWIHC.js → chunk-76QOU4PK.js} +2 -2
- package/dist/{chunk-7CYG22FH.js → chunk-7DUI77BN.js} +2 -2
- package/dist/{chunk-IDFEUFKS.js → chunk-7F7T6DCR.js} +2 -2
- package/dist/chunk-7H6VHWWJ.js +2 -0
- package/dist/chunk-7HXT6YLU.js +5 -0
- package/dist/{chunk-DIRJWYBM.js → chunk-7R4V5ES6.js} +4 -4
- package/dist/{chunk-SZHGTCPP.js → chunk-7RIRIADH.js} +2 -2
- package/dist/chunk-7ZLWLOGT.js +2 -0
- package/dist/{chunk-M2O5NY6W.js → chunk-A4WEAK35.js} +2 -2
- package/dist/chunk-AADQLOQ4.js +38 -0
- package/dist/{chunk-OLNV6I6U.js → chunk-AN76MGUE.js} +2 -2
- package/dist/chunk-ANLNLY66.js +2 -0
- package/dist/chunk-ATXPTSEI.js +81 -0
- package/dist/{chunk-YPWBKGFU.js → chunk-AX7IDVFT.js} +2 -2
- package/dist/chunk-B7MPDEAK.js +3 -0
- package/dist/chunk-BBB5FBX4.js +2 -0
- package/dist/{chunk-6I6L7Z62.js → chunk-BHKK5RJY.js} +2 -2
- package/dist/chunk-BJWFVAA5.js +2 -0
- package/dist/{chunk-UHFYCMZO.js → chunk-BKZYTLGE.js} +2 -2
- package/dist/chunk-BL6DCHQP.js +2 -0
- package/dist/{chunk-TEBQMNVI.js → chunk-BOW7SSQH.js} +2 -2
- package/dist/{chunk-OWOOWNJ5.js → chunk-C4RHHCKL.js} +2 -2
- package/dist/{chunk-N2ZSIIGR.js → chunk-C7C6AKAT.js} +6 -6
- package/dist/chunk-CD6M6LS2.js +16 -0
- package/dist/chunk-CFE6PSG6.js +2 -0
- package/dist/{chunk-6V5CNXL6.js → chunk-CFNIGQMT.js} +2 -2
- package/dist/{chunk-GUFSG5TX.js → chunk-CKBUBRYD.js} +2 -2
- package/dist/{chunk-4WNW27SX.js → chunk-CZW5MZ5B.js} +2 -2
- package/dist/chunk-DBBZ63ZX.js +2 -0
- package/dist/{chunk-HCXEQRFF.js → chunk-DBN7DMJB.js} +2 -2
- package/dist/{chunk-6PQNKL3G.js → chunk-DUULLZHZ.js} +2 -2
- package/dist/{chunk-Z4CDXYNQ.js → chunk-DV5Y5NOS.js} +2 -2
- package/dist/chunk-DZOIKCTM.js +3 -0
- package/dist/chunk-E4PKTOL3.js +2 -0
- package/dist/{chunk-EG2CPZMJ.js → chunk-E65ELFKU.js} +2 -2
- package/dist/{chunk-CNO7TOKL.js → chunk-E7QR35ST.js} +2 -2
- package/dist/{chunk-3D3QG236.js → chunk-EFSXAINW.js} +2 -2
- package/dist/{chunk-IL676XCC.js → chunk-EHVEIEQN.js} +2 -2
- package/dist/{chunk-BE7ZZTMC.js → chunk-EHYDXE3Z.js} +2 -2
- package/dist/{chunk-LXABEJX3.js → chunk-EP63Y6LD.js} +2 -2
- package/dist/{chunk-QU5XRYB5.js → chunk-EPX6NQN6.js} +2 -2
- package/dist/{chunk-FESCRNVV.js → chunk-ETC674NS.js} +2 -2
- package/dist/{chunk-OSSESPDX.js → chunk-F5GSBHC6.js} +2 -2
- package/dist/chunk-FH3DGXC6.js +2 -0
- package/dist/{chunk-YEN6CYC7.js → chunk-FI7VGOR4.js} +2 -2
- package/dist/chunk-FJF6VO2P.js +2 -0
- package/dist/{chunk-FRUSVINH.js → chunk-FLMTCX5R.js} +2 -2
- package/dist/chunk-FVFDOIM3.js +2 -0
- package/dist/{chunk-PJFGPYTU.js → chunk-G2HU5WRN.js} +2 -2
- package/dist/{chunk-FIQRSHVM.js → chunk-G4ALYS4J.js} +2 -2
- package/dist/{chunk-UVGEWT4Y.js → chunk-G56I7K4W.js} +2 -2
- package/dist/{chunk-WOIKCX6A.js → chunk-GC4DG2V5.js} +2 -2
- package/dist/chunk-GG45PK4S.js +4 -0
- package/dist/{chunk-XBGWL66K.js → chunk-GHNPACNP.js} +2 -2
- package/dist/{chunk-IICPE7B2.js → chunk-GINH3YQU.js} +2 -2
- package/dist/{chunk-HLZTEXRA.js → chunk-GTZZVLKJ.js} +2 -2
- package/dist/chunk-GXXW5ZHH.js +2 -0
- package/dist/{chunk-B5D7QPBE.js → chunk-HAXXKRTD.js} +2 -2
- package/dist/chunk-HEZWBAZY.js +2 -0
- package/dist/chunk-HMEWLMML.js +2 -0
- package/dist/{chunk-QUU5OBVK.js → chunk-HOBOVYPO.js} +2 -2
- package/dist/{chunk-XGZEP6GR.js → chunk-HRFQ6GW5.js} +2 -2
- package/dist/{chunk-MPQ4OTBM.js → chunk-HX4X7KG3.js} +2 -2
- package/dist/{chunk-FDLOBR6P.js → chunk-HYT2R7LX.js} +2 -2
- package/dist/chunk-IKQVBVQL.js +40 -0
- package/dist/chunk-J6GLBBRK.js +4 -0
- package/dist/{chunk-ZTI4SBFV.js → chunk-J7A4PWFX.js} +2 -2
- package/dist/{chunk-OSR2GEHQ.js → chunk-JCSAZ35V.js} +2 -2
- package/dist/{chunk-ESIQ66Z7.js → chunk-JDU2IV3A.js} +2 -2
- package/dist/chunk-JFMI5SGB.js +4 -0
- package/dist/{chunk-W6STWDQI.js → chunk-JJP37RGX.js} +2 -2
- package/dist/chunk-JZ2A7LDM.js +5 -0
- package/dist/chunk-KNLQGXVH.js +80 -0
- package/dist/chunk-KVQCECPR.js +2 -0
- package/dist/{chunk-SQXRS7BG.js → chunk-KXXORBZ2.js} +2 -2
- package/dist/{chunk-DIUFNHRJ.js → chunk-L5KYH6U3.js} +2 -2
- package/dist/chunk-L6XHYJPZ.js +21 -0
- package/dist/{chunk-2GRUZAQF.js → chunk-L7KTFEAV.js} +2 -2
- package/dist/{chunk-QBE3YX64.js → chunk-LDXHR5EL.js} +2 -2
- package/dist/{chunk-HEHOQQKH.js → chunk-MHGDSBFX.js} +2 -2
- package/dist/{chunk-PWWAJSKV.js → chunk-MLQVVDG3.js} +2 -2
- package/dist/chunk-MOKUWRHO.js +3 -0
- package/dist/{chunk-VQILFTEH.js → chunk-MPYAPMNE.js} +2 -2
- package/dist/{chunk-UICY4GTQ.js → chunk-MV6SPXCR.js} +2 -2
- package/dist/{chunk-HYO3NP5Q.js → chunk-MZPXPSUJ.js} +2 -2
- package/dist/{chunk-VZRNID6A.js → chunk-N55KIE46.js} +2 -2
- package/dist/{chunk-YF5IB2LF.js → chunk-NB4D3BNM.js} +2 -2
- package/dist/{chunk-VVZSBTSU.js → chunk-NGKBOT6G.js} +2 -2
- package/dist/{chunk-NJITK2GP.js → chunk-NJGKXKQF.js} +2 -2
- package/dist/chunk-NJQISBL4.js +8 -0
- package/dist/{chunk-T4N4P2K5.js → chunk-NJT3ZEKY.js} +2 -2
- package/dist/{chunk-FPYLNQPT.js → chunk-NKMKZP6A.js} +2 -2
- package/dist/chunk-NODFZ6ED.js +2 -0
- package/dist/{chunk-BRV7PIFF.js → chunk-NSM5IEVW.js} +2 -2
- package/dist/{chunk-3WR4E3A3.js → chunk-NTGUVNR2.js} +2 -2
- package/dist/{chunk-VUPHCS7Y.js → chunk-NU3KFF2O.js} +2 -2
- package/dist/chunk-NWLVNU66.js +557 -0
- package/dist/{chunk-D4N5SQ2M.js → chunk-NYKZMCRC.js} +2 -2
- package/dist/{chunk-VNLGKHS6.js → chunk-O6BUXZEH.js} +2 -2
- package/dist/chunk-ODPDP7A4.js +3 -0
- package/dist/{chunk-JTQVMR42.js → chunk-OHIV323X.js} +2 -2
- package/dist/chunk-OIAPEKMT.js +3 -0
- package/dist/chunk-OIOC5EHF.js +3 -0
- package/dist/{chunk-YBGKCQIS.js → chunk-ONPPQM4G.js} +2 -2
- package/dist/{chunk-64BFSI5I.js → chunk-OUHEZBYI.js} +2 -2
- package/dist/{chunk-L6PJPETJ.js → chunk-OVGYW7UD.js} +2 -2
- package/dist/{chunk-I55I7XXP.js → chunk-OYKU4B3Y.js} +2 -2
- package/dist/{chunk-J66VOFW6.js → chunk-POBJ6FR2.js} +2 -2
- package/dist/{chunk-CWFP7GM5.js → chunk-PSZPMMWN.js} +2 -2
- package/dist/chunk-PXTRBKRK.js +3 -0
- package/dist/{chunk-HKGFPJ4T.js → chunk-Q5JRIHT3.js} +2 -2
- package/dist/{chunk-P42EIXTA.js → chunk-Q7ATHARX.js} +2 -2
- package/dist/{chunk-JYR66JN5.js → chunk-Q7CSKIDM.js} +2 -2
- package/dist/{chunk-TRNAEQ6P.js → chunk-QBQE7ZJ5.js} +2 -2
- package/dist/{chunk-DULC3QFP.js → chunk-QH22UIXP.js} +2 -2
- package/dist/chunk-QXCKQTKR.js +60 -0
- package/dist/{chunk-ODDUPDP7.js → chunk-RBAD4GJ2.js} +5 -5
- package/dist/{chunk-IZDPJ2QI.js → chunk-RMDPFPNW.js} +2 -2
- package/dist/chunk-ROPJDEJZ.js +4 -0
- package/dist/{chunk-EKV5HX33.js → chunk-RVZC6TJE.js} +2 -2
- package/dist/{chunk-XFA4SSO3.js → chunk-S4QZBKSR.js} +2 -2
- package/dist/{chunk-D2DHWI3D.js → chunk-SCPMZ73U.js} +2 -2
- package/dist/{chunk-PZL5T7SU.js → chunk-SIAP5RGI.js} +2 -2
- package/dist/{chunk-7IWV2EG3.js → chunk-SIX4RFR3.js} +2 -2
- package/dist/{chunk-DYGHBZ2N.js → chunk-SKKXTABJ.js} +2 -2
- package/dist/{chunk-F7DY272B.js → chunk-SSRFUQBD.js} +2 -2
- package/dist/chunk-SYVJEEUJ.js +3 -0
- package/dist/{chunk-FGA2U4OR.js → chunk-T3CZAZSI.js} +2 -2
- package/dist/chunk-T3I6NHBH.js +2 -0
- package/dist/{chunk-EQHFIL6T.js → chunk-T6DWDI5E.js} +2 -2
- package/dist/chunk-T6HRIROJ.js +7 -0
- package/dist/{chunk-GSP44ENC.js → chunk-TAA7HXHE.js} +2 -2
- package/dist/{chunk-BQGB4HBD.js → chunk-TJ2JQYT3.js} +2 -2
- package/dist/{chunk-XPDPNWTQ.js → chunk-TULNMD5T.js} +19 -19
- package/dist/chunk-U2FPY5XA.js +3 -0
- package/dist/chunk-U3SXIMII.js +38 -0
- package/dist/{chunk-NOGJXYFO.js → chunk-U6KCHXJ4.js} +2 -2
- package/dist/chunk-UH3XSKS5.js +9 -0
- package/dist/{chunk-AFHTBORT.js → chunk-UIFUZVCC.js} +2 -2
- package/dist/{chunk-7BWFZPPZ.js → chunk-UXKURIVI.js} +2 -2
- package/dist/{chunk-2E7CX53V.js → chunk-V2RBODHL.js} +2 -2
- package/dist/{chunk-KLFEXGQA.js → chunk-VBKUWB6N.js} +2 -2
- package/dist/{chunk-WUN6KBHV.js → chunk-VBV6ALJE.js} +2 -2
- package/dist/{chunk-GZIUDL6G.js → chunk-VDGFWCQV.js} +2 -2
- package/dist/chunk-VDSDOEWF.js +2 -0
- package/dist/{chunk-WDNVY4E7.js → chunk-VZPWVCLN.js} +2 -2
- package/dist/chunk-WDSFQDPN.js +2 -0
- package/dist/{chunk-CIYLO6SI.js → chunk-WFA35BGR.js} +2 -2
- package/dist/{chunk-LMZ5PRUV.js → chunk-WLMP3OCW.js} +2 -2
- package/dist/{chunk-3SVF22I5.js → chunk-WSA52GOR.js} +2 -2
- package/dist/{chunk-VMPRET3I.js → chunk-X3YVZAKZ.js} +2 -2
- package/dist/{chunk-GYIZ4NXB.js → chunk-X6OGVFIT.js} +2 -2
- package/dist/{chunk-6HFCYNYE.js → chunk-XKXTR6ZI.js} +2 -2
- package/dist/{chunk-6VVV4WRR.js → chunk-Y5DFAW5W.js} +2 -2
- package/dist/chunk-YSYPDRD5.js +3 -0
- package/dist/{chunk-TQPCBMWT.js → chunk-ZFVPWH62.js} +2 -2
- package/dist/chunk-ZGIHTH27.js +2 -0
- package/dist/{chunk-OR2E3AGZ.js → chunk-ZGIQN2SX.js} +2 -2
- package/dist/{chunk-WNTFFKAX.js → chunk-ZHG4WAHR.js} +2 -2
- package/dist/{chunk-DTZCKZEU.js → chunk-ZKB2XUEN.js} +2 -2
- package/dist/chunk-ZLMXIQLC.js +21 -0
- package/dist/chunk-ZMCQIHI4.js +2 -0
- package/dist/cli-main.js +2 -2
- package/dist/code-TAVIKWJI.js +2 -0
- package/dist/code-result-json-5FEFQCAQ.js +2 -0
- package/dist/{command-descriptors-P34VABY5.js → command-descriptors-7BKH53Y3.js} +124 -124
- package/dist/dataflow-GFBTVDH3.js +2 -0
- package/dist/dependence-slice-GWGQCODG.js +2 -0
- package/dist/deps-4QHVDPYA.js +2 -0
- package/dist/direct-navigation-4UBC6HNW.js +3 -0
- package/dist/entry-map-QCTF4RVY.js +2 -0
- package/dist/files-M2UBF5HJ.js +2 -0
- package/dist/frontend-profile-roles-D7eCum8P.d.ts +10 -0
- package/dist/{health-CPp2Jf1Z.d.ts → health-BI2a9WPy.d.ts} +60 -2
- package/dist/hierarchy-2UIHRLW4.js +2 -0
- package/dist/imports-WIE3YZOB.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/members-YKD636DA.js +2 -0
- package/dist/methods-VDF4IMYG.js +2 -0
- package/dist/output-continuation-command-4UMDOOLO.js +3 -0
- package/dist/output-pagination-2GME6OPY.js +19 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-XEQTRCV5.js +3 -0
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +1 -1
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -0
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +20 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -0
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +28 -1
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +1 -1
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +50 -23
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +4 -3
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +9 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +19 -3
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +22 -3
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +17 -3
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +7 -1
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +1 -1
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +22 -6
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +16 -1
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/query-service-fastpath.js +5 -5
- package/dist/query-service-server.js +2 -2
- package/dist/refs-JNK5CLM7.js +2 -0
- package/dist/refs-pagination-6BLRYGMV.js +2 -0
- package/dist/reindex-worker.js +10 -10
- package/dist/reindex.js +18 -18
- package/dist/runtime.js +4 -4
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/slice-PHPVNCWX.js +2 -0
- package/dist/surface-MQX5MPIV.js +2 -0
- package/dist/{symbol-resolution-WD5EU5JE.js → symbol-resolution-DBLVXLBC.js} +2 -2
- package/dist/system-JOPKV4OG.js +2 -0
- package/dist/trace-I2P2YFH4.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-JJVMF7NP.js +2 -0
- package/dist/watch-server.js +3 -3
- package/docs/COMMAND_REFERENCE.md +2 -2
- package/docs/DETECTOR_GUIDE.md +51 -12
- package/docs/accuracy-audit-checklist.md +36 -13
- package/docs/locality-analyzer-design.md +9 -9
- package/package.json +2 -2
- package/skills/conductor/SKILL.md +110 -0
- package/skills/conductor/agents/openai.yaml +4 -0
- package/skills/principal-maintainability-review/SKILL.md +273 -0
- package/skills/principal-maintainability-review/agents/openai.yaml +4 -0
- package/skills/scip-calibrate/SKILL.md +102 -0
- package/skills/scip-calibrate/agents/openai.yaml +4 -0
- package/skills/scip-claim-audit/SKILL.md +113 -0
- package/skills/scip-claim-audit/agents/openai.yaml +4 -0
- package/skills/scip-probe-reachability/SKILL.md +93 -0
- package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
- package/skills/scip-root-cause/SKILL.md +160 -0
- package/skills/scip-root-cause/agents/openai.yaml +4 -0
- package/skills/scip-system-compression/SKILL.md +252 -0
- package/skills/scip-system-compression/agents/openai.yaml +4 -0
- package/skills/scip-system-compression/references/compression-atlas.md +116 -0
- package/skills/scip-system-compression/references/compression-patterns.md +87 -0
- package/skills/scip-twin-drift/SKILL.md +109 -0
- package/skills/scip-twin-drift/agents/openai.yaml +4 -0
- package/dist/by-kind-XI2CSWEY.js +0 -2
- package/dist/call-graph-UONR6JR5.js +0 -2
- package/dist/call-graph-evidence-lZa2dwQA.d.ts +0 -11
- package/dist/chunk-2R3V3PSD.js +0 -4
- package/dist/chunk-2WC2OEDO.js +0 -4
- package/dist/chunk-3FHOF22C.js +0 -21
- package/dist/chunk-3JKSW6LJ.js +0 -2
- package/dist/chunk-3L2ZBPEX.js +0 -133
- package/dist/chunk-3PJABJSU.js +0 -2
- package/dist/chunk-4FTZ4P5G.js +0 -2
- package/dist/chunk-4UX2F3JX.js +0 -2
- package/dist/chunk-5ENOG4VP.js +0 -61
- package/dist/chunk-66DVSJQG.js +0 -455
- package/dist/chunk-AVRYW5OZ.js +0 -2
- package/dist/chunk-BDUVI7TO.js +0 -3
- package/dist/chunk-CEEZJXEF.js +0 -2
- package/dist/chunk-CJZXN4NU.js +0 -2
- package/dist/chunk-COF23M5F.js +0 -2
- package/dist/chunk-DHUIOLDT.js +0 -2
- package/dist/chunk-DRENNWRG.js +0 -2
- package/dist/chunk-E5R6AQ73.js +0 -40
- package/dist/chunk-E73UNJTF.js +0 -38
- package/dist/chunk-EVFUMY4R.js +0 -3
- package/dist/chunk-FBN2FGXG.js +0 -2
- package/dist/chunk-FFRKR4EQ.js +0 -2
- package/dist/chunk-GAS2LJMP.js +0 -3
- package/dist/chunk-HVF5VBG6.js +0 -2
- package/dist/chunk-JGKUET5J.js +0 -3
- package/dist/chunk-JWTGMPIT.js +0 -80
- package/dist/chunk-KFOYCQAJ.js +0 -9
- package/dist/chunk-KYSDI3GE.js +0 -5
- package/dist/chunk-LDVT66YM.js +0 -2
- package/dist/chunk-LQRQN2XA.js +0 -2
- package/dist/chunk-MNV5FSBW.js +0 -3
- package/dist/chunk-MV3CDXPI.js +0 -38
- package/dist/chunk-N5B2NILC.js +0 -5
- package/dist/chunk-NOYBFVJA.js +0 -554
- package/dist/chunk-NWQXSFFU.js +0 -3
- package/dist/chunk-OLIWTZI3.js +0 -3
- package/dist/chunk-PP7KNN7L.js +0 -2
- package/dist/chunk-PU7T5QYQ.js +0 -2
- package/dist/chunk-QGVTFRY2.js +0 -7
- package/dist/chunk-QOJONDS7.js +0 -2
- package/dist/chunk-RBLQNW26.js +0 -20
- package/dist/chunk-RTQ7NEKG.js +0 -81
- package/dist/chunk-TPFHAQ2G.js +0 -2
- package/dist/chunk-TQZV7KV4.js +0 -2
- package/dist/chunk-TY7CRN3Z.js +0 -2
- package/dist/chunk-W7CXK74K.js +0 -2
- package/dist/chunk-WB3WYIRE.js +0 -4
- package/dist/chunk-WK46TNUM.js +0 -3
- package/dist/chunk-WYCTJDVR.js +0 -2
- package/dist/chunk-XRYABF57.js +0 -8
- package/dist/chunk-YPWHBBIS.js +0 -2
- package/dist/chunk-YSH6U3L4.js +0 -3
- package/dist/chunk-YU5DZUZI.js +0 -10
- package/dist/chunk-YWO5DDRC.js +0 -16
- package/dist/chunk-ZF5KHH7C.js +0 -2
- package/dist/chunk-ZOHS7AQV.js +0 -21
- package/dist/code-MI6F2TTU.js +0 -2
- package/dist/code-result-json-FXALY4HE.js +0 -2
- package/dist/dataflow-4KEMJPC6.js +0 -2
- package/dist/dependence-slice-R7FPWD5M.js +0 -2
- package/dist/deps-7EMQUYUT.js +0 -2
- package/dist/direct-navigation-6YO234F2.js +0 -3
- package/dist/entry-map-KOOLR26E.js +0 -2
- package/dist/files-OPIPJIGZ.js +0 -2
- package/dist/hierarchy-QPD2CAER.js +0 -2
- package/dist/imports-M6HUXRXC.js +0 -2
- package/dist/members-I5MEFOCT.js +0 -2
- package/dist/methods-5JYGGHXA.js +0 -2
- package/dist/output-continuation-command-UPQAAKBP.js +0 -3
- package/dist/output-pagination-3OFL2MJV.js +0 -19
- package/dist/project-reindex-UKKQ5PLS.js +0 -3
- package/dist/refs-PSU4JZZW.js +0 -2
- package/dist/refs-pagination-JG6CJMRC.js +0 -2
- package/dist/slice-HYRATV64.js +0 -2
- package/dist/surface-VTGDYWF5.js +0 -2
- package/dist/system-LRQNFOR2.js +0 -2
- package/dist/trace-F4B6OLL4.js +0 -2
- package/dist/value-flow-VRPZY72V.js +0 -2
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import{a as be}from"./chunk-YXPUP5G2.js";import{b as z,c as on,d as an,e as we,g as ut}from"./chunk-BL6DCHQP.js";import{b as Yt,c as U,d as xe,f as Zt,g as en,h as tn,i as nn,j as rn,k as sn,q as de}from"./chunk-ATXPTSEI.js";import{a as Gt,c as N,d as ue,e as Xt,f as pe}from"./chunk-IW5XQG5G.js";import{a as at,b as ct,e as lt}from"./chunk-HGFDYOVB.js";import{$ as Re,aa as ve,o as b}from"./chunk-7HXT6YLU.js";import{h as De}from"./chunk-7F45LJKI.js";var Ae=null;function Ne(e){Ae?.(e)}function pc(e,t){let n=Ae;Ae=e;try{return t()}finally{Ae=n}}var Or=N("source-text",{clearGroups:["whole-project","source-file"]}),Mr=N("source-lines",{clearGroups:["whole-project","source-file"]});function _(e,t){let n=t.replace(/\\/g,"/");return Ne(n),Or.get(e,n,()=>$r(e,n))}function $r(e,t){let n=t.replace(/\\/g,"/");Ne(n);try{return Re(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(r){if(ve(r))return"";throw r}}function yc(e){if(e.length===0)return[];let t=e.split(`
|
|
2
|
+
`);return e.endsWith(`
|
|
3
|
+
`)&&t.pop(),t}function pt(e,t){let n=t.replace(/\\/g,"/");return Mr.get(e,n,()=>{let r=_(e,n);return r?r.split(`
|
|
4
|
+
`):[]})}var Br=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function Vr(e){let t=Br.exec(e);return t?t[1]??"":null}function hc(e,t,n){return Wr(e,t,n).length>0}function Wr(e,t,n){if(n<=0)return[];let r=pt(e,t);if(r.length===0)return[];let i=[];for(let s=n-1;s>=0&&s>=n-5;s-=1){let o=(r[s]??"").trim();if(o==="")continue;let a=Vr(o);if(a!==null){i.push(a);continue}if(!o.startsWith("//")&&!o.startsWith("*")&&!o.startsWith("/*")&&!o.startsWith("@")&&!o.startsWith("#"))return i}return i}import{extname as cn}from"path";var Ur={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb",".clj":"clojure",".cljs":"clojure",".cljc":"clojure"};function H(e){return Ur[cn(e).toLowerCase()]??null}function q(e){return cn(e).toLowerCase()===".vue"}var zr=[S("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),S("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),S("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),S("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),S("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),S("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),S("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),S("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),S("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),S("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),S("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),S("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),S("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),S("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),S("runtime-boundary-http-roles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/http-summaries.ts"}),S("runtime-boundary-source-hashes",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),S("runtime-boundary-direct-extraction",{dependsOn:["content-hash","direct-deps-digest","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),_e("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),_e("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),_e("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),_e("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"}),_e("typescript-hierarchy-targets",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","definitionSet","projectFingerprint","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/typescript/ts-morph-provider.ts"})];function Y(e){let t=new Map;return{kind:e.kind,read(n,r,i){let s=!1,o=0,a;if(at()){let c=xe(n);if(c){let l=`${c}\0${r}\0${i}`;a=t.get(l),a||(a=ct(["evidence-product-file-read-v1",e.kind,c,r,i]),t.set(l,a))}}return lt("evidence-product.file.read",()=>{let c=Zt(n,e.kind,r,i);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return s=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:s,payloadBytes:o}))},has(n,r,i){return en(n,e.kind,r,i)},write(n,r,i,s){tn(n,e.kind,r,i,e.serialize(s))},writeBatch(n,r){nn(n,r.map(i=>({kind:e.kind,relativePath:i.relativePath,contentHash:i.contentHash,payload:e.serialize(i.value)})))}}}function Ec(e){let t=new Map;return{kind:e.kind,read(n,r,i){let s=!1,o=0,a;if(at()){let c=`${i}\0${r}`;a=t.get(c),a||(a=ct(["evidence-product-project-read-v1",e.kind,i,r]),t.set(c,a))}return lt("evidence-product.project.read",()=>{let c=rn(n,e.kind,r,i);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return s=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:s,payloadBytes:o}))},write(n,r,i,s){sn(n,e.kind,r,i,e.serialize(s))}}}function Z(e){let t=zr.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function S(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function _e(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}import{createRequire as Jr}from"module";import{setFlagsFromString as ln}from"v8";import{runInNewContext as Hr}from"vm";var ee;function qr(){if(ee!==void 0)return ee;let e=globalThis.gc;if(typeof e=="function")return ee=e,ee;try{ln("--expose_gc");let t=Hr("gc");ln("--no-expose_gc"),ee=typeof t=="function"?t:null}catch{ee=null}return ee}function Kr(){let e=qr();return e?(e(),!0):!1}var Qr=512*1024*1024,dt=0;function un(e,t=Kr){!Number.isFinite(e)||e<=0||(dt+=e,!(dt<Qr)&&(dt=0,t()))}var I=Jr(import.meta.url),je=null,pn=!1;function Gr(){if(pn)return null;if(je)return je;try{return je=I("tree-sitter"),je}catch{return pn=!0,null}}var dn=new Map,Oe=new Set;function Xr(e){if(Oe.has(e))return null;let t=dn.get(e);if(t)return t;let n;try{switch(e){case"rust":n=I("tree-sitter-rust");break;case"typescript":n=I("tree-sitter-typescript").typescript;break;case"tsx":n=I("tree-sitter-typescript").tsx;break;case"javascript":n=I("tree-sitter-javascript");break;case"python":n=I("tree-sitter-python");break;case"java":n=I("tree-sitter-java");break;case"kotlin":n=I("tree-sitter-kotlin");break;case"scala":n=I("tree-sitter-scala");break;case"ruby":n=I("tree-sitter-ruby");break;case"c":n=I("tree-sitter-c");break;case"cpp":n=I("tree-sitter-cpp");break;case"csharp":n=I("tree-sitter-c-sharp");break;case"php":n=I("tree-sitter-php").php;break;case"vb":{let r=I("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return Oe.add(e),null}}catch{return Oe.add(e),null}return dn.set(e,n),n}var fn=new Map;function Yr(e){let t=fn.get(e);if(t)return t;let n=Xr(e);if(!n)return null;let r=Gr();if(!r)return null;let i=new r;try{i.setLanguage(n)}catch{return Oe.add(e),null}return fn.set(e,i),i}function Zr(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}var ei=24;function Ie(e,t){let n=Yr(e);if(!n)return null;try{let r=Zr(n,t);return un(t.length*ei),r}catch{return null}}import{createRequire as ti}from"module";import{posix as ft}from"path";var Oc=Xt("vue-sfc-units"),ni=ti(import.meta.url),ri;function ii(){return ri??=ni("@vue/compiler-sfc")}function si(...e){return ii().parse(...e)}function oi(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function ai(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function yn(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let i;try{i=si(n,{filename:t})}catch(o){return r.errors.push(gn(o)),r}r.errors.push(...i.errors.map(gn));let{descriptor:s}=i;return s.template&&(r.template=Me(e,t,"template",s.template)),s.script&&r.scripts.push(mn(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push(mn(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(o=>Me(e,t,"style",o)),r.customBlocks=s.customBlocks.map(o=>Me(e,t,"custom",o)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(o=>o?.errors??[])),r}function mn(e,t,n,r){let i=Me(e,t,"script",n);return{...i,kind:"script",setup:r,astLanguage:ai(i.lang)}}function Me(e,t,n,r){let i=li(r.attrs),s=typeof i.lang=="string"?i.lang:null,o=typeof i.src=="string"?i.src:typeof r.src=="string"?r.src:void 0;if(o){let c=ci(t,o);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:o,attrs:i,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${o}`]};let l=_(e,c),u=l?Math.max(0,l.split(`
|
|
5
|
+
`).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:o,attrs:i,lang:s,body:l,startLine:0,endLine:u,errors:l?[]:[`Vue ${n} block source not found: ${c}`]}}let a=Math.max(0,r.loc.start.line-1);return{kind:n,ownerPath:t,sourcePath:t,external:!1,attrs:i,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function ci(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=oi(ft.normalize(ft.join(ft.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function li(e){return{...e}}function gn(e){return e instanceof Error?e.message:String(e)}function Ce(e,t,n){let i=yn(e,t,n).scripts.filter(o=>o.astLanguage&&o.body.length>0),s=i[0]?.astLanguage;return s?{body:i.map(o=>`${`
|
|
6
|
+
`.repeat(o.startLine)}${o.body}`).join(`
|
|
7
|
+
`),startLine:0,language:s}:null}var $e=pe("ast-trees",{clearGroups:["whole-project","source-file"]});function O(e,t){if(q(t))return ui(e,t);let n=H(t);if(!n)return null;let r=_(e,t);return r?$e.get(e,t,r,()=>Ie(n,r)):null}function Be(e,t,n){if(q(t))return $e.get(e,t,n,()=>{let i=Ce(e,t,n);return i?Ie(i.language,`
|
|
8
|
+
`.repeat(i.startLine)+i.body):null});let r=H(t);return r?$e.get(e,t,n,()=>Ie(r,n)):null}function ui(e,t){let n=_(e,t);return n?$e.get(e,t,n,()=>{let r=Ce(e,t,n);if(!r)return null;let i=`
|
|
9
|
+
`.repeat(r.startLine)+r.body;return Ie(r.language,i)}):null}var pi=new Set(["if_statement","conditional_expression","ternary_expression","for_statement","for_in_statement","for_of_statement","while_statement","do_statement","switch_case","case_statement","catch_clause","except_clause","elif_clause","match_arm"]);function hn(e){return pi.has(e.type)?1:e.type==="binary_expression"&&e.parent?.type!=="binary_expression"&&(e.text.includes("&&")||e.text.includes("||"))?di(e.text):0}function di(e){return(e.match(/&&|\|\|/g)??[]).length}function Ee(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var Cn=["function_declaration","generator_function_declaration","method_definition","method_signature","function_signature"],fi=new Set(Cn),mi=[...Cn,"variable_declarator","public_field_definition"],gi=["function_item","function_signature_item"],yi=["function_definition"],hi=[],Sn=new Set(["arrow_function","function_expression","generator_function"]);function En(e){return e==="rust"?gi:e==="python"?yi:e==="typescript"||e==="tsx"||e==="javascript"?mi:hi}function Ve(e,t){let n=xi(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:_n(n.functionNode),params:xn(n.functionNode),paramsEndLine:bn(n.functionNode),isLiteralPassthrough:In(n.functionNode,t),branches:0};if(!Si(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(i=>i.type==="identifier"||i.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:_n(e),params:xn(e),paramsEndLine:bn(e),isLiteralPassthrough:In(e,t),branches:0}:null}function kn(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function xn(e){let t=kn(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(Ee(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let i=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),s=r.childForFieldName("pattern");if(!i&&s&&s.type==="identifier"){n.push({name:s.text,simple:!0});continue}let o=r.namedChildren.find(a=>a.type==="identifier");n.push({name:s?.type==="identifier"?s.text:o?.text??"",simple:!1})}return n}function bn(e){let t=kn(e);return t?t.endPosition.row:e.startPosition.row}function Si(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?fi.has(e):!1}function xi(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let i=Nn(r);return i?{name:n.text,definitionNode:e,functionNode:i}:null}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let i=Nn(r);return i?{name:n.text,definitionNode:e,functionNode:i}:null}return null}function Nn(e){if(Sn.has(e.type))return e;if(e.type!=="call_expression"||(e.childForFieldName("function")??e.namedChild(0))?.type!=="call_expression")return null;let r=((e.childForFieldName("arguments")??e.namedChildren.find(i=>i.type==="arguments"))?.namedChildren??[]).filter(i=>Sn.has(i.type));return r.length===1?r[0]:null}function _n(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return 0;let n=0;for(let r of t.namedChildren)Ee(r)||(n+=1);return n}function In(e,t){let n=e.namedChildren.find(d=>d.type==="block"||d.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(d=>!Ee(d));if(r.length!==1)return!1;let i=r[0],s=null;if(i.type==="return_statement"||i.type==="expression_statement"?s=i.namedChild(0)??null:t==="rust"&&(i.type==="call_expression"||i.type==="macro_invocation")&&(s=i),!s)return!1;let o=t==="python"?"call":"call_expression";if(s.type!==o)return!1;let a=s.childForFieldName("function")??s.namedChild(0);if(a&&(a.type===o||a.type==="call_expression"))return!1;let c=s.namedChildren.find(d=>d.type==="arguments"||d.type==="argument_list");if(!c)return!1;let l=c.namedChildren.filter(d=>!Ee(d)),u=e.namedChildren.find(d=>d.type==="parameters"||d.type==="formal_parameters");if(!u)return!1;let p=[];for(let d of u.namedChildren){if(d.type==="identifier"){p.push(d.text);continue}let f=d.namedChildren.find(m=>m.type==="identifier");f&&p.push(f.text)}if(l.length!==p.length)return!1;for(let d=0;d<p.length;d+=1){let f=l[d];if(f.type!=="identifier"||f.text!==p[d])return!1}return!0}function Gc(e,t){return e.filter(n=>n.startLine<=t&&n.endLine>=t).sort((n,r)=>n.endLine-n.startLine-(r.endLine-r.startLine)||n.startLine-r.startLine)[0]??null}function Tn(e,t){let n=_i(e,t);if(!n)return null;let r=te(n);if(!r)return null;let i=Ei(n);return{kind:bi(e),calleeLeaf:r,calleeQualifier:i?Ni(n):void 0,calleeText:n.text,memberAccess:i,line:e.startPosition.row}}function bi(e){return Ln.has(e.type)?"jsx-render":e.type==="new_expression"?"new":"call"}var Ln=new Set(["jsx_opening_element","jsx_self_closing_element"]);function Ni(e){return(e.childForFieldName("object")??e.childForFieldName("value")??e.namedChild(0)??void 0)?.text||void 0}function _i(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return Pn(e.childForFieldName("function")??e.namedChild(0));if(e.type==="new_expression")return Pn(e.childForFieldName("constructor")??e.namedChild(0));if(Ln.has(e.type))return Ci(e)}return null}var Ii=new Set(["await_expression","parenthesized_expression","non_null_expression","as_expression","satisfies_expression"]);function Pn(e){let t=e;for(;t&&Ii.has(t.type);){let n=t.namedChild(0);if(!n)return t;t=n}return t}function Ci(e){let t=e.childForFieldName("name")??e.namedChild(0);return t&&(t.type==="member_expression"||t.type==="nested_identifier"||(t.type==="identifier"||t.type==="jsx_identifier")&&/^[A-Z]/.test(t.text))?t:null}function Ei(e){switch(e.type){case"field_expression":case"member_expression":case"nested_identifier":case"attribute":return!0;default:return!1}}function te(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"private_property_identifier":case"shorthand_property_identifier":return e.text.replace(/^#/u,"");case"field_expression":case"member_expression":case"nested_identifier":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?te(t):null}case"jsx_identifier":return e.text;case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?te(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?te(t):null}case"super":case"self":case"this":return null;default:return null}}var ki=new Set(["identifier","type_identifier","field_identifier"]),Pi=new Set(["identifier"]),Ti=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),Li=new Set(["rust","python"]),Fi=/\{([^{}]*)\}/g,Di=/\b([A-Za-z_][\w]*)\b/g;function Fn(e,t){return Ri(t).has(e.type)}function Dn(e,t){return Li.has(t)&&e.type==="string_content"}function mt(e){let t=0;for(let r of e.values()){let i=r[r.length-1];i!==void 0&&i>t&&(t=i)}let n=new Array(t+1);for(let r=0;r<=t;r+=1)n[r]=new Set;for(let[r,i]of e)for(let s of i)n[s].add(r);return n}function Ri(e){return e==="rust"?ki:e==="python"?Pi:Ti}function Rn(e,t){let n=e.startPosition.row;for(let r of e.text.matchAll(Fi)){let i=r[1]??"";for(let s of i.matchAll(Di))s[1]&&t(s[1],n)}}var vi=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],wi=/^#!?\[\s*serde\s*\(/,Ai=/^#!?\[\s*schemars\s*\(/,ji=/^#!?\[\s*validate\s*\(/,Oi=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function vn(e,t,n){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let r=e.childForFieldName("function")??e.namedChild(0);if(!r)return;let i=te(r);if(!i||!Oi.has(i))return;let s=e.namedChildren.find(c=>c.type==="arguments");if(!s)return;let o=s.namedChild(0);if(!o||o.type!=="string")return;let a=o.namedChildren.find(c=>c.type==="string_fragment");a&&n.add(a.text)}function wn(e,t){let n=wi.test(e),r=Ai.test(e),i=ji.test(e);if(!(!n&&!r&&!i))for(let s of vi){s.lastIndex=0;let o;for(;(o=s.exec(e))!==null;){let a=o[1],c=a.split("::").pop()??a;c==="is_none"&&/\bOption\b/.test(a)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(a)||c&&t.add(c)}}}function An(e,t){let n=new Map,r=(o,a)=>{if(o===a)return;let c=n.get(o);c||(c=new Set,n.set(o,c)),c.add(a)},i=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),s=(o,a)=>{let c=l=>{i.has(l.type)&&l.text!==a&&r(l.text,a);for(let u of l.children)c(u)};for(let l of o.children)c(l)};if(t==="rust")for(let o of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let a=o.namedChildren.find(l=>l.type==="type_identifier")?.text;if(!a)continue;let c=o.namedChildren.find(l=>l.type==="field_declaration_list"||l.type==="enum_variant_list"||l.type==="ordered_field_declaration_list");c&&s(c,a),o.type==="type_item"&&s(o,a)}else if(t==="python")for(let o of e.rootNode.descendantsOfType("class_definition")){let a=o.namedChildren.find(u=>u.type==="identifier")?.text;if(!a)continue;let c=o.childForFieldName("superclasses");c&&s(c,a);let l=o.namedChildren.find(u=>u.type==="block");if(l)for(let u of l.descendantsOfType("type"))for(let p of u.descendantsOfType("identifier"))p.text!==a&&r(p.text,a)}else for(let o of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let a=o.namedChildren.find(c=>c.type==="type_identifier")?.text;a&&s(o,a)}return n}var Mi=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),gt=new Set(["catch","comment","def","defprotocol","defrecord","deftype","defmethod","defmacro","defmacro-","defn","defn-","do","doseq","dotimes","fn","for","if","let","loop","ns","quote","recur","throw","try","extend-protocol","extend-type","when","when-let","when-not"]);function jn(e){let t=[],n=[],r=[],i=new Map,s=[],o=0,a=0,c=(l,u)=>{let p=i.get(l);if(!p){i.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)};for(;a<e.length;){let l=e[a];if(l===`
|
|
10
|
+
`){o+=1,a+=1;continue}if(/\s|,/.test(l)){a+=1;continue}if(l===";"){a=Ue(e,a);continue}if(l==='"'){let m=Pe(e,a,o);o=m.line,a=m.index;continue}if(l==="("||l==="["||l==="{"){s.push({kind:l,startLine:o,endLine:o,headTokens:[],tokens:[],children:[]}),a+=1;continue}if(l===")"||l==="]"||l==="}"){let m=s.pop();m&&(m.endLine=o,$i(m,{callables:t,callSites:n,clojureMembers:r,recordIdentifier:c}),s[s.length-1]?.children.push(m)),a+=1;continue}if(yt(l)){a+=1;continue}let u=o,p=a;for(;a<e.length&&!ht(e[a]);)a+=1;let d=e.slice(p,a);if(!d)continue;let f={text:d,line:u};Bi(s[s.length-1],f),c(L(d),u)}return{language:"clojure",callables:t,callSites:n,clojureMembers:r,typeContainerMap:new Map,identifierLineMap:i,identifiersByLine:Hi(i),fileIdentifiers:new Set(i.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function $i(e,t){if(e.kind!=="("||e.headTokens.length===0)return;let n=e.headTokens[0],r=L(n.text),i=Mi.get(n.text);if(i){let o=e.headTokens[1];if(o){let a=L(o.text);t.recordIdentifier(a,o.line),t.callables.push({name:a,startLine:e.startLine,endLine:e.endLine,paramCount:0,params:[],paramsEndLine:o.line,isLiteralPassthrough:!1,clojureKind:i})}}if(Vi(e,t),!r||gt.has(n.text)||gt.has(r)||r.startsWith(":"))return;let s=zi(n.text);t.callSites.push({calleeLeaf:s.leaf,calleeQualifier:s.qualifier,calleeText:s.text,memberAccess:!1,line:n.line})}function Bi(e,t){e&&(e.headTokens.length<2&&e.headTokens.push(t),e.tokens.length<200&&e.tokens.push(t))}function Vi(e,t){let n=L(e.tokens[0]?.text??"");if(n==="defprotocol"){let r=L(e.tokens[1]?.text??"");if(!r)return;for(let i of We(e))ke(t,r,"protocol",i,"protocol-method");return}if(n==="defrecord"||n==="deftype"){let r=L(e.tokens[1]?.text??"");if(!r)return;let i=n==="defrecord"?"record":"type",s=n==="defrecord"?"record-method":"type-method";for(let o of We(e))ke(t,r,i,o,s);return}if(n==="extend-type"){let r=L(e.tokens[1]?.text??"");if(!r)return;for(let i of We(e))ke(t,r,"extension",i,"extension-method");return}if(n==="extend-protocol"){let r=L(e.tokens[1]?.text??"");for(let i of We(e)){r&&ke(t,r,"extension",i,"extension-method");let s=Ui(e,i.startLine);s&&s!==r&&ke(t,s,"extension",i,"extension-method")}}}function We(e){return e.children.filter(Wi)}function Wi(e){if(e.kind!=="(")return!1;let t=L(e.tokens[0]?.text??"");return!!(t&&!gt.has(t)&&!t.startsWith(":"))}function ke(e,t,n,r,i){let s=r.tokens[0],o=L(s?.text??"");!s||!o||(e.recordIdentifier(o,s.line),e.clojureMembers.push({ownerName:t,ownerKind:n,memberName:o,memberKind:i,startLine:r.startLine,endLine:r.endLine}))}function Ui(e,t){let n=null;for(let r=2;r<e.tokens.length;r+=1){let i=e.tokens[r];if(i.line>t)break;let s=L(i.text);s&&!s.startsWith(":")&&(n=s)}return n}function L(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function zi(e){let t=e.replace(/^#?['`~@]+/,""),n=t.lastIndexOf("/"),r=L(t);if(n<=0)return{leaf:r,text:t};let i=t.slice(0,n);return{leaf:r,qualifier:i,text:t}}function Ue(e,t){let n=t;for(;n<e.length&&e[n]!==`
|
|
11
|
+
`;)n+=1;return n}function Pe(e,t,n){let r=t+1,i=n;for(;r<e.length;){let s=e[r];if(s==="\\"){r+=2;continue}if(s===`
|
|
12
|
+
`&&(i+=1),r+=1,s==='"')break}return{index:r,line:i}}function yt(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function ht(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function Hi(e){let t=[];for(let[n,r]of e)for(let i of r)t[i]??=new Set,t[i].add(n);return t}var On=9,Ki=pe("source-facts",{clearGroups:["whole-project","source-file"]}),St=Y({kind:"source-facts",invalidation:Z("source-facts"),serialize:Gi,deserialize:Xi});function fe(e,t){return xt(e,t).facts}function xt(e,t){let n=_(e,t);if(!n)return{facts:null};let r=Qi(e,t,n);return r?Ki.get(e,t,n,()=>Ji(e,t,r,n)):{facts:null}}function Qi(e,t,n){return q(t)?Ce(e,t,n)?.language??null:H(t)}function Ji(e,t,n,r){let i=U(e,t,r),s=St.read(e,t,i);if(s&&s.language===n)return{facts:s};if(n==="clojure"){let c=jn(r);return St.write(e,t,i,c),{facts:c}}let o=O(e,t);if(!o)return{facts:null,unavailable:{language:n,reason:"parser-unavailable"}};let a=Yi(o,n);return St.write(e,t,i,a),{facts:a}}function Gi(e){let t={version:On,language:e.language,callables:e.callables,callSites:e.callSites,clojureMembers:e.clojureMembers,typeContainerMap:[...e.typeContainerMap.entries()].map(([n,r])=>[n,[...r]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function Xi(e){try{let t=JSON.parse(e);if(t.version!==On||t.language==="clojure"&&(t.clojureMembers===void 0||t.callSites.some(r=>r.calleeText===void 0)))return null;let n=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,clojureMembers:t.clojureMembers??[],typeContainerMap:new Map(t.typeContainerMap.map(([r,i])=>[r,new Set(i)])),identifierLineMap:n,identifiersByLine:mt(n),fileIdentifiers:new Set(n.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function Yi(e,t){let n=[],r=[],i=new Set,s=new Set,o=new Map,a=(u,p)=>{let d=o.get(u);if(!d){o.set(u,[p]);return}d[d.length-1]!==p&&d.push(p)},c=[],l=u=>{let p=Ve(u,t);p&&(p.branches=0,n.push(p),c.push(p));let d=hn(u);if(d>0)for(let m of c)m.branches=(m.branches??0)+d;let f=Tn(u,t);f&&r.push(f),vn(u,t,s),t==="rust"&&(u.type==="attribute_item"||u.type==="inner_attribute_item")&&wn(u.text,i),Fn(u,t)&&a(u.text,u.startPosition.row),Dn(u,t)&&Rn(u,a);for(let m of u.children)l(m);p&&c.pop()};return l(e.rootNode),{language:t,callables:n,callSites:r,clojureMembers:[],typeContainerMap:An(e,t),identifierLineMap:o,identifiersByLine:mt(o),fileIdentifiers:new Set(o.keys()),rustAttrReferencedNames:i,crossLanguageDispatchNames:s}}var Mn=new WeakMap,$n=new Set(["call_expression","call","decorator","pair","string","string_literal","template_string","variable_declarator"]);function Zi(e,t){let n=Array.isArray(t)?t:[t];if(!n.every(s=>$n.has(s)))return e.descendantsOfType(t);let r=es(e);return n.length===1?r.get(n[0])??[]:n.flatMap(s=>r.get(s)??[]).sort((s,o)=>s.startIndex-o.startIndex)}function bt(e,t){let n=e.walk(),r=0,i=!1;for(;!i;){if(t(n),n.gotoFirstChild()){r+=1;continue}for(;;){if(r===0){i=!0;break}if(n.gotoNextSibling())break;n.gotoParent(),r-=1}}}function es(e){let t=Mn.get(e);if(t)return t;let n=new Map;return bt(e,r=>{let i=r.nodeType;if(!$n.has(i))return;let s=n.get(i);s?s.push(r.currentNode):n.set(i,[r.currentNode])}),Mn.set(e,n),n}function Vn(e,t){t(e);for(let n of e.namedChildren)Vn(n,t)}var ts=/(?:function|method|lambda)/u,Bn=new WeakMap;function ns(e){let t=Bn.get(e);if(t)return t;let n=[];return bt(e,r=>{if(!r.nodeIsNamed)return;let i=r.nodeType;(i==="arrow_function"||ts.test(i))&&n.push(r.currentNode)}),Bn.set(e,n),n}function rs(e,t,n){let r=null;for(let i of ns(e))i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i);return r}function Wn(e,t,n){if(e.startPosition.row>t||e.endPosition.row<n)return null;for(let r of e.namedChildren){let i=Wn(r,t,n);if(i)return i}return e}function is(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function Nt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?Nt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function ss(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(Nt)??[]}var Un=new Set(["rust","typescript","tsx","javascript","python","clojure"]),os=new Set(["rust","typescript","tsx","javascript","python"]);function _t(e,t){let n=fe(e,t);return!n||!Un.has(n.language)?null:n.callables.map(r=>({name:r.name,startLine:r.startLine,endLine:r.endLine}))}function as(e,t){if(!os.has(t))return null;let n=[];for(let r of e.descendantsOfType([...En(t)])){let i=Ve(r,t);i&&n.push({name:i.name,startLine:i.startLine,endLine:i.endLine})}return n}function cs(e,t){let n=fe(e,t);return!n||!Un.has(n.language)?null:n.callSites}function zn(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}import{createRequire as xs}from"module";import{existsSync as ie}from"fs";import{basename as qn,dirname as k,extname as M,join as F,relative as ne,resolve as x,sep as bs}from"path";import{existsSync as Ct,readdirSync as ls,statSync as us}from"fs";import{join as me,relative as ps}from"path";function Hn(e){let t=ds(e)??ys(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let i of t)for(let s of hs(e,i)){if(r.has(s))continue;r.add(s);let o=Ss(e,s);o&&n.push(o)}return n}function ds(e){let t=me(e,"pnpm-workspace.yaml");if(!Ct(t))return null;try{return fs(De(t,"pnpm workspace manifest"))}catch{return null}}function fs(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let i=ms(r);if(!n){/^packages\s*:\s*$/.test(i.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(i);if(s){let o=gs(s[1].trim());o&&t.push(o);continue}if(i.trim()!=="")break}return t}function ms(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function gs(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function ys(e){let t=me(e,"package.json");if(!Ct(t))return null;try{let n=JSON.parse(De(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function hs(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let o=me(e,t);return It(o)?[o]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),i=t.slice(n+1).replace(/^\//,""),s=me(e,r||".");return It(s)?ls(s).map(o=>me(s,o,i)).filter(It):[]}function It(e){try{return us(e).isDirectory()}catch{return!1}}function Ss(e,t){let n=me(t,"package.json");if(!Ct(n))return null;try{let r=JSON.parse(De(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:ps(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var Ns=ue("indexed-paths",{clearGroups:[]}),_s=ue("indexed-path-digest",{clearGroups:[]}),Is=N("tsconfig-alias-config",{clearGroups:["whole-project"]}),Cs=N("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),Es=xs(import.meta.url),Te;function ks(){if(Te!==void 0)return Te;try{Te=Es("typescript")}catch{Te=null}return Te}var Ps=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],Ts=ue("workspace-packages",{clearGroups:["whole-project"]}),re=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],ze=[".py",".pyi"],P=[".java",".scala",".kt",".kts"],He=[".rs"],qe=[".rb"],Ke=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],K=[".cs",".vb"],Qe=[".dart"],se=[".php"],ge=[".clj",".cljs",".cljc"],Ls=new Set(re),Et=new Set(ze),Kn=new Set(P),kt=new Set(He),Pt=new Set(qe),Qn=new Set(Ke),Jn=new Set(K),Tt=new Set(Qe),Gn=new Set(se),Xn=new Set(ge),Fs=[{extensions:re,lookup:Ls},{extensions:ze,lookup:Et},{extensions:P,lookup:Kn},{extensions:He,lookup:kt},{extensions:qe,lookup:Pt},{extensions:Ke,lookup:Qn},{extensions:K,lookup:Jn},{extensions:Qe,lookup:Tt},{extensions:se,lookup:Gn},{extensions:ge,lookup:Xn}];function $(e,t){return t.has(M(e).toLowerCase())}function Ds(e){return $(e,Et)}function Rs(e){return $(e,Kn)}function vs(e){return $(e,kt)}function ws(e){return $(e,Pt)}function As(e){return $(e,Qn)}function js(e){return $(e,Jn)}function Yn(e){return M(e).toLowerCase()===".vb"}function Os(e){return $(e,Tt)}function Ms(e){return $(e,Gn)}function $s(e){return $(e,Xn)}function Lt(e){let t=M(e).toLowerCase();for(let n of Fs)if(n.lookup.has(t))return n.extensions;return re}function Bs(e){return Rs(e)||js(e)||Ms(e)}function Q(e,t,n){return Ds(t)?ye(e,t,n):vs(t)?B(e,t,n):ws(t)?Je(e,t,n):As(t)?Ge(e,t,n):Bs(t)?y(e,n.replace(/\\/g,"."),Lt(t)):Os(t)?Xe(e,t,n):$s(t)?Ft(e,n):Vs(e,t,n)}function Vs(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return Ws(e,t,n)??zs(e,n);let r=k(F(e.config.projectRoot,t)),i=x(r,n),s=V(e);for(let o of Rt(i)){let a=b(ne(e.config.projectRoot,o));if(s.has(a)||ie(o))return a}return b(ne(e.config.projectRoot,i))}function Ws(e,t,n){let r=Gs(e,t);if(!r)return null;let i=V(e);for(let s of Us(r,n)){let o=x(r.baseUrl,s);for(let a of Rt(o)){let c=b(ne(e.config.projectRoot,a));if(i.has(c)||ie(a))return c}}return null}function Us(e,t){let n=[];for(let[r,i]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...i);continue}let o=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(o)||!t.endsWith(a)||t.length<o.length+a.length)continue;let c=t.slice(o.length,t.length-a.length);for(let l of i)n.push(l.includes("*")?l.replace("*",c):l)}return n}function zs(e,t){let n=qs(Hs(e),t);if(!n)return null;let r=V(e);for(let i of Ks(n)){let s=x(e.config.projectRoot,n.pkg.relativeDir,i);for(let o of Rt(s)){let a=b(ne(e.config.projectRoot,o));if(r.has(a)||ie(o))return a}}return null}function Hs(e){return Ts.get(e,()=>Hn(e.config.projectRoot))}function qs(e,t){let n=null;for(let r of e){let i=null;t===r.name?i="":t.startsWith(`${r.name}/`)&&(i=t.slice(r.name.length+1)),i!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:i})}return n}function Ks(e){let t=[],n=Qs(e.pkg.exports,e.subpath);if(n){let r=Js(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function Qs(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return Zn(e[n])}function Zn(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return null;let t=e;for(let n of["types","import","default","require","node"]){let r=Zn(t[n]);if(r)return r}return null}function Js(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function Gs(e,t){let n=b(k(t));return Cs.get(e,n,()=>Xs(e,n))}function Xs(e,t){let n=ks();if(!n)return null;let r=x(e.config.projectRoot),i=x(r,t);for(;i===r||i.startsWith(r+bs);){for(let o of Ps){let a=F(i,o);if(!ie(a))continue;let c=Is.get(e,a,()=>Ys(n,a));if(c)return c}let s=k(i);if(s===i)break;i=s}return null}function Ys(e,t){try{let n=e.readConfigFile(t,e.sys.readFile);if(n.error||!n.config)return null;let r=e.parseJsonConfigFileContent(n.config,e.sys,k(t)),i=r.options.paths;return!i||Object.keys(i).length===0?null:{baseUrl:r.options.baseUrl?x(k(t),r.options.baseUrl):k(t),paths:i}}catch{return null}}function ye(e,t,n){let r=V(e),i;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let o=s[1].length,a=s[2].replace(/^\./,""),c=k(F(e.config.projectRoot,t));for(let l=1;l<o;l++)c=k(c);i=a?x(c,a.replace(/\./g,"/")):c}else i=x(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of Zs(i)){let o=b(ne(e.config.projectRoot,s));if(r.has(o)||ie(s))return o}return null}function B(e,t,n){if(!n)return null;let r=n.replace(/\s+as\s+.+$/,"").trim();if(!r.startsWith("crate::")&&!r.startsWith("self::")&&!r.startsWith("super::"))return null;let i=k(F(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=x(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=x(i,r.slice(6).replace(/::/g,"/")):s=x(k(i),r.slice(7).replace(/::/g,"/")),Dt(e,eo(s))}function Je(e,t,n){let r=k(F(e.config.projectRoot,t)),i=x(r,n);return Dt(e,to(i))}function Ge(e,t,n){let r=k(F(e.config.projectRoot,t)),i=[x(r,n),x(e.config.projectRoot,n),x(e.config.projectRoot,"include",n),x(e.config.projectRoot,"src",n)];return Dt(e,i)}function y(e,t,n){let r=V(e),i=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=i.replace(/\./g,"/"),o=i.split(".").pop()??i;for(let c of n){let l=`${s}${c}`,u=[...r].find(p=>p.endsWith(l));if(u)return u}for(let c of n){let l=[...r].find(u=>qn(u)===`${o}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(M(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${o}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function Xe(e,t,n){let r=V(e);if(n.startsWith("package:")){let o=n.slice(8),a=o.indexOf("/");if(a<0)return null;let c=o.slice(a+1),l=b(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let i=k(F(e.config.projectRoot,t)),s=x(i,n);for(let o of no(s)){let a=b(ne(e.config.projectRoot,o));if(r.has(a)||ie(o))return a}return null}function Ft(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=V(e);for(let i of ge){let s=`${n}${i}`,o=[...r].find(a=>a.endsWith(s));if(o)return o}for(let i of ge){let s=[...r].find(o=>qn(o)===`${n.split("/").pop()}${i}`);if(s)return s}return null}function Zs(e){let t=M(e);return Et.has(t)?[e]:[`${e}.py`,`${e}.pyi`,F(e,"__init__.py"),F(e,"__init__.pyi")]}function Dt(e,t){let n=V(e);for(let r of t){let i=b(ne(e.config.projectRoot,r));if(n.has(i)||ie(r))return i}return null}function eo(e){let t=M(e);return kt.has(t)?[e]:[`${e}.rs`,F(e,"mod.rs")]}function to(e){let t=M(e);return Pt.has(t)?[e]:[`${e}.rb`,F(e,"index.rb")]}function no(e){let t=M(e);return Tt.has(t)?[e]:[`${e}.dart`,e]}function Rt(e){let t=M(e),n=new Set;if(t){n.add(e);for(let r of re)n.add(e.slice(0,-t.length)+r)}else for(let r of re)n.add(`${e}${r}`),n.add(F(e,`index${r}`));return[...n]}function V(e){return Ns.get(e,()=>new Set(be(e,{includeIgnored:!1}).map(b)))}function vt(e){return _s.get(e,()=>Yt([...V(e)].sort().join(`
|
|
13
|
+
`)))}function ro(e,t,n={}){let r=fe(e,t);if(!r)return[];let i=[];if(n.includeCrossLanguageDispatchNames)for(let s of r.crossLanguageDispatchNames)i.push({name:s,kind:"cross-language-dispatch",occurrences:1});if(n.includeRustAttributeNames&&r.language==="rust")for(let s of r.rustAttrReferencedNames)i.push({name:s,kind:"rust-attribute",occurrences:1});return i}import{basename as er}from"path";function A(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function io(e){return e.replace(/'''[\s\S]*?'''/g,J).replace(/"""[\s\S]*?"""/g,J).replace(/#.*$/gm,J).replace(/\/\/.*$/gm,J).replace(/\/\*[\s\S]*?\*\//g,J).replace(/`(?:\\[\s\S]|[^`])*`/g,J).replace(/'(?:\\.|[^'\\\r\n])*'/g,J).replace(/"(?:\\.|[^"\\\r\n])*"/g,J)}function J(e){return e.replace(/[^\r\n]/g," ")}var su=pe("stripped-lines",{clearGroups:["whole-project","source-file"]});Gt({name:"stripped-source-singleton",groups:["whole-project","source-file"],clearAll:()=>{Ye=null,Le=""},clearFile:()=>{Ye=null,Le=""}});var Ye=null,Le="";function so(e){return Ye===e||(Ye=e,Le=io(e)),Le}function G(e,t,n){let r=so(e);return`${r.slice(0,t)}${" ".repeat(n-t)}${r.slice(n)}`}function C(e,t){return new RegExp(`\\b${A(t)}\\b`,"m").test(e)}function he(e,t){let n=new Set,r=new RegExp(`\\b${A(t)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let i of e.matchAll(r)){let s=i[1];s&&n.add(s)}return[...n]}function wt(e){let t=0;for(let n of e)n==="("&&(t+=1),n===")"&&(t-=1);return t}var oo=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function E(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let s=e[i];(s==="{"||s==="["||s==="(")&&n++,(s==="}"||s==="]"||s===")")&&n--,s===","&&n===0&&(t.push(e.slice(r,i)),r=i+1)}return t.push(e.slice(r)),t}function T(e,t){for(let n of e.namedChildren)if(n.type===t)return n;return null}function h(e,t){let n=new Set,r=(i,s)=>{let o=s||t.has(i.type);!o&&oo.has(i.type)&&n.add(i.text);for(let a of i.children)r(a,o)};return r(e.rootNode,!1),n}function w(e,t,n,r,i,s,o){return{importedName:i,localName:s,sourcePath:o??y(e,r,Lt(t)),kind:"named",used:C(n,s),usedMembers:[]}}function g(e,t,n,r,i="named",s={}){return{importedName:e,localName:t,sourcePath:n,kind:i,used:r.has(t),usedMembers:[],isTypeOnly:s.isTypeOnly}}function W(e,t,n,r,i="named",s=[],o={}){return{importedName:e,localName:t,sourcePath:n,kind:i,used:r,usedMembers:s,isTypeOnly:o.isTypeOnly}}function oe(e,t){return{importedName:e,localName:null,sourcePath:t,kind:"side-effect",used:!0,usedMembers:[]}}function ae(e,t,n={}){return{importedName:e,localName:n.localName??null,sourcePath:t,kind:"namespace",used:n.used??!0,usedMembers:n.usedMembers??[],isTypeOnly:n.isTypeOnly}}function D(e,t,n){let r=[];for(let i of e.matchAll(t)){let s=i[0];if(!s||typeof i.index!="number")continue;let o=G(e,i.index,i.index+s.length);for(let a of n(i,o))r.push(a)}return r}function R(e,t,n,r,i){let s=Be(e,t,i);if(s){let o=n(s);if(o)return o}return r()}function Ze(e,t,n,r,i){let s=Be(e,t,i),o=H(t),a=o?n[o]:void 0;return s&&a?a(s):r()}function tr(e,t,n){return R(e,t,r=>co(e,t,r),()=>ao(e,t,n),n)}function ao(e,t,n){return D(n,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(r,i)=>{let s=r[1]?.trim();if(!s)return[];let o=er(s).replace(/\.[^.]+$/,"");return[W(s,o,Ge(e,t,s),C(i,o))]})}function co(e,t,n){let r=h(n,new Set(["preproc_include"])),i=[];for(let s of n.rootNode.descendantsOfType("preproc_include")){let o=null;for(let c of s.namedChildren){if(c.type==="system_lib_string"){o=c.text.replace(/^<|>$/g,"");break}if(c.type==="string_literal"){o=c.namedChildren.find(u=>u.type==="string_content")?.text??c.text.replace(/^"|"$/g,"");break}}if(!o)continue;let a=er(o).replace(/\.[^.]+$/,"");i.push(g(o,a,Ge(e,t,o),r))}return i}var lo=new Set([":require",":require-macros",":use"]),Ot=String.raw`A-Za-z0-9_$*+!?.<>=-`;function rr(e,t,n){let r=No(n);if(!r)return[];let i=bo(n,r.start,r.end),s=[];for(let o of r.children.slice(2)){if(o.type!=="list"||o.children.length===0)continue;let a=v(o.children[0]);if(a){if(lo.has(a)){for(let c of fo(o.children.slice(1)))s.push(...po(e,c,i));continue}if(a===":import")for(let c of go(o.children.slice(1)))s.push(c)}}return s}function uo(e){return e.type==="list"&&v(e.children[0])==="ns"}function po(e,t,n){let r=Ft(e,t.namespace),i=t.alias??t.namespace,s=ho(n,i),o=[{importedName:t.namespace,localName:i,sourcePath:r,kind:"namespace",used:t.refers.length>0||t.referAll||s.length>0||So(n,t.namespace),usedMembers:s}];t.referAll&&o.push({importedName:"*",localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]});for(let a of t.refers)o.push({importedName:a,localName:a,sourcePath:r,kind:"named",used:xo(n,a),usedMembers:[]});return o}function fo(e){return e.flatMap(t=>et(t,null))}function et(e,t){if(e.type==="atom")return e.text.startsWith(":")?[]:[{namespace:jt(t,e.text),alias:null,refers:[],referAll:!1}];if(e.type==="vector")return e.children.length>0&&v(e.children[0])===null?e.children.flatMap(n=>et(n,t)):mo(e,t);if(e.type==="list"&&e.children.length>0){let n=v(e.children[0]);return n?!n||n.startsWith(":")?[]:e.children.slice(1).flatMap(r=>et(r,jt(t,n))):e.children.flatMap(r=>et(r,t))}return[]}function mo(e,t){let n=v(e.children[0]);if(!n||n.startsWith(":"))return[];let r={namespace:jt(t,n),alias:null,refers:[],referAll:!1};for(let i=1;i<e.children.length;i+=1){let s=v(e.children[i]);if(!s?.startsWith(":"))continue;let o=e.children[i+1];if((s===":as"||s===":as-alias")&&o){r.alias=v(o),i+=1;continue}s===":refer"&&o&&(v(o)===":all"?r.referAll=!0:(o.type==="vector"||o.type==="list")&&r.refers.push(...o.children.map(v).filter(yo)),i+=1)}return[r]}function go(e){let t=[];for(let n of e){if(n.type==="atom"){let i=n.text.split(".").pop()??n.text;t.push(W(i,i,null,!0));continue}if(n.type!=="vector")continue;let r=v(n.children[0]);if(r)for(let i of n.children.slice(1)){let s=v(i);s&&t.push(W(`${r}.${s}`,s,null,!0))}}return t}function jt(e,t){return e?`${e}.${t}`:t}function v(e){return e?.type==="atom"?e.text:null}function yo(e){return!!(e&&!e.startsWith(":"))}function ho(e,t){let n=new Set,r=new RegExp(`${Mt()}${A(t)}\\s*/\\s*([${Ot}]+)`,"g");for(let i of e.matchAll(r)){let s=i[1];s&&n.add(s)}return[...n]}function So(e,t){return new RegExp(`${Mt()}${A(t)}\\s*/`,"m").test(e)}function xo(e,t){return new RegExp(`${Mt()}${A(t)}(?![${Ot}])`,"m").test(e)}function Mt(){return`(?<![${Ot}])`}function bo(e,t,n){let r="",i=0;for(;i<e.length;){if(i>=t&&i<n){r+=e[i]===`
|
|
14
|
+
`?`
|
|
15
|
+
`:" ",i+=1;continue}let s=e[i];if(s===";"){let o=Ue(e,i);r+=nr(e.slice(i,o)),i=o;continue}if(s==='"'){let o=Pe(e,i,0).index;r+=nr(e.slice(i,o)),i=o;continue}r+=s,i+=1}return r}function No(e){let t=0;for(;t<e.length&&(t=$t(e,t),!(t>=e.length));){let n=tt(e,t);if(!n){t+=1;continue}if(uo(n.form))return n.form;t=n.index}return null}function tt(e,t){let n=$t(e,t);if(e.startsWith("#?@",n)||e.startsWith("#?",n))return _o(e,n);if(e.startsWith("#_",n)){let i=tt(e,n+2);return i?{form:{type:"atom",text:"",start:n,end:i.index},index:i.index}:null}for(;yt(e[n]);)n+=1;let r=e[n];return r?r==="("?At(e,n,"list",")"):r==="["?At(e,n,"vector","]"):r==="{"?At(e,n,"map","}"):r==='"'?{form:{type:"atom",text:"",start:n,end:Pe(e,n,0).index},index:Pe(e,n,0).index}:Co(e,n):null}function _o(e,t){let n=e.startsWith("#?@",t)?3:2,r=tt(e,t+n);return r?{form:{type:"list",children:r.form.type==="list"||r.form.type==="vector"||r.form.type==="map"?Io(r.form.children):[],start:t,end:r.index},index:r.index}:null}function Io(e){let t=[];for(let n=0;n<e.length;n+=2){let r=v(e[n]),i=e[n+1];r?.startsWith(":")&&i&&t.push(i)}return t}function At(e,t,n,r){let i=[],s=t+1;for(;s<e.length;){if(s=$t(e,s),e[s]===r)return{form:{type:n,children:i,start:t,end:s+1},index:s+1};let o=tt(e,s);if(!o){s+=1;continue}o.form.type==="atom"&&o.form.text===""||i.push(o.form),s=o.index}return{form:{type:n,children:i,start:t,end:e.length},index:e.length}}function Co(e,t){let n=t;for(;n<e.length&&!ht(e[n]);)n+=1;return{form:{type:"atom",text:e.slice(t,n),start:t,end:n},index:n}}function $t(e,t){let n=t;for(;n<e.length;){let r=e[n];if(/\s|,/.test(r)){n+=1;continue}if(r===";"){n=Ue(e,n);continue}break}return n}function nr(e){return e.replace(/[^\r\n]/g," ")}function ir(e,t,n){let r=[];for(let i of n.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let s=i[1]?.trim(),o=i[2]?.trim()??null,a=i[0];if(!s||!a||typeof i.index!="number")continue;let c=G(n,i.index,i.index+a.length);r.push({importedName:s,localName:o,sourcePath:Xe(e,t,s),kind:o?"namespace":"side-effect",used:o?C(c,o):!0,usedMembers:o?he(c,o):[]})}return r}function sr(e,t,n){let r=[];for(let i of n.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let s=i[1]?.trim();s&&r.push({specifier:s,sourcePath:Xe(e,t,s)})}return r}function or(e,t,n){return Ze(e,t,{csharp:r=>ko(e,t,r),vb:r=>Eo(e,t,r)},()=>{let r=Yn(t)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return D(n,r,(i,s)=>{let o=i[1]?.trim();if(!o)return[];let[a,c]=o.split(/\s*=\s*/),l=!!c,u=(l?c:a)?.trim()??o,p=u.split(".").pop()??u,d=l?a?.trim()??p:p;return[w(e,t,s,u,p,d,y(e,u,K))]})},n)}function Eo(e,t,n){let r=h(n,new Set(["imports_statement"])),i=[];for(let s of n.rootNode.descendantsOfType("imports_statement")){let o=s.namedChildren.filter(d=>d.type==="namespace_name");if(o.length===0)continue;let a=o[o.length-1],c=o.length>1?o[0]:null,l=a.text,u=l.split(".").pop()??l,p=c?.text??u;i.push(g(u,p,y(e,l,K),r,c?"namespace":"named"))}return i}function ko(e,t,n){let r=h(n,new Set(["using_directive"])),i=[];for(let s of n.rootNode.descendantsOfType("using_directive")){let o=s.namedChildren;if(o.length===0)continue;let a=null,c;o.length>=2&&o[0].type==="identifier"&&(o[1].type==="qualified_name"||o[1].type==="identifier")?(a=o[0],c=o[1]):c=o[o.length-1];let l=c.text,u=l.split(".").pop()??l,p=a?.text??u;i.push(g(u,p,y(e,l,K),r,a?"namespace":"named"))}return i}var Po=N("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function ar(e,t){return Po.get(e,t,()=>{let n=new Set,r=_(e,t);if(!r)return n;let s=r.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,o=>o.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,o=>o.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,o=>o.replace(/[^\r\n]/g," "));for(let o of s.matchAll(/[A-Za-z_$][\w$]*/g))n.add(o[0]);return n})}function Bt(e,t,n){return R(e,t,r=>Lo(e,t,r),()=>To(e,t,n),n)}function To(e,t,n){return Bo(n).flatMap(r=>Vo(e,t,r.clause,r.specifier,r.start,r.end,n))}function Lo(e,t,n){let r=Fo(e,t,n),i=[];for(let s of n.rootNode.descendantsOfType("import_statement"))i.push(...Do(e,t,n,s,r));return i}function Fo(e,t,n){let r=h(n,new Set(["import_statement"]));if(q(t))for(let i of ar(e,t))r.add(i);return r}function Do(e,t,n,r,i){let s=jo(r);if(!s)return[];let o=Q(e,t,s),a=T(r,"import_clause");return a?Ro(n,a,o,i,Oo(r.text)):[oe("*",o)]}function Ro(e,t,n,r,i){let s=[];for(let o of t.namedChildren)if(o.type==="identifier")s.push(vo(o.text,n,r,i));else if(o.type==="namespace_import"){let a=wo(e,o,n,r,i);a&&s.push(a)}else o.type==="named_imports"&&s.push(...Ao(o,n,r,i));return s}function vo(e,t,n,r){return g("default",e,t,n,"default",{isTypeOnly:r})}function wo(e,t,n,r,i){let o=T(t,"identifier")?.text??"";if(!o)return null;let a=$o(e,o);return ae("*",n,{localName:o,usedMembers:a,isTypeOnly:i,used:a.length>0||r.has(o)})}function Ao(e,t,n,r){let i=[];for(let s of e.namedChildren){if(s.type!=="import_specifier")continue;let o=s.namedChild(0),a=s.namedChild(1);if(!o)continue;let c=o.text,l=a?.text??c;i.push(g(c,l,t,n,"named",{isTypeOnly:r||Mo(s.text)}))}return i}function jo(e){let t=T(e,"string");if(!t)return null;let n=T(t,"string_fragment");return n?n.text:null}function Oo(e){return/^\s*import\s+type\b/.test(e)}function Mo(e){return/^\s*type\b/.test(e.trim())}function $o(e,t){let n=new Set;for(let r of e.rootNode.descendantsOfType("member_expression")){let i=r.namedChild(0),s=r.namedChild(1);!i||!s||i.type!=="identifier"||i.text!==t||(s.type==="property_identifier"||s.type==="identifier")&&n.add(s.text)}return[...n]}function Bo(e){let t=[],n=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of e.matchAll(n)){let s=i[0],o=i[1],a=i[2];!s||!a||typeof i.index!="number"||t.push({clause:o,specifier:a,start:i.index,end:i.index+s.length})}let r=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of e.matchAll(r)){let s=i[0],o=i[1];!s||!o||typeof i.index!="number"||t.push({clause:null,specifier:o,start:i.index,end:i.index+s.length})}return t.sort((i,s)=>i.start-s.start)}function Vo(e,t,n,r,i,s,o){let a=Q(e,t,r),c=G(o,i,s);return n?Wo(n).map(u=>({...u,sourcePath:a})).map(u=>{if(u.kind==="namespace"){let p=he(c,u.localName);return ae(u.importedName,u.sourcePath,{localName:u.localName,usedMembers:p,used:p.length>0||C(c,u.localName),isTypeOnly:u.isTypeOnly})}return u.kind==="side-effect"?oe(u.importedName,u.sourcePath):W(u.importedName,u.localName??"",u.sourcePath,u.localName?C(c,u.localName):!1,u.kind,[],{isTypeOnly:u.isTypeOnly})}):[oe("*",a)]}function Wo(e){let t=e.trim(),n=/^type\b/.test(t),r=t.replace(/^type\s+/,""),[i,s]=Uo(r),o=[];return i&&o.push(...cr(i,n)),s&&o.push(...cr(s,n)),o}function cr(e,t){let n=e.trim();if(!n)return[];if(n.startsWith("{")){let r=n.slice(1,-1).trim();return r?E(r).map(i=>{let s=i.trim(),o=t||/^type\b/.test(s),a=s.replace(/^type\s+/,""),[c,l]=a.split(/\s+as\s+/);return{importedName:c.trim(),localName:(l??c).trim(),kind:"named",isTypeOnly:o}}):[]}return n.startsWith("* as ")?[{importedName:"*",localName:n.slice(5).trim(),kind:"namespace",isTypeOnly:t}]:[{importedName:"default",localName:n,kind:"default",isTypeOnly:t}]}function Uo(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==="{"&&t++,r==="}"&&t--,r===","&&t===0)return[e.slice(0,n).trim(),e.slice(n+1).trim()]}return[e.trim(),null]}function Vt(e,t,n){let r=O(e,t);return r?Jo(e,t,r):zo(e,t,n)}function zo(e,t,n){return[...Ho(e,t,n),...qo(e,t,n),...Ko(e,t,n)]}function Ho(e,t,n){let r=[],i=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[1]??"",a=s[2]??"",c=E(o).map(p=>Qo(p.trim())).filter(p=>!!p),l=Se(n,s.index),u=Se(n,s.index+s[0].length-1);r.push({kind:"named",sourcePath:Q(e,t,a),names:c,startLine:l,endLine:u})}return r}function qo(e,t,n){let r=[],i=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[2]??"",a=Se(n,s.index),c=Se(n,s.index+s[0].length-1);r.push({kind:"star-as",sourcePath:Q(e,t,o),names:s[1]?[s[1]]:[],startLine:a,endLine:c})}return r}function Ko(e,t,n){let r=[],i=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[1]??"",a=Se(n,s.index),c=Se(n,s.index+s[0].length-1);r.push({kind:"star",sourcePath:Q(e,t,o),names:[],startLine:a,endLine:c})}return r}function Qo(e){if(!e)return null;let t=e.replace(/^type\s+/,"").trim();if(!t)return null;let n=t.match(/^(\w+)\s+as\s+(\w+)$/);if(n)return n[2]??null;let r=t.match(/^(\w+)$/);return r?r[1]??null:null}function Se(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)e.charCodeAt(r)===10&&n++;return n}function Jo(e,t,n){let r=[];for(let i of n.rootNode.descendantsOfType("export_statement")){let s=Go(e,t,i);if(s===void 0)continue;let o=i.startPosition.row,a=i.endPosition.row,c=Xo(i,s,o,a);r.push(c)}return r}function Go(e,t,n){let r=T(n,"string");if(!r)return;let i=T(r,"string_fragment");if(i)return Q(e,t,i.text)}function Xo(e,t,n,r){let i=T(e,"export_clause");if(i){let o=[];for(let a of i.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),l=a.namedChild(1);c&&o.push((l??c).text)}return{kind:"named",sourcePath:t,names:o,startLine:n,endLine:r}}let s=T(e,"namespace_export");if(s){let o=s.namedChildren.find(a=>a.type==="identifier"||a.type==="type_identifier")?.text;return{kind:"star-as",sourcePath:t,names:o?[o]:[],startLine:n,endLine:r}}return{kind:"star",sourcePath:t,names:[],startLine:n,endLine:r}}function lr(e,t,n){return Ze(e,t,{java:r=>Yo(e,t,r),kotlin:r=>Zo(e,t,r),scala:r=>ea(e,t,r)},()=>D(n,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(r,i)=>{let s=r[1]?.trim();return s?ta(e,t,s,i):[]}),n)}function Yo(e,t,n){let r=h(n,new Set(["import_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("import_declaration")){let o=s.children.some(p=>p.type==="asterisk"),c=s.namedChildren.find(p=>p.type==="scoped_identifier")??s.namedChildren.find(p=>p.type==="identifier");if(!c)continue;let l=c.text;if(o){i.push(ae("*",y(e,l,P)));continue}let u=l.split(".").pop()??l;i.push(g(u,u,y(e,l,P),r))}return i}function Zo(e,t,n){let r=h(n,new Set(["import_header","import_list"])),i=[];for(let s of n.rootNode.descendantsOfType("import_header")){let o=s.namedChildren.find(f=>f.type==="identifier");if(!o)continue;let a=s.namedChildren.some(f=>f.type==="wildcard_import"),c=s.namedChildren.find(f=>f.type==="import_alias");if(a){i.push(ae("*",y(e,o.text,P)));continue}let l=o.text,u=l.split(".").pop()??l,d=c?.namedChild(0)?.text??u;i.push(g(u,d,y(e,l,P),r))}return i}function ea(e,t,n){let r=h(n,new Set(["import_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("import_declaration")){let o=s.namedChildren.find(p=>p.type==="namespace_selectors"||p.type==="namespace_wildcard"),a=s.namedChildren.filter(p=>p!==o&&(p.type==="identifier"||p.type==="stable_identifier")),c=a.map(p=>p.text).join(".");if(!c)continue;if(o?.type==="namespace_wildcard"){i.push(ae("*",y(e,c,P)));continue}if(o?.type==="namespace_selectors"){for(let p of o.namedChildren)if(p.type==="arrow_renamed_identifier"){let[d,f]=p.namedChildren;if(!d)continue;let m=d.text,ce=f?.text??m;if(m==="_")continue;i.push(g(m,ce,y(e,`${c}.${m}`,P),r))}else if(p.type==="identifier"){let d=p.text;i.push(g(d,d,y(e,`${c}.${d}`,P),r))}continue}let l=a[a.length-1]?.text??c,u=a.slice(0,-1).map(p=>p.text).join(".")||c;i.push(g(l,l,y(e,u&&a.length>1?`${u}.${l}`:c,P),r))}return i}function ta(e,t,n,r){if(n.includes("{")&&n.includes("}")){let i=n.slice(0,n.indexOf("{")).replace(/\.$/,"").trim(),s=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return E(s).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),u=c?.trim();if(!u||u==="_")return[];let p=(l??u.split(".").pop()??u).trim(),d=u==="_"?i:`${i}.${u}`.replace(/\.\./g,".");return[w(e,t,r,d,u,p)]})}return[w(e,t,r,n,n.split(".").pop()??n,n.split(".").pop()??n)]}function pr(e,t,n){return R(e,t,r=>na(e,t,r),()=>D(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,i)=>{let s=r[1]?.trim();return s?E(s).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.split(/\s+as\s+/i),u=c?.trim()??a,p=u.split("\\").pop()??u,d=(l??p).trim();return[w(e,t,i,u,p,d,y(e,u.replace(/\\/g,"."),se))]}):[]}),n)}function na(e,t,n){let r=h(n,new Set(["namespace_use_declaration"])),i=[],s=(o,a,c)=>{i.push(g(a,c,y(e,o.replace(/\\/g,"."),se),r))};for(let o of n.rootNode.descendantsOfType("namespace_use_declaration")){let a=o.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=o.namedChildren.find(l=>l.type==="namespace_name")?.text??"";for(let l of a.namedChildren){if(l.type!=="namespace_use_clause")continue;let{importedName:u,localName:p,qualified:d}=ur(l,c);u&&s(d,u,p)}continue}for(let c of o.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:l,localName:u,qualified:p}=ur(c,"");l&&s(p,l,u)}}return i}function ur(e,t){let n=e.namedChildren.find(l=>l.type==="qualified_name"),r=e.namedChildren.filter(l=>l.type==="name"),i="";n?i=n.text:r.length>=1&&(i=r[0].text);let s=n&&r.length>0?r[r.length-1]:null,o=i.split("\\").pop()??i,a=s?.text??o,c=t?`${t}\\${i}`:i;return{importedName:o,localName:a,qualified:c}}function fr(e,t,n){return R(e,t,r=>ra(e,t,r),()=>sa(n).flatMap(r=>aa(e,t,r,n)),n)}function ra(e,t,n){let r=h(n,new Set(["import_statement","import_from_statement"])),i=[];for(let s of n.rootNode.descendantsOfType("import_statement"))for(let o of s.namedChildren){let a=dr(o);if(!a)continue;let c=ye(e,t,a.qualifiedName);i.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:r.has(a.localName),usedMembers:[]})}for(let s of n.rootNode.descendantsOfType("import_from_statement")){let o=s.namedChild(0);if(!o)continue;let a=ia(o);if(a===null)continue;let c=ye(e,t,a);for(let l=1;l<s.namedChildCount;l+=1){let u=s.namedChild(l);if(u.type==="wildcard_import"){i.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let p=dr(u);p&&i.push({importedName:p.qualifiedName,localName:p.localName,sourcePath:c,kind:"named",used:r.has(p.localName),usedMembers:[]})}}return i}function dr(e){if(e.type==="aliased_import"){let t=e.namedChild(0),n=e.namedChild(1);return!t||!n?null:{qualifiedName:t.text,localName:n.text}}if(e.type==="dotted_name"){let t=e.text;return{qualifiedName:t,localName:t.split(".")[0]??t}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function ia(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let t=T(e,"import_prefix")?.text??"",n=T(e,"dotted_name")?.text??"";return`${t}${n}`}return null}function sa(e){let t=e.split(`
|
|
16
|
+
`),n=[],r=0;for(let i=0;i<t.length;i++){let s=t[i],o=s.trimStart(),a=r;if(r+=s.length+1,!o.startsWith("import ")&&!o.startsWith("from "))continue;let c=s,l=a+s.length,u=wt(s);for(;i+1<t.length&&(u>0||c.trimEnd().endsWith("\\"));){i++;let d=t[i];c+=`
|
|
17
|
+
${d}`,l+=1+d.length,u+=wt(d),r+=d.length+1}let p=oa(c);p&&n.push({...p,start:a,end:l})}return n}function oa(e){let t=e.replace(/\\\s*\n/g," ").trim();if(t.startsWith("import "))return{kind:"import",module:null,clause:t.slice(7).trim()};let n=t.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!n)return null;let r=n[2].trim();return r.startsWith("(")&&r.endsWith(")")&&(r=r.slice(1,-1).trim()),{kind:"from",module:n[1],clause:r}}function aa(e,t,n,r){let i=G(r,n.start,n.end),s=n.clause.replace(/\n/g," ").trim();if(n.kind==="import")return E(s).flatMap(c=>{let l=c.trim().replace(/,$/,"");if(!l)return[];let[u,p]=l.split(/\s+as\s+/),d=u.trim(),f=(p??d.split(".")[0]??d).trim(),m=ye(e,t,d),ce=he(i,f);return[{importedName:d,localName:f,sourcePath:m,kind:"namespace",used:C(i,f)||ce.length>0,usedMembers:ce}]});let o=n.module?ye(e,t,n.module):null,a=[];for(let c of E(s)){let l=c.trim().replace(/,$/,"");if(!l)continue;if(l==="*"){a.push({importedName:"*",localName:null,sourcePath:o,kind:"side-effect",used:!0,usedMembers:[]});continue}let[u,p]=l.split(/\s+as\s+/),d=(p??u).trim();a.push({importedName:u.trim(),localName:d,sourcePath:o,kind:"named",used:C(i,d),usedMembers:[]})}return a}import{basename as ca}from"path";function mr(e,t,n){return R(e,t,r=>ua(e,t,r),()=>la(e,t,n),n)}function la(e,t,n){return D(n,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(r,i)=>{let s=r[1],o=r[2];if(!s||!o)return[];let a=s==="require_relative"?Je(e,t,o):null;if(a){let c=gr(o);return[W(c,c,a,C(i,c))]}return[oe(o,a)]})}function ua(e,t,n){let r=h(n,new Set([])),i=[],s=new Set(["require","require_relative","load"]);for(let o of n.rootNode.descendantsOfType("call")){let a=o.namedChild(0);if(!a||a.type!=="identifier"||!s.has(a.text))continue;let l=o.namedChildren.find(f=>f.type==="argument_list")?.namedChild(0);if(!l||l.type!=="string")continue;let p=l.namedChildren.find(f=>f.type==="string_content")?.text;if(!p)continue;let d=a.text==="require_relative"?Je(e,t,p):null;if(d){let f=gr(p);i.push(g(f,f,d,r))}else i.push(oe(p,d))}return i}function gr(e){return zn(ca(e).replace(/\.[^.]+$/,""),/_/)}function yr(e,t,n){return R(e,t,r=>pa(e,t,r),()=>D(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,i)=>{let s=r[1]?.trim();return s?da(e,t,s,i):[]}),n)}function pa(e,t,n){let r=h(n,new Set(["use_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("use_declaration")){let o=s.namedChild(0);if(o)for(let a of Fe(o,"")){if(!a.importedName||a.importedName==="*")continue;let c=B(e,t,a.qualifiedName)??B(e,t,a.qualifiedName.split("::").slice(0,-1).join("::"));i.push(g(a.importedName,a.localName,c,r))}}return i}function Fe(e,t){switch(e.type){case"identifier":case"super":case"crate":{let n=e.text;return[{qualifiedName:nt(t,n),importedName:n,localName:n}]}case"self":{let n=t.split("::").filter(Boolean).pop()??"self";return[{qualifiedName:t||"self",importedName:n,localName:n}]}case"scoped_identifier":{let n=e.text,r=n.split("::").pop()??n;return[{qualifiedName:nt(t,n),importedName:r,localName:r}]}case"scoped_use_list":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let i=nt(t,n.text),s=[];for(let o of r.namedChildren)s.push(...Fe(o,i));return s}case"use_list":{let n=[];for(let r of e.namedChildren)n.push(...Fe(r,t));return n}case"use_as_clause":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let i=Fe(n,t),s=r.text;return i.map(o=>({...o,localName:s}))}case"use_wildcard":{let n=e.namedChild(0),r=n?n.text:"";return[{qualifiedName:nt(t,`${r}::*`),importedName:"*",localName:"*"}]}default:return[]}}function nt(e,t){return e?t?`${e}::${t}`:e:t}function da(e,t,n,r){let i=n.trim();if(i.includes("{")&&i.includes("}")){let u=i.slice(0,i.indexOf("{")).replace(/::$/,"").trim(),p=i.slice(i.indexOf("{")+1,i.lastIndexOf("}")).trim();return E(p).flatMap(d=>{let f=d.trim();if(!f)return[];if(f==="self"){let ot=u.split("::").filter(Boolean).pop();return ot?[w(e,t,r,u,ot,ot)]:[]}let[m,ce]=f.split(/\s+as\s+/),le=m?.trim();if(!le)return[];let Ar=(ce??le.split("::").pop()??le).trim(),jr=`${u}::${le}`.replace(/::::/g,"::");return[w(e,t,r,jr,le.split("::").pop()??le,Ar,B(e,t,u))]})}let[s,o]=i.split(/\s+as\s+/),a=s?.trim()??i,c=(o??a.split("::").pop()??a).trim(),l=B(e,t,a)??B(e,t,a.split("::").slice(0,-1).join("::"));return[w(e,t,r,a,a.split("::").pop()??a,c,l)]}function hr(e,t,n){let r=O(e,t);if(r)return fa(e,t,r);let i=[];for(let s of n.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let o=s[1]?.trim();o&&i.push(...ga(e,t,o))}return i}function fa(e,t,n){let r=[];for(let i of n.rootNode.descendantsOfType("use_declaration")){if(!ma(i))continue;let s=i.namedChildren.find(o=>o.type!=="visibility_modifier");if(s)for(let o of Fe(s,""))o.importedName&&r.push(Wt(e,t,o.qualifiedName))}return r}function ma(e){for(let t of e.children)if(t.type==="visibility_modifier"&&t.text.startsWith("pub"))return!0;return!1}function ga(e,t,n){let r=n.trim();if(r.includes("{")&&r.includes("}")){let i=r.slice(0,r.indexOf("{")).replace(/::$/,"").trim(),s=r.slice(r.indexOf("{")+1,r.lastIndexOf("}")).trim();return E(s).flatMap(o=>{let a=o.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),l=`${i}::${c?.trim()??a}`.replace(/::::/g,"::");return[Wt(e,t,l)]})}return[Wt(e,t,r)]}function Wt(e,t,n){return{specifier:n,sourcePath:B(e,t,n)??B(e,t,n.split("::").slice(0,-1).join("::"))}}function X({language:e,extensions:t,imports:n,parseImports:r}){return{language:e,extensions:t,capabilities:{imports:n},parseImports:r}}function Sr(e,t){let n=t.toLowerCase();for(let r of e)for(let i of r.extensions)if(n.endsWith(i))return r;return null}var ya={language:"javascript",extensions:re,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:Bt,parseReExports:Vt},ha=X({language:"python",extensions:ze,imports:"ast-with-regex-fallback",parseImports:fr}),Sa=X({language:"jvm",extensions:P,imports:"ast-dispatch-with-regex-fallback",parseImports:lr}),xa={language:"rust",extensions:He,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:yr,parseExports:hr},ba=X({language:"ruby",extensions:qe,imports:"ast-with-regex-fallback",parseImports:mr}),Na=X({language:"c/cpp",extensions:Ke,imports:"ast-with-regex-fallback",parseImports:tr}),_a=X({language:"dotnet",extensions:K,imports:"ast-dispatch-with-regex-fallback",parseImports:or}),Ia={language:"dart",extensions:Qe,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:ir,parseExports:sr},Ca=X({language:"php",extensions:se,imports:"ast-with-regex-fallback",parseImports:pr}),Ea=X({language:"clojure",extensions:ge,imports:"regex-only",parseImports:rr}),ka=[ya,ha,Sa,xa,ba,Na,_a,Ia,Ca,Ea];function rt(e){return Sr(ka,e)}var Ut={clearGroups:["whole-project","source-file"]},Pa=N("source-imports",Ut),Rp=N("source-exports",Ut),Ta=N("source-reexports",Ut),xr=Y({kind:"source-imports",invalidation:Z("source-imports"),serialize:La,deserialize:Fa}),br=Y({kind:"source-reexports",invalidation:Z("source-reexports"),serialize:Da,deserialize:Ra});function Nr(e,t){let n=b(t);return Ta.get(e,n,()=>{let r=rt(n);if(!r?.parseReExports)return[];let i=_(e,n);if(!i)return[];let s=U(e,n,i),o=vt(e),a=br.read(e,n,s);if(a?.resolutionFingerprint===o)return a.reExports;let c=r.parseReExports(e,n,i);return br.write(e,n,s,{resolutionFingerprint:o,reExports:c}),c})}function zt(e,t){let n=b(t);return Pa.get(e,n,()=>{let r=rt(n);if(!r)return[];let i=_(e,n);return i?_r(e,n,i,r):[]})}function vp(e,t){let n=b(t),r=rt(n);if(!r)return[];let i;try{i=Re(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(s){if(ve(s))return[];throw s}return _r(e,n,i,r)}function _r(e,t,n,r){let i=U(e,t,n),s=vt(e),o=xr.read(e,t,i);if(o?.resolutionFingerprint===s)return o.imports;let a=r.parseImports(e,t,n);return xr.write(e,t,i,{parserVersion:2,resolutionFingerprint:s,imports:a}),a}function wp(e,t,n){let r=zt(e,t).filter(i=>i.kind==="named"&&i.isTypeOnly!==!0&&i.localName===n&&i.sourcePath!==null);return r.length===1?r[0]:null}function La(e){return JSON.stringify(e)}function Fa(e){try{let t=JSON.parse(e);return!de(t)||t.parserVersion!==2||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.imports)?null:{parserVersion:2,resolutionFingerprint:t.resolutionFingerprint,imports:t.imports}}catch{return null}}function Da(e){return JSON.stringify(e)}function Ra(e){try{let t=JSON.parse(e);return!de(t)||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.reExports)?null:{resolutionFingerprint:t.resolutionFingerprint,reExports:t.reExports}}catch{return null}}function jp(e,t){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
|
|
18
|
+
FROM global_symbols gs
|
|
19
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
20
|
+
JOIN documents d ON der.document_id = d.id
|
|
21
|
+
WHERE ${t.where}
|
|
22
|
+
${e.pathExclusionsFor("d")}
|
|
23
|
+
${Cr(t.orderBy)}
|
|
24
|
+
${Er(t.limit)}`,...t.params??[])}function Op(e,t){return e.all(`SELECT
|
|
25
|
+
gs.id,
|
|
26
|
+
gs.symbol,
|
|
27
|
+
c.document_id,
|
|
28
|
+
MIN(c.start_line) AS start_line,
|
|
29
|
+
0 AS start_char,
|
|
30
|
+
MAX(c.end_line) AS end_line,
|
|
31
|
+
0 AS end_char,
|
|
32
|
+
d.relative_path,
|
|
33
|
+
gs.display_name,
|
|
34
|
+
gs.documentation
|
|
35
|
+
FROM global_symbols gs
|
|
36
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
37
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
38
|
+
JOIN documents d ON c.document_id = d.id
|
|
39
|
+
WHERE m.role = 1
|
|
40
|
+
AND ${t.where}
|
|
41
|
+
${e.pathExclusionsFor("d")}
|
|
42
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
|
|
43
|
+
${Cr(t.orderBy)}
|
|
44
|
+
${Er(t.limit)}`,...t.params??[])}function Cr(e){return e?`ORDER BY ${e}`:""}function Er(e){return typeof e=="number"?`LIMIT ${e}`:""}function kr(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function Pr(e){if(!e)return null;let t=Ir(e);if(t)return t.replace(/\n/g," ");let n=e.indexOf("|");if(n===-1)return e.replace(/\n/g," ");let r=e.slice(n+1);return(Ir(r)??r).replace(/\n/g," ")}function Ir(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function it(e){return{forFile(t,n){return Tr(e,t,n)},forFiles(t,n){let r=new Map;for(let i of t)r.set(i,Tr(e,i,n));return r}}}function Tr(e,t,n){let r={file:t},i=n.facts||n.identifiers;if(n.text&&(r.text=_(e,t)),n.lines&&(r.lines=pt(e,t)),n.ast&&(r.ast=O(e,t)),n.imports&&(r.imports=zt(e,t)),n.reexports&&(r.reexports=Nr(e,t)),i){let s=xt(e,t),o=s.facts;n.facts&&(r.facts=o),s.unavailable&&(r.sourceFactsUnavailable=s.unavailable),n.identifiers&&o&&(r.identifiers=o.fileIdentifiers,r.identifierLineMap=o.identifierLineMap)}return r}function va(e,t={}){if(z(e.symbol)!==null)return t.includeClassMemberFallbacks===!0;let i=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(i)}function Ht(e,t,n={}){let r=new Map;for(let s of t)e.length>0&&!va(s,{includeClassMemberFallbacks:n.includeClassMemberFallbacks})||r.set(s.id,s);for(let s of e)r.set(s.id,s);let i=[...r.values()];return n.sort?i.sort((s,o)=>s.start_line-o.start_line||s.end_line-o.end_line||s.symbol.localeCompare(o.symbol)):i}var wa=N("file-definitions",{clearGroups:["definition-catalog"]}),Aa=ue("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),ja=N("file-function-like-definitions",{clearGroups:["definition-catalog"]}),Lr=new WeakMap;function Kt(e,t,n={},r){return Ne(t),n.includeClassMemberFallbacks?qt(e,t,void 0,{includeClassMemberFallbacks:!0},r):wa.get(e,t,()=>{let i=j(r,"evidence-read",()=>vr(e,t));if(i)return i;let s=qt(e,t,void 0,n,r);return j(r,"evidence-write",()=>{let o=xe(e),a=it(e).forFile(t,{text:!0}).text;o&&a&&Rr.write(e,t,U(e,t,a),{projectFingerprint:o,definitions:s.map(c=>({...c}))})}),s})}function Oa(e,t){return ja.get(e,t,()=>{let n=vr(e,t);return n?n.filter(r=>r.isFunctionLike):qt(e,t,r=>r.isFunctionLike)})}var Rr=Y({kind:"file-definitions",invalidation:Z("file-definitions"),serialize:Ma,deserialize:$a});function vr(e,t){let n=xe(e);if(!n)return null;let r=it(e).forFile(t,{text:!0}).text;if(!r)return null;let i=Rr.read(e,t,U(e,t,r));return i?Ba(i,n,t):null}function Ma(e){return JSON.stringify(e)}function $a(e){try{let t=JSON.parse(e);return!de(t)||typeof t.projectFingerprint!="string"||!Array.isArray(t.definitions)?null:{projectFingerprint:t.projectFingerprint,definitions:t.definitions}}catch{return null}}function Ba(e,t,n){if(e.projectFingerprint!==t)return null;let r=[];for(let i of e.definitions){let s=Va(i,n);if(!s)return null;r.push(s)}return r}function Va(e,t){return!de(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.startChar!="number"&&e.startChar!==void 0||typeof e.endLine!="number"||typeof e.endChar!="number"&&e.endChar!==void 0||e.relativePath!==t||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function qt(e,t,n,r={},i){let s=j(i,"primary-rows",()=>Wa(e,t)),o=j(i,"fallback-rows",()=>Ua(e,t)),a=j(i,"merge-rows",()=>Ht(s,o,{sort:!0,includeClassMemberFallbacks:r.includeClassMemberFallbacks}).map(Qt));return n&&(a=a.filter(n)),j(i,"range-correction",()=>Jt(e,t,a,i,r.rangeCorrectionEvidence))}function j(e,t,n){return e?e(t,n):n()}function Wa(e,t){return e.all(`SELECT
|
|
45
|
+
gs.id,
|
|
46
|
+
gs.symbol,
|
|
47
|
+
der.document_id,
|
|
48
|
+
der.start_line,
|
|
49
|
+
der.start_char,
|
|
50
|
+
der.end_line,
|
|
51
|
+
der.end_char,
|
|
52
|
+
d.relative_path,
|
|
53
|
+
gs.display_name,
|
|
54
|
+
gs.kind,
|
|
55
|
+
gs.documentation,
|
|
56
|
+
gs.enclosing_symbol
|
|
57
|
+
FROM global_symbols gs
|
|
58
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
59
|
+
JOIN documents d ON der.document_id = d.id
|
|
60
|
+
WHERE d.relative_path = ?
|
|
61
|
+
${e.symbolNoiseFor("gs")}
|
|
62
|
+
ORDER BY der.start_line, der.end_line`,t)}function Ua(e,t){return e.all(`SELECT
|
|
63
|
+
gs.id,
|
|
64
|
+
gs.symbol,
|
|
65
|
+
c.document_id,
|
|
66
|
+
MIN(c.start_line) AS start_line,
|
|
67
|
+
0 AS start_char,
|
|
68
|
+
MAX(c.end_line) AS end_line,
|
|
69
|
+
0 AS end_char,
|
|
70
|
+
d.relative_path,
|
|
71
|
+
gs.display_name,
|
|
72
|
+
gs.kind,
|
|
73
|
+
gs.documentation,
|
|
74
|
+
gs.enclosing_symbol
|
|
75
|
+
FROM global_symbols gs
|
|
76
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
77
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
78
|
+
JOIN documents d ON c.document_id = d.id
|
|
79
|
+
WHERE d.relative_path = ?
|
|
80
|
+
AND m.role = 1
|
|
81
|
+
${e.symbolNoiseFor("gs")}
|
|
82
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
83
|
+
ORDER BY start_line, end_line`,t)}function Qt(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:an(e.symbol),parentTypeName:z(e.symbol),isFunctionLike:ut(e.symbol),isTypeLike:we(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function sd(e,t={}){return za(e,t.scope)}function za(e,t){return be(e,{scope:t,includeIgnored:!1}).flatMap(n=>Kt(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function od(e,t){return be(e,{scope:t,includeIgnored:!1}).flatMap(n=>Oa(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function ad(e,t){let n=Aa.get(e,()=>new WeakMap),r=n.get(t.symbolMatches);r||(r=new Map,n.set(t.symbolMatches,r));let i=JSON.stringify({scope:t.scope??null,sqlPrefilter:t.sqlPrefilter??null}),s=r.get(i);if(s)return[...s];let o=Fr(Ha(e,t.scope,t.sqlPrefilter)),a=Fr(qa(e,t.scope,t.sqlPrefilter)),c=new Set([...o.keys(),...a.keys()]),l=[];for(let u of[...c].sort()){if(e.isIgnored(u))continue;let p=Ht(o.get(u)??[],a.get(u)??[],{sort:!0}).filter(d=>t.symbolMatches(d.symbol));p.length!==0&&l.push(...Jt(e,u,p.map(Qt)))}return r.set(i,l),[...l]}function Ha(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",i=n?`AND ${wr("gs",n)}`:"",s=t?[`%${t}%`]:[];return e.all(`SELECT
|
|
84
|
+
gs.id,
|
|
85
|
+
gs.symbol,
|
|
86
|
+
der.document_id,
|
|
87
|
+
der.start_line,
|
|
88
|
+
der.start_char,
|
|
89
|
+
der.end_line,
|
|
90
|
+
der.end_char,
|
|
91
|
+
d.relative_path,
|
|
92
|
+
gs.display_name,
|
|
93
|
+
gs.kind,
|
|
94
|
+
gs.documentation,
|
|
95
|
+
gs.enclosing_symbol
|
|
96
|
+
FROM global_symbols gs
|
|
97
|
+
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
98
|
+
JOIN documents d ON der.document_id = d.id
|
|
99
|
+
WHERE 1 = 1
|
|
100
|
+
${e.pathExclusionsFor("d")}
|
|
101
|
+
${r}
|
|
102
|
+
${i}
|
|
103
|
+
${e.symbolNoiseFor("gs")}
|
|
104
|
+
ORDER BY d.relative_path, der.start_line, der.end_line`,...s)}function qa(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",i=n?`AND ${wr("gs",n)}`:"",s=t?[`%${t}%`]:[];return e.all(`SELECT
|
|
105
|
+
gs.id,
|
|
106
|
+
gs.symbol,
|
|
107
|
+
c.document_id,
|
|
108
|
+
MIN(c.start_line) AS start_line,
|
|
109
|
+
0 AS start_char,
|
|
110
|
+
MAX(c.end_line) AS end_line,
|
|
111
|
+
0 AS end_char,
|
|
112
|
+
d.relative_path,
|
|
113
|
+
gs.display_name,
|
|
114
|
+
gs.kind,
|
|
115
|
+
gs.documentation,
|
|
116
|
+
gs.enclosing_symbol
|
|
117
|
+
FROM global_symbols gs
|
|
118
|
+
JOIN mentions m ON m.symbol_id = gs.id
|
|
119
|
+
JOIN chunks c ON m.chunk_id = c.id
|
|
120
|
+
JOIN documents d ON c.document_id = d.id
|
|
121
|
+
WHERE m.role = 1
|
|
122
|
+
AND NOT EXISTS (
|
|
123
|
+
SELECT 1
|
|
124
|
+
FROM defn_enclosing_ranges existing_der
|
|
125
|
+
WHERE existing_der.symbol_id = gs.id
|
|
126
|
+
)
|
|
127
|
+
${e.pathExclusionsFor("d")}
|
|
128
|
+
${r}
|
|
129
|
+
${i}
|
|
130
|
+
${e.symbolNoiseFor("gs")}
|
|
131
|
+
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
132
|
+
ORDER BY d.relative_path, start_line, end_line`,...s)}function Ka(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function wr(e,t){return t==="callable"?Ka(e):Qa(e)}function Qa(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function Fr(e){let t=new Map;for(let n of e){let r=t.get(n.relative_path);r?r.push(n):t.set(n.relative_path,[n])}return t}function cd(e,t,n={}){if(t.length===0)return[];let r=t.flatMap(i=>Kt(e,i)).filter(i=>!e.isIgnored(i.relativePath));return n.onlyDocumented&&(r=r.filter(i=>i.documentation!==null&&i.documentation!=="")),n.sort&&(r=r.sort((i,s)=>i.relativePath.localeCompare(s.relativePath)||i.startLine-s.startLine||i.endLine-s.endLine)),r.map(i=>({startLine:i.startLine,endLine:i.endLine,symbol:i.symbol,shortName:on(i.symbol),signature:kr(Pr(i.documentation)),relativePath:i.relativePath,enclosingSymbol:i.enclosingSymbol}))}function Ja(e){let t=new Map,n=e.map((r,i)=>({definition:r,index:i,span:r.endLine-r.startLine})).sort((r,i)=>r.span-i.span||r.index-i.index);for(let{definition:r}of n)for(let i=r.startLine;i<=r.endLine;i+=1)t.has(i)||t.set(i,r);return t}function ld(e,t){let n=Lr.get(e);return n||(n=Ja(e),Lr.set(e,n)),n.get(t)??null}function ud(e,t){let n=Kt(e,t.relative_path).find(r=>r.symbolId===t.id)??(z(t.symbol)===null||!ut(t.symbol)?void 0:Jt(e,t.relative_path,[Qt(t)])[0]);return n?{symbolId:n.symbolId,symbol:n.symbol,documentId:n.documentId,startLine:n.startLine,startChar:n.startChar,endLine:n.endLine,endChar:n.endChar,relativePath:n.relativePath}:{symbolId:t.id,symbol:t.symbol,documentId:t.document_id,startLine:t.start_line,startChar:t.start_char??0,endLine:t.end_line,endChar:t.end_char??0,relativePath:t.relative_path}}function Jt(e,t,n,r,i){let s=j(r,"range-correction.source-text",()=>i?i.source:it(e).forFile(t,{text:!0}).text),o=j(r,"range-correction.callable-sites",()=>i?i.callables:_t(e,t));return o?j(r,"range-correction.ast-correction",()=>tc(n,o,s)):s?j(r,"range-correction.regex-fallback",()=>Ga(n,s)):n}function Ga(e,t){let n=t.split(/\r?\n/),r=Xa(e,n),i=Ya(e,r),s=Za(i,n);return ec(e,s)}function Xa(e,t){let n=e.some(i=>st(i.symbol))?cc(t):null,r=new Map;for(let i of e)r.set(i.symbolId,ac(t,n,i));return r}function Ya(e,t){return e.filter(n=>st(n.symbol)).map(n=>({definition:n,startLine:t.get(n.symbolId)??n.startLine})).sort((n,r)=>n.startLine-r.startLine||n.definition.startLine-r.definition.startLine||n.definition.symbol.localeCompare(r.definition.symbol))}function Za(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let i=e[r],s=e[r+1],o=s?Math.max(i.startLine,s.startLine-1):t.length-1;n.set(i.definition.symbolId,{startLine:i.startLine,endLine:lc(t,i.definition,i.startLine,o)})}return n}function ec(e,t){return e.map(n=>{let r=t.get(n.symbolId);return r?{...n,startLine:r.startLine,endLine:r.endLine}:n})}function tc(e,t,n=null){let r=new Map;for(let i of t){let s=r.get(i.name);s?s.push(i):r.set(i.name,[i])}return e.map(i=>{if(!oc(i)||!i.leaf)return Dr(i,n);let s=r.get(i.leaf);if(!s||s.length===0)return Dr(i,n);let o=n?nc(i,s,n):null;if(o)return{...i,startLine:o.startLine,endLine:o.endLine};let a=s[0],c=Math.abs(a.startLine-i.startLine);for(let l=1;l<s.length;l+=1){let u=s[l],p=Math.abs(u.startLine-i.startLine);p<c&&(a=u,c=p)}return{...i,startLine:a.startLine,endLine:a.endLine}})}function nc(e,t,n){let r=rc(e.symbol);if(!r)return null;let i=n.split(/\r?\n/),s=new RegExp(`\\b${A(r)}\\b`);for(let o of t){let a=ic(i,o.startLine);if(a&&s.test(a))return o}return null}function rc(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function ic(e,t){for(let n=t;n>=0;n-=1){let r=e[n]?.trim()??"";if(r){if(/^impl\b/.test(r))return sc(e,n,t);if(/^(?:struct|enum|trait|mod)\b/.test(r))return null}}return null}function sc(e,t,n){let r=[];for(let i=t;i<=n;i+=1){let s=e[i]??"";if(r.push(s),s.includes("{"))break}return r.join(" ")}function oc(e){return st(e.symbol)?!0:we(e.symbol)==="term"&&z(e.symbol)===null}function Dr(e,t){if(!t||!e.leaf||we(e.symbol)!=="term"||z(e.symbol)!==null)return e;let n=A(e.leaf),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${n}\\b`),s=t.split(/\r?\n/).findIndex(o=>r.test(o));return s>=0?{...e,startLine:s,endLine:s}:e}function ac(e,t,n){if(!st(n.symbol))return n.startLine;let r=Math.max(0,Math.min(n.startLine,e.length-1));if(!t)return r;let i=t.get(n.leaf);if(!i||i.length===0)return r;let s=null;for(let o of i){let a=Math.abs(o-n.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??r}function cc(e){let t=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,n=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,r=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,i=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,o=(a,c)=>{let l=s.get(a);if(!l){s.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let u of c.matchAll(t))u[1]&&o(u[1],a);for(let u of c.matchAll(n))u[1]&&o(u[1],a);let l=c.match(r);l?.[1]&&o(l[1],a);for(let u of c.matchAll(i))u[1]&&o(u[1],a)}return s}function lc(e,t,n,r){let i=Math.max(n,Math.min(e.length-1,r)),s=Math.max(n,Math.min(i,t.endLine)),o=0,a=0,c=!1;for(let l=n;l<=i;l+=1){let u=uc(e[l]??"");for(let p of u)p==="{"?(o+=1,c=!0):p==="}"?o=Math.max(0,o-1):p==="("?a+=1:p===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=s)return l}return s}function uc(e){let t="",n=null,r=!1;for(let i=0;i<e.length;i+=1){let s=e[i],o=e[i+1];if(!n&&s==="/"&&o==="/"){t+=" ".repeat(e.length-i);break}if(n){if(r){r=!1,t+=" ";continue}if(s==="\\"){r=!0,t+=" ";continue}s===n&&(n=null),t+=" ";continue}if(s==='"'||s==="'"||s==="`"){n=s,t+=" ";continue}t+=s}return t}function st(e){return e.includes("().")}export{Kr as a,Y as b,Ec as c,Z as d,Hn as e,hs as f,Q as g,pc as h,_ as i,$r as j,yc as k,pt as l,hc as m,A as n,io as o,H as p,q,Zi as r,Vn as s,rs as t,Wn as u,is as v,Nt as w,ss as x,O as y,Be as z,te as A,Gc as B,fe as C,xt as D,_t as E,as as F,cs as G,ro as H,nt as I,Nr as J,zt as K,vp as L,wp as M,it as N,jp as O,Op as P,kr as Q,Pr as R,Ht as S,Kt as T,sd as U,za as V,od as W,ad as X,cd as Y,Ja as Z,ld as _,ud as $};
|
|
133
|
+
//# sourceMappingURL=chunk-2VAHDDLM.js.map
|