@preventive/triage 1.0.0-alpha.9 → 1.0.0-alpha.90

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 (448) hide show
  1. package/LICENSE-APACHE +202 -0
  2. package/README.md +16 -0
  3. package/api/reap.ts +16 -78
  4. package/cli.js +6 -0
  5. package/client/dependency-paths.d.ts +3 -0
  6. package/client/dependency-paths.js +36 -0
  7. package/client/finding-link.js +305 -0
  8. package/client/linked-findings.d.ts +1 -0
  9. package/client/linked-findings.js +115 -0
  10. package/common/bundle-commit.d.ts +1 -0
  11. package/common/bundle-commit.js +4 -0
  12. package/common/bundle-compare-diff.d.ts +6 -0
  13. package/common/bundle-compare-diff.js +378 -0
  14. package/common/bundle-compare-inputs.d.ts +3 -0
  15. package/common/bundle-compare-inputs.js +141 -0
  16. package/common/bundle-compare-versions.js +172 -0
  17. package/common/bundle-comparison.d.ts +8 -0
  18. package/common/bundle-comparison.js +69 -0
  19. package/common/bundle-imports.js +20 -0
  20. package/common/bundle-metadata.d.ts +15 -0
  21. package/common/bundle-metadata.js +226 -0
  22. package/common/bundle-pkg-of.d.ts +1 -0
  23. package/common/bundle-pkg-of.js +90 -0
  24. package/common/bundle-reasons.d.ts +6 -0
  25. package/common/bundle-reasons.js +58 -0
  26. package/common/bundle-source-links.d.ts +6 -0
  27. package/common/bundle-source-links.js +216 -0
  28. package/common/bundle-sourcemap.d.ts +10 -0
  29. package/common/bundle-sourcemap.js +100 -0
  30. package/common/bundle-sources.d.ts +10 -0
  31. package/common/bundle-sources.js +374 -0
  32. package/common/bundle-stats.js +41 -0
  33. package/common/bundle-tabs.js +1 -0
  34. package/common/code-language.js +80 -0
  35. package/common/default-scan-models.ts +37 -0
  36. package/common/dependency-reviews.d.ts +19 -0
  37. package/common/dependency-reviews.js +67 -0
  38. package/common/finding-duplicates.js +63 -0
  39. package/common/finding-filters.js +313 -0
  40. package/common/finding-id.js +47 -0
  41. package/common/finding-repo.d.ts +5 -0
  42. package/common/finding-repo.js +67 -0
  43. package/common/github-issue-labels.d.ts +3 -0
  44. package/common/github-issue-labels.js +42 -0
  45. package/common/github-pr.ts +56 -0
  46. package/common/gzip.js +59 -0
  47. package/common/line-diff.d.ts +15 -0
  48. package/common/line-diff.js +188 -0
  49. package/common/linked-workspace-groups.js +63 -0
  50. package/common/managed/agent-tasks.ts +292 -0
  51. package/common/managed/comments.ts +43 -0
  52. package/common/managed/dependency-routes.js +25 -0
  53. package/common/managed/directory-packages.ts +28 -0
  54. package/common/managed/finding-detail.d.ts +5 -0
  55. package/common/managed/finding-detail.js +75 -0
  56. package/common/managed/finding-values.d.ts +2 -0
  57. package/common/managed/finding-values.js +138 -0
  58. package/common/managed/github-agents.ts +114 -0
  59. package/common/managed/github-logins.ts +49 -0
  60. package/common/managed/lite-name.d.ts +2 -0
  61. package/common/managed/lite-name.js +20 -0
  62. package/common/managed/npm-packages.d.ts +9 -0
  63. package/common/managed/npm-packages.js +63 -0
  64. package/common/managed/permissions.ts +31 -0
  65. package/common/managed/report-content.ts +72 -0
  66. package/common/managed/report-filter.ts +120 -0
  67. package/common/managed/repository-alias.ts +65 -0
  68. package/common/managed/review-view-routes.js +23 -0
  69. package/common/managed/risk-routes.js +30 -0
  70. package/common/managed/roles.ts +48 -0
  71. package/common/managed/routes.d.ts +2 -0
  72. package/common/managed/routes.js +386 -0
  73. package/common/managed/scan-models.ts +6 -0
  74. package/common/managed/stasis-config.ts +7 -0
  75. package/common/managed/team-app.d.ts +19 -0
  76. package/common/managed/team-app.js +129 -0
  77. package/common/managed/team-filters.js +26 -0
  78. package/common/managed/triage.ts +83 -0
  79. package/common/managed/upload-seal.ts +126 -0
  80. package/common/npm-token.d.ts +2 -0
  81. package/common/npm-token.js +14 -0
  82. package/common/pretty-json.js +123 -0
  83. package/common/pretty-kinds.js +20 -0
  84. package/common/pretty-print.d.ts +7 -0
  85. package/common/pretty-print.js +41 -0
  86. package/common/pretty-sourcemap.js +70 -0
  87. package/common/repo-commit.d.ts +4 -0
  88. package/common/repo-commit.js +30 -0
  89. package/common/revalidation-conflicts.js +48 -0
  90. package/common/revalidation-input-groups.js +56 -0
  91. package/common/scan-server.ts +13 -0
  92. package/common/security-links.d.ts +5 -0
  93. package/common/security-links.js +33 -0
  94. package/common/server-info.ts +46 -0
  95. package/common/sourcemap-listing.js +78 -0
  96. package/common/sourcemap-mappings.js +136 -0
  97. package/common/sourcemap-unlist.js +85 -0
  98. package/common/stasis-files.d.ts +5 -0
  99. package/common/stasis-files.js +20 -0
  100. package/common/stasis-tgz.d.ts +6 -0
  101. package/common/stasis-tgz.js +27 -0
  102. package/common/utf8.d.ts +3 -0
  103. package/common/utf8.js +45 -0
  104. package/common/whitespace-insensitive.js +19 -0
  105. package/common/workspace-app.js +91 -0
  106. package/common/workspace-groups.js +176 -0
  107. package/out/activity.js +2 -0
  108. package/out/brotli-fallback.js +3 -3
  109. package/out/chunk-2XUEZHIP.js +28 -0
  110. package/out/chunk-3DOSBILK.js +4 -0
  111. package/out/chunk-55YIWY3H.js +5 -0
  112. package/out/chunk-5AVGKFMR.js +1 -0
  113. package/out/chunk-5PWEAEA5.js +1 -0
  114. package/out/chunk-6VOB5WXX.js +2 -0
  115. package/out/chunk-6Y6PZ2BU.js +9 -0
  116. package/out/chunk-74JZTGTO.js +11 -0
  117. package/out/chunk-7BKKYVWR.js +7 -0
  118. package/out/chunk-7C7DWL7I.js +1 -0
  119. package/out/chunk-7HP2VYIC.js +2 -0
  120. package/out/chunk-7YFJUT2P.js +1 -0
  121. package/out/chunk-A4BBBHQU.js +1 -0
  122. package/out/chunk-B64CTMVU.js +4 -0
  123. package/out/chunk-BEKYZCPX.js +14 -0
  124. package/out/chunk-BZJU5EEV.js +1 -0
  125. package/out/chunk-C4Z6ZBXV.js +10 -0
  126. package/out/chunk-CJVMNJDZ.js +3 -0
  127. package/out/chunk-CU3FPB3P.js +1 -0
  128. package/out/chunk-DEVAORP2.js +1 -0
  129. package/out/chunk-DUASGS2O.js +8 -0
  130. package/out/chunk-EEJA7JBI.js +13 -0
  131. package/out/chunk-ESXA7KID.js +1 -0
  132. package/out/chunk-FSU2PLJL.js +1 -0
  133. package/out/chunk-GO7FT4OD.js +1 -0
  134. package/out/chunk-GX5UXWT4.js +1 -0
  135. package/out/chunk-HGWFRZNC.js +267 -0
  136. package/out/chunk-IYPY47MC.js +1 -0
  137. package/out/chunk-JZAROLQT.js +40 -0
  138. package/out/chunk-K4XJHM2T.js +1 -0
  139. package/out/chunk-KP2XM324.js +6 -0
  140. package/out/chunk-LRWB6QVO.js +1 -0
  141. package/out/chunk-LVSLM7HB.js +1 -0
  142. package/out/chunk-LVW7WWV4.js +1 -0
  143. package/out/chunk-N57OWFKY.js +15 -0
  144. package/out/chunk-NRPC74AM.js +1 -0
  145. package/out/chunk-OOJM4CTU.js +1 -0
  146. package/out/chunk-PKLVXUEI.js +11 -0
  147. package/out/chunk-PLGH63UC.js +2 -0
  148. package/out/chunk-PNHBZGDD.js +1 -0
  149. package/out/chunk-PWFUOLZK.js +17 -0
  150. package/out/chunk-PXK7EU4V.js +1 -0
  151. package/out/chunk-QD3IBSF4.js +7 -0
  152. package/out/chunk-QI66YA4F.js +1 -0
  153. package/out/chunk-QRKFPLA4.js +80 -0
  154. package/out/chunk-R3NZFXVR.js +1 -0
  155. package/out/chunk-R5O6FAW4.js +2 -0
  156. package/out/chunk-RAM3GDAD.js +1 -0
  157. package/out/chunk-RPNO56H2.js +1 -0
  158. package/out/chunk-SMNFBOLO.js +10 -0
  159. package/out/chunk-SSPDMA6D.js +1 -0
  160. package/out/chunk-SZTCJVZJ.js +55 -0
  161. package/out/chunk-SZWPYLPC.js +1 -0
  162. package/out/chunk-TKPNRQNN.js +3 -0
  163. package/out/chunk-TUII34K2.js +1 -0
  164. package/out/chunk-UJP4PQJA.js +1 -0
  165. package/out/chunk-UJSJMXEG.js +1 -0
  166. package/out/chunk-UR4WYMIP.js +1 -0
  167. package/out/chunk-UTYWTUTC.js +1 -0
  168. package/out/chunk-VHEXSGGP.js +1 -0
  169. package/out/chunk-VYYUMYVW.js +9 -0
  170. package/out/chunk-WBK5ZN4K.js +3 -0
  171. package/out/chunk-WCDYSIKG.js +1 -0
  172. package/out/chunk-XM4RLC4A.js +2 -0
  173. package/out/chunk-XRAAYXPR.js +1 -0
  174. package/out/chunk-ZQHLECTI.js +1 -0
  175. package/out/client-managed-import.js +4 -0
  176. package/out/client-managed.js +35 -0
  177. package/out/client-sync.js +11 -17
  178. package/out/compare.js +26 -0
  179. package/out/dialogs.js +40 -0
  180. package/out/github-issue-authorized.html +3 -0
  181. package/out/github-issue-authorized.js +1 -0
  182. package/out/graph.js +19 -5
  183. package/out/index.html +105 -25
  184. package/out/prism.js +14 -10
  185. package/out/scan.js +2 -0
  186. package/out/stasis.svg +20 -0
  187. package/out/terminal.js +367 -39
  188. package/out/view.css +1 -1
  189. package/out/view.js +19 -148
  190. package/package.json +416 -64
  191. package/risk/actions/findings.js +161 -0
  192. package/risk/actions/resolve.js +287 -0
  193. package/risk/actions/scripts/commands.js +182 -0
  194. package/risk/actions/scripts/grade.js +113 -0
  195. package/risk/actions/scripts/packages.js +123 -0
  196. package/risk/actions/scripts/shell.js +169 -0
  197. package/risk/actions/uses.js +94 -0
  198. package/risk/actions/workflow.js +183 -0
  199. package/risk/files/characters.js +354 -0
  200. package/risk/files/hosts.js +206 -0
  201. package/risk/files/readability.js +185 -0
  202. package/risk/files/runs-code.js +568 -0
  203. package/risk/files/script.js +420 -0
  204. package/risk/files/source-map-link.js +43 -0
  205. package/risk/files/stamps.js +47 -0
  206. package/risk/index.d.ts +309 -0
  207. package/risk/index.js +12 -0
  208. package/risk/npm/assess.js +303 -0
  209. package/risk/npm/combined.js +68 -0
  210. package/risk/npm/compare.js +236 -0
  211. package/risk/npm/dependencies.js +172 -0
  212. package/risk/npm/diff.js +79 -0
  213. package/risk/npm/downloads.js +84 -0
  214. package/risk/npm/files.js +445 -0
  215. package/risk/npm/held.js +67 -0
  216. package/risk/npm/install-scripts.js +34 -0
  217. package/risk/npm/malware.js +38 -0
  218. package/risk/npm/manifest.js +65 -0
  219. package/risk/npm/new-dependency.js +60 -0
  220. package/risk/npm/old-version.js +108 -0
  221. package/risk/npm/registry.js +401 -0
  222. package/risk/npm/release.js +85 -0
  223. package/risk/npm/score.js +59 -0
  224. package/risk/npm/specs.js +124 -0
  225. package/risk/npm/tarball.js +169 -0
  226. package/server-common/database-config.ts +16 -0
  227. package/server-common/initialize.ts +18 -0
  228. package/server-common/npm-advisories.ts +101 -0
  229. package/{server → server-common}/origin.ts +5 -5
  230. package/server-common/reap.ts +48 -0
  231. package/server-common/scan-config.ts +19 -0
  232. package/server-common/standalone.ts +29 -0
  233. package/server-common/storage-crypto.ts +182 -0
  234. package/server-common/storage-log.ts +38 -0
  235. package/server-common/vercel-blob.ts +103 -0
  236. package/server-e2e/app.ts +487 -0
  237. package/{server → server-e2e}/bus-receiver.ts +2 -1
  238. package/{server → server-e2e}/cli.js +9 -4
  239. package/{server → server-e2e}/config.ts +52 -42
  240. package/{server → server-e2e}/db-neon.ts +2 -2
  241. package/{server → server-e2e}/db-revision-sql.ts +1 -1
  242. package/{server → server-e2e}/db-stmt.ts +2 -2
  243. package/{server → server-e2e}/db.ts +7 -7
  244. package/{server → server-e2e}/http.ts +44 -13
  245. package/{server → server-e2e}/hub.ts +40 -9
  246. package/server-e2e/index.ts +17 -0
  247. package/server-e2e/lifecycle.ts +95 -0
  248. package/{server → server-e2e}/neon-driver.ts +2 -2
  249. package/{server → server-e2e}/npm-proxy.ts +12 -145
  250. package/{server → server-e2e}/objstore/blob-vercel.ts +10 -114
  251. package/{server → server-e2e}/objstore/blob.ts +1 -1
  252. package/{server → server-e2e}/objstore/fetch-mint-guard.ts +2 -2
  253. package/{server → server-e2e}/objstore/handlers.ts +9 -8
  254. package/{server → server-e2e}/objstore/init.ts +19 -27
  255. package/{server → server-e2e}/objstore/reaper.ts +1 -1
  256. package/{server → server-e2e}/objstore/rest-deny.ts +1 -1
  257. package/{server → server-e2e}/objstore/rest-mint.ts +3 -3
  258. package/{server → server-e2e}/objstore/rest.ts +3 -3
  259. package/{server → server-e2e}/objstore/store-neon.ts +6 -10
  260. package/{server → server-e2e}/objstore/store.ts +7 -7
  261. package/{server → server-e2e}/objstore/tokens.ts +2 -2
  262. package/{server → server-e2e}/pubsub.ts +12 -9
  263. package/{server → server-e2e}/sign.ts +4 -4
  264. package/{server → server-e2e}/sse-server.ts +3 -3
  265. package/{server → server-e2e}/static.ts +18 -17
  266. package/{server → server-e2e}/sync-handlers.ts +56 -30
  267. package/{server → server-e2e}/ws-server.ts +20 -9
  268. package/server-managed/activity.ts +269 -0
  269. package/server-managed/agent-merges.ts +109 -0
  270. package/server-managed/app-agents.ts +23 -0
  271. package/server-managed/avatar-store.ts +21 -0
  272. package/server-managed/blob-store.ts +26 -0
  273. package/server-managed/brotli.ts +10 -0
  274. package/server-managed/bundle-advisories.ts +176 -0
  275. package/server-managed/bundle-advisory-inventory.ts +85 -0
  276. package/server-managed/bundle-build-diagnostics.d.ts +10 -0
  277. package/server-managed/bundle-build-diagnostics.js +23 -0
  278. package/server-managed/bundle-build-leases.ts +41 -0
  279. package/server-managed/bundle-build-worker.js +387 -0
  280. package/server-managed/bundle-build.ts +328 -0
  281. package/server-managed/bundle-cache.ts +261 -0
  282. package/server-managed/bundle-catalog.ts +29 -0
  283. package/server-managed/bundle-commits.ts +133 -0
  284. package/server-managed/bundle-dependency-reviews.ts +91 -0
  285. package/server-managed/bundle-store.ts +24 -0
  286. package/server-managed/bundle-summary-cache.ts +139 -0
  287. package/server-managed/bundle-validation.ts +33 -0
  288. package/server-managed/bundle.ts +151 -0
  289. package/server-managed/cache-storage.ts +20 -0
  290. package/server-managed/cli.js +21 -0
  291. package/server-managed/combined.ts +43 -0
  292. package/server-managed/comments.ts +138 -0
  293. package/server-managed/commit-coauthors.ts +105 -0
  294. package/server-managed/commit-lockfiles.ts +78 -0
  295. package/server-managed/comparison.ts +51 -0
  296. package/server-managed/config.ts +163 -0
  297. package/server-managed/content-access.ts +15 -0
  298. package/server-managed/crypto.ts +25 -0
  299. package/server-managed/db-methods.ts +1950 -0
  300. package/server-managed/db-neon.ts +401 -0
  301. package/server-managed/db-schema.ts +271 -0
  302. package/server-managed/db-table-names.ts +22 -0
  303. package/server-managed/db.ts +150 -0
  304. package/server-managed/dependabot-access.ts +85 -0
  305. package/server-managed/dependabot-alerts.ts +197 -0
  306. package/server-managed/dependency-review-comments.ts +158 -0
  307. package/server-managed/dependency-reviews.ts +369 -0
  308. package/server-managed/github-accounts.ts +59 -0
  309. package/server-managed/github-actions.ts +71 -0
  310. package/server-managed/github-app.ts +347 -0
  311. package/server-managed/github-errors.ts +92 -0
  312. package/server-managed/github-graphql.ts +42 -0
  313. package/server-managed/github-issue-links.ts +264 -0
  314. package/server-managed/github-issue-oauth.ts +30 -0
  315. package/server-managed/github-issues.ts +169 -0
  316. package/server-managed/github-link-oauth.ts +56 -0
  317. package/server-managed/github-links.ts +204 -0
  318. package/server-managed/github-metadata.ts +218 -0
  319. package/server-managed/github-oauth.ts +264 -0
  320. package/server-managed/github-pulls.ts +290 -0
  321. package/server-managed/github-requests.ts +181 -0
  322. package/server-managed/github-users.ts +53 -0
  323. package/server-managed/github-values.ts +26 -0
  324. package/server-managed/history-windows.ts +172 -0
  325. package/server-managed/http-response.ts +76 -0
  326. package/server-managed/http.ts +6722 -0
  327. package/server-managed/import-triage.ts +51 -0
  328. package/server-managed/index.ts +204 -0
  329. package/server-managed/kept-briefly.ts +37 -0
  330. package/server-managed/kept.ts +28 -0
  331. package/server-managed/known-listings.ts +112 -0
  332. package/server-managed/link-reports.ts +149 -0
  333. package/server-managed/listed-activity.ts +39 -0
  334. package/server-managed/locked-packages.ts +234 -0
  335. package/server-managed/lockfile-scope.ts +58 -0
  336. package/server-managed/lru.ts +30 -0
  337. package/server-managed/managed-issues.ts +92 -0
  338. package/server-managed/management-catalog.ts +45 -0
  339. package/server-managed/management.ts +116 -0
  340. package/server-managed/npm-delta-worker.js +203 -0
  341. package/server-managed/npm-delta.ts +277 -0
  342. package/server-managed/npm-insights.ts +455 -0
  343. package/server-managed/npm-kept.ts +274 -0
  344. package/server-managed/npm-loads.ts +259 -0
  345. package/server-managed/npm-manifest.ts +117 -0
  346. package/server-managed/npm-packages.ts +477 -0
  347. package/server-managed/npm-patch-paths.ts +86 -0
  348. package/server-managed/npm-patch.ts +457 -0
  349. package/server-managed/npm-provenance.ts +127 -0
  350. package/server-managed/npm-risk.ts +310 -0
  351. package/server-managed/object-storage-disk.ts +147 -0
  352. package/server-managed/object-storage-vercel.ts +71 -0
  353. package/server-managed/object-storage.ts +82 -0
  354. package/server-managed/package-entry-points.ts +127 -0
  355. package/server-managed/pretty-copies.ts +22 -0
  356. package/server-managed/pretty-format.d.ts +4 -0
  357. package/server-managed/pretty-format.js +27 -0
  358. package/server-managed/pretty-print.ts +444 -0
  359. package/server-managed/public-workspace.ts +242 -0
  360. package/server-managed/pull-comment-reviews.ts +161 -0
  361. package/server-managed/pull-dependencies.ts +370 -0
  362. package/server-managed/pull-dependency-reviews.ts +458 -0
  363. package/server-managed/pull-reviews.ts +202 -0
  364. package/server-managed/pulse-walk.ts +164 -0
  365. package/server-managed/queue.ts +54 -0
  366. package/server-managed/release-commits.ts +85 -0
  367. package/server-managed/rename-diff-worker.js +30 -0
  368. package/server-managed/rename-diff.ts +237 -0
  369. package/server-managed/repo-path.ts +21 -0
  370. package/server-managed/report-migration.ts +32 -0
  371. package/server-managed/report-opening.ts +77 -0
  372. package/server-managed/report-query.ts +10 -0
  373. package/server-managed/report-response.ts +16 -0
  374. package/server-managed/report-sources.ts +185 -0
  375. package/server-managed/report-store.ts +77 -0
  376. package/server-managed/repository-actions.ts +220 -0
  377. package/server-managed/repository-agents.ts +422 -0
  378. package/server-managed/repository-aliases.ts +119 -0
  379. package/server-managed/repository-browser.ts +362 -0
  380. package/server-managed/repository-changes.ts +280 -0
  381. package/server-managed/repository-code.ts +222 -0
  382. package/server-managed/repository-dependency-reviews.ts +220 -0
  383. package/server-managed/repository-discovery.ts +83 -0
  384. package/server-managed/repository-history.ts +444 -0
  385. package/server-managed/repository-issues.ts +293 -0
  386. package/server-managed/repository-policy.ts +27 -0
  387. package/server-managed/repository-pulls.ts +207 -0
  388. package/server-managed/repository-pulse.ts +409 -0
  389. package/server-managed/repository-risk-assess.ts +179 -0
  390. package/server-managed/repository-risk-audit.ts +145 -0
  391. package/server-managed/repository-risk-caches.ts +56 -0
  392. package/server-managed/repository-risk-kept.ts +86 -0
  393. package/server-managed/repository-risk-read.ts +296 -0
  394. package/server-managed/repository-risk-stasis.ts +61 -0
  395. package/server-managed/repository-risk-turn.ts +97 -0
  396. package/server-managed/repository-risk.ts +528 -0
  397. package/server-managed/repository-squashes.ts +160 -0
  398. package/server-managed/repository-stamp.ts +41 -0
  399. package/server-managed/request-timing.ts +63 -0
  400. package/server-managed/reviewed-dependencies.ts +170 -0
  401. package/server-managed/revisions.ts +35 -0
  402. package/server-managed/scan-downloads.ts +121 -0
  403. package/server-managed/session.ts +132 -0
  404. package/server-managed/slugs.ts +38 -0
  405. package/server-managed/solidity-entry-points.ts +71 -0
  406. package/server-managed/sql-postgres.ts +34 -0
  407. package/server-managed/sql.ts +107 -0
  408. package/server-managed/stasis-config.ts +147 -0
  409. package/server-managed/stasis-dependencies.ts +280 -0
  410. package/server-managed/static.ts +28 -0
  411. package/server-managed/storage-command.ts +16 -0
  412. package/server-managed/storage-db.ts +183 -0
  413. package/server-managed/storage-encryption.ts +288 -0
  414. package/server-managed/storage-maintenance.ts +259 -0
  415. package/server-managed/storage-payload.ts +121 -0
  416. package/server-managed/storage-stores.ts +91 -0
  417. package/server-managed/storage.ts +82 -0
  418. package/server-managed/team-app-summaries.ts +57 -0
  419. package/server-managed/team-app.ts +162 -0
  420. package/server-managed/team-catalog.ts +7 -0
  421. package/server-managed/team-feed.ts +180 -0
  422. package/server-managed/team-icons.ts +50 -0
  423. package/server-managed/team-npm-scopes.ts +103 -0
  424. package/server-managed/team-progress.ts +77 -0
  425. package/server-managed/team-reports.ts +369 -0
  426. package/server-managed/triage-response.ts +16 -0
  427. package/server-managed/type-only-proof.js +181 -0
  428. package/server-managed/type-only-worker.js +31 -0
  429. package/server-managed/type-only.ts +135 -0
  430. package/server-managed/uploads.ts +106 -0
  431. package/server-managed/upstream-cache.ts +275 -0
  432. package/server-managed/view-as.ts +58 -0
  433. package/server-managed/worker-turns.ts +76 -0
  434. package/server-managed/workspace-shares.ts +170 -0
  435. package/server.ts +70 -0
  436. package/strip-types-loader.js +13 -10
  437. package/server/index.ts +0 -480
  438. package/server/lifecycle.ts +0 -208
  439. /package/{LICENSE → LICENSE-MIT} +0 -0
  440. /package/{server → server-e2e}/auth.ts +0 -0
  441. /package/{server → server-e2e}/config.example.json +0 -0
  442. /package/{server → server-e2e}/objstore/blob-fs.ts +0 -0
  443. /package/{server → server-e2e}/objstore/fs.ts +0 -0
  444. /package/{server → server-e2e}/objstore/sign.ts +0 -0
  445. /package/{server → server-e2e}/peer.ts +0 -0
  446. /package/{server → server-e2e}/sse-session.ts +0 -0
  447. /package/{server → server-e2e}/util.ts +0 -0
  448. /package/{server → server-e2e}/validation.ts +0 -0
