scip-query 0.16.1 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +59 -9
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/{chunk-WN6XEYVX.js → chunk-27YDE22N.js} +2 -2
  5. package/dist/{chunk-VLSI5MYU.js → chunk-2DBY4MO7.js} +2 -2
  6. package/dist/{chunk-A46JTKTM.js → chunk-2DUWNJKE.js} +2 -2
  7. package/dist/{chunk-YSUD2S7T.js → chunk-2HCWAL42.js} +2 -2
  8. package/dist/{chunk-S5MTSES5.js → chunk-2TM23JYJ.js} +2 -2
  9. package/dist/{chunk-6EVORGCB.js → chunk-35DURZXI.js} +2 -2
  10. package/dist/{chunk-3LAKH6BV.js → chunk-3CJXFMR5.js} +2 -2
  11. package/dist/{chunk-UO4IADXJ.js → chunk-3YEBIYXL.js} +2 -2
  12. package/dist/{chunk-3YAZH3JU.js → chunk-45QWQSWS.js} +2 -2
  13. package/dist/{chunk-5XDNFOAH.js → chunk-4FLF7BHJ.js} +2 -2
  14. package/dist/{chunk-JRFCWCOD.js → chunk-4L4X66GE.js} +2 -2
  15. package/dist/{chunk-NLRWGGPY.js → chunk-5CJ6AQN7.js} +2 -2
  16. package/dist/{chunk-CM4EZLW4.js → chunk-5GAUXLOE.js} +2 -2
  17. package/dist/{chunk-QB7NRST4.js → chunk-5N5ZC566.js} +2 -2
  18. package/dist/{chunk-YD37KSEK.js → chunk-5QSMW5IO.js} +2 -2
  19. package/dist/{chunk-7II7NFRV.js → chunk-623AZLTE.js} +2 -2
  20. package/dist/{chunk-VYQY75NA.js → chunk-6TJERPN3.js} +2 -2
  21. package/dist/{chunk-IRIM3SUR.js → chunk-75H6GOND.js} +2 -2
  22. package/dist/{chunk-Q65QYKU7.js → chunk-7H37Z4UO.js} +2 -2
  23. package/dist/{chunk-OO6S4ECV.js → chunk-7XP7ZRSI.js} +2 -2
  24. package/dist/{chunk-5TVNLPUM.js → chunk-7Z5UT44B.js} +2 -2
  25. package/dist/{chunk-RQWNF2RM.js → chunk-BBTVIIOI.js} +2 -2
  26. package/dist/{chunk-MZB3DTHW.js → chunk-BGUYAA3Q.js} +2 -2
  27. package/dist/{chunk-3I34FZ6R.js → chunk-BTYDBDX5.js} +2 -2
  28. package/dist/{chunk-2EU6WVR3.js → chunk-BW4VDICR.js} +2 -2
  29. package/dist/{chunk-DKK2H4D7.js → chunk-CKRVVBM6.js} +2 -2
  30. package/dist/{chunk-ZHGUZKJL.js → chunk-CMLHZWRS.js} +2 -2
  31. package/dist/{chunk-OYGKBDAD.js → chunk-CSMPXDYE.js} +2 -2
  32. package/dist/{chunk-GWWYLYD3.js → chunk-DQYG5JHT.js} +2 -2
  33. package/dist/{chunk-6DNE65QS.js → chunk-E5HPTSRD.js} +2 -2
  34. package/dist/chunk-E7BTIEAY.js +2 -0
  35. package/dist/{chunk-RPMT6MTX.js → chunk-EUMETOTD.js} +2 -2
  36. package/dist/{chunk-2Y7YX54K.js → chunk-FY6RCFDH.js} +2 -2
  37. package/dist/{chunk-YFEJIYWH.js → chunk-FZXN37RN.js} +2 -2
  38. package/dist/{chunk-KI4WPR7Q.js → chunk-G4IUQW27.js} +2 -2
  39. package/dist/{chunk-U6BJVXWQ.js → chunk-GRHA5NGF.js} +2 -2
  40. package/dist/{chunk-XBPAJASV.js → chunk-H4T2AST4.js} +2 -2
  41. package/dist/{chunk-SOCS3467.js → chunk-HGO3D2JD.js} +2 -2
  42. package/dist/{chunk-LT6AHYVY.js → chunk-HJYHSTCP.js} +2 -2
  43. package/dist/{chunk-XC6PUFNN.js → chunk-HYRSGWFX.js} +2 -2
  44. package/dist/{chunk-K32ZOW3P.js → chunk-HZVG4KID.js} +2 -2
  45. package/dist/{chunk-RLB7FZKR.js → chunk-IHD2CHMX.js} +2 -2
  46. package/dist/{chunk-VSQRU3AP.js → chunk-IKAJI4SI.js} +2 -2
  47. package/dist/{chunk-BVHP2B4D.js → chunk-IZLWLO4X.js} +2 -2
  48. package/dist/{chunk-QSNG3NHQ.js → chunk-J7WYG63U.js} +2 -2
  49. package/dist/{chunk-NLVKD45E.js → chunk-JLZUM476.js} +2 -2
  50. package/dist/{chunk-7RAS466A.js → chunk-JYBP5ZIR.js} +2 -2
  51. package/dist/{chunk-S5RZQA6V.js → chunk-K3UVTL3J.js} +2 -2
  52. package/dist/{chunk-DA34GNNO.js → chunk-KWMRY4RN.js} +2 -2
  53. package/dist/{chunk-363TZ64I.js → chunk-KWQKWY6M.js} +2 -2
  54. package/dist/{chunk-PCCMMI2M.js → chunk-KZ2LZBQT.js} +2 -2
  55. package/dist/{chunk-S3IXCXW2.js → chunk-LG33DNTZ.js} +2 -2
  56. package/dist/chunk-M2TRDR25.js +84 -0
  57. package/dist/{chunk-VZCR3VQY.js → chunk-MBDBNQBW.js} +2 -2
  58. package/dist/chunk-MON5XXTG.js +7 -0
  59. package/dist/{chunk-EVCSXWER.js → chunk-O27267B6.js} +2 -2
  60. package/dist/{chunk-YCVYOV4A.js → chunk-O56VBJKB.js} +2 -2
  61. package/dist/{chunk-CS3FXTUC.js → chunk-OBPR6E5Z.js} +2 -2
  62. package/dist/{chunk-2LGPMYS2.js → chunk-OC7XDK62.js} +2 -2
  63. package/dist/{chunk-5UKDCXVC.js → chunk-OP5JXGDV.js} +2 -2
  64. package/dist/{chunk-CKIAEVGM.js → chunk-PA2MQKXD.js} +2 -2
  65. package/dist/{chunk-BFWVHD2P.js → chunk-PPAT3XUL.js} +2 -2
  66. package/dist/{chunk-G4KQ7S74.js → chunk-QEIGJJBC.js} +2 -2
  67. package/dist/{chunk-AAMZRDJT.js → chunk-QYBCGCY5.js} +2 -2
  68. package/dist/{chunk-W3ZVRLCH.js → chunk-RPPV6Y4K.js} +2 -2
  69. package/dist/{chunk-HGUNWXJX.js → chunk-RUQE7DZT.js} +2 -2
  70. package/dist/chunk-SMBIGBGN.js +67 -0
  71. package/dist/{chunk-EBSSCVR4.js → chunk-SQJ72PQW.js} +5 -5
  72. package/dist/{chunk-6GZ7LM7S.js → chunk-SSH2NPYS.js} +2 -2
  73. package/dist/{chunk-S2FZILCF.js → chunk-TAB7AWKO.js} +2 -2
  74. package/dist/{chunk-MCNWCJYL.js → chunk-TLTLJ4SW.js} +2 -2
  75. package/dist/{chunk-JXAJDINF.js → chunk-TR7C5HOC.js} +2 -2
  76. package/dist/{chunk-3OPIMH42.js → chunk-U244OVE6.js} +2 -2
  77. package/dist/chunk-U267E6YN.js +120 -0
  78. package/dist/chunk-U3JW5AYG.js +2 -0
  79. package/dist/{chunk-JQ2PCFZW.js → chunk-UKUISUS6.js} +2 -2
  80. package/dist/{chunk-2HFXPIBT.js → chunk-UWR52GNZ.js} +2 -2
  81. package/dist/{chunk-CVBS2FD4.js → chunk-V7MX6YUF.js} +2 -2
  82. package/dist/{chunk-BVUA3GZC.js → chunk-VCRMI56V.js} +2 -2
  83. package/dist/{chunk-753JWTUH.js → chunk-VDHEX6YO.js} +2 -2
  84. package/dist/{chunk-AMPN2VMF.js → chunk-W2I4QAW7.js} +2 -2
  85. package/dist/{chunk-P5QZILZ4.js → chunk-W3HSUCRG.js} +2 -2
  86. package/dist/{chunk-62Y3PC27.js → chunk-WENI5ZDR.js} +2 -2
  87. package/dist/{chunk-RYFIRFYJ.js → chunk-WGDIA2TU.js} +2 -2
  88. package/dist/{chunk-L27UIF3E.js → chunk-WT34AUWL.js} +2 -2
  89. package/dist/{chunk-HLRWOFXC.js → chunk-X566NT42.js} +2 -2
  90. package/dist/{chunk-ZEKBAMCN.js → chunk-XKWEMFHP.js} +2 -2
  91. package/dist/{chunk-SEEJPIWG.js → chunk-Y4BBVPRK.js} +2 -2
  92. package/dist/{chunk-KP2DJY7D.js → chunk-Y5BOEWAE.js} +2 -2
  93. package/dist/cli.js +321 -302
  94. package/dist/{config-types-SVkUIufk.d.ts → config-types-70s7NxKB.d.ts} +2 -0
  95. package/dist/{db-CS0TuVH6.d.ts → db-BBmJ0v3b.d.ts} +1 -1
  96. package/dist/{health-Btal3mQi.d.ts → health-CWpFL_6z.d.ts} +1 -1
  97. package/dist/index.d.ts +3 -3
  98. package/dist/index.js +1 -1
  99. package/dist/queries/affected.d.ts +2 -2
  100. package/dist/queries/affected.js +1 -1
  101. package/dist/queries/bottlenecks.d.ts +2 -2
  102. package/dist/queries/bottlenecks.js +1 -1
  103. package/dist/queries/by-kind.d.ts +2 -2
  104. package/dist/queries/by-kind.js +1 -1
  105. package/dist/queries/call-graph.d.ts +2 -2
  106. package/dist/queries/call-graph.js +1 -1
  107. package/dist/queries/change-surface.d.ts +2 -2
  108. package/dist/queries/change-surface.js +1 -1
  109. package/dist/queries/cleanup-plan.d.ts +2 -2
  110. package/dist/queries/cleanup-plan.js +1 -1
  111. package/dist/queries/co-change.d.ts +2 -2
  112. package/dist/queries/co-change.js +1 -1
  113. package/dist/queries/code.d.ts +2 -2
  114. package/dist/queries/code.js +1 -1
  115. package/dist/queries/complexity-hotspots.d.ts +2 -2
  116. package/dist/queries/complexity-hotspots.js +1 -1
  117. package/dist/queries/complexity.d.ts +2 -2
  118. package/dist/queries/complexity.js +1 -1
  119. package/dist/queries/convergence.d.ts +2 -2
  120. package/dist/queries/convergence.js +1 -1
  121. package/dist/queries/coupling.d.ts +2 -2
  122. package/dist/queries/coupling.js +1 -1
  123. package/dist/queries/cycles.d.ts +2 -2
  124. package/dist/queries/cycles.js +1 -1
  125. package/dist/queries/dataflow.d.ts +2 -2
  126. package/dist/queries/dataflow.js +1 -1
  127. package/dist/queries/dead.d.ts +2 -2
  128. package/dist/queries/dead.js +1 -1
  129. package/dist/queries/decorative-checkers.d.ts +2 -2
  130. package/dist/queries/decorative-checkers.js +1 -1
  131. package/dist/queries/deep-chains.d.ts +2 -2
  132. package/dist/queries/deep-chains.js +1 -1
  133. package/dist/queries/deps.d.ts +2 -2
  134. package/dist/queries/deps.js +1 -1
  135. package/dist/queries/diff-gate.d.ts +2 -2
  136. package/dist/queries/diff-gate.js +1 -1
  137. package/dist/queries/diff-impact.d.ts +2 -2
  138. package/dist/queries/diff-impact.js +1 -1
  139. package/dist/queries/doc-drift.d.ts +2 -2
  140. package/dist/queries/doc-drift.js +1 -1
  141. package/dist/queries/drift.d.ts +2 -2
  142. package/dist/queries/drift.js +1 -1
  143. package/dist/queries/duplicate-bodies.d.ts +2 -2
  144. package/dist/queries/duplicate-bodies.js +1 -1
  145. package/dist/queries/extract-candidates.d.ts +2 -2
  146. package/dist/queries/extract-candidates.js +1 -1
  147. package/dist/queries/fan.d.ts +2 -2
  148. package/dist/queries/fan.js +1 -1
  149. package/dist/queries/files.d.ts +2 -2
  150. package/dist/queries/health.d.ts +3 -3
  151. package/dist/queries/health.js +1 -1
  152. package/dist/queries/hierarchy.d.ts +2 -2
  153. package/dist/queries/hierarchy.js +1 -1
  154. package/dist/queries/hotspots.d.ts +2 -2
  155. package/dist/queries/hotspots.js +1 -1
  156. package/dist/queries/imports.d.ts +2 -2
  157. package/dist/queries/imports.js +1 -1
  158. package/dist/queries/incomplete-migration.d.ts +2 -2
  159. package/dist/queries/incomplete-migration.js +1 -1
  160. package/dist/queries/index.d.ts +3 -3
  161. package/dist/queries/index.js +1 -1
  162. package/dist/queries/isolated.d.ts +2 -2
  163. package/dist/queries/isolated.js +1 -1
  164. package/dist/queries/locality-candidates.d.ts +2 -2
  165. package/dist/queries/locality-candidates.js +1 -1
  166. package/dist/queries/members.d.ts +2 -2
  167. package/dist/queries/members.js +1 -1
  168. package/dist/queries/methods.d.ts +2 -2
  169. package/dist/queries/methods.js +1 -1
  170. package/dist/queries/not-implemented.d.ts +2 -2
  171. package/dist/queries/not-implemented.js +1 -1
  172. package/dist/queries/outline.d.ts +2 -2
  173. package/dist/queries/outline.js +1 -1
  174. package/dist/queries/passthrough-candidates.d.ts +2 -2
  175. package/dist/queries/passthrough-candidates.js +1 -1
  176. package/dist/queries/plan-context.d.ts +2 -2
  177. package/dist/queries/plan-context.js +1 -1
  178. package/dist/queries/react-component-duplicates.d.ts +2 -2
  179. package/dist/queries/react-component-duplicates.js +1 -1
  180. package/dist/queries/react-hook-candidates.d.ts +2 -2
  181. package/dist/queries/react-hook-candidates.js +1 -1
  182. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  183. package/dist/queries/react-large-component-pressure.js +1 -1
  184. package/dist/queries/recent-duplicates.d.ts +2 -2
  185. package/dist/queries/recent-duplicates.js +1 -1
  186. package/dist/queries/redundant-reexports.d.ts +2 -2
  187. package/dist/queries/redundant-reexports.js +1 -1
  188. package/dist/queries/refs.d.ts +2 -2
  189. package/dist/queries/refs.js +1 -1
  190. package/dist/queries/self-audit.d.ts +2 -2
  191. package/dist/queries/self-audit.js +1 -1
  192. package/dist/queries/similar-chains.d.ts +2 -2
  193. package/dist/queries/similar-chains.js +1 -1
  194. package/dist/queries/similar-files.d.ts +2 -2
  195. package/dist/queries/similar-files.js +1 -1
  196. package/dist/queries/similar-signatures.d.ts +2 -2
  197. package/dist/queries/similar-signatures.js +1 -1
  198. package/dist/queries/similar.d.ts +2 -2
  199. package/dist/queries/similar.js +1 -1
  200. package/dist/queries/slice.d.ts +2 -2
  201. package/dist/queries/slice.js +1 -1
  202. package/dist/queries/stale-abstractions.d.ts +2 -2
  203. package/dist/queries/stale-abstractions.js +1 -1
  204. package/dist/queries/stats.d.ts +2 -2
  205. package/dist/queries/surface.d.ts +2 -2
  206. package/dist/queries/surface.js +1 -1
  207. package/dist/queries/symbols.d.ts +2 -2
  208. package/dist/queries/symbols.js +1 -1
  209. package/dist/queries/system.d.ts +2 -2
  210. package/dist/queries/system.js +1 -1
  211. package/dist/queries/test-quality.d.ts +2 -2
  212. package/dist/queries/test-quality.js +1 -1
  213. package/dist/queries/trace.d.ts +2 -2
  214. package/dist/queries/trace.js +1 -1
  215. package/dist/queries/twin-ab.d.ts +2 -2
  216. package/dist/queries/twin-ab.js +1 -1
  217. package/dist/queries/twin-drift.d.ts +2 -2
  218. package/dist/queries/twin-drift.js +1 -1
  219. package/dist/queries/unused-imports.d.ts +2 -2
  220. package/dist/queries/unused-imports.js +1 -1
  221. package/dist/queries/unused-params.d.ts +2 -2
  222. package/dist/queries/unused-params.js +1 -1
  223. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  224. package/dist/queries/vue-component-duplicates.js +1 -1
  225. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  226. package/dist/queries/vue-composable-candidates.js +1 -1
  227. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  228. package/dist/queries/vue-large-view-pressure.js +1 -1
  229. package/dist/queries/wrapper-candidates.d.ts +2 -2
  230. package/dist/queries/wrapper-candidates.js +1 -1
  231. package/dist/reindex-worker.js +26 -26
  232. package/dist/reindex.d.ts +3 -3
  233. package/dist/reindex.js +38 -34
  234. package/dist/runtime.d.ts +5 -3
  235. package/dist/runtime.js +1 -2
  236. package/dist/{scip-cli-BKL-26TZ.d.ts → scip-cli-CoMzb7Zu.d.ts} +1 -1
  237. package/dist/watch-server.js +4 -4
  238. package/docs/COMMAND_REFERENCE.md +1 -1
  239. package/package.json +2 -1
  240. package/skills/_shared/SKILL.md +2 -2
  241. package/skills/scip-calibrate/SKILL.md +5 -4
  242. package/skills/scip-tla-model-system/SKILL.md +10 -8
  243. package/skills/scip-verify/SKILL.md +3 -2
  244. package/dist/chunk-5P26M63Y.js +0 -2
  245. package/dist/chunk-FFIYGYQR.js +0 -67
  246. package/dist/chunk-QVZSWLLZ.js +0 -2
  247. package/dist/chunk-WFRZGMWJ.js +0 -71
  248. package/dist/chunk-XAEU4ROB.js +0 -101
  249. package/dist/chunk-Y42DMR6F.js +0 -6
