@backthread/extractor 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -0
  3. package/dist/cluster/domain-grouping.d.ts +113 -0
  4. package/dist/cluster/domain-grouping.d.ts.map +1 -0
  5. package/dist/cluster/domain-grouping.js +277 -0
  6. package/dist/cluster/domain-grouping.js.map +1 -0
  7. package/dist/cluster/grouping-gate.d.ts +54 -0
  8. package/dist/cluster/grouping-gate.d.ts.map +1 -0
  9. package/dist/cluster/grouping-gate.js +0 -0
  10. package/dist/cluster/grouping-gate.js.map +1 -0
  11. package/dist/cluster/louvain.d.ts +88 -0
  12. package/dist/cluster/louvain.d.ts.map +1 -0
  13. package/dist/cluster/louvain.js +674 -0
  14. package/dist/cluster/louvain.js.map +1 -0
  15. package/dist/cluster/overrides.d.ts +19 -0
  16. package/dist/cluster/overrides.d.ts.map +1 -0
  17. package/dist/cluster/overrides.js +32 -0
  18. package/dist/cluster/overrides.js.map +1 -0
  19. package/dist/cluster/subsystem.d.ts +45 -0
  20. package/dist/cluster/subsystem.d.ts.map +1 -0
  21. package/dist/cluster/subsystem.js +299 -0
  22. package/dist/cluster/subsystem.js.map +1 -0
  23. package/dist/cluster/workspaces.d.ts +64 -0
  24. package/dist/cluster/workspaces.d.ts.map +1 -0
  25. package/dist/cluster/workspaces.js +739 -0
  26. package/dist/cluster/workspaces.js.map +1 -0
  27. package/dist/extract.d.ts +52 -0
  28. package/dist/extract.d.ts.map +1 -0
  29. package/dist/extract.js +48 -0
  30. package/dist/extract.js.map +1 -0
  31. package/dist/framework/celery/celery.d.ts +17 -0
  32. package/dist/framework/celery/celery.d.ts.map +1 -0
  33. package/dist/framework/celery/celery.js +524 -0
  34. package/dist/framework/celery/celery.js.map +1 -0
  35. package/dist/framework/contribute-step.d.ts +38 -0
  36. package/dist/framework/contribute-step.d.ts.map +1 -0
  37. package/dist/framework/contribute-step.js +403 -0
  38. package/dist/framework/contribute-step.js.map +1 -0
  39. package/dist/framework/detect-step.d.ts +8 -0
  40. package/dist/framework/detect-step.d.ts.map +1 -0
  41. package/dist/framework/detect-step.js +54 -0
  42. package/dist/framework/detect-step.js.map +1 -0
  43. package/dist/framework/detect-util.d.ts +24 -0
  44. package/dist/framework/detect-util.d.ts.map +1 -0
  45. package/dist/framework/detect-util.js +59 -0
  46. package/dist/framework/detect-util.js.map +1 -0
  47. package/dist/framework/django/django.d.ts +22 -0
  48. package/dist/framework/django/django.d.ts.map +1 -0
  49. package/dist/framework/django/django.js +940 -0
  50. package/dist/framework/django/django.js.map +1 -0
  51. package/dist/framework/fastapi/fastapi.d.ts +27 -0
  52. package/dist/framework/fastapi/fastapi.d.ts.map +1 -0
  53. package/dist/framework/fastapi/fastapi.js +477 -0
  54. package/dist/framework/fastapi/fastapi.js.map +1 -0
  55. package/dist/framework/faststream/faststream.d.ts +19 -0
  56. package/dist/framework/faststream/faststream.d.ts.map +1 -0
  57. package/dist/framework/faststream/faststream.js +765 -0
  58. package/dist/framework/faststream/faststream.js.map +1 -0
  59. package/dist/framework/flask/flask.d.ts +17 -0
  60. package/dist/framework/flask/flask.d.ts.map +1 -0
  61. package/dist/framework/flask/flask.js +507 -0
  62. package/dist/framework/flask/flask.js.map +1 -0
  63. package/dist/framework/graphql/graphql.d.ts +17 -0
  64. package/dist/framework/graphql/graphql.d.ts.map +1 -0
  65. package/dist/framework/graphql/graphql.js +708 -0
  66. package/dist/framework/graphql/graphql.js.map +1 -0
  67. package/dist/framework/grpc/grpc.d.ts +22 -0
  68. package/dist/framework/grpc/grpc.d.ts.map +1 -0
  69. package/dist/framework/grpc/grpc.js +618 -0
  70. package/dist/framework/grpc/grpc.js.map +1 -0
  71. package/dist/framework/litestar/litestar.d.ts +17 -0
  72. package/dist/framework/litestar/litestar.d.ts.map +1 -0
  73. package/dist/framework/litestar/litestar.js +536 -0
  74. package/dist/framework/litestar/litestar.js.map +1 -0
  75. package/dist/framework/nest/nest.d.ts +19 -0
  76. package/dist/framework/nest/nest.d.ts.map +1 -0
  77. package/dist/framework/nest/nest.js +613 -0
  78. package/dist/framework/nest/nest.js.map +1 -0
  79. package/dist/framework/next/next.d.ts +22 -0
  80. package/dist/framework/next/next.d.ts.map +1 -0
  81. package/dist/framework/next/next.js +449 -0
  82. package/dist/framework/next/next.js.map +1 -0
  83. package/dist/framework/node/node.d.ts +24 -0
  84. package/dist/framework/node/node.d.ts.map +1 -0
  85. package/dist/framework/node/node.js +1009 -0
  86. package/dist/framework/node/node.js.map +1 -0
  87. package/dist/framework/orchestrator/orchestrator.d.ts +34 -0
  88. package/dist/framework/orchestrator/orchestrator.d.ts.map +1 -0
  89. package/dist/framework/orchestrator/orchestrator.js +691 -0
  90. package/dist/framework/orchestrator/orchestrator.js.map +1 -0
  91. package/dist/framework/orm/orm.d.ts +61 -0
  92. package/dist/framework/orm/orm.d.ts.map +1 -0
  93. package/dist/framework/orm/orm.js +620 -0
  94. package/dist/framework/orm/orm.js.map +1 -0
  95. package/dist/framework/python/analyze.d.ts +38 -0
  96. package/dist/framework/python/analyze.d.ts.map +1 -0
  97. package/dist/framework/python/analyze.js +98 -0
  98. package/dist/framework/python/analyze.js.map +1 -0
  99. package/dist/framework/python/py-ast.d.ts +130 -0
  100. package/dist/framework/python/py-ast.d.ts.map +1 -0
  101. package/dist/framework/python/py-ast.js +344 -0
  102. package/dist/framework/python/py-ast.js.map +1 -0
  103. package/dist/framework/python-orm/python-orm.d.ts +19 -0
  104. package/dist/framework/python-orm/python-orm.d.ts.map +1 -0
  105. package/dist/framework/python-orm/python-orm.js +516 -0
  106. package/dist/framework/python-orm/python-orm.js.map +1 -0
  107. package/dist/framework/react-native/react-native.d.ts +35 -0
  108. package/dist/framework/react-native/react-native.d.ts.map +1 -0
  109. package/dist/framework/react-native/react-native.js +1181 -0
  110. package/dist/framework/react-native/react-native.js.map +1 -0
  111. package/dist/framework/register.d.ts +2 -0
  112. package/dist/framework/register.d.ts.map +1 -0
  113. package/dist/framework/register.js +59 -0
  114. package/dist/framework/register.js.map +1 -0
  115. package/dist/framework/registry.d.ts +31 -0
  116. package/dist/framework/registry.d.ts.map +1 -0
  117. package/dist/framework/registry.js +70 -0
  118. package/dist/framework/registry.js.map +1 -0
  119. package/dist/framework/routing/expo-router.d.ts +31 -0
  120. package/dist/framework/routing/expo-router.d.ts.map +1 -0
  121. package/dist/framework/routing/expo-router.js +356 -0
  122. package/dist/framework/routing/expo-router.js.map +1 -0
  123. package/dist/framework/routing/index.d.ts +4 -0
  124. package/dist/framework/routing/index.d.ts.map +1 -0
  125. package/dist/framework/routing/index.js +16 -0
  126. package/dist/framework/routing/index.js.map +1 -0
  127. package/dist/framework/routing/next-router.d.ts +45 -0
  128. package/dist/framework/routing/next-router.d.ts.map +1 -0
  129. package/dist/framework/routing/next-router.js +378 -0
  130. package/dist/framework/routing/next-router.js.map +1 -0
  131. package/dist/framework/routing/route-tree.d.ts +73 -0
  132. package/dist/framework/routing/route-tree.d.ts.map +1 -0
  133. package/dist/framework/routing/route-tree.js +120 -0
  134. package/dist/framework/routing/route-tree.js.map +1 -0
  135. package/dist/framework/types.d.ts +230 -0
  136. package/dist/framework/types.d.ts.map +1 -0
  137. package/dist/framework/types.js +25 -0
  138. package/dist/framework/types.js.map +1 -0
  139. package/dist/graph/cross-language.d.ts +11 -0
  140. package/dist/graph/cross-language.d.ts.map +1 -0
  141. package/dist/graph/cross-language.js +123 -0
  142. package/dist/graph/cross-language.js.map +1 -0
  143. package/dist/graph/extract.d.ts +13 -0
  144. package/dist/graph/extract.d.ts.map +1 -0
  145. package/dist/graph/extract.js +79 -0
  146. package/dist/graph/extract.js.map +1 -0
  147. package/dist/graph/file-graph.d.ts +186 -0
  148. package/dist/graph/file-graph.d.ts.map +1 -0
  149. package/dist/graph/file-graph.js +427 -0
  150. package/dist/graph/file-graph.js.map +1 -0
  151. package/dist/graph/http-callsites.d.ts +14 -0
  152. package/dist/graph/http-callsites.d.ts.map +1 -0
  153. package/dist/graph/http-callsites.js +107 -0
  154. package/dist/graph/http-callsites.js.map +1 -0
  155. package/dist/graph/incremental.d.ts +122 -0
  156. package/dist/graph/incremental.d.ts.map +1 -0
  157. package/dist/graph/incremental.js +448 -0
  158. package/dist/graph/incremental.js.map +1 -0
  159. package/dist/graph/language.d.ts +31 -0
  160. package/dist/graph/language.d.ts.map +1 -0
  161. package/dist/graph/language.js +146 -0
  162. package/dist/graph/language.js.map +1 -0
  163. package/dist/graph/noise-filter.d.ts +46 -0
  164. package/dist/graph/noise-filter.d.ts.map +1 -0
  165. package/dist/graph/noise-filter.js +199 -0
  166. package/dist/graph/noise-filter.js.map +1 -0
  167. package/dist/graph/python-adapter.d.ts +36 -0
  168. package/dist/graph/python-adapter.d.ts.map +1 -0
  169. package/dist/graph/python-adapter.js +402 -0
  170. package/dist/graph/python-adapter.js.map +1 -0
  171. package/dist/graph/python-manifest.d.ts +22 -0
  172. package/dist/graph/python-manifest.d.ts.map +1 -0
  173. package/dist/graph/python-manifest.js +137 -0
  174. package/dist/graph/python-manifest.js.map +1 -0
  175. package/dist/graph/python-stdlib.d.ts +2 -0
  176. package/dist/graph/python-stdlib.d.ts.map +1 -0
  177. package/dist/graph/python-stdlib.js +53 -0
  178. package/dist/graph/python-stdlib.js.map +1 -0
  179. package/dist/graph/ts-morph-adapter.d.ts +65 -0
  180. package/dist/graph/ts-morph-adapter.d.ts.map +1 -0
  181. package/dist/graph/ts-morph-adapter.js +265 -0
  182. package/dist/graph/ts-morph-adapter.js.map +1 -0
  183. package/dist/graph/types.d.ts +37 -0
  184. package/dist/graph/types.d.ts.map +1 -0
  185. package/dist/graph/types.js +50 -0
  186. package/dist/graph/types.js.map +1 -0
  187. package/dist/index.d.ts +45 -0
  188. package/dist/index.d.ts.map +1 -0
  189. package/dist/index.js +51 -0
  190. package/dist/index.js.map +1 -0
  191. package/dist/infra/aws/aws-parse.d.ts +39 -0
  192. package/dist/infra/aws/aws-parse.d.ts.map +1 -0
  193. package/dist/infra/aws/aws-parse.js +149 -0
  194. package/dist/infra/aws/aws-parse.js.map +1 -0
  195. package/dist/infra/aws/aws.d.ts +6 -0
  196. package/dist/infra/aws/aws.d.ts.map +1 -0
  197. package/dist/infra/aws/aws.js +425 -0
  198. package/dist/infra/aws/aws.js.map +1 -0
  199. package/dist/infra/azure/azure-parse.d.ts +73 -0
  200. package/dist/infra/azure/azure-parse.d.ts.map +1 -0
  201. package/dist/infra/azure/azure-parse.js +178 -0
  202. package/dist/infra/azure/azure-parse.js.map +1 -0
  203. package/dist/infra/azure/azure.d.ts +12 -0
  204. package/dist/infra/azure/azure.d.ts.map +1 -0
  205. package/dist/infra/azure/azure.js +673 -0
  206. package/dist/infra/azure/azure.js.map +1 -0
  207. package/dist/infra/cloudflare/cloudflare.d.ts +50 -0
  208. package/dist/infra/cloudflare/cloudflare.d.ts.map +1 -0
  209. package/dist/infra/cloudflare/cloudflare.js +382 -0
  210. package/dist/infra/cloudflare/cloudflare.js.map +1 -0
  211. package/dist/infra/cloudflare/wrangler-parse.d.ts +6 -0
  212. package/dist/infra/cloudflare/wrangler-parse.d.ts.map +1 -0
  213. package/dist/infra/cloudflare/wrangler-parse.js +278 -0
  214. package/dist/infra/cloudflare/wrangler-parse.js.map +1 -0
  215. package/dist/infra/compose/compose-parse.d.ts +24 -0
  216. package/dist/infra/compose/compose-parse.d.ts.map +1 -0
  217. package/dist/infra/compose/compose-parse.js +77 -0
  218. package/dist/infra/compose/compose-parse.js.map +1 -0
  219. package/dist/infra/compose/compose.d.ts +12 -0
  220. package/dist/infra/compose/compose.d.ts.map +1 -0
  221. package/dist/infra/compose/compose.js +201 -0
  222. package/dist/infra/compose/compose.js.map +1 -0
  223. package/dist/infra/convex/convex-parse.d.ts +28 -0
  224. package/dist/infra/convex/convex-parse.d.ts.map +1 -0
  225. package/dist/infra/convex/convex-parse.js +74 -0
  226. package/dist/infra/convex/convex-parse.js.map +1 -0
  227. package/dist/infra/convex/convex.d.ts +18 -0
  228. package/dist/infra/convex/convex.d.ts.map +1 -0
  229. package/dist/infra/convex/convex.js +199 -0
  230. package/dist/infra/convex/convex.js.map +1 -0
  231. package/dist/infra/digitalocean/digitalocean.d.ts +33 -0
  232. package/dist/infra/digitalocean/digitalocean.d.ts.map +1 -0
  233. package/dist/infra/digitalocean/digitalocean.js +204 -0
  234. package/dist/infra/digitalocean/digitalocean.js.map +1 -0
  235. package/dist/infra/firebase/firebase.d.ts +43 -0
  236. package/dist/infra/firebase/firebase.d.ts.map +1 -0
  237. package/dist/infra/firebase/firebase.js +271 -0
  238. package/dist/infra/firebase/firebase.js.map +1 -0
  239. package/dist/infra/fly/fly-parse.d.ts +52 -0
  240. package/dist/infra/fly/fly-parse.d.ts.map +1 -0
  241. package/dist/infra/fly/fly-parse.js +114 -0
  242. package/dist/infra/fly/fly-parse.js.map +1 -0
  243. package/dist/infra/fly/fly.d.ts +15 -0
  244. package/dist/infra/fly/fly.d.ts.map +1 -0
  245. package/dist/infra/fly/fly.js +265 -0
  246. package/dist/infra/fly/fly.js.map +1 -0
  247. package/dist/infra/gcp/gcp-parse.d.ts +24 -0
  248. package/dist/infra/gcp/gcp-parse.d.ts.map +1 -0
  249. package/dist/infra/gcp/gcp-parse.js +123 -0
  250. package/dist/infra/gcp/gcp-parse.js.map +1 -0
  251. package/dist/infra/gcp/gcp.d.ts +10 -0
  252. package/dist/infra/gcp/gcp.d.ts.map +1 -0
  253. package/dist/infra/gcp/gcp.js +502 -0
  254. package/dist/infra/gcp/gcp.js.map +1 -0
  255. package/dist/infra/heroku/heroku-parse.d.ts +33 -0
  256. package/dist/infra/heroku/heroku-parse.d.ts.map +1 -0
  257. package/dist/infra/heroku/heroku-parse.js +63 -0
  258. package/dist/infra/heroku/heroku-parse.js.map +1 -0
  259. package/dist/infra/heroku/heroku.d.ts +24 -0
  260. package/dist/infra/heroku/heroku.d.ts.map +1 -0
  261. package/dist/infra/heroku/heroku.js +253 -0
  262. package/dist/infra/heroku/heroku.js.map +1 -0
  263. package/dist/infra/image-resolve.d.ts +56 -0
  264. package/dist/infra/image-resolve.d.ts.map +1 -0
  265. package/dist/infra/image-resolve.js +229 -0
  266. package/dist/infra/image-resolve.js.map +1 -0
  267. package/dist/infra/infra-step.d.ts +39 -0
  268. package/dist/infra/infra-step.d.ts.map +1 -0
  269. package/dist/infra/infra-step.js +57 -0
  270. package/dist/infra/infra-step.js.map +1 -0
  271. package/dist/infra/k8s/index.d.ts +78 -0
  272. package/dist/infra/k8s/index.d.ts.map +1 -0
  273. package/dist/infra/k8s/index.js +251 -0
  274. package/dist/infra/k8s/index.js.map +1 -0
  275. package/dist/infra/kamal/kamal-parse.d.ts +23 -0
  276. package/dist/infra/kamal/kamal-parse.d.ts.map +1 -0
  277. package/dist/infra/kamal/kamal-parse.js +66 -0
  278. package/dist/infra/kamal/kamal-parse.js.map +1 -0
  279. package/dist/infra/kamal/kamal.d.ts +17 -0
  280. package/dist/infra/kamal/kamal.d.ts.map +1 -0
  281. package/dist/infra/kamal/kamal.js +162 -0
  282. package/dist/infra/kamal/kamal.js.map +1 -0
  283. package/dist/infra/netlify/netlify.d.ts +33 -0
  284. package/dist/infra/netlify/netlify.d.ts.map +1 -0
  285. package/dist/infra/netlify/netlify.js +247 -0
  286. package/dist/infra/netlify/netlify.js.map +1 -0
  287. package/dist/infra/opentofu/opentofu.d.ts +3 -0
  288. package/dist/infra/opentofu/opentofu.d.ts.map +1 -0
  289. package/dist/infra/opentofu/opentofu.js +157 -0
  290. package/dist/infra/opentofu/opentofu.js.map +1 -0
  291. package/dist/infra/pulumi/pulumi-parse.d.ts +60 -0
  292. package/dist/infra/pulumi/pulumi-parse.d.ts.map +1 -0
  293. package/dist/infra/pulumi/pulumi-parse.js +155 -0
  294. package/dist/infra/pulumi/pulumi-parse.js.map +1 -0
  295. package/dist/infra/pulumi/pulumi.d.ts +23 -0
  296. package/dist/infra/pulumi/pulumi.d.ts.map +1 -0
  297. package/dist/infra/pulumi/pulumi.js +260 -0
  298. package/dist/infra/pulumi/pulumi.js.map +1 -0
  299. package/dist/infra/railway/railway-parse.d.ts +54 -0
  300. package/dist/infra/railway/railway-parse.d.ts.map +1 -0
  301. package/dist/infra/railway/railway-parse.js +200 -0
  302. package/dist/infra/railway/railway-parse.js.map +1 -0
  303. package/dist/infra/railway/railway.d.ts +19 -0
  304. package/dist/infra/railway/railway.d.ts.map +1 -0
  305. package/dist/infra/railway/railway.js +397 -0
  306. package/dist/infra/railway/railway.js.map +1 -0
  307. package/dist/infra/register.d.ts +2 -0
  308. package/dist/infra/register.d.ts.map +1 -0
  309. package/dist/infra/register.js +81 -0
  310. package/dist/infra/register.js.map +1 -0
  311. package/dist/infra/registry.d.ts +64 -0
  312. package/dist/infra/registry.d.ts.map +1 -0
  313. package/dist/infra/registry.js +205 -0
  314. package/dist/infra/registry.js.map +1 -0
  315. package/dist/infra/relevance.d.ts +16 -0
  316. package/dist/infra/relevance.d.ts.map +1 -0
  317. package/dist/infra/relevance.js +132 -0
  318. package/dist/infra/relevance.js.map +1 -0
  319. package/dist/infra/render/render-parse.d.ts +76 -0
  320. package/dist/infra/render/render-parse.d.ts.map +1 -0
  321. package/dist/infra/render/render-parse.js +155 -0
  322. package/dist/infra/render/render-parse.js.map +1 -0
  323. package/dist/infra/render/render.d.ts +11 -0
  324. package/dist/infra/render/render.d.ts.map +1 -0
  325. package/dist/infra/render/render.js +303 -0
  326. package/dist/infra/render/render.js.map +1 -0
  327. package/dist/infra/sst/sst-parse.d.ts +25 -0
  328. package/dist/infra/sst/sst-parse.d.ts.map +1 -0
  329. package/dist/infra/sst/sst-parse.js +45 -0
  330. package/dist/infra/sst/sst-parse.js.map +1 -0
  331. package/dist/infra/sst/sst.d.ts +19 -0
  332. package/dist/infra/sst/sst.d.ts.map +1 -0
  333. package/dist/infra/sst/sst.js +236 -0
  334. package/dist/infra/sst/sst.js.map +1 -0
  335. package/dist/infra/supabase/supabase-parse.d.ts +34 -0
  336. package/dist/infra/supabase/supabase-parse.d.ts.map +1 -0
  337. package/dist/infra/supabase/supabase-parse.js +113 -0
  338. package/dist/infra/supabase/supabase-parse.js.map +1 -0
  339. package/dist/infra/supabase/supabase.d.ts +15 -0
  340. package/dist/infra/supabase/supabase.d.ts.map +1 -0
  341. package/dist/infra/supabase/supabase.js +198 -0
  342. package/dist/infra/supabase/supabase.js.map +1 -0
  343. package/dist/infra/terraform/hcl-parse.d.ts +34 -0
  344. package/dist/infra/terraform/hcl-parse.d.ts.map +1 -0
  345. package/dist/infra/terraform/hcl-parse.js +203 -0
  346. package/dist/infra/terraform/hcl-parse.js.map +1 -0
  347. package/dist/infra/terraform/terraform.d.ts +14 -0
  348. package/dist/infra/terraform/terraform.d.ts.map +1 -0
  349. package/dist/infra/terraform/terraform.js +264 -0
  350. package/dist/infra/terraform/terraform.js.map +1 -0
  351. package/dist/infra/types.d.ts +151 -0
  352. package/dist/infra/types.d.ts.map +1 -0
  353. package/dist/infra/types.js +14 -0
  354. package/dist/infra/types.js.map +1 -0
  355. package/dist/infra/vercel/vercel-parse.d.ts +70 -0
  356. package/dist/infra/vercel/vercel-parse.d.ts.map +1 -0
  357. package/dist/infra/vercel/vercel-parse.js +194 -0
  358. package/dist/infra/vercel/vercel-parse.js.map +1 -0
  359. package/dist/infra/vercel/vercel.d.ts +30 -0
  360. package/dist/infra/vercel/vercel.d.ts.map +1 -0
  361. package/dist/infra/vercel/vercel.js +523 -0
  362. package/dist/infra/vercel/vercel.js.map +1 -0
  363. package/dist/infra/walk.d.ts +36 -0
  364. package/dist/infra/walk.d.ts.map +1 -0
  365. package/dist/infra/walk.js +85 -0
  366. package/dist/infra/walk.js.map +1 -0
  367. package/dist/safety.d.ts +13 -0
  368. package/dist/safety.d.ts.map +1 -0
  369. package/dist/safety.js +67 -0
  370. package/dist/safety.js.map +1 -0
  371. package/dist/types.d.ts +47 -0
  372. package/dist/types.d.ts.map +1 -0
  373. package/dist/types.js +111 -0
  374. package/dist/types.js.map +1 -0
  375. package/dist/version.d.ts +2 -0
  376. package/dist/version.d.ts.map +1 -0
  377. package/dist/version.js +35 -0
  378. package/dist/version.js.map +1 -0
  379. package/package.json +65 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.js","sourceRoot":"","sources":["../../src/graph/language.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,kEAAkE;AAClE,8EAA8E;AAC9E,sDAAsD;AACtD,EAAE;AACF,gFAAgF;AAChF,mFAAmF;AACnF,wCAAwC;AAExC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,GAEb,MAAM,iBAAiB,CAAC;AAEzB,MAAM,gBAAgB,GAAG,CAAC,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,CAAC,CAAC;AACpG,MAAM,YAAY,GAAG,CAAC,cAAc,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,CAAC,CAAC;AAE9F;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,IAAgB;IAC5D,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAS,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACzF,MAAM,GAAG,GAAa,EAAE,CAAC;IAEzB,MAAM,IAAI,GAAG,CAAC,GAAW,EAAQ,EAAE;QACjC,IAAI,OAAmC,CAAC;QACxC,IAAI,CAAC;YACH,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,yDAAyD;QACnE,CAAC;QACD,KAAK,MAAM,GA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AM,CAAC,CAAC;IACjC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,eAAe,IAAI,CAAC,CAAC,KAAK,GAAG,GAAG,IAAI,kBAAkB,CAAC,CAAC;IACxG,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9D,OAAO,OAAO;SACX,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC/D,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,aAAa,CAAC,KAAsB;IAClD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AAChG,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { NormalizedGraph } from './types.js';