@@ -0,0 +1 @@
1
+ function e(e,{packageDir:t=null}={}){if(t){if(t!==`.`){let e=t.match(/(?:^|\/)node_modules\/(@[^/]+\/[^/]+|[^/]+)$/u);return e&&e[1]!==`.pnpm`?e[1]:t}}else{let t=/\.sol$/iu.test(e)?/(?:^|\/)(?:node_modules\/(@[^/]+\/[^/]+|[^/]+)|dependencies\/(@[^/]+\/[^/]+|[^/]+)\/)/gu:/(?:^|\/)node_modules\/(@[^/]+\/[^/]+|[^/]+)/gu,n;for(;(n=t.exec(e))!==null;){let e=n[1]??n[2];if(e!==`.pnpm`)return e}}return`__own__`}function t(t,n=null){return e(t,{packageDir:n})===`__own__`||!!n&&!/(?:^|\/)(?:node_modules|dependencies|vendor)(?:\/|$)/u.test(n)}function n(e,n=null){let r=[],i=[];for(let a of e)(t(a,n?.get(a))?r:i).push(a);return[...r,...i]}function r(e){return e===`__own__`?`Own source`:typeof e==`string`?e.match(/^(?:.*\/)?vendor\/(.+)$/u)?.[1]??e:e}function i(e){return typeof e==`string`&&/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u.test(e)?e:null}export{i as a,e as b,t as c,n as d,r as e};
@@ -0,0 +1,40 @@
1
+ import{b as e,h as t}from"./chunk-TKPNRQNN.js";import{a as n}from"./chunk-74JZTGTO.js";import{a as r,b as i,e as a}from"./chunk-IYPY47MC.js";import{B as o,F as s,b as c,c as l,i as u,z as d}from"./chunk-SMNFBOLO.js";import{a as f,b as p,c as m}from"./chunk-C4Z6ZBXV.js";import{A as h,B as g,D as _,E as v,b as y,c as b,d as x,j as S,m as C,p as w,s as T,t as E,w as D,z as O}from"./chunk-QRKFPLA4.js";import{c as k,f as A,g as j,i as ee}from"./chunk-2XUEZHIP.js";var te=p(class extends m{constructor(e){if(super(e),e.type!==f.ATTRIBUTE||e.name!==`class`||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return` `+Object.keys(e).filter(t=>e[t]).join(` `)+` `}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(` `).split(/\s/).filter(e=>e!==``)));for(let e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}let n=e.element.classList;for(let e of this.st)e in t||(n.remove(e),this.st.delete(e));for(let e in t){let r=!!t[e];r===this.st.has(e)||this.nt?.has(e)||(r?(n.add(e),this.st.add(e)):(n.remove(e),this.st.delete(e)))}return A}});function ne(e){let t=typeof e==`string`?e.trim():``;return/^[0-9a-f]{7,64}$/iu.test(t)?t:``}function re(e){return ne(e?.commit)}function M(e,t){return typeof e==`string`&&typeof t==`string`&&e!==``&&e.toLowerCase()===t.toLowerCase()}function ie(e,t){return M(t,_(e))?re(e?.repo):``}function ae(e,t){let n=e?.advisory?.package,r=e?.repo?.github;if(typeof n!=`string`||n===``||typeof r!=`string`||r===``)return!1;let i=_({repo:{github:r}}),a=i?.split(`/`)[1].toLowerCase();return a!==n.toLowerCase()&&a!==n.replace(/^@[^/]+\//u,``).toLowerCase()?!1:!M(i,typeof t==`string`&&t!==``?_({repo:{github:t}})??t:``)}function oe(e,t){if(!ae(e,t))return e;let{repo:n,...r}=e;return{...r,_repoIgnored:!0}}var se=e=>e.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`),ce=e=>c(e)?e:se(l(String(e))),le=globalThis.trustedTypes?.createPolicy(`deepview`,{createHTML:ce,createScriptURL:e=>{let t=new URL(e,globalThis.location.href);if(t.origin!==globalThis.location.origin)throw TypeError(`Not a same-origin script: ${t.href}`);return t.href}}),ue=e=>le?le.createHTML(e):ce(e),de=e=>le?le.createScriptURL(String(e)):e,N={showAll:!1,packagesView:!1,dependencyPackagesView:!1,flowPackagesView:!1,bundleIssues:!1,bundleLayout:`graph`,lockfileLayout:`dependencies`,bundleReason:null,bundleReasonFor:null,selected:null,focusedPkg:null,topPkgsTab:`issues`,selectedSeverities:new Set,selectedColors:new Set,pathFilter:``,hidden:new Set,solo:null,graphState:null,layoutCache:null,keptViewport:null};function fe({keepViewport:e=!1}={}){N.graphState?._cleanup?N.graphState._cleanup({keepViewport:e}):e||(N.keptViewport=null),N.graphState=null}function P(e){return e.id??String(e._id)}function pe(e){let t=w(e);return t!==``&&t!==`revalidation`}var me=[{value:`confirmed`,label:`Confirmed`,kinds:[`confirmed`,`partial`,`revalidation`]},{value:`unreachable`,label:`Unreachable`,kinds:[`unreachable`]},{value:`refuted`,label:`Refuted`,kinds:[`refuted`]}],he={value:`unrevalidated`,label:`Not revalidated`,kinds:[``]},ge=[...me,he];function _e(e){return ge.find(t=>t.value===e)}function ve(e){return _e(e)?.kinds??null}var ye=[``,`exclude`,`only`];function be(e,t){let n=ve(e);return n?.includes(`partial`)?t===`only`?[`partial`]:t===`exclude`?[`confirmed`]:n:n}function F(e){if(e.confidence!==void 0)return e.confidence;if(e.critical===!0||e._source)return 10}var xe=e=>e.confidence!==void 0||e.critical===!0;function Se(e){return e.every(e=>e.every(e=>F(e)!==void 0))&&e.some(e=>e.some(xe))}function Ce(e,t,n){return e.some(e=>{let r=[`refuted`,`unreachable`].includes(n(e))?0:F(e);return r===void 0?t===0:r>=t})}function we(e,t){let n=e.map(t).filter(e=>e.length>0);if(!n.some(e=>e.some(e=>F(e)!==void 0)))return 0;let r=e=>n.reduce((t,n)=>t+ +!!n.some(t=>(F(t)??-1)>=e),0),i;for(i=r(6)<=25?6:r(7)<=25?7:8;i>0&&r(i)===0;)i--;for(;i>0&&r(i-1)===r(i);)i--;return i}function Te(e,t){return Se(e)?t:0}function Ee(e,t,n){let r=new Set(e.ruledOutIds??[]);for(let t of e)for(let e of t)([`refuted`,`unreachable`].includes(n(e))||e._opensAsApp===!0)&&r.add(P(e));for(let i of e){let e=t(i);if(e.length!==0&&e.some(e=>be(`confirmed`,``).includes(n(e)||(e._source&&!e._sourcePass?`revalidation`:``)))){for(let e of i)if(r.add(P(e)),e.isApp&&Array.isArray(e.revalidateInputs))for(let t of e.revalidateInputs)t&&r.add(t)}}return r}function De(e,t,n,r){let i=Te(e,t),a=e.filter(e=>Ce(e,i,r)),o=new Set(be(`confirmed`,``));return e.some(e=>e.some(e=>o.has(r(e))))?a.every(e=>e.every(e=>n.has(P(e)))):!1}function Oe(e,{tabs:t,kindOf:n,severityMode:r}){let i=e.map(t).filter(e=>e.length>0),a=Ee(e,t,n);if(!De(i,we(e,t),a,n))return!1;let o=Te(i,6);return i.every(e=>!Ce(e,o,n)||!e.some(e=>C(e,r)!==`low`)||e.every(e=>a.has(P(e))))}function ke(e){if(!e)return e;let t="`".repeat(Math.max(0,...[...e.matchAll(/`+/gu)].map(e=>e[0].length))+1),n=/^`|`$/u.test(e)||e.startsWith(` `)&&e.endsWith(` `)&&e.trim()!==``?` `:``;return`${t}${n}${e}${n}${t}`}var I=!0;function Ae(e,t=!1){I=e!==!1&&!t}function je(){return I}function L(e){return I?w(e):``}function Me(e){return w(e)!==``}function Ne(e){return e.some(e=>(e.groups??[]).some(e=>e.some(pe)))}function Pe(e){let t=L(e);return t&&t!==`revalidation`?t:null}function Fe(e){return L(e)===`revalidation`}var Ie=new Set([`refuted`,`unreachable`]);function Le(e){return Ie.has(L(e))}function Re(e,t=!1){let n=new Set(e);n.delete(``);let r=me.filter(e=>e.kinds.some(e=>n.has(e)));return t&&n.size>0?[...r,he]:r}function ze(e){return RegExp(`(^|/)${e}/`,`u`)}function Be(e){return RegExp(`^(?:.*/)?${e}/(?:@[^/]+/[^/]+|[^/]+)/(.*)$`,`u`)}var Ve=ze(`node_modules`),He=ze(`vendor`),R=`node_modules`,Ue=ze(R),We=Be(R),Ge=(e,t)=>e?.length===t.length&&e.every((e,n)=>e===t[n]),Ke=null;function qe(t){if(Ge(Ke,t))return;Ke=[...t];let n=e(t);n!==R&&(R=n,Ue=ze(n),We=Be(n))}function Je(){return R}function z(e){return Ue.test(e)}var Ye=new WeakSet;function Xe(e){let t=!1;for(let n of e??[])for(let e of n.groups??[])for(let n of e){if(n.isApp!==!1)continue;let e=Ye.has(n);`isUpstream`in n&&!e||(z(n.file)?(n.isUpstream!==!0&&(t=!0),n.isUpstream=!0,Ye.add(n)):e&&(t=!0,delete n.isUpstream,Ye.delete(n)))}return t}function Ze(e){let t=typeof e==`string`?e:``;return Ve.test(t)||He.test(t)||Ue.test(t)}var Qe=/^(.*(?:^|\/)node_modules\/(?:@[^/]+\/[^/]+|[^/]+))(?:\/|$)/u;function $e(e){return Qe.exec(typeof e==`string`?e:``)?.[1]??null}function et(e){if(typeof e!=`object`||!e)return null;for(let[t,n]of Object.entries(e))if(typeof n?.name==`string`&&n.name!==``)return`${t}:${n.name}@${typeof n.version==`string`?n.version:``}`;return null}var tt=null,nt={byRoot:new Map,byPackage:new Map},rt=e=>`${e?._managedReportId??``}\0${e?._reportName??``}`,it=(e,t)=>`${rt(e)}\0${t}`,at=e=>_({repo:{github:e.id}})??e.id;function ot(e,t){if(e===null)return null;let n=V(t),r=V(e),[i,a]=[r.commit.toLowerCase(),n.commit.toLowerCase()];return!M(at(r),at(n))||r.prefix!==n.prefix||!(i.startsWith(a)||a.startsWith(i))?null:a.length>i.length?t:e}function st(e){let t=Array.isArray(e)?e:[],n=t.flatMap(e=>[e,e?.groups]);if(Ge(tt,n))return;tt=n;let r=new Map,i=new Map,a=(e,t,n)=>e.set(t,e.has(t)?ot(e.get(t),n):n);for(let e of t)for(let t of e?.groups??[])for(let e of t){if(!e||e._repoIgnored||ae(e,e._repoFallback))continue;let t=V(e.repo);if(!t.id||!t.commit)continue;let n=$e(e.file),o=et(e.package);if(n!==null){let t=it(e,n),r=i.get(t),a=r===void 0?e.repo:r&&r.pkg===o?ot(r.repo,e.repo):null;i.set(t,a&&{repo:a,pkg:o})}o!==null&&!o.endsWith(`@`)&&a(r,o,e.repo)}nt={byRoot:i,byPackage:r}}function ct(e){return Number.isFinite(e)?n(e):null}function lt(e){if(e.length<=1)return{prefix:``,stripped:[...e]};let t=e.map(e=>e.split(`/`)),n=Math.min(...t.map(e=>e.length)),r=0;for(;r<n-1&&t.every(e=>e[r]===t[0][r]);)r++;return r>0&&t[0][r-1].startsWith(`@`)&&r--,r>0&&t[0][r-1]===`node_modules`&&r--,r===0?{prefix:``,stripped:[...e]}:{prefix:`${t[0].slice(0,r).join(`/`)}/`,stripped:t.map(e=>e.slice(r).join(`/`))}}function ut(e){return e.match(We)?.[1]??e}var B={on:new WeakMap,off:new WeakMap};function dt(e){let t=I?B.on:B.off,n=t.get(e);if(n===void 0){let r=I?[Pe(e),e.revalidateVerdict,e.revalidateRecommendation]:[];n=[e.file,e.title,e.description,e.impact,e.reproduction,an(e),e.recommendation,e.confidenceReason,...r,e.discoveredIn,e.repo?.github].filter(Boolean).join(`
2
+ `).toLowerCase(),t.set(e,n)}return n}function ft(e){B.on.delete(e),B.off.delete(e)}function pt(e){return[typeof e?.category==`string`?e.category.trim():``,T(e,I)].filter(Boolean).join(` · `)}function mt(e){if(e.length===0)return``;let t=e[0];for(let n=1;n<e.length;n++){for(;t&&!e[n].startsWith(t);)t=t.slice(0,-1);if(!t)return``}return t}function ht(e){if(!e)return``;let t=e.match(/github\.com\/([^/?#]+\/[^/?#]+?)(?:\.git)?(?:[/?#]|$)/iu);return t?t[1]:e}function gt(e){if(!e)return null;let t=e.trim().replace(/\/$/u,``);return t?/^https?:\/\//iu.test(t)?t:/^github\.com\//iu.test(t)?`https://${t}`:`https://github.com/${t}`:null}var _t=/^(?:@[\w.-]+\/)?[\w.-]+@[^/\s@]+$/u;function vt(e){return _t.test(e||``)}function V(e){if(e==null||typeof e==`string`)return{id:e??``,prefix:``,commit:``};let t=v(e);return{id:typeof e.github==`string`?e.github:``,prefix:t?`${t}/`:``,commit:re(e)}}function yt(e,t,n,r=``){if(vt(e))return null;let i=V(t),a=V(n),o=ne(r);if(i.id){let t=_({repo:{github:i.id}}),n=gt(t??i.id),r=M(t,_({repo:{github:a.id}}));return`${n}/blob/${i.commit||(r?a.commit:``)||(r||!Ze(e)?o:``)||`HEAD`}/${i.prefix}${ut(e)}`}if(z(e))return null;let s=gt(a.id);return s?`${s}/blob/${a.commit||o||`HEAD`}/${a.prefix}${e}`:null}function bt(e,t){let n=e?.file??``,r=H(e,t);return r?k`<a href="${xt(r)}" target="_blank" rel="noopener">${n}</a>`:n}function xt(e){return e.replace(wt,``)}function St({start:e,end:t}){return t>e?`#L${e}-L${t}`:`#L${e}`}function H(e,t){if(!e)return null;if(g(e.location))return e.location;let n=yt(e.file,e.repo,t,e.auditedCommit);if(!n)return null;let r=K(e.line);if(r)return`${n}${St(r)}`;let i=parseInt(e.line,10);return Number.isFinite(i)?`${n}#L${i}`:n}var Ct=/^https?:\/\/(?:www\.)?github\.com\/([^/\s]+\/[^/\s]+)\/(?:blob|tree|blame)\/[^/\s]+\/(\S+)$/u,wt=/#L(\d+)(?:-L?(\d+))?$/u;function Tt(e){let t=typeof e==`string`?Ct.exec(e):null;if(!t)return``;let n=wt.exec(t[2]);return n?`${t[1]}/${t[2].slice(0,n.index)}:${n[2]?`${n[1]}-${n[2]}`:n[1]}`:`${t[1]}/${t[2]}`}function Et(e,t){let n=[],r=0;for(let[i,a]of t)n.push(e.slice(r,i),e.slice(i,a)),r=a;return n.push(e.slice(r)),n}var Dt=/^(?:\s+\S|[-*+] |\d+[.)] |>|#{1,6}(?:[ \t]|$)|\||`{3}|~{3})/u;function Ot(e){return e.split(/(\n{2,})/u).map(e=>{if(/^\n+$/u.test(e))return e;let t=e.split(`
3
+ `);return t.some(e=>Dt.test(e)||W.test(e))?e:t.map(e=>e.trim()).filter(Boolean).join(` `)}).join(``)}function kt(e,t,n){let r=t?/^\n*/u.exec(e)[0]:``,i=e.slice(r.length),a=n?/\n*$/u.exec(i)[0]:``;return r+Ot(i.slice(0,i.length-a.length))+a}function At(e){if(!e)return e;let t=e.replaceAll(`\r
4
+ `,`
5
+ `),n=y(t);if(n.length===0)return Ot(t);let r=Et(t,n);return r.map((e,t)=>t%2||!e?e:kt(e,t>0,t<r.length-1)).join(``)}var jt=/^( *)(`{3,}|~{3,})(.*)$/u,Mt=/^[a-z0-9+#._-]{1,20}$/u;function Nt(e,t){let n=0;for(;n<t&&e[n]===` `;)n++;return e.slice(n)}function Pt(e){let t=e.split(`
6
+ `),n=jt.exec(t[0]),r=(n?.[2]??"```").slice(0,3),i=(n?.[3]??``).trim().split(/\s+/u)[0].toLowerCase(),a=!!(t.length>1?jt.exec(t.at(-1)):null)?.[2].startsWith(r),o=n?.[1].length??0,s=t.slice(1,a?-1:void 0);return{lang:Mt.test(i)?i:``,code:(o>0?s.map(e=>Nt(e,o)):s).join(`
7
+ `)}}function Ft(e){let t=y(e||``);return t.length===0?[e]:Et(e,t).flatMap((e,t)=>{if(t%2)return[Pt(e)];let n=(t>0?e.replace(/^\n+/u,``):e).replace(/\n+$/u,``);return n?[n]:[]})}var U=/^( *)(?:[-*+]|(\d{1,9})[.)]) +(?=\S)/u,W=/^ {0,3}([-*_])(?:[ \t]*\1){2,}[ \t]*$/u;function It(e){return/^ */u.exec(e)[0].length}function Lt(e){let t=y(e),n=e.split(`
8
+ `),r=[],i=0;for(let e of n)r.push(i),i+=e.length+1;return{lines:n,inCode:e=>b(t,r[e])}}function Rt(e){let t=typeof e==`string`?e:``;if(!t)return[e];let{lines:n,inCode:r}=Lt(t),i=e=>!r(e)&&!W.test(n[e])&&U.test(n[e]),a=[],o=0,s=0,c=e=>{let t=n.slice(o,e).join(`
9
+ `).replace(/^\n+/u,``).replace(/\n+$/u,``);t.trim()&&a.push(t)};for(;s<n.length;){if(!i(s)){s++;continue}c(s);let e=U.exec(n[s]),t=!!e[2],l=[],u=null,d=!1;for(;s<n.length;){let e=n[s];if(!r(s)){if(!e.trim()){u.lines.push(``),d=!0,s++;continue}let n=It(e),r=W.test(e)?null:U.exec(e);if(r&&(!u||n<u.column)){if(!!r[2]!==t)break;u&&l.push(G(u.lines)),u={column:r[0].length,lines:[e.slice(r[0].length)]},d=!1,s++;continue}if(n<u.column&&(d||zt.test(e)||W.test(e)||Ht.test(e)))break}u.lines.push(Nt(e,u.column)),d=!1,s++}u&&l.push(G(u.lines)),a.push({ordered:t,start:t?Number(e[2]):null,items:l}),o=s}return a.length===0?[e]:(c(n.length),a)}var zt=/^ {0,3}(#{1,6})[ \t]+(\S.*?)(?:[ \t]+#+)?[ \t]*$/u,Bt=/^ {0,3}-+[ \t]*$/u;function Vt(e){let t=e.split(`
10
+ `),n=[],r=0,i=e=>{let i=t.slice(r,e).join(`
11
+ `).replaceAll(/^(?:[ \t]*\n)+|(?:\n[ \t]*)+$/gu,``);i.trim()&&n.push(i)};return t.forEach((e,a)=>{let o=zt.exec(e),s=W.test(e)&&(a===r||!t[a-1].trim()||!Bt.test(e));!o&&!s||(i(a),n.push(o?{level:o[1].length,text:o[2]}:{rule:!0}),r=a+1)}),n.length===0?[e]:(i(t.length),n)}var Ht=/^ {0,3}>/u,Ut=/^ {0,3}> ?/u,Wt=/^[ \t]*\[!(note|tip|important|warning|caution)\][ \t]*$/iu,Gt=/^ {0,3}(?:`{3}|~{3})/u,Kt=/^(?: {0,3}> ?| *(?:[-*+]|\d{1,9}[.)])(?: +|$))*/u,qt=16,Jt=e=>zt.test(e)||W.test(e)||Gt.test(e);function Yt(e,t){let n=jt.exec(t);return n?e?n[2][0]===e[0]&&n[2].length>=e.length&&!n[3].trim()?``:e:n[2][0]==="`"&&n[3].includes("`")?``:n[2]:e}function G(e){let t=0,n=e.length;for(;t<n&&!e[t].trim();)t++;for(;n>t&&!e[n-1].trim();)n--;return e.slice(t,n).join(`
12
+ `)}function Xt(e,{alerts:t=!0}={}){let n=typeof e==`string`?e:``;if(!/^ {0,3}>/mu.test(n))return[e];let{lines:r,inCode:i}=Lt(n),a=e=>Ht.test(r[e])&&!i(e),o=[],s=0,c=0;for(;c<r.length;){if(!a(c)){c++;continue}c>s&&o.push(r.slice(s,c).join(`
13
+ `));let e=[],n=``,i=!1;for(;c<r.length;c++){let t=r[c];if(a(c)){let r=t.replace(Ut,``),a=n!==``;n=Yt(n,r);let o=r.replace(Kt,``);i=!a&&!n&&o.trim()!==``&&!Jt(o),e.push(r)}else if(i&&t.trim()&&!Jt(t)&&!U.test(t))e.push(t);else break}let l=t?Wt.exec(e[0]):null,u=l?G(e.slice(1)):``;o.push({quote:!0,alert:u?l[1].toLowerCase():null,body:u||G(e)}),s=c}return s<r.length&&o.push(r.slice(s).join(`
14
+ `)),o}function Zt(e,t=qt){return t<=0?e:Xt(e).map(e=>typeof e==`string`?e:Zt(e.body,t-1)).join(`
15
+ `)}var Qt=/^(\d+)(?:\s*-\s*(\d+))?$/u;function K(e){if(typeof e==`number`)return Number.isFinite(e)&&e>=1?{start:Math.floor(e),end:Math.floor(e)}:null;let t=Qt.exec(String(e??``).trim());if(!t)return null;let n=parseInt(t[1],10),r=t[2]===void 0?n:parseInt(t[2],10);return!Number.isFinite(n)||n<1||!Number.isFinite(r)||r<1?null:{start:Math.min(n,r),end:Math.max(n,r)}}function $t(e){return e?e.start===e.end?String(e.start):`${e.start}-${e.end}`:``}function en(e){if(e&&typeof e==`object`){let t=K(e.start);if(!t)return null;let n=K(e.end)??t;return{start:t.start,end:Math.max(t.start,n.end)}}return K(e)}function tn(e,t,n=4){let r=typeof e==`string`&&e!==``?e.split(`
16
+ `):[];if(r.length===0)return{text:``,startLine:1,lines:[]};let i=en(t),a=i&&{start:Math.min(i.start,r.length),end:Math.min(i.end,r.length)},o=a?Math.max(1,a.start-n):1,s=a?Math.min(r.length,a.end+n):Math.min(r.length,n*2+1),c=r.slice(o-1,s);return{text:c.join(`
17
+ `),startLine:o,lines:c}}function nn(e,t,n,r,i=null){if(g(e?.url))return e.url;let a=e?.file;if(typeof a!=`string`||a===``)return null;let o=t?.file??``,s=t?.repo?.github,c=t?.auditedCommit,l=t=>H({file:a,line:e?.line,...t},n);if(r===0&&a===o)return String(e?.line??``).trim()===String(t?.line??``).trim()?H(t,n):l({repo:t.repo,auditedCommit:c});if(V(e?.repo).id)return l({repo:e.repo});let u=$e(a),d=et(e?.package),f=d===null?u!==null&&u===$e(o):d===et(t?.package);if(s&&f)return l({repo:t.repo,auditedCommit:c});let p=u===null?null:nt.byRoot.get(it(t,u)),m=(d===null?null:nt.byPackage.get(d))??(p&&(d===null||p.pkg===d)?p.repo:null);if(m)return l({repo:m});if(Ze(a)){let t=i?.(e);return t?l({file:t.file,repo:t.repo}):null}return s&&!Ze(o)?l({repo:t.repo,auditedCommit:c}):l({auditedCommit:c})}function rn(e,{spaced:t=!1,link:n=e=>e.url,lineLinks:r=!1}={}){let i=Array.isArray(e?.evidence)?e.evidence:[];return i.length===0?``:i.map((e,t)=>{let i=O(e),a=n(e,t),o=[`${t+1}. ${a?`[${i}](${a})`:r?ke(i):i}`],s=r?sn(h(e),a):h(e);if(s)for(let e of s.split(`
18
+ `))o.push(` ${e}`);return o.join(`
19
+ `)}).join(t?`
20
+
21
+ `:`
22
+ `)}function an(e,{repoFallback:t,shipped:n=null}={}){let r=t!==void 0,i=rn(e,{link:r?(r,i)=>nn(r,e,t,i,n):void 0,lineLinks:r});return i?`**Evidence:**
23
+ ${i}`:``}var on=/\(\s*(?:lines?|L)\s*(\d+)(?:\s*(?:-|–|—|to)\s*L?(\d+))?\s*\)/giu;function sn(e,t){if(!e||!t||!Ct.test(t)||!/\(\s*(?:lines?|L)\s*\d/iu.test(e))return e;let n=xt(t),r=e=>{let t=cn(e);return e.replaceAll(on,(e,r,i,a)=>{let o=b(t,a)?null:K(i?`${r}-${i}`:r);return o?`([${e.slice(1,-1).trim()}](${n}${St(o)}))`:e})};return Et(e,y(e)).map((e,t)=>t%2?e:r(e)).join(``)}function cn(e){let t=[],n=[...e.matchAll(/`+/gu)].map(e=>[e.index,e.index+e[0].length]),r=[],i=new Map;for(let e=n.length-1;e>=0;e--){let t=n[e][1]-n[e][0];r[e]=i.get(t),i.set(t,e)}for(let e=0;e<n.length;e++)r[e]!==void 0&&(t.push([n[e][0],n[r[e]][1]]),e=r[e]);let[a,o,s,c]=[`
24
+ `,`]`,`)`,`>`].map(t=>{let n=Array.from({length:e.length+1},()=>1/0);for(let r=e.length-1;r>=0;r--)n[r]=e[r]===t?r:n[r+1];return n}),l=t.length,u=0;for(let n=0;n<e.length;n++){for(;u<l&&t[u][1]<=n;)u++;if(u<l&&t[u][0]<=n){n=t[u][1]-1;continue}let r=-1;if(e[n]===`[`&&o[n+1]<a[n]){r=o[n+1]+1;let t=e[r]===`(`?s[r]:e[r]===`[`?o[r+1]:1/0;t<a[r]&&(r=t+1)}else if(e[n]===`<`&&c[n+1]<a[n])r=c[n+1]+1;else if((e[n]===`h`||e[n]===`H`)&&/^https?:\/\//iu.test(e.slice(n,n+8))&&!/\w/u.test(e[n-1]??``))for(r=n;r<e.length&&!/\s/u.test(e[r]);)r++;r>n&&(t.push([n,r]),n=r-1)}t.sort((e,t)=>e[0]-t[0]);let d=[];for(let[e,n]of t){let t=d.at(-1);t&&e<t[1]?t[1]=Math.max(t[1],n):d.push([e,n])}return d}function ln(e){let t=/^\[([^\]]+)\]\(([^)\s]+)\)$/u.exec(e);return!t||!g(t[2])?null:{label:x(t[1].trim())||t[2],url:t[2]}}function un(e,t){let n=parseInt(e?.line,10);if(!Number.isFinite(n))return j;let r=H(e,t),i=`line ${n}`;return r?k`<a href="${r}" target="_blank" rel="noopener">${i}</a>`:i}function dn(e,t){return!e||!t?null:`${/^https?:/iu.test(e)?e.replace(/\/$/u,``):`https://github.com/${e}`}/commit/${t}`}var fn=[[`Impact`,`impact`],[`Reproduction`,`reproduction`],[`Recommendation`,`recommendation`],[`Confidence reason`,`confidenceReason`],[`Revalidation verdict`,`revalidateVerdict`],[`Revalidation recommendation`,`revalidateRecommendation`]];function pn(e,t){let n=[];t&&n.push(`Repo: ${t}`);let r=O(e);r&&n.push(`Location: ${r}`),e?.confidence!=null&&n.push(`Confidence: ${e.confidence}/10`);let i=L(e);i&&n.push(`Revalidation: ${i}`);let a=[];n.length>0&&a.push(n.join(`
25
+ `));let{title:o,body:s}=D(e);o&&a.push(`# ${o}`),s&&a.push(s.trim());let c=rn(e,{spaced:!0});c&&a.push(`# Evidence
26
+
27
+ ${c}`);for(let[t,n]of fn){if(!I&&n.startsWith(`revalidate`))continue;let r=E(e?.[n],e)?.trim();r&&a.push(`# ${t}
28
+
29
+ ${r}`)}return a.join(`
30
+
31
+ `)}function mn(e,{title:t,body:n,labels:r=[]}={}){let i=gt(e);if(!i)return null;try{if(new URL(i).host.toLowerCase()!==`github.com`)return null}catch{return null}let a=new URLSearchParams;t&&a.set(`title`,t),n&&a.set(`body`,n),r.length>0&&a.set(`labels`,r.join(`,`));let o=a.toString();return o?`${i}/issues/new?${o}`:`${i}/issues/new`}var hn=/^[a-zA-Z\d](?:-?[a-zA-Z\d])*$/u,gn=/^[a-zA-Z\d._-]+$/u,_n=/^[1-9]\d{0,9}$/u,vn=/^[a-fA-F\d]{7,40}$/u,yn=/^#[\w-]+$/u,bn=/^GHSA(?:-[0-9a-z]{4}){3}$/u;function xn(e){return e.length<=39&&hn.test(e)}function Sn(e){return e.length<=100&&e!==`.`&&e!==`..`&&gn.test(e)}function Cn(e){let t;try{t=new URL(e)}catch{return null}if(t.href!==e||t.protocol!==`https:`||t.hostname.toLowerCase()!==`github.com`||t.port||t.username||t.password)return null;let n=t.pathname.split(`/`);if(n.at(-1)===``&&n.pop(),n.length===3&&n[1]===`advisories`){let e=n[2];return bn.test(e)?{url:`https://github.com/advisories/${e}`,label:e}:null}if(n.length===6&&n[3]===`security`&&n[4]===`advisories`){let[,e,t,,,r]=n;return!xn(e)||!Sn(t)||!bn.test(r)?null:{url:`https://github.com/${e}/${t}/security/advisories/${r}`,label:r}}if(n.length!==5)return null;let[,r,i,a,o]=n;if(!xn(r)||!Sn(i))return null;let s=a===`commit`?vn.test(o)&&`@${o.slice(0,7)}`:(a===`issues`||a===`pull`)&&_n.test(o)&&`#${o}`;return s?{url:`https://github.com/${r}/${i}/${a}/${o}${yn.test(t.hash)?t.hash:``}`,label:`${r}/${i}${s}`}:null}var wn=/^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/u;function Tn(e){if(typeof e!=`string`)return null;let t=En(e);return t!==e||wn.test(e)?t.slice(0,8):null}function En(e){let t=String(e);return t.startsWith(`https://chatgpt.com/codex/cloud/security/findings/`)?t.slice(50):t}function Dn(e,n){let r=t(e,{managed:n});if(!r)return null;let i=Tn(r.id);return{url:n?r.path:`#${r.fragment}`,label:i?`finding ${i}`:`finding`,self:!0}}var On=/https?:\/\/[^\s<>"'`(){}[\]|\\^]+/giu,kn=new Set([`)`,`.`,`,`,`!`,`?`,`;`,`:`,`'`,`"`,`*`,`]`,`}`,`>`]);function An(e){let t=e.length;for(;t>0&&kn.has(e[t-1]);)t--;return t===e.length?e:e.slice(0,t)}function jn(e,{managed:t=!1}={}){if(typeof e!=`string`||e.length===0)return[];let n=[],r=0;On.lastIndex=0;let i;for(;(i=On.exec(e))!==null;){let a=An(i[0]),o=a?Cn(a)??Dn(a,t):null;o&&(i.index>r&&n.push(e.slice(r,i.index)),n.push(o),r=i.index+a.length,On.lastIndex=r)}return r<e.length&&n.push(e.slice(r)),n}var Mn={commit:o},Nn=8;function Pn(e){let t;try{t=e?JSON.parse(e):null}catch{return null}let n=e=>typeof e==`string`&&e?e:null;return t&&{tags:Array.isArray(t.tags)?t.tags.filter(n):[],details:typeof t.title==`string`?{title:t.title,authorName:n(t.authorName),authorLogin:n(t.authorLogin),date:Number.isSafeInteger(t.date)?t.date:null}:null}}function q(e,t,n){let r=document.createElement(e);return t&&(r.className=t),n!==void 0&&(r.textContent=n),r}function J(e,t,n,r){let i=q(e,t);return i.innerHTML=ue(n),i.append(q(`span`,``,r)),i}function Fn({title:e,authorName:t,authorLogin:n,date:r}){let i=q(`span`,`tooltip-commit-meta`,[t&&n&&t!==n?`${t} (@${n})`:t??(n&&`@${n}`),r===null?``:new Date(r).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})].filter(Boolean).join(` · `)),a=q(`div`,`tooltip-commit-details`);return a.append(...e?[q(`span`,`tooltip-commit-message`,e)]:[],i),a}var Y;function In(){return Y||(Y=document.createElement(`div`),Y.id=`styled-tooltip`,Y.setAttribute(`popover`,`manual`),document.body.append(Y),Y)}function Ln(e){typeof e.showPopover==`function`&&(e.matches(`:popover-open`)&&e.hidePopover(),e.showPopover())}var X=null,Rn=``,Z=null,Q=null,zn=0,Bn=0,Vn=!1;function Hn(){if(!Vn){Vn=!0,document.addEventListener(`mousemove`,e=>{zn=e.clientX,Bn=e.clientY},{passive:!0});for(let e of[`pointerdown`,`wheel`,`scroll`])document.addEventListener(e,()=>$(),{capture:!0,passive:!0});document.addEventListener(`keydown`,e=>{e.key===`Escape`&&$()}),window.addEventListener(`blur`,()=>$())}}var Un=100,Wn=14,Gn=8,Kn=8;function qn(e,{placement:t=`cursor`}={}){Hn(),clearTimeout(Z),Z=null,Q=null,e.prepareTooltip?.(e),t=e.dataset.tooltipPlacement??t;let n=In(),i=e.dataset.tooltip??``,a=Object.hasOwn(Mn,e.dataset.tooltipIcon??``)?e.dataset.tooltipIcon:``,c=e.dataset.tooltipRepo??``,l=r(e.dataset.tooltipCommit),f=Pn(e.dataset.tooltipCommitInfo),p=[`stasis`,`sourcemap`].includes(e.dataset.tooltipBundle)?e.dataset.tooltipBundle:``,m=e.dataset.tooltipStats??``,h=e.dataset.tooltipBuilt===`true`,g=e.dataset.tooltipPackage??``,_=e.dataset.tooltipEcosystem??``,v=e.dataset.tooltipVersion??``,y=e.dataset.tooltipFiles??``,b=e.dataset.tooltipLoc??``,x=e.dataset.tooltipSize??``,S=e.tooltipContent??null,C=S??JSON.stringify([i,a,c,l,f,p,m,h,g,_,v,y,b,x]);if(!i){$();return}if(X===e&&Rn===C)return;if(n.textContent=a||S?``:i,S){let e=q(`div`,`tooltip-rich`);ee(S,e),n.append(e)}if(a&&n.append(J(`span`,`tooltip-text`,Mn[a],i)),g){let t=q(`div`,`tooltip-package`),r=(e.querySelector(`[data-tooltip-package-icon] svg`)??e.querySelector(`svg`))?.cloneNode(!0);r&&t.append(r);let i=q(`span`,`tooltip-package-details`),a=(e,t)=>/^\d+$/u.test(e)?`${Number(e).toLocaleString()} ${t}`:``;for(let e of[g,v,a(y,y===`1`?`file`:`files`),a(b,`LoC`),x].filter(Boolean))i.append(q(`span`,``,e));t.append(i),n.append(t)}if(c||l){let e=c?J(`div`,`tooltip-repo`,d,c):q(`div`,`tooltip-repo`);if(l&&e.append(J(`span`,`tooltip-commit`,o,l.slice(0,7))),n.append(e),l&&f?.tags.length){let e=q(`div`,`tooltip-tags`);for(let t of f.tags.slice(0,Nn))e.append(J(`span`,`tooltip-tag`,s,t));f.tags.length>Nn&&e.append(q(`span`,`tooltip-tag-more`,`+${(f.tags.length-Nn).toLocaleString()} more`)),n.append(e)}}if(f?.details&&n.append(Fn(f.details)),p||m||h){let e=[p===`stasis`?`Stasis`:p===`sourcemap`?`Sourcemap`:``,h?`Built on server`:``,m].filter(Boolean).join(` · `);if(p===`stasis`){let t=q(`div`,`tooltip-bundle`),r=document.createElement(`img`);r.src=`./stasis.svg`,r.alt=``,t.append(r,q(`span`,``,e)),n.append(t)}else n.append(J(`div`,`tooltip-bundle`,u,e))}Ln(n),n.style.left=`0px`,n.style.top=`0px`,n.style.transform=`none`,n.classList.add(`visible`);let w=zn,T=Bn+Wn;if(t===`right`||t===`right-start`){let n=e.getBoundingClientRect();w=n.right+Gn,T=n.top+(t===`right`?n.height/2:0)}let E=window.innerWidth-n.offsetWidth-Kn,D=Math.max(Kn,Math.min(w,E));n.style.left=`${Math.round(D)}px`;let O=n.offsetHeight,k=t===`right`?T-O/2:T,A=window.innerHeight-O-Kn,j=Math.max(Kn,Math.min(k,A));n.style.top=`${Math.round(j)}px`,X=e,Rn=C}function $(e){e&&!e.contains(X)&&!e.contains(Q)||(clearTimeout(Z),Z=null,Q=null,Y&&(Y.classList.remove(`visible`),typeof Y.hidePopover==`function`&&Y.matches(`:popover-open`)&&Y.hidePopover()),X=null)}function Jn(e,{gate:t,placement:n}={}){Hn();let r=()=>e.isConnected!==!1&&(!Object.hasOwn(e.dataset,`tooltipTruncated`)||e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight)&&(!t||t(e));r()?e===X||e===Q||($(),Q=e,Z=setTimeout(()=>{Z=null,Q=null,r()&&qn(e,{placement:n})},Un)):$()}var Yn=new WeakSet;function Xn(e,t){for(let n of e.composedPath()){if(n===t)break;if(n.nodeType===1&&Object.hasOwn(n.dataset,`tooltip`))return n}return null}function Zn(e,t){!e||Yn.has(e)||(Yn.add(e),e.ownerDocument&&Hn(),e.addEventListener(`mouseover`,n=>{if(n.buttons){$();return}let r=Xn(n,e);r?r!==X&&Jn(r,t):$()}),e.addEventListener(`mouseout`,t=>{let n=Xn(t,e),r=t.relatedTarget?.closest?.(`[data-tooltip]`)??null;n&&n===r||$()}),e.addEventListener(`scroll`,()=>$(e),{capture:!0,passive:!0}))}var Qn=e=>Zn(e,{gate:e=>!Object.hasOwn(e.dataset,`tooltipTruncated`)||e.scrollWidth>e.clientWidth}),$n=!1;function er(){$n||($n=!0,Hn(),document.addEventListener(`tooltip-root-connected`,e=>{Zn(e.composedPath()[0]?.shadowRoot)}),document.body.addEventListener(`mouseover`,e=>{if(e.target.closest(`[data-tooltip-managed]`))return;if(e.buttons){$();return}let t=e.target.closest(`[data-tooltip]`);!t||t===X||Jn(t)}),document.body.addEventListener(`mouseout`,e=>{e.target.closest(`[data-tooltip-managed]`)||e.relatedTarget?.closest?.(`[data-tooltip-managed]`)||!X&&!Z||(X??Q)?.contains(e.relatedTarget)||$()}))}function tr(e){return`tree-`+e.replaceAll(/[^\w-]+/gu,`_`)}var nr=()=>Object.fromEntries(S.map(e=>[e,0]));function rr(e,t){let n=new Map;for(let r of e)for(let e of r){n.has(e.file)||n.set(e.file,nr());let r=n.get(e.file),i=C(e,t);r[i]!==void 0&&r[i]++}return n}var ir={trees:[],merged:null};function ar(e){let t=e.map(e=>e?.tree??null);return t.length===ir.trees.length&&t.every((e,t)=>e===ir.trees[t])||(ir={trees:t,merged:or(e)}),ir.merged}function or(e){let t=null;for(let n of e)if(n?.tree){t||={};for(let e of Object.keys(n.tree)){let r=n.tree[e];if(!t[e]){t[e]={...r,imports:[...r.imports??[]]};continue}let i=new Set(t[e].imports);for(let n of r.imports??[])i.has(n)||(i.add(n),t[e].imports.push(n));t[e].size==null&&r.size!=null&&(t[e].size=r.size)}}return t}function sr(e,t){let n=Object.keys(e),r=new Map(n.map((e,t)=>[e,t])),i=n.map(()=>nr()),a=n.map(()=>[]);for(let[t,i]of n.entries())for(let n of e[i].imports??[]){let e=r.get(n);e!==void 0&&a[e].push(t)}let o=new Uint32Array(n.length),s=0;for(let[e,n]of t){let t=r.get(e);if(t===void 0||!n)continue;let c=S.map(e=>[e,n[e]??0]).filter(([,e])=>e!==0);if(c.length===0)continue;let l=++s,u=[],d=e=>{o[e]!==l&&(o[e]=l,u.push(e))};for(let e of a[t])d(e);for(;u.length>0;){let e=u.pop();for(let[t,n]of c)i[e][t]+=n;for(let t of a[e])d(t)}}return new Map(n.map((e,t)=>[e,i[t]]))}function cr(e,t,n){return lr(t.get(e))>0||lr(n.get(e))>0}function lr(e){return e?S.reduce((t,n)=>t+(e[n]??0),0):0}var ur={dark:`#0c0c0c`,light:`#f6f8fa`,pink:`#fff0f7`,w95:`#fff`,paper:`#fff`};function dr(){let e=typeof document>`u`?null:document.body?.classList;return[`paper`,`pink`,`w95`,`light`].find(t=>e?.contains(`theme-${t}`))??`dark`}var fr=()=>ur[dr()];function pr(e){let t=[1,3,5].map(t=>{let n=parseInt(e.slice(t,t+2),16)/255;return n<=.04045?n/12.92:((n+.055)/1.055)**2.4});return t[0]*.2126+t[1]*.7152+t[2]*.0722>.18?`#000`:`#fff`}function mr(e){if(!e)return null;let t=e.match(RegExp(`^(?:.*/)?${Je()}/(@[^/]+/[^/]+|[^/]+)`,`u`));return t?t[1]:`__own__`}function hr(e){return new Set(e.filter(e=>!z(e)))}var gr=[`#4e9af1`,`#f28e2b`,`#59a14f`,`#e15759`,`#76b7b2`,`#edc948`,`#b07aa1`,`#ff9da7`,`#9c755f`,`#5cd1e5`,`#f1ce63`,`#d37295`,`#a0cbe8`,`#86bcb6`,`#8cd17d`,`#b6992d`,`#499894`,`#e15759`,`#e879c7`,`#d4a6c8`],_r=[`#2f8aef`,`#d2691e`,`#2ea043`,`#e63946`,`#2e9a92`,`#b88817`,`#9560e8`,`#d24a9c`,`#8a5d40`,`#0891b2`,`#a07a14`,`#c14e8e`,`#1f7ad0`,`#549b94`,`#3fb95f`,`#a07a14`,`#2a8278`,`#cb2c40`,`#c026d3`,`#965f93`],vr=()=>dr()===`dark`?gr:_r,yr=new Map;function br(e){let t=vr();return t[e%t.length]}var xr=()=>dr()===`dark`?`#6e7681`:`#8c959f`;function Sr(e){let t=vr(),n=e??`__own__`,r=`${t===_r?`l`:`d`}:${n}`;if(yr.has(r))return yr.get(r);let i=0;for(let e of n)i=i*37+e.codePointAt(0)|0;let a=t[((i%t.length+t.length)%t.length*7+3)%t.length];return yr.set(r,a),a}function Cr(e,t){if(!t||t===`/`||t===`__own__`)return e;for(let n of[`node_modules`,`dependencies`,Je()]){let r=n+`/`+t+`/`,i=e.indexOf(r);if(i>=0)return e.slice(i+r.length)}return e.startsWith(t+`/`)?e.slice(t.length+1):e}function wr(e){let t=e.origFile??e.file,n=Cr(t,e.pkg),r=n===t?t:`${a(e.pkg)}/${n}`;return r===t?e.file:r}var Tr={package:`@babel/core`,path:/^lib\/config\//u},Er={package:`@babel/core`,path:/^lib\/config\/files\/(?:module-types|plugins)\.js$/u},Dr=Object.freeze([{id:`react-native-codegen-discovery`,reason:`Codegen discovers package metadata and React Native configuration.`,from:{package:`react-native`,path:/^scripts\/codegen\/generate-artifacts-executor\.js$/u},to:{path:/(?:^|\/)(?:package\.json|react-native\.config\.js)$/u}},{id:`react-native-release-version`,reason:`The CLI release checker reads the installed React Native version.`,from:{package:`@react-native-community/cli-tools`,path:/^build\/releaseChecker\/index\.js$/u},to:{package:`react-native`,path:/^package\.json$/u}},{id:`react-native-platform-config`,reason:`React Native configuration loads platform CLIs supplied by the host project.`,from:{package:`react-native`,path:/^react-native\.config\.js$/u},to:{package:/^@react-native-community\/cli-platform-(?:android|ios)$/u,path:/^build\/index\.js$/u}},{id:`babel-project-config`,reason:`Babel discovers project configuration.`,from:Tr,to:{path:/(?:^|\/)babel\.config\.js$/u}},{id:`babel-typescript-preset`,reason:`Babel configuration loads the TypeScript preset.`,from:Tr,to:{package:`@babel/preset-typescript`,path:/./u}},{id:`babel-react-native-preset`,reason:`Babel config loaders load the configured React Native preset.`,from:Er,to:{package:`@react-native/babel-preset`,path:/^(?:src\/)?index\.js$/u}},{id:`babel-reanimated-plugin`,reason:`Babel config loaders load the configured Reanimated plugin, including scoped copies.`,from:Er,to:{package:/^(?:@[^/]+\/)?react-native-reanimated$/u,path:/^plugin\/index\.js$/u}},{id:`babel-transform-plugin`,reason:`Babel config loaders load configured transform plugins.`,from:Er,to:{package:/^@babel\/plugin-transform-[^/]+$/u,path:/^lib\/index\.js$/u}},{id:`cosmiconfig-config`,reason:`Cosmiconfig loads discovered configuration, including dependency configuration.`,from:{package:`cosmiconfig`,path:/^dist\/loaders\.js$/u},to:{path:/\.config\.js$/u}},{id:`import-fresh-own-config`,reason:`import-fresh loads host-project configuration.`,from:{package:`import-fresh`,path:/./u},to:{path:/\.config\.js$/u},ownSourceOnly:!0}].map(e=>Object.freeze({...e,from:Object.freeze(e.from),to:Object.freeze(e.to)})));function Or(e){return typeof e==`string`&&!e.includes(`\\`)&&!e.includes(`:`)&&e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`&&e!==`node_modules`)}function kr(e,t){let n=e.package;return n!==void 0&&t.ownSource===!0?!1:(n===void 0||(typeof n==`string`?n===t.package:n.test(t.package??``)))&&e.path.test(t.path)}function Ar(e,t){if(e?.ownSource!==!0&&Or(e?.path)&&Or(t?.path))return Dr.find(n=>(!n.ownSourceOnly||t.ownSource===!0)&&kr(n.from,e)&&kr(n.to,t))}function jr(e,t){let n=e.split(/(?:^|\/)node_modules\//u).slice(1).at(-1)?.match(/^(@[^/]+\/[^/]+|[^/]+)\/(.+)$/u);return{package:n?.[1],path:n?.[2]??e.replace(/^\/+/u,``),ownSource:t??i(e)===`__own__`}}function Mr(e,t,n,r){return!Ar(jr(e,r),jr(t,n))}function Nr(e,t=e=>e.file){let n=new Map(e.nodes.map(e=>[e.file,e])),r=new Map(e.nodes.map(e=>[t(e),new Set]));for(let[i,a]of e.importsOf){let o=n.get(i);if(o)for(let s of a){let a=n.get(s);a&&Mr(o.origFile??i,a.origFile??s,e.ownSourceFiles?.has(s),e.ownSourceFiles?.has(i))&&r.get(t(o)).add(t(a))}}return r}var Pr=class{constructor(e){this.nodes=[...e];for(let[e,t]of this.nodes.entries())t.position=e;for(let e=(this.nodes.length>>1)-1;e>=0;e--)this.down(e)}before(e,t){return Math.abs(e.balance)>Math.abs(t.balance)||Math.abs(e.balance)===Math.abs(t.balance)&&(e.balance>t.balance||e.balance===t.balance&&e.tie<t.tie)}swap(e,t){let n=this.nodes,r=n[e];n[e]=n[t],n[t]=r,n[e].position=e,n[t].position=t}down(e){let t=this.nodes;for(;2*e+1<t.length;){let n=2*e+1;if(n+1<t.length&&this.before(t[n+1],t[n])&&n++,!this.before(t[n],t[e]))break;this.swap(e,n),e=n}}update(e){if(e.position<0)return;let t=e.position;for(;t>0;){let n=t-1>>1;if(!this.before(e,this.nodes[n]))break;this.swap(t,n),t=n}this.down(t)}take(){let e=this.nodes[0],t=this.nodes.pop();return e.position=-1,this.nodes.length>0&&(this.nodes[0]=t,t.position=0,this.down(0)),e}};function Fr(e,t){for(let n=0;n<8;n++){let r=!1;for(let i=0;i<e.length-1;i++){let a=n%2?e.length-2-i:i,o=e[a],s=e[a+1];(t.get(s)?.get(o)?.cycleCount??0)<=(t.get(o)?.get(s)?.cycleCount??0)||(e[a]=s,e[a+1]=o,r=!0)}if(!r)break}return e}function Ir(e){let t=[],n=new Set;for(let t of e.values())t.outgoing.sort((e,t)=>t[1]-e[1]||e[0].tie-t[0].tie);for(let r of e.values()){if(n.has(r))continue;let e=[{node:r,next:0}];for(n.add(r);e.length>0;){let r=e.at(-1);if(r.next===r.node.outgoing.length){t.push(r.node.id),e.pop();continue}let i=r.node.outgoing[r.next++][0];n.has(i)||(n.add(i),e.push({node:i,next:0}))}}return t.toReversed()}function Lr(e,t){let n=new Map(e.map((e,t)=>[e,t])),r=0;for(let e of t.values())for(let[t,i]of e.outgoing)n.get(e.id)<n.get(t.id)&&(r+=i);return r}function Rr(e,t){let n=Lr(e,t),r=n,i=0;for(let a=0;a<e.length-1;a++)n-=t.get(e[a]).originalBalance,n>r&&(r=n,i=a+1);return[...e.slice(i),...e.slice(0,i)]}function zr(e,t){if(e.length<2)return e;let n=new Map(e.map((e,t)=>[e,{id:e,tie:t,balance:0,incoming:[],outgoing:[]}]));for(let e of n.values())for(let r of t.get(e.id)?.values()??[]){let t=n.get(r.to);!t||t===e||!r.cycleCount||(e.outgoing.push([t,r.cycleCount]),t.incoming.push([e,r.cycleCount]),e.balance+=r.cycleCount,t.balance-=r.cycleCount)}for(let e of n.values())e.originalBalance=e.balance;let r=[],i=new Pr(n.values()),a=[];for(;i.nodes.length>0;){let e=i.take();e.balance>=0?r.push(e.id):a.push(e.id);for(let[t,n]of e.outgoing)t.position<0||(t.balance+=n,i.update(t));for(let[t,n]of e.incoming)t.position<0||(t.balance-=n,i.update(t))}let o=e,s=Lr(e,n);for(let i of[[...r,...a.toReversed()],Ir(n),e,e.toReversed()]){let e=Fr(Rr(i,n),t),r=Lr(e,n);r>s&&(o=e,s=r)}return o}function Br(e,t){let n=new Set(e),r=new Map(e.map(e=>[e,[]]));for(let[e,i]of t)for(let t of i)n.has(e)&&n.has(t)&&r.get(t).push(e);let i=[],a=new Set;for(let r of e){if(a.has(r))continue;a.add(r);let e=[[r,(t.get(r)??[])[Symbol.iterator]()]];for(;e.length>0;){let[r,o]=e.at(-1),s=o.next();s.done?(i.push(r),e.pop()):n.has(s.value)&&!a.has(s.value)&&(a.add(s.value),e.push([s.value,(t.get(s.value)??[])[Symbol.iterator]()]))}}let o=new Map,s=[];for(let e of i.toReversed()){if(o.has(e))continue;let t=[],n=s.length,i=[e];for(o.set(e,n);i.length>0;){let e=i.pop();t.push(e);for(let t of r.get(e))o.has(t)||(o.set(t,n),i.push(t))}s.push(t.toSorted())}return{groups:s,componentOf:o}}function Vr(e,t){let{groups:n,componentOf:r}=Br(e,t),i=n.map(()=>0),a=n.map(()=>new Set);for(let[e,n]of t)for(let t of n){let n=r.get(e),o=r.get(t);n!==o&&!a[n].has(o)&&(a[n].add(o),i[o]++)}let o=[...i],s=[];o.forEach((e,t)=>{e||s.push(t)});for(let e of s)for(let t of a[e])--o[t]===0&&s.push(t);return{groups:n,componentOf:r,next:a,incoming:i,order:s}}function Hr(e,{expanded:t=new Set,order:n=`structure`,query:r=``,neighborhood:i=null,cyclesOnly:o=!1}={}){let s=new Map,c=new Map,l=new Map;for(let n of e.nodes){let e=t.has(n.pkg),r=`${e?`f`:`p`}:${e?n.file:n.pkg}`;s.has(r)||s.set(r,{id:r,pkg:n.pkg,file:e?n.file:null,label:e?wr(n):a(n.pkg),files:[],size:0,issues:0,incoming:0,outgoing:0,importers:0,dependencies:0});let i=s.get(r);i.files.push(n.file),i.size+=n.size??0,i.issues+=n.totalIssues??0,c.set(n.file,r),l.set(n.file,n.origFile??n.file)}let u=new Map,d=new Set,f=new Set,p=new Map([...s.keys()].map(e=>[e,new Set])),m=0;for(let[t,n]of e.importsOf){let r=c.get(t);if(r)for(let i of new Set(n)){let n=c.get(i);if(!n)continue;u.has(r)||u.set(r,new Map),u.get(r).has(n)||u.get(r).set(n,{from:r,to:n,count:0,cycleCount:0,examples:[]});let a=u.get(r).get(n);a.count++;let h=Mr(l.get(t),l.get(i),e.ownSourceFiles?.has(i),e.ownSourceFiles?.has(t));a.examples.length<80&&(!o||h)&&a.examples.push([t,i]),m++,s.get(r).outgoing++,s.get(n).incoming++,r!==n&&(f.add(r),d.add(n)),h&&(a.cycleCount++,(r!==n||s.get(r).file)&&p.get(r).add(n))}}let h=[...s.keys()].toSorted(),{groups:g,componentOf:_}=Br(h,p),v=new Set(g.flatMap(e=>e.length>1||p.get(e[0]).has(e[0])?e:[]));for(let e of s.values())e.cyclic=v.has(e.id),e.component=_.get(e.id);let y=e.ownSourcePackages??new Set(e.layerRoots?.roots??[]),b=e=>e.pkg===`__own__`?0:y.has(e.pkg)?1:2,x=e=>d.has(e.id)&&f.has(e.id)?0:1,S=new Map(g.map((e,t)=>[t,e.reduce((e,t)=>Math.min(e,b(s.get(t))),2)])),C=(e,t)=>e.pkg.localeCompare(t.pkg)||e.label.localeCompare(t.label),w=new Map;if(n===`structure`){for(let e of g)if(!(e.length<2))for(let t of Map.groupBy(e,e=>b(s.get(e))).values())zr(t.toSorted((e,t)=>C(s.get(e),s.get(t))),u).forEach((e,t)=>w.set(e,t))}if(o){m=0,d.clear(),f.clear();for(let e of s.values())e.incoming=0,e.outgoing=0}for(let[e,t]of u){for(let n of t.values())if(n.cyclic=n.cycleCount>0&&v.has(e)&&_.get(e)===_.get(n.to)&&(e!==n.to||s.get(e).file!==null),o){if(!n.cyclic){t.delete(n.to);continue}n.count=n.cycleCount,m+=n.count,s.get(e).outgoing+=n.count,s.get(n.to).incoming+=n.count,e!==n.to&&(f.add(e),d.add(n.to))}t.size===0&&u.delete(e)}for(let[e,t]of u)for(let n of t.keys())e!==n&&(s.get(e).dependencies++,s.get(n).importers++);let T=r.trim().toLowerCase(),E=new Set(h.filter(e=>!T||s.get(e).files.some(e=>e.toLowerCase().includes(T))||s.get(e).label.toLowerCase().includes(T))),D=new Set(i?[i]:E);if(T||i)for(let[e,t]of u)for(let n of t.keys())(i?e===i:E.has(e))&&D.add(n),(i?n===i:E.has(n))&&D.add(e);let O=(e,t)=>{if(n===`structure`){let n=S.get(e.component)-S.get(t.component);if(n)return n;let r=x(e)-x(t);if(r)return r;let i=e.component-t.component;if(i)return i}let r=b(e)-b(t);if(r)return r;if(n===`importers`)return t.importers-e.importers||C(e,t);if(n===`imports`)return t.dependencies-e.dependencies||C(e,t);let i=x(e)-x(t);if(i)return i;if(n===`structure`&&e.component===t.component){let n=(w.get(e.id)??0)-(w.get(t.id)??0);if(n)return n}return C(e,t)},k=[...s.values()].filter(e=>D.has(e.id)&&(!o||e.cyclic)).toSorted(O),A=new Map(k.map((e,t)=>[e.id,t])),j=[];for(let[e,t]of u)if(A.has(e))for(let n of t.values())A.has(n.to)&&j.push({...n,row:A.get(e),col:A.get(n.to)});return{rows:k,byId:s,cells:u,visibleCells:j,index:A,matches:E,importCount:m,totalRows:s.size,cycleCount:g.filter(e=>v.has(e[0])).length}}export{te as a,ie as b,ae as c,oe as d,ue as e,de as f,N as g,fe as h,P as i,pe as j,he as k,_e as l,ve as m,ye as n,be as o,F as p,Se as q,we as r,Ee as s,De as t,Oe as u,ke as v,Ae as w,je as x,L as y,Me as z,Ne as A,Pe as B,Fe as C,Le as D,Re as E,qe as F,Je as G,z as H,Xe as I,st as J,ct as K,lt as L,dt as M,ft as N,pt as O,mt as P,ht as Q,bt as R,H as S,Tt as T,At as U,Ft as V,Rt as W,Vt as X,qt as Y,Xt as Z,Zt as _,K as $,$t as aa,tn as ba,nn as ca,an as da,ln as ea,un as fa,dn as ga,pn as ha,mn as ia,Tn as ja,En as ka,jn as la,qn as ma,$ as na,Jn as oa,Zn as pa,Qn as qa,er as ra,tr as sa,rr as ta,ar as ua,sr as va,cr as wa,lr as xa,ur as ya,dr as za,fr as Aa,pr as Ba,mr as Ca,hr as Da,br as Ea,xr as Fa,Sr as Ga,zr as Ha,Cr as Ia,wr as Ja,Mr as Ka,Nr as La,Br as Ma,Vr as Na,Hr as Oa};
32
+ /*! Bundled license information:
33
+
34
+ lit-html/directives/class-map.js:
35
+ (**
36
+ * @license
37
+ * Copyright 2018 Google LLC
38
+ * SPDX-License-Identifier: BSD-3-Clause
39
+ *)
40
+ */
@@ -0,0 +1 @@
1
+ var e=2n**64n-1n,t=`0|[1-9]\\d*`,n=`\\d*[A-Za-z-][\\dA-Za-z-]*|${t}`,r=`(?:${n})(?:\\.(?:${n}))*`,i=`[\\dA-Za-z-]+(?:\\.[\\dA-Za-z-]+)*`,a=`[*Xx]`,o=RegExp(`^(${t})\\.(${t})\\.(${t})(?:-(${r}))?(?:\\+(${i}))?$`,`u`),s=RegExp(`^(?:${r})?$`,`u`),c=RegExp(`^(?:${i})?$`,`u`),l=RegExp(`^ *${a} *$`,`u`),u=RegExp(`^ *(?:(>=|<=|=|>|<|~|\\^) *)?(${t})(?:\\.(?:(${a})(?:\\.${a})?|(${t})(?:\\.(?:(${a})|(${t})(?:-(${r}))?(?:\\+${i})?))?))? *$`,`u`);function d(t){if(t===void 0)return;if(t.length>20)return null;let n=BigInt(t);return n>e?null:n}var f=t=>typeof t==`bigint`&&t>=0n&&t<=e;function p(e){if(typeof e!=`string`)throw TypeError(`expected a string`);return e}function m(e){let t=o.exec(p(e));if(t===null)return;let[n,r,i]=t.slice(1,4).map(d);if(![n,r,i].includes(null))return{major:n,minor:r,patch:i,pre:t[4]??``,build:t[5]??``}}function h(e){let t=u.exec(e);if(t===null)return;let[,n,r,i,a,o,s,c=``]=t,[l,f,p]=[r,a,s].map(d);if(![l,f,p].includes(null))return{op:n??(i||o?`*`:`^`),major:l,minor:f,patch:p,pre:c}}var g=32;function _(e){if(l.test(p(e)))return[];let t=e.split(`,`,g+1);if(t.length>g)return;let n=t.map(h);return n.includes(void 0)?void 0:n}var v=(e,t)=>e===t?0:e<t?-1:1;function y(e,t){if(e===t)return 0;if(e===``)return 1;if(t===``)return-1;let[n,r]=[e.split(`.`),t.split(`.`)];for(let[e,t]of n.entries()){let n=r[e];if(n===void 0)return 1;let[i,a]=[/^\d+$/u.test(t),/^\d+$/u.test(n)];if(i!==a)return i?-1:1;let o=i&&v(t.length,n.length)||v(t,n);if(o!==0)return o}return n.length===r.length?0:-1}function b(e,t){for(let n of[`major`,`minor`,`patch`]){if(e[n]===void 0)return t.pre===e.pre?0:NaN;if(t[n]!==e[n])return v(t[n],e[n])}return y(t.pre,e.pre)}var x=(e,t)=>t.major===e.major&&(e.minor===void 0||t.minor===e.minor)&&b(e,t)>=0;function S(e,t){return t.major===e.major?e.minor===void 0?!0:e.patch===void 0?e.major>0n?t.minor>=e.minor:t.minor===e.minor:(e.major>0n||t.minor===e.minor&&(e.minor>0n||t.patch===e.patch))&&b(e,t)>=0:!1}var C=new Map([[`=`,(e,t)=>b(e,t)===0],[`*`,(e,t)=>b(e,t)===0],[`>`,(e,t)=>b(e,t)>0],[`>=`,(e,t)=>b(e,t)>=0],[`<`,(e,t)=>b(e,t)<0],[`<=`,(e,t)=>b(e,t)<=0],[`~`,x],[`^`,S]]);function w(e){let{major:t,minor:n,patch:r,pre:i,build:a}=e??{};return f(t)&&f(n)&&f(r)&&typeof i==`string`&&s.test(i)&&typeof a==`string`&&c.test(a)?{major:t,minor:n,patch:r,pre:i,build:a}:void 0}function T(e){let{op:t,major:n,minor:r,patch:i,pre:a}=e??{};return C.has(t)&&f(n)&&(r===void 0||f(r))&&(i===void 0||r!==void 0&&t!==`*`&&f(i))&&typeof a==`string`&&s.test(a)&&(a===``||i!==void 0)?{op:t,major:n,minor:r,patch:i,pre:a}:void 0}function E(e){if(!Array.isArray(e))return;let{length:t}=e;if(t>g)return;let n=Array.from({length:t},(t,n)=>T(e[n]));return n.includes(void 0)?void 0:n}function D(e,t){let n=E(e);if(n===void 0)throw TypeError(`expected comparators, as parseVersionReq makes`);let r=w(t);if(r===void 0)throw TypeError(`expected a version, as parseVersion makes`);return n.every(e=>C.get(e.op)(e,r))?r.pre===``||n.some(e=>e.major===r.major&&e.minor===r.minor&&e.patch===r.patch&&e.pre!==``):!1}export{p as a,m as b,_ as c,D as d};
@@ -0,0 +1,6 @@
1
+ import{b as e}from"./chunk-DUASGS2O.js";import{a as t}from"./chunk-IYPY47MC.js";import{a as n}from"./chunk-QRKFPLA4.js";import{b as r}from"./chunk-TUII34K2.js";var i=/^webpack(?:-internal)?:\/\/[^/]*\//u,a=/^[a-z][\d+.a-z-]*:/iu,o=/^file:/iu,s=/^(?:file|ftp|https?|wss?):/iu,c=/^(?:[a-z][\d+.a-z-]*:\/\/[^/]*\/?|\/\/[^/]+\/|[a-z]:\/|\/)?/iu,l=e=>c.exec(e)[0],u=e=>l(e).includes(`://`),d=e=>e.replace(u(e)?/[#?].*$/su:/\?.*$/su,``),f=e=>e.slice(e.lastIndexOf(`/`)+1),p=(e,t)=>URL.parse(e,t)?.href??null;function m(e){let t=l(e),n=t.includes(`://`)&&p(e);if(n)return n;let r=[];for(let n of e.slice(t.length).split(`/`))n===``||n===`.`||(n===`..`?r.length>0&&r.at(-1)!==`..`?r.pop():t||r.push(`..`):r.push(n));let i=/^[a-z]:\/$/iu.test(t)?t.toUpperCase():t.startsWith(`//`)?t.toLowerCase():t;return i?i.replace(/\/?$/u,`/`)+r.join(`/`):r.join(`/`)||`.`}function h(e,t){let n=l(t);return u(e)&&!n.includes(`:`)?p(t,e)??m(`${e}/../${t}`):m(n===`/`?l(e).replace(/\/?$/u,``)+t:n?t:`${e}/../${t}`)}function ee(e){try{return decodeURIComponent(e)}catch{return e}}function g(e,t){let n=e.replaceAll(`\\`,`/`);if(i.test(n))return m(n.replace(i,``));let r=s.test(n)?p(n)??n:n,c=/^file:\/\/([^/#]*)([^#]*)/isu.exec(r);if(c){let[,e,t]=c;return m(ee(e&&e.toLowerCase()!==`localhost`?`//${e}${t}`:t).replace(/^\/(?=[a-z]:\/)/iu,``))}if(a.test(r)&&!l(r).includes(`:`))return r;if(t===void 0)return m(r);if(o.test(t)&&!l(r))return g(p(r,t)??r);let d=g(t);return l(r)&&!u(d)?m(r):h(d,r)}var te=/^(?:@[\dA-Za-z~-][\w.~-]*\/)?[\dA-Za-z~-][\w.~-]*$/u;function _(e){let t=e.split(`/`).slice(0,e.startsWith(`@`)?2:1).join(`/`);return te.test(t)?t:null}var ne=new Set([`.pnpm`,`.bun`,`.deno`]),re=/^\d+\.\d+\.\d+(?:-[\d.a-z-]+)?(?:\+[\d.a-z-]+)?$/iu;function ie(e,t){let n=`${t.replace(`/`,`+`)}@`,r=e.startsWith(n)?e.slice(n.length).split(/[(_]/u)[0]:null;return re.test(r)?r:null}function ae(e){let t=d(e).split(`/`),n=t.lastIndexOf(`node_modules`),r=n<0?null:_(t.slice(n+1).join(`/`));if(r===null)return null;let i=n+1+r.split(`/`).length;if(i>=t.length||t.slice(i).includes(``))return null;let a=t.slice(0,i).join(`/`);return{name:r,version:ne.has(t[n-2])?ie(t[n-1],r):null,root:a,path:e.slice(a.length+1)}}var oe=new Map([[`js`,`jsx`],[`mjs`,`jsx`],[`cjs`,`jsx`],[`jsx`,`jsx`],[`es`,`jsx`],[`es6`,`jsx`],[`ts`,`ts`],[`mts`,`ts`],[`cts`,`ts`],[`tsx`,`tsx`],[`json`,`json`]]);function v(e){let t=f(d(e));return/^[\w-]+$/u.test(t)?`jsx`:oe.get(/\.([\da-z]+)$/iu.exec(t)?.[1].toLowerCase())??null}var se=[`.js`,`.mjs`,`.cjs`,`.jsx`,`.ts`,`.tsx`,`.mts`,`.cts`,`.json`],ce=[`.ios`,`.android`,`.web`];function le(e){let t=e.map(e=>/\.[a-z]+(?=\.\w+$)/u.exec(f(d(e.path??``)))?.[0]),[[n,r],[,i]]=ce.map(e=>[e,t.filter(t=>t===e).length]).toSorted((e,t)=>t[1]-e[1]);return[...r===i?[]:[n],`.native`,``,`.browser`,`.node`]}var ue=new Map([[`.js`,[`.ts`,`.tsx`]],[`.jsx`,[`.tsx`]],[`.mjs`,[`.mts`]],[`.cjs`,[`.cts`]]]),de=[`index`,`main`,`browser`,`node`],fe=[``,`src/`,`lib/`,`dist/`,`build/`],pe=new Set([`lib`,`dist`,`build`,`out`,`esm`,`cjs`]);function*me(e,t){yield e;let n=/\.[^./]+$/u.exec(e)?.[0];for(let t of ue.get(n)??[])yield e.slice(0,-n.length)+t;for(let n of e.endsWith(`/`)?[`${e}index`]:[e,`${e}/index`])for(let e of se)for(let r of t)yield n+r+e;if(n)for(let r of t.filter(Boolean))yield e.slice(0,-n.length)+r+n}function*he(e){let t=e;for(;;){t.startsWith(`src/`)||(yield`src/${t}`),t!==e&&(yield t);let n=t.indexOf(`/`);if(n<0||!pe.has(t.slice(0,n)))return;t=t.slice(n+1)}}function ge(e){let t=new Map,n=new Map,r=new Map;for(let i of e)i.path!==null&&t.set(i.path,i),i.package&&(n.set(i.package.name,(n.get(i.package.name)??new Set).add(i.package.root)),(r.get(i.package.root)??r.set(i.package.root,[]).get(i.package.root)).push(i));return{byPath:t,roots:n,byRoot:r,platforms:le(e),found:new Map}}function y(e,t){if(!e.found.has(t)){let n=d(t),r=me(n,e.platforms).map(e=>e+t.slice(n.length));e.found.set(t,e.byPath.get(r.find(t=>e.byPath.has(t)))??null)}return e.found.get(t)}function _e(e,t,n){let r=e.roots.get(n);if(!r)return null;let i=t.path.split(`/`);for(let e=i.length-1;e>=0;e--){let t=[...i.slice(0,e),`node_modules`,n].join(`/`);if(r.has(t))return t}return r.size===1?[...r][0]:null}var ve=new Set(`assert.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.domain.events.fs.http.http2.https.inspector.module.net.os.path.perf_hooks.process.punycode.querystring.readline.repl.stream.string_decoder.sys.timers.tls.trace_events.tty.url.util.v8.vm.wasi.worker_threads.zlib._http_agent._http_client._http_common._http_incoming._http_outgoing._http_server._stream_duplex._stream_passthrough._stream_readable._stream_transform._stream_wrap._stream_writable._tls_common._tls_wrap.assert/strict.dns/promises.fs/promises.inspector/promises.path/posix.path/win32.readline/promises.stream/consumers.stream/promises.stream/web.timers/promises.util/types`.split(`.`));function ye(e){if(e.startsWith(`node:`)||ve.has(e))return{builtin:!0};let t=_(d(e));return t===null?{}:{package:t}}function be(){let e=[],t=new Map,n=(n,r,i)=>{let a=t.get(n)??t.set(n,new Set).get(n);a.has(r)||(a.add(r),e.push(i))};return{edges:e,add:n,link:(e,t,r)=>{e&&t&&t!==e&&n(e,t,{from:e,to:t,kind:r})}}}function xe(e,t){for(let n of de)for(let r of fe){let i=y(e,`${t}/${r}${n}`);if(i)return i}let n=e.byRoot.get(t);return n?.length===1?n[0]:null}function Se(e,t,n,r){return/^\/[^?]/u.test(n)?y(e,t+n)??he(n.slice(1)).map(n=>y(e,`${t}/${n}`)).find(Boolean):y(e,t+n)??r(e,t)}function b(e,t,n,r=xe){let i=/^(?:\.{1,2}|[a-z]:)?\\/iu.test(n)?n.replaceAll(`\\`,`/`):n,o=s.test(i);if(o||/^(?:\.{1,2}(?:\/|$)|\/|[a-z]:\/)/iu.test(i)||u(i)){let n=o?g(i):h(t.path,i),r=y(e,n);return r?{to:r}:{to:null,path:n}}if(a.test(i)&&e.byPath.has(i))return{to:e.byPath.get(i)};let c=_(d(n)),l=c===null?null:_e(e,t,c);if(l===null)return{to:null,...ye(n)};let f=Se(e,l,n.slice(c.length),r);return f?{to:f}:{to:null,package:c}}var x=class extends Error{name=`SourceMapError`},S=new Uint8Array(128).fill(255);for(let[e,t]of[...`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/,;`].entries())S[t.codePointAt(0)]=e;function C(e){let t=new Int32Array(e.length*2);return t.set(e),t}function Ce(e){let{starts:t,columns:n,sources:r,names:i}=e;for(let e=0;e+1<t.length;e++){let[a,o]=[t[e],t[e+1]],s=a+1;for(;s<o&&n[s-1]<=n[s];)s++;if(s>=o)continue;let c=Array.from(n.subarray(a,o),(e,t)=>[e,r[a+t],i[a+t]]).sort((e,t)=>e[0]-t[0]);for(let[e,[t,o,s]]of c.entries())[n[a+e],r[a+e],i[a+e]]=[t,o,s]}return e}function we(e){let t=[0],n=new Int32Array(1024),r=new Int32Array(1024),i=new Int32Array(1024),a=0;for(let{mappings:o,files:s,line:c,column:l,names:u,nameCount:d}of e){if(typeof o!=`string`)throw new x(`mappings is not a string`);for(;t.length<=c;)t.push(a);let e=[0,0,0,0,0],f=0,p=0,m=1,h=l;for(let c=0;c<=o.length;c++){let l=c<o.length?S[o.codePointAt(c)]??255:64;if(l<32){if(p+=l*m,f===5)throw new x(`mappings: a segment of more than 5 fields at ${c}`);e[f++]+=p%2?(1-p)/2:p/2,p=0,m=1}else if(l<64){if(p+=(l-32)*m,m*=32,m>2**30)throw new x(`mappings: a value at ${c} runs past 32 bits`)}else{if(l===255)throw new x(`mappings: ${JSON.stringify(o[c])} at ${c} is not a base64 digit`);if(m!==1)throw new x(`mappings: the value before ${c} is cut off`);if(f>0){if(f===2||f===3)throw new x(`mappings: a segment of ${f} fields before ${c}`);let t=f===1?-1:s[e[1]];if(t===void 0)throw new x(`mappings: source ${e[1]} before ${c} is not in sources`);if(e[0]<0)throw new x(`mappings: a negative generated column before ${c}`);a===n.length&&([n,r,i]=[C(n),C(r),C(i)]),n[a]=e[0]+h,r[a]=t,i[a++]=f===5&&e[4]>=0&&e[4]<d?u+e[4]:-1,f=0}l===65&&(t.push(a),e[0]=0,h=0)}}}return t.push(a),Ce({starts:Int32Array.from(t),columns:n.slice(0,a),sources:r.slice(0,a),names:i.slice(0,a)})}var Te=new WeakMap,Ee=e=>Te.get(e),w=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function T(e,t){if(!e)throw new x(t)}function E(e,t){if(e===void 0)return[];T(Array.isArray(e),`${t} is not an array`);for(let n of e)T(typeof n==`string`||n===null,`${t} holds ${JSON.stringify(n)}`);return e}function De(e,t,n,r){let i=e.bySource.get(t);if(i!==void 0)return e.files[i].content??=n,e.files[i].ignored||=r,i;let a=t===null?null:g(t,e.mapPath);return e.files.push({source:t,path:a,package:a===null?null:ae(a),content:n,ignored:r}),t!==null&&e.bySource.set(t,e.files.length-1),e.files.length-1}function D(e,t,n,r){T(e.version===3,`version ${JSON.stringify(e.version)} is not 3`),T(e.sourceRoot===void 0||typeof e.sourceRoot==`string`,`sourceRoot is not a string`);let i=E(e.sources,`sources`),a=E(e.sourcesContent,`sourcesContent`),o=e.ignoreList??e.x_google_ignoreList??[];T(Array.isArray(o)&&o.every(e=>Number.isInteger(e)&&e>=0&&e<i.length),`ignoreList is not a list of indices into sources`);let s=new Set(o),c=e.sourceRoot?e.sourceRoot.replace(/\/?$/u,`/`):``,l=i.map((e,n)=>De(t,e===null?null:c+e,a[n]??null,s.has(n))),u=Array.isArray(e.names)?e.names:[];t.parts.push({mappings:e.mappings,files:l,line:n,column:r,names:t.names.length,nameCount:u.length}),t.names.push(...u)}function Oe(e,t){T(e.version===3,`version ${JSON.stringify(e.version)} is not 3`),T(Array.isArray(e.sections),`sections is not an array`);for(let[n,r]of e.sections.entries()){let{offset:i,map:a}=w(r)?r:{};T(w(i)&&[i.line,i.column].every(e=>Number.isInteger(e)&&e>=0),`sections[${n}].offset is not a line and a column`),T(w(a)&&a.sections===void 0,`sections[${n}].map is not a plain source map`);let o=e.sections[n-1]?.offset;T(!o||o.line<i.line||o.line===i.line&&o.column<=i.column,`sections[${n}] starts before sections[${n-1}]`),D(a,t,i.line,i.column)}}function ke(e,t={}){if(!w(t))throw TypeError(`readSourceMap: options is not an object`);if(t.path!==void 0&&typeof t.path!=`string`)throw TypeError(`readSourceMap: options.path is not a string`);let n=e;if(typeof e==`string`||e instanceof Uint8Array)try{let t=typeof e==`string`?e:new TextDecoder(`utf-8`,{fatal:!0}).decode(e);n=JSON.parse(t.replace(/^\)\]\}'[^\n]*\n/u,``))}catch(e){throw new x(`not JSON: ${e.message}`,{cause:e})}T(w(n),`not a JSON object`);let r={files:[],bySource:new Map,mapPath:t.path,parts:[],names:[]};n.sections===void 0?D(n,r,0,0):Oe(n,r);let i={files:r.files};return Te.set(i,{...we(r.parts),nameList:r.names}),i}var Ae=/\r\n?|[\n\u2028\u2029]/gu;function je(e){let t=[0];for(let n of e.matchAll(Ae))t.push(n.index+n[0].length);return t}function Me(e,t,n,r){let[i,a]=[t,n];for(;i<a;){let t=i+a>>1;e[t]<=r?i=t+1:a=t}return i-1}function O(e,t){let n=Me(e,0,e.length,t);return[n,t-e[n]]}function Ne(e,[t,n]){if(t>=e.starts.length-1)return-1;let r=e.starts[t],i=Me(e.columns,r,e.starts[t+1],n);return i<r?-1:i}function Pe(e,t,n,r){let i=Ee(e),a=O(t,n),[o,s]=O(t,r),c=new Map,l=Ne(i,a);for(let e=a[0];e<=o&&e<i.starts.length-1;e++){let t=e===a[0]&&l>=0?l:i.starts[e];for(let n=t;n<i.starts[e+1];n++){let t=i.sources[n];if(e===o&&i.columns[n]>=s)break;t>=0&&c.set(t,(c.get(t)??0)+1)}}let[u]=[...c].reduce((e,t)=>t[1]>e[1]?t:e,[-1,0]);return u<0?null:e.files[u]}var k=/\s+/uy,Fe=`
2
+ \r\u2028\u2029`,A=/[\n\r\u2028\u2029]/gu,j=/[\n\r\u2028\u2029]/u,M=/[\w$\u0080-￿]+/uy,N=new Set([`return`,`typeof`,`instanceof`,`in`,`of`,`new`,`delete`,`void`,`throw`,`case`,`default`,`extends`,`do`,`else`,`yield`,`await`]),Ie=new Set([`if`,`while`,`for`,`with`]),P=new Set([`break`,`continue`,`debugger`]),Le=new Set([`(`,`[`,"${",`,`,`=`,`:`,`?`,`!`,`~`,`+`,`-`,`*`,`/`,`%`,`&`,`|`,`^`,`<`,`>`]);function Re(e,t){return e?.type===`word`?t&&[`return`,`yield`].includes(e.value)?!1:N.has(e.value)&&![`do`,`else`].includes(e.value):Le.has(e?.value)}function ze(e){let t=e.at(-1);return t?.type===`word`&&(Ie.has(t.value)||t.value===`await`&&e.at(-2)?.value===`for`)}function Be(e){return e?e.type===`word`?N.has(e.value)||P.has(e.value)||e.label===!0:e.value===`)`?e.control:e.value===`}`?!e.object:e.type===`punctuator`&&![`++`,`--`,`]`].includes(e.value):!0}var Ve=(e,t)=>e.startsWith(`\r
3
+ `,t+1)?3:2,He=/\\(?:u\{([\da-f]+)\}|u([\da-f]{4})|x([\da-f]{2})|([0-3][0-7]{0,2}|[4-7][0-7]?)|(\r\n|[\n\r\u2028\u2029])|(.))/giu,Ue={b:`\b`,f:`\f`,n:`
4
+ `,r:`\r`,t:` `,v:`\v`};function We(e){return e.includes(`\\`)?e.replace(He,(e,t,n,r,i,a,o)=>{if(a!==void 0)return``;if(i!==void 0)return String.fromCodePoint(Number.parseInt(i,8));let s=Number.parseInt(t??n??r,16);return Number.isNaN(s)?Ue[o]??o:String.fromCodePoint(Math.min(s,1114111))}):e}function Ge(e,t){let n=e[t],r=t+1;for(;r<e.length&&e[r]!==n&&!Fe.includes(e[r]);)r+=e[r]===`\\`?Ve(e,r):1;return[e[r]===n?We(e.slice(t+1,r)):null,r+1]}function Ke(e,t){let n=t+1,r=!1;for(;n<e.length&&!Fe.includes(e[n])&&(r||e[n]!==`/`);)e[n]===`\\`?n++:e[n]===`[`?r=!0:e[n]===`]`&&(r=!1),n++;return M.lastIndex=n+1,M.test(e)?M.lastIndex:n+1}function qe(e,t,n){for(let r=t;r<e.length;r++)if(e[r]===`\\`)r++;else{if(e[r]==="`")return r+1;if(e[r]===`$`&&e[r+1]===`{`)return n.push(`template`),r+2}return e.length}function Je(e){let t=[],n=[],r=[],i=0,a=0;for(;i<e.length;){let o=t.length;if(k.lastIndex=i,k.test(e)&&(i=k.lastIndex),i>=e.length)break;let s=e[i],c=e[i+1];if(M.lastIndex=i,s===`/`&&c===`/`)A.lastIndex=i+2,i=A.test(e)?A.lastIndex-1:e.length;else if(s===`/`&&c===`*`){let t=e.indexOf(`*/`,i+2);i=t<0?e.length:t+2}else if(s===`"`||s===`'`){let[n,r]=Ge(e,i);t.push({type:`string`,value:n}),i=r}else if(s==="`"||s===`}`&&n.at(-1)===`template`){s===`}`&&n.pop();let r=n.length,a=qe(e,i+1,n),o=s==="`"&&n.length===r&&e[a-1]==="`";t.push({type:`string`,value:o?We(e.slice(i+1,a-1)):null}),n.length>r&&t.push({type:`punctuator`,value:"${"}),i=a}else if(s===`/`&&Be(t.at(-1)))i=Ke(e,i),t.push({type:`regex`});else if(M.test(e)){let n=P.has(t.at(-1)?.value)&&!j.test(e.slice(a,i));t.push({type:`word`,value:e.slice(i,M.lastIndex),...n&&{label:n}}),i=M.lastIndex}else{s===`{`&&n.push(Re(t.at(-1),j.test(e.slice(a,i)))?`object`:`block`);let o=s===`}`?n.pop():void 0;s===`(`&&r.push(ze(t));let l=(s===`+`||s===`-`)&&c===s||s===`=`&&c===`>`?s+c:s;t.push({type:`punctuator`,value:l,...s===`)`&&{control:r.pop()===!0},...s===`}`&&{object:o===`object`}}),i+=l.length}t.length>o&&(a=i)}return t}var F=e=>e?.type===`string`&&e.value!==null,Ye=new Set([`type`,`typeof`]),Xe=(e,t)=>e[t+1]?.type===`word`&&(e[t+1].value!==`as`||e[t+2]?.type!==`word`||e[t+2].value===`as`);function Ze(e,t){let n=!1;for(let r=t+1;r<e.length&&e[r].value!==`}`;r++)if(!(r>t+1&&e[r-1].value!==`,`)){if(!Ye.has(e[r].value)||!Xe(e,r))return!1;n=!0}return n}function Qe(e,t){for(let n=t;n<e.length;n++){let{value:r}=e[n];if(r===`;`||n>t&&(r===`import`||r===`export`))return null;if(r===`from`&&F(e[n+1]))return e[n+1].value}return null}function $e(e,t){let[n,r,i]=[e[t].value,e[t+1],e[t+2]],a=n===`import`?`import`:`export-from`;if(n===`import`&&F(r))return{kind:a,specifier:r.value};if(Ye.has(r?.value)&&![`,`,`from`].includes(i?.value)||r?.value===`{`&&Ze(e,t+1)||n===`export`&&![`{`,`*`].includes(r?.value)||n===`import`&&r?.type!==`word`&&![`{`,`*`].includes(r?.value))return null;let o=Qe(e,t+1);return o===null?null:{kind:a,specifier:o}}function et(e,t){let[n,r]=[e[t+2],e[t+3]];if(n?.value!==`)`)return F(n)&&[`)`,`,`].includes(r?.value)?n.value:null}function tt(e,t=new Set){let n=Je(e),r=[];for(let[e,i]of n.entries()){if(i.type!==`word`||[`.`,`#`,`function`].includes(n[e-1]?.value)||n[e-1]?.value===`=`&&n[e-3]?.value===`type`&&n[e-4]?.value===`import`)continue;let a=n[e+1]?.value===`(`,o=a?et(n,e):void 0;if((i.value===`require`||t.has(i.value))&&o!==void 0)r.push({kind:`require`,specifier:o,...i.value!==`require`&&{callee:i.value}});else if(i.value===`import`&&a)o!==void 0&&r.push({kind:`dynamic-import`,specifier:o});else if(i.value===`import`||i.value===`export`){let t=$e(n,e);t&&r.push(t)}}return r}var nt=/^[\w$]*__d\(/gmu,rt=([e,t,n,...r])=>(typeof e==`number`||typeof e==`string`)&&(t===void 0||typeof t==`object`)&&(n===void 0||typeof n==`string`)&&r.length===0;function it(e){let t=/\);?\s*$/u.exec(e)?.index,n=null,r=t===void 0?-1:e.lastIndexOf(`},`,t);for(;r>=0&&/[\d"]/u.test(e[r+2]);){let i;try{i=JSON.parse(`[${e.slice(r+2,t)}]`)}catch{break}if(!rt(i))break;n=i,r=r>0?e.lastIndexOf(`},`,r-1):-1}return n}function at(e){let t=/^[^(]*\(\s*(?:function\s*[\w$]*\s*)?\(([^)]*)\)/u.exec(e)?.[1].split(`,`).slice(1,4).map(e=>e.trim().replaceAll(`$`,`\\$`));if(!t?.length)return[];let n=e.matchAll(RegExp(`(?<=[^\\w$.#]|\\.\\.\\.)(?:${t.join(`|`)})\\((\\d+|"(?:[^"\\\\]|\\\\.)*")[,)]`,`gu`));return[...new Set([...n].map(e=>JSON.parse(e[1])))]}function ot(e,t){if(Array.isArray(e))return e;let n=Object.entries(e??{}).filter(([e])=>/^\d+$/u.test(e)).map(([,e])=>e);return n.length>0?n:at(t)}function st(e,t){let n=new Map(t.files.map((e,t)=>[e,t])),r=e.flatMap((e,t)=>e.file?[{k:t,at:n.get(e.file)}]:[]);for(let n=0;n<(r[0]?.k??0);n++)e[n].file=t.files[r[0].at-r[0].k+n]??null;for(let[n,{k:i,at:a}]of r.entries()){let o=r[n+1];if(!(o&&o.at-a!==o.k-i))for(let n=i+1;n<(o?.k??e.length);n++)e[n].file=t.files[a+n-i]??null}}function ct(e,t){let n=[...e.matchAll(nt)].map(e=>e.index);if(n.length===0)return null;let r=je(e),i=t=>e.slice(r[t],r[t+1]),a=[];for(let[o,s]of n.entries()){let[c]=O(r,s),[l]=O(r,(n[o+1]??e.length)-1),u=it(i(l));for(;!u&&l>c;)u=it(i(--l));if(!u)throw Error(`bundleEdges: the Metro module at line ${c+1} ends in no define params`);let d=r[l+1]??e.length;a.push({id:u[0],file:Pe(t,r,s,d),dependencies:ot(u[1],e.slice(s,d))})}st(a,t);let o=new Map(a.map(e=>[e.id,e])),{edges:s,link:c}=be();for(let{file:e,dependencies:t}of a)for(let n of t)c(e,o.get(n)?.file,`dependency`);return s}var lt=e=>e.path!==null&&![`json`,null].includes(v(e.path)),ut=e=>e.path!==null&&v(e.path)===null;function dt(e){let t=/^_([A-Za-z]+)\d+$/u.exec(e)?.[1];if(t)return[t,`interopRequireDefault`];let n=/^_(interopRequire(?:Default|Wildcard)|jsx(?:Dev)?Runtime|callSuper)$/u.exec(e)?.[1];return n===`callSuper`?[`getPrototypeOf`,`possibleConstructorReturn`,`interopRequireDefault`]:n?[n]:[]}var ft={jsxRuntime:`react/jsx-runtime`,jsxDevRuntime:`react/jsx-dev-runtime`};function pt(e){let{sources:t,names:n,nameList:r}=Ee(e),i=new Map,a=new Map,o=e.files.map(()=>new Set);for(let e=0;e<n.length;e++)n[e]<0||t[e]<0||(a.has(n[e])||a.set(n[e],dt(r[n[e]]).length>0),a.get(n[e])&&o[t[e]].add(r[n[e]]));for(let[t,n]of o.entries()){if(n.size===0)continue;let r=e.files[t],a=new Set(Array.from((r.content??``).matchAll(/(?:function|var|let|const)\s+(_[A-Za-z]+\d*)\b/gu),e=>e[1])),o=[...n].filter(e=>!a.has(e)&&!a.has(e.replace(/\d+$/u,``))).flatMap(dt);o.length>0&&i.set(r,o.map(e=>ft[e]??`@babel/runtime/helpers/${e}`))}return i}function mt(e,t){let n=new Map;for(let[r,i]of e){let e=n.get(r)??n.set(r,new Map).get(r);for(let n of i)e.set(n,b(t,r,n,()=>null))}let r=new Set([...n.values()].flatMap(e=>[...e.values()].map(e=>e.to))),i=(e,n)=>t.byRoot.get(n).find(e=>!r.has(e))??t.byRoot.get(n)[0];return(e,r)=>{let a=n.get(e)?.get(r);return a?.to?a:b(t,e,r,i)}}var ht=e=>/(?:^|\/)__prelude__$/u.test(e.source??``),gt=e=>e?.package?.name===`metro-runtime`&&e.package.path===`src/polyfills/require.js`;function _t(e){if(!e.files.some(ht)&&!gt(e.files[0]))return null;if(!e.files.some(e=>e.content!==null&&!ht(e)&&!gt(e)))throw Error("bundleEdges: the Metro map carries no sourcesContent, which its edges are read from; pass the bundle as `code`");let t=ge(e.files),n=e.files[e.files.findIndex(ut)+1],r=e.files.find(e=>e.package?.name===`metro-runtime`&&e.package.path===`src/modules/asyncRequire.js`),i=new Map(e.files.filter(e=>e.content!==null&&lt(e)).map(e=>[e,tt(e.content)])),a=pt(e),o=mt([...[...i].map(([e,t])=>[e,t.flatMap(({specifier:e})=>e===null?[]:[e])]),...a],t),{edges:s,add:c,link:l}=be();for(let t of e.files){ut(t)&&l(t,n,`dependency`);for(let{kind:e,specifier:n}of i.get(t)??[]){let i=n===null?{to:null}:o(t,n);i.to!==t&&c(t,`${e}\0${JSON.stringify(n)}`,{from:t,kind:e,specifier:n,...i}),e===`dynamic-import`&&l(t,r,`dependency`)}for(let e of a.get(t)??[])l(t,o(t,e).to,`dependency`)}return s}var vt=(e,t)=>t==null?_t(e):ct(t,e);function yt(e,t){let n=vt(e,t);if(!n)throw Error(`bundleEdges: not a Metro ${t==null?`map`:`bundle`}; edges-lite.js reads only those, edges.js reads others`);return{edges:n}}function bt(e){let t=JSON.parse(e.replace(/^\)\]\}'[^\n]*\n/u,``)),n=ke(t),r=t.sections?t.sections.reduce((e,t)=>e+(t.map.names?.length??0),0):t.names?.length??null;return{json:{version:t.version,file:t.file,sourceRoot:t.sourceRoot},map:n,namesCount:r}}function I(e){if(e.map)return e.map.files.flatMap(e=>e.source===null?[]:[[e.source,e.content]]);let t=e.json?.sourcesContent??[];return(e.json?.sources??[]).map((e,n)=>[e,t[n]??null])}function xt(e,t){let n=new Map;for(let{from:r,to:i,specifier:a}of t(e).edges){if(r.source===null||i?.source==null||i.source===r.source)continue;let e=typeof a==`string`?[r.source,i.source,a]:[r.source,i.source];n.set(e.join(`\0`),e)}return[...n.values()]}function St(e){try{return yt(e)}catch{return{edges:[]}}}var Ct=Object.freeze([]);function L(e){return e?.edges?e.edges:e?.map?(e.edges=xt(e.map,St),e.edges):Ct}var R=new WeakMap,z=new WeakMap;function wt(e){let t=L(e);if(!R.has(t)){let e=new Map;for(let[n,r]of t)e.has(n)||e.set(n,new Set),e.get(n).add(r);R.set(t,e)}return R.get(t)}function Tt(e){let t=L(e);if(!z.has(t)){let e=new Map;for(let[n,r,i]of t)i!==void 0&&(e.has(n)||e.set(n,new Map),e.get(n).set(i,r));z.set(t,e)}return z.get(t)}var B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap;function K(t){if(t?.metadataOnly)return new Map;let n=t?.bundle??t?.json;if(n&&B.has(n))return B.get(n);let r=new Map;if(!t)return r;if(t.kind===`stasis`){if(!t.bundle)return r;let n=t.bundle.formats;for(let[i,a]of t.bundle.sources)typeof a==`string`&&(e.isResourceFormat(n?.get(i))||r.set(i,a))}else if(t.kind===`sourcemap`)for(let[e,n]of I(t))typeof n==`string`&&r.set(e,n);return n&&B.set(n,r),r}function Et(e){let t=1;for(let n=e.indexOf(`
5
+ `);n!==-1;n=e.indexOf(`
6
+ `,n+1))t++;return t}var Dt=new WeakMap;function Ot(e){let t=Dt.get(e);if(!t){let n=[...e.keys()].toSorted();t={paths:n,numbers:new Map(n.map((e,t)=>[e,t+1]))},Dt.set(e,t)}return t}function kt(e,t,n){let r=Array.isArray(t)?t:[];return{integrity:e.integrity,kind:`sourcemap`,size:e.size,...Array.isArray(n)?{npmExecutable:new Set(n.filter(e=>typeof e==`string`))}:{},json:{version:3,sources:r.map(([e])=>e),sourcesContent:r.map(([,,e])=>typeof e==`string`?e:null)},fileSizes:new Map(r.map(([e,t])=>[e,t])),npmBinaries:new Map(r.filter(([,,e,t])=>typeof e!=`string`&&typeof t==`string`).map(([e,t,,n,r])=>[e,{size:t,digest:n,...typeof r==`string`?{link:r}:{}}]))}}var At=(e,t)=>e?.npmBinaries?.get(t)?.link;function jt(e,t){if(t.startsWith(`/`))return null;let n=e.split(`/`).slice(0,-1);for(let e of t.split(`/`))if(e!==``&&e!==`.`){if(e!==`..`)n.push(e);else if(n.pop()===void 0)return null}return n.join(`/`)}function q(e){let t=e?.bundle??e?.json;if(t&&V.has(t))return V.get(t);let n=new Map(K(e));for(let[t,r]of e?.npmBinaries??[])n.set(t,{format:`digest`,...r});if(e?.kind===`stasis`&&e.bundle){let t=e.bundle.formats;for(let[r,i]of e.bundle.sources){if(typeof i!=`string`)continue;let e=t?.get(r);e===`resource`?n.set(r,i):e===`resource:base64`&&n.set(r,{format:`base64`,data:i})}}return t&&V.set(t,n),n}var Mt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;function Nt(e){let t=e.endsWith(`=`);if(t?e.length%4!=0||e.at(-3)===`=`:e.length%4==1)return null;let n=t?e.slice(0,e.endsWith(`==`)?-2:-1):e;if(/[^A-Za-z0-9+/]/u.test(n))return null;let r=n.length%4;return r>1&&Mt.indexOf(n.at(-1))&(r===2?15:3)?null:Math.floor(n.length*3/4)}function Pt(e){return typeof e==`string`?r(e):e?.format===`digest`?e.size:e?.format===`base64`?Nt(e.data):null}function J(e){if(e?.fileSizes)return e.fileSizes;let t=e?.bundle??e?.json;if(t&&H.has(t))return H.get(t);let n=new Map,r=q(e),i=e?.kind===`stasis`?e.bundle?.sources.keys():e&&I(e).map(([e])=>e);for(let e of i??[])n.set(e,Pt(r.get(e)));return t&&H.set(t,n),n}function Ft(e){if(e?.metadataOnly)return e.unsizedFiles??new Set;let t=J(e);if(G.has(t))return G.get(t);let n=new Set;for(let r of q(e).keys())t.get(r)===null&&n.add(r);return G.set(t,n),n}function It(t){let n=J(t);if(W.has(n))return W.get(n);let r=Ft(t),i=t?.kind===`stasis`?t.bundle?.formats:null,a=new Map;for(let[o,s]of n)s===null&&!r.has(o)||a.set(o,e.isResourceFormat(i?.get(o))||t?.npmBinaries?.has(o)?`resource`:`source`);return W.set(n,a),a}function Lt(t){let n=J(t),r=t?.kind===`stasis`?t.bundle?.formats:null;if(!r||r.size===0)return n;if(U.has(n))return U.get(n);let i=new Map;for(let[t,a]of n)e.isResourceFormat(r.get(t))||i.set(t,a);return U.set(n,i),i}var Y=new WeakMap;function Rt(e){if(e?.kind!==`stasis`||!e.bundle?.modules)return null;if(Y.has(e.bundle))return Y.get(e.bundle);let t=new Map;for(let[n,r]of e.bundle.modules)for(let e of Object.keys(r.files))t.set(n===`.`?e:`${n}/${e}`,n);return Y.set(e.bundle,t),t}function zt(e,n=null){let r=new Map;if(e?.kind!==`stasis`||!e.bundle?.modules)return r;for(let[i,a]of e.bundle.modules){if(i===`.`||n&&!n.has(i))continue;let e=a?.repo?.github,o=t(a?.repo?.commit);if(typeof e!=`string`||e===``||!o)continue;let s=typeof a.repo.directory==`string`?a.repo.directory:``;r.set(i,{github:e,...s?{directory:s}:{},commit:o})}return r}function Bt(e,t=null,n=(e,t)=>t.name){let r=new Map;if(e?.kind!==`stasis`||!e.bundle?.modules)return r;let i=t===null?null:Rt(e),a=t===null?null:new Set([...t].map(e=>i?.get(e)));for(let[t,i]of e.bundle.modules){if(a&&!a.has(t)||!t.includes(`node_modules`)||!i?.name||typeof i.version!=`string`||!i.version)continue;let e=n(t,i),o=r.get(e);o||(o=new Set,r.set(e,o)),o.add(i.version)}return r}var Vt={__proto__:null,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`jsx`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsx:`tsx`,json:`json`,css:`css`,html:`markup`,htm:`markup`,xml:`markup`,svg:`markup`,yml:`yaml`,yaml:`yaml`,sh:`bash`,bash:`bash`,md:`markdown`,markdown:`markdown`,sol:`solidity`,php:`php`,phtml:`php`,rs:`rust`,rb:`ruby`,podspec:`ruby`,py:`python`,pyw:`python`,pyi:`python`,java:`java`,swift:`swift`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,"c++":`cpp`,hpp:`cpp`,hh:`cpp`,hxx:`cpp`,"h++":`cpp`,h:`cpp`,c:`c`,m:`objectivec`,mm:`objectivec`,cff:`yaml`},Ht={__proto__:null,"podfile.lock":`yaml`,"pubspec.lock":`yaml`,".clang-format":`yaml`,".clang-tidy":`yaml`,".clangd":`yaml`,".yamllint":`yaml`,".gemrc":`yaml`},Ut={__proto__:null,module:`javascript`,commonjs:`javascript`,"module-typescript":`typescript`,"commonjs-typescript":`typescript`,json:`json`,solidity:`solidity`,php:`php`,shell:`bash`,rust:`rust`,java:`java`,swift:`swift`,objc:`objectivec`,objcpp:`objectivec`,c:`c`,"c-header":`c`,cpp:`cpp`,"cpp-header":`cpp`,ruby:`ruby`,podspec:`ruby`,podfile:`ruby`,fastlane:`ruby`,"podfile-lock":`yaml`,xml:`markup`};function Wt(e){if(typeof e!=`string`)return!1;let t=e.length-1,n=0;for(;n<t&&/\s/u.test(e[n]);)n++;for(;t>n&&/\s/u.test(e[t]);)t--;return n<t&&e[n]===`{`&&e[t]===`}`}function Gt(e,t,n){if(typeof t==`string`&&Ut[t])return Ut[t];if(typeof e!=`string`)return null;let r=e.slice(e.lastIndexOf(`/`)+1),i=Ht[r.toLowerCase()];if(i)return i;let a=r.lastIndexOf(`.`);if(a<=0)return null;let o=r.slice(a+1).toLowerCase();return o===`map`?Wt(n)?`json`:null:Vt[o]??null}var Kt=Object.freeze({javascript:`JavaScript`,jsx:`JSX`,typescript:`TypeScript`,tsx:`TSX`,json:`JSON`,css:`CSS`,markup:`HTML`,yaml:`YAML`,bash:`Shell`,markdown:`Markdown`,solidity:`Solidity`,php:`PHP`,rust:`Rust`,ruby:`Ruby`,java:`Java`,cpp:`C++`,c:`C`,objectivec:`Objective-C`,python:`Python`,go:`Go`,kotlin:`Kotlin`,swift:`Swift`,dart:`Dart`,sql:`SQL`,lua:`Lua`,csharp:`C#`,scala:`Scala`,vue:`Vue`,svelte:`Svelte`}),qt=Object.freeze({py:`python`,pyw:`python`,go:`go`,kt:`kotlin`,kts:`kotlin`,swift:`swift`,dart:`dart`,sql:`sql`,lua:`lua`,cs:`csharp`,scala:`scala`,sc:`scala`,vue:`vue`,svelte:`svelte`});function Jt(e){let t=typeof e==`string`?e.slice(e.lastIndexOf(`/`)+1):``,n=t.lastIndexOf(`.`),r=n>0?t.slice(n+1).trim().toLowerCase():``,i=Gt(e)??qt[r];return i?{key:i,label:Kt[i]??i}:r?{key:`extension:${r}`,label:`.${r}`}:{key:`other`,label:`Other`}}function X(e,t){let n=new Map,r=0,i=0;for(let[a,o]of e){let e=Jt(a),s=n.get(e.key)??{...e,files:0,lines:0,bytes:0};s.files++,s.lines+=o,s.bytes+=t.get(a)??0,n.set(e.key,s),i+=o,r+=t.get(a)??0}return{files:e.size,lines:i,bytes:r,languages:[...n.values()].toSorted((e,t)=>t.lines-e.lines||e.label.localeCompare(t.label))}}var Z=6,Q=new WeakMap,Yt=new Set([`terminal`,`code`,`search`,`compare`]);function Xt(e,t=null){return!!t||Yt.has(e)}var Zt=/^sha512-[A-Za-z0-9+/]{86}==$/u;function Qt(e){if(e.fileHashes)return Promise.resolve(e.fileHashes);if(Q.has(e))return Q.get(e);let t=(async()=>{let t=[...K(e)],r=new Map;for(let e=0;e<t.length;e+=32){let i=await Promise.all(t.slice(e,e+32).map(async([e,t])=>[e,await n(t)]));for(let[e,t]of i)r.set(e,t)}return e.fileHashes=r,r})();return Q.set(e,t),t.catch(()=>Q.delete(e)),t}function $t(e){if(typeof e!=`string`)return 0;let t=/\S/gu,n=/[\r\n]/gu,r=0;for(;t.test(e)&&(r++,n.lastIndex=t.lastIndex,n.test(e));)t.lastIndex=n.lastIndex;return r}function en(e){return e.lineCounts??=new Map([...K(e)].map(([e,t])=>[e,$t(t)]))}function $(e){return e instanceof Map?Object.fromEntries([...e].map(([e,t])=>[e,$(t)])):e}async function tn(e){let t=await Qt(e),n=J(e),i=en(e),a={version:Z,integrity:e.integrity,kind:e.kind,size:e.size,codeStats:X(i,n),files:[...n].map(([e,n])=>[e,n,t.get(e)??null,i.get(e)??null])},o=Ft(e);if(o.size>0&&(a.unsized=[...o]),e.kind===`sourcemap`){let{version:t,file:n,sourceRoot:i,names:o}=e.json,s=I(e);a.json={version:t,file:n,sourceRoot:i,sources:s.map(([e])=>e)},a.sourceSizes=s.map(([,e])=>typeof e==`string`?r(e):null),a.namesCount=e.namesCount??o?.length??null;let c=new Map(a.files.map(([e],t)=>[e,t]));a.edges=L(e).map(([e,t,...n])=>[c.get(e),c.get(t),...n])}else{let t=e.bundle,r={version:t.version,config:t.config,repo:t.repo,package:t.package,formats:$(t.formats),imports:$(t.imports),reason:t.reason,executable:[...t.executable]};if(t.version===0)r.sources=Object.fromEntries([...n.keys()].map(e=>[e,null]));else{let e={},n={};for(let[r,i]of t.modules){let t=r.split(`/`).includes(`node_modules`)?e:n;Object.defineProperty(t,r,{enumerable:!0,value:{name:i.name,version:i.version,ecosystem:i.ecosystem,repo:i.repo,files:Object.fromEntries(Object.keys(i.files).map(e=>[e,null]))}})}r.modules=e,t.config.scope===`full`&&(r.sources=n,r.entries=[...t.entries])}a.bundle=r}return a}function nn(t,n){if(![1,2,3,4,5,Z].includes(t?.version)||t.integrity!==n||![`stasis`,`sourcemap`].includes(t.kind)||!Number.isSafeInteger(t.size)||t.size<0||!Array.isArray(t.files))throw Error(`Invalid bundle metadata`);let r=t.version!==Z,i=t.version===1,a=new Map,o=new Map,s=new Map;for(let e of t.files){if(!Array.isArray(e)||e.length!==4&&!(i&&e.length===3))throw Error(`Invalid bundle metadata file`);let[t,n,r,c]=e;if(typeof t!=`string`||o.has(t)||n!==null&&(!Number.isSafeInteger(n)||n<0)||r!==null&&(typeof r!=`string`||!Zt.test(r))||n===null&&r!==null||i&&n!==null&&r===null||c!=null&&(!Number.isSafeInteger(c)||c<0))throw Error(`Invalid bundle metadata file`);o.set(t,n),r!==null&&a.set(t,r),c!=null&&s.set(t,c)}let c=new Set(t.unsized??[]);if(t.unsized!==void 0&&(i||!Array.isArray(t.unsized)||c.size!==t.unsized.length)||[...c].some(e=>typeof e!=`string`||!o.has(e)||o.get(e)!==null))throw Error(`Invalid bundle metadata`);let l={integrity:n,kind:t.kind,size:t.size,metadataOnly:!0,fileSizes:o,fileHashes:a,lineCounts:s,unsizedFiles:c,stale:r};if(t.kind===`stasis`){l.bundle=e.fromJSON(t.bundle);let n=l.bundle.sources;if(n.size!==o.size||[...n.keys()].some(e=>!o.has(e)))throw Error(`Invalid bundle metadata inventory`);let r=l.bundle.formats;if(!i&&[...o].some(([t,n])=>a.has(t)!==(n!==null&&!e.isResourceFormat(r.get(t))))||[...c].some(e=>r.get(e)!==`resource:base64`))throw Error(`Invalid bundle metadata inventory`)}else{if(!t.json||typeof t.json!=`object`||![null,void 0].includes(t.namesCount)&&(!Number.isSafeInteger(t.namesCount)||t.namesCount<0))throw Error(`Invalid sourcemap metadata`);if(!Array.isArray(t.json.sources)||t.json.sources.some(e=>!o.has(e))||!Array.isArray(t.sourceSizes)||t.sourceSizes.length!==t.json.sources.length||t.sourceSizes.some(e=>e!==null&&(!Number.isSafeInteger(e)||e<0))||[...o].some(([e,t])=>a.has(e)!==(t!==null))||c.size>0)throw Error(`Invalid sourcemap inventory`);l.json=t.json,l.sourceSizes=t.sourceSizes,l.namesCount=t.namesCount,t.edges!==void 0&&(l.edges=rn(t.edges,t.files))}if(t.codeStats===void 0)l.codeStats=X(s,o);else{let e=t.codeStats,n=e=>Number.isSafeInteger(e)&&e>=0;if(!e||![e.files,e.lines,e.bytes].every(n)||!Array.isArray(e.languages)||e.languages.some(e=>!e||typeof e.key!=`string`||typeof e.label!=`string`||![e.files,e.lines,e.bytes].every(n)))throw Error(`Invalid bundle code stats`);l.codeStats=e}return l}function rn(e,t){if(!Array.isArray(e))throw TypeError(`Invalid sourcemap edges`);return e.map(e=>{if(!Array.isArray(e)||![2,3].includes(e.length)||e[0]===e[1]||e.length===3&&typeof e[2]!=`string`||e.slice(0,2).some(e=>!Number.isSafeInteger(e)||e<0||e>=t.length))throw Error(`Invalid sourcemap edges`);return[t[e[0]][0],t[e[1]][0],...e.slice(2)]})}function an(t,{integrity:n,kind:r,size:i}){if(r===`stasis`)return{integrity:n,kind:r,size:i,bundle:e.parse(t)};if(r!==`sourcemap`)throw Error(`Unsupported bundle format`);return{integrity:n,kind:r,size:i,...bt(t)}}export{Gt as a,X as b,L as c,wt as d,Tt as e,K as f,Et as g,Ot as h,kt as i,At as j,jt as k,q as l,Pt as m,J as n,It as o,Lt as p,Rt as q,zt as r,Bt as s,Xt as t,Qt as u,$t as v,en as w,tn as x,nn as y,an as z};
@@ -0,0 +1 @@
1
+ import{Pf as e,Rf as t,Tf as n,pe as r,qe as i}from"./chunk-HGWFRZNC.js";import{a,u as o}from"./chunk-SZTCJVZJ.js";import{c as s,d as c,g as l}from"./chunk-2XUEZHIP.js";var u=e(c`<path d="M3.5 8.4l2.9 2.9 6.1-6.6"/>`),d=e(c`<circle class="fill" cx="8" cy="8" r="3"/>`),f=e(c`<path d="M4.2 4.2l7.6 7.6M11.8 4.2l-7.6 7.6"/>`),p=e(c`<circle class="dotted" cx="8" cy="8" r="5.5"/>`),m=e(c`<path d="M2.6 3.2h7.6v5.3H6.3L4 10.4V8.5H2.6z"/><path d="M12.2 6.2h1.2v5.3H12v1.9l-2.3-1.9H7"/>`),h={approved:[`approved`,n.approved[1],`Approved`],changes:[`changes`,n.changes[1],`Changes requested`],commented:[`commented`,t,`Commented`],dismissed:[`dismissed`,t,`Review dismissed`]},g={done:[`reviewed`,u,`Reviewed`],running:[`running`,d,`Reviewing`],failed:[`failed`,f,`Review failed`],requested:[`requested`,p,`Asked to review again`]},_=[`requested`,p,`Review requested`],v=e=>e.slice(0,7),y=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),b=(e,t,n=!1)=>`${e.toLocaleString(`en-US`)}${n?`+`:``} ${t}${e===1&&!n?``:`s`}`;function x(e){return e?e.failed?g.failed:e.requested?g.requested:g[e.code?.status]??null:null}function S(e){let t=x(e.codex),n=e.codex?.code?.commit??null;return[...t?[{who:o(e.codex.login,`Codex`),standing:t,commit:n,stale:n!==null&&n!==e.head}]:[],...e.reviewers.map(t=>({who:o(t.login,t.login??`someone`),standing:h[t.state]??_,requested:t.requested&&!!h[t.state],workflow:t.workflow??null,commit:t.commit,at:t.at,stale:t.commit!==null&&t.commit!==e.head}))]}var C=e=>(e.moreReviews??0)+(e.moreRequests??0),w=e=>[e.moreReviews>0?b(e.moreReviews,`more review`):null,e.moreRequests>0?b(e.moreRequests,`more review request`):null].filter(Boolean).join(` and `);function T(e){if(!e.head)return!0;let t=e.codex?.code;return t?.status===`done`&&t.commit===e.head||e.reviewers.some(t=>h[t.state]&&t.state!==`dismissed`&&t.commit===e.head)?!0:e.moreReviews>0&&null}var E=e=>e?s`<span class="${`review-severity is-${e}`}">${e.toUpperCase()}</span>`:l;function D(e){if(!e)return l;let t=S(e),{open:n,more:r,severity:i}=e.threads,a=n>0?`${b(n,`open review thread`,r)}${i?`, the gravest ${i.toUpperCase()}`:``}`:r?`No open review thread among those read; more on GitHub`:null,o=T(e);return s`<span class="issue-reviews">${t.map(({who:e,standing:[t,n,r],commit:i,stale:a,requested:o})=>{let c=`${r}${o?`, and requested again`:``}${a?`, on an earlier commit (${v(i)})`:i?`, on the latest commit`:``}`;return s`<span class="${`review-mark is-${t}${a?` is-stale`:``}`}"><span class="review-glyph" role="img" aria-label="${c}" data-tooltip="${c}">${n}</span><span class="review-who">${e}</span></span>`})} ${C(e)>0?s`<span class="review-more" data-tooltip="${`${w(e)}, on GitHub`}">+${C(e)}</span>`:l} ${a?s`<span class="review-threads" role="img" aria-label="${a}" data-tooltip="${a}">${m}<span>${n}${r?`+`:``}</span>${E(i)}</span>`:l} ${o===!1?s`<span class="review-unreviewed" data-tooltip="${t.length>0?`No review is on the latest commit`:`No reviews yet`}">Unreviewed</span>`:o===null?s`<span class="review-unreviewed" data-tooltip="No review read is on the latest commit; more on GitHub">Unreviewed?</span>`:l}</span>`}function O(e,t,n){if(!e)return l;let r=s`<code>${v(e)}</code>`;return s`<span class="review-on">on ${n?s`<a href="${`https://github.com/${n}/commit/${e}`}" target="_blank" rel="noopener noreferrer">${r}</a>`:r}${e===t?`, the latest commit`:`, an earlier commit`}</span>`}function k(e,t){if(!e)return l;let{head:n,codex:r}=e,i=(e,[i,a,c],l)=>s`<li class="review-row">${o(r.login,`Codex`)} <span class="${`review-state is-${i}`}">${a}${l}: ${c.toLowerCase()}</span>${O(e.commit,n,t)}</li>`,a=[...r?.code?[i(r.code,x(r)??g.done,`Code review`)]:[],...r?.security?[i(r.security,g[r.security.status]??g.done,`Security review`)]:[],...S({...e,codex:null}).map(({who:e,standing:[r,i,a],commit:o,at:c,requested:u,workflow:d})=>s`<li class="review-row">${e} <span class="${`review-state is-${r}`}">${i}${a}${u?`, requested again`:``}</span>${d?s`<span class="review-on">by the workflow <code>${d}</code></span>`:l}${O(o,n,t)}${c?s`<time datetime="${new Date(c).toISOString()}">${y(c)}</time>`:l}</li>`)],{open:c,resolved:u,more:d,list:f=[]}=e.threads;return s`<section class="repo-item-section"><h4>Reviews</h4>${a.length>0?s`<ul>${a}</ul>`:s`<p class="repo-item-quiet">No reviews yet.</p>`} ${C(e)>0?s`<p class="repo-item-quiet">And ${w(e)}, on GitHub.</p>`:l} ${T(e)===null?s`<p class="repo-item-quiet">No review read is on the latest commit, <code>${v(n)}</code>; one of those on GitHub may be.</p>`:a.length>0&&!T(e)?s`<p class="repo-item-quiet">No review is on the latest commit, <code>${v(n)}</code>.</p>`:l}</section>${c>0||u>0?s`<section class="repo-item-section"><h4>Open threads</h4>${f.length>0?s`<ul>${f.map(e=>s`<li><a class="repo-item-row review-thread" href="${e.url??l}" target="_blank" rel="noopener noreferrer">${E(e.severity)}<span class="repo-item-title">${e.title||`(no comment)`}</span> ${e.path?s`<code class="review-path">${e.path}${e.line?`:${e.line}`:``}</code>`:l} ${e.outdated?s`<span class="repo-item-quiet">outdated</span>`:l}</a></li>`)}</ul>`:s`<p class="repo-item-quiet">${d?`None open among those read.`:`None open.`}</p>`} ${u>0||d?s`<p class="repo-item-quiet">${u>0?`${b(u,`thread`)} resolved`:``}${d?`${u>0?`; `:``}more on GitHub`:``}.</p>`:l}</section>`:l}`}var A=a({items:new Map,changes:0}),j=i(A.items),M=(e,t,n)=>`${e}\0${t}\0${n}`,N=e=>Number.isSafeInteger(e?.readAt)&&e.readAt>0?e.readAt:Date.now();function P(e,t,n,i=null){j();let a=r(),o=!1;for(let r of t){let t=M(a,e,r.number),s=A.items.get(t);if(s&&s.readAt>n)continue;let c=s&&R(s.item),l=!c||c===R(r)?s?.moved??null:{from:c,before:s.readAt};A.items.set(t,{item:{...r,kind:r.kind??i??s?.item.kind??null},readAt:n,moved:l}),o=!0}o&&A.changes++}var F=(e,t)=>A.items.get(M(r(),e,t))??null;function I(e,t){let n=M(r(),e,``);return A.changes,[...A.items].flatMap(([e,r])=>e.startsWith(n)&&r.item.kind===t?[r]:[])}var L=()=>A.changes,R=e=>e.state===`open`?`open`:`closed`;function z(e,t){let n=R(e.item);if(e.readAt<=t||!e.moved)return n;if(e.moved.before>=t)return e.moved.from;let r=e.item.closedAt??e.item.mergedAt??null;return n===`closed`&&r!==null&&r>t?e.moved.from:n}export{D as a,k as b,N as c,P as d,F as e,I as f,L as g,R as h,z as i};
@@ -0,0 +1 @@
1
+ import{a as e,b as t,c as n,e as r,g as i,h as a,i as o,k as s,l as c,m as l,n as u,p as d,q as f,r as p,s as m}from"./chunk-CU3FPB3P.js";import{b as h,c as g,d as _,e as v,f as y,g as b,h as x,i as S,k as C,l as w}from"./chunk-GX5UXWT4.js";import{H as T,M as E,m as D}from"./chunk-LVW7WWV4.js";import"./chunk-ZQHLECTI.js";import{a as O,b as k,d as ee,e as A,g as j}from"./chunk-VYYUMYVW.js";import{d as M,h as N,i as P}from"./chunk-7HP2VYIC.js";import"./chunk-PXK7EU4V.js";import"./chunk-OOJM4CTU.js";var F=[`https:`,`http:`,`file:`];function I(e,t,n=F){let r=URL.parse(S(e,t));if(r===null||n!==null&&!n.includes(r.protocol))throw new M(`${N(e)} is not a URL${n===null?``:` of ${n.map(e=>e.slice(0,-1)).join(`, `)}`}`,t);return r}function L(e,t){let n=Object.create(null);for(let[r,i,a]of _(e,t)){if(!(r in l))throw new M(`${N(r)} is not a hash algorithm of hashlib's this reader knows`,a);n[r]=u(r,y(i,a),l[r],a)}if(Object.keys(n).length===0)throw new M(`expected a hash at least`,t);return n}function R(e,t){if(!(e instanceof k))throw h(`a date-time`,e,t);if(!/(?:Z|[+-]00:00)$/u.test(e.text))throw new M(`${e.text} is not in UTC`,t);return e.text}function z(e,t,n){if(g(e,t,[`url`,`path`,`size`,`upload-time`,`hashes`,...n]),e.url===void 0&&e.path===void 0)throw new M(`expected a url or a path`,t);let r=D(e,`url`,t,I);return{file:{url:e.url,path:D(e,`path`,t,f),size:D(e,`size`,t,x),uploadTime:D(e,`upload-time`,t,R),hashes:L(e.hashes,P(t,`hashes`))},pathname:r?.pathname}}function B(t,n,r,i){let a=D(t,`name`,n,S),{file:o,pathname:l}=z(t,n,[`name`]),u=m({name:a,path:o.path,pathname:l});if(u===void 0)throw new M(`${N(o.url)} names no file`,n);let d=i?s(u):c(u);if(d===void 0)throw new M(`${N(u)} is not the name of ${i?`a wheel`:`an sdist, .tar.gz or .zip`}`,n);if(d.name!==r.name)throw new M(`${N(u)} is not a file of ${N(r.name)}`,n);if(r.versionKey!==void 0&&e(d.version)!==r.versionKey)throw new M(`${N(u)} is not of version ${N(r.version)}`,n);return{name:u,...o}}var V=(e,t,n)=>e===void 0?void 0:B(e,t,n,!1);function H(e,t,n){if(e===void 0)return[];let r=new Set;return C((e,t)=>{let i=B(e,t,n,!0);if(r.has(i.name))throw new M(`${N(i.name)} is listed twice`,t);return r.add(i.name),i})(e,t)}var U=(e,t)=>({...z(e,t,[`subdirectory`]).file,subdirectory:D(e,`subdirectory`,t,p)});function W(e,t){return g(e,t,[`path`,`editable`,`subdirectory`]),{path:f(e.path,P(t,`path`)),editable:D(e,`editable`,t,b)??!1,subdirectory:D(e,`subdirectory`,t,p)}}var G=new Set([`git`,`hg`,`bzr`,`svn`]);function K(e,t){g(e,t,[`type`,`url`,`path`,`requested-revision`,`commit-id`,`subdirectory`]);let n=S(e.type,P(t,`type`));if(!G.has(n))throw new M(`expected one of ${[...G].join(`, `)}`,P(t,`type`));if(e.url===void 0&&e.path===void 0)throw new M(`expected a url or a path`,t);let r=S(e[`commit-id`],P(t,`commit-id`));if((n===`git`||n===`hg`)&&!T(r))throw new M(`${N(r)} is not a full commit hash, which the spec requires`,P(t,`commit-id`));return{type:n,url:D(e,`url`,t,(e,t)=>I(e,t,null)&&E(e,t)),path:D(e,`path`,t,f),requestedRevision:D(e,`requested-revision`,t,S),commitId:r,subdirectory:D(e,`subdirectory`,t,p)}}var q=C((e,t)=>(S(g(e,t).kind,P(t,`kind`)),e)),J=[`lock-version`,`environments`,`requires-python`,`extras`,`dependency-groups`,`default-groups`,`created-by`,`packages`,`tool`],Y=[`name`,`version`,`marker`,`requires-python`,`dependencies`,`vcs`,`directory`,`archive`,`index`,`sdist`,`wheels`,`attestation-identities`,`tool`];function X(e,t){if(!/^1\.\d+$/u.test(y(e,t)))throw new M(`unsupported lock-version: expected "1.0", found ${N(e)}`,t);return e}function Z(e,t,n){let r=[`vcs`,`directory`,`archive`].filter(t=>e[t]!==void 0),i=V(e.sdist,P(t,`sdist`),n),a=H(e.wheels,P(t,`wheels`),n),o=i!==void 0||a.length>0;if(o&&r.length>0)throw new M(`${r.join(` and `)} beside an sdist or wheels, which the spec forbids`,t);if(!o&&r.length!==1)throw new M(`expected one of vcs, directory and archive, or an sdist or wheels, found ${r.length===0?`none`:r.join(` and `)}`,t);return{vcs:D(e,`vcs`,t,K),directory:D(e,`directory`,t,W),archive:D(e,`archive`,t,U),index:D(e,`index`,t,d),sdist:i,wheels:a}}function Q(e,i){g(e,i,Y);let s=a(e.name,P(i,`name`)),c=D(e,`version`,i,n);return{name:s,version:c,marker:D(e,`marker`,i,o),requiresPython:D(e,`requires-python`,i,r),dependencies:[],...Z(e,i,{name:s,version:c,versionKey:c===void 0?void 0:t(c)}),attestationIdentities:D(e,`attestation-identities`,i,q)??[],tool:D(e,`tool`,i,g)}}function $(e,t){return e instanceof k||e instanceof ee?t instanceof e.constructor&&e.text===t.text:Array.isArray(e)?Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>$(e,t[n])):A(e)?A(t)&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every(([e,n])=>$(n,t[e])):e===t}function te(e,t,n,r){return e===void 0?[]:C((e,t)=>{if(g(e,t).name===void 0)throw new M(`expected a name`,t);let i=Object.entries(e),a=(r.get(e.name)??[]).filter(e=>i.every(([t,r])=>$(r,n[e][t])));if(a.length!==1)throw new M(a.length===0?`names no entry of packages`:`could be any of ${a.length} entries of packages`,t);return a[0]})(e,t)}function ne(e){let t=new Map;for(let[n,r]of e.entries())if(r.marker===void 0){if(t.has(r.name))throw new M(`${N(r.name)} is listed with no marker, as packages[${t.get(r.name)}] is, and both would be installed`,`packages[${n}]`);t.set(r.name,n)}}function re(e){let t=g(j(e),void 0,J),n=X(t[`lock-version`],`lock-version`),s=v(t.packages,`packages`),c=s.map((e,t)=>Q(e,`packages[${t}]`));ne(c);let l=Map.groupBy(c.keys(),e=>c[e].name);for(let[e,t]of c.entries())t.dependencies=te(s[e].dependencies,`packages[${e}].dependencies`,s,l);return{lockVersion:n,environments:D(t,`environments`,``,w(o)),requiresPython:D(t,`requires-python`,``,r),extras:D(t,`extras`,``,w(a))??[],dependencyGroups:D(t,`dependency-groups`,``,w(i))??[],defaultGroups:D(t,`default-groups`,``,w(i))??[],createdBy:S(t[`created-by`],`created-by`),packages:c,tool:D(t,`tool`,``,g)}}export{M as LockfileError,O as TomlError,re as parsePylock};
@@ -0,0 +1 @@
1
+ import{e}from"./chunk-ZQHLECTI.js";import{d as t,f as n,h as r,i}from"./chunk-7HP2VYIC.js";var a=Object.freeze(Object.create(null));function o(e){return e===void 0?`nothing`:e===null?`null`:Array.isArray(e)?`a sequence`:typeof e==`object`?`a mapping`:typeof e==`string`?`the string ${r(e)}`:`the ${typeof e} ${String(e)}`}function s(e,n,a,o,s){let c=(n,r,i)=>new t(`expected ${n}, found ${e(r)}`,i),l=(e,t)=>(n,r)=>{if(!e(n))throw c(t,n,r);return n},u=(e,s,l,u={})=>{if(!n(e))throw c(a,e,s);for(let n of l===void 0?[]:Object.keys(e)){if(Object.hasOwn(u,n))throw new t(u[n],i(s??``,n));if(!l.includes(n))throw new t(`unsupported ${o} ${r(n)}`,s)}return e};return{refuse:c,record:u,entries:(e,t)=>Object.entries(u(e,t)).map(([e,n])=>[e,n,i(t,e)]),sequence:l(Array.isArray,s),string:l(e=>typeof e==`string`,`a string`),boolean:l(e=>typeof e==`boolean`,`true or false`),count:l(e=>Number.isSafeInteger(e)&&e>=0,`a non-negative integer`)}}var c=e=>typeof e==`object`&&!!e&&!Array.isArray(e),{refuse:l,record:u,entries:d,sequence:f,string:p,boolean:m,count:h}=s(o,c,`a mapping`,`field`,`a sequence`),g=e=>e===void 0?a:e,ee=e=>(t,n)=>t===void 0?void 0:e(t,n),_=(e,t,n,r)=>e[t]===void 0?void 0:r(e[t],i(n,t));function v(e,n){if(p(e,n)===``)throw new t(`expected a non-empty string`,n);return e}function y(e,t,n=e=>e){return f(e,t).map((e,r)=>n(v(e,`${t}[${r}]`),`${t}[${r}]`))}function b(e,t,n,r=d){let i=Object.create(null);for(let[a,o,s]of r(e,t))i[a]=n(o,s,a);return i}var x=(e,t,n=()=>{})=>b(e,t,(e,t,r)=>(n(r,t),p(e,t)));function S(e,t){if(e!==void 0&&e!==!0)throw l(`true`,e,t);return e===!0}var C=e=>(n,i)=>(a,o)=>{let s=e(a,o);if(!n(s))throw new t(`${r(s)} is not ${i}`,o);return s};function w(e,t=e=>e){let n=new Set;return e.find(e=>n.size===n.add(t(e)).size)}function T(e,t){if(!c(e))throw TypeError(`expected an options object`);let n=Object.keys(e).find(e=>!t.includes(e));if(n!==void 0)throw TypeError(`unknown option ${r(n)}, of ${t.join(`, `)}`);return e}function te({checkVersions:e=!0,semver:t},n){if(typeof e!=`boolean`)throw TypeError(`checkVersions: expected a boolean`);if(t!==void 0&&!n.every(e=>typeof t?.[e]==`function`))throw TypeError(`semver: expected the semver package, with ${n.join(`, `)}`);if(e&&t===void 0)throw TypeError(`checkVersions needs semver: pass it as semver, or set checkVersions to false`);return e}var E=C(v),ne=/^(?:@[\dA-Za-z~-][\w.~-]*\/)?[\dA-Za-z~-][\w.~-]*$/u,D=e=>e.length<=214&&ne.test(e);function O(e,n){if(!D(e))throw new t(`${r(e)} is not a package name`,n);return e}var k=`(0|[1-9]\\d*)`,A=`(?:0|[1-9]\\d*|\\d*[A-Za-z-][\\dA-Za-z-]*)`,j=RegExp(`^${k}\\.${k}\\.${k}(?:-${A}(?:\\.${A})*)?(?:\\+[\\dA-Za-z-]+(?:\\.[\\dA-Za-z-]+)*)?$`,`u`);function M(e){if(e.length>256)return!1;let t=j.exec(e);return t!==null&&t.slice(1,4).every(e=>Number(e)<=2**53-1)}var N=E(M,`a version`),P=/[\p{Cc}\p{Zl}\p{Zp}\p{Bidi_Control}\\]/u,F=e=>e!==``&&e!==`.`&&e!==`..`&&!P.test(e),I=e=>!/^[A-Za-z]:/u.test(e)&&e.split(`/`).every(F);function L(e,n){let i=v(e,n);if(i===`.`)return i;let a=!0;for(let e of i.split(`/`))if(!(e===`..`&&a)&&(a=!1,!F(e)))throw new t(`${r(i)} is not a relative path in normal form`,n);if(/^[A-Za-z]:/u.test(i))throw new t(`${r(i)} starts with a drive letter`,n);return i}function R(e,n){let i=L(e,n);if(i===`..`||i.startsWith(`../`))throw new t(`${r(i)} climbs out of the directory it is in`,n);return i}function z(e,t){let n=e===`.`?[]:e.split(`/`);for(let e of t===`.`?[]:t.split(`/`))e===`..`&&n.length>0&&n.at(-1)!==`..`?n.pop():n.push(e);return n.length===0?`.`:n.join(`/`)}var B=(e,t)=>z(e,t.split(`/`).filter(e=>e!==``&&e!==`.`).join(`/`)||`.`);function V(e,t){let n=e===`.`?[]:e.split(`/`),r=t===`.`?[]:t.split(`/`),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return[...n.slice(i).map(()=>`..`),...r.slice(i)].join(`/`)||`.`}var H=e=>/^(?:[\da-f]{40}|[\da-f]{64})$/u.test(e),re=e=>/^[\da-f]{64}$/u.test(e),U=e=>/^[\da-f]{40}$/u.test(e),W=/^$|^@$|^-|[\p{Cc}\p{Zl}\p{Zp}\p{Bidi_Control} ~^:?*[\\]|\.\.|@\{|^\/|\/$|\/\/|(?:^|\/)\.|\.lock(?:\/|$)|\.$/u,G=E(e=>!W.test(e),`a branch or tag name git takes`),K=/^(?:[^/:]*:\/\/)?(?:[^/@]*@)?-/u,q=/^[\dA-Za-z][\d+.A-Za-z-]*::/u,J=e=>e.replace(/%([\dA-Fa-f]{2})/gu,(e,t)=>String.fromCodePoint(Number.parseInt(t,16)));function Y(e,n){let i=v(e,n);if(K.test(i)||K.test(J(i)))throw new t(`${r(i)} has a "-" where git or ssh would read an option`,n);if(q.test(i))throw new t(`${r(i)} names a remote helper of git's, which is not supported`,n);return i}function X(e,n){if(/[\s\p{Cc}]/u.test(v(e,n)))throw new t(`${r(e)} is not a repository URL`,n);return Y(e,n)}var ie={__proto__:null,sha1:20,sha256:32,sha384:48,sha512:64},ae=t=>n(()=>e(t,{padding:!0}).length,()=>{});function Z(e,n){let i=v(e,n),a=i.indexOf(`-`),o=a===-1?void 0:ie[i.slice(0,a)];if(o===void 0||ae(i.slice(a+1))!==o)throw new t(`${r(e)} is not a sha1, sha256, sha384 or sha512 integrity`,n);return e}function oe(e,n){let r=new Map;for(let i of v(e,n).split(` `)){let e=Z(i,n).slice(0,i.indexOf(`-`));if(r.has(e))throw new t(`two ${e} integrities`,n);r.set(e,i)}return r}var se=/^(?:https?|ssh|git|git\+ssh|ssh\+git):\/\/[^/]/u,Q=/^(?:[^@/:\\]+@)?(?:\[[^\]/\\]+\]|[^@/:\\[\]]+):(?!:|\/\/)/u;function ce(e,n,i){if(/^[^[]:(?!:)/u.test(e))throw new t(`${r(e)} is a path on a drive to ${i} on Windows, and a host's to git elsewhere`,n);if(se.test(e)?!URL.canParse(e):!Q.test(e)||e.includes(`\\`))throw new t(`${r(e)} is not a URL of a host that git fetches from: http(s), ssh, git, or user@host:path`,n);return e}var $=e=>/^https?:\/\//u.test(e)&&!/[\s\p{Cc}]/u.test(e)&&URL.canParse(e),le=e=>$(e.replace(/^https?:/iu,e=>e.toLowerCase())),ue=new Set([`registry.npmjs.org`,`registry.npmjs.com`,`registry.yarnpkg.com`]);function de(e,n,i,a){let o=new URL(e),s=o.hostname.replace(/(?<!\.)\.+$/u,``);if(ue.has(s)&&o.pathname.replace(/^(\/@[^/]+)%2f/iu,`$1/`)!==`/${n}/-/${n.slice(n.indexOf(`/`)+1)}-${i}.tgz`)throw new t(`${r(e)} is not the registry's tarball of ${n}@${i}`,a)}export{o as a,s as b,c,l as d,u as e,d as f,f as g,p as h,m as i,h as j,g as k,ee as l,_ as m,v as n,y as o,b as p,x as q,S as r,C as s,w as t,T as u,te as v,D as w,O as x,M as y,N as z,F as A,I as B,L as C,R as D,z as E,B as F,V as G,H,re as I,U as J,G as K,Y as L,X as M,Z as N,oe as O,ce as P,$ as Q,le as R,de as S};
@@ -0,0 +1,15 @@
1
+ var e=/[ \t\n\v\f\r]+/gu,t=/(?<![ \t\n\v\f\r])[ \t\n\v\f\r]+$/u,n=e=>e.replace(/[A-Z]/gu,e=>e.toLowerCase());function r({ignoreCase:r=!1,whitespace:i=`none`}={}){let a=null;return i===`all`?a=t=>t.replace(e,``):i===`change`?a=n=>n.replace(t,``).replace(e,` `):i===`trailing`&&(a=e=>e.replace(t,``)),r?a?e=>n(a(e)):n:a}var i=e=>e.match(/[^\n]*\n|[^\n]+/gu)??[];function a(e){let t=[];for(let n=0;;){let r=n;for(;n<e.length&&e[n];)n++;if(t.push(n>r),n===e.length)return t;n++}}function o(e,t,n){let r=t.length,i=a(n),o=0,s=0,c=0,l=()=>{if(o===r||e[c]!==e[o])return!1;for(t[c++]=0,t[o++]=1,s++;o<r&&t[o];)o++;return!0},u=()=>{if(c===0||e[c-1]!==e[o-1])return!1;for(t[--c]=1,t[--o]=0,s--;c>0&&t[c-1];)c--;return!0};for(let e=0;e<r;e++){if(!t[e]){s++;continue}for(c=e,o=e;o<r&&t[o];o++);let n=-1;for(let e=-1;e!==o-c;){for(e=o-c;u(););for(n=i[s]?o:-1;l();)i[s]&&(n=o)}if(n!==-1)for(let e=o-n;e>0;e--)u();e=o-1}}function s(e){let t=1;for(let n=e;n!==0;n>>=2)t<<=1;return Math.max(256,t)}function c(e,t,{ignoreCase:n=!1,whitespace:i=`none`,minimal:a=!1,discard:s=!0,slide:c=!0,horizon:d=1/0}={}){let f=r({ignoreCase:n,whitespace:i});if(f===null&&h(e,t))return[];let{A:m,B:v,classes:y}=g(e,t,f),S=new Uint8Array(m.length),C=new Uint8Array(v.length),w=l(e,t,d),[T,E]=a||!s?[null,null]:u(m,v,y,w),D=p(w.lo,w.hiA,T,S),O=p(w.lo,w.hiB,E,C);if(_(D.map(e=>m[e]),O.map(e=>v[e]),D,O,S,C,a),c){let{lo:e,hiA:t,hiB:n}=w;o(m.subarray(e,t),S.subarray(e,t),C.subarray(e,n)),o(v.subarray(e,n),C.subarray(e,n),S.subarray(e,t))}let k=b(S,C);return x(e,t,k,f),k}function l(e,t,n){let r=Math.min(e.length,t.length),i=0;for(;i<r&&e[i]===t[i];)i++;let a=Math.max(0,i-n),o=0;for(;o<r-a&&e[e.length-1-o]===t[t.length-1-o];)o++;let s=Math.max(0,o-n);return{lo:a,hiA:e.length-s,hiB:t.length-s}}function u(e,t,n,{lo:r,hiA:i,hiB:a}){let o=new Int32Array(n),s=new Int32Array(n);for(let t=r;t<i;t++)o[e[t]]++;for(let e=r;e<a;e++)s[t[e]]++;return[d(e.subarray(r,i),s),d(t.subarray(r,a),o)]}function d(e,t){let n=e.length,r=new Uint8Array(n),i=5;for(let e=Math.floor(n/64)>>2;e>0;e>>=2)i*=2;for(let a=0;a<n;a++){let n=t[e[a]];n===0?r[a]=1:n>i&&(r[a]=2)}for(let e=0;e<n;e++){if(r[e]===2){r[e]=0;continue}if(r[e]===0)continue;let t=e,i=0;for(;t<n&&r[t]!==0;t++)r[t]===2&&i++;for(;t>e&&r[t-1]===2;)r[--t]=0,i--;let a=t-e;if(i*4>a){for(;t>e;)r[--t]===2&&(r[t]=0);continue}let o=1;for(let e=a>>4;e>0;e>>=2)o<<=1;o++;for(let t=0,n=0;n<a;n++)r[e+n]===2?o===++t?n-=t:o<t&&(r[e+n]=0):t=0;f(r,e,1,a),f(r,e+a-1,-1,a),e+=a-1}return r}function f(e,t,n,r){for(let i=0,a=0;a<r;a++){let r=t+a*n;if(a>=8&&e[r]===1||(e[r]===2?(i=0,e[r]=0):e[r]===0?i=0:i++,i===3))break}}function p(e,t,n,r){let i=[];for(let a=e;a<t;a++)n!==null&&n[a-e]!==0?r[a]=1:i.push(a);return Int32Array.from(i)}var m=e=>e?(t,n)=>e(t)===e(n):(e,t)=>e===t;function h(e,t,n=null){if(e.length!==t.length)return!1;let r=m(n);for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1;return!0}function g(e,t,n){let r=new Map,i=e=>{let t=n?n(e):e,i=r.get(t);return i===void 0&&(i=r.size,r.set(t,i)),i};return{A:Int32Array.from(e,i),B:Int32Array.from(t,i),classes:r.size}}function _(e,t,n,r,i,a,o){let c=e.length+t.length+3,l={A:e,B:t,fd:new Int32Array(c),bd:new Int32Array(c),base:t.length+1,limit:s(e.length+t.length)},u=[{xoff:0,xlim:e.length,yoff:0,ylim:t.length,minimal:o}];for(;u.length;){let{xoff:o,xlim:s,yoff:c,ylim:d,minimal:f}=u.pop();for(;o<s&&c<d&&e[o]===t[c];)o++,c++;for(;o<s&&c<d&&e[s-1]===t[d-1];)s--,d--;if(o===s){for(;c<d;c++)a[r[c]]=1;continue}if(c===d){for(;o<s;o++)i[n[o]]=1;continue}let{xmid:p,ymid:m,loMinimal:h,hiMinimal:g}=v(l,o,s,c,d,f);u.push({xoff:p,xlim:s,yoff:m,ylim:d,minimal:g}),u.push({xoff:o,xlim:p,yoff:c,ylim:m,minimal:h})}}function v(e,t,n,r,i,a){let{A:o,B:s,fd:c,bd:l,base:u,limit:d}=e,f=n-r,p=t-i,m=n-i,h=t-r,g=m,_=m,v=h,b=h,x=!!(h-m&1);c[u+h]=t,l[u+m]=n;for(let m=1;;m++){b>p?c[u+--b-1]=-1:++b,v<f?c[u+ ++v+1]=-1:--v;for(let e=v;e>=b;e-=2){let t=c[u+e+1],r=c[u+e-1],a=r<t?t:r+1,d=a-e;for(;a<n&&d<i&&o[a]===s[d];)a++,d++;if(c[u+e]=a,x&&_<=e&&e<=g&&l[u+e]<=a)return{xmid:a,ymid:d,loMinimal:!0,hiMinimal:!0}}_>p?l[u+--_-1]=0x7fffffff:++_,g<f?l[u+ ++g+1]=0x7fffffff:--g;for(let e=g;e>=_;e-=2){let n=l[u+e+1],i=l[u+e-1],a=i<n?i:n-1,d=a-e;for(;t<a&&r<d&&o[a-1]===s[d-1];)a--,d--;if(l[u+e]=a,!x&&b<=e&&e<=v&&a<=c[u+e])return{xmid:a,ymid:d,loMinimal:!0,hiMinimal:!0}}if(!a&&m>=d)return y(e,{xoff:t,xlim:n,yoff:r,ylim:i,fmin:b,fmax:v,bmin:_,bmax:g})}}function y(e,t){let{fd:n,bd:r,base:i}=e,{xoff:a,xlim:o,yoff:s,ylim:c,fmin:l,fmax:u,bmin:d,bmax:f}=t,p=0,m=-1;for(let e=u;e>=l;e-=2){let t=Math.min(n[i+e],o),r=t-e;c<r&&(t=c+e,r=c),m<t+r&&(m=t+r,p=t)}let h=0,g=0x7fffffff;for(let e=f;e>=d;e-=2){let t=Math.max(a,r[i+e]),n=t-e;n<s&&(t=s+e,n=s),t+n<g&&(g=t+n,h=t)}return o+c-g<m-(a+s)?{xmid:p,ymid:m-p,loMinimal:!0,hiMinimal:!1}:{xmid:h,ymid:g-h,loMinimal:!1,hiMinimal:!0}}function b(e,t){let n=[],r=t.length,i=e.length,a=0,o=0;for(;a<i||o<r;){if(a<i&&o<r&&!e[a]&&!t[o]){a++,o++;continue}let s=a,c=o;for(;a<i&&e[a];)a++;for(;o<r&&t[o];)o++;if(s===a&&c===o)throw new S(`a kept line has no counterpart`);n.push({a0:s,a1:a,b0:c,b1:o})}return n}function x(e,t,n,r=null){let i=m(r),a=0,o=0;for(let{a0:r,a1:s,b0:c,b1:l}of n){if(r<a||c<o||s<r||l<c||s>e.length||l>t.length)throw new S(`a block is out of order or out of range`);if(r===s&&c===l)throw new S(`a block changes nothing`);if(r-a!==c-o)throw new S(`the kept lines before a block differ in count`);for(;a<r;a++,o++)if(!i(e[a],t[o]))throw new S(`kept line ${a+1} does not match`);a=s,o=l}if(e.length-a!==t.length-o)throw new S(`the kept lines after the last block differ in count`);for(;a<e.length;a++,o++)if(!i(e[a],t[o]))throw new S(`kept line ${a+1} does not match`)}var S=class extends Error{constructor(e){super(`the computed change set does not reconstruct the second file (${e})`),this.name=`DiffError`}},C=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: ?(.*?))?\n?$/u,w=/^\*{15,}(?: (.*?))?\n?$/u,T=/^\*{3} (\d+)(?:,(\d+))? \*{4}\n?$/u,E=/^--- (\d+)(?:,(\d+))? ----\n?$/u,D=/^(\d+)(?:,(\d+))?([acd])(\d+)(?:,(\d+))?[ \t]*\r?\n?$/u,O=class extends Error{constructor(e,t){super(t===void 0?e:`${e} at line ${t+1}`),this.name=`PatchError`,this.line=t}},k=(e,t)=>t===0?Number(e):Number(e)-1,A=e=>e?.startsWith(`\\`),j=e=>e.replace(/\n$/u,``);function M(e){let t=i(e),n=[],r={old:null,new:null},a=!1;for(let e=0;e<t.length;){let i=t[e],o=N(i,a);if(a=!i.startsWith(`***************`)&&i.startsWith(`*** `),o){r=o.names??{...r,[o.slot]:o.name},e++;continue}let s=C.test(i)?`unified`:w.test(i)?`context`:D.test(i)?`normal`:null;if(s===null){e++;continue}let c=[],l=z[s];for(let n=l(t,e);n!==null&&(c.push(n.hunk),e=n.next,!(e>=t.length||N(t[e],!1)));n=l(t,e));n.push({old:r.old,new:r.new,format:s,hunks:c,blocks:P(c)}),r={old:null,new:null}}return n}function N(e,t){let n=/^diff --git (\S+) (\S+)\n?$/u.exec(e);if(n)return{names:{old:n[1],new:n[2]}};if(T.test(e)||E.test(e))return null;let r=/^(\*\*\* |--- |\+\+\+ )(.*?)(?:\t.*)?\n?$/u.exec(e);return r?{slot:r[1]===`*** `||r[1]===`--- `&&!t?`old`:`new`,name:r[2]}:null}function P(e){let t=[];for(let n of e){let e=n.oldStart,r=n.newStart,i=null,a=()=>{i&&=(t.push(i),e=i.a1,r=i.b1,null)};for(let{tag:t,text:o}of n.lines)t===` `?(a(),e++,r++):(t===`-`&&i?.insert.length&&a(),i??={a0:e,a1:e,b0:r,b1:r,remove:[],insert:[]},t===`-`?(i.a1++,i.remove.push(o)):(i.b1++,i.insert.push(o)));a()}return t}function ee(e,t){let n=C.exec(e[t]??``);if(!n)return null;let r=Number(n[2]??1),i=Number(n[4]??1),a={oldStart:k(n[1],r),newStart:k(n[3],i),label:n[5]||null,lines:[]},o=0,s=t+1,c=0;for(;c<r||o<i;s++){let t=e[s];if(t===void 0)throw new O(`the patch ends inside a hunk`,s);let n=t===`
2
+ `?` `:t[0];if(n!==` `&&n!==`-`&&n!==`+`)throw new O(`a hunk line begins with ${JSON.stringify(n)}`,s);let l=t===`
3
+ `?t:t.slice(1);if(A(e[s+1])&&(l=j(l),s++),n!==`+`&&c++,n!==`-`&&o++,c>r||o>i)throw new O(`a hunk has more lines than its header says`,s);a.lines.push({tag:n,text:l})}return{hunk:a,next:s}}function F(e,t){let n=D.exec(e[t]??``);if(!n)return null;let[,r,i,a,o,s]=n,c=a===`a`?0:Number(i??r)-Number(r)+1,l=a===`d`?0:Number(s??o)-Number(o)+1;if(c<0||l<0)throw new O(`a change command counts backwards`,t);let u={oldStart:a===`a`?Number(r):Number(r)-1,newStart:a===`d`?Number(o):Number(o)-1,label:null,lines:[]},d=t+1,f=(t,n,r)=>{for(let i=0;i<t;i++,d++){let t=e[d];if(t===void 0)throw new O(`the patch ends inside a hunk`,d);if(t[0]!==n)throw new O(`${JSON.stringify(n)} expected`,d);let i=t.slice(2);A(e[d+1])&&(i=j(i),d++),u.lines.push({tag:r,text:i})}};if(f(c,`<`,`-`),a===`c`){if(e[d]!==`---
4
+ `)throw new O(`'---' expected`,d);d++}return f(l,`>`,`+`),{hunk:u,next:d}}function I(e,t){let n=w.exec(e[t]??``);if(!n)return null;let r=T.exec(e[t+1]??``);if(!r)throw new O(`'*** ' range expected`,t+1);let i=L(e,t+2,`-`),a=E.exec(e[i.next]??``);if(!a)throw new O(`'--- ' range expected`,i.next);let o=L(e,i.next+1,`+`),s=i.lines.length===0?o.lines.filter(e=>e.tag===` `):i.lines,c=o.lines.length===0?i.lines.filter(e=>e.tag===` `):o.lines;return{hunk:{oldStart:k(r[1],s.length),newStart:k(a[1],c.length),label:n[1]||null,lines:R(s,c)},next:o.next}}function L(e,t,n){let r=[],i=t;for(;i<e.length;i++){let t=e[i];if(w.test(t)||T.test(t)||E.test(t))break;if(A(t)){if(r.length===0)throw new O(`a no-newline marker follows no line`,i);r.at(-1).text=j(r.at(-1).text);continue}let a=t===`
5
+ `?` `:t[0];if(a!==` `&&a!==`!`&&a!==`-`&&a!==`+`)break;r.push({tag:a===` `?` `:n,text:t===`
6
+ `?t:t.slice(2)})}return{lines:r,next:i}}function R(e,t){let n=[],r=0,i=0;for(;r<e.length||i<t.length;)if(e[r]?.tag===` `&&t[i]?.tag===` `)n.push(e[r++]),i++;else{for(;r<e.length&&e[r].tag!==` `;)n.push(e[r++]);for(;i<t.length&&t[i].tag!==` `;)n.push(t[i++]);e[r]?.tag===` `&&t[i]===void 0?n.push(e[r++]):t[i]?.tag===` `&&e[r]===void 0&&n.push(t[i++])}return n}var z={unified:ee,context:I,normal:F},B=class extends Error{constructor(e){super(`the rendered diff does not say what the change set says (${e})`),this.name=`FormatError`}},V={" ":`kept`,"-":`removed`,"+":`added`};function H(e,t,n,r){if(n.length===0&&r===``)return;let i;try{i=M(r)}catch(e){throw new B(`it does not read back (${e.message})`)}if(i.length!==1)throw new B(`${i.length} files read back, not one`);let[{format:a,hunks:o,blocks:s}]=i;if(s.length!==n.length)throw new B(`${s.length} blocks read back, not ${n.length}`);for(let[e,t]of s.entries()){let r=n[e];if(t.a0!==r.a0||t.a1!==r.a1||t.b0!==r.b0||t.b1!==r.b1)throw new B(`block ${e+1} reads back somewhere else`)}for(let n of o){let r=a===`context`&&!n.lines.some(({tag:e})=>e===`-`),i=n.oldStart,o=n.newStart;for(let{tag:a,text:s}of n.lines){if(s!==(a===`+`||a===` `&&r?t[o]:e[i]))throw new B(`a ${V[a]} line is not the line it stands for`);a!==`+`&&i++,a!==`-`&&o++}}}function U(e,t,n,r){let i=[];for(let a=0;a<e.length;){let o=a;for(;o+1<e.length&&e[o+1].a0-e[o].a1<=2*t;)o++;let s=e[a],c=e[o];i.push({blocks:e.slice(a,o+1),a0:Math.max(0,s.a0-t),a1:Math.min(n,c.a1+t),b0:Math.max(0,s.b0-t),b1:Math.min(r,c.b1+t)}),a=o+1}return i}var W=e=>(t,n,r,{context:i,label:a=null})=>{let o=``;for(let s of U(r,i,t.length,n.length))o+=e(t,n,s,a?a(s.a0):null);return H(t,n,r,o),o},G=`
7
+ \
8
+ `,K=(e,t)=>e+t+(t.endsWith(`
9
+ `)?``:G),q=(e,t)=>`${e}${t===null?``:` ${t}`}
10
+ `,J=(e,t)=>t>e+1?`${e+1},${t}`:`${t>e?e+1:e}`,Y=(e,t)=>t<=e?`${e},0`:t===e+1?`${e+1}`:`${e+1},${t-e}`;function te(e,t,n){let r=``;for(let{a0:i,a1:a,b0:o,b1:s}of n){let n=i===a?`a`:o===s?`d`:`c`;r+=`${J(i,a)}${n}${J(o,s)}
11
+ `;for(let t=i;t<a;t++)r+=K(`< `,e[t]);n===`c`&&(r+=`---
12
+ `);for(let e=o;e<s;e++)r+=K(`> `,t[e])}return H(e,t,n,r),r}var ne=W((e,t,n,r)=>{let i=q(`@@ -${Y(n.a0,n.a1)} +${Y(n.b0,n.b1)} @@`,r),a=n.a0,o=n.b0;for(let{a0:r,a1:s,b1:c}of n.blocks){for(;a<r;a++,o++)i+=K(` `,e[a]);for(;a<s;a++)i+=K(`-`,e[a]);for(;o<c;o++)i+=K(`+`,t[o])}for(;a<n.a1;a++,o++)i+=K(` `,e[a]);return i}),re=W((e,t,{a0:n,a1:r,b0:i,b1:a,blocks:o},s)=>[q(`***************`,s),`*** ${J(n,r)} ****
13
+ `,X(e,n,r,o.map(e=>[e.a0,e.a1,e.b0<e.b1]),`- `),`--- ${J(i,a)} ----
14
+ `,X(t,i,a,o.map(e=>[e.b0,e.b1,e.a0<e.a1]),`+ `)].join(``));function X(e,t,n,r,i){if(!r.some(([e,t])=>e<t))return``;let a=``,o=t;for(let[t,n,s]of r){for(;o<t;o++)a+=K(` `,e[o]);for(;o<n;o++)a+=K(s?`! `:i,e[o])}for(;o<n;o++)a+=K(` `,e[o]);return a}var Z={unified:ne,context:re,normal:te};function Q(e){if(!Object.hasOwn(Z,e))throw RangeError(`a change set prints as unified, context or normal, not ${e}`);return Z[e]}function $(e,t){if(!(Number.isInteger(e)&&e>=0)&&e!==1/0)throw RangeError(`${t} is a number of lines, not ${e}`);return e}function ie(e,t,n){if(e===t)return``;let a=r(n);return a===null||!h(i(e),i(t),a)?`Files differ
15
+ `:``}function ae(e,t,{format:n=`unified`,context:r=3,label:a=null,horizon:o=0,...s}={}){if(n===`brief`)return ie(e,t,s);let l=Q(n),u=i(e),d=i(t),f=n===`normal`?$(o,`horizon`):Math.max($(o,`horizon`),$(r,`context`));return l(u,d,c(u,d,{...s,horizon:f}),{context:r,label:a})}function oe(e,t,{horizon:n=3,...r}={}){let a=i(e),o=i(t);return c(a,o,{...r,horizon:$(n,`horizon`)}).map(({a0:e,a1:t,b0:n,b1:r})=>({a0:e,a1:t,b0:n,b1:r,remove:a.slice(e,t),insert:o.slice(n,r)}))}function se(e,t,n,{format:a=`unified`,context:o=3,label:s=null,...c}={}){let l=Q(a),u=i(e),d=i(t);return x(u,d,n,r(c)),l(u,d,n,{context:o,label:s})}export{S as a,C as b,w as c,D as d,B as e,ae as f,oe as g,se as h};
@@ -0,0 +1 @@
1
+ function e(e,t){return!e||t===e||t.startsWith(`${e}/`)}function t(t,n){if(e(t.oldPath,n)){let e=n.slice(t.oldPath.length).replace(/^\//u,``);return{directory:[t.newPath,e].filter(Boolean).join(`/`),filePrefix:``}}if(!e(n,t.oldPath))return null;let r=t.oldPath.slice(n.length).replace(/^\//u,``);return t.newPath===r?{directory:``,filePrefix:r}:t.newPath.endsWith(`/${r}`)?{directory:t.newPath.slice(0,-r.length-1),filePrefix:r}:null}function n(n,r,i,a=``){let o=null,s=-1;for(let c of i){if(c.oldRepo.toLowerCase()!==n.toLowerCase())continue;let i=t(c,r);!i||!e(i.filePrefix,a)||c.oldPath.length<=s||(o={repoId:c.repoId,directory:i.directory},s=c.oldPath.length)}return o}function r(e){let t;for(let n of e){let e=n.split(`/`);if(e.some(e=>!e||e===`.`||e===`..`)||n.includes(`\\`))return``;if(e.pop(),t===void 0)t=e;else{let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];)n++;t.length=n}if(t.length===0)return``}return t?.join(`/`)??``}export{n as a,r as b};
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},s=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(let c of r(i))!a.call(e,c)&&c!==o&&t(e,c,{get:()=>i[c],enumerable:!(s=n(i,c))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{o as a,s as b,l as c};
@@ -0,0 +1,11 @@
1
+ import{a as e,b as t,c as n,d as r}from"./chunk-UJP4PQJA.js";import{C as i,D as a,E as o,H as s,M as c,N as l,Q as u,S as d,a as f,e as p,f as m,h,i as g,j as _,k as v,m as y,n as b,o as x,p as S,q as C,r as w,u as ee,x as T,y as E,z as te}from"./chunk-LVW7WWV4.js";import{a as ne}from"./chunk-SZWPYLPC.js";import{b as D}from"./chunk-DEVAORP2.js";import"./chunk-ZQHLECTI.js";import{a as re,b as O,c as ie,d as k,f as ae,h as A,i as j,k as oe,n as M,q as se}from"./chunk-7HP2VYIC.js";import"./chunk-PXK7EU4V.js";import"./chunk-OOJM4CTU.js";var N=class extends ie{},ce=e=>RegExp(`(?:[^ ?:,[\\]{}#&*!|>'"%@\`-]|[-?:](?=[^${e}]))(?:[^:${e}]|:(?=[^${e}])| +(?=[^#:${e}]|:[^${e}]))*`,`uy`),le={block:ce(` `),flow:ce(` ,[\\]{}`)},ue=/'((?:[^']|'')*)'/uy,de=/"((?:[^"\\]|\\.)*)"/uy,fe={__proto__:null,0:`\0`,a:`\x07`,b:`\b`,t:` `,n:`
2
+ `,v:`\v`,f:`\f`,r:`\r`,e:`\x1B`," ":` `,'"':`"`,"/":`/`,"\\":`\\`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`},pe=/\\(?:x([\dA-Fa-f]{2})|u([\dA-Fa-f]{4})|U([\dA-Fa-f]{8})|(.))/gu;function me(e,t){return e.replace(pe,(e,n,r,i,a)=>{if(a!==void 0){if(!(a in fe))throw new N(`unknown escape \\${a}`,t.line);return fe[a]}let o=Number.parseInt(n??r??i,16);if(o>1114111||o>=55296&&o<=57343)throw new N(`${e} is not a Unicode scalar value`,t.line);return String.fromCodePoint(o)})}var he={__proto__:null,true:!0,false:!1,null:null},ge=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[Ee][+-]?\d+)?$/u,_e=/^(?:~|null|true|false|\.nan|[+-]?(?:\.inf|0[box][\d_a-f]+|(?:\d[\d_]*(?:\.[\d_]*)?|\.[\d_]+)(?:e[+-]?\d+)?))$/iu,ve=/^\d{4}-(?:\d\d-\d\d|\d\d?-\d\d?(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)?(?: *(?:Z|[+-]\d\d?(?::\d\d)?))?)$/u;function ye(e,t){if(e in he)return he[e];if(ge.test(e)&&e!==`-0`){let n=Number(e);if(Math.abs(n)>2**53-1)throw new N(`number out of range ${O(e)}`,t.line);return n}if(_e.test(e)||ve.test(e))throw new N(`ambiguous scalar ${O(e)}, quote it`,t.line);return e}var P=e=>e.pos<e.text.length?O(e.text.slice(e.pos)):`the end of the line`,be=(e,t)=>me(e,{line:t});function xe(e,t){let n=M(e,ue);return n===null?(n=M(e,de),n===null?(n=M(e,le[t]),n===null?void 0:ye(n[0],e)):me(n[1],e)):n[1].replaceAll(`''`,`'`)}function Se(e,t){let n=xe(e,t);if(n===void 0)throw new N(`expected a scalar, found ${P(e)}`,e.line);return n}function F(e,t,n,r){if(typeof t!=`string`)throw new N(`keys must be strings`,r);if(t===`<<`)throw new N(`merge keys are not supported`,r);if(t in e)throw new N(`duplicate key ${O(t)}`,r);e[t]=n}var Ce=/ */uy,we=/, */uy,Te=/: +/uy,Ee=/:(?: +(?:#.*)?|$)/uy,De=/(?: +#.*| *)$/uy,Oe=64;function ke(e,t){let n=t===`]`?[]:Object.create(null);if(e.workflow&&++e.depth>Oe)throw new N(`nested too deep`,e.line);if(e.pos++,M(e,Ce),e.text[e.pos]!==t)do{if(e.workflow&&e.text[e.pos]===t)break;if(e.workflow)Me(e,n,t);else{let r=I(e);if(t===`]`)n.push(r);else{if(M(e,Te)===null)throw new N(`expected ": " after the key, found ${P(e)}`,e.line);F(n,r,I(e),e.line)}}M(e,Ce)}while(M(e,we)!==null);if(e.text[e.pos]!==t)throw new N(`expected "," or "${t}", found ${P(e)}`,e.line);return e.pos++,e.workflow&&e.depth--,n}function I(e){let t=e.text[e.pos];return e.workflow&&(t===`[`||t===`{`)?ke(e,t===`[`?`]`:`}`):Se(e,`flow`)}var Ae=/ *:(?=[ ,\]}]|$)/uy,je=/ *:/uy;function Me(e,t,n){let r=e.text[e.pos]===`"`||e.text[e.pos]===`'`,i=I(e),a=M(e,r?je:Ae)!==null;if(n===`]`&&!a){t.push(i);return}M(e,Ce);let o=a&&e.text[e.pos]!==`,`&&e.text[e.pos]!==n?I(e):null;if(n===`}`){F(t,i,o,e.line);return}let s=Object.create(null);F(s,i,o,e.line),t.push(s)}function L(e,t,n=!1){let r={text:e,pos:0,line:t,workflow:n,depth:0},i=e.startsWith(`{`)?ke(r,`}`):e.startsWith(`[`)?ke(r,`]`):Se(r,`block`);if(M(r,De)===null)throw new N(`unexpected ${P(r)} after the value`,t);return i}function R(e,t){let n={text:e,pos:0,line:t},r=xe(n,`block`),i=n.pos;if(r===void 0||M(n,Ee)===null)return null;if(i>1024)throw new N(`a key longer than 1024 characters is written after "? "`,t);return{key:r,rest:e.slice(n.pos)}}var Ne=2**20,z=128;function B(e){if(e.text.includes(` `))throw new N(`U+0009 is not allowed outside a block scalar`,e.number)}function V(e,t){if(!e.startsWith(`&`))return{anchor:null,rest:e};let n=/^&([^ ,[\]{}]+)(?: +|$)/u.exec(e);if(n===null)throw new N(`expected an anchor's name, found ${O(e)}`,t);let r=e.slice(n[0].length);if(r.startsWith(`*`))throw new N(`an alias with an anchor is not supported`,t);return{anchor:n[1],rest:r}}function Pe(e,t,n){if(/^\*[^ ,[\]{}]+ *:(?: |$)/u.test(t))throw new N(`an alias as a key is not supported`,n);let r=/^\*([^ ,[\]{}]+)(?: +#.*| *)$/u.exec(t);if(r===null)throw new N(`unexpected ${O(t)} after an alias`,n);if(!e.anchors.has(r[1]))throw new N(`unknown alias ${O(`*${r[1]}`)}`,n);return e.aliased=!0,e.anchors.get(r[1])}function H(e,t=1){let n=e[0];for(let r=t;r<e.length;r++)if(n===`"`&&e[r]===`\\`)r++;else if(e[r]===n){if(n===`'`&&e[r+1]===`'`)r++;else return r}return-1}function Fe(e,t){let n=/ *$/u.exec(e).index,r=/\\*$/u.exec(e.slice(0,n))[0].length;return t&&r%2==1?n===e.length?{text:e.slice(0,-1),escaped:!0}:{text:e.slice(0,n+1),escaped:!1}:{text:e.slice(0,n),escaped:!1}}function Ie(e,t,n){let r=0,i=!1,a=``;for(let[o,s]of e.entries()){let c=o===e.length-1,l=o===0?s:s.replace(/^ +/u,``);if(o>0&&!c&&l===``){r++;continue}if(i&&r>0)throw new N(`an empty line after an escaped line break is not supported`,n);o>0&&(a+=r>0?`
3
+ `.repeat(r):i?``:` `);let u=c?{text:l,escaped:!1}:Fe(l,t);a+=u.text,r=0,i=u.escaped}return a}function Le(e,t,n,r){let i=t[0]===`"`,a=[t.slice(1)],o=[n.number];for(let s=e.line;;s=e.advance()){if(s===void 0||e.isMarker(s))throw new N(`a quoted scalar that does not close`,n.number);B(s),o.push(s.number);let c=H(`${t[0]}${s.text}`);if(c===-1){a.push(s.text);continue}if(a.push(s.text.slice(0,c-1)),!/^(?: +#.*| *)$/u.test(s.text.slice(c)))throw new N(`unexpected ${O(s.text.slice(c))} after the value`,s.number);if(e.advance(),i)for(let[e,t]of a.entries())r(t,o[e]);let l=Ie(a,i,n.number);return i?r(l,n.number):l.replaceAll(`''`,`'`)}}function Re(e,t,n){if(/(?:^| )#/u.test(t))return t;let r=0,i=t.replace(/ +$/u,``);for(let t=e.line;t!==void 0;t=e.advance())if(t.text===``)r++;else{if(t.indent<=n||t.text.startsWith(`#`)||e.isMarker(t))break;if(B(t),i+=`${r>0?`
4
+ `.repeat(r):` `}${t.text.replace(/ +$/u,``)}`,r=0,/ #/u.test(t.text)){e.advance();break}}return i}function ze(e,t,n){let r=n===`plain`;for(let i=0;i<e.length;i++){let a=e[i];if(a!==` `){if((a===`"`||a===`'`)&&n!==`plain`){let t=H(e.slice(i));if(t===-1)return{open:-1,kept:e,last:n,comment:!1};i+=t,n=`quoted`}else{if(a===`#`&&(i===0||e[i-1]===` `))return{open:t,kept:e.slice(0,i),last:n,comment:!0};if(a===`[`||a===`{`)t++,n=`open`;else if(a===`]`||a===`}`){if(n=`close`,--t===0)return{open:t,kept:e.slice(0,i+1),after:e.slice(i+1),last:n,comment:!1}}else if(a===`,`||a===`:`&&/^(?:[ ,[\]{}]|$)/u.test(e[i+1]??``)){if(a===`:`&&r)return{open:t,kept:e,last:n,comment:!1,keyed:!0};n=`indicator`}else n=`plain`}r&&=n===`plain`}}return{open:t,kept:e,last:n,comment:!1}}function Be(e,t,n,r){let i=0,a=!1,o=null,s=!1,c=ze(t,0,null),l=null,u=``;for(let t=n;;){if(c.open===-1)throw new N(`a quoted scalar in a flow collection does not close on its line`,t.number);let d=c.kept.replace(/ +$/u,``);if(d!==``){let e=s&&!/^(?:[,\]}]|:(?:[ ,[\]{}]|$))/u.test(d);if(e&&a)throw new N(`a plain scalar in a flow collection goes on past a comment`,t.number);if(c.keyed||d.startsWith(`:`)&&!e&&(o===`plain`||o===`quoted`))throw new N(`a key over more than one line is not supported`,t.number);if(e&&l!==null&&B(l),e&&t.indent<=r)throw new N(`bad indentation of a plain scalar in a flow collection`,t.number);u!==``&&(u+=e&&i>1?`
5
+ `.repeat(i-1):` `),u+=d,i=0,o=c.last,s=o===`plain`,a=!1,l=null}if(a||=s&&c.comment,c.after!==void 0){if(!/^(?: +#.*| *)$/u.test(c.after))throw new N(`unexpected ${O(c.after)} after the value`,t.number);return t!==n&&e.advance(),u}if(t=t===n?e.line:e.advance(),t===void 0||e.isMarker(t))throw new N(`a flow collection that does not close`,n.number);let f=/^[\t ]*$/u.test(t.text);!f&&!t.text.startsWith(`#`)?B(t):f&&s&&!a&&t.text.includes(` `)&&(l??=t),i++,c=ze(f?``:t.text,c.open,s&&!a?`plain`:null)}}function Ve(e){let t=new Map,n=(e,r)=>{if(typeof e!=`object`||!e)return{size:1,height:0};if(r>z)throw new N(`aliases nest the document past ${z} levels`);let i=t.get(e);if(i===void 0){i={size:1,height:0};for(let t of Object.values(e)){let e=n(t,r+1);if(i.size+=e.size,i.height=Math.max(i.height,e.height+1),i.size>Ne)throw new N(`aliases expand the document past ${Ne} nodes`)}t.set(e,i)}if(r+i.height>z)throw new N(`aliases nest the document past ${z} levels`);return i};n(e,0)}var He=64,Ue=RegExp(`(?! )${oe.source}`,`u`);function We(e){if(typeof e!=`object`||!e)throw TypeError(`expected an options object`);let t=Object.keys(e).find(e=>e!==`workflow`&&e!==`lines`);if(t!==void 0)throw TypeError(`unknown option ${t}`);let{workflow:n=!1,lines:r}=e;if(typeof n!=`boolean`)throw TypeError(`expected workflow to be a boolean`);if(r!==void 0&&!(r instanceof WeakMap))throw TypeError(`expected lines to be a WeakMap`);return{workflow:n,lines:r}}var Ge=e=>e.indent===0&&/^(?:---|\.\.\.)(?: |$)/u.test(e.text);function Ke(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let n={text:e,pos:0,number:-1,line:void 0,...We(t),anchors:null,aliased:!1};n.workflow&&Object.assign(n,{advance:()=>U(n),isMarker:Ge}),U(n);let r=[];qe(n);do r.push(Je(n));while(qe(n));return r}function qe(e){return W(e)!==void 0||e.line===void 0?!1:(U(e),!0)}function Je(e){let t=W(e);if(t===void 0)throw new N(`empty document`,e.line?.number);if(t.indent!==0)throw new N(`the document does not start at column 0`,t.number);e.workflow&&Object.assign(e,{anchors:new Map,aliased:!1});let n=q(e,0,0);if(e.aliased&&Ve(n),W(e)!==void 0)throw new N(`unexpected content after the document`,e.line.number);if(typeof n!=`object`||!n)throw new N(`the document is a lone scalar, not a mapping or a sequence`,t.number);return n}function U(e){let{text:t,pos:n}=e;if(e.line=void 0,n>=t.length)return;let r=t.indexOf(`
6
+ `,n);r===-1&&(r=t.length),e.pos=r+1;let i=++e.number;if(t[r-1]===`\r`&&r--,r-n>se)throw new N(`line longer than ${se} characters`,i);let a=n;for(;t[a]===` `;)a++;let o=t.slice(a,r),s=(e.workflow?Ue:oe).exec(o)?.[0];if(s!==void 0)throw new N(`${re(s)} is not allowed`,i);return e.line={indent:a-n,text:o,number:i},e.line}function W(e){let t=e.line;for(;t!==void 0&&(t.text===``||t.text[0]===`#`||e.workflow&&/^[\t ]*$/u.test(t.text));)t=U(e);if(t!==void 0&&e.workflow&&B(t),t?.indent!==0||!/^(?:---|\.\.\.(?: |$)|%)/u.test(t.text))return t;if(!/^--- *$/u.test(t.text))throw new N(t.text.startsWith(`---`)?`content on the document marker line`:`document end markers and directives are not supported`,t.number)}var G=e=>/^-(?: |$)/u.test(e.text),K=e=>/^[|>]/u.test(e);function q(e,t,n){let r=W(e);if(n>He)throw new N(`nested too deep`,r.number);if(G(r))return Ze(e,t,n);let i=r.text.startsWith(`? `)?void 0:Y(e,r);return i===null?(U(e),e.workflow?J(e,r.text,r.indent-1,n,r):L(r.text,r.number)):Xe(e,t,n,i)}function Ye(e,t,n,r){let i;for(i=W(e);i?.indent===t;i=W(e)){if(r?.(i))return;n(i)}if(i?.indent>t)throw new N(`bad indentation`,i.number)}function Xe(e,t,n,r){let i=Object.create(null),a=e.lines&&new Map;e.lines?.set(i,a);let o=r;return Ye(e,t,r=>{if(!r.text.startsWith(`? `)){let s=o??Y(e,r);if(o=void 0,s===null)throw new N(`expected a mapping key, found ${O(r.text)}`,r.number);U(e),s.anchor&&e.anchors.set(s.anchor,s.key),F(i,s.key,Qe(e,s.rest,t,n,r),r.number),a?.set(s.key,r.number);return}U(e);let s=L(r.text.slice(2),r.number),c=W(e);if(c?.indent!==t||!/^:(?: |$)/u.test(c.text))throw new N(`expected ": " below the explicit key`,(c??r).number);F(i,s,$e(e,c,t,n),r.number),a?.set(s,r.number)}),i}function Ze(e,t,n,r=!1){let i=[],a=e.lines&&[];return e.lines?.set(i,a),Ye(e,t,r=>{if(!G(r))throw new N(`expected "- ", found ${O(r.text)}`,r.number);a?.push(r.number),i.push($e(e,r,t,n))},r?e=>!G(e):void 0),i}function Qe(e,t,n,r,i){if(e.workflow)return J(e,t,n,r,i);if(K(t))return et(e,t,n,i);if(t!==``)return L(t,i.number);let a=W(e);if(a?.indent===n&&G(a)&&!G(i))throw new N(`a sequence under a key must be indented`,a.number);if(a===void 0||a.indent<=n)throw new N(`missing value`,i.number);return q(e,a.indent,r+1)}function $e(e,t,n,r){let i=/^[-:] *(?:#.*)?/u.exec(t.text)[0].length;if(e.workflow)return it(e,t,n,r,i);let a=t.text.slice(i);return a===``||K(a)?(U(e),Qe(e,a,n,r,t)):(e.line={...t,indent:t.indent+i,text:a},q(e,t.indent+i,r+1))}function et(e,t,n,r){let{folded:i,digit:a,chomp:o}=tt(e,t,r),s=n+Number(a),c=a!==``,l=0,u=``,d=null;for(let t=e.line;t!==void 0&&(t.text===``||t.indent>n);t=U(e)){if(c||(s=Math.max(s,t.indent)),c||=t.text!==``,t.text!==``&&t.indent<s)throw new N(`bad indentation in the block scalar`,t.number);let e=`${` `.repeat(Math.max(t.indent-s,0))}${t.text}`;if(e!==``){let t=/^[\t ]/u.test(e);u+=i?nt(l,d,t):`
7
+ `.repeat(l),u+=e,d=t}l=e===``?l+1:1}return o===`+`?u+`
8
+ `.repeat(l):o===`-`?u:u&&`${u}
9
+ `}function tt(e,t,n){let r=e.workflow?/^([|>])(?:([1-9])([+-]?)|([+-])([1-9]?))?(?: +#.*| *)$/u.exec(t):/^\|([1-9]?)([+-]?)$/u.exec(t);if(r===null)throw new N(`unsupported block scalar ${O(t)}`,n.number);return e.workflow?{folded:r[1]===`>`,digit:r[2]??r[5]??``,chomp:r[3]||r[4]||``}:{folded:!1,digit:r[1],chomp:r[2]}}var nt=(e,t,n)=>t===null||t||n?`
10
+ `.repeat(e):e===1?` `:`
11
+ `.repeat(e-1);function J(e,t,n,r,i){let{anchor:a,rest:o}=V(t,i.number),s=rt(e,o.startsWith(`#`)?``:o,n,r,i);return a!==null&&e.anchors.set(a,s),s}function rt(e,t,n,r,i){if(t.startsWith(`*`))return Pe(e,t,i.number);if(K(t))return et(e,t,n,i);if(t.startsWith(`[`)||t.startsWith(`{`))return L(Be(e,t,i,n),i.number,!0);let a=t.startsWith(`'`)||t.startsWith(`"`);if(a&&H(t)===-1)return Le(e,t,i,be);if(t!==``)return L(a?t:Re(e,t,n),i.number,!0);let o=W(e);return o?.indent===n&&G(o)&&!G(i)?Ze(e,n,r+1,!0):o===void 0||o.indent<=n?null:!G(o)&&!o.text.startsWith(`? `)&&Y(e,o)===null?(U(e),J(e,o.text,n,r+1,o)):q(e,o.indent,r+1)}function it(e,t,n,r,i){let a=t.text.slice(i),{anchor:o,rest:s}=V(a,t.number),c=t.indent+i;if(s!==``&&!s.startsWith(`#`)&&(G({text:s})||s.startsWith(`? `))){if(o!==null)throw new N(`an anchor before a block on its own line is not supported`,t.number);return e.line={...t,indent:c,text:s},q(e,c,r+1)}return s!==``&&!s.startsWith(`#`)&&R(s,t.number)!==null?(e.line={...t,indent:c,text:a},q(e,c,r+1)):(U(e),J(e,a,n,r,t))}function Y(e,t){if(!e.workflow||!t.text.startsWith(`&`))return R(t.text,t.number);let{anchor:n,rest:r}=V(t.text,t.number),i=R(r,t.number);return i&&{...i,anchor:n}}var at=`(patch_hash=`;function ot(e){let t={start:e.length,peers:e.length};if(!e.endsWith(`)`))return t;let n=1;for(let t=e.length-2;t>=0;t--)if(e[t]===`(`)n--;else if(e[t]===`)`)n++;else if(n===0){if(!e.startsWith(at,t+1))return{start:t+1,peers:t+1};let n=e.indexOf(`(`,t+2);return{start:t+1,peers:n===-1?e.length:n}}return t}function X(e){if(typeof e!=`string`)throw TypeError(`expected a string`);return e.slice(0,ot(e).start)}function st(e,t,n){let r=[],[i,a]=[0,0];for(let o=0;o<e.length;o++){if(i===0&&(e[o]!==`(`||e[o+1]===`)`||e.startsWith(at,o)))throw new k(`${A(t)} does not end in peers in parentheses`,n);e[o]===`(`&&i++===0?a=o+1:e[o]===`)`&&--i===0&&r.push(e.slice(a,o))}return r}function ct(e,t){let{start:n,peers:r}=ot(e),i;if(n<r){let a=e.slice(n,r);if(i=/^\(patch_hash=([\da-z]+)\)$/u.exec(a)?.[1],i===void 0)throw new k(`${A(a)} is not a patch hash`,t)}return{base:e.slice(0,n),patchHash:i,peers:st(e.slice(r),e,t)}}var lt=e=>ne(e,{padding:!1}),Z=(e,t,n)=>ae(()=>e===e.toLowerCase()&&n(e).length===t,()=>!1);function ut(e,t){let n=e.indexOf(`@`,1);if(n===-1||n===e.length-1)throw new k(`${A(e)} is not a key of the form name@version`,t);if(X(e)!==e)throw new k(`${A(e)} carries a peer or patch suffix, which only a snapshot key does`,t);return{name:T(e.slice(0,n),t),ref:e.slice(n+1)}}var dt=(e,t)=>/^[^:(]*@/u.test(e)?e:`${t}@${e}`;function ft(e,t){let n=b(e,t);if(n.startsWith(`file:`))i(n.slice(5),t);else if(!u(n))throw new k(`${A(n)} is not an http(s) URL or a file: path`,t);return n}var pt=(e,t)=>e===``?`.`:i(e,t),mt=(e,t)=>y(e,`path`,t,(e,t)=>(a(b(e,t).replace(/^\//u,``),t),e));function ht(e,t){p(e,t,[`integrity`,`tarball`,`path`,`gitHosted`]);let{integrity:n,tarball:r}=e;if(n===void 0&&r===void 0)throw new k(`expected an integrity or a tarball`,t);return{type:`tarball`,integrity:y(e,`integrity`,t,l),tarball:y(e,`tarball`,t,ft),path:mt(e,t),gitHosted:w(e.gitHosted,j(t,`gitHosted`))}}function gt(e,t){p(e,t,[`type`,`repo`,`commit`,`path`]);let n=b(e.commit,j(t,`commit`));if(!s(n))throw new k(`${A(n)} is not a full commit hash`,j(t,`commit`));return{type:`git`,repo:c(e.repo,j(t,`repo`)),commit:n,path:mt(e,t)}}function _t(e,t){return p(e,t,[`type`,`directory`]),{type:`directory`,directory:pt(e.directory,j(t,`directory`))}}var vt=new Map([[void 0,ht],[`git`,gt],[`directory`,_t]]);function yt(e,t){let n=p(e,t),r=vt.get(n.type);if(r===void 0)throw new k(`unsupported resolution type, ${f(n.type)}`,j(t,`type`));return r(n,t)}var bt=[`resolution`,`version`,`name`,`engines`,`cpu`,`os`,`libc`,`deprecated`,`hasBin`,`bundledDependencies`,`peerDependencies`,`peerDependenciesMeta`],xt=[`dependencies`,`optionalDependencies`,`optional`,`transitivePeerDependencies`],St=new Set([`bitbucket`,`catalog`,`custom`,`file`,`git`,`github`,`gitlab`,`http`,`https`,`jsr`,`link`,`npm`,`ssh`,`workspace`]);function Ct(e,t,n,r,i){let{type:a,tarball:o}=r,s=o?.startsWith(`file:`);if(E(t)){if(a!==`tarball`||r.integrity===void 0||s||r.gitHosted||r.path!==void 0)throw new k(`expected a registry tarball with an integrity, for the version ${A(t)}`,j(i,`resolution`));if(n.version!==void 0&&n.version!==t)throw new k(`expected the version in the key, ${A(t)}`,j(i,`version`));return o!==void 0&&d(o,e,t,j(j(i,`resolution`),`tarball`)),t}let c=/^([A-Za-z][\w+.-]*):/u.exec(t)?.[1];if(c===void 0)throw new k(`${A(t)} is neither a version nor a source`,i);if(c===`runtime`||!St.has(c)&&E(t.slice(c.length+1)))throw new k(`${A(t)} is from a runtime or a named registry, which is not supported`,i);if(!(c===`file`?t===(a===`directory`?`file:${n.resolution.directory}`:o):a===`git`||a===`tarball`&&o!==void 0&&!s))throw new k(`${A(t)} is not where the resolution says the package comes from`,j(i,`resolution`));if(a===`directory`){if(n.version!==void 0)throw new k(`a directory has no version in the lockfile`,j(i,`version`))}else{if(n.version===void 0)throw new k(`expected a version, for a package not from the registry`,i);return te(n.version,j(i,`version`))}}var wt=(e,t)=>x(e,t,T);function Tt(e,t,n){p(t,n,bt);let{name:r,ref:i}=ut(e,n);if(t.name!==void 0&&t.name!==r)throw new k(`expected the name in the key, ${A(r)}`,j(n,`name`));let a=yt(t.resolution,j(n,`resolution`)),o=t.bundledDependencies;return{name:r,version:Ct(r,i,t,a,n),resolution:a,engines:C(v(t.engines),j(n,`engines`)),os:y(t,`os`,n,x),cpu:y(t,`cpu`,n,x),libc:y(t,`libc`,n,x),deprecated:y(t,`deprecated`,n,b),hasBin:w(t.hasBin,j(n,`hasBin`)),bundledDependencies:o===void 0||o===!0?o:wt(o,j(n,`bundledDependencies`)),peerDependencies:C(v(t.peerDependencies),j(n,`peerDependencies`),T),peerDependenciesMeta:Dt(t.peerDependenciesMeta,j(n,`peerDependenciesMeta`))}}var Et=(e,t)=>(n,r)=>S(v(n),r,(n,r,i)=>(p(n,r,e),T(i,r),t(n,r))),Dt=Et([`optional`],(e,t)=>({optional:w(e.optional,j(t,`optional`))}));function Ot(e,t,n,r,i){if(e.startsWith(`link:`))return`link:${o(n,pt(e.slice(5),i))}`;let a=dt(e,t);if(!(a in r))throw new k(`${A(e)} leads to ${A(a)}, which is not in snapshots`,i);return a}var kt=(e,t,n)=>S(v(e),t,(e,t,r)=>{let i=b(e,t);if(i===`link:<root>`||i.startsWith(`link:<root>/`))throw new k(`${A(i)} leads into the package that asks for it, which is not supported`,t);return Ot(i,T(r,t),`.`,n,t)});function At(e,n,r){return p(e,n,xt),{...t(e,n,(e,t)=>kt(e,t,r)),optional:w(e.optional,j(n,`optional`)),transitivePeerDependencies:y(e,`transitivePeerDependencies`,n,wt)??[]}}var jt=e=>Z(e,16,lt)||Z(e,16,D);function Mt(e){let t=e.indexOf(`@`,1);return t===-1?``:e.slice(0,t)}function Q(e){let t=ae(()=>ct(e),()=>{});if(t===void 0)return;let n=t.patchHash===void 0?t.base:`${t.base}(patch_hash=${t.patchHash})`;if(t.peers.length===1&&jt(t.peers[0]))return{unpeered:n,peers:void 0};let r=new Map(t.peers.map(e=>[Mt(e),e]));return r.size===t.peers.length?{unpeered:n,peers:r}:void 0}var Nt=32;function Pt(e,t,n,r=0){if(e===t)return!0;let[i,a]=[Q(e),Q(t)];if(r>Nt||i===void 0||a===void 0||i.unpeered!==a.unpeered)return!1;if(i.peers===void 0||a.peers===void 0)return!0;let{dependencies:o,optionalDependencies:s}=n[t];return i.peers.entries().every(([e,t])=>{if(!a.peers.has(e))return!1;let i=o[e]??s[e];return i===void 0?t===a.peers.get(e):!i.startsWith(`link:`)&&Pt(t,i,n,r+1)})}function Ft(e,t,n,r,i,a,o,s){if(e.length===0||e.length===1&&jt(e[0]))return;let c={...t.dependencies,...t.optionalDependencies},l=new Set,u=new Set;for(let[e,t]of Object.entries(c)){if(t.startsWith(`link:`)){u.add(e);continue}l.add(t);let n=r.get(X(t));n!==void 0&&(n.version===void 0?u.add(n.name):l.add(`${n.name}@${n.version}`))}let d=t.transitivePeerDependencies,f=(e,t)=>s&&!Object.hasOwn(c,t)&&!i().has(e)&&(Object.hasOwn(n.peerDependencies,t)&&n.peerDependenciesMeta[t]?.optional===!0||d.includes(t));for(let n of e){let e=Mt(n);if(e===``)throw new k(`${A(n)} is not a peer, as pnpm writes one in a key`,o);let r=!n.includes(`(`);if(l.has(n)||r&&u.has(e))continue;let s=r&&d.includes(e)&&!E(n.slice(e.length+1));if(!(d.length>0&&(i().has(n)||s))&&!(r&&f(n,e))){if(r)throw It(n,o);a.push({group:n,snapshot:t,where:o,leftOut:f(n,e)})}}}var It=(e,t)=>new k(`the peer ${A(e)} is not one of its dependencies, nor a peer of theirs it resolves`,t);function Lt(e,t){let n;for(let{group:r,snapshot:i,where:a,leftOut:o}of e){let e=Object.values({...i.dependencies,...i.optionalDependencies}).filter(e=>!e.startsWith(`link:`)),s=Q(r)?.unpeered;if(i.transitivePeerDependencies.includes(Mt(r))&&s!==void 0&&(n??=Map.groupBy(Object.keys(t),e=>Q(e)?.unpeered),e.push(...n.get(s)??[])),!e.some(e=>Pt(r,e,t))&&!o)throw It(r,a)}}function Rt(e,t,n){if(e.version===void 0&&t.keys().some(t=>t.startsWith(`${e.name}@`)))throw new k(`a package of no version in the lockfile, which a patch of a version of ${A(e.name)} may be of`,n);let r=`${e.name}@${e.version}`;return e.version!==void 0&&t.has(r)?r:t.has(e.name)?e.name:void 0}function zt(e,t,n,r){let i=new Map,a=new Map,o=j(t,`packages`);for(let[t,n,r]of m(v(e.packages),o)){let e=Tt(t,n,r);i.set(t,e),n.version!==void 0&&t===`${e.name}@${e.version}`&&a.set(t,j(r,`version`))}let s=j(t,`snapshots`),c=p(v(e.snapshots),s),l,u=()=>l??=new Set([...Object.keys(c),...i.keys(),...i.values().map(e=>`${e.name}@${e.version}`)]),d=new Set,f=new Set,h=[],g=S(c,s,(e,t,o)=>{let{base:s,patchHash:l,peers:p}=ct(o,t),m=i.get(s);if(m===void 0)throw new k(`${A(s)} is not in packages`,t);let g=Rt(m,n,t);g!==void 0&&f.add(g);let _=g===void 0?void 0:n.get(g).hash;if(_!==l){let e=g===void 0?`none, as patchedDependencies patches no such package`:`${A(_)}, of patchedDependencies[${A(g)}]`;throw new k(`expected the patch hash ${e}, found ${l===void 0?`none`:A(l)}`,t)}d.add(s),o.includes(`:`)&&a.delete(s);let v=At(e,t,c);return Ft(p,v,m,i,u,h,t,r),{...m,patchHash:l,...v}});Lt(h,g);let _=i.keys().find(e=>!d.has(e));if(_!==void 0)throw new k(`no snapshot is of this package`,j(o,_));let y=n.keys().find(e=>!f.has(e));if(y!==void 0)throw new k(`patches no package in the lockfile, which pnpm refuses to install with`,j(j(t,`patchedDependencies`),y));let[b]=a.values();if(b!==void 0)throw new k(`a registry package has its version in its key, except where a snapshot of it has a source in its peers`,b);return{packages:g,snapshots:c}}var Bt=[...e,`dependenciesMeta`,`publishDirectory`,`linkDirectory`],$=[`configDependencies`,`packageManagerDependencies`];function Vt(e,t,n,r,i){let a=Object.create(null),o={specifiers:a},s=Object.create(null);for(let c of t)o[c]=S(v(e[c]),j(r,c),(e,t,r)=>{if(T(r,t),p(e,t,[`specifier`,`version`]),r in a)throw new k(`listed under ${s[r]} too`,t);a[r]=h(e.specifier,j(t,`specifier`)),s[r]=c;let o=j(t,`version`);return Ot(b(e.version,o),r,n,i,o)});return o}var Ht=Et([`injected`,`node`],(e,t)=>({injected:y(e,`injected`,t,g)??!1,node:y(e,`node`,t,b)}));function Ut(t,n,r,a){if(p(t,r,Bt),t.linkDirectory!==void 0&&t.linkDirectory!==!1)throw new k(`expected false, the only value pnpm writes`,j(r,`linkDirectory`));return{...Vt(t,e,n,r,a),dependenciesMeta:Ht(t.dependenciesMeta,j(r,`dependenciesMeta`)),publishDirectory:y(t,`publishDirectory`,r,i),linkDirectory:t.linkDirectory!==!1}}function Wt(e,t,n,r){let a=S(e,t,(e,t,a)=>{if(i(a,t),!r)return Ut(e,a,t,n);if(a!==`.`)throw new k(`the env document has no importer but "."`,t);return p(e,t,$),Vt(e,$,a,t,n)});if(r&&!(`.`in a))throw new k(`expected the "." importer`,t);return a}var Gt=[`lockfileVersion`,`settings`,`catalogs`,`overrides`,`patchedDependencies`,`packageExtensionsChecksum`,`pnpmfileChecksum`,`ignoredOptionalDependencies`,`time`,`importers`,`packages`,`snapshots`],Kt=[`lockfileVersion`,`importers`,`packages`,`snapshots`],qt=[`current`],Jt={__proto__:null,autoInstallPeers:g,dedupePeers:g,excludeLinksFromLockfile:g,injectWorkspacePackages:g,peersSuffixMaxLength:_},Yt=(e,t)=>S(p(v(e),t,Object.keys(Jt)),t,(e,t,n)=>Jt[n](e,t)),Xt=(e,t)=>S(v(e),t,(e,t,n)=>(b(n,t),Et([`specifier`,`version`],(e,t)=>({specifier:h(e.specifier,j(t,`specifier`)),version:b(e.version,j(t,`version`))}))(e,t)));function Zt(e,t){if(e.indexOf(`@`,1)===-1)return T(e,t);if(!E(ut(e,t).ref))throw new k(`${A(e)} is not a name and a version, or a name alone, which is not supported`,t)}var Qt=(e,t)=>S(v(e),t,(e,t,n)=>{let r=typeof e!=`string`;r&&p(e,t,[`hash`,`path`]);let a=r?j(t,`hash`):t,o=b(r?e.hash:e,a);if(!Z(o,32,D)&&!Z(o,16,lt))throw new k(`${A(o)} is not a patch hash`,a);return Zt(n,t),{hash:o,path:r?i(e.path,j(t,`path`)):void 0}});function $t(e,t){let n=b(e,t);if(Z(n,16,D)||Z(n,16,lt))return n;if(!n.startsWith(`sha256-`))throw new k(`${A(n)} is not a checksum`,t);return l(n,t)}var en=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d+)?Z$/u,tn=(e,t,n)=>S(v(e),t,(e,t,r)=>{if(!(r in n))throw new k(`${A(r)} is not in packages`,t);let i=b(e,t),a=en.test(i)?Date.parse(i):NaN;if(Number.isNaN(a)||new Date(a).toISOString().slice(0,19)!==i.slice(0,19))throw new k(`${A(i)} is not a UTC timestamp`,t);return i});function nn(e,t,r,i){let a=n(Object.values(e).flatMap(e=>i.map(t=>e[t])),t);if(a!==void 0)throw new k(`no importer depends on it, directly or not`,j(j(r,`snapshots`),a))}function rn(e,t,n){let i=r(t,e,n?{required:$,dev:[],optional:[]}:void 0);for(let e of Object.values(t)){let{dev:t,devOptional:n}=i(e);Object.assign(e,{dev:t,devOptional:n})}}function an(t,n,r,i){let a=n===``?void 0:n,o=p(t,a).lockfileVersion;if(o!==`9.0`)throw new k(`unsupported version: expected "9.0", found ${f(o)}`,j(n,`lockfileVersion`));p(t,a,r?Kt:Gt);let s=Qt(t.patchedDependencies,j(n,`patchedDependencies`)),{packages:c,snapshots:l}=zt(t,n,new Map(Object.entries(s)),i),u=Wt(t.importers,j(n,`importers`),l,r);return nn(u,c,n,r?$:e),rn(u,c,r),r?{lockfileVersion:o,importers:u,packages:c}:{lockfileVersion:o,settings:Yt(t.settings,j(n,`settings`)),catalogs:Xt(t.catalogs,j(n,`catalogs`)),overrides:C(v(t.overrides),j(n,`overrides`),b),patchedDependencies:s,packageExtensionsChecksum:y(t,`packageExtensionsChecksum`,n,$t),pnpmfileChecksum:y(t,`pnpmfileChecksum`,n,$t),ignoredOptionalDependencies:y(t,`ignoredOptionalDependencies`,n,x)??[],time:tn(t.time,j(n,`time`),v(t.packages)),importers:u,packages:c}}function on(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let{current:n=!1}=ee(t,qt);if(typeof n!=`boolean`)throw TypeError(`current: expected a boolean`);let r=/^---\r?\n/u.exec(e)?.[0];if(r===void 0){let t=Ke(e);if(t.length!==1)throw new k(`expected one document, found ${t.length}`);return{lockfile:an(t[0],``,!1,n),env:void 0}}let i=/\n---\r?\n/gu;i.lastIndex=r.length;let a=i.exec(e);if(a===null)throw new k(`expected the env document the first "---" starts to end at a line of "---"`);let o=/^(?: *\r?\n)* *$/u.test(e.slice(i.lastIndex)),s=Ke(o?e.slice(0,a.index+1):e);if(s.length!==(o?1:2))throw new k(`expected the env document${o?``:` and the lockfile`} between lines of "---" alone, found ${s.length} documents`);return{lockfile:o?void 0:an(s[1],``,!1,n),env:an(s[0],`env`,!0,!1)}}export{k as LockfileError,N as YamlError,X as packageKeyOf,on as parsePnpmLockfile};
@@ -0,0 +1,2 @@
1
+ import{a as e,c as t}from"./chunk-7YFJUT2P.js";var n=new Uint8Array,r=e=>e.every(e=>e<128),i=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]);function a(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}var o=class extends Error{constructor(e,t,{limited:n=!1}={}){super(t===void 0?e:`${e} at byte ${t}`),this.name=`ArchiveError`,this.offset=t,this.limited=n}};function s(e,t){try{return e()}catch(e){throw!(e instanceof o)||e.offset!==void 0?e:new o(e.message,t,{limited:e.limited})}}var c=class extends o{constructor(e,{bytes:t,limited:n=!1,cause:r}){super(e,void 0,{limited:n}),this.name=`CompressionError`,this.bytes=t,this.cause=r}};function l(e){try{return[CompressionStream,DecompressionStream].every(t=>new t(e))}catch{return!1}}function u(e){if(!(e instanceof Uint8Array))throw new o(`the data is not a Uint8Array`)}async function d(e,t,n,r,i,o){let s=new t(n),l=s.writable.getWriter();l.write(e).catch(()=>{}),l.close().catch(()=>{});let u=s.readable.getReader(),d=[],f=0,p=()=>o?o.subarray(0,f):d.length===1?d[0]:a(d);try{for(let e=await u.read();!e.done;e=await u.read()){let t=e.value;if(!(f+t.length<=r))throw RangeError(`output past ${r} bytes`);o&&f+t.length>o.length&&(d.push(o.subarray(0,f)),o=void 0),o?o.set(t,f):d.push(t),f+=t.length}}catch(e){u.cancel().catch(()=>{});let t=e instanceof RangeError;throw new c(t?`the data ${i}es past ${r} bytes`:`the data does not ${i}`,{bytes:p(),limited:t,cause:e})}return p()}async function f(e,t,{limit:n=1/0}={}){return u(e),await d(e,CompressionStream,t,n,`compress`)}var p=16;function m(e,t){if(e.length<18)return 0;let n=new DataView(e.buffer,e.byteOffset+e.length-4,4).getUint32(0,!0);return n<=t&&n<=e.length*p?n:0}var h=(e,t,n,r=0)=>d(e,DecompressionStream,t,n,`decompress`,r?new Uint8Array(r):void 0);async function g(e,t,{limit:n=1/0}={}){u(e);let r=t===`gzip`;try{return await h(e,t,n,r?m(e,n):0)}catch(i){if(!r||!(i instanceof c)||i.limited||e.at(-1)!==0)throw i;let a=e.findLastIndex(e=>e!==0);for(let r=a+1;r<=Math.min(a+10,e.length-1);r++)try{return await h(e.subarray(0,r),t,n)}catch(e){if(!(e instanceof c)||e.limited)throw e}throw i}}var _=(e,t,n)=>d(e,DecompressionStream,t,n.length,`decompress`,n);function v(e){return e.length<=200?JSON.stringify(e):JSON.stringify(`${e.slice(0,e.codePointAt(199)>65535?199:200)}\u2026`)}var ee=/[\p{Cc}\p{Zl}\p{Zp}\p{Bidi_Control}]/u,y=(e,t)=>ee.test(e)||t&&e.includes(`\\`);function b(e,t){if(typeof e!=`string`)throw new o(`${t} is not a string`);if(!e.isWellFormed())throw new o(`${t} is not well-formed Unicode`)}var x=(t,n)=>t.length>n||t.length*3>n&&e(t).length>n;function S(e,n,r){try{return t(e)}catch{throw new o(`${n} is not valid UTF-8`,r)}}var te={file:420,directory:493,symlink:511},ne=e=>e===`file`||e===`contiguous-file`,re=e=>e.type===`directory`?`${e.name}/`:e.name;function C(e,t){if(typeof e!=`object`||!e)throw new o(`an entry is not an object`);let r=e.type??`file`;if(typeof r!=`string`)throw new o(`entry type is not a string`);if(!Object.hasOwn(t,r))throw new o(`entry type ${v(r)} is not one this package writes`);let{name:i}=e;b(i,`entry name`);let a=e.data??n;if(!(a instanceof Uint8Array))throw new o(`data of ${v(i)} is not a Uint8Array`);if(a.length!==0&&!ne(r))throw new o(`a ${r} cannot carry data (${v(i)})`);let s=e.linkname??``;if(b(s,`link target of ${v(i)}`),s!==``&&r!==`hardlink`&&r!==`symlink`)throw new o(`a ${r} cannot have a link target (${v(i)})`);return{name:i,type:r,data:a,linkname:s}}var w=4096,ie=255;function ae(e,t){if(b(e,t),e===``)throw new o(`${t} is empty`);if(y(e,!0))throw new o(`${t} ${v(e)} holds a control or formatting character, or a backslash`);if(e.startsWith(`/`))throw new o(`${t} ${v(e)} is absolute`);let n=e.split(`/`);if(/^[a-zA-Z]:/u.test(n.find(e=>e!==`.`)??``))throw new o(`${t} ${v(e)} starts with a drive letter`);if(x(e,w))throw new o(`${t} ${v(e)} is longer than ${w} bytes`);if(n.some(e=>x(e,ie)))throw new o(`${t} ${v(e)} has a segment longer than ${ie} bytes`);return n}function oe(e,t,n=!1){let r=ae(e,t);if(r.at(-1)===``){if(!n)throw new o(`${t} ${v(e)} ends in a slash but is not a directory`);r.pop()}let i=r.filter(e=>e!==`.`),a=i.find(e=>e===``||e===`..`);if(a!==void 0)throw new o(`${t} ${v(e)} has ${a?`a .. segment`:`an empty segment`}`);if(i.length===0){if(!n)throw new o(`${t} ${v(e)} names the archive root but is not a directory`);return`.`}let s=i.join(`/`);if(x(s,w-+!!n))throw new o(`${t} ${v(e)} is longer than ${w} bytes`);return s}function se(e=0){if(!(Number.isSafeInteger(e)&&e>=0))throw new o(`symlinksAbove ${String(e)} is not a whole number of levels`);return e}function ce(e,t,n=0){let r=ae(t,`symlink target of ${v(e)}`).filter(e=>e!==``&&e!==`.`),i=e.split(`/`).length-1;for(let a of r)if(i+=a===`..`?-1:1,i<-n){let r=n===0?`outside the archive`:`more than ${n} level${n===1?``:`s`} above the archive`;throw new o(`symlink ${v(e)} points ${r}, to ${v(t)}`)}return r}function T(e,t,n,r=0){let i=oe(e,`entry name`,t===`directory`);return t===`symlink`&&ce(i,n,r),{name:i,linkname:t===`hardlink`?oe(n,`hard link target of ${v(i)}`):n}}var E=()=>({kind:void 0,entry:void 0,symlink:void 0,first:void 0,firstNode:void 0,rest:void 0});function D(e,t,n=!0){if(e.first===t)return e.firstNode;let r=e.rest?.get(t);return r!==void 0||!n||(r=E(),e.first===void 0?Object.assign(e,{first:t,firstNode:r}):(e.rest??=new Map).set(t,r)),r}var le=[`type`,`mode`,`uid`,`gid`,`mtime`,`uname`,`gname`,`linkname`,`devmajor`,`devminor`],O=40,ue=Symbol(`resolving`),de=e=>e.split(`/`).filter(e=>e!==``&&e!==`.`),k=class{#e=E();#t;#n;#r;#i=new Map;#a=0;constructor(e=!1,t=0,n=!1){this.#t=e,this.#n=se(t),this.#r=n?[]:null}get above(){return this.#n}add(e){let{name:t,type:n}=e,r=n===`symlink`?e.linkname:void 0;if(n===`hardlink`){let n=this.#d(e.linkname);if(n?.kind!==`entry`)throw new o(`hard link ${v(t)} targets ${v(e.linkname)}, which is not an earlier non-directory entry`);r=n.symlink,r!==void 0&&this.#o(t,r,`hard link ${v(t)} to symlink ${v(e.linkname)}`)}let a=t.split(`/`),s=this.#u(a),c=s.at(-1);if(c.kind!==void 0&&c.kind!==`implied`){let n=le.find(t=>c.entry[t]!==e[t]);if(n!==void 0)throw new o(`duplicate entry ${v(t)} differs in ${n}`);if(c.entry.data===void 0)throw new o(`duplicate entry ${v(t)}, which only the in-memory call can compare with the earlier one`);if(!i(c.entry.data,e.data))throw new o(`duplicate entry ${v(t)} differs in data`);return}let l=n===`directory`?`directory`:`entry`;if(c.kind!==void 0&&l!==`directory`)throw new o(`${v(t)} is already a directory, so it cannot be a ${n}`);for(let e=1;e<a.length;e++)this.#l(s[e],()=>`${v(t)} is inside ${v(a.slice(0,e).join(`/`))}, which is not a directory`);c.kind=l,c.symlink=r,c.entry=this.#t?e:Object.fromEntries(le.map(t=>[t,e[t]])),n===`symlink`&&this.#o(t,e.linkname,`symlink ${v(t)}`)}#o(e,t,n){let r=ce(e,t,this.#n);if(this.#r!==null){this.#r.push({at:e,what:n});return}let i=e.split(`/`).slice(0,-1),a=this.#u(i);for(let[e,t]of r.entries()){if(t===`..`){if(i.length===0)return;i.pop(),a.pop()}else i.push(t),a.push(D(a.at(-1),t));e<r.length-1&&i.length&&this.#l(a.at(-1),()=>`the target of ${n} passes through ${v(i.join(`/`))}, which is not a directory`)}}settle(){for(let{at:e,what:t}of this.#r??[]){let n=e.split(`/`),r=this.#u(n);this.#s(r.pop(),{nodes:r,names:n.slice(0,-1)},t)}}#s(e,t,n){let r=this.#i.get(e);if(r===ue)throw new o(`${n} leads through a loop of symlinks`);if(r!==void 0)return r;if(this.#a>O)throw new o(`${n} leads through more than ${O} symlinks`);this.#i.set(e,ue),this.#a++;try{let r=this.#c(t,de(e.symlink),n);return this.#i.set(e,r),r}finally{this.#a--}}#c(e,t,n){let r=[...e.nodes],i=[...e.names],a=i.length,s=!1,c=0;for(let[e,l]of t.entries()){if(l===`..`){if(--a,a<-this.#n)throw new o(`${n} leads ${this.#n===0?`outside the archive`:`more than ${this.#n} level${this.#n===1?``:`s`} above the archive`} through the symlinks it passes`);s||a<0?s=!0:(r.pop(),i.pop());continue}if(a+=1,s)continue;let u=D(r.at(-1),l,!1);if(u?.symlink!==void 0){let d=this.#s(u,{nodes:r,names:i},n);if(c+=d.hops+1,c>O)throw new o(`${n} leads through more than ${O} symlinks`);if(!d.outside&&d.nodes.at(-1).kind===`entry`&&e<t.length-1)throw new o(`the target of ${n} passes through ${v([...i,l].join(`/`))}, which leads to ${v(d.names.join(`/`))}, not a directory`);a=d.depth,s=d.outside,r=[...d.nodes],i=[...d.names]}else{if(u?.kind===`entry`&&e<t.length-1)throw new o(`the target of ${n} passes through ${v([...i,l].join(`/`))}, which is not a directory`);r.push(u??E()),i.push(l)}}return{nodes:r,names:i,depth:a,outside:s,hops:c}}#l(e,t){if(e.kind===`entry`)throw new o(t());e.kind??=`implied`}#u(e){let t=[this.#e];for(let n of e)t.push(D(t.at(-1),n));return t}#d(e){return e.split(`/`).reduce((e,t)=>e&&D(e,t,!1),this.#e)}},A=512,j=e=>e===`character-device`||e===`block-device`,M={file:48,hardlink:49,symlink:50,"character-device":51,"block-device":52,directory:53,fifo:54,"contiguous-file":55},N={pax:120,global:103,longname:76,longlink:75},P=100,F=155,I=32,fe=0,L=[[`mode`,100,8],[`uid`,108,8],[`gid`,116,8],[`size`,124,12],[`mtime`,136,12]],R=148,z=156,B=157,V=257,pe=265,H=297,U=329,W=337,me=345,he=386,ge=495,_e=`ustar\x0000`,ve=`ustar \0`,G=e=>Uint8Array.from(e,e=>e.codePointAt(0)),K=e=>String.fromCodePoint(...e),q=(e,t,n,r)=>e.subarray(t,t+n).set(r),J=(e,t,n)=>xe(e.subarray(t,t+n)),ye=e=>8**(e-1)-1,be=(e,t)=>e>=0&&e<=ye(t);function Y(e,t,n,r,i){if(be(r,n)){q(e,t,n,G(r.toString(8).padStart(n-1,`0`)));return}if(!i)throw new o(`${r} does not fit an octal field of ${n-1} digits`);e[t]=r<0?255:128;let a=BigInt.asUintN((n-1)*8,BigInt(r));for(let r=t+n-1;r>t;r--)e[r]=Number(a&255n),a>>=8n}function X(e,t,n,r,i,a=!1){let s=e[t];if(s===128||s===255){let c=0n;for(let r=t+1;r<t+n;r++)c=c<<8n|BigInt(e[r]);if(s===255&&(c=BigInt.asIntN((n-1)*8,c)),c<0n&&!a)throw new o(`the ${r} field is negative`,i);if(!Number.isSafeInteger(Number(c)))throw new o(`the ${r} field is too large`,i);return Number(c)}let c=/^ *([0-7]*) *$/u.exec(K(J(e,t,n)));if(!c)throw new o(`the ${r} field is not an octal number`,i);return c[1]===``?0:Number.parseInt(c[1],8)}function xe(e){let t=e.indexOf(0);return t===-1?e:e.subarray(0,t)}function Se(e){let t=256;for(let n=0;n<R;n++)t+=e[n];for(let n=R+8;n<A;n++)t+=e[n];return t}var Z=e=>e.every(e=>e===0);function Ce(e){let t=new Uint8Array(A);q(t,fe,P,e.name);for(let[n,r,i]of L)Y(t,r,i,e[n],e.gnu);return t[z]=e.typeflag,q(t,B,P,e.linkname),q(t,V,8,G(e.gnu?ve:_e)),q(t,pe,I-1,e.uname),q(t,H,I-1,e.gname),e.devmajor!==null&&Y(t,U,8,e.devmajor,e.gnu),e.devminor!==null&&Y(t,W,8,e.devminor,e.gnu),q(t,me,F,e.prefix),q(t,R,8,G(`${Se(t).toString(8).padStart(6,`0`)}\0 `)),t}var we=(e,t,n)=>/^ *[0-7]+ *$/u.test(K(J(e,t,n)));function Te(e,t){if(Se(e)!==X(e,R,8,`checksum`,t))throw new o(`header checksum does not match`,t);let r=K(e.subarray(V,V+8)),i=r===ve;if(!i&&r!==_e)throw new o(`header is not in the ustar, pax or gnu format`,t);if(i&&!Z(e.subarray(he,ge)))throw new o(`header carries an old GNU sparse map or real size`,t);let a=e[z],s=a===M[`character-device`]||a===M[`block-device`],c=[[`checksum`,R,8],...L,...s?[[`devmajor`,U,8],[`devminor`,W,8]]:[]];return{gnu:i,typeflag:a,name:J(e,fe,P),prefix:i?n:J(e,me,F),linkname:J(e,B,P),uname:J(e,pe,I),gname:J(e,H,I),...Object.fromEntries(L.map(([n,r,i])=>[n,X(e,r,i,n,t,n===`mtime`)])),devmajor:s?X(e,U,8,`devmajor`,t):0,devminor:s?X(e,W,8,`devminor`,t):0,octal:c.every(([,t,n])=>we(e,t,n))}}function Ee(t,n){let r=e(` ${t}=${n}
2
+ `),i=r.length+1;for(;r.length+String(i).length!==i;)i++;return a([e(String(i)),r])}var De=e=>a(e.map(([e,t])=>Ee(e,t))),Q=`pax records cannot be changed`,Oe=class extends Map{set(){throw TypeError(Q)}delete(){throw TypeError(Q)}clear(){throw TypeError(Q)}};function ke(e,t){let n=new Oe;for(let r=0;r<e.length;){let i=r,a=0;for(;i<e.length&&e[i]>=48&&e[i]<=57;i++)a=a*10+(e[i]-48);if(i===r||e[r]===48||e[i]!==32)throw new o(`a pax record does not begin with its length`,t);let s=r+a;if(s>e.length||e[s-1]!==10)throw new o(`a pax record is not as long as it says`,t);let c=e.indexOf(61,i+1);if(c===-1||c>=s-1)throw new o(`a pax record has no keyword=value`,t);let l=S(e.subarray(i+1,c),`a pax record`,t);if(l===``||y(l,!1)||l.includes(` `))throw new o(`pax keyword ${v(l)} is malformed`,t);if(n.has(l))throw new o(`pax keyword ${l} repeats`,t);Map.prototype.set.call(n,l,S(e.subarray(c+1,s-1),`a pax record`,t)),r=s}return n}var Ae=e=>Object.entries(e).map(([e,t])=>[t,e]),je=new Map([...Ae(M),[0,`file`]]),Me=new Map(Ae(N)),Ne=1<<20,Pe=new Oe,Fe=Object.freeze([]),Ie=e=>e.gnu?`gnu`:`ustar`,Le=e=>Math.ceil(e/A)*A,Re=new Set([`SCHILY.realsize`,`SUN.holesdata`]);function ze(e,t){if(e.some(e=>e.startsWith(`GNU.sparse.`)||Re.has(e)))throw new o(`sparse entries are not supported`,t)}function Be(e,t,n){if(!/^(?:0|[1-9][0-9]*)$/u.test(e)||!Number.isSafeInteger(Number(e)))throw new o(`pax ${t}=${v(e)} is not a whole number this package can hold`,n);return Number(e)}function Ve(e,t,n){let r=/^(-?)([0-9]+)(?:\.([0-9]+))?$/u.exec(e);if(!r)throw new o(`pax ${t}=${v(e)} is not a time`,n);let[,i,a,s=``]=r,c=Number(i+a)-(i&&/[1-9]/u.test(s)?1:0);if(!Number.isSafeInteger(c))throw new o(`pax ${t}=${v(e)} is out of range`,n);return c}function He(e,t){let n=S(e.name,`entry name`,t);return e.prefix.length?`${S(e.prefix,`name prefix`,t)}/${n}`:n}var Ue=class{#e=[];#t=0;#n=0;#r=0;#i;#a={pax:null,longname:null,longlink:null};#o=[];#s=null;#c=null;#l=0;#u=!1;#d=0;#f;#p;constructor(e,{symlinksAbove:t,maxEntries:n=1/0,trailingGlobal:r=!1}={}){if(n!==1/0&&!(Number.isSafeInteger(n)&&n>=0))throw new o(`maxEntries ${String(n)} is not a whole number of entries`);if(typeof r!=`boolean`)throw new o(`trailingGlobal ${String(r)} is not a boolean`);this.#i=new k(e,t),this.#f=n,this.#p=r}*push(e){if(!(e instanceof Uint8Array))throw new o(`a chunk is not a Uint8Array`);for(e.length&&(this.#e.push(e),this.#n+=e.length);!this.#u;){let e=this.#m(this.#c?Le(this.#c.size):A);if(e===null)return;let t=this.#c?this.#g(e):this.#h(e);t&&(yield t)}let t=this.#r;if(!Z(this.#m(this.#n)))throw new o(`data after the end of the archive`,t)}end(){if(!this.#u)throw this.#r===0&&this.#n===0?new o(`the archive is empty`):this.#c===null&&this.#n===0?new o(this.#l?`the archive ends with a lone zero block`:`the archive has no end marker`,this.#r):new o(`the archive is truncated`,this.#r)}#m(e){if(this.#n<e)return null;if(e===0)return n;let t,r=this.#t+e;if(r<=this.#e[0].length)t=this.#e[0].subarray(this.#t,r);else{let e=0;for(;r>this.#e[e].length;)r-=this.#e[e++].length;t=a([this.#e[0].subarray(this.#t),...this.#e.slice(1,e),this.#e[e].subarray(0,r)]),this.#e.splice(0,e)}return this.#t=r,r===this.#e[0].length&&(this.#e.shift(),this.#t=0),this.#n-=e,this.#r+=e,t}#h(e){let t=this.#r-A;if(Z(e)){if(this.#o.some(({kind:e})=>e!==`global`||!this.#p))throw new o(`an extended header is not followed by an entry`,t);this.#u=++this.#l===2;return}if(this.#l)throw new o(`a lone zero block where a header should be`,t);let n=Te(e,t),r=Me.get(n.typeflag);if(r===void 0){if(++this.#d>this.#f)throw new o(`the archive holds more than ${this.#f} entries`,t,{limited:!0});this.#c={at:t,...this.#_(n,t)}}else{if(n.size>Ne)throw new o(`a ${r} header of ${n.size} bytes is longer than any tar writes`,t);this.#c={at:t,size:n.size,extended:Object.freeze({kind:r,magic:Ie(n),octal:n.octal})}}}#g(e){let{at:t,size:n,entry:r,extended:i}=this.#c;if(this.#c=null,!Z(e.subarray(n)))throw new o(`the padding after an entry is not zero`,t);let a=e.subarray(0,n);if(r)return r.data=a,s(()=>this.#i.add(r),t),r;let{kind:c}=i;if(c===`global`){this.#s=ke(a,t);let e=[`path`,`linkpath`,`size`].find(e=>this.#s.has(e));if(e!==void 0)throw new o(`a global header sets ${e}`,t);ze(this.#s.keys(),t)}else{if(this.#a[c]!==null)throw new o(`two ${c} headers ahead of one entry`,t);this.#a[c]=c===`pax`?ke(a,t):S(xe(a),`a ${c} header`,t)}this.#o.push(i)}#_(e,t){let r=je.get(e.typeflag);if(r===void 0)throw new o(`entry type ${v(String.fromCodePoint(e.typeflag))} is not one this package reads`,t);let{pax:i,longname:a,longlink:c}=this.#a;this.#a={pax:null,longname:null,longlink:null};let l=e=>i?.get(e)??this.#s?.get(e);if(i!==null&&ze(i.keys(),t),a!==null&&l(`path`)!==void 0)throw new o(`both a long name header and a pax path name one entry`,t);if(c!==null&&l(`linkpath`)!==void 0)throw new o(`both a long link header and a pax linkpath name one entry`,t);let u=a??l(`path`)??He(e,t),d=c??l(`linkpath`)??S(e.linkname,`link target`,t),{name:f,linkname:p}=s(()=>T(u,r,d,this.#i.above),t),m=(n,r=Be)=>{let i=l(n);return i===void 0?e[n]:r(i,n,t)},h=m(`size`);if(h!==0&&!ne(r))throw new o(`a ${r} entry has a size`,t);if(p!==``&&r!==`hardlink`&&r!==`symlink`)throw new o(`a ${r} entry has a link target`,t);let g=n=>{let r=l(n)??S(e[n],n,t);if(y(r,!1))throw new o(`${n} ${v(r)} holds a control or formatting character`,t);return r},_=j(r),ee={name:f,type:r,mode:e.mode&4095,uid:m(`uid`),gid:m(`gid`),mtime:m(`mtime`,Ve),uname:g(`uname`),gname:g(`gname`),linkname:p,devmajor:_?m(`devmajor`):0,devminor:_?m(`devminor`):0,data:n,storedName:u,storedLinkname:d,pax:i??Pe,globalPax:this.#s??Pe,extended:this.#o.length?Object.freeze(this.#o):Fe,magic:Ie(e),typeflag:String.fromCodePoint(e.typeflag),storedMode:e.mode,octal:e.octal};return this.#o=[],{entry:ee,size:h}}};function We(e,t){let n=new Ue(!0,t),r=[...n.push(e)];return n.end(),r}var Ge=new Set([`gnu`,`ustar`,`pax`]),Ke=47;function $(e,t,n=!1){if(!Number.isSafeInteger(e)||!n&&e<0)throw new o(`${t} ${String(e)} is not ${n?`an integer`:`a non-negative integer`}`);return e}function qe(e,t){if(b(e,t),y(e,!1))throw new o(`${t} ${v(e)} holds a control or formatting character`);return e}function Je(e,t){let n=C(e,M),{name:r,type:i,linkname:a}=n,s=$(e.devmajor??0,`devmajor`),c=$(e.devminor??0,`devminor`);if((s!==0||c!==0)&&!j(i))throw new o(`a ${i} cannot have device numbers (${v(r)})`);let l=$(e.mode??te[i]??420,`mode`);if(l>4095)throw new o(`mode ${l.toString(8)} has bits beyond the permission bits`);return{...n,mode:l,uid:$(e.uid??0,`uid`),gid:$(e.gid??0,`gid`),mtime:$(e.mtime??0,`mtime`,!0),uname:qe(e.uname??``,`uname`),gname:qe(e.gname??``,`gname`),devmajor:s,devminor:c,...T(r,i,a,t)}}function Ye(e,t=e.length){let n=new Uint8Array(Math.ceil(t/A)*A);return n.set(e),n}var Xe=(t,r,i,a,o)=>Ce({gnu:o,name:e(t).subarray(0,P),prefix:n,linkname:n,uname:n,gname:n,typeflag:a,mode:420,uid:0,gid:0,size:r,mtime:i,devmajor:null,devminor:null}),Ze=(e,t)=>[Xe(`././@LongLink`,e.length+1,0,t,!0),Ye(e,e.length+1)];function Qe(e,t){let n=De(t),r=e.name.lastIndexOf(`/`);return[Xe(r===-1?`./PaxHeaders/${e.name}`:`${e.name.slice(0,r)}/PaxHeaders/${e.name.slice(r+1)}`,n.length,Math.max(0,Math.min(e.mtime,ye(12))),N.pax,!1),Ye(n)]}function $e(e,t){let{length:n}=e;if(n>F+P+1)throw new o(`name ${v(t)} is longer than 256 bytes, which ustar cannot hold`);let r=n>F+1?F+1:e[n-1]===Ke?n-1:n,i=e.lastIndexOf(Ke,r-1),a=n-i-1;if(i<=0||a>P||a===0)throw new o(`name ${v(t)} cannot be split into ustar's prefix and name fields`);return{prefix:e.subarray(0,i),name:e.subarray(i+1)}}function et(t,i){let a=i===`gnu`,s=[],c=[],l=re(t),u=e(l),d=n,f=e(t.linkname);if(f.length>P){if(a)c.push(...Ze(f,N.longlink));else if(i===`pax`)s.push([`linkpath`,t.linkname]);else throw new o(`link target of ${v(t.name)} is longer than 100 bytes, which ustar cannot hold`);f=f.subarray(0,P)}i===`pax`&&(u.length>P||!r(u))&&s.push([`path`,l]),u.length>P&&(a?c.push(...Ze(u,N.longname)):i===`ustar`&&({prefix:d,name:u}=$e(u,t.name)),u.length>P&&(u=u.subarray(0,P)));let p=(e,n,r)=>{if(a||be(n,r))return n;if(i!==`pax`)throw new o(`${e} ${n} of ${v(t.name)} does not fit the ustar format`);return s.push([e,String(n)]),0},m=(n,a)=>{let c=e(a);if(c.length<I&&(i!==`pax`||r(c)))return c;if(i!==`pax`)throw new o(`${n} of ${v(t.name)} is longer than 31 bytes, which the ${i} format cannot hold`);return s.push([n,a]),c.subarray(0,I-1)},h=j(t.type),g={gnu:a,name:u,prefix:d,linkname:f,typeflag:M[t.type],mode:t.mode,uid:p(`uid`,t.uid,8),gid:p(`gid`,t.gid,8),size:p(`size`,t.data.length,12),mtime:p(`mtime`,t.mtime,12),devmajor:h?p(`devmajor`,t.devmajor,8):null,devminor:h?p(`devminor`,t.devminor,8):null,uname:m(`uname`,t.uname),gname:m(`gname`,t.gname)};return s.length&&c.push(...Qe(t,s)),c.push(Ce(g)),t.data.length&&c.push(t.data),t.data.length%A&&c.push(new Uint8Array(A-t.data.length%A)),c}function tt({format:e=`gnu`,blocking:t=20,symlinksAbove:n}={},r=!1){if(!Ge.has(e))throw new o(`format ${v(String(e))} is not gnu, ustar or pax`);if(!Number.isSafeInteger(t)||t<1)throw new o(`blocking is not a positive integer`);let i=new k(r,n),a=0;return{add(t){let n=Je(t,i.above);i.add(n);let r=et(n,e);for(let e of r)a+=e.length;return r},end(){let e=t*A;return[new Uint8Array(Math.ceil((a+2*A)/e)*e-a)]}}}function nt(e,t){let n=tt(t,!0),r=[];for(let t of e)r.push(...n.add(t));return a([...r,...n.end()])}export{n as a,r as b,i as c,a as d,o as e,s as f,c as g,l as h,f as i,g as j,_ as k,v as l,S as m,te as n,re as o,C as p,T as q,k as r,nt as s,We as t};
@@ -0,0 +1 @@
1
+ import{a as e,c as t}from"./chunk-TUII34K2.js";async function n(e){let t=new Blob([e]).stream().pipeThrough(new CompressionStream(`gzip`));return new Uint8Array(await new Response(t).arrayBuffer())}async function r(e,{maxBytes:t}={}){let n=new Blob([e]).stream().pipeThrough(new DecompressionStream(`gzip`));if(t==null)return new Uint8Array(await new Response(n).arrayBuffer());let r=n.getReader(),i=[],a=0;for(;;){let{value:e,done:n}=await r.read();if(n)break;if(a+=e.length,a>t){try{await r.cancel()}catch{}throw RangeError(`gunzipBytes: decompressed size exceeds ${t}-byte cap`)}i.push(e)}let o=new Uint8Array(a),s=0;for(let e of i)o.set(e,s),s+=e.length;return o}async function i(t){return await n(e(t))}async function a(e){return t(await r(e))}export{n as a,r as b,i as c,a as d};
@@ -0,0 +1,17 @@
1
+ import{a as e,b as t,c as n}from"./chunk-C4Z6ZBXV.js";import{f as r,h as i}from"./chunk-2XUEZHIP.js";var a=`!important`,o=t(class extends n{constructor(t){if(super(t),t.type!==e.ATTRIBUTE||t.name!==`style`||t.strings?.length>2||t.strings?.some(e=>e!==``))throw Error("`styleMap` must be the whole of a `style` attribute.");this.shown=new Set}render(){return r}update(e,[t]){let{style:n}=e.element;for(let e of this.shown)t[e]??(this.shown.delete(e),e.includes(`-`)?n.removeProperty(e):n[e]=null);for(let[e,r]of Object.entries(t)){if(r==null)continue;this.shown.add(e);let t=typeof r==`string`&&r.endsWith(a);e.includes(`-`)||t?n.setProperty(e,t?r.slice(0,-a.length):r,t?`important`:``):n[e]=r}return r}}),{I:s}=i,c=e=>e,l=e=>e.strings===void 0,u=()=>document.createComment(``),d=(e,t,n)=>{let r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0)n=new s(r.insertBefore(u(),i),r.insertBefore(u(),i),e,e.options);else{let t=n._$AB.nextSibling,a=n._$AM,o=a!==e;if(o){let t;n._$AQ?.(e),n._$AM=e,n._$AP!==void 0&&(t=e._$AU)!==a._$AU&&n._$AP(t)}if(t!==i||o){let e=n._$AA;for(;e!==t;){let t=c(e).nextSibling;c(r).insertBefore(e,i),e=t}}}return n},f=(e,t,n=e)=>(e._$AI(t,n),e),p={},m=(e,t=p)=>e._$AH=t,h=e=>e._$AH,g=e=>{e._$AR(),e._$AA.remove()},_=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},v=t(class extends n{constructor(t){if(super(t),t.type!==e.CHILD)throw Error(`repeat() can only be used in text expressions`)}dt(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(e,[t,n,i]){let a=h(e),{values:o,keys:s}=this.dt(t,n,i);if(!Array.isArray(a))return this.ut=s,o;let c=this.ut??=[],l=[],u,p,v=0,y=a.length-1,b=0,x=o.length-1;for(;v<=y&&b<=x;)if(a[v]===null)v++;else if(a[y]===null)y--;else if(c[v]===s[b])l[b]=f(a[v],o[b]),v++,b++;else if(c[y]===s[x])l[x]=f(a[y],o[x]),y--,x--;else if(c[v]===s[x])l[x]=f(a[v],o[x]),d(e,l[x+1],a[v]),v++,x--;else if(c[y]===s[b])l[b]=f(a[y],o[b]),d(e,a[v],a[y]),y--,b++;else if(u===void 0&&(u=_(s,b,x),p=_(c,v,y)),u.has(c[v])){if(u.has(c[y])){let t=p.get(s[b]),n=t===void 0?null:a[t];if(n===null){let t=d(e,a[v]);f(t,o[b]),l[b]=t}else l[b]=f(n,o[b]),d(e,a[v],n),a[t]=null;b++}else g(a[y]),y--}else g(a[v]),v++;for(;b<=x;){let t=d(e,l[x+1]);f(t,o[b]),l[b++]=t}for(;v<=y;){let e=a[v++];e!==null&&g(e)}return this.ut=s,m(e,l),r}});export{o as a,l as b,m as c,v as d};
2
+ /*! Bundled license information:
3
+
4
+ lit-html/directive-helpers.js:
5
+ (**
6
+ * @license
7
+ * Copyright 2020 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ *)
10
+
11
+ lit-html/directives/repeat.js:
12
+ (**
13
+ * @license
14
+ * Copyright 2017 Google LLC
15
+ * SPDX-License-Identifier: BSD-3-Clause
16
+ *)
17
+ */
@@ -0,0 +1 @@
1
+ var{Buffer:e}=globalThis,t=e&&!e.TYPED_ARRAY_SUPPORT,n=new Uint8Array(Uint16Array.of(258).buffer)[0]===2,r=e=>e&&(t||`${e}`.includes(`[native code]`));!t&&r(()=>{})&&(r=()=>!1);function i(e,t,n,r){let i=``,a=t;for(let t=n-3;a<t;a+=4){let t=e[a],n=e[a+1],o=e[a+2],s=e[a+3];i+=r[t],i+=r[n],i+=r[o],i+=r[s]}for(;a<n;)i+=r[e[a++]];return i}function a(e,t){let n=e.length;for(let r=0;r<n;r++)t[r]=e.charCodeAt(r);return t}var o=null,s=!1,c=!1,l=new TextEncoder,u=new TextDecoder(`utf-8`,{ignoreBOM:!0}),d=new TextDecoder(`latin1`,{ignoreBOM:!0});function f(e,t,n,r){if(n-t>3e4){let a=[];for(let o=t;o<n;){let t=o+500,s=t>n?n:t;a.push(i(e,o,s,r)),o=s}let o=a.join(``);return a.length=0,o}return i(e,t,n,r)}var p=globalThis.Buffer;function m(e){if(!(e&&e instanceof Uint8Array))throw TypeError(`Expected an Uint8Array`)}var h=`Input is not a string`,g=`Input is not well-formed Unicode`;function _(e,t){switch(t){case`uint8`:if(e.constructor!==Uint8Array)throw Error(`Unexpected`);return e;case`arraybuffer`:if(e.byteLength!==e.buffer.byteLength)throw Error(`Unexpected`);return e.buffer;case`buffer`:return e.length<=64?p.from(e):p.from(e.buffer,e.byteOffset,e.byteLength)}throw TypeError(`Unexpected format`)}function v(e,t){switch(t){case`uint8`:return e.length<=64||e.byteOffset!==0||e.byteLength!==e.buffer.byteLength?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength);case`arraybuffer`:return e.buffer.byteLength===e.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);case`buffer`:if(e.constructor!==p)throw Error(`Unexpected`);return e}throw TypeError(`Unexpected format`)}export{n as a,a as b,o as c,s as d,c as e,l as f,u as g,d as h,f as i,m as j,h as k,g as l,_ as m,v as n};