pkgviz 0.7.7 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -1
- package/.next/build-manifest.json +15 -24
- package/.next/fallback-build-manifest.json +15 -0
- package/.next/images-manifest.json +14 -3
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +52 -16
- package/.next/required-server-files.js +349 -0
- package/.next/required-server-files.json +106 -75
- package/.next/routes-manifest.json +16 -6
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +20 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +9 -0
- package/.next/server/app/_global-error/page.js.map +5 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +22 -0
- package/.next/server/app/_global-error.rsc +15 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +20 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +20 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +13 -2
- package/.next/server/app/_not-found/page.js.map +5 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.meta +19 -0
- package/.next/server/app/_not-found.rsc +18 -19
- package/.next/server/app/_not-found.segments/_full.segment.rsc +18 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +24 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
- package/.next/server/app/favicon.ico/route/build-manifest.json +12 -0
- package/.next/server/app/favicon.ico/route.js +6 -1
- package/.next/server/app/favicon.ico/route.js.map +5 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +20 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +93 -0
- package/.next/server/app/page.js +16 -13
- package/.next/server/app/page.js.map +5 -0
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +3 -1
- package/.next/server/app-paths-manifest.json +2 -1
- package/.next/server/chunks/[externals]__0l8ei7u._.js +3 -0
- package/.next/server/chunks/[externals]__0l8ei7u._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1to-yfd._.js +160 -0
- package/.next/server/chunks/[root-of-the-server]__1to-yfd._.js.map +1 -0
- package/.next/server/chunks/[turbopack]_runtime.js +807 -0
- package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjls.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjls.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0agsrep._.js +28 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0agsrep._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0f_e7c8._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0f_e7c8._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0yqn68e._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0yqn68e._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__112mz-6._.js +14 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__112mz-6._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__11_76b7._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__11_76b7._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12ovu0c._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12ovu0c._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16pmw__._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__16pmw__._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1f2jx51._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1f2jx51._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rn09vt._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rn09vt._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__20e4gkp._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__20e4gkp._.js.map +1 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +807 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
- package/.next/server/chunks/ssr/_1acy_2s._.js +158 -0
- package/.next/server/chunks/ssr/_1acy_2s._.js.map +1 -0
- package/.next/server/chunks/ssr/_1rh2tf9._.js +367 -0
- package/.next/server/chunks/ssr/_1rh2tf9._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_01xbj_9._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1c5ky4f._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1c5ky4f._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_loading_tsx_01g_-m0._.js +3 -0
- package/.next/server/chunks/ssr/src_app_loading_tsx_01g_-m0._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +24 -1
- package/.next/server/middleware-manifest.json +2 -2
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +15 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages-manifest.json +2 -4
- package/.next/server/prefetch-hints.json +25 -0
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +94 -1
- package/.next/static/chunks/19mx3mg6lkumu.js +1 -0
- package/.next/static/chunks/1las_6j17xa9p.js +1 -0
- package/.next/static/chunks/1xk6snnh6e5_j.css +3 -0
- package/.next/static/chunks/2-rtuqsgzmno4.js +22 -0
- package/.next/static/chunks/27t_qfc-3_lzs.js +1 -0
- package/.next/static/chunks/2sswp23h6zh08.js +345 -0
- package/.next/static/chunks/310vm2bl3xxpt.js +31 -0
- package/.next/static/chunks/3fntmmi971322.js +1 -0
- package/.next/static/chunks/turbopack-1b6uko1cu_h42.js +1 -0
- package/.next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- package/.next/static/media/favicon.2246eezznj2ab.ico +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- package/.next/static/rjdzHqzPw2GCNhDbjcu0-/_buildManifest.js +11 -0
- package/.next/static/rjdzHqzPw2GCNhDbjcu0-/_clientMiddlewareManifest.js +1 -0
- package/README.md +176 -4
- package/bin/pkgviz.ts +57 -29
- package/package.json +57 -36
- package/src/app/actions/audit.actions.ts +7 -49
- package/src/app/globals.css +0 -2
- package/src/app/layout.tsx +3 -2
- package/src/app/loading.tsx +8 -0
- package/src/app/page.tsx +16 -2
- package/src/app/utils/buildGraph.ts +99 -100
- package/src/app/utils/getParsedFileStructure.ts +128 -54
- package/src/app/utils/inspectParserLanguageAsync.ts +39 -0
- package/src/app/utils/markCyclicPackages.ts +45 -185
- package/src/app/utils/parser/cpp/parseCppFile.ts +68 -86
- package/src/app/utils/parser/delphi/parseFile.ts +36 -120
- package/src/app/utils/parser/java/findEntryPoint.ts +2 -1
- package/src/app/utils/parser/java/parseJavaFile.ts +33 -45
- package/src/app/utils/parser/kotlin/parseFile.ts +34 -87
- package/src/app/utils/parser/python/parseFile.ts +30 -100
- package/src/app/utils/parser/typescript/parseFile.ts +17 -52
- package/src/app/utils/selectParserLanguage.ts +39 -0
- package/src/cli/formatAuditRuleFailures.ts +21 -0
- package/src/cli/runAuditAsync.ts +41 -0
- package/src/components/Breadcrumb.tsx +5 -4
- package/src/components/ExportPanel.tsx +53 -0
- package/src/components/Header.tsx +1 -0
- package/src/components/Loader.tsx +8 -2
- package/src/components/ProjectLoadError.tsx +15 -0
- package/src/components/SettingsPanel.tsx +184 -0
- package/src/components/Switch.tsx +9 -17
- package/src/components/ThemeToggle.tsx +2 -1
- package/src/components/ToggleSwitch.tsx +36 -0
- package/src/components/sidebar/Sidebar.tsx +14 -0
- package/src/components/sidebar/SidebarBadge.tsx +25 -0
- package/src/components/sidebar/SidebarRow.tsx +14 -0
- package/src/components/sidebar/SidebarSection.tsx +16 -0
- package/src/components/sidebar/SidebarTabs.tsx +58 -0
- package/src/contexts/SettingsContext.tsx +19 -20
- package/src/features/audit/adapters/inbound/react/AuditRuleList.tsx +76 -0
- package/src/features/audit/adapters/inbound/react/AuditRulePanel.tsx +30 -0
- package/src/features/audit/adapters/inbound/react/CycleInspector.tsx +116 -0
- package/src/features/audit/adapters/inbound/react/CyclicDependenciesRuleDetails.tsx +124 -0
- package/src/features/audit/adapters/inbound/react/useCycleSelection.ts +47 -0
- package/src/features/audit/application/use-cases/createAuditFromSnapshot.ts +28 -0
- package/src/features/audit/application/use-cases/resolveSelectedCycleIds.ts +18 -0
- package/src/features/audit/composition/createAuditAsync.ts +11 -0
- package/src/features/audit/domain/evaluateAuditRules.ts +42 -0
- package/src/features/audit/domain/hasBlockingAuditRuleFailure.ts +6 -0
- package/src/features/audit/domain/resolveAuditConfiguration.ts +27 -0
- package/src/features/audit/utils/cycleVisualization.ts +86 -0
- package/src/features/dependency-analysis/adapters/outbound/dependency-graph/analyzeDependencyImportsAsync.ts +172 -0
- package/src/features/dependency-analysis/adapters/outbound/dependency-graph/analyzeTypeScriptImportsAsync.ts +6 -0
- package/src/features/graph-view/adapters/inbound/react/DependencyGraphView.tsx +184 -0
- package/src/features/graph-view/adapters/inbound/react/GraphZoomControls.tsx +48 -0
- package/src/features/graph-view/adapters/inbound/react/applyGraphInteractionPresentation.ts +35 -0
- package/src/features/graph-view/adapters/inbound/react/createGraphViewModel.ts +240 -0
- package/src/features/graph-view/adapters/inbound/react/createGraphViewStyles.ts +37 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphFocus.ts +104 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphInteractions.ts +50 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphProjection.ts +71 -0
- package/src/features/graph-view/adapters/inbound/react/useGraphViewport.ts +48 -0
- package/src/features/graph-view/domain/getDependencyHighlightClasses.ts +39 -0
- package/src/features/graph-view/domain/reduceGraphInteraction.ts +23 -0
- package/src/features/graph-view/utils/createCompoundOpacityIndex.ts +38 -0
- package/src/features/graph-view/utils/projectVisibleGraph.ts +94 -0
- package/src/features/graph-view/utils/readNodeDefinitionId.ts +7 -0
- package/src/features/graph-view/utils/removeEmptyStructuralNodes.ts +27 -0
- package/src/features/project-analysis/adapters/outbound/filesystem/readProjectSnapshotAsync.ts +12 -0
- package/src/features/project-analysis/application/use-cases/createProjectSnapshotReader.ts +29 -0
- package/src/features/project-analysis/composition/loadProjectOverviewAsync.ts +14 -0
- package/src/features/project-analysis/composition/loadProjectSnapshotAsync.ts +12 -0
- package/src/features/project-tree/adapters/inbound/react/ProjectTreePanel.tsx +52 -0
- package/src/features/project-tree/adapters/inbound/react/useProjectTreeExpansion.ts +46 -0
- package/src/features/project-tree/application/use-cases/buildProjectTree.ts +61 -0
- package/src/features/project-tree/application/use-cases/resolveProjectTreeNavigation.ts +13 -0
- package/src/features/project-tree/utils/findProjectTreeNode.ts +14 -0
- package/src/features/project-tree/utils/findProjectTreeNodeByGraphPackage.ts +21 -0
- package/src/features/project-tree/utils/getProjectTreeAncestorIds.ts +26 -0
- package/src/features/settings/utils/readSettingsEnvironment.ts +53 -0
- package/src/i18n/en.ts +21 -2
- package/src/i18n/i18n.ts +2 -3
- package/src/layouts/breadthfirst/style.ts +1 -0
- package/src/layouts/circle/style.ts +1 -0
- package/src/layouts/concentric/style.ts +1 -0
- package/src/layouts/elk/layout.ts +1 -3
- package/src/layouts/elk/style.ts +1 -0
- package/src/layouts/getWeightBuckets.ts +3 -1
- package/src/layouts/grid/style.ts +1 -0
- package/src/layouts/index.ts +0 -4
- package/src/layouts/style.ts +172 -25
- package/src/screens/home/Home.tsx +73 -25
- package/src/screens/home/HomeGraph.tsx +43 -0
- package/src/screens/home/HomeSidebar.tsx +129 -0
- package/src/shared/types/index.ts +0 -9
- package/src/shared/utils/getProjectName.ts +4 -1
- package/src/shared/utils/parseProjectPath.ts +1 -0
- package/src/shared/utils/toPosix.ts +1 -1
- package/src/types/audit.ts +76 -0
- package/src/types/auditVisualization.ts +22 -0
- package/src/types/graphInteraction.ts +9 -0
- package/src/types/parserSelection.ts +11 -0
- package/src/types/projectAnalysis.ts +20 -0
- package/src/types/projectAnalysisActionResult.ts +2 -0
- package/src/types/projectTree.ts +7 -0
- package/src/utils/filter/filterByPackagePrefix.ts +25 -7
- package/src/utils/filter/filterEmptyPackages.ts +28 -29
- package/src/utils/filter/filterSubPackagesFromDepth.ts +20 -17
- package/src/utils/filter/filterVendorPackages.ts +1 -1
- package/src/utils/filter/isIntrinsicGraphNode.ts +8 -0
- package/src/utils/filter/toggleCompoundNodes.ts +41 -31
- package/src/utils/runProjectAnalysisActionAsync.ts +14 -0
- package/tsconfig.json +11 -3
- package/.next/app-build-manifest.json +0 -29
- package/.next/cache/.previewinfo +0 -1
- package/.next/cache/.rscinfo +0 -1
- package/.next/cache/.tsbuildinfo +0 -1
- package/.next/cache/chrome-devtools-workspace-uuid +0 -1
- package/.next/cache/eslint/.cache_6t30dc +0 -1
- package/.next/cache/webpack/client-production/0.pack +0 -4
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/10.pack +0 -0
- package/.next/cache/webpack/client-production/11.pack +0 -0
- package/.next/cache/webpack/client-production/12.pack +0 -0
- package/.next/cache/webpack/client-production/13.pack +0 -0
- package/.next/cache/webpack/client-production/14.pack +0 -0
- package/.next/cache/webpack/client-production/15.pack +0 -0
- package/.next/cache/webpack/client-production/16.pack +0 -0
- package/.next/cache/webpack/client-production/2.pack +0 -0
- package/.next/cache/webpack/client-production/3.pack +0 -0
- package/.next/cache/webpack/client-production/4.pack +0 -0
- package/.next/cache/webpack/client-production/5.pack +0 -0
- package/.next/cache/webpack/client-production/6.pack +0 -0
- package/.next/cache/webpack/client-production/7.pack +0 -0
- package/.next/cache/webpack/client-production/8.pack +0 -0
- package/.next/cache/webpack/client-production/9.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/1.pack +0 -0
- package/.next/cache/webpack/server-production/10.pack +0 -4
- package/.next/cache/webpack/server-production/11.pack +0 -0
- package/.next/cache/webpack/server-production/12.pack +0 -0
- package/.next/cache/webpack/server-production/13.pack +0 -0
- package/.next/cache/webpack/server-production/14.pack +0 -0
- package/.next/cache/webpack/server-production/15.pack +0 -0
- package/.next/cache/webpack/server-production/16.pack +0 -0
- package/.next/cache/webpack/server-production/17.pack +0 -0
- package/.next/cache/webpack/server-production/18.pack +0 -4
- package/.next/cache/webpack/server-production/2.pack +0 -0
- package/.next/cache/webpack/server-production/3.pack +0 -0
- package/.next/cache/webpack/server-production/4.pack +0 -0
- package/.next/cache/webpack/server-production/5.pack +0 -0
- package/.next/cache/webpack/server-production/6.pack +0 -0
- package/.next/cache/webpack/server-production/7.pack +0 -0
- package/.next/cache/webpack/server-production/8.pack +0 -0
- package/.next/cache/webpack/server-production/9.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/.next/diagnostics/build-diagnostics.json +0 -6
- package/.next/diagnostics/framework.json +0 -1
- package/.next/server/app/index.html +0 -1
- package/.next/server/app/index.meta +0 -7
- package/.next/server/app/index.rsc +0 -20
- package/.next/server/chunks/548.js +0 -6
- package/.next/server/chunks/610.js +0 -7
- package/.next/server/chunks/985.js +0 -22
- package/.next/server/middleware-react-loadable-manifest.js +0 -1
- package/.next/server/pages/_app.js +0 -1
- package/.next/server/pages/_app.js.nft.json +0 -1
- package/.next/server/pages/_document.js +0 -1
- package/.next/server/pages/_document.js.nft.json +0 -1
- package/.next/server/pages/_error.js +0 -19
- package/.next/server/pages/_error.js.nft.json +0 -1
- package/.next/server/webpack-runtime.js +0 -1
- package/.next/static/_YC2p40ZiYT2Gcw-h_tjC/_buildManifest.js +0 -1
- package/.next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js +0 -1
- package/.next/static/chunks/680-55ad17895c8fb70b.js +0 -1
- package/.next/static/chunks/90542734-29e255269788f1bd.js +0 -1
- package/.next/static/chunks/91dbc596-b9cdccd3f5cba95d.js +0 -1
- package/.next/static/chunks/964-b440f7af22c41ca5.js +0 -1
- package/.next/static/chunks/app/_not-found/page-11e4fea8e290f304.js +0 -1
- package/.next/static/chunks/app/layout-8aae7fba5ed8afb3.js +0 -1
- package/.next/static/chunks/app/page-91450b1230da8bca.js +0 -1
- package/.next/static/chunks/framework-bc35dade6ff9684e.js +0 -1
- package/.next/static/chunks/main-9e86d333c1e02dd1.js +0 -1
- package/.next/static/chunks/main-app-69a9ff75ff3465ca.js +0 -1
- package/.next/static/chunks/pages/_app-0a0020ddd67f79cf.js +0 -1
- package/.next/static/chunks/pages/_error-03529f2c21436739.js +0 -1
- package/.next/static/chunks/webpack-7adfafc806738767.js +0 -1
- package/.next/static/css/ec31779168107a11.css +0 -3
- package/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/.next/static/media/747892c23ea88013-s.woff2 +0 -0
- package/.next/static/media/8d697b304b401681-s.woff2 +0 -0
- package/.next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
- package/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
- package/.next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
- package/.next/trace +0 -2
- package/.next/types/app/layout.ts +0 -84
- package/.next/types/app/page.ts +0 -84
- package/.next/types/cache-life.d.ts +0 -141
- package/.next/types/package.json +0 -1
- package/src/app/actions/graph.actions.ts +0 -25
- package/src/app/utils/parser/cpp/extractCppPackageFromImport.ts +0 -18
- package/src/app/utils/parser/delphi/extractPackageFromImport.ts +0 -21
- package/src/app/utils/parser/java/extractJavaPackageFromImport.ts +0 -39
- package/src/app/utils/parser/java/getIntrinsicPackagesRecursive.ts +0 -33
- package/src/app/utils/parser/kotlin/extractPackageFromImport.ts +0 -19
- package/src/app/utils/parser/python/extractPythonPackageFromImport.ts +0 -18
- package/src/app/utils/parser/typescript/extractTypeScriptPackageFromImport.ts +0 -18
- package/src/components/Cytoscape.tsx +0 -23
- package/src/components/Setting.tsx +0 -17
- package/src/components/Settings.tsx +0 -189
- package/src/components/ZoomInput.tsx +0 -94
- package/src/components/useCytoscape.ts +0 -343
- package/src/layouts/getLayoutStyle.ts +0 -19
- package/src/shared/utils/detectLanguage.ts +0 -255
- package/src/shared/utils/getJsonAsync.ts +0 -13
- package/src/shared/utils/parseEnv.ts +0 -91
- package/src/store/useLocalStorage.ts +0 -29
- package/src/utils/hasChildren.ts +0 -7
- /package/.next/{react-loadable-manifest.json → server/app/_global-error/page/react-loadable-manifest.json} +0 -0
- /package/.next/static/chunks/{polyfills-42372ed130431b0a.js → 0cz1d0mv5g_q7.js} +0 -0
- /package/.next/static/{_YC2p40ZiYT2Gcw-h_tjC → rjdzHqzPw2GCNhDbjcu0-}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/yaml/dist/nodes/identity.js","../../../../node_modules/yaml/dist/visit.js","../../../../node_modules/yaml/dist/doc/directives.js","../../../../node_modules/yaml/dist/doc/anchors.js","../../../../node_modules/yaml/dist/doc/applyReviver.js","../../../../node_modules/yaml/dist/nodes/toJS.js","../../../../node_modules/yaml/dist/nodes/Node.js","../../../../node_modules/yaml/dist/nodes/Alias.js","../../../../node_modules/yaml/dist/nodes/Scalar.js","../../../../node_modules/yaml/dist/doc/createNode.js","../../../../node_modules/yaml/dist/nodes/Collection.js","../../../../node_modules/yaml/dist/stringify/stringifyComment.js","../../../../node_modules/yaml/dist/stringify/foldFlowLines.js","../../../../node_modules/yaml/dist/stringify/stringifyString.js","../../../../node_modules/yaml/dist/stringify/stringify.js","../../../../node_modules/yaml/dist/stringify/stringifyPair.js","../../../../node_modules/yaml/dist/log.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/merge.js","../../../../node_modules/yaml/dist/nodes/addPairToJSMap.js","../../../../node_modules/yaml/dist/nodes/Pair.js","../../../../node_modules/yaml/dist/stringify/stringifyCollection.js","../../../../node_modules/yaml/dist/nodes/YAMLMap.js","../../../../node_modules/yaml/dist/schema/common/map.js","../../../../node_modules/yaml/dist/nodes/YAMLSeq.js","../../../../node_modules/yaml/dist/schema/common/seq.js","../../../../node_modules/yaml/dist/schema/common/string.js","../../../../node_modules/yaml/dist/schema/common/null.js","../../../../node_modules/yaml/dist/schema/core/bool.js","../../../../node_modules/yaml/dist/stringify/stringifyNumber.js","../../../../node_modules/yaml/dist/schema/core/float.js","../../../../node_modules/yaml/dist/schema/core/int.js","../../../../node_modules/yaml/dist/schema/core/schema.js","../../../../node_modules/yaml/dist/schema/json/schema.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/binary.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/pairs.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/omap.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/bool.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/float.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/int.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/set.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js","../../../../node_modules/yaml/dist/schema/yaml-1.1/schema.js","../../../../node_modules/yaml/dist/schema/tags.js","../../../../node_modules/yaml/dist/schema/Schema.js","../../../../node_modules/yaml/dist/stringify/stringifyDocument.js","../../../../node_modules/yaml/dist/doc/Document.js","../../../../node_modules/yaml/dist/errors.js","../../../../node_modules/yaml/dist/compose/resolve-props.js","../../../../node_modules/yaml/dist/compose/util-contains-newline.js","../../../../node_modules/yaml/dist/compose/util-flow-indent-check.js","../../../../node_modules/yaml/dist/compose/util-map-includes.js","../../../../node_modules/yaml/dist/compose/resolve-block-map.js","../../../../node_modules/yaml/dist/compose/resolve-block-seq.js","../../../../node_modules/yaml/dist/compose/resolve-end.js","../../../../node_modules/yaml/dist/compose/resolve-flow-collection.js","../../../../node_modules/yaml/dist/compose/compose-collection.js","../../../../node_modules/yaml/dist/compose/resolve-block-scalar.js","../../../../node_modules/yaml/dist/compose/resolve-flow-scalar.js","../../../../node_modules/yaml/dist/compose/compose-scalar.js","../../../../node_modules/yaml/dist/compose/util-empty-scalar-position.js","../../../../node_modules/yaml/dist/compose/compose-node.js","../../../../node_modules/yaml/dist/compose/compose-doc.js","../../../../node_modules/yaml/dist/compose/composer.js","../../../../node_modules/yaml/dist/parse/cst-scalar.js","../../../../node_modules/yaml/dist/parse/cst-stringify.js","../../../../node_modules/yaml/dist/parse/cst-visit.js","../../../../node_modules/yaml/dist/parse/cst.js","../../../../node_modules/yaml/dist/parse/lexer.js","../../../../node_modules/yaml/dist/parse/line-counter.js","../../../../node_modules/yaml/dist/parse/parser.js","../../../../node_modules/yaml/dist/public-api.js","../../../../node_modules/yaml/dist/index.js","../../../../node_modules/%40ankhorage/utility/src/node/fs/readTextFileWithinRoot.ts","../../../../node_modules/%40ankhorage/utility/src/node/fs/readDirectoryWithinRoot.ts","../../../../node_modules/%40ankhorage/utility/src/node/fs/resolveFileSystemPathWithinRoot.ts","../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../src/app/utils/getParsedFileStructure.ts","../../../../src/app/utils/inspectParserLanguageAsync.ts","../../../../src/app/utils/selectParserLanguage.ts","../../../../node_modules/%40ankhorage/graph/src/features/graph/domain/createGraph.ts","../../../../node_modules/%40ankhorage/graph/src/features/graph/domain/findCyclePath.ts","../../../../node_modules/%40ankhorage/graph/src/features/graph/domain/findCyclicComponents.ts","../../../../node_modules/%40ankhorage/graph/src/features/graph/domain/findStronglyConnectedComponents.ts","../../../../node_modules/%40ankhorage/graph/src/features/graph/domain/reverseGraph.ts","../../../../src/app/utils/markCyclicPackages.ts","../../../../src/features/audit/domain/resolveAuditConfiguration.ts","../../../../src/features/audit/domain/evaluateAuditRules.ts","../../../../src/app/utils/parser/typescript/parseFile.ts","../../../../node_modules/minimatch/src/assert-valid-pattern.ts","../../../../node_modules/balanced-match/src/index.ts","../../../../node_modules/minimatch/src/index.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/typescript/extractTypeScriptImports.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/cpp/collectCppFilesAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/python/collectPythonFilesAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/typescript/collectTypeScriptFilesAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/delphi/collectDelphiFilesAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/kotlin/collectKotlinFilesAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/java/collectJavaFilesAsync.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/inspection/adapters/outbound/readSnapshotAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/delphi/delphiPackageForFile.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/inspection/domain/readPackageMetadata.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/kotlin/analyzeKotlinProjectAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/java/analyzeJavaProjectAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/python/pythonPackageForFile.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/delphi/analyzeDelphiProjectAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/python/analyzePythonProjectAsync.ts","../../../../node_modules/brace-expansion/src/index.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/typescript/modulePathForFile.ts","../../../../node_modules/%40ankhorage/dependency-graph/node_modules/%40ankhorage/utility/src/node/path/toPortablePath.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/cpp/analyzeCppProjectAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/typescript/resolveTypeScriptImport.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/typescript/analyzeTypeScriptProjectAsync.ts","../../../../node_modules/%40ankhorage/project-detector/node_modules/%40ankhorage/utility/src/node/path/toPortablePath.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/domain/readDependencyDeclarationsAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/application/createDependencyGraphAsync.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/inspection/adapters/outbound/readManifestAsync.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/detection/application/detectProject.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/inspection/domain/inspectWorkspaces.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/inspection/application/inspectWithPortAsync.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/detection/domain/summarizeDetection.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/java/javaDependencyGraphAnalyzer.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/cpp/cppDependencyGraphAnalyzer.ts","../../../../src/app/utils/parser/cpp/parseCppFile.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/detection/constants/fileRules.ts","../../../../node_modules/%40ankhorage/project-detector/node_modules/%40ankhorage/utility/src/object/isRecord.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/detection/domain/detectMetadata.ts","../../../../node_modules/%40ankhorage/project-detector/node_modules/%40ankhorage/utility/src/error/toErrorMessage.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/java/extractJavaPackageFromImport.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/cpp/extractCppPackageFromInclude.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/python/extractPythonPackageFromImport.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/inspection/composition/inspectProjectAsync.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/kotlin/kotlinDependencyGraphAnalyzer.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/python/pythonDependencyGraphAnalyzer.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/delphi/delphiDependencyGraphAnalyzer.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/detection/domain/detectFiles.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/typescript/typescriptDependencyGraphAnalyzer.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/typescript/createTypeScriptModuleNodes.ts","../../../../node_modules/%40ankhorage/utility/src/regex/escapeRegExp.ts","../../../../node_modules/%40ankhorage/dependency-graph/node_modules/%40ankhorage/graph/src/features/graph/domain/createGraph.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/kotlin/extractKotlinDependencies.ts","../../../../node_modules/minimatch/src/ast.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/kotlin/extractKotlinPackageFromImport.ts","../../../../node_modules/%40ankhorage/project-detector/node_modules/%40ankhorage/utility/src/array/isStringArray.ts","../../../../node_modules/%40ankhorage/dependency-graph/node_modules/%40ankhorage/utility/src/object/isRecord.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/cpp/extractCppDependencies.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/delphi/extractDelphiDependencies.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/java/extractJavaDependencies.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/adapters/outbound/python/extractPythonDependencies.ts","../../../../src/shared/constants/index.ts","../../../../src/shared/types/index.ts","../../../../src/app/utils/parser/kotlin/parseFile.ts","../../../../src/app/utils/parser/delphi/parseFile.ts","../../../../src/app/utils/parser/python/parseFile.ts","../../../../src/features/dependency-analysis/adapters/outbound/dependency-graph/analyzeDependencyImportsAsync.ts","../../../../src/app/utils/parser/java/parseJavaFile.ts","../../../../node_modules/%40ankhorage/dependency-graph/src/features/dependency-analysis/domain/createFocusPackageNode.ts","../../../../node_modules/minimatch/src/escape.ts","../../../../node_modules/minimatch/src/unescape.ts","../../../../node_modules/%40ankhorage/project-detector/src/features/inspection/constants/scanPolicy.ts","../../../../node_modules/minimatch/src/brace-expressions.ts","../../../../src/shared/utils/getProjectName.ts","../../../../src/features/audit/application/use-cases/createAuditFromSnapshot.ts","../../../../node_modules/%40ankhorage/graph-cytoscape/src/features/elementConversion/adapters/outbound/toCytoscapeElements.ts","../../../../src/app/utils/buildGraph.ts","../../../../src/features/project-analysis/composition/loadProjectSnapshotAsync.ts","../../../../src/features/project-analysis/adapters/outbound/filesystem/readProjectSnapshotAsync.ts","../../../../src/features/project-analysis/application/use-cases/createProjectSnapshotReader.ts","../../../../src/shared/utils/parseProjectPath.ts","../../../../src/shared/utils/toPosix.ts"],"sourcesContent":["'use strict';\n\nconst ALIAS = Symbol.for('yaml.alias');\nconst DOC = Symbol.for('yaml.document');\nconst MAP = Symbol.for('yaml.map');\nconst PAIR = Symbol.for('yaml.pair');\nconst SCALAR = Symbol.for('yaml.scalar');\nconst SEQ = Symbol.for('yaml.seq');\nconst NODE_TYPE = Symbol.for('yaml.node.type');\nconst isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;\nconst isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;\nconst isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;\nconst isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;\nconst isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;\nconst isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;\nfunction isCollection(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case MAP:\n case SEQ:\n return true;\n }\n return false;\n}\nfunction isNode(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case ALIAS:\n case MAP:\n case SCALAR:\n case SEQ:\n return true;\n }\n return false;\n}\nconst hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n\nexports.ALIAS = ALIAS;\nexports.DOC = DOC;\nexports.MAP = MAP;\nexports.NODE_TYPE = NODE_TYPE;\nexports.PAIR = PAIR;\nexports.SCALAR = SCALAR;\nexports.SEQ = SEQ;\nexports.hasAnchor = hasAnchor;\nexports.isAlias = isAlias;\nexports.isCollection = isCollection;\nexports.isDocument = isDocument;\nexports.isMap = isMap;\nexports.isNode = isNode;\nexports.isPair = isPair;\nexports.isScalar = isScalar;\nexports.isSeq = isSeq;\n","'use strict';\n\nvar identity = require('./nodes/identity.js');\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove node');\n/**\n * Apply a visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nfunction visit(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n visit_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisit.SKIP = SKIP;\n/** Remove the current node */\nvisit.REMOVE = REMOVE;\nfunction visit_(key, node, visitor, path) {\n const ctrl = callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visit_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = visit_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = visit_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = visit_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\n/**\n * Apply an async visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `Promise`: Must resolve to one of the following values\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nasync function visitAsync(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if (identity.isDocument(node)) {\n const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n await visitAsync_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisitAsync.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisitAsync.SKIP = SKIP;\n/** Remove the current node */\nvisitAsync.REMOVE = REMOVE;\nasync function visitAsync_(key, node, visitor, path) {\n const ctrl = await callVisitor(key, node, visitor, path);\n if (identity.isNode(ctrl) || identity.isPair(ctrl)) {\n replaceNode(key, path, ctrl);\n return visitAsync_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if (identity.isCollection(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = await visitAsync_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if (identity.isPair(node)) {\n path = Object.freeze(path.concat(node));\n const ck = await visitAsync_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = await visitAsync_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\nfunction initVisitor(visitor) {\n if (typeof visitor === 'object' &&\n (visitor.Collection || visitor.Node || visitor.Value)) {\n return Object.assign({\n Alias: visitor.Node,\n Map: visitor.Node,\n Scalar: visitor.Node,\n Seq: visitor.Node\n }, visitor.Value && {\n Map: visitor.Value,\n Scalar: visitor.Value,\n Seq: visitor.Value\n }, visitor.Collection && {\n Map: visitor.Collection,\n Seq: visitor.Collection\n }, visitor);\n }\n return visitor;\n}\nfunction callVisitor(key, node, visitor, path) {\n if (typeof visitor === 'function')\n return visitor(key, node, path);\n if (identity.isMap(node))\n return visitor.Map?.(key, node, path);\n if (identity.isSeq(node))\n return visitor.Seq?.(key, node, path);\n if (identity.isPair(node))\n return visitor.Pair?.(key, node, path);\n if (identity.isScalar(node))\n return visitor.Scalar?.(key, node, path);\n if (identity.isAlias(node))\n return visitor.Alias?.(key, node, path);\n return undefined;\n}\nfunction replaceNode(key, path, node) {\n const parent = path[path.length - 1];\n if (identity.isCollection(parent)) {\n parent.items[key] = node;\n }\n else if (identity.isPair(parent)) {\n if (key === 'key')\n parent.key = node;\n else\n parent.value = node;\n }\n else if (identity.isDocument(parent)) {\n parent.contents = node;\n }\n else {\n const pt = identity.isAlias(parent) ? 'alias' : 'scalar';\n throw new Error(`Cannot replace node with ${pt} parent`);\n }\n}\n\nexports.visit = visit;\nexports.visitAsync = visitAsync;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\nconst escapeChars = {\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n};\nconst escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, ch => escapeChars[ch]);\nclass Directives {\n constructor(yaml, tags) {\n /**\n * The directives-end/doc-start marker `---`. If `null`, a marker may still be\n * included in the document's stringified representation.\n */\n this.docStart = null;\n /** The doc-end marker `...`. */\n this.docEnd = false;\n this.yaml = Object.assign({}, Directives.defaultYaml, yaml);\n this.tags = Object.assign({}, Directives.defaultTags, tags);\n }\n clone() {\n const copy = new Directives(this.yaml, this.tags);\n copy.docStart = this.docStart;\n return copy;\n }\n /**\n * During parsing, get a Directives instance for the current document and\n * update the stream state according to the current version's spec.\n */\n atDocument() {\n const res = new Directives(this.yaml, this.tags);\n switch (this.yaml.version) {\n case '1.1':\n this.atNextDocument = true;\n break;\n case '1.2':\n this.atNextDocument = false;\n this.yaml = {\n explicit: Directives.defaultYaml.explicit,\n version: '1.2'\n };\n this.tags = Object.assign({}, Directives.defaultTags);\n break;\n }\n return res;\n }\n /**\n * @param onError - May be called even if the action was successful\n * @returns `true` on success\n */\n add(line, onError) {\n if (this.atNextDocument) {\n this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };\n this.tags = Object.assign({}, Directives.defaultTags);\n this.atNextDocument = false;\n }\n const parts = line.trim().split(/[ \\t]+/);\n const name = parts.shift();\n switch (name) {\n case '%TAG': {\n if (parts.length !== 2) {\n onError(0, '%TAG directive should contain exactly two parts');\n if (parts.length < 2)\n return false;\n }\n const [handle, prefix] = parts;\n this.tags[handle] = prefix;\n return true;\n }\n case '%YAML': {\n this.yaml.explicit = true;\n if (parts.length !== 1) {\n onError(0, '%YAML directive should contain exactly one part');\n return false;\n }\n const [version] = parts;\n if (version === '1.1' || version === '1.2') {\n this.yaml.version = version;\n return true;\n }\n else {\n const isValid = /^\\d+\\.\\d+$/.test(version);\n onError(6, `Unsupported YAML version ${version}`, isValid);\n return false;\n }\n }\n default:\n onError(0, `Unknown directive ${name}`, true);\n return false;\n }\n }\n /**\n * Resolves a tag, matching handles to those defined in %TAG directives.\n *\n * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n * `'!local'` tag, or `null` if unresolvable.\n */\n tagName(source, onError) {\n if (source === '!')\n return '!'; // non-specific tag\n if (source[0] !== '!') {\n onError(`Not a valid tag: ${source}`);\n return null;\n }\n if (source[1] === '<') {\n const verbatim = source.slice(2, -1);\n if (verbatim === '!' || verbatim === '!!') {\n onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n return null;\n }\n if (source[source.length - 1] !== '>')\n onError('Verbatim tags must end with a >');\n return verbatim;\n }\n const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);\n if (!suffix)\n onError(`The ${source} tag has no suffix`);\n const prefix = this.tags[handle];\n if (prefix) {\n try {\n return prefix + decodeURIComponent(suffix);\n }\n catch (error) {\n onError(String(error));\n return null;\n }\n }\n if (handle === '!')\n return source; // local tag\n onError(`Could not resolve tag: ${source}`);\n return null;\n }\n /**\n * Given a fully resolved tag, returns its printable string form,\n * taking into account current tag prefixes and defaults.\n */\n tagString(tag) {\n for (const [handle, prefix] of Object.entries(this.tags)) {\n if (tag.startsWith(prefix))\n return handle + escapeTagName(tag.substring(prefix.length));\n }\n return tag[0] === '!' ? tag : `!<${tag}>`;\n }\n toString(doc) {\n const lines = this.yaml.explicit\n ? [`%YAML ${this.yaml.version || '1.2'}`]\n : [];\n const tagEntries = Object.entries(this.tags);\n let tagNames;\n if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {\n const tags = {};\n visit.visit(doc.contents, (_key, node) => {\n if (identity.isNode(node) && node.tag)\n tags[node.tag] = true;\n });\n tagNames = Object.keys(tags);\n }\n else\n tagNames = [];\n for (const [handle, prefix] of tagEntries) {\n if (handle === '!!' && prefix === 'tag:yaml.org,2002:')\n continue;\n if (!doc || tagNames.some(tn => tn.startsWith(prefix)))\n lines.push(`%TAG ${handle} ${prefix}`);\n }\n return lines.join('\\n');\n }\n}\nDirectives.defaultYaml = { explicit: false, version: '1.2' };\nDirectives.defaultTags = { '!!': 'tag:yaml.org,2002:' };\n\nexports.Directives = Directives;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar visit = require('../visit.js');\n\n/**\n * Verify that the input string is a valid anchor.\n *\n * Will throw on errors.\n */\nfunction anchorIsValid(anchor) {\n if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n const sa = JSON.stringify(anchor);\n const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n throw new Error(msg);\n }\n return true;\n}\nfunction anchorNames(root) {\n const anchors = new Set();\n visit.visit(root, {\n Value(_key, node) {\n if (node.anchor)\n anchors.add(node.anchor);\n }\n });\n return anchors;\n}\n/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */\nfunction findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n}\nfunction createNodeAnchors(doc, prefix) {\n const aliasObjects = [];\n const sourceObjects = new Map();\n let prevAnchors = null;\n return {\n onAnchor: (source) => {\n aliasObjects.push(source);\n prevAnchors ?? (prevAnchors = anchorNames(doc));\n const anchor = findNewAnchor(prefix, prevAnchors);\n prevAnchors.add(anchor);\n return anchor;\n },\n /**\n * With circular references, the source node is only resolved after all\n * of its child nodes are. This is why anchors are set only after all of\n * the nodes have been created.\n */\n setAnchors: () => {\n for (const source of aliasObjects) {\n const ref = sourceObjects.get(source);\n if (typeof ref === 'object' &&\n ref.anchor &&\n (identity.isScalar(ref.node) || identity.isCollection(ref.node))) {\n ref.node.anchor = ref.anchor;\n }\n else {\n const error = new Error('Failed to resolve repeated object (this should not happen)');\n error.source = source;\n throw error;\n }\n }\n },\n sourceObjects\n };\n}\n\nexports.anchorIsValid = anchorIsValid;\nexports.anchorNames = anchorNames;\nexports.createNodeAnchors = createNodeAnchors;\nexports.findNewAnchor = findNewAnchor;\n","'use strict';\n\n/**\n * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,\n * in section 24.5.1.1 \"Runtime Semantics: InternalizeJSONProperty\" of the\n * 2021 edition: https://tc39.es/ecma262/#sec-json.parse\n *\n * Includes extensions for handling Map and Set objects.\n */\nfunction applyReviver(reviver, obj, key, val) {\n if (val && typeof val === 'object') {\n if (Array.isArray(val)) {\n for (let i = 0, len = val.length; i < len; ++i) {\n const v0 = val[i];\n const v1 = applyReviver(reviver, val, String(i), v0);\n // eslint-disable-next-line @typescript-eslint/no-array-delete\n if (v1 === undefined)\n delete val[i];\n else if (v1 !== v0)\n val[i] = v1;\n }\n }\n else if (val instanceof Map) {\n for (const k of Array.from(val.keys())) {\n const v0 = val.get(k);\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n val.delete(k);\n else if (v1 !== v0)\n val.set(k, v1);\n }\n }\n else if (val instanceof Set) {\n for (const v0 of Array.from(val)) {\n const v1 = applyReviver(reviver, val, v0, v0);\n if (v1 === undefined)\n val.delete(v0);\n else if (v1 !== v0) {\n val.delete(v0);\n val.add(v1);\n }\n }\n }\n else {\n for (const [k, v0] of Object.entries(val)) {\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n delete val[k];\n else if (v1 !== v0)\n val[k] = v1;\n }\n }\n }\n return reviver.call(obj, key, val);\n}\n\nexports.applyReviver = applyReviver;\n","'use strict';\n\nvar identity = require('./identity.js');\n\n/**\n * Recursively convert any node or its contents to native JavaScript\n *\n * @param value - The input value\n * @param arg - If `value` defines a `toJSON()` method, use this\n * as its first argument\n * @param ctx - Conversion context, originally set in Document#toJS(). If\n * `{ keep: true }` is not set, output should be suitable for JSON\n * stringification.\n */\nfunction toJS(value, arg, ctx) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (Array.isArray(value))\n return value.map((v, i) => toJS(v, String(i), ctx));\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (!ctx || !identity.hasAnchor(value))\n return value.toJSON(arg, ctx);\n const data = { aliasCount: 0, count: 1, res: undefined };\n ctx.anchors.set(value, data);\n ctx.onCreate = res => {\n data.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (ctx.onCreate)\n ctx.onCreate(res);\n return res;\n }\n if (typeof value === 'bigint' && !ctx?.keep)\n return Number(value);\n return value;\n}\n\nexports.toJS = toJS;\n","'use strict';\n\nvar applyReviver = require('../doc/applyReviver.js');\nvar identity = require('./identity.js');\nvar toJS = require('./toJS.js');\n\nclass NodeBase {\n constructor(type) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: type });\n }\n /** Create a copy of this node. */\n clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** A plain JavaScript representation of this node. */\n toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n if (!identity.isDocument(doc))\n throw new TypeError('A document argument is required');\n const ctx = {\n anchors: new Map(),\n doc,\n keep: true,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS.toJS(this, '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n}\n\nexports.NodeBase = NodeBase;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar visit = require('../visit.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nclass Alias extends Node.NodeBase {\n constructor(source) {\n super(identity.ALIAS);\n this.source = source;\n Object.defineProperty(this, 'tag', {\n set() {\n throw new Error('Alias nodes cannot have tags');\n }\n });\n }\n /**\n * Resolve the value of this alias within `doc`, finding the last\n * instance of the `source` anchor before this node.\n */\n resolve(doc, ctx) {\n if (ctx?.maxAliasCount === 0)\n throw new ReferenceError('Alias resolution is disabled');\n let nodes;\n if (ctx?.aliasResolveCache) {\n nodes = ctx.aliasResolveCache;\n }\n else {\n nodes = [];\n visit.visit(doc, {\n Node: (_key, node) => {\n if (identity.isAlias(node) || identity.hasAnchor(node))\n nodes.push(node);\n }\n });\n if (ctx)\n ctx.aliasResolveCache = nodes;\n }\n let found = undefined;\n for (const node of nodes) {\n if (node === this)\n break;\n if (node.anchor === this.source)\n found = node;\n }\n if (found && ctx) {\n const { anchors, doc, maxAliasCount } = ctx;\n let data = anchors.get(found);\n if (!data) {\n // Resolve anchors for Node.prototype.toJS()\n toJS.toJS(found, null, ctx);\n data = anchors.get(found);\n }\n /* istanbul ignore if */\n if (data?.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n throw new ReferenceError(msg);\n }\n if (maxAliasCount >= 0) {\n data.count += 1;\n if (data.aliasCount === 0)\n data.aliasCount = getAliasCount(doc, found, anchors);\n if (data.count * data.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n throw new ReferenceError(msg);\n }\n }\n }\n return found;\n }\n toJSON(_arg, ctx) {\n if (!ctx)\n return { source: this.source };\n const source = this.resolve(ctx.doc, ctx);\n if (!source) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new ReferenceError(msg);\n }\n return ctx.anchors.get(source).res;\n }\n toString(ctx, _onComment, _onChompKeep) {\n const src = `*${this.source}`;\n if (ctx) {\n anchors.anchorIsValid(this.source);\n if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new Error(msg);\n }\n if (ctx.implicitKey)\n return `${src} `;\n }\n return src;\n }\n}\nfunction getAliasCount(doc, node, anchors) {\n if (identity.isAlias(node)) {\n const source = node.resolve(doc);\n const anchor = anchors && source && anchors.get(source);\n return anchor ? anchor.count * anchor.aliasCount : 0;\n }\n else if (identity.isCollection(node)) {\n let count = 0;\n for (const item of node.items) {\n const c = getAliasCount(doc, item, anchors);\n if (c > count)\n count = c;\n }\n return count;\n }\n else if (identity.isPair(node)) {\n const kc = getAliasCount(doc, node.key, anchors);\n const vc = getAliasCount(doc, node.value, anchors);\n return Math.max(kc, vc);\n }\n return 1;\n}\n\nexports.Alias = Alias;\n","'use strict';\n\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\nvar toJS = require('./toJS.js');\n\nconst isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');\nclass Scalar extends Node.NodeBase {\n constructor(value) {\n super(identity.SCALAR);\n this.value = value;\n }\n toJSON(arg, ctx) {\n return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx);\n }\n toString() {\n return String(this.value);\n }\n}\nScalar.BLOCK_FOLDED = 'BLOCK_FOLDED';\nScalar.BLOCK_LITERAL = 'BLOCK_LITERAL';\nScalar.PLAIN = 'PLAIN';\nScalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';\nScalar.QUOTE_SINGLE = 'QUOTE_SINGLE';\n\nexports.Scalar = Scalar;\nexports.isScalarValue = isScalarValue;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\n\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) ?? match[0];\n if (!tagObj)\n throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n }\n return tags.find(t => t.identify?.(value) && !t.format);\n}\nfunction createNode(value, tagName, ctx) {\n if (identity.isDocument(value))\n value = value.contents;\n if (identity.isNode(value))\n return value;\n if (identity.isPair(value)) {\n const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx);\n map.items.push(value);\n return map;\n }\n if (value instanceof String ||\n value instanceof Number ||\n value instanceof Boolean ||\n (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere\n ) {\n // https://tc39.es/ecma262/#sec-serializejsonproperty\n value = value.valueOf();\n }\n const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `ref` wrapper allows for circular references to resolve.\n let ref = undefined;\n if (aliasDuplicateObjects && value && typeof value === 'object') {\n ref = sourceObjects.get(value);\n if (ref) {\n ref.anchor ?? (ref.anchor = onAnchor(value));\n return new Alias.Alias(ref.anchor);\n }\n else {\n ref = { anchor: null, node: null };\n sourceObjects.set(value, ref);\n }\n }\n if (tagName?.startsWith('!!'))\n tagName = defaultTagPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n if (!tagObj) {\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n value = value.toJSON();\n }\n if (!value || typeof value !== 'object') {\n const node = new Scalar.Scalar(value);\n if (ref)\n ref.node = node;\n return node;\n }\n tagObj =\n value instanceof Map\n ? schema[identity.MAP]\n : Symbol.iterator in Object(value)\n ? schema[identity.SEQ]\n : schema[identity.MAP];\n }\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n }\n const node = tagObj?.createNode\n ? tagObj.createNode(ctx.schema, value, ctx)\n : typeof tagObj?.nodeClass?.from === 'function'\n ? tagObj.nodeClass.from(ctx.schema, value, ctx)\n : new Scalar.Scalar(value);\n if (tagName)\n node.tag = tagName;\n else if (!tagObj.default)\n node.tag = tagObj.tag;\n if (ref)\n ref.node = node;\n return node;\n}\n\nexports.createNode = createNode;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar identity = require('./identity.js');\nvar Node = require('./Node.js');\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {\n const a = [];\n a[k] = v;\n v = a;\n }\n else {\n v = new Map([[k, v]]);\n }\n }\n return createNode.createNode(v, undefined, {\n aliasDuplicateObjects: false,\n keepUndefined: false,\n onAnchor: () => {\n throw new Error('This should not happen, please report a bug.');\n },\n schema,\n sourceObjects: new Map()\n });\n}\n// Type guard is intentionally a little wrong so as to be more useful,\n// as it does not cover untypable empty non-string iterables (e.g. []).\nconst isEmptyPath = (path) => path == null ||\n (typeof path === 'object' && !!path[Symbol.iterator]().next().done);\nclass Collection extends Node.NodeBase {\n constructor(type, schema) {\n super(type);\n Object.defineProperty(this, 'schema', {\n value: schema,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n /**\n * Create a copy of this collection.\n *\n * @param schema - If defined, overwrites the original's schema\n */\n clone(schema) {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (schema)\n copy.schema = schema;\n copy.items = copy.items.map(it => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /**\n * Adds a value to the collection. For `!!map` and `!!omap` the value must\n * be a Pair instance or a `{ key, value }` object, which may not have a key\n * that already exists in the map.\n */\n addIn(path, value) {\n if (isEmptyPath(path))\n this.add(value);\n else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.addIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n /**\n * Removes a value from the collection.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.delete(key);\n const node = this.get(key, true);\n if (identity.isCollection(node))\n return node.deleteIn(rest);\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (rest.length === 0)\n return !keepScalar && identity.isScalar(node) ? node.value : node;\n else\n return identity.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;\n }\n hasAllNullValues(allowScalar) {\n return this.items.every(node => {\n if (!identity.isPair(node))\n return false;\n const n = node.value;\n return (n == null ||\n (allowScalar &&\n identity.isScalar(n) &&\n n.value == null &&\n !n.commentBefore &&\n !n.comment &&\n !n.tag));\n });\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n */\n hasIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.has(key);\n const node = this.get(key, true);\n return identity.isCollection(node) ? node.hasIn(rest) : false;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n const [key, ...rest] = path;\n if (rest.length === 0) {\n this.set(key, value);\n }\n else {\n const node = this.get(key, true);\n if (identity.isCollection(node))\n node.setIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n}\n\nexports.Collection = Collection;\nexports.collectionFromPath = collectionFromPath;\nexports.isEmptyPath = isEmptyPath;\n","'use strict';\n\n/**\n * Stringifies a comment.\n *\n * Empty comment lines are left empty,\n * lines consisting of a single space are replaced by `#`,\n * and all other lines are prefixed with a `#`.\n */\nconst stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');\nfunction indentComment(comment, indent) {\n if (/^\\n+$/.test(comment))\n return comment.substring(1);\n return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n}\nconst lineComment = (str, indent, comment) => str.endsWith('\\n')\n ? indentComment(comment, indent)\n : comment.includes('\\n')\n ? '\\n' + indentComment(comment, indent)\n : (str.endsWith(' ') ? '' : ' ') + comment;\n\nexports.indentComment = indentComment;\nexports.lineComment = lineComment;\nexports.stringifyComment = stringifyComment;\n","'use strict';\n\nconst FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted';\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n */\nfunction foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n if (!lineWidth || lineWidth < 0)\n return text;\n if (lineWidth < minContentWidth)\n minContentWidth = 0;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep)\n return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - indent.length;\n if (typeof indentAtStart === 'number') {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n folds.push(0);\n else\n end = lineWidth - indentAtStart;\n }\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n let escStart = -1;\n let escEnd = -1;\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i, indent.length);\n if (i !== -1)\n end = i + endStep;\n }\n for (let ch; (ch = text[(i += 1)]);) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n escStart = i;\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n case 'u':\n i += 5;\n break;\n case 'U':\n i += 9;\n break;\n default:\n i += 1;\n }\n escEnd = i;\n }\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK)\n i = consumeMoreIndentedLines(text, i, indent.length);\n end = i + indent.length + endStep;\n split = undefined;\n }\n else {\n if (ch === ' ' &&\n prev &&\n prev !== ' ' &&\n prev !== '\\n' &&\n prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t')\n split = i;\n }\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n }\n else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[(i += 1)];\n overflow = true;\n }\n // Account for newline escape, but don't break preceding escape\n const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n // Bail out if lineWidth & minContentWidth are shorter than an escape string\n if (escapedFolds[j])\n return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = undefined;\n }\n else {\n overflow = true;\n }\n }\n }\n prev = ch;\n }\n if (overflow && onOverflow)\n onOverflow();\n if (folds.length === 0)\n return text;\n if (onFold)\n onFold();\n let res = text.slice(0, folds[0]);\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (fold === 0)\n res = `\\n${indent}${text.slice(0, end)}`;\n else {\n if (mode === FOLD_QUOTED && escapedFolds[fold])\n res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n }\n return res;\n}\n/**\n * Presumes `i + 1` is at the start of a line\n * @returns index of last newline in more-indented block\n */\nfunction consumeMoreIndentedLines(text, i, indent) {\n let end = i;\n let start = i + 1;\n let ch = text[start];\n while (ch === ' ' || ch === '\\t') {\n if (i < start + indent) {\n ch = text[++i];\n }\n else {\n do {\n ch = text[++i];\n } while (ch && ch !== '\\n');\n end = i;\n start = i + 1;\n ch = text[start];\n }\n }\n return end;\n}\n\nexports.FOLD_BLOCK = FOLD_BLOCK;\nexports.FOLD_FLOW = FOLD_FLOW;\nexports.FOLD_QUOTED = FOLD_QUOTED;\nexports.foldFlowLines = foldFlowLines;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar foldFlowLines = require('./foldFlowLines.js');\n\nconst getFoldOptions = (ctx, isBlock) => ({\n indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n lineWidth: ctx.options.lineWidth,\n minContentWidth: ctx.options.minContentWidth\n});\n// Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\nconst containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0)\n return false;\n const limit = lineWidth - indentLength;\n const strLen = str.length;\n if (strLen <= limit)\n return false;\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit)\n return true;\n start = i + 1;\n if (strLen - start <= limit)\n return false;\n }\n }\n return true;\n}\nfunction doubleQuotedString(value, ctx) {\n const json = JSON.stringify(value);\n if (ctx.options.doubleQuotedAsJSON)\n return json;\n const { implicitKey } = ctx;\n const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n if (ch === '\\\\')\n switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n case '0007':\n str += '\\\\a';\n break;\n case '000b':\n str += '\\\\v';\n break;\n case '001b':\n str += '\\\\e';\n break;\n case '0085':\n str += '\\\\N';\n break;\n case '00a0':\n str += '\\\\_';\n break;\n case '2028':\n str += '\\\\L';\n break;\n case '2029':\n str += '\\\\P';\n break;\n default:\n if (code.substr(0, 2) === '00')\n str += '\\\\x' + code.substr(2);\n else\n str += json.substr(i, 6);\n }\n i += 5;\n start = i + 1;\n }\n break;\n case 'n':\n if (implicitKey ||\n json[i + 2] === '\"' ||\n json.length < minMultiLineLength) {\n i += 1;\n }\n else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n while (json[i + 2] === '\\\\' &&\n json[i + 3] === 'n' &&\n json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n str += indent;\n // space after newline needs to be escaped to not be folded\n if (json[i + 2] === ' ')\n str += '\\\\';\n i += 1;\n start = i + 1;\n }\n break;\n default:\n i += 1;\n }\n }\n str = start ? str + json.slice(start) : json;\n return implicitKey\n ? str\n : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));\n}\nfunction singleQuotedString(value, ctx) {\n if (ctx.options.singleQuote === false ||\n (ctx.implicitKey && value.includes('\\n')) ||\n /[ \\t]\\n|\\n[ \\t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline\n )\n return doubleQuotedString(value, ctx);\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey\n ? res\n : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction quotedString(value, ctx) {\n const { singleQuote } = ctx.options;\n let qs;\n if (singleQuote === false)\n qs = doubleQuotedString;\n else {\n const hasDouble = value.includes('\"');\n const hasSingle = value.includes(\"'\");\n if (hasDouble && !hasSingle)\n qs = singleQuotedString;\n else if (hasSingle && !hasDouble)\n qs = doubleQuotedString;\n else\n qs = singleQuote ? singleQuotedString : doubleQuotedString;\n }\n return qs(value, ctx);\n}\n// The negative lookbehind avoids a polynomial search,\n// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind\nlet blockEndNewlines;\ntry {\n blockEndNewlines = new RegExp('(^|(?<!\\n))\\n+(?!\\n|$)', 'g');\n}\ncatch {\n blockEndNewlines = /\\n+(?!\\n|$)/g;\n}\nfunction blockString({ comment, type, value }, ctx, onComment, onChompKeep) {\n const { blockQuote, commentString, lineWidth } = ctx.options;\n // 1. Block can't end in whitespace unless the last line is non-empty.\n // 2. Strings consisting of only whitespace are best rendered explicitly.\n if (!blockQuote || /\\n[\\t ]+$/.test(value)) {\n return quotedString(value, ctx);\n }\n const indent = ctx.indent ||\n (ctx.forceBlockIndent || containsDocumentMarker(value) ? ' ' : '');\n const literal = blockQuote === 'literal'\n ? true\n : blockQuote === 'folded' || type === Scalar.Scalar.BLOCK_FOLDED\n ? false\n : type === Scalar.Scalar.BLOCK_LITERAL\n ? true\n : !lineLengthOverLimit(value, lineWidth, indent.length);\n if (!value)\n return literal ? '|\\n' : '>\\n';\n // determine chomping from whitespace at value end\n let chomp;\n let endStart;\n for (endStart = value.length; endStart > 0; --endStart) {\n const ch = value[endStart - 1];\n if (ch !== '\\n' && ch !== '\\t' && ch !== ' ')\n break;\n }\n let end = value.substring(endStart);\n const endNlPos = end.indexOf('\\n');\n if (endNlPos === -1) {\n chomp = '-'; // strip\n }\n else if (value === end || endNlPos !== end.length - 1) {\n chomp = '+'; // keep\n if (onChompKeep)\n onChompKeep();\n }\n else {\n chomp = ''; // clip\n }\n if (end) {\n value = value.slice(0, -end.length);\n if (end[end.length - 1] === '\\n')\n end = end.slice(0, -1);\n end = end.replace(blockEndNewlines, `$&${indent}`);\n }\n // determine indent indicator from whitespace at value start\n let startWithSpace = false;\n let startEnd;\n let startNlPos = -1;\n for (startEnd = 0; startEnd < value.length; ++startEnd) {\n const ch = value[startEnd];\n if (ch === ' ')\n startWithSpace = true;\n else if (ch === '\\n')\n startNlPos = startEnd;\n else\n break;\n }\n let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n if (start) {\n value = value.substring(start.length);\n start = start.replace(/\\n+/g, `$&${indent}`);\n }\n const indentSize = indent ? '2' : '1'; // root is at -1\n // Leading | or > is added later\n let header = (startWithSpace ? indentSize : '') + chomp;\n if (comment) {\n header += ' ' + commentString(comment.replace(/ ?[\\r\\n]+/g, ' '));\n if (onComment)\n onComment();\n }\n if (!literal) {\n const foldedValue = value\n .replace(/\\n+/g, '\\n$&')\n .replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n let literalFallback = false;\n const foldOptions = getFoldOptions(ctx, true);\n if (blockQuote !== 'folded' && type !== Scalar.Scalar.BLOCK_FOLDED) {\n foldOptions.onOverflow = () => {\n literalFallback = true;\n };\n }\n const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions);\n if (!literalFallback)\n return `>${header}\\n${indent}${body}`;\n }\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `|${header}\\n${indent}${start}${value}${end}`;\n}\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const { type, value } = item;\n const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n if ((implicitKey && value.includes('\\n')) ||\n (inFlow && /[[\\]{},]/.test(value))) {\n return quotedString(value, ctx);\n }\n if (/^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || !value.includes('\\n')\n ? quotedString(value, ctx)\n : blockString(item, ctx, onComment, onChompKeep);\n }\n if (!implicitKey &&\n !inFlow &&\n type !== Scalar.Scalar.PLAIN &&\n value.includes('\\n')) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n if (containsDocumentMarker(value)) {\n if (indent === '') {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n else if (implicitKey && indent === indentStep) {\n return quotedString(value, ctx);\n }\n }\n const str = value.replace(/\\n+/g, `$&\\n${indent}`);\n // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n if (actualString) {\n const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str);\n const { compat, tags } = ctx.doc.schema;\n if (tags.some(test) || compat?.some(test))\n return quotedString(value, ctx);\n }\n return implicitKey\n ? str\n : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const { implicitKey, inFlow } = ctx;\n const ss = typeof item.value === 'string'\n ? item\n : Object.assign({}, item, { value: String(item.value) });\n let { type } = item;\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n // force double quotes on control characters & unpaired surrogates\n if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n type = Scalar.Scalar.QUOTE_DOUBLE;\n }\n const _stringify = (_type) => {\n switch (_type) {\n case Scalar.Scalar.BLOCK_FOLDED:\n case Scalar.Scalar.BLOCK_LITERAL:\n return implicitKey || inFlow\n ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers\n : blockString(ss, ctx, onComment, onChompKeep);\n case Scalar.Scalar.QUOTE_DOUBLE:\n return doubleQuotedString(ss.value, ctx);\n case Scalar.Scalar.QUOTE_SINGLE:\n return singleQuotedString(ss.value, ctx);\n case Scalar.Scalar.PLAIN:\n return plainString(ss, ctx, onComment, onChompKeep);\n default:\n return null;\n }\n };\n let res = _stringify(type);\n if (res === null) {\n const { defaultKeyType, defaultStringType } = ctx.options;\n const t = (implicitKey && defaultKeyType) || defaultStringType;\n res = _stringify(t);\n if (res === null)\n throw new Error(`Unsupported default string type ${t}`);\n }\n return res;\n}\n\nexports.stringifyString = stringifyString;\n","'use strict';\n\nvar anchors = require('../doc/anchors.js');\nvar identity = require('../nodes/identity.js');\nvar stringifyComment = require('./stringifyComment.js');\nvar stringifyString = require('./stringifyString.js');\n\nfunction createStringifyContext(doc, options) {\n const opt = Object.assign({\n blockQuote: true,\n commentString: stringifyComment.stringifyComment,\n defaultKeyType: null,\n defaultStringType: 'PLAIN',\n directives: null,\n doubleQuotedAsJSON: false,\n doubleQuotedMinMultiLineLength: 40,\n falseStr: 'false',\n flowCollectionPadding: true,\n indentSeq: true,\n lineWidth: 80,\n minContentWidth: 20,\n nullStr: 'null',\n simpleKeys: false,\n singleQuote: null,\n trailingComma: false,\n trueStr: 'true',\n verifyAliasOrder: true\n }, doc.schema.toStringOptions, options);\n let inFlow;\n switch (opt.collectionStyle) {\n case 'block':\n inFlow = false;\n break;\n case 'flow':\n inFlow = true;\n break;\n default:\n inFlow = null;\n }\n return {\n anchors: new Set(),\n doc,\n flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',\n indent: '',\n indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',\n inFlow,\n options: opt\n };\n}\nfunction getTagObject(tags, item) {\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0)\n return match.find(t => t.format === item.format) ?? match[0];\n }\n let tagObj = undefined;\n let obj;\n if (identity.isScalar(item)) {\n obj = item.value;\n let match = tags.filter(t => t.identify?.(obj));\n if (match.length > 1) {\n const testMatch = match.filter(t => t.test);\n if (testMatch.length > 0)\n match = testMatch;\n }\n tagObj =\n match.find(t => t.format === item.format) ?? match.find(t => !t.format);\n }\n else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n if (!tagObj) {\n const name = obj?.constructor?.name ?? (obj === null ? 'null' : typeof obj);\n throw new Error(`Tag not resolved for ${name} value`);\n }\n return tagObj;\n}\n// needs to be called before value stringifier to allow for circular anchor refs\nfunction stringifyProps(node, tagObj, { anchors: anchors$1, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;\n if (anchor && anchors.anchorIsValid(anchor)) {\n anchors$1.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n}\nfunction stringify(item, ctx, onComment, onChompKeep) {\n if (identity.isPair(item))\n return item.toString(ctx, onComment, onChompKeep);\n if (identity.isAlias(item)) {\n if (ctx.doc.directives)\n return item.toString(ctx);\n if (ctx.resolvedAliases?.has(item)) {\n throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n }\n else {\n if (ctx.resolvedAliases)\n ctx.resolvedAliases.add(item);\n else\n ctx.resolvedAliases = new Set([item]);\n item = item.resolve(ctx.doc);\n }\n }\n let tagObj = undefined;\n const node = identity.isNode(item)\n ? item\n : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });\n tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));\n const props = stringifyProps(node, tagObj, ctx);\n if (props.length > 0)\n ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function'\n ? tagObj.stringify(node, ctx, onComment, onChompKeep)\n : identity.isScalar(node)\n ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep)\n : node.toString(ctx, onComment, onChompKeep);\n if (!props)\n return str;\n return identity.isScalar(node) || str[0] === '{' || str[0] === '['\n ? `${props} ${str}`\n : `${props}\\n${ctx.indent}${str}`;\n}\n\nexports.createStringifyContext = createStringifyContext;\nexports.stringify = stringify;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n let keyComment = (identity.isNode(key) && key.comment) || null;\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n if (identity.isCollection(key) || (!identity.isNode(key) && typeof key === 'object')) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n let explicitKey = !simpleKeys &&\n (!key ||\n (keyComment && value == null && !ctx.inFlow) ||\n identity.isCollection(key) ||\n (identity.isScalar(key)\n ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL\n : typeof key === 'object'));\n ctx = Object.assign({}, ctx, {\n allNullValues: false,\n implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n indent: indent + indentStep\n });\n let keyCommentDone = false;\n let chompKeep = false;\n let str = stringify.stringify(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true));\n if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n if (simpleKeys)\n throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n explicitKey = true;\n }\n if (ctx.inFlow) {\n if (allNullValues || value == null) {\n if (keyCommentDone && onComment)\n onComment();\n return str === '' ? '?' : explicitKey ? `? ${str}` : str;\n }\n }\n else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) {\n str = `? ${str}`;\n if (keyComment && !keyCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n if (keyCommentDone)\n keyComment = null;\n if (explicitKey) {\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n str = `? ${str}\\n${indent}:`;\n }\n else {\n str = `${str}:`;\n if (keyComment)\n str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));\n }\n let vsb, vcb, valueComment;\n if (identity.isNode(value)) {\n vsb = !!value.spaceBefore;\n vcb = value.commentBefore;\n valueComment = value.comment;\n }\n else {\n vsb = false;\n vcb = null;\n valueComment = null;\n if (value && typeof value === 'object')\n value = doc.createNode(value);\n }\n ctx.implicitKey = false;\n if (!explicitKey && !keyComment && identity.isScalar(value))\n ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n if (!indentSeq &&\n indentStep.length >= 2 &&\n !ctx.inFlow &&\n !explicitKey &&\n identity.isSeq(value) &&\n !value.flow &&\n !value.tag &&\n !value.anchor) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substring(2);\n }\n let valueCommentDone = false;\n const valueStr = stringify.stringify(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true));\n let ws = ' ';\n if (keyComment || vsb || vcb) {\n ws = vsb ? '\\n' : '';\n if (vcb) {\n const cs = commentString(vcb);\n ws += `\\n${stringifyComment.indentComment(cs, ctx.indent)}`;\n }\n if (valueStr === '' && !ctx.inFlow) {\n if (ws === '\\n' && valueComment)\n ws = '\\n\\n';\n }\n else {\n ws += `\\n${ctx.indent}`;\n }\n }\n else if (!explicitKey && identity.isCollection(value)) {\n const vs0 = valueStr[0];\n const nl0 = valueStr.indexOf('\\n');\n const hasNewline = nl0 !== -1;\n const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n if (hasNewline || !flow) {\n let hasPropsLine = false;\n if (hasNewline && (vs0 === '&' || vs0 === '!')) {\n let sp0 = valueStr.indexOf(' ');\n if (vs0 === '&' &&\n sp0 !== -1 &&\n sp0 < nl0 &&\n valueStr[sp0 + 1] === '!') {\n sp0 = valueStr.indexOf(' ', sp0 + 1);\n }\n if (sp0 === -1 || nl0 < sp0)\n hasPropsLine = true;\n }\n if (!hasPropsLine)\n ws = `\\n${ctx.indent}`;\n }\n }\n else if (valueStr === '' || valueStr[0] === '\\n') {\n ws = '';\n }\n str += ws + valueStr;\n if (ctx.inFlow) {\n if (valueCommentDone && onComment)\n onComment();\n }\n else if (valueComment && !valueCommentDone) {\n str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment));\n }\n else if (chompKeep && onChompKeep) {\n onChompKeep();\n }\n return str;\n}\n\nexports.stringifyPair = stringifyPair;\n","'use strict';\n\nvar node_process = require('process');\n\nfunction debug(logLevel, ...messages) {\n if (logLevel === 'debug')\n console.log(...messages);\n}\nfunction warn(logLevel, warning) {\n if (logLevel === 'debug' || logLevel === 'warn') {\n if (typeof node_process.emitWarning === 'function')\n node_process.emitWarning(warning);\n else\n console.warn(warning);\n }\n}\n\nexports.debug = debug;\nexports.warn = warn;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Scalar = require('../../nodes/Scalar.js');\n\n// If the value associated with a merge key is a single mapping node, each of\n// its key/value pairs is inserted into the current mapping, unless the key\n// already exists in it. If the value associated with the merge key is a\n// sequence, then this sequence is expected to contain mapping nodes and each\n// of these nodes is merged in turn according to its order in the sequence.\n// Keys in mapping nodes earlier in the sequence override keys specified in\n// later mapping nodes. -- http://yaml.org/type/merge.html\nconst MERGE_KEY = '<<';\nconst merge = {\n identify: value => value === MERGE_KEY ||\n (typeof value === 'symbol' && value.description === MERGE_KEY),\n default: 'key',\n tag: 'tag:yaml.org,2002:merge',\n test: /^<<$/,\n resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), {\n addToJSMap: addMergeToJSMap\n }),\n stringify: () => MERGE_KEY\n};\nconst isMergeKey = (ctx, key) => (merge.identify(key) ||\n (identity.isScalar(key) &&\n (!key.type || key.type === Scalar.Scalar.PLAIN) &&\n merge.identify(key.value))) &&\n ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default);\nfunction addMergeToJSMap(ctx, map, value) {\n const source = resolveAliasValue(ctx, value);\n if (identity.isSeq(source))\n for (const it of source.items)\n mergeValue(ctx, map, it);\n else if (Array.isArray(source))\n for (const it of source)\n mergeValue(ctx, map, it);\n else\n mergeValue(ctx, map, source);\n}\nfunction mergeValue(ctx, map, value) {\n const source = resolveAliasValue(ctx, value);\n if (!identity.isMap(source))\n throw new Error('Merge sources must be maps or map aliases');\n const srcMap = source.toJSON(null, ctx, Map);\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key))\n map.set(key, value);\n }\n else if (map instanceof Set) {\n map.add(key);\n }\n else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n return map;\n}\nfunction resolveAliasValue(ctx, value) {\n return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;\n}\n\nexports.addMergeToJSMap = addMergeToJSMap;\nexports.isMergeKey = isMergeKey;\nexports.merge = merge;\n","'use strict';\n\nvar log = require('../log.js');\nvar merge = require('../schema/yaml-1.1/merge.js');\nvar stringify = require('../stringify/stringify.js');\nvar identity = require('./identity.js');\nvar toJS = require('./toJS.js');\n\nfunction addPairToJSMap(ctx, map, { key, value }) {\n if (identity.isNode(key) && key.addToJSMap)\n key.addToJSMap(ctx, map, value);\n // TODO: Should drop this special case for bare << handling\n else if (merge.isMergeKey(ctx, key))\n merge.addMergeToJSMap(ctx, map, value);\n else {\n const jsKey = toJS.toJS(key, '', ctx);\n if (map instanceof Map) {\n map.set(jsKey, toJS.toJS(value, jsKey, ctx));\n }\n else if (map instanceof Set) {\n map.add(jsKey);\n }\n else {\n const stringKey = stringifyKey(key, jsKey, ctx);\n const jsValue = toJS.toJS(value, stringKey, ctx);\n if (stringKey in map)\n Object.defineProperty(map, stringKey, {\n value: jsValue,\n writable: true,\n enumerable: true,\n configurable: true\n });\n else\n map[stringKey] = jsValue;\n }\n }\n return map;\n}\nfunction stringifyKey(key, jsKey, ctx) {\n if (jsKey === null)\n return '';\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n if (typeof jsKey !== 'object')\n return String(jsKey);\n if (identity.isNode(key) && ctx?.doc) {\n const strCtx = stringify.createStringifyContext(ctx.doc, {});\n strCtx.anchors = new Set();\n for (const node of ctx.anchors.keys())\n strCtx.anchors.add(node.anchor);\n strCtx.inFlow = true;\n strCtx.inStringifyKey = true;\n const strKey = key.toString(strCtx);\n if (!ctx.mapKeyWarned) {\n let jsonStr = JSON.stringify(strKey);\n if (jsonStr.length > 40)\n jsonStr = jsonStr.substring(0, 36) + '...\"';\n log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);\n ctx.mapKeyWarned = true;\n }\n return strKey;\n }\n return JSON.stringify(jsKey);\n}\n\nexports.addPairToJSMap = addPairToJSMap;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyPair = require('../stringify/stringifyPair.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar identity = require('./identity.js');\n\nfunction createPair(key, value, ctx) {\n const k = createNode.createNode(key, undefined, ctx);\n const v = createNode.createNode(value, undefined, ctx);\n return new Pair(k, v);\n}\nclass Pair {\n constructor(key, value = null) {\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });\n this.key = key;\n this.value = value;\n }\n clone(schema) {\n let { key, value } = this;\n if (identity.isNode(key))\n key = key.clone(schema);\n if (identity.isNode(value))\n value = value.clone(schema);\n return new Pair(key, value);\n }\n toJSON(_, ctx) {\n const pair = ctx?.mapAsMap ? new Map() : {};\n return addPairToJSMap.addPairToJSMap(ctx, pair, this);\n }\n toString(ctx, onComment, onChompKeep) {\n return ctx?.doc\n ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep)\n : JSON.stringify(this);\n }\n}\n\nexports.Pair = Pair;\nexports.createPair = createPair;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyCollection(collection, ctx, options) {\n const flow = ctx.inFlow ?? collection.flow;\n const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;\n return stringify(collection, ctx, options);\n}\nfunction stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n const { indent, options: { commentString } } = ctx;\n const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n let chompKeep = false; // flag for the preceding node's status\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (!chompKeep && item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n if (item.comment)\n comment = item.comment;\n }\n else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (!chompKeep && ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n }\n }\n chompKeep = false;\n let str = stringify.stringify(item, itemCtx, () => (comment = null), () => (chompKeep = true));\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n if (chompKeep && comment)\n chompKeep = false;\n lines.push(blockItemPrefix + str);\n }\n let str;\n if (lines.length === 0) {\n str = flowChars.start + flowChars.end;\n }\n else {\n str = lines[0];\n for (let i = 1; i < lines.length; ++i) {\n const line = lines[i];\n str += line ? `\\n${indent}${line}` : '\\n';\n }\n }\n if (comment) {\n str += '\\n' + stringifyComment.indentComment(commentString(comment), indent);\n if (onComment)\n onComment();\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n}\nfunction stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {\n const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n itemIndent += indentStep;\n const itemCtx = Object.assign({}, ctx, {\n indent: itemIndent,\n inFlow: true,\n type: null\n });\n let reqNewline = false;\n let linesAtValue = 0;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if (identity.isNode(item)) {\n if (item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, false);\n if (item.comment)\n comment = item.comment;\n }\n else if (identity.isPair(item)) {\n const ik = identity.isNode(item.key) ? item.key : null;\n if (ik) {\n if (ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, false);\n if (ik.comment)\n reqNewline = true;\n }\n const iv = identity.isNode(item.value) ? item.value : null;\n if (iv) {\n if (iv.comment)\n comment = iv.comment;\n if (iv.commentBefore)\n reqNewline = true;\n }\n else if (item.value == null && ik?.comment) {\n comment = ik.comment;\n }\n }\n if (comment)\n reqNewline = true;\n let str = stringify.stringify(item, itemCtx, () => (comment = null));\n reqNewline || (reqNewline = lines.length > linesAtValue || str.includes('\\n'));\n if (i < items.length - 1) {\n str += ',';\n }\n else if (ctx.options.trailingComma) {\n if (ctx.options.lineWidth > 0) {\n reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) +\n (str.length + 2) >\n ctx.options.lineWidth);\n }\n if (reqNewline) {\n str += ',';\n }\n }\n if (comment)\n str += stringifyComment.lineComment(str, itemIndent, commentString(comment));\n lines.push(str);\n linesAtValue = lines.length;\n }\n const { start, end } = flowChars;\n if (lines.length === 0) {\n return start + end;\n }\n else {\n if (!reqNewline) {\n const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;\n }\n if (reqNewline) {\n let str = start;\n for (const line of lines)\n str += line ? `\\n${indentStep}${indent}${line}` : '\\n';\n return `${str}\\n${indent}${end}`;\n }\n else {\n return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;\n }\n }\n}\nfunction addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n if (comment && chompKeep)\n comment = comment.replace(/^\\n+/, '');\n if (comment) {\n const ic = stringifyComment.indentComment(commentString(comment), indent);\n lines.push(ic.trimStart()); // Avoid double indent on first line\n }\n}\n\nexports.stringifyCollection = stringifyCollection;\n","'use strict';\n\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar addPairToJSMap = require('./addPairToJSMap.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Pair = require('./Pair.js');\nvar Scalar = require('./Scalar.js');\n\nfunction findPair(items, key) {\n const k = identity.isScalar(key) ? key.value : key;\n for (const it of items) {\n if (identity.isPair(it)) {\n if (it.key === key || it.key === k)\n return it;\n if (identity.isScalar(it.key) && it.key.value === k)\n return it;\n }\n }\n return undefined;\n}\nclass YAMLMap extends Collection.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:map';\n }\n constructor(schema) {\n super(identity.MAP, schema);\n this.items = [];\n }\n /**\n * A generic collection parsing method that can be extended\n * to other node classes that inherit from YAMLMap\n */\n static from(schema, obj, ctx) {\n const { keepUndefined, replacer } = ctx;\n const map = new this(schema);\n const add = (key, value) => {\n if (typeof replacer === 'function')\n value = replacer.call(obj, key, value);\n else if (Array.isArray(replacer) && !replacer.includes(key))\n return;\n if (value !== undefined || keepUndefined)\n map.items.push(Pair.createPair(key, value, ctx));\n };\n if (obj instanceof Map) {\n for (const [key, value] of obj)\n add(key, value);\n }\n else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj))\n add(key, obj[key]);\n }\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n return map;\n }\n /**\n * Adds a value to the collection.\n *\n * @param overwrite - If not set `true`, using a key that is already in the\n * collection will throw. Otherwise, overwrites the previous value.\n */\n add(pair, overwrite) {\n let _pair;\n if (identity.isPair(pair))\n _pair = pair;\n else if (!pair || typeof pair !== 'object' || !('key' in pair)) {\n // In TypeScript, this never happens.\n _pair = new Pair.Pair(pair, pair?.value);\n }\n else\n _pair = new Pair.Pair(pair.key, pair.value);\n const prev = findPair(this.items, _pair.key);\n const sortEntries = this.schema?.sortMapEntries;\n if (prev) {\n if (!overwrite)\n throw new Error(`Key ${_pair.key} already set`);\n // For scalars, keep the old node & its comments and anchors\n if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))\n prev.value.value = _pair.value;\n else\n prev.value = _pair.value;\n }\n else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);\n if (i === -1)\n this.items.push(_pair);\n else\n this.items.splice(i, 0, _pair);\n }\n else {\n this.items.push(_pair);\n }\n }\n delete(key) {\n const it = findPair(this.items, key);\n if (!it)\n return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it?.value;\n return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? undefined;\n }\n has(key) {\n return !!findPair(this.items, key);\n }\n set(key, value) {\n this.add(new Pair.Pair(key, value), true);\n }\n /**\n * @param ctx - Conversion context, originally set in Document#toJS()\n * @param {Class} Type - If set, forces the returned collection type\n * @returns Instance of Type, Map, or Object\n */\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const item of this.items)\n addPairToJSMap.addPairToJSMap(ctx, map, item);\n return map;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n for (const item of this.items) {\n if (!identity.isPair(item))\n throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n if (!ctx.allNullValues && this.hasAllNullValues(false))\n ctx = Object.assign({}, ctx, { allNullValues: true });\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: '',\n flowChars: { start: '{', end: '}' },\n itemIndent: ctx.indent || '',\n onChompKeep,\n onComment\n });\n }\n}\n\nexports.YAMLMap = YAMLMap;\nexports.findPair = findPair;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nconst map = {\n collection: 'map',\n default: true,\n nodeClass: YAMLMap.YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve(map, onError) {\n if (!identity.isMap(map))\n onError('Expected a mapping for this tag');\n return map;\n },\n createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)\n};\n\nexports.map = map;\n","'use strict';\n\nvar createNode = require('../doc/createNode.js');\nvar stringifyCollection = require('../stringify/stringifyCollection.js');\nvar Collection = require('./Collection.js');\nvar identity = require('./identity.js');\nvar Scalar = require('./Scalar.js');\nvar toJS = require('./toJS.js');\n\nclass YAMLSeq extends Collection.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:seq';\n }\n constructor(schema) {\n super(identity.SEQ, schema);\n this.items = [];\n }\n add(value) {\n this.items.push(value);\n }\n /**\n * Removes a value from the collection.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n *\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return undefined;\n const it = this.items[idx];\n return !keepScalar && identity.isScalar(it) ? it.value : it;\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n */\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n *\n * If `key` does not contain a representation of an integer, this will throw.\n * It may be wrapped in a `Scalar`.\n */\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n throw new Error(`Expected a valid index, not ${key}.`);\n const prev = this.items[idx];\n if (identity.isScalar(prev) && Scalar.isScalarValue(value))\n prev.value = value;\n else\n this.items[idx] = value;\n }\n toJSON(_, ctx) {\n const seq = [];\n if (ctx?.onCreate)\n ctx.onCreate(seq);\n let i = 0;\n for (const item of this.items)\n seq.push(toJS.toJS(item, String(i++), ctx));\n return seq;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n return stringifyCollection.stringifyCollection(this, ctx, {\n blockItemPrefix: '- ',\n flowChars: { start: '[', end: ']' },\n itemIndent: (ctx.indent || '') + ' ',\n onChompKeep,\n onComment\n });\n }\n static from(schema, obj, ctx) {\n const { replacer } = ctx;\n const seq = new this(schema);\n if (obj && Symbol.iterator in Object(obj)) {\n let i = 0;\n for (let it of obj) {\n if (typeof replacer === 'function') {\n const key = obj instanceof Set ? it : String(i++);\n it = replacer.call(obj, key, it);\n }\n seq.items.push(createNode.createNode(it, undefined, ctx));\n }\n }\n return seq;\n }\n}\nfunction asItemIndex(key) {\n let idx = identity.isScalar(key) ? key.value : key;\n if (idx && typeof idx === 'string')\n idx = Number(idx);\n return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0\n ? idx\n : null;\n}\n\nexports.YAMLSeq = YAMLSeq;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nconst seq = {\n collection: 'seq',\n default: true,\n nodeClass: YAMLSeq.YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve(seq, onError) {\n if (!identity.isSeq(seq))\n onError('Expected a sequence for this tag');\n return seq;\n },\n createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)\n};\n\nexports.seq = seq;\n","'use strict';\n\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({ actualString: true }, ctx);\n return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);\n }\n};\n\nexports.string = string;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst nullTag = {\n identify: value => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => new Scalar.Scalar(null),\n stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)\n ? source\n : ctx.options.nullStr\n};\n\nexports.nullTag = nullTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nconst boolTag = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => new Scalar.Scalar(str[0] === 't' || str[0] === 'T'),\n stringify({ source, value }, ctx) {\n if (source && boolTag.test.test(source)) {\n const sv = source[0] === 't' || source[0] === 'T';\n if (value === sv)\n return source;\n }\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n};\n\nexports.boolTag = boolTag;\n","'use strict';\n\nfunction stringifyNumber({ format, minFractionDigits, tag, value }) {\n if (typeof value === 'bigint')\n return String(value);\n const num = typeof value === 'number' ? value : Number(value);\n if (!isFinite(num))\n return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';\n let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);\n if (!format &&\n minFractionDigits &&\n (!tag || tag === 'tag:yaml.org,2002:float') &&\n /^-?\\d/.test(n) &&\n !n.includes('e')) {\n let i = n.indexOf('.');\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n let d = minFractionDigits - (n.length - i - 1);\n while (d-- > 0)\n n += '0';\n }\n return n;\n}\n\nexports.stringifyNumber = stringifyNumber;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: str => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str));\n const dot = str.indexOf('.');\n if (dot !== -1 && str[str.length - 1] === '0')\n node.minFractionDigits = str.length - dot - 1;\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nconst intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value) && value >= 0)\n return prefix + value.toString(radix);\n return stringifyNumber.stringifyNumber(node);\n}\nconst intOct = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o[0-7]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n stringify: node => intStringify(node, 8, '0o')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x[0-9a-fA-F]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\n\nconst schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.boolTag,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar map = require('../common/map.js');\nvar seq = require('../common/seq.js');\n\nfunction intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n}\nconst stringifyJSON = ({ value }) => JSON.stringify(value);\nconst jsonScalars = [\n {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify: stringifyJSON\n },\n {\n identify: value => value == null,\n createNode: () => new Scalar.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n },\n {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true$|^false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n },\n {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n },\n {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n }\n];\nconst jsonError = {\n default: true,\n tag: '',\n test: /^/,\n resolve(str, onError) {\n onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n return str;\n }\n};\nconst schema = [map.map, seq.seq].concat(jsonScalars, jsonError);\n\nexports.schema = schema;\n","'use strict';\n\nvar node_buffer = require('buffer');\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyString = require('../../stringify/stringifyString.js');\n\nconst binary = {\n identify: value => value instanceof Uint8Array, // Buffer inherits from Uint8Array\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve(src, onError) {\n if (typeof node_buffer.Buffer === 'function') {\n return node_buffer.Buffer.from(src, 'base64');\n }\n else if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i)\n buffer[i] = str.charCodeAt(i);\n return buffer;\n }\n else {\n onError('This environment does not support reading binary tags; either Buffer or atob is required');\n return src;\n }\n },\n stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n if (!value)\n return '';\n const buf = value; // checked earlier by binary.identify()\n let str;\n if (typeof node_buffer.Buffer === 'function') {\n str =\n buf instanceof node_buffer.Buffer\n ? buf.toString('base64')\n : node_buffer.Buffer.from(buf.buffer).toString('base64');\n }\n else if (typeof btoa === 'function') {\n let s = '';\n for (let i = 0; i < buf.length; ++i)\n s += String.fromCharCode(buf[i]);\n str = btoa(s);\n }\n else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n type ?? (type = Scalar.Scalar.BLOCK_LITERAL);\n if (type !== Scalar.Scalar.QUOTE_DOUBLE) {\n const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n const n = Math.ceil(str.length / lineWidth);\n const lines = new Array(n);\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = str.substr(o, lineWidth);\n }\n str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? '\\n' : ' ');\n }\n return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);\n }\n};\n\nexports.binary = binary;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar Scalar = require('../../nodes/Scalar.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\n\nfunction resolvePairs(seq, onError) {\n if (identity.isSeq(seq)) {\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if (identity.isPair(item))\n continue;\n else if (identity.isMap(item)) {\n if (item.items.length > 1)\n onError('Each pair must have its own sequence indicator');\n const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));\n if (item.commentBefore)\n pair.key.commentBefore = pair.key.commentBefore\n ? `${item.commentBefore}\\n${pair.key.commentBefore}`\n : item.commentBefore;\n if (item.comment) {\n const cn = pair.value ?? pair.key;\n cn.comment = cn.comment\n ? `${item.comment}\\n${cn.comment}`\n : item.comment;\n }\n item = pair;\n }\n seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item);\n }\n }\n else\n onError('Expected a sequence for this tag');\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const { replacer } = ctx;\n const pairs = new YAMLSeq.YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n let i = 0;\n if (iterable && Symbol.iterator in Object(iterable))\n for (let it of iterable) {\n if (typeof replacer === 'function')\n it = replacer.call(iterable, String(i++), it);\n let key, value;\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n }\n else\n throw new TypeError(`Expected [key, value] tuple: ${it}`);\n }\n else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n }\n else {\n throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n }\n }\n else {\n key = it;\n }\n pairs.items.push(Pair.createPair(key, value, ctx));\n }\n return pairs;\n}\nconst pairs = {\n collection: 'seq',\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: resolvePairs,\n createNode: createPairs\n};\n\nexports.createPairs = createPairs;\nexports.pairs = pairs;\nexports.resolvePairs = resolvePairs;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar toJS = require('../../nodes/toJS.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\nvar YAMLSeq = require('../../nodes/YAMLSeq.js');\nvar pairs = require('./pairs.js');\n\nclass YAMLOMap extends YAMLSeq.YAMLSeq {\n constructor() {\n super();\n this.add = YAMLMap.YAMLMap.prototype.add.bind(this);\n this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this);\n this.get = YAMLMap.YAMLMap.prototype.get.bind(this);\n this.has = YAMLMap.YAMLMap.prototype.has.bind(this);\n this.set = YAMLMap.YAMLMap.prototype.set.bind(this);\n this.tag = YAMLOMap.tag;\n }\n /**\n * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,\n * but TypeScript won't allow widening the signature of a child method.\n */\n toJSON(_, ctx) {\n if (!ctx)\n return super.toJSON(_);\n const map = new Map();\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const pair of this.items) {\n let key, value;\n if (identity.isPair(pair)) {\n key = toJS.toJS(pair.key, '', ctx);\n value = toJS.toJS(pair.value, key, ctx);\n }\n else {\n key = toJS.toJS(pair, '', ctx);\n }\n if (map.has(key))\n throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n return map;\n }\n static from(schema, iterable, ctx) {\n const pairs$1 = pairs.createPairs(schema, iterable, ctx);\n const omap = new this();\n omap.items = pairs$1.items;\n return omap;\n }\n}\nYAMLOMap.tag = 'tag:yaml.org,2002:omap';\nconst omap = {\n collection: 'seq',\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve(seq, onError) {\n const pairs$1 = pairs.resolvePairs(seq, onError);\n const seenKeys = [];\n for (const { key } of pairs$1.items) {\n if (identity.isScalar(key)) {\n if (seenKeys.includes(key.value)) {\n onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n }\n else {\n seenKeys.push(key.value);\n }\n }\n }\n return Object.assign(new YAMLOMap(), pairs$1);\n },\n createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n};\n\nexports.YAMLOMap = YAMLOMap;\nexports.omap = omap;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\n\nfunction boolStringify({ value, source }, ctx) {\n const boolObj = value ? trueTag : falseTag;\n if (source && boolObj.test.test(source))\n return source;\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n}\nconst trueTag = {\n identify: value => value === true,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => new Scalar.Scalar(true),\n stringify: boolStringify\n};\nconst falseTag = {\n identify: value => value === false,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,\n resolve: () => new Scalar.Scalar(false),\n stringify: boolStringify\n};\n\nexports.falseTag = falseTag;\nexports.trueTag = trueTag;\n","'use strict';\n\nvar Scalar = require('../../nodes/Scalar.js');\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: stringifyNumber.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str.replace(/_/g, '')),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n resolve(str) {\n const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, '')));\n const dot = str.indexOf('.');\n if (dot !== -1) {\n const f = str.substring(dot + 1).replace(/_/g, '');\n if (f[f.length - 1] === '0')\n node.minFractionDigits = f.length;\n }\n return node;\n },\n stringify: stringifyNumber.stringifyNumber\n};\n\nexports.float = float;\nexports.floatExp = floatExp;\nexports.floatNaN = floatNaN;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nfunction intResolve(str, offset, radix, { intAsBigInt }) {\n const sign = str[0];\n if (sign === '-' || sign === '+')\n offset += 1;\n str = str.substring(offset).replace(/_/g, '');\n if (intAsBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n case 8:\n str = `0o${str}`;\n break;\n case 16:\n str = `0x${str}`;\n break;\n }\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n return stringifyNumber.stringifyNumber(node);\n}\nconst intBin = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^[-+]?0b[0-1_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n stringify: node => intStringify(node, 2, '0b')\n};\nconst intOct = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^[-+]?0[0-7_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n stringify: node => intStringify(node, 8, '0')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9][0-9_]*$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: stringifyNumber.stringifyNumber\n};\nconst intHex = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^[-+]?0x[0-9a-fA-F_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\nexports.int = int;\nexports.intBin = intBin;\nexports.intHex = intHex;\nexports.intOct = intOct;\n","'use strict';\n\nvar identity = require('../../nodes/identity.js');\nvar Pair = require('../../nodes/Pair.js');\nvar YAMLMap = require('../../nodes/YAMLMap.js');\n\nclass YAMLSet extends YAMLMap.YAMLMap {\n constructor(schema) {\n super(schema);\n this.tag = YAMLSet.tag;\n }\n add(key) {\n let pair;\n if (identity.isPair(key))\n pair = key;\n else if (key &&\n typeof key === 'object' &&\n 'key' in key &&\n 'value' in key &&\n key.value === null)\n pair = new Pair.Pair(key.key, null);\n else\n pair = new Pair.Pair(key, null);\n const prev = YAMLMap.findPair(this.items, pair.key);\n if (!prev)\n this.items.push(pair);\n }\n /**\n * If `keepPair` is `true`, returns the Pair matching `key`.\n * Otherwise, returns the value of that Pair's key.\n */\n get(key, keepPair) {\n const pair = YAMLMap.findPair(this.items, key);\n return !keepPair && identity.isPair(pair)\n ? identity.isScalar(pair.key)\n ? pair.key.value\n : pair.key\n : pair;\n }\n set(key, value) {\n if (typeof value !== 'boolean')\n throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = YAMLMap.findPair(this.items, key);\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n }\n else if (!prev && value) {\n this.items.push(new Pair.Pair(key));\n }\n }\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n if (this.hasAllNullValues(true))\n return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n else\n throw new Error('Set items must all have null values');\n }\n static from(schema, iterable, ctx) {\n const { replacer } = ctx;\n const set = new this(schema);\n if (iterable && Symbol.iterator in Object(iterable))\n for (let value of iterable) {\n if (typeof replacer === 'function')\n value = replacer.call(iterable, value, value);\n set.items.push(Pair.createPair(value, null, ctx));\n }\n return set;\n }\n}\nYAMLSet.tag = 'tag:yaml.org,2002:set';\nconst set = {\n collection: 'map',\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n resolve(map, onError) {\n if (identity.isMap(map)) {\n if (map.hasAllNullValues(true))\n return Object.assign(new YAMLSet(), map);\n else\n onError('Set items must all have null values');\n }\n else\n onError('Expected a mapping for this tag');\n return map;\n }\n};\n\nexports.YAMLSet = YAMLSet;\nexports.set = set;\n","'use strict';\n\nvar stringifyNumber = require('../../stringify/stringifyNumber.js');\n\n/** Internal types handle bigint as number, because TS can't figure it out. */\nfunction parseSexagesimal(str, asBigInt) {\n const sign = str[0];\n const parts = sign === '-' || sign === '+' ? str.substring(1) : str;\n const num = (n) => asBigInt ? BigInt(n) : Number(n);\n const res = parts\n .replace(/_/g, '')\n .split(':')\n .reduce((res, p) => res * num(60) + num(p), num(0));\n return (sign === '-' ? num(-1) * res : res);\n}\n/**\n * hhhh:mm:ss.sss\n *\n * Internal types handle bigint as number, because TS can't figure it out.\n */\nfunction stringifySexagesimal(node) {\n let { value } = node;\n let num = (n) => n;\n if (typeof value === 'bigint')\n num = n => BigInt(n);\n else if (isNaN(value) || !isFinite(value))\n return stringifyNumber.stringifyNumber(node);\n let sign = '';\n if (value < 0) {\n sign = '-';\n value *= num(-1);\n }\n const _60 = num(60);\n const parts = [value % _60]; // seconds, including ms\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n }\n else {\n value = (value - parts[0]) / _60;\n parts.unshift(value % _60); // minutes\n if (value >= 60) {\n value = (value - parts[0]) / _60;\n parts.unshift(value); // hours\n }\n }\n return (sign +\n parts\n .map(n => String(n).padStart(2, '0'))\n .join(':')\n .replace(/000000\\d*$/, '') // % 60 may introduce error\n );\n}\nconst intTime = {\n identify: value => typeof value === 'bigint' || Number.isInteger(value),\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n resolve: str => parseSexagesimal(str, false),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:' + // time is optional\n '(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?$'),\n resolve(str) {\n const match = str.match(timestamp.test);\n if (!match)\n throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');\n const [, year, month, day, hour, minute, second] = match.map(Number);\n const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n const tz = match[8];\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz, false);\n if (Math.abs(d) < 30)\n d *= 60;\n date -= 60000 * d;\n }\n return new Date(date);\n },\n stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\\.000Z$/, '') ?? ''\n};\n\nexports.floatTime = floatTime;\nexports.intTime = intTime;\nexports.timestamp = timestamp;\n","'use strict';\n\nvar map = require('../common/map.js');\nvar _null = require('../common/null.js');\nvar seq = require('../common/seq.js');\nvar string = require('../common/string.js');\nvar binary = require('./binary.js');\nvar bool = require('./bool.js');\nvar float = require('./float.js');\nvar int = require('./int.js');\nvar merge = require('./merge.js');\nvar omap = require('./omap.js');\nvar pairs = require('./pairs.js');\nvar set = require('./set.js');\nvar timestamp = require('./timestamp.js');\n\nconst schema = [\n map.map,\n seq.seq,\n string.string,\n _null.nullTag,\n bool.trueTag,\n bool.falseTag,\n int.intBin,\n int.intOct,\n int.int,\n int.intHex,\n float.floatNaN,\n float.floatExp,\n float.float,\n binary.binary,\n merge.merge,\n omap.omap,\n pairs.pairs,\n set.set,\n timestamp.intTime,\n timestamp.floatTime,\n timestamp.timestamp\n];\n\nexports.schema = schema;\n","'use strict';\n\nvar map = require('./common/map.js');\nvar _null = require('./common/null.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar bool = require('./core/bool.js');\nvar float = require('./core/float.js');\nvar int = require('./core/int.js');\nvar schema = require('./core/schema.js');\nvar schema$1 = require('./json/schema.js');\nvar binary = require('./yaml-1.1/binary.js');\nvar merge = require('./yaml-1.1/merge.js');\nvar omap = require('./yaml-1.1/omap.js');\nvar pairs = require('./yaml-1.1/pairs.js');\nvar schema$2 = require('./yaml-1.1/schema.js');\nvar set = require('./yaml-1.1/set.js');\nvar timestamp = require('./yaml-1.1/timestamp.js');\n\nconst schemas = new Map([\n ['core', schema.schema],\n ['failsafe', [map.map, seq.seq, string.string]],\n ['json', schema$1.schema],\n ['yaml11', schema$2.schema],\n ['yaml-1.1', schema$2.schema]\n]);\nconst tagsByName = {\n binary: binary.binary,\n bool: bool.boolTag,\n float: float.float,\n floatExp: float.floatExp,\n floatNaN: float.floatNaN,\n floatTime: timestamp.floatTime,\n int: int.int,\n intHex: int.intHex,\n intOct: int.intOct,\n intTime: timestamp.intTime,\n map: map.map,\n merge: merge.merge,\n null: _null.nullTag,\n omap: omap.omap,\n pairs: pairs.pairs,\n seq: seq.seq,\n set: set.set,\n timestamp: timestamp.timestamp\n};\nconst coreKnownTags = {\n 'tag:yaml.org,2002:binary': binary.binary,\n 'tag:yaml.org,2002:merge': merge.merge,\n 'tag:yaml.org,2002:omap': omap.omap,\n 'tag:yaml.org,2002:pairs': pairs.pairs,\n 'tag:yaml.org,2002:set': set.set,\n 'tag:yaml.org,2002:timestamp': timestamp.timestamp\n};\nfunction getTags(customTags, schemaName, addMergeTag) {\n const schemaTags = schemas.get(schemaName);\n if (schemaTags && !customTags) {\n return addMergeTag && !schemaTags.includes(merge.merge)\n ? schemaTags.concat(merge.merge)\n : schemaTags.slice();\n }\n let tags = schemaTags;\n if (!tags) {\n if (Array.isArray(customTags))\n tags = [];\n else {\n const keys = Array.from(schemas.keys())\n .filter(key => key !== 'yaml11')\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n }\n }\n if (Array.isArray(customTags)) {\n for (const tag of customTags)\n tags = tags.concat(tag);\n }\n else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n if (addMergeTag)\n tags = tags.concat(merge.merge);\n return tags.reduce((tags, tag) => {\n const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag;\n if (!tagObj) {\n const tagName = JSON.stringify(tag);\n const keys = Object.keys(tagsByName)\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);\n }\n if (!tags.includes(tagObj))\n tags.push(tagObj);\n return tags;\n }, []);\n}\n\nexports.coreKnownTags = coreKnownTags;\nexports.getTags = getTags;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar map = require('./common/map.js');\nvar seq = require('./common/seq.js');\nvar string = require('./common/string.js');\nvar tags = require('./tags.js');\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\nclass Schema {\n constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n this.compat = Array.isArray(compat)\n ? tags.getTags(compat, 'compat')\n : compat\n ? tags.getTags(null, compat)\n : null;\n this.name = (typeof schema === 'string' && schema) || 'core';\n this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};\n this.tags = tags.getTags(customTags, this.name, merge);\n this.toStringOptions = toStringDefaults ?? null;\n Object.defineProperty(this, identity.MAP, { value: map.map });\n Object.defineProperty(this, identity.SCALAR, { value: string.string });\n Object.defineProperty(this, identity.SEQ, { value: seq.seq });\n // Used by createMap()\n this.sortMapEntries =\n typeof sortMapEntries === 'function'\n ? sortMapEntries\n : sortMapEntries === true\n ? sortMapEntriesByKey\n : null;\n }\n clone() {\n const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));\n copy.tags = this.tags.slice();\n return copy;\n }\n}\n\nexports.Schema = Schema;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar stringify = require('./stringify.js');\nvar stringifyComment = require('./stringifyComment.js');\n\nfunction stringifyDocument(doc, options) {\n const lines = [];\n let hasDirectives = options.directives === true;\n if (options.directives !== false && doc.directives) {\n const dir = doc.directives.toString(doc);\n if (dir) {\n lines.push(dir);\n hasDirectives = true;\n }\n else if (doc.directives.docStart)\n hasDirectives = true;\n }\n if (hasDirectives)\n lines.push('---');\n const ctx = stringify.createStringifyContext(doc, options);\n const { commentString } = ctx.options;\n if (doc.commentBefore) {\n if (lines.length !== 1)\n lines.unshift('');\n const cs = commentString(doc.commentBefore);\n lines.unshift(stringifyComment.indentComment(cs, ''));\n }\n let chompKeep = false;\n let contentComment = null;\n if (doc.contents) {\n if (identity.isNode(doc.contents)) {\n if (doc.contents.spaceBefore && hasDirectives)\n lines.push('');\n if (doc.contents.commentBefore) {\n const cs = commentString(doc.contents.commentBefore);\n lines.push(stringifyComment.indentComment(cs, ''));\n }\n // top-level block scalars need to be indented if followed by a comment\n ctx.forceBlockIndent = !!doc.comment;\n contentComment = doc.contents.comment;\n }\n const onChompKeep = contentComment ? undefined : () => (chompKeep = true);\n let body = stringify.stringify(doc.contents, ctx, () => (contentComment = null), onChompKeep);\n if (contentComment)\n body += stringifyComment.lineComment(body, '', commentString(contentComment));\n if ((body[0] === '|' || body[0] === '>') &&\n lines[lines.length - 1] === '---') {\n // Top-level block scalars with a preceding doc marker ought to use the\n // same line for their header.\n lines[lines.length - 1] = `--- ${body}`;\n }\n else\n lines.push(body);\n }\n else {\n lines.push(stringify.stringify(doc.contents, ctx));\n }\n if (doc.directives?.docEnd) {\n if (doc.comment) {\n const cs = commentString(doc.comment);\n if (cs.includes('\\n')) {\n lines.push('...');\n lines.push(stringifyComment.indentComment(cs, ''));\n }\n else {\n lines.push(`... ${cs}`);\n }\n }\n else {\n lines.push('...');\n }\n }\n else {\n let dc = doc.comment;\n if (dc && chompKeep)\n dc = dc.replace(/^\\n+/, '');\n if (dc) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')\n lines.push('');\n lines.push(stringifyComment.indentComment(commentString(dc), ''));\n }\n }\n return lines.join('\\n') + '\\n';\n}\n\nexports.stringifyDocument = stringifyDocument;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar Collection = require('../nodes/Collection.js');\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar toJS = require('../nodes/toJS.js');\nvar Schema = require('../schema/Schema.js');\nvar stringifyDocument = require('../stringify/stringifyDocument.js');\nvar anchors = require('./anchors.js');\nvar applyReviver = require('./applyReviver.js');\nvar createNode = require('./createNode.js');\nvar directives = require('./directives.js');\n\nclass Document {\n constructor(value, replacer, options) {\n /** A comment before this Document */\n this.commentBefore = null;\n /** A comment immediately after this Document */\n this.comment = null;\n /** Errors encountered during parsing. */\n this.errors = [];\n /** Warnings encountered during parsing. */\n this.warnings = [];\n Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC });\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const opt = Object.assign({\n intAsBigInt: false,\n keepSourceTokens: false,\n logLevel: 'warn',\n prettyErrors: true,\n strict: true,\n stringKeys: false,\n uniqueKeys: true,\n version: '1.2'\n }, options);\n this.options = opt;\n let { version } = opt;\n if (options?._directives) {\n this.directives = options._directives.atDocument();\n if (this.directives.yaml.explicit)\n version = this.directives.yaml.version;\n }\n else\n this.directives = new directives.Directives({ version });\n this.setSchema(version, options);\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents =\n value === undefined ? null : this.createNode(value, _replacer, options);\n }\n /**\n * Create a deep copy of this Document and its contents.\n *\n * Custom Node values that inherit from `Object` still refer to their original instances.\n */\n clone() {\n const copy = Object.create(Document.prototype, {\n [identity.NODE_TYPE]: { value: identity.DOC }\n });\n copy.commentBefore = this.commentBefore;\n copy.comment = this.comment;\n copy.errors = this.errors.slice();\n copy.warnings = this.warnings.slice();\n copy.options = Object.assign({}, this.options);\n if (this.directives)\n copy.directives = this.directives.clone();\n copy.schema = this.schema.clone();\n // @ts-expect-error We can't really know that this matches Contents.\n copy.contents = identity.isNode(this.contents)\n ? this.contents.clone(copy.schema)\n : this.contents;\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** Adds a value to the document. */\n add(value) {\n if (assertCollection(this.contents))\n this.contents.add(value);\n }\n /** Adds a value to the document. */\n addIn(path, value) {\n if (assertCollection(this.contents))\n this.contents.addIn(path, value);\n }\n /**\n * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n *\n * If `node` already has an anchor, `name` is ignored.\n * Otherwise, the `node.anchor` value will be set to `name`,\n * or if an anchor with that name is already present in the document,\n * `name` will be used as a prefix for a new unique anchor.\n * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n */\n createAlias(node, name) {\n if (!node.anchor) {\n const prev = anchors.anchorNames(this);\n node.anchor =\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n !name || prev.has(name) ? anchors.findNewAnchor(name || 'a', prev) : name;\n }\n return new Alias.Alias(node.anchor);\n }\n createNode(value, replacer, options) {\n let _replacer = undefined;\n if (typeof replacer === 'function') {\n value = replacer.call({ '': value }, '', value);\n _replacer = replacer;\n }\n else if (Array.isArray(replacer)) {\n const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;\n const asStr = replacer.filter(keyToStr).map(String);\n if (asStr.length > 0)\n replacer = replacer.concat(asStr);\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(this, \n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n anchorPrefix || 'a');\n const ctx = {\n aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n keepUndefined: keepUndefined ?? false,\n onAnchor,\n onTagObj,\n replacer: _replacer,\n schema: this.schema,\n sourceObjects\n };\n const node = createNode.createNode(value, tag, ctx);\n if (flow && identity.isCollection(node))\n node.flow = true;\n setAnchors();\n return node;\n }\n /**\n * Convert a key and a value into a `Pair` using the current schema,\n * recursively wrapping all values as `Scalar` or `Collection` nodes.\n */\n createPair(key, value, options = {}) {\n const k = this.createNode(key, null, options);\n const v = this.createNode(value, null, options);\n return new Pair.Pair(k, v);\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n return assertCollection(this.contents) ? this.contents.delete(key) : false;\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n if (Collection.isEmptyPath(path)) {\n if (this.contents == null)\n return false;\n // @ts-expect-error Presumed impossible if Strict extends false\n this.contents = null;\n return true;\n }\n return assertCollection(this.contents)\n ? this.contents.deleteIn(path)\n : false;\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n get(key, keepScalar) {\n return identity.isCollection(this.contents)\n ? this.contents.get(key, keepScalar)\n : undefined;\n }\n /**\n * Returns item at `path`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n if (Collection.isEmptyPath(path))\n return !keepScalar && identity.isScalar(this.contents)\n ? this.contents.value\n : this.contents;\n return identity.isCollection(this.contents)\n ? this.contents.getIn(path, keepScalar)\n : undefined;\n }\n /**\n * Checks if the document includes a value with the key `key`.\n */\n has(key) {\n return identity.isCollection(this.contents) ? this.contents.has(key) : false;\n }\n /**\n * Checks if the document includes a value at `path`.\n */\n hasIn(path) {\n if (Collection.isEmptyPath(path))\n return this.contents !== undefined;\n return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false;\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n set(key, value) {\n if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, [key], value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.set(key, value);\n }\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n if (Collection.isEmptyPath(path)) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = value;\n }\n else if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }\n /**\n * Change the YAML version and schema used by the document.\n * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n * It also requires the `schema` option to be given as a `Schema` instance value.\n *\n * Overrides all previously set schema options.\n */\n setSchema(version, options = {}) {\n if (typeof version === 'number')\n version = String(version);\n let opt;\n switch (version) {\n case '1.1':\n if (this.directives)\n this.directives.yaml.version = '1.1';\n else\n this.directives = new directives.Directives({ version: '1.1' });\n opt = { resolveKnownTags: false, schema: 'yaml-1.1' };\n break;\n case '1.2':\n case 'next':\n if (this.directives)\n this.directives.yaml.version = version;\n else\n this.directives = new directives.Directives({ version });\n opt = { resolveKnownTags: true, schema: 'core' };\n break;\n case null:\n if (this.directives)\n delete this.directives;\n opt = null;\n break;\n default: {\n const sv = JSON.stringify(version);\n throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n }\n }\n // Not using `instanceof Schema` to allow for duck typing\n if (options.schema instanceof Object)\n this.schema = options.schema;\n else if (opt)\n this.schema = new Schema.Schema(Object.assign(opt, options));\n else\n throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n }\n // json & jsonArg are only used from toJSON()\n toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n const ctx = {\n anchors: new Map(),\n doc: this,\n keep: !json,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = toJS.toJS(this.contents, jsonArg ?? '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? applyReviver.applyReviver(reviver, { '': res }, '', res)\n : res;\n }\n /**\n * A JSON representation of the document `contents`.\n *\n * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n * property name.\n */\n toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }\n /** A YAML representation of the document. */\n toString(options = {}) {\n if (this.errors.length > 0)\n throw new Error('Document with errors cannot be stringified');\n if ('indent' in options &&\n (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n const s = JSON.stringify(options.indent);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n return stringifyDocument.stringifyDocument(this, options);\n }\n}\nfunction assertCollection(contents) {\n if (identity.isCollection(contents))\n return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\nexports.Document = Document;\n","'use strict';\n\nclass YAMLError extends Error {\n constructor(name, pos, code, message) {\n super();\n this.name = name;\n this.code = code;\n this.message = message;\n this.pos = pos;\n }\n}\nclass YAMLParseError extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLParseError', pos, code, message);\n }\n}\nclass YAMLWarning extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLWarning', pos, code, message);\n }\n}\nconst prettifyError = (src, lc) => (error) => {\n if (error.pos[0] === -1)\n return;\n error.linePos = error.pos.map(pos => lc.linePos(pos));\n const { line, col } = error.linePos[0];\n error.message += ` at line ${line}, column ${col}`;\n let ci = col - 1;\n let lineStr = src\n .substring(lc.lineStarts[line - 1], lc.lineStarts[line])\n .replace(/[\\n\\r]+$/, '');\n // Trim to max 80 chars, keeping col position near the middle\n if (ci >= 60 && lineStr.length > 80) {\n const trimStart = Math.min(ci - 39, lineStr.length - 79);\n lineStr = '…' + lineStr.substring(trimStart);\n ci -= trimStart - 1;\n }\n if (lineStr.length > 80)\n lineStr = lineStr.substring(0, 79) + '…';\n // Include previous line in context if pointing at line start\n if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n // Regexp won't match if start is trimmed\n let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n if (prev.length > 80)\n prev = prev.substring(0, 79) + '…\\n';\n lineStr = prev + lineStr;\n }\n if (/[^ ]/.test(lineStr)) {\n let count = 1;\n const end = error.linePos[1];\n if (end?.line === line && end.col > col) {\n count = Math.max(1, Math.min(end.col - col, 80 - ci));\n }\n const pointer = ' '.repeat(ci) + '^'.repeat(count);\n error.message += `:\\n\\n${lineStr}\\n${pointer}\\n`;\n }\n};\n\nexports.YAMLError = YAMLError;\nexports.YAMLParseError = YAMLParseError;\nexports.YAMLWarning = YAMLWarning;\nexports.prettifyError = prettifyError;\n","'use strict';\n\nfunction resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {\n let spaceBefore = false;\n let atNewline = startOnNewline;\n let hasSpace = startOnNewline;\n let comment = '';\n let commentSep = '';\n let hasNewline = false;\n let reqSpace = false;\n let tab = null;\n let anchor = null;\n let tag = null;\n let newlineAfterProp = null;\n let comma = null;\n let found = null;\n let start = null;\n for (const token of tokens) {\n if (reqSpace) {\n if (token.type !== 'space' &&\n token.type !== 'newline' &&\n token.type !== 'comma')\n onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n reqSpace = false;\n }\n if (tab) {\n if (atNewline && token.type !== 'comment' && token.type !== 'newline') {\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n }\n tab = null;\n }\n switch (token.type) {\n case 'space':\n // At the doc level, tabs at line start may be parsed\n // as leading white space rather than indentation.\n // In a flow collection, only the parser handles indent.\n if (!flow &&\n (indicator !== 'doc-start' || next?.type !== 'flow-collection') &&\n token.source.includes('\\t')) {\n tab = token;\n }\n hasSpace = true;\n break;\n case 'comment': {\n if (!hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = token.source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += commentSep + cb;\n commentSep = '';\n atNewline = false;\n break;\n }\n case 'newline':\n if (atNewline) {\n if (comment)\n comment += token.source;\n else if (!found || indicator !== 'seq-item-ind')\n spaceBefore = true;\n }\n else\n commentSep += token.source;\n atNewline = true;\n hasNewline = true;\n if (anchor || tag)\n newlineAfterProp = token;\n hasSpace = true;\n break;\n case 'anchor':\n if (anchor)\n onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');\n if (token.source.endsWith(':'))\n onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);\n anchor = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n case 'tag': {\n if (tag)\n onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');\n tag = token;\n start ?? (start = token.offset);\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n }\n case indicator:\n // Could here handle preceding comments differently\n if (anchor || tag)\n onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);\n if (found)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);\n found = token;\n atNewline =\n indicator === 'seq-item-ind' || indicator === 'explicit-key-ind';\n hasSpace = false;\n break;\n case 'comma':\n if (flow) {\n if (comma)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);\n comma = token;\n atNewline = false;\n hasSpace = false;\n break;\n }\n // else fallthrough\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);\n atNewline = false;\n hasSpace = false;\n }\n }\n const last = tokens[tokens.length - 1];\n const end = last ? last.offset + last.source.length : offset;\n if (reqSpace &&\n next &&\n next.type !== 'space' &&\n next.type !== 'newline' &&\n next.type !== 'comma' &&\n (next.type !== 'scalar' || next.source !== '')) {\n onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n }\n if (tab &&\n ((atNewline && tab.indent <= parentIndent) ||\n next?.type === 'block-map' ||\n next?.type === 'block-seq'))\n onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n return {\n comma,\n found,\n spaceBefore,\n comment,\n hasNewline,\n anchor,\n tag,\n newlineAfterProp,\n end,\n start: start ?? end\n };\n}\n\nexports.resolveProps = resolveProps;\n","'use strict';\n\nfunction containsNewline(key) {\n if (!key)\n return null;\n switch (key.type) {\n case 'alias':\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n if (key.source.includes('\\n'))\n return true;\n if (key.end)\n for (const st of key.end)\n if (st.type === 'newline')\n return true;\n return false;\n case 'flow-collection':\n for (const it of key.items) {\n for (const st of it.start)\n if (st.type === 'newline')\n return true;\n if (it.sep)\n for (const st of it.sep)\n if (st.type === 'newline')\n return true;\n if (containsNewline(it.key) || containsNewline(it.value))\n return true;\n }\n return false;\n default:\n return true;\n }\n}\n\nexports.containsNewline = containsNewline;\n","'use strict';\n\nvar utilContainsNewline = require('./util-contains-newline.js');\n\nfunction flowIndentCheck(indent, fc, onError) {\n if (fc?.type === 'flow-collection') {\n const end = fc.end[0];\n if (end.indent === indent &&\n (end.source === ']' || end.source === '}') &&\n utilContainsNewline.containsNewline(fc)) {\n const msg = 'Flow end indicator should be more indented than parent';\n onError(end, 'BAD_INDENT', msg, true);\n }\n }\n}\n\nexports.flowIndentCheck = flowIndentCheck;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\n\nfunction mapIncludes(ctx, items, search) {\n const { uniqueKeys } = ctx.options;\n if (uniqueKeys === false)\n return false;\n const isEqual = typeof uniqueKeys === 'function'\n ? uniqueKeys\n : (a, b) => a === b || (identity.isScalar(a) && identity.isScalar(b) && a.value === b.value);\n return items.some(pair => isEqual(pair.key, search));\n}\n\nexports.mapIncludes = mapIncludes;\n","'use strict';\n\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst startColMsg = 'All mapping items must start at the same column';\nfunction resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap;\n const map = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bm.offset;\n let commentEnd = null;\n for (const collItem of bm.items) {\n const { start, key, sep, value } = collItem;\n // key properties\n const keyProps = resolveProps.resolveProps(start, {\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: bm.indent,\n startOnNewline: true\n });\n const implicitKey = !keyProps.found;\n if (implicitKey) {\n if (key) {\n if (key.type === 'block-seq')\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');\n else if ('indent' in key && key.indent !== bm.indent)\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n if (!keyProps.anchor && !keyProps.tag && !sep) {\n commentEnd = keyProps.end;\n if (keyProps.comment) {\n if (map.comment)\n map.comment += '\\n' + keyProps.comment;\n else\n map.comment = keyProps.comment;\n }\n continue;\n }\n if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) {\n onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');\n }\n }\n else if (keyProps.found?.indent !== bm.indent) {\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n // key value\n ctx.atKey = true;\n const keyStart = keyProps.end;\n const keyNode = key\n ? composeNode(ctx, key, keyProps, onError)\n : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError);\n ctx.atKey = false;\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n // value properties\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: bm.indent,\n startOnNewline: !key || key.type === 'block-scalar'\n });\n offset = valueProps.end;\n if (valueProps.found) {\n if (implicitKey) {\n if (value?.type === 'block-map' && !valueProps.hasNewline)\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');\n if (ctx.options.strict &&\n keyProps.start < valueProps.found.offset - 1024)\n onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);\n offset = valueNode.range[2];\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n else {\n // key with no value\n if (implicitKey)\n onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');\n if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n }\n if (commentEnd && commentEnd < offset)\n onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');\n map.range = [bm.offset, offset, commentEnd ?? offset];\n return map;\n}\n\nexports.resolveBlockMap = resolveBlockMap;\n","'use strict';\n\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilFlowIndentCheck = require('./util-flow-indent-check.js');\n\nfunction resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq;\n const seq = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = bs.offset;\n let commentEnd = null;\n for (const { start, value } of bs.items) {\n const props = resolveProps.resolveProps(start, {\n indicator: 'seq-item-ind',\n next: value,\n offset,\n onError,\n parentIndent: bs.indent,\n startOnNewline: true\n });\n if (!props.found) {\n if (props.anchor || props.tag || value) {\n if (value?.type === 'block-seq')\n onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');\n else\n onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');\n }\n else {\n commentEnd = props.end;\n if (props.comment)\n seq.comment = props.comment;\n continue;\n }\n }\n const node = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n if (ctx.schema.compat)\n utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);\n offset = node.range[2];\n seq.items.push(node);\n }\n seq.range = [bs.offset, offset, commentEnd ?? offset];\n return seq;\n}\n\nexports.resolveBlockSeq = resolveBlockSeq;\n","'use strict';\n\nfunction resolveEnd(end, offset, reqSpace, onError) {\n let comment = '';\n if (end) {\n let hasSpace = false;\n let sep = '';\n for (const token of end) {\n const { source, type } = token;\n switch (type) {\n case 'space':\n hasSpace = true;\n break;\n case 'comment': {\n if (reqSpace && !hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += sep + cb;\n sep = '';\n break;\n }\n case 'newline':\n if (comment)\n sep += source;\n hasSpace = true;\n break;\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);\n }\n offset += source.length;\n }\n }\n return { comment, offset };\n}\n\nexports.resolveEnd = resolveEnd;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Pair = require('../nodes/Pair.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\nvar utilContainsNewline = require('./util-contains-newline.js');\nvar utilMapIncludes = require('./util-map-includes.js');\n\nconst blockMsg = 'Block collections are not allowed within flow collections';\nconst isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');\nfunction resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n const isMap = fc.start.source === '{';\n const fcName = isMap ? 'flow map' : 'flow sequence';\n const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq));\n const coll = new NodeClass(ctx.schema);\n coll.flow = true;\n const atRoot = ctx.atRoot;\n if (atRoot)\n ctx.atRoot = false;\n if (ctx.atKey)\n ctx.atKey = false;\n let offset = fc.offset + fc.start.source.length;\n for (let i = 0; i < fc.items.length; ++i) {\n const collItem = fc.items[i];\n const { start, key, sep, value } = collItem;\n const props = resolveProps.resolveProps(start, {\n flow: fcName,\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (!props.found) {\n if (!props.anchor && !props.tag && !sep && !value) {\n if (i === 0 && props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n else if (i < fc.items.length - 1)\n onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);\n if (props.comment) {\n if (coll.comment)\n coll.comment += '\\n' + props.comment;\n else\n coll.comment = props.comment;\n }\n offset = props.end;\n continue;\n }\n if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key))\n onError(key, // checked by containsNewline()\n 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n }\n if (i === 0) {\n if (props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n }\n else {\n if (!props.comma)\n onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);\n if (props.comment) {\n let prevItemComment = '';\n loop: for (const st of start) {\n switch (st.type) {\n case 'comma':\n case 'space':\n break;\n case 'comment':\n prevItemComment = st.source.substring(1);\n break loop;\n default:\n break loop;\n }\n }\n if (prevItemComment) {\n let prev = coll.items[coll.items.length - 1];\n if (identity.isPair(prev))\n prev = prev.value ?? prev.key;\n if (prev.comment)\n prev.comment += '\\n' + prevItemComment;\n else\n prev.comment = prevItemComment;\n props.comment = props.comment.substring(prevItemComment.length + 1);\n }\n }\n }\n if (!isMap && !sep && !props.found) {\n // item is a value in a seq\n // → key & sep are empty, start does not include ? or :\n const valueNode = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n coll.items.push(valueNode);\n offset = valueNode.range[2];\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else {\n // item is a key+value pair\n // key value\n ctx.atKey = true;\n const keyStart = props.end;\n const keyNode = key\n ? composeNode(ctx, key, props, onError)\n : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n if (isBlock(key))\n onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);\n ctx.atKey = false;\n // value properties\n const valueProps = resolveProps.resolveProps(sep ?? [], {\n flow: fcName,\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n parentIndent: fc.indent,\n startOnNewline: false\n });\n if (valueProps.found) {\n if (!isMap && !props.found && ctx.options.strict) {\n if (sep)\n for (const st of sep) {\n if (st === valueProps.found)\n break;\n if (st.type === 'newline') {\n onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n break;\n }\n }\n if (props.start < valueProps.found.offset - 1024)\n onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');\n }\n }\n else if (value) {\n if ('source' in value && value.source?.[0] === ':')\n onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);\n else\n onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : valueProps.found\n ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)\n : null;\n if (valueNode) {\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new Pair.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n if (isMap) {\n const map = coll;\n if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n map.items.push(pair);\n }\n else {\n const map = new YAMLMap.YAMLMap(ctx.schema);\n map.flow = true;\n map.items.push(pair);\n const endRange = (valueNode ?? keyNode).range;\n map.range = [keyNode.range[0], endRange[1], endRange[2]];\n coll.items.push(map);\n }\n offset = valueNode ? valueNode.range[2] : valueProps.end;\n }\n }\n const expectedEnd = isMap ? '}' : ']';\n const [ce, ...ee] = fc.end;\n let cePos = offset;\n if (ce?.source === expectedEnd)\n cePos = ce.offset + ce.source.length;\n else {\n const name = fcName[0].toUpperCase() + fcName.substring(1);\n const msg = atRoot\n ? `${name} must end with a ${expectedEnd}`\n : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);\n if (ce && ce.source.length !== 1)\n ee.unshift(ce);\n }\n if (ee.length > 0) {\n const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError);\n if (end.comment) {\n if (coll.comment)\n coll.comment += '\\n' + end.comment;\n else\n coll.comment = end.comment;\n }\n coll.range = [fc.offset, cePos, end.offset];\n }\n else {\n coll.range = [fc.offset, cePos, cePos];\n }\n return coll;\n}\n\nexports.resolveFlowCollection = resolveFlowCollection;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar YAMLMap = require('../nodes/YAMLMap.js');\nvar YAMLSeq = require('../nodes/YAMLSeq.js');\nvar resolveBlockMap = require('./resolve-block-map.js');\nvar resolveBlockSeq = require('./resolve-block-seq.js');\nvar resolveFlowCollection = require('./resolve-flow-collection.js');\n\nfunction resolveCollection(CN, ctx, token, onError, tagName, tag) {\n const coll = token.type === 'block-map'\n ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag)\n : token.type === 'block-seq'\n ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag)\n : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag);\n const Coll = coll.constructor;\n // If we got a tagName matching the class, or the tag name is '!',\n // then use the tagName from the node class used to create it.\n if (tagName === '!' || tagName === Coll.tagName) {\n coll.tag = Coll.tagName;\n return coll;\n }\n if (tagName)\n coll.tag = tagName;\n return coll;\n}\nfunction composeCollection(CN, ctx, token, props, onError) {\n const tagToken = props.tag;\n const tagName = !tagToken\n ? null\n : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));\n if (token.type === 'block-seq') {\n const { anchor, newlineAfterProp: nl } = props;\n const lastProp = anchor && tagToken\n ? anchor.offset > tagToken.offset\n ? anchor\n : tagToken\n : (anchor ?? tagToken);\n if (lastProp && (!nl || nl.offset < lastProp.offset)) {\n const message = 'Missing newline after block sequence props';\n onError(lastProp, 'MISSING_CHAR', message);\n }\n }\n const expType = token.type === 'block-map'\n ? 'map'\n : token.type === 'block-seq'\n ? 'seq'\n : token.start.source === '{'\n ? 'map'\n : 'seq';\n // shortcut: check if it's a generic YAMLMap or YAMLSeq\n // before jumping into the custom tag logic.\n if (!tagToken ||\n !tagName ||\n tagName === '!' ||\n (tagName === YAMLMap.YAMLMap.tagName && expType === 'map') ||\n (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq')) {\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);\n if (!tag) {\n const kt = ctx.schema.knownTags[tagName];\n if (kt?.collection === expType) {\n ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n tag = kt;\n }\n else {\n if (kt) {\n onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? 'scalar'}`, true);\n }\n else {\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);\n }\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n }\n const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;\n const node = identity.isNode(res)\n ? res\n : new Scalar.Scalar(res);\n node.range = coll.range;\n node.tag = tagName;\n if (tag?.format)\n node.format = tag.format;\n return node;\n}\n\nexports.composeCollection = composeCollection;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\n\nfunction resolveBlockScalar(ctx, scalar, onError) {\n const start = scalar.offset;\n const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);\n if (!header)\n return { value: '', type: null, comment: '', range: [start, start, start] };\n const type = header.mode === '>' ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;\n const lines = scalar.source ? splitLines(scalar.source) : [];\n // determine the end of content & start of chomping\n let chompStart = lines.length;\n for (let i = lines.length - 1; i >= 0; --i) {\n const content = lines[i][1];\n if (content === '' || content === '\\r')\n chompStart = i;\n else\n break;\n }\n // shortcut for empty contents\n if (chompStart === 0) {\n const value = header.chomp === '+' && lines.length > 0\n ? '\\n'.repeat(Math.max(1, lines.length - 1))\n : '';\n let end = start + header.length;\n if (scalar.source)\n end += scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n }\n // find the indentation level to trim from start\n let trimIndent = scalar.indent + header.indent;\n let offset = scalar.offset + header.length;\n let contentStart = 0;\n for (let i = 0; i < chompStart; ++i) {\n const [indent, content] = lines[i];\n if (content === '' || content === '\\r') {\n if (header.indent === 0 && indent.length > trimIndent)\n trimIndent = indent.length;\n }\n else {\n if (indent.length < trimIndent) {\n const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n onError(offset + indent.length, 'MISSING_CHAR', message);\n }\n if (header.indent === 0)\n trimIndent = indent.length;\n contentStart = i;\n if (trimIndent === 0 && !ctx.atRoot) {\n const message = 'Block scalar values in collections must be indented';\n onError(offset, 'BAD_INDENT', message);\n }\n break;\n }\n offset += indent.length + content.length + 1;\n }\n // include trailing more-indented empty lines in content\n for (let i = lines.length - 1; i >= chompStart; --i) {\n if (lines[i][0].length > trimIndent)\n chompStart = i + 1;\n }\n let value = '';\n let sep = '';\n let prevMoreIndented = false;\n // leading whitespace is kept intact\n for (let i = 0; i < contentStart; ++i)\n value += lines[i][0].slice(trimIndent) + '\\n';\n for (let i = contentStart; i < chompStart; ++i) {\n let [indent, content] = lines[i];\n offset += indent.length + content.length + 1;\n const crlf = content[content.length - 1] === '\\r';\n if (crlf)\n content = content.slice(0, -1);\n /* istanbul ignore if already caught in lexer */\n if (content && indent.length < trimIndent) {\n const src = header.indent\n ? 'explicit indentation indicator'\n : 'first line';\n const message = `Block scalar lines must not be less indented than their ${src}`;\n onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);\n indent = '';\n }\n if (type === Scalar.Scalar.BLOCK_LITERAL) {\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n }\n else if (indent.length > trimIndent || content[0] === '\\t') {\n // more-indented content within a folded block\n if (sep === ' ')\n sep = '\\n';\n else if (!prevMoreIndented && sep === '\\n')\n sep = '\\n\\n';\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n prevMoreIndented = true;\n }\n else if (content === '') {\n // empty line\n if (sep === '\\n')\n value += '\\n';\n else\n sep = '\\n';\n }\n else {\n value += sep + content;\n sep = ' ';\n prevMoreIndented = false;\n }\n }\n switch (header.chomp) {\n case '-':\n break;\n case '+':\n for (let i = chompStart; i < lines.length; ++i)\n value += '\\n' + lines[i][0].slice(trimIndent);\n if (value[value.length - 1] !== '\\n')\n value += '\\n';\n break;\n default:\n value += '\\n';\n }\n const end = start + header.length + scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n}\nfunction parseBlockScalarHeader({ offset, props }, strict, onError) {\n /* istanbul ignore if should not happen */\n if (props[0].type !== 'block-scalar-header') {\n onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');\n return null;\n }\n const { source } = props[0];\n const mode = source[0];\n let indent = 0;\n let chomp = '';\n let error = -1;\n for (let i = 1; i < source.length; ++i) {\n const ch = source[i];\n if (!chomp && (ch === '-' || ch === '+'))\n chomp = ch;\n else {\n const n = Number(ch);\n if (!indent && n)\n indent = n;\n else if (error === -1)\n error = offset + i;\n }\n }\n if (error !== -1)\n onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);\n let hasSpace = false;\n let comment = '';\n let length = source.length;\n for (let i = 1; i < props.length; ++i) {\n const token = props[i];\n switch (token.type) {\n case 'space':\n hasSpace = true;\n // fallthrough\n case 'newline':\n length += token.source.length;\n break;\n case 'comment':\n if (strict && !hasSpace) {\n const message = 'Comments must be separated from other tokens by white space characters';\n onError(token, 'MISSING_CHAR', message);\n }\n length += token.source.length;\n comment = token.source.substring(1);\n break;\n case 'error':\n onError(token, 'UNEXPECTED_TOKEN', token.message);\n length += token.source.length;\n break;\n /* istanbul ignore next should not happen */\n default: {\n const message = `Unexpected token in block scalar header: ${token.type}`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n const ts = token.source;\n if (ts && typeof ts === 'string')\n length += ts.length;\n }\n }\n }\n return { mode, indent, chomp, comment, length };\n}\n/** @returns Array of lines split up as `[indent, content]` */\nfunction splitLines(source) {\n const split = source.split(/\\n( *)/);\n const first = split[0];\n const m = first.match(/^( *)/);\n const line0 = m?.[1]\n ? [m[1], first.slice(m[1].length)]\n : ['', first];\n const lines = [line0];\n for (let i = 1; i < split.length; i += 2)\n lines.push([split[i], split[i + 1]]);\n return lines;\n}\n\nexports.resolveBlockScalar = resolveBlockScalar;\n","'use strict';\n\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction resolveFlowScalar(scalar, strict, onError) {\n const { offset, type, source, end } = scalar;\n let _type;\n let value;\n const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n switch (type) {\n case 'scalar':\n _type = Scalar.Scalar.PLAIN;\n value = plainValue(source, _onError);\n break;\n case 'single-quoted-scalar':\n _type = Scalar.Scalar.QUOTE_SINGLE;\n value = singleQuotedValue(source, _onError);\n break;\n case 'double-quoted-scalar':\n _type = Scalar.Scalar.QUOTE_DOUBLE;\n value = doubleQuotedValue(source, _onError);\n break;\n /* istanbul ignore next should not happen */\n default:\n onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);\n return {\n value: '',\n type: null,\n comment: '',\n range: [offset, offset + source.length, offset + source.length]\n };\n }\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError);\n return {\n value,\n type: _type,\n comment: re.comment,\n range: [offset, valueEnd, re.offset]\n };\n}\nfunction plainValue(source, onError) {\n let badChar = '';\n switch (source[0]) {\n /* istanbul ignore next should not happen */\n case '\\t':\n badChar = 'a tab character';\n break;\n case ',':\n badChar = 'flow indicator character ,';\n break;\n case '%':\n badChar = 'directive indicator character %';\n break;\n case '|':\n case '>': {\n badChar = `block scalar indicator ${source[0]}`;\n break;\n }\n case '@':\n case '`': {\n badChar = `reserved character ${source[0]}`;\n break;\n }\n }\n if (badChar)\n onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);\n return unfoldLines(source);\n}\nfunction singleQuotedValue(source, onError) {\n if (source[source.length - 1] !== \"'\" || source.length === 1)\n onError(source.length, 'MISSING_CHAR', \"Missing closing 'quote\");\n return unfoldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n}\nfunction unfoldLines(source) {\n const line = /(.*?)\\r?\\n/sy;\n let match = line.exec(source);\n if (!match)\n return source;\n /**\n * The negative lookbehinds in these RegExps are to\n * prevent causing a polynomial search time in certain cases.\n *\n * The try-catch is for Safari < 16.4 and other old browsers:\n * https://caniuse.com/js-regexp-lookbehind\n */\n let trimEnd, trimBoth;\n try {\n trimEnd = new RegExp('(?<![ \\t])[ \\t]+$');\n trimBoth = new RegExp('^[ \\t]+|(?<![ \\t])[ \\t]+$', 'g');\n }\n catch {\n trimEnd = /[ \\t]+$/;\n trimBoth = /^[ \\t]+|[ \\t]+$/g;\n }\n let res = match[1].replace(trimEnd, '');\n let sep = ' ';\n let pos = line.lastIndex;\n while ((match = line.exec(source))) {\n const lm = match[1].replace(trimBoth, '');\n if (lm === '') {\n if (sep === '\\n')\n res += sep;\n else\n sep = '\\n';\n }\n else {\n res += sep + lm;\n sep = ' ';\n }\n pos = line.lastIndex;\n }\n const last = /[ \\t]*(.*)/sy;\n last.lastIndex = pos;\n match = last.exec(source);\n return res + sep + (match?.[1] ?? '');\n}\nfunction doubleQuotedValue(source, onError) {\n let res = '';\n for (let i = 1; i < source.length - 1; ++i) {\n const ch = source[i];\n if (ch === '\\r' && source[i + 1] === '\\n')\n continue;\n if (ch === '\\n') {\n const { fold, offset } = foldNewline(source, i);\n res += fold;\n i = offset;\n }\n else if (ch === '\\\\') {\n let next = source[++i];\n const cc = escapeCodes[next];\n if (cc)\n res += cc;\n else if (next === '\\n') {\n // skip escaped newlines, but still trim the following line\n next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === '\\r' && source[i + 1] === '\\n') {\n // skip escaped CRLF newlines, but still trim the following line\n next = source[++i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n }\n else if (next === 'x' || next === 'u' || next === 'U') {\n const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;\n res += parseCharCode(source, i + 1, length, onError);\n i += length;\n }\n else {\n const raw = source.substr(i - 1, 2);\n onError(i - 1, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n res += raw;\n }\n }\n else if (ch === ' ' || ch === '\\t') {\n // trim trailing whitespace\n const wsStart = i;\n let next = source[i + 1];\n while (next === ' ' || next === '\\t')\n next = source[++i + 1];\n if (next !== '\\n' && !(next === '\\r' && source[i + 2] === '\\n'))\n res += i > wsStart ? source.slice(wsStart, i + 1) : ch;\n }\n else {\n res += ch;\n }\n }\n if (source[source.length - 1] !== '\"' || source.length === 1)\n onError(source.length, 'MISSING_CHAR', 'Missing closing \"quote');\n return res;\n}\n/**\n * Fold a single newline into a space, multiple newlines to N - 1 newlines.\n * Presumes `source[offset] === '\\n'`\n */\nfunction foldNewline(source, offset) {\n let fold = '';\n let ch = source[offset + 1];\n while (ch === ' ' || ch === '\\t' || ch === '\\n' || ch === '\\r') {\n if (ch === '\\r' && source[offset + 2] !== '\\n')\n break;\n if (ch === '\\n')\n fold += '\\n';\n offset += 1;\n ch = source[offset + 1];\n }\n if (!fold)\n fold = ' ';\n return { fold, offset };\n}\nconst escapeCodes = {\n '0': '\\0', // null character\n a: '\\x07', // bell character\n b: '\\b', // backspace\n e: '\\x1b', // escape character\n f: '\\f', // form feed\n n: '\\n', // line feed\n r: '\\r', // carriage return\n t: '\\t', // horizontal tab\n v: '\\v', // vertical tab\n N: '\\u0085', // Unicode next line\n _: '\\u00a0', // Unicode non-breaking space\n L: '\\u2028', // Unicode line separator\n P: '\\u2029', // Unicode paragraph separator\n ' ': ' ',\n '\"': '\"',\n '/': '/',\n '\\\\': '\\\\',\n '\\t': '\\t'\n};\nfunction parseCharCode(source, offset, length, onError) {\n const cc = source.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n try {\n return String.fromCodePoint(code);\n }\n catch {\n const raw = source.substr(offset - 2, length + 2);\n onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n return raw;\n }\n}\n\nexports.resolveFlowScalar = resolveFlowScalar;\n","'use strict';\n\nvar identity = require('../nodes/identity.js');\nvar Scalar = require('../nodes/Scalar.js');\nvar resolveBlockScalar = require('./resolve-block-scalar.js');\nvar resolveFlowScalar = require('./resolve-flow-scalar.js');\n\nfunction composeScalar(ctx, token, tagToken, onError) {\n const { value, type, comment, range } = token.type === 'block-scalar'\n ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError)\n : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);\n const tagName = tagToken\n ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))\n : null;\n let tag;\n if (ctx.options.stringKeys && ctx.atKey) {\n tag = ctx.schema[identity.SCALAR];\n }\n else if (tagName)\n tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);\n else if (token.type === 'scalar')\n tag = findScalarTagByTest(ctx, value, token, onError);\n else\n tag = ctx.schema[identity.SCALAR];\n let scalar;\n try {\n const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);\n scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);\n }\n catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);\n scalar = new Scalar.Scalar(value);\n }\n scalar.range = range;\n scalar.source = value;\n if (type)\n scalar.type = type;\n if (tagName)\n scalar.tag = tagName;\n if (tag.format)\n scalar.format = tag.format;\n if (comment)\n scalar.comment = comment;\n return scalar;\n}\nfunction findScalarTagByName(schema, value, tagName, tagToken, onError) {\n if (tagName === '!')\n return schema[identity.SCALAR]; // non-specific tag\n const matchWithTest = [];\n for (const tag of schema.tags) {\n if (!tag.collection && tag.tag === tagName) {\n if (tag.default && tag.test)\n matchWithTest.push(tag);\n else\n return tag;\n }\n }\n for (const tag of matchWithTest)\n if (tag.test?.test(value))\n return tag;\n const kt = schema.knownTags[tagName];\n if (kt && !kt.collection) {\n // Ensure that the known tag is available for stringifying,\n // but does not get used by default.\n schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));\n return kt;\n }\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');\n return schema[identity.SCALAR];\n}\nfunction findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {\n const tag = schema.tags.find(tag => (tag.default === true || (atKey && tag.default === 'key')) &&\n tag.test?.test(value)) || schema[identity.SCALAR];\n if (schema.compat) {\n const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??\n schema[identity.SCALAR];\n if (tag.tag !== compat.tag) {\n const ts = directives.tagString(tag.tag);\n const cs = directives.tagString(compat.tag);\n const msg = `Value may be parsed as either ${ts} or ${cs}`;\n onError(token, 'TAG_RESOLVE_FAILED', msg, true);\n }\n }\n return tag;\n}\n\nexports.composeScalar = composeScalar;\n","'use strict';\n\nfunction emptyScalarPosition(offset, before, pos) {\n if (before) {\n pos ?? (pos = before.length);\n for (let i = pos - 1; i >= 0; --i) {\n let st = before[i];\n switch (st.type) {\n case 'space':\n case 'comment':\n case 'newline':\n offset -= st.source.length;\n continue;\n }\n // Technically, an empty scalar is immediately after the last non-empty\n // node, but it's more useful to place it after any whitespace.\n st = before[++i];\n while (st?.type === 'space') {\n offset += st.source.length;\n st = before[++i];\n }\n break;\n }\n }\n return offset;\n}\n\nexports.emptyScalarPosition = emptyScalarPosition;\n","'use strict';\n\nvar Alias = require('../nodes/Alias.js');\nvar identity = require('../nodes/identity.js');\nvar composeCollection = require('./compose-collection.js');\nvar composeScalar = require('./compose-scalar.js');\nvar resolveEnd = require('./resolve-end.js');\nvar utilEmptyScalarPosition = require('./util-empty-scalar-position.js');\n\nconst CN = { composeNode, composeEmptyNode };\nfunction composeNode(ctx, token, props, onError) {\n const atKey = ctx.atKey;\n const { spaceBefore, comment, anchor, tag } = props;\n let node;\n let isSrcToken = true;\n switch (token.type) {\n case 'alias':\n node = composeAlias(ctx, token, onError);\n if (anchor || tag)\n onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');\n break;\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'block-scalar':\n node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n case 'block-map':\n case 'block-seq':\n case 'flow-collection':\n try {\n node = composeCollection.composeCollection(CN, ctx, token, props, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n }\n catch (error) {\n // Almost certainly here due to a stack overflow\n const message = error instanceof Error ? error.message : String(error);\n onError(token, 'RESOURCE_EXHAUSTION', message);\n }\n break;\n default: {\n const message = token.type === 'error'\n ? token.message\n : `Unsupported token (type: ${token.type})`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n isSrcToken = false;\n }\n }\n node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));\n if (anchor && node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n if (atKey &&\n ctx.options.stringKeys &&\n (!identity.isScalar(node) ||\n typeof node.value !== 'string' ||\n (node.tag && node.tag !== 'tag:yaml.org,2002:str'))) {\n const msg = 'With stringKeys, all keys must be strings';\n onError(tag ?? token, 'NON_STRING_KEY', msg);\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n if (token.type === 'scalar' && token.source === '')\n node.comment = comment;\n else\n node.commentBefore = comment;\n }\n // @ts-expect-error Type checking misses meaning of isSrcToken\n if (ctx.options.keepSourceTokens && isSrcToken)\n node.srcToken = token;\n return node;\n}\nfunction composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n const token = {\n type: 'scalar',\n offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos),\n indent: -1,\n source: ''\n };\n const node = composeScalar.composeScalar(ctx, token, tag, onError);\n if (anchor) {\n node.anchor = anchor.source.substring(1);\n if (node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n node.comment = comment;\n node.range[2] = end;\n }\n return node;\n}\nfunction composeAlias({ options }, { offset, source, end }, onError) {\n const alias = new Alias.Alias(source.substring(1));\n if (alias.source === '')\n onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string');\n if (alias.source.endsWith(':'))\n onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true);\n const valueEnd = offset + source.length;\n const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError);\n alias.range = [offset, valueEnd, re.offset];\n if (re.comment)\n alias.comment = re.comment;\n return alias;\n}\n\nexports.composeEmptyNode = composeEmptyNode;\nexports.composeNode = composeNode;\n","'use strict';\n\nvar Document = require('../doc/Document.js');\nvar composeNode = require('./compose-node.js');\nvar resolveEnd = require('./resolve-end.js');\nvar resolveProps = require('./resolve-props.js');\n\nfunction composeDoc(options, directives, { offset, start, value, end }, onError) {\n const opts = Object.assign({ _directives: directives }, options);\n const doc = new Document.Document(undefined, opts);\n const ctx = {\n atKey: false,\n atRoot: true,\n directives: doc.directives,\n options: doc.options,\n schema: doc.schema\n };\n const props = resolveProps.resolveProps(start, {\n indicator: 'doc-start',\n next: value ?? end?.[0],\n offset,\n onError,\n parentIndent: 0,\n startOnNewline: true\n });\n if (props.found) {\n doc.directives.docStart = true;\n if (value &&\n (value.type === 'block-map' || value.type === 'block-seq') &&\n !props.hasNewline)\n onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');\n }\n // @ts-expect-error If Contents is set, let's trust the user\n doc.contents = value\n ? composeNode.composeNode(ctx, value, props, onError)\n : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);\n const contentEnd = doc.contents.range[2];\n const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);\n if (re.comment)\n doc.comment = re.comment;\n doc.range = [offset, contentEnd, re.offset];\n return doc;\n}\n\nexports.composeDoc = composeDoc;\n","'use strict';\n\nvar node_process = require('process');\nvar directives = require('../doc/directives.js');\nvar Document = require('../doc/Document.js');\nvar errors = require('../errors.js');\nvar identity = require('../nodes/identity.js');\nvar composeDoc = require('./compose-doc.js');\nvar resolveEnd = require('./resolve-end.js');\n\nfunction getErrorPos(src) {\n if (typeof src === 'number')\n return [src, src + 1];\n if (Array.isArray(src))\n return src.length === 2 ? src : [src[0], src[1]];\n const { offset, source } = src;\n return [offset, offset + (typeof source === 'string' ? source.length : 1)];\n}\nfunction parsePrelude(prelude) {\n let comment = '';\n let atComment = false;\n let afterEmptyLine = false;\n for (let i = 0; i < prelude.length; ++i) {\n const source = prelude[i];\n switch (source[0]) {\n case '#':\n comment +=\n (comment === '' ? '' : afterEmptyLine ? '\\n\\n' : '\\n') +\n (source.substring(1) || ' ');\n atComment = true;\n afterEmptyLine = false;\n break;\n case '%':\n if (prelude[i + 1]?.[0] !== '#')\n i += 1;\n atComment = false;\n break;\n default:\n // This may be wrong after doc-end, but in that case it doesn't matter\n if (!atComment)\n afterEmptyLine = true;\n atComment = false;\n }\n }\n return { comment, afterEmptyLine };\n}\n/**\n * Compose a stream of CST nodes into a stream of YAML Documents.\n *\n * ```ts\n * import { Composer, Parser } from 'yaml'\n *\n * const src: string = ...\n * const tokens = new Parser().parse(src)\n * const docs = new Composer().compose(tokens)\n * ```\n */\nclass Composer {\n constructor(options = {}) {\n this.doc = null;\n this.atDirectives = false;\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n this.onError = (source, code, message, warning) => {\n const pos = getErrorPos(source);\n if (warning)\n this.warnings.push(new errors.YAMLWarning(pos, code, message));\n else\n this.errors.push(new errors.YAMLParseError(pos, code, message));\n };\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n this.directives = new directives.Directives({ version: options.version || '1.2' });\n this.options = options;\n }\n decorate(doc, afterDoc) {\n const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n //console.log({ dc: doc.comment, prelude, comment })\n if (comment) {\n const dc = doc.contents;\n if (afterDoc) {\n doc.comment = doc.comment ? `${doc.comment}\\n${comment}` : comment;\n }\n else if (afterEmptyLine || doc.directives.docStart || !dc) {\n doc.commentBefore = comment;\n }\n else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {\n let it = dc.items[0];\n if (identity.isPair(it))\n it = it.key;\n const cb = it.commentBefore;\n it.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n else {\n const cb = dc.commentBefore;\n dc.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n }\n if (afterDoc) {\n for (let i = 0; i < this.errors.length; ++i)\n doc.errors.push(this.errors[i]);\n for (let i = 0; i < this.warnings.length; ++i)\n doc.warnings.push(this.warnings[i]);\n }\n else {\n doc.errors = this.errors;\n doc.warnings = this.warnings;\n }\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n }\n /**\n * Current stream status information.\n *\n * Mostly useful at the end of input for an empty stream.\n */\n streamInfo() {\n return {\n comment: parsePrelude(this.prelude).comment,\n directives: this.directives,\n errors: this.errors,\n warnings: this.warnings\n };\n }\n /**\n * Compose tokens into documents.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *compose(tokens, forceDoc = false, endOffset = -1) {\n for (const token of tokens)\n yield* this.next(token);\n yield* this.end(forceDoc, endOffset);\n }\n /** Advance the composer by one CST token. */\n *next(token) {\n if (node_process.env.LOG_STREAM)\n console.dir(token, { depth: null });\n switch (token.type) {\n case 'directive':\n this.directives.add(token.source, (offset, message, warning) => {\n const pos = getErrorPos(token);\n pos[0] += offset;\n this.onError(pos, 'BAD_DIRECTIVE', message, warning);\n });\n this.prelude.push(token.source);\n this.atDirectives = true;\n break;\n case 'document': {\n const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError);\n if (this.atDirectives && !doc.directives.docStart)\n this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');\n this.decorate(doc, false);\n if (this.doc)\n yield this.doc;\n this.doc = doc;\n this.atDirectives = false;\n break;\n }\n case 'byte-order-mark':\n case 'space':\n break;\n case 'comment':\n case 'newline':\n this.prelude.push(token.source);\n break;\n case 'error': {\n const msg = token.source\n ? `${token.message}: ${JSON.stringify(token.source)}`\n : token.message;\n const error = new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);\n if (this.atDirectives || !this.doc)\n this.errors.push(error);\n else\n this.doc.errors.push(error);\n break;\n }\n case 'doc-end': {\n if (!this.doc) {\n const msg = 'Unexpected doc-end without preceding document';\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));\n break;\n }\n this.doc.directives.docEnd = true;\n const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n this.decorate(this.doc, true);\n if (end.comment) {\n const dc = this.doc.comment;\n this.doc.comment = dc ? `${dc}\\n${end.comment}` : end.comment;\n }\n this.doc.range[2] = end.offset;\n break;\n }\n default:\n this.errors.push(new errors.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));\n }\n }\n /**\n * Call at end of input to yield any remaining document.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *end(forceDoc = false, endOffset = -1) {\n if (this.doc) {\n this.decorate(this.doc, true);\n yield this.doc;\n this.doc = null;\n }\n else if (forceDoc) {\n const opts = Object.assign({ _directives: this.directives }, this.options);\n const doc = new Document.Document(undefined, opts);\n if (this.atDirectives)\n this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');\n doc.range = [0, endOffset, endOffset];\n this.decorate(doc, false);\n yield doc;\n }\n }\n}\n\nexports.Composer = Composer;\n","'use strict';\n\nvar resolveBlockScalar = require('../compose/resolve-block-scalar.js');\nvar resolveFlowScalar = require('../compose/resolve-flow-scalar.js');\nvar errors = require('../errors.js');\nvar stringifyString = require('../stringify/stringifyString.js');\n\nfunction resolveAsScalar(token, strict = true, onError) {\n if (token) {\n const _onError = (pos, code, message) => {\n const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;\n if (onError)\n onError(offset, code, message);\n else\n throw new errors.YAMLParseError([offset, offset + 1], code, message);\n };\n switch (token.type) {\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return resolveFlowScalar.resolveFlowScalar(token, strict, _onError);\n case 'block-scalar':\n return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError);\n }\n }\n return null;\n}\n/**\n * Create a new scalar token with `value`\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.indent The indent level of the token.\n * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.\n * @param context.offset The offset position of the token.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction createScalarToken(value, context) {\n const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey,\n indent: indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n const end = context.end ?? [\n { type: 'newline', offset: -1, indent, source: '\\n' }\n ];\n switch (source[0]) {\n case '|':\n case '>': {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, end))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n return { type: 'block-scalar', offset, indent, props, source: body };\n }\n case '\"':\n return { type: 'double-quoted-scalar', offset, indent, source, end };\n case \"'\":\n return { type: 'single-quoted-scalar', offset, indent, source, end };\n default:\n return { type: 'scalar', offset, indent, source, end };\n }\n}\n/**\n * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.\n *\n * Best efforts are made to retain any comments previously associated with the `token`,\n * though all contents within a collection's `items` will be overwritten.\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.afterKey In most cases, values after a key should have an additional level of indentation.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction setScalarValue(token, value, context = {}) {\n let { afterKey = false, implicitKey = false, inFlow = false, type } = context;\n let indent = 'indent' in token ? token.indent : null;\n if (afterKey && typeof indent === 'number')\n indent += 2;\n if (!type)\n switch (token.type) {\n case 'single-quoted-scalar':\n type = 'QUOTE_SINGLE';\n break;\n case 'double-quoted-scalar':\n type = 'QUOTE_DOUBLE';\n break;\n case 'block-scalar': {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';\n break;\n }\n default:\n type = 'PLAIN';\n }\n const source = stringifyString.stringifyString({ type, value }, {\n implicitKey: implicitKey || indent === null,\n indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n switch (source[0]) {\n case '|':\n case '>':\n setBlockScalarValue(token, source);\n break;\n case '\"':\n setFlowScalarValue(token, source, 'double-quoted-scalar');\n break;\n case \"'\":\n setFlowScalarValue(token, source, 'single-quoted-scalar');\n break;\n default:\n setFlowScalarValue(token, source, 'scalar');\n }\n}\nfunction setBlockScalarValue(token, source) {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n if (token.type === 'block-scalar') {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n header.source = head;\n token.source = body;\n }\n else {\n const { offset } = token;\n const indent = 'indent' in token ? token.indent : -1;\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type: 'block-scalar', indent, props, source: body });\n }\n}\n/** @returns `true` if last token is a newline */\nfunction addEndtoBlockProps(props, end) {\n if (end)\n for (const st of end)\n switch (st.type) {\n case 'space':\n case 'comment':\n props.push(st);\n break;\n case 'newline':\n props.push(st);\n return true;\n }\n return false;\n}\nfunction setFlowScalarValue(token, source, type) {\n switch (token.type) {\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n token.type = type;\n token.source = source;\n break;\n case 'block-scalar': {\n const end = token.props.slice(1);\n let oa = source.length;\n if (token.props[0].type === 'block-scalar-header')\n oa -= token.props[0].source.length;\n for (const tok of end)\n tok.offset += oa;\n delete token.props;\n Object.assign(token, { type, source, end });\n break;\n }\n case 'block-map':\n case 'block-seq': {\n const offset = token.offset + source.length;\n const nl = { type: 'newline', offset, indent: token.indent, source: '\\n' };\n delete token.items;\n Object.assign(token, { type, source, end: [nl] });\n break;\n }\n default: {\n const indent = 'indent' in token ? token.indent : -1;\n const end = 'end' in token && Array.isArray(token.end)\n ? token.end.filter(st => st.type === 'space' ||\n st.type === 'comment' ||\n st.type === 'newline')\n : [];\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type, indent, source, end });\n }\n }\n}\n\nexports.createScalarToken = createScalarToken;\nexports.resolveAsScalar = resolveAsScalar;\nexports.setScalarValue = setScalarValue;\n","'use strict';\n\n/**\n * Stringify a CST document, token, or collection item\n *\n * Fair warning: This applies no validation whatsoever, and\n * simply concatenates the sources in their logical order.\n */\nconst stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);\nfunction stringifyToken(token) {\n switch (token.type) {\n case 'block-scalar': {\n let res = '';\n for (const tok of token.props)\n res += stringifyToken(tok);\n return res + token.source;\n }\n case 'block-map':\n case 'block-seq': {\n let res = '';\n for (const item of token.items)\n res += stringifyItem(item);\n return res;\n }\n case 'flow-collection': {\n let res = token.start.source;\n for (const item of token.items)\n res += stringifyItem(item);\n for (const st of token.end)\n res += st.source;\n return res;\n }\n case 'document': {\n let res = stringifyItem(token);\n if (token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n default: {\n let res = token.source;\n if ('end' in token && token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n }\n}\nfunction stringifyItem({ start, key, sep, value }) {\n let res = '';\n for (const st of start)\n res += st.source;\n if (key)\n res += stringifyToken(key);\n if (sep)\n for (const st of sep)\n res += st.source;\n if (value)\n res += stringifyToken(value);\n return res;\n}\n\nexports.stringify = stringify;\n","'use strict';\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove item');\n/**\n * Apply a visitor to a CST document or item.\n *\n * Walks through the tree (depth-first) starting from the root, calling a\n * `visitor` function with two arguments when entering each item:\n * - `item`: The current item, which included the following members:\n * - `start: SourceToken[]` – Source tokens before the key or value,\n * possibly including its anchor or tag.\n * - `key?: Token | null` – Set for pair values. May then be `null`, if\n * the key before the `:` separator is empty.\n * - `sep?: SourceToken[]` – Source tokens between the key and the value,\n * which should include the `:` map value indicator if `value` is set.\n * - `value?: Token` – The value of a sequence item, or of a map pair.\n * - `path`: The steps from the root to the current node, as an array of\n * `['key' | 'value', number]` tuples.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this token, continue with\n * next sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current item, then continue with the next one\n * - `number`: Set the index of the next step. This is useful especially if\n * the index of the current token has changed.\n * - `function`: Define the next visitor for this item. After the original\n * visitor is called on item entry, next visitors are called after handling\n * a non-empty `key` and when exiting the item.\n */\nfunction visit(cst, visitor) {\n if ('type' in cst && cst.type === 'document')\n cst = { start: cst.start, value: cst.value };\n _visit(Object.freeze([]), cst, visitor);\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current item */\nvisit.SKIP = SKIP;\n/** Remove the current item */\nvisit.REMOVE = REMOVE;\n/** Find the item at `path` from `cst` as the root */\nvisit.itemAtPath = (cst, path) => {\n let item = cst;\n for (const [field, index] of path) {\n const tok = item?.[field];\n if (tok && 'items' in tok) {\n item = tok.items[index];\n }\n else\n return undefined;\n }\n return item;\n};\n/**\n * Get the immediate parent collection of the item at `path` from `cst` as the root.\n *\n * Throws an error if the collection is not found, which should never happen if the item itself exists.\n */\nvisit.parentCollection = (cst, path) => {\n const parent = visit.itemAtPath(cst, path.slice(0, -1));\n const field = path[path.length - 1][0];\n const coll = parent?.[field];\n if (coll && 'items' in coll)\n return coll;\n throw new Error('Parent collection not found');\n};\nfunction _visit(path, item, visitor) {\n let ctrl = visitor(item, path);\n if (typeof ctrl === 'symbol')\n return ctrl;\n for (const field of ['key', 'value']) {\n const token = item[field];\n if (token && 'items' in token) {\n for (let i = 0; i < token.items.length; ++i) {\n const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n token.items.splice(i, 1);\n i -= 1;\n }\n }\n if (typeof ctrl === 'function' && field === 'key')\n ctrl = ctrl(item, path);\n }\n }\n return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;\n}\n\nexports.visit = visit;\n","'use strict';\n\nvar cstScalar = require('./cst-scalar.js');\nvar cstStringify = require('./cst-stringify.js');\nvar cstVisit = require('./cst-visit.js');\n\n/** The byte order mark */\nconst BOM = '\\u{FEFF}';\n/** Start of doc-mode */\nconst DOCUMENT = '\\x02'; // C0: Start of Text\n/** Unexpected end of flow-mode */\nconst FLOW_END = '\\x18'; // C0: Cancel\n/** Next token is a scalar value */\nconst SCALAR = '\\x1f'; // C0: Unit Separator\n/** @returns `true` if `token` is a flow or block collection */\nconst isCollection = (token) => !!token && 'items' in token;\n/** @returns `true` if `token` is a flow or block scalar; not an alias */\nconst isScalar = (token) => !!token &&\n (token.type === 'scalar' ||\n token.type === 'single-quoted-scalar' ||\n token.type === 'double-quoted-scalar' ||\n token.type === 'block-scalar');\n/* istanbul ignore next */\n/** Get a printable representation of a lexer token */\nfunction prettyToken(token) {\n switch (token) {\n case BOM:\n return '<BOM>';\n case DOCUMENT:\n return '<DOC>';\n case FLOW_END:\n return '<FLOW_END>';\n case SCALAR:\n return '<SCALAR>';\n default:\n return JSON.stringify(token);\n }\n}\n/** Identify the type of a lexer token. May return `null` for unknown tokens. */\nfunction tokenType(source) {\n switch (source) {\n case BOM:\n return 'byte-order-mark';\n case DOCUMENT:\n return 'doc-mode';\n case FLOW_END:\n return 'flow-error-end';\n case SCALAR:\n return 'scalar';\n case '---':\n return 'doc-start';\n case '...':\n return 'doc-end';\n case '':\n case '\\n':\n case '\\r\\n':\n return 'newline';\n case '-':\n return 'seq-item-ind';\n case '?':\n return 'explicit-key-ind';\n case ':':\n return 'map-value-ind';\n case '{':\n return 'flow-map-start';\n case '}':\n return 'flow-map-end';\n case '[':\n return 'flow-seq-start';\n case ']':\n return 'flow-seq-end';\n case ',':\n return 'comma';\n }\n switch (source[0]) {\n case ' ':\n case '\\t':\n return 'space';\n case '#':\n return 'comment';\n case '%':\n return 'directive-line';\n case '*':\n return 'alias';\n case '&':\n return 'anchor';\n case '!':\n return 'tag';\n case \"'\":\n return 'single-quoted-scalar';\n case '\"':\n return 'double-quoted-scalar';\n case '|':\n case '>':\n return 'block-scalar-header';\n }\n return null;\n}\n\nexports.createScalarToken = cstScalar.createScalarToken;\nexports.resolveAsScalar = cstScalar.resolveAsScalar;\nexports.setScalarValue = cstScalar.setScalarValue;\nexports.stringify = cstStringify.stringify;\nexports.visit = cstVisit.visit;\nexports.BOM = BOM;\nexports.DOCUMENT = DOCUMENT;\nexports.FLOW_END = FLOW_END;\nexports.SCALAR = SCALAR;\nexports.isCollection = isCollection;\nexports.isScalar = isScalar;\nexports.prettyToken = prettyToken;\nexports.tokenType = tokenType;\n","'use strict';\n\nvar cst = require('./cst.js');\n\n/*\nSTART -> stream\n\nstream\n directive -> line-end -> stream\n indent + line-end -> stream\n [else] -> line-start\n\nline-end\n comment -> line-end\n newline -> .\n input-end -> END\n\nline-start\n doc-start -> doc\n doc-end -> stream\n [else] -> indent -> block-start\n\nblock-start\n seq-item-start -> block-start\n explicit-key-start -> block-start\n map-value-start -> block-start\n [else] -> doc\n\ndoc\n line-end -> line-start\n spaces -> doc\n anchor -> doc\n tag -> doc\n flow-start -> flow -> doc\n flow-end -> error -> doc\n seq-item-start -> error -> doc\n explicit-key-start -> error -> doc\n map-value-start -> doc\n alias -> doc\n quote-start -> quoted-scalar -> doc\n block-scalar-header -> line-end -> block-scalar(min) -> line-start\n [else] -> plain-scalar(false, min) -> doc\n\nflow\n line-end -> flow\n spaces -> flow\n anchor -> flow\n tag -> flow\n flow-start -> flow -> flow\n flow-end -> .\n seq-item-start -> error -> flow\n explicit-key-start -> flow\n map-value-start -> flow\n alias -> flow\n quote-start -> quoted-scalar -> flow\n comma -> flow\n [else] -> plain-scalar(true, 0) -> flow\n\nquoted-scalar\n quote-end -> .\n [else] -> quoted-scalar\n\nblock-scalar(min)\n newline + peek(indent < min) -> .\n [else] -> block-scalar(min)\n\nplain-scalar(is-flow, min)\n scalar-end(is-flow) -> .\n peek(newline + (indent < min)) -> .\n [else] -> plain-scalar(min)\n*/\nfunction isEmpty(ch) {\n switch (ch) {\n case undefined:\n case ' ':\n case '\\n':\n case '\\r':\n case '\\t':\n return true;\n default:\n return false;\n }\n}\nconst hexDigits = new Set('0123456789ABCDEFabcdef');\nconst tagChars = new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\");\nconst flowIndicatorChars = new Set(',[]{}');\nconst invalidAnchorChars = new Set(' ,[]{}\\n\\r\\t');\nconst isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch);\n/**\n * Splits an input string into lexical tokens, i.e. smaller strings that are\n * easily identifiable by `tokens.tokenType()`.\n *\n * Lexing starts always in a \"stream\" context. Incomplete input may be buffered\n * until a complete token can be emitted.\n *\n * In addition to slices of the original input, the following control characters\n * may also be emitted:\n *\n * - `\\x02` (Start of Text): A document starts with the next token\n * - `\\x18` (Cancel): Unexpected end of flow-mode (indicates an error)\n * - `\\x1f` (Unit Separator): Next token is a scalar value\n * - `\\u{FEFF}` (Byte order mark): Emitted separately outside documents\n */\nclass Lexer {\n constructor() {\n /**\n * Flag indicating whether the end of the current buffer marks the end of\n * all input\n */\n this.atEnd = false;\n /**\n * Explicit indent set in block scalar header, as an offset from the current\n * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not\n * explicitly set.\n */\n this.blockScalarIndent = -1;\n /**\n * Block scalars that include a + (keep) chomping indicator in their header\n * include trailing empty lines, which are otherwise excluded from the\n * scalar's contents.\n */\n this.blockScalarKeep = false;\n /** Current input */\n this.buffer = '';\n /**\n * Flag noting whether the map value indicator : can immediately follow this\n * node within a flow context.\n */\n this.flowKey = false;\n /** Count of surrounding flow collection levels. */\n this.flowLevel = 0;\n /**\n * Minimum level of indentation required for next lines to be parsed as a\n * part of the current scalar value.\n */\n this.indentNext = 0;\n /** Indentation level of the current line. */\n this.indentValue = 0;\n /** Position of the next \\n character. */\n this.lineEndPos = null;\n /** Stores the state of the lexer if reaching the end of incpomplete input */\n this.next = null;\n /** A pointer to `buffer`; the current position of the lexer. */\n this.pos = 0;\n }\n /**\n * Generate YAML tokens from the `source` string. If `incomplete`,\n * a part of the last line may be left as a buffer for the next call.\n *\n * @returns A generator of lexical tokens\n */\n *lex(source, incomplete = false) {\n if (source) {\n if (typeof source !== 'string')\n throw TypeError('source is not a string');\n this.buffer = this.buffer ? this.buffer + source : source;\n this.lineEndPos = null;\n }\n this.atEnd = !incomplete;\n let next = this.next ?? 'stream';\n while (next && (incomplete || this.hasChars(1)))\n next = yield* this.parseNext(next);\n }\n atLineEnd() {\n let i = this.pos;\n let ch = this.buffer[i];\n while (ch === ' ' || ch === '\\t')\n ch = this.buffer[++i];\n if (!ch || ch === '#' || ch === '\\n')\n return true;\n if (ch === '\\r')\n return this.buffer[i + 1] === '\\n';\n return false;\n }\n charAt(n) {\n return this.buffer[this.pos + n];\n }\n continueScalar(offset) {\n let ch = this.buffer[offset];\n if (this.indentNext > 0) {\n let indent = 0;\n while (ch === ' ')\n ch = this.buffer[++indent + offset];\n if (ch === '\\r') {\n const next = this.buffer[indent + offset + 1];\n if (next === '\\n' || (!next && !this.atEnd))\n return offset + indent + 1;\n }\n return ch === '\\n' || indent >= this.indentNext || (!ch && !this.atEnd)\n ? offset + indent\n : -1;\n }\n if (ch === '-' || ch === '.') {\n const dt = this.buffer.substr(offset, 3);\n if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))\n return -1;\n }\n return offset;\n }\n getLine() {\n let end = this.lineEndPos;\n if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {\n end = this.buffer.indexOf('\\n', this.pos);\n this.lineEndPos = end;\n }\n if (end === -1)\n return this.atEnd ? this.buffer.substring(this.pos) : null;\n if (this.buffer[end - 1] === '\\r')\n end -= 1;\n return this.buffer.substring(this.pos, end);\n }\n hasChars(n) {\n return this.pos + n <= this.buffer.length;\n }\n setNext(state) {\n this.buffer = this.buffer.substring(this.pos);\n this.pos = 0;\n this.lineEndPos = null;\n this.next = state;\n return null;\n }\n peek(n) {\n return this.buffer.substr(this.pos, n);\n }\n *parseNext(next) {\n switch (next) {\n case 'stream':\n return yield* this.parseStream();\n case 'line-start':\n return yield* this.parseLineStart();\n case 'block-start':\n return yield* this.parseBlockStart();\n case 'doc':\n return yield* this.parseDocument();\n case 'flow':\n return yield* this.parseFlowCollection();\n case 'quoted-scalar':\n return yield* this.parseQuotedScalar();\n case 'block-scalar':\n return yield* this.parseBlockScalar();\n case 'plain-scalar':\n return yield* this.parsePlainScalar();\n }\n }\n *parseStream() {\n let line = this.getLine();\n if (line === null)\n return this.setNext('stream');\n if (line[0] === cst.BOM) {\n yield* this.pushCount(1);\n line = line.substring(1);\n }\n if (line[0] === '%') {\n let dirEnd = line.length;\n let cs = line.indexOf('#');\n while (cs !== -1) {\n const ch = line[cs - 1];\n if (ch === ' ' || ch === '\\t') {\n dirEnd = cs - 1;\n break;\n }\n else {\n cs = line.indexOf('#', cs + 1);\n }\n }\n while (true) {\n const ch = line[dirEnd - 1];\n if (ch === ' ' || ch === '\\t')\n dirEnd -= 1;\n else\n break;\n }\n const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n yield* this.pushCount(line.length - n); // possible comment\n this.pushNewline();\n return 'stream';\n }\n if (this.atLineEnd()) {\n const sp = yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - sp);\n yield* this.pushNewline();\n return 'stream';\n }\n yield cst.DOCUMENT;\n return yield* this.parseLineStart();\n }\n *parseLineStart() {\n const ch = this.charAt(0);\n if (!ch && !this.atEnd)\n return this.setNext('line-start');\n if (ch === '-' || ch === '.') {\n if (!this.atEnd && !this.hasChars(4))\n return this.setNext('line-start');\n const s = this.peek(3);\n if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n this.indentValue = 0;\n this.indentNext = 0;\n return s === '---' ? 'doc' : 'stream';\n }\n }\n this.indentValue = yield* this.pushSpaces(false);\n if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n this.indentNext = this.indentValue;\n return yield* this.parseBlockStart();\n }\n *parseBlockStart() {\n const [ch0, ch1] = this.peek(2);\n if (!ch1 && !this.atEnd)\n return this.setNext('block-start');\n if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {\n const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n this.indentNext = this.indentValue + 1;\n this.indentValue += n;\n return 'block-start';\n }\n return 'doc';\n }\n *parseDocument() {\n yield* this.pushSpaces(true);\n const line = this.getLine();\n if (line === null)\n return this.setNext('doc');\n let n = yield* this.pushIndicators();\n switch (line[n]) {\n case '#':\n yield* this.pushCount(line.length - n);\n // fallthrough\n case undefined:\n yield* this.pushNewline();\n return yield* this.parseLineStart();\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel = 1;\n return 'flow';\n case '}':\n case ']':\n // this is an error\n yield* this.pushCount(1);\n return 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'doc';\n case '\"':\n case \"'\":\n return yield* this.parseQuotedScalar();\n case '|':\n case '>':\n n += yield* this.parseBlockScalarHeader();\n n += yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - n);\n yield* this.pushNewline();\n return yield* this.parseBlockScalar();\n default:\n return yield* this.parsePlainScalar();\n }\n }\n *parseFlowCollection() {\n let nl, sp;\n let indent = -1;\n do {\n nl = yield* this.pushNewline();\n if (nl > 0) {\n sp = yield* this.pushSpaces(false);\n this.indentValue = indent = sp;\n }\n else {\n sp = 0;\n }\n sp += yield* this.pushSpaces(true);\n } while (nl + sp > 0);\n const line = this.getLine();\n if (line === null)\n return this.setNext('flow');\n if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||\n (indent === 0 &&\n (line.startsWith('---') || line.startsWith('...')) &&\n isEmpty(line[3]))) {\n // Allowing for the terminal ] or } at the same (rather than greater)\n // indent level as the initial [ or { is technically invalid, but\n // failing here would be surprising to users.\n const atFlowEndMarker = indent === this.indentNext - 1 &&\n this.flowLevel === 1 &&\n (line[0] === ']' || line[0] === '}');\n if (!atFlowEndMarker) {\n // this is an error\n this.flowLevel = 0;\n yield cst.FLOW_END;\n return yield* this.parseLineStart();\n }\n }\n let n = 0;\n while (line[n] === ',') {\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n this.flowKey = false;\n }\n n += yield* this.pushIndicators();\n switch (line[n]) {\n case undefined:\n return 'flow';\n case '#':\n yield* this.pushCount(line.length - n);\n return 'flow';\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel += 1;\n return 'flow';\n case '}':\n case ']':\n yield* this.pushCount(1);\n this.flowKey = true;\n this.flowLevel -= 1;\n return this.flowLevel ? 'flow' : 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'flow';\n case '\"':\n case \"'\":\n this.flowKey = true;\n return yield* this.parseQuotedScalar();\n case ':': {\n const next = this.charAt(1);\n if (this.flowKey || isEmpty(next) || next === ',') {\n this.flowKey = false;\n yield* this.pushCount(1);\n yield* this.pushSpaces(true);\n return 'flow';\n }\n }\n // fallthrough\n default:\n this.flowKey = false;\n return yield* this.parsePlainScalar();\n }\n }\n *parseQuotedScalar() {\n const quote = this.charAt(0);\n let end = this.buffer.indexOf(quote, this.pos + 1);\n if (quote === \"'\") {\n while (end !== -1 && this.buffer[end + 1] === \"'\")\n end = this.buffer.indexOf(\"'\", end + 2);\n }\n else {\n // double-quote\n while (end !== -1) {\n let n = 0;\n while (this.buffer[end - 1 - n] === '\\\\')\n n += 1;\n if (n % 2 === 0)\n break;\n end = this.buffer.indexOf('\"', end + 1);\n }\n }\n // Only looking for newlines within the quotes\n const qb = this.buffer.substring(0, end);\n let nl = qb.indexOf('\\n', this.pos);\n if (nl !== -1) {\n while (nl !== -1) {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = qb.indexOf('\\n', cs);\n }\n if (nl !== -1) {\n // this is an error caused by an unexpected unindent\n end = nl - (qb[nl - 1] === '\\r' ? 2 : 1);\n }\n }\n if (end === -1) {\n if (!this.atEnd)\n return this.setNext('quoted-scalar');\n end = this.buffer.length;\n }\n yield* this.pushToIndex(end + 1, false);\n return this.flowLevel ? 'flow' : 'doc';\n }\n *parseBlockScalarHeader() {\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n let i = this.pos;\n while (true) {\n const ch = this.buffer[++i];\n if (ch === '+')\n this.blockScalarKeep = true;\n else if (ch > '0' && ch <= '9')\n this.blockScalarIndent = Number(ch) - 1;\n else if (ch !== '-')\n break;\n }\n return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');\n }\n *parseBlockScalar() {\n let nl = this.pos - 1; // may be -1 if this.pos === 0\n let indent = 0;\n let ch;\n loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {\n switch (ch) {\n case ' ':\n indent += 1;\n break;\n case '\\n':\n nl = i;\n indent = 0;\n break;\n case '\\r': {\n const next = this.buffer[i + 1];\n if (!next && !this.atEnd)\n return this.setNext('block-scalar');\n if (next === '\\n')\n break;\n } // fallthrough\n default:\n break loop;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('block-scalar');\n if (indent >= this.indentNext) {\n if (this.blockScalarIndent === -1)\n this.indentNext = indent;\n else {\n this.indentNext =\n this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);\n }\n do {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = this.buffer.indexOf('\\n', cs);\n } while (nl !== -1);\n if (nl === -1) {\n if (!this.atEnd)\n return this.setNext('block-scalar');\n nl = this.buffer.length;\n }\n }\n // Trailing insufficiently indented tabs are invalid.\n // To catch that during parsing, we include them in the block scalar value.\n let i = nl + 1;\n ch = this.buffer[i];\n while (ch === ' ')\n ch = this.buffer[++i];\n if (ch === '\\t') {\n while (ch === '\\t' || ch === ' ' || ch === '\\r' || ch === '\\n')\n ch = this.buffer[++i];\n nl = i - 1;\n }\n else if (!this.blockScalarKeep) {\n do {\n let i = nl - 1;\n let ch = this.buffer[i];\n if (ch === '\\r')\n ch = this.buffer[--i];\n const lastChar = i; // Drop the line if last char not more indented\n while (ch === ' ')\n ch = this.buffer[--i];\n if (ch === '\\n' && i >= this.pos && i + 1 + indent > lastChar)\n nl = i;\n else\n break;\n } while (true);\n }\n yield cst.SCALAR;\n yield* this.pushToIndex(nl + 1, true);\n return yield* this.parseLineStart();\n }\n *parsePlainScalar() {\n const inFlow = this.flowLevel > 0;\n let end = this.pos - 1;\n let i = this.pos - 1;\n let ch;\n while ((ch = this.buffer[++i])) {\n if (ch === ':') {\n const next = this.buffer[i + 1];\n if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next)))\n break;\n end = i;\n }\n else if (isEmpty(ch)) {\n let next = this.buffer[i + 1];\n if (ch === '\\r') {\n if (next === '\\n') {\n i += 1;\n ch = '\\n';\n next = this.buffer[i + 1];\n }\n else\n end = i;\n }\n if (next === '#' || (inFlow && flowIndicatorChars.has(next)))\n break;\n if (ch === '\\n') {\n const cs = this.continueScalar(i + 1);\n if (cs === -1)\n break;\n i = Math.max(i, cs - 2); // to advance, but still account for ' #'\n }\n }\n else {\n if (inFlow && flowIndicatorChars.has(ch))\n break;\n end = i;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('plain-scalar');\n yield cst.SCALAR;\n yield* this.pushToIndex(end + 1, true);\n return inFlow ? 'flow' : 'doc';\n }\n *pushCount(n) {\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos += n;\n return n;\n }\n return 0;\n }\n *pushToIndex(i, allowEmpty) {\n const s = this.buffer.slice(this.pos, i);\n if (s) {\n yield s;\n this.pos += s.length;\n return s.length;\n }\n else if (allowEmpty)\n yield '';\n return 0;\n }\n *pushIndicators() {\n let n = 0;\n loop: while (true) {\n switch (this.charAt(0)) {\n case '!':\n n += yield* this.pushTag();\n n += yield* this.pushSpaces(true);\n continue loop;\n case '&':\n n += yield* this.pushUntil(isNotAnchorChar);\n n += yield* this.pushSpaces(true);\n continue loop;\n case '-': // this is an error\n case '?': // this is an error outside flow collections\n case ':': {\n const inFlow = this.flowLevel > 0;\n const ch1 = this.charAt(1);\n if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) {\n if (!inFlow)\n this.indentNext = this.indentValue + 1;\n else if (this.flowKey)\n this.flowKey = false;\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n continue loop;\n }\n }\n }\n break loop;\n }\n return n;\n }\n *pushTag() {\n if (this.charAt(1) === '<') {\n let i = this.pos + 2;\n let ch = this.buffer[i];\n while (!isEmpty(ch) && ch !== '>')\n ch = this.buffer[++i];\n return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);\n }\n else {\n let i = this.pos + 1;\n let ch = this.buffer[i];\n while (ch) {\n if (tagChars.has(ch))\n ch = this.buffer[++i];\n else if (ch === '%' &&\n hexDigits.has(this.buffer[i + 1]) &&\n hexDigits.has(this.buffer[i + 2])) {\n ch = this.buffer[(i += 3)];\n }\n else\n break;\n }\n return yield* this.pushToIndex(i, false);\n }\n }\n *pushNewline() {\n const ch = this.buffer[this.pos];\n if (ch === '\\n')\n return yield* this.pushCount(1);\n else if (ch === '\\r' && this.charAt(1) === '\\n')\n return yield* this.pushCount(2);\n else\n return 0;\n }\n *pushSpaces(allowTabs) {\n let i = this.pos - 1;\n let ch;\n do {\n ch = this.buffer[++i];\n } while (ch === ' ' || (allowTabs && ch === '\\t'));\n const n = i - this.pos;\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos = i;\n }\n return n;\n }\n *pushUntil(test) {\n let i = this.pos;\n let ch = this.buffer[i];\n while (!test(ch))\n ch = this.buffer[++i];\n return yield* this.pushToIndex(i, false);\n }\n}\n\nexports.Lexer = Lexer;\n","'use strict';\n\n/**\n * Tracks newlines during parsing in order to provide an efficient API for\n * determining the one-indexed `{ line, col }` position for any offset\n * within the input.\n */\nclass LineCounter {\n constructor() {\n this.lineStarts = [];\n /**\n * Should be called in ascending order. Otherwise, call\n * `lineCounter.lineStarts.sort()` before calling `linePos()`.\n */\n this.addNewLine = (offset) => this.lineStarts.push(offset);\n /**\n * Performs a binary search and returns the 1-indexed { line, col }\n * position of `offset`. If `line === 0`, `addNewLine` has never been\n * called or `offset` is before the first known newline.\n */\n this.linePos = (offset) => {\n let low = 0;\n let high = this.lineStarts.length;\n while (low < high) {\n const mid = (low + high) >> 1; // Math.floor((low + high) / 2)\n if (this.lineStarts[mid] < offset)\n low = mid + 1;\n else\n high = mid;\n }\n if (this.lineStarts[low] === offset)\n return { line: low + 1, col: 1 };\n if (low === 0)\n return { line: 0, col: offset };\n const start = this.lineStarts[low - 1];\n return { line: low, col: offset - start + 1 };\n };\n }\n}\n\nexports.LineCounter = LineCounter;\n","'use strict';\n\nvar node_process = require('process');\nvar cst = require('./cst.js');\nvar lexer = require('./lexer.js');\n\nfunction includesToken(list, type) {\n for (let i = 0; i < list.length; ++i)\n if (list[i].type === type)\n return true;\n return false;\n}\nfunction findNonEmptyIndex(list) {\n for (let i = 0; i < list.length; ++i) {\n switch (list[i].type) {\n case 'space':\n case 'comment':\n case 'newline':\n break;\n default:\n return i;\n }\n }\n return -1;\n}\nfunction isFlowToken(token) {\n switch (token?.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'flow-collection':\n return true;\n default:\n return false;\n }\n}\nfunction getPrevProps(parent) {\n switch (parent.type) {\n case 'document':\n return parent.start;\n case 'block-map': {\n const it = parent.items[parent.items.length - 1];\n return it.sep ?? it.start;\n }\n case 'block-seq':\n return parent.items[parent.items.length - 1].start;\n /* istanbul ignore next should not happen */\n default:\n return [];\n }\n}\n/** Note: May modify input array */\nfunction getFirstKeyStartProps(prev) {\n if (prev.length === 0)\n return [];\n let i = prev.length;\n loop: while (--i >= 0) {\n switch (prev[i].type) {\n case 'doc-start':\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n case 'newline':\n break loop;\n }\n }\n while (prev[++i]?.type === 'space') {\n /* loop */\n }\n return prev.splice(i, prev.length);\n}\nfunction arrayPushArray(target, source) {\n // May exhaust call stack with large `source` array\n if (source.length < 1e5)\n Array.prototype.push.apply(target, source);\n else\n for (let i = 0; i < source.length; ++i)\n target.push(source[i]);\n}\nfunction fixFlowSeqItems(fc) {\n if (fc.start.type === 'flow-seq-start') {\n for (const it of fc.items) {\n if (it.sep &&\n !it.value &&\n !includesToken(it.start, 'explicit-key-ind') &&\n !includesToken(it.sep, 'map-value-ind')) {\n if (it.key)\n it.value = it.key;\n delete it.key;\n if (isFlowToken(it.value)) {\n if (it.value.end)\n arrayPushArray(it.value.end, it.sep);\n else\n it.value.end = it.sep;\n }\n else\n arrayPushArray(it.start, it.sep);\n delete it.sep;\n }\n }\n }\n}\n/**\n * A YAML concrete syntax tree (CST) parser\n *\n * ```ts\n * const src: string = ...\n * for (const token of new Parser().parse(src)) {\n * // token: Token\n * }\n * ```\n *\n * To use the parser with a user-provided lexer:\n *\n * ```ts\n * function* parse(source: string, lexer: Lexer) {\n * const parser = new Parser()\n * for (const lexeme of lexer.lex(source))\n * yield* parser.next(lexeme)\n * yield* parser.end()\n * }\n *\n * const src: string = ...\n * const lexer = new Lexer()\n * for (const token of parse(src, lexer)) {\n * // token: Token\n * }\n * ```\n */\nclass Parser {\n /**\n * @param onNewLine - If defined, called separately with the start position of\n * each new line (in `parse()`, including the start of input).\n */\n constructor(onNewLine) {\n /** If true, space and sequence indicators count as indentation */\n this.atNewLine = true;\n /** If true, next token is a scalar value */\n this.atScalar = false;\n /** Current indentation level */\n this.indent = 0;\n /** Current offset since the start of parsing */\n this.offset = 0;\n /** On the same line with a block map key */\n this.onKeyLine = false;\n /** Top indicates the node that's currently being built */\n this.stack = [];\n /** The source of the current token, set in parse() */\n this.source = '';\n /** The type of the current token, set in parse() */\n this.type = '';\n // Must be defined after `next()`\n this.lexer = new lexer.Lexer();\n this.onNewLine = onNewLine;\n }\n /**\n * Parse `source` as a YAML stream.\n * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n *\n * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n *\n * @returns A generator of tokens representing each directive, document, and other structure.\n */\n *parse(source, incomplete = false) {\n if (this.onNewLine && this.offset === 0)\n this.onNewLine(0);\n for (const lexeme of this.lexer.lex(source, incomplete))\n yield* this.next(lexeme);\n if (!incomplete)\n yield* this.end();\n }\n /**\n * Advance the parser by the `source` of one lexical token.\n */\n *next(source) {\n this.source = source;\n if (node_process.env.LOG_TOKENS)\n console.log('|', cst.prettyToken(source));\n if (this.atScalar) {\n this.atScalar = false;\n yield* this.step();\n this.offset += source.length;\n return;\n }\n const type = cst.tokenType(source);\n if (!type) {\n const message = `Not a YAML token: ${source}`;\n yield* this.pop({ type: 'error', offset: this.offset, message, source });\n this.offset += source.length;\n }\n else if (type === 'scalar') {\n this.atNewLine = false;\n this.atScalar = true;\n this.type = 'scalar';\n }\n else {\n this.type = type;\n yield* this.step();\n switch (type) {\n case 'newline':\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine)\n this.onNewLine(this.offset + source.length);\n break;\n case 'space':\n if (this.atNewLine && source[0] === ' ')\n this.indent += source.length;\n break;\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n if (this.atNewLine)\n this.indent += source.length;\n break;\n case 'doc-mode':\n case 'flow-error-end':\n return;\n default:\n this.atNewLine = false;\n }\n this.offset += source.length;\n }\n }\n /** Call at end of input to push out any remaining constructions */\n *end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }\n get sourceToken() {\n const st = {\n type: this.type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n return st;\n }\n *step() {\n const top = this.peek(1);\n if (this.type === 'doc-end' && top?.type !== 'doc-end') {\n while (this.stack.length > 0)\n yield* this.pop();\n this.stack.push({\n type: 'doc-end',\n offset: this.offset,\n source: this.source\n });\n return;\n }\n if (!top)\n return yield* this.stream();\n switch (top.type) {\n case 'document':\n return yield* this.document(top);\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return yield* this.scalar(top);\n case 'block-scalar':\n return yield* this.blockScalar(top);\n case 'block-map':\n return yield* this.blockMap(top);\n case 'block-seq':\n return yield* this.blockSequence(top);\n case 'flow-collection':\n return yield* this.flowCollection(top);\n case 'doc-end':\n return yield* this.documentEnd(top);\n }\n /* istanbul ignore next should not happen */\n yield* this.pop();\n }\n peek(n) {\n return this.stack[this.stack.length - n];\n }\n *pop(error) {\n const token = error ?? this.stack.pop();\n /* istanbul ignore if should not happen */\n if (!token) {\n const message = 'Tried to pop an empty stack';\n yield { type: 'error', offset: this.offset, source: '', message };\n }\n else if (this.stack.length === 0) {\n yield token;\n }\n else {\n const top = this.peek(1);\n if (token.type === 'block-scalar') {\n // Block scalars use their parent rather than header indent\n token.indent = 'indent' in top ? top.indent : 0;\n }\n else if (token.type === 'flow-collection' && top.type === 'document') {\n // Ignore all indent for top-level flow collections\n token.indent = 0;\n }\n if (token.type === 'flow-collection')\n fixFlowSeqItems(token);\n switch (top.type) {\n case 'document':\n top.value = token;\n break;\n case 'block-scalar':\n top.props.push(token); // error\n break;\n case 'block-map': {\n const it = top.items[top.items.length - 1];\n if (it.value) {\n top.items.push({ start: [], key: token, sep: [] });\n this.onKeyLine = true;\n return;\n }\n else if (it.sep) {\n it.value = token;\n }\n else {\n Object.assign(it, { key: token, sep: [] });\n this.onKeyLine = !it.explicitKey;\n return;\n }\n break;\n }\n case 'block-seq': {\n const it = top.items[top.items.length - 1];\n if (it.value)\n top.items.push({ start: [], value: token });\n else\n it.value = token;\n break;\n }\n case 'flow-collection': {\n const it = top.items[top.items.length - 1];\n if (!it || it.value)\n top.items.push({ start: [], key: token, sep: [] });\n else if (it.sep)\n it.value = token;\n else\n Object.assign(it, { key: token, sep: [] });\n return;\n }\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.pop(token);\n }\n if ((top.type === 'document' ||\n top.type === 'block-map' ||\n top.type === 'block-seq') &&\n (token.type === 'block-map' || token.type === 'block-seq')) {\n const last = token.items[token.items.length - 1];\n if (last &&\n !last.sep &&\n !last.value &&\n last.start.length > 0 &&\n findNonEmptyIndex(last.start) === -1 &&\n (token.indent === 0 ||\n last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {\n if (top.type === 'document')\n top.end = last.start;\n else\n top.items.push({ start: last.start });\n token.items.splice(-1, 1);\n }\n }\n }\n }\n *stream() {\n switch (this.type) {\n case 'directive-line':\n yield { type: 'directive', offset: this.offset, source: this.source };\n return;\n case 'byte-order-mark':\n case 'space':\n case 'comment':\n case 'newline':\n yield this.sourceToken;\n return;\n case 'doc-mode':\n case 'doc-start': {\n const doc = {\n type: 'document',\n offset: this.offset,\n start: []\n };\n if (this.type === 'doc-start')\n doc.start.push(this.sourceToken);\n this.stack.push(doc);\n return;\n }\n }\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML stream`,\n source: this.source\n };\n }\n *document(doc) {\n if (doc.value)\n return yield* this.lineEnd(doc);\n switch (this.type) {\n case 'doc-start': {\n if (findNonEmptyIndex(doc.start) !== -1) {\n yield* this.pop();\n yield* this.step();\n }\n else\n doc.start.push(this.sourceToken);\n return;\n }\n case 'anchor':\n case 'tag':\n case 'space':\n case 'comment':\n case 'newline':\n doc.start.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(doc);\n if (bv)\n this.stack.push(bv);\n else {\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML document`,\n source: this.source\n };\n }\n }\n *scalar(scalar) {\n if (this.type === 'map-value-ind') {\n const prev = getPrevProps(this.peek(2));\n const start = getFirstKeyStartProps(prev);\n let sep;\n if (scalar.end) {\n sep = scalar.end;\n sep.push(this.sourceToken);\n delete scalar.end;\n }\n else\n sep = [this.sourceToken];\n const map = {\n type: 'block-map',\n offset: scalar.offset,\n indent: scalar.indent,\n items: [{ start, key: scalar, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else\n yield* this.lineEnd(scalar);\n }\n *blockScalar(scalar) {\n switch (this.type) {\n case 'space':\n case 'comment':\n case 'newline':\n scalar.props.push(this.sourceToken);\n return;\n case 'scalar':\n scalar.source = this.source;\n // block-scalar source includes trailing newline\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n yield* this.pop();\n break;\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.step();\n }\n }\n *blockMap(map) {\n const it = map.items[map.items.length - 1];\n // it.sep is true-ish if pair already has key or : separator\n switch (this.type) {\n case 'newline':\n this.onKeyLine = false;\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'space':\n case 'comment':\n if (it.value) {\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n if (this.atIndentedComment(it.start, map.indent)) {\n const prev = map.items[map.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n arrayPushArray(end, it.start);\n end.push(this.sourceToken);\n map.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n }\n if (this.indent >= map.indent) {\n const atMapIndent = !this.onKeyLine && this.indent === map.indent;\n const atNextItem = atMapIndent &&\n (it.sep || it.explicitKey) &&\n this.type !== 'seq-item-ind';\n // For empty nodes, assign newline-separated not indented empty tokens to following node\n let start = [];\n if (atNextItem && it.sep && !it.value) {\n const nl = [];\n for (let i = 0; i < it.sep.length; ++i) {\n const st = it.sep[i];\n switch (st.type) {\n case 'newline':\n nl.push(i);\n break;\n case 'space':\n break;\n case 'comment':\n if (st.indent > map.indent)\n nl.length = 0;\n break;\n default:\n nl.length = 0;\n }\n }\n if (nl.length >= 2)\n start = it.sep.splice(nl[1]);\n }\n switch (this.type) {\n case 'anchor':\n case 'tag':\n if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'explicit-key-ind':\n if (!it.sep && !it.explicitKey) {\n it.start.push(this.sourceToken);\n it.explicitKey = true;\n }\n else if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start, explicitKey: true });\n }\n else {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken], explicitKey: true }]\n });\n }\n this.onKeyLine = true;\n return;\n case 'map-value-ind':\n if (it.explicitKey) {\n if (!it.sep) {\n if (includesToken(it.start, 'newline')) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else {\n const start = getFirstKeyStartProps(it.start);\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n }\n else if (it.value) {\n map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n else if (isFlowToken(it.key) &&\n !includesToken(it.sep, 'newline')) {\n const start = getFirstKeyStartProps(it.start);\n const key = it.key;\n const sep = it.sep;\n sep.push(this.sourceToken);\n // @ts-expect-error type guard is wrong here\n delete it.key;\n // @ts-expect-error type guard is wrong here\n delete it.sep;\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key, sep }]\n });\n }\n else if (start.length > 0) {\n // Not actually at next item\n it.sep = it.sep.concat(start, this.sourceToken);\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n else {\n if (!it.sep) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else if (it.value || atNextItem) {\n map.items.push({ start, key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [], key: null, sep: [this.sourceToken] }]\n });\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n this.onKeyLine = true;\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (atNextItem || it.value) {\n map.items.push({ start, key: fs, sep: [] });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n this.stack.push(fs);\n }\n else {\n Object.assign(it, { key: fs, sep: [] });\n this.onKeyLine = true;\n }\n return;\n }\n default: {\n const bv = this.startBlockValue(map);\n if (bv) {\n if (bv.type === 'block-seq') {\n if (!it.explicitKey &&\n it.sep &&\n !includesToken(it.sep, 'newline')) {\n yield* this.pop({\n type: 'error',\n offset: this.offset,\n message: 'Unexpected block-seq-ind on same line with key',\n source: this.source\n });\n return;\n }\n }\n else if (atMapIndent) {\n map.items.push({ start });\n }\n this.stack.push(bv);\n return;\n }\n }\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *blockSequence(seq) {\n const it = seq.items[seq.items.length - 1];\n switch (this.type) {\n case 'newline':\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n seq.items.push({ start: [this.sourceToken] });\n }\n else\n it.start.push(this.sourceToken);\n return;\n case 'space':\n case 'comment':\n if (it.value)\n seq.items.push({ start: [this.sourceToken] });\n else {\n if (this.atIndentedComment(it.start, seq.indent)) {\n const prev = seq.items[seq.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n arrayPushArray(end, it.start);\n end.push(this.sourceToken);\n seq.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n case 'anchor':\n case 'tag':\n if (it.value || this.indent <= seq.indent)\n break;\n it.start.push(this.sourceToken);\n return;\n case 'seq-item-ind':\n if (this.indent !== seq.indent)\n break;\n if (it.value || includesToken(it.start, 'seq-item-ind'))\n seq.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n }\n if (this.indent > seq.indent) {\n const bv = this.startBlockValue(seq);\n if (bv) {\n this.stack.push(bv);\n return;\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *flowCollection(fc) {\n const it = fc.items[fc.items.length - 1];\n if (this.type === 'flow-error-end') {\n let top;\n do {\n yield* this.pop();\n top = this.peek(1);\n } while (top?.type === 'flow-collection');\n }\n else if (fc.end.length === 0) {\n switch (this.type) {\n case 'comma':\n case 'explicit-key-ind':\n if (!it || it.sep)\n fc.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n case 'map-value-ind':\n if (!it || it.value)\n fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n return;\n case 'space':\n case 'comment':\n case 'newline':\n case 'anchor':\n case 'tag':\n if (!it || it.value)\n fc.items.push({ start: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n it.start.push(this.sourceToken);\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (!it || it.value)\n fc.items.push({ start: [], key: fs, sep: [] });\n else if (it.sep)\n this.stack.push(fs);\n else\n Object.assign(it, { key: fs, sep: [] });\n return;\n }\n case 'flow-map-end':\n case 'flow-seq-end':\n fc.end.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(fc);\n /* istanbul ignore else should not happen */\n if (bv)\n this.stack.push(bv);\n else {\n yield* this.pop();\n yield* this.step();\n }\n }\n else {\n const parent = this.peek(2);\n if (parent.type === 'block-map' &&\n ((this.type === 'map-value-ind' && parent.indent === fc.indent) ||\n (this.type === 'newline' &&\n !parent.items[parent.items.length - 1].sep))) {\n yield* this.pop();\n yield* this.step();\n }\n else if (this.type === 'map-value-ind' &&\n parent.type !== 'flow-collection') {\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n fixFlowSeqItems(fc);\n const sep = fc.end.splice(1, fc.end.length);\n sep.push(this.sourceToken);\n const map = {\n type: 'block-map',\n offset: fc.offset,\n indent: fc.indent,\n items: [{ start, key: fc, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else {\n yield* this.lineEnd(fc);\n }\n }\n }\n flowScalar(type) {\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n return {\n type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n }\n startBlockValue(parent) {\n switch (this.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return this.flowScalar(this.type);\n case 'block-scalar-header':\n return {\n type: 'block-scalar',\n offset: this.offset,\n indent: this.indent,\n props: [this.sourceToken],\n source: ''\n };\n case 'flow-map-start':\n case 'flow-seq-start':\n return {\n type: 'flow-collection',\n offset: this.offset,\n indent: this.indent,\n start: this.sourceToken,\n items: [],\n end: []\n };\n case 'seq-item-ind':\n return {\n type: 'block-seq',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n };\n case 'explicit-key-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n start.push(this.sourceToken);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, explicitKey: true }]\n };\n }\n case 'map-value-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n };\n }\n }\n return null;\n }\n atIndentedComment(start, indent) {\n if (this.type !== 'comment')\n return false;\n if (this.indent <= indent)\n return false;\n return start.every(st => st.type === 'newline' || st.type === 'space');\n }\n *documentEnd(docEnd) {\n if (this.type !== 'doc-mode') {\n if (docEnd.end)\n docEnd.end.push(this.sourceToken);\n else\n docEnd.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n *lineEnd(token) {\n switch (this.type) {\n case 'comma':\n case 'doc-start':\n case 'doc-end':\n case 'flow-seq-end':\n case 'flow-map-end':\n case 'map-value-ind':\n yield* this.pop();\n yield* this.step();\n break;\n case 'newline':\n this.onKeyLine = false;\n // fallthrough\n case 'space':\n case 'comment':\n default:\n // all other values are errors\n if (token.end)\n token.end.push(this.sourceToken);\n else\n token.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n}\n\nexports.Parser = Parser;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar errors = require('./errors.js');\nvar log = require('./log.js');\nvar identity = require('./nodes/identity.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\n\nfunction parseOptions(options) {\n const prettyErrors = options.prettyErrors !== false;\n const lineCounter$1 = options.lineCounter || (prettyErrors && new lineCounter.LineCounter()) || null;\n return { lineCounter: lineCounter$1, prettyErrors };\n}\n/**\n * Parse the input as a stream of YAML documents.\n *\n * Documents should be separated from each other by `...` or `---` marker lines.\n *\n * @returns If an empty `docs` array is returned, it will be of type\n * EmptyStream and contain additional stream information. In\n * TypeScript, you should use `'empty' in docs` as a type guard for it.\n */\nfunction parseAllDocuments(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n const composer$1 = new composer.Composer(options);\n const docs = Array.from(composer$1.compose(parser$1.parse(source)));\n if (prettyErrors && lineCounter)\n for (const doc of docs) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n }\n if (docs.length > 0)\n return docs;\n return Object.assign([], { empty: true }, composer$1.streamInfo());\n}\n/** Parse an input string into a single YAML.Document */\nfunction parseDocument(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser$1 = new parser.Parser(lineCounter?.addNewLine);\n const composer$1 = new composer.Composer(options);\n // `doc` is always set by compose.end(true) at the very latest\n let doc = null;\n for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {\n if (!doc)\n doc = _doc;\n else if (doc.options.logLevel !== 'silent') {\n doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()'));\n break;\n }\n }\n if (prettyErrors && lineCounter) {\n doc.errors.forEach(errors.prettifyError(source, lineCounter));\n doc.warnings.forEach(errors.prettifyError(source, lineCounter));\n }\n return doc;\n}\nfunction parse(src, reviver, options) {\n let _reviver = undefined;\n if (typeof reviver === 'function') {\n _reviver = reviver;\n }\n else if (options === undefined && reviver && typeof reviver === 'object') {\n options = reviver;\n }\n const doc = parseDocument(src, options);\n if (!doc)\n return null;\n doc.warnings.forEach(warning => log.warn(doc.options.logLevel, warning));\n if (doc.errors.length > 0) {\n if (doc.options.logLevel !== 'silent')\n throw doc.errors[0];\n else\n doc.errors = [];\n }\n return doc.toJS(Object.assign({ reviver: _reviver }, options));\n}\nfunction stringify(value, replacer, options) {\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n }\n if (typeof options === 'string')\n options = options.length;\n if (typeof options === 'number') {\n const indent = Math.round(options);\n options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };\n }\n if (value === undefined) {\n const { keepUndefined } = options ?? replacer ?? {};\n if (!keepUndefined)\n return undefined;\n }\n if (identity.isDocument(value) && !_replacer)\n return value.toString(options);\n return new Document.Document(value, _replacer, options).toString(options);\n}\n\nexports.parse = parse;\nexports.parseAllDocuments = parseAllDocuments;\nexports.parseDocument = parseDocument;\nexports.stringify = stringify;\n","'use strict';\n\nvar composer = require('./compose/composer.js');\nvar Document = require('./doc/Document.js');\nvar Schema = require('./schema/Schema.js');\nvar errors = require('./errors.js');\nvar Alias = require('./nodes/Alias.js');\nvar identity = require('./nodes/identity.js');\nvar Pair = require('./nodes/Pair.js');\nvar Scalar = require('./nodes/Scalar.js');\nvar YAMLMap = require('./nodes/YAMLMap.js');\nvar YAMLSeq = require('./nodes/YAMLSeq.js');\nvar cst = require('./parse/cst.js');\nvar lexer = require('./parse/lexer.js');\nvar lineCounter = require('./parse/line-counter.js');\nvar parser = require('./parse/parser.js');\nvar publicApi = require('./public-api.js');\nvar visit = require('./visit.js');\n\n\n\nexports.Composer = composer.Composer;\nexports.Document = Document.Document;\nexports.Schema = Schema.Schema;\nexports.YAMLError = errors.YAMLError;\nexports.YAMLParseError = errors.YAMLParseError;\nexports.YAMLWarning = errors.YAMLWarning;\nexports.Alias = Alias.Alias;\nexports.isAlias = identity.isAlias;\nexports.isCollection = identity.isCollection;\nexports.isDocument = identity.isDocument;\nexports.isMap = identity.isMap;\nexports.isNode = identity.isNode;\nexports.isPair = identity.isPair;\nexports.isScalar = identity.isScalar;\nexports.isSeq = identity.isSeq;\nexports.Pair = Pair.Pair;\nexports.Scalar = Scalar.Scalar;\nexports.YAMLMap = YAMLMap.YAMLMap;\nexports.YAMLSeq = YAMLSeq.YAMLSeq;\nexports.CST = cst;\nexports.Lexer = lexer.Lexer;\nexports.LineCounter = lineCounter.LineCounter;\nexports.Parser = parser.Parser;\nexports.parse = publicApi.parse;\nexports.parseAllDocuments = publicApi.parseAllDocuments;\nexports.parseDocument = publicApi.parseDocument;\nexports.stringify = publicApi.stringify;\nexports.visit = visit.visit;\nexports.visitAsync = visit.visitAsync;\n","import { readFileSync } from 'node:fs';\n\nimport { resolveFileSystemPathWithinRoot } from './resolveFileSystemPathWithinRoot.js';\n\n/*** Reads UTF-8 text only when the requested file stays inside the allowed filesystem root. */\nexport function readTextFileWithinRoot(args: {\n readonly rootPath: string;\n readonly filePath: string;\n}): { readonly content: string; readonly path: string } {\n const path = resolveFileSystemPathWithinRoot(args.rootPath, args.filePath);\n return {\n content: readFileSync(path, 'utf8'),\n path,\n };\n}\n","import { type Dirent, readdirSync } from 'node:fs';\n\nimport { resolveFileSystemPathWithinRoot } from './resolveFileSystemPathWithinRoot.js';\n\n/*** Reads directory entries only when the directory stays inside the allowed filesystem root. */\nexport function readDirectoryWithinRoot(args: {\n readonly rootPath: string;\n readonly directoryPath: string;\n}): { readonly entries: Dirent[]; readonly path: string } {\n const path = resolveFileSystemPathWithinRoot(args.rootPath, args.directoryPath, {\n allowRoot: true,\n });\n return {\n entries: readdirSync(path, { withFileTypes: true }),\n path,\n };\n}\n","import { lstatSync, realpathSync } from 'node:fs';\nimport path from 'node:path';\n\n/*** Resolves a filesystem path beneath a root while rejecting lexical and symlink escapes. */\nexport function resolveFileSystemPathWithinRoot(\n rootPath: string,\n filePath: string,\n options: { readonly allowRoot?: boolean } = {},\n): string {\n const lexicalRoot = path.resolve(rootPath);\n const lexicalTarget = path.isAbsolute(filePath)\n ? path.resolve(filePath)\n : path.resolve(lexicalRoot, filePath);\n\n assertContainedPath(lexicalRoot, lexicalTarget, filePath, options.allowRoot === true);\n\n const realRoot = realpathSync(lexicalRoot);\n const existingAncestor = findExistingAncestor(lexicalTarget);\n const realAncestor = realpathSync(existingAncestor);\n assertContainedPath(realRoot, realAncestor, filePath, true);\n\n const resolvedTarget = path.resolve(realAncestor, path.relative(existingAncestor, lexicalTarget));\n assertContainedPath(realRoot, resolvedTarget, filePath, options.allowRoot === true);\n\n return resolvedTarget;\n}\n\n/*** Rejects paths outside the root and optionally rejects the root path itself. */\nfunction assertContainedPath(\n rootPath: string,\n targetPath: string,\n inputPath: string,\n allowRoot: boolean,\n): void {\n const relativePath = path.relative(rootPath, targetPath);\n const isRoot = relativePath.length === 0;\n const escapesRoot =\n relativePath === '..' ||\n relativePath.startsWith(`..${path.sep}`) ||\n path.isAbsolute(relativePath);\n\n if (escapesRoot || (isRoot && !allowRoot)) {\n throw new Error(`Path escaped the allowed root: ${inputPath}`);\n }\n}\n\n/*** Finds the nearest existing path so symlink ancestry can be resolved safely. */\nfunction findExistingAncestor(targetPath: string): string {\n if (lstatSync(targetPath, { throwIfNoEntry: false })) return targetPath;\n\n const parentPath = path.dirname(targetPath);\n if (parentPath === targetPath) {\n throw new Error(`Unable to resolve an existing ancestor for path: ${targetPath}`);\n }\n\n return findExistingAncestor(parentPath);\n}\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","'use server';\nimport { existsSync } from 'node:fs';\nimport path from 'node:path';\n\nimport {\n readDirectoryWithinRoot,\n resolveFileSystemPathWithinRoot,\n} from '@ankhorage/utility/node/fs';\n\nimport { parseCppFile } from '@/app/utils/parser/cpp/parseCppFile';\nimport { parseDelphiFile } from '@/app/utils/parser/delphi/parseFile';\nimport { parseJavaFile } from '@/app/utils/parser/java/parseJavaFile';\nimport { parseKotlinFile } from '@/app/utils/parser/kotlin/parseFile';\nimport { parsePythonFile } from '@/app/utils/parser/python/parseFile';\nimport { parseFile as parseTypeScriptFile } from '@/app/utils/parser/typescript/parseFile';\nimport { analyzeDependencyImportsAsync } from '@/features/dependency-analysis/adapters/outbound/dependency-graph/analyzeDependencyImportsAsync';\nimport { JAVA_ROOT } from '@/shared/constants';\nimport { type ImportDefinition, Language, type ParsedDirectory } from '@/shared/types';\nimport { parseProjectPath } from '@/shared/utils/parseProjectPath';\nimport { toPosix } from '@/shared/utils/toPosix';\n\nimport { inspectParserLanguageAsync } from './inspectParserLanguageAsync';\n\n/***\n * Returns resolved root\n */\nasync function resolveRoot(dir: string, detectedLanguage: Language) {\n const projectRoot = resolveFileSystemPathWithinRoot(dir, '.', { allowRoot: true });\n\n switch (detectedLanguage) {\n case Language.Java: {\n const javaRoot = toPosix(resolveFileSystemPathWithinRoot(projectRoot, JAVA_ROOT));\n if (!existsSync(javaRoot)) {\n console.error('Failed to find:', JAVA_ROOT);\n throw new Error(`Invalid Java project structure. Missing ${JAVA_ROOT}`);\n }\n return javaRoot;\n }\n\n case Language.TypeScript:\n // Normalize to an absolute project root\n return toPosix(projectRoot);\n\n case Language.Cpp:\n // For C++, look for src directory or use project root\n const cppSrcRoot = toPosix(resolveFileSystemPathWithinRoot(projectRoot, 'src'));\n if (existsSync(cppSrcRoot)) {\n return cppSrcRoot;\n }\n return toPosix(projectRoot);\n\n case Language.Python:\n // For Python, look for src directory or use project root\n const pythonSrcRoot = toPosix(resolveFileSystemPathWithinRoot(projectRoot, 'src'));\n if (existsSync(pythonSrcRoot)) {\n return pythonSrcRoot;\n }\n // Also check for common Python app structure\n const appRoot = toPosix(resolveFileSystemPathWithinRoot(projectRoot, 'app'));\n if (existsSync(appRoot)) {\n return appRoot;\n }\n return toPosix(projectRoot);\n\n case Language.Delphi:\n // For Delphi, look for common source directories\n const delphiSrcRoot = toPosix(resolveFileSystemPathWithinRoot(projectRoot, 'src'));\n if (existsSync(delphiSrcRoot)) {\n return delphiSrcRoot;\n }\n // Also check for Source directory (common in Delphi projects)\n const sourceRoot = toPosix(resolveFileSystemPathWithinRoot(projectRoot, 'Source'));\n if (existsSync(sourceRoot)) {\n return sourceRoot;\n }\n return toPosix(projectRoot);\n\n case Language.Kotlin:\n // For Kotlin, look for src/main/kotlin directory (Gradle/Maven structure)\n const kotlinSrcRoot = toPosix(\n resolveFileSystemPathWithinRoot(projectRoot, 'src/main/kotlin')\n );\n if (existsSync(kotlinSrcRoot)) {\n return kotlinSrcRoot;\n }\n // Fallback to src directory\n const kotlinAltSrcRoot = toPosix(resolveFileSystemPathWithinRoot(projectRoot, 'src'));\n if (existsSync(kotlinAltSrcRoot)) {\n return kotlinAltSrcRoot;\n }\n return toPosix(projectRoot);\n\n default:\n throw new Error(`Invalid file structure for ${detectedLanguage}`);\n }\n}\n\n/***\n * Read directory recursively\n */\nasync function readDirRecursively(\n dir: string,\n projectRoot: string,\n language: Language,\n analysisRoot: string,\n importsByFile?: ReadonlyMap<string, readonly ImportDefinition[]>\n): Promise<ParsedDirectory> {\n const result: ParsedDirectory = Object.create(null);\n\n // 1. Read the current directory through the shared rooted-filesystem boundary.\n const { entries, path: resolvedDir } = readDirectoryWithinRoot({\n rootPath: projectRoot,\n directoryPath: dir,\n });\n\n const ignores = [\n '@types',\n '.cache',\n '.git',\n '.github',\n '.generated',\n '.next',\n 'dist',\n 'coverage',\n 'examples',\n 'node_modules',\n 'test',\n ];\n\n for (const entry of entries) {\n if (ignores.includes(entry.name)) continue;\n\n const fullPath = path.resolve(resolvedDir, entry.name);\n\n // Directory: Recursively continue to read\n if (entry.isDirectory()) {\n result[entry.name] = await readDirRecursively(\n fullPath,\n projectRoot,\n language,\n analysisRoot,\n importsByFile\n );\n continue;\n }\n\n // File: Parse file according to detected project language\n switch (language) {\n // Java\n case Language.Java:\n if (entry.name.endsWith('.java')) {\n if (importsByFile === undefined) {\n throw new Error('Missing canonical Java dependency analysis.');\n }\n const relativeFile = toPosix(path.relative(projectRoot, fullPath));\n const imports = importsByFile.get(relativeFile) ?? [];\n result[entry.name] = await parseJavaFile(fullPath, projectRoot, imports);\n }\n break;\n\n // TypeScript\n case Language.TypeScript:\n if (entry.name.endsWith('.ts') || entry.name.endsWith('.tsx')) {\n if (importsByFile === undefined) {\n throw new Error('Missing canonical TypeScript dependency analysis.');\n }\n const relativeFile = toPosix(path.relative(projectRoot, fullPath));\n const imports = importsByFile.get(relativeFile) ?? [];\n result[entry.name] = await parseTypeScriptFile(fullPath, projectRoot, imports);\n }\n break;\n\n // C++\n case Language.Cpp:\n if (\n entry.name.endsWith('.cpp') ||\n entry.name.endsWith('.cc') ||\n entry.name.endsWith('.cxx') ||\n entry.name.endsWith('.h') ||\n entry.name.endsWith('.hpp') ||\n entry.name.endsWith('.hxx')\n ) {\n if (importsByFile === undefined) {\n throw new Error('Missing canonical C++ dependency analysis.');\n }\n const relativeFile = toPosix(path.relative(projectRoot, fullPath));\n const imports = importsByFile.get(relativeFile) ?? [];\n result[entry.name] = await parseCppFile(fullPath, projectRoot, imports);\n }\n break;\n\n // Python\n case Language.Python:\n if (entry.name.endsWith('.py')) {\n if (importsByFile === undefined) {\n throw new Error('Missing canonical Python dependency analysis.');\n }\n const relativeFile = toPosix(path.relative(projectRoot, fullPath));\n const imports = importsByFile.get(relativeFile) ?? [];\n result[entry.name] = await parsePythonFile(fullPath, projectRoot, imports);\n }\n break;\n\n // Delphi\n case Language.Delphi:\n if (\n entry.name.endsWith('.pas') ||\n entry.name.endsWith('.pp') ||\n entry.name.endsWith('.dpr')\n ) {\n if (importsByFile === undefined) {\n throw new Error('Missing canonical Delphi dependency analysis.');\n }\n const relativeFile = toPosix(path.relative(projectRoot, fullPath));\n const imports = importsByFile.get(relativeFile) ?? [];\n result[entry.name] = await parseDelphiFile(fullPath, projectRoot, imports);\n }\n break;\n\n // Kotlin\n case Language.Kotlin:\n if (entry.name.endsWith('.kt') || entry.name.endsWith('.kts')) {\n if (importsByFile === undefined) {\n throw new Error('Missing canonical Kotlin dependency analysis.');\n }\n const relativeFile = toPosix(path.relative(projectRoot, fullPath));\n const imports = importsByFile.get(relativeFile) ?? [];\n result[entry.name] = await parseKotlinFile(fullPath, projectRoot, imports);\n }\n break;\n }\n }\n\n return result;\n}\n\n/***\n * Entrypoint\n */\nexport async function getParsedFileStructure(\n language?: Language,\n projectPath: string = parseProjectPath()\n) {\n // 1. Detect language & filter non-supported\n const detectedLanguage = language ?? (await inspectParserLanguageAsync(projectPath)).language;\n console.log('1. Detected language:', detectedLanguage);\n\n if (\n ![\n Language.Java,\n Language.TypeScript,\n Language.Cpp,\n Language.Python,\n Language.Delphi,\n Language.Kotlin,\n ].includes(detectedLanguage)\n ) {\n throw new Error(\n \"Supported language is 'Java', 'TypeScript', 'C++', 'Python', 'Delphi' & 'Kotlin'. More to follow.\"\n );\n }\n\n // 2. Get validated root directory by detectedLanguage\n const rootDir = await resolveRoot(projectPath, detectedLanguage);\n console.log('2. rootDir:', rootDir);\n\n const importsByFile =\n detectedLanguage === Language.TypeScript\n ? await analyzeDependencyImportsAsync(projectPath)\n : detectedLanguage === Language.Java\n ? await analyzeDependencyImportsAsync(projectPath, rootDir, 'specifier')\n : detectedLanguage === Language.Kotlin\n ? await analyzeDependencyImportsAsync(\n projectPath,\n rootDir,\n 'specifier',\n 'kotlin-standard-library'\n )\n : detectedLanguage === Language.Python\n ? await analyzeDependencyImportsAsync(\n projectPath,\n rootDir,\n 'specifier',\n 'python-legacy'\n )\n : detectedLanguage === Language.Cpp\n ? await analyzeDependencyImportsAsync(projectPath, rootDir, 'specifier')\n : detectedLanguage === Language.Delphi\n ? await analyzeDependencyImportsAsync(\n projectPath,\n rootDir,\n 'specifier',\n 'delphi-standard-library'\n )\n : undefined;\n\n // 3. Read directory recursively (pass resolved root as both dir and projectRoot)\n return await readDirRecursively(rootDir, rootDir, detectedLanguage, projectPath, importsByFile);\n}\n","import { inspectProjectAsync } from '@ankhorage/project-detector/node';\n\nimport type { ParserSelection } from '../../types/parserSelection';\nimport { selectParserLanguage } from './selectParserLanguage';\n\nconst PROJECT_PATH_ERROR_CODES: ReadonlySet<string> = new Set(['EACCES', 'ENOENT', 'ENOTDIR']);\n\n/*** Inspect safely through the canonical detector, then apply pkgviz's parser selection policy. */\nexport async function inspectParserLanguageAsync(projectPath: string): Promise<ParserSelection> {\n try {\n const inspection = await inspectProjectAsync(projectPath, {\n excludeDirectories: ['@types', '.github', 'examples', 'test'],\n });\n if (!inspection.complete) {\n throw new Error(\n `Project inspection is incomplete: ${inspection.diagnostics.map(diagnostic => diagnostic.message).join('; ')}`\n );\n }\n return selectParserLanguage(inspection.detection);\n } catch (error) {\n if (!isProjectPathUnavailableError(error)) throw error;\n\n const projectPathError = new Error(`Invalid or unavailable project path: ${projectPath}`, {\n cause: error,\n });\n projectPathError.name = 'ProjectPathUnavailableError';\n throw projectPathError;\n }\n}\n\n/*** Identify filesystem errors that mean the configured inspection root cannot be used. */\nfunction isProjectPathUnavailableError(error: unknown): boolean {\n return (\n error instanceof Error &&\n 'code' in error &&\n typeof error.code === 'string' &&\n PROJECT_PATH_ERROR_CODES.has(error.code)\n );\n}\n","import type { ProjectDetection } from '@ankhorage/project-detector/types';\n\nimport { Language } from '../../shared/types';\nimport type { ParserSelection } from '../../types/parserSelection';\n\n/*** Select a supported parser by evidence strength, evidence count, then stable parser order. */\nexport function selectParserLanguage(detection: ProjectDetection): ParserSelection {\n const supported = [\n Language.TypeScript,\n Language.Java,\n Language.Cpp,\n Language.Python,\n Language.Delphi,\n Language.Kotlin,\n ];\n const candidates = supported\n .flatMap(language => {\n const detected = detection.languages.find(candidate => candidate.id === language);\n return detected ? [{ language, detected }] : [];\n })\n .sort(\n (left, right) =>\n right.detected.score - left.detected.score ||\n right.detected.evidence.length - left.detected.evidence.length ||\n supported.indexOf(left.language) - supported.indexOf(right.language)\n );\n const selected = candidates[0];\n if (!selected) {\n throw new Error(\n `No supported parser detected. Found: ${detection.languages.map(language => language.id).join(', ') || 'unknown'}. Supported: ${supported.join(', ')}.`\n );\n }\n return {\n language: selected.language,\n score: selected.detected.score,\n indicators: selected.detected.evidence,\n candidates: detection.languages,\n };\n}\n","import type { Graph } from '../../../types/graph.js';\n\n/*** Create a deterministic graph and reject ambiguous or dangling identities. */\nexport function createGraph<NodeData, EdgeData>(\n input: Graph<NodeData, EdgeData>,\n): Graph<NodeData, EdgeData> {\n const nodes = [...input.nodes].sort((left, right) => compareText(left.id, right.id));\n const edges = [...input.edges].sort((left, right) => compareText(left.id, right.id));\n\n assertUniqueIds(\n nodes.map(({ id }) => id),\n 'node',\n );\n assertUniqueIds(\n edges.map(({ id }) => id),\n 'edge',\n );\n\n const nodeIds = new Set(nodes.map(({ id }) => id));\n for (const edge of edges) {\n if (!nodeIds.has(edge.source) || !nodeIds.has(edge.target)) {\n throw new Error(\n `Graph edge \"${edge.id}\" references an unknown endpoint: ${edge.source} -> ${edge.target}.`,\n );\n }\n }\n\n return { nodes, edges };\n}\n\n/*** Reject empty or duplicate graph identities. */\nfunction assertUniqueIds(ids: readonly string[], kind: 'edge' | 'node'): void {\n const seen = new Set<string>();\n\n for (const id of ids) {\n if (id.trim() === '') throw new Error(`Graph ${kind} IDs must be non-empty.`);\n if (seen.has(id)) throw new Error(`Duplicate graph ${kind} ID: ${id}.`);\n seen.add(id);\n }\n}\n\n/*** Compare graph identities without locale-dependent ordering. */\nfunction compareText(left: string, right: string): number {\n if (left < right) return -1;\n return left > right ? 1 : 0;\n}\n","import type { Graph } from '../../../types/graph.js';\n\n/*** Return one closed cycle path, optionally restricted to a subset of graph nodes. */\nexport function findCyclePath<NodeData, EdgeData>(\n graph: Graph<NodeData, EdgeData>,\n nodeIds?: readonly string[],\n): readonly string[] | null {\n const allowedNodeIds = new Set(nodeIds ?? graph.nodes.map(({ id }) => id));\n const graphNodeIds = new Set(graph.nodes.map(({ id }) => id));\n const starts = graph.nodes\n .map(({ id }) => id)\n .filter((id) => allowedNodeIds.has(id))\n .sort(compareText);\n const adjacency = buildAdjacency(graph, graphNodeIds, allowedNodeIds);\n\n for (const start of starts) {\n const cycle = findCycleFromStart(start, adjacency);\n if (cycle !== null) return cycle;\n }\n\n return null;\n}\n\n/*** Build stable outgoing adjacency while honoring the requested node subset. */\nfunction buildAdjacency<NodeData, EdgeData>(\n graph: Graph<NodeData, EdgeData>,\n graphNodeIds: ReadonlySet<string>,\n allowedNodeIds: ReadonlySet<string>,\n): ReadonlyMap<string, readonly string[]> {\n const adjacency = new Map(\n graph.nodes\n .map(({ id }) => id)\n .filter((id) => allowedNodeIds.has(id))\n .map((id) => [id, [] as string[]]),\n );\n\n for (const edge of graph.edges) {\n if (\n graphNodeIds.has(edge.source) &&\n graphNodeIds.has(edge.target) &&\n allowedNodeIds.has(edge.source) &&\n allowedNodeIds.has(edge.target)\n ) {\n adjacency.get(edge.source)?.push(edge.target);\n }\n }\n\n return adjacency;\n}\n\n/*** Search one deterministic simple cycle that closes back onto the selected start node. */\nfunction findCycleFromStart(\n start: string,\n adjacency: ReadonlyMap<string, readonly string[]>,\n): readonly string[] | null {\n return visitCycle(start, start, adjacency, [], new Set<string>());\n}\n\n/*** Traverse one simple path until it closes back onto the cycle start. */\nfunction visitCycle(\n start: string,\n nodeId: string,\n adjacency: ReadonlyMap<string, readonly string[]>,\n path: readonly string[],\n visited: ReadonlySet<string>,\n): readonly string[] | null {\n const nextPath = [...path, nodeId];\n const nextVisited = new Set(visited).add(nodeId);\n\n for (const target of adjacency.get(nodeId) ?? []) {\n if (target === start) return [...nextPath, start];\n if (nextVisited.has(target)) continue;\n\n const cycle = visitCycle(start, target, adjacency, nextPath, nextVisited);\n if (cycle !== null) return cycle;\n }\n\n return null;\n}\n\n/*** Compare graph identities without locale-dependent ordering. */\nfunction compareText(left: string, right: string): number {\n if (left < right) return -1;\n return left > right ? 1 : 0;\n}\n","import type { Graph } from '../../../types/graph.js';\nimport { findStronglyConnectedComponents } from './findStronglyConnectedComponents.js';\n\n/*** Return strongly connected components that represent graph cycles. */\nexport function findCyclicComponents<NodeData, EdgeData>(\n graph: Graph<NodeData, EdgeData>,\n): readonly (readonly string[])[] {\n const selfLoops = new Set(\n graph.edges.filter((edge) => edge.source === edge.target).map((edge) => edge.source),\n );\n\n return findStronglyConnectedComponents(graph).filter(\n (component) =>\n component.length > 1 || (component[0] !== undefined && selfLoops.has(component[0])),\n );\n}\n","import type { Graph } from '../../../types/graph.js';\nimport { reverseGraph } from './reverseGraph.js';\n\n/*** Return strongly connected components in deterministic node order. */\nexport function findStronglyConnectedComponents<NodeData, EdgeData>(\n graph: Graph<NodeData, EdgeData>,\n): readonly (readonly string[])[] {\n const adjacency = buildAdjacency(graph);\n const finishOrder: string[] = [];\n const visited = new Set<string>();\n\n for (const nodeId of graph.nodes.map(({ id }) => id).sort(compareText)) {\n visitPostOrder(nodeId, adjacency, visited, finishOrder);\n }\n\n const reversedAdjacency = buildAdjacency(reverseGraph(graph));\n const assigned = new Set<string>();\n const components: string[][] = [];\n\n for (const nodeId of [...finishOrder].reverse()) {\n if (assigned.has(nodeId)) continue;\n const component: string[] = [];\n collectComponent(nodeId, reversedAdjacency, assigned, component);\n components.push(component.sort(compareText));\n }\n\n return components.sort((left, right) => compareText(left[0] ?? '', right[0] ?? ''));\n}\n\n/*** Build sorted outgoing adjacency for graph traversal. */\nfunction buildAdjacency<NodeData, EdgeData>(\n graph: Graph<NodeData, EdgeData>,\n): Map<string, string[]> {\n const adjacency = new Map(graph.nodes.map(({ id }) => [id, [] as string[]]));\n for (const edge of graph.edges) adjacency.get(edge.source)?.push(edge.target);\n for (const targets of adjacency.values()) targets.sort(compareText);\n return adjacency;\n}\n\n/*** Visit one node depth-first and append it after all descendants. */\nfunction visitPostOrder(\n nodeId: string,\n adjacency: ReadonlyMap<string, readonly string[]>,\n visited: Set<string>,\n finishOrder: string[],\n): void {\n if (visited.has(nodeId)) return;\n visited.add(nodeId);\n for (const target of adjacency.get(nodeId) ?? []) {\n visitPostOrder(target, adjacency, visited, finishOrder);\n }\n finishOrder.push(nodeId);\n}\n\n/*** Collect one strongly connected component from reversed adjacency. */\nfunction collectComponent(\n nodeId: string,\n adjacency: ReadonlyMap<string, readonly string[]>,\n assigned: Set<string>,\n component: string[],\n): void {\n if (assigned.has(nodeId)) return;\n assigned.add(nodeId);\n component.push(nodeId);\n for (const target of adjacency.get(nodeId) ?? []) {\n collectComponent(target, adjacency, assigned, component);\n }\n}\n\n/*** Compare graph identities without locale-dependent ordering. */\nfunction compareText(left: string, right: string): number {\n if (left < right) return -1;\n return left > right ? 1 : 0;\n}\n","import type { Graph } from '../../../types/graph.js';\nimport { createGraph } from './createGraph.js';\n\n/*** Reverse every directed edge while preserving identities and metadata. */\nexport function reverseGraph<NodeData, EdgeData>(\n graph: Graph<NodeData, EdgeData>,\n): Graph<NodeData, EdgeData> {\n return createGraph({\n nodes: graph.nodes,\n edges: graph.edges.map((edge) => ({\n ...edge,\n source: edge.target,\n target: edge.source,\n })),\n });\n}\n","import { findCyclePath, findCyclicComponents, type Graph } from '@ankhorage/graph';\nimport type { ElementsDefinition } from 'cytoscape';\n\nimport type { ParsedDirectory, ParsedFile } from '@/shared/types';\nimport type { CycleEdgeEvidence, ImportEvidence, PackageCycleDetail } from '@/types/audit';\n\n/*** Collect all files from your ParsedDirectory tree. */\nfunction collectFiles(root: ParsedDirectory): ParsedFile[] {\n const files: ParsedFile[] = [];\n /*** Collects parsed files by traversing the parsed directory tree. */\n const walk = (dir: ParsedDirectory) => {\n for (const key in dir) {\n const entry = (dir as Record<string, unknown>)[key];\n if (entry && typeof entry === 'object' && 'path' in entry && 'package' in entry) {\n files.push(entry as ParsedFile);\n } else if (entry && typeof entry === 'object') {\n walk(entry as ParsedDirectory);\n }\n }\n };\n walk(root);\n return files;\n}\n\n/*** Build per-edge evidence: key \"from->to\" → list of ImportEvidence. */\nfunction buildEdgeEvidence(dir: ParsedDirectory): Map<string, ImportEvidence[]> {\n const files = collectFiles(dir);\n const map = new Map<string, ImportEvidence[]>();\n\n for (const f of files) {\n const from = f.package;\n for (const imp of f.imports ?? []) {\n const to = imp.pkg;\n if (!to || to === from) continue;\n const key = `${from}->${to}`;\n if (!map.has(key)) map.set(key, []);\n map.get(key)!.push({\n filePath: f.path,\n fileClass: f.className,\n importName: imp.name,\n isIntrinsic: imp.isIntrinsic,\n });\n }\n }\n return map;\n}\n\n/*** Convert ElementsDefinition (from buildGraph) to adjacency map. */\nfunction elementsToAdj(elements: ElementsDefinition) {\n const adj = new Map<TUniquePackageName, Set<TUniquePackageName>>();\n for (const n of elements.nodes) {\n const id = String(n.data.id);\n if (!adj.has(id)) adj.set(id, new Set());\n }\n for (const e of elements.edges) {\n const s = String(e.data.source);\n const t = String(e.data.target);\n if (!adj.has(s)) adj.set(s, new Set());\n if (!adj.has(t)) adj.set(t, new Set());\n adj.get(s)!.add(t);\n }\n return adj;\n}\n\n/*** Convert adjacency to the canonical Ankhorage graph model for shared algorithms. */\nfunction adjacencyToGraph(\n adjacency: ReadonlyMap<TUniquePackageName, ReadonlySet<TUniquePackageName>>\n): Graph<undefined, undefined> {\n return {\n nodes: Array.from(adjacency.keys(), id => ({ id, data: undefined })),\n edges: Array.from(adjacency.entries()).flatMap(([source, targets]) =>\n Array.from(targets, target => ({\n id: `${source}->${target}`,\n source,\n target,\n data: undefined,\n }))\n ),\n };\n}\n\n/***\n * High-level API: build graph via `buildGraph`, detect package cycles,\n * and attach **member evidence** (files/imports) per cycle edge.\n */\nexport function getPackageCyclesWithMembers(\n dir: ParsedDirectory,\n graph: ElementsDefinition\n): {\n cycles: PackageCycleDetail[];\n packageSet: Set<TUniquePackageName>;\n graph: ElementsDefinition; // for convenience (already built)\n} {\n const adj = elementsToAdj(graph);\n const canonicalGraph = adjacencyToGraph(adj);\n const sccs = findCyclicComponents(canonicalGraph);\n const evidence = buildEdgeEvidence(dir);\n\n const cycles: PackageCycleDetail[] = [];\n const packageSet = new Set<TUniquePackageName>();\n\n for (const scc of sccs) {\n scc.forEach(p => packageSet.add(p));\n const cycle = [...(findCyclePath(canonicalGraph, scc) ?? [...scc, scc[0]])];\n\n const edges: CycleEdgeEvidence[] = [];\n for (let i = 0; i < cycle.length - 1; i++) {\n const from = cycle[i];\n const to = cycle[i + 1];\n const key = `${from}->${to}`;\n edges.push({\n from,\n to,\n via: evidence.get(key) ?? [],\n });\n }\n\n cycles.push({ packages: cycle, edges });\n }\n\n return { cycles, packageSet, graph };\n}\n\n/***\n * Convenience that only returns the set of cyclic packages (no evidence)\n */\nexport function getCyclicPackageSet(\n dir: ParsedDirectory,\n graph: ElementsDefinition\n): Set<TUniquePackageName> {\n const { packageSet } = getPackageCyclesWithMembers(dir, graph);\n return packageSet;\n}\n\ntype TUniquePackageName = string;\n","import type {\n AuditConfiguration,\n AuditRuleConfiguration,\n ResolveAuditConfigurationInput,\n} from '@/types/audit';\n\n/*** Resolves explicit audit overrides against the stable default rule policy. */\nexport function resolveAuditConfiguration(\n input: ResolveAuditConfigurationInput = {}\n): AuditConfiguration {\n let cyclicDependenciesMode: AuditRuleConfiguration['mode'] = 'block';\n\n for (const rule of input.rules ?? []) {\n switch (rule.id) {\n case 'cyclic-dependencies':\n cyclicDependenciesMode = rule.mode;\n break;\n default:\n throw new Error(`Unknown audit rule \"${rule.id}\".`);\n }\n }\n\n return {\n failOnRuleViolation: input.failOnRuleViolation ?? true,\n rules: [{ id: 'cyclic-dependencies', mode: cyclicDependenciesMode }],\n };\n}\n","import type {\n AuditRuleConfiguration,\n AuditRuleResult,\n CyclicDependenciesEvidence,\n EvaluateAuditRulesInput,\n PackageCycleDetail,\n} from '@/types/audit';\n\n/*** Evaluates every enabled PKGViz audit rule against one analysis result. */\nexport function evaluateAuditRules(input: EvaluateAuditRulesInput): readonly AuditRuleResult[] {\n const mode = findRuleMode(input.configuration.rules, 'cyclic-dependencies');\n if (mode === 'off') return [];\n\n return [evaluateCyclicDependencies(input.cyclicPackages, mode)];\n}\n\n/*** Evaluates cyclic dependencies while applying the configured enforcement mode. */\nfunction evaluateCyclicDependencies(\n cycles: readonly PackageCycleDetail[],\n mode: Exclude<AuditRuleConfiguration['mode'], 'off'>\n): AuditRuleResult<CyclicDependenciesEvidence> {\n const failed = cycles.length > 0;\n\n return {\n id: 'cyclic-dependencies',\n status: failed ? 'failed' : 'passed',\n policy: mode === 'block' ? 'blocking' : 'advisory',\n message: failed\n ? `Detected ${cycles.length} cyclic package dependenc${cycles.length === 1 ? 'y' : 'ies'}.`\n : 'No cyclic package dependencies detected.',\n details: cycles.map(cycle => cycle.packages.join(' → ')),\n evidence: { cycles },\n };\n}\n\n/*** Returns the effective mode for one known audit rule. */\nfunction findRuleMode(\n rules: readonly AuditRuleConfiguration[],\n id: AuditRuleConfiguration['id']\n): AuditRuleConfiguration['mode'] {\n return rules.find(rule => rule.id === id)?.mode ?? 'off';\n}\n","import fs from 'node:fs/promises';\nimport { basename, relative } from 'node:path';\n\nimport ts from 'typescript';\n\nimport type { ImportDefinition, MethodCall, MethodDefinition, ParsedFile } from '@/shared/types';\nimport { toPosix } from '@/shared/utils/toPosix';\n\n/***\n * Extracts the class name from the content and filename fallback.\n */\nfunction extractClassName(content: string, fileName: string): string {\n const classMatch = /class\\s+(\\w+)/.exec(content);\n if (classMatch) {\n return classMatch[1];\n }\n /*** @todo Don't return this fallback, search for functional wrapper instead */\n return basename(fileName, '.ts');\n}\n\n/***\n * Extracts method definitions from TypeScript content.\n */\nfunction extractMethodDefinitions(content: string): MethodDefinition[] {\n const sourceFile = ts.createSourceFile('temp.ts', content, ts.ScriptTarget.Latest, true);\n const methods: MethodDefinition[] = [];\n\n /*** Visits syntax nodes while collecting parser metadata. */\n function visit(node: ts.Node) {\n if (ts.isMethodDeclaration(node) && node.name) {\n const name = node.name.getText();\n const returnType = node.type?.getText() ?? 'void';\n const parameters = node.parameters.map(p => p.getText());\n const modifiers = ts.getCombinedModifierFlags(node);\n let visibility: MethodDefinition['visibility'] = 'default';\n if (modifiers & ts.ModifierFlags.Private) visibility = 'private';\n else if (modifiers & ts.ModifierFlags.Protected) visibility = 'protected';\n else if (modifiers & ts.ModifierFlags.Public) visibility = 'public';\n\n methods.push({ name, returnType, parameters, visibility });\n }\n\n ts.forEachChild(node, visit);\n }\n\n visit(sourceFile);\n\n return methods;\n}\n\n/***\n * Extracts method calls from TypeScript content.\n */\nfunction extractMethodCalls(content: string): MethodCall[] {\n const sourceFile = ts.createSourceFile('temp.ts', content, ts.ScriptTarget.Latest, true);\n const calls: MethodCall[] = [];\n\n /*** Visits syntax nodes while collecting parser metadata. */\n function visit(node: ts.Node) {\n if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression)) {\n const callee = node.expression.expression.getText();\n const method = node.expression.name.getText();\n calls.push({ callee, method });\n }\n ts.forEachChild(node, visit);\n }\n\n visit(sourceFile);\n\n return calls;\n}\n\n/***\n * Parses a TypeScript file and returns metadata useful for diagram generation.\n */\nexport async function parseFile(\n fullPath: string,\n projectRoot: string,\n imports: readonly ImportDefinition[]\n): Promise<ParsedFile> {\n const posixFullPath = toPosix(fullPath);\n const content = await fs.readFile(posixFullPath, 'utf-8');\n const relativePath = toPosix(relative(projectRoot, posixFullPath));\n const segments = relativePath.split('/');\n const segmentedPath = segments.slice(0, -1);\n\n return {\n className: extractClassName(content, fullPath),\n imports: [...imports],\n methods: extractMethodDefinitions(content),\n calls: extractMethodCalls(content),\n package: segmentedPath.join('.'),\n path: relativePath,\n };\n}\n","const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: unknown) => void = (\n pattern: unknown,\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n","export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n","import { expand } from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport type { ExtglobType } from './ast.js'\nimport { AST } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\nexport type Platform =\n | 'aix'\n | 'android'\n | 'darwin'\n | 'freebsd'\n | 'haiku'\n | 'linux'\n | 'openbsd'\n | 'sunos'\n | 'win32'\n | 'cygwin'\n | 'netbsd'\n\nexport interface MinimatchOptions {\n /** do not expand `{x,y}` style braces */\n nobrace?: boolean\n /** do not treat patterns starting with `#` as a comment */\n nocomment?: boolean\n /** do not treat patterns starting with `!` as a negation */\n nonegate?: boolean\n /** print LOTS of debugging output */\n debug?: boolean\n /** treat `**` the same as `*` */\n noglobstar?: boolean\n /** do not expand extglobs like `+(a|b)` */\n noext?: boolean\n /** return the pattern if nothing matches */\n nonull?: boolean\n /** treat `\\\\` as a path separator, not an escape character */\n windowsPathsNoEscape?: boolean\n /**\n * inverse of {@link MinimatchOptions.windowsPathsNoEscape}\n * @deprecated\n */\n allowWindowsEscape?: boolean\n /**\n * Compare a partial path to a pattern. As long as the parts\n * of the path that are present are not contradicted by the\n * pattern, it will be treated as a match. This is useful in\n * applications where you're walking through a folder structure,\n * and don't yet have the full path, but want to ensure that you\n * do not walk down paths that can never be a match.\n */\n partial?: boolean\n /** allow matches that start with `.` even if the pattern does not */\n dot?: boolean\n /** ignore case */\n nocase?: boolean\n /** ignore case only in wildcard patterns */\n nocaseMagicOnly?: boolean\n /** consider braces to be \"magic\" for the purpose of `hasMagic` */\n magicalBraces?: boolean\n /**\n * If set, then patterns without slashes will be matched\n * against the basename of the path if it contains slashes.\n * For example, `a?b` would match the path `/xyz/123/acb`, but\n * not `/xyz/acb/123`.\n */\n matchBase?: boolean\n /** invert the results of negated matches */\n flipNegate?: boolean\n /** do not collapse multiple `/` into a single `/` */\n preserveMultipleSlashes?: boolean\n /**\n * A number indicating the level of optimization that should be done\n * to the pattern prior to parsing and using it for matches.\n */\n optimizationLevel?: number\n /** operating system platform */\n platform?: Platform\n /**\n * When a pattern starts with a UNC path or drive letter, and in\n * `nocase:true` mode, do not convert the root portions of the\n * pattern into a case-insensitive regular expression, and instead\n * leave them as strings.\n *\n * This is the default when the platform is `win32` and\n * `nocase:true` is set.\n */\n windowsNoMagicRoot?: boolean\n /**\n * max number of `{...}` patterns to expand. Default 100_000.\n */\n braceExpandMax?: number\n /**\n * Max number of non-adjacent `**` patterns to recursively walk down.\n *\n * The default of 200 is almost certainly high enough for most purposes,\n * and can handle absurdly excessive patterns.\n */\n maxGlobstarRecursion?: number\n\n /**\n * Max depth to traverse for nested extglobs like `*(a|b|c)`\n *\n * Default is 2, which is quite low, but any higher value\n * swiftly results in punishing performance impacts. Note\n * that this is *not* relevant when the globstar types can\n * be safely coalesced into a single set.\n *\n * For example, `*(a|@(b|c)|d)` would be flattened into\n * `*(a|b|c|d)`. Thus, many common extglobs will retain good\n * performance and never hit this limit, even if they are\n * excessively deep and complicated.\n *\n * If the limit is hit, then the extglob characters are simply\n * not parsed, and the pattern effectively switches into\n * `noextglob: true` mode for the contents of that nested\n * sub-pattern. This will typically _not_ result in a match,\n * but is considered a valid trade-off for security and\n * performance.\n */\n maxExtglobRecursion?: number\n}\n\nexport const minimatch = (\n p: string,\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n assertValidPattern(pattern)\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?*[(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) =>\n !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) =>\n f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) =>\n f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?*[(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n typeof process === 'object' && process ?\n (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix') as Platform\n\nexport type Sep = '\\\\' | '/'\n\nconst path: { [k: string]: { sep: Sep } } = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep =\n defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n (pattern: string, options: MinimatchOptions = {}) =>\n (p: string) =>\n minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n const orig = minimatch\n\n const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n orig(p, pattern, ext(def, options))\n\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern: string, options: MinimatchOptions = {}) {\n super(pattern, ext(def, options))\n }\n static defaults(options: MinimatchOptions) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n },\n\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n super(type, parent, ext(def, options))\n }\n /* c8 ignore stop */\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options))\n }\n },\n\n unescape: (\n s: string,\n options: Pick<\n MinimatchOptions,\n 'windowsPathsNoEscape' | 'magicalBraces'\n > = {},\n ) => orig.unescape(s, ext(def, options)),\n\n escape: (\n s: string,\n options: Pick<\n MinimatchOptions,\n 'windowsPathsNoEscape' | 'magicalBraces'\n > = {},\n ) => orig.escape(s, ext(def, options)),\n\n filter: (pattern: string, options: MinimatchOptions = {}) =>\n orig.filter(pattern, ext(def, options)),\n\n defaults: (options: MinimatchOptions) =>\n orig.defaults(ext(def, options)),\n\n makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n orig.makeRe(pattern, ext(def, options)),\n\n braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n orig.braceExpand(pattern, ext(def, options)),\n\n match: (\n list: string[],\n pattern: string,\n options: MinimatchOptions = {},\n ) => orig.match(list, pattern, ext(def, options)),\n\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li <https://github.com/yetingli> for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern, { max: options.braceExpandMax })\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n list: string[],\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n const mm = new Minimatch(pattern, options)\n list = list.filter(f => mm.match(f))\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n _src?: string\n _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n options: MinimatchOptions\n set: ParseReturnFiltered[][]\n pattern: string\n\n windowsPathsNoEscape: boolean\n nonegate: boolean\n negate: boolean\n comment: boolean\n empty: boolean\n preserveMultipleSlashes: boolean\n partial: boolean\n globSet: string[]\n globParts: string[][]\n nocase: boolean\n\n isWindows: boolean\n platform: Platform\n windowsNoMagicRoot: boolean\n maxGlobstarRecursion: number\n\n regexp: false | null | MMRegExp\n constructor(pattern: string, options: MinimatchOptions = {}) {\n assertValidPattern(pattern)\n\n options = options || {}\n this.options = options\n this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200\n this.pattern = pattern\n this.platform = options.platform || defaultPlatform\n this.isWindows = this.platform === 'win32'\n // avoid the annoying deprecation flag lol\n const awe = ('allowWindow' + 'sEscape') as keyof MinimatchOptions\n this.windowsPathsNoEscape =\n !!options.windowsPathsNoEscape || options[awe] === false\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/')\n }\n this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n this.regexp = null\n this.negate = false\n this.nonegate = !!options.nonegate\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n this.nocase = !!this.options.nocase\n this.windowsNoMagicRoot =\n options.windowsNoMagicRoot !== undefined ?\n options.windowsNoMagicRoot\n : !!(this.isWindows && this.nocase)\n\n this.globSet = []\n this.globParts = []\n this.set = []\n\n // make the set of regexps etc.\n this.make()\n }\n\n hasMagic(): boolean {\n if (this.options.magicalBraces && this.set.length > 1) {\n return true\n }\n for (const pattern of this.set) {\n for (const part of pattern) {\n if (typeof part !== 'string') return true\n }\n }\n return false\n }\n\n debug(..._: unknown[]) {}\n\n make() {\n const pattern = this.pattern\n const options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())]\n\n if (options.debug) {\n //oxlint-disable-next-line no-console\n this.debug = (...args: unknown[]) => console.error(...args)\n }\n\n this.debug(this.pattern, this.globSet)\n\n // step 3: now we have a set, so turn each one into a series of\n // path-portion matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n //\n // First, we preprocess to make the glob pattern sets a bit simpler\n // and deduped. There are some perf-killing patterns that can cause\n // problems with a glob walk, but we can simplify them down a bit.\n const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n this.globParts = this.preprocess(rawGlobParts)\n this.debug(this.pattern, this.globParts)\n\n // glob --> regexps\n let set = this.globParts.map((s, _, __) => {\n if (this.isWindows && this.windowsNoMagicRoot) {\n // check if it's a drive or unc path.\n const isUNC =\n s[0] === '' &&\n s[1] === '' &&\n (s[2] === '?' || !globMagic.test(s[2])) &&\n !globMagic.test(s[3])\n const isDrive = /^[a-z]:/i.test(s[0])\n if (isUNC) {\n return [\n ...s.slice(0, 4),\n ...s.slice(4).map(ss => this.parse(ss)),\n ]\n } else if (isDrive) {\n return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n }\n }\n return s.map(ss => this.parse(ss))\n })\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n this.set = set.filter(\n s => s.indexOf(false) === -1,\n ) as ParseReturnFiltered[][]\n\n // do not treat the ? in UNC paths as magic\n if (this.isWindows) {\n for (let i = 0; i < this.set.length; i++) {\n const p = this.set[i]\n if (\n p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])\n ) {\n p[2] = '?'\n }\n }\n }\n\n this.debug(this.pattern, this.set)\n }\n\n // various transforms to equivalent pattern sets that are\n // faster to process in a filesystem walk. The goal is to\n // eliminate what we can, and push all ** patterns as far\n // to the right as possible, even if it increases the number\n // of patterns that we have to process.\n preprocess(globParts: string[][]) {\n // if we're not in globstar mode, then turn ** into *\n if (this.options.noglobstar) {\n for (const partset of globParts) {\n for (let j = 0; j < partset.length; j++) {\n if (partset[j] === '**') {\n partset[j] = '*'\n }\n }\n }\n }\n\n const { optimizationLevel = 1 } = this.options\n\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts)\n globParts = this.secondPhasePreProcess(globParts)\n } else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts)\n } else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts)\n }\n\n return globParts\n }\n\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let i = gs\n while (parts[i + 1] === '**') {\n i++\n }\n if (i !== gs) {\n parts.splice(gs, i - gs)\n }\n }\n return parts\n })\n }\n\n // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n parts = parts.reduce((set: string[], part) => {\n const prev = set[set.length - 1]\n if (part === '**' && prev === '**') {\n return set\n }\n if (part === '..') {\n if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n set.pop()\n return set\n }\n }\n set.push(part)\n return set\n }, [])\n return parts.length === 0 ? [''] : parts\n })\n }\n\n levelTwoFileOptimize(parts: string | string[]) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts)\n }\n let didSomething: boolean = false\n\n do {\n didSomething = false\n // <pre>/<e>/<rest> -> <pre>/<rest>\n if (!this.preserveMultipleSlashes) {\n for (let i = 1; i < parts.length - 1; i++) {\n const p = parts[i]\n // don't squeeze out UNC patterns\n if (i === 1 && p === '' && parts[0] === '') continue\n if (p === '.' || p === '') {\n didSomething = true\n parts.splice(i, 1)\n i--\n }\n }\n if (\n parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')\n ) {\n didSomething = true\n parts.pop()\n }\n }\n\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n let dd: number = 0\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1]\n if (\n p &&\n p !== '.' &&\n p !== '..' &&\n p !== '**' &&\n !(this.isWindows && /^[a-z]:$/i.test(p))\n ) {\n didSomething = true\n parts.splice(dd - 1, 2)\n dd -= 2\n }\n }\n } while (didSomething)\n return parts.length === 0 ? [''] : parts\n }\n\n // First phase: single-pattern processing\n // <pre> is 1 or more portions\n // <rest> is 1 or more portions\n // <p> is any portion other than ., .., '', or **\n // <e> is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}\n // <pre>/<e>/<rest> -> <pre>/<rest>\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n // **/**/<rest> -> **/<rest>\n //\n // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow\n // this WOULD be allowed if ** did follow symlinks, or * didn't\n firstPhasePreProcess(globParts: string[][]) {\n let didSomething = false\n do {\n didSomething = false\n // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n // <pre>/**/**/<rest> -> <pre>/**/<rest>\n gss++\n }\n // eg, if gs is 2 and gss is 4, that means we have 3 **\n // parts, and can remove 2 of them.\n if (gss > gs) {\n parts.splice(gs + 1, gss - gs)\n }\n\n let next = parts[gs + 1]\n const p = parts[gs + 2]\n const p2 = parts[gs + 3]\n if (next !== '..') continue\n if (\n !p ||\n p === '.' ||\n p === '..' ||\n !p2 ||\n p2 === '.' ||\n p2 === '..'\n ) {\n continue\n }\n didSomething = true\n // edit parts in place, and push the new one\n parts.splice(gs, 1)\n const other = parts.slice(0)\n other[gs] = '**'\n globParts.push(other)\n gs--\n }\n\n // <pre>/<e>/<rest> -> <pre>/<rest>\n if (!this.preserveMultipleSlashes) {\n for (let i = 1; i < parts.length - 1; i++) {\n const p = parts[i]\n // don't squeeze out UNC patterns\n if (i === 1 && p === '' && parts[0] === '') continue\n if (p === '.' || p === '') {\n didSomething = true\n parts.splice(i, 1)\n i--\n }\n }\n if (\n parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')\n ) {\n didSomething = true\n parts.pop()\n }\n }\n\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n let dd: number = 0\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1]\n if (p && p !== '.' && p !== '..' && p !== '**') {\n didSomething = true\n const needDot = dd === 1 && parts[dd + 1] === '**'\n const splin = needDot ? ['.'] : []\n parts.splice(dd - 1, 2, ...splin)\n if (parts.length === 0) parts.push('')\n dd -= 2\n }\n }\n }\n } while (didSomething)\n\n return globParts\n }\n\n // second phase: multi-pattern dedupes\n // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>\n // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>\n // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>\n //\n // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>\n // ^-- not valid because ** doens't follow symlinks\n secondPhasePreProcess(globParts: string[][]): string[][] {\n for (let i = 0; i < globParts.length - 1; i++) {\n for (let j = i + 1; j < globParts.length; j++) {\n const matched = this.partsMatch(\n globParts[i],\n globParts[j],\n !this.preserveMultipleSlashes,\n )\n if (matched) {\n globParts[i] = []\n globParts[j] = matched\n break\n }\n }\n }\n return globParts.filter(gs => gs.length)\n }\n\n partsMatch(\n a: string[],\n b: string[],\n emptyGSMatch: boolean = false,\n ): false | string[] {\n let ai = 0\n let bi = 0\n let result: string[] = []\n let which: string = ''\n while (ai < a.length && bi < b.length) {\n if (a[ai] === b[bi]) {\n result.push(which === 'b' ? b[bi] : a[ai])\n ai++\n bi++\n } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n result.push(a[ai])\n ai++\n } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n result.push(b[bi])\n bi++\n } else if (\n a[ai] === '*' &&\n b[bi] &&\n (this.options.dot || !b[bi].startsWith('.')) &&\n b[bi] !== '**'\n ) {\n if (which === 'b') return false\n which = 'a'\n result.push(a[ai])\n ai++\n bi++\n } else if (\n b[bi] === '*' &&\n a[ai] &&\n (this.options.dot || !a[ai].startsWith('.')) &&\n a[ai] !== '**'\n ) {\n if (which === 'a') return false\n which = 'b'\n result.push(b[bi])\n ai++\n bi++\n } else {\n return false\n }\n }\n // if we fall out of the loop, it means they two are identical\n // as long as their lengths match\n return a.length === b.length && result\n }\n\n parseNegate() {\n if (this.nonegate) return\n\n const pattern = this.pattern\n let negate = false\n let negateOffset = 0\n\n for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.slice(negateOffset)\n this.negate = negate\n }\n\n // set partial to true to test if, for example,\n // \"/a/b\" matches the start of \"/*/b/*/d\"\n // Partial means, if you run out of file before you run\n // out of pattern, then that's fine, as long as all\n // the parts match.\n matchOne(\n file: string[],\n pattern: ParseReturn[],\n partial: boolean = false,\n ) {\n let fileStartIndex = 0\n let patternStartIndex = 0\n\n // UNC paths like //?/X:/... can match X:/... and vice versa\n // Drive letters in absolute drive or unc paths are always compared\n // case-insensitively.\n if (this.isWindows) {\n const fileDrive =\n typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n const fileUNC =\n !fileDrive &&\n file[0] === '' &&\n file[1] === '' &&\n file[2] === '?' &&\n /^[a-z]:$/i.test(file[3])\n\n const patternDrive =\n typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n const patternUNC =\n !patternDrive &&\n pattern[0] === '' &&\n pattern[1] === '' &&\n pattern[2] === '?' &&\n typeof pattern[3] === 'string' &&\n /^[a-z]:$/i.test(pattern[3])\n\n const fdi =\n fileUNC ? 3\n : fileDrive ? 0\n : undefined\n const pdi =\n patternUNC ? 3\n : patternDrive ? 0\n : undefined\n if (typeof fdi === 'number' && typeof pdi === 'number') {\n const [fd, pd]: [string, string] = [\n file[fdi],\n pattern[pdi] as string,\n ]\n // start matching at the drive letter index of each\n if (fd.toLowerCase() === pd.toLowerCase()) {\n pattern[pdi] = fd\n patternStartIndex = pdi\n fileStartIndex = fdi\n }\n }\n }\n\n // resolve and reduce . and .. portions in the file as well.\n // don't need to do the second phase, because it's only one string[]\n const { optimizationLevel = 1 } = this.options\n if (optimizationLevel >= 2) {\n file = this.levelTwoFileOptimize(file)\n }\n\n if (pattern.includes(GLOBSTAR)) {\n return this.#matchGlobstar(\n file,\n pattern,\n partial,\n fileStartIndex,\n patternStartIndex,\n )\n }\n\n return this.#matchOne(\n file,\n pattern,\n partial,\n fileStartIndex,\n patternStartIndex,\n )\n }\n\n #matchGlobstar(\n file: string[],\n pattern: ParseReturn[],\n partial: boolean,\n fileIndex: number,\n patternIndex: number,\n ) {\n // split the pattern into head, tail, and middle of ** delimited parts\n const firstgs = pattern.indexOf(GLOBSTAR, patternIndex)\n const lastgs = pattern.lastIndexOf(GLOBSTAR)\n\n // split the pattern up into globstar-delimited sections\n // the tail has to be at the end, and the others just have\n // to be found in order from the head.\n const [head, body, tail] =\n partial ?\n [\n pattern.slice(patternIndex, firstgs),\n pattern.slice(firstgs + 1),\n [],\n ]\n : [\n pattern.slice(patternIndex, firstgs),\n pattern.slice(firstgs + 1, lastgs),\n pattern.slice(lastgs + 1),\n ]\n\n // check the head, from the current file/pattern index.\n if (head.length) {\n const fileHead = file.slice(fileIndex, fileIndex + head.length)\n if (!this.#matchOne(fileHead, head, partial, 0, 0)) {\n return false\n }\n fileIndex += head.length\n patternIndex += head.length\n }\n // now we know the head matches!\n\n // if the last portion is not empty, it MUST match the end\n // check the tail\n let fileTailMatch: number = 0\n if (tail.length) {\n // if head + tail > file, then we cannot possibly match\n if (tail.length + fileIndex > file.length) return false\n\n // try to match the tail\n let tailStart = file.length - tail.length\n if (this.#matchOne(file, tail, partial, tailStart, 0)) {\n fileTailMatch = tail.length\n } else {\n // affordance for stuff like a/**/* matching a/b/\n // if the last file portion is '', and there's more to the pattern\n // then try without the '' bit.\n if (\n file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length\n ) {\n return false\n }\n tailStart--\n if (!this.#matchOne(file, tail, partial, tailStart, 0)) {\n return false\n }\n fileTailMatch = tail.length + 1\n }\n }\n\n // now we know the tail matches!\n\n // the middle is zero or more portions wrapped in **, possibly\n // containing more ** sections.\n // so a/**/b/**/c/**/d has become **/b/**/c/**\n // if it's empty, it means a/**/b, just verify we have no bad dots\n // if there's no tail, so it ends on /**, then we must have *something*\n // after the head, or it's not a matc\n if (!body.length) {\n let sawSome = !!fileTailMatch\n for (let i = fileIndex; i < file.length - fileTailMatch; i++) {\n const f = String(file[i])\n sawSome = true\n if (\n f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))\n ) {\n return false\n }\n }\n // in partial mode, we just need to get past all file parts\n return partial || sawSome\n }\n\n // now we know that there's one or more body sections, which can\n // be matched anywhere from the 0 index (because the head was pruned)\n // through to the length-fileTailMatch index.\n // split the body up into sections, and note the minimum index it can\n // be found at (start with the length of all previous segments)\n // [section, before, after]\n const bodySegments: [ParseReturn[], number][] = [[[], 0]]\n let currentBody: [ParseReturn[], number] = bodySegments[0]\n let nonGsParts = 0\n const nonGsPartsSums: number[] = [0]\n for (const b of body) {\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts)\n currentBody = [[], 0]\n bodySegments.push(currentBody)\n } else {\n currentBody[0].push(b)\n nonGsParts++\n }\n }\n let i = bodySegments.length - 1\n const fileLength = file.length - fileTailMatch\n for (const b of bodySegments) {\n b[1] = fileLength - ((nonGsPartsSums[i--] as number) + b[0].length)\n }\n\n return !!this.#matchGlobStarBodySections(\n file,\n bodySegments,\n fileIndex,\n 0,\n partial,\n 0,\n !!fileTailMatch,\n )\n }\n\n // return false for \"nope, not matching\"\n // return null for \"not matching, cannot keep trying\"\n #matchGlobStarBodySections(\n file: string[],\n // pattern section, last possible position for it\n bodySegments: [ParseReturn[], number][],\n fileIndex: number,\n bodyIndex: number,\n partial: boolean,\n globStarDepth: number,\n sawTail: boolean,\n ): boolean | null {\n // take the first body segment, and walk from fileIndex to its \"after\"\n // value at the end\n // If it doesn't match at that position, we increment, until we hit\n // that final possible position, and give up.\n // If it does match, then advance and try to rest.\n // If any of them fail we keep walking forward.\n // this is still a bit recursively painful, but it's more constrained\n // than previous implementations, because we never test something that\n // can't possibly be a valid matching condition.\n const bs = bodySegments[bodyIndex]\n if (!bs) {\n // just make sure that there's no bad dots\n for (let i = fileIndex; i < file.length; i++) {\n sawTail = true\n const f = file[i]\n if (\n f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))\n ) {\n return false\n }\n }\n return sawTail\n }\n\n // have a non-globstar body section to test\n const [body, after] = bs\n while (fileIndex <= after) {\n const m = this.#matchOne(\n file.slice(0, fileIndex + body.length),\n body,\n partial,\n fileIndex,\n 0,\n )\n // if limit exceeded, no match. intentional false negative,\n // acceptable break in correctness for security.\n if (m && globStarDepth < this.maxGlobstarRecursion) {\n // match! see if the rest match. if so, we're done!\n const sub = this.#matchGlobStarBodySections(\n file,\n bodySegments,\n fileIndex + body.length,\n bodyIndex + 1,\n partial,\n globStarDepth + 1,\n sawTail,\n )\n if (sub !== false) {\n return sub\n }\n }\n const f = file[fileIndex]\n if (\n f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))\n ) {\n return false\n }\n\n fileIndex++\n }\n // walked off. no point continuing\n return partial || null\n }\n\n #matchOne(\n file: string[],\n pattern: ParseReturn[],\n partial: boolean,\n fileIndex: number,\n patternIndex: number,\n ) {\n let fi: number\n let pi: number\n let pl: number\n let fl: number\n for (\n fi = fileIndex,\n pi = patternIndex,\n fl = file.length,\n pl = pattern.length;\n fi < fl && pi < pl;\n fi++, pi++\n ) {\n this.debug('matchOne loop')\n let p = pattern[pi]\n let f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* c8 ignore start */\n if (p === false || p === GLOBSTAR) {\n return false\n }\n /* c8 ignore stop */\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n let hit: boolean\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = p.test(f)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return fi === fl - 1 && file[fi] === ''\n\n /* c8 ignore start */\n } else {\n // should be unreachable.\n throw new Error('wtf?')\n }\n /* c8 ignore stop */\n }\n\n braceExpand() {\n return braceExpand(this.pattern, this.options)\n }\n\n parse(pattern: string): ParseReturn {\n assertValidPattern(pattern)\n\n const options = this.options\n\n // shortcuts\n if (pattern === '**') return GLOBSTAR\n if (pattern === '') return ''\n\n // far and away, the most common glob pattern parts are\n // *, *.*, and *.<ext> Add a fast check method for those.\n let m: RegExpMatchArray | null\n let fastTest: null | ((f: string) => boolean) = null\n if ((m = pattern.match(starRE))) {\n fastTest = options.dot ? starTestDot : starTest\n } else if ((m = pattern.match(starDotExtRE))) {\n fastTest = (\n options.nocase ?\n options.dot ?\n starDotExtTestNocaseDot\n : starDotExtTestNocase\n : options.dot ? starDotExtTestDot\n : starDotExtTest)(m[1])\n } else if ((m = pattern.match(qmarksRE))) {\n fastTest = (\n options.nocase ?\n options.dot ?\n qmarksTestNocaseDot\n : qmarksTestNocase\n : options.dot ? qmarksTestDot\n : qmarksTest)(m)\n } else if ((m = pattern.match(starDotStarRE))) {\n fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n } else if ((m = pattern.match(dotStarRE))) {\n fastTest = dotStarTest\n }\n\n const re = AST.fromGlob(pattern, this.options).toMMPattern()\n if (fastTest && typeof re === 'object') {\n // Avoids overriding in frozen environments\n Reflect.defineProperty(re, 'test', { value: fastTest })\n }\n return re\n }\n\n makeRe() {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n const set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n const options = this.options\n\n const twoStar =\n options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n const flags = new Set(options.nocase ? ['i'] : [])\n\n // regexpify non-globstar patterns\n // if ** is only item, then we just do one twoStar\n // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n // if ** is last, append (\\/twoStar|) to previous\n // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n // then filter out GLOBSTAR symbols\n let re = set\n .map(pattern => {\n const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n if (p instanceof RegExp) {\n for (const f of p.flags.split('')) flags.add(f)\n }\n return (\n typeof p === 'string' ? regExpEscape(p)\n : p === GLOBSTAR ? GLOBSTAR\n : p._src\n )\n }) as (string | typeof GLOBSTAR)[]\n pp.forEach((p, i) => {\n const next = pp[i + 1]\n const prev = pp[i - 1]\n if (p !== GLOBSTAR || prev === GLOBSTAR) {\n return\n }\n if (prev === undefined) {\n if (next !== undefined && next !== GLOBSTAR) {\n pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n } else {\n pp[i] = twoStar\n }\n } else if (next === undefined) {\n pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?'\n } else if (next !== GLOBSTAR) {\n pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n pp[i + 1] = GLOBSTAR\n }\n })\n const filtered = pp.filter(p => p !== GLOBSTAR)\n\n // For partial matches, we need to make the pattern match\n // any prefix of the full path. We do this by generating\n // alternative patterns that match progressively longer prefixes.\n if (this.partial && filtered.length >= 1) {\n const prefixes: string[] = []\n for (let i = 1; i <= filtered.length; i++) {\n prefixes.push(filtered.slice(0, i).join('/'))\n }\n return '(?:' + prefixes.join('|') + ')'\n }\n\n return filtered.join('/')\n })\n .join('|')\n\n // need to wrap in parens if we had more than one thing with |,\n // otherwise only the first will be anchored to ^ and the last to $\n const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^' + open + re + close + '$'\n\n // In partial mode, '/' should always match as it's a valid prefix for any pattern\n if (this.partial) {\n re = '^(?:\\\\/|' + open + re.slice(1, -1) + close + ')$'\n }\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').+$'\n\n try {\n this.regexp = new RegExp(re, [...flags].join(''))\n /* c8 ignore start */\n } catch {\n // should be impossible\n this.regexp = false\n }\n /* c8 ignore stop */\n return this.regexp\n }\n\n slashSplit(p: string) {\n // if p starts with // on windows, we preserve that\n // so that UNC paths aren't broken. Otherwise, any number of\n // / characters are coalesced into one, unless\n // preserveMultipleSlashes is set to true.\n if (this.preserveMultipleSlashes) {\n return p.split('/')\n } else if (this.isWindows && /^\\/\\/[^/]+/.test(p)) {\n // add an extra '' for the one we lose\n return ['', ...p.split(/\\/+/)]\n } else {\n return p.split(/\\/+/)\n }\n }\n\n match(f: string, partial = this.partial) {\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) {\n return false\n }\n if (this.empty) {\n return f === ''\n }\n\n if (f === '/' && partial) {\n return true\n }\n\n const options = this.options\n\n // windows: need to use /, not \\\n if (this.isWindows) {\n f = f.split('\\\\').join('/')\n }\n\n // treat the test path as a set of pathparts.\n const ff = this.slashSplit(f)\n this.debug(this.pattern, 'split', ff)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n const set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n let filename: string = ff[ff.length - 1]\n if (!filename) {\n for (let i = ff.length - 2; !filename && i >= 0; i--) {\n filename = ff[i]\n }\n }\n\n for (const pattern of set) {\n let file = ff\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n const hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) {\n return true\n }\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) {\n return false\n }\n return this.negate\n }\n\n static defaults(def: MinimatchOptions) {\n return minimatch.defaults(def).Minimatch\n }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n","import ts from 'typescript';\n\n/*** Extract static import module specifiers from TypeScript source text. */\nexport function extractTypeScriptImports(filePath: string, content: string): readonly string[] {\n const source = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true);\n return source.statements.flatMap((statement) =>\n ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier)\n ? [statement.moduleSpecifier.text]\n : [],\n );\n}\n","import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic C++ source/header files without following symlinks or nested package roots. */\nexport async function collectCppFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set(['.git', 'build', 'coverage', 'dist', 'out']);\n\nconst cppExtensions = ['.cpp', '.cc', '.cxx', '.h', '.hpp', '.hxx'];\n\n/*** Recursively collect supported C++ files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (\n entry.isFile() &&\n cppExtensions.some((extension) => entry.name.endsWith(extension))\n ) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n","import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic Python source files without following symlinks or nested package roots. */\nexport async function collectPythonFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set([\n '.git',\n '.mypy_cache',\n '.pytest_cache',\n '.venv',\n '__pycache__',\n 'build',\n 'dist',\n 'venv',\n]);\n\n/*** Recursively collect Python files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (entry.isFile() && (entry.name.endsWith('.py') || entry.name.endsWith('.pyi'))) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n","import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic TypeScript source files without following symlinks or nested package roots. */\nexport async function collectTypeScriptFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set([\n '.git',\n '.next',\n 'build',\n 'coverage',\n 'dist',\n 'node_modules',\n]);\n\n/*** Recursively collect TypeScript files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (entry.isFile() && isTypeScriptFile(entry.name)) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Identify TypeScript source suffixes supported by the first analyzer. */\nfunction isTypeScriptFile(file: string): boolean {\n return ['.ts', '.tsx', '.mts', '.cts'].some((extension) => file.endsWith(extension));\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n","import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic Delphi source files without following symlinks or nested package roots. */\nexport async function collectDelphiFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set(['.git', 'build', 'coverage', 'dist', 'lib']);\n\nconst delphiExtensions = ['.pas', '.pp', '.dpr'];\n\n/*** Recursively collect supported Delphi files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (\n entry.isFile() &&\n delphiExtensions.some((extension) => entry.name.toLowerCase().endsWith(extension))\n ) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n","import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic Kotlin source files without following symlinks or nested package roots. */\nexport async function collectKotlinFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set(['.git', 'build', 'coverage', 'dist', 'target']);\n\n/*** Recursively collect Kotlin files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (entry.isFile() && (entry.name.endsWith('.kt') || entry.name.endsWith('.kts'))) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n","import { opendir } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Collect deterministic Java source files without following symlinks or nested package roots. */\nexport async function collectJavaFilesAsync(\n rootPath: string,\n sourceRoots: readonly string[],\n excludedRoots: readonly string[],\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n const files = await Promise.all(\n sourceRoots.map((sourceRoot) =>\n visitDirectoryAsync(\n sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot),\n new Set(excludedRoots),\n signal,\n ),\n ),\n );\n return [...new Set(files.flat())].sort();\n}\n\nconst excludedDirectoryNames = new Set(['.git', 'build', 'coverage', 'dist', 'target']);\n\n/*** Recursively collect Java files from one source root. */\nasync function visitDirectoryAsync(\n directory: string,\n excludedRoots: ReadonlySet<string>,\n signal: AbortSignal | undefined,\n): Promise<readonly string[]> {\n signal?.throwIfAborted();\n try {\n const handle = await opendir(directory);\n const files: string[] = [];\n for await (const entry of handle) {\n signal?.throwIfAborted();\n const target = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) continue;\n if (entry.isDirectory()) {\n if (excludedDirectoryNames.has(entry.name) || excludedRoots.has(target)) continue;\n files.push(...(await visitDirectoryAsync(target, excludedRoots, signal)));\n } else if (entry.isFile() && entry.name.endsWith('.java')) {\n files.push(target);\n }\n }\n return files;\n } catch (error) {\n if (isMissingPathError(error)) return [];\n throw error;\n }\n}\n\n/*** Treat absent optional detector source roots as empty instead of analysis failures. */\nfunction isMissingPathError(error: unknown): boolean {\n return error instanceof Error && 'code' in error && error.code === 'ENOENT';\n}\n","import { opendir, realpath, stat } from 'node:fs/promises';\nimport path from 'node:path';\n\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\nimport type { ProjectDiagnostic } from '../../../../types/detection.js';\nimport type { ProjectInspectionOptions, ProjectSnapshot } from '../../../../types/inspection.js';\nimport { defaultExcludedDirectories, defaultManifestNames } from '../../constants/scanPolicy.js';\nimport { readManifestAsync } from './readManifestAsync.js';\n\n/*** Collect bounded inspection evidence while pruning dependencies and never following directory symlinks. */\nexport async function readSnapshotAsync(\n rootPath: string,\n options: ProjectInspectionOptions,\n): Promise<ProjectSnapshot> {\n const root = await realpath(rootPath);\n if (!(await stat(root)).isDirectory()) throw new Error('Inspection root must be a directory.');\n const limits = {\n maxDepth: options.maxDepth ?? 16,\n maxEntries: options.maxEntries ?? 20_000,\n maxManifestBytes: options.maxManifestBytes ?? 262_144,\n maxTotalManifestBytes: options.maxTotalManifestBytes ?? 8_388_608,\n };\n if (Object.values(limits).some((value) => !Number.isSafeInteger(value) || value < 1)) {\n throw new Error('Inspection limits must be positive safe integers.');\n }\n const state: ScanState = { count: 0, bytes: 0, files: [], contents: new Map(), diagnostics: [] };\n const context: ScanContext = {\n root,\n options,\n limits,\n state,\n excluded: new Set([...defaultExcludedDirectories, ...(options.excludeDirectories ?? [])]),\n manifests: new Set([...defaultManifestNames, ...(options.manifestNames ?? [])]),\n };\n await visitDirectoryAsync(root, 0, context);\n return {\n rootPath: root,\n files: [...state.files].sort(),\n contents: new Map([...state.contents].sort()),\n diagnostics: state.diagnostics,\n complete: state.diagnostics.length === 0,\n };\n}\n\n// Mutation is contained in the I/O adapter's scan budget/collectors to avoid quadratic copying\n// of up to maxEntries results. No caller-owned state or core domain value is mutated.\ninterface ScanState {\n count: number;\n bytes: number;\n readonly files: string[];\n readonly contents: Map<string, string>;\n readonly diagnostics: ProjectDiagnostic[];\n}\n\ninterface ScanContext {\n readonly root: string;\n readonly options: ProjectInspectionOptions;\n readonly limits: {\n readonly maxDepth: number;\n readonly maxEntries: number;\n readonly maxManifestBytes: number;\n readonly maxTotalManifestBytes: number;\n };\n readonly state: ScanState;\n readonly excluded: ReadonlySet<string>;\n readonly manifests: ReadonlySet<string>;\n}\n\n/*** Stream a directory with a global entry budget; return explicit diagnostics for partial scans. */\nasync function visitDirectoryAsync(\n directory: string,\n depth: number,\n context: ScanContext,\n): Promise<void> {\n context.options.signal?.throwIfAborted();\n if (depth >= context.limits.maxDepth) {\n context.state.diagnostics.push({\n code: 'depth-limit',\n path: directory,\n message: 'Directory was not scanned because the depth limit was reached.',\n });\n return;\n }\n try {\n const handle = await opendir(directory);\n for await (const entry of handle) {\n context.options.signal?.throwIfAborted();\n if (context.state.count >= context.limits.maxEntries) {\n context.state.diagnostics.push({\n code: 'entry-limit',\n path: directory,\n message: 'Scan entry limit reached; inspection is incomplete.',\n });\n break;\n }\n context.state.count += 1;\n const file = path.join(directory, entry.name);\n if (entry.isSymbolicLink()) {\n context.state.diagnostics.push({\n code: 'symlink-skipped',\n path: file,\n message: 'Symbolic links are not followed.',\n });\n } else if (entry.isDirectory() && !context.excluded.has(entry.name)) {\n await visitDirectoryAsync(file, depth + 1, context);\n } else if (entry.isFile()) {\n await visitFileAsync(file, entry.name, context);\n }\n }\n } catch (error) {\n context.options.signal?.throwIfAborted();\n context.state.diagnostics.push({\n code: 'directory-unreadable',\n path: directory,\n message: toErrorMessage(error),\n });\n }\n}\n\n/*** Retain file paths and only read explicitly recognized manifest text. */\nasync function visitFileAsync(file: string, name: string, context: ScanContext): Promise<void> {\n const relative = toPortablePath(path.relative(context.root, file));\n context.state.files.push(relative);\n if (!context.manifests.has(name)) return;\n try {\n const remaining = context.limits.maxTotalManifestBytes - context.state.bytes;\n if (remaining <= 0) throw new Error('Total manifest byte budget reached.');\n const text = await readManifestAsync(\n file,\n context.root,\n Math.min(context.limits.maxManifestBytes, remaining),\n );\n context.state.bytes += Buffer.byteLength(text);\n context.state.contents.set(relative, text);\n } catch (error) {\n context.state.diagnostics.push({\n code: 'manifest-unreadable',\n path: relative,\n message: toErrorMessage(error),\n });\n }\n}\nimport { toErrorMessage } from '@ankhorage/utility/error';\n","import path from 'node:path';\n\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\n/*** Derive a Delphi package path from unit namespace or the owning source directory. */\nexport function delphiPackageForFile(\n rootPath: string,\n sourceRoots: readonly string[],\n file: string,\n unitName: string,\n): string {\n if (unitName.includes('.')) return unitName.split('.').slice(0, -1).join('.');\n const roots = sourceRoots\n .map((sourceRoot) => (sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot)))\n .filter((sourceRoot) => file === sourceRoot || file.startsWith(`${sourceRoot}${path.sep}`))\n .sort((left, right) => right.length - left.length);\n const analysisRoot = roots[0] ?? rootPath;\n const relativeDirectory = path.dirname(path.relative(analysisRoot, file));\n if (relativeDirectory === '.') return '';\n return toPortablePath(relativeDirectory).split('/').join('.');\n}\n","import { isRecord } from '@ankhorage/utility/object';\n\nimport type {\n ProjectDependencyMap,\n ProjectDetectionInput,\n ProjectDiagnostic,\n} from '../../../types/detection.js';\n\n/*** Validate inspected package JSON and report malformed metadata instead of executing project code. */\nexport function readPackageMetadata(\n text: string | undefined,\n path: string,\n): {\n readonly input: ProjectDetectionInput;\n readonly manifest: Readonly<Record<string, unknown>>;\n readonly diagnostics: readonly ProjectDiagnostic[];\n} {\n if (text === undefined) return { input: {}, manifest: {}, diagnostics: [] };\n try {\n const value: unknown = JSON.parse(text);\n if (!isRecord(value)) throw new Error('Expected a package.json object.');\n return {\n manifest: value,\n input: {\n dependencies: dependencyMap(value.dependencies),\n devDependencies: dependencyMap(value.devDependencies),\n peerDependencies: dependencyMap(value.peerDependencies),\n optionalDependencies: dependencyMap(value.optionalDependencies),\n ...(value.engines === undefined ? {} : { engines: dependencyMap(value.engines) }),\n ...(typeof value.packageManager === 'string'\n ? { packageManager: value.packageManager }\n : {}),\n },\n diagnostics: invalidFields(value).map((field) => ({\n code: 'invalid-package-field',\n path,\n message: `Invalid package metadata field: ${field}`,\n })),\n };\n } catch (error) {\n return {\n input: {},\n manifest: {},\n diagnostics: [\n {\n code: 'invalid-manifest',\n path,\n message: toErrorMessage(error),\n },\n ],\n };\n }\n}\n\n/*** Retain only valid dependency versions from one manifest section. */\nfunction dependencyMap(value: unknown): ProjectDependencyMap {\n if (!isRecord(value)) return {};\n return Object.fromEntries(\n Object.entries(value).flatMap(([name, version]) =>\n typeof version === 'string' ? [[name, version]] : [],\n ),\n );\n}\n\n/*** List malformed known manifest fields so partial detection is visible. */\nfunction invalidFields(value: Readonly<Record<string, unknown>>): readonly string[] {\n const maps = Object.entries(value).filter(([name]) =>\n [\n 'dependencies',\n 'devDependencies',\n 'peerDependencies',\n 'optionalDependencies',\n 'engines',\n ].includes(name),\n );\n return [\n ...maps\n .filter(\n ([, field]) =>\n !isRecord(field) || Object.values(field).some((item) => typeof item !== 'string'),\n )\n .map(([name]) => name),\n ...(value.packageManager !== undefined && typeof value.packageManager !== 'string'\n ? ['packageManager']\n : []),\n ];\n}\nimport { toErrorMessage } from '@ankhorage/utility/error';\n","import { readFile } from 'node:fs/promises';\nimport path from 'node:path';\n\nimport type { GraphEdge, GraphNode } from '@ankhorage/graph';\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\nimport type {\n DependencyGraphAnalyzerContext,\n DependencyGraphEdgeData,\n DependencyGraphFragment,\n DependencyGraphNodeData,\n DependencyImportEvidence,\n} from '../../../../../types/dependencyGraph.js';\nimport { collectKotlinFilesAsync } from './collectKotlinFilesAsync.js';\nimport { extractKotlinDependencies } from './extractKotlinDependencies.js';\nimport { extractKotlinPackageFromImport } from './extractKotlinPackageFromImport.js';\n\n/*** Analyze one detected Kotlin package into package/import dependency evidence. */\nexport async function analyzeKotlinProjectAsync(\n context: DependencyGraphAnalyzerContext,\n): Promise<DependencyGraphFragment> {\n const language = context.package.detection.languages.find(({ id }) => id === 'kotlin');\n const files = await collectKotlinFilesAsync(\n context.package.rootPath,\n language?.sourceRoots ?? ['src/main/kotlin', 'src', '.'],\n context.excludedRoots,\n context.signal,\n );\n const sources = await Promise.all(\n files.map(async (file) => ({\n file,\n dependencies: extractKotlinDependencies(await readFile(file, 'utf8')),\n })),\n );\n const intrinsicPackages = new Set(\n sources\n .map(({ dependencies }) => dependencies.packageName)\n .filter((packageName) => packageName !== ''),\n );\n const nodes = new Map<string, GraphNode<DependencyGraphNodeData>>();\n for (const packageName of intrinsicPackages) addIntrinsicHierarchy(context, packageName, nodes);\n const edges = new Map<string, GraphEdge<DependencyGraphEdgeData>>();\n\n for (const { file, dependencies } of sources) {\n context.signal?.throwIfAborted();\n const sourceNodeId = nodeIdForPackage(context, dependencies.packageName);\n for (const specifier of dependencies.imports) {\n addImport(context, file, sourceNodeId, specifier, intrinsicPackages, nodes, edges);\n }\n }\n return { nodes: [...nodes.values()], edges: [...edges.values()] };\n}\n\n/*** Aggregate one Kotlin import into stable target nodes and weighted evidence. */\nfunction addImport(\n context: DependencyGraphAnalyzerContext,\n sourceFile: string,\n sourceNodeId: string,\n specifier: string,\n intrinsicPackages: ReadonlySet<string>,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n edges: Map<string, GraphEdge<DependencyGraphEdgeData>>,\n): void {\n const targetPackage = extractKotlinPackageFromImport(specifier);\n if (targetPackage === '') return;\n const intrinsic = intrinsicPackages.has(targetPackage);\n const targetNodeId = intrinsic\n ? nodeIdForPackage(context, targetPackage)\n : `unknown:${targetPackage}`;\n if (targetNodeId === sourceNodeId) return;\n if (!intrinsic && !nodes.has(targetNodeId)) {\n nodes.set(targetNodeId, {\n id: targetNodeId,\n data: {\n kind: 'package',\n classification: 'unknown',\n focus: false,\n label: targetPackage,\n packageName: targetPackage,\n },\n });\n }\n const edgeId = `${sourceNodeId}->${targetNodeId}`;\n const existing = edges.get(edgeId);\n const evidence: DependencyImportEvidence = {\n sourceFile: toPortablePath(path.relative(context.package.rootPath, sourceFile)),\n specifier,\n classification: intrinsic ? 'intrinsic' : 'unknown',\n declarations: [],\n };\n edges.set(edgeId, {\n id: edgeId,\n source: sourceNodeId,\n target: targetNodeId,\n data: {\n kind: 'import',\n analyzerId: 'kotlin',\n weight: (existing?.data.weight ?? 0) + 1,\n evidence: [...(existing?.data.evidence ?? []), evidence],\n },\n });\n}\n\n/*** Materialize a Kotlin package and all ancestor package nodes. */\nfunction addIntrinsicHierarchy(\n context: DependencyGraphAnalyzerContext,\n packageName: string,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n): void {\n const segments = packageName.split('.');\n segments.forEach((_, index) => {\n const current = segments.slice(0, index + 1).join('.');\n const id = nodeIdForPackage(context, current);\n if (nodes.has(id)) return;\n nodes.set(id, {\n id,\n data: {\n kind: 'module',\n classification: 'intrinsic',\n focus: true,\n label: current.split('.').at(-1) ?? current,\n projectId: context.package.projectId,\n ...(context.package.name === undefined ? {} : { packageName: context.package.name }),\n path: current,\n parentPath: current.includes('.') ? current.split('.').slice(0, -1).join('.') : '',\n },\n });\n });\n}\n\n/*** Resolve a Kotlin package node inside the current focus package. */\nfunction nodeIdForPackage(context: DependencyGraphAnalyzerContext, packageName: string): string {\n return packageName === '' ? context.package.nodeId : `${context.package.nodeId}#${packageName}`;\n}\n","import { readFile } from 'node:fs/promises';\nimport path from 'node:path';\n\nimport type { GraphEdge, GraphNode } from '@ankhorage/graph';\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\nimport type {\n DependencyGraphAnalyzerContext,\n DependencyGraphEdgeData,\n DependencyGraphFragment,\n DependencyGraphNodeData,\n DependencyImportEvidence,\n} from '../../../../../types/dependencyGraph.js';\nimport { collectJavaFilesAsync } from './collectJavaFilesAsync.js';\nimport { extractJavaDependencies } from './extractJavaDependencies.js';\nimport { extractJavaPackageFromImport } from './extractJavaPackageFromImport.js';\n\n/*** Analyze one detected Java package into package/import dependency evidence. */\nexport async function analyzeJavaProjectAsync(\n context: DependencyGraphAnalyzerContext,\n): Promise<DependencyGraphFragment> {\n const language = context.package.detection.languages.find(({ id }) => id === 'java');\n const files = await collectJavaFilesAsync(\n context.package.rootPath,\n language?.sourceRoots ?? ['src/main/java', '.'],\n context.excludedRoots,\n context.signal,\n );\n const sources = await Promise.all(\n files.map(async (file) => ({\n file,\n dependencies: extractJavaDependencies(await readFile(file, 'utf8')),\n })),\n );\n const intrinsicPackages = new Set(\n sources\n .map(({ dependencies }) => dependencies.packageName)\n .filter((packageName) => packageName !== ''),\n );\n const nodes = new Map<string, GraphNode<DependencyGraphNodeData>>();\n for (const packageName of intrinsicPackages) addIntrinsicHierarchy(context, packageName, nodes);\n const edges = new Map<string, GraphEdge<DependencyGraphEdgeData>>();\n\n for (const { file, dependencies } of sources) {\n context.signal?.throwIfAborted();\n const sourceNodeId = nodeIdForPackage(context, dependencies.packageName);\n for (const specifier of dependencies.imports) {\n addImport(context, file, sourceNodeId, specifier, intrinsicPackages, nodes, edges);\n }\n }\n return { nodes: [...nodes.values()], edges: [...edges.values()] };\n}\n\n/*** Aggregate one Java import into stable target nodes and weighted evidence. */\nfunction addImport(\n context: DependencyGraphAnalyzerContext,\n sourceFile: string,\n sourceNodeId: string,\n specifier: string,\n intrinsicPackages: ReadonlySet<string>,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n edges: Map<string, GraphEdge<DependencyGraphEdgeData>>,\n): void {\n const targetPackage = extractJavaPackageFromImport(specifier);\n if (targetPackage === '') return;\n const intrinsic = intrinsicPackages.has(targetPackage);\n const targetNodeId = intrinsic\n ? nodeIdForPackage(context, targetPackage)\n : `unknown:${targetPackage}`;\n if (targetNodeId === sourceNodeId) return;\n if (!intrinsic && !nodes.has(targetNodeId)) {\n nodes.set(targetNodeId, {\n id: targetNodeId,\n data: {\n kind: 'package',\n classification: 'unknown',\n focus: false,\n label: targetPackage,\n packageName: targetPackage,\n },\n });\n }\n const edgeId = `${sourceNodeId}->${targetNodeId}`;\n const existing = edges.get(edgeId);\n const evidence: DependencyImportEvidence = {\n sourceFile: toPortablePath(path.relative(context.package.rootPath, sourceFile)),\n specifier,\n classification: intrinsic ? 'intrinsic' : 'unknown',\n declarations: [],\n };\n edges.set(edgeId, {\n id: edgeId,\n source: sourceNodeId,\n target: targetNodeId,\n data: {\n kind: 'import',\n analyzerId: 'java',\n weight: (existing?.data.weight ?? 0) + 1,\n evidence: [...(existing?.data.evidence ?? []), evidence],\n },\n });\n}\n\n/*** Materialize a Java package and all ancestor package nodes. */\nfunction addIntrinsicHierarchy(\n context: DependencyGraphAnalyzerContext,\n packageName: string,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n): void {\n const segments = packageName.split('.');\n segments.forEach((_, index) => {\n const current = segments.slice(0, index + 1).join('.');\n const id = nodeIdForPackage(context, current);\n if (nodes.has(id)) return;\n nodes.set(id, {\n id,\n data: {\n kind: 'module',\n classification: 'intrinsic',\n focus: true,\n label: current.split('.').at(-1) ?? current,\n projectId: context.package.projectId,\n ...(context.package.name === undefined ? {} : { packageName: context.package.name }),\n path: current,\n parentPath: current.includes('.') ? current.split('.').slice(0, -1).join('.') : '',\n },\n });\n });\n}\n\n/*** Resolve a Java package node inside the current focus package. */\nfunction nodeIdForPackage(context: DependencyGraphAnalyzerContext, packageName: string): string {\n return packageName === '' ? context.package.nodeId : `${context.package.nodeId}#${packageName}`;\n}\n","import path from 'node:path';\n\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\n/*** Derive the PKGViz-compatible Python package path for a source file. */\nexport function pythonPackageForFile(\n rootPath: string,\n sourceRoots: readonly string[],\n file: string,\n): string {\n const roots = sourceRoots\n .map((sourceRoot) => (sourceRoot === '.' ? rootPath : path.resolve(rootPath, sourceRoot)))\n .filter((sourceRoot) => file === sourceRoot || file.startsWith(`${sourceRoot}${path.sep}`))\n .sort((left, right) => right.length - left.length);\n const analysisRoot = roots[0] ?? rootPath;\n const relativeDirectory = path.dirname(path.relative(analysisRoot, file));\n if (relativeDirectory === '.') return '';\n return toPortablePath(relativeDirectory).split('/').join('.');\n}\n","import { readFile } from 'node:fs/promises';\nimport path from 'node:path';\n\nimport type { GraphEdge, GraphNode } from '@ankhorage/graph';\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\nimport type {\n DependencyGraphAnalyzerContext,\n DependencyGraphEdgeData,\n DependencyGraphFragment,\n DependencyGraphNodeData,\n DependencyImportEvidence,\n} from '../../../../../types/dependencyGraph.js';\nimport { collectDelphiFilesAsync } from './collectDelphiFilesAsync.js';\nimport { delphiPackageForFile } from './delphiPackageForFile.js';\nimport { extractDelphiDependencies } from './extractDelphiDependencies.js';\nimport { extractDelphiPackageFromImport } from './extractDelphiPackageFromImport.js';\n\n/*** Analyze one detected Delphi package into unit/import dependency evidence. */\nexport async function analyzeDelphiProjectAsync(\n context: DependencyGraphAnalyzerContext,\n): Promise<DependencyGraphFragment> {\n const language = context.package.detection.languages.find(({ id }) => id === 'delphi');\n const sourceRoots = language?.sourceRoots ?? ['src', 'Source', '.'];\n const files = await collectDelphiFilesAsync(\n context.package.rootPath,\n sourceRoots,\n context.excludedRoots,\n context.signal,\n );\n const sources = await Promise.all(\n files.map(async (file) => {\n const dependencies = extractDelphiDependencies(await readFile(file, 'utf8'));\n return {\n file,\n dependencies,\n packageName: delphiPackageForFile(\n context.package.rootPath,\n sourceRoots,\n file,\n dependencies.unitName,\n ),\n };\n }),\n );\n const intrinsicPackages = new Set(\n sources.map(({ packageName }) => packageName).filter((packageName) => packageName !== ''),\n );\n const nodes = new Map<string, GraphNode<DependencyGraphNodeData>>();\n for (const packageName of intrinsicPackages) addIntrinsicHierarchy(context, packageName, nodes);\n const edges = new Map<string, GraphEdge<DependencyGraphEdgeData>>();\n\n for (const { file, packageName, dependencies } of sources) {\n context.signal?.throwIfAborted();\n const sourceNodeId = nodeIdForPackage(context, packageName);\n for (const specifier of dependencies.imports) {\n addImport(context, file, sourceNodeId, specifier, intrinsicPackages, nodes, edges);\n }\n }\n return { nodes: [...nodes.values()], edges: [...edges.values()] };\n}\n\n/*** Aggregate one Delphi uses-clause import into stable target nodes and weighted evidence. */\nfunction addImport(\n context: DependencyGraphAnalyzerContext,\n sourceFile: string,\n sourceNodeId: string,\n specifier: string,\n intrinsicPackages: ReadonlySet<string>,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n edges: Map<string, GraphEdge<DependencyGraphEdgeData>>,\n): void {\n const targetPackage = extractDelphiPackageFromImport(specifier);\n if (targetPackage === '') return;\n const intrinsic = intrinsicPackages.has(targetPackage);\n const targetNodeId = intrinsic\n ? nodeIdForPackage(context, targetPackage)\n : `unknown:${targetPackage}`;\n if (targetNodeId === sourceNodeId) return;\n if (!intrinsic && !nodes.has(targetNodeId)) {\n nodes.set(targetNodeId, {\n id: targetNodeId,\n data: {\n kind: 'package',\n classification: 'unknown',\n focus: false,\n label: targetPackage,\n packageName: targetPackage,\n },\n });\n }\n const edgeId = `${sourceNodeId}->${targetNodeId}`;\n const existing = edges.get(edgeId);\n const evidence: DependencyImportEvidence = {\n sourceFile: toPortablePath(path.relative(context.package.rootPath, sourceFile)),\n specifier,\n classification: intrinsic ? 'intrinsic' : 'unknown',\n declarations: [],\n };\n edges.set(edgeId, {\n id: edgeId,\n source: sourceNodeId,\n target: targetNodeId,\n data: {\n kind: 'import',\n analyzerId: 'delphi',\n weight: (existing?.data.weight ?? 0) + 1,\n evidence: [...(existing?.data.evidence ?? []), evidence],\n },\n });\n}\n\n/*** Materialize a Delphi package and all ancestor package nodes. */\nfunction addIntrinsicHierarchy(\n context: DependencyGraphAnalyzerContext,\n packageName: string,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n): void {\n const segments = packageName.split('.');\n segments.forEach((_, index) => {\n const current = segments.slice(0, index + 1).join('.');\n const id = nodeIdForPackage(context, current);\n if (nodes.has(id)) return;\n nodes.set(id, {\n id,\n data: {\n kind: 'module',\n classification: 'intrinsic',\n focus: true,\n label: current.split('.').at(-1) ?? current,\n projectId: context.package.projectId,\n ...(context.package.name === undefined ? {} : { packageName: context.package.name }),\n path: current,\n parentPath: current.includes('.') ? current.split('.').slice(0, -1).join('.') : '',\n },\n });\n });\n}\n\n/*** Resolve a Delphi package node inside the current focus package. */\nfunction nodeIdForPackage(context: DependencyGraphAnalyzerContext, packageName: string): string {\n return packageName === '' ? context.package.nodeId : `${context.package.nodeId}#${packageName}`;\n}\n","import { readFile } from 'node:fs/promises';\nimport path from 'node:path';\n\nimport type { GraphEdge, GraphNode } from '@ankhorage/graph';\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\nimport type {\n DependencyGraphAnalyzerContext,\n DependencyGraphEdgeData,\n DependencyGraphFragment,\n DependencyGraphNodeData,\n DependencyImportEvidence,\n} from '../../../../../types/dependencyGraph.js';\nimport { collectPythonFilesAsync } from './collectPythonFilesAsync.js';\nimport { extractPythonDependencies } from './extractPythonDependencies.js';\nimport { extractPythonPackageFromImport } from './extractPythonPackageFromImport.js';\nimport { pythonPackageForFile } from './pythonPackageForFile.js';\n\n/*** Analyze one detected Python package into package/import dependency evidence. */\nexport async function analyzePythonProjectAsync(\n context: DependencyGraphAnalyzerContext,\n): Promise<DependencyGraphFragment> {\n const language = context.package.detection.languages.find(({ id }) => id === 'python');\n const sourceRoots = language?.sourceRoots ?? ['src', 'app', '.'];\n const files = await collectPythonFilesAsync(\n context.package.rootPath,\n sourceRoots,\n context.excludedRoots,\n context.signal,\n );\n const sources = await Promise.all(\n files.map(async (file) => ({\n file,\n packageName: pythonPackageForFile(context.package.rootPath, sourceRoots, file),\n dependencies: extractPythonDependencies(await readFile(file, 'utf8')),\n })),\n );\n const intrinsicPackages = new Set(\n sources.map(({ packageName }) => packageName).filter((packageName) => packageName !== ''),\n );\n const topLevelPackages = new Set(\n [...intrinsicPackages].map((packageName) => packageName.split('.')[0] ?? packageName),\n );\n const nodes = new Map<string, GraphNode<DependencyGraphNodeData>>();\n for (const packageName of intrinsicPackages) addIntrinsicHierarchy(context, packageName, nodes);\n const edges = new Map<string, GraphEdge<DependencyGraphEdgeData>>();\n\n for (const { file, packageName, dependencies } of sources) {\n context.signal?.throwIfAborted();\n const sourceNodeId = nodeIdForPackage(context, packageName);\n for (const specifier of dependencies.imports) {\n addImport(context, file, sourceNodeId, specifier, topLevelPackages, nodes, edges);\n }\n }\n return { nodes: [...nodes.values()], edges: [...edges.values()] };\n}\n\n/*** Aggregate one Python import into stable target nodes and weighted evidence. */\nfunction addImport(\n context: DependencyGraphAnalyzerContext,\n sourceFile: string,\n sourceNodeId: string,\n specifier: string,\n topLevelPackages: ReadonlySet<string>,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n edges: Map<string, GraphEdge<DependencyGraphEdgeData>>,\n): void {\n const targetPackage = extractPythonPackageFromImport(specifier);\n if (targetPackage === '') return;\n const intrinsic = topLevelPackages.has(targetPackage);\n const targetNodeId = intrinsic\n ? nodeIdForPackage(context, targetPackage)\n : `unknown:${targetPackage}`;\n if (targetNodeId === sourceNodeId) return;\n if (!intrinsic && !nodes.has(targetNodeId)) {\n nodes.set(targetNodeId, {\n id: targetNodeId,\n data: {\n kind: 'package',\n classification: 'unknown',\n focus: false,\n label: targetPackage,\n packageName: targetPackage,\n },\n });\n }\n const edgeId = `${sourceNodeId}->${targetNodeId}`;\n const existing = edges.get(edgeId);\n const evidence: DependencyImportEvidence = {\n sourceFile: toPortablePath(path.relative(context.package.rootPath, sourceFile)),\n specifier,\n classification: intrinsic ? 'intrinsic' : 'unknown',\n declarations: [],\n };\n edges.set(edgeId, {\n id: edgeId,\n source: sourceNodeId,\n target: targetNodeId,\n data: {\n kind: 'import',\n analyzerId: 'python',\n weight: (existing?.data.weight ?? 0) + 1,\n evidence: [...(existing?.data.evidence ?? []), evidence],\n },\n });\n}\n\n/*** Materialize a Python package and all ancestor package nodes. */\nfunction addIntrinsicHierarchy(\n context: DependencyGraphAnalyzerContext,\n packageName: string,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n): void {\n const segments = packageName.split('.');\n segments.forEach((_, index) => {\n const current = segments.slice(0, index + 1).join('.');\n const id = nodeIdForPackage(context, current);\n if (nodes.has(id)) return;\n nodes.set(id, {\n id,\n data: {\n kind: 'module',\n classification: 'intrinsic',\n focus: true,\n label: current.split('.').at(-1) ?? current,\n projectId: context.package.projectId,\n ...(context.package.name === undefined ? {} : { packageName: context.package.name }),\n path: current,\n parentPath: current.includes('.') ? current.split('.').slice(0, -1).join('.') : '',\n },\n });\n });\n}\n\n/*** Resolve a Python package node inside the current focus package. */\nfunction nodeIdForPackage(context: DependencyGraphAnalyzerContext, packageName: string): string {\n return packageName === '' ? context.package.nodeId : `${context.package.nodeId}#${packageName}`;\n}\n","import { balanced } from 'balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\n// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An\n// input like `'{a,b}'.repeat(1500)` stays under that count - its output is\n// truncated to 100k results - while making every result ~1500 characters\n// long. The result set, and the intermediate arrays built while combining\n// brace sets, then grow large enough to exhaust memory and crash the process\n// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of\n// characters the accumulator may hold at any point, so memory stays flat no\n// matter how many brace groups are chained. The limit sits well above any\n// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M\n// characters) so legitimate input is unaffected.\nexport const EXPANSION_MAX_LENGTH = 4_000_000\n\n// `expand_` recurses once per level of brace *nesting* - both when expanding a\n// set's comma members and when re-wrapping a set whose body is a single part.\n// The CVE-2026-14257 fix made the *tail* iterative (recursion on `m.post`, one\n// level per chained group), which left nesting depth unbounded: about 3,100\n// levels of `{{{...a,b...}}}` - only ~6KB of input - exhausted the native stack\n// and crashed the process. `EXPANSION_MAX_DEPTH` bounds how deep the parser\n// will follow nesting. It sits far above any realistic pattern and well below\n// the depth at which the stack runs out.\nexport const EXPANSION_MAX_DEPTH = 1_000\n\n// Bash keeps a quirk where a brace group followed by a comma set still expands\n// (`{a},b}`). The parser implements it by rewriting the string and restarting\n// the scan, absorbing one `}` per pass. `n` trailing braces therefore cost `n`\n// full passes over a string that itself grows by one `escClose` sentinel each\n// time - quadratic in `n`, with a ~26x constant from the sentinel's length.\n// 128KB of `'{a}' + '}'.repeat(n) + ',z}'` blocked the event loop for 27\n// seconds to produce two results. `EXPANSION_MAX_REWRITES` bounds how many\n// times the scan may restart. Real `{a},b}` input needs a handful.\nexport const EXPANSION_MAX_REWRITES = 1_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n// Like `target.push(...items)` but doesn't overflow the stack\nfunction pushAll(target: string[], items: string[]) {\n for (let i = 0; i < items.length; i++) {\n target.push(items[i] as string)\n }\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n const parts: string[] = []\n\n // Walk the brace groups iteratively. Recursing on `post` once per group let a\n // chain of them exhaust the stack - the parsing-side counterpart to\n // the `expand_` overflow fixed for CVE-2026-14257, and not something `max` or\n // `maxLength` can bound, since it happens before expansion.\n //\n // The part the next chunk continues\n let carry = ''\n\n for (;;) {\n const m = balanced('{', '}', str)\n\n if (!m) {\n const tail = str.split(',')\n tail[0] = carry + (tail[0] as string)\n pushAll(parts, tail)\n return parts\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n p[0] = carry + (p[0] as string)\n p[p.length - 1] += '{' + body + '}'\n\n if (!post.length) {\n pushAll(parts, p)\n return parts\n }\n\n carry = p.pop() as string\n pushAll(parts, p)\n str = post\n }\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n maxLength?: number\n maxDepth?: number\n maxRewrites?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const {\n max = EXPANSION_MAX,\n maxLength = EXPANSION_MAX_LENGTH,\n maxDepth = EXPANSION_MAX_DEPTH,\n maxRewrites = EXPANSION_MAX_REWRITES,\n } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(\n escapeBraces(str),\n max,\n maxLength,\n maxDepth,\n 0,\n maxRewrites,\n true,\n ).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\n// Build `{ acc[a] + pre + values[v] }` for every combination, capping the\n// number of results at `max` and the total number of characters at `maxLength`.\n// This is the one place output grows, so bounding it here keeps the single\n// accumulator - and therefore memory - flat regardless of how many brace groups\n// are combined (CVE-2026-14257).\nfunction combine(\n acc: string[],\n pre: string,\n values: string[],\n max: number,\n maxLength: number,\n dropEmpties: boolean,\n): string[] {\n const out: string[] = []\n let length = 0\n for (let a = 0; a < acc.length; a++) {\n for (let v = 0; v < values.length; v++) {\n if (out.length >= max) return out\n const expansion = (acc[a] as string) + pre + values[v]\n // Bash drops empty results at the top level. Skip them before they count\n // against `max`, so `max` bounds the number of *kept* results.\n if (dropEmpties && !expansion) continue\n if (length + expansion.length > maxLength) return out\n out.push(expansion)\n length += expansion.length\n }\n }\n return out\n}\n\n// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`)\n// sequence body.\nfunction expandSequence(\n body: string,\n isAlphaSequence: boolean,\n max: number,\n maxLength: number,\n): string[] {\n const n = body.split(/\\.\\./)\n const N: string[] = []\n // A sequence body always splits into two or three parts, but the compiler\n // can't know that.\n /* c8 ignore start */\n if (n[0] === undefined || n[1] === undefined) {\n return N\n }\n /* c8 ignore stop */\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ?\n Math.max(Math.abs(numeric(n[2])), 1)\n : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n let length = 0\n for (let i = x; test(i, y) && N.length < max; i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n if (length + c.length > maxLength) break\n N.push(c)\n length += c.length\n }\n return N\n}\n\nfunction expand_(\n str: string,\n max: number,\n maxLength: number,\n maxDepth: number,\n depth: number,\n maxRewrites: number,\n isTop: boolean,\n): string[] {\n // Too deeply nested to keep following: treat the rest as literal, the same\n // way a group that cannot expand is already handled. Truncating rather than\n // throwing keeps `expand` total, matching `max` and `maxLength`.\n if (depth > maxDepth) {\n return [str]\n }\n\n // Consume the string's top-level brace groups left to right, threading a\n // running set of combined prefixes (`acc`). Expanding the tail iteratively -\n // rather than recursing on `m.post` once per group - keeps the native stack\n // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no\n // longer overflow the stack, and leaves a single accumulator whose size\n // `maxLength` bounds directly (CVE-2026-14257).\n let acc: string[] = ['']\n\n // Bash drops empty results, but only when the *first* top-level group is a\n // comma set - a sequence like `{a..\\}` may legitimately yield ''. The drop\n // is on the final strings, so it is applied to whichever `combine` produces\n // them (the one with no brace set left in the tail).\n // How many times the `{a},b}` rewrite below has restarted the scan. Each pass\n // re-reads the whole string, so leaving this unbounded is quadratic.\n let rewrites = 0\n let dropEmpties = false\n let firstGroup = true\n\n for (;;) {\n const m = balanced('{', '}', str)\n\n // No brace set left: the rest of the string is literal.\n if (!m) {\n return combine(acc, str, [''], max, maxLength, dropEmpties)\n }\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n\n if (/\\$$/.test(pre)) {\n acc = combine(\n acc,\n pre + '{' + m.body + '}',\n [''],\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n firstGroup = false\n if (!m.post.length) break\n str = m.post\n continue\n }\n\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (rewrites < maxRewrites && m.post.match(/,(?!,).*\\}/)) {\n rewrites++\n str = m.pre + '{' + m.body + escClose + m.post\n isTop = true\n continue\n }\n // Nothing here expands, so the whole remaining string is literal.\n return combine(\n acc,\n pre + '{' + m.body + '}' + m.post,\n [''],\n max,\n maxLength,\n dropEmpties,\n )\n }\n\n if (firstGroup) {\n dropEmpties = isTop && !isSequence\n firstGroup = false\n }\n\n let values: string[]\n if (isSequence) {\n values = expandSequence(m.body, isAlphaSequence, max, maxLength)\n } else {\n let n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(\n n[0],\n max,\n maxLength,\n maxDepth,\n depth + 1,\n maxRewrites,\n false,\n ).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n acc = combine(\n acc,\n pre + n[0],\n [''],\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n if (!m.post.length) break\n str = m.post\n continue\n }\n /* c8 ignore stop */\n }\n\n // Values that `combine` is going to drop as empty produce no result, so\n // they must not count against `max` - otherwise `{a,,b}` with `max: 2`\n // would stop at `['a', '']` and yield one result instead of two. Skipping\n // them outright keeps `values` bounded while leaving `max` a bound on\n // *kept* results.\n let dropsEmpties = dropEmpties && !m.post.length && !pre\n for (let d = 0; dropsEmpties && d < acc.length; d++) {\n if (acc[d]) {\n dropsEmpties = false\n }\n }\n\n values = []\n let valuesLength = 0\n outer: for (let j = 0; j < n.length; j++) {\n const expanded = expand_(\n n[j] as string,\n max,\n maxLength,\n maxDepth,\n depth + 1,\n maxRewrites,\n false,\n )\n for (let k = 0; k < expanded.length; k++) {\n const v = expanded[k] as string\n if (dropsEmpties && !v) continue\n if (\n values.length >= max ||\n valuesLength + v.length > maxLength\n ) {\n break outer\n }\n values.push(v)\n valuesLength += v.length\n }\n }\n }\n\n acc = combine(\n acc,\n pre,\n values,\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n if (!m.post.length) break\n str = m.post\n }\n\n return acc\n}\n","import path from 'node:path';\n\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\n/*** Return the package-level dotted path owning one source file. */\nexport function modulePathForFile(rootPath: string, file: string): string {\n const relativeDirectory = toPortablePath(path.relative(rootPath, path.dirname(file)));\n return relativeDirectory === '.' ? '' : relativeDirectory.split('/').join('.');\n}\n","import path from 'node:path';\n\n/*** Convert platform-specific path separators to portable forward slashes. */\nexport function toPortablePath(value: string): string {\n return value.split(path.sep).join('/');\n}\n","import { readFile } from 'node:fs/promises';\nimport path from 'node:path';\n\nimport type { GraphEdge, GraphNode } from '@ankhorage/graph';\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\nimport type {\n DependencyGraphAnalyzerContext,\n DependencyGraphEdgeData,\n DependencyGraphFragment,\n DependencyGraphNodeData,\n DependencyImportEvidence,\n} from '../../../../../types/dependencyGraph.js';\nimport { collectCppFilesAsync } from './collectCppFilesAsync.js';\nimport type { CppInclude } from './extractCppDependencies.js';\nimport { extractCppDependencies } from './extractCppDependencies.js';\nimport { extractCppPackageFromInclude } from './extractCppPackageFromInclude.js';\n\n/*** Analyze one detected C++ package into namespace/include dependency evidence. */\nexport async function analyzeCppProjectAsync(\n context: DependencyGraphAnalyzerContext,\n): Promise<DependencyGraphFragment> {\n const language = context.package.detection.languages.find(({ id }) => id === 'cpp');\n const files = await collectCppFilesAsync(\n context.package.rootPath,\n language?.sourceRoots ?? ['src', '.'],\n context.excludedRoots,\n context.signal,\n );\n const sources = await Promise.all(\n files.map(async (file) => ({\n file,\n dependencies: extractCppDependencies(await readFile(file, 'utf8')),\n })),\n );\n const intrinsicNamespaces = new Set(\n sources\n .map(({ dependencies }) => dependencies.namespace)\n .filter((namespace) => namespace !== ''),\n );\n const nodes = new Map<string, GraphNode<DependencyGraphNodeData>>();\n for (const namespace of intrinsicNamespaces) addIntrinsicHierarchy(context, namespace, nodes);\n const edges = new Map<string, GraphEdge<DependencyGraphEdgeData>>();\n\n for (const { file, dependencies } of sources) {\n context.signal?.throwIfAborted();\n const sourceNodeId = nodeIdForNamespace(context, dependencies.namespace);\n for (const include of dependencies.includes) {\n addInclude(context, file, sourceNodeId, include, nodes, edges);\n }\n }\n return { nodes: [...nodes.values()], edges: [...edges.values()] };\n}\n\n/*** Aggregate one C++ include into stable target nodes and weighted evidence. */\nfunction addInclude(\n context: DependencyGraphAnalyzerContext,\n sourceFile: string,\n sourceNodeId: string,\n include: CppInclude,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n edges: Map<string, GraphEdge<DependencyGraphEdgeData>>,\n): void {\n const targetPackage = extractCppPackageFromInclude(include.specifier);\n if (targetPackage === '') return;\n const targetNodeId = include.local\n ? nodeIdForNamespace(context, targetPackage)\n : `unknown:${targetPackage}`;\n if (targetNodeId === sourceNodeId) return;\n\n if (include.local) {\n addIntrinsicHierarchy(context, targetPackage, nodes);\n } else if (!nodes.has(targetNodeId)) {\n nodes.set(targetNodeId, {\n id: targetNodeId,\n data: {\n kind: 'package',\n classification: 'unknown',\n focus: false,\n label: targetPackage,\n packageName: targetPackage,\n },\n });\n }\n\n const edgeId = `${sourceNodeId}->${targetNodeId}`;\n const existing = edges.get(edgeId);\n const evidence: DependencyImportEvidence = {\n sourceFile: toPortablePath(path.relative(context.package.rootPath, sourceFile)),\n specifier: include.specifier,\n classification: include.local ? 'intrinsic' : 'unknown',\n declarations: [],\n };\n edges.set(edgeId, {\n id: edgeId,\n source: sourceNodeId,\n target: targetNodeId,\n data: {\n kind: 'import',\n analyzerId: 'cpp',\n weight: (existing?.data.weight ?? 0) + 1,\n evidence: [...(existing?.data.evidence ?? []), evidence],\n },\n });\n}\n\n/*** Materialize a C++ namespace/package and all ancestor nodes. */\nfunction addIntrinsicHierarchy(\n context: DependencyGraphAnalyzerContext,\n namespace: string,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n): void {\n const segments = namespace.split('.');\n segments.forEach((_, index) => {\n const current = segments.slice(0, index + 1).join('.');\n const id = nodeIdForNamespace(context, current);\n if (nodes.has(id)) return;\n nodes.set(id, {\n id,\n data: {\n kind: 'module',\n classification: 'intrinsic',\n focus: true,\n label: current.split('.').at(-1) ?? current,\n projectId: context.package.projectId,\n ...(context.package.name === undefined ? {} : { packageName: context.package.name }),\n path: current,\n parentPath: current.includes('.') ? current.split('.').slice(0, -1).join('.') : '',\n },\n });\n });\n}\n\n/*** Resolve a C++ namespace/package node inside the current focus package. */\nfunction nodeIdForNamespace(context: DependencyGraphAnalyzerContext, namespace: string): string {\n return namespace === '' ? context.package.nodeId : `${context.package.nodeId}#${namespace}`;\n}\n","import path from 'node:path';\n\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\nimport type {\n DependencyDeclaration,\n DependencyGraphPackage,\n DependencyReferenceClassification,\n} from '../../../../../types/dependencyGraph.js';\n\nexport interface ResolvedTypeScriptImport {\n readonly targetNodeId: string;\n readonly classification: DependencyReferenceClassification;\n readonly targetPath?: string;\n readonly packageName?: string;\n readonly declarations: readonly DependencyDeclaration[];\n}\n\n/*** Resolve one TypeScript import to an intrinsic module, focus package, vendor or unknown node. */\nexport function resolveTypeScriptImport(\n packageContext: DependencyGraphPackage,\n sourceFile: string,\n specifier: string,\n sourceFiles: ReadonlySet<string>,\n focusPackages: ReadonlyMap<string, string>,\n): ResolvedTypeScriptImport {\n if (specifier.startsWith('./') || specifier.startsWith('../')) {\n return resolveIntrinsic(\n packageContext,\n path.resolve(path.dirname(sourceFile), specifier),\n sourceFiles,\n );\n }\n if (specifier.startsWith('@/')) {\n return resolveIntrinsic(\n packageContext,\n path.resolve(packageContext.rootPath, 'src', specifier.slice(2)),\n sourceFiles,\n );\n }\n\n const packageName = barePackageName(specifier);\n if (packageName !== undefined) {\n const focusNodeId = focusPackages.get(packageName);\n return {\n targetNodeId: focusNodeId ?? `vendor:${packageName}`,\n classification: focusNodeId === undefined ? 'vendor' : 'focus',\n packageName,\n declarations: declarationsFor(packageContext.declarations, packageName),\n };\n }\n\n return {\n targetNodeId: `unknown:${specifier}`,\n classification: 'unknown',\n declarations: [],\n };\n}\n\n/*** Resolve a source-like path to the containing intrinsic package module. */\nfunction resolveIntrinsic(\n packageContext: DependencyGraphPackage,\n unresolvedPath: string,\n sourceFiles: ReadonlySet<string>,\n): ResolvedTypeScriptImport {\n const targetFile = sourceCandidates(unresolvedPath).find((candidate) =>\n sourceFiles.has(candidate),\n );\n const target = targetFile ?? unresolvedPath;\n const relative = toPortablePath(path.relative(packageContext.rootPath, target));\n if (relative === '..' || relative.startsWith('../')) {\n return {\n targetNodeId: `unknown:${relative}`,\n classification: 'unknown',\n declarations: [],\n };\n }\n\n const modulePath = toPortablePath(path.dirname(relative));\n const normalizedPath = modulePath === '.' ? '' : modulePath.split('/').join('.');\n return {\n targetNodeId:\n normalizedPath === '' ? packageContext.nodeId : `${packageContext.nodeId}#${normalizedPath}`,\n classification: 'intrinsic',\n targetPath: normalizedPath,\n declarations: [],\n };\n}\n\n/*** Read dependency declarations without dynamic object-key access. */\nfunction declarationsFor(\n declarations: Readonly<Record<string, readonly DependencyDeclaration[]>>,\n packageName: string,\n): readonly DependencyDeclaration[] {\n const entry = Object.entries(declarations).find(([name]) => name === packageName);\n return entry === undefined ? [] : entry[1];\n}\n\n/*** Generate deterministic TypeScript module resolution candidates without executing project config. */\nfunction sourceCandidates(base: string): readonly string[] {\n const extensions = ['.ts', '.tsx', '.mts', '.cts'];\n return [\n base,\n ...extensions.map((extension) => `${base}${extension}`),\n ...extensions.map((extension) => path.join(base, `index${extension}`)),\n ];\n}\n\n/*** Extract the npm package identity from a bare module specifier. */\nfunction barePackageName(specifier: string): string | undefined {\n if (\n specifier === '' ||\n specifier.startsWith('#') ||\n specifier.startsWith('/') ||\n specifier.startsWith('~')\n ) {\n return undefined;\n }\n\n const segments = specifier.split('/');\n if (specifier.startsWith('@')) {\n return segments.length >= 2 ? `${segments[0]}/${segments[1]}` : undefined;\n }\n return segments[0];\n}\n","import { readFile } from 'node:fs/promises';\nimport path from 'node:path';\n\nimport type { GraphEdge, GraphNode } from '@ankhorage/graph';\nimport { toPortablePath } from '@ankhorage/utility/node/path';\n\nimport type {\n DependencyGraphAnalyzerContext,\n DependencyGraphEdgeData,\n DependencyGraphFragment,\n DependencyGraphNodeData,\n DependencyImportEvidence,\n} from '../../../../../types/dependencyGraph.js';\nimport { collectTypeScriptFilesAsync } from './collectTypeScriptFilesAsync.js';\nimport { createTypeScriptModuleNodes } from './createTypeScriptModuleNodes.js';\nimport { extractTypeScriptImports } from './extractTypeScriptImports.js';\nimport { modulePathForFile } from './modulePathForFile.js';\nimport { resolveTypeScriptImport } from './resolveTypeScriptImport.js';\n\n/*** Analyze one detected TypeScript package into module/import dependency evidence. */\nexport async function analyzeTypeScriptProjectAsync(\n context: DependencyGraphAnalyzerContext,\n): Promise<DependencyGraphFragment> {\n const language = context.package.detection.languages.find(({ id }) => id === 'typescript');\n const files = await collectTypeScriptFilesAsync(\n context.package.rootPath,\n language?.sourceRoots ?? ['.'],\n context.excludedRoots,\n context.signal,\n );\n const sourceFiles = new Set(files);\n const nodes = new Map(\n createTypeScriptModuleNodes(context.package, files).map((node) => [node.id, node] as const),\n );\n const edges = new Map<string, GraphEdge<DependencyGraphEdgeData>>();\n\n for (const file of files) {\n context.signal?.throwIfAborted();\n const sourceNodeId = nodeIdForFile(context, file);\n const imports = extractTypeScriptImports(file, await readFile(file, 'utf8'));\n for (const specifier of imports) {\n addImport(context, file, sourceNodeId, specifier, sourceFiles, nodes, edges);\n }\n }\n\n return { nodes: [...nodes.values()], edges: [...edges.values()] };\n}\n\n/*** Aggregate one import into stable target nodes and weighted evidence. */\nfunction addImport(\n context: DependencyGraphAnalyzerContext,\n sourceFile: string,\n sourceNodeId: string,\n specifier: string,\n sourceFiles: ReadonlySet<string>,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n edges: Map<string, GraphEdge<DependencyGraphEdgeData>>,\n): void {\n const resolved = resolveTypeScriptImport(\n context.package,\n sourceFile,\n specifier,\n sourceFiles,\n context.focusPackages,\n );\n if (resolved.targetNodeId === sourceNodeId) return;\n addTargetNode(context, resolved, nodes);\n const edgeId = `${sourceNodeId}->${resolved.targetNodeId}`;\n const evidence: DependencyImportEvidence = {\n sourceFile: toPortablePath(path.relative(context.package.rootPath, sourceFile)),\n specifier,\n classification: resolved.classification,\n declarations: resolved.declarations,\n };\n const existing = edges.get(edgeId);\n edges.set(edgeId, {\n id: edgeId,\n source: sourceNodeId,\n target: resolved.targetNodeId,\n data: {\n kind: 'import',\n analyzerId: 'typescript',\n weight: (existing?.data.weight ?? 0) + 1,\n evidence: [...(existing?.data.evidence ?? []), evidence],\n },\n });\n}\n\n/*** Materialize intrinsic, vendor and unknown targets while focus targets are globally owned. */\nfunction addTargetNode(\n context: DependencyGraphAnalyzerContext,\n resolved: ReturnType<typeof resolveTypeScriptImport>,\n nodes: Map<string, GraphNode<DependencyGraphNodeData>>,\n): void {\n if (resolved.classification === 'focus' || nodes.has(resolved.targetNodeId)) return;\n if (resolved.classification === 'intrinsic') {\n if (resolved.targetPath === undefined || resolved.targetPath === '') return;\n nodes.set(resolved.targetNodeId, {\n id: resolved.targetNodeId,\n data: {\n kind: 'module',\n classification: 'intrinsic',\n focus: true,\n label: resolved.targetPath.split('.').at(-1) ?? resolved.targetPath,\n projectId: context.package.projectId,\n ...(context.package.name === undefined ? {} : { packageName: context.package.name }),\n path: resolved.targetPath,\n parentPath: resolved.targetPath.includes('.')\n ? resolved.targetPath.split('.').slice(0, -1).join('.')\n : '',\n },\n });\n return;\n }\n\n nodes.set(resolved.targetNodeId, {\n id: resolved.targetNodeId,\n data: {\n kind: 'package',\n classification: resolved.classification,\n focus: false,\n label: resolved.packageName ?? resolved.targetNodeId.replace(/^unknown:/u, ''),\n ...(resolved.packageName === undefined ? {} : { packageName: resolved.packageName }),\n },\n });\n}\n\n/*** Resolve the source node at package granularity, using the package root for root-level files. */\nfunction nodeIdForFile(context: DependencyGraphAnalyzerContext, file: string): string {\n const modulePath = modulePathForFile(context.package.rootPath, file);\n return modulePath === '' ? context.package.nodeId : `${context.package.nodeId}#${modulePath}`;\n}\n","import path from 'node:path';\n\n/*** Convert platform-specific path separators to portable forward slashes. */\nexport function toPortablePath(value: string): string {\n return value.split(path.sep).join('/');\n}\n","import { readFile } from 'node:fs/promises';\n\nimport { isRecord } from '@ankhorage/utility/object';\n\nimport type {\n DependencyDeclaration,\n DependencyDeclarationKind,\n} from '../../../types/dependencyGraph.js';\n\n/*** Read dependency declarations from one already-inspected package manifest. */\nexport async function readDependencyDeclarationsAsync(\n manifestPath: string | undefined,\n): Promise<Readonly<Record<string, readonly DependencyDeclaration[]>>> {\n if (manifestPath === undefined) return {};\n const value: unknown = JSON.parse(await readFile(manifestPath, 'utf8'));\n if (!isRecord(value)) return {};\n\n return Object.fromEntries(\n [\n ...declarationsFor(value.dependencies, 'dependency'),\n ...declarationsFor(value.devDependencies, 'devDependency'),\n ...declarationsFor(value.optionalDependencies, 'optionalDependency'),\n ...declarationsFor(value.peerDependencies, 'peerDependency'),\n ].reduce<Map<string, DependencyDeclaration[]>>((byName, [name, declaration]) => {\n const current = byName.get(name) ?? [];\n byName.set(name, [...current, declaration]);\n return byName;\n }, new Map()),\n );\n}\n\n/*** Normalize one package.json dependency section into named declarations. */\nfunction declarationsFor(\n value: unknown,\n kind: DependencyDeclarationKind,\n): readonly (readonly [string, DependencyDeclaration])[] {\n if (!isRecord(value)) return [];\n return Object.entries(value).flatMap(([name, range]) =>\n typeof range === 'string' ? [[name, { kind, range }] as const] : [],\n );\n}\n","import path from 'node:path';\n\nimport { createGraph } from '@ankhorage/graph';\nimport { inspectProjectAsync } from '@ankhorage/project-detector/node';\nimport type { InspectedPackage, ProjectInspection } from '@ankhorage/project-detector/types';\n\nimport type {\n CreateDependencyGraphInput,\n DependencyGraph,\n DependencyGraphAnalyzer,\n DependencyGraphFragment,\n DependencyGraphPackage,\n DependencyGraphProjectInput,\n} from '../../../types/dependencyGraph.js';\nimport { cppDependencyGraphAnalyzer } from '../adapters/outbound/cpp/cppDependencyGraphAnalyzer.js';\nimport { delphiDependencyGraphAnalyzer } from '../adapters/outbound/delphi/delphiDependencyGraphAnalyzer.js';\nimport { javaDependencyGraphAnalyzer } from '../adapters/outbound/java/javaDependencyGraphAnalyzer.js';\nimport { kotlinDependencyGraphAnalyzer } from '../adapters/outbound/kotlin/kotlinDependencyGraphAnalyzer.js';\nimport { pythonDependencyGraphAnalyzer } from '../adapters/outbound/python/pythonDependencyGraphAnalyzer.js';\nimport { typescriptDependencyGraphAnalyzer } from '../adapters/outbound/typescript/typescriptDependencyGraphAnalyzer.js';\nimport { createFocusPackageNode } from '../domain/createFocusPackageNode.js';\nimport { readDependencyDeclarationsAsync } from '../domain/readDependencyDeclarationsAsync.js';\n\n/*** Inspect projects, run supported analyzers and combine their evidence into one canonical graph. */\nexport async function createDependencyGraphAsync(\n input: CreateDependencyGraphInput,\n): Promise<DependencyGraph> {\n assertProjectInputs(input.projects);\n const analyzers = input.analyzers ?? [\n typescriptDependencyGraphAnalyzer,\n cppDependencyGraphAnalyzer,\n delphiDependencyGraphAnalyzer,\n javaDependencyGraphAnalyzer,\n kotlinDependencyGraphAnalyzer,\n pythonDependencyGraphAnalyzer,\n ];\n const inspected = await Promise.all(\n input.projects.map((project) => inspectProjectInputAsync(project, input.signal)),\n );\n const packages = inspected.flatMap(({ packages }) => packages);\n const focusPackages = createFocusPackageMap(packages);\n const fragments = await analyzePackagesAsync(inspected, analyzers, focusPackages, input.signal);\n const nodes = new Map(\n packages.map((packageContext) => {\n const node = createFocusPackageNode(packageContext);\n return [node.id, node] as const;\n }),\n );\n\n for (const node of fragments.flatMap(({ nodes: fragmentNodes }) => fragmentNodes)) {\n if (!nodes.has(node.id)) nodes.set(node.id, node);\n }\n\n const edges = fragments.flatMap(({ edges: fragmentEdges }) => fragmentEdges);\n return createGraph({ nodes: [...nodes.values()], edges });\n}\n\ninterface InspectedInput {\n readonly inspection: ProjectInspection;\n readonly packages: readonly DependencyGraphPackage[];\n}\n\n/*** Inspect one input and normalize its package/workspace contexts. */\nasync function inspectProjectInputAsync(\n project: DependencyGraphProjectInput,\n signal: AbortSignal | undefined,\n): Promise<InspectedInput> {\n const inspection = await inspectProjectAsync(project.rootPath, {\n ...(signal === undefined ? {} : { signal }),\n });\n if (!inspection.complete) {\n throw new Error(\n `Dependency graph inspection is incomplete for \"${project.id}\": ${inspection.diagnostics\n .map(({ message }) => message)\n .join('; ')}`,\n );\n }\n\n const detectedPackages: readonly InspectedPackage[] =\n inspection.packages.length > 0\n ? inspection.packages\n : [{ rootPath: '.', detection: inspection.detection, manifestPath: '' }];\n\n const packages = await Promise.all(\n detectedPackages.map(async (detected) => {\n const relativeRoot = detected.rootPath;\n const id = `${project.id}:${relativeRoot}`;\n const manifestPath =\n detected.manifestPath === ''\n ? undefined\n : path.join(inspection.rootPath, detected.manifestPath);\n\n return {\n id,\n nodeId: `package:${id}`,\n projectId: project.id,\n rootPath: path.resolve(inspection.rootPath, relativeRoot),\n relativeRoot,\n ...(detected.name === undefined ? {} : { name: detected.name }),\n detection: detected.detection,\n declarations: await readDependencyDeclarationsAsync(manifestPath),\n } satisfies DependencyGraphPackage;\n }),\n );\n return { inspection, packages };\n}\n\n/*** Analyze each package with the first compatible analyzer and retain mixed-language packages safely. */\nasync function analyzePackagesAsync(\n inspected: readonly InspectedInput[],\n analyzers: readonly DependencyGraphAnalyzer[],\n focusPackages: ReadonlyMap<string, string>,\n signal: AbortSignal | undefined,\n): Promise<readonly DependencyGraphFragment[]> {\n const tasks = inspected.flatMap(({ inspection, packages }) =>\n packages.flatMap((packageContext) => {\n const analyzer = analyzers.find(({ supports }) => supports(packageContext.detection));\n if (analyzer === undefined) return [];\n\n const excludedRoots = packages\n .filter(\n (candidate) =>\n candidate.id !== packageContext.id &&\n candidate.rootPath.startsWith(`${packageContext.rootPath}${path.sep}`),\n )\n .map(({ rootPath }) => rootPath);\n\n return [\n analyzer.analyzeAsync({\n package: packageContext,\n inspection,\n focusPackages,\n excludedRoots,\n ...(signal === undefined ? {} : { signal }),\n }),\n ];\n }),\n );\n\n if (tasks.length === 0) {\n throw new Error('No dependency graph analyzer supports the supplied projects.');\n }\n return Promise.all(tasks);\n}\n\n/*** Build a unique package-name map for focus routing across repositories and workspaces. */\nfunction createFocusPackageMap(\n packages: readonly DependencyGraphPackage[],\n): ReadonlyMap<string, string> {\n const named = packages.filter(\n (packageContext): packageContext is DependencyGraphPackage & { readonly name: string } =>\n packageContext.name !== undefined,\n );\n const duplicates = named.filter(\n (item, index) => named.findIndex(({ name }) => name === item.name) !== index,\n );\n if (duplicates.length > 0) {\n throw new Error(`Duplicate focus package name: ${duplicates[0]?.name ?? 'unknown'}.`);\n }\n return new Map(named.map(({ name, nodeId }) => [name, nodeId]));\n}\n\n/*** Reject ambiguous project IDs before filesystem inspection. */\nfunction assertProjectInputs(projects: readonly DependencyGraphProjectInput[]): void {\n if (projects.length === 0) {\n throw new Error('At least one dependency graph project is required.');\n }\n\n const ids = projects.map(({ id }) => id);\n if (ids.some((id) => id.trim() === '')) {\n throw new Error('Dependency graph project IDs must be non-empty.');\n }\n if (new Set(ids).size !== ids.length) {\n throw new Error('Dependency graph project IDs must be unique.');\n }\n}\n","import { constants } from 'node:fs';\nimport { type FileHandle, open, realpath } from 'node:fs/promises';\nimport path from 'node:path';\n\n/*** Read bounded regular-file text without following a final symlink or leaving the scan root. */\nexport async function readManifestAsync(\n file: string,\n root: string,\n maxBytes: number,\n): Promise<string> {\n const resolved = await realpath(file);\n const relative = path.relative(root, resolved);\n if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {\n throw new Error('Manifest resolved outside the inspection root.');\n }\n const handle = await open(file, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);\n try {\n const stat = await handle.stat();\n if (!stat.isFile()) throw new Error('Manifest is not a regular file.');\n if (stat.size > maxBytes) throw new Error('Manifest exceeds the configured byte limit.');\n const buffer = Buffer.alloc(maxBytes + 1);\n const bytesRead = await readBytesAsync(handle, buffer, 0);\n if (bytesRead > maxBytes) throw new Error('Manifest exceeds the configured byte limit.');\n return buffer.subarray(0, bytesRead).toString('utf8');\n } finally {\n await handle.close();\n }\n}\n\n/*** Handle short reads while retaining a strict allocation/read ceiling. */\nasync function readBytesAsync(handle: FileHandle, buffer: Buffer, offset: number): Promise<number> {\n if (offset === buffer.length) return offset;\n const { bytesRead } = await handle.read(buffer, offset, buffer.length - offset, offset);\n return bytesRead === 0 ? offset : readBytesAsync(handle, buffer, offset + bytesRead);\n}\n","import type {\n AttributedFinding,\n ProjectDetection,\n ProjectDetectionInput,\n ProjectDetectionOptions,\n ProjectDetector,\n} from '../../../types/detection.js';\nimport { detectFiles } from '../domain/detectFiles.js';\nimport { detectMetadata } from '../domain/detectMetadata.js';\nimport { summarizeDetection } from '../domain/summarizeDetection.js';\n\n/***\n * Detect overlapping project languages, frameworks, runtimes and package-manager evidence.\n *\n * The pure API accepts package metadata plus optional relative POSIX file paths and manifest text.\n * JavaScript, TypeScript, Java, Kotlin, C++, Python and Delphi evidence is additive, never exclusive.\n * Generic Make/CMake/Gradle files identify build tools, not necessarily a source language.\n * Scores are heuristic strengths, not confidence probabilities. No source parser, registry request,\n * dependency update, migration, filesystem operation or inspected project script runs here.\n * Extend detection with explicitly supplied trusted detector callbacks; IDs must be unique.\n * Public types are owned by this package and exported through `@ankhorage/project-detector/types`.\n * @readme\n */\nexport function detectProject(\n input: ProjectDetectionInput,\n options: ProjectDetectionOptions = {},\n): ProjectDetection {\n const files = [...new Set(input.files ?? [])].sort();\n if (\n files.some(\n (file) =>\n file.length === 0 ||\n file.startsWith('/') ||\n /^[a-z]:/iu.test(file) ||\n file.includes('\\\\') ||\n file.split('/').includes('..'),\n )\n ) {\n throw new Error('Detection file paths must be relative POSIX paths without parent traversal.');\n }\n const detectors: readonly ProjectDetector[] = [\n { id: 'package-metadata', detect: detectMetadata },\n { id: 'file-evidence', detect: detectFiles },\n ...(options.detectors ?? []),\n ];\n if (\n detectors.some((detector) => detector.id.trim() === '') ||\n new Set(detectors.map((detector) => detector.id)).size !== detectors.length\n ) {\n throw new Error('Detector IDs must be non-empty and unique.');\n }\n const normalized = { ...input, files };\n const findings = detectors.flatMap((detector) => runDetector(detector, normalized));\n return summarizeDetection(findings, files);\n}\n\n/*** Attribute and validate contributions at the plugin boundary. */\nfunction runDetector(\n detector: ProjectDetector,\n input: ProjectDetectionInput,\n): readonly AttributedFinding[] {\n return detector.detect(input).map((finding) => {\n if (\n !Number.isFinite(finding.weight) ||\n finding.weight <= 0 ||\n finding.value.trim() === '' ||\n finding.evidence.trim() === ''\n ) {\n throw new Error(`Detector ${detector.id} returned an invalid finding.`);\n }\n return { ...finding, detectorId: detector.id };\n });\n}\n","import { isStringArray } from '@ankhorage/utility/array';\nimport { isRecord } from '@ankhorage/utility/object';\nimport { minimatch } from 'minimatch';\nimport { parseDocument } from 'yaml';\n\nimport type { ProjectDiagnostic } from '../../../types/detection.js';\nimport type { InspectedWorkspace, ProjectSnapshot } from '../../../types/inspection.js';\nimport { readPackageMetadata } from './readPackageMetadata.js';\n\n/*** Resolve declared JavaScript workspace membership without guessing from folder names. */\nexport function inspectWorkspaces(snapshot: ProjectSnapshot): {\n readonly workspaces: readonly InspectedWorkspace[];\n readonly diagnostics: readonly ProjectDiagnostic[];\n} {\n const manifests = snapshot.files.filter(\n (file) => file.endsWith('/package.json') || file === 'package.json',\n );\n const results = [...snapshot.contents]\n .filter(([file]) => file.endsWith('package.json') || file.endsWith('pnpm-workspace.yaml'))\n .map(([file, text]) => workspaceFromManifest(file, text, manifests));\n return {\n workspaces: results.flatMap((result) => result.workspaces),\n diagnostics: results.flatMap((result) => result.diagnostics),\n };\n}\n\n/*** Parse one declarative workspace definition with explicit malformed-input diagnostics. */\nfunction workspaceFromManifest(\n file: string,\n text: string,\n packages: readonly string[],\n): {\n readonly workspaces: readonly InspectedWorkspace[];\n readonly diagnostics: readonly ProjectDiagnostic[];\n} {\n try {\n const patterns = readPatterns(file, text);\n if (patterns === undefined) return { workspaces: [], diagnostics: [] };\n const prefix = file.slice(0, file.lastIndexOf('/') + 1);\n const roots = packages\n .filter((manifest) => manifest.startsWith(prefix) && manifest !== `${prefix}package.json`)\n .map((manifest) => manifest.slice(prefix.length, -'/package.json'.length));\n const included = patterns.filter((pattern) => !pattern.startsWith('!'));\n const excluded = patterns\n .filter((pattern) => pattern.startsWith('!'))\n .map((pattern) => pattern.slice(1));\n const members = roots.filter(\n (root) =>\n included.some((pattern) => minimatch(root, pattern, { dot: true })) &&\n !excluded.some((pattern) => minimatch(root, pattern, { dot: true })),\n );\n return {\n workspaces: [\n {\n rootPath: prefix.slice(0, -1) || '.',\n manifestPath: file,\n patterns,\n packagePaths: members.map((root) => `${prefix}${root}`).sort(),\n },\n ],\n diagnostics: [],\n };\n } catch (error) {\n return {\n workspaces: [],\n diagnostics: [\n {\n code: 'invalid-workspace',\n path: file,\n message: toErrorMessage(error),\n },\n ],\n };\n }\n}\n\n/*** Read npm/Yarn workspace arrays or pnpm YAML without evaluating configuration scripts. */\nfunction readPatterns(file: string, text: string): readonly string[] | undefined {\n if (file.endsWith('pnpm-workspace.yaml')) {\n const document = parseDocument(text, { uniqueKeys: true });\n if (document.errors.length > 0) throw new Error('Invalid pnpm workspace YAML.');\n const parsed: unknown = document.toJS({ maxAliasCount: 50 });\n if (!isRecord(parsed) || !isStringArray(parsed.packages))\n throw new Error('Expected a packages array in pnpm-workspace.yaml.');\n return parsed.packages;\n }\n const { manifest } = readPackageMetadata(text, file);\n if (manifest.workspaces === undefined) return undefined;\n const patterns = isRecord(manifest.workspaces)\n ? manifest.workspaces.packages\n : manifest.workspaces;\n if (!isStringArray(patterns)) throw new Error('Expected a workspace pattern array.');\n return patterns;\n}\nimport { toErrorMessage } from '@ankhorage/utility/error';\n","import type {\n ProjectDetection,\n ProjectDetectionInput,\n ProjectDetectionOptions,\n} from '../../../types/detection.js';\nimport type {\n InspectedPackage,\n ProjectInspection,\n ProjectInspectionOptions,\n ProjectInspectionPort,\n ProjectSnapshot,\n} from '../../../types/inspection.js';\nimport { detectProject } from '../../detection/application/detectProject.js';\nimport { summarizeDetection } from '../../detection/domain/summarizeDetection.js';\nimport { inspectWorkspaces } from '../domain/inspectWorkspaces.js';\nimport { readPackageMetadata } from '../domain/readPackageMetadata.js';\n\n/*** Inspect a snapshot through an injected evidence source; keep I/O outside project classification. */\nexport async function inspectWithPortAsync(\n path: string,\n port: ProjectInspectionPort,\n options: ProjectInspectionOptions = {},\n): Promise<ProjectInspection> {\n const snapshot = await port.readAsync(path, options);\n const packages = snapshot.files.filter(\n (file) => file === 'package.json' || file.endsWith('/package.json'),\n );\n const metadata = packages.map((file) => readPackageMetadata(snapshot.contents.get(file), file));\n const workspace = inspectWorkspaces(snapshot);\n const inspected = packages.map((file) => inspectPackage(file, packages, snapshot, options));\n const detection = detectSnapshot(snapshot, inspected, options);\n const diagnostics = [\n ...snapshot.diagnostics,\n ...metadata.flatMap((item) => item.diagnostics),\n ...workspace.diagnostics,\n ];\n return {\n rootPath: snapshot.rootPath,\n complete: snapshot.complete && diagnostics.length === 0,\n detection,\n packages: inspected,\n workspaces: workspace.workspaces,\n manifests: [\n ...new Set([\n ...snapshot.contents.keys(),\n ...detection.findings\n .filter((finding) => finding.kind === 'manifest')\n .map((finding) => finding.evidence),\n ]),\n ].sort(),\n diagnostics: [...diagnostics, ...detection.diagnostics],\n };\n}\n\n/*** Combine tree evidence with attributed metadata from every package, not just the root. */\nfunction detectSnapshot(\n snapshot: ProjectSnapshot,\n packages: readonly InspectedPackage[],\n options: ProjectDetectionOptions,\n): ProjectDetection {\n const base = detectProject({ files: snapshot.files, contents: snapshot.contents }, options);\n const metadataFindings = packages.flatMap((item) =>\n item.detection.findings\n .filter((finding) => finding.detectorId === 'package-metadata')\n .map((finding) => ({ ...finding, evidence: `${item.manifestPath}:${finding.evidence}` })),\n );\n return summarizeDetection([...base.findings, ...metadataFindings], snapshot.files);\n}\n\n/*** Classify each package using its own metadata and files, excluding nested package roots. */\nfunction inspectPackage(\n file: string,\n manifests: readonly string[],\n snapshot: ProjectSnapshot,\n options: ProjectDetectionOptions,\n): InspectedPackage {\n const prefix = file.slice(0, file.lastIndexOf('/') + 1);\n const nested = manifests\n .filter((candidate) => candidate !== file && candidate.startsWith(prefix))\n .map((candidate) => candidate.slice(0, candidate.lastIndexOf('/') + 1));\n const owns = (candidate: string): boolean =>\n candidate.startsWith(prefix) && !nested.some((root) => candidate.startsWith(root));\n const metadata = readPackageMetadata(snapshot.contents.get(file), file);\n const input: ProjectDetectionInput = {\n ...metadata.input,\n files: snapshot.files.filter(owns).map((candidate) => candidate.slice(prefix.length)),\n contents: new Map(\n [...snapshot.contents]\n .filter(([candidate]) => owns(candidate))\n .map(([candidate, text]) => [candidate.slice(prefix.length), text]),\n ),\n };\n return {\n rootPath: prefix.slice(0, -1) || '.',\n manifestPath: file,\n ...(typeof metadata.manifest.name === 'string' ? { name: metadata.manifest.name } : {}),\n detection: detectProject(input, options),\n };\n}\n","import type {\n AttributedFinding,\n DetectedLanguage,\n ProjectDetection,\n ProjectDiagnostic,\n} from '../../../types/detection.js';\nimport { sourceRootNames } from '../constants/fileRules.js';\n\n/*** Aggregate additive findings and preserve ties and ambiguity instead of choosing a language. */\nexport function summarizeDetection(\n findings: readonly AttributedFinding[],\n files: readonly string[],\n): ProjectDetection {\n const languageIds = valuesFor(findings, 'language');\n const packageManagers = valuesFor(findings, 'package-manager');\n return {\n traits: new Set(\n findings\n .filter((finding) => ['language', 'framework', 'runtime'].includes(finding.kind))\n .map((finding) => finding.value),\n ),\n languages: languageIds.map((id) => summarizeLanguage(id, findings, files)),\n packageManagers,\n buildTools: valuesFor(findings, 'build-tool'),\n findings,\n diagnostics: detectionDiagnostics(findings, packageManagers),\n };\n}\n\n/*** Group language evidence without allowing duplicate findings to inflate the score. */\nfunction summarizeLanguage(\n id: string,\n findings: readonly AttributedFinding[],\n files: readonly string[],\n): DetectedLanguage {\n const languageFindings = findings.filter(\n (finding) => finding.kind === 'language' && finding.value === id,\n );\n const evidence = [...new Set(languageFindings.map((finding) => finding.evidence))].sort();\n const score = languageFindings.reduce((max, finding) => Math.max(max, finding.weight), 0);\n const languageFiles = new Set(evidence);\n const sourceRoots = sourceRootNames.filter((root) =>\n files.some((file) => languageFiles.has(file) && file.startsWith(`${root}/`)),\n );\n return { id, evidence, score, sourceRoots: sourceRoots.length > 0 ? sourceRoots : ['.'] };\n}\n\n/*** Return deterministic unique values for one kind of evidence. */\nfunction valuesFor(\n findings: readonly AttributedFinding[],\n kind: AttributedFinding['kind'],\n): readonly string[] {\n return [\n ...new Set(findings.filter((finding) => finding.kind === kind).map((finding) => finding.value)),\n ].sort();\n}\n\n/*** Report missing evidence and conflicting JavaScript package-manager signals. */\nfunction detectionDiagnostics(\n findings: readonly AttributedFinding[],\n managers: readonly string[],\n): readonly ProjectDiagnostic[] {\n const nodeManagers = managers.filter((manager) =>\n ['npm', 'pnpm', 'yarn', 'bun'].includes(manager),\n );\n return [\n ...(findings.length === 0\n ? [{ code: 'unknown-project', message: 'No supported project indicators found.' }]\n : []),\n ...(nodeManagers.length > 1\n ? [\n {\n code: 'ambiguous-package-manager',\n message: `Multiple package managers detected: ${nodeManagers.join(', ')}. Select explicitly before updates.`,\n },\n ]\n : []),\n ];\n}\n","import type { DependencyGraphAnalyzer } from '../../../../../types/dependencyGraph.js';\nimport { analyzeJavaProjectAsync } from './analyzeJavaProjectAsync.js';\n\n/*** Java analyzer adapter selected from project-detector language evidence. */\nexport const javaDependencyGraphAnalyzer: DependencyGraphAnalyzer = {\n id: 'java',\n supports: (detection) => detection.languages.some(({ id }) => id === 'java'),\n analyzeAsync: analyzeJavaProjectAsync,\n};\n","import type { DependencyGraphAnalyzer } from '../../../../../types/dependencyGraph.js';\nimport { analyzeCppProjectAsync } from './analyzeCppProjectAsync.js';\n\n/*** C++ analyzer adapter selected from project-detector language evidence. */\nexport const cppDependencyGraphAnalyzer: DependencyGraphAnalyzer = {\n id: 'cpp',\n supports: (detection) => detection.languages.some(({ id }) => id === 'cpp'),\n analyzeAsync: analyzeCppProjectAsync,\n};\n","'use server';\nimport path from 'node:path';\n\nimport { readTextFileWithinRoot } from '@ankhorage/utility/node/fs';\n\nimport type { ImportDefinition, MethodCall, MethodDefinition, ParsedFile } from '@/shared/types';\nimport { toPosix } from '@/shared/utils/toPosix';\n\n/*** Extracts namespace from C++ code. */\nfunction extractNamespace(content: string): string {\n const match = /namespace\\s+([a-zA-Z0-9_:]+)\\s*\\{/.exec(content);\n return match?.[1]?.replace(/::/g, '.') || '';\n}\n\n/*** Retains include metadata canonical graph topology intentionally omits. */\nfunction extractPresentationOnlyIncludes(\n content: string,\n namespace: string,\n canonicalImports: readonly ImportDefinition[]\n): ImportDefinition[] {\n const canonicalNames = new Set(canonicalImports.map(({ name }) => name));\n const includeRegex = /#include\\s+([\"<])([^\">]+)[\">]/g;\n const imports: ImportDefinition[] = [];\n let match;\n\n while ((match = includeRegex.exec(content)) !== null) {\n const delimiter = match[1];\n const specifier = match[2];\n if (canonicalNames.has(specifier)) continue;\n\n const segments = specifier.replace(/\\.(h|hpp|hxx)$/u, '').split('/');\n const pkg = segments.length > 1 ? segments.slice(0, -1).join('.') : '';\n if (pkg !== '' && pkg !== namespace) continue;\n\n imports.push({\n name: specifier,\n pkg,\n isIntrinsic: delimiter === '\"',\n });\n }\n\n return imports;\n}\n\n/*** Restores complete include metadata in source declaration order. */\nfunction mergeImports(\n content: string,\n namespace: string,\n canonicalImports: readonly ImportDefinition[]\n): readonly ImportDefinition[] {\n return [\n ...canonicalImports,\n ...extractPresentationOnlyIncludes(content, namespace, canonicalImports),\n ].sort((left, right) => content.indexOf(left.name) - content.indexOf(right.name));\n}\n\n/*** Extracts the class name from the content and filename fallback. */\nfunction extractClassName(content: string, fileName: string): string {\n const classMatch = /class\\s+([A-Za-z0-9_]+)/.exec(content);\n if (classMatch) return classMatch[1];\n\n const structMatch = /struct\\s+([A-Za-z0-9_]+)/.exec(content);\n if (structMatch) return structMatch[1];\n\n return path.basename(fileName, path.extname(fileName));\n}\n\n/*** Extracts method definitions from C++ content. */\nfunction extractMethodDefinitions(content: string): MethodDefinition[] {\n const methods: MethodDefinition[] = [];\n const methodRegex = /(?:(public|protected|private):\\s*)?([\\w<>:&*\\s]+)\\s+(\\w+)\\s*$$([^)]*)$$/g;\n let match;\n let currentVisibility: 'public' | 'protected' | 'private' | 'default' = 'default';\n\n const visibilityRegex = /(public|protected|private):/g;\n for (const line of content.split('\\n')) {\n const visMatch = visibilityRegex.exec(line);\n if (visMatch) currentVisibility = visMatch[1] as 'public' | 'protected' | 'private';\n }\n\n methodRegex.lastIndex = 0;\n while ((match = methodRegex.exec(content)) !== null) {\n const visibility = (match[1] as 'public' | 'protected' | 'private') || currentVisibility;\n const returnType = match[2]?.trim() || 'void';\n const name = match[3];\n const params = match[4]\n .split(',')\n .map(p => p.trim())\n .filter(Boolean);\n\n if (['if', 'while', 'for', 'switch', 'catch'].includes(name)) continue;\n methods.push({ name, returnType, parameters: params, visibility });\n }\n\n return methods;\n}\n\n/*** Extracts method calls from C++ content. */\nfunction extractMethodCalls(content: string): MethodCall[] {\n const callRegex = /(\\b\\w+)(?:\\.|->)(\\w+)\\s*\\(/g;\n const calls: MethodCall[] = [];\n let match;\n\n while ((match = callRegex.exec(content)) !== null) {\n calls.push({ callee: match[1], method: match[2] });\n }\n return calls;\n}\n\n/*** Parses C++ metadata while consuming canonical dependency includes. */\nexport async function parseCppFile(\n fullPath: string,\n projectRoot: string,\n imports: readonly ImportDefinition[]\n): Promise<ParsedFile> {\n const { content, path: resolvedPath } = readTextFileWithinRoot({\n rootPath: projectRoot,\n filePath: fullPath,\n });\n const fileName = path.basename(resolvedPath);\n\n const namespace = extractNamespace(content);\n\n return {\n className: extractClassName(content, fileName),\n package: namespace,\n imports: [...mergeImports(content, namespace, imports)],\n methods: extractMethodDefinitions(content),\n calls: extractMethodCalls(content),\n path: toPosix(path.relative(projectRoot, resolvedPath)),\n };\n}\n","import type { DetectionFinding } from '../../../types/detection.js';\n\nexport const languageExtensions: ReadonlyMap<string, readonly string[]> = new Map([\n ['javascript', ['.js', '.jsx', '.mjs', '.cjs']],\n ['typescript', ['.ts', '.tsx', '.mts', '.cts']],\n ['java', ['.java']],\n ['kotlin', ['.kt', '.kts']],\n ['cpp', ['.cpp', '.cc', '.cxx', '.hpp', '.hxx']],\n ['python', ['.py', '.pyi']],\n ['delphi', ['.pas', '.pp', '.dpr', '.dproj', '.dfm', '.fmx', '.dpk', '.dcu']],\n]);\n\nexport const manifestRules: readonly {\n readonly name: string;\n readonly kind: DetectionFinding['kind'];\n readonly value: string;\n}[] = [\n { name: 'package.json', kind: 'language', value: 'javascript' },\n { name: 'pom.xml', kind: 'build-tool', value: 'maven' },\n { name: 'pom.xml', kind: 'language', value: 'java' },\n { name: 'build.gradle', kind: 'build-tool', value: 'gradle' },\n { name: 'build.gradle.kts', kind: 'build-tool', value: 'gradle' },\n { name: 'build.gradle.kts', kind: 'language', value: 'kotlin' },\n { name: 'settings.gradle.kts', kind: 'language', value: 'kotlin' },\n { name: 'mvnw', kind: 'build-tool', value: 'maven' },\n { name: 'mvnw.cmd', kind: 'build-tool', value: 'maven' },\n { name: 'CMakeLists.txt', kind: 'build-tool', value: 'cmake' },\n { name: 'Makefile', kind: 'build-tool', value: 'make' },\n { name: 'conanfile.txt', kind: 'package-manager', value: 'conan' },\n { name: 'conanfile.py', kind: 'package-manager', value: 'conan' },\n { name: 'vcpkg.json', kind: 'package-manager', value: 'vcpkg' },\n { name: 'requirements.txt', kind: 'language', value: 'python' },\n { name: 'requirements.txt', kind: 'package-manager', value: 'pip' },\n { name: 'setup.py', kind: 'language', value: 'python' },\n { name: 'setup.cfg', kind: 'language', value: 'python' },\n { name: 'pyproject.toml', kind: 'language', value: 'python' },\n { name: 'Pipfile', kind: 'package-manager', value: 'pipenv' },\n { name: 'Pipfile', kind: 'language', value: 'python' },\n { name: 'Pipfile.lock', kind: 'package-manager', value: 'pipenv' },\n { name: 'Pipfile.lock', kind: 'language', value: 'python' },\n { name: 'poetry.lock', kind: 'package-manager', value: 'poetry' },\n { name: 'poetry.lock', kind: 'language', value: 'python' },\n { name: 'uv.lock', kind: 'package-manager', value: 'uv' },\n { name: 'uv.lock', kind: 'language', value: 'python' },\n { name: 'package-lock.json', kind: 'package-manager', value: 'npm' },\n { name: 'npm-shrinkwrap.json', kind: 'package-manager', value: 'npm' },\n { name: 'yarn.lock', kind: 'package-manager', value: 'yarn' },\n { name: 'pnpm-lock.yaml', kind: 'package-manager', value: 'pnpm' },\n { name: 'pnpm-workspace.yaml', kind: 'package-manager', value: 'pnpm' },\n { name: 'bun.lock', kind: 'package-manager', value: 'bun' },\n { name: 'bun.lockb', kind: 'package-manager', value: 'bun' },\n];\n\nexport const sourceRootNames = ['src/main/java', 'src/main/kotlin', 'src', 'app', 'Source'];\n","/*** Return whether an unknown value is a non-null, non-array record. */\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n","import type { DetectionFinding, ProjectDetectionInput } from '../../../types/detection.js';\n\n/*** Infer overlapping JavaScript ecosystem traits from explicit package metadata. */\nexport function detectMetadata(input: ProjectDetectionInput): readonly DetectionFinding[] {\n const dependencies = new Set([\n ...Object.keys(input.dependencies ?? {}),\n ...Object.keys(input.devDependencies ?? {}),\n ...Object.keys(input.peerDependencies ?? {}),\n ...Object.keys(input.optionalDependencies ?? {}),\n ]);\n const dependencySignals = [...dependencies].flatMap((name) =>\n dependencyRules\n .filter((rule) => rule.dependency === name)\n .map((rule) => ({\n kind: rule.kind,\n value: rule.value,\n evidence: `dependency:${name}`,\n weight: 3,\n })),\n );\n const hasManifest =\n dependencies.size > 0 || input.engines !== undefined || input.packageManager !== undefined;\n return [\n ...(hasManifest ? [finding('language', 'javascript', 'package metadata')] : []),\n ...dependencySignals,\n ...Object.keys(input.engines ?? {})\n .filter((name) => name === 'node' || name === 'bun')\n .map((name) => finding('runtime', name, `engines:${name}`)),\n ...detectManager(input.packageManager),\n ];\n}\n\nconst dependencyRules: readonly {\n readonly dependency: string;\n readonly kind: DetectionFinding['kind'];\n readonly value: string;\n}[] = [\n { dependency: 'typescript', kind: 'language', value: 'typescript' },\n { dependency: 'react', kind: 'framework', value: 'react' },\n { dependency: 'react-native', kind: 'framework', value: 'react-native' },\n { dependency: 'react-native', kind: 'framework', value: 'react' },\n { dependency: 'expo', kind: 'framework', value: 'expo' },\n { dependency: 'expo', kind: 'framework', value: 'react-native' },\n { dependency: 'expo', kind: 'framework', value: 'react' },\n { dependency: 'next', kind: 'framework', value: 'next' },\n { dependency: 'next', kind: 'framework', value: 'react' },\n { dependency: 'next', kind: 'runtime', value: 'node' },\n { dependency: '@types/node', kind: 'runtime', value: 'node' },\n { dependency: '@types/bun', kind: 'runtime', value: 'bun' },\n];\n\n/*** Record one package metadata signal without treating its weight as confidence. */\nfunction finding(\n kind: DetectionFinding['kind'],\n value: string,\n evidence: string,\n): DetectionFinding {\n return { kind, value, evidence, weight: 1 };\n}\n\n/*** Recognize an explicitly declared package manager and its Bun runtime implication. */\nfunction detectManager(value: string | undefined): readonly DetectionFinding[] {\n if (value === undefined) return [];\n const manager = ['npm', 'pnpm', 'yarn', 'bun'].find((name) => value.startsWith(`${name}@`));\n if (manager === undefined) return [];\n return [\n finding('package-manager', manager, `packageManager:${value}`),\n ...(manager === 'bun' ? [finding('runtime', 'bun', `packageManager:${value}`)] : []),\n ];\n}\n","/*** Convert an unknown thrown value into a stable human-readable message. */\nexport function toErrorMessage(error: unknown, fallback = 'Unknown error'): string {\n if (error instanceof Error) return error.message;\n if (typeof error === 'string') return error.length > 0 ? error : fallback;\n if (\n typeof error === 'number' ||\n typeof error === 'boolean' ||\n typeof error === 'bigint' ||\n typeof error === 'symbol'\n ) {\n return String(error);\n }\n return fallback;\n}\n","/*** Reduce a Java import specifier to its package path using PKGViz-compatible semantics. */\nexport function extractJavaPackageFromImport(specifier: string): string {\n const cleaned = specifier.replace(/\\.\\*$/u, '');\n const segments = cleaned.split('.').reverse();\n if (segments.length < 2) return cleaned;\n const firstPackageIndex = segments.findIndex((segment) => !/^[A-Z]/u.test(segment));\n if (firstPackageIndex < 0) return cleaned;\n return segments.slice(firstPackageIndex).reverse().join('.');\n}\n","/*** Reduce a C++ include path to PKGViz-compatible package notation. */\nexport function extractCppPackageFromInclude(specifier: string): string {\n const withoutExtension = specifier.replace(/\\.(h|hpp|hxx)$/u, '');\n const segments = withoutExtension.split('/');\n if (segments.length <= 1) return '';\n return segments.slice(0, -1).join('.');\n}\n","/*** Reduce a Python import specifier to its PKGViz-compatible package target. */\nexport function extractPythonPackageFromImport(specifier: string): string {\n if (specifier.startsWith('.')) return '';\n return specifier.split('.')[0] ?? specifier;\n}\n","import type { ProjectInspection, ProjectInspectionOptions } from '../../../types/inspection.js';\nimport { readSnapshotAsync } from '../adapters/outbound/readSnapshotAsync.js';\nimport { inspectWithPortAsync } from '../application/inspectWithPortAsync.js';\n\n/***\n * Inspect a directory using bounded, asynchronous, read-only filesystem access.\n *\n * Import from `@ankhorage/project-detector/node`. Defaults: depth 16, 20,000 entries,\n * 256 KiB per manifest and 8 MiB total manifest text. Dependency/build/cache directories are pruned. Symlinks are skipped\n * with diagnostics; their targets are never intentionally scanned. Pass an AbortSignal to cancel.\n * Configure additional manifest basenames and detector callbacks for new ecosystems.\n * Package/workspace membership currently resolves JavaScript package.json workspaces and pnpm YAML;\n * other ecosystem manifests are identified, not fully resolved into dependency graphs.\n * No inspected JavaScript, Gradle, Python, executable config or install script is executed.\n * Inspection is a best-effort snapshot, not a sandbox against concurrent hostile filesystem edits.\n * The result reports incompleteness; it never grants permission to run an update.\n * On a complete scan output is sorted; when a budget is exhausted the retained subset depends\n * on filesystem enumeration order. Inspect a stable checkout for reproducible results.\n * Install with `npm install @ankhorage/project-detector`; the standalone command is\n * `npx --package @ankhorage/project-detector project-detector inspect .`.\n * With Ankh installed, use `ankh project-detector inspect .`.\n * CLI exit codes are 0 for a complete scan, 1 for invocation/root errors and 2 for partial scans.\n * Release automation requires the organization release App configuration and npm publishing\n * authorization for this new package; repository files alone do not provision these credentials.\n * @readme\n */\nexport async function inspectProjectAsync(\n path: string,\n options: ProjectInspectionOptions = {},\n): Promise<ProjectInspection> {\n return inspectWithPortAsync(path, { readAsync: readSnapshotAsync }, options);\n}\n","import type { DependencyGraphAnalyzer } from '../../../../../types/dependencyGraph.js';\nimport { analyzeKotlinProjectAsync } from './analyzeKotlinProjectAsync.js';\n\n/*** Kotlin analyzer adapter selected from project-detector language evidence. */\nexport const kotlinDependencyGraphAnalyzer: DependencyGraphAnalyzer = {\n id: 'kotlin',\n supports: (detection) => detection.languages.some(({ id }) => id === 'kotlin'),\n analyzeAsync: analyzeKotlinProjectAsync,\n};\n","import type { DependencyGraphAnalyzer } from '../../../../../types/dependencyGraph.js';\nimport { analyzePythonProjectAsync } from './analyzePythonProjectAsync.js';\n\n/*** Python analyzer adapter selected from project-detector language evidence. */\nexport const pythonDependencyGraphAnalyzer: DependencyGraphAnalyzer = {\n id: 'python',\n supports: (detection) => detection.languages.some(({ id }) => id === 'python'),\n analyzeAsync: analyzePythonProjectAsync,\n};\n","import type { DependencyGraphAnalyzer } from '../../../../../types/dependencyGraph.js';\nimport { analyzeDelphiProjectAsync } from './analyzeDelphiProjectAsync.js';\n\n/*** Delphi analyzer adapter selected from project-detector language evidence. */\nexport const delphiDependencyGraphAnalyzer: DependencyGraphAnalyzer = {\n id: 'delphi',\n supports: (detection) => detection.languages.some(({ id }) => id === 'delphi'),\n analyzeAsync: analyzeDelphiProjectAsync,\n};\n","import type { DetectionFinding, ProjectDetectionInput } from '../../../types/detection.js';\nimport { languageExtensions, manifestRules } from '../constants/fileRules.js';\n\n/*** Classify file and manifest evidence without loading or executing a project. */\nexport function detectFiles(input: ProjectDetectionInput): readonly DetectionFinding[] {\n return (input.files ?? []).flatMap((file) => [\n ...detectFileName(file),\n ...detectContent(file, input.contents?.get(file)),\n ]);\n}\n\n/*** Interpret file basenames and language-specific suffixes. */\nfunction detectFileName(file: string): readonly DetectionFinding[] {\n const name = file.split('/').at(-1) ?? file;\n return [\n ...[...languageExtensions]\n .filter(([, extensions]) => extensions.some((extension) => name.endsWith(extension)))\n .map(([value]) => ({ kind: 'language' as const, value, evidence: file, weight: 3 })),\n ...manifestRules\n .filter((rule) => rule.name === name)\n .map((rule) => ({ kind: rule.kind, value: rule.value, evidence: file, weight: 1 })),\n ...(name.startsWith('tsconfig') && name.endsWith('.json')\n ? [{ kind: 'language' as const, value: 'typescript', evidence: file, weight: 3 }]\n : []),\n ...(isManifest(name)\n ? [{ kind: 'manifest' as const, value: name, evidence: file, weight: 1 }]\n : []),\n ];\n}\n\n/*** Distinguish Kotlin build plugins from generic JVM build files. */\nfunction detectContent(file: string, content: string | undefined): readonly DetectionFinding[] {\n const name = file.split('/').at(-1);\n if (content === undefined || (name !== 'pom.xml' && name !== 'build.gradle')) return [];\n const kotlin =\n content.includes('org.jetbrains.kotlin') ||\n content.includes('kotlin-maven-plugin') ||\n content.includes('kotlin-stdlib') ||\n content.includes('kotlin');\n return kotlin\n ? [{ kind: 'language', value: 'kotlin', evidence: `${file}:kotlin-plugin`, weight: 3 }]\n : [];\n}\n\n/*** Identify manifests independently from inferred language certainty. */\nfunction isManifest(name: string): boolean {\n return (\n manifestRules.some((rule) => rule.name === name) ||\n name === 'ankh.config.json' ||\n name.endsWith('.dproj')\n );\n}\n","import type { DependencyGraphAnalyzer } from '../../../../../types/dependencyGraph.js';\nimport { analyzeTypeScriptProjectAsync } from './analyzeTypeScriptProjectAsync.js';\n\n/*** TypeScript analyzer adapter selected from project-detector language evidence. */\nexport const typescriptDependencyGraphAnalyzer: DependencyGraphAnalyzer = {\n id: 'typescript',\n supports: (detection) => detection.languages.some(({ id }) => id === 'typescript'),\n analyzeAsync: analyzeTypeScriptProjectAsync,\n};\n","import type { GraphNode } from '@ankhorage/graph';\n\nimport type {\n DependencyGraphNodeData,\n DependencyGraphPackage,\n} from '../../../../../types/dependencyGraph.js';\nimport { modulePathForFile } from './modulePathForFile.js';\n\n/*** Create intrinsic module nodes, including ancestor directories, for TypeScript source files. */\nexport function createTypeScriptModuleNodes(\n packageContext: DependencyGraphPackage,\n files: readonly string[],\n): readonly GraphNode<DependencyGraphNodeData>[] {\n const paths = new Set(\n files.flatMap((file) => ancestorModulePaths(modulePathForFile(packageContext.rootPath, file))),\n );\n return [...paths]\n .sort()\n .filter((modulePath) => modulePath !== '')\n .map((modulePath) => ({\n id: `${packageContext.nodeId}#${modulePath}`,\n data: {\n kind: 'module',\n classification: 'intrinsic',\n focus: true,\n label: modulePath.split('.').at(-1) ?? modulePath,\n projectId: packageContext.projectId,\n ...(packageContext.name === undefined ? {} : { packageName: packageContext.name }),\n path: modulePath,\n parentPath: modulePath.includes('.') ? modulePath.split('.').slice(0, -1).join('.') : '',\n },\n }));\n}\n\n/*** Expand a module path into the hierarchy required for package-level graph projections. */\nfunction ancestorModulePaths(modulePath: string): readonly string[] {\n if (modulePath === '') return [''];\n const segments = modulePath.split('.');\n return segments.map((_, index) => segments.slice(0, index + 1).join('.'));\n}\n","/*** Escapes a literal string so it can be safely embedded in a regular-expression source. */\nexport function escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import type { Graph } from '../../../types/graph.js';\n\n/*** Create a deterministic graph and reject ambiguous or dangling identities. */\nexport function createGraph<NodeData, EdgeData>(\n input: Graph<NodeData, EdgeData>,\n): Graph<NodeData, EdgeData> {\n const nodes = [...input.nodes].sort((left, right) => compareText(left.id, right.id));\n const edges = [...input.edges].sort((left, right) => compareText(left.id, right.id));\n\n assertUniqueIds(\n nodes.map(({ id }) => id),\n 'node',\n );\n assertUniqueIds(\n edges.map(({ id }) => id),\n 'edge',\n );\n\n const nodeIds = new Set(nodes.map(({ id }) => id));\n for (const edge of edges) {\n if (!nodeIds.has(edge.source) || !nodeIds.has(edge.target)) {\n throw new Error(\n `Graph edge \"${edge.id}\" references an unknown endpoint: ${edge.source} -> ${edge.target}.`,\n );\n }\n }\n\n return { nodes, edges };\n}\n\n/*** Reject empty or duplicate graph identities. */\nfunction assertUniqueIds(ids: readonly string[], kind: 'edge' | 'node'): void {\n const seen = new Set<string>();\n\n for (const id of ids) {\n if (id.trim() === '') throw new Error(`Graph ${kind} IDs must be non-empty.`);\n if (seen.has(id)) throw new Error(`Duplicate graph ${kind} ID: ${id}.`);\n seen.add(id);\n }\n}\n\n/*** Compare graph identities without locale-dependent ordering. */\nfunction compareText(left: string, right: string): number {\n if (left < right) return -1;\n return left > right ? 1 : 0;\n}\n","export interface KotlinDependencies {\n readonly packageName: string;\n readonly imports: readonly string[];\n}\n\n/*** Extract a Kotlin package declaration and import specifiers from source text. */\nexport function extractKotlinDependencies(content: string): KotlinDependencies {\n const packageName = /^\\s*package\\s+([\\w.]+)/mu.exec(content)?.[1] ?? '';\n const imports = Array.from(content.matchAll(/^\\s*import\\s+([\\w.]+(?:\\.\\*)?)/gmu)).map(\n (match) => match[1] ?? '',\n );\n return { packageName, imports: imports.filter((value) => value !== '') };\n}\n","// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport type { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set<ExtglobType>(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string | null): c is ExtglobType =>\n types.has(c as ExtglobType)\nconst isExtglobAST = (c: AST): c is AST & { type: ExtglobType } =>\n isExtglobType(c.type)\n\n// Map of which extglob types can adopt the children of a nested extglob\n//\n// anything but ! can adopt a matching type:\n// +(a|+(b|c)|d) => +(a|b|c|d)\n// *(a|*(b|c)|d) => *(a|b|c|d)\n// @(a|@(b|c)|d) => @(a|b|c|d)\n// ?(a|?(b|c)|d) => ?(a|b|c|d)\n//\n// * can adopt anything, because 0 or repetition is allowed\n// *(a|?(b|c)|d) => *(a|b|c|d)\n// *(a|+(b|c)|d) => *(a|b|c|d)\n// *(a|@(b|c)|d) => *(a|b|c|d)\n//\n// + can adopt @, because 1 or repetition is allowed\n// +(a|@(b|c)|d) => +(a|b|c|d)\n//\n// + and @ CANNOT adopt *, because 0 would be allowed\n// +(a|*(b|c)|d) => would match \"\", on *(b|c)\n// @(a|*(b|c)|d) => would match \"\", on *(b|c)\n//\n// + and @ CANNOT adopt ?, because 0 would be allowed\n// +(a|?(b|c)|d) => would match \"\", on ?(b|c)\n// @(a|?(b|c)|d) => would match \"\", on ?(b|c)\n//\n// ? can adopt @, because 0 or 1 is allowed\n// ?(a|@(b|c)|d) => ?(a|b|c|d)\n//\n// ? and @ CANNOT adopt * or +, because >1 would be allowed\n// ?(a|*(b|c)|d) => would match bbb on *(b|c)\n// @(a|*(b|c)|d) => would match bbb on *(b|c)\n// ?(a|+(b|c)|d) => would match bbb on +(b|c)\n// @(a|+(b|c)|d) => would match bbb on +(b|c)\n//\n// ! CANNOT adopt ! (nothing else can either)\n// !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c)\n//\n// ! can adopt @\n// !(a|@(b|c)|d) => !(a|b|c|d)\n//\n// ! CANNOT adopt *\n// !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed\n//\n// ! CANNOT adopt +\n// !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed\n//\n// ! CANNOT adopt ?\n// x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match \"x\"\nconst adoptionMap = new Map<ExtglobType, ExtglobType[]>([\n ['!', ['@']],\n ['?', ['?', '@']],\n ['@', ['@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@']],\n])\n\n// nested extglobs that can be adopted in, but with the addition of\n// a blank '' element.\nconst adoptionWithSpaceMap = new Map<ExtglobType, ExtglobType[]>([\n ['!', ['?']],\n ['@', ['?']],\n ['+', ['?', '*']],\n])\n\n// union of the previous two maps\nconst adoptionAnyMap = new Map<ExtglobType, ExtglobType[]>([\n ['!', ['?', '@']],\n ['?', ['?', '@']],\n ['@', ['?', '@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@', '?', '*']],\n])\n\n// Extglobs that can take over their parent if they are the only child\n// the key is parent, value maps child to resulting extglob parent type\n// '@' is omitted because it's a special case. An `@` extglob with a single\n// member can always be usurped by that subpattern.\nconst usurpMap = new Map<\n ExtglobType,\n Map<ExtglobType | null, ExtglobType | null>\n>([\n ['!', new Map([['!', '@']])],\n [\n '?',\n new Map([\n ['*', '*'],\n ['+', '*'],\n ]),\n ],\n [\n '@',\n new Map([\n ['!', '!'],\n ['?', '?'],\n ['@', '@'],\n ['*', '*'],\n ['+', '+'],\n ]),\n ],\n [\n '+',\n new Map([\n ['?', '*'],\n ['*', '*'],\n ]),\n ],\n])\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nlet ID = 0\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n #parent?: AST\n #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n id = ++ID\n\n get depth(): number {\n return (this.#parent?.depth ?? -1) + 1\n }\n\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return {\n '@@type': 'AST',\n id: this.id,\n type: this.type,\n root: this.#root.id,\n parent: this.#parent?.id,\n depth: this.depth,\n partsLength: this.#parts.length,\n parts: this.#parts,\n }\n }\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n return (\n this.#toString !== undefined ? this.#toString\n : !this.type ?\n (this.#toString = this.#parts.map(p => String(p)).join(''))\n : (this.#toString =\n this.type +\n '(' +\n this.#parts.map(p => String(p)).join('|') +\n ')')\n )\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (\n typeof p !== 'string' &&\n !(p instanceof AST && p.#parent === this)\n ) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: unknown[] =\n this.type === null ?\n this.#parts\n .slice()\n .map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions,\n extDepth: number,\n ): number {\n const maxDepth = opt.maxExtglobRecursion ?? 2\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n // we don't have to check for adoption here, because that's\n // done at the other recursion point.\n const doRecurse =\n !opt.noext &&\n isExtglobType(c) &&\n str.charAt(i) === '(' &&\n extDepth <= maxDepth\n if (doRecurse) {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt, extDepth + 1)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n const doRecurse =\n !opt.noext &&\n isExtglobType(c) &&\n str.charAt(i) === '(' &&\n /* c8 ignore start - the maxDepth is sufficient here */\n (extDepth <= maxDepth || (ast && ast.#canAdoptType(c)))\n /* c8 ignore stop */\n if (doRecurse) {\n const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt, extDepth + depthAdd)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n #canAdoptWithSpace(child?: AST | string): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n return this.#canAdopt(child, adoptionWithSpaceMap)\n }\n\n #canAdopt(\n child?: AST | string,\n map: Map<ExtglobType, ExtglobType[]> = adoptionMap,\n ): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n if (\n !child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null\n ) {\n return false\n }\n const gc = child.#parts[0]\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false\n }\n return (this as AST & { type: ExtglobType }).#canAdoptType(\n gc.type,\n map,\n )\n }\n #canAdoptType(\n c: string,\n map: Map<ExtglobType, ExtglobType[]> = adoptionAnyMap,\n ): c is ExtglobType {\n return !!map.get(this.type as ExtglobType)?.includes(c as ExtglobType)\n }\n\n #adoptWithSpace(\n this: AST & { type: ExtglobType },\n child: AST & {\n type: null\n },\n index: number,\n ) {\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n const blank = new AST(null, gc, this.options)\n blank.#parts.push('')\n gc.push(blank)\n this.#adopt(child, index)\n }\n\n #adopt(\n child: AST & {\n type: null\n },\n index: number,\n ) {\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n this.#parts.splice(index, 1, ...gc.#parts)\n for (const p of gc.#parts) {\n if (typeof p === 'object') p.#parent = this\n }\n this.#toString = undefined\n }\n\n #canUsurpType(c: string): boolean {\n const m = usurpMap.get(this.type as ExtglobType)\n return !!m?.has(c as ExtglobType)\n }\n\n #canUsurp(child?: AST | string): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n if (\n !child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null ||\n this.#parts.length !== 1\n ) {\n return false\n }\n const gc = child.#parts[0]\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false\n }\n return (this as AST & { type: ExtglobType }).#canUsurpType(gc.type)\n }\n\n #usurp(this: AST & { type: ExtglobType }, child: AST & { type: null }) {\n const m = usurpMap.get(this.type as ExtglobType)\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n const nt = m?.get(gc.type)\n /* c8 ignore start - impossible */\n if (!nt) return false\n /* c8 ignore stop */\n this.#parts = gc.#parts\n for (const p of this.#parts) {\n if (typeof p === 'object') {\n p.#parent = this\n }\n }\n this.type = nt\n this.#toString = undefined\n this.#emptyExt = false\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options, 0)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) {\n this.#flatten()\n this.#fillNegs()\n }\n if (!isExtglobAST(this)) {\n const noEmpty =\n this.isStart() &&\n this.isEnd() &&\n !this.#parts.some(s => typeof s !== 'string')\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string' ?\n AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start =\n needNoTrav ? startNoTraversal\n : needNoDot ? startNoDot\n : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = (this as AST & { type: ExtglobType }).#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n const me = this as AST\n me.#parts = [s]\n me.type = null\n me.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot ?\n ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!' ?\n // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@' ? ')'\n : this.type === '?' ? ')?'\n : this.type === '+' && bodyDotAllowed ? ')'\n : this.type === '*' && bodyDotAllowed ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #flatten() {\n if (!isExtglobAST(this)) {\n for (const p of this.#parts) {\n if (typeof p === 'object') {\n p.#flatten()\n }\n }\n } else {\n // do up to 10 passes to flatten as much as possible\n let iterations = 0\n let done = false\n do {\n done = true\n for (let i = 0; i < this.#parts.length; i++) {\n const c = this.#parts[i]\n if (typeof c === 'object') {\n c.#flatten()\n if (this.#canAdopt(c)) {\n done = false\n this.#adopt(c, i)\n } else if (this.#canAdoptWithSpace(c)) {\n done = false\n ;(this as AST & { type: ExtglobType }).#adoptWithSpace(c, i)\n } else if (this.#canUsurp(c)) {\n done = false\n ;(this as AST & { type: ExtglobType }).#usurp(c)\n }\n }\n }\n } while (!done && ++iterations < 10)\n }\n this.#toString = undefined\n }\n\n #partsToRegExp(this: AST & { type: ExtglobType }, dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n // multiple stars that aren't globstars coalesce into one *\n let inStar = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '*') {\n if (inStar) continue\n inStar = true\n re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star\n hasMagic = true\n continue\n } else {\n inStar = false\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n","/*** Reduce a Kotlin import specifier to its package path using PKGViz-compatible semantics. */\nexport function extractKotlinPackageFromImport(specifier: string): string {\n const cleaned = specifier.replace(/\\.\\*$/u, '');\n const parts = cleaned.split('.');\n if (parts.length <= 1) return cleaned;\n return parts.slice(0, -1).join('.');\n}\n","/*** Narrow an unknown value to an array containing only strings. */\nexport function isStringArray(value: unknown): value is string[] {\n return Array.isArray(value) && value.every((entry) => typeof entry === 'string');\n}\n","/*** Return whether an unknown value is a non-null, non-array record. */\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n","export interface CppInclude {\n readonly specifier: string;\n readonly local: boolean;\n}\n\nexport interface CppDependencies {\n readonly namespace: string;\n readonly includes: readonly CppInclude[];\n}\n\n/*** Extract C++ namespace and include directives from source text. */\nexport function extractCppDependencies(content: string): CppDependencies {\n const namespace =\n /namespace\\s+([a-zA-Z0-9_:]+)\\s*\\{/u.exec(content)?.[1]?.replace(/::/gu, '.') ?? '';\n const includes = Array.from(content.matchAll(/#include\\s+([\"<])([^\">]+)[\">]/gu)).map((match) => ({\n local: match[1] === '\"',\n specifier: match[2] ?? '',\n }));\n return { namespace, includes: includes.filter(({ specifier }) => specifier !== '') };\n}\n","export interface DelphiDependencies {\n readonly unitName: string;\n readonly imports: readonly string[];\n}\n\n/*** Extract a Delphi unit declaration and uses-clause dependencies. */\nexport function extractDelphiDependencies(content: string): DelphiDependencies {\n const unitName = /\\bunit\\s+([A-Za-z_][A-Za-z0-9_.]*)\\s*;/iu.exec(content)?.[1] ?? '';\n const imports = Array.from(content.matchAll(/\\buses\\s+([\\s\\S]*?);/giu)).flatMap((match) => {\n const clause = match[1] ?? '';\n return clause\n .split(',')\n .map((unit) => unit.replace(/\\s+in\\s+['\"].*?['\"]/giu, '').trim())\n .filter(Boolean);\n });\n return { unitName, imports };\n}\n","export interface JavaDependencies {\n readonly packageName: string;\n readonly imports: readonly string[];\n}\n\n/*** Extract a Java package declaration and static import specifiers from source text. */\nexport function extractJavaDependencies(content: string): JavaDependencies {\n const packageName = /^package\\s+([a-zA-Z0-9_.]+);/mu.exec(content)?.[1] ?? '';\n const imports = Array.from(content.matchAll(/^import\\s+(?:static\\s+)?([a-zA-Z0-9_.*]+);/gmu)).map(\n (match) => match[1] ?? '',\n );\n return { packageName, imports: imports.filter((value) => value !== '') };\n}\n","export interface PythonDependencies {\n readonly imports: readonly string[];\n}\n\n/*** Extract Python import specifiers from import and from-import statements. */\nexport function extractPythonDependencies(content: string): PythonDependencies {\n const imports: string[] = [];\n const importRegex =\n /(?:^|\\n)\\s*(?:from\\s+([\\w.]+)\\s+)?import\\s+([\\w\\s,*]+?)(?:\\s+as\\s+\\w+)?(?:\\s|$|#)/gmu;\n\n for (const match of content.matchAll(importRegex)) {\n const [, fromModule, importedItems = ''] = match;\n if (fromModule !== undefined) {\n imports.push(fromModule);\n continue;\n }\n imports.push(\n ...importedItems\n .split(',')\n .map((item) => item.trim())\n .filter(Boolean),\n );\n }\n return { imports };\n}\n","////////////////////////////////////////////////////////////////////////////\n// Shared Constants\n\n/**\n * Java source root directory\n */\nexport const JAVA_ROOT = 'src/main/java';\n","///////////////////////////////////////////////////////////////////////////\n// Language Detection Types\n\n/**\n * List of supported coding languages\n */\nexport enum Language {\n Cpp = 'cpp',\n Delphi = 'delphi',\n JavaScript = 'javascript',\n Kotlin = 'kotlin',\n Python = 'python',\n TypeScript = 'typescript',\n Java = 'java',\n Unknown = 'unknown',\n}\n\n//////////////////////////////////////////////////////////////////////////\n// Parser Types\n\nexport interface ParsedFile {\n readonly calls: MethodCall[];\n readonly className: string;\n readonly imports: ImportDefinition[];\n readonly methods: MethodDefinition[];\n readonly package: string;\n readonly path: string; // Relative path from project root\n}\n\nexport interface ParsedDirectory {\n [k: string]: ParsedDirectory | ParsedFile;\n}\n\n/**\n * Method Definition\n */\nexport interface MethodDefinition {\n readonly name: string;\n readonly returnType: string;\n readonly parameters: string[];\n readonly visibility: 'public' | 'protected' | 'private' | 'default';\n}\n\n/**\n * Method Call\n */\nexport interface MethodCall {\n readonly callee: string;\n readonly method: string;\n}\n\n/**\n * Import Definition\n */\nexport interface ImportDefinition {\n readonly name: string;\n readonly pkg: string;\n readonly isIntrinsic?: boolean;\n}\n","'use server';\nimport path from 'node:path';\n\nimport { readTextFileWithinRoot } from '@ankhorage/utility/node/fs';\n\nimport type { ImportDefinition, MethodCall, MethodDefinition, ParsedFile } from '@/shared/types';\nimport { toPosix } from '@/shared/utils/toPosix';\n\n/*** Extracts package declaration from Kotlin content. */\nfunction extractPackage(content: string): string {\n const packageMatch = /^\\s*package\\s+([\\w.]+)/m.exec(content);\n return packageMatch ? packageMatch[1] : '';\n}\n\n/*** Extracts class, object, data class, or sealed class name from Kotlin content. */\nfunction extractClassName(content: string, fileName: string): string {\n const classMatch =\n /(?:^|\\n)\\s*(?:data\\s+|sealed\\s+|abstract\\s+|open\\s+)?(?:class|object|interface)\\s+([A-Za-z0-9_]+)/m.exec(\n content\n );\n\n if (classMatch) return classMatch[1];\n return path.basename(fileName, path.extname(fileName));\n}\n\n/*** Extracts method/function definitions from Kotlin content. */\nfunction extractMethodDefinitions(content: string): MethodDefinition[] {\n const methods: MethodDefinition[] = [];\n const methodRegex =\n /(?:^|\\n)\\s*(?:(private|protected|public|internal)\\s+)?(?:suspend\\s+)?fun\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*$$([^)]*)$$(?:\\s*:\\s*([^{=\\n]+))?/gm;\n\n let match;\n while ((match = methodRegex.exec(content)) !== null) {\n const visibility = (match[1] || 'public') as\n 'public' | 'protected' | 'private' | 'internal' | 'default';\n const name = match[2];\n const paramsStr = match[3];\n const returnType = match[4]?.trim() || 'Unit';\n const params = paramsStr\n .split(',')\n .map(p => p.trim())\n .filter(p => p)\n .map(p => {\n const paramMatch = /([a-zA-Z_][a-zA-Z0-9_]*)\\s*:/.exec(p);\n return paramMatch ? paramMatch[1] : p;\n });\n\n methods.push({\n name,\n returnType,\n parameters: params,\n visibility: visibility === 'internal' ? 'default' : visibility,\n });\n }\n\n return methods;\n}\n\n/*** Extracts method calls from Kotlin content. */\nfunction extractMethodCalls(content: string): MethodCall[] {\n const calls: MethodCall[] = [];\n const callRegex = /([a-zA-Z_][a-zA-Z0-9_]*)\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(/g;\n\n let match;\n while ((match = callRegex.exec(content)) !== null) {\n const callee = match[1];\n const method = match[2];\n calls.push({ callee, method });\n }\n\n return calls;\n}\n\n/*** Parses Kotlin class/method/call metadata while consuming canonical dependency imports. */\nexport async function parseKotlinFile(\n fullPath: string,\n projectRoot: string,\n imports: readonly ImportDefinition[]\n): Promise<ParsedFile> {\n const { content, path: resolvedPath } = readTextFileWithinRoot({\n rootPath: projectRoot,\n filePath: fullPath,\n });\n const fileName = path.basename(resolvedPath);\n\n return {\n className: extractClassName(content, fileName),\n package: extractPackage(content),\n imports: [...imports],\n methods: extractMethodDefinitions(content),\n calls: extractMethodCalls(content),\n path: toPosix(path.relative(projectRoot, resolvedPath)),\n };\n}\n","'use server';\nimport path from 'node:path';\n\nimport { readTextFileWithinRoot } from '@ankhorage/utility/node/fs';\n\nimport type { ImportDefinition, MethodCall, MethodDefinition, ParsedFile } from '@/shared/types';\nimport { toPosix } from '@/shared/utils/toPosix';\n\n/*** Extracts package/unit path from Delphi file structure. */\nfunction extractUnitPath(filePath: string, projectRoot: string): string {\n const relativePath = toPosix(path.relative(projectRoot, filePath));\n const dir = path.posix.dirname(relativePath);\n return dir === '.' ? '' : dir.replace(/\\//g, '.');\n}\n\n/*** Extracts the unit/class name from Delphi content. */\nfunction extractClassName(content: string, fileName: string): string {\n const unitMatch = /\\bunit\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*;/i.exec(content);\n if (unitMatch) return unitMatch[1];\n\n const classMatch = /\\bT([A-Za-z_][A-Za-z0-9_]*)\\s*=\\s*class/i.exec(content);\n if (classMatch) return 'T' + classMatch[1];\n\n return path.basename(fileName, path.extname(fileName));\n}\n\n/*** Extracts method/procedure/function definitions from Delphi content. */\nfunction extractMethodDefinitions(content: string): MethodDefinition[] {\n const methods: MethodDefinition[] = [];\n const methodRegex =\n /\\b(procedure|function)\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*(?:$$(.*?)$$)?\\s*(?::\\s*([A-Za-z_][A-Za-z0-9_.<>]+))?\\s*;/gi;\n\n let match;\n while ((match = methodRegex.exec(content)) !== null) {\n const kind = match[1].toLowerCase();\n const name = match[2];\n const paramsStr = match[3] || '';\n const returnType = match[4] || (kind === 'procedure' ? 'void' : 'Unknown');\n const params = paramsStr\n .split(';')\n .map(p => p.trim())\n .filter(p => p)\n .map(p => {\n const colonIdx = p.indexOf(':');\n return colonIdx > 0 ? p.substring(0, colonIdx).trim() : p;\n });\n\n let visibility: 'public' | 'protected' | 'private' | 'default' = 'public';\n const beforeMethod = content.substring(0, match.index);\n if (/\\bprivate\\b(?!.*\\bpublic\\b)(?!.*\\bprotected\\b)/is.test(beforeMethod)) {\n visibility = 'private';\n } else if (/\\bprotected\\b(?!.*\\bpublic\\b)/is.test(beforeMethod)) {\n visibility = 'protected';\n }\n\n methods.push({ name, returnType, parameters: params, visibility });\n }\n\n return methods;\n}\n\n/*** Extracts method calls from Delphi content. */\nfunction extractMethodCalls(content: string): MethodCall[] {\n const calls: MethodCall[] = [];\n const callRegex = /([A-Za-z_][A-Za-z0-9_]*)\\.([A-Za-z_][A-Za-z0-9_]*)\\s*\\(/g;\n let match;\n\n while ((match = callRegex.exec(content)) !== null) {\n calls.push({ callee: match[1], method: match[2] });\n }\n\n return calls;\n}\n\n/*** Parses Delphi metadata while consuming canonical dependency imports. */\nexport async function parseDelphiFile(\n fullPath: string,\n projectRoot: string,\n imports: readonly ImportDefinition[]\n): Promise<ParsedFile> {\n const { content, path: resolvedPath } = readTextFileWithinRoot({\n rootPath: projectRoot,\n filePath: fullPath,\n });\n const fileName = path.basename(resolvedPath);\n\n return {\n className: extractClassName(content, fileName),\n package: extractUnitPath(resolvedPath, projectRoot),\n imports: [...imports],\n methods: extractMethodDefinitions(content),\n calls: extractMethodCalls(content),\n path: toPosix(path.relative(projectRoot, resolvedPath)),\n };\n}\n","'use server';\nimport path from 'node:path';\n\nimport { readTextFileWithinRoot } from '@ankhorage/utility/node/fs';\n\nimport type { ImportDefinition, MethodCall, MethodDefinition, ParsedFile } from '@/shared/types';\nimport { toPosix } from '@/shared/utils/toPosix';\n\n/*** Extracts module path from Python source structure. */\nfunction extractModulePath(filePath: string, projectRoot: string): string {\n const relativePath = toPosix(path.relative(projectRoot, filePath));\n const parts = relativePath.split('/');\n parts.pop();\n return parts.join('.');\n}\n\n/*** Extracts the class name from Python content. */\nfunction extractClassName(content: string, fileName: string): string {\n const classMatch = /^class\\s+([A-Za-z0-9_]+)/m.exec(content);\n if (classMatch) return classMatch[1];\n return path.basename(fileName, path.extname(fileName));\n}\n\n/*** Extracts method/function definitions from Python content. */\nfunction extractMethodDefinitions(content: string): MethodDefinition[] {\n const methods: MethodDefinition[] = [];\n const methodRegex =\n /(?:^|\\n)\\s*(async\\s+)?def\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*$$([^)]*)$$\\s*(?:->([^:]+))?:/gm;\n\n let match;\n while ((match = methodRegex.exec(content)) !== null) {\n const name = match[2];\n const paramsStr = match[3];\n const returnType = match[4]?.trim() || 'None';\n const params = paramsStr\n .split(',')\n .map(p => p.trim())\n .filter(p => p && p !== 'self' && p !== 'cls');\n\n let visibility: 'public' | 'protected' | 'private' | 'default' = 'public';\n if (name.startsWith('__') && !name.endsWith('__')) {\n visibility = 'private';\n } else if (name.startsWith('_')) {\n visibility = 'protected';\n }\n\n methods.push({\n name,\n returnType,\n parameters: params,\n visibility,\n });\n }\n\n return methods;\n}\n\n/*** Extracts method calls from Python content. */\nfunction extractMethodCalls(content: string): MethodCall[] {\n const calls: MethodCall[] = [];\n const callRegex = /([a-zA-Z_][a-zA-Z0-9_]*)\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(/g;\n\n let match;\n while ((match = callRegex.exec(content)) !== null) {\n const callee = match[1];\n const method = match[2];\n\n if (\n ['append', 'extend', 'pop', 'remove', 'join', 'split', 'strip'].includes(method) &&\n ['str', 'list', 'dict', 'set'].includes(callee)\n ) {\n continue;\n }\n\n calls.push({ callee, method });\n }\n\n return calls;\n}\n\n/*** Parses Python metadata while consuming canonical dependency imports. */\nexport async function parsePythonFile(\n fullPath: string,\n projectRoot: string,\n imports: readonly ImportDefinition[]\n): Promise<ParsedFile> {\n const { content, path: resolvedPath } = readTextFileWithinRoot({\n rootPath: projectRoot,\n filePath: fullPath,\n });\n const fileName = path.basename(resolvedPath);\n\n return {\n className: extractClassName(content, fileName),\n package: extractModulePath(resolvedPath, projectRoot),\n imports: [...imports],\n methods: extractMethodDefinitions(content),\n calls: extractMethodCalls(content),\n path: toPosix(path.relative(projectRoot, resolvedPath)),\n };\n}\n","import { readFile } from 'node:fs/promises';\nimport path from 'node:path';\n\nimport {\n createDependencyGraphAsync,\n type DependencyGraphNodeData,\n type DependencyImportEvidence,\n} from '@ankhorage/dependency-graph';\nimport { resolveFileSystemPathWithinRoot } from '@ankhorage/utility/node/fs';\n\nimport type { ImportDefinition } from '@/shared/types';\nimport { toPosix } from '@/shared/utils/toPosix';\n\ninterface OrderedImport {\n readonly definition: ImportDefinition;\n readonly position: number;\n readonly ordinal: number;\n}\n\ninterface AppendEvidenceInput {\n readonly analysisRoot: string;\n readonly evidence: DependencyImportEvidence;\n readonly importNameMode: ImportNameMode;\n readonly imports: Map<string, OrderedImport[]>;\n readonly intrinsicMode: ImportIntrinsicMode;\n readonly ordinal: number;\n readonly pkg: string;\n readonly projectRoot: string;\n readonly sourceTextByFile: Map<string, Promise<string>>;\n}\n\n/*** Returns PKGViz import definitions from the canonical dependency analyzer. */\nexport async function analyzeDependencyImportsAsync(\n projectRoot: string,\n analysisRoot: string = projectRoot,\n importNameMode: ImportNameMode = 'package',\n intrinsicMode: ImportIntrinsicMode = 'canonical'\n): Promise<ReadonlyMap<string, readonly ImportDefinition[]>> {\n const canonicalProjectRoot = resolveFileSystemPathWithinRoot(projectRoot, '.', {\n allowRoot: true,\n });\n const canonicalAnalysisRoot = resolveFileSystemPathWithinRoot(\n canonicalProjectRoot,\n resolveFileSystemPathWithinRoot(analysisRoot, '.', { allowRoot: true }),\n { allowRoot: true }\n );\n const graph = await createDependencyGraphAsync({\n projects: [{ id: 'current', rootPath: canonicalProjectRoot }],\n });\n const nodes = new Map(graph.nodes.map(node => [node.id, node.data] as const));\n const imports = new Map<string, OrderedImport[]>();\n const sourceTextByFile = new Map<string, Promise<string>>();\n let ordinal = 0;\n\n for (const edge of graph.edges) {\n const target = nodes.get(edge.target);\n if (target === undefined) {\n throw new Error(`Missing dependency-graph target node: ${edge.target}`);\n }\n\n const pkg = targetPackage(target);\n for (const evidence of edge.data.evidence) {\n if (pkg === '') continue;\n ordinal = await appendEvidenceAsync({\n analysisRoot: canonicalAnalysisRoot,\n evidence,\n importNameMode,\n imports,\n intrinsicMode,\n ordinal,\n pkg,\n projectRoot: canonicalProjectRoot,\n sourceTextByFile,\n });\n }\n }\n\n return materializeImports(imports);\n}\n\ntype ImportNameMode = 'package' | 'specifier';\ntype ImportIntrinsicMode =\n 'canonical' | 'delphi-standard-library' | 'kotlin-standard-library' | 'python-legacy';\n\n/*** Adds one canonical evidence item while retaining the original source declaration position. */\nasync function appendEvidenceAsync(input: AppendEvidenceInput): Promise<number> {\n const absoluteSourceFile = path.resolve(input.projectRoot, input.evidence.sourceFile);\n const sourceFile = toPosix(path.relative(input.analysisRoot, absoluteSourceFile));\n const sourceText = await readSourceTextAsync(input.sourceTextByFile, absoluteSourceFile);\n const current = input.imports.get(sourceFile) ?? [];\n\n current.push({\n definition: {\n name: input.importNameMode === 'specifier' ? input.evidence.specifier : input.pkg,\n pkg: input.pkg,\n isIntrinsic: isIntrinsicImport(input.evidence, input.intrinsicMode),\n },\n position: sourceText.indexOf(input.evidence.specifier),\n ordinal: input.ordinal,\n });\n input.imports.set(sourceFile, current);\n return input.ordinal + 1;\n}\n\n/*** Converts collected import evidence into source-order PKGViz definitions. */\nfunction materializeImports(\n imports: ReadonlyMap<string, readonly OrderedImport[]>\n): ReadonlyMap<string, readonly ImportDefinition[]> {\n return new Map(\n [...imports].map(([sourceFile, entries]) => [\n sourceFile,\n [...entries]\n .sort((left, right) => {\n const leftPosition = left.position < 0 ? Number.MAX_SAFE_INTEGER : left.position;\n const rightPosition = right.position < 0 ? Number.MAX_SAFE_INTEGER : right.position;\n return leftPosition - rightPosition || left.ordinal - right.ordinal;\n })\n .map(({ definition }) => definition),\n ])\n );\n}\n\n/*** Reads source content once so adapter output preserves source declaration order. */\nfunction readSourceTextAsync(\n cache: Map<string, Promise<string>>,\n sourceFile: string\n): Promise<string> {\n const cached = cache.get(sourceFile);\n if (cached !== undefined) return cached;\n\n const sourceText = readOptionalSourceTextAsync(sourceFile);\n cache.set(sourceFile, sourceText);\n return sourceText;\n}\n\n/*** Missing evidence source files retain canonical ordering instead of failing analysis. */\nasync function readOptionalSourceTextAsync(sourceFile: string): Promise<string> {\n try {\n return await readFile(sourceFile, 'utf8');\n } catch (error) {\n if (error instanceof Error && 'code' in error && error.code === 'ENOENT') return '';\n throw error;\n }\n}\n\n/*** Preserves PKGViz presentation semantics independently from canonical graph classification. */\nfunction isIntrinsicImport(evidence: DependencyImportEvidence, mode: ImportIntrinsicMode): boolean {\n if (mode === 'canonical') return evidence.classification === 'intrinsic';\n if (mode === 'python-legacy') return evidence.specifier.startsWith('.');\n if (mode === 'delphi-standard-library') {\n return (\n evidence.specifier.startsWith('System.') ||\n evidence.specifier.startsWith('Vcl.') ||\n evidence.specifier.startsWith('FMX.') ||\n evidence.specifier.startsWith('Data.') ||\n evidence.specifier.startsWith('Web.')\n );\n }\n\n return (\n evidence.specifier.startsWith('kotlin.') ||\n evidence.specifier.startsWith('java.') ||\n evidence.specifier.startsWith('javax.')\n );\n}\n\n/*** Maps canonical dependency-graph node metadata to PKGViz package notation. */\nfunction targetPackage(target: DependencyGraphNodeData): string {\n if (target.kind === 'module') return target.path ?? '';\n if (target.classification === 'intrinsic' && target.focus && target.path === '.') return '';\n return target.packageName ?? target.label;\n}\n","'use server';\nimport path from 'node:path';\n\nimport { readTextFileWithinRoot } from '@ankhorage/utility/node/fs';\nimport { escapeRegExp } from '@ankhorage/utility/regex';\n\nimport type { ImportDefinition, MethodCall, MethodDefinition, ParsedFile } from '@/shared/types';\nimport { toPosix } from '@/shared/utils/toPosix';\n\n/***\n * Extracts the package declaration from Java code.\n */\nfunction extractPackageName(content: string): string {\n const match = /^package\\s+([a-zA-Z0-9_.]+);/m.exec(content);\n return match?.[1] || '';\n}\n\n/***\n * Extracts the class name from the content and filename fallback.\n */\nfunction extractClassName(content: string, fileName: string): string {\n const classPattern = new RegExp(\n `(?:public\\\\s+)?(class|interface|enum|record)\\\\s+${escapeRegExp(fileName)}\\\\b`\n );\n const classNameMatch = content.match(classPattern);\n if (classNameMatch) return fileName;\n\n const fallback = /(?:public\\s+)?(class|interface|enum|record)\\s+([A-Za-z0-9_]+)/.exec(content);\n return fallback?.[2] || '';\n}\n\n/***\n * Extracts the method definitions from file content\n */\nfunction extractMethodDefinitions(content: string): MethodDefinition[] {\n const methodRegex =\n /(?:(public|protected|private)\\s+)?(?:static\\s+)?([\\w<>[\\]]+)\\s+(\\w+)\\s*\\(([^)]*)\\)\\s*\\{/g;\n const methods: MethodDefinition[] = [];\n\n let match;\n while ((match = methodRegex.exec(content)) !== null) {\n const visibility = (match[1] as 'default' | 'public' | 'protected' | 'private') || 'default';\n const returnType = match[2];\n const name = match[3];\n const params = match[4]\n .split(',')\n .map(p => p.trim())\n .filter(Boolean);\n\n methods.push({\n name,\n returnType,\n parameters: params,\n visibility,\n });\n }\n\n return methods;\n}\n\n/***\n * Extract method calls from Java content.\n */\nfunction extractMethodCalls(content: string): MethodCall[] {\n const callRegex = /(\\b\\w+)\\.(\\w+)\\s*\\(/g;\n const calls: MethodCall[] = [];\n\n let match;\n while ((match = callRegex.exec(content)) !== null) {\n const callee = match[1];\n const method = match[2];\n calls.push({ callee, method });\n }\n\n return calls;\n}\n\n/***\n * Parses Java class/method/call metadata while consuming canonical dependency imports.\n */\nexport async function parseJavaFile(\n fullPath: string,\n projectRoot: string,\n imports: readonly ImportDefinition[]\n): Promise<ParsedFile> {\n const { content, path: resolvedPath } = readTextFileWithinRoot({\n rootPath: projectRoot,\n filePath: fullPath,\n });\n const fileName = path.basename(resolvedPath, '.java');\n\n const file: ParsedFile = {\n className: extractClassName(content, fileName),\n package: extractPackageName(content),\n imports: [...imports],\n methods: extractMethodDefinitions(content),\n calls: extractMethodCalls(content),\n path: toPosix(path.relative(projectRoot, resolvedPath)),\n };\n\n return file;\n}\n","import type { GraphNode } from '@ankhorage/graph';\n\nimport type {\n DependencyGraphNodeData,\n DependencyGraphPackage,\n} from '../../../types/dependencyGraph.js';\n\n/*** Create the focus package node representing one inspected package root. */\nexport function createFocusPackageNode(\n packageContext: DependencyGraphPackage,\n): GraphNode<DependencyGraphNodeData> {\n return {\n id: packageContext.nodeId,\n data: {\n kind: 'package',\n classification: 'intrinsic',\n focus: true,\n label: packageContext.name ?? packageContext.id,\n projectId: packageContext.projectId,\n ...(packageContext.name === undefined ? {} : { packageName: packageContext.name }),\n path: packageContext.relativeRoot,\n },\n };\n}\n","import type { MinimatchOptions } from './index.js'\n\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n *\n * If the {@link MinimatchOptions.magicalBraces} option is used,\n * then braces (`{` and `}`) will be escaped.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n magicalBraces = false,\n }: Pick<MinimatchOptions, 'windowsPathsNoEscape' | 'magicalBraces'> = {},\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n if (magicalBraces) {\n return windowsPathsNoEscape ?\n s.replace(/[?*()[\\]{}]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\{}]/g, '\\\\$&')\n }\n return windowsPathsNoEscape ?\n s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n","import type { MinimatchOptions } from './index.js'\n\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then\n * square-bracket escapes are removed, but not backslash escapes.\n *\n * For example, it will turn the string `'[*]'` into `*`, but it will not\n * turn `'\\\\*'` into `'*'`, because `\\` is a path separator in\n * `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n *\n * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be\n * unescaped.\n */\n\nexport const unescape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n magicalBraces = true,\n }: Pick<MinimatchOptions, 'windowsPathsNoEscape' | 'magicalBraces'> = {},\n) => {\n if (magicalBraces) {\n return windowsPathsNoEscape ?\n s.replace(/\\[([^/\\\\])\\]/g, '$1')\n : s\n .replace(/((?!\\\\).|^)\\[([^/\\\\])\\]/g, '$1$2')\n .replace(/\\\\([^/])/g, '$1')\n }\n return windowsPathsNoEscape ?\n s.replace(/\\[([^/\\\\{}])\\]/g, '$1')\n : s\n .replace(/((?!\\\\).|^)\\[([^/\\\\{}])\\]/g, '$1$2')\n .replace(/\\\\([^/{}])/g, '$1')\n}\n","export const defaultExcludedDirectories = [\n '.git',\n 'node_modules',\n '.yarn',\n '.pnpm-store',\n 'dist',\n 'build',\n 'coverage',\n '.next',\n '.expo',\n '.cache',\n '__pycache__',\n '.venv',\n 'venv',\n 'env',\n 'vendor',\n '.gradle',\n 'target',\n 'Win32',\n 'Win64',\n];\n\nexport const defaultManifestNames = [\n 'package.json',\n 'pnpm-workspace.yaml',\n 'pom.xml',\n 'build.gradle',\n 'build.gradle.kts',\n 'settings.gradle',\n 'settings.gradle.kts',\n 'pyproject.toml',\n 'setup.cfg',\n 'Pipfile',\n 'CMakeLists.txt',\n 'conanfile.txt',\n 'vcpkg.json',\n 'ankh.config.json',\n];\n","// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { <posix class>: [<translation>, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } =\n {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n }\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean,\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number,\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c<more...>] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'\n : ranges.length ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n","import { parseProjectPath } from '@/shared/utils/parseProjectPath';\nimport { toPosix } from '@/shared/utils/toPosix';\n\n/*** Returns the project name for an explicit or configured project path. */\nexport const getProjectName = (projectPath: string = parseProjectPath()) =>\n toPosix(projectPath).split('/').pop() || '{unknown}';\n","import { getPackageCyclesWithMembers } from '@/app/utils/markCyclicPackages';\nimport { evaluateAuditRules } from '@/features/audit/domain/evaluateAuditRules';\nimport { resolveAuditConfiguration } from '@/features/audit/domain/resolveAuditConfiguration';\nimport { getProjectName } from '@/shared/utils/getProjectName';\nimport type { Audit, ResolveAuditConfigurationInput } from '@/types/audit';\nimport type { ProjectSnapshot } from '@/types/projectAnalysis';\n\n/*** Evaluates audit policy against the same files and weighted graph used by the visualization. */\nexport function createAuditFromSnapshot(\n snapshot: ProjectSnapshot,\n configurationInput: ResolveAuditConfigurationInput = {}\n): Audit {\n const configuration = resolveAuditConfiguration(configurationInput);\n const cyclicPackages = getPackageCyclesWithMembers(snapshot.files, snapshot.graph).cycles;\n const rules = evaluateAuditRules({ configuration, cyclicPackages });\n\n return {\n configuration,\n evaluation: { cyclicPackages, rules },\n files: snapshot.files,\n meta: {\n language: snapshot.language,\n projectName: getProjectName(snapshot.projectPath),\n timeStart: snapshot.timeStart,\n timeEnd: Date.now(),\n },\n };\n}\n","import type { Graph, GraphEdge, GraphNode } from '@ankhorage/graph';\nimport type { EdgeDefinition, ElementsDefinition, NodeDefinition } from 'cytoscape';\n\nimport type {\n CytoscapeAdapterOptions,\n CytoscapeClasses,\n CytoscapeElementData,\n} from '../../../../types/cytoscape.js';\n\n/*** Convert a canonical graph to deterministic Cytoscape element definitions. */\nexport function toCytoscapeElements<\n NodeData extends CytoscapeElementData,\n EdgeData extends CytoscapeElementData,\n>(\n graph: Graph<NodeData, EdgeData>,\n options: CytoscapeAdapterOptions<NodeData, EdgeData> = {},\n): ElementsDefinition {\n return {\n nodes: [...graph.nodes]\n .sort((left, right) => compareIds(left.id, right.id))\n .map((node) => toNodeDefinition(node, options)),\n edges: [...graph.edges]\n .sort((left, right) => compareIds(left.id, right.id))\n .map((edge) => toEdgeDefinition(edge, options)),\n };\n}\n\n/*** Convert one graph node while preserving domain metadata and compound-parent data. */\nfunction toNodeDefinition<\n NodeData extends CytoscapeElementData,\n EdgeData extends CytoscapeElementData,\n>(node: GraphNode<NodeData>, options: CytoscapeAdapterOptions<NodeData, EdgeData>): NodeDefinition {\n const classes = normalizeClasses(options.nodeClasses?.(node));\n\n return {\n group: 'nodes',\n data: {\n ...node.data,\n id: node.id,\n },\n ...(classes === undefined ? {} : { classes }),\n };\n}\n\n/*** Convert one graph edge while enforcing canonical identity and endpoints. */\nfunction toEdgeDefinition<\n NodeData extends CytoscapeElementData,\n EdgeData extends CytoscapeElementData,\n>(edge: GraphEdge<EdgeData>, options: CytoscapeAdapterOptions<NodeData, EdgeData>): EdgeDefinition {\n const classes = normalizeClasses(options.edgeClasses?.(edge));\n\n return {\n group: 'edges',\n data: {\n ...edge.data,\n id: edge.id,\n source: edge.source,\n target: edge.target,\n },\n ...(classes === undefined ? {} : { classes }),\n };\n}\n\n/*** Convert readonly class arrays to Cytoscape-compatible mutable arrays. */\nfunction normalizeClasses(classes: CytoscapeClasses | undefined): string[] | string | undefined {\n if (classes === undefined || typeof classes === 'string') return classes;\n return [...classes];\n}\n\n/*** Compare canonical identities without locale-dependent ordering. */\nfunction compareIds(left: string, right: string): number {\n if (left < right) return -1;\n return left > right ? 1 : 0;\n}\n","import type { Graph, GraphEdge, GraphNode } from '@ankhorage/graph';\nimport { toCytoscapeElements } from '@ankhorage/graph-cytoscape';\nimport type { ElementsDefinition } from 'cytoscape';\n\nimport type { ParsedDirectory, ParsedFile } from '@/shared/types';\n\n/***\n * Builds a weighted dependency graph and converts it through the canonical Cytoscape adapter.\n */\nexport function buildGraph(dir: ParsedDirectory): ElementsDefinition {\n const graph = buildCanonicalGraph(dir);\n\n return toCytoscapeElements(graph, {\n nodeClasses: node => (node.data.isIntrinsic === true ? undefined : 'isVendor'),\n });\n}\n\n/*** Builds PKGViz package dependencies in the canonical Ankhorage graph model. */\nfunction buildCanonicalGraph(dir: ParsedDirectory): Graph<PackageNodeData, PackageEdgeData> {\n const { nodes, edges } = buildGraphRecursively(dir);\n\n for (const edge of edges.values()) {\n for (const endpoint of [edge.source, edge.target]) {\n if (nodes.some(node => node.id === endpoint)) continue;\n\n const parent = endpoint.includes('.') ? endpoint.split('.').slice(0, -1).join('.') : '';\n const name = endpoint.split('.').pop() || endpoint;\n\n nodes.push({\n id: endpoint,\n data: {\n label: endpoint,\n path: endpoint,\n parent,\n name,\n },\n });\n }\n }\n\n return {\n nodes,\n edges: Array.from(edges.values()),\n };\n}\n\n/*** Recursively collects intrinsic package nodes and weighted dependency edges. */\nfunction buildGraphRecursively(\n currentDir: ParsedDirectory,\n currentPath = '',\n nodes: GraphNode<PackageNodeData>[] = [],\n edges = new Map<string, GraphEdge<PackageEdgeData>>()\n): CanonicalGraphAccumulator {\n for (const key of Object.keys(currentDir)) {\n const dirOrFile = (currentDir as Record<string, ParsedDirectory | ParsedFile>)[key];\n const isDirectory = !(dirOrFile as ParsedFile)?.className;\n\n if (isDirectory) {\n const pkg = currentPath ? `${currentPath}.${key}` : key;\n\n nodes.push({\n id: pkg,\n data: {\n path: pkg,\n parent: currentPath,\n label: key,\n name: key.split('.').pop() || key,\n isIntrinsic: true,\n },\n });\n\n buildGraphRecursively(dirOrFile as ParsedDirectory, pkg, nodes, edges);\n continue;\n }\n\n const file = dirOrFile as ParsedFile;\n const source = file.package?.trim();\n if (!source) continue;\n\n const targets = (file.imports ?? [])\n .map(imp => imp.pkg?.trim())\n .filter((target): target is string => Boolean(target));\n\n for (const target of targets) {\n if (target === source) continue;\n\n const edgeId = `${source}->${target}`;\n const existing = edges.get(edgeId);\n const weight = (existing?.data.weight ?? 0) + 1;\n\n edges.set(edgeId, {\n id: edgeId,\n source,\n target,\n data: { weight },\n });\n }\n }\n\n return { nodes, edges };\n}\n\ninterface PackageNodeData extends Readonly<Record<string, unknown>> {\n readonly path: string;\n readonly parent: string;\n readonly label: string;\n readonly name: string;\n readonly isIntrinsic?: boolean;\n}\n\ninterface PackageEdgeData extends Readonly<Record<string, unknown>> {\n readonly weight: number;\n}\n\ninterface CanonicalGraphAccumulator {\n readonly nodes: GraphNode<PackageNodeData>[];\n readonly edges: Map<string, GraphEdge<PackageEdgeData>>;\n}\n","import { resolve } from 'node:path';\n\nimport { readProjectSnapshotAsync } from '@/features/project-analysis/adapters/outbound/filesystem/readProjectSnapshotAsync';\nimport { createProjectSnapshotReader } from '@/features/project-analysis/application/use-cases/createProjectSnapshotReader';\nimport type { ProjectSnapshot } from '@/types/projectAnalysis';\n\n/*** Wires the filesystem reader to process-local in-flight sharing using normalized project paths. */\nexport function loadProjectSnapshotAsync(projectPath: string): Promise<ProjectSnapshot> {\n return reader.readAsync(resolve(projectPath));\n}\n\nconst reader = createProjectSnapshotReader({ readAsync: readProjectSnapshotAsync });\n","import { buildGraph } from '@/app/utils/buildGraph';\nimport { getParsedFileStructure } from '@/app/utils/getParsedFileStructure';\nimport { inspectParserLanguageAsync } from '@/app/utils/inspectParserLanguageAsync';\nimport type { ProjectSnapshot } from '@/types/projectAnalysis';\n\n/*** Reads one project's language and source files and constructs its shared weighted graph. */\nexport async function readProjectSnapshotAsync(projectPath: string): Promise<ProjectSnapshot> {\n const timeStart = Date.now();\n const language = await inspectParserLanguageAsync(projectPath);\n const files = await getParsedFileStructure(language.language, projectPath);\n return { files, graph: buildGraph(files), language, projectPath, timeStart };\n}\n","import type { ProjectSnapshot } from '@/types/projectAnalysis';\n\n/***\n * Shares only in-flight analysis of the same normalized project path within one server process.\n * @performance\n * Graph, tree and audit must share the parsed files and graph, not independently scan the project.\n * Entries are removed after success or failure so later loads observe source changes and can retry.\n */\nexport function createProjectSnapshotReader(source: ProjectSnapshotSource) {\n const pending = new Map<string, Promise<ProjectSnapshot>>();\n\n /*** Joins the current project analysis or starts a fresh snapshot through the source port. */\n function readAsync(projectPath: string): Promise<ProjectSnapshot> {\n const current = pending.get(projectPath);\n if (current !== undefined) return current;\n\n const next = Promise.resolve()\n .then(() => source.readAsync(projectPath))\n .finally(() => pending.delete(projectPath));\n pending.set(projectPath, next);\n return next;\n }\n\n return { readAsync };\n}\n\ninterface ProjectSnapshotSource {\n readonly readAsync: (projectPath: string) => Promise<ProjectSnapshot>;\n}\n","import { toPosix } from '@/shared/utils/toPosix';\n\n/*** Returns the configured project path in POSIX form. */\nexport const parseProjectPath = () => {\n const projectPath = process.env.NEXT_PUBLIC_PROJECT_PATH;\n if (!projectPath) throw new Error('Missing ENV: NEXT_PUBLIC_PROJECT_PATH');\n\n return toPosix(projectPath);\n};\n","/***\n * Converts Windows-style backslashes in a file path to POSIX-style forward slashes.\n * @example 'C:\\\\Users\\\\User\\\\Documents\\\\Project' => 'C:/Users/User/Documents/Project'\n */\nexport const toPosix = (p: string) => p.replace(/\\\\/g, '/');\n"],"names":["ALIAS","Symbol","for","DOC","MAP","PAIR","SCALAR","SEQ","NODE_TYPE","isAlias","node","isDocument","isMap","isPair","isScalar","isSeq","isCollection","isNode","hasAnchor","anchor","exports","identity","BREAK","SKIP","REMOVE","visit","visitor","visitor_","initVisitor","cd","visit_","contents","Object","freeze","key","path","ctrl","callVisitor","replaceNode","concat","i","items","length","ci","splice","ck","cv","value","visitAsync","visitAsync_","Collection","Node","Value","assign","Alias","Map","Scalar","Seq","Pair","undefined","parent","pt","Error","escapeChars","escapeTagName","tn","replace","ch","Directives","yaml","tags","docStart","docEnd","defaultYaml","defaultTags","clone","copy","atDocument","res","version","atNextDocument","explicit","add","line","onError","parts","trim","split","name","shift","handle","prefix","isValid","test","tagName","source","verbatim","slice","suffix","match","decodeURIComponent","error","String","tagString","tag","entries","startsWith","substring","toString","doc","lines","tagEntries","tagNames","_key","keys","some","push","join","anchorIsValid","sa","JSON","stringify","msg","anchorNames","root","anchors","Set","findNewAnchor","exclude","has","createNodeAnchors","aliasObjects","sourceObjects","prevAnchors","onAnchor","setAnchors","ref","get","applyReviver","reviver","obj","val","Array","isArray","len","v0","v1","k","from","delete","set","call","toJS","arg","ctx","map","v","toJSON","data","aliasCount","count","onCreate","keep","Number","NodeBase","type","defineProperty","create","getPrototypeOf","getOwnPropertyDescriptors","range","mapAsMap","maxAliasCount","TypeError","mapKeyWarned","values","resolve","ReferenceError","nodes","aliasResolveCache","found","getAliasCount","_arg","_onComment","_onChompKeep","src","options","verifyAliasOrder","implicitKey","item","c","kc","vc","Math","max","isScalarValue","BLOCK_FOLDED","BLOCK_LITERAL","PLAIN","QUOTE_DOUBLE","QUOTE_SINGLE","defaultTagPrefix","findTagObject","filter","t","tagObj","find","format","identify","createNode","schema","Boolean","BigInt","valueOf","aliasDuplicateObjects","onTagObj","iterator","nodeClass","default","collectionFromPath","isInteger","a","keepUndefined","isEmptyPath","next","done","configurable","enumerable","writable","it","addIn","rest","deleteIn","getIn","keepScalar","hasAllNullValues","allowScalar","every","n","commentBefore","comment","hasIn","setIn","stringifyComment","str","indentComment","indent","lineComment","endsWith","includes","FOLD_FLOW","FOLD_BLOCK","FOLD_QUOTED","foldFlowLines","text","mode","indentAtStart","lineWidth","minContentWidth","onFold","onOverflow","endStep","folds","escapedFolds","end","prev","overflow","escStart","escEnd","consumeMoreIndentedLines","j","fold","start","getFoldOptions","isBlock","containsDocumentMarker","lineLengthOverLimit","indentLength","limit","strLen","doubleQuotedString","json","doubleQuotedAsJSON","minMultiLineLength","doubleQuotedMinMultiLineLength","code","substr","singleQuotedString","singleQuote","quotedString","qs","hasDouble","hasSingle","blockEndNewlines","RegExp","blockString","onComment","onChompKeep","blockQuote","commentString","forceBlockIndent","literal","chomp","endStart","endNlPos","indexOf","startWithSpace","startEnd","startNlPos","indentSize","header","foldedValue","literalFallback","foldOptions","body","plainString","actualString","indentStep","inFlow","compat","stringifyString","ss","_stringify","_type","defaultKeyType","defaultStringType","createStringifyContext","opt","directives","falseStr","flowCollectionPadding","indentSeq","nullStr","simpleKeys","trailingComma","trueStr","toStringOptions","collectionStyle","repeat","getTagObject","testMatch","stringifyProps","anchors$1","props","resolvedAliases","o","stringifyPair","allNullValues","keyComment","explicitKey","keyCommentDone","chompKeep","vsb","vcb","valueComment","spaceBefore","flow","valueCommentDone","valueStr","ws","cs","vs0","nl0","hasNewline","hasPropsLine","sp0","node_process","debug","logLevel","messages","console","log","warn","warning","emitWarning","MERGE_KEY","merge","description","addToJSMap","addMergeToJSMap","isMergeKey","resolveAliasValue","mergeValue","srcMap","prototype","hasOwnProperty","addPairToJSMap","jsKey","stringKey","stringifyKey","jsValue","strCtx","inStringifyKey","strKey","jsonStr","createPair","_","pair","stringifyCollection","collection","stringifyFlowCollection","stringifyBlockCollection","blockItemPrefix","flowChars","itemIndent","itemCtx","addCommentBefore","ik","fcPadding","reqNewline","linesAtValue","iv","reduce","sum","ic","trimStart","findPair","YAMLMap","replacer","sortMapEntries","sort","overwrite","_pair","sortEntries","findIndex","del","Type","YAMLSeq","idx","asItemIndex","seq","string","nullTag","boolTag","sv","stringifyNumber","minFractionDigits","num","isFinite","isNaN","is","d","floatNaN","toLowerCase","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY","floatExp","parseFloat","toExponential","float","dot","intIdentify","intResolve","offset","radix","intAsBigInt","parseInt","intStringify","intOct","_onError","int","intHex","_null","bool","stringifyJSON","jsonScalars","jsonError","node_buffer","binary","Uint8Array","Buffer","atob","buffer","charCodeAt","buf","btoa","s","fromCharCode","ceil","resolvePairs","cn","createPairs","iterable","pairs","YAMLOMap","bind","pairs$1","omap","seenKeys","boolStringify","boolObj","trueTag","falseTag","f","sign","intBin","YAMLSet","keepPair","parseSexagesimal","asBigInt","p","stringifySexagesimal","_60","unshift","padStart","intTime","floatTime","timestamp","Date","year","month","day","hour","minute","second","millisec","date","UTC","tz","abs","toISOString","schema$1","schema$2","schemas","tagsByName","null","coreKnownTags","getTags","customTags","schemaName","addMergeTag","schemaTags","sortMapEntriesByKey","b","Schema","resolveKnownTags","toStringDefaults","knownTags","stringifyDocument","hasDirectives","dir","contentComment","dc","Document","errors","warnings","_replacer","keepSourceTokens","prettyErrors","strict","stringKeys","uniqueKeys","_directives","setSchema","assertCollection","createAlias","keyToStr","asStr","anchorPrefix","jsonArg","YAMLError","pos","message","YAMLParseError","YAMLWarning","prettifyError","lc","linePos","col","lineStr","lineStarts","min","pointer","resolveProps","tokens","indicator","parentIndent","startOnNewline","atNewline","hasSpace","commentSep","reqSpace","tab","newlineAfterProp","comma","token","cb","last","containsNewline","st","sep","utilContainsNewline","flowIndentCheck","fc","mapIncludes","search","isEqual","utilFlowIndentCheck","utilMapIncludes","startColMsg","resolveBlockMap","composeNode","composeEmptyNode","bm","NodeClass","atRoot","commentEnd","collItem","keyProps","atKey","keyStart","keyNode","valueProps","valueNode","srcToken","resolveBlockSeq","bs","resolveEnd","blockMsg","resolveFlowCollection","fcName","coll","prevItemComment","loop","endRange","expectedEnd","ce","ee","cePos","toUpperCase","resolveCollection","CN","Coll","composeCollection","tagToken","nl","lastProp","expType","kt","resolveBlockScalar","scalar","parseBlockScalarHeader","splitLines","chompStart","content","trimIndent","contentStart","prevMoreIndented","crlf","ts","first","m","line0","resolveFlowScalar","rel","plainValue","singleQuotedValue","doubleQuotedValue","valueEnd","re","badChar","unfoldLines","exec","trimEnd","trimBoth","lastIndex","lm","foldNewline","cc","escapeCodes","parseCharCode","raw","wsStart","e","r","N","L","P","ok","fromCodePoint","composeScalar","findScalarTagByName","findScalarTagByTest","matchWithTest","emptyScalarPosition","before","utilEmptyScalarPosition","isSrcToken","composeAlias","alias","composeDoc","opts","contentEnd","getErrorPos","parsePrelude","prelude","atComment","afterEmptyLine","Composer","atDirectives","decorate","afterDoc","streamInfo","compose","forceDoc","endOffset","env","LOG_STREAM","depth","resolveAsScalar","createScalarToken","context","he","head","addEndtoBlockProps","setScalarValue","afterKey","setBlockScalarValue","setFlowScalarValue","oa","tok","cst","stringifyToken","stringifyItem","_visit","itemAtPath","field","index","parentCollection","cstScalar","cstStringify","cstVisit","BOM","DOCUMENT","FLOW_END","prettyToken","tokenType","isEmpty","hexDigits","tagChars","flowIndicatorChars","invalidAnchorChars","isNotAnchorChar","Lexer","atEnd","blockScalarIndent","blockScalarKeep","flowKey","flowLevel","indentNext","indentValue","lineEndPos","lex","incomplete","hasChars","parseNext","atLineEnd","charAt","continueScalar","dt","getLine","setNext","state","peek","parseStream","parseLineStart","parseBlockStart","parseDocument","parseFlowCollection","parseQuotedScalar","parseBlockScalar","parsePlainScalar","pushCount","dirEnd","pushSpaces","pushNewline","sp","ch0","ch1","pushIndicators","pushUntil","atFlowEndMarker","quote","qb","pushToIndex","lastChar","allowEmpty","pushTag","allowTabs","LineCounter","addNewLine","low","high","mid","lexer","includesToken","list","findNonEmptyIndex","isFlowToken","getPrevProps","getFirstKeyStartProps","arrayPushArray","target","apply","fixFlowSeqItems","Parser","onNewLine","atNewLine","atScalar","onKeyLine","stack","parse","lexeme","LOG_TOKENS","step","pop","sourceToken","top","stream","document","blockScalar","blockMap","blockSequence","flowCollection","documentEnd","lineEnd","bv","startBlockValue","atIndentedComment","atMapIndent","atNextItem","fs","flowScalar","composer","lineCounter","parser","parseOptions","lineCounter$1","parseAllDocuments","parser$1","composer$1","docs","forEach","empty","_doc","_reviver","round","publicApi","CST","ensureServerEntryExports","actions","action","registerServerReference","selectParserLanguage","detection","supported","TypeScript","Java","Cpp","Python","Delphi","Kotlin","candidates","flatMap","language","detected","languages","candidate","id","left","right","score","evidence","selected","indicators","graph","allowedNodeIds","adjacency","buildAdjacency","cycle","graphNodeIds","edge","visited","extractNamespace","extractPresentationOnlyIncludes","namespace","canonicalImports","canonicalNames","includeRegex","imports","delimiter","specifier","segments","pkg","isIntrinsic","mergeImports","fileName","extractClassName","classMatch","extname","structMatch","extractMethodDefinitions","basename","methodRegex","methods","currentVisibility","visibilityRegex","visMatch","visibility","returnType","params","parameters","extractMethodCalls","callRegex","calls","callee","method","parseCppFile","fullPath","projectRoot","resolvedPath","rootPath","filePath","className","package","relative","getProjectName","projectPath","readProjectSnapshotAsync","timeStart","now","files","parseProjectPath","toPosix"],"mappings":"qUAEA,IAAMA,EAAQC,OAAOC,GAAG,CAAC,cACnBC,EAAMF,OAAOC,GAAG,CAAC,iBACjBE,EAAMH,OAAOC,GAAG,CAAC,YACjBG,EAAOJ,OAAOC,GAAG,CAAC,aAClBI,EAASL,OAAOC,GAAG,CAAC,eACpBK,EAAMN,OAAOC,GAAG,CAAC,YACjBM,EAAYP,OAAOC,GAAG,CAAC,kBAKvBY,EAAW,AAACJ,GAAS,CAAC,CAACA,GAAwB,UAAhB,OAAOA,GAAqBA,CAAI,CAACF,EAAU,GAAKF,EAErF,SAASU,EAAaN,CAAI,EACtB,GAAIA,GAAwB,UAAhB,OAAOA,EACf,OAAQA,CAAI,CAACF,EAAU,EACnB,KAAKJ,EACL,KAAKG,EACD,MAAO,EACf,C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,IAAA,EAAA,EAAA,CAAA,CAAA,iCAGgC,IAIvB,CAAA,EAAA,EAAA,OAAA,AAAO,EAHRA,AAGSA,sGCHM,AAAC3a,GAAcA,EAAEnb,OAAO,CAAC,MAAO","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,80,81,82,83,84,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,156,157,158,159,160,163]}
|