2
+ export type NoiseCategory = 'test' | 'generated' | 'stories' | 'mocks' | 'config' | 'types' | 'build';
3
+ /** Every category, in a stable order (drives empty-count init + log order). */
4
+ export declare const NOISE_CATEGORIES: readonly NoiseCategory[];
5
+ export interface NoiseRule {
6
+ category: NoiseCategory;
7
+ /** Human-readable description of what this rule targets (logs/docs). */
8
+ description: string;
9
+ /** True when a repo-relative POSIX path is noise of this category. */
10
+ match: (path: string) => boolean;
11
+ }
12
+ export declare const NOISE_RULES: readonly NoiseRule[];
13
+ /**
14
+ * The noise category of a repo-relative posix path, or null if it is legitimate
15
+ * source. Pure; first matching rule wins. Exported for unit tests + callers that
16
+ * want to classify without filtering a whole graph.
17
+ */
18
+ export declare function classifyNoise(path: string): NoiseCategory | null;
19
+ export interface DroppedNoise {
20
+ /** Total files dropped. */
21
+ total: number;
22
+ /** Per-category drop counts (every category present, 0 when none). */
23
+ byCategory: Record<NoiseCategory, number>;
24
+ /** Internal/external edges removed because an endpoint was dropped. */
25
+ edgesDropped: number;
26
+ /** The dropped files (queryable side list): path + the category that claimed it. */
27
+ files: {
28
+ path: string;
29
+ category: NoiseCategory;
30
+ }[];
31
+ }
32
+ /**
33
+ * Drop noise nodes (tests/generated/build/config/stories/mocks/types) from a
34
+ * NormalizedGraph, along with any edge whose endpoint left, and any external
35
+ * referenced ONLY by dropped files. Pure + deterministic (output order follows
36
+ * the input's file/edge order). Returns the filtered graph plus an auditable
37
+ * drop summary. When nothing matches, the SAME graph object is returned
38
+ * (referential stability for the common no-noise case).
39
+ */
40
+ export declare function filterNoise(graph: NormalizedGraph): {
41
+ graph: NormalizedGraph;
42
+ dropped: DroppedNoise;
43
+ };
44
+ /** One-line log summary of a drop result (only meaningful when total > 0). */
45
+ export declare function summarizeNoise(dropped: DroppedNoise): string;
46
+ //# sourceMappingURL=noise-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noise-filter.d.ts","sourceRoot":"","sources":["../../src/graph/noise-filter.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7D,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,WAAW,GACX,SAAS,GACT,OAAO,GACP,QAAQ,GACR,OAAO,GACP,OAAO,CAAC;AAEZ,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,EAAE,SAAS,aAAa,EAQ3C,CAAC;AAEX,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CAClC;AA6CD,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAmD3C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAKhE;AAID,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC1C,uEAAuE;IACvE,YAAY,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,aAAa,CAAA;KAAE,EAAE,CAAC;CACpD;AAQD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG;IAAE,KAAK,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CA8CrG;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAK5D"}
@@ -0,0 +1,199 @@
1
+ // deterministic NOISE FILTERING before clustering.
2
+ //
3
+ // The module graph should describe ARCHITECTURE, not the scaffolding around it.
4
+ // Tests, generated code, build output, config, stories, and mocks ingested as
5
+ // modules inflate boxes, blur domains, and pull the directory-primary subsystem
6
+ // grouping toward meaningless buckets. This pass classifies every file
7
+ // by its repo-relative POSIX path and drops the noise BEFORE clustering —
8
+ // config-driven (one ordered rule table below), deterministic, and LOGGED by
9
+ // category at the call sites (house rule: never a silent cap).
10
+ //
11
+ // WHERE IT RUNS (the graph stage, never the twins): applied to the assembled
12
+ // NormalizedGraph at every graph-stage exit toward clustering — extractGraph
13
+ // (the full-extract path: cli + container single-window + changelog A/B) and the
14
+ // incremental engine's seed/patch returns (the merge-walk path). It is NOT
15
+ // applied inside graphFromState or the ts-morph adapter: those stay PURE
16
+ // assemblers, and the carried FileGraphState keeps ALL files (filtering is an
17
+ // OUTPUT concern only). That keeps incremental patching + the blob parse-cache
18
+ // unaffected, and preserves the Stage-A/B equivalence contract by construction —
19
+ // filterNoise is a PURE, DETERMINISTIC function of the (identical) unfiltered
20
+ // graph, so applying it identically on both the incremental and full-extract
21
+ // sides cannot break their equality.
22
+ //
23
+ // Dropped files are RETAINED in the returned summary's `files` list (a cheap,
24
+ // queryable side channel) so the drop is auditable, not just a count.
25
+ /** Every category, in a stable order (drives empty-count init + log order). */
26
+ export const NOISE_CATEGORIES = [
27
+ 'test',
28
+ 'generated',
29
+ 'stories',
30
+ 'mocks',
31
+ 'config',
32
+ 'types',
33
+ 'build',
34
+ ];
35
+ // --- path helpers ----------------------------------------------------------
36
+ /** Directory segments of a repo-relative posix path (excludes the basename). */
37
+ function dirSegments(path) {
38
+ return path.split('/').slice(0, -1);
39
+ }
40
+ function hasDirSegment(path, dirs) {
41
+ return dirSegments(path).some((s) => dirs.has(s));
42
+ }
43
+ // Source-file extension class shared by the basename matchers: ts/tsx/js/jsx +
44
+ // the m*/c* ESM/CJS variants (mts/cts/mjs/cjs). Mirrors SOURCE_EXTENSIONS.
45
+ const SRC_EXT = '[cm]?[jt]sx?';
46
+ const TEST_DIRS = new Set(['__tests__']);
47
+ const GENERATED_DIRS = new Set(['__generated__']);
48
+ const MOCK_DIRS = new Set(['__mocks__', '__fixtures__']);
49
+ // Build output. Most are already skipped upstream (the adapter's EXCLUDE_DIRS /
50
+ // dot-segment glob), but the rule is explicit + defensive so the policy is
51
+ // self-contained and robust to glob changes.
52
+ const BUILD_DIRS = new Set(['dist', 'build', 'out', 'coverage', '.next', '.expo']);
53
+ const TEST_FILE_RE = new RegExp(`\\.(test|spec)\\.${SRC_EXT}$`);
54
+ const GENERATED_FILE_RE = new RegExp(`\\.(gen|generated)\\.${SRC_EXT}$`);
55
+ const STORIES_FILE_RE = new RegExp(`\\.(stories|story)\\.${SRC_EXT}$`);
56
+ const MOCK_FILE_RE = new RegExp(`\\.(mock|fixture)s?\\.${SRC_EXT}$`);
57
+ const CONFIG_FILE_RE = new RegExp(`\\.config\\.${SRC_EXT}$`);
58
+ const DTS_FILE_RE = /\.d\.[cm]?ts$/;
59
+ // Python noise. The regexes above are all `.<ext>`-suffixed with the
60
+ // TS SRC_EXT class, so a `.py` path never matches any of them — Python needs its
61
+ // own rule shapes. Conventions: pytest/unittest use `tests/` + `test/` dirs and
62
+ // `test_*.py` / `*_test.py` / `conftest.py`; Django + Alembic emit schema
63
+ // migrations into `migrations/`; `setup.py` is packaging config, not architecture.
64
+ const PYTHON_TEST_DIRS = new Set(['tests', 'test']);
65
+ const PYTHON_MIGRATION_DIRS = new Set(['migrations']);
66
+ const PYTHON_TEST_FILE_RE = /(^|\/)(test_[^/]*|[^/]*_test|conftest)\.pyi?$/;
67
+ const PYTHON_SETUP_RE = /(^|\/)setup\.py$/;
68
+ // --- the rule table (config-driven; ORDERED — first match wins for the
69
+ // category label; a file is dropped regardless of which rule claims it) -------
70
+ export const NOISE_RULES = [
71
+ {
72
+ category: 'test',
73
+ description: '__tests__/ dirs and *.test.* / *.spec.* files',
74
+ match: (p) => hasDirSegment(p, TEST_DIRS) || TEST_FILE_RE.test(p),
75
+ },
76
+ {
77
+ category: 'generated',
78
+ description: '__generated__/ dirs and *.gen.* / *.generated.* codegen output',
79
+ match: (p) => hasDirSegment(p, GENERATED_DIRS) || GENERATED_FILE_RE.test(p),
80
+ },
81
+ {
82
+ category: 'stories',
83
+ description: '*.stories.* / *.story.* component stories',
84
+ match: (p) => STORIES_FILE_RE.test(p),
85
+ },
86
+ {
87
+ category: 'mocks',
88
+ description: '__mocks__/ + __fixtures__/ dirs and *.mock.* / *.fixture.* files',
89
+ match: (p) => hasDirSegment(p, MOCK_DIRS) || MOCK_FILE_RE.test(p),
90
+ },
91
+ {
92
+ category: 'config',
93
+ description: '*.config.* tool config (vite/jest/tailwind/… config modules)',
94
+ match: (p) => CONFIG_FILE_RE.test(p),
95
+ },
96
+ {
97
+ category: 'types',
98
+ description: 'redundant *.d.ts / *.d.mts / *.d.cts declaration files',
99
+ match: (p) => DTS_FILE_RE.test(p),
100
+ },
101
+ {
102
+ category: 'build',
103
+ description: 'build output dirs (dist/ build/ out/ coverage/ .next/ .expo/)',
104
+ match: (p) => hasDirSegment(p, BUILD_DIRS),
105
+ },
106
+ {
107
+ category: 'test',
108
+ description: 'Python tests: tests/ + test/ dirs and test_*.py / *_test.py / conftest.py',
109
+ match: (p) => hasDirSegment(p, PYTHON_TEST_DIRS) || PYTHON_TEST_FILE_RE.test(p),
110
+ },
111
+ {
112
+ category: 'generated',
113
+ description: 'Python migrations/ dirs (Django + Alembic schema migrations)',
114
+ match: (p) => hasDirSegment(p, PYTHON_MIGRATION_DIRS),
115
+ },
116
+ {
117
+ category: 'config',
118
+ description: 'Python setup.py packaging config',
119
+ match: (p) => PYTHON_SETUP_RE.test(p),
120
+ },
121
+ ];
122
+ /**
123
+ * The noise category of a repo-relative posix path, or null if it is legitimate
124
+ * source. Pure; first matching rule wins. Exported for unit tests + callers that
125
+ * want to classify without filtering a whole graph.
126
+ */
127
+ export function classifyNoise(path) {
128
+ for (const rule of NOISE_RULES) {
129
+ if (rule.match(path))
130
+ return rule.category;
131
+ }
132
+ return null;
133
+ }
134
+ function emptyCounts() {
135
+ const c = {};
136
+ for (const cat of NOISE_CATEGORIES)
137
+ c[cat] = 0;
138
+ return c;
139
+ }
140
+ /**
141
+ * Drop noise nodes (tests/generated/build/config/stories/mocks/types) from a
142
+ * NormalizedGraph, along with any edge whose endpoint left, and any external
143
+ * referenced ONLY by dropped files. Pure + deterministic (output order follows
144
+ * the input's file/edge order). Returns the filtered graph plus an auditable
145
+ * drop summary. When nothing matches, the SAME graph object is returned
146
+ * (referential stability for the common no-noise case).
147
+ */
148
+ export function filterNoise(graph) {
149
+ const byCategory = emptyCounts();
150
+ const droppedFiles = [];
151
+ const keep = new Set();
152
+ for (const f of graph.files) {
153
+ const cat = classifyNoise(f.id);
154
+ if (cat) {
155
+ byCategory[cat] += 1;
156
+ droppedFiles.push({ path: f.id, category: cat });
157
+ }
158
+ else {
159
+ keep.add(f.id);
160
+ }
161
+ }
162
+ if (droppedFiles.length === 0) {
163
+ return { graph, dropped: { total: 0, byCategory, edgesDropped: 0, files: [] } };
164
+ }
165
+ const files = graph.files.filter((f) => keep.has(f.id));
166
+ const edges = [];
167
+ const usedExternals = new Set();
168
+ let edgesDropped = 0;
169
+ for (const e of graph.edges) {
170
+ if (!keep.has(e.from)) {
171
+ edgesDropped += 1;
172
+ continue;
173
+ }
174
+ if (e.external) {
175
+ usedExternals.add(e.to);
176
+ edges.push(e);
177
+ }
178
+ else if (keep.has(e.to)) {
179
+ edges.push(e);
180
+ }
181
+ else {
182
+ // internal edge into a dropped node — remove cleanly (no dangling endpoint)
183
+ edgesDropped += 1;
184
+ }
185
+ }
186
+ // Prune externals nothing kept references anymore (e.g. vitest / testing-library
187
+ // imported only from tests) — keeps the externals list dangle-free + meaningful.
188
+ const externals = graph.externals.filter((x) => usedExternals.has(x.id));
189
+ return {
190
+ graph: { root: graph.root, files, edges, externals },
191
+ dropped: { total: droppedFiles.length, byCategory, edgesDropped, files: droppedFiles },
192
+ };
193
+ }
194
+ /** One-line log summary of a drop result (only meaningful when total > 0). */
195
+ export function summarizeNoise(dropped) {
196
+ const parts = NOISE_CATEGORIES.filter((c) => dropped.byCategory[c] > 0).map((c) => `${c}: ${dropped.byCategory[c]}`);
197
+ return `noise filter dropped ${dropped.total} file(s) [${parts.join(', ')}] + ${dropped.edgesDropped} edge(s)`;
198
+ }
199
+ //# sourceMappingURL=noise-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noise-filter.js","sourceRoot":"","sources":["../../src/graph/noise-filter.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AAC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AM,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;KACvF,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,cAAc,CAAC,OAAqB;IAClD,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CACzE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CACxC,CAAC;IACF,OAAO,wBAAwB,OAAO,CAAC,KAAK,aAAa,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,YAAY,UAAU,CAAC;AACjH,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { Uri } from '@zzzen/pyright-internal/dist/common/uri/uri.js';
2
+ import type { ModuleNode, ParseNode } from '@zzzen/pyright-internal/dist/parser/parseNodes.js';
3
+ import { type GraphExtractor, type NormalizedGraph } from './types.js';
4
+ /**
5
+ * The first-party source roots for a Python file set — every default root plus
6
+ * each directory that CONTAINS a top-level package (a dir with `__init__.py`
7
+ * whose parent is not itself a package). For `backend/app/__init__.py` the
8
+ * top-level package is `backend/app` and its containing root is `backend`, so
9
+ * `from app.x import y` resolves against `backend/app/x/y.py`. Additive: a
10
+ * root-layout repo already infers `''` and a src-layout `'src'` (both defaults),
11
+ * so single-package output is unchanged; only a NESTED package gains a root.
12
+ * Deterministic (sorted).
13
+ */
14
+ export declare function inferSourceRoots(internalIds: ReadonlySet<string>): string[];
15
+ export declare function syntacticResolve(importName: string, fromId: string, internalIds: ReadonlySet<string>, roots?: readonly string[]): string | undefined;
16
+ interface DeclResolver {
17
+ getDeclInfoForNameNode(node: ParseNode): {
18
+ decls: Array<{
19
+ uri: Uri;
20
+ }>;
21
+ } | undefined;
22
+ }
23
+ /**
24
+ * The internal call-edge targets (target file id → weight) for one file: each
25
+ * call site's callee resolved to its declaring in-repo file. Never throws — a
26
+ * single unresolvable call is skipped, and a broken evaluator degrades the whole
27
+ * file to no call edges. Self-calls (same file) + external/stdlib targets are
28
+ * dropped; a call resolving to several decls in ONE file counts once.
29
+ */
30
+ export declare function extractCallTargets(fromId: string, tree: ModuleNode, evaluator: DeclResolver, internalIds: ReadonlySet<string>, relOf: (uri: Uri) => string): Map<string, number>;
31
+ export declare class PythonExtractor implements GraphExtractor {
32
+ readonly language = "python";
33
+ extract(repoDir: string): Promise<NormalizedGraph>;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=python-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"python-adapter.d.ts","sourceRoot":"","sources":["../../src/graph/python-adapter.ts"],"names":[],"mappings":"AAyCA,OAAO,EAAE,GAAG,EAAE,MAAM,gDAAgD,CAAC;AAIrE,OAAO,KAAK,EAAY,UAAU,EAAE,SAAS,EAAE,MAAM,mDAAmD,CAAC;AACzG,OAAO,EAAuB,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAkB5F;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAgB3E;AA0CD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,KAAK,GAAE,SAAS,MAAM,EAAmB,GACxC,MAAM,GAAG,SAAS,CAgCpB;AA6HD,UAAU,YAAY;IACpB,sBAAsB,CAAC,IAAI,EAAE,SAAS,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,GAAG,CAAA;SAAE,CAAC,CAAA;KAAE,GAAG,SAAS,CAAC;CACrF;AAmCD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,YAAY,EACvB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,GAC1B,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA4BrB;AAYD,qBAAa,eAAgB,YAAW,cAAc;IACpD,QAAQ,CAAC,QAAQ,YAAY;IAEvB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CA0DzD"}