@@ -1,2 +1,2 @@
1
- import{e as M}from"./chunk-753JWTUH.js";import{b as $}from"./chunk-B75HZHUP.js";import{a as p}from"./chunk-BGBBVSH4.js";import{m as D}from"./chunk-DA34GNNO.js";import{d as I}from"./chunk-MTDBHTSF.js";import{d as b,j as h,p as x,q as y,t as L}from"./chunk-OO6S4ECV.js";import{a as g,e as S}from"./chunk-NLVKD45E.js";import{y as d}from"./chunk-WFRZGMWJ.js";var B=new Set(I());function X(e,n={}){let{scope:s,minLoc:i=1,limit:r,scanLimit:c,maxShapeFrequency:a=12}=n,o=n.semantic!==!1,t=w(e,F(e,{scope:s,minLoc:i,scanLimit:c}),{semantic:o,maxShapeFrequency:a}),m=P(t);return r?m.slice(0,r):m}function F(e,n){let s=L(e,{scope:n.scope}).filter(i=>v(i)&&!e.isIgnored(i.relativePath)).filter(i=>p(i)>=n.minLoc);return typeof n.scanLimit=="number"&&n.scanLimit>0&&s.sort((i,r)=>p(r)-p(i)||i.relativePath.localeCompare(r.relativePath)),$(s,n.scanLimit)}function v(e){return!e.isFunctionLike||h(e.symbol)?!1:e.kind===null||B.has(e.kind)}function w(e,n,s){let i=[];for(let a of n){let o=G(e,a,s);o&&i.push({signature:o,definition:a,fn:z(a)})}let r=new Map;for(let a of i)r.set(a.signature,(r.get(a.signature)??0)+1);let c=new Map;for(let a of i){let o=C(a.fn.loc),t=(r.get(a.signature)??0)>s.maxShapeFrequency,m=t?M(e,a.definition):null;if(t&&!m)continue;let u=t?`${a.signature}\0body\0${m}`:`${a.signature}\0band\0${o}`,l=c.get(u)??{signature:a.signature,locBand:o,exactBody:t,functions:[]};l.functions.push(a.fn),c.set(u,l)}return[...c.values()]}function z(e){return{symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e)}}function P(e){let n=[];for(let s of e)s.functions.length>=2&&n.push(s);return n.sort((s,i)=>{let r=i.functions.length-s.functions.length;if(r!==0)return r;let c=s.functions.reduce((o,t)=>o+t.loc,0);return i.functions.reduce((o,t)=>o+t.loc,0)-c}),n}function C(e){return e<=5?"<=5":e<=20?"6-20":">20"}function G(e,n,s){if(s.semantic){let c=D(e,n);if(c)return c}let i=k(n.documentation),r=i?A(i):null;return r||E(N(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)}function k(e){return x(y(e))}function N(e,n,s,i,r){let c=d(e,n);if(!c)return null;let a=c.split(/\r?\n/),o=O(a,s,i,r);for(let t of o){let m=Math.min(a.length-1,Math.max(t,t+4)),u="";for(let l=t;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,q(u)))return u}if(u&&u.includes("("))return u}return null}function q(e){let n=e.replace(/\s+/g," ").trim();return!n.includes("(")||S(n)>0?!1:/[;{]$/.test(n)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(n)||/\)\s*As\s+.+$/i.test(n)}function A(e){if(!e||!e.trim())return null;let n=e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim(),s=n.indexOf("(");return s===-1||(n=n.slice(s),n=n.replace(/\s+/g,"").toLowerCase(),n.length<3)?null:n}function E(e,n){if(!e||!e.trim())return null;let s=e.replace(/\s+/g," ").trim(),i=s.indexOf("(");if(i===-1)return null;let r=s.slice(0,i),a=new RegExp(`\\b${g(n)}\\b`,"i").exec(r);a&&typeof a.index=="number"&&(r=r.slice(0,a.index)),r=r.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let o=R(s.slice(i)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!o.startsWith("("))return null;let t=`${r?`${r} `:""}${o}`.replace(/\s+/g,"").toLowerCase();return t.length>=3?t:null}function R(e){let n=0,s=0,i=0,r=0,c=null,a=!1;for(let o=0;o<e.length;o+=1){let t=e[o];if(c){if(a){a=!1;continue}if(t==="\\"){a=!0;continue}t===c&&(c=null);continue}if(t==='"'||t==="'"||t==="`"){c=t;continue}if(t==="(")n+=1;else if(t===")")n=Math.max(0,n-1);else if(t==="[")i+=1;else if(t==="]")i=Math.max(0,i-1);else if(t==="<")r+=1;else if(t===">")r=Math.max(0,r-1);else if(t==="{"){if(n===0&&i===0&&r===0)return e.slice(0,o);s+=1}else if(t==="}")s=Math.max(0,s-1);else if(t==="="&&e[o+1]===">"&&n===0&&s===0&&i===0&&r===0)return e.slice(0,o)}return e}function O(e,n,s,i){let r=g(i),c=new RegExp(`\\b${r}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${r}\\b`,"i"),o=[],t=new Set,m=Math.max(0,Math.min(n,e.length-1)),u=Math.max(m,Math.min(e.length-1,Math.max(s,n+4)));for(let l=m;l<=u;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}for(let l=0;l<e.length;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}return o}export{X as a};
2
- //# sourceMappingURL=chunk-6GZ7LM7S.js.map
1
+ import{e as M}from"./chunk-VDHEX6YO.js";import{b as $}from"./chunk-B75HZHUP.js";import{a as p}from"./chunk-BGBBVSH4.js";import{m as D}from"./chunk-KWMRY4RN.js";import{d as I}from"./chunk-MTDBHTSF.js";import{d as b,j as h,p as x,q as y,t as L}from"./chunk-7XP7ZRSI.js";import{a as g,e as S}from"./chunk-JLZUM476.js";import{y as d}from"./chunk-M2TRDR25.js";var B=new Set(I());function X(e,n={}){let{scope:s,minLoc:i=1,limit:r,scanLimit:c,maxShapeFrequency:a=12}=n,o=n.semantic!==!1,t=w(e,F(e,{scope:s,minLoc:i,scanLimit:c}),{semantic:o,maxShapeFrequency:a}),m=P(t);return r?m.slice(0,r):m}function F(e,n){let s=L(e,{scope:n.scope}).filter(i=>v(i)&&!e.isIgnored(i.relativePath)).filter(i=>p(i)>=n.minLoc);return typeof n.scanLimit=="number"&&n.scanLimit>0&&s.sort((i,r)=>p(r)-p(i)||i.relativePath.localeCompare(r.relativePath)),$(s,n.scanLimit)}function v(e){return!e.isFunctionLike||h(e.symbol)?!1:e.kind===null||B.has(e.kind)}function w(e,n,s){let i=[];for(let a of n){let o=G(e,a,s);o&&i.push({signature:o,definition:a,fn:z(a)})}let r=new Map;for(let a of i)r.set(a.signature,(r.get(a.signature)??0)+1);let c=new Map;for(let a of i){let o=C(a.fn.loc),t=(r.get(a.signature)??0)>s.maxShapeFrequency,m=t?M(e,a.definition):null;if(t&&!m)continue;let u=t?`${a.signature}\0body\0${m}`:`${a.signature}\0band\0${o}`,l=c.get(u)??{signature:a.signature,locBand:o,exactBody:t,functions:[]};l.functions.push(a.fn),c.set(u,l)}return[...c.values()]}function z(e){return{symbol:e.symbol,shortName:b(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:p(e)}}function P(e){let n=[];for(let s of e)s.functions.length>=2&&n.push(s);return n.sort((s,i)=>{let r=i.functions.length-s.functions.length;if(r!==0)return r;let c=s.functions.reduce((o,t)=>o+t.loc,0);return i.functions.reduce((o,t)=>o+t.loc,0)-c}),n}function C(e){return e<=5?"<=5":e<=20?"6-20":">20"}function G(e,n,s){if(s.semantic){let c=D(e,n);if(c)return c}let i=k(n.documentation),r=i?A(i):null;return r||E(N(e,n.relativePath,n.startLine,n.endLine,n.leaf),n.leaf)}function k(e){return x(y(e))}function N(e,n,s,i,r){let c=d(e,n);if(!c)return null;let a=c.split(/\r?\n/),o=O(a,s,i,r);for(let t of o){let m=Math.min(a.length-1,Math.max(t,t+4)),u="";for(let l=t;l<=m;l+=1){let f=a[l]?.trim();if(f&&(u=u?`${u} ${f}`:f,q(u)))return u}if(u&&u.includes("("))return u}return null}function q(e){let n=e.replace(/\s+/g," ").trim();return!n.includes("(")||S(n)>0?!1:/[;{]$/.test(n)||/\)\s*(?::\s*[^={]+)?\s*(?:=>|=|throws\b|where\b|$)/i.test(n)||/\)\s*As\s+.+$/i.test(n)}function A(e){if(!e||!e.trim())return null;let n=e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim(),s=n.indexOf("(");return s===-1||(n=n.slice(s),n=n.replace(/\s+/g,"").toLowerCase(),n.length<3)?null:n}function E(e,n){if(!e||!e.trim())return null;let s=e.replace(/\s+/g," ").trim(),i=s.indexOf("(");if(i===-1)return null;let r=s.slice(0,i),a=new RegExp(`\\b${g(n)}\\b`,"i").exec(r);a&&typeof a.index=="number"&&(r=r.slice(0,a.index)),r=r.replace(/\b(public|private|protected|internal|final|static|abstract|sealed|virtual|override|async|suspend|inline|constexpr|consteval|constinit|const|pub|fn|function|def|sub|friend|shared|readonly|new|open|partial|export)\b/gi," ").replace(/\s+/g," ").trim();let o=R(s.slice(i)).replace(/\)\s*=\s*[\s\S]*$/,")").replace(/\s+throws\s+[^={]+$/i,"").replace(/\s+where\s+.+$/i,"").replace(/\s+/g," ").trim();if(!o.startsWith("("))return null;let t=`${r?`${r} `:""}${o}`.replace(/\s+/g,"").toLowerCase();return t.length>=3?t:null}function R(e){let n=0,s=0,i=0,r=0,c=null,a=!1;for(let o=0;o<e.length;o+=1){let t=e[o];if(c){if(a){a=!1;continue}if(t==="\\"){a=!0;continue}t===c&&(c=null);continue}if(t==='"'||t==="'"||t==="`"){c=t;continue}if(t==="(")n+=1;else if(t===")")n=Math.max(0,n-1);else if(t==="[")i+=1;else if(t==="]")i=Math.max(0,i-1);else if(t==="<")r+=1;else if(t===">")r=Math.max(0,r-1);else if(t==="{"){if(n===0&&i===0&&r===0)return e.slice(0,o);s+=1}else if(t==="}")s=Math.max(0,s-1);else if(t==="="&&e[o+1]===">"&&n===0&&s===0&&i===0&&r===0)return e.slice(0,o)}return e}function O(e,n,s,i){let r=g(i),c=new RegExp(`\\b${r}\\b\\s*\\(`,"i"),a=new RegExp(`\\bdef\\s+${r}\\b`,"i"),o=[],t=new Set,m=Math.max(0,Math.min(n,e.length-1)),u=Math.max(m,Math.min(e.length-1,Math.max(s,n+4)));for(let l=m;l<=u;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}for(let l=0;l<e.length;l+=1){let f=e[l]??"";(c.test(f)||a.test(f))&&!t.has(l)&&(t.add(l),o.push(l))}return o}export{X as a};
2
+ //# sourceMappingURL=chunk-SSH2NPYS.js.map
@@ -1,2 +1,2 @@
1
- import{A as l,z as c}from"./chunk-WFRZGMWJ.js";function h(e,a,i,r,n,o){let t=new Set;d(e,a,i,r)&&t.add(n);for(let s of o)s.value&&p(t,s.label,s.value);return[...t].slice(0,6)}function p(e,a,i){let r=u(i);a.endsWith("name")&&y(r)&&e.add(`${a} has type-guard boundary shape`);for(let n of r){let o=f.get(n);o&&e.add(`${a} has ${o} term: ${n}`)}}function d(e,a,i,r){if(i<=0)return!1;let n=c(e,a);if(n.length===0)return!1;for(let o=i-1;o>=0&&o>=i-5;o-=1){let t=(n[o]??"").trim();if(t!==""){if(l(t)===r)return!0;if(!t.startsWith("//")&&!t.startsWith("*")&&!t.startsWith("/*")&&!t.startsWith("@")&&!t.startsWith("#"))return!1}}return!1}function u(e){return e.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)}function y(e){return e.some(a=>g.has(a))&&e.some(a=>m.has(a))}var f=new Map([["access","access policy"],["accessible","access policy"],["adapter","adapter"],["adapters","adapter"],["allow","access policy"],["allowed","access policy"],["animation","animation calculation"],["api","api surface"],["apply","settings/application"],["audit","side-effect boundary"],["auth","authorization"],["authorize","authorization"],["audio","audio side-effect"],["can","access policy"],["capabilities","capability boundary"],["capability","capability boundary"],["boundary","boundary"],["begin","lifecycle"],["bridge","bridge"],["bridges","bridge"],["cache","state cache"],["chase","gameplay action"],["command","command boundary"],["context","context policy"],["cooldown","temporal state"],["cooldowns","temporal state"],["controller","controller"],["controllers","controller"],["diagnostic","diagnostics"],["diagnostics","diagnostics"],["effect","side-effect boundary"],["effects","side-effect boundary"],["energy","gameplay calculation"],["expired","temporal state"],["facade","facade"],["facades","facade"],["fire","gameplay action"],["gateway","gateway"],["gateways","gateway"],["guard","guard"],["guards","guard"],["haptic","haptic side-effect"],["haptics","haptic side-effect"],["head","sequence boundary"],["history","state history"],["input","input boundary"],["jump","gameplay action"],["keyboard","input boundary"],["log","side-effect boundary"],["logger","side-effect boundary"],["lock","coordination boundary"],["middleware","middleware"],["multiplier","gameplay calculation"],["mute","audio side-effect"],["normalize","normalization"],["normalise","normalization"],["normalizer","normalization"],["oscillate","animation calculation"],["oscillation","animation calculation"],["overlap","collision predicate"],["performance","diagnostics"],["permission","access policy"],["permissions","access policy"],["policy","policy"],["pool","state pool"],["pooled","state pool"],["pools","state pool"],["predict","prediction"],["presenter","presenter"],["presenters","presenter"],["projectile","gameplay entity"],["provider","provider boundary"],["providers","provider boundary"],["public","public surface"],["quality","settings/application"],["rate","calculation"],["register","registry"],["registry","registry"],["relay","relay"],["relays","relay"],["reseed","state lifecycle"],["reset","state lifecycle"],["respond","response boundary"],["response","response boundary"],["resolve","resolution"],["resolver","resolution"],["route","route boundary"],["routes","route boundary"],["run","lifecycle"],["sample","diagnostics"],["score","gameplay calculation"],["scope","scope policy"],["scroll","position state"],["scrolled","position state"],["seed","state lifecycle"],["seeded","state lifecycle"],["segment","segment boundary"],["segments","segment boundary"],["setting","settings/application"],["settings","settings/application"],["spawn","gameplay lifecycle"],["spawning","gameplay lifecycle"],["speed","gameplay calculation"],["surface","public surface"],["tail","sequence boundary"],["tick","temporal state"],["transaction","transaction"],["transactional","transaction"],["transform","transformation"],["transformer","transformation"],["translate","translation"],["translator","translation"],["try","fallible action"],["validate","validation"],["validation","validation"],["validator","validation"],["visual","diagnostics"],["window","settings/application"],["socket","transport boundary"],["websocket","transport boundary"]]),g=new Set(["can","has","is","should"]),m=new Set(["access","api","auth","collision","expired","input","keyboard","overlap","permission","permissions","policy","projectile","response","route","routes","scope"]);export{h as a};
2
- //# sourceMappingURL=chunk-S2FZILCF.js.map
1
+ import{A as l,z as c}from"./chunk-M2TRDR25.js";function h(e,a,i,r,n,o){let t=new Set;d(e,a,i,r)&&t.add(n);for(let s of o)s.value&&p(t,s.label,s.value);return[...t].slice(0,6)}function p(e,a,i){let r=u(i);a.endsWith("name")&&y(r)&&e.add(`${a} has type-guard boundary shape`);for(let n of r){let o=f.get(n);o&&e.add(`${a} has ${o} term: ${n}`)}}function d(e,a,i,r){if(i<=0)return!1;let n=c(e,a);if(n.length===0)return!1;for(let o=i-1;o>=0&&o>=i-5;o-=1){let t=(n[o]??"").trim();if(t!==""){if(l(t)===r)return!0;if(!t.startsWith("//")&&!t.startsWith("*")&&!t.startsWith("/*")&&!t.startsWith("@")&&!t.startsWith("#"))return!1}}return!1}function u(e){return e.replace(/([A-Z])([A-Z][a-z])/g,"$1 $2").replace(/([a-z0-9])([A-Z])/g,"$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean)}function y(e){return e.some(a=>g.has(a))&&e.some(a=>m.has(a))}var f=new Map([["access","access policy"],["accessible","access policy"],["adapter","adapter"],["adapters","adapter"],["allow","access policy"],["allowed","access policy"],["animation","animation calculation"],["api","api surface"],["apply","settings/application"],["audit","side-effect boundary"],["auth","authorization"],["authorize","authorization"],["audio","audio side-effect"],["can","access policy"],["capabilities","capability boundary"],["capability","capability boundary"],["boundary","boundary"],["begin","lifecycle"],["bridge","bridge"],["bridges","bridge"],["cache","state cache"],["chase","gameplay action"],["command","command boundary"],["context","context policy"],["cooldown","temporal state"],["cooldowns","temporal state"],["controller","controller"],["controllers","controller"],["diagnostic","diagnostics"],["diagnostics","diagnostics"],["effect","side-effect boundary"],["effects","side-effect boundary"],["energy","gameplay calculation"],["expired","temporal state"],["facade","facade"],["facades","facade"],["fire","gameplay action"],["gateway","gateway"],["gateways","gateway"],["guard","guard"],["guards","guard"],["haptic","haptic side-effect"],["haptics","haptic side-effect"],["head","sequence boundary"],["history","state history"],["input","input boundary"],["jump","gameplay action"],["keyboard","input boundary"],["log","side-effect boundary"],["logger","side-effect boundary"],["lock","coordination boundary"],["middleware","middleware"],["multiplier","gameplay calculation"],["mute","audio side-effect"],["normalize","normalization"],["normalise","normalization"],["normalizer","normalization"],["oscillate","animation calculation"],["oscillation","animation calculation"],["overlap","collision predicate"],["performance","diagnostics"],["permission","access policy"],["permissions","access policy"],["policy","policy"],["pool","state pool"],["pooled","state pool"],["pools","state pool"],["predict","prediction"],["presenter","presenter"],["presenters","presenter"],["projectile","gameplay entity"],["provider","provider boundary"],["providers","provider boundary"],["public","public surface"],["quality","settings/application"],["rate","calculation"],["register","registry"],["registry","registry"],["relay","relay"],["relays","relay"],["reseed","state lifecycle"],["reset","state lifecycle"],["respond","response boundary"],["response","response boundary"],["resolve","resolution"],["resolver","resolution"],["route","route boundary"],["routes","route boundary"],["run","lifecycle"],["sample","diagnostics"],["score","gameplay calculation"],["scope","scope policy"],["scroll","position state"],["scrolled","position state"],["seed","state lifecycle"],["seeded","state lifecycle"],["segment","segment boundary"],["segments","segment boundary"],["setting","settings/application"],["settings","settings/application"],["spawn","gameplay lifecycle"],["spawning","gameplay lifecycle"],["speed","gameplay calculation"],["surface","public surface"],["tail","sequence boundary"],["tick","temporal state"],["transaction","transaction"],["transactional","transaction"],["transform","transformation"],["transformer","transformation"],["translate","translation"],["translator","translation"],["try","fallible action"],["validate","validation"],["validation","validation"],["validator","validation"],["visual","diagnostics"],["window","settings/application"],["socket","transport boundary"],["websocket","transport boundary"]]),g=new Set(["can","has","is","should"]),m=new Set(["access","api","auth","collision","expired","input","keyboard","overlap","permission","permissions","policy","projectile","response","route","routes","scope"]);export{h as a};
2
+ //# sourceMappingURL=chunk-TAB7AWKO.js.map
@@ -1,4 +1,4 @@
1
- import{a as q}from"./chunk-64MNV6AB.js";import{c as I,d as M,e as L,f as ke,g as Te,h as _e,o as Le,p as y,v as Fe,x as Pe,y as g,z as Ee}from"./chunk-WFRZGMWJ.js";import{isAbsolute as jt,relative as Vt}from"path";function we(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function v(e){return e.replace(/\\/g,"/")}function Bo(e,t){return we(e)===we(t)}function Io(e,t){let n=Vt(e,t);return n===""||!n.startsWith("..")&&!jt(n)}import{existsSync as ce,readFileSync as le,readdirSync as Bt,statSync as It}from"fs";import{join as w,relative as $t}from"path";function Ae(e){let t=Ot(e)??zt(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let o of t)for(let s of Mt(e,o)){if(r.has(s))continue;r.add(s);let i=qt(e,s);i&&n.push(i)}return n}function Ot(e){let t=w(e,"pnpm-workspace.yaml");if(!ce(t))return null;try{return Dt(le(t,"utf8"))}catch{return null}}function Dt(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let o=Wt(r);if(!n){/^packages\s*:\s*$/.test(o.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(o);if(s){let i=Ut(s[1].trim());i&&t.push(i);continue}if(o.trim()!=="")break}return t}function Wt(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function Ut(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function zt(e){let t=w(e,"package.json");if(!ce(t))return null;try{let n=JSON.parse(le(t,"utf8"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function Mt(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let i=w(e,t);return ae(i)?[i]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),o=t.slice(n+1).replace(/^\//,""),s=w(e,r||".");return ae(s)?Bt(s).map(i=>w(s,i,o)).filter(ae):[]}function ae(e){try{return It(e).isDirectory()}catch{return!1}}function qt(e,t){let n=w(t,"package.json");if(!ce(n))return null;try{let r=JSON.parse(le(n,"utf8"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:$t(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}import{extname as Re}from"path";var Xt={".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 X(e){return Xt[Re(e).toLowerCase()]??null}function je(e){return Re(e).toLowerCase()===".vue"}import{createRequire as Ht}from"module";var d=Ht(import.meta.url),H=null,Ve=!1;function Jt(){if(Ve)return null;if(H)return H;try{return H=d("tree-sitter"),H}catch{return Ve=!0,null}}var Be=new Map,J=new Set;function Zt(e){if(J.has(e))return null;let t=Be.get(e);if(t)return t;let n;try{switch(e){case"rust":n=d("tree-sitter-rust");break;case"typescript":n=d("tree-sitter-typescript").typescript;break;case"tsx":n=d("tree-sitter-typescript").tsx;break;case"javascript":n=d("tree-sitter-javascript");break;case"python":n=d("tree-sitter-python");break;case"java":n=d("tree-sitter-java");break;case"kotlin":n=d("tree-sitter-kotlin");break;case"scala":n=d("tree-sitter-scala");break;case"ruby":n=d("tree-sitter-ruby");break;case"c":n=d("tree-sitter-c");break;case"cpp":n=d("tree-sitter-cpp");break;case"csharp":n=d("tree-sitter-c-sharp");break;case"php":n=d("tree-sitter-php").php;break;case"vb":{let r=d("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return J.add(e),null}}catch{return J.add(e),null}return Be.set(e,n),n}var Ie=new Map;function Gt(e){let t=Ie.get(e);if(t)return t;let n=Zt(e);if(!n)return null;let r=Jt();if(!r)return null;let o=new r;try{o.setLanguage(n)}catch{return J.add(e),null}return Ie.set(e,o),o}function Qt(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function $(e,t){let n=Gt(e);if(!n)return null;try{return Qt(n,t)}catch{return null}}import{posix as ue}from"path";import{parse as Kt}from"@vue/compiler-sfc";var Yt=L("vue-sfc-units");function A(e,t){let n=De(t),r=g(e,n);return Yt.get(e,n,r,()=>pe(e,n,r))}function De(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function en(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function F(e){return!e||e.body.length===0?0:e.body.split(`
1
+ import{a as q}from"./chunk-64MNV6AB.js";import{c as I,d as M,e as L,f as ke,g as Te,h as _e,o as Le,p as y,v as Fe,x as Pe,y as g,z as Ee}from"./chunk-M2TRDR25.js";import{isAbsolute as jt,relative as Vt}from"path";function we(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function v(e){return e.replace(/\\/g,"/")}function Bo(e,t){return we(e)===we(t)}function Io(e,t){let n=Vt(e,t);return n===""||!n.startsWith("..")&&!jt(n)}import{existsSync as ce,readFileSync as le,readdirSync as Bt,statSync as It}from"fs";import{join as w,relative as $t}from"path";function Ae(e){let t=Ot(e)??zt(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let o of t)for(let s of Mt(e,o)){if(r.has(s))continue;r.add(s);let i=qt(e,s);i&&n.push(i)}return n}function Ot(e){let t=w(e,"pnpm-workspace.yaml");if(!ce(t))return null;try{return Dt(le(t,"utf8"))}catch{return null}}function Dt(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let o=Wt(r);if(!n){/^packages\s*:\s*$/.test(o.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(o);if(s){let i=Ut(s[1].trim());i&&t.push(i);continue}if(o.trim()!=="")break}return t}function Wt(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function Ut(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function zt(e){let t=w(e,"package.json");if(!ce(t))return null;try{let n=JSON.parse(le(t,"utf8"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function Mt(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let i=w(e,t);return ae(i)?[i]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),o=t.slice(n+1).replace(/^\//,""),s=w(e,r||".");return ae(s)?Bt(s).map(i=>w(s,i,o)).filter(ae):[]}function ae(e){try{return It(e).isDirectory()}catch{return!1}}function qt(e,t){let n=w(t,"package.json");if(!ce(n))return null;try{let r=JSON.parse(le(n,"utf8"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:$t(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}import{extname as Re}from"path";var Xt={".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 X(e){return Xt[Re(e).toLowerCase()]??null}function je(e){return Re(e).toLowerCase()===".vue"}import{createRequire as Ht}from"module";var d=Ht(import.meta.url),H=null,Ve=!1;function Jt(){if(Ve)return null;if(H)return H;try{return H=d("tree-sitter"),H}catch{return Ve=!0,null}}var Be=new Map,J=new Set;function Zt(e){if(J.has(e))return null;let t=Be.get(e);if(t)return t;let n;try{switch(e){case"rust":n=d("tree-sitter-rust");break;case"typescript":n=d("tree-sitter-typescript").typescript;break;case"tsx":n=d("tree-sitter-typescript").tsx;break;case"javascript":n=d("tree-sitter-javascript");break;case"python":n=d("tree-sitter-python");break;case"java":n=d("tree-sitter-java");break;case"kotlin":n=d("tree-sitter-kotlin");break;case"scala":n=d("tree-sitter-scala");break;case"ruby":n=d("tree-sitter-ruby");break;case"c":n=d("tree-sitter-c");break;case"cpp":n=d("tree-sitter-cpp");break;case"csharp":n=d("tree-sitter-c-sharp");break;case"php":n=d("tree-sitter-php").php;break;case"vb":{let r=d("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return J.add(e),null}}catch{return J.add(e),null}return Be.set(e,n),n}var Ie=new Map;function Gt(e){let t=Ie.get(e);if(t)return t;let n=Zt(e);if(!n)return null;let r=Jt();if(!r)return null;let o=new r;try{o.setLanguage(n)}catch{return J.add(e),null}return Ie.set(e,o),o}function Qt(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function $(e,t){let n=Gt(e);if(!n)return null;try{return Qt(n,t)}catch{return null}}import{posix as ue}from"path";import{parse as Kt}from"@vue/compiler-sfc";var Yt=L("vue-sfc-units");function A(e,t){let n=De(t),r=g(e,n);return Yt.get(e,n,r,()=>pe(e,n,r))}function De(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function en(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function F(e){return!e||e.body.length===0?0:e.body.split(`
2
2
  `).length}function pe(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let o;try{o=Kt(n,{filename:t})}catch(i){return r.errors.push(Oe(i)),r}r.errors.push(...o.errors.map(Oe));let{descriptor:s}=o;return s.template&&(r.template=Z(e,t,"template",s.template)),s.script&&r.scripts.push($e(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push($e(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(i=>Z(e,t,"style",i)),r.customBlocks=s.customBlocks.map(i=>Z(e,t,"custom",i)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(i=>i?.errors??[])),r}function $e(e,t,n,r){let o=Z(e,t,"script",n);return{...o,kind:"script",setup:r,astLanguage:en(o.lang)}}function Z(e,t,n,r){let o=nn(r.attrs),s=typeof o.lang=="string"?o.lang:null,i=typeof o.src=="string"?o.src:typeof r.src=="string"?r.src:void 0;if(i){let c=tn(t,i);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:i,attrs:o,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${i}`]};let l=g(e,c),f=l?Math.max(0,l.split(`
3
3
  `).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:i,attrs:o,lang:s,body:l,startLine:0,endLine:f,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:o,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function tn(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=De(ue.normalize(ue.join(ue.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function nn(e){return{...e}}function Oe(e){return e instanceof Error?e.message:String(e)}function We(e,t,n){let o=pe(e,t,n).scripts.filter(i=>i.astLanguage&&i.body.length>0),s=o[0]?.astLanguage;return s?{body:o.map(i=>`${`
4
4
  `.repeat(i.startLine)}${i.body}`).join(`
@@ -8,4 +8,4 @@ import{a as q}from"./chunk-64MNV6AB.js";import{c as I,d as M,e as L,f as ke,g as
8
8
  `)))}var ko=new Set(["in","key","of"]),To=new Set(["computed","defineEmits","defineProps","reactive","ref","watch","watchEffect"]),_o=L("vue-component-behavior-profiles");function wt(e,t={}){let n=O(e,{extensions:[".vue"]}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).map(o=>Ce(e,o)).filter(o=>(t.minTemplateTokens===void 0||o.templateTokens.size>=t.minTemplateTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function Ce(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n),o=_o.get(e,n,r,()=>Lo(e,n,r));return Po(o)}function Lo(e,t,n){let r=A(e,t),o=re(e,t),s=ne(r),i=Ao(o),a=o.expressionIdentifiers.map(m=>m.name).filter(m=>!i.includes(m)).filter((m,b,B)=>B.indexOf(m)===b).sort(),c=o.componentTags.map(m=>m.normalized).filter((m,b,B)=>B.indexOf(m)===b).sort(),l=n?n.split(`
9
9
  `).length:0,f=F(r.template),u=s.lineCount,N=r.styles.reduce((m,b)=>m+F(b),0),V=r.customBlocks.reduce((m,b)=>m+F(b),0),{lines:se,paths:ie}=Fo(e,t,s);return{file:t,sfc:r,templateFacts:o,scriptFacts:s,templateTokens:new Set(o.structuralTokens),behaviorTokens:wo(o,s,a),templateBindingNames:a,templateLocalNames:i,componentNames:c,sfcLines:l,totalLines:l+s.externalLineCount,templateLines:f,scriptLines:u,styleLines:N,externalScriptLines:s.externalLineCount,externalScriptPaths:s.externalScriptPaths,customBlockLines:V,delegatedComposableLines:se,delegatedComposablePaths:ie}}function Fo(e,t,n){let r=new Set;for(let i of n.composables){let a=n.imports.find(l=>l.local===i);if(!a)continue;let c=Pt(e,a.sourcePath,a.source);!c||c===t||r.add(c)}let o=[...r].sort();return{lines:o.reduce((i,a)=>{let c=g(e,a);return i+(c?c.split(`
10
10
  `).length:0)},0),paths:o}}function Po(e){let t=Eo(e.scriptFacts);return{...e,scriptFacts:t,templateTokens:new Set(e.templateTokens),behaviorTokens:new Set(e.behaviorTokens),templateBindingNames:[...e.templateBindingNames],templateLocalNames:[...e.templateLocalNames],componentNames:[...e.componentNames],externalScriptPaths:t.externalScriptPaths,delegatedComposablePaths:[...e.delegatedComposablePaths]}}function Eo(e){return{...e,imports:e.imports.map(t=>({...t})),functions:e.functions.map(t=>({...t})),calls:e.calls.map(t=>({...t,categories:[...t.categories]})),composables:[...e.composables],stores:[...e.stores],reactivity:[...e.reactivity],lifecycle:[...e.lifecycle],requests:[...e.requests],macros:[...e.macros],externalScriptPaths:[...e.externalScriptPaths],unresolvedScripts:e.unresolvedScripts.map(t=>({...t}))}}function wo(e,t,n){let r=new Set;for(let o of t.composables)r.add(`composable:${o}`);for(let o of t.stores)r.add(`store:${o}`);for(let o of t.reactivity)r.add(`reactivity:${o}`);for(let o of t.lifecycle)r.add(`lifecycle:${o}`);for(let o of t.requests)r.add(`request:${o}`);for(let o of t.macros)r.add(`macro:${o}`);for(let o of t.functions){if(To.has(o.name))continue;r.add(`function:${o.name}`);let s=/^[a-z]+/.exec(o.name)?.[0]??null;s&&s.length>2&&s!==o.name&&r.add(`function-verb:${s}`)}for(let o of e.events)r.add(`template-event:${o.name}`);for(let o of n)r.add(`template-binding:${o}`);return r}function Ao(e){let t=new Set;for(let n of e.directives)if(n.name==="for"&&n.value)for(let r of Ro(n.value))t.add(r);for(let n of e.slots)if(n.value)for(let r of At(n.value))t.add(r);return[...t].sort()}function Ro(e){let t=/^(.*?)\s+(?:in|of)\s+/.exec(e.trim());return t?At(t[1]??""):[]}function At(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];ko.has(r)||t.push(r)}return t}function gi(e){return{capability:(t,n)=>jo(t,n),reactProfiles:(t={})=>Ye(e,t),reactProfilesForFile:t=>me(e,t),vueProfiles:(t={})=>wt(e,t),vueProfileForFile:t=>Ce(e,t),vueTemplateFacts:t=>re(e,t),vueScriptFacts:t=>ne(A(e,t))}}function jo(e,t){let n=e.startsWith("react-")?"react":"vue";if(t===void 0)return{slot:e,available:!0,framework:n};let r=t.replace(/\\/g,"/").toLowerCase();return n==="react"&&!r.endsWith(".tsx")&&!r.endsWith(".jsx")?{slot:e,available:!1,framework:n,reason:"React behavior profiles are only available for .tsx and .jsx files"}:n==="vue"&&!r.endsWith(".vue")?{slot:e,available:!1,framework:n,reason:"Vue behavior facts are only available for .vue files"}:{slot:e,available:!0,framework:n}}export{we as a,v as b,Bo as c,Io as d,Ae as e,Mt as f,z as g,ht as h,St as i,yt as j,xt as k,vt as l,Nt as m,bt as n,Ct as o,oe as p,Ys as q,Kr as r,Pt as s,fo as t,mo as u,go as v,ho as w,So as x,yo as y,xo as z,ei as A,X as B,je as C,We as D,ze as E,K as F,Q as G,at as H,pt as I,us as J,He as K,O as L,ps as M,gi as N};
11
- //# sourceMappingURL=chunk-MCNWCJYL.js.map
11
+ //# sourceMappingURL=chunk-TLTLJ4SW.js.map
@@ -1,2 +1,2 @@
1
- import{b}from"./chunk-QB7NRST4.js";import{m as d,x as f}from"./chunk-OO6S4ECV.js";function S(a,g){let p=b(a,g),i=f(a,p,{sort:!0});if(i.length===0)return[];let o=i.map(e=>({symbol:e.symbol,shortName:e.shortName,startLine:e.startLine,endLine:e.endLine,signature:e.signature,children:[]})),s=new Map;for(let e of o)s.set(e.symbol,e);let c=[];for(let e=0;e<i.length;e++){let r=i[e],n=o[e];if(r.enclosingSymbol&&s.has(r.enclosingSymbol)){s.get(r.enclosingSymbol).children.push(n);continue}let l=null,m=1/0;for(let t of o)if(t!==n&&t.startLine<=n.startLine&&t.endLine>=n.endLine){if(t.startLine===n.startLine&&t.endLine===n.endLine&&!d(t.symbol,n.symbol))continue;let u=t.endLine-t.startLine;u<m&&(m=u,l=t)}l?l.children.push(n):c.push(n)}return c}export{S as a};
2
- //# sourceMappingURL=chunk-JXAJDINF.js.map
1
+ import{b}from"./chunk-5N5ZC566.js";import{m as d,x as f}from"./chunk-7XP7ZRSI.js";function S(a,g){let p=b(a,g),i=f(a,p,{sort:!0});if(i.length===0)return[];let o=i.map(e=>({symbol:e.symbol,shortName:e.shortName,startLine:e.startLine,endLine:e.endLine,signature:e.signature,children:[]})),s=new Map;for(let e of o)s.set(e.symbol,e);let c=[];for(let e=0;e<i.length;e++){let r=i[e],n=o[e];if(r.enclosingSymbol&&s.has(r.enclosingSymbol)){s.get(r.enclosingSymbol).children.push(n);continue}let l=null,m=1/0;for(let t of o)if(t!==n&&t.startLine<=n.startLine&&t.endLine>=n.endLine){if(t.startLine===n.startLine&&t.endLine===n.endLine&&!d(t.symbol,n.symbol))continue;let u=t.endLine-t.startLine;u<m&&(m=u,l=t)}l?l.children.push(n):c.push(n)}return c}export{S as a};
2
+ //# sourceMappingURL=chunk-TR7C5HOC.js.map
@@ -1,2 +1,2 @@
1
- import{a as C,b}from"./chunk-ZEKBAMCN.js";import{a as P,c as y,e as r,f}from"./chunk-B3X6KU75.js";import{a as g,b as h,c as k}from"./chunk-KMVGRIO2.js";import{N as v}from"./chunk-MCNWCJYL.js";function L(e,i={}){let{minSimilarity:o=.62,minTokens:n=8,limit:c=20,scope:l,scanLimit:u,filePattern:m,focusFiles:d}=i,s=B(e,{scope:l,minTokens:n,scanLimit:u}),p=C(s,t=>t.tokens);return b({profiles:s,limit:c,filePattern:m,focusFiles:d,candidateIndex:p,profile:{name:"vue-component-duplicates"},compare:(t,a)=>V(t,a,o),sort:(t,a)=>a.similarity-t.similarity||t.fileA.localeCompare(a.fileA)||t.fileB.localeCompare(a.fileB)})}function B(e,i){return v(e).vueProfiles({scope:i.scope,minTemplateTokens:i.minTokens,scanLimit:i.scanLimit}).map(o=>({file:o.file,tokens:o.templateTokens,loc:T(o)}))}function T(e){return e.totalLines}function V(e,i,o){let n=g(e.tokens,i.tokens);if(n.size<6||!R(n))return null;let c=k(e.tokens,i.tokens);if(c<o)return null;let l=r(n,"component:"),u=r(n,"prop:"),m=r(n,"event:"),d=r(n,"directive:"),s=r(n,"slot:"),p=r(n,"id:"),t=S({sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p});return{fileA:e.file,fileB:i.file,similarity:c,tokenCountA:e.tokens.size,tokenCountB:i.tokens.size,sharedTokens:f(n),sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p,evidenceClass:t.evidenceClass,actionTier:t.actionTier,evidenceClassReasons:t.reasons,recommendation:t.recommendation,uniqueToA:f(h(e.tokens,i.tokens)).slice(0,25),uniqueToB:f(h(i.tokens,e.tokens)).slice(0,25),locA:e.loc,locB:i.loc}}function R(e){let i=0,o=0;for(let n of e)n.startsWith("component:")&&(i+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("directive:")||n.startsWith("slot:"))&&(o+=1);return y([{name:"component",count:i},{name:"behavior",count:o}],[{min:{component:1},reason:"shared custom component"},{min:{behavior:3},reason:"shared Vue template structure"}]).pass}function S(e){return P({genericWords:x,primitiveGroups:[{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"},{values:e.sharedDirectives,reasonPrefix:"shared directives",bucket:"generic"},{values:e.sharedSlots,reasonPrefix:"shared slots",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedIdentifiers,label:"shared identifier",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific Vue primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var x=new Set(["actions","app","button","card","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{L as a};
2
- //# sourceMappingURL=chunk-3OPIMH42.js.map
1
+ import{a as C,b}from"./chunk-XKWEMFHP.js";import{a as P,c as y,e as r,f}from"./chunk-B3X6KU75.js";import{a as g,b as h,c as k}from"./chunk-KMVGRIO2.js";import{N as v}from"./chunk-TLTLJ4SW.js";function L(e,i={}){let{minSimilarity:o=.62,minTokens:n=8,limit:c=20,scope:l,scanLimit:u,filePattern:m,focusFiles:d}=i,s=B(e,{scope:l,minTokens:n,scanLimit:u}),p=C(s,t=>t.tokens);return b({profiles:s,limit:c,filePattern:m,focusFiles:d,candidateIndex:p,profile:{name:"vue-component-duplicates"},compare:(t,a)=>V(t,a,o),sort:(t,a)=>a.similarity-t.similarity||t.fileA.localeCompare(a.fileA)||t.fileB.localeCompare(a.fileB)})}function B(e,i){return v(e).vueProfiles({scope:i.scope,minTemplateTokens:i.minTokens,scanLimit:i.scanLimit}).map(o=>({file:o.file,tokens:o.templateTokens,loc:T(o)}))}function T(e){return e.totalLines}function V(e,i,o){let n=g(e.tokens,i.tokens);if(n.size<6||!R(n))return null;let c=k(e.tokens,i.tokens);if(c<o)return null;let l=r(n,"component:"),u=r(n,"prop:"),m=r(n,"event:"),d=r(n,"directive:"),s=r(n,"slot:"),p=r(n,"id:"),t=S({sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p});return{fileA:e.file,fileB:i.file,similarity:c,tokenCountA:e.tokens.size,tokenCountB:i.tokens.size,sharedTokens:f(n),sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p,evidenceClass:t.evidenceClass,actionTier:t.actionTier,evidenceClassReasons:t.reasons,recommendation:t.recommendation,uniqueToA:f(h(e.tokens,i.tokens)).slice(0,25),uniqueToB:f(h(i.tokens,e.tokens)).slice(0,25),locA:e.loc,locB:i.loc}}function R(e){let i=0,o=0;for(let n of e)n.startsWith("component:")&&(i+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("directive:")||n.startsWith("slot:"))&&(o+=1);return y([{name:"component",count:i},{name:"behavior",count:o}],[{min:{component:1},reason:"shared custom component"},{min:{behavior:3},reason:"shared Vue template structure"}]).pass}function S(e){return P({genericWords:x,primitiveGroups:[{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"},{values:e.sharedDirectives,reasonPrefix:"shared directives",bucket:"generic"},{values:e.sharedSlots,reasonPrefix:"shared slots",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedIdentifiers,label:"shared identifier",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific Vue primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var x=new Set(["actions","app","button","card","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{L as a};
2
+ //# sourceMappingURL=chunk-U244OVE6.js.map